impact-nova 1.5.10 → 1.5.13

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,12 +1,12 @@
1
- import { jsx as e, jsxs as m, Fragment as ae } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as f, Fragment as le } from "react/jsx-runtime";
2
2
  import * as r from "react";
3
- import * as v from "@radix-ui/react-dialog";
4
- import { Search as $ } from "lucide-react";
5
- import { cn as d } from "../../../lib/utils.js";
6
- import { useCommandPalette as ne } from "./command-palette-context.js";
7
- import { Kbd as P } from "./kbd.js";
8
- import { fuzzyFilter as se, keybindingToSymbols as re } from "./utils.js";
9
- const E = r.createContext({
3
+ import * as R from "@radix-ui/react-dialog";
4
+ import { Search as U } from "lucide-react";
5
+ import { cn as c } from "../../../lib/utils.js";
6
+ import { useCommandPalette as de } from "./command-palette-context.js";
7
+ import { Kbd as S } from "./kbd.js";
8
+ import { fuzzyFilter as me, keybindingToSymbols as fe } from "./utils.js";
9
+ const D = r.createContext({
10
10
  query: "",
11
11
  setQuery: () => {
12
12
  },
@@ -17,142 +17,156 @@ const E = r.createContext({
17
17
  onExecute: () => {
18
18
  }
19
19
  });
20
- function oe({
20
+ function ue({
21
21
  className: o,
22
22
  children: a,
23
23
  commands: n,
24
24
  placeholder: i = "Type a command or search...",
25
- emptyTitle: c = "No results found",
26
- emptyDescription: h = "Try a different search term",
27
- recentGroupLabel: x = "Recently Used",
28
- defaultGroupLabel: g = "Commands",
29
- navigateLabel: R = "Navigate",
30
- runLabel: S = "Run",
31
- closeLabel: z = "Close",
32
- onCommandExecute: M,
33
- onOpenChange: J
25
+ emptyTitle: l = "No results found",
26
+ emptyDescription: y = "Try a different search term",
27
+ recentGroupLabel: d = "Recently Used",
28
+ defaultGroupLabel: C = "Commands",
29
+ navigateLabel: O = "Navigate",
30
+ runLabel: A = "Run",
31
+ closeLabel: F = "Close",
32
+ onCommandExecute: j,
33
+ onOpenChange: G
34
34
  }) {
35
- const { open: I, setOpen: W, getPaletteCommands: X, getEffectiveKeybinding: Y, registry: N } = ne(), [b, D] = r.useState(""), [w, C] = r.useState(0), O = r.useRef(null), A = r.useRef(null), F = r.useMemo(() => n ?? X(), [n, I]), j = r.useMemo(() => {
36
- const t = se(
37
- F,
38
- b,
35
+ const { open: M, setOpen: L, getPaletteCommands: ee, getEffectiveKeybinding: te, registry: k } = de(), [w, q] = r.useState(""), [v, N] = r.useState(0), $ = r.useRef(null), K = r.useRef(null), T = r.useMemo(() => n ?? ee(), [n, M]), B = r.useMemo(() => {
36
+ const e = me(
37
+ T,
38
+ w,
39
39
  (s) => `${s.category ? s.category + ": " : ""}${s.label}${s.description ? " " + s.description : ""}`
40
40
  );
41
- if (!b.trim()) {
42
- const s = N.getRecentCommandIds(), y = new Set(s), l = [], u = [];
43
- for (const p of t)
44
- y.has(p.item.id) ? l.push(p) : u.push(p);
45
- return l.sort((p, te) => s.indexOf(p.item.id) - s.indexOf(te.item.id)), [...l, ...u];
41
+ if (!w.trim()) {
42
+ const s = k.getRecentCommandIds(), E = new Set(s), p = [], b = [];
43
+ for (const x of e)
44
+ E.has(x.item.id) ? p.push(x) : b.push(x);
45
+ return p.sort((x, z) => s.indexOf(x.item.id) - s.indexOf(z.item.id)), [...p, ...b];
46
46
  }
47
- return t;
48
- }, [F, b, N]), f = r.useMemo(() => j.map((t) => t.item), [j]), Z = r.useMemo(() => {
49
- const t = /* @__PURE__ */ new Map(), s = new Set(N.getRecentCommandIds());
50
- if (b.trim())
51
- for (const y of f) {
52
- const l = y.category || g;
53
- t.has(l) || t.set(l, []), t.get(l).push(y);
47
+ return e;
48
+ }, [T, w, k]), u = r.useMemo(() => B.map((e) => e.item), [B]), ae = r.useMemo(() => {
49
+ const e = /* @__PURE__ */ new Map(), s = new Set(k.getRecentCommandIds());
50
+ if (w.trim())
51
+ for (const m of u) {
52
+ const h = m.category || C;
53
+ e.has(h) || e.set(h, []), e.get(h).push(m);
54
54
  }
55
55
  else {
56
- const y = f.filter((u) => s.has(u.id));
57
- y.length > 0 && t.set(x, y);
58
- const l = f.filter((u) => !s.has(u.id));
59
- for (const u of l) {
60
- const p = u.category || g;
61
- t.has(p) || t.set(p, []), t.get(p).push(u);
56
+ const m = u.filter((g) => s.has(g.id));
57
+ m.length > 0 && e.set(d, m);
58
+ const h = u.filter((g) => !s.has(g.id));
59
+ for (const g of h) {
60
+ const P = g.category || C;
61
+ e.has(P) || e.set(P, []), e.get(P).push(g);
62
+ }
63
+ }
64
+ const E = { modal: 4, page: 3, module: 2, global: 1 }, p = { user: 2, "ag-grid": 1, browser: 0, system: 0 }, b = /* @__PURE__ */ new Map();
65
+ for (const [m, h] of e.entries()) {
66
+ let g = -1;
67
+ for (const P of h) {
68
+ const ie = E[P.scope] ?? 1, ce = p[P.source ?? "user"] ?? 0;
69
+ g = Math.max(g, ie * 10 + ce);
62
70
  }
71
+ b.set(m, g);
63
72
  }
64
- return t;
65
- }, [f, b, N, x, g]);
73
+ const x = /* @__PURE__ */ new Map(), z = e.get(d);
74
+ z && x.set(d, z);
75
+ const oe = Array.from(e.entries()).filter(([m]) => m !== d).sort(([m], [h]) => (b.get(h) ?? 0) - (b.get(m) ?? 0));
76
+ for (const [m, h] of oe)
77
+ x.set(m, h);
78
+ return x;
79
+ }, [u, w, k, d, C]);
66
80
  r.useEffect(() => {
67
- I && (D(""), C(0), requestAnimationFrame(() => {
68
- O.current?.focus();
81
+ M && (q(""), N(0), requestAnimationFrame(() => {
82
+ $.current?.focus();
69
83
  }));
70
- }, [I]);
71
- const q = (t) => {
72
- W(t), J?.(t);
73
- }, k = r.useCallback((t) => {
74
- t.handler(), N.addRecentCommand(t.id), M?.(t), q(!1);
75
- }, [N, M]), G = r.useCallback((t) => {
76
- switch (t.key) {
84
+ }, [M]);
85
+ const Q = (e) => {
86
+ L(e), G?.(e);
87
+ }, I = r.useCallback((e) => {
88
+ e.handler(), k.addRecentCommand(e.id), j?.(e), Q(!1);
89
+ }, [k, j]), ne = r.useCallback((e) => {
90
+ switch (e.key) {
77
91
  case "ArrowDown": {
78
- t.preventDefault(), C((s) => Math.min(s + 1, f.length - 1));
92
+ e.preventDefault(), N((s) => Math.min(s + 1, u.length - 1));
79
93
  break;
80
94
  }
81
95
  case "ArrowUp": {
82
- t.preventDefault(), C((s) => Math.max(s - 1, 0));
96
+ e.preventDefault(), N((s) => Math.max(s - 1, 0));
83
97
  break;
84
98
  }
85
99
  case "Enter": {
86
- t.preventDefault();
87
- const s = f[w];
88
- s && k(s);
100
+ e.preventDefault();
101
+ const s = u[v];
102
+ s && I(s);
89
103
  break;
90
104
  }
91
105
  case "Home": {
92
- t.preventDefault(), C(0);
106
+ e.preventDefault(), N(0);
93
107
  break;
94
108
  }
95
109
  case "End": {
96
- t.preventDefault(), C(Math.max(f.length - 1, 0));
110
+ e.preventDefault(), N(Math.max(u.length - 1, 0));
97
111
  break;
98
112
  }
99
113
  }
100
- }, [f, w, k]);
114
+ }, [u, v, I]);
101
115
  r.useEffect(() => {
102
- C(0);
103
- }, [b]), r.useEffect(() => {
104
- const t = A.current;
105
- if (!t) return;
106
- const s = t.querySelector('[data-selected="true"]');
116
+ N(0);
117
+ }, [w]), r.useEffect(() => {
118
+ const e = K.current;
119
+ if (!e) return;
120
+ const s = e.querySelector('[data-selected="true"]');
107
121
  s && s.scrollIntoView({ block: "nearest" });
108
- }, [w]);
109
- const L = r.useMemo(
122
+ }, [v]);
123
+ const se = r.useMemo(
110
124
  () => ({
111
- query: b,
112
- setQuery: D,
113
- selectedIndex: w,
114
- setSelectedIndex: C,
115
- flatItems: f,
116
- onExecute: k,
125
+ query: w,
126
+ setQuery: q,
127
+ selectedIndex: v,
128
+ setSelectedIndex: N,
129
+ flatItems: u,
130
+ onExecute: I,
117
131
  placeholder: i,
118
- emptyTitle: c,
119
- emptyDescription: h,
120
- recentGroupLabel: x,
121
- defaultGroupLabel: g,
122
- navigateLabel: R,
123
- runLabel: S,
124
- closeLabel: z
132
+ emptyTitle: l,
133
+ emptyDescription: y,
134
+ recentGroupLabel: d,
135
+ defaultGroupLabel: C,
136
+ navigateLabel: O,
137
+ runLabel: A,
138
+ closeLabel: F
125
139
  }),
126
140
  [
127
- b,
128
141
  w,
129
- f,
130
- k,
142
+ v,
143
+ u,
144
+ I,
131
145
  i,
132
- c,
133
- h,
134
- x,
135
- g,
136
- R,
137
- S,
138
- z
146
+ l,
147
+ y,
148
+ d,
149
+ C,
150
+ O,
151
+ A,
152
+ F
139
153
  ]
140
- ), ee = r.Children.count(a) > 0;
141
- return /* @__PURE__ */ e(v.Root, { open: I, onOpenChange: q, children: /* @__PURE__ */ m(v.Portal, { children: [
142
- /* @__PURE__ */ e(
143
- v.Overlay,
154
+ ), re = r.Children.count(a) > 0;
155
+ return /* @__PURE__ */ t(R.Root, { open: M, onOpenChange: Q, children: /* @__PURE__ */ f(R.Portal, { children: [
156
+ /* @__PURE__ */ t(
157
+ R.Overlay,
144
158
  {
145
159
  className: "fixed inset-0 z-50 bg-black/40 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0"
146
160
  }
147
161
  ),
148
- /* @__PURE__ */ m(
149
- v.Content,
162
+ /* @__PURE__ */ f(
163
+ R.Content,
150
164
  {
151
165
  "aria-describedby": void 0,
152
166
  "data-command-palette": !0,
153
167
  "data-component": "command-palette",
154
- onKeyDown: G,
155
- className: d(
168
+ onKeyDown: ne,
169
+ className: c(
156
170
  "fixed left-[50%] top-[20%] z-50 w-full max-w-[640px] -translate-x-1/2",
157
171
  "rounded-xl border border-[#d1d5db] bg-white shadow-2xl overflow-hidden",
158
172
  "data-[state=open]:animate-in data-[state=closed]:animate-out",
@@ -165,74 +179,74 @@ function oe({
165
179
  ),
166
180
  style: { transformOrigin: "top center" },
167
181
  children: [
168
- /* @__PURE__ */ e(v.Title, { className: "sr-only", children: "Command Palette" }),
169
- /* @__PURE__ */ e(E.Provider, { value: L, children: ee ? a : /* @__PURE__ */ m(ae, { children: [
170
- /* @__PURE__ */ e(
171
- K,
182
+ /* @__PURE__ */ t(R.Title, { className: "sr-only", children: "Command Palette" }),
183
+ /* @__PURE__ */ t(D.Provider, { value: se, children: re ? a : /* @__PURE__ */ f(le, { children: [
184
+ /* @__PURE__ */ t(
185
+ W,
172
186
  {
173
- ref: O,
187
+ ref: $,
174
188
  placeholder: i
175
189
  }
176
190
  ),
177
- /* @__PURE__ */ e(T, { ref: A, children: f.length === 0 ? /* @__PURE__ */ e(H, {}) : Array.from(Z.entries()).map(([t, s], y) => /* @__PURE__ */ m(r.Fragment, { children: [
178
- y > 0 && /* @__PURE__ */ e(V, {}),
179
- /* @__PURE__ */ e(B, { heading: t, children: s.map((l) => {
180
- const u = f.indexOf(l), p = Y(l.id);
181
- return /* @__PURE__ */ e(
182
- Q,
191
+ /* @__PURE__ */ t(H, { ref: K, children: u.length === 0 ? /* @__PURE__ */ t(X, {}) : Array.from(ae.entries()).map(([e, s], E) => /* @__PURE__ */ f(r.Fragment, { children: [
192
+ E > 0 && /* @__PURE__ */ t(Y, {}),
193
+ /* @__PURE__ */ t(V, { heading: e, children: s.map((p) => {
194
+ const b = u.indexOf(p), x = te(p.id);
195
+ return /* @__PURE__ */ t(
196
+ _,
183
197
  {
184
- command: l,
185
- isSelected: u === w,
186
- onSelect: () => k(l),
187
- onMouseEnter: () => C(u),
188
- keybinding: p
198
+ command: p,
199
+ isSelected: b === v,
200
+ onSelect: () => I(p),
201
+ onMouseEnter: () => N(b),
202
+ keybinding: x
189
203
  },
190
- l.id
204
+ p.id
191
205
  );
192
206
  }) })
193
- ] }, t)) }),
194
- /* @__PURE__ */ e(_, {})
207
+ ] }, e)) }),
208
+ /* @__PURE__ */ t(Z, {})
195
209
  ] }) })
196
210
  ]
197
211
  }
198
212
  )
199
213
  ] }) });
200
214
  }
201
- oe.displayName = "CommandPalette";
202
- const K = r.forwardRef(
203
- ({ className: o, placeholder: a, onValueChange: n, ...i }, c) => {
204
- const { query: h, setQuery: x } = r.useContext(E);
205
- return /* @__PURE__ */ m(
215
+ ue.displayName = "CommandPalette";
216
+ const W = r.forwardRef(
217
+ ({ className: o, placeholder: a, onValueChange: n, ...i }, l) => {
218
+ const { query: y, setQuery: d } = r.useContext(D);
219
+ return /* @__PURE__ */ f(
206
220
  "div",
207
221
  {
208
- className: d(
222
+ className: c(
209
223
  "flex items-center gap-3 border-b border-[#e5e7eb] px-4",
210
224
  o
211
225
  ),
212
226
  "data-command-palette-input": !0,
213
227
  children: [
214
- /* @__PURE__ */ e($, { className: "h-4 w-4 shrink-0 text-[#9ca3af]" }),
215
- /* @__PURE__ */ e(
228
+ /* @__PURE__ */ t(U, { className: "h-4 w-4 shrink-0 text-[#9ca3af]" }),
229
+ /* @__PURE__ */ t(
216
230
  "input",
217
231
  {
218
- ref: c,
219
- value: h,
220
- onChange: (g) => {
221
- x(g.target.value), n?.(g.target.value);
232
+ ref: l,
233
+ value: y,
234
+ onChange: (C) => {
235
+ d(C.target.value), n?.(C.target.value);
222
236
  },
223
237
  placeholder: a,
224
238
  autoComplete: "off",
225
239
  autoCorrect: "off",
226
240
  spellCheck: !1,
227
- className: d(
241
+ className: c(
228
242
  "flex h-12 w-full bg-transparent py-3 text-sm font-medium outline-none",
229
243
  "placeholder:text-[#9ca3af]"
230
244
  ),
231
245
  ...i
232
246
  }
233
247
  ),
234
- /* @__PURE__ */ e(
235
- P,
248
+ /* @__PURE__ */ t(
249
+ S,
236
250
  {
237
251
  keybinding: { key: "Escape" },
238
252
  size: "sm",
@@ -245,14 +259,14 @@ const K = r.forwardRef(
245
259
  );
246
260
  }
247
261
  );
248
- K.displayName = "CommandPaletteInput";
249
- const T = r.forwardRef(({ className: o, children: a, ...n }, i) => /* @__PURE__ */ e(
262
+ W.displayName = "CommandPaletteInput";
263
+ const H = r.forwardRef(({ className: o, children: a, ...n }, i) => /* @__PURE__ */ t(
250
264
  "div",
251
265
  {
252
266
  ref: i,
253
267
  role: "listbox",
254
268
  "data-command-palette-list": !0,
255
- className: d(
269
+ className: c(
256
270
  "max-h-[360px] overflow-y-auto overscroll-contain py-1",
257
271
  o
258
272
  ),
@@ -260,37 +274,37 @@ const T = r.forwardRef(({ className: o, children: a, ...n }, i) => /* @__PURE__
260
274
  children: a
261
275
  }
262
276
  ));
263
- T.displayName = "CommandPaletteList";
264
- const B = r.forwardRef(
265
- ({ className: o, heading: a, children: n, ...i }, c) => /* @__PURE__ */ m(
277
+ H.displayName = "CommandPaletteList";
278
+ const V = r.forwardRef(
279
+ ({ className: o, heading: a, children: n, ...i }, l) => /* @__PURE__ */ f(
266
280
  "div",
267
281
  {
268
- ref: c,
282
+ ref: l,
269
283
  role: "group",
270
284
  "aria-label": a,
271
285
  "data-command-palette-group": !0,
272
- className: d("py-1", o),
286
+ className: c("py-1", o),
273
287
  ...i,
274
288
  children: [
275
- a && /* @__PURE__ */ e("div", { className: "px-4 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-[#9ca3af]", children: a }),
289
+ a && /* @__PURE__ */ t("div", { className: "px-4 py-1.5 text-[10px] font-semibold uppercase tracking-wider text-[#9ca3af]", children: a }),
276
290
  n
277
291
  ]
278
292
  }
279
293
  )
280
294
  );
281
- B.displayName = "CommandPaletteGroup";
282
- const ie = {
295
+ V.displayName = "CommandPaletteGroup";
296
+ const pe = {
283
297
  browser: "Browser",
284
298
  "ag-grid": "AG Grid",
285
299
  system: "System"
286
300
  };
287
- function le({ source: o, isSelected: a }) {
301
+ function xe({ source: o, isSelected: a }) {
288
302
  if (!o || o === "user") return null;
289
- const n = ie[o];
290
- return n ? /* @__PURE__ */ e(
303
+ const n = pe[o];
304
+ return n ? /* @__PURE__ */ t(
291
305
  "span",
292
306
  {
293
- className: d(
307
+ className: c(
294
308
  "shrink-0 rounded px-1.5 py-px text-[9px] font-medium leading-tight tracking-wide",
295
309
  a ? "text-white/50" : "text-[#9ca3af] border border-[#e5e7eb]"
296
310
  ),
@@ -298,135 +312,135 @@ function le({ source: o, isSelected: a }) {
298
312
  }
299
313
  ) : null;
300
314
  }
301
- const Q = r.forwardRef(
302
- ({ className: o, command: a, isSelected: n, onSelect: i, keybinding: c, ...h }, x) => /* @__PURE__ */ m(
315
+ const _ = r.forwardRef(
316
+ ({ className: o, command: a, isSelected: n, onSelect: i, keybinding: l, ...y }, d) => /* @__PURE__ */ f(
303
317
  "div",
304
318
  {
305
- ref: x,
319
+ ref: d,
306
320
  role: "option",
307
321
  "aria-selected": n,
308
322
  "data-selected": n,
309
323
  "data-command-palette-item": !0,
310
324
  "data-command-id": a.id,
311
325
  onClick: i,
312
- className: d(
326
+ className: c(
313
327
  "flex items-center gap-3 cursor-pointer px-4 py-2 text-sm",
314
328
  "transition-colors duration-75",
315
329
  n ? "bg-[#4259ee] text-white" : "text-[#374151] hover:bg-[#f3f4f6]",
316
330
  o
317
331
  ),
318
- ...h,
332
+ ...y,
319
333
  children: [
320
- a.icon && /* @__PURE__ */ e("span", { className: d(
334
+ a.icon && /* @__PURE__ */ t("span", { className: c(
321
335
  "flex h-4 w-4 shrink-0 items-center justify-center",
322
336
  n ? "text-white" : "text-[#6b7280]"
323
337
  ), children: a.icon }),
324
- /* @__PURE__ */ m("div", { className: "flex flex-1 flex-col min-w-0", children: [
325
- /* @__PURE__ */ e("span", { className: "truncate font-medium", children: a.label }),
326
- a.description && /* @__PURE__ */ e("span", { className: d(
338
+ /* @__PURE__ */ f("div", { className: "flex flex-1 flex-col min-w-0", children: [
339
+ /* @__PURE__ */ t("span", { className: "truncate font-medium", children: a.label }),
340
+ a.description && /* @__PURE__ */ t("span", { className: c(
327
341
  "truncate text-xs",
328
342
  n ? "text-white/70" : "text-[#9ca3af]"
329
343
  ), children: a.description })
330
344
  ] }),
331
- /* @__PURE__ */ e(le, { source: a.source, isSelected: n }),
332
- c && /* @__PURE__ */ e(U, { keybinding: c, isSelected: n })
345
+ /* @__PURE__ */ t(xe, { source: a.source, isSelected: n }),
346
+ l && /* @__PURE__ */ t(J, { keybinding: l, isSelected: n })
333
347
  ]
334
348
  }
335
349
  )
336
350
  );
337
- Q.displayName = "CommandPaletteItem";
338
- function U({ keybinding: o, isSelected: a, className: n, ...i }) {
339
- const c = re(o);
340
- return /* @__PURE__ */ e(
351
+ _.displayName = "CommandPaletteItem";
352
+ function J({ keybinding: o, isSelected: a, className: n, ...i }) {
353
+ const l = fe(o);
354
+ return /* @__PURE__ */ t(
341
355
  "span",
342
356
  {
343
- className: d("ml-auto flex items-center gap-0.5 shrink-0", n),
357
+ className: c("ml-auto flex items-center gap-0.5 shrink-0", n),
344
358
  "data-command-palette-shortcut": !0,
345
359
  ...i,
346
- children: c.map((h, x) => /* @__PURE__ */ e(
360
+ children: l.map((y, d) => /* @__PURE__ */ t(
347
361
  "kbd",
348
362
  {
349
- className: d(
363
+ className: c(
350
364
  "inline-flex min-w-[20px] items-center justify-center rounded px-1 h-[20px] text-[10px] font-mono leading-none",
351
365
  a ? "bg-white/20 text-white border border-white/30" : "bg-[#f4f5f7] text-[#6b7280] border border-[#d1d5db]"
352
366
  ),
353
- children: h
367
+ children: y
354
368
  },
355
- `${h}-${x}`
369
+ `${y}-${d}`
356
370
  ))
357
371
  }
358
372
  );
359
373
  }
360
- U.displayName = "CommandPaletteShortcut";
361
- function H({ className: o, ...a }) {
362
- const { emptyTitle: n, emptyDescription: i } = r.useContext(E);
363
- return /* @__PURE__ */ m(
374
+ J.displayName = "CommandPaletteShortcut";
375
+ function X({ className: o, ...a }) {
376
+ const { emptyTitle: n, emptyDescription: i } = r.useContext(D);
377
+ return /* @__PURE__ */ f(
364
378
  "div",
365
379
  {
366
380
  "data-command-palette-empty": !0,
367
- className: d(
381
+ className: c(
368
382
  "flex flex-col items-center justify-center py-12 text-center text-sm text-[#9ca3af]",
369
383
  o
370
384
  ),
371
385
  ...a,
372
386
  children: [
373
- /* @__PURE__ */ e($, { className: "h-8 w-8 mb-3 text-[#d1d5db]" }),
374
- /* @__PURE__ */ e("p", { className: "font-medium", children: n }),
375
- /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: i })
387
+ /* @__PURE__ */ t(U, { className: "h-8 w-8 mb-3 text-[#d1d5db]" }),
388
+ /* @__PURE__ */ t("p", { className: "font-medium", children: n }),
389
+ /* @__PURE__ */ t("p", { className: "text-xs mt-1", children: i })
376
390
  ]
377
391
  }
378
392
  );
379
393
  }
380
- H.displayName = "CommandPaletteEmpty";
381
- function V({ className: o, ...a }) {
382
- return /* @__PURE__ */ e(
394
+ X.displayName = "CommandPaletteEmpty";
395
+ function Y({ className: o, ...a }) {
396
+ return /* @__PURE__ */ t(
383
397
  "div",
384
398
  {
385
399
  "data-command-palette-separator": !0,
386
- className: d("h-px bg-[#e5e7eb] mx-2", o),
400
+ className: c("h-px bg-[#e5e7eb] mx-2", o),
387
401
  ...a
388
402
  }
389
403
  );
390
404
  }
391
- V.displayName = "CommandPaletteSeparator";
392
- function _({ className: o, ...a }) {
393
- const { navigateLabel: n, runLabel: i, closeLabel: c } = r.useContext(E);
394
- return /* @__PURE__ */ m(
405
+ Y.displayName = "CommandPaletteSeparator";
406
+ function Z({ className: o, ...a }) {
407
+ const { navigateLabel: n, runLabel: i, closeLabel: l } = r.useContext(D);
408
+ return /* @__PURE__ */ f(
395
409
  "div",
396
410
  {
397
411
  "data-command-palette-footer": !0,
398
- className: d(
412
+ className: c(
399
413
  "flex items-center gap-4 border-t border-[#e5e7eb] px-4 py-2 text-[11px] text-[#9ca3af]",
400
414
  o
401
415
  ),
402
416
  ...a,
403
417
  children: [
404
- /* @__PURE__ */ m("span", { className: "inline-flex items-center gap-1", children: [
405
- /* @__PURE__ */ e(P, { keys: ["↑"], size: "sm", variant: "muted" }),
406
- /* @__PURE__ */ e(P, { keys: ["↓"], size: "sm", variant: "muted" }),
407
- /* @__PURE__ */ e("span", { children: n })
418
+ /* @__PURE__ */ f("span", { className: "inline-flex items-center gap-1", children: [
419
+ /* @__PURE__ */ t(S, { keys: ["↑"], size: "sm", variant: "muted" }),
420
+ /* @__PURE__ */ t(S, { keys: ["↓"], size: "sm", variant: "muted" }),
421
+ /* @__PURE__ */ t("span", { children: n })
408
422
  ] }),
409
- /* @__PURE__ */ m("span", { className: "inline-flex items-center gap-1", children: [
410
- /* @__PURE__ */ e(P, { keys: ["↵"], size: "sm", variant: "muted" }),
411
- /* @__PURE__ */ e("span", { children: i })
423
+ /* @__PURE__ */ f("span", { className: "inline-flex items-center gap-1", children: [
424
+ /* @__PURE__ */ t(S, { keys: ["↵"], size: "sm", variant: "muted" }),
425
+ /* @__PURE__ */ t("span", { children: i })
412
426
  ] }),
413
- /* @__PURE__ */ m("span", { className: "inline-flex items-center gap-1", children: [
414
- /* @__PURE__ */ e(P, { keys: ["Escape"], size: "sm", variant: "muted" }),
415
- /* @__PURE__ */ e("span", { children: c })
427
+ /* @__PURE__ */ f("span", { className: "inline-flex items-center gap-1", children: [
428
+ /* @__PURE__ */ t(S, { keys: ["Escape"], size: "sm", variant: "muted" }),
429
+ /* @__PURE__ */ t("span", { children: l })
416
430
  ] })
417
431
  ]
418
432
  }
419
433
  );
420
434
  }
421
- _.displayName = "CommandPaletteFooter";
435
+ Z.displayName = "CommandPaletteFooter";
422
436
  export {
423
- oe as CommandPalette,
424
- H as CommandPaletteEmpty,
425
- _ as CommandPaletteFooter,
426
- B as CommandPaletteGroup,
427
- K as CommandPaletteInput,
428
- Q as CommandPaletteItem,
429
- T as CommandPaletteList,
430
- V as CommandPaletteSeparator,
431
- U as CommandPaletteShortcut
437
+ ue as CommandPalette,
438
+ X as CommandPaletteEmpty,
439
+ Z as CommandPaletteFooter,
440
+ V as CommandPaletteGroup,
441
+ W as CommandPaletteInput,
442
+ _ as CommandPaletteItem,
443
+ H as CommandPaletteList,
444
+ Y as CommandPaletteSeparator,
445
+ J as CommandPaletteShortcut
432
446
  };
@@ -50,6 +50,7 @@ export declare class ShortcutRegistry {
50
50
  popScope(scope: ShortcutScope): void;
51
51
  getActiveScopes(): ShortcutScope[];
52
52
  getHighestActiveScope(): ShortcutScope;
53
+ private getHighestActiveScopePriority;
53
54
  getCommand(id: string): CommandDefinition | undefined;
54
55
  getAllCommands(): CommandDefinition[];
55
56
  /**