@burdenoff/fe-libs 2026.1023.5 → 2026.1023.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.
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { KeyboardShortcut as HelpShortcut } from '../shared/keyboard/types';
2
3
  /**
3
4
  * Represents a single command action
4
5
  */
@@ -34,12 +35,34 @@ export interface CommandPaletteProps {
34
35
  readonly placeholder?: string;
35
36
  /** Custom class name */
36
37
  readonly className?: string;
38
+ /**
39
+ * Shortcut that opens and closes the palette. Defaults to
40
+ * `COMMAND_PALETTE_SHORTCUT` (Cmd/Ctrl+Shift+K): Cmd/Ctrl+K belongs to
41
+ * Global Search in every shell, so the palette cannot share it.
42
+ */
43
+ readonly toggleShortcut?: string;
37
44
  }
45
+ /**
46
+ * The palette's default open/close shortcut: Cmd+Shift+K on macOS,
47
+ * Ctrl+Shift+K elsewhere. Cmd/Ctrl+K is Global Search's.
48
+ */
49
+ export declare const COMMAND_PALETTE_SHORTCUT = "mod+shift+k";
50
+ /**
51
+ * The palette shortcut as a keyboard-help entry, for a shell's DISPLAY-ONLY
52
+ * shortcut list (the palette registers the key itself; do not pass this to
53
+ * `useKeyboardShortcuts`, its action does nothing).
54
+ */
55
+ export declare const COMMAND_PALETTE_HELP_SHORTCUT: HelpShortcut;
56
+ /**
57
+ * Check if a keyboard event matches a shortcut (exported for tests).
58
+ */
59
+ export declare function matchShortcut(event: KeyboardEvent, keys: string): boolean;
38
60
  /**
39
61
  * CommandPalette Component
40
62
  *
41
63
  * Provides a keyboard-accessible command palette with:
42
- * - Global keyboard shortcuts (Cmd+K / Ctrl+K)
64
+ * - Its own open/close shortcut (Cmd/Ctrl+Shift+K by default; Cmd/Ctrl+K is
65
+ * Global Search)
43
66
  * - Action-specific shortcuts
44
67
  * - Fuzzy search across commands
45
68
  * - Grouped command sections
@@ -60,4 +83,4 @@ export interface CommandPaletteProps {
60
83
  * <CommandPalette actions={actions} />
61
84
  * ```
62
85
  */
63
- export declare function CommandPalette({ actions, shortcuts, placeholder, className, }: CommandPaletteProps): ReactNode;
86
+ export declare function CommandPalette({ actions, shortcuts, placeholder, className, toggleShortcut, }: CommandPaletteProps): ReactNode;
@@ -5,7 +5,19 @@ import { useCallback as n, useEffect as r, useMemo as i, useState as a } from "r
5
5
  import { Search as o, X as s } from "lucide-react";
6
6
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
7
7
  //#region src/chrome/CommandPalette.tsx
