feat(core): add new bs dnd adapter (#9717)

This commit is contained in:
pengx17
2025-01-16 13:54:50 +00:00
parent 99717196c5
commit 7dc470e7ea
8 changed files with 121 additions and 10 deletions

View File

@@ -10,7 +10,7 @@ import { getAdaptedEventArgs } from './common';
import { DNDContext } from './context';
import type { DNDData, fromExternalData } from './types';
type MonitorGetFeedback<D extends DNDData = DNDData> = Parameters<
export type MonitorGetFeedback<D extends DNDData = DNDData> = Parameters<
NonNullable<Parameters<typeof monitorForElements>[0]['canMonitor']>
>[0] & {
source: {
@@ -22,7 +22,7 @@ type MonitorGet<T, D extends DNDData = DNDData> =
| T
| ((data: MonitorGetFeedback<D>) => T);
type MonitorDragEvent<D extends DNDData = DNDData> = {
export type MonitorDragEvent<D extends DNDData = DNDData> = {
/**
* Location history for the drag operation
*/
@@ -119,3 +119,5 @@ export const useDndMonitor = <D extends DNDData = DNDData>(
return monitorForExternal(monitorOptions);
}, [monitorOptions, options.fromExternalData]);
};
export { monitorForElements };