@octanejs/lexical 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@octanejs/lexical",
3
- "version": "0.1.42",
3
+ "version": "0.1.43",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "engines": {
@@ -105,10 +105,10 @@
105
105
  "@lexical/yjs": "0.46.0",
106
106
  "lexical": "0.46.0",
107
107
  "yjs": "^13.6.31",
108
- "@octanejs/floating-ui": "0.1.42"
108
+ "@octanejs/floating-ui": "0.1.43"
109
109
  },
110
110
  "peerDependencies": {
111
- "octane": "0.1.43"
111
+ "octane": "0.1.44"
112
112
  },
113
113
  "devDependencies": {
114
114
  "@lexical/react": "0.46.0",
@@ -117,7 +117,7 @@
117
117
  "react": "^19.2.7",
118
118
  "react-dom": "^19.2.7",
119
119
  "vitest": "^4.1.10",
120
- "octane": "0.1.43"
120
+ "octane": "0.1.44"
121
121
  },
122
122
  "scripts": {
123
123
  "test": "vitest run"
@@ -4,23 +4,9 @@
4
4
  // NOT compiled — so a hook here receives the caller's slot as its trailing argument
5
5
  // and derives a 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 trailing slot off a hook's args. Needed for hooks
26
12
  // with OPTIONAL user args, where the slot can't be located positionally (the