@octanejs/dnd-kit 0.1.38 → 0.1.40
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/package.json +3 -3
- package/src/internal.ts +2 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/dnd-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.40",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@dnd-kit/state": "0.5.0"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
|
-
"octane": "0.1.
|
|
50
|
+
"octane": "0.1.45"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
53
|
"@dnd-kit/helpers": "0.5.0",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"react": "19.2.7",
|
|
59
59
|
"react-dom": "19.2.7",
|
|
60
60
|
"vitest": "^4.1.10",
|
|
61
|
-
"octane": "0.1.
|
|
61
|
+
"octane": "0.1.45"
|
|
62
62
|
},
|
|
63
63
|
"scripts": {
|
|
64
64
|
"test": "vitest run --root ../.. --project dnd-kit --project dnd-kit-differential --project dnd-kit-parity-audit --project dnd-kit-ssr",
|
package/src/internal.ts
CHANGED
|
@@ -2,16 +2,6 @@
|
|
|
2
2
|
// trailing call-site slot and derive distinct slots for every base hook they
|
|
3
3
|
// compose. This keeps multiple draggable/sortable hooks in one component
|
|
4
4
|
// isolated while preserving upstream's stable hook identities.
|
|
5
|
-
|
|
5
|
+
import { createSubSlot } from 'octane';
|
|
6
6
|
|
|
7
|
-
export
|
|
8
|
-
if (slot === undefined) return undefined;
|
|
9
|
-
let byTag = subSlotCache.get(slot);
|
|
10
|
-
if (byTag === undefined) subSlotCache.set(slot, (byTag = new Map()));
|
|
11
|
-
let derived = byTag.get(tag);
|
|
12
|
-
if (derived === undefined) {
|
|
13
|
-
derived = Symbol((slot.description ?? '') + ':' + tag);
|
|
14
|
-
byTag.set(tag, derived);
|
|
15
|
-
}
|
|
16
|
-
return derived;
|
|
17
|
-
}
|
|
7
|
+
export const subSlot = createSubSlot({ global: false });
|