@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.
- package/dist/chrome/globalSearch/ResultsList.js +39 -33
- package/dist/chrome/index.d.ts +1 -0
- package/dist/chrome/shell/ShellSidebar.js +287 -281
- package/dist/chrome/shell/shellSidebarWidth.d.ts +16 -0
- package/dist/chrome/shell/shellSidebarWidth.js +26 -0
- package/dist/chrome/shellLabelManifest.d.ts +8 -0
- package/dist/chrome.js +65 -63
- package/dist/shared/constants/shellCssVars.d.ts +9 -0
- package/dist/shared/constants/shellCssVars.js +3 -0
- package/dist/shared/events/sinks/RybbitSink.d.ts +13 -1
- package/dist/shared/events/sinks/RybbitSink.js +129 -121
- package/dist/shared/events/sinks/index.d.ts +1 -1
- package/dist/shared/pages/SearchPage.d.ts +17 -1
- package/dist/shared/pages/SearchPage.js +284 -243
- package/dist/shared/pages/searchPage/PageResultsGroup.d.ts +16 -0
- package/dist/shared/pages/searchPage/PageResultsGroup.js +29 -0
- package/dist/shared/pages/searchPage/ResultsList.d.ts +6 -1
- package/dist/shared/pages/searchPage/ResultsList.js +9 -53
- package/dist/shared/pages/searchPage/SearchResultCard.d.ts +14 -0
- package/dist/shared/pages/searchPage/SearchResultCard.js +57 -0
- package/dist/shared/providers/AppShellProvider.d.ts +8 -0
- package/dist/shared/providers/AppShellProvider.js +91 -89
- package/dist/shared/providers/shell/PersonaSurfaceProvider.d.ts +27 -1
- package/dist/shared/providers/shell/PersonaSurfaceProvider.js +214 -179
- package/dist/shared/providers/shell/index.d.ts +2 -0
- package/dist/shared/providers/shell/navIdMigration.d.ts +29 -0
- package/dist/shared/providers/shell/navIdMigration.js +57 -0
- package/dist/shared/providers/shell/personaSurfaceRemote.d.ts +7 -0
- package/dist/shared/providers/shell/personaSurfaceRemote.js +1 -1
- package/dist/shared/types/index.d.ts +11 -0
- package/dist/shared-providers-shell.js +13 -12
- package/dist/ui/access-needed-chip.d.ts +16 -0
- package/dist/ui/access-needed-chip.js +17 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui.js +50 -49
- 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 {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
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
|
|
12
|
-
function
|
|
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
|
|
16
|
-
return /* @__PURE__ */
|
|
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:
|
|
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
|
|
23
|
-
return /* @__PURE__ */
|
|
24
|
-
className:
|
|
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
|
|
29
|
-
return /* @__PURE__ */
|
|
29
|
+
function A({ badge: e, compact: t = !1 }) {
|
|
30
|
+
return /* @__PURE__ */ w("span", {
|
|
30
31
|
"data-shell-badge": e.tone,
|
|
31
|
-
className:
|
|
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
|
|
36
|
-
return
|
|
36
|
+
function j(e, t = "size-4") {
|
|
37
|
+
return S(t, "shrink-0", e ? "text-accent-primary" : "text-text-secondary");
|
|
37
38
|
}
|
|
38
|
-
function
|
|
39
|
+
function M(e, t) {
|
|
39
40
|
if (e) return t ? t(e) : e;
|
|
40
41
|
}
|
|
41
|
-
function
|
|
42
|
-
return e ? /* @__PURE__ */
|
|
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__ */
|
|
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
|
|
62
|
-
return (e.children ?? []).some((e) => t.isEntryActive(e) ||
|
|
62
|
+
function P(e, t) {
|
|
63
|
+
return (e.children ?? []).some((e) => t.isEntryActive(e) || P(e, t));
|
|
63
64
|
}
|
|
64
|
-
var
|
|
65
|
-
function
|
|
66
|
-
return e.path ? i[e.id] ?? (t ||
|
|
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
|
|
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
|
|
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 =
|
|
77
|
+
let i = I(e, n, r);
|
|
77
78
|
return {
|
|
78
79
|
open: i,
|
|
79
|
-
setOpen: (t) =>
|
|
80
|
+
setOpen: (t) => L(e, i, t, r)
|
|
80
81
|
};
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
+
function z(e, t) {
|
|
83
84
|
return `${e.id}:${t.id}`;
|
|
84
85
|
}
|
|
85
|
-
function
|
|
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 =
|
|
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,
|
|
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
|
|
106
|
-
return e ? /* @__PURE__ */
|
|
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__ */
|
|
110
|
+
}) : /* @__PURE__ */ w(g, {
|
|
110
111
|
"aria-hidden": "true",
|
|
111
|
-
className:
|
|
112
|
+
className: S("size-3.5 shrink-0", F)
|
|
112
113
|
});
|
|
113
114
|
}
|
|
114
|
-
function
|
|
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__ */
|
|
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:
|
|
122
|
-
children: /* @__PURE__ */
|
|
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
|
|
126
|
-
return /* @__PURE__ */
|
|
126
|
+
function U({ entries: e, rowProps: t }) {
|
|
127
|
+
return /* @__PURE__ */ T("div", {
|
|
127
128
|
className: "relative",
|
|
128
|
-
children: [/* @__PURE__ */
|
|
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__ */
|
|
132
|
+
}), /* @__PURE__ */ w("ul", {
|
|
132
133
|
className: "ms-8.5",
|
|
133
|
-
children: e.map((e) => /* @__PURE__ */
|
|
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
|
|
141
|
-
let u = t(), d = r.isEntryActive(e), f = e.children ? r.filterEntries(e.children) : [], p = f.length > 0, { open: m, setOpen:
|
|
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,
|
|
147
|
-
return /* @__PURE__ */
|
|
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:
|
|
151
|
+
className: S("group relative flex rounded-button", D(d)),
|
|
151
152
|
children: [
|
|
152
|
-
d ? /* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */
|
|
154
|
-
href:
|
|
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 &&
|
|
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:
|
|
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
|
-
|
|
164
|
-
/* @__PURE__ */
|
|
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__ */
|
|
167
|
-
className:
|
|
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__ */
|
|
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__ */
|
|
175
|
-
className:
|
|
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__ */
|
|
179
|
-
e.drillTo ? /* @__PURE__ */
|
|
179
|
+
e.badge ? /* @__PURE__ */ w(A, { badge: e.badge }) : null,
|
|
180
|
+
e.drillTo ? /* @__PURE__ */ w(g, {
|
|
180
181
|
"aria-hidden": "true",
|
|
181
|
-
className:
|
|
182
|
+
className: S("size-3.5 shrink-0 text-text-muted", F)
|
|
182
183
|
}) : null,
|
|
183
|
-
p && !e.path ? /* @__PURE__ */
|
|
184
|
+
p && !e.path ? /* @__PURE__ */ w("span", {
|
|
184
185
|
className: "text-text-muted",
|
|
185
|
-
children: /* @__PURE__ */
|
|
186
|
+
children: /* @__PURE__ */ w(V, { open: m })
|
|
186
187
|
}) : null
|
|
187
188
|
]
|
|
188
189
|
}),
|
|
189
|
-
p && e.path ? /* @__PURE__ */
|
|
190
|
+
p && e.path ? /* @__PURE__ */ w(H, {
|
|
190
191
|
entry: e,
|
|
191
192
|
open: m,
|
|
192
|
-
onToggle: () =>
|
|
193
|
+
onToggle: () => h(!m)
|
|
193
194
|
}) : null,
|
|
194
|
-
b ? /* @__PURE__ */
|
|
195
|
+
b ? /* @__PURE__ */ w("button", {
|
|
195
196
|
type: "button",
|
|
196
197
|
onClick: () => o?.(e),
|
|
197
|
-
"aria-pressed":
|
|
198
|
-
"aria-label":
|
|
199
|
-
className:
|
|
200
|
-
children: /* @__PURE__ */
|
|
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__ */
|
|
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
|
|
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 } =
|
|
222
|
-
return /* @__PURE__ */
|
|
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:
|
|
226
|
-
children: [/* @__PURE__ */
|
|
227
|
-
href:
|
|
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:
|
|
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__ */
|
|
237
|
-
/* @__PURE__ */
|
|
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__ */
|
|
242
|
-
className:
|
|
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__ */
|
|
246
|
-
s && !e.path ? /* @__PURE__ */
|
|
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__ */
|
|
249
|
+
children: /* @__PURE__ */ w(V, { open: c })
|
|
249
250
|
}) : null
|
|
250
251
|
]
|
|
251
|
-
}), s && e.path ? /* @__PURE__ */
|
|
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__ */
|
|
257
|
+
}), c ? /* @__PURE__ */ w(U, {
|
|
257
258
|
entries: o,
|
|
258
259
|
rowProps: t
|
|
259
260
|
}) : null] });
|
|
260
261
|
}
|
|
261
|
-
function
|
|
262
|
-
let [e, t] =
|
|
262
|
+
function K() {
|
|
263
|
+
let [e, t] = p({});
|
|
263
264
|
return {
|
|
264
265
|
expanded: e,
|
|
265
|
-
setExpanded:
|
|
266
|
+
setExpanded: c((e, n) => t((t) => ({
|
|
266
267
|
...t,
|
|
267
268
|
[e]: n
|
|
268
269
|
})), [])
|
|
269
270
|
};
|
|
270
271
|
}
|
|
271
|
-
function
|
|
272
|
-
return /* @__PURE__ */
|
|
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
|
|
278
|
-
let i = t(), { nav: a } = r, o = a.curateEntries(n.entries,
|
|
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__ */
|
|
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__ */
|
|
288
|
+
return /* @__PURE__ */ T("div", {
|
|
288
289
|
"data-shell-section": n.id,
|
|
289
290
|
className: "pt-2",
|
|
290
|
-
children: [/* @__PURE__ */
|
|
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:
|
|
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__ */
|
|
298
|
-
/* @__PURE__ */
|
|
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__ */
|
|
303
|
-
|
|
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__ */
|
|
309
|
+
}), t ? /* @__PURE__ */ w("div", {
|
|
309
310
|
id: c,
|
|
310
311
|
children: s
|
|
311
312
|
}) : null]
|
|
312
313
|
});
|
|
313
314
|
}
|
|
314
|
-
return /* @__PURE__ */
|
|
315
|
+
return /* @__PURE__ */ T("div", {
|
|
315
316
|
"data-shell-section": n.id,
|
|
316
|
-
children: [n.label ? /* @__PURE__ */
|
|
317
|
+
children: [n.label ? /* @__PURE__ */ w("div", {
|
|
317
318
|
className: "px-2 pb-1.5 pt-3.5",
|
|
318
|
-
children: /* @__PURE__ */
|
|
319
|
+
children: /* @__PURE__ */ w(q, { children: n.label })
|
|
319
320
|
}) : null, s]
|
|
320
321
|
});
|
|
321
322
|
}
|
|
322
|
-
function
|
|
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__ */
|
|
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__ */
|
|
329
|
-
href:
|
|
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:
|
|
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__ */
|
|
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__ */
|
|
341
|
+
children: o ? /* @__PURE__ */ w(o, { className: "size-3.5" }) : null
|
|
341
342
|
}),
|
|
342
|
-
/* @__PURE__ */
|
|
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__ */
|
|
347
|
+
t ? /* @__PURE__ */ w(k, { children: t }) : null
|
|
347
348
|
]
|
|
348
349
|
})]
|
|
349
350
|
});
|
|
350
351
|
}
|
|
351
|
-
function
|
|
352
|
+
function X({ view: e, nav: t }) {
|
|
352
353
|
let n = e.header?.icon;
|
|
353
|
-
return /* @__PURE__ */
|
|
354
|
+
return /* @__PURE__ */ T("div", {
|
|
354
355
|
className: "pb-1",
|
|
355
|
-
children: [e.back ? /* @__PURE__ */
|
|
356
|
+
children: [e.back ? /* @__PURE__ */ T("button", {
|
|
356
357
|
type: "button",
|
|
357
358
|
onClick: () => t.back(),
|
|
358
359
|
"data-shell-back": "",
|
|
359
|
-
className:
|
|
360
|
-
children: [/* @__PURE__ */
|
|
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:
|
|
363
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
373
|
-
}), /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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
|
|
389
|
-
let n =
|
|
390
|
-
return
|
|
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]),
|
|
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
|
|
410
|
-
return
|
|
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
|
|
417
|
-
let { view: r, nav: i, expanded: a, setExpanded: o } = e, s =
|
|
418
|
-
return s ? s.open === n ? { status: "already" } : (
|
|
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
|
|
425
|
-
let { nav: r, rootId: i, topBlock: a, actions: o, footer:
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
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
|
-
|
|
433
|
-
|
|
434
|
-
nav:
|
|
435
|
-
view:
|
|
436
|
-
expanded:
|
|
437
|
-
setExpanded:
|
|
438
|
-
onToggleCollapse:
|
|
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
|
-
|
|
444
|
-
|
|
445
|
-
|
|
445
|
+
k,
|
|
446
|
+
S,
|
|
447
|
+
E,
|
|
448
|
+
b
|
|
446
449
|
]);
|
|
447
|
-
let
|
|
450
|
+
let M = b !== void 0, N = d(() => M ? {
|
|
448
451
|
collapsed: () => !1,
|
|
449
452
|
setCollapsed: (e) => {
|
|
450
|
-
let t =
|
|
453
|
+
let t = j.current.onToggleCollapse;
|
|
451
454
|
return e ? t ? (t(), { status: "done" }) : { status: "failed" } : { status: "already" };
|
|
452
455
|
},
|
|
453
|
-
entries: () =>
|
|
454
|
-
setExpanded: (e, t) =>
|
|
455
|
-
} : null, [
|
|
456
|
-
e("sidebar",
|
|
457
|
-
let
|
|
458
|
-
nav:
|
|
459
|
-
onNavigate:
|
|
460
|
-
hrefFor:
|
|
461
|
-
onTogglePin:
|
|
462
|
-
isPinned:
|
|
463
|
-
expanded:
|
|
464
|
-
setExpanded:
|
|
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__ */
|
|
467
|
-
ref:
|
|
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":
|
|
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__ */
|
|
476
|
+
/* @__PURE__ */ w("div", {
|
|
474
477
|
className: "shrink-0 px-2.5 pt-3",
|
|
475
478
|
children: a
|
|
476
479
|
}),
|
|
477
|
-
/* @__PURE__ */
|
|
480
|
+
/* @__PURE__ */ w("div", {
|
|
478
481
|
className: "shrink-0 px-2.5 pt-3",
|
|
479
482
|
children: o
|
|
480
483
|
}),
|
|
481
|
-
|
|
484
|
+
h ? /* @__PURE__ */ w("div", {
|
|
482
485
|
"data-shell-sidebar-banner": "",
|
|
483
486
|
className: "shrink-0 px-2.5 pt-2.5",
|
|
484
|
-
children:
|
|
487
|
+
children: h
|
|
485
488
|
}) : null,
|
|
486
|
-
/* @__PURE__ */
|
|
487
|
-
"aria-label":
|
|
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:
|
|
490
|
-
|
|
491
|
-
entry:
|
|
492
|
-
shortcut:
|
|
493
|
-
nav:
|
|
494
|
-
onNavigate:
|
|
495
|
-
hrefFor:
|
|
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
|
-
|
|
498
|
-
view:
|
|
500
|
+
k.sections.map((e) => /* @__PURE__ */ w(J, {
|
|
501
|
+
view: k,
|
|
499
502
|
section: e,
|
|
500
|
-
...
|
|
503
|
+
...P
|
|
501
504
|
}, e.id)),
|
|
502
|
-
|
|
503
|
-
] }) : /* @__PURE__ */
|
|
504
|
-
view:
|
|
505
|
-
nav:
|
|
506
|
-
}),
|
|
507
|
-
view:
|
|
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
|
-
...
|
|
512
|
+
...P
|
|
510
513
|
}, e.id))] })
|
|
511
514
|
}),
|
|
512
|
-
/* @__PURE__ */
|
|
515
|
+
/* @__PURE__ */ w("span", {
|
|
513
516
|
"aria-live": "polite",
|
|
514
517
|
className: "sr-only",
|
|
515
|
-
children:
|
|
518
|
+
children: A ? "" : k.header?.title ?? ""
|
|
516
519
|
}),
|
|
517
|
-
/* @__PURE__ */
|
|
520
|
+
/* @__PURE__ */ w("div", {
|
|
518
521
|
className: "shrink-0 border-t border-border-subtle px-2.5 py-2",
|
|
519
|
-
children:
|
|
522
|
+
children: c
|
|
520
523
|
})
|
|
521
524
|
]
|
|
522
525
|
});
|
|
523
526
|
}
|
|
524
|
-
function
|
|
525
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
531
|
+
children: [/* @__PURE__ */ T("div", {
|
|
529
532
|
className: "flex items-center gap-2 px-2 pb-1.5 pt-3.5",
|
|
530
|
-
children: [/* @__PURE__ */
|
|
533
|
+
children: [/* @__PURE__ */ w("span", {
|
|
531
534
|
className: "min-w-0 flex-1",
|
|
532
|
-
children: /* @__PURE__ */
|
|
535
|
+
children: /* @__PURE__ */ w(q, { children: e })
|
|
533
536
|
}), t]
|
|
534
537
|
}), n]
|
|
535
538
|
});
|
|
536
539
|
}
|
|
537
|
-
function
|
|
538
|
-
return /* @__PURE__ */
|
|
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:
|
|
543
|
+
className: S("group relative flex items-center rounded-button", D(n)),
|
|
541
544
|
children: [
|
|
542
|
-
n ? /* @__PURE__ */
|
|
543
|
-
/* @__PURE__ */
|
|
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:
|
|
549
|
-
children: [e ? /* @__PURE__ */
|
|
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__ */
|
|
562
|
+
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("span", {
|
|
560
563
|
className: "text-body-sm font-normal",
|
|
561
564
|
children: e
|
|
562
|
-
}), t ? /* @__PURE__ */
|
|
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 =
|
|
569
|
-
s ? /* @__PURE__ */
|
|
570
|
-
/* @__PURE__ */
|
|
571
|
-
c ? /* @__PURE__ */
|
|
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__ */
|
|
576
|
+
children: /* @__PURE__ */ w(A, {
|
|
574
577
|
badge: c,
|
|
575
578
|
compact: !0
|
|
576
579
|
})
|
|
577
580
|
}) : null
|
|
578
581
|
] });
|
|
579
|
-
return /* @__PURE__ */
|
|
582
|
+
return /* @__PURE__ */ T(n, {
|
|
580
583
|
delayDuration: 200,
|
|
581
|
-
children: [/* @__PURE__ */
|
|
584
|
+
children: [/* @__PURE__ */ w(i, {
|
|
582
585
|
asChild: !0,
|
|
583
|
-
children: l ? /* @__PURE__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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__ */
|
|
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
|
|
622
|
-
let { nav: r, views: i, rootId: a, primaryEntry:
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
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" } : (
|
|
633
|
+
setCollapsed: (e) => e ? { status: "already" } : (k.current(), { status: "done" }),
|
|
629
634
|
entries: () => [],
|
|
630
635
|
setExpanded: () => ({ status: "failed" })
|
|
631
636
|
}), []);
|
|
632
|
-
e("sidebar",
|
|
633
|
-
let
|
|
634
|
-
e.drillTo && r.push(e.drillTo), e.path ?
|
|
635
|
-
},
|
|
636
|
-
return /* @__PURE__ */
|
|
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__ */
|
|
647
|
+
/* @__PURE__ */ w("div", {
|
|
642
648
|
className: "flex shrink-0 justify-center pt-4",
|
|
643
|
-
children:
|
|
649
|
+
children: h
|
|
644
650
|
}),
|
|
645
|
-
|
|
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:
|
|
654
|
+
children: u
|
|
649
655
|
}) : null,
|
|
650
|
-
/* @__PURE__ */
|
|
651
|
-
"aria-label":
|
|
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__ */
|
|
655
|
-
label:
|
|
656
|
-
icon:
|
|
657
|
-
onClick:
|
|
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
|
-
|
|
666
|
+
y ? /* @__PURE__ */ w("div", {
|
|
661
667
|
className: "flex justify-center",
|
|
662
|
-
children:
|
|
663
|
-
}) : /* @__PURE__ */
|
|
664
|
-
label:
|
|
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:
|
|
672
|
+
onClick: _
|
|
673
|
+
}),
|
|
674
|
+
/* @__PURE__ */ w(Q, {
|
|
675
|
+
label: D("shell.sidebar.search", "Search"),
|
|
676
|
+
icon: x,
|
|
677
|
+
onClick: S
|
|
672
678
|
}),
|
|
673
|
-
/* @__PURE__ */
|
|
674
|
-
|
|
675
|
-
label:
|
|
676
|
-
icon:
|
|
677
|
-
active: P
|
|
678
|
-
href:
|
|
679
|
-
onClick: () =>
|
|
680
|
-
entryId:
|
|
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
|
-
|
|
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:
|
|
692
|
+
active: I(e),
|
|
687
693
|
badge: e.badge,
|
|
688
|
-
href:
|
|
689
|
-
onClick: () =>
|
|
694
|
+
href: M(e.path, m),
|
|
695
|
+
onClick: () => F(e),
|
|
690
696
|
entryId: e.id
|
|
691
697
|
}, e.id) : null),
|
|
692
|
-
/* @__PURE__ */
|
|
693
|
-
/* @__PURE__ */
|
|
698
|
+
/* @__PURE__ */ w($, {}),
|
|
699
|
+
/* @__PURE__ */ w("div", {
|
|
694
700
|
className: "flex justify-center",
|
|
695
|
-
children:
|
|
701
|
+
children: C
|
|
696
702
|
})
|
|
697
703
|
]
|
|
698
704
|
}),
|
|
699
|
-
/* @__PURE__ */
|
|
705
|
+
/* @__PURE__ */ w("div", {
|
|
700
706
|
className: "flex shrink-0 justify-center border-t border-border-subtle py-3",
|
|
701
|
-
children:
|
|
707
|
+
children: E
|
|
702
708
|
})
|
|
703
709
|
]
|
|
704
710
|
});
|
|
705
711
|
}
|
|
706
|
-
export {
|
|
712
|
+
export { k as ShellKbd, Z as ShellRailTooltipLabel, re as ShellSidebar, ae as ShellSidebarCompactRow, oe as ShellSidebarRail, ie as ShellSidebarSection };
|