@pyreon/dnd 0.38.0 → 0.41.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 +1 -1
- package/lib/index.js +1 -1
- package/package.json +9 -8
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.
|
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pyreon/dnd",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.41.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.
|
|
38
|
-
"@pyreon/reactivity": "^0.
|
|
37
|
+
"@pyreon/core": "^0.41.0",
|
|
38
|
+
"@pyreon/reactivity": "^0.41.0"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@atlaskit/pragmatic-drag-and-drop": "^
|
|
42
|
-
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^
|
|
43
|
-
"@atlaskit/pragmatic-drag-and-drop-hitbox": "^
|
|
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/
|
|
47
|
-
"@pyreon/
|
|
46
|
+
"@pyreon/manifest": "0.13.2",
|
|
47
|
+
"@pyreon/test-utils": "^0.13.29",
|
|
48
|
+
"@pyreon/typescript": "^0.41.0",
|
|
48
49
|
"@pyreon/vitest-config": "0.13.3",
|
|
49
50
|
"@vitest/browser-playwright": "^4.1.8"
|
|
50
51
|
},
|