@burdenoff/fe-libs 2026.1018.1 → 2026.1019.1

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 (57) hide show
  1. package/dist/chrome/AccountSwitcher.js +90 -89
  2. package/dist/chrome/Breadcrumbs.js +1 -1
  3. package/dist/chrome/CommandPalette.js +91 -90
  4. package/dist/chrome/Footer.js +31 -8
  5. package/dist/chrome/GlobalSearch.js +78 -77
  6. package/dist/chrome/HeaderBar.js +1 -1
  7. package/dist/chrome/HeaderThemeSwitcher.js +48 -47
  8. package/dist/chrome/LanguagePickerSheet.js +23 -22
  9. package/dist/chrome/NavCustomizeDialog.d.ts +0 -14
  10. package/dist/chrome/NavCustomizeDialog.js +114 -122
  11. package/dist/chrome/PanelTabs.js +45 -41
  12. package/dist/chrome/PersonaSurfaceControls.d.ts +0 -17
  13. package/dist/chrome/PersonaSurfaceControls.js +115 -118
  14. package/dist/chrome/PluginSettingsPage.js +29 -28
  15. package/dist/chrome/PluginWidgetGrid.js +19 -18
  16. package/dist/chrome/ProductPickerSheet.js +44 -47
  17. package/dist/chrome/ProductSwitcher.js +2 -6
  18. package/dist/chrome/ProfileSwitcher.js +6 -10
  19. package/dist/chrome/ShortcutHelpDialog.js +60 -65
  20. package/dist/chrome/SideNavigation.js +2 -2
  21. package/dist/chrome/Sidebar.js +44 -43
  22. package/dist/chrome/ThemePreferences.js +289 -267
  23. package/dist/chrome/contextSwitcher/EmptyState.js +31 -27
  24. package/dist/chrome/contextSwitcher/OrganizationList.js +40 -30
  25. package/dist/chrome/contextSwitcher/ProjectList.js +48 -44
  26. package/dist/chrome/contextSwitcher/SearchInput.js +44 -40
  27. package/dist/chrome/contextSwitcher/TriggerButton.js +2 -2
  28. package/dist/chrome/contextSwitcher/WorkspaceList.js +36 -32
  29. package/dist/chrome/globalSearch/AdvancedFiltersPanel.js +128 -126
  30. package/dist/chrome/globalSearch/ResultsList.js +25 -27
  31. package/dist/chrome/globalSearch/SearchInput.js +16 -14
  32. package/dist/chrome/notificationCenter/NotificationCardItem.js +58 -47
  33. package/dist/chrome/notificationCenter/NotificationFilters.js +76 -62
  34. package/dist/chrome/notificationCenter/NotificationFooter.js +21 -21
  35. package/dist/chrome/notificationCenter/NotificationHeader.js +67 -63
  36. package/dist/chrome/notificationCenter/NotificationList.js +75 -71
  37. package/dist/chrome/notificationCenter/NotificationPanel.js +37 -33
  38. package/dist/chrome/notificationCenter/PushOptInToggle.js +33 -32
  39. package/dist/chrome/notificationCenter/constants.d.ts +6 -1
  40. package/dist/chrome/notificationCenter/constants.js +12 -11
  41. package/dist/chrome/useThemeOptionLabels.d.ts +33 -0
  42. package/dist/chrome/useThemeOptionLabels.js +39 -0
  43. package/dist/shared/assistant/ui/AssistantMarkdownRenderer.d.ts +6 -6
  44. package/dist/shared/assistant/ui/AssistantMarkdownRenderer.js +86 -85
  45. package/dist/shared/assistant/ui/AssistantMessageItem.js +101 -96
  46. package/dist/shared/assistant/ui/WorkflowAssistantPanel.js +152 -140
  47. package/dist/shared/events/sinks/RybbitSink.js +2 -2
  48. package/dist/shared/providers/shell/interpolateShellLabel.d.ts +3 -0
  49. package/dist/shared/providers/shell/interpolateShellLabel.js +11 -0
  50. package/dist/shared/providers/shell/useAssistantShellLabels.d.ts +45 -0
  51. package/dist/shared/providers/shell/useAssistantShellLabels.js +54 -0
  52. package/dist/shared/tours/TourPlayer.js +33 -32
  53. package/dist/shared/tours/TourTooltip.js +108 -109
  54. package/dist/shared/tours/tourTrigger/MobileTourSheet.js +98 -85
  55. package/dist/shared/tours/tourTrigger/TourListItemDesktop.js +20 -18
  56. package/dist/shared/tours/tourTrigger/TourListItemMobile.js +23 -25
  57. package/package.json +2 -2
