@tooee/commands 0.1.20 → 0.1.22
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/README.md +54 -0
- package/dist/command-store.d.ts +147 -0
- package/dist/command-store.d.ts.map +1 -0
- package/dist/command-store.js +367 -0
- package/dist/command-store.js.map +1 -0
- package/dist/context.d.ts +29 -3
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +192 -233
- package/dist/context.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/match.d.ts.map +1 -1
- package/dist/match.js +2 -0
- package/dist/match.js.map +1 -1
- package/dist/mode.d.ts +7 -1
- package/dist/mode.d.ts.map +1 -1
- package/dist/mode.js +12 -3
- package/dist/mode.js.map +1 -1
- package/dist/parse.d.ts.map +1 -1
- package/dist/parse.js +17 -5
- package/dist/parse.js.map +1 -1
- package/dist/sequence.d.ts +17 -2
- package/dist/sequence.d.ts.map +1 -1
- package/dist/sequence.js +66 -45
- package/dist/sequence.js.map +1 -1
- package/dist/types.d.ts +20 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/use-actions.d.ts.map +1 -1
- package/dist/use-actions.js +6 -3
- package/dist/use-actions.js.map +1 -1
- package/dist/use-command.d.ts.map +1 -1
- package/dist/use-command.js +12 -4
- package/dist/use-command.js.map +1 -1
- package/package.json +5 -1
- package/src/command-store.ts +554 -0
- package/src/context.tsx +259 -276
- package/src/index.ts +22 -0
- package/src/match.ts +1 -0
- package/src/mode.tsx +31 -3
- package/src/parse.ts +20 -5
- package/src/sequence.ts +80 -52
- package/src/types.ts +22 -3
- package/src/use-actions.ts +5 -3
- package/src/use-command.ts +13 -4
package/dist/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
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SAAS,CAAA;IACnB,4DAA4D;IAC5D,EAAE,EAAE,MAAM,CAAA;IACV,0CAA0C;IAC1C,IAAI,CAAC,EAAE,kBAAkB,CAAA;IACzB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,IAAI,CAAA;CACnB;AAED;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,QAAQ,EACR,EAAE,EACF,IAAc,EACd,WAAsB,GACvB,EAAE,2BAA2B,aAkB7B;AAqFD,wBAAgB,iBAAiB,IAAI;IAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IAAC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,CAqBzF;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,IAAI,eAAe,CAMpD;AAED,wBAAgB,kBAAkB,IAAI,mBAAmB,CAsBxD;AAED,wBAAgB,uBAAuB,IAAI,oBAAoB,GAAG,IAAI,CAErE;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,IAAI,oBAAoB,GAAG,IAAI,CAkBrE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,OAAO,EAAE,CAUzE;AAED;;;;GAIG;AACH,wBAAgB,eAAe,IAAI,YAAY,CAM9C;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI,CA+BzD;AAID,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI,CA0BpF;AAED,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,MAAM,cAAc,EACxE,GAAG,EAAE,CAAC,EACN,MAAM,EAAE,MAAM,cAAc,CAAC,CAAC,CAAC,GAC9B,IAAI,CAEN"}
|
package/dist/context.js
CHANGED
|
@@ -1,217 +1,111 @@
|
|
|
1
1
|
import { jsx as _jsx } from "@opentui/react/jsx-runtime";
|
|
2
|
-
import { createContext, useContext, useRef, useCallback, useEffect, useMemo,
|
|
2
|
+
import { createContext, useContext, useRef, useCallback, useEffect, useMemo, } from "react";
|
|
3
3
|
import { useKeyboard } from "@opentui/react";
|
|
4
|
+
import { useSelector } from "@xstate/store-react";
|
|
4
5
|
import { ModeProvider, useMode, useSetMode } from "./mode.js";
|
|
5
6
|
import { parseHotkey } from "./parse.js";
|
|
6
|
-
import {
|
|
7
|
-
import { SequenceTracker } from "./sequence.js";
|
|
8
|
-
const DEFAULT_MODES = ["cursor"];
|
|
7
|
+
import { ROOT_SURFACE_ID, createCommandStore, selectActiveModalSurface, selectSequence, selectSurfaceCommandMap, stepsKey, } from "./command-store.js";
|
|
9
8
|
const CommandContext = createContext(null);
|
|
10
9
|
const CommandSequenceContext = createContext(null);
|
|
11
|
-
const CommandSurfaceStackContext = createContext(null);
|
|
12
10
|
/** Nesting depth of the nearest command surface (0 at the root app). */
|
|
13
11
|
const CommandSurfaceDepthContext = createContext(0);
|
|
14
12
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* the current shared context sources.
|
|
13
|
+
* Fallback store for hooks that must not throw outside a CommandProvider
|
|
14
|
+
* (useActiveCommandSurface, useSurfaceCommands). Never dispatched to.
|
|
18
15
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (cmd && (!cmd.when || cmd.when(ctx))) {
|
|
33
|
-
cmd.handler(ctx);
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
}
|
|
16
|
+
const FALLBACK_COMMAND_STORE = createCommandStore({
|
|
17
|
+
root: {
|
|
18
|
+
getMode: () => "cursor",
|
|
19
|
+
// Placeholder context: augmented domain fields (overlay, view, ...) are
|
|
20
|
+
// only present where their providers run; dispatch never reaches this.
|
|
21
|
+
buildCtx: () => ({
|
|
22
|
+
mode: "cursor",
|
|
23
|
+
setMode: () => { },
|
|
24
|
+
commands: { invoke: () => { }, list: () => [] },
|
|
25
|
+
exit: () => { },
|
|
26
|
+
}),
|
|
27
|
+
},
|
|
28
|
+
});
|
|
38
29
|
export function CommandProvider({ children, leader, keymap, initialMode, sequenceTimeoutMs, }) {
|
|
39
|
-
|
|
30
|
+
// The store is created here (above the root ModeProvider) so mode changes
|
|
31
|
+
// can be routed into it as transitions; the dispatcher below installs the
|
|
32
|
+
// real root accessors before any key can dispatch.
|
|
33
|
+
const rootAccessRef = useRef({
|
|
34
|
+
getMode: () => initialMode ?? "cursor",
|
|
35
|
+
// Placeholder until CommandDispatcher installs the real accessors on its
|
|
36
|
+
// first render (before any key can dispatch).
|
|
37
|
+
buildCtx: () => ({
|
|
38
|
+
mode: initialMode ?? "cursor",
|
|
39
|
+
setMode: () => { },
|
|
40
|
+
commands: { invoke: () => { }, list: () => [] },
|
|
41
|
+
exit: () => { },
|
|
42
|
+
}),
|
|
43
|
+
});
|
|
44
|
+
const storeRef = useRef(null);
|
|
45
|
+
if (storeRef.current === null) {
|
|
46
|
+
storeRef.current = createCommandStore({
|
|
47
|
+
leader,
|
|
48
|
+
keymap,
|
|
49
|
+
sequenceTimeoutMs,
|
|
50
|
+
root: {
|
|
51
|
+
getMode: () => rootAccessRef.current.getMode(),
|
|
52
|
+
buildCtx: () => rootAccessRef.current.buildCtx(),
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
const commandStore = storeRef.current;
|
|
57
|
+
// Root mode changes are transitions: reset any pending chord synchronously
|
|
58
|
+
// (this replaces the old post-render tracker-reset effect).
|
|
59
|
+
const handleModeChange = useCallback(() => commandStore.modeChanged(ROOT_SURFACE_ID), [commandStore]);
|
|
60
|
+
return (_jsx(ModeProvider, { initialMode: initialMode, onModeChange: handleModeChange, children: _jsx(CommandDispatcher, { commandStore: commandStore, rootAccess: rootAccessRef, leader: leader, keymap: keymap, sequenceTimeoutMs: sequenceTimeoutMs, children: children }) }));
|
|
40
61
|
}
|
|
41
|
-
function CommandDispatcher({ children, leader, keymap, sequenceTimeoutMs, }) {
|
|
42
|
-
const registryRef = useRef(null);
|
|
43
|
-
const contextSourcesRef = useRef(new Map());
|
|
44
|
-
const groupsRef = useRef(new Map());
|
|
62
|
+
function CommandDispatcher({ children, commandStore, rootAccess, leader, keymap, sequenceTimeoutMs, }) {
|
|
45
63
|
const mode = useMode();
|
|
46
64
|
const modeRef = useRef(mode);
|
|
47
65
|
modeRef.current = mode;
|
|
48
66
|
const setMode = useSetMode();
|
|
49
|
-
const [sequenceState, setSequenceState] = useState(null);
|
|
50
|
-
const clearSequenceStateRef = useRef(() => setSequenceState(null));
|
|
51
|
-
clearSequenceStateRef.current = () => setSequenceState(null);
|
|
52
67
|
const buildCtx = useCallback(() => {
|
|
68
|
+
const registry = commandStore.registryFor(commandStore.rootRecord);
|
|
53
69
|
const ctx = {
|
|
54
70
|
mode: modeRef.current,
|
|
55
71
|
setMode,
|
|
56
72
|
commands: {
|
|
57
|
-
invoke: (id) =>
|
|
58
|
-
list: () => Array.from(
|
|
73
|
+
invoke: (id) => registry.invoke(id),
|
|
74
|
+
list: () => Array.from(registry.commands.values()),
|
|
59
75
|
},
|
|
60
76
|
exit: () => { },
|
|
61
77
|
};
|
|
62
|
-
for (const getter of
|
|
78
|
+
for (const getter of commandStore.store.getSnapshot().context.contextSources.values()) {
|
|
63
79
|
Object.assign(ctx, getter());
|
|
64
80
|
}
|
|
65
81
|
return ctx;
|
|
66
|
-
}, [setMode]);
|
|
82
|
+
}, [commandStore, setMode]);
|
|
67
83
|
const buildCtxRef = useRef(buildCtx);
|
|
68
84
|
buildCtxRef.current = buildCtx;
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
// surfaces on top of it; while a modal surface is topmost, key dispatch is
|
|
75
|
-
// arbitrated to that surface only and the root (and lower surfaces) are
|
|
76
|
-
// suspended — even for keys the surface does not handle.
|
|
77
|
-
const surfaceEntriesRef = useRef([]);
|
|
78
|
-
const surfaceOrderRef = useRef(0);
|
|
79
|
-
const [surfaceVersion, setSurfaceVersion] = useState(0);
|
|
80
|
-
const registerSurface = useCallback((entry) => {
|
|
81
|
-
entry.order = surfaceOrderRef.current++;
|
|
82
|
-
surfaceEntriesRef.current = [...surfaceEntriesRef.current, entry];
|
|
83
|
-
setSurfaceVersion((v) => v + 1);
|
|
84
|
-
return () => {
|
|
85
|
-
surfaceEntriesRef.current = surfaceEntriesRef.current.filter((e) => e !== entry);
|
|
86
|
-
setSurfaceVersion((v) => v + 1);
|
|
87
|
-
};
|
|
88
|
-
}, []);
|
|
89
|
-
const getActiveModalSurface = useCallback(() => {
|
|
90
|
-
let best = null;
|
|
91
|
-
for (const entry of surfaceEntriesRef.current) {
|
|
92
|
-
if (entry.role !== "modal")
|
|
93
|
-
continue;
|
|
94
|
-
if (best === null ||
|
|
95
|
-
entry.depth > best.depth ||
|
|
96
|
-
(entry.depth === best.depth && entry.order > best.order)) {
|
|
97
|
-
best = entry;
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
return best;
|
|
101
|
-
}, []);
|
|
102
|
-
const activeModalSurface = useMemo(() => {
|
|
103
|
-
const surface = getActiveModalSurface();
|
|
104
|
-
return surface ? { id: surface.id, role: surface.role } : null;
|
|
105
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
106
|
-
}, [getActiveModalSurface, surfaceVersion]);
|
|
107
|
-
const surfaceStackValue = useMemo(() => ({ register: registerSurface, getActiveModalSurface, activeModalSurface }), [registerSurface, getActiveModalSurface, activeModalSurface]);
|
|
108
|
-
const trackerRef = useRef(new SequenceTracker({
|
|
109
|
-
timeout: sequenceTimeoutMs,
|
|
110
|
-
onReset: () => clearSequenceStateRef.current(),
|
|
111
|
-
}));
|
|
112
|
-
const parseCacheRef = useRef(new Map());
|
|
113
|
-
const getParsedHotkey = useCallback((hotkey) => {
|
|
114
|
-
const cache = parseCacheRef.current;
|
|
115
|
-
const cacheKey = `${hotkey}:${leader ?? ""}`;
|
|
116
|
-
let parsed = cache.get(cacheKey);
|
|
117
|
-
if (!parsed) {
|
|
118
|
-
parsed = parseHotkey(hotkey, leader);
|
|
119
|
-
cache.set(cacheKey, parsed);
|
|
120
|
-
}
|
|
121
|
-
return parsed;
|
|
122
|
-
}, [leader]);
|
|
85
|
+
// Install the live root accessors and config (ref writes, same pattern as
|
|
86
|
+
// the previous modeRef mirrors; leader/keymap are read per dispatch).
|
|
87
|
+
rootAccess.current.getMode = () => modeRef.current;
|
|
88
|
+
rootAccess.current.buildCtx = () => buildCtxRef.current();
|
|
89
|
+
commandStore.setConfig({ leader, keymap, sequenceTimeoutMs });
|
|
123
90
|
useKeyboard((event) => {
|
|
124
91
|
if (event.defaultPrevented)
|
|
125
92
|
return;
|
|
126
|
-
const
|
|
127
|
-
if (
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
const activeSurface = getActiveModalSurface();
|
|
131
|
-
const registry = activeSurface ? activeSurface.registry : rootRegistry;
|
|
132
|
-
const currentMode = activeSurface ? activeSurface.getMode() : modeRef.current;
|
|
133
|
-
const ctx = activeSurface ? activeSurface.buildCtx() : buildCtx();
|
|
134
|
-
// Collect eligible commands with their parsed hotkeys
|
|
135
|
-
const singleStepCandidates = [];
|
|
136
|
-
const multiStepCandidates = [];
|
|
137
|
-
for (const command of registry.commands.values()) {
|
|
138
|
-
const commandModes = command.modes ?? DEFAULT_MODES;
|
|
139
|
-
if (!commandModes.includes(currentMode))
|
|
140
|
-
continue;
|
|
141
|
-
if (command.when && !command.when(ctx))
|
|
142
|
-
continue;
|
|
143
|
-
const hotkey = keymap?.[command.id] ?? command.defaultHotkey;
|
|
144
|
-
if (!hotkey)
|
|
145
|
-
continue;
|
|
146
|
-
const parsed = getParsedHotkey(hotkey);
|
|
147
|
-
if (parsed.steps.length === 1) {
|
|
148
|
-
singleStepCandidates.push({ command, parsed });
|
|
149
|
-
}
|
|
150
|
-
else {
|
|
151
|
-
multiStepCandidates.push({ command, hotkey, parsed });
|
|
152
|
-
}
|
|
93
|
+
const result = commandStore.key(event);
|
|
94
|
+
if (result.handled) {
|
|
95
|
+
event.preventDefault();
|
|
96
|
+
result.invoke?.();
|
|
153
97
|
}
|
|
154
|
-
// Check multi-step sequences first (they consume buffer state)
|
|
155
|
-
if (multiStepCandidates.length > 0) {
|
|
156
|
-
const multiStepHotkeys = multiStepCandidates.map((candidate) => candidate.parsed);
|
|
157
|
-
const result = trackerRef.current.feedWithState(event, multiStepHotkeys);
|
|
158
|
-
if (result.matchedIndex >= 0) {
|
|
159
|
-
event.preventDefault();
|
|
160
|
-
setSequenceState(null);
|
|
161
|
-
multiStepCandidates[result.matchedIndex].command.handler(ctx);
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
if (result.pending) {
|
|
165
|
-
const firstCandidate = multiStepCandidates[result.pending.indexes[0]];
|
|
166
|
-
setSequenceState({
|
|
167
|
-
prefix: firstCandidate.parsed.steps.slice(0, result.pending.prefixLength),
|
|
168
|
-
candidates: result.pending.indexes
|
|
169
|
-
.map((idx) => multiStepCandidates[idx])
|
|
170
|
-
.filter(({ command }) => !command.hidden)
|
|
171
|
-
.map(({ command, hotkey, parsed }) => ({
|
|
172
|
-
command,
|
|
173
|
-
hotkey,
|
|
174
|
-
steps: parsed.steps,
|
|
175
|
-
remainingSteps: parsed.steps.slice(result.pending.prefixLength),
|
|
176
|
-
nextStep: parsed.steps[result.pending.prefixLength],
|
|
177
|
-
group: groupsRef.current.get(stepsKey(parsed.steps.slice(0, result.pending.prefixLength + 1))),
|
|
178
|
-
})),
|
|
179
|
-
});
|
|
180
|
-
event.preventDefault();
|
|
181
|
-
return;
|
|
182
|
-
}
|
|
183
|
-
setSequenceState(null);
|
|
184
|
-
}
|
|
185
|
-
// Check single-step matches
|
|
186
|
-
for (const { command, parsed } of singleStepCandidates) {
|
|
187
|
-
if (matchStep(event, parsed.steps[0])) {
|
|
188
|
-
event.preventDefault();
|
|
189
|
-
setSequenceState(null);
|
|
190
|
-
command.handler(ctx);
|
|
191
|
-
return;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
// A modal surface swallows unhandled keys: dispatch never falls through to
|
|
195
|
-
// the root app while a modal surface is topmost.
|
|
196
98
|
});
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
// Reset any in-flight sequence when keyboard ownership changes (e.g. a modal
|
|
202
|
-
// surface opens/closes) so partial chords don't leak across surfaces. Passive
|
|
203
|
-
// surfaces such as which-key must not clear the sequence they are displaying.
|
|
204
|
-
useEffect(() => {
|
|
205
|
-
trackerRef.current.reset();
|
|
206
|
-
setSequenceState(null);
|
|
207
|
-
}, [activeModalSurface?.id]);
|
|
99
|
+
// Clear the store's key buffer and pending timeout on dispatcher unmount so
|
|
100
|
+
// the timer cannot fire after the tree is gone.
|
|
101
|
+
useEffect(() => () => commandStore.dispose(), [commandStore]);
|
|
102
|
+
const sequenceState = useSelector(commandStore.store, (s) => selectSequence(s.context));
|
|
208
103
|
const ctxValue = useMemo(() => ({
|
|
209
|
-
|
|
104
|
+
commandStore,
|
|
105
|
+
surface: commandStore.rootRecord,
|
|
210
106
|
leaderKey: leader,
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
}), [leader]);
|
|
214
|
-
return (_jsx(CommandContext.Provider, { value: ctxValue, children: _jsx(CommandSurfaceStackContext.Provider, { value: surfaceStackValue, children: _jsx(CommandSequenceContext, { value: sequenceState, children: children }) }) }));
|
|
107
|
+
}), [commandStore, leader]);
|
|
108
|
+
return (_jsx(CommandContext.Provider, { value: ctxValue, children: _jsx(CommandSequenceContext, { value: sequenceState, children: children }) }));
|
|
215
109
|
}
|
|
216
110
|
/**
|
|
217
111
|
* Mounts an overlay-owned command surface. Children registered via `useCommand`
|
|
@@ -222,60 +116,69 @@ function CommandDispatcher({ children, leader, keymap, sequenceTimeoutMs, }) {
|
|
|
222
116
|
* parent app's commands; a `passive` surface never becomes the keyboard owner.
|
|
223
117
|
*/
|
|
224
118
|
export function CommandSurfaceProvider({ children, id, role = "modal", initialMode = "cursor", }) {
|
|
225
|
-
|
|
119
|
+
const parent = useContext(CommandContext);
|
|
120
|
+
if (!parent) {
|
|
121
|
+
throw new Error("CommandSurfaceProvider must be used within a CommandProvider");
|
|
122
|
+
}
|
|
123
|
+
const { commandStore } = parent;
|
|
124
|
+
// Surface-local mode changes are transitions too (F-08): a mid-chord mode
|
|
125
|
+
// switch on a modal surface resets the pending sequence.
|
|
126
|
+
const handleModeChange = useCallback(() => commandStore.modeChanged(id), [commandStore, id]);
|
|
127
|
+
return (_jsx(ModeProvider, { initialMode: initialMode, onModeChange: handleModeChange, children: _jsx(CommandSurfaceInner, { id: id, role: role, children: children }) }));
|
|
226
128
|
}
|
|
227
129
|
function CommandSurfaceInner({ children, id, role, }) {
|
|
228
130
|
const parent = useContext(CommandContext);
|
|
229
|
-
|
|
230
|
-
if (!parent || !stack) {
|
|
131
|
+
if (!parent) {
|
|
231
132
|
throw new Error("CommandSurfaceProvider must be used within a CommandProvider");
|
|
232
133
|
}
|
|
134
|
+
const { commandStore } = parent;
|
|
233
135
|
const parentDepth = useContext(CommandSurfaceDepthContext);
|
|
234
136
|
const depth = parentDepth + 1;
|
|
235
137
|
const mode = useMode();
|
|
236
138
|
const setMode = useSetMode();
|
|
237
139
|
const modeRef = useRef(mode);
|
|
238
140
|
modeRef.current = mode;
|
|
239
|
-
const registryRef = useRef(null);
|
|
240
141
|
const buildCtx = useCallback(() => {
|
|
142
|
+
const registry = commandStore.registryFor(recordRef.current);
|
|
241
143
|
const ctx = {
|
|
242
144
|
mode: modeRef.current,
|
|
243
145
|
setMode,
|
|
244
146
|
commands: {
|
|
245
|
-
invoke: (cmdId) =>
|
|
246
|
-
list: () => Array.from(
|
|
147
|
+
invoke: (cmdId) => registry.invoke(cmdId),
|
|
148
|
+
list: () => Array.from(registry.commands.values()),
|
|
247
149
|
},
|
|
248
150
|
exit: () => { },
|
|
249
151
|
};
|
|
250
|
-
for (const getter of
|
|
152
|
+
for (const getter of commandStore.store.getSnapshot().context.contextSources.values()) {
|
|
251
153
|
Object.assign(ctx, getter());
|
|
252
154
|
}
|
|
253
155
|
return ctx;
|
|
254
|
-
}, [
|
|
156
|
+
}, [commandStore, setMode]);
|
|
255
157
|
const buildCtxRef = useRef(buildCtx);
|
|
256
158
|
buildCtxRef.current = buildCtx;
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
159
|
+
const recordRef = useRef(null);
|
|
160
|
+
if (recordRef.current === null ||
|
|
161
|
+
recordRef.current.id !== id ||
|
|
162
|
+
recordRef.current.role !== role ||
|
|
163
|
+
recordRef.current.depth !== depth) {
|
|
164
|
+
recordRef.current = {
|
|
263
165
|
id,
|
|
264
166
|
role,
|
|
265
167
|
depth,
|
|
266
168
|
order: 0,
|
|
267
|
-
registry: registryRef.current,
|
|
268
169
|
getMode: () => modeRef.current,
|
|
269
170
|
buildCtx: () => buildCtxRef.current(),
|
|
270
171
|
};
|
|
271
|
-
|
|
272
|
-
|
|
172
|
+
}
|
|
173
|
+
const record = recordRef.current;
|
|
174
|
+
// Mount/unmount registration is a keep-effect: it synchronizes the React
|
|
175
|
+
// tree with the store's surface stack.
|
|
176
|
+
useEffect(() => commandStore.pushSurface(record), [commandStore, record]);
|
|
273
177
|
const ctxValue = useMemo(() => ({
|
|
274
|
-
|
|
178
|
+
commandStore,
|
|
179
|
+
surface: record,
|
|
275
180
|
leaderKey: parent.leaderKey,
|
|
276
|
-
|
|
277
|
-
groups: parent.groups,
|
|
278
|
-
}), [parent.leaderKey, parent.contextSources, parent.groups]);
|
|
181
|
+
}), [commandStore, record, parent.leaderKey]);
|
|
279
182
|
return (_jsx(CommandContext.Provider, { value: ctxValue, children: _jsx(CommandSurfaceDepthContext.Provider, { value: depth, children: children }) }));
|
|
280
183
|
}
|
|
281
184
|
export function useCommandContext() {
|
|
@@ -283,20 +186,46 @@ export function useCommandContext() {
|
|
|
283
186
|
if (!ctx) {
|
|
284
187
|
throw new Error("useCommandContext must be used within a CommandProvider");
|
|
285
188
|
}
|
|
286
|
-
const {
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
189
|
+
const { commandStore, surface } = ctx;
|
|
190
|
+
// Reactive: consumers re-render when a command registers or unregisters on
|
|
191
|
+
// this surface (the per-surface map is identity-stable otherwise).
|
|
192
|
+
const commandMap = useSelector(commandStore.store, (s) => selectSurfaceCommandMap(s.context, surface.id));
|
|
193
|
+
const registry = commandStore.registryFor(surface);
|
|
194
|
+
return useMemo(() => ({
|
|
195
|
+
commands: commandMap ? Array.from(commandMap.values()) : [],
|
|
291
196
|
invoke: registry.invoke,
|
|
292
|
-
};
|
|
197
|
+
}), [commandMap, registry]);
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Internal: the stable registry facade for the nearest surface, without
|
|
201
|
+
* subscribing to store changes. Registration hooks (useCommand/useActions)
|
|
202
|
+
* only need the facade; subscribing them would re-render every command host
|
|
203
|
+
* on unrelated group/context-source registrations.
|
|
204
|
+
*/
|
|
205
|
+
export function useSurfaceRegistry() {
|
|
206
|
+
const ctx = useContext(CommandContext);
|
|
207
|
+
if (!ctx) {
|
|
208
|
+
throw new Error("useCommandRegistry must be used within a CommandProvider");
|
|
209
|
+
}
|
|
210
|
+
return ctx.commandStore.registryFor(ctx.surface);
|
|
293
211
|
}
|
|
294
212
|
export function useCommandRegistry() {
|
|
295
213
|
const ctx = useContext(CommandContext);
|
|
296
214
|
if (!ctx) {
|
|
297
215
|
throw new Error("useCommandRegistry must be used within a CommandProvider");
|
|
298
216
|
}
|
|
299
|
-
|
|
217
|
+
const { commandStore, surface, leaderKey } = ctx;
|
|
218
|
+
// Subscribe to the slices so captured maps stay current across renders (the
|
|
219
|
+
// maps are immutable snapshots now, not shared mutable maps).
|
|
220
|
+
const groups = useSelector(commandStore.store, (s) => s.context.groups);
|
|
221
|
+
const contextSources = useSelector(commandStore.store, (s) => s.context.contextSources);
|
|
222
|
+
const registry = commandStore.registryFor(surface);
|
|
223
|
+
return useMemo(() => ({
|
|
224
|
+
registry,
|
|
225
|
+
leaderKey,
|
|
226
|
+
contextSources: contextSources,
|
|
227
|
+
groups: groups,
|
|
228
|
+
}), [registry, leaderKey, contextSources, groups]);
|
|
300
229
|
}
|
|
301
230
|
export function useCommandSequenceState() {
|
|
302
231
|
return useContext(CommandSequenceContext);
|
|
@@ -304,11 +233,50 @@ export function useCommandSequenceState() {
|
|
|
304
233
|
/**
|
|
305
234
|
* Metadata for the topmost modal command surface, or null when the root app is
|
|
306
235
|
* the active surface. Intended for which-key/help to read shortcuts from the
|
|
307
|
-
* active interaction surface.
|
|
236
|
+
* active interaction surface. `commands` is reactive (F-13).
|
|
308
237
|
*/
|
|
309
238
|
export function useActiveCommandSurface() {
|
|
310
|
-
const ctx = useContext(
|
|
311
|
-
|
|
239
|
+
const ctx = useContext(CommandContext);
|
|
240
|
+
const store = (ctx?.commandStore ?? FALLBACK_COMMAND_STORE).store;
|
|
241
|
+
const record = useSelector(store, (s) => selectActiveModalSurface(s.context));
|
|
242
|
+
const commandMap = useSelector(store, (s) => {
|
|
243
|
+
const active = selectActiveModalSurface(s.context);
|
|
244
|
+
return active ? selectSurfaceCommandMap(s.context, active.id) : undefined;
|
|
245
|
+
});
|
|
246
|
+
return useMemo(() => {
|
|
247
|
+
if (!record)
|
|
248
|
+
return null;
|
|
249
|
+
return {
|
|
250
|
+
id: record.id,
|
|
251
|
+
role: record.role,
|
|
252
|
+
commands: commandMap ? Array.from(commandMap.values()) : [],
|
|
253
|
+
};
|
|
254
|
+
}, [record, commandMap]);
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Commands registered on a surface (reactive). Defaults to the active modal
|
|
258
|
+
* surface, falling back to the root surface when none is active.
|
|
259
|
+
*/
|
|
260
|
+
export function useSurfaceCommands(surfaceId) {
|
|
261
|
+
const ctx = useContext(CommandContext);
|
|
262
|
+
const store = (ctx?.commandStore ?? FALLBACK_COMMAND_STORE).store;
|
|
263
|
+
const commandMap = useSelector(store, (s) => {
|
|
264
|
+
const id = surfaceId ?? selectActiveModalSurface(s.context)?.id ?? ROOT_SURFACE_ID;
|
|
265
|
+
return selectSurfaceCommandMap(s.context, id);
|
|
266
|
+
});
|
|
267
|
+
return useMemo(() => (commandMap ? Array.from(commandMap.values()) : []), [commandMap]);
|
|
268
|
+
}
|
|
269
|
+
/**
|
|
270
|
+
* Advanced/internal — subject to change. The command store instance backing
|
|
271
|
+
* this provider tree, for bridges that must reach the dispatch machinery
|
|
272
|
+
* (e.g. the shell's overlay-replacement sequence reset).
|
|
273
|
+
*/
|
|
274
|
+
export function useCommandStore() {
|
|
275
|
+
const ctx = useContext(CommandContext);
|
|
276
|
+
if (!ctx) {
|
|
277
|
+
throw new Error("useCommandStore must be used within a CommandProvider");
|
|
278
|
+
}
|
|
279
|
+
return ctx.commandStore;
|
|
312
280
|
}
|
|
313
281
|
export function useCommandGroup(group) {
|
|
314
282
|
const ctx = useContext(CommandContext);
|
|
@@ -317,16 +285,17 @@ export function useCommandGroup(group) {
|
|
|
317
285
|
}
|
|
318
286
|
const groupRef = useRef(group);
|
|
319
287
|
groupRef.current = group;
|
|
320
|
-
const {
|
|
288
|
+
const { commandStore, leaderKey } = ctx;
|
|
321
289
|
useEffect(() => {
|
|
322
290
|
const parsed = parseHotkey(groupRef.current.prefix, leaderKey);
|
|
323
291
|
const registered = {
|
|
324
292
|
...groupRef.current,
|
|
325
293
|
prefixKey: stepsKey(parsed.steps),
|
|
326
294
|
};
|
|
327
|
-
|
|
295
|
+
commandStore.store.trigger.groupRegistered({ group: registered });
|
|
328
296
|
return () => {
|
|
329
|
-
|
|
297
|
+
// Unregistration is identity-guarded in the store transition (R-05).
|
|
298
|
+
commandStore.store.trigger.groupUnregistered({ group: registered });
|
|
330
299
|
};
|
|
331
300
|
}, [
|
|
332
301
|
group.id,
|
|
@@ -335,26 +304,10 @@ export function useCommandGroup(group) {
|
|
|
335
304
|
group.description,
|
|
336
305
|
group.icon,
|
|
337
306
|
group.order,
|
|
338
|
-
|
|
307
|
+
commandStore,
|
|
339
308
|
leaderKey,
|
|
340
309
|
]);
|
|
341
310
|
}
|
|
342
|
-
function stepsKey(steps) {
|
|
343
|
-
return steps.map(formatStepKey).join(" ");
|
|
344
|
-
}
|
|
345
|
-
function formatStepKey(step) {
|
|
346
|
-
const modifiers = [];
|
|
347
|
-
if (step.ctrl)
|
|
348
|
-
modifiers.push("ctrl");
|
|
349
|
-
if (step.meta)
|
|
350
|
-
modifiers.push("meta");
|
|
351
|
-
if (step.option)
|
|
352
|
-
modifiers.push("option");
|
|
353
|
-
if (step.shift)
|
|
354
|
-
modifiers.push("shift");
|
|
355
|
-
modifiers.push(step.key);
|
|
356
|
-
return modifiers.join("+");
|
|
357
|
-
}
|
|
358
311
|
let nextContextSourceId = 0;
|
|
359
312
|
export function useProvideCommandContext(getter) {
|
|
360
313
|
const ctx = useContext(CommandContext);
|
|
@@ -367,13 +320,19 @@ export function useProvideCommandContext(getter) {
|
|
|
367
320
|
}
|
|
368
321
|
const getterRef = useRef(getter);
|
|
369
322
|
getterRef.current = getter;
|
|
370
|
-
const {
|
|
323
|
+
const { commandStore } = ctx;
|
|
371
324
|
useEffect(() => {
|
|
372
325
|
const id = idRef.current;
|
|
373
|
-
|
|
326
|
+
commandStore.store.trigger.contextSourceRegistered({
|
|
327
|
+
id,
|
|
328
|
+
getter: () => getterRef.current(),
|
|
329
|
+
});
|
|
374
330
|
return () => {
|
|
375
|
-
|
|
331
|
+
commandStore.store.trigger.contextSourceUnregistered({ id });
|
|
376
332
|
};
|
|
377
|
-
}, [
|
|
333
|
+
}, [commandStore]);
|
|
334
|
+
}
|
|
335
|
+
export function useProvideCommandContextKey(key, getter) {
|
|
336
|
+
useProvideCommandContext(() => ({ [key]: getter() }));
|
|
378
337
|
}
|
|
379
338
|
//# sourceMappingURL=context.js.map
|
package/dist/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.tsx"],"names":[],"mappings":";AAAA,OAAO,EACL,aAAa,EACb,UAAU,EACV,MAAM,EACN,WAAW,EACX,SAAS,EACT,OAAO,EACP,QAAQ,GAET,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAe5C,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAE/C,MAAM,aAAa,GAAW,CAAC,QAAQ,CAAC,CAAA;AAoBxC,MAAM,cAAc,GAAG,aAAa,CAA6B,IAAI,CAAC,CAAA;AACtE,MAAM,sBAAsB,GAAG,aAAa,CAA8B,IAAI,CAAC,CAAA;AAC/E,MAAM,0BAA0B,GAAG,aAAa,CAAkC,IAAI,CAAC,CAAA;AACvF,wEAAwE;AACxE,MAAM,0BAA0B,GAAG,aAAa,CAAC,CAAC,CAAC,CAAA;AAEnD;;;;GAIG;AACH,SAAS,cAAc,CAAC,MAA4B;IAClD,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAmB,CAAA;IAC3C,OAAO;QACL,QAAQ;QACR,QAAQ,CAAC,OAAgB;YACvB,QAAQ,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,EAAE,OAAO,CAAC,CAAA;YACjC,OAAO,GAAG,EAAE;gBACV,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC,CAAA;YAC7B,CAAC,CAAA;QACH,CAAC;QACD,MAAM,CAAC,EAAU;YACf,MAAM,GAAG,GAAG,MAAM,EAAE,CAAA;YACpB,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M,EAAE,EAAE,CAA4B,CAAC,CAAA;AAClF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ export { parseHotkey } from "./parse.js";
|
|
|
6
6
|
export { matchStep } from "./match.js";
|
|
7
7
|
export { DEFAULT_SEQUENCE_TIMEOUT_MS, SequenceTracker } from "./sequence.js";
|
|
8
8
|
export type { SequenceFeedResult, SequencePendingMatch, SequenceTrackerOptions, } from "./sequence.js";
|
|
9
|
-
export { CommandProvider, CommandSurfaceProvider, useActiveCommandSurface, useCommandContext, useCommandGroup, useCommandRegistry, useCommandSequenceState, useProvideCommandContext, } from "./context.js";
|
|
9
|
+
export { CommandProvider, CommandSurfaceProvider, useActiveCommandSurface, useCommandContext, useCommandGroup, useCommandRegistry, useCommandSequenceState, useCommandStore, useProvideCommandContext, useProvideCommandContextKey, useSurfaceCommands, } from "./context.js";
|
|
10
|
+
export { ROOT_SURFACE_ID, createCommandStore, selectActiveModalSurface, selectGroups, selectSequence, selectSurfaceCommandMap, selectSurfaceCommands, } from "./command-store.js";
|
|
11
|
+
export type { CommandStore, CommandStoreConfig, CommandStoreContext, CommandStoreInstance, ContextGetter, CreateCommandStoreOptions, KeyDispatchResult, SurfaceRecord, } from "./command-store.js";
|
|
10
12
|
export type { CommandProviderProps, CommandSurfaceProviderProps } from "./context.js";
|
|
11
13
|
export { useCommand } from "./use-command.js";
|
|
12
14
|
export type { UseCommandOptions } from "./use-command.js";
|