@burdenoff/fe-libs 2026.1115.9 → 2026.1115.10

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 (36) hide show
  1. package/dist/chrome/globalSearch/ResultsList.js +39 -33
  2. package/dist/chrome/index.d.ts +1 -0
  3. package/dist/chrome/shell/ShellSidebar.js +287 -281
  4. package/dist/chrome/shell/shellSidebarWidth.d.ts +16 -0
  5. package/dist/chrome/shell/shellSidebarWidth.js +26 -0
  6. package/dist/chrome/shellLabelManifest.d.ts +8 -0
  7. package/dist/chrome.js +65 -63
  8. package/dist/shared/constants/shellCssVars.d.ts +9 -0
  9. package/dist/shared/constants/shellCssVars.js +3 -0
  10. package/dist/shared/events/sinks/RybbitSink.d.ts +13 -1
  11. package/dist/shared/events/sinks/RybbitSink.js +129 -121
  12. package/dist/shared/events/sinks/index.d.ts +1 -1
  13. package/dist/shared/pages/SearchPage.d.ts +17 -1
  14. package/dist/shared/pages/SearchPage.js +284 -243
  15. package/dist/shared/pages/searchPage/PageResultsGroup.d.ts +16 -0
  16. package/dist/shared/pages/searchPage/PageResultsGroup.js +29 -0
  17. package/dist/shared/pages/searchPage/ResultsList.d.ts +6 -1
  18. package/dist/shared/pages/searchPage/ResultsList.js +9 -53
  19. package/dist/shared/pages/searchPage/SearchResultCard.d.ts +14 -0
  20. package/dist/shared/pages/searchPage/SearchResultCard.js +57 -0
  21. package/dist/shared/providers/AppShellProvider.d.ts +8 -0
  22. package/dist/shared/providers/AppShellProvider.js +91 -89
  23. package/dist/shared/providers/shell/PersonaSurfaceProvider.d.ts +27 -1
  24. package/dist/shared/providers/shell/PersonaSurfaceProvider.js +214 -179
  25. package/dist/shared/providers/shell/index.d.ts +2 -0
  26. package/dist/shared/providers/shell/navIdMigration.d.ts +29 -0
  27. package/dist/shared/providers/shell/navIdMigration.js +57 -0
  28. package/dist/shared/providers/shell/personaSurfaceRemote.d.ts +7 -0
  29. package/dist/shared/providers/shell/personaSurfaceRemote.js +1 -1
  30. package/dist/shared/types/index.d.ts +11 -0
  31. package/dist/shared-providers-shell.js +13 -12
  32. package/dist/ui/access-needed-chip.d.ts +16 -0
  33. package/dist/ui/access-needed-chip.js +17 -0
  34. package/dist/ui/index.d.ts +1 -0
  35. package/dist/ui.js +50 -49
  36. package/package.json +1 -1
@@ -3,43 +3,44 @@ import { useShellLabel as t } from "../../shared/providers/shell/useShellLabel.j
3
3
  import { Tooltip as n, TooltipContent as r, TooltipTrigger as i } from "../../ui/tooltip.js";
4
4
  import { navLinkClick as a } from "./navLink.js";
5
5
  import { isShellNavMoreEntry as o } from "./shellNavVisibility.js";
6
- import { useCallback as s, useEffect as c, useLayoutEffect as l, useMemo as u, useRef as d, useState as f } from "react";
7
- import { ArrowLeft as p, ChevronDown as m, ChevronRight as h, ChevronUp as g, PanelLeft as _, Pin as v, Plus as y, Search as b } from "lucide-react";
8
- import { clsx as x } from "clsx";
9
- import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
6
+ import { usePublishShellSidebarWidth as s } from "./shellSidebarWidth.js";
7
+ import { useCallback as c, useEffect as l, useLayoutEffect as u, useMemo as d, useRef as f, useState as p } from "react";
8
+ import { ArrowLeft as m, ChevronDown as h, ChevronRight as g, ChevronUp as _, PanelLeft as v, Pin as y, Plus as b, Search as x } from "lucide-react";
9
+ import { clsx as S } from "clsx";
10
+ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
10
11
  // src/chrome/shell/ShellSidebar.tsx