@@ -1,85 +1,86 @@
1
1
  import { Sheet as e, SheetContent as t, SheetHeader as n, SheetTitle as r } from "../ui/sheet.js";
2
- import { useEffect as i, useRef as a, useState as o } from "react";
3
- import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
2
+ import { useShellLabel as i } from "../shared/providers/shell/useShellLabel.js";
3
+ import { useEffect as a, useRef as o, useState as s } from "react";
4
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
4
5
  //#region src/chrome/AccountSwitcher.tsx
5
- function u(e = 640) {
6
- let [t, n] = o(!1);
7
- return i(() => {
6
+ function d(e = 640) {
7
+ let [t, n] = s(!1);
8
+ return a(() => {
8
9
  let t = () => n(window.innerWidth < e);
9
10
  return t(), window.addEventListener("resize", t), () => window.removeEventListener("resize", t);
10
11
  }, [e]), t;
11
12
  }
12
- function d(e, t, n) {
13
+ function f(e, t, n) {
13
14
  if (t && n) return `${t.charAt(0)}${n.charAt(0)}`.toUpperCase();
14
15
  let r = e.split(" ");
15
16
  return r.length >= 2 ? `${r[0].charAt(0)}${r[1].charAt(0)}`.toUpperCase() : e.substring(0, 2).toUpperCase();
16
17
  }
17
- var f = ({ accounts: f, activeAccountId: p, onSwitchAccount: m, onAddAccount: h, onRemoveAccount: g, onLogoutAll: _, compact: v = !1 }) => {
18
- let [y, b] = o(!1), x = u(), S = a(null), C = f.find((e) => e.id === p) || f[0], w = f.filter((e) => e.id !== p);
19
- i(() => {
20
- if (x) return;
18
+ var p = ({ accounts: p, activeAccountId: m, onSwitchAccount: h, onAddAccount: g, onRemoveAccount: _, onLogoutAll: v, compact: y = !1 }) => {
19
+ let b = i(), [x, S] = s(!1), C = d(), w = o(null), T = p.find((e) => e.id === m) || p[0], E = p.filter((e) => e.id !== m);
20
+ a(() => {
21
+ if (C) return;
21
22
  let e = (e) => {
22
- S.current && !S.current.contains(e.target) && b(!1);
23
+ w.current && !w.current.contains(e.target) && S(!1);
23
24
  };
24
- if (y) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
25
- }, [y, x]);
26
- let T = (e) => {
27
- m && m(e), b(!1);
28
- }, E = (e, t = !1) => {
29
- let n = d(e.name, e.firstName, e.lastName);
30
- return /* @__PURE__ */ l("div", {
25
+ if (x) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
26
+ }, [x, C]);
27
+ let D = (e) => {
28
+ h && h(e), S(!1);
29
+ }, O = (e, t = !1) => {
30
+ let n = f(e.name, e.firstName, e.lastName);
31
+ return /* @__PURE__ */ u("div", {
31
32
  className: `flex items-center gap-3 p-3 ${t ? "bg-[var(--color-accent-soft)]" : "hover:bg-bg-sunken cursor-pointer"} transition-colors`,
32
- onClick: () => !t && T(e),
33
+ onClick: () => !t && D(e),
33
34
  role: t ? void 0 : "button",
34
35
  tabIndex: t ? void 0 : 0,
35
36
  onKeyDown: (n) => {
36
- !t && (n.key === "Enter" || n.key === " ") && (n.preventDefault(), T(e));
37
+ !t && (n.key === "Enter" || n.key === " ") && (n.preventDefault(), D(e));
37
38
  },
38
39
  children: [
39
- /* @__PURE__ */ c("div", {
40
+ /* @__PURE__ */ l("div", {
40
41
  className: "size-10 rounded-full bg-action-primary-bg flex items-center justify-center flex-shrink-0",
41
- children: e.avatar ? /* @__PURE__ */ c("img", {
42
+ children: e.avatar ? /* @__PURE__ */ l("img", {
42
43
  src: e.avatar,
43
44
  alt: e.name,
44
45
  className: "w-full h-full rounded-full object-cover"
45
- }) : /* @__PURE__ */ c("span", {
46
+ }) : /* @__PURE__ */ l("span", {
46
47
  className: "text-action-primary-text font-semibold text-sm",
47
48
  children: n
48
49
  })
49
50
  }),
50
- /* @__PURE__ */ l("div", {
51
+ /* @__PURE__ */ u("div", {
51
52
  className: "flex-1 min-w-0",
52
- children: [/* @__PURE__ */ c("p", {
53
+ children: [/* @__PURE__ */ l("p", {
53
54
  className: "font-medium text-text-primary truncate",
54
55
  children: e.name
55
- }), /* @__PURE__ */ c("p", {
56
+ }), /* @__PURE__ */ l("p", {
56
57
  className: "text-sm text-text-secondary truncate",
57
58
  children: e.email
58
59
  })]
59
60
  }),
60
- t && /* @__PURE__ */ c("svg", {
61
+ t && /* @__PURE__ */ l("svg", {
61
62
  className: "size-5 text-action-primary-bg flex-shrink-0",
62
63
  fill: "currentColor",
63
64
  viewBox: "0 0 20 20",
64
- children: /* @__PURE__ */ c("path", {
65
+ children: /* @__PURE__ */ l("path", {
65
66
  fillRule: "evenodd",
66
67
  d: "M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z",
67
68
  clipRule: "evenodd"
68
69
  })
69
70
  }),
70
- !t && g && /* @__PURE__ */ c("button", {
71
+ !t && _ && /* @__PURE__ */ l("button", {
71
72
  type: "button",
72
73
  onClick: (t) => {
73
- t.stopPropagation(), g(e.id);
74
+ t.stopPropagation(), _(e.id);
74
75
  },
75
76
  className: "p-1 rounded-button hover:bg-status-error-bg-subtle text-text-muted hover:text-status-error-text transition-colors",
76
- "aria-label": `Remove ${e.name}`,
77
- children: /* @__PURE__ */ c("svg", {
77
+ "aria-label": b("userMenu.removeNamedAccount", "Remove {{name}}", { name: e.name }),
78
+ children: /* @__PURE__ */ l("svg", {
78
79
  className: "size-4",
79
80
  fill: "none",
80
81
  stroke: "currentColor",
81
82
  viewBox: "0 0 24 24",
82
- children: /* @__PURE__ */ c("path", {
83
+ children: /* @__PURE__ */ l("path", {
83
84
  strokeLinecap: "round",
84
85
  strokeLinejoin: "round",
85
86
  strokeWidth: 2,
@@ -89,136 +90,136 @@ var f = ({ accounts: f, activeAccountId: p, onSwitchAccount: m, onAddAccount: h,
89
90
  })
90
91
  ]
91
92
  }, e.id);
92
- }, D = () => /* @__PURE__ */ l(s, { children: [
93
- /* @__PURE__ */ l("div", {
93
+ }, k = () => /* @__PURE__ */ u(c, { children: [
94
+ /* @__PURE__ */ u("div", {
94
95
  className: "border-b border-border-subtle",
95
- children: [/* @__PURE__ */ c("p", {
96
+ children: [/* @__PURE__ */ l("p", {
96
97
  className: "px-3 pt-3 pb-1 text-[11px] font-medium text-text-muted uppercase tracking-wider",
97
- children: "Active Account"
98
- }), C && E(C, !0)]
98
+ children: b("userMenu.activeAccount", "Active Account")
99
+ }), T && O(T, !0)]
99
100
  }),
100
- w.length > 0 && /* @__PURE__ */ l("div", {
101
+ E.length > 0 && /* @__PURE__ */ u("div", {
101
102
  className: "border-b border-border-subtle",
102
- children: [/* @__PURE__ */ c("p", {
103
+ children: [/* @__PURE__ */ l("p", {
103
104
  className: "px-3 pt-3 pb-1 text-[11px] font-medium text-text-muted uppercase tracking-wider",
104
- children: "Switch Account"
105
- }), w.map((e) => E(e))]
105
+ children: b("auth.security.switchAccount", "Switch Account")
106
+ }), E.map((e) => O(e))]
106
107
  }),
107
- /* @__PURE__ */ l("div", {
108
+ /* @__PURE__ */ u("div", {
108
109
  className: "p-2 space-y-1",
109
- children: [h && /* @__PURE__ */ l("button", {
110
+ children: [g && /* @__PURE__ */ u("button", {
110
111
  type: "button",
111
112
  onClick: () => {
112
- h(), b(!1);
113
+ g(), S(!1);
113
114
  },
114
115
  className: "w-full flex items-center gap-3 px-3 py-2 rounded-button text-text-primary hover:bg-bg-sunken transition-colors",
115
- children: [/* @__PURE__ */ c("svg", {
116
+ children: [/* @__PURE__ */ l("svg", {
116
117
  className: "size-5",
117
118
  fill: "none",
118
119
  stroke: "currentColor",
119
120
  viewBox: "0 0 24 24",
120
- children: /* @__PURE__ */ c("path", {
121
+ children: /* @__PURE__ */ l("path", {
121
122
  strokeLinecap: "round",
122
123
  strokeLinejoin: "round",
123
124
  strokeWidth: 2,
124
125
  d: "M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z"
125
126
  })
126
- }), /* @__PURE__ */ c("span", {
127
+ }), /* @__PURE__ */ l("span", {
127
128
  className: "text-sm font-medium",
128
- children: "Add Another Account"
129
+ children: b("userMenu.addAnotherAccount", "Add Another Account")
129
130
  })]
130
- }), _ && f.length > 0 && /* @__PURE__ */ l("button", {
131
+ }), v && p.length > 0 && /* @__PURE__ */ u("button", {
131
132
  type: "button",
132
133
  onClick: () => {
133
- _(), b(!1);
134
+ v(), S(!1);
134
135
  },
135
136
  className: "w-full flex items-center gap-3 px-3 py-2 rounded-button text-status-error-text hover:bg-status-error-bg-subtle transition-colors",
136
- children: [/* @__PURE__ */ c("svg", {
137
+ children: [/* @__PURE__ */ l("svg", {
137
138
  className: "size-5",
138
139
  fill: "none",
139
140
  stroke: "currentColor",
140
141
  viewBox: "0 0 24 24",
141
- children: /* @__PURE__ */ c("path", {
142
+ children: /* @__PURE__ */ l("path", {
142
143
  strokeLinecap: "round",
143
144
  strokeLinejoin: "round",
144
145
  strokeWidth: 2,
145
146
  d: "M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"
146
147
  })
147
- }), /* @__PURE__ */ c("span", {
148
+ }), /* @__PURE__ */ l("span", {
148
149
  className: "text-sm font-medium",
149
- children: "Sign Out All Accounts"
150
+ children: b("userMenu.signOutAllAccounts", "Sign Out All Accounts")
150
151
  })]
151
152
  })]
152
153
  })
153
- ] }), O = /* @__PURE__ */ l("button", {
154
- onClick: () => b(!y),
155
- className: `flex items-center gap-2 p-2 rounded-button hover:bg-bg-sunken transition-colors ${y ? "bg-bg-sunken" : ""}`,
156
- "aria-label": "Account switcher",
157
- "aria-expanded": y,
154
+ ] }), A = /* @__PURE__ */ u("button", {
155
+ onClick: () => S(!x),
156
+ className: `flex items-center gap-2 p-2 rounded-button hover:bg-bg-sunken transition-colors ${x ? "bg-bg-sunken" : ""}`,
157
+ "aria-label": b("userMenu.accountSwitcher", "Account switcher"),
158
+ "aria-expanded": x,
158
159
  children: [
159
- C && /* @__PURE__ */ c("div", {
160
+ T && /* @__PURE__ */ l("div", {
160
161
  className: "size-8 rounded-full bg-action-primary-bg flex items-center justify-center",
161
- children: C.avatar ? /* @__PURE__ */ c("img", {
162
- src: C.avatar,
163
- alt: C.name,
162
+ children: T.avatar ? /* @__PURE__ */ l("img", {
163
+ src: T.avatar,
164
+ alt: T.name,
164
165
  className: "w-full h-full rounded-full object-cover"
165
- }) : /* @__PURE__ */ c("span", {
166
+ }) : /* @__PURE__ */ l("span", {
166
167
  className: "text-action-primary-text font-semibold text-sm",
167
- children: d(C.name, C.firstName, C.lastName)
168
+ children: f(T.name, T.firstName, T.lastName)
168
169
  })
169
170
  }),
170
- !v && C && /* @__PURE__ */ c("span", {
171
+ !y && T && /* @__PURE__ */ l("span", {
171
172
  className: "hidden sm:block text-body-sm font-medium text-text-primary max-w-[120px] truncate",
172
- children: C.name
173
+ children: T.name
173
174
  }),
174
- f.length > 1 && /* @__PURE__ */ l("div", {
175
+ p.length > 1 && /* @__PURE__ */ u("div", {
175
176
  className: "relative",
176
- children: [/* @__PURE__ */ c("svg", {
177
- className: `w-4 h-4 text-text-secondary transition-transform ${y ? "rotate-180" : ""}`,
177
+ children: [/* @__PURE__ */ l("svg", {
178
+ className: `w-4 h-4 text-text-secondary transition-transform ${x ? "rotate-180" : ""}`,
178
179
  fill: "none",
179
180
  stroke: "currentColor",
180
181
  viewBox: "0 0 24 24",
181
- children: /* @__PURE__ */ c("path", {
182
+ children: /* @__PURE__ */ l("path", {
182
183
  strokeLinecap: "round",
183
184
  strokeLinejoin: "round",
184
185
  strokeWidth: 2,
185
186
  d: "M19 9l-7 7-7-7"
186
187
  })
187
- }), /* @__PURE__ */ c("span", {
188
+ }), /* @__PURE__ */ l("span", {
188
189
  className: "absolute -top-1 -right-1 size-3 text-[10px] bg-action-primary-bg text-action-primary-text rounded-full flex items-center justify-center font-bold",
189
- children: f.length
190
+ children: p.length
190
191
  })]
191
192
  })
192
193
  ]
193
194
  });
194
- return x ? /* @__PURE__ */ l("div", {
195
+ return C ? /* @__PURE__ */ u("div", {
195
196
  className: "relative",
196
- children: [O, /* @__PURE__ */ c(e, {
197
- open: y,
198
- onOpenChange: b,
199
- children: /* @__PURE__ */ l(t, {
197
+ children: [A, /* @__PURE__ */ l(e, {
198
+ open: x,
199
+ onOpenChange: S,
200
+ children: /* @__PURE__ */ u(t, {
200
201
  side: "bottom",
201
202
  className: "h-auto max-h-[70vh] flex flex-col p-0",
202
- children: [/* @__PURE__ */ c(n, {
203
+ children: [/* @__PURE__ */ l(n, {
203
204
  className: "px-4 pt-4 pb-2 border-b border-border-subtle",
204
- children: /* @__PURE__ */ c(r, {
205
+ children: /* @__PURE__ */ l(r, {
205
206
  className: "text-text-primary",
206
- children: "Accounts"
207
+ children: b("userMenu.accounts", "Accounts")
207
208
  })
208
- }), /* @__PURE__ */ c("div", {
209
+ }), /* @__PURE__ */ l("div", {
209
210
  className: "flex-1 overflow-y-auto",
210
- children: D()
211
+ children: k()
211
212
  })]
212
213
  })
213
214
  })]
214
- }) : /* @__PURE__ */ l("div", {
215
+ }) : /* @__PURE__ */ u("div", {
215
216
  className: "relative",
216
- ref: S,
217
- children: [O, y && /* @__PURE__ */ c("div", {
217
+ ref: w,
218
+ children: [A, x && /* @__PURE__ */ l("div", {
218
219
  className: "absolute right-0 mt-2 w-80 bg-bg-elevated border border-border-subtle rounded-card shadow-[var(--shadow-elevation-4)] z-50 overflow-hidden animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-200",
219
- children: D()
220
+ children: k()
220
221
  })]
221
222
  });
222
223
  };
223
224
  //#endregion
224
- export { f as AccountSwitcher };
225
+ export { p as AccountSwitcher };
@@ -28,7 +28,7 @@ var c = /* @__PURE__ */ o(i, {
28
28
  type: "button",
29
29
  onClick: p,
30
30
  className: e(l, "p-1.5"),
31
- "aria-label": "Home",
31
+ "aria-label": g("nav.home", "Home"),
32
32
  children: /* @__PURE__ */ o(a, { className: "size-3.5" })
33
33
  })
34
34
  }), _.map((t, r) => {
@@ -1,10 +1,11 @@
1
- import { cn as e } from "../utils/cn.js";
1
+ import { useShellLabel as e } from "../shared/providers/shell/useShellLabel.js";
2
+ import { cn as t } from "../utils/cn.js";
2
3
  import "../utils/index.js";
3
- import { useCallback as t, useEffect as n, useMemo as r, useState as i } from "react";
4
- import { Search as a, X as o } from "lucide-react";
5
- import { jsx as s, jsxs as c } from "react/jsx-runtime";
4
+ import { useCallback as n, useEffect as r, useMemo as i, useState as a } from "react";
5
+ import { Search as o, X as s } from "lucide-react";
6
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
6
7
  //#region src/chrome/CommandPalette.tsx
7
- function l(e) {
8
+ function u(e) {
8
9
  let t = e.toLowerCase().split("+").map((e) => e.trim()), n = t.length - 1;
9
10
  return {
10
11
  mod: t.includes("mod"),
@@ -15,52 +16,52 @@ function l(e) {
15
16
  key: t[n] || ""
16
17
  };
17
18
  }
18
- function u(e, t) {
19
- let n = l(t);
19
+ function d(e, t) {
20
+ let n = u(t);
20
21
  return n.mod && !(e.metaKey || e.ctrlKey) || n.ctrl && !e.ctrlKey || n.alt && !e.altKey || n.shift && !e.shiftKey || n.meta && !e.metaKey || !e.key ? !1 : e.key.toLowerCase() === n.key;
21
22
  }
22
- function d({ actions: l, shortcuts: d = [], placeholder: f = "Type a command or search...", className: p }) {
23
- let [m, h] = i(!1), [g, _] = i(""), [v, y] = i(0), b = r(() => l.filter((e) => !e.hidden), [l]), x = t(async (e) => {
23
+ function f({ actions: u, shortcuts: f = [], placeholder: p, className: m }) {
24
+ let h = e(), [g, _] = a(!1), [v, y] = a(""), [b, x] = a(0), S = i(() => u.filter((e) => !e.hidden), [u]), C = n(async (e) => {
24
25
  try {
25
- await e.action(), h(!1);
26
+ await e.action(), _(!1);
26
27
  } catch (e) {
27
28
  console.error("Failed to execute command:", e);
28
29
  }
29
- }, []), S = r(() => {
30
- if (!g.trim()) return b;
31
- let e = g.toLowerCase();
32
- return b.filter((t) => {
30
+ }, []), w = i(() => {
31
+ if (!v.trim()) return S;
32
+ let e = v.toLowerCase();
33
+ return S.filter((t) => {
33
34
  let n = t.label.toLowerCase().includes(e), r = t.keywords?.some((t) => t.toLowerCase().includes(e)), i = t.description?.toLowerCase().includes(e);
34
35
  return n || r || i;
35
36
  });
36
- }, [b, g]);
37
- n(() => {
38
- m || (_(""), y(0));
39
- }, [m]), n(() => {
37
+ }, [S, v]);
38
+ r(() => {
39
+ g || (y(""), x(0));
40
+ }, [g]), r(() => {
40
41
  let e = (e) => {
41
42
  if ((e.metaKey || e.ctrlKey) && e.key === "k") {
42
- e.preventDefault(), h((e) => !e);
43
+ e.preventDefault(), _((e) => !e);
43
44
  return;
44
45
  }
45
- if (m) {
46
- if (e.key === "Escape") e.preventDefault(), h(!1);
47
- else if (e.key === "ArrowDown") e.preventDefault(), y((e) => e < S.length - 1 ? e + 1 : e);
48
- else if (e.key === "ArrowUp") e.preventDefault(), y((e) => e > 0 ? e - 1 : e);
46
+ if (g) {
47
+ if (e.key === "Escape") e.preventDefault(), _(!1);
48
+ else if (e.key === "ArrowDown") e.preventDefault(), x((e) => e < w.length - 1 ? e + 1 : e);
49
+ else if (e.key === "ArrowUp") e.preventDefault(), x((e) => e > 0 ? e - 1 : e);
49
50
  else if (e.key === "Enter") {
50
51
  e.preventDefault();
51
- let t = S[v];
52
- t && x(t);
52
+ let t = w[b];
53
+ t && C(t);
53
54
  }
54
55
  return;
55
56
  }
56
- for (let t of d) if (u(e, t.keys)) {
57
+ for (let t of f) if (d(e, t.keys)) {
57
58
  e.preventDefault();
58
- let n = b.find((e) => e.id === t.actionId);
59
- n && x(n);
59
+ let n = S.find((e) => e.id === t.actionId);
60
+ n && C(n);
60
61
  return;
61
62
  }
62
- for (let t of b) if (t.shortcut && u(e, t.shortcut)) {
63
- e.preventDefault(), x(t);
63
+ for (let t of S) if (t.shortcut && d(e, t.shortcut)) {
64
+ e.preventDefault(), C(t);
64
65
  return;
65
66
  }
66
67
  };
@@ -68,117 +69,117 @@ function d({ actions: l, shortcuts: d = [], placeholder: f = "Type a command or
68
69
  document.removeEventListener("keydown", e);
69
70
  };
70
71
  }, [
71
- x,
72
- S,
73
- m,
74
- v,
75
- d,
76
- b
72
+ C,
73
+ w,
74
+ g,
75
+ b,
76
+ f,
77
+ S
77
78
  ]);
78
- let C = r(() => S.reduce((e, t) => {
79
+ let T = i(() => w.reduce((e, t) => {
79
80
  let n = t.section || "Actions";
80
81
  return e[n] || (e[n] = []), e[n].push(t), e;
81
- }, {}), [S]);
82
- if (n(() => {
83
- y(0);
84
- }, [S]), !m) return null;
85
- let w = 0;
86
- return /* @__PURE__ */ s("div", {
87
- className: e("fixed inset-0 z-[9999] flex items-center justify-center bg-bg-overlay backdrop-blur-md", "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", p),
88
- onClick: () => h(!1),
89
- "data-state": m ? "open" : "closed",
82
+ }, {}), [w]);
83
+ if (r(() => {
84
+ x(0);
85
+ }, [w]), !g) return null;
86
+ let E = 0;
87
+ return /* @__PURE__ */ c("div", {
88
+ className: t("fixed inset-0 z-[9999] flex items-center justify-center bg-bg-overlay backdrop-blur-md", "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", m),
89
+ onClick: () => _(!1),
90
+ "data-state": g ? "open" : "closed",
90
91
  role: "dialog",
91
92
  "aria-modal": "true",
92
- children: /* @__PURE__ */ s("div", {
93
+ children: /* @__PURE__ */ c("div", {
93
94
  className: "w-full max-w-lg mx-4 max-h-[85dvh] overflow-hidden",
94
95
  onClick: (e) => e.stopPropagation(),
95
- children: /* @__PURE__ */ c("div", {
96
+ children: /* @__PURE__ */ l("div", {
96
97
  className: "overflow-hidden rounded-2xl border border-border-subtle bg-bg-elevated shadow-[var(--shadow-elevation-5)]",
97
98
  children: [
98
- /* @__PURE__ */ c("div", {
99
+ /* @__PURE__ */ l("div", {
99
100
  className: "flex items-center border-b border-border-subtle px-4",
100
101
  children: [
101
- /* @__PURE__ */ s(a, { className: "size-4 mr-2 flex-shrink-0 text-text-muted" }),
102
- /* @__PURE__ */ s("input", {
102
+ /* @__PURE__ */ c(o, { className: "size-4 mr-2 flex-shrink-0 text-text-muted" }),
103
+ /* @__PURE__ */ c("input", {
103
104
  type: "text",
104
- placeholder: f,
105
- value: g,
106
- onChange: (e) => _(e.target.value),
105
+ placeholder: p ?? h("search.commandPlaceholder", "Type a command or search..."),
106
+ value: v,
107
+ onChange: (e) => y(e.target.value),
107
108
  className: "flex-1 bg-transparent py-3.5 text-sm text-text-primary outline-none placeholder:text-text-placeholder",
108
109
  autoFocus: !0
109
110
  }),
110
- g && /* @__PURE__ */ s("button", {
111
+ v && /* @__PURE__ */ c("button", {
111
112
  type: "button",
112
- onClick: () => _(""),
113
+ onClick: () => y(""),
113
114
  className: "ml-2 rounded-button p-1 text-text-muted hover:bg-bg-sunken hover:text-text-primary transition-colors",
114
- "aria-label": "Clear search",
115
- children: /* @__PURE__ */ s(o, { className: "size-4" })
115
+ "aria-label": h("common.clearSearch", "Clear search"),
116
+ children: /* @__PURE__ */ c(s, { className: "size-4" })
116
117
  })
117
118
  ]
118
119
  }),
119
- /* @__PURE__ */ c("div", {
120
+ /* @__PURE__ */ l("div", {
120
121
  className: "max-h-96 overflow-y-auto p-2",
121
- children: [S.length === 0 && /* @__PURE__ */ s("div", {
122
+ children: [w.length === 0 && /* @__PURE__ */ c("div", {
122
123
  className: "py-6 text-center text-sm text-text-muted",
123
- children: "No commands found."
124
- }), Object.entries(C).map(([t, n]) => /* @__PURE__ */ c("div", {
124
+ children: h("search.noCommandsFound", "No commands found.")
125
+ }), Object.entries(T).map(([e, n]) => /* @__PURE__ */ l("div", {
125
126
  className: "mb-2 last:mb-0",
126
- children: [/* @__PURE__ */ s("div", {
127
+ children: [/* @__PURE__ */ c("div", {
127
128
  className: "px-2 py-1.5 text-[11px] font-medium uppercase tracking-wider text-text-muted",
128
- children: t
129
- }), n.map((t) => {
130
- let n = t.icon, r = w;
131
- return w++, /* @__PURE__ */ c("button", {
129
+ children: e
130
+ }), n.map((e) => {
131
+ let n = e.icon, r = E;
132
+ return E++, /* @__PURE__ */ l("button", {
132
133
  type: "button",
133
- onClick: () => void x(t),
134
- className: e("w-full flex items-start gap-3 px-2.5 py-2 text-sm rounded-button transition-colors text-left", r === v ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
134
+ onClick: () => void C(e),
135
+ className: t("w-full flex items-start gap-3 px-2.5 py-2 text-sm rounded-button transition-colors text-left", r === b ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
135
136
  children: [
136
- n && /* @__PURE__ */ s(n, { className: "size-4 mt-0.5 flex-shrink-0" }),
137
- /* @__PURE__ */ c("div", {
137
+ n && /* @__PURE__ */ c(n, { className: "size-4 mt-0.5 flex-shrink-0" }),
138
+ /* @__PURE__ */ l("div", {
138
139
  className: "flex-1 min-w-0",
139
- children: [/* @__PURE__ */ s("div", {
140
+ children: [/* @__PURE__ */ c("div", {
140
141
  className: "font-medium text-text-primary",
141
- children: t.label
142
- }), t.description && /* @__PURE__ */ s("div", {
142
+ children: e.label
143
+ }), e.description && /* @__PURE__ */ c("div", {
143
144
  className: "text-xs text-text-muted",
144
- children: t.description
145
+ children: e.description
145
146
  })]
146
147
  }),
147
- t.shortcut && /* @__PURE__ */ s("kbd", {
148
+ e.shortcut && /* @__PURE__ */ c("kbd", {
148
149
  className: "ml-auto pointer-events-none inline-flex h-5 select-none items-center gap-1 rounded border border-border-subtle bg-bg-sunken px-1.5 font-mono text-[10px] font-medium text-text-secondary",
149
- children: t.shortcut
150
+ children: e.shortcut
150
151
  })
151
152
  ]
152
- }, t.id);
153
+ }, e.id);
153
154
  })]
154
- }, t))]
155
+ }, e))]
155
156
  }),
156
- /* @__PURE__ */ c("div", {
157
+ /* @__PURE__ */ l("div", {
157
158
  className: "border-t border-border-subtle px-3 py-2 text-xs text-text-muted flex items-center justify-between",
158
159
  children: [
159
- /* @__PURE__ */ c("div", { children: [
160
- /* @__PURE__ */ s("kbd", {
160
+ /* @__PURE__ */ l("div", { children: [
161
+ /* @__PURE__ */ c("kbd", {
161
162
  className: "inline-flex h-5 select-none items-center gap-1 rounded border border-border-subtle bg-bg-sunken px-1.5 font-mono text-[10px] text-text-secondary",
162
163
  children: "↑↓"
163
164
  }),
164
165
  " ",
165
- "Navigate"
166
+ h("search.navigate", "Navigate")
166
167
  ] }),
167
- /* @__PURE__ */ c("div", { children: [
168
- /* @__PURE__ */ s("kbd", {
168
+ /* @__PURE__ */ l("div", { children: [
169
+ /* @__PURE__ */ c("kbd", {
169
170
  className: "inline-flex h-5 select-none items-center gap-1 rounded border border-border-subtle bg-bg-sunken px-1.5 font-mono text-[10px] text-text-secondary",
170
171
  children: "Enter"
171
172
  }),
172
173
  " ",
173
- "Execute"
174
+ h("search.execute", "Execute")
174
175
  ] }),
175
- /* @__PURE__ */ c("div", { children: [
176
- /* @__PURE__ */ s("kbd", {
176
+ /* @__PURE__ */ l("div", { children: [
177
+ /* @__PURE__ */ c("kbd", {
177
178
  className: "inline-flex h-5 select-none items-center gap-1 rounded border border-border-subtle bg-bg-sunken px-1.5 font-mono text-[10px] text-text-secondary",
178
179
  children: "Esc"
179
180
  }),
180
181
  " ",
181
- "Close"
182
+ h("common.close", "Close")
182
183
  ] })
183
184
  ]
184
185
  })
@@ -188,4 +189,4 @@ function d({ actions: l, shortcuts: d = [], placeholder: f = "Type a command or
188
189
  });
189
190
  }
190
191
  //#endregion
191
- export { d as CommandPalette };
192
+ export { f as CommandPalette };