@octanejs/tanstack-store 0.0.36 → 0.0.38

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.
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Dominic Gannaway
3
+ Copyright (c) 2021 Tanner Linsley
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/tanstack-store",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -31,7 +31,8 @@
31
31
  "types": "src/index.ts",
32
32
  "files": [
33
33
  "src",
34
- "README.md"
34
+ "README.md",
35
+ "LICENSE.upstream"
35
36
  ],
36
37
  "exports": {
37
38
  ".": "./src/index.ts"
@@ -40,7 +41,7 @@
40
41
  "@tanstack/store": "0.11.0"
41
42
  },
42
43
  "peerDependencies": {
43
- "octane": "0.1.42"
44
+ "octane": "0.1.44"
44
45
  },
45
46
  "devDependencies": {
46
47
  "@tanstack/react-store": "0.11.0",
@@ -56,13 +57,13 @@
56
57
  "react-dom": "19.2.3",
57
58
  "use-sync-external-store": "1.6.0",
58
59
  "vitest": "^4.1.10",
59
- "@octanejs/testing-library": "0.1.39",
60
- "octane": "0.1.42"
60
+ "@octanejs/testing-library": "0.1.41",
61
+ "octane": "0.1.44"
61
62
  },
62
63
  "scripts": {
63
64
  "test": "vitest run",
64
- "test:upstream": "node scripts/run-pristine-upstream.mjs",
65
+ "test:upstream": "node ../../scripts/react-parity/run-pristine.mjs tanstack-store",
65
66
  "typecheck": "tsrx-tsc --noEmit -p tsconfig.json && tsrx-tsc --noEmit -p typetests/tsconfig.adapted.json && tsrx-tsc --noEmit -p typetests/tsconfig.json",
66
- "upstream:verify": "node scripts/verify-upstream.mjs"
67
+ "upstream:verify": "node ../../scripts/react-port/materialize.mjs run --check --package-dir ."
67
68
  }
68
69
  }
package/src/internal.ts CHANGED
@@ -2,32 +2,9 @@
2
2
  // per-call-site Symbol into calls made by compiled components; the binding
3
3
  // forwards that symbol and derives a distinct sub-slot for each hook it
4
4
  // composes.
5
- const subSlotCache = new Map<symbol, Map<string, symbol>>();
6
- const bareTagCache = new Map<string, symbol>();
5
+ import { createSubSlot } from 'octane';
7
6
 
8
- export function subSlot(slot: symbol | undefined, tag: string): symbol {
9
- if (slot === undefined) {
10
- let bare = bareTagCache.get(tag);
11
- if (bare === undefined) {
12
- bare = Symbol.for(`@octanejs/tanstack-store:${tag}`);
13
- bareTagCache.set(tag, bare);
14
- }
15
- return bare;
16
- }
17
-
18
- let byTag = subSlotCache.get(slot);
19
- if (byTag === undefined) {
20
- byTag = new Map();
21
- subSlotCache.set(slot, byTag);
22
- }
23
-
24
- let child = byTag.get(tag);
25
- if (child === undefined) {
26
- child = Symbol.for(`${slot.description ?? ''}:${tag}`);
27
- byTag.set(tag, child);
28
- }
29
- return child;
30
- }
7
+ export const subSlot = createSubSlot({ slotlessPrefix: '@octanejs/tanstack-store:' });
31
8
 
32
9
  export function splitSlot(args: unknown[]): [unknown[], symbol | undefined] {
33
10
  const tail = args[args.length - 1];