@burdenoff/fe-libs 2026.1119.7 → 2026.1119.9

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 (32) hide show
  1. package/dist/chrome/shell/ShellSidebar.js +159 -157
  2. package/dist/chrome/shell/SidebarProfileMenu.js +193 -190
  3. package/dist/chrome/shell/WorkspaceAccountCard.js +45 -40
  4. package/dist/chrome/shell/WorkspaceMenu.js +140 -136
  5. package/dist/chrome/shell/shellSidebarAppearance.d.ts +4 -0
  6. package/dist/chrome/shell/shellSidebarAppearance.js +7 -0
  7. package/dist/chrome/shell/sidebarPopupPlacement.d.ts +21 -0
  8. package/dist/chrome/shell/sidebarPopupPlacement.js +28 -0
  9. package/dist/connections/ConnectionDialogPanel.js +222 -203
  10. package/dist/connections/ConnectionFormTab.d.ts +6 -0
  11. package/dist/connections/ConnectionFormTab.js +2 -2
  12. package/dist/connections/api.d.ts +28 -0
  13. package/dist/connections/api.js +107 -71
  14. package/dist/connections/connectionFlow.d.ts +63 -1
  15. package/dist/connections/connectionFlow.js +139 -47
  16. package/dist/connections/index.d.ts +2 -2
  17. package/dist/connections/oauthPopup.d.ts +16 -1
  18. package/dist/connections/oauthPopup.js +45 -37
  19. package/dist/connections/useConnectionSubmit.d.ts +7 -2
  20. package/dist/connections/useConnectionSubmit.js +69 -55
  21. package/dist/connections.js +6 -6
  22. package/dist/ui/dropdown-menu.d.ts +12 -2
  23. package/dist/ui/dropdown-menu.js +53 -50
  24. package/dist/ui/glass-surface.d.ts +7 -0
  25. package/dist/ui/glass-surface.js +14 -0
  26. package/dist/ui/popover.d.ts +1 -1
  27. package/dist/ui/popover.js +17 -15
  28. package/dist/ui/select.js +69 -68
  29. package/dist/ui/tooltip.d.ts +6 -0
  30. package/dist/ui/tooltip.js +18 -14
  31. package/package.json +1 -1
  32. package/src/shared/tokens/display-settings.css +3 -0
@@ -1,17 +1,19 @@
1
1
  import { useAssistantControl as e } from "../../shared/assistant/appControls/useAssistantControl.js";
2
2
  import { useShellLabel as t } from "../../shared/providers/shell/useShellLabel.js";
3
- import { Tooltip as n, TooltipContent as r, TooltipTrigger as i } from "../../ui/tooltip.js";
4
- import { navLinkClick as a } from "./navLink.js";
5
- import { isShellNavMoreEntry as o } from "./shellNavVisibility.js";
6
- import { usePublishShellSidebarWidth as s } from "./shellSidebarWidth.js";
7
- import { createContext as c, useCallback as l, useContext as u, useEffect as d, useId as f, useLayoutEffect as p, useMemo as m, useRef as h, useState as g } from "react";
8
- import { ArrowLeft as _, ChevronDown as v, ChevronRight as y, ChevronUp as b, PanelLeft as x, Pin as S, Plus as C, Search as w } from "lucide-react";
3
+ import { GlassSurfaceScope as n } from "../../ui/glass-surface.js";
4
+ import { Tooltip as r, TooltipContent as i, TooltipTrigger as a } from "../../ui/tooltip.js";
5
+ import { navLinkClick as o } from "./navLink.js";
6
+ import { isShellNavMoreEntry as s } from "./shellNavVisibility.js";
7
+ import { ShellSidebarAppearanceContext as c } from "./shellSidebarAppearance.js";
8
+ import { usePublishShellSidebarWidth as l } from "./shellSidebarWidth.js";
9
+ import { useCallback as u, useContext as d, useEffect as f, useId as p, useLayoutEffect as m, useMemo as h, useRef as g, useState as _ } from "react";
10
+ import { ArrowLeft as v, ChevronDown as y, ChevronRight as b, ChevronUp as x, PanelLeft as S, Pin as C, Plus as w, Search as ee } from "lucide-react";
9
11
  import { clsx as T } from "clsx";
10
12
  import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
11
13
  // src/chrome/shell/ShellSidebar.tsx
12
- var k = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring", A = c("default");
14
+ var k = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring", A = c;
13
15
  function j() {
14
- return u(A) === "floating";
16
+ return d(A) === "floating";
15
17
  }
16
18
  var M = "bg-text-primary/6", N = "hover:bg-text-primary/4";