11
- var T = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring";
12
- function E(e) {
12
+ var E = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring";
13
+ function D(e) {
13
14
  return e ? "bg-accent-soft text-text-primary" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary";
14
15
  }
15
- function D({ offsetClass: e = "-start-2.5" }) {
16
- return /* @__PURE__ */ C("span", {
16
+ function O({ offsetClass: e = "-start-2.5" }) {
17
+ return /* @__PURE__ */ w("span", {
17
18
  "aria-hidden": "true",
18
19
  "data-shell-active-bar": "",
19
- className: x("pointer-events-none absolute top-1/2 h-5 w-0.75 -translate-y-1/2 rounded-e-full bg-action-primary-bg", e)
20
+ className: S("pointer-events-none absolute top-1/2 h-5 w-0.75 -translate-y-1/2 rounded-e-full bg-action-primary-bg", e)
20
21
  });
21
22
  }
22
- function O({ children: e, className: t }) {
23
- return /* @__PURE__ */ C("kbd", {
24
- className: x("inline-flex h-5 shrink-0 items-center rounded border border-border-subtle bg-bg-sunken px-1.5 font-sans text-caption leading-none text-text-muted", t),
23
+ function k({ children: e, className: t }) {
24
+ return /* @__PURE__ */ w("kbd", {
25
+ className: S("inline-flex h-5 shrink-0 items-center rounded border border-border-subtle bg-bg-sunken px-1.5 font-sans text-caption leading-none text-text-muted", t),
25
26
  children: e
26
27
  });
27
28
  }
28
- function k({ badge: e, compact: t = !1 }) {
29
- return /* @__PURE__ */ C("span", {
29
+ function A({ badge: e, compact: t = !1 }) {
30
+ return /* @__PURE__ */ w("span", {
30
31
  "data-shell-badge": e.tone,
31
- className: x("inline-flex shrink-0 items-center justify-center rounded-pill font-semibold tabular-nums leading-none", t ? "h-3.5 min-w-3.5 px-1 text-caption" : "h-5 min-w-5 px-1.5 text-xs", e.tone === "accent" ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary"),
32
+ className: S("inline-flex shrink-0 items-center justify-center rounded-pill font-semibold tabular-nums leading-none", t ? "h-3.5 min-w-3.5 px-1 text-caption" : "h-5 min-w-5 px-1.5 text-xs", e.tone === "accent" ? "bg-action-primary-bg text-action-primary-text" : "bg-bg-sunken text-text-secondary"),
32
33
  children: e.value
33
34
  });
34
35
  }
35
- function A(e, t = "size-4") {
36
- return x(t, "shrink-0", e ? "text-accent-primary" : "text-text-secondary");
36
+ function j(e, t = "size-4") {
37
+ return S(t, "shrink-0", e ? "text-accent-primary" : "text-text-secondary");
37
38
  }
38
- function j(e, t) {
39
+ function M(e, t) {
39
40
  if (e) return t ? t(e) : e;
40
41
  }
41
- function M({ href: e, onActivate: t, active: n, expanded: r, drill: i, title: o, className: s, children: c }) {
42
- return e ? /* @__PURE__ */ C("a", {
42
+ function N({ href: e, onActivate: t, active: n, expanded: r, drill: i, title: o, className: s, children: c }) {
43
+ return e ? /* @__PURE__ */ w("a", {
43
44
  href: e,
44
45
  onClick: a(t),
45
46
  "data-shell-drill": i,
@@ -47,7 +48,7 @@ function M({ href: e, onActivate: t, active: n, expanded: r, drill: i, title: o,
47
48
  title: o,
48
49
  className: s,
49
50
  children: c
50
- }) : /* @__PURE__ */ C("button", {
51
+ }) : /* @__PURE__ */ w("button", {
51
52
  type: "button",
52
53
  onClick: t,
53
54
  "data-shell-drill": i,
@@ -58,37 +59,37 @@ function M({ href: e, onActivate: t, active: n, expanded: r, drill: i, title: o,
58
59
  children: c
59
60
  });
60
61
  }
61
- function N(e, t) {
62
- return (e.children ?? []).some((e) => t.isEntryActive(e) || N(e, t));
62
+ function P(e, t) {
63
+ return (e.children ?? []).some((e) => t.isEntryActive(e) || P(e, t));
63
64
  }
64
- var P = "rtl:rotate-180";
65
- function F(e, t, { nav: n, viewId: r, expanded: i }) {
66
- return e.path ? i[e.id] ?? (t || N(e, n)) : n.isSectionOpen(r, `entry:${e.id}`, !o(e));
65
+ var F = "rtl:rotate-180";
66
+ function I(e, t, { nav: n, viewId: r, expanded: i }) {
67
+ return e.path ? i[e.id] ?? (t || P(e, n)) : n.isSectionOpen(r, `entry:${e.id}`, !o(e));
67
68
  }
68
- function I(e, t, n, { nav: r, viewId: i, setExpanded: a }) {
69
+ function L(e, t, n, { nav: r, viewId: i, setExpanded: a }) {
69
70
  e.path ? a(e.id, n) : n !== t && r.toggleSection(i, `entry:${e.id}`, !o(e));
70
71
  }
71
- function L(e, t, n, r) {
72
+ function R(e, t, n, r) {
72
73
  if (!t) return {
73
74
  open: !1,
74
75
  setOpen: () => void 0
75
76
  };
76
- let i = F(e, n, r);
77
+ let i = I(e, n, r);
77
78
  return {
78
79
  open: i,
79
- setOpen: (t) => I(e, i, t, r)
80
+ setOpen: (t) => L(e, i, t, r)
80
81
  };
81
82
  }
82
- function R(e, t) {
83
+ function z(e, t) {
83
84
  return `${e.id}:${t.id}`;
84
85
  }
85
- function z(e, t, n) {
86
+ function B(e, t, n) {
86
87
  let r = [], i = (a) => {
87
88
  for (let s of a) {
88
89
  if (o(s)) continue;
89
90
  let a = s.children ?? [];
90
91
  if (a.length === 0) continue;
91
- let c = F(s, t.isEntryActive(s), {
92
+ let c = I(s, t.isEntryActive(s), {
92
93
  nav: t,
93
94
  viewId: e.id,
94
95
  expanded: n
@@ -99,111 +100,111 @@ function z(e, t, n) {
99
100
  }), i(a);
100
101
  }
101
102
  };
102
- for (let n of e.sections) (!n.collapsible || t.isSectionOpen(e.id, n.id)) && i(t.curateEntries(n.entries, R(e, n)));
103
+ for (let n of e.sections) (!n.collapsible || t.isSectionOpen(e.id, n.id)) && i(t.curateEntries(n.entries, z(e, n)));
103
104
  return r;
104
105
  }
105
- function B({ open: e }) {
106
- return e ? /* @__PURE__ */ C(m, {
106
+ function V({ open: e }) {
107
+ return e ? /* @__PURE__ */ w(h, {
107
108
  "aria-hidden": "true",
108
109
  className: "size-3.5 shrink-0"
109
- }) : /* @__PURE__ */ C(h, {
110
+ }) : /* @__PURE__ */ w(g, {
110
111
  "aria-hidden": "true",
111
- className: x("size-3.5 shrink-0", P)
112
+ className: S("size-3.5 shrink-0", F)
112
113
  });
113
114
  }
114
- function V({ entry: e, open: n, onToggle: r }) {
115
+ function H({ entry: e, open: n, onToggle: r }) {
115
116
  let i = t(), a = n ? i("shell.sidebar.collapseGroup", "Collapse {{label}}", { label: e.label }) : i("shell.sidebar.expandGroup", "Expand {{label}}", { label: e.label });
116
- return /* @__PURE__ */ C("button", {
117
+ return /* @__PURE__ */ w("button", {
117
118
  type: "button",
118
119
  onClick: r,
119
120
  "aria-expanded": n,
120
121
  "aria-label": a,
121
- className: x("flex w-7 shrink-0 items-center justify-center rounded-button text-text-muted hover:text-text-primary", T),
122
- children: /* @__PURE__ */ C(B, { open: n })
122
+ className: S("flex w-7 shrink-0 items-center justify-center rounded-button text-text-muted hover:text-text-primary", E),
123
+ children: /* @__PURE__ */ w(V, { open: n })
123
124
  });
124
125
  }
125
- function H({ entries: e, rowProps: t }) {
126
- return /* @__PURE__ */ w("div", {
126
+ function U({ entries: e, rowProps: t }) {
127
+ return /* @__PURE__ */ T("div", {
127
128
  className: "relative",
128
- children: [/* @__PURE__ */ C("span", {
129
+ children: [/* @__PURE__ */ w("span", {
129
130
  "aria-hidden": "true",
130
131
  className: "pointer-events-none absolute inset-y-0 start-6.75 w-px bg-border-subtle"
131
- }), /* @__PURE__ */ C("ul", {
132
+ }), /* @__PURE__ */ w("ul", {
132
133
  className: "ms-8.5",
133
- children: e.map((e) => /* @__PURE__ */ C(W, {
134
+ children: e.map((e) => /* @__PURE__ */ w(G, {
134
135
  entry: e,
135
136
  ...t
136
137
  }, e.id))
137
138
  })]
138
139
  });
139
140
  }
140
- function U({ entry: e, viewId: n, nav: r, onNavigate: i, hrefFor: a, onTogglePin: o, isPinned: s, expanded: c, setExpanded: l }) {
141
- let u = t(), d = r.isEntryActive(e), f = e.children ? r.filterEntries(e.children) : [], p = f.length > 0, { open: m, setOpen: g } = L(e, p, d, {
141
+ function W({ entry: e, viewId: n, nav: r, onNavigate: i, hrefFor: a, onTogglePin: o, isPinned: s, expanded: c, setExpanded: l }) {
142
+ let u = t(), d = r.isEntryActive(e), f = e.children ? r.filterEntries(e.children) : [], p = f.length > 0, { open: m, setOpen: h } = R(e, p, d, {
142
143
  nav: r,
143
144
  viewId: n,
144
145
  expanded: c,
145
146
  setExpanded: l
146
- }), _ = !!e.subtitle, y = s?.(e) ?? !1, b = !!(e.pinnable && o), S = e.icon;
147
- return /* @__PURE__ */ w("li", { children: [/* @__PURE__ */ w("div", {
147
+ }), _ = !!e.subtitle, v = s?.(e) ?? !1, b = !!(e.pinnable && o), x = e.icon;
148
+ return /* @__PURE__ */ T("li", { children: [/* @__PURE__ */ T("div", {
148
149
  "data-shell-entry": e.id,
149
150
  "data-active": d ? "true" : void 0,
150
- className: x("group relative flex rounded-button", E(d)),
151
+ className: S("group relative flex rounded-button", D(d)),
151
152
  children: [
152
- d ? /* @__PURE__ */ C(D, {}) : null,
153
- /* @__PURE__ */ w(M, {
154
- href: j(e.path, a),
153
+ d ? /* @__PURE__ */ w(O, {}) : null,
154
+ /* @__PURE__ */ T(N, {
155
+ href: M(e.path, a),
155
156
  onActivate: () => {
156
- e.drillTo && r.push(e.drillTo), e.path && i(e.path), p && g(e.path ? !0 : !m);
157
+ e.drillTo && r.push(e.drillTo), e.path && i(e.path), p && h(e.path ? !0 : !m);
157
158
  },
158
159
  active: d,
159
160
  expanded: p ? m : void 0,
160
161
  drill: e.drillTo,
161
- className: x("flex min-w-0 flex-1 gap-3 rounded-button ps-2 text-start", _ ? "items-start py-1.5" : "h-8.5 items-center", b || p && e.path ? "pe-1" : "pe-2.5", T),
162
+ className: S("flex min-w-0 flex-1 gap-3 rounded-button ps-2 text-start", _ ? "items-start py-1.5" : "h-8.5 items-center", b || p && e.path ? "pe-1" : "pe-2.5", E),
162
163
  children: [
163
- S ? /* @__PURE__ */ C(S, { className: x(A(d), _ && "mt-0.5") }) : null,
164
- /* @__PURE__ */ w("span", {
164
+ x ? /* @__PURE__ */ w(x, { className: S(j(d), _ && "mt-0.5") }) : null,
165
+ /* @__PURE__ */ T("span", {
165
166
  className: "flex min-w-0 flex-1 flex-col",
166
- children: [/* @__PURE__ */ C("span", {
167
- className: x("truncate text-body-sm leading-5", d ? "font-medium text-text-primary" : void 0),
167
+ children: [/* @__PURE__ */ w("span", {
168
+ className: S("truncate text-body-sm leading-5", d ? "font-medium text-text-primary" : void 0),
168
169
  children: e.label
169
- }), e.subtitle ? /* @__PURE__ */ C("span", {
170
+ }), e.subtitle ? /* @__PURE__ */ w("span", {
170
171
  className: "truncate text-xs leading-4 text-text-muted",
171
172
  children: e.subtitle
172
173
  }) : null]
173
174
  }),
174
- e.count === void 0 ? null : /* @__PURE__ */ C("span", {
175
- className: x("shrink-0 text-xs tabular-nums", d ? "text-text-primary" : "text-text-secondary"),
175
+ e.count === void 0 ? null : /* @__PURE__ */ w("span", {
176
+ className: S("shrink-0 text-xs tabular-nums", d ? "text-text-primary" : "text-text-secondary"),
176
177
  children: e.count
177
178
  }),
178
- e.badge ? /* @__PURE__ */ C(k, { badge: e.badge }) : null,
179
- e.drillTo ? /* @__PURE__ */ C(h, {
179
+ e.badge ? /* @__PURE__ */ w(A, { badge: e.badge }) : null,
180
+ e.drillTo ? /* @__PURE__ */ w(g, {
180
181
  "aria-hidden": "true",
181
- className: x("size-3.5 shrink-0 text-text-muted", P)
182
+ className: S("size-3.5 shrink-0 text-text-muted", F)
182
183
  }) : null,
183
- p && !e.path ? /* @__PURE__ */ C("span", {
184
+ p && !e.path ? /* @__PURE__ */ w("span", {
184
185
  className: "text-text-muted",
185
- children: /* @__PURE__ */ C(B, { open: m })
186
+ children: /* @__PURE__ */ w(V, { open: m })
186
187
  }) : null
187
188
  ]
188
189
  }),
189
- p && e.path ? /* @__PURE__ */ C(V, {
190
+ p && e.path ? /* @__PURE__ */ w(H, {
190
191
  entry: e,
191
192
  open: m,
192
- onToggle: () => g(!m)
193
+ onToggle: () => h(!m)
193
194
  }) : null,
194
- b ? /* @__PURE__ */ C("button", {
195
+ b ? /* @__PURE__ */ w("button", {
195
196
  type: "button",
196
197
  onClick: () => o?.(e),
197
- "aria-pressed": y,
198
- "aria-label": y ? u("shell.sidebar.unpin", "Unpin {{label}}", { label: e.label }) : u("shell.sidebar.pin", "Pin {{label}} to the sidebar", { label: e.label }),
199
- className: x("flex w-7 shrink-0 justify-center rounded-button text-text-muted hover:text-text-primary", _ ? "items-start pt-2" : "items-center", y ? void 0 : "opacity-0 group-hover:opacity-100 focus-visible:opacity-100 group-focus-within:opacity-100", T),
200
- children: /* @__PURE__ */ C(v, {
198
+ "aria-pressed": v,
199
+ "aria-label": v ? u("shell.sidebar.unpin", "Unpin {{label}}", { label: e.label }) : u("shell.sidebar.pin", "Pin {{label}} to the sidebar", { label: e.label }),
200
+ className: S("flex w-7 shrink-0 justify-center rounded-button text-text-muted hover:text-text-primary", _ ? "items-start pt-2" : "items-center", v ? void 0 : "opacity-0 group-hover:opacity-100 focus-visible:opacity-100 group-focus-within:opacity-100", E),
201
+ children: /* @__PURE__ */ w(y, {
201
202
  "aria-hidden": "true",
202
203
  className: "size-3.5"
203
204
  })
204
205
  }) : null
205
206
  ]
206
- }), m ? /* @__PURE__ */ C(H, {
207
+ }), m ? /* @__PURE__ */ w(U, {
207
208
  entries: f,
208
209
  rowProps: {
209
210
  viewId: n,
@@ -217,167 +218,167 @@ function U({ entry: e, viewId: n, nav: r, onNavigate: i, hrefFor: a, onTogglePin
217
218
  }
218
219
  }) : null] });
219
220
  }
220
- function W({ entry: e, ...t }) {
221
- let { nav: n, onNavigate: r, hrefFor: i } = t, a = n.isEntryActive(e), o = e.children ? n.filterEntries(e.children) : [], s = o.length > 0, { open: c, setOpen: l } = L(e, s, a, t), u = e.icon;
222
- return /* @__PURE__ */ w("li", { children: [/* @__PURE__ */ w("div", {
221
+ function G({ entry: e, ...t }) {
222
+ let { nav: n, onNavigate: r, hrefFor: i } = t, a = n.isEntryActive(e), o = e.children ? n.filterEntries(e.children) : [], s = o.length > 0, { open: c, setOpen: l } = R(e, s, a, t), u = e.icon;
223
+ return /* @__PURE__ */ T("li", { children: [/* @__PURE__ */ T("div", {
223
224
  "data-shell-entry": e.id,
224
225
  "data-active": a ? "true" : void 0,
225
- className: x("relative flex rounded-button", E(a)),
226
- children: [/* @__PURE__ */ w(M, {
227
- href: j(e.path, i),
226
+ className: S("relative flex rounded-button", D(a)),
227
+ children: [/* @__PURE__ */ T(N, {
228
+ href: M(e.path, i),
228
229
  onActivate: () => {
229
230
  e.drillTo && n.push(e.drillTo), e.path && r(e.path), s && l(e.path ? !0 : !c);
230
231
  },
231
232
  active: a,
232
233
  expanded: s ? c : void 0,
233
234
  drill: e.drillTo,
234
- className: x("flex h-7.5 min-w-0 flex-1 items-center gap-3 rounded-button ps-2 text-start", s && e.path ? "pe-1" : "pe-2.5", T),
235
+ className: S("flex h-7.5 min-w-0 flex-1 items-center gap-3 rounded-button ps-2 text-start", s && e.path ? "pe-1" : "pe-2.5", E),
235
236
  children: [
236
- u ? /* @__PURE__ */ C(u, { className: A(a) }) : null,
237
- /* @__PURE__ */ C("span", {
237
+ u ? /* @__PURE__ */ w(u, { className: j(a) }) : null,
238
+ /* @__PURE__ */ w("span", {
238
239
  className: "min-w-0 flex-1 truncate text-body-sm",
239
240
  children: e.label
240
241
  }),
241
- e.count === void 0 ? null : /* @__PURE__ */ C("span", {
242
- className: x("shrink-0 text-xs tabular-nums", a ? "text-text-primary" : "text-text-secondary"),
242
+ e.count === void 0 ? null : /* @__PURE__ */ w("span", {
243
+ className: S("shrink-0 text-xs tabular-nums", a ? "text-text-primary" : "text-text-secondary"),
243
244
  children: e.count
244
245
  }),
245
- e.badge ? /* @__PURE__ */ C(k, { badge: e.badge }) : null,
246
- s && !e.path ? /* @__PURE__ */ C("span", {
246
+ e.badge ? /* @__PURE__ */ w(A, { badge: e.badge }) : null,
247
+ s && !e.path ? /* @__PURE__ */ w("span", {
247
248
  className: "text-text-muted",
248
- children: /* @__PURE__ */ C(B, { open: c })
249
+ children: /* @__PURE__ */ w(V, { open: c })
249
250
  }) : null
250
251
  ]
251
- }), s && e.path ? /* @__PURE__ */ C(V, {
252
+ }), s && e.path ? /* @__PURE__ */ w(H, {
252
253
  entry: e,
253
254
  open: c,
254
255
  onToggle: () => l(!c)
255
256
  }) : null]
256
- }), c ? /* @__PURE__ */ C(H, {
257
+ }), c ? /* @__PURE__ */ w(U, {
257
258
  entries: o,
258
259
  rowProps: t
259
260
  }) : null] });
260
261
  }
261
- function G() {
262
- let [e, t] = f({});
262
+ function K() {
263
+ let [e, t] = p({});
263
264
  return {
264
265
  expanded: e,
265
- setExpanded: s((e, n) => t((t) => ({
266
+ setExpanded: c((e, n) => t((t) => ({
266
267
  ...t,
267
268
  [e]: n
268
269
  })), [])
269
270
  };
270
271
  }
271
- function K({ children: e }) {
272
- return /* @__PURE__ */ C("span", {
272
+ function q({ children: e }) {
273
+ return /* @__PURE__ */ w("span", {
273
274
  className: "truncate text-caption font-semibold uppercase tracking-wider text-text-muted",
274
275
  children: e
275
276
  });
276
277
  }
277
- function q({ view: e, section: n, ...r }) {
278
- let i = t(), { nav: a } = r, o = a.curateEntries(n.entries, R(e, n));
278
+ function J({ view: e, section: n, ...r }) {
279
+ let i = t(), { nav: a } = r, o = a.curateEntries(n.entries, z(e, n));
279
280
  if (o.length === 0) return null;
280
- let s = /* @__PURE__ */ C("ul", { children: o.map((t) => /* @__PURE__ */ C(U, {
281
+ let s = /* @__PURE__ */ w("ul", { children: o.map((t) => /* @__PURE__ */ w(W, {
281
282
  entry: t,
282
283
  viewId: e.id,
283
284
  ...r
284
285
  }, t.id)) });
285
286
  if (n.collapsible) {
286
287
  let t = a.isSectionOpen(e.id, n.id), r = n.label ?? i("shell.sidebar.more", "More"), c = `shell-section-${e.id}-${n.id}`;
287
- return /* @__PURE__ */ w("div", {
288
+ return /* @__PURE__ */ T("div", {
288
289
  "data-shell-section": n.id,
289
290
  className: "pt-2",
290
- children: [/* @__PURE__ */ w("button", {
291
+ children: [/* @__PURE__ */ T("button", {
291
292
  type: "button",
292
293
  "aria-expanded": t,
293
294
  "aria-controls": t ? c : void 0,
294
295
  onClick: () => a.toggleSection(e.id, n.id),
295
- className: x("flex h-7 w-full items-center gap-2 rounded-button ps-2 pe-2.5 text-start hover:bg-bg-sunken", T),
296
+ className: S("flex h-7 w-full items-center gap-2 rounded-button ps-2 pe-2.5 text-start hover:bg-bg-sunken", E),
296
297
  children: [
297
- /* @__PURE__ */ C(K, { children: r }),
298
- /* @__PURE__ */ C("span", {
298
+ /* @__PURE__ */ w(q, { children: r }),
299
+ /* @__PURE__ */ w("span", {
299
300
  className: "inline-flex h-4.5 min-w-4.5 items-center justify-center rounded-pill bg-bg-sunken px-1 text-caption leading-none tabular-nums text-text-secondary",
300
301
  children: o.length
301
302
  }),
302
- /* @__PURE__ */ C("span", { className: "flex-1" }),
303
- C(t ? g : m, {
303
+ /* @__PURE__ */ w("span", { className: "flex-1" }),
304
+ w(t ? _ : h, {
304
305
  "aria-hidden": "true",
305
306
  className: "size-3.5 text-text-muted"
306
307
  })
307
308
  ]
308
- }), t ? /* @__PURE__ */ C("div", {
309
+ }), t ? /* @__PURE__ */ w("div", {
309
310
  id: c,
310
311
  children: s
311
312
  }) : null]
312
313
  });
313
314
  }
314
- return /* @__PURE__ */ w("div", {
315
+ return /* @__PURE__ */ T("div", {
315
316
  "data-shell-section": n.id,
316
- children: [n.label ? /* @__PURE__ */ C("div", {
317
+ children: [n.label ? /* @__PURE__ */ w("div", {
317
318
  className: "px-2 pb-1.5 pt-3.5",
318
- children: /* @__PURE__ */ C(K, { children: n.label })
319
+ children: /* @__PURE__ */ w(q, { children: n.label })
319
320
  }) : null, s]
320
321
  });
321
322
  }
322
- function J({ entry: e, shortcut: t, nav: n, onNavigate: r, hrefFor: i }) {
323
+ function Y({ entry: e, shortcut: t, nav: n, onNavigate: r, hrefFor: i }) {
323
324
  let a = n.isEntryActive(e), o = e.icon;
324
- return /* @__PURE__ */ w("div", {
325
+ return /* @__PURE__ */ T("div", {
325
326
  className: "relative",
326
327
  "data-shell-entry": e.id,
327
328
  "data-active": a ? "true" : void 0,
328
- children: [a ? /* @__PURE__ */ C(D, {}) : null, /* @__PURE__ */ w(M, {
329
- href: j(e.path, i),
329
+ children: [a ? /* @__PURE__ */ w(O, {}) : null, /* @__PURE__ */ T(N, {
330
+ href: M(e.path, i),
330
331
  onActivate: () => {
331
332
  e.drillTo && n.push(e.drillTo), e.path && r(e.path);
332
333
  },
333
334
  active: a,
334
335
  drill: e.drillTo,
335
- className: x("flex h-9.5 w-full items-center gap-2.5 rounded-button ps-2 pe-2 text-start", E(a), T),
336
+ className: S("flex h-9.5 w-full items-center gap-2.5 rounded-button ps-2 pe-2 text-start", D(a), E),
336
337
  children: [
337
- /* @__PURE__ */ C("span", {
338
+ /* @__PURE__ */ w("span", {
338
339
  "aria-hidden": "true",
339
340
  className: "flex size-5.5 shrink-0 items-center justify-center rounded-md bg-linear-to-br from-brand-primary to-brand-secondary text-action-primary-text",
340
- children: o ? /* @__PURE__ */ C(o, { className: "size-3.5" }) : null
341
+ children: o ? /* @__PURE__ */ w(o, { className: "size-3.5" }) : null
341
342
  }),
342
- /* @__PURE__ */ C("span", {
343
+ /* @__PURE__ */ w("span", {
343
344
  className: "min-w-0 flex-1 truncate text-body-sm font-semibold text-text-primary",
344
345
  children: e.label
345
346
  }),
346
- t ? /* @__PURE__ */ C(O, { children: t }) : null
347
+ t ? /* @__PURE__ */ w(k, { children: t }) : null
347
348
  ]
348
349
  })]
349
350
  });
350
351
  }
351
- function Y({ view: e, nav: t }) {
352
+ function X({ view: e, nav: t }) {
352
353
  let n = e.header?.icon;
353
- return /* @__PURE__ */ w("div", {
354
+ return /* @__PURE__ */ T("div", {
354
355
  className: "pb-1",
355
- children: [e.back ? /* @__PURE__ */ w("button", {
356
+ children: [e.back ? /* @__PURE__ */ T("button", {
356
357
  type: "button",
357
358
  onClick: () => t.back(),
358
359
  "data-shell-back": "",
359
- className: x("flex h-7 w-full items-center gap-2 rounded-button px-2 text-start text-text-secondary hover:bg-bg-sunken hover:text-text-primary", T),
360
- children: [/* @__PURE__ */ C(p, {
360
+ className: S("flex h-7 w-full items-center gap-2 rounded-button px-2 text-start text-text-secondary hover:bg-bg-sunken hover:text-text-primary", E),
361
+ children: [/* @__PURE__ */ w(m, {
361
362
  "aria-hidden": "true",
362
- className: x("size-3.5 shrink-0", P)
363
- }), /* @__PURE__ */ C("span", {
363
+ className: S("size-3.5 shrink-0", F)
364
+ }), /* @__PURE__ */ w("span", {
364
365
  className: "truncate text-body-sm",
365
366
  children: e.back.label
366
367
  })]
367
- }) : null, e.header ? /* @__PURE__ */ w("div", {
368
+ }) : null, e.header ? /* @__PURE__ */ T("div", {
368
369
  className: "flex items-center gap-2.5 px-2 pb-2 pt-2.5",
369
- children: [/* @__PURE__ */ C("span", {
370
+ children: [/* @__PURE__ */ w("span", {
370
371
  "aria-hidden": "true",
371
372
  className: "flex size-8 shrink-0 items-center justify-center rounded-button border border-border-subtle bg-bg-elevated",
372
- children: n ? /* @__PURE__ */ C(n, { className: "size-4 text-accent-primary" }) : null
373
- }), /* @__PURE__ */ w("span", {
373
+ children: n ? /* @__PURE__ */ w(n, { className: "size-4 text-accent-primary" }) : null
374
+ }), /* @__PURE__ */ T("span", {
374
375
  className: "flex min-w-0 flex-col",
375
- children: [/* @__PURE__ */ C("h2", {
376
+ children: [/* @__PURE__ */ w("h2", {
376
377
  tabIndex: -1,
377
378
  "data-shell-view-title": "",
378
379
  className: "truncate text-body-md font-bold leading-5 text-text-primary outline-none",
379
380
  children: e.header.title
380
- }), e.header.subtitle ? /* @__PURE__ */ C("span", {
381
+ }), e.header.subtitle ? /* @__PURE__ */ w("span", {
381
382
  className: "truncate text-xs leading-4 text-text-muted",
382
383
  children: e.header.subtitle
383
384
  }) : null]
@@ -385,9 +386,9 @@ function Y({ view: e, nav: t }) {
385
386
  }) : null]
386
387
  });
387
388
  }
388
- function X(e, t) {
389
- let n = d(null), r = d(e.activeView.id), i = e.activeView.id;
390
- return l(() => {
389
+ function ee(e, t) {
390
+ let n = f(null), r = f(e.activeView.id), i = e.activeView.id;
391
+ return u(() => {
391
392
  let e = r.current;
392
393
  r.current = i;
393
394
  let a = n.current;
@@ -396,7 +397,7 @@ function X(e, t) {
396
397
  if (!a || e === i || !o) return;
397
398
  let s = document.activeElement;
398
399
  (!s || s === document.body || o.contains(s)) && (o.querySelector(`[data-shell-drill="${CSS.escape(e)}"]`) ?? o.querySelector("[data-shell-back]") ?? o.querySelector("[data-shell-view-title]") ?? o.querySelector("nav a[href], nav button"))?.focus();
399
- }, [i, t]), u(() => ({
400
+ }, [i, t]), d(() => ({
400
401
  ...e,
401
402
  push: (t) => {
402
403
  n.current = "push", e.push(t);
@@ -406,147 +407,149 @@ function X(e, t) {
406
407
  }
407
408
  }), [e]);
408
409
  }
409
- function ee({ view: e, nav: t, expanded: n }) {
410
- return z(e, t, n).map(({ entry: e, open: t }) => ({
410
+ function te({ view: e, nav: t, expanded: n }) {
411
+ return B(e, t, n).map(({ entry: e, open: t }) => ({
411
412
  id: e.id,
412
413
  label: e.label,
413
414
  expanded: t
414
415
  }));
415
416
  }
416
- function te(e, t, n) {
417
- let { view: r, nav: i, expanded: a, setExpanded: o } = e, s = z(r, i, a).find(({ entry: e }) => e.id === t);
418
- return s ? s.open === n ? { status: "already" } : (I(s.entry, s.open, n, {
417
+ function ne(e, t, n) {
418
+ let { view: r, nav: i, expanded: a, setExpanded: o } = e, s = B(r, i, a).find(({ entry: e }) => e.id === t);
419
+ return s ? s.open === n ? { status: "already" } : (L(s.entry, s.open, n, {
419
420
  nav: i,
420
421
  viewId: r.id,
421
422
  setExpanded: o
422
423
  }), { status: "done" }) : { status: "failed" };
423
424
  }
424
- function ne(n) {
425
- let { nav: r, rootId: i, topBlock: a, actions: o, footer: s, primaryEntry: l, primaryShortcut: f, rootAfter: p, banner: m, onNavigate: h, hrefFor: g, onTogglePin: _, isPinned: v, onToggleCollapse: y } = n, b = t(), { expanded: x, setExpanded: T } = G(), E = d(null), D = X(r, E), O = D.activeView, k = O.id === i, A = d({
426
- nav: D,
427
- view: O,
428
- expanded: x,
429
- setExpanded: T,
430
- onToggleCollapse: y
425
+ function re(n) {
426
+ let { nav: r, rootId: i, topBlock: a, actions: o, footer: c, primaryEntry: u, primaryShortcut: p, rootAfter: m, banner: h, onNavigate: g, hrefFor: _, onTogglePin: v, isPinned: y, onToggleCollapse: b } = n, x = t(), { expanded: S, setExpanded: E } = K(), D = f(null);
427
+ s(D);
428
+ let O = ee(r, D), k = O.activeView, A = k.id === i, j = f({
429
+ nav: O,
430
+ view: k,
431
+ expanded: S,
432
+ setExpanded: E,
433
+ onToggleCollapse: b
431
434
  });
432
- c(() => {
433
- A.current = {
434
- nav: D,
435
- view: O,
436
- expanded: x,
437
- setExpanded: T,
438
- onToggleCollapse: y
435
+ l(() => {
436
+ j.current = {
437
+ nav: O,
438
+ view: k,
439
+ expanded: S,
440
+ setExpanded: E,
441
+ onToggleCollapse: b
439
442
  };
440
443
  }, [
441
- D,
442
444
  O,
443
- x,
444
- T,
445
- y
445
+ k,
446
+ S,
447
+ E,
448
+ b
446
449
  ]);
447
- let j = y !== void 0, M = u(() => j ? {
450
+ let M = b !== void 0, N = d(() => M ? {
448
451
  collapsed: () => !1,
449
452
  setCollapsed: (e) => {
450
- let t = A.current.onToggleCollapse;
453
+ let t = j.current.onToggleCollapse;
451
454
  return e ? t ? (t(), { status: "done" }) : { status: "failed" } : { status: "already" };
452
455
  },
453
- entries: () => ee(A.current),
454
- setExpanded: (e, t) => te(A.current, e, t)
455
- } : null, [j]);
456
- e("sidebar", M);
457
- let N = {
458
- nav: D,
459
- onNavigate: h,
460
- hrefFor: g,
461
- onTogglePin: _,
462
- isPinned: v,
463
- expanded: x,
464
- setExpanded: T
456
+ entries: () => te(j.current),
457
+ setExpanded: (e, t) => ne(j.current, e, t)
458
+ } : null, [M]);
459
+ e("sidebar", N);
460
+ let P = {
461
+ nav: O,
462
+ onNavigate: g,
463
+ hrefFor: _,
464
+ onTogglePin: v,
465
+ isPinned: y,
466
+ expanded: S,
467
+ setExpanded: E
465
468
  };
466
- return /* @__PURE__ */ w("aside", {
467
- ref: E,
469
+ return /* @__PURE__ */ T("aside", {
470
+ ref: D,
468
471
  "data-tour": n["data-tour"],
469
472
  "data-shell-sidebar": "expanded",
470
- "data-shell-view": O.id,
473
+ "data-shell-view": k.id,
471
474
  className: "flex h-full w-[272px] shrink-0 flex-col border-e border-border-subtle bg-bg-surface text-text-primary",
472
475
  children: [
473
- /* @__PURE__ */ C("div", {
476
+ /* @__PURE__ */ w("div", {
474
477
  className: "shrink-0 px-2.5 pt-3",
475
478
  children: a
476
479
  }),
477
- /* @__PURE__ */ C("div", {
480
+ /* @__PURE__ */ w("div", {
478
481
  className: "shrink-0 px-2.5 pt-3",
479
482
  children: o
480
483
  }),
481
- m ? /* @__PURE__ */ C("div", {
484
+ h ? /* @__PURE__ */ w("div", {
482
485
  "data-shell-sidebar-banner": "",
483
486
  className: "shrink-0 px-2.5 pt-2.5",
484
- children: m
487
+ children: h
485
488
  }) : null,
486
- /* @__PURE__ */ C("nav", {
487
- "aria-label": b("shell.sidebar.navigation", "Main navigation"),
489
+ /* @__PURE__ */ w("nav", {
490
+ "aria-label": x("shell.sidebar.navigation", "Main navigation"),
488
491
  className: "scrollbar-slim scrollbar-hover-only min-h-0 flex-1 overflow-y-auto px-2.5 pb-3 pt-2.5",
489
- children: k ? /* @__PURE__ */ w(S, { children: [
490
- l && r.filterEntries([l]).length > 0 ? /* @__PURE__ */ C(J, {
491
- entry: l,
492
- shortcut: f,
493
- nav: D,
494
- onNavigate: h,
495
- hrefFor: g
492
+ children: A ? /* @__PURE__ */ T(C, { children: [
493
+ u && r.filterEntries([u]).length > 0 ? /* @__PURE__ */ w(Y, {
494
+ entry: u,
495
+ shortcut: p,
496
+ nav: O,
497
+ onNavigate: g,
498
+ hrefFor: _
496
499
  }) : null,
497
- O.sections.map((e) => /* @__PURE__ */ C(q, {
498
- view: O,
500
+ k.sections.map((e) => /* @__PURE__ */ w(J, {
501
+ view: k,
499
502
  section: e,
500
- ...N
503
+ ...P
501
504
  }, e.id)),
502
- p
503
- ] }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C(Y, {
504
- view: O,
505
- nav: D
506
- }), O.sections.map((e) => /* @__PURE__ */ C(q, {
507
- view: O,
505
+ m
506
+ ] }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w(X, {
507
+ view: k,
508
+ nav: O
509
+ }), k.sections.map((e) => /* @__PURE__ */ w(J, {
510
+ view: k,
508
511
  section: e,
509
- ...N
512
+ ...P
510
513
  }, e.id))] })
511
514
  }),
512
- /* @__PURE__ */ C("span", {
515
+ /* @__PURE__ */ w("span", {
513
516
  "aria-live": "polite",
514
517
  className: "sr-only",
515
- children: k ? "" : O.header?.title ?? ""
518
+ children: A ? "" : k.header?.title ?? ""
516
519
  }),
517
- /* @__PURE__ */ C("div", {
520
+ /* @__PURE__ */ w("div", {
518
521
  className: "shrink-0 border-t border-border-subtle px-2.5 py-2",
519
- children: s
522
+ children: c
520
523
  })
521
524
  ]
522
525
  });
523
526
  }
524
- function re({ label: e, action: t, children: n }) {
525
- return /* @__PURE__ */ w("section", {
527
+ function ie({ label: e, action: t, children: n }) {
528
+ return /* @__PURE__ */ T("section", {
526
529
  "aria-label": e,
527
530
  "data-shell-block": "",
528
- children: [/* @__PURE__ */ w("div", {
531
+ children: [/* @__PURE__ */ T("div", {
529
532
  className: "flex items-center gap-2 px-2 pb-1.5 pt-3.5",
530
- children: [/* @__PURE__ */ C("span", {
533
+ children: [/* @__PURE__ */ w("span", {
531
534
  className: "min-w-0 flex-1",
532
- children: /* @__PURE__ */ C(K, { children: e })
535
+ children: /* @__PURE__ */ w(q, { children: e })
533
536
  }), t]
534
537
  }), n]
535
538
  });
536
539
  }
537
- function ie({ icon: e, label: t, active: n = !1, href: r, onClick: i, trailing: a }) {
538
- return /* @__PURE__ */ w("div", {
540
+ function ae({ icon: e, label: t, active: n = !1, href: r, onClick: i, trailing: a }) {
541
+ return /* @__PURE__ */ T("div", {
539
542
  "data-active": n ? "true" : void 0,
540
- className: x("group relative flex items-center rounded-button", E(n)),
543
+ className: S("group relative flex items-center rounded-button", D(n)),
541
544
  children: [
542
- n ? /* @__PURE__ */ C(D, {}) : null,
543
- /* @__PURE__ */ w(M, {
545
+ n ? /* @__PURE__ */ w(O, {}) : null,
546
+ /* @__PURE__ */ T(N, {
544
547
  href: r,
545
548
  onActivate: i,
546
549
  active: n,
547
550
  title: t,
548
- className: x("flex h-8 min-w-0 flex-1 items-center gap-2.5 rounded-button ps-2 text-start", a ? "pe-1" : "pe-2.5", T),
549
- children: [e ? /* @__PURE__ */ C(e, { className: A(n, "size-3.5") }) : null, /* @__PURE__ */ C("span", {
551
+ className: S("flex h-8 min-w-0 flex-1 items-center gap-2.5 rounded-button ps-2 text-start", a ? "pe-1" : "pe-2.5", E),
552
+ children: [e ? /* @__PURE__ */ w(e, { className: j(n, "size-3.5") }) : null, /* @__PURE__ */ w("span", {
550
553
  className: "min-w-0 flex-1 truncate text-body-sm",
551
554
  children: t
552
555
  })]
@@ -556,31 +559,31 @@ function ie({ icon: e, label: t, active: n = !1, href: r, onClick: i, trailing:
556
559
  });
557
560
  }
558
561
  function Z({ label: e, hint: t }) {
559
- return /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("span", {
562
+ return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("span", {
560
563
  className: "text-body-sm font-normal",
561
564
  children: e
562
- }), t ? /* @__PURE__ */ C(O, {
565
+ }), t ? /* @__PURE__ */ w(k, {
563
566
  className: "bg-bg-surface",
564
567
  children: t
565
568
  }) : null] });
566
569
  }
567
570
  function Q({ label: e, hint: t, icon: o, active: s = !1, badge: c, href: l, onClick: u, entryId: d, testId: f }) {
568
- let p = c ? `${e}, ${c.value}` : e, m = t ? `${e}, ${t}` : p, h = x("relative mx-auto flex size-10 items-center justify-center rounded-button", s ? "bg-accent-soft text-accent-primary" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary", T), g = /* @__PURE__ */ w(S, { children: [
569
- s ? /* @__PURE__ */ C(D, { offsetClass: "-start-3" }) : null,
570
- /* @__PURE__ */ C(o, { className: "size-4" }),
571
- c ? /* @__PURE__ */ C("span", {
571
+ let p = c ? `${e}, ${c.value}` : e, m = t ? `${e}, ${t}` : p, h = S("relative mx-auto flex size-10 items-center justify-center rounded-button", s ? "bg-accent-soft text-accent-primary" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary", E), g = /* @__PURE__ */ T(C, { children: [
572
+ s ? /* @__PURE__ */ w(O, { offsetClass: "-start-3" }) : null,
573
+ /* @__PURE__ */ w(o, { className: "size-4" }),
574
+ c ? /* @__PURE__ */ w("span", {
572
575
  className: "absolute end-1 top-1",
573
- children: /* @__PURE__ */ C(k, {
576
+ children: /* @__PURE__ */ w(A, {
574
577
  badge: c,
575
578
  compact: !0
576
579
  })
577
580
  }) : null
578
581
  ] });
579
- return /* @__PURE__ */ w(n, {
582
+ return /* @__PURE__ */ T(n, {
580
583
  delayDuration: 200,
581
- children: [/* @__PURE__ */ C(i, {
584
+ children: [/* @__PURE__ */ w(i, {
582
585
  asChild: !0,
583
- children: l ? /* @__PURE__ */ C("a", {
586
+ children: l ? /* @__PURE__ */ w("a", {
584
587
  href: l,
585
588
  onClick: a(u),
586
589
  "aria-label": m,
@@ -590,7 +593,7 @@ function Q({ label: e, hint: t, icon: o, active: s = !1, badge: c, href: l, onCl
590
593
  "data-active": s ? "true" : void 0,
591
594
  className: h,
592
595
  children: g
593
- }) : /* @__PURE__ */ C("button", {
596
+ }) : /* @__PURE__ */ w("button", {
594
597
  type: "button",
595
598
  onClick: u,
596
599
  "aria-label": m,
@@ -601,11 +604,11 @@ function Q({ label: e, hint: t, icon: o, active: s = !1, badge: c, href: l, onCl
601
604
  className: h,
602
605
  children: g
603
606
  })
604
- }), /* @__PURE__ */ C(r, {
607
+ }), /* @__PURE__ */ w(r, {
605
608
  side: "right",
606
609
  sideOffset: 10,
607
610
  className: "flex items-center gap-2 rounded-md border border-border-subtle bg-popover px-2 py-1 text-text-primary shadow-overlay",
608
- children: /* @__PURE__ */ C(Z, {
611
+ children: /* @__PURE__ */ w(Z, {
609
612
  label: e,
610
613
  hint: t
611
614
  })
@@ -613,94 +616,97 @@ function Q({ label: e, hint: t, icon: o, active: s = !1, badge: c, href: l, onCl
613
616
  });
614
617
  }
615
618
  function $() {
616
- return /* @__PURE__ */ C("span", {
619
+ return /* @__PURE__ */ w("span", {
617
620
  "aria-hidden": "true",
618
621
  className: "mx-auto my-1.5 h-px w-8 shrink-0 bg-border-subtle"
619
622
  });
620
623
  }
621
- function ae(n) {
622
- let { nav: r, views: i, rootId: a, primaryEntry: s, banner: l, onNavigate: f, hrefFor: p, logo: m, onExpand: h, onNew: g, newSlot: v, onSearch: x, bell: S, avatar: T } = n, E = t(), D = d(h);
623
- c(() => {
624
- D.current = h;
625
- }, [h]);
626
- let O = u(() => ({
624
+ function oe(n) {
625
+ let { nav: r, views: i, rootId: a, primaryEntry: c, banner: u, onNavigate: p, hrefFor: m, logo: h, onExpand: g, onNew: _, newSlot: y, onSearch: S, bell: C, avatar: E } = n, D = t(), O = f(null);
626
+ s(O);
627
+ let k = f(g);
628
+ l(() => {
629
+ k.current = g;
630
+ }, [g]);
631
+ let A = d(() => ({
627
632
  collapsed: () => !0,
628
- setCollapsed: (e) => e ? { status: "already" } : (D.current(), { status: "done" }),
633
+ setCollapsed: (e) => e ? { status: "already" } : (k.current(), { status: "done" }),
629
634
  entries: () => [],
630
635
  setExpanded: () => ({ status: "failed" })
631
636
  }), []);
632
- e("sidebar", O);
633
- let k = i.find((e) => e.id === a) ?? i[0], A = k ? r.curateEntries(k.sections.flatMap((e) => e.entries), `${k.id}:rail`).filter((e) => !o(e)) : [], M = s ? r.filterEntries([s])[0] : void 0, N = (e) => {
634
- e.drillTo && r.push(e.drillTo), e.path ? f(e.path) : e.drillTo && h();
635
- }, P = (e) => r.isEntryActive(e) || e.drillTo !== void 0 && r.activeView.id === e.drillTo || (e.children ?? []).some((e) => o(e) ? (e.children ?? []).some((e) => r.isEntryActive(e)) : r.isEntryActive(e));
636
- return /* @__PURE__ */ w("aside", {
637
+ e("sidebar", A);
638
+ let j = i.find((e) => e.id === a) ?? i[0], N = j ? r.curateEntries(j.sections.flatMap((e) => e.entries), `${j.id}:rail`).filter((e) => !o(e)) : [], P = c ? r.filterEntries([c])[0] : void 0, F = (e) => {
639
+ e.drillTo && r.push(e.drillTo), e.path ? p(e.path) : e.drillTo && g();
640
+ }, I = (e) => r.isEntryActive(e) || e.drillTo !== void 0 && r.activeView.id === e.drillTo || (e.children ?? []).some((e) => o(e) ? (e.children ?? []).some((e) => r.isEntryActive(e)) : r.isEntryActive(e));
641
+ return /* @__PURE__ */ T("aside", {
642
+ ref: O,
637
643
  "data-tour": n["data-tour"],
638
644
  "data-shell-sidebar": "rail",
639
645
  className: "flex h-full w-16 shrink-0 flex-col border-e border-border-subtle bg-bg-surface text-text-primary",
640
646
  children: [
641
- /* @__PURE__ */ C("div", {
647
+ /* @__PURE__ */ w("div", {
642
648
  className: "flex shrink-0 justify-center pt-4",
643
- children: m
649
+ children: h
644
650
  }),
645
- l ? /* @__PURE__ */ C("div", {
651
+ u ? /* @__PURE__ */ w("div", {
646
652
  "data-shell-sidebar-banner": "",
647
653
  className: "flex shrink-0 justify-center px-1 pt-2.5",
648
- children: l
654
+ children: u
649
655
  }) : null,
650
- /* @__PURE__ */ w("nav", {
651
- "aria-label": E("shell.sidebar.navigation", "Main navigation"),
656
+ /* @__PURE__ */ T("nav", {
657
+ "aria-label": D("shell.sidebar.navigation", "Main navigation"),
652
658
  className: "scrollbar-slim flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto pt-2.5",
653
659
  children: [
654
- /* @__PURE__ */ C(Q, {
655
- label: E("shell.sidebar.expand", "Expand sidebar"),
656
- icon: _,
657
- onClick: h,
660
+ /* @__PURE__ */ w(Q, {
661
+ label: D("shell.sidebar.expand", "Expand sidebar"),
662
+ icon: v,
663
+ onClick: g,
658
664
  testId: "shell-rail-expand"
659
665
  }),
660
- v ? /* @__PURE__ */ C("div", {
666
+ y ? /* @__PURE__ */ w("div", {
661
667
  className: "flex justify-center",
662
- children: v
663
- }) : /* @__PURE__ */ C(Q, {
664
- label: E("shell.sidebar.new", "New"),
665
- icon: y,
666
- onClick: g
667
- }),
668
- /* @__PURE__ */ C(Q, {
669
- label: E("shell.sidebar.search", "Search"),
668
+ children: y
669
+ }) : /* @__PURE__ */ w(Q, {
670
+ label: D("shell.sidebar.new", "New"),
670
671
  icon: b,
671
- onClick: x
672
+ onClick: _
673
+ }),
674
+ /* @__PURE__ */ w(Q, {
675
+ label: D("shell.sidebar.search", "Search"),
676
+ icon: x,
677
+ onClick: S
672
678
  }),
673
- /* @__PURE__ */ C($, {}),
674
- M?.icon ? /* @__PURE__ */ C(Q, {
675
- label: M.label,
676
- icon: M.icon,
677
- active: P(M),
678
- href: j(M.path, p),
679
- onClick: () => N(M),
680
- entryId: M.id
679
+ /* @__PURE__ */ w($, {}),
680
+ P?.icon ? /* @__PURE__ */ w(Q, {
681
+ label: P.label,
682
+ icon: P.icon,
683
+ active: I(P),
684
+ href: M(P.path, m),
685
+ onClick: () => F(P),
686
+ entryId: P.id
681
687
  }) : null,
682
- A.map((e) => e.icon ? /* @__PURE__ */ C(Q, {
688
+ N.map((e) => e.icon ? /* @__PURE__ */ w(Q, {
683
689
  label: e.label,
684
690
  hint: e.badge?.hint,
685
691
  icon: e.icon,
686
- active: P(e),
692
+ active: I(e),
687
693
  badge: e.badge,
688
- href: j(e.path, p),
689
- onClick: () => N(e),
694
+ href: M(e.path, m),
695
+ onClick: () => F(e),
690
696
  entryId: e.id
691
697
  }, e.id) : null),
692
- /* @__PURE__ */ C($, {}),
693
- /* @__PURE__ */ C("div", {
698
+ /* @__PURE__ */ w($, {}),
699
+ /* @__PURE__ */ w("div", {
694
700
  className: "flex justify-center",
695
- children: S
701
+ children: C
696
702
  })
697
703
  ]
698
704
  }),
699
- /* @__PURE__ */ C("div", {
705
+ /* @__PURE__ */ w("div", {
700
706
  className: "flex shrink-0 justify-center border-t border-border-subtle py-3",
701
- children: T
707
+ children: E
702
708
  })
703
709
  ]
704
710
  });
705
711
  }
706
- export { O as ShellKbd, Z as ShellRailTooltipLabel, ne as ShellSidebar, ie as ShellSidebarCompactRow, ae as ShellSidebarRail, re as ShellSidebarSection };
712
+ export { k as ShellKbd, Z as ShellRailTooltipLabel, re as ShellSidebar, ae as ShellSidebarCompactRow, oe as ShellSidebarRail, ie as ShellSidebarSection };