@octanejs/tanstack-router 0.1.42 → 0.1.43

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/internal.ts +3 -17
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/tanstack-router",
3
- "version": "0.1.42",
3
+ "version": "0.1.43",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -58,7 +58,7 @@
58
58
  "isbot": "^5.1.22"
59
59
  },
60
60
  "peerDependencies": {
61
- "octane": "0.1.43"
61
+ "octane": "0.1.44"
62
62
  },
63
63
  "devDependencies": {
64
64
  "@tanstack/react-router": "1.170.18",
@@ -67,7 +67,7 @@
67
67
  "react": "^19.2.7",
68
68
  "react-dom": "^19.2.7",
69
69
  "vitest": "^4.1.10",
70
- "octane": "0.1.43"
70
+ "octane": "0.1.44"
71
71
  },
72
72
  "scripts": {
73
73
  "test": "vitest run"
package/src/internal.ts CHANGED
@@ -4,23 +4,9 @@
4
4
  // a hook here receives the caller's slot as its trailing argument and derives a
5
5
  // distinct sub-slot for each base hook it composes.
6
6
 
7
- // Derive a stable, distinct sub-slot from a wrapper's slot, namespaced per hook so
8
- // composing multiple base hooks gives each its own identity.
9
- // Memoized: subSlot runs on EVERY hook call every render, and the naive form
10
- // pays a string concat + global symbol-registry lookup each time. The cache is
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
- }
7
+ import { subSlot } from 'octane';
8
+
9
+ export { subSlot };
24
10
 
25
11
  // Split the compiler-injected (or .ts-forwarded) trailing slot off a hook's args,
26
12
  // returning the user args (everything before it) and the slot.