@octanejs/tanstack-db 0.0.5 → 0.0.7
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/{LICENSE → LICENSE.upstream} +1 -1
- package/package.json +6 -5
- package/src/slot.ts +2 -16
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/tanstack-db",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"files": [
|
|
37
37
|
"src",
|
|
38
38
|
"skills",
|
|
39
|
-
"README.md"
|
|
39
|
+
"README.md",
|
|
40
|
+
"LICENSE.upstream"
|
|
40
41
|
],
|
|
41
42
|
"exports": {
|
|
42
43
|
".": "./src/index.ts"
|
|
@@ -46,12 +47,12 @@
|
|
|
46
47
|
"@tanstack/db": "^0.7.0"
|
|
47
48
|
},
|
|
48
49
|
"peerDependencies": {
|
|
49
|
-
"octane": "0.1.
|
|
50
|
+
"octane": "0.1.44"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
53
|
"vitest": "^4.1.10",
|
|
53
|
-
"@octanejs/testing-library": "0.1.
|
|
54
|
-
"octane": "0.1.
|
|
54
|
+
"@octanejs/testing-library": "0.1.41",
|
|
55
|
+
"octane": "0.1.44"
|
|
55
56
|
},
|
|
56
57
|
"scripts": {
|
|
57
58
|
"test": "vitest run"
|
package/src/slot.ts
CHANGED
|
@@ -1,20 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { subSlot } from 'octane';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
* Derive a stable sub-slot from a wrapper's compiler-injected slot so nested
|
|
5
|
-
* Octane hooks inside a custom hook each get distinct call-site identity.
|
|
6
|
-
*/
|
|
7
|
-
export function subSlot(slot: symbol | undefined, tag: string): symbol | undefined {
|
|
8
|
-
if (slot === undefined) return undefined;
|
|
9
|
-
let byTag = subSlotCache.get(slot);
|
|
10
|
-
if (byTag === undefined) subSlotCache.set(slot, (byTag = new Map()));
|
|
11
|
-
let sym = byTag.get(tag);
|
|
12
|
-
if (sym === undefined) {
|
|
13
|
-
sym = Symbol.for(`${slot.description ?? ``}:${tag}`);
|
|
14
|
-
byTag.set(tag, sym);
|
|
15
|
-
}
|
|
16
|
-
return sym;
|
|
17
|
-
}
|
|
3
|
+
export { subSlot };
|
|
18
4
|
|
|
19
5
|
/** Split a compiler-injected trailing slot symbol off hook runtime args. */
|
|
20
6
|
export function splitTrailingSlot<T extends Array<unknown>>(
|