@octanejs/i18next 0.1.37 → 0.1.39
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.js +2 -17
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/i18next",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.39",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
56
|
"i18next": ">=26.2.0",
|
|
57
|
-
"octane": "0.1.
|
|
57
|
+
"octane": "0.1.44"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@testing-library/jest-dom": "^6.9.1",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"react-dom": "^19.2.7",
|
|
66
66
|
"react-i18next": "17.0.9",
|
|
67
67
|
"vitest": "^4.1.10",
|
|
68
|
-
"octane": "0.1.
|
|
68
|
+
"octane": "0.1.44"
|
|
69
69
|
},
|
|
70
70
|
"scripts": {
|
|
71
71
|
"test": "vitest run"
|
package/src/internal.js
CHANGED
|
@@ -3,24 +3,9 @@
|
|
|
3
3
|
// composed base hook gets a deterministic sub-slot. Tag-only symbols cover
|
|
4
4
|
// renderHook and other slotless callers while remaining distinct inside the
|
|
5
5
|
// runtime's ambient withSlot path.
|
|
6
|
-
|
|
7
|
-
const bareTagCache = new Map();
|
|
6
|
+
import { createSubSlot } from 'octane';
|
|
8
7
|
|
|
9
|
-
export
|
|
10
|
-
if (slot === undefined) {
|
|
11
|
-
let bare = bareTagCache.get(tag);
|
|
12
|
-
if (bare === undefined) bareTagCache.set(tag, (bare = Symbol.for(`:${tag}`)));
|
|
13
|
-
return bare;
|
|
14
|
-
}
|
|
15
|
-
let byTag = subSlotCache.get(slot);
|
|
16
|
-
if (byTag === undefined) subSlotCache.set(slot, (byTag = new Map()));
|
|
17
|
-
let symbol = byTag.get(tag);
|
|
18
|
-
if (symbol === undefined) {
|
|
19
|
-
symbol = Symbol.for(`${slot.description ?? ''}:${tag}`);
|
|
20
|
-
byTag.set(tag, symbol);
|
|
21
|
-
}
|
|
22
|
-
return symbol;
|
|
23
|
-
}
|
|
8
|
+
export const subSlot = createSubSlot({ slotlessPrefix: ':' });
|
|
24
9
|
|
|
25
10
|
export function splitSlot(args) {
|
|
26
11
|
const tail = args[args.length - 1];
|