@octanejs/radix 0.1.42 → 0.1.44
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/dist/cjs/internal.cjs +2 -10
- package/package.json +4 -4
- package/src/internal.ts +3 -16
package/dist/cjs/internal.cjs
CHANGED
|
@@ -20,18 +20,10 @@ var internal_exports = {};
|
|
|
20
20
|
__export(internal_exports, {
|
|
21
21
|
S: () => S,
|
|
22
22
|
splitSlot: () => splitSlot,
|
|
23
|
-
subSlot: () => subSlot
|
|
23
|
+
subSlot: () => import_octane.subSlot
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(internal_exports);
|
|
26
|
-
|
|
27
|
-
function subSlot(slot, tag) {
|
|
28
|
-
if (slot === void 0) return void 0;
|
|
29
|
-
let byTag = subSlotCache.get(slot);
|
|
30
|
-
if (byTag === void 0) subSlotCache.set(slot, byTag = /* @__PURE__ */ new Map());
|
|
31
|
-
let sym = byTag.get(tag);
|
|
32
|
-
if (sym === void 0) byTag.set(tag, sym = /* @__PURE__ */ Symbol.for((slot.description ?? "") + ":" + tag));
|
|
33
|
-
return sym;
|
|
34
|
-
}
|
|
26
|
+
var import_octane = require("octane");
|
|
35
27
|
function splitSlot(args) {
|
|
36
28
|
const tail = args[args.length - 1];
|
|
37
29
|
const slot = typeof tail === "symbol" ? tail : void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/radix",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.44",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"aria-hidden": "^1.2.6",
|
|
50
|
-
"@octanejs/floating-ui": "0.1.
|
|
50
|
+
"@octanejs/floating-ui": "0.1.44"
|
|
51
51
|
},
|
|
52
52
|
"peerDependencies": {
|
|
53
|
-
"octane": "0.1.
|
|
53
|
+
"octane": "0.1.45"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@tsrx/react": "^0.2.58",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"react": "^19.2.7",
|
|
60
60
|
"react-dom": "^19.2.7",
|
|
61
61
|
"vitest": "^4.1.10",
|
|
62
|
-
"octane": "0.1.
|
|
62
|
+
"octane": "0.1.45"
|
|
63
63
|
},
|
|
64
64
|
"scripts": {
|
|
65
65
|
"build:cjs": "node ../../scripts/build-package-commonjs.mjs",
|
package/src/internal.ts
CHANGED
|
@@ -5,22 +5,9 @@
|
|
|
5
5
|
// its trailing argument and derives a distinct sub-slot for every base hook it composes.
|
|
6
6
|
// (Same pattern as @octanejs/floating-ui and the other bindings.)
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
// keyed by the slot symbol itself; the minted value is byte-identical to the
|
|
12
|
-
// uncached Symbol.for result, so identity is preserved across HMR re-evals and
|
|
13
|
-
// the per-package copies of this helper. Key universe is bounded: slots are
|
|
14
|
-
// per-call-site module constants (never minted per render).
|
|
15
|
-
const subSlotCache = new Map<symbol, Map<string, symbol>>();
|
|
16
|
-
export function subSlot(slot: symbol | undefined, tag: string): symbol | undefined {
|
|
17
|
-
if (slot === undefined) return undefined;
|
|
18
|
-
let byTag = subSlotCache.get(slot);
|
|
19
|
-
if (byTag === undefined) subSlotCache.set(slot, (byTag = new Map()));
|
|
20
|
-
let sym = byTag.get(tag);
|
|
21
|
-
if (sym === undefined) byTag.set(tag, (sym = Symbol.for((slot.description ?? '') + ':' + tag)));
|
|
22
|
-
return sym;
|
|
23
|
-
}
|
|
8
|
+
import { subSlot } from 'octane';
|
|
9
|
+
|
|
10
|
+
export { subSlot };
|
|
24
11
|
|
|
25
12
|
// Split the compiler-injected trailing slot off a hook's args. Needed because the public
|
|
26
13
|
// hooks take optional args, so the slot can't be located positionally.
|