17
19
  function P(e, t = !1) {
@@ -49,13 +51,13 @@ function B(e, t = "size-4") {
49
51
  function V(e, t) {
50
52
  if (e) return t ? t(e) : e;
51
53
  }
52
- function H({ href: e, onActivate: t, active: n, expanded: r, drill: i, title: o, className: s, children: c }) {
54
+ function H({ href: e, onActivate: t, active: n, expanded: r, drill: i, title: a, className: s, children: c }) {
53
55
  return e ? /* @__PURE__ */ D("a", {
54
56
  href: e,
55
- onClick: a(t),
57
+ onClick: o(t),
56
58
  "data-shell-drill": i,
57
59
  "aria-current": n ? "page" : void 0,
58
- title: o,
60
+ title: a,
59
61
  className: s,
60
62
  children: c
61
63
  }) : /* @__PURE__ */ D("button", {
@@ -64,20 +66,20 @@ function H({ href: e, onActivate: t, active: n, expanded: r, drill: i, title: o,
64
66
  "data-shell-drill": i,
65
67
  "aria-current": n ? "page" : void 0,
66
68
  "aria-expanded": r,
67
- title: o,
69
+ title: a,
68
70
  className: s,
69
71
  children: c
70
72
  });
71
73
  }
72
- function ee(e, t) {
73
- return (e.children ?? []).some((e) => t.isEntryActive(e) || ee(e, t));
74
+ function U(e, t) {
75
+ return (e.children ?? []).some((e) => t.isEntryActive(e) || U(e, t));
74
76
  }
75
- var U = "rtl:rotate-180";
77
+ var W = "rtl:rotate-180";
76
78
  function te(e, t, { nav: n, viewId: r, expanded: i }) {
77
- return e.path ? i[e.id] ?? (t || ee(e, n)) : n.isSectionOpen(r, `entry:${e.id}`, !o(e));
79
+ return e.path ? i[e.id] ?? (t || U(e, n)) : n.isSectionOpen(r, `entry:${e.id}`, !s(e));
78
80
  }
79
- function W(e, t, n, { nav: r, viewId: i, setExpanded: a }) {
80
- e.path ? a(e.id, n) : n !== t && r.toggleSection(i, `entry:${e.id}`, !o(e));
81
+ function ne(e, t, n, { nav: r, viewId: i, setExpanded: a }) {
82
+ e.path ? a(e.id, n) : n !== t && r.toggleSection(i, `entry:${e.id}`, !s(e));
81
83
  }
82
84
  function G(e, t, n, r) {
83
85
  if (!t) return {
@@ -87,7 +89,7 @@ function G(e, t, n, r) {
87
89
  let i = te(e, n, r);
88
90
  return {
89
91
  open: i,
90
- setOpen: (t) => W(e, i, t, r)
92
+ setOpen: (t) => ne(e, i, t, r)
91
93
  };
92
94
  }
93
95
  function K(e, t) {
@@ -95,17 +97,17 @@ function K(e, t) {
95
97
  }
96
98
  function q(e, t, n) {
97
99
  let r = [], i = (a) => {
98
- for (let s of a) {
99
- if (o(s)) continue;
100
- let a = s.children ?? [];
100
+ for (let o of a) {
101
+ if (s(o)) continue;
102
+ let a = o.children ?? [];
101
103
  if (a.length === 0) continue;
102
- let c = te(s, t.isEntryActive(s), {
104
+ let c = te(o, t.isEntryActive(o), {
103
105
  nav: t,
104
106
  viewId: e.id,
105
107
  expanded: n
106
108
  });
107
109
  r.push({
108
- entry: s,
110
+ entry: o,
109
111
  open: c
110
112
  }), i(a);
111
113
  }
@@ -114,12 +116,12 @@ function q(e, t, n) {
114
116
  return r;
115
117
  }
116
118
  function J({ open: e }) {
117
- return e ? /* @__PURE__ */ D(v, {
119
+ return e ? /* @__PURE__ */ D(y, {
118
120
  "aria-hidden": "true",
119
121
  className: "size-3.5 shrink-0"
120
- }) : /* @__PURE__ */ D(y, {
122
+ }) : /* @__PURE__ */ D(b, {
121
123
  "aria-hidden": "true",
122
- className: T("size-3.5 shrink-0", U)
124
+ className: T("size-3.5 shrink-0", W)
123
125
  });
124
126
  }
125
127
  function Y({ entry: e, open: n, onToggle: r }) {
@@ -141,20 +143,20 @@ function X({ entries: e, rowProps: t }) {
141
143
  className: "pointer-events-none absolute inset-y-0 start-6.75 w-px bg-border-subtle"
142
144
  }), /* @__PURE__ */ D("ul", {
143
145
  className: "ms-8.5",
144
- children: e.map((e) => /* @__PURE__ */ D(ae, {
146
+ children: e.map((e) => /* @__PURE__ */ D(oe, {
145
147
  entry: e,
146
148
  ...t
147
149
  }, e.id))
148
150
  })]
149
151
  });
150
152
  }
151
- function ne({ entry: e, viewId: n, nav: r, onNavigate: i, hrefFor: a, onTogglePin: o, isPinned: s, expanded: c, setExpanded: l }) {
153
+ function re({ entry: e, viewId: n, nav: r, onNavigate: i, hrefFor: a, onTogglePin: o, isPinned: s, expanded: c, setExpanded: l }) {
152
154
  let u = t(), d = j(), f = r.isEntryActive(e), p = e.children ? r.filterEntries(e.children) : [], m = p.length > 0, { open: h, setOpen: g } = G(e, m, f, {
153
155
  nav: r,
154
156
  viewId: n,
155
157
  expanded: c,
156
158
  setExpanded: l
157
- }), _ = !!e.subtitle, v = s?.(e) ?? !1, b = !!(e.pinnable && o), x = e.icon, C = () => {
159
+ }), _ = !!e.subtitle, v = s?.(e) ?? !1, y = !!(e.pinnable && o), x = e.icon, S = () => {
158
160
  e.drillTo && r.push(e.drillTo), e.path && i(e.path), m && g(e.path ? !0 : !h);
159
161
  }, w = d ? _ ? "items-start py-1.25" : "h-7.5 items-center" : _ ? "items-start py-1.5" : "h-8.5 items-center";
160
162
  return /* @__PURE__ */ O("li", { children: [/* @__PURE__ */ O("div", {
@@ -166,11 +168,11 @@ function ne({ entry: e, viewId: n, nav: r, onNavigate: i, hrefFor: a, onTogglePi
166
168
  f && !d ? /* @__PURE__ */ D(L, {}) : null,
167
169
  /* @__PURE__ */ O(H, {
168
170
  href: V(e.path, a),
169
- onActivate: C,
171
+ onActivate: S,
170
172
  active: f,
171
173
  expanded: m ? h : void 0,
172
174
  drill: e.drillTo,
173
- className: T("flex min-w-0 flex-1 gap-3 rounded-button ps-2 text-start", w, b || m && e.path ? "pe-1" : d ? "pe-2" : "pe-2.5", k),
175
+ className: T("flex min-w-0 flex-1 gap-3 rounded-button ps-2 text-start", w, y || m && e.path ? "pe-1" : d ? "pe-2" : "pe-2.5", k),
174
176
  children: [
175
177
  x ? /* @__PURE__ */ D(x, { className: T(B(f), _ && "mt-0.5") }) : null,
176
178
  /* @__PURE__ */ O("span", {
@@ -188,9 +190,9 @@ function ne({ entry: e, viewId: n, nav: r, onNavigate: i, hrefFor: a, onTogglePi
188
190
  children: e.count
189
191
  }),
190
192
  e.badge ? /* @__PURE__ */ D(z, { badge: e.badge }) : null,
191
- e.drillTo ? /* @__PURE__ */ D(y, {
193
+ e.drillTo ? /* @__PURE__ */ D(b, {
192
194
  "aria-hidden": "true",
193
- className: T("size-3.5 shrink-0 text-text-muted", U)
195
+ className: T("size-3.5 shrink-0 text-text-muted", W)
194
196
  }) : null,
195
197
  m && !e.path ? /* @__PURE__ */ D("span", {
196
198
  className: "text-text-muted",
@@ -203,13 +205,13 @@ function ne({ entry: e, viewId: n, nav: r, onNavigate: i, hrefFor: a, onTogglePi
203
205
  open: h,
204
206
  onToggle: () => g(!h)
205
207
  }) : null,
206
- b ? /* @__PURE__ */ D("button", {
208
+ y ? /* @__PURE__ */ D("button", {
207
209
  type: "button",
208
210
  onClick: () => o?.(e),
209
211
  "aria-pressed": v,
210
212
  "aria-label": v ? u("shell.sidebar.unpin", "Unpin {{label}}", { label: e.label }) : u("shell.sidebar.pin", "Pin {{label}} to the sidebar", { label: e.label }),
211
213
  className: T("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", k),
212
- children: /* @__PURE__ */ D(S, {
214
+ children: /* @__PURE__ */ D(C, {
213
215
  "aria-hidden": "true",
214
216
  className: "size-3.5"
215
217
  })
@@ -229,19 +231,19 @@ function ne({ entry: e, viewId: n, nav: r, onNavigate: i, hrefFor: a, onTogglePi
229
231
  }
230
232
  }) : null] });
231
233
  }
232
- function re(e, t) {
234
+ function ie(e, t) {
233
235
  return T("relative flex rounded-button", t && "group", P(e, t));
234
236
  }
235
- function ie(e, t, n) {
237
+ function ae(e, t, n) {
236
238
  return T("flex h-7.5 min-w-0 flex-1 items-center gap-3 rounded-button ps-2 text-start", t && e.path ? "pe-1" : n ? "pe-2" : "pe-2.5", k);
237
239
  }
238
- function ae({ entry: e, ...t }) {
240
+ function oe({ entry: e, ...t }) {
239
241
  let { nav: n, onNavigate: r, hrefFor: i } = t, a = j(), o = n.isEntryActive(e), s = e.children ? n.filterEntries(e.children) : [], c = s.length > 0, { open: l, setOpen: u } = G(e, c, o, t), d = e.icon;
240
242
  return /* @__PURE__ */ O("li", { children: [/* @__PURE__ */ O("div", {
241
243
  "data-shell-entry": e.id,
242
244
  "data-active": o ? "true" : void 0,
243
245
  "data-depth": F(a),
244
- className: re(o, a),
246
+ className: ie(o, a),
245
247
  children: [/* @__PURE__ */ O(H, {
246
248
  href: V(e.path, i),
247
249
  onActivate: () => {
@@ -250,7 +252,7 @@ function ae({ entry: e, ...t }) {
250
252
  active: o,
251
253
  expanded: c ? l : void 0,
252
254
  drill: e.drillTo,
253
- className: ie(e, c, a),
255
+ className: ae(e, c, a),
254
256
  children: [
255
257
  d ? /* @__PURE__ */ D(d, { className: B(o) }) : null,
256
258
  /* @__PURE__ */ D("span", {
@@ -277,11 +279,11 @@ function ae({ entry: e, ...t }) {
277
279
  rowProps: t
278
280
  }) : null] });
279
281
  }
280
- function oe() {
281
- let [e, t] = g({});
282
+ function se() {
283
+ let [e, t] = _({});
282
284
  return {
283
285
  expanded: e,
284
- setExpanded: l((e, n) => t((t) => ({
286
+ setExpanded: u((e, n) => t((t) => ({
285
287
  ...t,
286
288
  [e]: n
287
289
  })), [])
@@ -293,7 +295,7 @@ function Z({ children: e, floating: t = !1 }) {
293
295
  children: e
294
296
  });
295
297
  }
296
- function se({ label: e, count: t, open: n, controls: r, floating: i, onToggle: a }) {
298
+ function ce({ label: e, count: t, open: n, controls: r, floating: i, onToggle: a }) {
297
299
  return /* @__PURE__ */ O("button", {
298
300
  type: "button",
299
301
  "aria-expanded": n,
@@ -302,7 +304,7 @@ function se({ label: e, count: t, open: n, controls: r, floating: i, onToggle: a
302
304
  "data-shell-section-toggle": "",
303
305
  className: T("flex h-8 w-full min-w-0 flex-1 items-center gap-1.5 rounded-button px-2 text-start", i ? N : "hover:bg-bg-sunken", k),
304
306
  children: [
305
- /* @__PURE__ */ D(v, {
307
+ /* @__PURE__ */ D(y, {
306
308
  "aria-hidden": "true",
307
309
  className: T("size-3.5 shrink-0 text-text-muted transition-transform duration-normal motion-reduce:transition-none", !n && "-rotate-90 rtl:rotate-90")
308
310
  }),
@@ -318,8 +320,8 @@ function se({ label: e, count: t, open: n, controls: r, floating: i, onToggle: a
318
320
  ]
319
321
  });
320
322
  }
321
- function ce({ view: e, section: n, nav: r, count: i, children: a }) {
322
- let o = t(), s = j(), c = r.isSectionOpen(e.id, n.id), l = n.label ?? o("shell.sidebar.more", "More"), u = `shell-section-${e.id}-${n.id}`, d = () => r.toggleSection(e.id, n.id), f = s ? /* @__PURE__ */ D(se, {
323
+ function le({ view: e, section: n, nav: r, count: i, children: a }) {
324
+ let o = t(), s = j(), c = r.isSectionOpen(e.id, n.id), l = n.label ?? o("shell.sidebar.more", "More"), u = `shell-section-${e.id}-${n.id}`, d = () => r.toggleSection(e.id, n.id), f = s ? /* @__PURE__ */ D(ce, {
323
325
  label: l,
324
326
  count: i,
325
327
  open: c,
@@ -339,7 +341,7 @@ function ce({ view: e, section: n, nav: r, count: i, children: a }) {
339
341
  children: i
340
342
  }),
341
343
  /* @__PURE__ */ D("span", { className: "flex-1" }),
342
- D(c ? b : v, {
344
+ D(c ? x : y, {
343
345
  "aria-hidden": "true",
344
346
  className: "size-3.5 text-text-muted"
345
347
  })
@@ -354,15 +356,15 @@ function ce({ view: e, section: n, nav: r, count: i, children: a }) {
354
356
  }) : null]
355
357
  });
356
358
  }
357
- function Q({ view: e, section: t, ...n }) {
359
+ function ue({ view: e, section: t, ...n }) {
358
360
  let r = j(), { nav: i } = n, a = i.curateEntries(t.entries, K(e, t));
359
361
  if (a.length === 0) return null;
360
- let o = /* @__PURE__ */ D("ul", { children: a.map((t) => /* @__PURE__ */ D(ne, {
362
+ let o = /* @__PURE__ */ D("ul", { children: a.map((t) => /* @__PURE__ */ D(re, {
361
363
  entry: t,
362
364
  viewId: e.id,
363
365
  ...n
364
366
  }, t.id)) });
365
- return t.collapsible ? /* @__PURE__ */ D(ce, {
367
+ return t.collapsible ? /* @__PURE__ */ D(le, {
366
368
  view: e,
367
369
  section: t,
368
370
  nav: i,
@@ -379,7 +381,7 @@ function Q({ view: e, section: t, ...n }) {
379
381
  }) : null, o]
380
382
  });
381
383
  }
382
- function le({ entry: e, shortcut: t, nav: n, onNavigate: r, hrefFor: i }) {
384
+ function de({ entry: e, shortcut: t, nav: n, onNavigate: r, hrefFor: i }) {
383
385
  let a = j(), o = n.isEntryActive(e), s = e.icon;
384
386
  return /* @__PURE__ */ O("div", {
385
387
  className: a ? "relative mb-1.5" : "relative",
@@ -409,7 +411,7 @@ function le({ entry: e, shortcut: t, nav: n, onNavigate: r, hrefFor: i }) {
409
411
  })]
410
412
  });
411
413
  }
412
- function ue({ view: e, nav: t }) {
414
+ function fe({ view: e, nav: t }) {
413
415
  let n = j(), r = e.header?.icon;
414
416
  return /* @__PURE__ */ O("div", {
415
417
  className: "pb-1",
@@ -418,9 +420,9 @@ function ue({ view: e, nav: t }) {
418
420
  onClick: () => t.back(),
419
421
  "data-shell-back": "",
420
422
  className: T(n ? `flex h-8 w-full items-center gap-2 rounded-button px-2 text-start text-text-secondary ${N} hover:text-text-primary` : "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", k),
421
- children: [/* @__PURE__ */ D(_, {
423
+ children: [/* @__PURE__ */ D(v, {
422
424
  "aria-hidden": "true",
423
- className: T("size-3.5 shrink-0", U)
425
+ className: T("size-3.5 shrink-0", W)
424
426
  }), /* @__PURE__ */ D("span", {
425
427
  className: "truncate text-body-sm",
426
428
  children: e.back.label
@@ -446,9 +448,9 @@ function ue({ view: e, nav: t }) {
446
448
  }) : null]
447
449
  });
448
450
  }
449
- function de(e, t) {
450
- let n = h(null), r = h(e.activeView.id), i = e.activeView.id;
451
- return p(() => {
451
+ function pe(e, t) {
452
+ let n = g(null), r = g(e.activeView.id), i = e.activeView.id;
453
+ return m(() => {
452
454
  let e = r.current;
453
455
  r.current = i;
454
456
  let a = n.current;
@@ -457,7 +459,7 @@ function de(e, t) {
457
459
  if (!a || e === i || !o) return;
458
460
  let s = document.activeElement;
459
461
  (!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();
460
- }, [i, t]), m(() => ({
462
+ }, [i, t]), h(() => ({
461
463
  ...e,
462
464
  push: (t) => {
463
465
  n.current = "push", e.push(t);
@@ -467,22 +469,22 @@ function de(e, t) {
467
469
  }
468
470
  }), [e]);
469
471
  }
470
- function fe({ view: e, nav: t, expanded: n }) {
472
+ function me({ view: e, nav: t, expanded: n }) {
471
473
  return q(e, t, n).map(({ entry: e, open: t }) => ({
472
474
  id: e.id,
473
475
  label: e.label,
474
476
  expanded: t
475
477
  }));
476
478
  }
477
- function pe(e, t, n) {
479
+ function he(e, t, n) {
478
480
  let { view: r, nav: i, expanded: a, setExpanded: o } = e, s = q(r, i, a).find(({ entry: e }) => e.id === t);
479
- return s ? s.open === n ? { status: "already" } : (W(s.entry, s.open, n, {
481
+ return s ? s.open === n ? { status: "already" } : (ne(s.entry, s.open, n, {
480
482
  nav: i,
481
483
  viewId: r.id,
482
484
  setExpanded: o
483
485
  }), { status: "done" }) : { status: "failed" };
484
486
  }
485
- var me = "flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border border-border-subtle bg-bg-surface", he = {
487
+ var ge = "flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border border-border-subtle bg-bg-surface", _e = {
486
488
  default: {
487
489
  aside: "flex h-full w-[272px] shrink-0 flex-col border-e border-border-subtle bg-bg-surface text-text-primary",
488
490
  top: "shrink-0 px-2.5 pt-3",
@@ -500,84 +502,84 @@ var me = "flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border border
500
502
  footer: "shrink-0 px-2 pb-2 pt-1.5"
501
503
  }
502
504
  };
503
- function ge(n) {
504
- let { nav: r, rootId: i, topBlock: a, actions: o, footer: c, primaryEntry: l, primaryShortcut: u, rootAfter: f, banner: p, onNavigate: g, hrefFor: _, onTogglePin: v, isPinned: y, onToggleCollapse: b, appearance: x = "default" } = n, S = x === "floating", C = he[x], w = t(), { expanded: T, setExpanded: k } = oe(), j = h(null);
505
- s(j);
506
- let M = de(r, j), N = M.activeView, P = N.id === i, F = h({
505
+ function ve(r) {
506
+ let { nav: i, rootId: a, topBlock: o, actions: s, footer: c, primaryEntry: u, primaryShortcut: d, rootAfter: p, banner: m, onNavigate: _, hrefFor: v, onTogglePin: y, isPinned: b, onToggleCollapse: x, appearance: S = "default" } = r, C = S === "floating", w = _e[S], ee = t(), { expanded: T, setExpanded: k } = se(), j = g(null);
507
+ l(j);
508
+ let M = pe(i, j), N = M.activeView, P = N.id === a, F = g({
507
509
  nav: M,
508
510
  view: N,
509
511
  expanded: T,
510
512
  setExpanded: k,
511
- onToggleCollapse: b
513
+ onToggleCollapse: x
512
514
  });
513
- d(() => {
515
+ f(() => {
514
516
  F.current = {
515
517
  nav: M,
516
518
  view: N,
517
519
  expanded: T,
518
520
  setExpanded: k,
519
- onToggleCollapse: b
521
+ onToggleCollapse: x
520
522
  };
521
523
  }, [
522
524
  M,
523
525
  N,
524
526
  T,
525
527
  k,
526
- b
528
+ x
527
529
  ]);
528
- let I = b !== void 0, L = m(() => I ? {
530
+ let I = x !== void 0, L = h(() => I ? {
529
531
  collapsed: () => !1,
530
532
  setCollapsed: (e) => {
531
533
  let t = F.current.onToggleCollapse;
532
534
  return e ? t ? (t(), { status: "done" }) : { status: "failed" } : { status: "already" };
533
535
  },
534
- entries: () => fe(F.current),
535
- setExpanded: (e, t) => pe(F.current, e, t)
536
+ entries: () => me(F.current),
537
+ setExpanded: (e, t) => he(F.current, e, t)
536
538
  } : null, [I]);
537
539
  e("sidebar", L);
538
540
  let R = {
539
541
  nav: M,
540
- onNavigate: g,
541
- hrefFor: _,
542
- onTogglePin: v,
543
- isPinned: y,
542
+ onNavigate: _,
543
+ hrefFor: v,
544
+ onTogglePin: y,
545
+ isPinned: b,
544
546
  expanded: T,
545
547
  setExpanded: k
546
548
  }, z = /* @__PURE__ */ O(E, { children: [
547
549
  /* @__PURE__ */ D("div", {
548
- className: C.top,
549
- children: a
550
+ className: w.top,
551
+ children: o
550
552
  }),
551
553
  /* @__PURE__ */ D("div", {
552
- className: C.actions,
553
- children: o
554
+ className: w.actions,
555
+ children: s
554
556
  }),
555
- p ? /* @__PURE__ */ D("div", {
557
+ m ? /* @__PURE__ */ D("div", {
556
558
  "data-shell-sidebar-banner": "",
557
- className: C.banner,
558
- children: p
559
+ className: w.banner,
560
+ children: m
559
561
  }) : null,
560
562
  /* @__PURE__ */ D("nav", {
561
- "aria-label": w("shell.sidebar.navigation", "Main navigation"),
562
- className: C.nav,
563
+ "aria-label": ee("shell.sidebar.navigation", "Main navigation"),
564
+ className: w.nav,
563
565
  children: P ? /* @__PURE__ */ O(E, { children: [
564
- l && r.filterEntries([l]).length > 0 ? /* @__PURE__ */ D(le, {
565
- entry: l,
566
- shortcut: u,
566
+ u && i.filterEntries([u]).length > 0 ? /* @__PURE__ */ D(de, {
567
+ entry: u,
568
+ shortcut: d,
567
569
  nav: M,
568
- onNavigate: g,
569
- hrefFor: _
570
+ onNavigate: _,
571
+ hrefFor: v
570
572
  }) : null,
571
- N.sections.map((e) => /* @__PURE__ */ D(Q, {
573
+ N.sections.map((e) => /* @__PURE__ */ D(ue, {
572
574
  view: N,
573
575
  section: e,
574
576
  ...R
575
577
  }, e.id)),
576
- f
577
- ] }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(ue, {
578
+ p
579
+ ] }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(fe, {
578
580
  view: N,
579
581
  nav: M
580
- }), N.sections.map((e) => /* @__PURE__ */ D(Q, {
582
+ }), N.sections.map((e) => /* @__PURE__ */ D(ue, {
581
583
  view: N,
582
584
  section: e,
583
585
  ...R
@@ -589,30 +591,30 @@ function ge(n) {
589
591
  children: P ? "" : N.header?.title ?? ""
590
592
  }),
591
593
  /* @__PURE__ */ D("div", {
592
- className: C.footer,
594
+ className: w.footer,
593
595
  children: c
594
596
  })
595
597
  ] });
596
598
  return /* @__PURE__ */ D(A.Provider, {
597
- value: x,
599
+ value: S,
598
600
  children: /* @__PURE__ */ D("aside", {
599
601
  ref: j,
600
- "data-tour": n["data-tour"],
602
+ "data-tour": r["data-tour"],
601
603
  "data-shell-sidebar": "expanded",
602
604
  "data-shell-view": N.id,
603
- "data-shell-appearance": S ? "floating" : void 0,
604
- className: C.aside,
605
- children: S ? /* @__PURE__ */ D("div", {
605
+ "data-shell-appearance": C ? "floating" : void 0,
606
+ className: w.aside,
607
+ children: C ? /* @__PURE__ */ D("div", {
606
608
  "data-shell-panel": "",
607
609
  "data-glass-surface": "",
608
- className: me,
609
- children: z
610
+ className: ge,
611
+ children: /* @__PURE__ */ D(n, { children: z })
610
612
  }) : z
611
613
  })
612
614
  });
613
615
  }
614
- function _e({ label: e, action: t, children: n, open: r, onOpenChange: i, count: a, floating: o }) {
615
- let s = f();
616
+ function ye({ label: e, action: t, children: n, open: r, onOpenChange: i, count: a, floating: o }) {
617
+ let s = p();
616
618
  return /* @__PURE__ */ O("section", {
617
619
  "aria-label": e,
618
620
  "data-shell-block": "",
@@ -620,7 +622,7 @@ function _e({ label: e, action: t, children: n, open: r, onOpenChange: i, count:
620
622
  className: "pt-2",
621
623
  children: [/* @__PURE__ */ O("div", {
622
624
  className: "flex items-center gap-1",
623
- children: [/* @__PURE__ */ D(se, {
625
+ children: [/* @__PURE__ */ D(ce, {
624
626
  label: e,
625
627
  count: a,
626
628
  open: r,
@@ -640,9 +642,9 @@ function _e({ label: e, action: t, children: n, open: r, onOpenChange: i, count:
640
642
  })]
641
643
  });
642
644
  }
643
- function ve({ label: e, action: t, children: n, appearance: r, onOpenChange: i, open: a = !0, count: o }) {
644
- let s = u(A), c = (r ?? s) === "floating";
645
- return i ? /* @__PURE__ */ D(_e, {
645
+ function be({ label: e, action: t, children: n, appearance: r, onOpenChange: i, open: a = !0, count: o }) {
646
+ let s = d(A), c = (r ?? s) === "floating";
647
+ return i ? /* @__PURE__ */ D(ye, {
646
648
  label: e,
647
649
  action: t,
648
650
  open: a,
@@ -665,8 +667,8 @@ function ve({ label: e, action: t, children: n, appearance: r, onOpenChange: i,
665
667
  }), n]
666
668
  });
667
669
  }
668
- function ye({ icon: e, label: t, active: n = !1, href: r, onClick: i, trailing: a, appearance: o }) {
669
- let s = u(A), c = (o ?? s) === "floating";
670
+ function xe({ icon: e, label: t, active: n = !1, href: r, onClick: i, trailing: a, appearance: o }) {
671
+ let s = d(A), c = (o ?? s) === "floating";
670
672
  return /* @__PURE__ */ O("div", {
671
673
  "data-active": n ? "true" : void 0,
672
674
  "data-depth": F(c),
@@ -688,7 +690,7 @@ function ye({ icon: e, label: t, active: n = !1, href: r, onClick: i, trailing:
688
690
  ]
689
691
  });
690
692
  }
691
- function be({ label: e, hint: t }) {
693
+ function Q({ label: e, hint: t }) {
692
694
  return /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("span", {
693
695
  className: "text-body-sm font-normal",
694
696
  children: e
@@ -697,13 +699,13 @@ function be({ label: e, hint: t }) {
697
699
  children: t
698
700
  }) : null] });
699
701
  }
700
- function xe(e, t) {
702
+ function Se(e, t) {
701
703
  return t ? e ? `border border-border-default ${M} text-accent-primary` : `border border-transparent text-text-secondary ${N} hover:text-text-primary` : e ? "bg-accent-soft text-accent-primary" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary";
702
704
  }
703
- function $({ label: e, hint: t, icon: o, active: s = !1, badge: c, href: l, onClick: u, entryId: d, testId: f }) {
704
- let p = j(), m = c ? `${e}, ${c.value}` : e, h = t ? `${e}, ${t}` : m, g = T("relative mx-auto flex size-10 items-center justify-center rounded-button", xe(s, p), k), _ = /* @__PURE__ */ O(E, { children: [
705
+ function $({ label: e, hint: t, icon: n, active: s = !1, badge: c, href: l, onClick: u, entryId: d, testId: f }) {
706
+ let p = j(), m = c ? `${e}, ${c.value}` : e, h = t ? `${e}, ${t}` : m, g = T("relative mx-auto flex size-10 items-center justify-center rounded-button", Se(s, p), k), _ = /* @__PURE__ */ O(E, { children: [
705
707
  s && !p ? /* @__PURE__ */ D(L, { offsetClass: "-start-3" }) : null,
706
- /* @__PURE__ */ D(o, { className: "size-4" }),
708
+ /* @__PURE__ */ D(n, { className: "size-4" }),
707
709
  c ? /* @__PURE__ */ D("span", {
708
710
  className: "absolute end-1 top-1",
709
711
  children: /* @__PURE__ */ D(z, {
@@ -712,13 +714,13 @@ function $({ label: e, hint: t, icon: o, active: s = !1, badge: c, href: l, onCl
712
714
  })
713
715
  }) : null
714
716
  ] });
715
- return /* @__PURE__ */ O(n, {
717
+ return /* @__PURE__ */ O(r, {
716
718
  delayDuration: 200,
717
- children: [/* @__PURE__ */ D(i, {
719
+ children: [/* @__PURE__ */ D(a, {
718
720
  asChild: !0,
719
721
  children: l ? /* @__PURE__ */ D("a", {
720
722
  href: l,
721
- onClick: a(u),
723
+ onClick: o(u),
722
724
  "aria-label": h,
723
725
  "aria-current": s ? "page" : void 0,
724
726
  "data-shell-entry": d,
@@ -739,24 +741,24 @@ function $({ label: e, hint: t, icon: o, active: s = !1, badge: c, href: l, onCl
739
741
  className: g,
740
742
  children: _
741
743
  })
742
- }), /* @__PURE__ */ D(r, {
744
+ }), /* @__PURE__ */ D(i, {
743
745
  side: "right",
744
746
  sideOffset: 10,
745
747
  className: "flex items-center gap-2 rounded-md border border-border-subtle bg-popover px-2 py-1 text-text-primary shadow-overlay",
746
- children: /* @__PURE__ */ D(be, {
748
+ children: /* @__PURE__ */ D(Q, {
747
749
  label: e,
748
750
  hint: t
749
751
  })
750
752
  })]
751
753
  });
752
754
  }
753
- function Se() {
755
+ function Ce() {
754
756
  return /* @__PURE__ */ D("span", {
755
757
  "aria-hidden": "true",
756
758
  className: "mx-auto my-1.5 h-px w-8 shrink-0 bg-border-subtle"
757
759
  });
758
760
  }
759
- var Ce = {
761
+ var we = {
760
762
  default: {
761
763
  aside: "flex h-full w-16 shrink-0 flex-col border-e border-border-subtle bg-bg-surface text-text-primary",
762
764
  logo: "flex shrink-0 justify-center pt-4"
@@ -766,31 +768,31 @@ var Ce = {
766
768
  logo: "flex shrink-0 justify-center pt-3.5"
767
769
  }
768
770
  };
769
- function we(n) {
770
- let { nav: r, views: i, rootId: a, primaryEntry: c, banner: l, onNavigate: u, hrefFor: f, logo: p, onExpand: g, onNew: _, newSlot: v, onSearch: y, bell: b, avatar: S, appearance: T = "default" } = n, k = T === "floating", j = Ce[T], M = t(), N = h(null);
771
- s(N);
772
- let P = h(g);
773
- d(() => {
774
- P.current = g;
775
- }, [g]);
776
- let F = m(() => ({
771
+ function Te(r) {
772
+ let { nav: i, views: a, rootId: o, primaryEntry: c, banner: u, onNavigate: d, hrefFor: p, logo: m, onExpand: _, onNew: v, newSlot: y, onSearch: b, bell: x, avatar: C, appearance: T = "default" } = r, k = T === "floating", j = we[T], M = t(), N = g(null);
773
+ l(N);
774
+ let P = g(_);
775
+ f(() => {
776
+ P.current = _;
777
+ }, [_]);
778
+ let F = h(() => ({
777
779
  collapsed: () => !0,
778
780
  setCollapsed: (e) => e ? { status: "already" } : (P.current(), { status: "done" }),
779
781
  entries: () => [],
780
782
  setExpanded: () => ({ status: "failed" })
781
783
  }), []);
782
784
  e("sidebar", F);
783
- let I = i.find((e) => e.id === a) ?? i[0], L = I ? r.curateEntries(I.sections.flatMap((e) => e.entries), `${I.id}:rail`).filter((e) => !o(e)) : [], R = c ? r.filterEntries([c])[0] : void 0, z = (e) => {
784
- e.drillTo && r.push(e.drillTo), e.path ? u(e.path) : e.drillTo && g();
785
- }, B = (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)), H = /* @__PURE__ */ O(E, { children: [
785
+ let I = a.find((e) => e.id === o) ?? a[0], L = I ? i.curateEntries(I.sections.flatMap((e) => e.entries), `${I.id}:rail`).filter((e) => !s(e)) : [], R = c ? i.filterEntries([c])[0] : void 0, z = (e) => {
786
+ e.drillTo && i.push(e.drillTo), e.path ? d(e.path) : e.drillTo && _();
787
+ }, B = (e) => i.isEntryActive(e) || e.drillTo !== void 0 && i.activeView.id === e.drillTo || (e.children ?? []).some((e) => s(e) ? (e.children ?? []).some((e) => i.isEntryActive(e)) : i.isEntryActive(e)), H = /* @__PURE__ */ O(E, { children: [
786
788
  /* @__PURE__ */ D("div", {
787
789
  className: j.logo,
788
- children: p
790
+ children: m
789
791
  }),
790
- l ? /* @__PURE__ */ D("div", {
792
+ u ? /* @__PURE__ */ D("div", {
791
793
  "data-shell-sidebar-banner": "",
792
794
  className: "flex shrink-0 justify-center px-1 pt-2.5",
793
- children: l
795
+ children: u
794
796
  }) : null,
795
797
  /* @__PURE__ */ O("nav", {
796
798
  "aria-label": M("shell.sidebar.navigation", "Main navigation"),
@@ -798,29 +800,29 @@ function we(n) {
798
800
  children: [
799
801
  /* @__PURE__ */ D($, {
800
802
  label: M("shell.sidebar.expand", "Expand sidebar"),
801
- icon: x,
802
- onClick: g,
803
+ icon: S,
804
+ onClick: _,
803
805
  testId: "shell-rail-expand"
804
806
  }),
805
- v ? /* @__PURE__ */ D("div", {
807
+ y ? /* @__PURE__ */ D("div", {
806
808
  className: "flex justify-center",
807
- children: v
809
+ children: y
808
810
  }) : /* @__PURE__ */ D($, {
809
811
  label: M("shell.sidebar.new", "New"),
810
- icon: C,
811
- onClick: _
812
+ icon: w,
813
+ onClick: v
812
814
  }),
813
815
  /* @__PURE__ */ D($, {
814
816
  label: M("shell.sidebar.search", "Search"),
815
- icon: w,
816
- onClick: y
817
+ icon: ee,
818
+ onClick: b
817
819
  }),
818
- /* @__PURE__ */ D(Se, {}),
820
+ /* @__PURE__ */ D(Ce, {}),
819
821
  R?.icon ? /* @__PURE__ */ D($, {
820
822
  label: R.label,
821
823
  icon: R.icon,
822
824
  active: B(R),
823
- href: V(R.path, f),
825
+ href: V(R.path, p),
824
826
  onClick: () => z(R),
825
827
  entryId: R.id
826
828
  }) : null,
@@ -830,37 +832,37 @@ function we(n) {
830
832
  icon: e.icon,
831
833
  active: B(e),
832
834
  badge: e.badge,
833
- href: V(e.path, f),
835
+ href: V(e.path, p),
834
836
  onClick: () => z(e),
835
837
  entryId: e.id
836
838
  }, e.id) : null),
837
- /* @__PURE__ */ D(Se, {}),
839
+ /* @__PURE__ */ D(Ce, {}),
838
840
  /* @__PURE__ */ D("div", {
839
841
  className: "flex justify-center",
840
- children: b
842
+ children: x
841
843
  })
842
844
  ]
843
845
  }),
844
846
  /* @__PURE__ */ D("div", {
845
847
  className: "flex shrink-0 justify-center border-t border-border-subtle py-3",
846
- children: S
848
+ children: C
847
849
  })
848
850
  ] });
849
851
  return /* @__PURE__ */ D(A.Provider, {
850
852
  value: T,
851
853
  children: /* @__PURE__ */ D("aside", {
852
854
  ref: N,
853
- "data-tour": n["data-tour"],
855
+ "data-tour": r["data-tour"],
854
856
  "data-shell-sidebar": "rail",
855
857
  "data-shell-appearance": k ? "floating" : void 0,
856
858
  className: j.aside,
857
859
  children: k ? /* @__PURE__ */ D("div", {
858
860
  "data-shell-panel": "",
859
861
  "data-glass-surface": "",
860
- className: me,
861
- children: H
862
+ className: ge,
863
+ children: /* @__PURE__ */ D(n, { children: H })
862
864
  }) : H
863
865
  })
864
866
  });
865
867
  }
866
- export { R as ShellKbd, be as ShellRailTooltipLabel, ge as ShellSidebar, ye as ShellSidebarCompactRow, we as ShellSidebarRail, ve as ShellSidebarSection };
868
+ export { R as ShellKbd, Q as ShellRailTooltipLabel, ve as ShellSidebar, xe as ShellSidebarCompactRow, Te as ShellSidebarRail, be as ShellSidebarSection };