impact-nova 1.5.12 → 1.5.14

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