@os-design/drag-sort 1.0.33 → 1.0.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/DragAndDrop.d.ts +2 -2
  2. package/dist/DragAndDrop.d.ts.map +1 -1
  3. package/dist/DragAndDrop.js +6 -6
  4. package/dist/Draggable.js +3 -3
  5. package/dist/Droppable.d.ts +1 -1
  6. package/dist/Droppable.d.ts.map +1 -1
  7. package/dist/Droppable.js +4 -4
  8. package/dist/index.d.ts +6 -6
  9. package/dist/index.d.ts.map +1 -1
  10. package/dist/index.js +6 -6
  11. package/dist/utils/ListStore.d.ts +1 -1
  12. package/dist/utils/ListStore.d.ts.map +1 -1
  13. package/dist/utils/getNodeRect.js +3 -2
  14. package/dist/utils/useBlankNode.d.ts +1 -1
  15. package/dist/utils/useBlankNode.d.ts.map +1 -1
  16. package/dist/utils/useDragAndDrop.d.ts +1 -1
  17. package/dist/utils/useDragAndDrop.d.ts.map +1 -1
  18. package/dist/utils/useDragEffect.d.ts +2 -2
  19. package/dist/utils/useDragEffect.d.ts.map +1 -1
  20. package/dist/utils/useDragEffect.js +8 -8
  21. package/dist/utils/useDroppable.d.ts +1 -1
  22. package/dist/utils/useDroppable.d.ts.map +1 -1
  23. package/dist/utils/useInitScrollOffset.js +1 -1
  24. package/dist/utils/useMoveNode.d.ts +3 -3
  25. package/dist/utils/useMoveNode.d.ts.map +1 -1
  26. package/dist/utils/useMoveNode.js +1 -1
  27. package/dist/utils/useTargetList.d.ts +2 -2
  28. package/dist/utils/useTargetList.d.ts.map +1 -1
  29. package/dist/utils/useTargetList.js +1 -1
  30. package/package.json +11 -11
  31. package/src/DragAndDrop.tsx +8 -8
  32. package/src/Draggable.tsx +4 -4
  33. package/src/Droppable.tsx +4 -4
  34. package/src/index.ts +6 -6
  35. package/src/utils/ListStore.ts +1 -1
  36. package/src/utils/getNodeRect.ts +2 -2
  37. package/src/utils/useBlankNode.ts +1 -1
  38. package/src/utils/useDragAndDrop.ts +1 -1
  39. package/src/utils/useDragEffect.ts +10 -10
  40. package/src/utils/useDroppable.ts +1 -1
  41. package/src/utils/useInitScrollOffset.ts +1 -1
  42. package/src/utils/useMoveNode.ts +3 -3
  43. package/src/utils/useTargetList.ts +2 -2
@@ -1,6 +1,6 @@
1
1
  import { type PortalProps } from '@os-design/portal';
2
2
  import React from 'react';
