@pyreon/dnd 0.37.1 → 0.39.0

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.
package/README.md CHANGED
@@ -175,7 +175,7 @@ useDraggable({
175
175
  ## Gotchas
176
176
 
177
177
  - **Hooks are SSR-safe** — they return zero-state accessors when `document` is undefined. Real registration happens at first browser tick.
178
- - **`element: () => el` must return the SAME element across reads** until the component unmounts. Reassigning `el` to a new node mid-life re-registers but stale closures from `onDragStart` callbacks fire against the OLD node.
178
+ - **`element: () => el` must return the SAME element across reads** until the component unmounts. Setup is single-shot (deferred via `queueMicrotask`, never re-invoked) — reassigning `el` to a new node mid-life is NOT re-registered; the hook stays bound to the original node. Unmount and remount to bind a new element.
179
179
  - **`useSortable` requires `items` to be reactive** (a getter or signal call) — the hook needs to re-derive on insert / remove. Passing a captured array snapshot breaks reordering.
180
180
  - **`canMonitor` / `canDrop` run on every drag event** — keep them cheap. For expensive checks, derive a flag in a `computed` upstream.
181
181
  - **`useFileDrop` only fires on REAL file drags from the OS** — not from `useDraggable` (those go through pdnd's element adapter). The two adapters are isolated.
package/lib/index.js CHANGED
@@ -8,7 +8,7 @@ import { attachClosestEdge, extractClosestEdge } from "@atlaskit/pragmatic-drag-
8
8
 
9
9
  //#region package.json
10
10
  var name = "@pyreon/dnd";
11
- var version = "0.37.1";
11
+ var version = "0.39.0";
12
12
 
13
13
  //#endregion
14
14
  //#region src/use-drag-monitor.ts
@@ -273,5 +273,4 @@ declare function useFileDrop(options: UseFileDropOptions): UseFileDropResult;
273
273
  */
274
274
  declare function useSortable<T>(options: UseSortableOptions<T>): UseSortableResult;
275
275
  //#endregion
276
- export { type DragData, type DropEdge, type DropLocation, type UseDragMonitorOptions, type UseDragMonitorResult, type UseDraggableOptions, type UseDraggableResult, type UseDroppableOptions, type UseDroppableResult, type UseFileDropOptions, type UseFileDropResult, type UseSortableOptions, type UseSortableResult, useDragMonitor, useDraggable, useDroppable, useFileDrop, useSortable };
277
- //# sourceMappingURL=index2.d.ts.map
276
+ export { type DragData, type DropEdge, type DropLocation, type UseDragMonitorOptions, type UseDragMonitorResult, type UseDraggableOptions, type UseDraggableResult, type UseDroppableOptions, type UseDroppableResult, type UseFileDropOptions, type UseFileDropResult, type UseSortableOptions, type UseSortableResult, useDragMonitor, useDraggable, useDroppable, useFileDrop, useSortable };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pyreon/dnd",
3
- "version": "0.37.1",
3
+ "version": "0.39.0",
4
4
  "description": "Signal-driven drag and drop for Pyreon — wraps @atlaskit/pragmatic-drag-and-drop",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/pyreon/pyreon/tree/main/packages/fundamentals/dnd#readme",
@@ -34,17 +34,18 @@
34
34
  "lint": "oxlint ."
35
35
  },
36
36
  "peerDependencies": {
37
- "@pyreon/core": "^0.37.1",
38
- "@pyreon/reactivity": "^0.37.1"
37
+ "@pyreon/core": "^0.39.0",
38
+ "@pyreon/reactivity": "^0.39.0"
39
39
  },
40
40
  "dependencies": {
41
- "@atlaskit/pragmatic-drag-and-drop": "^1.8.1",
42
- "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^2.1.5",
43
- "@atlaskit/pragmatic-drag-and-drop-hitbox": "^1.1.0"
41
+ "@atlaskit/pragmatic-drag-and-drop": "^2.0.1",
42
+ "@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.0.0",
43
+ "@atlaskit/pragmatic-drag-and-drop-hitbox": "^2.0.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@pyreon/test-utils": "^0.13.25",
47
- "@pyreon/typescript": "^0.37.1",
46
+ "@pyreon/manifest": "0.13.2",
47
+ "@pyreon/test-utils": "^0.13.27",
48
+ "@pyreon/typescript": "^0.39.0",
48
49
  "@pyreon/vitest-config": "0.13.3",
49
50
  "@vitest/browser-playwright": "^4.1.8"
50
51
  },
@@ -1 +0,0 @@
1
- {"version":3,"file":"index2.d.ts","names":[],"sources":["../../../src/types.ts","../../../src/use-drag-monitor.ts","../../../src/use-draggable.ts","../../../src/use-droppable.ts","../../../src/use-file-drop.ts","../../../src/use-sortable.ts"],"mappings":";;KACY,QAAA,GAAW,MAAM;;KAGjB,QAAA;;UAGK,YAAA;EAHL;EAKV,IAAA,EAAM,QAAA;;EAEN,IAAA,EAAM,QAAQ;AAAA;AAAA,UAKC,mBAAA,WAA8B,QAAA,GAAW,QAAA;EAT7B;EAW3B,OAAA,QAAe,WAAA;EAPD;EASd,IAAA,EAAM,CAAA,UAAW,CAAA;EAXX;EAaN,MAAA,SAAe,WAAA;EAXT;EAaN,QAAA;EAbc;EAed,WAAA;EAVkC;EAYlC,SAAA;AAAA;AAAA,UAGe,kBAAA;EAbA;EAef,UAAU;AAAA;AAAA,UAKK,mBAAA,WAA8B,QAAA,GAAW,QAAA;EAhB9B;EAkB1B,OAAA,QAAe,WAAA;EAxBoB;EA0BnC,IAAA,GAAO,CAAA,UAAW,CAAA;EA1BsC;EA4BxD,OAAA,IAAW,UAAA,EAAY,QAAA;EA1BR;EA4Bf,WAAA,IAAe,UAAA,EAAY,QAAA;EA1BrB;EA4BN,WAAA;EA1BA;EA4BA,MAAA,IAAU,UAAA,EAAY,QAAA;AAAA;AAAA,UAGP,kBAAA;EAzBf;EA2BA,MAAM;AAAA;AAAA,UAKS,kBAAA;EA7BkB;EA+BjC,KAAA,QAAa,CAAA;EA7BH;EA+BV,EAAA,GAAK,IAAA,EAAM,CAAA;EA1BI;EA4Bf,SAAA,GAAY,KAAA,EAAO,CAAA;EA5Be;EA8BlC,IAAA;EA9BwD;;;;;;;;;;;;;EA4CxD,OAAA;EAxCA;;;;;EA8CA,eAAA,IAAmB,IAAA,EAAM,CAAA;EA1CzB;;;;;;EAiDA,kBAAA,IAAsB,IAAA,EAAM,CAAA,EAAG,WAAA;AAAA;AAAA,UAGhB,iBAAA;EA7CA;;;;AAET;AAKR;EA6CE,YAAA,GAAe,EAAA,EAAI,WAAA;EA7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