@burdenoff/fe-libs 2026.805.2 → 2026.805.4

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,81 +1,82 @@
1
1
  import { getProductsWithUrls as e } from "../shared/config/products.js";
2
- import { useEffect as t, useMemo as n, useRef as r, useState as i } from "react";
3
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
2
+ import { useShellLabel as t } from "../shared/providers/shell/useShellLabel.js";
3
+ import { useEffect as n, useMemo as r, useRef as i, useState as a } from "react";
4
+ import { jsx as o, jsxs as s } from "react/jsx-runtime";
4
5
  //#region src/chrome/ProductSwitcher.tsx
5
- var s = 6;
6
- function c(e) {
6
+ var c = 6;
7
+ function l(e) {
7
8
  if (e?.logoUrl) return e.logoUrl;
8
9
  let t = e?.url;
9
10
  if (!(!t || t === "#")) return `${t.replace(/\/+$/, "")}/icons/icon.svg`;
10
11
  }
11
- var l = ({ product: e, sizeClass: t, textClass: n }) => {
12
- let [r, o] = i(!1), s = c(e), l = !!s && !r;
13
- return /* @__PURE__ */ a("div", {
14
- className: `${t} rounded-md flex items-center justify-center flex-shrink-0 overflow-hidden ${l ? "bg-white p-0.5 ring-1 ring-border-default dark:ring-border-strong" : `text-text-inverse font-semibold ${n}`}`,
15
- style: l ? void 0 : { backgroundColor: e?.color || "var(--color-action-primary-bg)" },
16
- children: l ? /* @__PURE__ */ a("img", {
12
+ var u = ({ product: e, sizeClass: t, textClass: n }) => {
13
+ let [r, i] = a(!1), s = l(e), c = !!s && !r;
14
+ return /* @__PURE__ */ o("div", {
15
+ className: `${t} rounded-md flex items-center justify-center flex-shrink-0 overflow-hidden ${c ? "bg-white p-0.5 ring-1 ring-border-default dark:ring-border-strong" : `text-text-inverse font-semibold ${n}`}`,
16
+ style: c ? void 0 : { backgroundColor: e?.color || "var(--color-action-primary-bg)" },
17
+ children: c ? /* @__PURE__ */ o("img", {
17
18
  src: s,
18
19
  alt: e?.name ?? "",
19
20
  className: "size-full object-contain",
20
- onError: () => o(!0)
21
+ onError: () => i(!0)
21
22
  }) : e?.icon || e?.name.charAt(0)
22
23
  });
23
24
  };
24
- function u(e, t) {
25
+ function d(e, t) {
25
26
  let n = t.trim().toLowerCase();
26
27
  return n ? e.filter((e) => e.name.toLowerCase().includes(n) || e.id.toLowerCase().includes(n) || (e.description ? e.description.toLowerCase().includes(n) : !1)) : e;
27
28
  }
28
- function d(t, n) {
29
+ function f(t, n) {
29
30
  return t.find((e) => e.id === n) || (n ? e().find((e) => e.id === n) || {
30
31
  id: n,
31
32
  name: n,
32
33
  url: "#"
33
34
  } : t[0]);
34
35
  }
35
- var f = ({ products: e, currentProductId: c, onProductChange: f, compact: p = !1 }) => {
36
- let [m, h] = i(!1), [g, _] = i(""), v = r(null), y = r(null), b = d(e, c), x = e.length > s, S = n(() => u(e, g), [e, g]);
37
- t(() => {
36
+ var p = ({ products: e, currentProductId: l, onProductChange: p, compact: m = !1 }) => {
37
+ let h = t(), [g, _] = a(!1), [v, y] = a(""), b = i(null), x = i(null), S = f(e, l), C = e.length > c, w = r(() => d(e, v), [e, v]);
38
+ n(() => {
38
39
  let e = (e) => {
39
- v.current && !v.current.contains(e.target) && h(!1);
40
+ b.current && !b.current.contains(e.target) && _(!1);
40
41
  };
41
- if (m) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
42
- }, [m]), t(() => {
43
- if (!m) {
44
- _("");
42
+ if (g) return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
43
+ }, [g]), n(() => {
44
+ if (!g) {
45
+ y("");
45
46
  return;
46
47
  }
47
- if (x) {
48
- let e = setTimeout(() => y.current?.focus(), 60);
48
+ if (C) {
49
+ let e = setTimeout(() => x.current?.focus(), 60);
49
50
  return () => clearTimeout(e);
50
51
  }
51
- }, [m, x]);
52
- let C = (e) => {
53
- e.comingSoon || (f ? f(e) : window.location.href = e.url, h(!1));
52
+ }, [g, C]);
53
+ let T = (e) => {
54
+ e.comingSoon || (p ? p(e) : window.location.href = e.url, _(!1));
54
55
  };
55
- return /* @__PURE__ */ o("div", {
56
+ return /* @__PURE__ */ s("div", {
56
57
  className: "relative",
57
- ref: v,
58
- children: [/* @__PURE__ */ o("button", {
59
- onClick: () => h(!m),
60
- className: `flex items-center gap-2 px-3 py-2 rounded-button hover:bg-bg-sunken transition-colors ${m ? "bg-bg-sunken" : ""}`,
61
- "aria-label": "Switch product",
62
- "aria-expanded": m,
58
+ ref: b,
59
+ children: [/* @__PURE__ */ s("button", {
60
+ onClick: () => _(!g),
61
+ className: `flex items-center gap-2 px-3 py-2 rounded-button hover:bg-bg-sunken transition-colors ${g ? "bg-bg-sunken" : ""}`,
62
+ "aria-label": h("productSwitcher.title", "Switch product"),
63
+ "aria-expanded": g,
63
64
  children: [
64
- /* @__PURE__ */ a(l, {
65
- product: b,
65
+ /* @__PURE__ */ o(u, {
66
+ product: S,
66
67
  sizeClass: "size-6",
67
68
  textClass: "text-xs"
68
69
  }),
69
- !p && /* @__PURE__ */ a("span", {
70
+ !m && /* @__PURE__ */ o("span", {
70
71
  className: "text-body-sm font-medium text-text-primary",
71
- children: b?.name
72
+ children: S?.name
72
73
  }),
73
- !p && /* @__PURE__ */ a("svg", {
74
- className: `w-4 h-4 text-text-secondary transition-transform ${m ? "rotate-180" : ""}`,
74
+ !m && /* @__PURE__ */ o("svg", {
75
+ className: `w-4 h-4 text-text-secondary transition-transform ${g ? "rotate-180" : ""}`,
75
76
  fill: "none",
76
77
  stroke: "currentColor",
77
78
  viewBox: "0 0 24 24",
78
- children: /* @__PURE__ */ a("path", {
79
+ children: /* @__PURE__ */ o("path", {
79
80
  strokeLinecap: "round",
80
81
  strokeLinejoin: "round",
81
82
  strokeWidth: 2,
@@ -83,54 +84,54 @@ var f = ({ products: e, currentProductId: c, onProductChange: f, compact: p = !1
83
84
  })
84
85
  })
85
86
  ]
86
- }), m && /* @__PURE__ */ o("div", {
87
+ }), g && /* @__PURE__ */ s("div", {
87
88
  className: "absolute right-0 mt-2 w-[calc(100vw-1.5rem)] sm:w-72 max-w-72 bg-bg-elevated border border-border-subtle rounded-card shadow-[var(--shadow-elevation-4)] z-50 py-2 overflow-hidden animate-in fade-in-0 zoom-in-95 slide-in-from-top-2 duration-200",
88
89
  children: [
89
- /* @__PURE__ */ a("div", {
90
+ /* @__PURE__ */ o("div", {
90
91
  className: "px-4 py-2 border-b border-border-subtle",
91
- children: /* @__PURE__ */ a("p", {
92
+ children: /* @__PURE__ */ o("p", {
92
93
  className: "text-[11px] font-medium text-text-muted uppercase tracking-wider",
93
- children: "Switch Product"
94
+ children: h("productSwitcher.title", "Switch Product")
94
95
  })
95
96
  }),
96
- x && /* @__PURE__ */ o("div", {
97
+ C && /* @__PURE__ */ s("div", {
97
98
  className: "relative px-3 py-2 border-b border-border-subtle",
98
99
  children: [
99
- /* @__PURE__ */ a("svg", {
100
+ /* @__PURE__ */ o("svg", {
100
101
  className: "pointer-events-none absolute left-6 top-1/2 -translate-y-1/2 size-4 text-text-muted",
101
102
  fill: "none",
102
103
  stroke: "currentColor",
103
104
  viewBox: "0 0 24 24",
104
- children: /* @__PURE__ */ a("path", {
105
+ children: /* @__PURE__ */ o("path", {
105
106
  strokeLinecap: "round",
106
107
  strokeLinejoin: "round",
107
108
  strokeWidth: 2,
108
109
  d: "M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z"
109
110
  })
110
111
  }),
111
- /* @__PURE__ */ a("input", {
112
- ref: y,
112
+ /* @__PURE__ */ o("input", {
113
+ ref: x,
113
114
  type: "text",
114
- value: g,
115
- onChange: (e) => _(e.target.value),
115
+ value: v,
116
+ onChange: (e) => y(e.target.value),
116
117
  onKeyDown: (e) => {
117
- e.key === "Escape" && (g ? (e.stopPropagation(), _("")) : h(!1));
118
+ e.key === "Escape" && (v ? (e.stopPropagation(), y("")) : _(!1));
118
119
  },
119
- placeholder: "Search products…",
120
- "aria-label": "Search products",
120
+ placeholder: h("productSwitcher.searchPlaceholder", "Search products…"),
121
+ "aria-label": h("productSwitcher.searchAria", "Search products"),
121
122
  className: "w-full rounded-md border border-border-subtle bg-bg-surface py-2 pl-9 pr-8 text-sm text-text-primary placeholder:text-text-muted transition-all duration-200 focus:border-transparent focus:outline-none focus:ring-2 focus:ring-[var(--color-action-primary-border)]"
122
123
  }),
123
- g && /* @__PURE__ */ a("button", {
124
+ v && /* @__PURE__ */ o("button", {
124
125
  type: "button",
125
- onClick: () => _(""),
126
- "aria-label": "Clear search",
126
+ onClick: () => y(""),
127
+ "aria-label": h("common.clearSearch", "Clear search"),
127
128
  className: "absolute right-5 top-1/2 -translate-y-1/2 rounded-button p-1 text-text-muted transition-colors hover:bg-bg-sunken hover:text-text-primary",
128
- children: /* @__PURE__ */ a("svg", {
129
+ children: /* @__PURE__ */ o("svg", {
129
130
  className: "size-4",
130
131
  fill: "none",
131
132
  stroke: "currentColor",
132
133
  viewBox: "0 0 24 24",
133
- children: /* @__PURE__ */ a("path", {
134
+ children: /* @__PURE__ */ o("path", {
134
135
  strokeLinecap: "round",
135
136
  strokeLinejoin: "round",
136
137
  strokeWidth: 2,
@@ -140,39 +141,39 @@ var f = ({ products: e, currentProductId: c, onProductChange: f, compact: p = !1
140
141
  })
141
142
  ]
142
143
  }),
143
- /* @__PURE__ */ o("div", {
144
+ /* @__PURE__ */ s("div", {
144
145
  className: "py-1 max-h-96 overflow-y-auto",
145
- children: [S.length === 0 && /* @__PURE__ */ o("p", {
146
+ children: [w.length === 0 && /* @__PURE__ */ s("p", {
146
147
  className: "px-4 py-6 text-center text-body-sm text-text-muted",
147
148
  children: [
148
149
  "No products match “",
149
- g,
150
+ v,
150
151
  "”"
151
152
  ]
152
- }), S.map((e) => /* @__PURE__ */ o("button", {
153
- onClick: () => C(e),
153
+ }), w.map((e) => /* @__PURE__ */ s("button", {
154
+ onClick: () => T(e),
154
155
  disabled: e.comingSoon,
155
156
  "aria-disabled": e.comingSoon,
156
- title: e.comingSoon ? "Soon" : e.name,
157
- className: `w-full flex items-center gap-3 px-4 py-2.5 text-body-sm transition-colors ${e.comingSoon ? "text-text-muted cursor-not-allowed opacity-60" : e.id === c ? "bg-[var(--color-accent-soft)] text-text-primary font-medium" : "text-text-primary hover:bg-bg-sunken"}`,
157
+ title: e.comingSoon ? h("productSwitcher.soon", "Soon") : e.name,
158
+ className: `w-full flex items-center gap-3 px-4 py-2.5 text-body-sm transition-colors ${e.comingSoon ? "text-text-muted cursor-not-allowed opacity-60" : e.id === l ? "bg-[var(--color-accent-soft)] text-text-primary font-medium" : "text-text-primary hover:bg-bg-sunken"}`,
158
159
  children: [
159
- /* @__PURE__ */ a(l, {
160
+ /* @__PURE__ */ o(u, {
160
161
  product: e,
161
162
  sizeClass: "size-8",
162
163
  textClass: "text-sm"
163
164
  }),
164
- /* @__PURE__ */ a("span", {
165
+ /* @__PURE__ */ o("span", {
165
166
  className: "flex-1 text-left leading-tight",
166
167
  children: e.name
167
168
  }),
168
- e.comingSoon ? /* @__PURE__ */ a("span", {
169
+ e.comingSoon ? /* @__PURE__ */ o("span", {
169
170
  className: "shrink-0 whitespace-nowrap rounded-full border border-border-subtle bg-bg-sunken px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide text-text-secondary",
170
- children: "Soon"
171
- }) : e.id === c && /* @__PURE__ */ a("svg", {
171
+ children: h("productSwitcher.soon", "Soon")
172
+ }) : e.id === l && /* @__PURE__ */ o("svg", {
172
173
  className: "size-5 text-action-primary-bg",
173
174
  fill: "currentColor",
174
175
  viewBox: "0 0 20 20",
175
- children: /* @__PURE__ */ a("path", {
176
+ children: /* @__PURE__ */ o("path", {
176
177
  fillRule: "evenodd",
177
178
  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",
178
179
  clipRule: "evenodd"
@@ -186,4 +187,4 @@ var f = ({ products: e, currentProductId: c, onProductChange: f, compact: p = !1
186
187
  });
187
188
  };
188
189
  //#endregion
189
- export { f as ProductSwitcher, u as filterProducts, c as resolveProductLogo };
190
+ export { p as ProductSwitcher, d as filterProducts, l as resolveProductLogo };
@@ -1 +1 @@
1
- {"version":3,"file":"SideNavigation.d.ts","sourceRoot":"","sources":["../../src/chrome/SideNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAOtD,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,kCAAkC;IAClC,KAAK,EAAE,OAAO,EAAE,CAAC;IAEjB,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAC;IAEpB,mCAAmC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,yBAAyB;IACzB,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEpC,8BAA8B;IAC9B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAE9B,4BAA4B;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,sEAAsE;IACtE,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAEnC,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAEtB,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAErC,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,eAAe,CAAC;CACvC;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CAwNlD,CAAC"}
1
+ {"version":3,"file":"SideNavigation.d.ts","sourceRoot":"","sources":["../../src/chrome/SideNavigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAOtD,YAAY,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,kCAAkC;IAClC,KAAK,EAAE,OAAO,EAAE,CAAC;IAEjB,0BAA0B;IAC1B,WAAW,EAAE,MAAM,CAAC;IAEpB,mCAAmC;IACnC,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,yBAAyB;IACzB,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEpC,8BAA8B;IAC9B,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAE9B,4BAA4B;IAC5B,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB,0CAA0C;IAC1C,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,SAAS,CAAC;IAEnB,sEAAsE;IACtE,aAAa,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAEnC,+CAA+C;IAC/C,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IAEtB,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAErC,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,eAAe,CAAC;CACvC;AAED;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,EAAE,CAAC,mBAAmB,CA2NlD,CAAC"}
@@ -1,43 +1,44 @@
1
1
  import { Tooltip as e, TooltipContent as t, TooltipProvider as n, TooltipTrigger as r } from "../ui/tooltip.js";
2
- import { NavItemRenderer as i } from "./sideNavigation/NavItemRenderer.js";
3
- import { SidebarHeader as a } from "./sideNavigation/SidebarHeader.js";
4
- import { MobileActionsBar as o } from "./sideNavigation/MobileActionsBar.js";
5
- import { CollapseToggle as s } from "./sideNavigation/CollapseToggle.js";
6
- import { useSideNavigationState as c } from "./sideNavigation/useSideNavigationState.js";
7
- import { Fragment as l, jsx as u, jsxs as d } from "react/jsx-runtime";
2
+ import { useShellLabel as i } from "../shared/providers/shell/useShellLabel.js";
3
+ import { NavItemRenderer as a } from "./sideNavigation/NavItemRenderer.js";
4
+ import { SidebarHeader as o } from "./sideNavigation/SidebarHeader.js";
5
+ import { MobileActionsBar as s } from "./sideNavigation/MobileActionsBar.js";
6
+ import { CollapseToggle as c } from "./sideNavigation/CollapseToggle.js";
7
+ import { useSideNavigationState as l } from "./sideNavigation/useSideNavigationState.js";
8
+ import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
8
9
  //#region src/chrome/SideNavigation.tsx
9
- var f = ({ items: f, currentPath: p, collapsed: m = !1, onItemClick: h, onToggleCollapse: g, collapseLabel: _ = "Collapse", header: v, footer: y, mobileActions: b, groupOrder: x, groupLabels: S, maxDepth: C = 4, contextSearchParams: w }) => {
10
- let { expandedItems: T, toggleExpand: E, collapseAll: D } = c({
11
- items: f,
12
- currentPath: p,
13
- collapsed: m,
14
- onToggleCollapse: g
15
- }), O = f.filter((e) => e.visible !== !1), k = (() => {
16
- if (m) return [{
10
+ var p = ({ items: p, currentPath: m, collapsed: h = !1, onItemClick: g, onToggleCollapse: _, collapseLabel: v, header: y, footer: b, mobileActions: x, groupOrder: S, groupLabels: C, maxDepth: w = 4, contextSearchParams: T }) => {
11
+ let { expandedItems: E, toggleExpand: D, collapseAll: O } = l({
12
+ items: p,
13
+ currentPath: m,
14
+ collapsed: h,
15
+ onToggleCollapse: _
16
+ }), k = i(), A = v ?? k("nav.collapse", "Collapse"), j = p.filter((e) => e.visible !== !1), M = (() => {
17
+ if (h) return [{
17
18
  id: "__all__",
18
19
  label: null,
19
- items: O
20
+ items: j
20
21
  }];
21
22
  let e = /* @__PURE__ */ new Map();
22
- for (let t of O) {
23
+ for (let t of j) {
23
24
  let n = t.group ?? "__default__", r = e.get(n);
24
25
  r ? r.push(t) : e.set(n, [t]);
25
26
  }
26
- return [...x ?? [], ...Array.from(e.keys()).filter((e) => !(x ?? []).includes(e))].filter((t) => (e.get(t)?.length ?? 0) > 0).map((t) => ({
27
+ return [...S ?? [], ...Array.from(e.keys()).filter((e) => !(S ?? []).includes(e))].filter((t) => (e.get(t)?.length ?? 0) > 0).map((t) => ({
27
28
  id: t,
28
- label: t === "__default__" ? null : S?.[t] ?? t,
29
+ label: t === "__default__" ? null : C?.[t] ?? t,
29
30
  items: e.get(t) ?? []
30
31
  }));
31
32
  })();
32
- return /* @__PURE__ */ d(l, { children: [!m && /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", {
33
+ return /* @__PURE__ */ f(u, { children: [!h && /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d("div", {
33
34
  className: "fixed inset-0 bg-bg-overlay z-[109] md:hidden",
34
35
  "aria-hidden": "true"
35
- }), /* @__PURE__ */ u("button", {
36
+ }), /* @__PURE__ */ d("button", {
36
37
  type: "button",
37
38
  className: "fixed inset-y-0 right-0 left-64 z-[112] md:hidden cursor-pointer",
38
- onClick: g,
39
+ onClick: _,
39
40
  "aria-label": "Close sidebar"
40
- })] }), /* @__PURE__ */ d("aside", {
41
+ })] }), /* @__PURE__ */ f("aside", {
41
42
  className: `
42
43
  bg-bg-canvas supports-[backdrop-filter]:bg-[var(--color-surface-glass)] supports-[backdrop-filter]:backdrop-blur-[var(--blur-glass)]
43
44
  border-r border-border-seam
@@ -48,28 +49,28 @@ var f = ({ items: f, currentPath: p, collapsed: m = !1, onItemClick: h, onToggle
48
49
  z-[110] md:z-auto
49
50
  md:h-full
50
51
  overflow-x-hidden
51
- ${m ? "-translate-x-full md:translate-x-0" : "translate-x-0"}
52
+ ${h ? "-translate-x-full md:translate-x-0" : "translate-x-0"}
52
53
  w-64 md:w-auto
53
- ${m ? "md:w-16" : "md:w-64"}
54
+ ${h ? "md:w-16" : "md:w-64"}
54
55
  `,
55
56
  style: {
56
57
  paddingTop: "env(safe-area-inset-top)",
57
58
  paddingBottom: "env(safe-area-inset-bottom)"
58
59
  },
59
60
  children: [
60
- !m && g && /* @__PURE__ */ u("div", {
61
+ !h && _ && /* @__PURE__ */ d("div", {
61
62
  className: "md:hidden flex justify-end px-2 pt-2",
62
- children: /* @__PURE__ */ u("button", {
63
+ children: /* @__PURE__ */ d("button", {
63
64
  type: "button",
64
- onClick: g,
65
+ onClick: _,
65
66
  className: "p-2 rounded-button hover:bg-bg-sunken text-text-secondary hover:text-text-primary transition-colors",
66
67
  "aria-label": "Close sidebar",
67
- children: /* @__PURE__ */ u("svg", {
68
+ children: /* @__PURE__ */ d("svg", {
68
69
  className: "size-5",
69
70
  fill: "none",
70
71
  stroke: "currentColor",
71
72
  viewBox: "0 0 24 24",
72
- children: /* @__PURE__ */ u("path", {
73
+ children: /* @__PURE__ */ d("path", {
73
74
  strokeLinecap: "round",
74
75
  strokeLinejoin: "round",
75
76
  strokeWidth: 2,
@@ -78,59 +79,59 @@ var f = ({ items: f, currentPath: p, collapsed: m = !1, onItemClick: h, onToggle
78
79
  })
79
80
  })
80
81
  }),
81
- v && /* @__PURE__ */ u(a, {
82
- header: v,
83
- collapsed: m,
84
- expandedCount: T.size,
85
- onCollapseAll: D
82
+ y && /* @__PURE__ */ d(o, {
83
+ header: y,
84
+ collapsed: h,
85
+ expandedCount: E.size,
86
+ onCollapseAll: O
86
87
  }),
87
- /* @__PURE__ */ u("nav", {
88
+ /* @__PURE__ */ d("nav", {
88
89
  className: "flex-1 min-h-0 py-card-padding overflow-y-auto overflow-x-hidden",
89
- children: /* @__PURE__ */ u(n, {
90
+ children: /* @__PURE__ */ d(n, {
90
91
  delayDuration: 300,
91
- children: /* @__PURE__ */ u("ul", {
92
+ children: /* @__PURE__ */ d("ul", {
92
93
  className: "space-y-list-gap",
93
- children: k.map((n, a) => /* @__PURE__ */ d("li", {
94
+ children: M.map((n, i) => /* @__PURE__ */ f("li", {
94
95
  className: "list-none",
95
96
  children: [
96
- a > 0 && !m && /* @__PURE__ */ u("div", { className: "my-2 border-t border-border-subtle" }),
97
- n.label && !m && /* @__PURE__ */ u("p", {
97
+ i > 0 && !h && /* @__PURE__ */ d("div", { className: "my-2 border-t border-border-subtle" }),
98
+ n.label && !h && /* @__PURE__ */ d("p", {
98
99
  className: "px-3 pb-1.5 pt-0.5 text-[11px] font-medium uppercase tracking-wider text-text-muted",
99
100
  children: n.label
100
101
  }),
101
- /* @__PURE__ */ u("ul", {
102
+ /* @__PURE__ */ d("ul", {
102
103
  className: "space-y-list-gap",
103
- children: n.items.map((n) => m ? /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u(r, {
104
+ children: n.items.map((n) => h ? /* @__PURE__ */ f(e, { children: [/* @__PURE__ */ d(r, {
104
105
  asChild: !0,
105
- children: /* @__PURE__ */ u(i, {
106
+ children: /* @__PURE__ */ d(a, {
106
107
  item: n,
107
108
  depth: 0,
108
- maxDepth: C,
109
- currentPath: p,
110
- expandedItems: T,
111
- toggleExpand: E,
112
- onItemClick: h,
113
- onToggleCollapse: g,
114
- collapsed: m,
115
- contextSearchParams: w
109
+ maxDepth: w,
110
+ currentPath: m,
111
+ expandedItems: E,
112
+ toggleExpand: D,
113
+ onItemClick: g,
114
+ onToggleCollapse: _,
115
+ collapsed: h,
116
+ contextSearchParams: T
116
117
  })
117
- }), /* @__PURE__ */ d(t, {
118
+ }), /* @__PURE__ */ f(t, {
118
119
  side: "right",
119
- children: [/* @__PURE__ */ u("p", { children: n.label }), n.badge !== void 0 && n.badge > 0 && /* @__PURE__ */ u("span", {
120
+ children: [/* @__PURE__ */ d("p", { children: n.label }), n.badge !== void 0 && n.badge > 0 && /* @__PURE__ */ d("span", {
120
121
  className: "ml-2 text-xs bg-status-error-bg-subtle text-status-error-text px-2 py-0.5 rounded-full",
121
122
  children: n.badge
122
123
  })]
123
- })] }, n.id) : /* @__PURE__ */ u(i, {
124
+ })] }, n.id) : /* @__PURE__ */ d(a, {
124
125
  item: n,
125
126
  depth: 0,
126
- maxDepth: C,
127
- currentPath: p,
128
- expandedItems: T,
129
- toggleExpand: E,
130
- onItemClick: h,
131
- onToggleCollapse: g,
132
- collapsed: m,
133
- contextSearchParams: w
127
+ maxDepth: w,
128
+ currentPath: m,
129
+ expandedItems: E,
130
+ toggleExpand: D,
131
+ onItemClick: g,
132
+ onToggleCollapse: _,
133
+ collapsed: h,
134
+ contextSearchParams: T
134
135
  }, n.id))
135
136
  })
136
137
  ]
@@ -138,22 +139,22 @@ var f = ({ items: f, currentPath: p, collapsed: m = !1, onItemClick: h, onToggle
138
139
  })
139
140
  })
140
141
  }),
141
- y && /* @__PURE__ */ u("div", {
142
- className: `py-card-padding border-t border-border-subtle ${m ? "md:px-2" : "px-card-padding"}`,
143
- children: y
142
+ b && /* @__PURE__ */ d("div", {
143
+ className: `py-card-padding border-t border-border-subtle ${h ? "md:px-2" : "px-card-padding"}`,
144
+ children: b
144
145
  }),
145
- b && b.length > 0 && /* @__PURE__ */ u(o, {
146
- actions: b,
147
- collapsed: m,
148
- onToggleCollapse: g
146
+ x && x.length > 0 && /* @__PURE__ */ d(s, {
147
+ actions: x,
148
+ collapsed: h,
149
+ onToggleCollapse: _
149
150
  }),
150
- g && /* @__PURE__ */ u(s, {
151
- collapsed: m,
152
- collapseLabel: _,
153
- onToggleCollapse: g
151
+ _ && /* @__PURE__ */ d(c, {
152
+ collapsed: h,
153
+ collapseLabel: A,
154
+ onToggleCollapse: _
154
155
  })
155
156
  ]
156
157
  })] });
157
158
  };
158
159
  //#endregion
159
- export { f as SideNavigation };
160
+ export { p as SideNavigation };
@@ -1 +1 @@
1
- {"version":3,"file":"SearchModeBar.d.ts","sourceRoot":"","sources":["../../../src/chrome/globalSearch/SearchModeBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAE3E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,kBAAkB,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,IAAI,CAAC;CACvC;AAED,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,GACjB,EAAE,kBAAkB,GAAG,SAAS,CAwChC"}
1
+ {"version":3,"file":"SearchModeBar.d.ts","sourceRoot":"","sources":["../../../src/chrome/globalSearch/SearchModeBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAG3E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,kBAAkB,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,IAAI,CAAC;IACxD,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAC;IAC/B,QAAQ,CAAC,gBAAgB,EAAE,MAAM,IAAI,CAAC;CACvC;AAED,wBAAgB,aAAa,CAAC,EAC5B,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,GACjB,EAAE,kBAAkB,GAAG,SAAS,CA6ChC"}
@@ -1,36 +1,38 @@
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 { ChevronDown as t, ChevronUp as n, SlidersHorizontal as r } from "lucide-react";
4
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
4
+ import { ChevronDown as n, ChevronUp as r, SlidersHorizontal as i } from "lucide-react";
5
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
6
  //#region src/chrome/globalSearch/SearchModeBar.tsx
6
- function o({ searchMode: o, onSearchModeChange: s, showAdvanced: c, onToggleAdvanced: l }) {
7
- return /* @__PURE__ */ a("div", {
7
+ function s({ searchMode: s, onSearchModeChange: c, showAdvanced: l, onToggleAdvanced: u }) {
8
+ let d = e();
9
+ return /* @__PURE__ */ o("div", {
8
10
  className: "flex items-center justify-between px-3 py-1.5 border-b border-border-subtle",
9
- children: [/* @__PURE__ */ i("div", {
11
+ children: [/* @__PURE__ */ a("div", {
10
12
  className: "flex items-center gap-1",
11
13
  children: [
12
14
  "PARTIAL",
13
15
  "FULLTEXT",
14
16
  "EXACT"
15
- ].map((t) => /* @__PURE__ */ i("button", {
17
+ ].map((e) => /* @__PURE__ */ a("button", {
16
18
  type: "button",
17
- onClick: () => s(t),
18
- className: e("px-2 py-1 text-[10px] font-medium rounded-button transition-colors", o === t ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
19
- title: t === "PARTIAL" ? "Autocomplete — matches prefixes and substrings" : t === "FULLTEXT" ? "Full-text — BM25 word matching with stemming" : "Exact — all search terms must appear",
20
- children: t === "PARTIAL" ? "Partial" : t === "FULLTEXT" ? "Fulltext" : "Exact"
21
- }, t))
22
- }), /* @__PURE__ */ a("button", {
19
+ onClick: () => c(e),
20
+ className: t("px-2 py-1 text-[10px] font-medium rounded-button transition-colors", s === e ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary hover:text-text-primary"),
21
+ title: e === "PARTIAL" ? "Autocomplete — matches prefixes and substrings" : e === "FULLTEXT" ? "Full-text — BM25 word matching with stemming" : "Exact — all search terms must appear",
22
+ children: e === "PARTIAL" ? d("search.mode.partial", "Partial") : e === "FULLTEXT" ? d("search.mode.fulltext", "Fulltext") : d("search.mode.exact", "Exact")
23
+ }, e))
24
+ }), /* @__PURE__ */ o("button", {
23
25
  type: "button",
24
- onClick: l,
26
+ onClick: u,
25
27
  className: "flex items-center gap-1 px-2 py-1 text-[10px] font-medium text-text-secondary rounded-button hover:bg-bg-sunken hover:text-text-primary transition-colors",
26
- "aria-expanded": c,
28
+ "aria-expanded": l,
27
29
  children: [
28
- /* @__PURE__ */ i(r, { className: "size-3" }),
29
- "Filters",
30
- i(c ? n : t, { className: "size-3" })
30
+ /* @__PURE__ */ a(i, { className: "size-3" }),
31
+ d("search.filters", "Filters"),
32
+ a(l ? r : n, { className: "size-3" })
31
33
  ]
32
34
  })]
33
35
  });
34
36
  }
35
37
  //#endregion
36
- export { o as SearchModeBar };
38
+ export { s as SearchModeBar };
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Resolve a shell chrome label through the i18n service, with an English
3
+ * fallback.
4
+ *
5
+ * `useI18n().t()` echoes the key back when there is no translation, which is
6
+ * awkward at a call site — a missing key would render `nav.collapse` to the
7
+ * user. This wraps that check once.
8
+ *
9
+ * const label = useShellLabel();
10
+ * label('nav.collapse', 'Collapse');
11
+ *
12
+ * Used by the shell's own chrome (side nav, footer, breadcrumbs) so those
13
+ * strings follow the active locale instead of being permanently English.
14
+ * Components that already accept a label PROP should prefer the prop and fall
15
+ * back to this, so a host can still override:
16
+ *
17
+ * const text = collapseLabel ?? label('nav.collapse', 'Collapse');
18
+ */
19
+ export declare function useShellLabel(): (key: string, fallback: string) => string;
20
+ //# sourceMappingURL=useShellLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useShellLabel.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/useShellLabel.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,aAAa,IAAI,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CASzE"}
@@ -0,0 +1,12 @@
1
+ import { useI18n as e } from "./I18nProvider.js";
2
+ import { useCallback as t } from "react";
3
+ //#region src/shared/providers/shell/useShellLabel.ts
4
+ function n() {
5
+ let { t: n } = e();
6
+ return t((e, t) => {
7
+ let r = n(e);
8
+ return r === e ? t : r;
9
+ }, [n]);
10
+ }
11
+ //#endregion
12
+ export { n as useShellLabel };
@@ -1 +1 @@
1
- {"version":3,"file":"DesktopTourDropdown.d.ts","sourceRoot":"","sources":["../../../../src/shared/tours/tourTrigger/DesktopTourDropdown.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGxD,UAAU,wBAAwB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,mBAAmB,qHAsE/B,CAAC"}
1
+ {"version":3,"file":"DesktopTourDropdown.d.ts","sourceRoot":"","sources":["../../../../src/shared/tours/tourTrigger/DesktopTourDropdown.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAIxD,UAAU,wBAAwB;IAChC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;CAChD;AAED,eAAO,MAAM,mBAAmB,qHA2E/B,CAAC"}