impact-nova 2.2.5 → 2.2.7

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.
Files changed (60) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.d.ts +2 -1
  2. package/dist/components/data/ag-grid-react/ag-grid-tooltip-overflow.js +12 -11
  3. package/dist/components/data/ag-grid-react/cell-renderers/link-with-batch-cell-renderer.js +54 -56
  4. package/dist/components/data/ag-grid-react/index.d.ts +2 -0
  5. package/dist/components/data/ag-grid-react/index.js +41 -36
  6. package/dist/components/data/data-table/data-table-saved-views.js +223 -207
  7. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +44 -30
  8. package/dist/components/data/expandable-list-item/expandable-list-item-parts.js +158 -184
  9. package/dist/components/data-display/badge/badge.variants.d.ts +2 -2
  10. package/dist/components/data-display/statistics-card/statistics-card.js +138 -111
  11. package/dist/components/feedback/alert/alert.variants.d.ts +1 -1
  12. package/dist/components/feedback/tooltip/badge-overflow-tooltip.d.ts +19 -0
  13. package/dist/components/feedback/tooltip/badge-overflow-tooltip.js +48 -0
  14. package/dist/components/feedback/tooltip/index.d.ts +5 -0
  15. package/dist/components/feedback/tooltip/index.js +16 -10
  16. package/dist/components/feedback/tooltip/overflow-tooltip.d.ts +2 -0
  17. package/dist/components/feedback/tooltip/overflow-tooltip.js +92 -0
  18. package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +42 -0
  19. package/dist/components/feedback/tooltip/tooltip.d.ts +2 -2
  20. package/dist/components/feedback/tooltip/tooltip.js +65 -28
  21. package/dist/components/feedback/tooltip/tooltip.variants.js +1 -1
  22. package/dist/components/feedback/tooltip/use-overflow-tooltip.d.ts +3 -0
  23. package/dist/components/feedback/tooltip/use-overflow-tooltip.js +109 -0
  24. package/dist/components/flows/command-palette/shortcut-settings.js +85 -66
  25. package/dist/components/flows/filter-panel/filter-panel.js +94 -83
  26. package/dist/components/flows/filter-strip/filter-summary.js +187 -177
  27. package/dist/components/flows/filter-strip/filter-tag-list.js +123 -107
  28. package/dist/components/forms/prompt/prompt.variants.d.ts +1 -1
  29. package/dist/components/forms/select/components/SelectMenuPanel.js +26 -22
  30. package/dist/components/forms/select/components/SelectOptionRow.js +77 -66
  31. package/dist/components/forms/select/components/SelectTriggerValue.js +49 -20
  32. package/dist/components/forms/select/components/Submenu.js +53 -39
  33. package/dist/components/forms/select/hooks/useSuppressOptionClickForTextSelection.d.ts +5 -0
  34. package/dist/components/forms/select/hooks/useSuppressOptionClickForTextSelection.js +28 -0
  35. package/dist/components/forms/select/select.js +121 -120
  36. package/dist/components/forms/select/utils/shouldSuppressOptionClickForTextSelection.d.ts +5 -0
  37. package/dist/components/forms/select/utils/shouldSuppressOptionClickForTextSelection.js +16 -0
  38. package/dist/components/layout/horizontal-scroller/index.d.ts +4 -0
  39. package/dist/components/layout/horizontal-scroller/index.js +6 -2
  40. package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.d.ts +10 -0
  41. package/dist/components/layout/horizontal-scroller/scroll-overflow-affordance.js +124 -0
  42. package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.d.ts +13 -0
  43. package/dist/components/layout/horizontal-scroller/use-horizontal-scroll-overflow.js +40 -0
  44. package/dist/components/primitives/stepper/stepper.js +61 -42
  45. package/dist/components/primitives/tag/tag.variants.d.ts +1 -1
  46. package/dist/impact-nova.css +1 -1
  47. package/dist/index.js +473 -463
  48. package/dist/lib/overflow/is-text-overflowing.d.ts +3 -0
  49. package/dist/lib/overflow/is-text-overflowing.js +6 -0
  50. package/dist/lib/overlay/prevent-dismiss-on-tooltip-outside.d.ts +3 -0
  51. package/dist/lib/overlay/prevent-dismiss-on-tooltip-outside.js +34 -0
  52. package/dist/lib/tooltip/tooltip-content-interaction.d.ts +4 -0
  53. package/dist/lib/tooltip/tooltip-content-interaction.js +21 -0
  54. package/dist/llms/rules/ag-grid.js +1 -1
  55. package/dist/llms/rules/best-practices.js +1 -1
  56. package/dist/llms/rules/installation.js +1 -1
  57. package/dist/llms/rules/requirements.js +1 -1
  58. package/dist/llms/rules/troubleshooting.js +1 -1
  59. package/dist/providers/app-providers.js +18 -11
  60. package/package.json +1 -1
