impact-nova 1.6.0 → 1.6.2

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.
@@ -28,8 +28,8 @@ function fe({
28
28
  commands: n,
29
29
  placeholder: i = "Type a command or search...",
30
30
  emptyTitle: m = "No results found",
31
- emptyDescription: u = "Try a different search term",
32
- recentGroupLabel: p = "Recently Used",
31
+ emptyDescription: p = "Try a different search term",
32
+ recentGroupLabel: f = "Recently Used",
33
33
  defaultGroupLabel: d = "Commands",
34
34
  navigateLabel: I = "Navigate",
35
35
  runLabel: z = "Run",
@@ -38,34 +38,37 @@ function fe({
38
38
  onCommandExecute: O,
39
39
  onOpenChange: W
40
40
  }) {
41
- const { open: E, setOpen: Y, getPaletteCommands: Z, getEffectiveKeybinding: G, registry: k } = ie(), [g, $] = r.useState(""), [N, h] = r.useState(0), A = r.useRef(null), F = r.useRef(null), j = r.useMemo(() => n ?? Z(), [n, E]), q = r.useMemo(() => {
41
+ const { open: E, setOpen: Y, getPaletteCommands: Z, getEffectiveKeybinding: G, registry: k } = ie(), [y, $] = r.useState(""), [N, g] = r.useState(0), A = r.useRef(null), F = r.useRef(null), j = r.useMemo(() => (n ?? Z()).filter((s) => {
42
+ const u = s.source ?? "user";
43
+ return u === "user" || u === "ag-grid";
44
+ }), [n, E]), q = r.useMemo(() => {
42
45
  const t = le(
43
46
  j,
44
- g,
47
+ y,
45
48
  (s) => `${s.category ? s.category + ": " : ""}${s.label}${s.description ? " " + s.description : ""}`
46
49
  );
47
- if (!g.trim()) {
48
- const s = k.getRecentCommandIds(), y = new Set(s), f = [], C = [];
49
- for (const x of t)
50
- y.has(x.item.id) ? f.push(x) : C.push(x);
51
- return f.sort((x, oe) => s.indexOf(x.item.id) - s.indexOf(oe.item.id)), [...f, ...C];
50
+ if (!y.trim()) {
51
+ const s = k.getRecentCommandIds(), u = new Set(s), x = [], C = [];
52
+ for (const h of t)
53
+ u.has(h.item.id) ? x.push(h) : C.push(h);
54
+ return x.sort((h, oe) => s.indexOf(h.item.id) - s.indexOf(oe.item.id)), [...x, ...C];
52
55
  }
53
56
  return t;
54
- }, [j, g, k]), T = r.useMemo(
57
+ }, [j, y, k]), T = r.useMemo(
55
58
  () => q.map((t) => t.item),
56
59
  [q]
57
60
  ), ee = r.useMemo(
58
61
  () => de({
59
62
  filteredCommands: T,
60
- emptyQuery: !g.trim(),
63
+ emptyQuery: !y.trim(),
61
64
  recentCommandIds: k.getRecentCommandIds(),
62
- recentGroupLabel: p,
65
+ recentGroupLabel: f,
63
66
  defaultGroupLabel: d
64
67
  }),
65
- [T, g, k, p, d]
68
+ [T, y, k, f, d]
66
69
  ), { groups: te, orderedCommands: b } = ee, S = r.useRef({ ordered: b, index: N });
67
70
  S.current = { ordered: b, index: N }, r.useEffect(() => {
68
- E && ($(""), h(0), requestAnimationFrame(() => {
71
+ E && ($(""), g(0), requestAnimationFrame(() => {
69
72
  A.current?.focus();
70
73
  }));
71
74
  }, [E]);
@@ -75,28 +78,28 @@ function fe({
75
78
  t.handler(), k.addRecentCommand(t.id), O?.(t), K(!1);
76
79
  }, [k, O]), ae = r.useCallback(
77
80
  (t) => {
78
- const { ordered: s } = S.current, y = Math.max(s.length - 1, 0);
81
+ const { ordered: s } = S.current, u = Math.max(s.length - 1, 0);
79
82
  switch (t.key) {
80
83
  case "ArrowDown": {
81
- t.preventDefault(), h((f) => Math.min(f + 1, y));
84
+ t.preventDefault(), g((x) => Math.min(x + 1, u));
82
85
  break;
83
86
  }
84
87
  case "ArrowUp": {
85
- t.preventDefault(), h((f) => Math.max(f - 1, 0));
88
+ t.preventDefault(), g((x) => Math.max(x - 1, 0));
86
89
  break;
87
90
  }
88
91
  case "Enter": {
89
92
  t.preventDefault();
90
- const { ordered: f, index: C } = S.current, x = f[C];
91
- x && w(x);
93
+ const { ordered: x, index: C } = S.current, h = x[C];
94
+ h && w(h);
92
95
  break;
93
96
  }
94
97
  case "Home": {
95
- t.preventDefault(), h(0);
98
+ t.preventDefault(), g(0);
96
99
  break;
97
100
  }
98
101
  case "End": {
99
- t.preventDefault(), h(y);
102
+ t.preventDefault(), g(u);
100
103
  break;
101
104
  }
102
105
  }
@@ -104,10 +107,10 @@ function fe({
104
107
  [w]
105
108
  );
106
109
  r.useEffect(() => {
107
- h(0);
108
- }, [g]), r.useEffect(() => {
110
+ g(0);
111
+ }, [y]), r.useEffect(() => {
109
112
  const t = b.length;
110
- h((s) => t === 0 ? 0 : Math.min(s, t - 1));
113
+ g((s) => t === 0 ? 0 : Math.min(s, t - 1));
111
114
  }, [b.length]), r.useLayoutEffect(() => {
112
115
  const t = F.current;
113
116
  if (!t) return;
@@ -120,16 +123,16 @@ function fe({
120
123
  }, [N]);
121
124
  const ne = r.useMemo(
122
125
  () => ({
123
- query: g,
126
+ query: y,
124
127
  setQuery: $,
125
128
  selectedIndex: N,
126
- setSelectedIndex: h,
129
+ setSelectedIndex: g,
127
130
  orderedCommands: b,
128
131
  onExecute: w,
129
132
  placeholder: i,
130
133
  emptyTitle: m,
131
- emptyDescription: u,
132
- recentGroupLabel: p,
134
+ emptyDescription: p,
135
+ recentGroupLabel: f,
133
136
  defaultGroupLabel: d,
134
137
  navigateLabel: I,
135
138
  runLabel: z,
@@ -137,14 +140,14 @@ function fe({
137
140
  configureShortcutsLabel: D
138
141
  }),
139
142
  [
140
- g,
143
+ y,
141
144
  N,
142
145
  b,
143
146
  w,
144
147
  i,
145
148
  m,
146
- u,
147
149
  p,
150
+ f,
148
151
  d,
149
152
  I,
150
153
  z,
@@ -190,18 +193,18 @@ function fe({
190
193
  ),
191
194
  /* @__PURE__ */ e(_, { ref: F, children: b.length === 0 ? /* @__PURE__ */ e(V, {}) : te.map((t, s) => /* @__PURE__ */ c(r.Fragment, { children: [
192
195
  s > 0 && /* @__PURE__ */ e(X, {}),
193
- /* @__PURE__ */ e(B, { heading: t.heading, children: t.items.map((y, f) => {
194
- const C = t.rowStart + f, x = G(y.id);
196
+ /* @__PURE__ */ e(B, { heading: t.heading, children: t.items.map((u, x) => {
197
+ const C = t.rowStart + x, h = G(u.id);
195
198
  return /* @__PURE__ */ e(
196
199
  H,
197
200
  {
198
- command: y,
201
+ command: u,
199
202
  isSelected: C === N,
200
- onSelect: () => w(y),
201
- onMouseEnter: () => h(C),
202
- keybinding: x
203
+ onSelect: () => w(u),
204
+ onMouseEnter: () => g(C),
205
+ keybinding: h
203
206
  },
204
- y.id
207
+ u.id
205
208
  );
206
209
  }) })
207
210
  ] }, `${t.heading}-${t.rowStart}`)) }),
@@ -215,7 +218,7 @@ function fe({
215
218
  fe.displayName = "CommandPalette";
216
219
  const U = r.forwardRef(
217
220
  ({ className: o, placeholder: a, onValueChange: n, ...i }, m) => {
218
- const { query: u, setQuery: p } = r.useContext(R);
221
+ const { query: p, setQuery: f } = r.useContext(R);
219
222
  return /* @__PURE__ */ c(
220
223
  "div",
221
224
  {
@@ -230,9 +233,9 @@ const U = r.forwardRef(
230
233
  "input",
231
234
  {
232
235
  ref: m,
233
- value: u,
236
+ value: p,
234
237
  onChange: (d) => {
235
- p(d.target.value), n?.(d.target.value);
238
+ f(d.target.value), n?.(d.target.value);
236
239
  },
237
240
  placeholder: a,
238
241
  autoComplete: "off",
@@ -308,12 +311,12 @@ function xe({ source: o, isSelected: a }) {
308
311
  ) : null;
309
312
  }
310
313
  const H = r.forwardRef(
311
- ({ className: o, command: a, isSelected: n, onSelect: i, keybinding: m, ...u }, p) => {
314
+ ({ className: o, command: a, isSelected: n, onSelect: i, keybinding: m, ...p }, f) => {
312
315
  const d = pe(a.source);
313
316
  return /* @__PURE__ */ c(
314
317
  "div",
315
318
  {
316
- ref: p,
319
+ ref: f,
317
320
  role: "option",
318
321
  "aria-selected": n,
319
322
  "data-selected": n,
@@ -327,7 +330,7 @@ const H = r.forwardRef(
327
330
  n ? "bg-brand text-brand-foreground" : d ? "text-content-muted hover:bg-canvas-muted" : "text-content-charcoal hover:bg-canvas-muted",
328
331
  o
329
332
  ),
330
- ...u,
333
+ ...p,
331
334
  children: [
332
335
  a.icon && /* @__PURE__ */ e("span", { className: l(
333
336
  "flex h-4 w-4 shrink-0 items-center justify-center",
@@ -352,14 +355,14 @@ const H = r.forwardRef(
352
355
  );
353
356
  H.displayName = "CommandPaletteItem";
354
357
  function L({ keybinding: o, isSelected: a, external: n, className: i, ...m }) {
355
- const u = ce(o);
358
+ const p = ce(o);
356
359
  return /* @__PURE__ */ e(
357
360
  "span",
358
361
  {
359
362
  className: l("ml-auto flex items-center gap-0.5 shrink-0", i),
360
363
  "data-command-palette-shortcut": !0,
361
364
  ...m,
362
- children: u.map((p, d) => /* @__PURE__ */ e(
365
+ children: p.map((f, d) => /* @__PURE__ */ e(
363
366
  "kbd",
364
367
  {
365
368
  className: l(
@@ -367,9 +370,9 @@ function L({ keybinding: o, isSelected: a, external: n, className: i, ...m }) {
367
370
  "transition-[color,background-color,border-color] duration-150 ease-out",
368
371
  a ? "bg-canvas-elevated/20 text-brand-foreground border border-brand-foreground/30" : n ? "bg-canvas-muted text-stroke-hairline border border-stroke-hairline" : "bg-canvas-muted text-content-muted border border-stroke-hairline"
369
372
  ),
370
- children: p
373
+ children: f
371
374
  },
372
- `${p}-${d}`
375
+ `${f}-${d}`
373
376
  ))
374
377
  }
375
378
  );
@@ -407,7 +410,7 @@ function X({ className: o, ...a }) {
407
410
  }
408
411
  X.displayName = "CommandPaletteSeparator";
409
412
  function J({ className: o, ...a }) {
410
- const { navigateLabel: n, runLabel: i, closeLabel: m, configureShortcutsLabel: u } = r.useContext(R);
413
+ const { navigateLabel: n, runLabel: i, closeLabel: m, configureShortcutsLabel: p } = r.useContext(R);
411
414
  return /* @__PURE__ */ c(
412
415
  "div",
413
416
  {
@@ -431,9 +434,9 @@ function J({ className: o, ...a }) {
431
434
  /* @__PURE__ */ e(v, { keys: ["Escape"], size: "sm", variant: "muted" }),
432
435
  /* @__PURE__ */ e("span", { children: m })
433
436
  ] }),
434
- u && /* @__PURE__ */ c("span", { className: "ml-auto inline-flex items-center gap-1", children: [
437
+ p && /* @__PURE__ */ c("span", { className: "ml-auto inline-flex items-center gap-1", children: [
435
438
  /* @__PURE__ */ e(v, { keybinding: { key: "k", alt: !0 }, size: "sm", variant: "muted" }),
436
- /* @__PURE__ */ e("span", { children: u })
439
+ /* @__PURE__ */ e("span", { children: p })
437
440
  ] })
438
441
  ]
439
442
  }
@@ -1,171 +1,180 @@
1
- import { jsx as r, jsxs as p, Fragment as K } from "react/jsx-runtime";
1
+ import { jsx as r, jsxs as h, Fragment as j } from "react/jsx-runtime";
2
2
  import * as i from "react";
3
- import { User as j, Monitor as z, AlertTriangle as G, Lock as T, RotateCcw as U } from "lucide-react";
4
- import { cn as h } from "../../../lib/utils.js";
3
+ import { User as z, Monitor as G, AlertTriangle as U, Lock as F, RotateCcw as q } from "lucide-react";
4
+ import { cn as p } from "../../../lib/utils.js";
5
5
  import { ModuleRegistry as B, AllCommunityModule as $ } from "ag-grid-community";
6
6
  import { AllEnterpriseModule as H } from "ag-grid-enterprise";
7
- import { DataTable as V, DataTableContent as q } from "../data-table/data-table.js";
8
- import { AG_CELL_NO_PADDING as D } from "../ag-grid-react/cell-renderers/index.js";
9
- import { Kbd as J } from "./kbd.js";
10
- import { useCommandPalette as Q } from "./command-palette-context.js";
11
- import { COMMAND_SOURCE_LABELS as a, keybindingToString as X, keybindingFromEvent as Y, isReservedShortcut as Z } from "./utils.js";
12
- import { BadgeCellRenderer as W } from "../ag-grid-react/cell-renderers/badge-cell-renderer.js";
7
+ import { DataTable as V, DataTableContent as J } from "../data-table/data-table.js";
8
+ import { AG_CELL_NO_PADDING as A } from "../ag-grid-react/cell-renderers/index.js";
9
+ import { Kbd as Q } from "./kbd.js";
10
+ import { useCommandPalette as X } from "./command-palette-context.js";
11
+ import { COMMAND_SOURCE_LABELS as m, keybindingToString as Y, keybindingFromEvent as Z, isReservedShortcut as W } from "./utils.js";
12
+ import { BadgeCellRenderer as ee } from "../ag-grid-react/cell-renderers/badge-cell-renderer.js";
13
13
  B.registerModules([$, H]);
14
- function ee(n) {
15
- const e = n.data;
16
- return e ? /* @__PURE__ */ p("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
17
- !e.customisable && /* @__PURE__ */ r(T, { className: "h-3 w-3 text-content-muted shrink-0" }),
18
- /* @__PURE__ */ p("div", { className: "flex flex-col min-w-0 gap-0", children: [
19
- /* @__PURE__ */ r("span", { className: "truncate font-medium text-content-charcoal text-xs leading-tight", children: e.command }),
20
- e.description && /* @__PURE__ */ r("span", { className: "truncate text-[10px] text-content-muted leading-tight", children: e.description })
14
+ function te(l) {
15
+ const t = l.data;
16
+ return t ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
17
+ !t.customisable && /* @__PURE__ */ r(F, { className: "h-3 w-3 text-content-muted shrink-0" }),
18
+ /* @__PURE__ */ h("div", { className: "flex flex-col min-w-0 gap-0", children: [
19
+ /* @__PURE__ */ r("span", { className: "truncate font-medium text-content-charcoal text-xs leading-tight", children: t.command }),
20
+ t.description && /* @__PURE__ */ r("span", { className: "truncate text-[10px] text-content-muted leading-tight", children: t.description })
21
21
  ] })
22
22
  ] }) : null;
23
23
  }
24
- function te(n) {
25
- const e = n.data;
26
- if (!e) return null;
27
- const d = n.recordingCommandId === e.id;
28
- return /* @__PURE__ */ r("div", { className: h(
24
+ function re(l) {
25
+ const t = l.data;
26
+ if (!t) return null;
27
+ const u = l.recordingCommandId === t.id;
28
+ return /* @__PURE__ */ r("div", { className: p(
29
29
  "w-full h-full flex items-center ag-cell-inner-padding",
30
- e.customisable ? "in-ag-editable-cell-highlight" : ""
30
+ t.customisable ? "in-ag-editable-cell-highlight" : ""
31
31
  ), children: /* @__PURE__ */ r(
32
32
  "div",
33
33
  {
34
- className: h(
34
+ className: p(
35
35
  "flex items-center justify-between w-full h-7 rounded-[8px] px-1.5 group/row relative",
36
- e.customisable ? "bg-canvas-elevated" : "bg-transparent",
37
- d && "ring-1 ring-brand border border-brand"
36
+ t.customisable ? "bg-canvas-elevated" : "bg-transparent",
37
+ u && "ring-1 ring-brand border border-brand"
38
38
  ),
39
- children: d ? /* @__PURE__ */ r("span", { className: "text-xs text-brand font-medium animate-pulse", children: n.recordingLabel ?? "Press desired shortcut..." }) : /* @__PURE__ */ p(K, { children: [
40
- e.keybinding ? /* @__PURE__ */ r(
39
+ children: u ? /* @__PURE__ */ r("span", { className: "text-xs text-brand font-medium animate-pulse", children: l.recordingLabel ?? "Press desired shortcut..." }) : /* @__PURE__ */ h(j, { children: [
40
+ t.keybinding ? /* @__PURE__ */ r(
41
41
  "button",
42
42
  {
43
43
  type: "button",
44
44
  onClick: (o) => {
45
- o.stopPropagation(), e.customisable && n.onStartRecording(e.id);
45
+ o.stopPropagation(), t.customisable && l.onStartRecording(t.id);
46
46
  },
47
- disabled: !e.customisable,
48
- className: h(
47
+ disabled: !t.customisable,
48
+ className: p(
49
49
  "flex items-center justify-end h-full w-full text-right",
50
- e.customisable ? "cursor-pointer" : "cursor-default opacity-70"
50
+ t.customisable ? "cursor-pointer" : "cursor-default opacity-70"
51
51
  ),
52
- children: /* @__PURE__ */ r(J, { keybinding: e.keybinding, size: "sm" })
52
+ children: /* @__PURE__ */ r(Q, { keybinding: t.keybinding, size: "sm" })
53
53
  }
54
- ) : e.customisable ? /* @__PURE__ */ r(
54
+ ) : t.customisable ? /* @__PURE__ */ r(
55
55
  "button",
56
56
  {
57
57
  type: "button",
58
58
  onClick: (o) => {
59
- o.stopPropagation(), n.onStartRecording(e.id);
59
+ o.stopPropagation(), l.onStartRecording(t.id);
60
60
  },
61
61
  className: "flex items-center justify-end h-full w-full text-xs text-content-muted hover:text-brand transition-colors cursor-pointer text-right",
62
- children: n.addShortcutLabel ?? "Add shortcut"
62
+ children: l.addShortcutLabel ?? "Add shortcut"
63
63
  }
64
64
  ) : /* @__PURE__ */ r("span", { className: "text-xs text-transparent", children: "--" }),
65
- e.hasOverride && e.customisable && !d && /* @__PURE__ */ r(
65
+ t.hasOverride && t.customisable && !u && /* @__PURE__ */ r(
66
66
  "button",
67
67
  {
68
68
  type: "button",
69
69
  onClick: (o) => {
70
- o.stopPropagation(), n.onReset(e.id);
70
+ o.stopPropagation(), l.onReset(t.id);
71
71
  },
72
72
  className: "absolute right-1 p-0.5 rounded bg-canvas-elevated hover:bg-canvas-muted hover:text-destructive cursor-pointer opacity-0 group-hover/row:opacity-100 transition-opacity z-10",
73
73
  title: "Reset to default",
74
- children: /* @__PURE__ */ r(U, { className: "h-3 w-3" })
74
+ children: /* @__PURE__ */ r(q, { className: "h-3 w-3" })
75
75
  }
76
76
  )
77
77
  ] })
78
78
  }
79
79
  ) });
80
80
  }
81
- function re(n) {
82
- const e = n.data;
83
- return e ? /* @__PURE__ */ r("div", { className: "flex items-center h-full", children: /* @__PURE__ */ r("span", { className: "text-xs text-content-muted capitalize", children: e.scope }) }) : null;
81
+ function ne(l) {
82
+ const t = l.data;
83
+ return t ? /* @__PURE__ */ r("div", { className: "flex items-center h-full", children: /* @__PURE__ */ r("span", { className: "text-xs text-content-muted capitalize", children: t.scope }) }) : null;
84
84
  }
85
85
  function le({
86
- className: n,
87
- scopes: e,
88
- sources: d,
86
+ className: l,
87
+ scopes: t,
88
+ sources: u,
89
89
  renderStatus: o,
90
- recordingLabel: ne,
91
- pressShortcutLabel: x,
92
- addShortcutLabel: y,
93
- conflictWarnLabel: v = "Conflicts with other shortcuts",
90
+ recordingLabel: ae,
91
+ pressShortcutLabel: y,
92
+ addShortcutLabel: v,
93
+ conflictWarnLabel: w = "Conflicts with other shortcuts",
94
94
  reservedWarnLabel: b = "This shortcut is reserved by the browser",
95
- recordingInstruction: F = "Recording: Press shortcut or Esc",
96
- ...ae
95
+ recordingInstruction: L = "Recording: Press shortcut or Esc",
96
+ ...se
97
97
  }) {
98
98
  const {
99
- getSettingsCommands: w,
100
- getEffectiveKeybinding: C,
101
- updateKeybinding: S,
102
- resetKeybinding: N,
103
- version: A
104
- } = Q(), [c, f] = i.useState(null), [u, s] = i.useState(null), L = i.useMemo(() => {
105
- let l = w();
106
- return e && (l = l.filter((t) => e.includes(t.scope))), d && (l = l.filter((t) => t.source && d.includes(t.source))), l.map((t) => {
107
- const m = C(t.id), g = t.source ?? "user", E = a[g] ?? g ?? "User", P = E.toLowerCase() === "user";
99
+ getSettingsCommands: C,
100
+ getEffectiveKeybinding: S,
101
+ updateKeybinding: N,
102
+ resetKeybinding: R,
103
+ version: O
104
+ } = X(), [c, f] = i.useState(null), [d, a] = i.useState(null), x = i.useMemo(() => {
105
+ let n = C();
106
+ return n = n.filter((e) => {
107
+ const s = e.source ?? "user";
108
+ return s === "user" || s === "ag-grid";
109
+ }), t && (n = n.filter((e) => t.includes(e.scope))), u && (n = n.filter((e) => e.source && u.includes(e.source))), n.map((e) => {
110
+ const s = S(e.id), g = e.source ?? "user", D = m[g] ?? g ?? "User", T = D.toLowerCase() === "user";
108
111
  return {
109
- id: t.id,
110
- command: t.label,
111
- description: t.description || "",
112
- category: t.category || "General",
113
- keybinding: m,
114
- keybindingDisplay: m ? X(m) : "",
115
- scope: t.scope,
116
- source: E,
117
- sourceColor: P ? "primary" : "neutral",
118
- sourceIcon: P ? /* @__PURE__ */ r(j, { className: "h-3 w-3" }) : /* @__PURE__ */ r(z, { className: "h-3 w-3" }),
119
- customisable: t.customisable !== !1,
120
- passive: t.passive === !0,
121
- hasOverride: t.keybinding !== void 0,
122
- _def: t
112
+ id: e.id,
113
+ command: e.label,
114
+ description: e.description || "",
115
+ category: e.category || "General",
116
+ keybinding: s,
117
+ keybindingDisplay: s ? Y(s) : "",
118
+ scope: e.scope,
119
+ source: D,
120
+ sourceColor: T ? "primary" : "neutral",
121
+ sourceIcon: T ? /* @__PURE__ */ r(z, { className: "h-3 w-3" }) : /* @__PURE__ */ r(G, { className: "h-3 w-3" }),
122
+ customisable: e.customisable !== !1,
123
+ passive: e.passive === !0,
124
+ hasOverride: e.keybinding !== void 0,
125
+ _def: e
123
126
  };
124
127
  });
125
- }, [A, e, d, w, C]), R = i.useCallback((l) => {
126
- f(l), s(null);
127
- }, []), k = i.useCallback((l) => {
128
- N(l), s(null);
129
- }, [N]);
128
+ }, [O, t, u, C, S]), k = i.useCallback((n) => {
129
+ f(n), a(null);
130
+ }, []), M = i.useCallback((n) => {
131
+ R(n), a(null);
132
+ }, [R]);
130
133
  i.useEffect(() => {
131
134
  if (!c) return;
132
- const l = (t) => {
133
- if (t.preventDefault(), t.stopPropagation(), t.key === "Escape") {
134
- f(null), s(null);
135
+ const n = (e) => {
136
+ if (e.preventDefault(), e.stopPropagation(), e.key === "Escape") {
137
+ f(null), a(null);
135
138
  return;
136
139
  }
137
- const m = Y(t);
138
- if (!m) return;
139
- if (Z(m)) {
140
- s({ type: "reserved", text: b }), f(null), setTimeout(() => s(null), 3e3);
140
+ const s = Z(e);
141
+ if (!s) return;
142
+ if (W(s)) {
143
+ a({ type: "reserved", text: b }), f(null), setTimeout(() => a(null), 3e3);
141
144
  return;
142
145
  }
143
- const g = S(c, m);
144
- g.success ? (f(null), s(null)) : g.conflict ? (s({
146
+ const g = N(c, s);
147
+ g.success ? (f(null), a(null)) : g.conflict ? (a({
145
148
  type: "conflict",
146
- text: v
147
- }), f(null), setTimeout(() => s(null), 3e3)) : g.reserved && (s({ type: "reserved", text: b }), f(null), setTimeout(() => s(null), 3e3));
149
+ text: w
150
+ }), f(null), setTimeout(() => a(null), 3e3)) : g.reserved && (a({ type: "reserved", text: b }), f(null), setTimeout(() => a(null), 3e3));
148
151
  };
149
- return window.addEventListener("keydown", l, !0), () => window.removeEventListener("keydown", l, !0);
150
- }, [c, S, b, v]);
151
- const _ = i.useMemo(() => [
152
+ return window.addEventListener("keydown", n, !0), () => window.removeEventListener("keydown", n, !0);
153
+ }, [c, N, b, w]);
154
+ const E = i.useMemo(() => Array.from(new Set(x.map((e) => e.category))).sort().map((e) => ({ label: e, value: e })), [x]), _ = i.useMemo(() => [
152
155
  {
153
156
  field: "command",
154
157
  headerName: "Command",
155
158
  flex: 1,
156
159
  minWidth: 200,
157
160
  filter: "agTextColumnFilter",
158
- cellRenderer: ee,
159
- filterValueGetter: (l) => {
160
- const t = l.data;
161
- return t ? `${t.command} ${t.description}` : "";
161
+ cellRenderer: te,
162
+ filterValueGetter: (n) => {
163
+ const e = n.data;
164
+ return e ? `${e.command} ${e.description}` : "";
162
165
  }
163
166
  },
164
167
  {
165
168
  field: "category",
166
169
  headerName: "Category",
167
170
  width: 140,
168
- filter: "agSetColumnFilter"
171
+ filter: "agSetColumnFilter",
172
+ headerComponentParams: {
173
+ isSearchable: !0,
174
+ advanceSearchEnabled: !0,
175
+ selectOptions: E,
176
+ isMultiSelect: !0
177
+ }
169
178
  },
170
179
  {
171
180
  field: "keybindingDisplay",
@@ -173,14 +182,14 @@ function le({
173
182
  width: 180,
174
183
  type: "rightAligned",
175
184
  filter: "agTextColumnFilter",
176
- cellRenderer: te,
177
- cellClass: D,
185
+ cellRenderer: re,
186
+ cellClass: A,
178
187
  cellRendererParams: {
179
188
  recordingCommandId: c,
180
- onStartRecording: R,
181
- onReset: k,
182
- recordingLabel: x,
183
- addShortcutLabel: y
189
+ onStartRecording: k,
190
+ onReset: M,
191
+ recordingLabel: y,
192
+ addShortcutLabel: v
184
193
  },
185
194
  sortable: !0
186
195
  },
@@ -189,7 +198,7 @@ function le({
189
198
  headerName: "Scope",
190
199
  width: 100,
191
200
  filter: "agSetColumnFilter",
192
- cellRenderer: re,
201
+ cellRenderer: ne,
193
202
  headerComponentParams: {
194
203
  isSearchable: !0,
195
204
  advanceSearchEnabled: !0,
@@ -207,8 +216,8 @@ function le({
207
216
  headerName: "Source",
208
217
  width: 130,
209
218
  filter: "agSetColumnFilter",
210
- cellClass: D,
211
- cellRenderer: W,
219
+ cellClass: A,
220
+ cellRenderer: ee,
212
221
  cellRendererParams: {
213
222
  variant: "subtle",
214
223
  colorField: "sourceColor",
@@ -220,24 +229,22 @@ function le({
220
229
  isSearchable: !0,
221
230
  advanceSearchEnabled: !0,
222
231
  selectOptions: [
223
- { label: a.system, value: a.system },
224
- { label: a.user, value: a.user },
225
- { label: a["ag-grid"], value: a["ag-grid"] },
226
- { label: a.browser, value: a.browser }
232
+ { label: m.user, value: m.user },
233
+ { label: m["ag-grid"], value: m["ag-grid"] }
227
234
  ],
228
235
  isMultiSelect: !0
229
236
  }
230
237
  }
231
- ], [c, R, k, x, y]), I = i.useMemo(() => ({
238
+ ], [c, k, M, y, v, E]), I = i.useMemo(() => ({
232
239
  filter: {
233
240
  filterModel: {
234
241
  source: {
235
242
  filterType: "set",
236
- values: [a.user, a["ag-grid"]]
243
+ values: [m.user, m["ag-grid"]]
237
244
  }
238
245
  }
239
246
  }
240
- }), []), O = i.useMemo(() => ({
247
+ }), []), K = i.useMemo(() => ({
241
248
  sortable: !0,
242
249
  resizable: !0,
243
250
  filter: !0,
@@ -245,27 +252,27 @@ function le({
245
252
  isSearchable: !0,
246
253
  advanceSearchEnabled: !0
247
254
  }
248
- }), []), M = u || c ? /* @__PURE__ */ p("div", { className: h(
255
+ }), []), P = d || c ? /* @__PURE__ */ h("div", { className: p(
249
256
  "px-3 py-1.5 text-[10px] md:text-sm font-medium rounded-md whitespace-nowrap flex items-center gap-2",
250
- u?.type === "conflict" ? "bg-feedback-warning-surface text-content" : u?.type === "reserved" ? "bg-feedback-error-surface text-destructive" : c ? "bg-feedback-info-surface text-brand animate-[pulse_1.5s_ease-in-out_infinite]" : ""
257
+ d?.type === "conflict" ? "bg-feedback-warning-surface text-content" : d?.type === "reserved" ? "bg-feedback-error-surface text-destructive" : c ? "bg-feedback-info-surface text-brand animate-[pulse_1.5s_ease-in-out_infinite]" : ""
251
258
  ), children: [
252
- u?.type === "conflict" ? /* @__PURE__ */ r(G, { className: "h-3.5 w-3.5 shrink-0" }) : u?.type === "reserved" ? /* @__PURE__ */ r(T, { className: "h-3.5 w-3.5 shrink-0" }) : c ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
253
- /* @__PURE__ */ r("span", { children: u ? u.text : F })
259
+ d?.type === "conflict" ? /* @__PURE__ */ r(U, { className: "h-3.5 w-3.5 shrink-0" }) : d?.type === "reserved" ? /* @__PURE__ */ r(F, { className: "h-3.5 w-3.5 shrink-0" }) : c ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
260
+ /* @__PURE__ */ r("span", { children: d ? d.text : L })
254
261
  ] }) : null;
255
- return /* @__PURE__ */ p(V, { className: h("flex flex-col w-full h-full border-t-0", n), children: [
256
- o ? o(M) : M,
262
+ return /* @__PURE__ */ h(V, { className: p("flex flex-col w-full h-full border-t-0", l), children: [
263
+ o ? o(P) : P,
257
264
  /* @__PURE__ */ r(
258
- q,
265
+ J,
259
266
  {
260
- rowData: L,
267
+ rowData: x,
261
268
  columnDefs: _,
262
- defaultColDef: O,
269
+ defaultColDef: K,
263
270
  initialState: I,
264
271
  rowHeight: 44,
265
272
  animateRows: !1,
266
273
  rowSelection: "single",
267
274
  suppressCellFocus: !0,
268
- getRowId: (l) => l.data.id,
275
+ getRowId: (n) => n.data.id,
269
276
  suppressRowClickSelection: !0,
270
277
  domLayout: "normal"
271
278
  }