3
- import { type DragEndHandler } from './utils/useDragEffect';
3
+ import { type DragEndHandler } from './utils/useDragEffect.js';
4
4
  export interface DragAndDropProps {
5
5
  /**
6
6
  * The container in which the dragged node will be rendered.
@@ -47,6 +47,6 @@ export interface DragAndDropProps {
47
47
  * The container containing one or more lists with draggable nodes.
48
48
  */
49
49
  declare const DragAndDrop: React.FC<DragAndDropProps>;
50
- export type { DragEndHandler } from './utils/useDragEffect';
50
+ export type { DragEndHandler } from './utils/useDragEffect.js';
51
51
  export default DragAndDrop;
52
52
  //# sourceMappingURL=DragAndDrop.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DragAndDrop.d.ts","sourceRoot":"","sources":["../src/DragAndDrop.tsx"],"names":[],"mappings":"AAAA,OAAe,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAU7D,OAAO,KAON,MAAM,OAAO,CAAC;AAIf,OAAsB,EACpB,KAAK,cAAc,EAEpB,MAAM,uBAAuB,CAAC;AAK/B,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAChD;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAOD;;GAEG;AACH,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAmJ3C,CAAC;AAEF,YAAY,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"DragAndDrop.d.ts","sourceRoot":"","sources":["../src/DragAndDrop.tsx"],"names":[],"mappings":"AAAA,OAAe,EAAE,KAAK,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAU7D,OAAO,KAON,MAAM,OAAO,CAAC;AAIf,OAAsB,EACpB,KAAK,cAAc,EAEpB,MAAM,0BAA0B,CAAC;AAKlC,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,WAAW,CAAC,WAAW,CAAC,CAAC;IAChD;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAOD;;GAEG;AACH,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAmJ3C,CAAC;AAEF,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,eAAe,WAAW,CAAC"}
@@ -4,12 +4,12 @@ import useDrag from '@os-design/use-drag';
4
4
  import useMemoObject from '@os-design/use-memo-object';
5
5
  import usePreventDefaultEvent from '@os-design/use-prevent-default-event';
6
6
  import React, { useCallback, useMemo, useRef, useState } from 'react';
7
- import ListStore from "./utils/ListStore.js";
8
- import { DragAndDropContext } from "./utils/useDragAndDrop.js";
9
- import useDragEffect from "./utils/useDragEffect.js";
10
- import useGeneratedId from "./utils/useGeneratedId.js";
11
- import useInitRect from "./utils/useInitRect.js";
12
- import useTransitionStyle from "./utils/useTransitionStyle.js";
7
+ import ListStore from './utils/ListStore.js';
8
+ import { DragAndDropContext } from './utils/useDragAndDrop.js';
9
+ import useDragEffect from './utils/useDragEffect.js';
10
+ import useGeneratedId from './utils/useGeneratedId.js';
11
+ import useInitRect from './utils/useInitRect.js';
12
+ import useTransitionStyle from './utils/useTransitionStyle.js';
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  /**
15
15
  * The container containing one or more lists with draggable nodes.
package/dist/Draggable.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import useMemoObject from '@os-design/use-memo-object';
2
2
  import React, { useCallback, useEffect, useRef, useState } from 'react';
3
- import useAppendClassName from "./utils/useAppendClassName.js";
4
- import useDragAndDrop from "./utils/useDragAndDrop.js";
5
- import useDroppable from "./utils/useDroppable.js";
3
+ import useAppendClassName from './utils/useAppendClassName.js';
4
+ import useDragAndDrop from './utils/useDragAndDrop.js';
5
+ import useDroppable from './utils/useDroppable.js';
6
6
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
7
7
  const Draggable = ({
8
8
  index,
@@ -1,5 +1,5 @@
1
1
  import React, { type RefObject } from 'react';
2
- import { type RenderDraggedNode } from './utils/NodeList';
2
+ import { type RenderDraggedNode } from './utils/NodeList.js';
3
3
  export interface DroppableChildrenProps {
4
4
  /**
5
5
  * The reference to the list.
@@ -1 +1 @@
1
- {"version":3,"file":"Droppable.d.ts","sourceRoot":"","sources":["../src/Droppable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAEZ,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AACf,OAAiB,EAGf,KAAK,iBAAiB,EACvB,MAAM,kBAAkB,CAAC;AAK1B,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,GAAG,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAC/B;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,iBAAiB,EAAE,iBAAiB,CAAC;IACrC;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,KAAK,CAAC,SAAS,CAAC;CAC9D;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAuFvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"Droppable.d.ts","sourceRoot":"","sources":["../src/Droppable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAEZ,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AACf,OAAiB,EAGf,KAAK,iBAAiB,EACvB,MAAM,qBAAqB,CAAC;AAK7B,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,GAAG,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;IAC/B;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC,cAAc,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,iBAAiB,EAAE,iBAAiB,CAAC;IACrC;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,sBAAsB,KAAK,KAAK,CAAC,SAAS,CAAC;CAC9D;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAuFvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
package/dist/Droppable.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import useMemoObject from '@os-design/use-memo-object';
2
2
  import React, { useCallback, useEffect, useMemo, useRef } from 'react';
3
- import NodeList from "./utils/NodeList.js";
4
- import useDragAndDrop from "./utils/useDragAndDrop.js";
5
- import { DroppableContext } from "./utils/useDroppable.js";
6
- import useGeneratedId from "./utils/useGeneratedId.js";
3
+ import NodeList from './utils/NodeList.js';
4
+ import useDragAndDrop from './utils/useDragAndDrop.js';
5
+ import { DroppableContext } from './utils/useDroppable.js';
6
+ import useGeneratedId from './utils/useGeneratedId.js';
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  const Droppable = ({
9
9
  renderDraggedNode,
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { default as DragAndDrop } from './DragAndDrop';
2
- export { default as Droppable } from './Droppable';
3
- export { default as Draggable } from './Draggable';
4
- export * from './DragAndDrop';
5
- export * from './Droppable';
6
- export * from './Draggable';
1
+ export { default as DragAndDrop } from './DragAndDrop.js';
2
+ export { default as Droppable } from './Droppable.js';
3
+ export { default as Draggable } from './Draggable.js';
4
+ export * from './DragAndDrop.js';
5
+ export * from './Droppable.js';
6
+ export * from './Draggable.js';
7
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,aAAa,CAAC;AAEnD,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAEtD,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export { default as DragAndDrop } from "./DragAndDrop.js";
2
- export { default as Droppable } from "./Droppable.js";
3
- export { default as Draggable } from "./Draggable.js";
4
- export * from "./DragAndDrop.js";
5
- export * from "./Droppable.js";
6
- export * from "./Draggable.js";
1
+ export { default as DragAndDrop } from './DragAndDrop.js';
2
+ export { default as Droppable } from './Droppable.js';
3
+ export { default as Draggable } from './Draggable.js';
4
+ export * from './DragAndDrop.js';
5
+ export * from './Droppable.js';
6
+ export * from './Draggable.js';
@@ -1,4 +1,4 @@
1
- import NodeList from './NodeList';
1
+ import NodeList from './NodeList.js';
2
2
  /**
3
3
  * Stores all the lists where the draggable items is located.
4
4
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ListStore.d.ts","sourceRoot":"","sources":["../../src/utils/ListStore.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,YAAY,CAAC;AAElC;;GAEG;AACH,cAAM,SAAS;IACb,OAAO,CAAC,KAAK,CAAa;;IAM1B;;OAEG;IACI,GAAG,CAAC,IAAI,EAAE,QAAQ;IAIzB;;OAEG;IACI,MAAM,CAAC,EAAE,EAAE,MAAM;IAMxB;;OAEG;IACI,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;CAa3C;AAED,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"ListStore.d.ts","sourceRoot":"","sources":["../../src/utils/ListStore.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,eAAe,CAAC;AAErC;;GAEG;AACH,cAAM,SAAS;IACb,OAAO,CAAC,KAAK,CAAa;;IAM1B;;OAEG;IACI,GAAG,CAAC,IAAI,EAAE,QAAQ;IAIzB;;OAEG;IACI,MAAM,CAAC,EAAE,EAAE,MAAM;IAMxB;;OAEG;IACI,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM;CAa3C;AAED,eAAe,SAAS,CAAC"}
@@ -1,5 +1,6 @@
1
- import getElementOffset from "./getElementOffset.js";
2
- import getElementScroll from "./getElementScroll.js";
1
+ import getElementOffset from './getElementOffset.js';
2
+ import getElementScroll from './getElementScroll.js';
3
+
3
4
  /**
4
5
  * Computes the bounds of the existing node without considering transforms.
5
6
  */
@@ -1,4 +1,4 @@
1
- import NodeList from './NodeList';
1
+ import NodeList from './NodeList.js';
2
2
  interface InitSize {
3
3
  initWidth: number;
4
4
  initHeight: number;
@@ -1 +1 @@
1
- {"version":3,"file":"useBlankNode.d.ts","sourceRoot":"","sources":["../../src/utils/useBlankNode.ts"],"names":[],"mappings":"AACA,OAAO,QAA+B,MAAM,YAAY,CAAC;AAEzD,UAAU,QAAQ;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,UAAU,iBAAiB;IACzB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC5B,mBAAmB,EAAE,QAAQ,GAAG,IAAI,CAAC;CACtC;AAOD;;;GAGG;AACH,QAAA,MAAM,YAAY,UAAW,iBAAiB,eA0E7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"useBlankNode.d.ts","sourceRoot":"","sources":["../../src/utils/useBlankNode.ts"],"names":[],"mappings":"AACA,OAAO,QAA+B,MAAM,eAAe,CAAC;AAE5D,UAAU,QAAQ;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,UAAU,WAAW;IACnB,IAAI,EAAE,QAAQ,CAAC;CAChB;AAED,UAAU,iBAAiB;IACzB,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC5B,mBAAmB,EAAE,QAAQ,GAAG,IAAI,CAAC;CACtC;AAOD;;;GAGG;AACH,QAAA,MAAM,YAAY,UAAW,iBAAiB,eA0E7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { Position } from '@os-design/use-drag';
2
2
  import React, { type MouseEvent, type TouchEvent } from 'react';
3
- import NodeList, { type ExistingNode } from './NodeList';
3
+ import NodeList, { type ExistingNode } from './NodeList.js';
4
4
  export interface SetDraggedNodeProps {
5
5
  list: NodeList;
6
6
  node: ExistingNode;
@@ -1 +1 @@
1
- {"version":3,"file":"useDragAndDrop.d.ts","sourceRoot":"","sources":["../../src/utils/useDragAndDrop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAc,MAAM,OAAO,CAAC;AAC5E,OAAO,QAAQ,EAAE,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAEzD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,KAAK,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;AAE9E,UAAU,uBAAuB;IAC/B,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,WAAW,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC1C,YAAY,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC3C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,wCAM7B,CAAC;AAEH,QAAA,MAAM,cAAc,QAAO,uBACK,CAAC;AAEjC,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"useDragAndDrop.d.ts","sourceRoot":"","sources":["../../src/utils/useDragAndDrop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAc,MAAM,OAAO,CAAC;AAC5E,OAAO,QAAQ,EAAE,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAE5D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAED,KAAK,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;AAE9E,UAAU,uBAAuB;IAC/B,YAAY,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACvC,cAAc,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,WAAW,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC1C,YAAY,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;IAC3C,aAAa,EAAE,MAAM,CAAC;CACvB;AAED,eAAO,MAAM,kBAAkB,wCAM7B,CAAC;AAEH,QAAA,MAAM,cAAc,QAAO,uBACK,CAAC;AAEjC,eAAe,cAAc,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { Position } from '@os-design/use-drag';
2
2
  import { type RefObject } from 'react';
3
- import ListStore from './ListStore';
4
- import NodeList, { type ExistingNode } from './NodeList';
3
+ import ListStore from './ListStore.js';
4
+ import NodeList, { type ExistingNode } from './NodeList.js';
5
5
  export interface DraggedNode {
6
6
  list: NodeList;
7
7
  node: ExistingNode;
@@ -1 +1 @@
1
- {"version":3,"file":"useDragEffect.d.ts","sourceRoot":"","sources":["../../src/utils/useDragEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AACf,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,QAAQ,EAAE,EACf,KAAK,YAAY,EAGlB,MAAM,YAAY,CAAC;AAUpB,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAOD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,cAAc,GAAG,CAC3B,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,YAAY,KACjB,IAAI,CAAC;AAEV,UAAU,kBAAkB;IAC1B,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,QAAQ,CAAC;IACzB,YAAY,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACnC,SAAS,EAAE,cAAc,CAAC;CAC3B;AAeD,QAAA,MAAM,aAAa,UAAW,kBAAkB,SAoa/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"useDragEffect.d.ts","sourceRoot":"","sources":["../../src/utils/useDragEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAGpD,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AACf,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,QAAQ,EAAE,EACf,KAAK,YAAY,EAGlB,MAAM,eAAe,CAAC;AAUvB,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,QAAQ,CAAC;IACf,IAAI,EAAE,YAAY,CAAC;IACnB,QAAQ,EAAE,QAAQ,CAAC;CACpB;AAOD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,MAAM,cAAc,GAAG,CAC3B,OAAO,EAAE,YAAY,EACrB,MAAM,EAAE,YAAY,KACjB,IAAI,CAAC;AAEV,UAAU,kBAAkB;IAC1B,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,cAAc,EAAE,QAAQ,CAAC;IACzB,YAAY,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACnC,SAAS,EAAE,cAAc,CAAC;CAC3B;AAeD,QAAA,MAAM,aAAa,UAAW,kBAAkB,SAoa/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,14 +1,14 @@
1
1
  import useEvent from '@os-design/use-event';
2
2
  import useThrottle from '@os-design/use-throttle';
3
3
  import { useCallback, useEffect, useMemo, useRef } from 'react';
4
- import getElementScroll from "./getElementScroll.js";
5
- import getNodeRect from "./getNodeRect.js";
6
- import useBlankNode from "./useBlankNode.js";
7
- import useGetNodeStyle from "./useGetNodeStyle.js";
8
- import useInitRect from "./useInitRect.js";
9
- import useInitScrollOffset from "./useInitScrollOffset.js";
10
- import useMoveNode from "./useMoveNode.js";
11
- import useTargetList from "./useTargetList.js";
4
+ import getElementScroll from './getElementScroll.js';
5
+ import getNodeRect from './getNodeRect.js';
6
+ import useBlankNode from './useBlankNode.js';
7
+ import useGetNodeStyle from './useGetNodeStyle.js';
8
+ import useInitRect from './useInitRect.js';
9
+ import useInitScrollOffset from './useInitScrollOffset.js';
10
+ import useMoveNode from './useMoveNode.js';
11
+ import useTargetList from './useTargetList.js';
12
12
  const HIDDEN_NODE_STYLE = {
13
13
  opacity: 0,
14
14
  pointerEvents: 'none'
@@ -1,5 +1,5 @@
1
1
  import React, { type MouseEvent, type TouchEvent } from 'react';
2
- import type { ExistingNode, NodeProps } from './NodeList';
2
+ import type { ExistingNode, NodeProps } from './NodeList.js';
3
3
  interface DroppableContextProps {
4
4
  registerNode: (props: NodeProps) => ExistingNode;
5
5
  deregisterNode: (node: ExistingNode) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useDroppable.d.ts","sourceRoot":"","sources":["../../src/utils/useDroppable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAc,MAAM,OAAO,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAE1D,UAAU,qBAAqB;IAC7B,YAAY,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,YAAY,CAAC;IACjD,cAAc,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IAC7C,WAAW,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACzD,YAAY,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;CAC3D;AAED,eAAO,MAAM,gBAAgB,sCAM3B,CAAC;AAEH,QAAA,MAAM,YAAY,QAAO,qBAAqD,CAAC;AAE/E,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"useDroppable.d.ts","sourceRoot":"","sources":["../../src/utils/useDroppable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAc,MAAM,OAAO,CAAC;AAC5E,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE7D,UAAU,qBAAqB;IAC7B,YAAY,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,YAAY,CAAC;IACjD,cAAc,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IAC7C,WAAW,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACzD,YAAY,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;CAC3D;AAED,eAAO,MAAM,gBAAgB,sCAM3B,CAAC;AAEH,QAAA,MAAM,YAAY,QAAO,qBAAqD,CAAC;AAE/E,eAAe,YAAY,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { useMemo } from 'react';
2
- import getElementScroll from "./getElementScroll.js";
2
+ import getElementScroll from './getElementScroll.js';
3
3
  const useInitScrollOffset = ref => useMemo(() => {
4
4
  if (!ref || !ref.current) return null;
5
5
  const scrollOffset = getElementScroll(ref.current);
@@ -1,6 +1,6 @@
1
1
  import { type Position } from '@os-design/use-drag';
2
- import NodeList, { type ExistingNode } from './NodeList';
3
- import type { NodeStyleGetter } from './useGetNodeStyle';
2
+ import NodeList, { type ExistingNode } from './NodeList.js';
3
+ import type { NodeStyleGetter } from './useGetNodeStyle.js';
4
4
  interface DraggedNode {
5
5
  node: ExistingNode;
6
6
  }
@@ -16,6 +16,6 @@ interface MoveProps {
16
16
  destination: 'cursor' | 'end';
17
17
  isAnotherList?: boolean;
18
18
  }
19
- declare const useMoveNode: (props: UseMoveNodeProps) => (options: MoveProps) => [import("./NodeList").Node, import("./NodeList").Node, import("react").RefObject<any>, (style: import("react").CSSProperties) => void, number, string];
19
+ declare const useMoveNode: (props: UseMoveNodeProps) => (options: MoveProps) => [import("./NodeList.js").Node, import("./NodeList.js").Node, import("react").RefObject<any>, (style: import("react").CSSProperties) => void, number, string];
20
20
  export default useMoveNode;
21
21
  //# sourceMappingURL=useMoveNode.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useMoveNode.d.ts","sourceRoot":"","sources":["../../src/utils/useMoveNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,QAAQ,EAAE,EAAE,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAEzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD,UAAU,WAAW;IACnB,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,UAAU,gBAAgB;IACxB,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,YAAY,EAAE,eAAe,CAAC;CAC/B;AAED,UAAU,SAAS;IACjB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,YAAY,CAAC;IACxB,SAAS,EAAE,IAAI,GAAG,MAAM,CAAC;IACzB,WAAW,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,QAAA,MAAM,WAAW,UAAW,gBAAgB,eAI9B,SAAS,2JAgEtB,CAAC;AAEF,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"useMoveNode.d.ts","sourceRoot":"","sources":["../../src/utils/useMoveNode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,QAAQ,EAAE,EAAE,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAE5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,UAAU,WAAW;IACnB,IAAI,EAAE,YAAY,CAAC;CACpB;AAED,UAAU,gBAAgB;IACxB,QAAQ,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC1B,WAAW,EAAE,WAAW,GAAG,IAAI,CAAC;IAChC,YAAY,EAAE,eAAe,CAAC;CAC/B;AAED,UAAU,SAAS;IACjB,IAAI,EAAE,QAAQ,CAAC;IACf,SAAS,EAAE,YAAY,CAAC;IACxB,SAAS,EAAE,IAAI,GAAG,MAAM,CAAC;IACzB,WAAW,EAAE,QAAQ,GAAG,KAAK,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,QAAA,MAAM,WAAW,UAAW,gBAAgB,eAI9B,SAAS,iKAgEtB,CAAC;AAEF,eAAe,WAAW,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { useCallback } from 'react';
2
- import getNodeRect from "./getNodeRect.js";
2
+ import getNodeRect from './getNodeRect.js';
3
3
  const useMoveNode = props => {
4
4
  const {
5
5
  position,
@@ -1,6 +1,6 @@
1
1
  import type { Position } from '@os-design/use-drag';
2
2
  import { type RefObject } from 'react';
3
- import ListStore from './ListStore';
4
- declare const useTargetList: (position: Position | null, listStoreRef: RefObject<ListStore>) => import("./NodeList").default | null;
3
+ import ListStore from './ListStore.js';
4
+ declare const useTargetList: (position: Position | null, listStoreRef: RefObject<ListStore>) => import("./NodeList.js").default | null;
5
5
  export default useTargetList;
6
6
  //# sourceMappingURL=useTargetList.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTargetList.d.ts","sourceRoot":"","sources":["../../src/utils/useTargetList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;AACvE,OAAO,SAAS,MAAM,aAAa,CAAC;AAGpC,QAAA,MAAM,aAAa,aACP,QAAQ,GAAG,IAAI,gBACX,SAAS,CAAC,SAAS,CAAC,wCAoBnC,CAAC;AAEF,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"useTargetList.d.ts","sourceRoot":"","sources":["../../src/utils/useTargetList.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,KAAK,SAAS,EAAkC,MAAM,OAAO,CAAC;AACvE,OAAO,SAAS,MAAM,gBAAgB,CAAC;AAGvC,QAAA,MAAM,aAAa,aACP,QAAQ,GAAG,IAAI,gBACX,SAAS,CAAC,SAAS,CAAC,2CAoBnC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import useThrottle from '@os-design/use-throttle';
2
2
  import { useCallback, useMemo, useState } from 'react';
3
- import useScrollEventByPoint from "./useScrollEventByPoint.js";
3
+ import useScrollEventByPoint from './useScrollEventByPoint.js';
4
4
  const useTargetList = (position, listStoreRef) => {
5
5
  const [number, setNumber] = useState(0);
6
6
  const targetList = useMemo(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@os-design/drag-sort",
3
- "version": "1.0.33",
3
+ "version": "1.0.35",
4
4
  "license": "UNLICENSED",
5
5
  "repository": "git@gitlab.com:os-team/libs/os-design.git",
6
6
  "type": "module",
@@ -29,22 +29,22 @@
29
29
  "access": "public"
30
30
  },
31
31
  "dependencies": {
32
- "@os-design/portal": "^1.0.20",
33
- "@os-design/use-auto-scroll": "^1.0.24",
34
- "@os-design/use-drag": "^1.0.22",
35
- "@os-design/use-event": "^1.0.25",
36
- "@os-design/use-memo-object": "^1.0.20",
37
- "@os-design/use-prevent-default-event": "^1.0.22",
38
- "@os-design/use-throttle": "^1.0.24"
32
+ "@os-design/portal": "^1.0.21",
33
+ "@os-design/use-auto-scroll": "^1.0.25",
34
+ "@os-design/use-drag": "^1.0.23",
35
+ "@os-design/use-event": "^1.0.26",
36
+ "@os-design/use-memo-object": "^1.0.22",
37
+ "@os-design/use-prevent-default-event": "^1.0.23",
38
+ "@os-design/use-throttle": "^1.0.26"
39
39
  },
40
40
  "devDependencies": {
41
- "@os-design/omit-emotion-props": "^1.0.22",
42
- "@os-design/use-size": "^1.0.26",
41
+ "@os-design/omit-emotion-props": "^1.0.24",
42
+ "@os-design/use-size": "^1.0.27",
43
43
  "react-window": "^1.8.10"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "react": ">=18",
47
47
  "react-dom": ">=18"
48
48
  },
49
- "gitHead": "53c233a23d50ce2f7d9bc3ae9c96d9142e14b7ac"
49
+ "gitHead": "6d9438b5e0aa2deb50cba4e59fe409ab6c3c4e46"
50
50
  }
@@ -16,16 +16,16 @@ import React, {
16
16
  useRef,
17
17
  useState,
18
18
  } from 'react';
19
- import ListStore from './utils/ListStore';
20
- import NodeList, { type ExistingNode } from './utils/NodeList';
21
- import { DragAndDropContext } from './utils/useDragAndDrop';
19
+ import ListStore from './utils/ListStore.js';
20
+ import NodeList, { type ExistingNode } from './utils/NodeList.js';
21
+ import { DragAndDropContext } from './utils/useDragAndDrop.js';
22
22
  import useDragEffect, {
23
23
  type DragEndHandler,
24
24
  type DraggedNode,
25
- } from './utils/useDragEffect';
26
- import useGeneratedId from './utils/useGeneratedId';
27
- import useInitRect from './utils/useInitRect';
28
- import useTransitionStyle from './utils/useTransitionStyle';
25
+ } from './utils/useDragEffect.js';
26
+ import useGeneratedId from './utils/useGeneratedId.js';
27
+ import useInitRect from './utils/useInitRect.js';
28
+ import useTransitionStyle from './utils/useTransitionStyle.js';
29
29
 
30
30
  export interface DragAndDropProps {
31
31
  /**
@@ -227,6 +227,6 @@ const DragAndDrop: React.FC<DragAndDropProps> = ({
227
227
  );
228
228
  };
229
229
 
230
- export type { DragEndHandler } from './utils/useDragEffect';
230
+ export type { DragEndHandler } from './utils/useDragEffect.js';
231
231
 
232
232
  export default DragAndDrop;
package/src/Draggable.tsx CHANGED
@@ -9,10 +9,10 @@ import React, {
9
9
  useRef,
10
10
  useState,
11
11
  } from 'react';
12
- import type { Node } from './utils/NodeList';
13
- import useAppendClassName from './utils/useAppendClassName';
14
- import useDragAndDrop from './utils/useDragAndDrop';
15
- import useDroppable from './utils/useDroppable';
12
+ import type { Node } from './utils/NodeList.js';
13
+ import useAppendClassName from './utils/useAppendClassName.js';
14
+ import useDragAndDrop from './utils/useDragAndDrop.js';
15
+ import useDroppable from './utils/useDroppable.js';
16
16
 
17
17
  export interface DraggableHandlers {
18
18
  /**
package/src/Droppable.tsx CHANGED
@@ -12,10 +12,10 @@ import NodeList, {
12
12
  type ExistingNode,
13
13
  type NodeProps,
14
14
  type RenderDraggedNode,
15
- } from './utils/NodeList';
16
- import useDragAndDrop from './utils/useDragAndDrop';
17
- import { DroppableContext } from './utils/useDroppable';
18
- import useGeneratedId from './utils/useGeneratedId';
15
+ } from './utils/NodeList.js';
16
+ import useDragAndDrop from './utils/useDragAndDrop.js';
17
+ import { DroppableContext } from './utils/useDroppable.js';
18
+ import useGeneratedId from './utils/useGeneratedId.js';
19
19
 
20
20
  export interface DroppableChildrenProps {
21
21
  /**
package/src/index.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { default as DragAndDrop } from './DragAndDrop';
2
- export { default as Droppable } from './Droppable';
3
- export { default as Draggable } from './Draggable';
1
+ export { default as DragAndDrop } from './DragAndDrop.js';
2
+ export { default as Droppable } from './Droppable.js';
3
+ export { default as Draggable } from './Draggable.js';
4
4
 
5
- export * from './DragAndDrop';
6
- export * from './Droppable';
7
- export * from './Draggable';
5
+ export * from './DragAndDrop.js';
6
+ export * from './Droppable.js';
7
+ export * from './Draggable.js';
@@ -1,4 +1,4 @@
1
- import NodeList from './NodeList';
1
+ import NodeList from './NodeList.js';
2
2
 
3
3
  /**
4
4
  * Stores all the lists where the draggable items is located.
@@ -1,6 +1,6 @@
1
1
  import type { RefObject } from 'react';
2
- import getElementOffset from './getElementOffset';
3
- import getElementScroll from './getElementScroll';
2
+ import getElementOffset from './getElementOffset.js';
3
+ import getElementScroll from './getElementScroll.js';
4
4
 
5
5
  /**
6
6
  * Computes the bounds of the existing node without considering transforms.
@@ -1,5 +1,5 @@
1
1
  import { useCallback, useEffect, useRef } from 'react';
2
- import NodeList, { type ExistingNode } from './NodeList';
2
+ import NodeList, { type ExistingNode } from './NodeList.js';
3
3
 
4
4
  interface InitSize {
5
5
  initWidth: number;
@@ -1,6 +1,6 @@
1
1
  import type { Position } from '@os-design/use-drag';
2
2
  import React, { type MouseEvent, type TouchEvent, useContext } from 'react';
3
- import NodeList, { type ExistingNode } from './NodeList';
3
+ import NodeList, { type ExistingNode } from './NodeList.js';
4
4
 
5
5
  export interface SetDraggedNodeProps {
6
6
  list: NodeList;
@@ -9,20 +9,20 @@ import {
9
9
  useMemo,
10
10
  useRef,
11
11
  } from 'react';
12
- import ListStore from './ListStore';
12
+ import ListStore from './ListStore.js';
13
13
  import NodeList, {
14
14
  type ExistingNode,
15
15
  type Node,
16
16
  type NodeProps,
17
- } from './NodeList';
18
- import getElementScroll from './getElementScroll';
19
- import getNodeRect from './getNodeRect';
20
- import useBlankNode from './useBlankNode';
21
- import useGetNodeStyle from './useGetNodeStyle';
22
- import useInitRect from './useInitRect';
23
- import useInitScrollOffset from './useInitScrollOffset';
24
- import useMoveNode from './useMoveNode';
25
- import useTargetList from './useTargetList';
17
+ } from './NodeList.js';
18
+ import getElementScroll from './getElementScroll.js';
19
+ import getNodeRect from './getNodeRect.js';
20
+ import useBlankNode from './useBlankNode.js';
21
+ import useGetNodeStyle from './useGetNodeStyle.js';
22
+ import useInitRect from './useInitRect.js';
23
+ import useInitScrollOffset from './useInitScrollOffset.js';
24
+ import useMoveNode from './useMoveNode.js';
25
+ import useTargetList from './useTargetList.js';
26
26
 
27
27
  export interface DraggedNode {
28
28
  list: NodeList;
@@ -1,5 +1,5 @@
1
1
  import React, { type MouseEvent, type TouchEvent, useContext } from 'react';
2
- import type { ExistingNode, NodeProps } from './NodeList';
2
+ import type { ExistingNode, NodeProps } from './NodeList.js';
3
3
 
4
4
  interface DroppableContextProps {
5
5
  registerNode: (props: NodeProps) => ExistingNode;
@@ -1,5 +1,5 @@
1
1
  import { type RefObject, useMemo } from 'react';
2
- import getElementScroll from './getElementScroll';
2
+ import getElementScroll from './getElementScroll.js';
3
3
 
4
4
  const useInitScrollOffset = (ref?: RefObject<HTMLElement>) =>
5
5
  useMemo(() => {
@@ -1,8 +1,8 @@
1
1
  import { type Position } from '@os-design/use-drag';
2
2
  import { useCallback } from 'react';
3
- import NodeList, { type ExistingNode } from './NodeList';
4
- import getNodeRect from './getNodeRect';
5
- import type { NodeStyleGetter } from './useGetNodeStyle';
3
+ import NodeList, { type ExistingNode } from './NodeList.js';
4
+ import getNodeRect from './getNodeRect.js';
5
+ import type { NodeStyleGetter } from './useGetNodeStyle.js';
6
6
 
7
7
  interface DraggedNode {
8
8
  node: ExistingNode;
@@ -1,8 +1,8 @@
1
1
  import type { Position } from '@os-design/use-drag';
2
2
  import useThrottle from '@os-design/use-throttle';
3
3
  import { type RefObject, useCallback, useMemo, useState } from 'react';
4
- import ListStore from './ListStore';
5
- import useScrollEventByPoint from './useScrollEventByPoint';
4
+ import ListStore from './ListStore.js';
5
+ import useScrollEventByPoint from './useScrollEventByPoint.js';
6
6
 
7
7
  const useTargetList = (
8
8
  position: Position | null,