@@ -1,45 +1,82 @@
1
- import { jsx as i, jsxs as m } from "react/jsx-runtime";
2
- import * as s from "react";
1
+ import { jsx as n, jsxs as u } from "react/jsx-runtime";
2
+ import * as T from "react";
3
3
  import * as r from "@radix-ui/react-tooltip";
4
- import { wrapRadixPart as c } from "../../../lib/primitives/create-compound.js";
5
- import { cn as a } from "../../../lib/utils.js";
6
- import { tooltipVariants as f } from "./tooltip.variants.js";
7
- function g(t) {
4
+ import { wrapRadixPart as y } from "../../../lib/primitives/create-compound.js";
5
+ import { useOverlayPortalContainer as C } from "../../../lib/overlay/overlay-portal-context.js";
6
+ import { clearTooltipContentPointerGestureEnd as k, markTooltipContentPointerGestureStart as b } from "../../../lib/tooltip/tooltip-content-interaction.js";
7
+ import { cn as l } from "../../../lib/utils.js";
8
+ import { tooltipVariants as v } from "./tooltip.variants.js";
9
+ function w(t) {
8
10
  return t === "primary" ? "default" : t ?? "tertiary";
9
11
  }
10
- const x = r.Provider, N = (t) => /* @__PURE__ */ i(r.Root, { "data-component": "tooltip", ...t }), R = c(
12
+ const G = ({
13
+ disableHoverableContent: t = !1,
14
+ ...i
15
+ }) => /* @__PURE__ */ n(
16
+ r.Provider,
17
+ {
18
+ disableHoverableContent: t,
19
+ ...i
20
+ }
21
+ ), A = ({
22
+ disableHoverableContent: t = !1,
23
+ ...i
24
+ }) => /* @__PURE__ */ n(
25
+ r.Root,
26
+ {
27
+ "data-component": "tooltip",
28
+ disableHoverableContent: t,
29
+ ...i
30
+ }
31
+ ), E = y(
11
32
  "tooltip",
12
33
  "trigger",
13
34
  "TooltipTrigger",
14
35
  r.Trigger
15
- ), u = s.forwardRef(
36
+ ), x = T.forwardRef(
16
37
  ({
17
38
  className: t,
18
- sideOffset: n = 4,
19
- variant: l = "tertiary",
20
- showArrow: p = !0,
39
+ sideOffset: i = 4,
40
+ variant: p = "tertiary",
41
+ showArrow: s = !0,
42
+ onPointerDown: m,
43
+ onPointerUp: c,
44
+ onClick: d,
45
+ onDoubleClick: f,
21
46
  ...e
22
- }, d) => {
23
- const o = g(l);
24
- return /* @__PURE__ */ i(r.Portal, { children: /* @__PURE__ */ m(
47
+ }, P) => {
48
+ const a = w(p), g = C();
49
+ return /* @__PURE__ */ n(r.Portal, { container: g, children: /* @__PURE__ */ u(
25
50
  r.Content,
26
51
  {
27
- ref: d,
28
- sideOffset: n,
52
+ ref: P,
53
+ sideOffset: i,
29
54
  "data-component": "tooltip-content",
30
- "data-variant": o,
31
- className: a(f({ variant: o }), t),
55
+ "data-variant": a,
56
+ className: l(v({ variant: a }), t),
57
+ onPointerDown: (o) => {
58
+ b(), o.stopPropagation(), m?.(o);
59
+ },
60
+ onPointerUp: (o) => {
61
+ k(), o.stopPropagation(), c?.(o);
62
+ },
63
+ onClick: (o) => {
64
+ o.stopPropagation(), d?.(o);
65
+ },
66
+ onDoubleClick: (o) => {
67
+ o.stopPropagation(), f?.(o);
68
+ },
32
69
  ...e,
33
70
  children: [
34
71
  e.children,
35
- p && /* @__PURE__ */ i(
72
+ s && /* @__PURE__ */ n(
36
73
  r.Arrow,
37
74
  {
38
- className: a(
75
+ className: l(
39
76
  "fill-current",
40
- o === "default" && "fill-brand",
41
- o === "secondary" && "fill-background stroke-border",
42
- o === "tertiary" && "fill-foreground"
77
+ a === "default" && "fill-brand",
78
+ a === "secondary" && "fill-background stroke-border",
79
+ a === "tertiary" && "fill-foreground"
43
80
  )
44
81
  }
45
82
  )
@@ -48,10 +85,10 @@ const x = r.Provider, N = (t) => /* @__PURE__ */ i(r.Root, { "data-component": "
48
85
  ) });
49
86
  }
50
87
  );
51
- u.displayName = r.Content.displayName;
88
+ x.displayName = r.Content.displayName;
52
89
  export {
53
- N as Tooltip,
54
- u as TooltipContent,
55
- x as TooltipProvider,
56
- R as TooltipTrigger
90
+ A as Tooltip,
91
+ x as TooltipContent,
92
+ G as TooltipProvider,
93
+ E as TooltipTrigger
57
94
  };
@@ -1,6 +1,6 @@
1
1
  import { cva as t } from "class-variance-authority";
2
2
  const o = t(
3
- "z-[100] overflow-hidden rounded-md px-4 py-2 text-sm animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin] motion-reduce:animate-none motion-reduce:transition-none",
3
+ "z-[100] select-text overflow-hidden rounded-md px-4 py-2 text-sm animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin] motion-reduce:animate-none motion-reduce:transition-none",
4
4
  {
5
5
  variants: {
6
6
  variant: {
@@ -0,0 +1,3 @@
1
+ import { UseOverflowTooltipOptions, UseOverflowTooltipResult } from './overflow-tooltip.types';
2
+ import * as React from 'react';
3
+ export declare function useOverflowTooltip(children: React.ReactNode, { content, overflowMode, alwaysShow, disabled, focusable, contentDependency, }?: UseOverflowTooltipOptions): UseOverflowTooltipResult;
@@ -0,0 +1,109 @@
1
+ import * as t from "react";
2
+ import { isTextOverflowing as L } from "../../../lib/overflow/is-text-overflowing.js";
3
+ const H = 500;
4
+ function N(o, s) {
5
+ return o !== void 0 ? o : typeof s == "string" ? s : null;
6
+ }
7
+ function B(o, {
8
+ content: s,
9
+ overflowMode: p = "ellipsis",
10
+ alwaysShow: i = !1,
11
+ disabled: f = !1,
12
+ focusable: d = !1,
13
+ contentDependency: h
14
+ } = {}) {
15
+ const g = t.useRef(null), a = t.useRef(!1), u = t.useRef(
16
+ null
17
+ ), m = t.useRef(null), [D, r] = t.useState(!1), [I, n] = t.useState(!1), O = t.useRef(!1), v = t.useRef(!1), T = N(s, o), P = typeof T == "string" ? T.trim().length > 0 : T != null, l = () => {
18
+ u.current && (clearTimeout(u.current), u.current = null);
19
+ }, c = () => {
20
+ const e = m.current;
21
+ e && (document.removeEventListener("scroll", e, !0), m.current = null);
22
+ }, A = () => {
23
+ l(), n(!1), r(!1);
24
+ }, _ = () => {
25
+ c();
26
+ const e = () => {
27
+ a.current = !1, A(), c();
28
+ };
29
+ m.current = e, document.addEventListener("scroll", e, {
30
+ capture: !0,
31
+ passive: !0
32
+ });
33
+ };
34
+ t.useEffect(() => {
35
+ r(!1), n(!1), l(), c();
36
+ }, [h, s, o, i, f, p]), t.useEffect(
37
+ () => () => {
38
+ l(), c();
39
+ },
40
+ []
41
+ );
42
+ const k = t.useCallback((e) => {
43
+ g.current = e;
44
+ }, []), E = (e) => i || L(e, p), C = (e, R) => {
45
+ if (!(f || !P)) {
46
+ if (E(e)) {
47
+ r(!0), n(!0);
48
+ return;
49
+ }
50
+ r(!1), n(!1);
51
+ }
52
+ }, F = (e) => {
53
+ l(), u.current = setTimeout(() => {
54
+ u.current = null, a.current && C(e);
55
+ }, H);
56
+ };
57
+ return {
58
+ setTriggerRef: k,
59
+ onTriggerPointerEnter: (e) => {
60
+ if (!(f || !P)) {
61
+ if (a.current = !0, _(), i) {
62
+ C(e.currentTarget);
63
+ return;
64
+ }
65
+ F(e.currentTarget);
66
+ }
67
+ },
68
+ onTriggerPointerLeave: () => {
69
+ a.current = !1, l();
70
+ },
71
+ onTriggerFocus: d ? (e) => {
72
+ C(e.currentTarget);
73
+ } : void 0,
74
+ onContentPointerEnter: () => {
75
+ O.current = !0, n(!0);
76
+ },
77
+ onContentPointerDown: () => {
78
+ v.current = !0, n(!0);
79
+ },
80
+ onContentPointerLeave: () => {
81
+ O.current = !1;
82
+ },
83
+ onContentPointerUp: () => {
84
+ v.current = !1;
85
+ },
86
+ triggerTabIndex: d ? 0 : void 0,
87
+ isTooltipArmed: D,
88
+ isTooltipOpen: I,
89
+ tooltipContent: T,
90
+ recheckOverflow: () => {
91
+ const e = g.current;
92
+ return !e || f || !P ? !1 : E(e) ? (r(!0), !0) : (r(!1), n(!1), !1);
93
+ },
94
+ handleTooltipOpenChange: (e) => {
95
+ if (!e && (O.current || v.current) || e && !D && !i || (n(e), e))
96
+ return;
97
+ c();
98
+ const R = g.current;
99
+ if (!R) {
100
+ r(!1);
101
+ return;
102
+ }
103
+ !i && !L(R, p) && r(!1);
104
+ }
105
+ };
106
+ }
107
+ export {
108
+ B as useOverflowTooltip
109
+ };
@@ -1,28 +1,47 @@
1
- import { jsx as r, jsxs as h, Fragment as j } from "react/jsx-runtime";
2
- import * as i from "react";
3
- import { Person as z, Monitor as G, PriorityAlert as U, Locked as T, Reset as q } from "impact-nova-icons";
1
+ import { jsx as r, jsxs as h, Fragment as z } from "react/jsx-runtime";
2
+ import * as o from "react";
3
+ import { Person as G, Monitor as U, PriorityAlert as q, Locked as O, Reset as B } from "impact-nova-icons";
4
4
  import { cn as p } from "../../../lib/utils.js";
5
- import { ModuleRegistry as B, AllCommunityModule as $ } from "ag-grid-community";
6
- import { AllEnterpriseModule as H } from "ag-grid-enterprise";
7
- import { DataTable as V, DataTableContent as J } from "../../data/data-table/data-table.js";
5
+ import { Kbd as $ } from "../../primitives/kbd/kbd.js";
6
+ import { keybindingToString as H } from "../../primitives/kbd/keybinding-display.js";
7
+ import { OverflowTooltip as A } from "../../feedback/tooltip/overflow-tooltip.js";
8
+ import { ModuleRegistry as V, AllCommunityModule as J } from "ag-grid-community";
9
+ import { AllEnterpriseModule as Q } from "ag-grid-enterprise";
10
+ import { DataTable as X, DataTableContent as Y } from "../../data/data-table/data-table.js";
8
11
  import { AG_CELL_NO_PADDING as F } from "../../data/ag-grid-react/cell-renderers/index.js";
9
- import { Kbd as Q } from "../../primitives/kbd/kbd.js";
10
- import { keybindingToString as X } from "../../primitives/kbd/keybinding-display.js";
11
- import { useCommandPalette as Y } from "./use-command-palette.js";
12
- import { COMMAND_SOURCE_LABELS as m, keybindingFromEvent as Z, isReservedShortcut as W } from "./utils.js";
13
- import { BadgeCellRenderer as ee } from "../../data/ag-grid-react/cell-renderers/badge-cell-renderer.js";
14
- B.registerModules([$, H]);
15
- function te(a) {
12
+ import { useCommandPalette as Z } from "./use-command-palette.js";
13
+ import { COMMAND_SOURCE_LABELS as m, keybindingFromEvent as W, isReservedShortcut as ee } from "./utils.js";
14
+ import { BadgeCellRenderer as te } from "../../data/ag-grid-react/cell-renderers/badge-cell-renderer.js";
15
+ V.registerModules([J, Q]);
16
+ function re(a) {
16
17
  const t = a.data;
17
18
  return t ? /* @__PURE__ */ h("div", { className: "flex items-center gap-2 min-w-0 h-full", children: [
18
- !t.customisable && /* @__PURE__ */ r(T, { className: "h-3 w-3 text-secondary-foreground shrink-0" }),
19
+ !t.customisable && /* @__PURE__ */ r(O, { className: "h-3 w-3 text-secondary-foreground shrink-0" }),
19
20
  /* @__PURE__ */ h("div", { className: "flex flex-col min-w-0 gap-0", children: [
20
- /* @__PURE__ */ r("span", { className: "truncate font-medium text-content-charcoal text-xs leading-tight", children: t.command }),
21
- t.description && /* @__PURE__ */ r("span", { className: "truncate text-[10px] text-secondary-foreground leading-tight", children: t.description })
21
+ /* @__PURE__ */ r(
22
+ A,
23
+ {
24
+ triggerClassName: "truncate font-medium text-content-charcoal text-xs leading-tight block min-w-0",
25
+ content: t.command,
26
+ side: "top",
27
+ variant: "tertiary",
28
+ children: t.command
29
+ }
30
+ ),
31
+ t.description && /* @__PURE__ */ r(
32
+ A,
33
+ {
34
+ triggerClassName: "truncate text-[10px] text-secondary-foreground leading-tight block min-w-0",
35
+ content: t.description,
36
+ side: "top",
37
+ variant: "tertiary",
38
+ children: t.description
39
+ }
40
+ )
22
41
  ] })
23
42
  ] }) : null;
24
43
  }
25
- function re(a) {
44
+ function ne(a) {
26
45
  const t = a.data;
27
46
  if (!t) return null;
28
47
  const d = a.recordingCommandId === t.id;
@@ -37,27 +56,27 @@ function re(a) {
37
56
  t.customisable ? "bg-canvas-elevated" : "bg-transparent",
38
57
  d && "ring-1 ring-brand border border-brand"
39
58
  ),
40
- children: d ? /* @__PURE__ */ r("span", { className: "text-xs text-brand font-medium animate-pulse motion-reduce:animate-none", children: a.recordingLabel ?? "Press desired shortcut..." }) : /* @__PURE__ */ h(j, { children: [
59
+ children: d ? /* @__PURE__ */ r("span", { className: "text-xs text-brand font-medium animate-pulse motion-reduce:animate-none", children: a.recordingLabel ?? "Press desired shortcut..." }) : /* @__PURE__ */ h(z, { children: [
41
60
  t.keybinding ? /* @__PURE__ */ r(
42
61
  "button",
43
62
  {
44
63
  type: "button",
45
- onClick: (o) => {
46
- o.stopPropagation(), t.customisable && a.onStartRecording(t.id);
64
+ onClick: (s) => {
65
+ s.stopPropagation(), t.customisable && a.onStartRecording(t.id);
47
66
  },
48
67
  disabled: !t.customisable,
49
68
  className: p(
50
69
  "flex items-center justify-end h-full w-full text-end",
51
70
  t.customisable ? "cursor-pointer" : "cursor-default opacity-70"
52
71
  ),
53
- children: /* @__PURE__ */ r(Q, { keybinding: t.keybinding, size: "sm" })
72
+ children: /* @__PURE__ */ r($, { keybinding: t.keybinding, size: "sm" })
54
73
  }
55
74
  ) : t.customisable ? /* @__PURE__ */ r(
56
75
  "button",
57
76
  {
58
77
  type: "button",
59
- onClick: (o) => {
60
- o.stopPropagation(), a.onStartRecording(t.id);
78
+ onClick: (s) => {
79
+ s.stopPropagation(), a.onStartRecording(t.id);
61
80
  },
62
81
  className: "flex items-center justify-end h-full w-full text-xs text-secondary-foreground hover:text-brand transition-colors cursor-pointer text-end",
63
82
  children: a.addShortcutLabel ?? "Add shortcut"
@@ -67,28 +86,28 @@ function re(a) {
67
86
  "button",
68
87
  {
69
88
  type: "button",
70
- onClick: (o) => {
71
- o.stopPropagation(), a.onReset(t.id);
89
+ onClick: (s) => {
90
+ s.stopPropagation(), a.onReset(t.id);
72
91
  },
73
92
  className: "absolute end-1.5 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",
74
93
  title: "Reset to default",
75
- children: /* @__PURE__ */ r(q, { className: "!h-3 !w-3" })
94
+ children: /* @__PURE__ */ r(B, { className: "!h-3 !w-3" })
76
95
  }
77
96
  )
78
97
  ] })
79
98
  }
80
99
  ) });
81
100
  }
82
- function ne(a) {
101
+ function ae(a) {
83
102
  const t = a.data;
84
103
  return t ? /* @__PURE__ */ r("div", { className: "flex items-center h-full", children: /* @__PURE__ */ r("span", { className: "text-xs text-secondary-foreground capitalize", children: t.scope }) }) : null;
85
104
  }
86
- function ae({
105
+ function le({
87
106
  className: a,
88
107
  scopes: t,
89
108
  sources: d,
90
- renderStatus: o,
91
- recordingLabel: le,
109
+ renderStatus: s,
110
+ recordingLabel: ie,
92
111
  pressShortcutLabel: x,
93
112
  addShortcutLabel: v,
94
113
  conflictWarnLabel: w = "Conflicts with other shortcuts",
@@ -99,51 +118,51 @@ function ae({
99
118
  getSettingsCommands: C,
100
119
  getEffectiveKeybinding: S,
101
120
  updateKeybinding: N,
102
- resetKeybinding: R,
103
- version: O
104
- } = Y(), [c, f] = i.useState(null), [u, l] = i.useState(null), y = i.useMemo(() => {
121
+ resetKeybinding: k,
122
+ version: _
123
+ } = Z(), [c, f] = o.useState(null), [u, l] = o.useState(null), y = o.useMemo(() => {
105
124
  let n = C();
106
125
  return n = n.filter((e) => {
107
- const s = e.source ?? "user";
108
- return s === "user" || s === "ag-grid";
126
+ const i = e.source ?? "user";
127
+ return i === "user" || i === "ag-grid";
109
128
  }), t && (n = n.filter((e) => t.includes(e.scope))), d && (n = n.filter((e) => e.source && d.includes(e.source))), n.map((e) => {
110
- const s = S(e.id), g = e.source ?? "user", D = m[g] ?? g ?? "User", A = D.toLowerCase() === "user";
129
+ const i = S(e.id), g = e.source ?? "user", D = m[g] ?? g ?? "User", T = D.toLowerCase() === "user";
111
130
  return {
112
131
  id: e.id,
113
132
  command: e.label,
114
133
  description: e.description || "",
115
134
  category: e.category || "General",
116
- keybinding: s,
117
- keybindingDisplay: s ? X(s) : "",
135
+ keybinding: i,
136
+ keybindingDisplay: i ? H(i) : "",
118
137
  scope: e.scope,
119
138
  source: D,
120
- sourceColor: A ? "primary" : "neutral",
121
- sourceIcon: A ? /* @__PURE__ */ r(z, { className: "h-3 w-3" }) : /* @__PURE__ */ r(G, { className: "h-3 w-3" }),
139
+ sourceColor: T ? "primary" : "neutral",
140
+ sourceIcon: T ? /* @__PURE__ */ r(G, { className: "h-3 w-3" }) : /* @__PURE__ */ r(U, { className: "h-3 w-3" }),
122
141
  customisable: e.customisable !== !1,
123
142
  passive: e.passive === !0,
124
143
  hasOverride: e.keybinding !== void 0,
125
144
  _def: e
126
145
  };
127
146
  });
128
- }, [O, t, d, C, S]), k = i.useCallback((n) => {
147
+ }, [_, t, d, C, S]), R = o.useCallback((n) => {
129
148
  f(n), l(null);
130
- }, []), M = i.useCallback((n) => {
131
- R(n), l(null);
132
- }, [R]);
133
- i.useEffect(() => {
149
+ }, []), M = o.useCallback((n) => {
150
+ k(n), l(null);
151
+ }, [k]);
152
+ o.useEffect(() => {
134
153
  if (!c) return;
135
154
  const n = (e) => {
136
155
  if (e.preventDefault(), e.stopPropagation(), e.key === "Escape") {
137
156
  f(null), l(null);
138
157
  return;
139
158
  }
140
- const s = Z(e);
141
- if (!s) return;
142
- if (W(s)) {
159
+ const i = W(e);
160
+ if (!i) return;
161
+ if (ee(i)) {
143
162
  l({ type: "reserved", text: b }), f(null), setTimeout(() => l(null), 3e3);
144
163
  return;
145
164
  }
146
- const g = N(c, s);
165
+ const g = N(c, i);
147
166
  g.success ? (f(null), l(null)) : g.conflict ? (l({
148
167
  type: "conflict",
149
168
  text: w
@@ -151,14 +170,14 @@ function ae({
151
170
  };
152
171
  return window.addEventListener("keydown", n, !0), () => window.removeEventListener("keydown", n, !0);
153
172
  }, [c, N, b, w]);
154
- const P = i.useMemo(() => Array.from(new Set(y.map((e) => e.category))).sort().map((e) => ({ label: e, value: e })), [y]), _ = i.useMemo(() => [
173
+ const P = o.useMemo(() => Array.from(new Set(y.map((e) => e.category))).sort().map((e) => ({ label: e, value: e })), [y]), I = o.useMemo(() => [
155
174
  {
156
175
  field: "command",
157
176
  headerName: "Command",
158
177
  flex: 1,
159
178
  minWidth: 200,
160
179
  filter: "agTextColumnFilter",
161
- cellRenderer: te,
180
+ cellRenderer: re,
162
181
  filterValueGetter: (n) => {
163
182
  const e = n.data;
164
183
  return e ? `${e.command} ${e.description}` : "";
@@ -182,11 +201,11 @@ function ae({
182
201
  width: 180,
183
202
  type: "rightAligned",
184
203
  filter: "agTextColumnFilter",
185
- cellRenderer: re,
204
+ cellRenderer: ne,
186
205
  cellClass: F,
187
206
  cellRendererParams: {
188
207
  recordingCommandId: c,
189
- onStartRecording: k,
208
+ onStartRecording: R,
190
209
  onReset: M,
191
210
  recordingLabel: x,
192
211
  addShortcutLabel: v
@@ -198,7 +217,7 @@ function ae({
198
217
  headerName: "Scope",
199
218
  width: 100,
200
219
  filter: "agSetColumnFilter",
201
- cellRenderer: ne,
220
+ cellRenderer: ae,
202
221
  headerComponentParams: {
203
222
  isSearchable: !0,
204
223
  advanceSearchEnabled: !0,
@@ -217,7 +236,7 @@ function ae({
217
236
  width: 130,
218
237
  filter: "agSetColumnFilter",
219
238
  cellClass: F,
220
- cellRenderer: ee,
239
+ cellRenderer: te,
221
240
  cellRendererParams: {
222
241
  variant: "subtle",
223
242
  colorField: "sourceColor",
@@ -235,7 +254,7 @@ function ae({
235
254
  isMultiSelect: !0
236
255
  }
237
256
  }
238
- ], [c, k, M, x, v, P]), I = i.useMemo(() => ({
257
+ ], [c, R, M, x, v, P]), K = o.useMemo(() => ({
239
258
  filter: {
240
259
  filterModel: {
241
260
  source: {
@@ -244,7 +263,7 @@ function ae({
244
263
  }
245
264
  }
246
265
  }
247
- }), []), K = i.useMemo(() => ({
266
+ }), []), j = o.useMemo(() => ({
248
267
  sortable: !0,
249
268
  resizable: !0,
250
269
  filter: !0,
@@ -256,18 +275,18 @@ function ae({
256
275
  "px-3 py-1.5 text-[10px] md:text-sm font-medium rounded-md whitespace-nowrap flex items-center gap-2",
257
276
  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] motion-reduce:animate-none" : ""
258
277
  ), children: [
259
- u?.type === "conflict" ? /* @__PURE__ */ r(U, { 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,
278
+ u?.type === "conflict" ? /* @__PURE__ */ r(q, { className: "h-3.5 w-3.5 shrink-0" }) : u?.type === "reserved" ? /* @__PURE__ */ r(O, { className: "h-3.5 w-3.5 shrink-0" }) : c ? /* @__PURE__ */ r("span", { className: "shrink-0 text-base", children: "⌨️" }) : null,
260
279
  /* @__PURE__ */ r("span", { children: u ? u.text : L })
261
280
  ] }) : null;
262
- return /* @__PURE__ */ h(V, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
263
- o ? o(E) : E,
281
+ return /* @__PURE__ */ h(X, { className: p("flex flex-col w-full h-full border-t-0", a), children: [
282
+ s ? s(E) : E,
264
283
  /* @__PURE__ */ r(
265
- J,
284
+ Y,
266
285
  {
267
286
  rowData: y,
268
- columnDefs: _,
269
- defaultColDef: K,
270
- initialState: I,
287
+ columnDefs: I,
288
+ defaultColDef: j,
289
+ initialState: K,
271
290
  rowHeight: 44,
272
291
  animateRows: !1,
273
292
  rowSelection: "single",
@@ -279,7 +298,7 @@ function ae({
279
298
  )
280
299
  ] });
281
300
  }
282
- ae.displayName = "ShortcutSettings";
301
+ le.displayName = "ShortcutSettings";
283
302
  export {
284
- ae as ShortcutSettings
303
+ le as ShortcutSettings
285
304
  };