8
- function u(e) {
8
+ var u = "mod+shift+k", d = {
9
+ id: "command-palette",
10
+ keys: {
11
+ mac: ["cmd+shift+k"],
12
+ windows: ["ctrl+shift+k"],
13
+ linux: ["ctrl+shift+k"]
14
+ },
15
+ description: "Open Command Palette",
16
+ category: "Search",
17
+ action: () => void 0,
18
+ global: !0
19
+ };
20
+ function f(e) {
9
21
  let t = e.toLowerCase().split("+").map((e) => e.trim()), n = t.length - 1;
10
22
  return {
11
23
  mod: t.includes("mod"),
@@ -16,52 +28,52 @@ function u(e) {
16
28
  key: t[n] || ""
17
29
  };
18
30
  }
19
- function d(e, t) {
20
- let n = u(t);
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;
31
+ function p(e, t) {
32
+ let n = f(t);
33
+ 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;
22
34
  }
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) => {
35
+ function m({ actions: d, shortcuts: f = [], placeholder: m, className: h, toggleShortcut: g = u }) {
36
+ let _ = e(), [v, y] = a(!1), [b, x] = a(""), [S, C] = a(0), w = i(() => d.filter((e) => !e.hidden), [d]), T = n(async (e) => {
25
37
  try {
26
- await e.action(), _(!1);
38
+ await e.action(), y(!1);
27
39
  } catch (e) {
28
40
  console.error("Failed to execute command:", e);
29
41
  }
30
- }, []), w = i(() => {
31
- if (!v.trim()) return S;
32
- let e = v.toLowerCase();
33
- return S.filter((t) => {
42
+ }, []), E = i(() => {
43
+ if (!b.trim()) return w;
44
+ let e = b.toLowerCase();
45
+ return w.filter((t) => {
34
46
  let n = t.label.toLowerCase().includes(e), r = t.keywords?.some((t) => t.toLowerCase().includes(e)), i = t.description?.toLowerCase().includes(e);
35
47
  return n || r || i;
36
48
  });
37
- }, [S, v]);
49
+ }, [w, b]);
38
50
  r(() => {
39
- g || (y(""), x(0));
40
- }, [g]), r(() => {
51
+ v || (x(""), C(0));
52
+ }, [v]), r(() => {
41
53
  let e = (e) => {
42
- if ((e.metaKey || e.ctrlKey) && e.key === "k") {
43
- e.preventDefault(), _((e) => !e);
54
+ if (p(e, g)) {
55
+ e.preventDefault(), y((e) => !e);
44
56
  return;
45
57
  }
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);
58
+ if (v) {
59
+ if (e.key === "Escape") e.preventDefault(), y(!1);
60
+ else if (e.key === "ArrowDown") e.preventDefault(), C((e) => e < E.length - 1 ? e + 1 : e);
61
+ else if (e.key === "ArrowUp") e.preventDefault(), C((e) => e > 0 ? e - 1 : e);
50
62
  else if (e.key === "Enter") {
51
63
  e.preventDefault();
52
- let t = w[b];
53
- t && C(t);
64
+ let t = E[S];
65
+ t && T(t);
54
66
  }
55
67
  return;
56
68
  }
57
- for (let t of f) if (d(e, t.keys)) {
69
+ for (let t of f) if (p(e, t.keys)) {
58
70
  e.preventDefault();
59
- let n = S.find((e) => e.id === t.actionId);
60
- n && C(n);
71
+ let n = w.find((e) => e.id === t.actionId);
72
+ n && T(n);
61
73
  return;
62
74
  }
63
- for (let t of S) if (t.shortcut && d(e, t.shortcut)) {
64
- e.preventDefault(), C(t);
75
+ for (let t of w) if (t.shortcut && p(e, t.shortcut)) {
76
+ e.preventDefault(), T(t);
65
77
  return;
66
78
  }
67
79
  };
@@ -69,25 +81,26 @@ function f({ actions: u, shortcuts: f = [], placeholder: p, className: m }) {
69
81
  document.removeEventListener("keydown", e);
70
82
  };
71
83
  }, [
72
- C,
73
- w,
74
- g,
75
- b,
84
+ T,
85
+ E,
86
+ v,
87
+ S,
76
88
  f,
77
- S
89
+ g,
90
+ w
78
91
  ]);
79
- let T = i(() => w.reduce((e, t) => {
92
+ let D = i(() => E.reduce((e, t) => {
80
93
  let n = t.section || "Actions";
81
94
  return e[n] || (e[n] = []), e[n].push(t), e;
82
- }, {}), [w]);
95
+ }, {}), [E]);
83
96
  if (r(() => {
84
- x(0);
85
- }, [w]), !g) return null;
86
- let E = 0;
97
+ C(0);
98
+ }, [E]), !v) return null;
99
+ let O = 0;
87
100
  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",
101
+ 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", h),
102
+ onClick: () => y(!1),
103
+ "data-state": v ? "open" : "closed",
91
104
  role: "dialog",
92
105
  "aria-modal": "true",
93
106
  children: /* @__PURE__ */ c("div", {
@@ -102,37 +115,37 @@ function f({ actions: u, shortcuts: f = [], placeholder: p, className: m }) {
102
115
  /* @__PURE__ */ c(o, { className: "size-4 mr-2 flex-shrink-0 text-text-muted" }),
103
116
  /* @__PURE__ */ c("input", {
104
117
  type: "text",
105
- placeholder: p ?? h("search.commandPlaceholder", "Type a command or search..."),
106
- value: v,
107
- onChange: (e) => y(e.target.value),
118
+ placeholder: m ?? _("search.commandPlaceholder", "Type a command or search..."),
119
+ value: b,
120
+ onChange: (e) => x(e.target.value),
108
121
  className: "flex-1 bg-transparent py-3.5 text-sm text-text-primary outline-none placeholder:text-text-placeholder",
109
122
  autoFocus: !0
110
123
  }),
111
- v && /* @__PURE__ */ c("button", {
124
+ b && /* @__PURE__ */ c("button", {
112
125
  type: "button",
113
- onClick: () => y(""),
126
+ onClick: () => x(""),
114
127
  className: "ml-2 rounded-button p-1 text-text-muted hover:bg-bg-sunken hover:text-text-primary transition-colors",
115
- "aria-label": h("common.clearSearch", "Clear search"),
128
+ "aria-label": _("common.clearSearch", "Clear search"),
116
129
  children: /* @__PURE__ */ c(s, { className: "size-4" })
117
130
  })
118
131
  ]
119
132
  }),
120
133
  /* @__PURE__ */ l("div", {
121
134
  className: "max-h-96 overflow-y-auto p-2",
122
- children: [w.length === 0 && /* @__PURE__ */ c("div", {
135
+ children: [E.length === 0 && /* @__PURE__ */ c("div", {
123
136
  className: "py-6 text-center text-sm text-text-muted",
124
- children: h("search.noCommandsFound", "No commands found.")
125
- }), Object.entries(T).map(([e, n]) => /* @__PURE__ */ l("div", {
137
+ children: _("search.noCommandsFound", "No commands found.")
138
+ }), Object.entries(D).map(([e, n]) => /* @__PURE__ */ l("div", {
126
139
  className: "mb-2 last:mb-0",
127
140
  children: [/* @__PURE__ */ c("div", {
128
141
  className: "px-2 py-1.5 text-[11px] font-medium uppercase tracking-wider text-text-muted",
129
142
  children: e
130
143
  }), n.map((e) => {
131
- let n = e.icon, r = E;
132
- return E++, /* @__PURE__ */ l("button", {
144
+ let n = e.icon, r = O;
145
+ return O++, /* @__PURE__ */ l("button", {
133
146
  type: "button",
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"),
147
+ onClick: () => void T(e),
148
+ className: t("w-full flex items-start gap-3 px-2.5 py-2 text-sm rounded-button transition-colors text-left", r === S ? "bg-[var(--color-accent-soft)] text-text-primary" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
136
149
  children: [
137
150
  n && /* @__PURE__ */ c(n, { className: "size-4 mt-0.5 flex-shrink-0" }),
138
151
  /* @__PURE__ */ l("div", {
@@ -163,7 +176,7 @@ function f({ actions: u, shortcuts: f = [], placeholder: p, className: m }) {
163
176
  children: "↑↓"
164
177
  }),
165
178
  " ",
166
- h("search.navigate", "Navigate")
179
+ _("search.navigate", "Navigate")
167
180
  ] }),
168
181
  /* @__PURE__ */ l("div", { children: [
169
182
  /* @__PURE__ */ c("kbd", {
@@ -171,7 +184,7 @@ function f({ actions: u, shortcuts: f = [], placeholder: p, className: m }) {
171
184
  children: "Enter"
172
185
  }),
173
186
  " ",
174
- h("search.execute", "Execute")
187
+ _("search.execute", "Execute")
175
188
  ] }),
176
189
  /* @__PURE__ */ l("div", { children: [
177
190
  /* @__PURE__ */ c("kbd", {
@@ -179,7 +192,7 @@ function f({ actions: u, shortcuts: f = [], placeholder: p, className: m }) {
179
192
  children: "Esc"
180
193
  }),
181
194
  " ",
182
- h("common.close", "Close")
195
+ _("common.close", "Close")
183
196
  ] })
184
197
  ]
185
198
  })
@@ -189,4 +202,4 @@ function f({ actions: u, shortcuts: f = [], placeholder: p, className: m }) {
189
202
  });
190
203
  }
191
204
  //#endregion
192
- export { f as CommandPalette };
205
+ export { d as COMMAND_PALETTE_HELP_SHORTCUT, u as COMMAND_PALETTE_SHORTCUT, m as CommandPalette };
@@ -5,106 +5,107 @@ import { useGlobalUiOrNull as n } from "../shared/providers/shell/GlobalUiProvid
5
5
  import { useAssistantControl as r } from "../shared/assistant/appControls/useAssistantControl.js";
6
6
  import { EscapeLayer as i } from "../shared/components/EscapeLayer.js";
7
7
  import { SHELL_OVERLAY_LAYER_CLASS as a } from "./shellOverlayLayer.js";
8
- import { debounce as o, isSearchResults as s } from "./globalSearch/utils.js";
9
- import { SearchInput as c } from "./globalSearch/SearchInput.js";
10
- import { CategoryTabs as l } from "./globalSearch/CategoryTabs.js";
11
- import { SearchModeBar as u } from "./globalSearch/SearchModeBar.js";
12
- import { AdvancedFiltersPanel as d } from "./globalSearch/AdvancedFiltersPanel.js";
13
- import { ResultsList as f } from "./globalSearch/ResultsList.js";
14
- import { useAdvancedFilters as p } from "./globalSearch/useAdvancedFilters.js";
15
- import { useCallback as m, useEffect as h, useMemo as g, useState as _ } from "react";
16
- import { ExternalLink as v } from "lucide-react";
17
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
8
+ import { GlobalSearchError as o } from "../shared/hooks/shell/globalSearchError.js";
9
+ import { debounce as s, isSearchResults as c } from "./globalSearch/utils.js";
10
+ import { SearchInput as l } from "./globalSearch/SearchInput.js";
11
+ import { CategoryTabs as u } from "./globalSearch/CategoryTabs.js";
12
+ import { SearchModeBar as d } from "./globalSearch/SearchModeBar.js";
13
+ import { AdvancedFiltersPanel as f } from "./globalSearch/AdvancedFiltersPanel.js";
14
+ import { ResultsList as p } from "./globalSearch/ResultsList.js";
15
+ import { useAdvancedFilters as m } from "./globalSearch/useAdvancedFilters.js";
16
+ import { useCallback as h, useEffect as g, useMemo as _, useState as v } from "react";
17
+ import { ExternalLink as y } from "lucide-react";
18
+ import { jsx as b, jsxs as x } from "react/jsx-runtime";
18
19
  //#region src/chrome/GlobalSearch.tsx
19
- function x({ open: x, onClose: S, categories: C = [], placeholder: w, recentSearches: T = [], onSearch: E, onSelect: D, onViewAllResults: O, className: k }) {
20
- let A = e(), [j, M] = _(""), [N, P] = _(void 0), [F, I] = _([]), [L, R] = _(!1), [z, B] = _(null), [V, H] = _(!1), U = p(), { buildFilters: W, reset: G, searchMode: K, setSearchMode: q } = U, J = n()?.openGlobalSearch, [Y, X] = _(null);
21
- r("header.search", g(() => J ? { run: ({ query: e }) => (X(e === null ? null : { query: e }), J(), { status: "done" }) } : null, [J])), h(() => {
22
- !x || !Y || (M(Y.query), X(null));
23
- }, [x, Y]), h(() => {
24
- x || (M(""), P(void 0), I([]), B(null), H(!1), G());
25
- }, [x, G]);
26
- let Z = g(() => o(async (e, t, n) => {
20
+ function S({ open: S, onClose: C, categories: w = [], placeholder: T, recentSearches: E = [], onSearch: D, onSelect: O, onViewAllResults: k, className: A }) {
21
+ let j = e(), [M, N] = v(""), [P, F] = v(void 0), [I, L] = v([]), [R, z] = v(!1), [B, V] = v(null), [H, U] = v(!1), W = m(), { buildFilters: G, reset: K, searchMode: q, setSearchMode: J } = W, Y = n()?.openGlobalSearch, [X, Z] = v(null);
22
+ r("header.search", _(() => Y ? { run: ({ query: e }) => (Z(e === null ? null : { query: e }), Y(), { status: "done" }) } : null, [Y])), g(() => {
23
+ !S || !X || (N(X.query), Z(null));
24
+ }, [S, X]), g(() => {
25
+ S || (N(""), F(void 0), L([]), V(null), U(!1), K());
26
+ }, [S, K]);
27
+ let Q = _(() => s(async (e, t, n) => {
27
28
  if (!e.trim()) {
28
- I([]), B(null);
29
+ L([]), V(null);
29
30
  return;
30
31
  }
31
- R(!0), B(null);
32
+ z(!0), V(null);
32
33
  try {
33
- let r = await E(e, t, n);
34
- if (!s(r)) throw TypeError(A("search.invalidResults", "Invalid search results format"));
35
- I(r);
34
+ let r = await D(e, t, n);
35
+ if (!c(r)) throw TypeError(j("search.invalidResults", "Invalid search results format"));
36
+ L(r);
36
37
  } catch (e) {
37
- B(e instanceof Error ? e.message : A("search.failed", "Search failed")), I([]), console.error("Search error:", e);
38
+ V(e instanceof o ? e.reason === "NO_WORKSPACE_CONTEXT" ? j("search.noWorkspace", "Select a workspace to search it.") : j("search.unavailable", "Search is unavailable right now. Try again in a moment.") : e instanceof Error ? e.message : j("search.failed", "Search failed")), L([]), console.error("Search error:", e);
38
39
  } finally {
39
- R(!1);
40
+ z(!1);
40
41
  }
41
- }, 300), [E, A]);
42
- h(() => {
43
- Z(j, N, W());
42
+ }, 300), [D, j]);
43
+ g(() => {
44
+ Q(M, P, G());
44
45
  }, [
45
- j,
46
- N,
47
- Z,
48
- W
46
+ M,
47
+ P,
48
+ Q,
49
+ G
49
50
  ]);
50
- let Q = g(() => F.reduce((e, t) => {
51
+ let $ = _(() => I.reduce((e, t) => {
51
52
  let n = t.category;
52
53
  return e[n] || (e[n] = []), e[n].push(t), e;
53
- }, {}), [F]), $ = m((e) => {
54
- D(e), S();
55
- }, [D, S]);
56
- return x ? /* @__PURE__ */ y(i, {
54
+ }, {}), [I]), ee = h((e) => {
55
+ O(e), C();
56
+ }, [O, C]);
57
+ return S ? /* @__PURE__ */ b(i, {
57
58
  modal: !0,
58
- onDismiss: S,
59
- children: /* @__PURE__ */ y("div", {
60
- className: t("fixed inset-0 flex items-center justify-center bg-bg-overlay backdrop-blur-md", a, "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", k),
61
- onClick: S,
62
- "data-state": x ? "open" : "closed",
59
+ onDismiss: C,
60
+ children: /* @__PURE__ */ b("div", {
61
+ className: t("fixed inset-0 flex items-center justify-center bg-bg-overlay backdrop-blur-md", a, "data-[state=open]:animate-in data-[state=closed]:animate-out", "data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0", A),
62
+ onClick: C,
63
+ "data-state": S ? "open" : "closed",
63
64
  role: "dialog",
64
65
  "aria-modal": "true",
65
- children: /* @__PURE__ */ y("div", {
66
+ children: /* @__PURE__ */ b("div", {
66
67
  className: "w-full max-w-lg mx-4 max-h-[85dvh] overflow-hidden",
67
68
  onClick: (e) => e.stopPropagation(),
68
- children: /* @__PURE__ */ b("div", {
69
+ children: /* @__PURE__ */ x("div", {
69
70
  className: "overflow-hidden rounded-2xl border border-border-subtle bg-bg-elevated shadow-[var(--shadow-elevation-5)]",
70
71
  children: [
71
- /* @__PURE__ */ y(c, {
72
- value: j,
73
- placeholder: w ?? A("search.globalPlaceholder", "Search everything..."),
74
- onChange: M,
75
- onClear: () => M("")
72
+ /* @__PURE__ */ b(l, {
73
+ value: M,
74
+ placeholder: T ?? j("search.globalPlaceholder", "Search everything..."),
75
+ onChange: N,
76
+ onClear: () => N("")
76
77
  }),
77
- /* @__PURE__ */ y(l, {
78
- categories: C,
79
- selectedCategory: N,
80
- onSelect: P
78
+ /* @__PURE__ */ b(u, {
79
+ categories: w,
80
+ selectedCategory: P,
81
+ onSelect: F
81
82
  }),
82
- /* @__PURE__ */ y(u, {
83
- searchMode: K,
84
- onSearchModeChange: q,
85
- showAdvanced: V,
86
- onToggleAdvanced: () => H((e) => !e)
83
+ /* @__PURE__ */ b(d, {
84
+ searchMode: q,
85
+ onSearchModeChange: J,
86
+ showAdvanced: H,
87
+ onToggleAdvanced: () => U((e) => !e)
87
88
  }),
88
- V && /* @__PURE__ */ y(d, { filters: U }),
89
- /* @__PURE__ */ y(f, {
90
- loading: L,
91
- error: z,
92
- query: j,
93
- results: F,
94
- groupedResults: Q,
95
- recentSearches: T,
96
- onRecentSelect: M,
97
- onResultSelect: $
89
+ H && /* @__PURE__ */ b(f, { filters: W }),
90
+ /* @__PURE__ */ b(p, {
91
+ loading: R,
92
+ error: B,
93
+ query: M,
94
+ results: I,
95
+ groupedResults: $,
96
+ recentSearches: E,
97
+ onRecentSelect: N,
98
+ onResultSelect: ee
98
99
  }),
99
- j && F.length > 0 && O && /* @__PURE__ */ y("div", {
100
+ M && I.length > 0 && k && /* @__PURE__ */ b("div", {
100
101
  className: "border-t border-border-subtle p-2",
101
- children: /* @__PURE__ */ b("button", {
102
+ children: /* @__PURE__ */ x("button", {
102
103
  type: "button",
103
104
  onClick: () => {
104
- O(j, W(), N), S();
105
+ k(M, G(), P), C();
105
106
  },
106
107
  className: "w-full flex items-center justify-center gap-2 py-2 text-sm font-medium text-text-link hover:bg-bg-sunken rounded-button transition-colors",
107
- children: [/* @__PURE__ */ y(v, { className: "size-4" }), A("search.viewAllResults", "View all results")]
108
+ children: [/* @__PURE__ */ b(y, { className: "size-4" }), j("search.viewAllResults", "View all results")]
108
109
  })
109
110
  })
110
111
  ]
@@ -114,4 +115,4 @@ function x({ open: x, onClose: S, categories: C = [], placeholder: w, recentSear
114
115
  }) : null;
115
116
  }
116
117
  //#endregion
117
- export { x as GlobalSearch };
118
+ export { S as GlobalSearch };
@@ -1,83 +1,88 @@
1
1
  import { desktopSetBadgeCount as e } from "../shared/native/desktop.js";
2
- import { useAssistantControl as t } from "../shared/assistant/appControls/useAssistantControl.js";
3
- import { BellButton as n } from "./notificationCenter/BellButton.js";
4
- import { sortNotifications as r } from "./notificationCenter/constants.js";
5
- import { NotificationFilters as i } from "./notificationCenter/NotificationFilters.js";
6
- import { NotificationFooter as a } from "./notificationCenter/NotificationFooter.js";
7
- import { NotificationHeader as o } from "./notificationCenter/NotificationHeader.js";
8
- import { NotificationList as s } from "./notificationCenter/NotificationList.js";
9
- import { NotificationPanel as c } from "./notificationCenter/NotificationPanel.js";
10
- import { useNotificationCenter as l } from "./notificationCenter/useNotificationCenter.js";
11
- import { useOutsideClickClose as u, usePanelChrome as d } from "./notificationCenter/usePanelChrome.js";
12
- import { useCallback as f, useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
13
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
2
+ import { navigateInApp as t } from "../shared/navigation/inAppPath.js";
3
+ import { useAssistantControl as n } from "../shared/assistant/appControls/useAssistantControl.js";
4
+ import { BellButton as r } from "./notificationCenter/BellButton.js";
5
+ import { sortNotifications as i } from "./notificationCenter/constants.js";
6
+ import { NotificationFilters as a } from "./notificationCenter/NotificationFilters.js";
7
+ import { NotificationFooter as o } from "./notificationCenter/NotificationFooter.js";
8
+ import { NotificationHeader as s } from "./notificationCenter/NotificationHeader.js";
9
+ import { NotificationList as c } from "./notificationCenter/NotificationList.js";
10
+ import { NotificationPanel as l } from "./notificationCenter/NotificationPanel.js";
11
+ import { useNotificationCenter as u } from "./notificationCenter/useNotificationCenter.js";
12
+ import { useOutsideClickClose as d, usePanelChrome as f } from "./notificationCenter/usePanelChrome.js";
13
+ import { useCallback as p, useEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
14
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
14
15
  //#region src/chrome/NotificationCenter.tsx
15
- var y = ({ client: y, onViewAll: b, compact: x = !1, pollInterval: S = 3e4, lazy: C = !1 }) => {
16
- let w = h(null), [T, E] = g(!1), [D, O] = g("all"), [k, A] = g("ALL"), [j, M] = g("ALL"), [N, P] = g("newest"), F = f(() => E(!1), []), I = f(() => E((e) => !e), []);
17
- t("header.notifications", m(() => ({ run: () => T ? { status: "already" } : (E(!0), { status: "done" }) }), [T]));
18
- let { isMobile: L } = d();
19
- u(T, L, w, F);
20
- let { notifications: R, unreadCount: z, countsByApp: B, totalCount: V, loading: H, error: U, fetchNotifications: W, handleMarkAsRead: G, handleMarkAllAsRead: K, handleDelete: q } = l({
21
- client: y,
22
- isOpen: T,
23
- lazy: C,
24
- filterTab: D,
25
- typeFilter: k,
26
- appFilter: j
16
+ var b = ({ client: b, onViewAll: x, compact: S = !1, pollInterval: C = 3e4, lazy: w = !1 }) => {
17
+ let T = g(null), [E, D] = _(!1), [O, k] = _("all"), [A, j] = _("ALL"), [M, N] = _("ALL"), [P, F] = _("newest"), I = p(() => D(!1), []), L = p(() => D((e) => !e), []);
18
+ n("header.notifications", h(() => ({ run: () => E ? { status: "already" } : (D(!0), { status: "done" }) }), [E]));
19
+ let { isMobile: R } = f();
20
+ d(E, R, T, I);
21
+ let { notifications: z, unreadCount: B, countsByApp: V, totalCount: H, loading: U, error: W, fetchNotifications: G, handleMarkAsRead: K, handleMarkAllAsRead: q, handleDelete: J } = u({
22
+ client: b,
23
+ isOpen: E,
24
+ lazy: w,
25
+ filterTab: O,
26
+ typeFilter: A,
27
+ appFilter: M
27
28
  });
28
- p(() => {
29
- e(z);
30
- }, [z]);
31
- let J = f((e) => {
29
+ m(() => {
30
+ e(B);
31
+ }, [B]);
32
+ let Y = p((e) => {
33
+ if (t(e)) {
34
+ D(!1);
35
+ return;
36
+ }
32
37
  window.open(e, "_blank", "noopener,noreferrer");
33
- }, []), Y = f(() => {
34
- E(!1), b?.();
35
- }, [b]), X = r(R, N), Z = Object.entries(B).filter(([e]) => e && e !== "null").sort((e, t) => t[1] - e[1]);
36
- return /* @__PURE__ */ v("div", {
37
- ref: w,
38
+ }, []), X = p(() => {
39
+ D(!1), x?.();
40
+ }, [x]), Z = i(z, P), Q = Object.entries(V).filter(([e]) => e && e !== "null").sort((e, t) => t[1] - e[1]);
41
+ return /* @__PURE__ */ y("div", {
42
+ ref: T,
38
43
  className: "relative",
39
- children: [/* @__PURE__ */ _(n, {
40
- unreadCount: z,
41
- isOpen: T,
42
- onToggle: I
43
- }), T && /* @__PURE__ */ _(c, {
44
- isMobile: L,
45
- onClose: F,
46
- children: /* @__PURE__ */ v("div", {
44
+ children: [/* @__PURE__ */ v(r, {
45
+ unreadCount: B,
46
+ isOpen: E,
47
+ onToggle: L
48
+ }), E && /* @__PURE__ */ v(l, {
49
+ isMobile: R,
50
+ onClose: I,
51
+ children: /* @__PURE__ */ y("div", {
47
52
  className: "flex flex-col h-full",
48
53
  children: [
49
- /* @__PURE__ */ _(o, {
50
- isMobile: L,
51
- unreadCount: z,
52
- onClose: F,
53
- onMarkAllAsRead: K
54
+ /* @__PURE__ */ v(s, {
55
+ isMobile: R,
56
+ unreadCount: B,
57
+ onClose: I,
58
+ onMarkAllAsRead: q
54
59
  }),
55
- /* @__PURE__ */ _(i, {
56
- filterTab: D,
57
- typeFilter: k,
58
- appFilter: j,
59
- sortBy: N,
60
- appNames: Z,
61
- onFilterTabChange: O,
62
- onTypeFilterChange: A,
63
- onAppFilterChange: M,
64
- onSortByChange: P
60
+ /* @__PURE__ */ v(a, {
61
+ filterTab: O,
62
+ typeFilter: A,
63
+ appFilter: M,
64
+ sortBy: P,
65
+ appNames: Q,
66
+ onFilterTabChange: k,
67
+ onTypeFilterChange: j,
68
+ onAppFilterChange: N,
69
+ onSortByChange: F
65
70
  }),
66
- /* @__PURE__ */ _(s, {
67
- loading: H,
68
- error: U,
69
- notifications: X,
70
- filterTab: D,
71
- typeFilter: k,
72
- appFilter: j,
73
- onRetry: W,
74
- onMarkAsRead: G,
75
- onDelete: q,
76
- onRedirect: J
71
+ /* @__PURE__ */ v(c, {
72
+ loading: U,
73
+ error: W,
74
+ notifications: Z,
75
+ filterTab: O,
76
+ typeFilter: A,
77
+ appFilter: M,
78
+ onRetry: G,
79
+ onMarkAsRead: K,
80
+ onDelete: J,
81
+ onRedirect: Y
77
82
  }),
78
- /* @__PURE__ */ _(a, {
79
- totalCount: V,
80
- onViewAll: b ? Y : void 0
83
+ /* @__PURE__ */ v(o, {
84
+ totalCount: H,
85
+ onViewAll: x ? X : void 0
81
86
  })
82
87
  ]
83
88
  })
@@ -85,4 +90,4 @@ var y = ({ client: y, onViewAll: b, compact: x = !1, pollInterval: S = 3e4, lazy
85
90
  });
86
91
  };
87
92
  //#endregion
88
- export { y as NotificationCenter };
93
+ export { b as NotificationCenter };
@@ -51,7 +51,7 @@ export { FooterBar } from './FooterBar';
51
51
  export { Footer, DEFAULT_FOOTER_COLUMNS, DEFAULT_SOCIAL_LINKS } from './Footer';
52
52
  export { SideNavigation } from './SideNavigation';
53
53
  export { GlobalSearch } from './GlobalSearch';
54
- export { CommandPalette } from './CommandPalette';
54
+ export { CommandPalette, COMMAND_PALETTE_SHORTCUT, COMMAND_PALETTE_HELP_SHORTCUT, } from './CommandPalette';
55
55
  export { Breadcrumbs } from './Breadcrumbs';
56
56
  export { NavLink } from './NavLink';
57
57
  export { Tabs } from './Tabs';