@octanejs/dexie 0.1.36 → 0.1.37

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 +2 -16
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/dexie",
3
- "version": "0.1.36",
3
+ "version": "0.1.37",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -40,7 +40,7 @@
40
40
  "dexie": "4.4.4"
41
41
  },
42
42
  "peerDependencies": {
43
- "octane": "0.1.43"
43
+ "octane": "0.1.44"
44
44
  },
45
45
  "devDependencies": {
46
46
  "@tsrx/react": "^0.2.58",
@@ -53,7 +53,7 @@
53
53
  "react-dom": "^19.2.7",
54
54
  "vite": "^8.1.5",
55
55
  "vitest": "^4.1.10",
56
- "octane": "0.1.43"
56
+ "octane": "0.1.44"
57
57
  },
58
58
  "scripts": {
59
59
  "test": "vitest run"
package/src/internal.ts CHANGED
@@ -1,20 +1,6 @@
1
- const subSlotCache = new Map<symbol, Map<string, symbol>>();
2
- const bareTagCache = new Map<string, symbol>();
1
+ import { createSubSlot } from 'octane';
3
2
 
4
- export function subSlot(slot: symbol | undefined, tag: string): symbol {
5
- if (slot === undefined) {
6
- let bare = bareTagCache.get(tag);
7
- if (bare === undefined) bareTagCache.set(tag, (bare = Symbol.for(':' + tag)));
8
- return bare;
9
- }
10
- let byTag = subSlotCache.get(slot);
11
- if (byTag === undefined) subSlotCache.set(slot, (byTag = new Map()));
12
- let derived = byTag.get(tag);
13
- if (derived === undefined) {
14
- byTag.set(tag, (derived = Symbol.for((slot.description ?? '') + ':' + tag)));
15
- }
16
- return derived;
17
- }
3
+ export const subSlot = createSubSlot({ slotlessPrefix: ':' });
18
4
 
19
5
  export function splitSlot(args: any[]): [any[], symbol | undefined] {
20
6
  const tail = args[args.length - 1];