@burdenoff/fe-libs 2026.1117.8 → 2026.1118.1
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/index.d.ts +2 -2
- package/dist/chrome/shell/NewMenu.d.ts +7 -2
- package/dist/chrome/shell/NewMenu.js +21 -18
- package/dist/chrome/shell/ShellSidebar.d.ts +39 -5
- package/dist/chrome/shell/ShellSidebar.js +541 -389
- package/dist/chrome/shell/SidebarSearchTrigger.d.ts +8 -1
- package/dist/chrome/shell/SidebarSearchTrigger.js +19 -13
- package/dist/chrome/shell/WorkspaceMenu.d.ts +7 -0
- package/dist/chrome/shell/WorkspaceMenu.js +84 -72
- package/dist/chrome/shell/types.d.ts +11 -0
- package/package.json +1 -1
|
@@ -4,43 +4,53 @@ import { Tooltip as n, TooltipContent as r, TooltipTrigger as i } from "../../ui
|
|
|
4
4
|
import { navLinkClick as a } from "./navLink.js";
|
|
5
5
|
import { isShellNavMoreEntry as o } from "./shellNavVisibility.js";
|
|
6
6
|
import { usePublishShellSidebarWidth as s } from "./shellSidebarWidth.js";
|
|
7
|
-
import {
|
|
8
|
-
import { ArrowLeft as
|
|
9
|
-
import { clsx as
|
|
10
|
-
import { Fragment as
|
|
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";
|
|
9
|
+
import { clsx as T } from "clsx";
|
|
10
|
+
import { Fragment as E, jsx as D, jsxs as O } from "react/jsx-runtime";
|
|
11
11
|
// src/chrome/shell/ShellSidebar.tsx
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
return
|
|
12
|
+
var k = "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-ring", A = c("default");
|
|
13
|
+
function j() {
|
|
14
|
+
return u(A) === "floating";
|
|
15
15
|
}
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
var M = "bg-text-primary/6", N = "hover:bg-text-primary/4";
|
|
17
|
+
function P(e, t = !1) {
|
|
18
|
+
return t ? e ? `border border-border-default ${M} text-text-primary` : `border border-transparent text-text-secondary ${N} hover:text-text-primary` : e ? "bg-accent-soft text-text-primary" : "text-text-secondary hover:bg-bg-sunken hover:text-text-primary";
|
|
19
|
+
}
|
|
20
|
+
function F(e) {
|
|
21
|
+
return e ? "off" : void 0;
|
|
22
|
+
}
|
|
23
|
+
function I(e, t) {
|
|
24
|
+
return t ? T("shrink-0 text-caption tabular-nums", e ? "text-text-secondary" : "text-text-muted group-hover:text-text-secondary") : T("shrink-0 text-xs tabular-nums", e ? "text-text-primary" : "text-text-secondary");
|
|
25
|
+
}
|
|
26
|
+
function L({ offsetClass: e = "-start-2.5" }) {
|
|
27
|
+
return /* @__PURE__ */ D("span", {
|
|
18
28
|
"aria-hidden": "true",
|
|
19
29
|
"data-shell-active-bar": "",
|
|
20
|
-
className:
|
|
30
|
+
className: T("pointer-events-none absolute top-1/2 h-5 w-0.75 -translate-y-1/2 rounded-e-full bg-action-primary-bg", e)
|
|
21
31
|
});
|
|
22
32
|
}
|
|
23
|
-
function
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
className:
|
|
33
|
+
function R({ children: e, className: t }) {
|
|
34
|
+
return /* @__PURE__ */ D("kbd", {
|
|
35
|
+
className: T("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),
|
|
26
36
|
children: e
|
|
27
37
|
});
|
|
28
38
|
}
|
|
29
|
-
function
|
|
30
|
-
return /* @__PURE__ */
|
|
39
|
+
function z({ badge: e, compact: t = !1 }) {
|
|
40
|
+
return /* @__PURE__ */ D("span", {
|
|
31
41
|
"data-shell-badge": e.tone,
|
|
32
|
-
className:
|
|
42
|
+
className: T("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"),
|
|
33
43
|
children: e.value
|
|
34
44
|
});
|
|
35
45
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
46
|
+
function B(e, t = "size-4") {
|
|
47
|
+
return T(t, "shrink-0", e ? "text-accent-primary" : "text-text-secondary");
|
|
38
48
|
}
|
|
39
|
-
function
|
|
49
|
+
function V(e, t) {
|
|
40
50
|
if (e) return t ? t(e) : e;
|
|
41
51
|
}
|
|
42
|
-
function
|
|
43
|
-
return e ? /* @__PURE__ */
|
|
52
|
+
function H({ href: e, onActivate: t, active: n, expanded: r, drill: i, title: o, className: s, children: c }) {
|
|
53
|
+
return e ? /* @__PURE__ */ D("a", {
|
|
44
54
|
href: e,
|
|
45
55
|
onClick: a(t),
|
|
46
56
|
"data-shell-drill": i,
|
|
@@ -48,7 +58,7 @@ function N({ href: e, onActivate: t, active: n, expanded: r, drill: i, title: o,
|
|
|
48
58
|
title: o,
|
|
49
59
|
className: s,
|
|
50
60
|
children: c
|
|
51
|
-
}) : /* @__PURE__ */
|
|
61
|
+
}) : /* @__PURE__ */ D("button", {
|
|
52
62
|
type: "button",
|
|
53
63
|
onClick: t,
|
|
54
64
|
"data-shell-drill": i,
|
|
@@ -59,37 +69,37 @@ function N({ href: e, onActivate: t, active: n, expanded: r, drill: i, title: o,
|
|
|
59
69
|
children: c
|
|
60
70
|
});
|
|
61
71
|
}
|
|
62
|
-
function
|
|
63
|
-
return (e.children ?? []).some((e) => t.isEntryActive(e) ||
|
|
72
|
+
function ee(e, t) {
|
|
73
|
+
return (e.children ?? []).some((e) => t.isEntryActive(e) || ee(e, t));
|
|
64
74
|
}
|
|
65
|
-
var
|
|
66
|
-
function
|
|
67
|
-
return e.path ? i[e.id] ?? (t ||
|
|
75
|
+
var U = "rtl:rotate-180";
|
|
76
|
+
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));
|
|
68
78
|
}
|
|
69
|
-
function
|
|
79
|
+
function W(e, t, n, { nav: r, viewId: i, setExpanded: a }) {
|
|
70
80
|
e.path ? a(e.id, n) : n !== t && r.toggleSection(i, `entry:${e.id}`, !o(e));
|
|
71
81
|
}
|
|
72
|
-
function
|
|
82
|
+
function G(e, t, n, r) {
|
|
73
83
|
if (!t) return {
|
|
74
84
|
open: !1,
|
|
75
85
|
setOpen: () => void 0
|
|
76
86
|
};
|
|
77
|
-
let i =
|
|
87
|
+
let i = te(e, n, r);
|
|
78
88
|
return {
|
|
79
89
|
open: i,
|
|
80
|
-
setOpen: (t) =>
|
|
90
|
+
setOpen: (t) => W(e, i, t, r)
|
|
81
91
|
};
|
|
82
92
|
}
|
|
83
|
-
function
|
|
93
|
+
function K(e, t) {
|
|
84
94
|
return `${e.id}:${t.id}`;
|
|
85
95
|
}
|
|
86
|
-
function
|
|
96
|
+
function q(e, t, n) {
|
|
87
97
|
let r = [], i = (a) => {
|
|
88
98
|
for (let s of a) {
|
|
89
99
|
if (o(s)) continue;
|
|
90
100
|
let a = s.children ?? [];
|
|
91
101
|
if (a.length === 0) continue;
|
|
92
|
-
let c =
|
|
102
|
+
let c = te(s, t.isEntryActive(s), {
|
|
93
103
|
nav: t,
|
|
94
104
|
viewId: e.id,
|
|
95
105
|
expanded: n
|
|
@@ -100,112 +110,113 @@ function B(e, t, n) {
|
|
|
100
110
|
}), i(a);
|
|
101
111
|
}
|
|
102
112
|
};
|
|
103
|
-
for (let n of e.sections) (!n.collapsible || t.isSectionOpen(e.id, n.id)) && i(t.curateEntries(n.entries,
|
|
113
|
+
for (let n of e.sections) (!n.collapsible || t.isSectionOpen(e.id, n.id)) && i(t.curateEntries(n.entries, K(e, n)));
|
|
104
114
|
return r;
|
|
105
115
|
}
|
|
106
|
-
function
|
|
107
|
-
return e ? /* @__PURE__ */
|
|
116
|
+
function J({ open: e }) {
|
|
117
|
+
return e ? /* @__PURE__ */ D(v, {
|
|
108
118
|
"aria-hidden": "true",
|
|
109
119
|
className: "size-3.5 shrink-0"
|
|
110
|
-
}) : /* @__PURE__ */
|
|
120
|
+
}) : /* @__PURE__ */ D(y, {
|
|
111
121
|
"aria-hidden": "true",
|
|
112
|
-
className:
|
|
122
|
+
className: T("size-3.5 shrink-0", U)
|
|
113
123
|
});
|
|
114
124
|
}
|
|
115
|
-
function
|
|
125
|
+
function Y({ entry: e, open: n, onToggle: r }) {
|
|
116
126
|
let i = t(), a = n ? i("shell.sidebar.collapseGroup", "Collapse {{label}}", { label: e.label }) : i("shell.sidebar.expandGroup", "Expand {{label}}", { label: e.label });
|
|
117
|
-
return /* @__PURE__ */
|
|
127
|
+
return /* @__PURE__ */ D("button", {
|
|
118
128
|
type: "button",
|
|
119
129
|
onClick: r,
|
|
120
130
|
"aria-expanded": n,
|
|
121
131
|
"aria-label": a,
|
|
122
|
-
className:
|
|
123
|
-
children: /* @__PURE__ */
|
|
132
|
+
className: T("flex w-7 shrink-0 items-center justify-center rounded-button text-text-muted hover:text-text-primary", k),
|
|
133
|
+
children: /* @__PURE__ */ D(J, { open: n })
|
|
124
134
|
});
|
|
125
135
|
}
|
|
126
|
-
function
|
|
127
|
-
return /* @__PURE__ */
|
|
136
|
+
function X({ entries: e, rowProps: t }) {
|
|
137
|
+
return /* @__PURE__ */ O("div", {
|
|
128
138
|
className: "relative",
|
|
129
|
-
children: [/* @__PURE__ */
|
|
139
|
+
children: [/* @__PURE__ */ D("span", {
|
|
130
140
|
"aria-hidden": "true",
|
|
131
141
|
className: "pointer-events-none absolute inset-y-0 start-6.75 w-px bg-border-subtle"
|
|
132
|
-
}), /* @__PURE__ */
|
|
142
|
+
}), /* @__PURE__ */ D("ul", {
|
|
133
143
|
className: "ms-8.5",
|
|
134
|
-
children: e.map((e) => /* @__PURE__ */
|
|
144
|
+
children: e.map((e) => /* @__PURE__ */ D(ae, {
|
|
135
145
|
entry: e,
|
|
136
146
|
...t
|
|
137
147
|
}, e.id))
|
|
138
148
|
})]
|
|
139
149
|
});
|
|
140
150
|
}
|
|
141
|
-
function
|
|
142
|
-
let u = t(), d = r.isEntryActive(e),
|
|
151
|
+
function ne({ entry: e, viewId: n, nav: r, onNavigate: i, hrefFor: a, onTogglePin: o, isPinned: s, expanded: c, setExpanded: l }) {
|
|
152
|
+
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, {
|
|
143
153
|
nav: r,
|
|
144
154
|
viewId: n,
|
|
145
155
|
expanded: c,
|
|
146
156
|
setExpanded: l
|
|
147
|
-
}), _ = !!e.subtitle, v = s?.(e) ?? !1, b = !!(e.pinnable && o), x = e.icon
|
|
148
|
-
|
|
157
|
+
}), _ = !!e.subtitle, v = s?.(e) ?? !1, b = !!(e.pinnable && o), x = e.icon, C = () => {
|
|
158
|
+
e.drillTo && r.push(e.drillTo), e.path && i(e.path), m && g(e.path ? !0 : !h);
|
|
159
|
+
}, w = d ? _ ? "items-start py-1.25" : "h-7.5 items-center" : _ ? "items-start py-1.5" : "h-8.5 items-center";
|
|
160
|
+
return /* @__PURE__ */ O("li", { children: [/* @__PURE__ */ O("div", {
|
|
149
161
|
"data-shell-entry": e.id,
|
|
150
|
-
"data-active":
|
|
151
|
-
|
|
162
|
+
"data-active": f ? "true" : void 0,
|
|
163
|
+
"data-depth": F(d),
|
|
164
|
+
className: T("group relative flex rounded-button", P(f, d)),
|
|
152
165
|
children: [
|
|
153
|
-
d ? /* @__PURE__ */
|
|
154
|
-
/* @__PURE__ */
|
|
155
|
-
href:
|
|
156
|
-
onActivate:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
active: d,
|
|
160
|
-
expanded: p ? m : void 0,
|
|
166
|
+
f && !d ? /* @__PURE__ */ D(L, {}) : null,
|
|
167
|
+
/* @__PURE__ */ O(H, {
|
|
168
|
+
href: V(e.path, a),
|
|
169
|
+
onActivate: C,
|
|
170
|
+
active: f,
|
|
171
|
+
expanded: m ? h : void 0,
|
|
161
172
|
drill: e.drillTo,
|
|
162
|
-
className:
|
|
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),
|
|
163
174
|
children: [
|
|
164
|
-
x ? /* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
175
|
+
x ? /* @__PURE__ */ D(x, { className: T(B(f), _ && "mt-0.5") }) : null,
|
|
176
|
+
/* @__PURE__ */ O("span", {
|
|
166
177
|
className: "flex min-w-0 flex-1 flex-col",
|
|
167
|
-
children: [/* @__PURE__ */
|
|
168
|
-
className:
|
|
178
|
+
children: [/* @__PURE__ */ D("span", {
|
|
179
|
+
className: T("truncate text-body-sm leading-5", f ? "font-medium text-text-primary" : void 0),
|
|
169
180
|
children: e.label
|
|
170
|
-
}), e.subtitle ? /* @__PURE__ */
|
|
171
|
-
className: "truncate text-xs leading-4 text-text-muted",
|
|
181
|
+
}), e.subtitle ? /* @__PURE__ */ D("span", {
|
|
182
|
+
className: d && f ? "truncate text-xs leading-4 text-text-secondary" : "truncate text-xs leading-4 text-text-muted",
|
|
172
183
|
children: e.subtitle
|
|
173
184
|
}) : null]
|
|
174
185
|
}),
|
|
175
|
-
e.count === void 0 ? null : /* @__PURE__ */
|
|
176
|
-
className:
|
|
186
|
+
e.count === void 0 ? null : /* @__PURE__ */ D("span", {
|
|
187
|
+
className: I(f, d),
|
|
177
188
|
children: e.count
|
|
178
189
|
}),
|
|
179
|
-
e.badge ? /* @__PURE__ */
|
|
180
|
-
e.drillTo ? /* @__PURE__ */
|
|
190
|
+
e.badge ? /* @__PURE__ */ D(z, { badge: e.badge }) : null,
|
|
191
|
+
e.drillTo ? /* @__PURE__ */ D(y, {
|
|
181
192
|
"aria-hidden": "true",
|
|
182
|
-
className:
|
|
193
|
+
className: T("size-3.5 shrink-0 text-text-muted", U)
|
|
183
194
|
}) : null,
|
|
184
|
-
|
|
195
|
+
m && !e.path ? /* @__PURE__ */ D("span", {
|
|
185
196
|
className: "text-text-muted",
|
|
186
|
-
children: /* @__PURE__ */
|
|
197
|
+
children: /* @__PURE__ */ D(J, { open: h })
|
|
187
198
|
}) : null
|
|
188
199
|
]
|
|
189
200
|
}),
|
|
190
|
-
|
|
201
|
+
m && e.path ? /* @__PURE__ */ D(Y, {
|
|
191
202
|
entry: e,
|
|
192
|
-
open:
|
|
193
|
-
onToggle: () =>
|
|
203
|
+
open: h,
|
|
204
|
+
onToggle: () => g(!h)
|
|
194
205
|
}) : null,
|
|
195
|
-
b ? /* @__PURE__ */
|
|
206
|
+
b ? /* @__PURE__ */ D("button", {
|
|
196
207
|
type: "button",
|
|
197
208
|
onClick: () => o?.(e),
|
|
198
209
|
"aria-pressed": v,
|
|
199
210
|
"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:
|
|
201
|
-
children: /* @__PURE__ */
|
|
211
|
+
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, {
|
|
202
213
|
"aria-hidden": "true",
|
|
203
214
|
className: "size-3.5"
|
|
204
215
|
})
|
|
205
216
|
}) : null
|
|
206
217
|
]
|
|
207
|
-
}),
|
|
208
|
-
entries:
|
|
218
|
+
}), h ? /* @__PURE__ */ D(X, {
|
|
219
|
+
entries: p,
|
|
209
220
|
rowProps: {
|
|
210
221
|
viewId: n,
|
|
211
222
|
nav: r,
|
|
@@ -218,167 +229,216 @@ function W({ entry: e, viewId: n, nav: r, onNavigate: i, hrefFor: a, onTogglePin
|
|
|
218
229
|
}
|
|
219
230
|
}) : null] });
|
|
220
231
|
}
|
|
221
|
-
function
|
|
222
|
-
|
|
223
|
-
|
|
232
|
+
function re(e, t) {
|
|
233
|
+
return T("relative flex rounded-button", t && "group", P(e, t));
|
|
234
|
+
}
|
|
235
|
+
function ie(e, t, n) {
|
|
236
|
+
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
|
+
}
|
|
238
|
+
function ae({ entry: e, ...t }) {
|
|
239
|
+
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
|
+
return /* @__PURE__ */ O("li", { children: [/* @__PURE__ */ O("div", {
|
|
224
241
|
"data-shell-entry": e.id,
|
|
225
|
-
"data-active":
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
242
|
+
"data-active": o ? "true" : void 0,
|
|
243
|
+
"data-depth": F(a),
|
|
244
|
+
className: re(o, a),
|
|
245
|
+
children: [/* @__PURE__ */ O(H, {
|
|
246
|
+
href: V(e.path, i),
|
|
229
247
|
onActivate: () => {
|
|
230
|
-
e.drillTo && n.push(e.drillTo), e.path && r(e.path),
|
|
248
|
+
e.drillTo && n.push(e.drillTo), e.path && r(e.path), c && u(e.path ? !0 : !l);
|
|
231
249
|
},
|
|
232
|
-
active:
|
|
233
|
-
expanded:
|
|
250
|
+
active: o,
|
|
251
|
+
expanded: c ? l : void 0,
|
|
234
252
|
drill: e.drillTo,
|
|
235
|
-
className:
|
|
253
|
+
className: ie(e, c, a),
|
|
236
254
|
children: [
|
|
237
|
-
|
|
238
|
-
/* @__PURE__ */
|
|
255
|
+
d ? /* @__PURE__ */ D(d, { className: B(o) }) : null,
|
|
256
|
+
/* @__PURE__ */ D("span", {
|
|
239
257
|
className: "min-w-0 flex-1 truncate text-body-sm",
|
|
240
258
|
children: e.label
|
|
241
259
|
}),
|
|
242
|
-
e.count === void 0 ? null : /* @__PURE__ */
|
|
243
|
-
className:
|
|
260
|
+
e.count === void 0 ? null : /* @__PURE__ */ D("span", {
|
|
261
|
+
className: I(o, a),
|
|
244
262
|
children: e.count
|
|
245
263
|
}),
|
|
246
|
-
e.badge ? /* @__PURE__ */
|
|
247
|
-
|
|
264
|
+
e.badge ? /* @__PURE__ */ D(z, { badge: e.badge }) : null,
|
|
265
|
+
c && !e.path ? /* @__PURE__ */ D("span", {
|
|
248
266
|
className: "text-text-muted",
|
|
249
|
-
children: /* @__PURE__ */
|
|
267
|
+
children: /* @__PURE__ */ D(J, { open: l })
|
|
250
268
|
}) : null
|
|
251
269
|
]
|
|
252
|
-
}),
|
|
270
|
+
}), c && e.path ? /* @__PURE__ */ D(Y, {
|
|
253
271
|
entry: e,
|
|
254
|
-
open:
|
|
255
|
-
onToggle: () =>
|
|
272
|
+
open: l,
|
|
273
|
+
onToggle: () => u(!l)
|
|
256
274
|
}) : null]
|
|
257
|
-
}),
|
|
258
|
-
entries:
|
|
275
|
+
}), l ? /* @__PURE__ */ D(X, {
|
|
276
|
+
entries: s,
|
|
259
277
|
rowProps: t
|
|
260
278
|
}) : null] });
|
|
261
279
|
}
|
|
262
|
-
function
|
|
263
|
-
let [e, t] =
|
|
280
|
+
function oe() {
|
|
281
|
+
let [e, t] = g({});
|
|
264
282
|
return {
|
|
265
283
|
expanded: e,
|
|
266
|
-
setExpanded:
|
|
284
|
+
setExpanded: l((e, n) => t((t) => ({
|
|
267
285
|
...t,
|
|
268
286
|
[e]: n
|
|
269
287
|
})), [])
|
|
270
288
|
};
|
|
271
289
|
}
|
|
272
|
-
function
|
|
273
|
-
return /* @__PURE__ */
|
|
274
|
-
className: "truncate text-caption font-semibold uppercase tracking-wider text-text-muted",
|
|
290
|
+
function Z({ children: e, floating: t = !1 }) {
|
|
291
|
+
return /* @__PURE__ */ D("span", {
|
|
292
|
+
className: t ? "truncate text-body-sm font-semibold text-text-primary/70" : "truncate text-caption font-semibold uppercase tracking-wider text-text-muted",
|
|
275
293
|
children: e
|
|
276
294
|
});
|
|
277
295
|
}
|
|
278
|
-
function
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
296
|
+
function se({ label: e, count: t, open: n, controls: r, floating: i, onToggle: a }) {
|
|
297
|
+
return /* @__PURE__ */ O("button", {
|
|
298
|
+
type: "button",
|
|
299
|
+
"aria-expanded": n,
|
|
300
|
+
"aria-controls": r,
|
|
301
|
+
onClick: a,
|
|
302
|
+
"data-shell-section-toggle": "",
|
|
303
|
+
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
|
+
children: [
|
|
305
|
+
/* @__PURE__ */ D(v, {
|
|
306
|
+
"aria-hidden": "true",
|
|
307
|
+
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
|
+
}),
|
|
309
|
+
/* @__PURE__ */ D(Z, {
|
|
310
|
+
floating: i,
|
|
311
|
+
children: e
|
|
312
|
+
}),
|
|
313
|
+
t === void 0 ? null : /* @__PURE__ */ O(E, { children: [" ", /* @__PURE__ */ D("span", {
|
|
314
|
+
"data-shell-section-count": "",
|
|
315
|
+
className: "shrink-0 text-caption tabular-nums text-text-muted",
|
|
316
|
+
children: t
|
|
317
|
+
})] })
|
|
318
|
+
]
|
|
319
|
+
});
|
|
320
|
+
}
|
|
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
|
+
label: l,
|
|
324
|
+
count: i,
|
|
325
|
+
open: c,
|
|
326
|
+
controls: c ? u : void 0,
|
|
327
|
+
floating: !0,
|
|
328
|
+
onToggle: d
|
|
329
|
+
}) : /* @__PURE__ */ O("button", {
|
|
330
|
+
type: "button",
|
|
331
|
+
"aria-expanded": c,
|
|
332
|
+
"aria-controls": c ? u : void 0,
|
|
333
|
+
onClick: d,
|
|
334
|
+
className: T("flex h-7 w-full items-center gap-2 rounded-button ps-2 pe-2.5 text-start hover:bg-bg-sunken", k),
|
|
335
|
+
children: [
|
|
336
|
+
/* @__PURE__ */ D(Z, { children: l }),
|
|
337
|
+
/* @__PURE__ */ D("span", {
|
|
338
|
+
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",
|
|
339
|
+
children: i
|
|
340
|
+
}),
|
|
341
|
+
/* @__PURE__ */ D("span", { className: "flex-1" }),
|
|
342
|
+
D(c ? b : v, {
|
|
343
|
+
"aria-hidden": "true",
|
|
344
|
+
className: "size-3.5 text-text-muted"
|
|
345
|
+
})
|
|
346
|
+
]
|
|
347
|
+
});
|
|
348
|
+
return /* @__PURE__ */ O("div", {
|
|
349
|
+
"data-shell-section": n.id,
|
|
350
|
+
className: "pt-2",
|
|
351
|
+
children: [f, c ? /* @__PURE__ */ D("div", {
|
|
352
|
+
id: u,
|
|
353
|
+
children: a
|
|
354
|
+
}) : null]
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
function Q({ view: e, section: t, ...n }) {
|
|
358
|
+
let r = j(), { nav: i } = n, a = i.curateEntries(t.entries, K(e, t));
|
|
359
|
+
if (a.length === 0) return null;
|
|
360
|
+
let o = /* @__PURE__ */ D("ul", { children: a.map((t) => /* @__PURE__ */ D(ne, {
|
|
282
361
|
entry: t,
|
|
283
362
|
viewId: e.id,
|
|
284
|
-
...
|
|
363
|
+
...n
|
|
285
364
|
}, t.id)) });
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
children: o.length
|
|
302
|
-
}),
|
|
303
|
-
/* @__PURE__ */ w("span", { className: "flex-1" }),
|
|
304
|
-
w(t ? _ : h, {
|
|
305
|
-
"aria-hidden": "true",
|
|
306
|
-
className: "size-3.5 text-text-muted"
|
|
307
|
-
})
|
|
308
|
-
]
|
|
309
|
-
}), t ? /* @__PURE__ */ w("div", {
|
|
310
|
-
id: c,
|
|
311
|
-
children: s
|
|
312
|
-
}) : null]
|
|
313
|
-
});
|
|
314
|
-
}
|
|
315
|
-
return /* @__PURE__ */ T("div", {
|
|
316
|
-
"data-shell-section": n.id,
|
|
317
|
-
children: [n.label ? /* @__PURE__ */ w("div", {
|
|
318
|
-
className: "px-2 pb-1.5 pt-3.5",
|
|
319
|
-
children: /* @__PURE__ */ w(q, { children: n.label })
|
|
320
|
-
}) : null, s]
|
|
365
|
+
return t.collapsible ? /* @__PURE__ */ D(ce, {
|
|
366
|
+
view: e,
|
|
367
|
+
section: t,
|
|
368
|
+
nav: i,
|
|
369
|
+
count: a.length,
|
|
370
|
+
children: o
|
|
371
|
+
}) : /* @__PURE__ */ O("div", {
|
|
372
|
+
"data-shell-section": t.id,
|
|
373
|
+
children: [t.label ? /* @__PURE__ */ D("div", {
|
|
374
|
+
className: r ? "mt-2 flex h-8 items-center px-2" : "px-2 pb-1.5 pt-3.5",
|
|
375
|
+
children: /* @__PURE__ */ D(Z, {
|
|
376
|
+
floating: r,
|
|
377
|
+
children: t.label
|
|
378
|
+
})
|
|
379
|
+
}) : null, o]
|
|
321
380
|
});
|
|
322
381
|
}
|
|
323
|
-
function
|
|
324
|
-
let a = n.isEntryActive(e),
|
|
325
|
-
return /* @__PURE__ */
|
|
326
|
-
className: "relative",
|
|
382
|
+
function le({ entry: e, shortcut: t, nav: n, onNavigate: r, hrefFor: i }) {
|
|
383
|
+
let a = j(), o = n.isEntryActive(e), s = e.icon;
|
|
384
|
+
return /* @__PURE__ */ O("div", {
|
|
385
|
+
className: a ? "relative mb-1.5" : "relative",
|
|
327
386
|
"data-shell-entry": e.id,
|
|
328
|
-
"data-active":
|
|
329
|
-
|
|
330
|
-
|
|
387
|
+
"data-active": o ? "true" : void 0,
|
|
388
|
+
"data-depth": F(a),
|
|
389
|
+
children: [o && !a ? /* @__PURE__ */ D(L, {}) : null, /* @__PURE__ */ O(H, {
|
|
390
|
+
href: V(e.path, i),
|
|
331
391
|
onActivate: () => {
|
|
332
392
|
e.drillTo && n.push(e.drillTo), e.path && r(e.path);
|
|
333
393
|
},
|
|
334
|
-
active:
|
|
394
|
+
active: o,
|
|
335
395
|
drill: e.drillTo,
|
|
336
|
-
className:
|
|
396
|
+
className: T(a ? "flex h-8 w-full items-center gap-2.5 rounded-button ps-2 pe-2 text-start" : "flex h-9.5 w-full items-center gap-2.5 rounded-button ps-2 pe-2 text-start", P(o, a), k),
|
|
337
397
|
children: [
|
|
338
|
-
/* @__PURE__ */
|
|
398
|
+
/* @__PURE__ */ D("span", {
|
|
339
399
|
"aria-hidden": "true",
|
|
340
400
|
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",
|
|
341
|
-
children:
|
|
401
|
+
children: s ? /* @__PURE__ */ D(s, { className: "size-3.5" }) : null
|
|
342
402
|
}),
|
|
343
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ D("span", {
|
|
344
404
|
className: "min-w-0 flex-1 truncate text-body-sm font-semibold text-text-primary",
|
|
345
405
|
children: e.label
|
|
346
406
|
}),
|
|
347
|
-
t ? /* @__PURE__ */
|
|
407
|
+
t ? /* @__PURE__ */ D(R, { children: t }) : null
|
|
348
408
|
]
|
|
349
409
|
})]
|
|
350
410
|
});
|
|
351
411
|
}
|
|
352
|
-
function
|
|
353
|
-
let n = e.header?.icon;
|
|
354
|
-
return /* @__PURE__ */
|
|
412
|
+
function ue({ view: e, nav: t }) {
|
|
413
|
+
let n = j(), r = e.header?.icon;
|
|
414
|
+
return /* @__PURE__ */ O("div", {
|
|
355
415
|
className: "pb-1",
|
|
356
|
-
children: [e.back ? /* @__PURE__ */
|
|
416
|
+
children: [e.back ? /* @__PURE__ */ O("button", {
|
|
357
417
|
type: "button",
|
|
358
418
|
onClick: () => t.back(),
|
|
359
419
|
"data-shell-back": "",
|
|
360
|
-
className:
|
|
361
|
-
children: [/* @__PURE__ */
|
|
420
|
+
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(_, {
|
|
362
422
|
"aria-hidden": "true",
|
|
363
|
-
className:
|
|
364
|
-
}), /* @__PURE__ */
|
|
423
|
+
className: T("size-3.5 shrink-0", U)
|
|
424
|
+
}), /* @__PURE__ */ D("span", {
|
|
365
425
|
className: "truncate text-body-sm",
|
|
366
426
|
children: e.back.label
|
|
367
427
|
})]
|
|
368
|
-
}) : null, e.header ? /* @__PURE__ */
|
|
428
|
+
}) : null, e.header ? /* @__PURE__ */ O("div", {
|
|
369
429
|
className: "flex items-center gap-2.5 px-2 pb-2 pt-2.5",
|
|
370
|
-
children: [/* @__PURE__ */
|
|
430
|
+
children: [/* @__PURE__ */ D("span", {
|
|
371
431
|
"aria-hidden": "true",
|
|
372
432
|
className: "flex size-8 shrink-0 items-center justify-center rounded-button border border-border-subtle bg-bg-elevated",
|
|
373
|
-
children:
|
|
374
|
-
}), /* @__PURE__ */
|
|
433
|
+
children: r ? /* @__PURE__ */ D(r, { className: "size-4 text-accent-primary" }) : null
|
|
434
|
+
}), /* @__PURE__ */ O("span", {
|
|
375
435
|
className: "flex min-w-0 flex-col",
|
|
376
|
-
children: [/* @__PURE__ */
|
|
436
|
+
children: [/* @__PURE__ */ D("h2", {
|
|
377
437
|
tabIndex: -1,
|
|
378
438
|
"data-shell-view-title": "",
|
|
379
439
|
className: "truncate text-body-md font-bold leading-5 text-text-primary outline-none",
|
|
380
440
|
children: e.header.title
|
|
381
|
-
}), e.header.subtitle ? /* @__PURE__ */
|
|
441
|
+
}), e.header.subtitle ? /* @__PURE__ */ D("span", {
|
|
382
442
|
className: "truncate text-xs leading-4 text-text-muted",
|
|
383
443
|
children: e.header.subtitle
|
|
384
444
|
}) : null]
|
|
@@ -386,9 +446,9 @@ function X({ view: e, nav: t }) {
|
|
|
386
446
|
}) : null]
|
|
387
447
|
});
|
|
388
448
|
}
|
|
389
|
-
function
|
|
390
|
-
let n =
|
|
391
|
-
return
|
|
449
|
+
function de(e, t) {
|
|
450
|
+
let n = h(null), r = h(e.activeView.id), i = e.activeView.id;
|
|
451
|
+
return p(() => {
|
|
392
452
|
let e = r.current;
|
|
393
453
|
r.current = i;
|
|
394
454
|
let a = n.current;
|
|
@@ -397,7 +457,7 @@ function ee(e, t) {
|
|
|
397
457
|
if (!a || e === i || !o) return;
|
|
398
458
|
let s = document.activeElement;
|
|
399
459
|
(!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();
|
|
400
|
-
}, [i, t]),
|
|
460
|
+
}, [i, t]), m(() => ({
|
|
401
461
|
...e,
|
|
402
462
|
push: (t) => {
|
|
403
463
|
n.current = "push", e.push(t);
|
|
@@ -407,149 +467,218 @@ function ee(e, t) {
|
|
|
407
467
|
}
|
|
408
468
|
}), [e]);
|
|
409
469
|
}
|
|
410
|
-
function
|
|
411
|
-
return
|
|
470
|
+
function fe({ view: e, nav: t, expanded: n }) {
|
|
471
|
+
return q(e, t, n).map(({ entry: e, open: t }) => ({
|
|
412
472
|
id: e.id,
|
|
413
473
|
label: e.label,
|
|
414
474
|
expanded: t
|
|
415
475
|
}));
|
|
416
476
|
}
|
|
417
|
-
function
|
|
418
|
-
let { view: r, nav: i, expanded: a, setExpanded: o } = e, s =
|
|
419
|
-
return s ? s.open === n ? { status: "already" } : (
|
|
477
|
+
function pe(e, t, n) {
|
|
478
|
+
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, {
|
|
420
480
|
nav: i,
|
|
421
481
|
viewId: r.id,
|
|
422
482
|
setExpanded: o
|
|
423
483
|
}), { status: "done" }) : { status: "failed" };
|
|
424
484
|
}
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
485
|
+
var me = "flex min-h-0 flex-1 flex-col overflow-hidden rounded-2xl border border-border-subtle bg-bg-surface", he = {
|
|
486
|
+
default: {
|
|
487
|
+
aside: "flex h-full w-[272px] shrink-0 flex-col border-e border-border-subtle bg-bg-surface text-text-primary",
|
|
488
|
+
top: "shrink-0 px-2.5 pt-3",
|
|
489
|
+
actions: "shrink-0 px-2.5 pt-3",
|
|
490
|
+
banner: "shrink-0 px-2.5 pt-2.5",
|
|
491
|
+
nav: "scrollbar-slim scrollbar-hover-only min-h-0 flex-1 overflow-y-auto px-2.5 pb-3 pt-2.5",
|
|
492
|
+
footer: "shrink-0 border-t border-border-subtle px-2.5 py-2"
|
|
493
|
+
},
|
|
494
|
+
floating: {
|
|
495
|
+
aside: "flex h-full w-[272px] shrink-0 flex-col py-2 ps-2 text-text-primary",
|
|
496
|
+
top: "shrink-0 px-2 pb-1.5 pt-2",
|
|
497
|
+
actions: "shrink-0 px-2 pb-2",
|
|
498
|
+
banner: "shrink-0 px-2 pb-2",
|
|
499
|
+
nav: "scrollbar-slim scrollbar-hover-only min-h-0 flex-1 overflow-y-auto px-2 pb-2 pt-0.5",
|
|
500
|
+
footer: "shrink-0 px-2 pb-2 pt-1.5"
|
|
501
|
+
}
|
|
502
|
+
};
|
|
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({
|
|
507
|
+
nav: M,
|
|
508
|
+
view: N,
|
|
509
|
+
expanded: T,
|
|
510
|
+
setExpanded: k,
|
|
433
511
|
onToggleCollapse: b
|
|
434
512
|
});
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
nav:
|
|
438
|
-
view:
|
|
439
|
-
expanded:
|
|
440
|
-
setExpanded:
|
|
513
|
+
d(() => {
|
|
514
|
+
F.current = {
|
|
515
|
+
nav: M,
|
|
516
|
+
view: N,
|
|
517
|
+
expanded: T,
|
|
518
|
+
setExpanded: k,
|
|
441
519
|
onToggleCollapse: b
|
|
442
520
|
};
|
|
443
521
|
}, [
|
|
444
|
-
|
|
522
|
+
M,
|
|
523
|
+
N,
|
|
524
|
+
T,
|
|
445
525
|
k,
|
|
446
|
-
S,
|
|
447
|
-
E,
|
|
448
526
|
b
|
|
449
527
|
]);
|
|
450
|
-
let
|
|
528
|
+
let I = b !== void 0, L = m(() => I ? {
|
|
451
529
|
collapsed: () => !1,
|
|
452
530
|
setCollapsed: (e) => {
|
|
453
|
-
let t =
|
|
531
|
+
let t = F.current.onToggleCollapse;
|
|
454
532
|
return e ? t ? (t(), { status: "done" }) : { status: "failed" } : { status: "already" };
|
|
455
533
|
},
|
|
456
|
-
entries: () =>
|
|
457
|
-
setExpanded: (e, t) =>
|
|
458
|
-
} : null, [
|
|
459
|
-
e("sidebar",
|
|
460
|
-
let
|
|
461
|
-
nav:
|
|
534
|
+
entries: () => fe(F.current),
|
|
535
|
+
setExpanded: (e, t) => pe(F.current, e, t)
|
|
536
|
+
} : null, [I]);
|
|
537
|
+
e("sidebar", L);
|
|
538
|
+
let R = {
|
|
539
|
+
nav: M,
|
|
462
540
|
onNavigate: g,
|
|
463
541
|
hrefFor: _,
|
|
464
542
|
onTogglePin: v,
|
|
465
543
|
isPinned: y,
|
|
466
|
-
expanded:
|
|
467
|
-
setExpanded:
|
|
468
|
-
}
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
"
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
shortcut: p,
|
|
496
|
-
nav: O,
|
|
497
|
-
onNavigate: g,
|
|
498
|
-
hrefFor: _
|
|
499
|
-
}) : null,
|
|
500
|
-
k.sections.map((e) => /* @__PURE__ */ w(J, {
|
|
501
|
-
view: k,
|
|
502
|
-
section: e,
|
|
503
|
-
...P
|
|
504
|
-
}, e.id)),
|
|
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,
|
|
544
|
+
expanded: T,
|
|
545
|
+
setExpanded: k
|
|
546
|
+
}, z = /* @__PURE__ */ O(E, { children: [
|
|
547
|
+
/* @__PURE__ */ D("div", {
|
|
548
|
+
className: C.top,
|
|
549
|
+
children: a
|
|
550
|
+
}),
|
|
551
|
+
/* @__PURE__ */ D("div", {
|
|
552
|
+
className: C.actions,
|
|
553
|
+
children: o
|
|
554
|
+
}),
|
|
555
|
+
p ? /* @__PURE__ */ D("div", {
|
|
556
|
+
"data-shell-sidebar-banner": "",
|
|
557
|
+
className: C.banner,
|
|
558
|
+
children: p
|
|
559
|
+
}) : null,
|
|
560
|
+
/* @__PURE__ */ D("nav", {
|
|
561
|
+
"aria-label": w("shell.sidebar.navigation", "Main navigation"),
|
|
562
|
+
className: C.nav,
|
|
563
|
+
children: P ? /* @__PURE__ */ O(E, { children: [
|
|
564
|
+
l && r.filterEntries([l]).length > 0 ? /* @__PURE__ */ D(le, {
|
|
565
|
+
entry: l,
|
|
566
|
+
shortcut: u,
|
|
567
|
+
nav: M,
|
|
568
|
+
onNavigate: g,
|
|
569
|
+
hrefFor: _
|
|
570
|
+
}) : null,
|
|
571
|
+
N.sections.map((e) => /* @__PURE__ */ D(Q, {
|
|
572
|
+
view: N,
|
|
511
573
|
section: e,
|
|
512
|
-
...
|
|
513
|
-
}, e.id))
|
|
514
|
-
|
|
515
|
-
/* @__PURE__ */
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
574
|
+
...R
|
|
575
|
+
}, e.id)),
|
|
576
|
+
f
|
|
577
|
+
] }) : /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D(ue, {
|
|
578
|
+
view: N,
|
|
579
|
+
nav: M
|
|
580
|
+
}), N.sections.map((e) => /* @__PURE__ */ D(Q, {
|
|
581
|
+
view: N,
|
|
582
|
+
section: e,
|
|
583
|
+
...R
|
|
584
|
+
}, e.id))] })
|
|
585
|
+
}),
|
|
586
|
+
/* @__PURE__ */ D("span", {
|
|
587
|
+
"aria-live": "polite",
|
|
588
|
+
className: "sr-only",
|
|
589
|
+
children: P ? "" : N.header?.title ?? ""
|
|
590
|
+
}),
|
|
591
|
+
/* @__PURE__ */ D("div", {
|
|
592
|
+
className: C.footer,
|
|
593
|
+
children: c
|
|
594
|
+
})
|
|
595
|
+
] });
|
|
596
|
+
return /* @__PURE__ */ D(A.Provider, {
|
|
597
|
+
value: x,
|
|
598
|
+
children: /* @__PURE__ */ D("aside", {
|
|
599
|
+
ref: j,
|
|
600
|
+
"data-tour": n["data-tour"],
|
|
601
|
+
"data-shell-sidebar": "expanded",
|
|
602
|
+
"data-shell-view": N.id,
|
|
603
|
+
"data-shell-appearance": S ? "floating" : void 0,
|
|
604
|
+
className: C.aside,
|
|
605
|
+
children: S ? /* @__PURE__ */ D("div", {
|
|
606
|
+
"data-shell-panel": "",
|
|
607
|
+
className: me,
|
|
608
|
+
children: z
|
|
609
|
+
}) : z
|
|
610
|
+
})
|
|
611
|
+
});
|
|
612
|
+
}
|
|
613
|
+
function _e({ label: e, action: t, children: n, open: r, onOpenChange: i, count: a, floating: o }) {
|
|
614
|
+
let s = f();
|
|
615
|
+
return /* @__PURE__ */ O("section", {
|
|
616
|
+
"aria-label": e,
|
|
617
|
+
"data-shell-block": "",
|
|
618
|
+
"data-open": r ? "true" : "false",
|
|
619
|
+
className: "pt-2",
|
|
620
|
+
children: [/* @__PURE__ */ O("div", {
|
|
621
|
+
className: "flex items-center gap-1",
|
|
622
|
+
children: [/* @__PURE__ */ D(se, {
|
|
623
|
+
label: e,
|
|
624
|
+
count: a,
|
|
625
|
+
open: r,
|
|
626
|
+
controls: s,
|
|
627
|
+
floating: o,
|
|
628
|
+
onToggle: () => i(!r)
|
|
629
|
+
}), t]
|
|
630
|
+
}), /* @__PURE__ */ D("div", {
|
|
631
|
+
id: s,
|
|
632
|
+
inert: !r,
|
|
633
|
+
"data-shell-block-body": "",
|
|
634
|
+
className: T("grid transition-[grid-template-rows] duration-normal ease-out motion-reduce:transition-none", r ? "grid-rows-[1fr]" : "grid-rows-[0fr]"),
|
|
635
|
+
children: /* @__PURE__ */ D("div", {
|
|
636
|
+
className: T("-m-0.5 min-h-0 overflow-hidden p-0.5 transition-[visibility] duration-normal motion-reduce:transition-none", r ? "visible" : "invisible"),
|
|
637
|
+
children: n
|
|
523
638
|
})
|
|
524
|
-
]
|
|
639
|
+
})]
|
|
525
640
|
});
|
|
526
641
|
}
|
|
527
|
-
function
|
|
528
|
-
|
|
642
|
+
function ve({ label: e, action: t, children: n, appearance: r, onOpenChange: i, open: a = !0, count: o }) {
|
|
643
|
+
let s = u(A), c = (r ?? s) === "floating";
|
|
644
|
+
return i ? /* @__PURE__ */ D(_e, {
|
|
645
|
+
label: e,
|
|
646
|
+
action: t,
|
|
647
|
+
open: a,
|
|
648
|
+
onOpenChange: i,
|
|
649
|
+
count: o,
|
|
650
|
+
floating: c,
|
|
651
|
+
children: n
|
|
652
|
+
}) : /* @__PURE__ */ O("section", {
|
|
529
653
|
"aria-label": e,
|
|
530
654
|
"data-shell-block": "",
|
|
531
|
-
children: [/* @__PURE__ */
|
|
532
|
-
className: "flex items-center gap-2 px-2 pb-1.5 pt-3.5",
|
|
533
|
-
children: [/* @__PURE__ */
|
|
655
|
+
children: [/* @__PURE__ */ O("div", {
|
|
656
|
+
className: c ? "mt-2 flex h-8 items-center gap-2 px-2" : "flex items-center gap-2 px-2 pb-1.5 pt-3.5",
|
|
657
|
+
children: [/* @__PURE__ */ D("span", {
|
|
534
658
|
className: "min-w-0 flex-1",
|
|
535
|
-
children: /* @__PURE__ */
|
|
659
|
+
children: /* @__PURE__ */ D(Z, {
|
|
660
|
+
floating: c,
|
|
661
|
+
children: e
|
|
662
|
+
})
|
|
536
663
|
}), t]
|
|
537
664
|
}), n]
|
|
538
665
|
});
|
|
539
666
|
}
|
|
540
|
-
function
|
|
541
|
-
|
|
667
|
+
function ye({ icon: e, label: t, active: n = !1, href: r, onClick: i, trailing: a, appearance: o }) {
|
|
668
|
+
let s = u(A), c = (o ?? s) === "floating";
|
|
669
|
+
return /* @__PURE__ */ O("div", {
|
|
542
670
|
"data-active": n ? "true" : void 0,
|
|
543
|
-
|
|
671
|
+
"data-depth": F(c),
|
|
672
|
+
className: T("group relative flex items-center rounded-button", P(n, c)),
|
|
544
673
|
children: [
|
|
545
|
-
n ? /* @__PURE__ */
|
|
546
|
-
/* @__PURE__ */
|
|
674
|
+
n && !c ? /* @__PURE__ */ D(L, {}) : null,
|
|
675
|
+
/* @__PURE__ */ O(H, {
|
|
547
676
|
href: r,
|
|
548
677
|
onActivate: i,
|
|
549
678
|
active: n,
|
|
550
679
|
title: t,
|
|
551
|
-
className:
|
|
552
|
-
children: [e ? /* @__PURE__ */
|
|
680
|
+
className: T(c ? "flex h-7.5 min-w-0 flex-1 items-center gap-2.5 rounded-button ps-2 text-start" : "flex h-8 min-w-0 flex-1 items-center gap-2.5 rounded-button ps-2 text-start", a ? "pe-1" : c ? "pe-2" : "pe-2.5", k),
|
|
681
|
+
children: [e ? /* @__PURE__ */ D(e, { className: B(n, "size-3.5") }) : null, /* @__PURE__ */ D("span", {
|
|
553
682
|
className: "min-w-0 flex-1 truncate text-body-sm",
|
|
554
683
|
children: t
|
|
555
684
|
})]
|
|
@@ -558,155 +687,178 @@ function ae({ icon: e, label: t, active: n = !1, href: r, onClick: i, trailing:
|
|
|
558
687
|
]
|
|
559
688
|
});
|
|
560
689
|
}
|
|
561
|
-
function
|
|
562
|
-
return /* @__PURE__ */
|
|
690
|
+
function be({ label: e, hint: t }) {
|
|
691
|
+
return /* @__PURE__ */ O(E, { children: [/* @__PURE__ */ D("span", {
|
|
563
692
|
className: "text-body-sm font-normal",
|
|
564
693
|
children: e
|
|
565
|
-
}), t ? /* @__PURE__ */
|
|
694
|
+
}), t ? /* @__PURE__ */ D(R, {
|
|
566
695
|
className: "bg-bg-surface",
|
|
567
696
|
children: t
|
|
568
697
|
}) : null] });
|
|
569
698
|
}
|
|
570
|
-
function
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
699
|
+
function xe(e, t) {
|
|
700
|
+
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";
|
|
701
|
+
}
|
|
702
|
+
function $({ label: e, hint: t, icon: o, active: s = !1, badge: c, href: l, onClick: u, entryId: d, testId: f }) {
|
|
703
|
+
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: [
|
|
704
|
+
s && !p ? /* @__PURE__ */ D(L, { offsetClass: "-start-3" }) : null,
|
|
705
|
+
/* @__PURE__ */ D(o, { className: "size-4" }),
|
|
706
|
+
c ? /* @__PURE__ */ D("span", {
|
|
575
707
|
className: "absolute end-1 top-1",
|
|
576
|
-
children: /* @__PURE__ */
|
|
708
|
+
children: /* @__PURE__ */ D(z, {
|
|
577
709
|
badge: c,
|
|
578
710
|
compact: !0
|
|
579
711
|
})
|
|
580
712
|
}) : null
|
|
581
713
|
] });
|
|
582
|
-
return /* @__PURE__ */
|
|
714
|
+
return /* @__PURE__ */ O(n, {
|
|
583
715
|
delayDuration: 200,
|
|
584
|
-
children: [/* @__PURE__ */
|
|
716
|
+
children: [/* @__PURE__ */ D(i, {
|
|
585
717
|
asChild: !0,
|
|
586
|
-
children: l ? /* @__PURE__ */
|
|
718
|
+
children: l ? /* @__PURE__ */ D("a", {
|
|
587
719
|
href: l,
|
|
588
720
|
onClick: a(u),
|
|
589
|
-
"aria-label":
|
|
721
|
+
"aria-label": h,
|
|
590
722
|
"aria-current": s ? "page" : void 0,
|
|
591
723
|
"data-shell-entry": d,
|
|
592
724
|
"data-testid": f,
|
|
593
725
|
"data-active": s ? "true" : void 0,
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
726
|
+
"data-depth": F(p),
|
|
727
|
+
className: g,
|
|
728
|
+
children: _
|
|
729
|
+
}) : /* @__PURE__ */ D("button", {
|
|
597
730
|
type: "button",
|
|
598
731
|
onClick: u,
|
|
599
|
-
"aria-label":
|
|
732
|
+
"aria-label": h,
|
|
600
733
|
"aria-current": s ? "page" : void 0,
|
|
601
734
|
"data-shell-entry": d,
|
|
602
735
|
"data-testid": f,
|
|
603
736
|
"data-active": s ? "true" : void 0,
|
|
604
|
-
|
|
605
|
-
|
|
737
|
+
"data-depth": F(p),
|
|
738
|
+
className: g,
|
|
739
|
+
children: _
|
|
606
740
|
})
|
|
607
|
-
}), /* @__PURE__ */
|
|
741
|
+
}), /* @__PURE__ */ D(r, {
|
|
608
742
|
side: "right",
|
|
609
743
|
sideOffset: 10,
|
|
610
744
|
className: "flex items-center gap-2 rounded-md border border-border-subtle bg-popover px-2 py-1 text-text-primary shadow-overlay",
|
|
611
|
-
children: /* @__PURE__ */
|
|
745
|
+
children: /* @__PURE__ */ D(be, {
|
|
612
746
|
label: e,
|
|
613
747
|
hint: t
|
|
614
748
|
})
|
|
615
749
|
})]
|
|
616
750
|
});
|
|
617
751
|
}
|
|
618
|
-
function
|
|
619
|
-
return /* @__PURE__ */
|
|
752
|
+
function Se() {
|
|
753
|
+
return /* @__PURE__ */ D("span", {
|
|
620
754
|
"aria-hidden": "true",
|
|
621
755
|
className: "mx-auto my-1.5 h-px w-8 shrink-0 bg-border-subtle"
|
|
622
756
|
});
|
|
623
757
|
}
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
758
|
+
var Ce = {
|
|
759
|
+
default: {
|
|
760
|
+
aside: "flex h-full w-16 shrink-0 flex-col border-e border-border-subtle bg-bg-surface text-text-primary",
|
|
761
|
+
logo: "flex shrink-0 justify-center pt-4"
|
|
762
|
+
},
|
|
763
|
+
floating: {
|
|
764
|
+
aside: "flex h-full w-16 shrink-0 flex-col py-2 ps-2 text-text-primary",
|
|
765
|
+
logo: "flex shrink-0 justify-center pt-3.5"
|
|
766
|
+
}
|
|
767
|
+
};
|
|
768
|
+
function we(n) {
|
|
769
|
+
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);
|
|
770
|
+
s(N);
|
|
771
|
+
let P = h(g);
|
|
772
|
+
d(() => {
|
|
773
|
+
P.current = g;
|
|
630
774
|
}, [g]);
|
|
631
|
-
let
|
|
775
|
+
let F = m(() => ({
|
|
632
776
|
collapsed: () => !0,
|
|
633
|
-
setCollapsed: (e) => e ? { status: "already" } : (
|
|
777
|
+
setCollapsed: (e) => e ? { status: "already" } : (P.current(), { status: "done" }),
|
|
634
778
|
entries: () => [],
|
|
635
779
|
setExpanded: () => ({ status: "failed" })
|
|
636
780
|
}), []);
|
|
637
|
-
e("sidebar",
|
|
638
|
-
let
|
|
639
|
-
e.drillTo && r.push(e.drillTo), e.path ?
|
|
640
|
-
},
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
781
|
+
e("sidebar", F);
|
|
782
|
+
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) => {
|
|
783
|
+
e.drillTo && r.push(e.drillTo), e.path ? u(e.path) : e.drillTo && g();
|
|
784
|
+
}, 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
|
+
/* @__PURE__ */ D("div", {
|
|
786
|
+
className: j.logo,
|
|
787
|
+
children: p
|
|
788
|
+
}),
|
|
789
|
+
l ? /* @__PURE__ */ D("div", {
|
|
790
|
+
"data-shell-sidebar-banner": "",
|
|
791
|
+
className: "flex shrink-0 justify-center px-1 pt-2.5",
|
|
792
|
+
children: l
|
|
793
|
+
}) : null,
|
|
794
|
+
/* @__PURE__ */ O("nav", {
|
|
795
|
+
"aria-label": M("shell.sidebar.navigation", "Main navigation"),
|
|
796
|
+
className: "scrollbar-slim flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto pt-2.5",
|
|
797
|
+
children: [
|
|
798
|
+
/* @__PURE__ */ D($, {
|
|
799
|
+
label: M("shell.sidebar.expand", "Expand sidebar"),
|
|
800
|
+
icon: x,
|
|
801
|
+
onClick: g,
|
|
802
|
+
testId: "shell-rail-expand"
|
|
803
|
+
}),
|
|
804
|
+
v ? /* @__PURE__ */ D("div", {
|
|
805
|
+
className: "flex justify-center",
|
|
806
|
+
children: v
|
|
807
|
+
}) : /* @__PURE__ */ D($, {
|
|
808
|
+
label: M("shell.sidebar.new", "New"),
|
|
809
|
+
icon: C,
|
|
810
|
+
onClick: _
|
|
811
|
+
}),
|
|
812
|
+
/* @__PURE__ */ D($, {
|
|
813
|
+
label: M("shell.sidebar.search", "Search"),
|
|
814
|
+
icon: w,
|
|
815
|
+
onClick: y
|
|
816
|
+
}),
|
|
817
|
+
/* @__PURE__ */ D(Se, {}),
|
|
818
|
+
R?.icon ? /* @__PURE__ */ D($, {
|
|
819
|
+
label: R.label,
|
|
820
|
+
icon: R.icon,
|
|
821
|
+
active: B(R),
|
|
822
|
+
href: V(R.path, f),
|
|
823
|
+
onClick: () => z(R),
|
|
824
|
+
entryId: R.id
|
|
825
|
+
}) : null,
|
|
826
|
+
L.map((e) => e.icon ? /* @__PURE__ */ D($, {
|
|
827
|
+
label: e.label,
|
|
828
|
+
hint: e.badge?.hint,
|
|
829
|
+
icon: e.icon,
|
|
830
|
+
active: B(e),
|
|
831
|
+
badge: e.badge,
|
|
832
|
+
href: V(e.path, f),
|
|
833
|
+
onClick: () => z(e),
|
|
834
|
+
entryId: e.id
|
|
835
|
+
}, e.id) : null),
|
|
836
|
+
/* @__PURE__ */ D(Se, {}),
|
|
837
|
+
/* @__PURE__ */ D("div", {
|
|
838
|
+
className: "flex justify-center",
|
|
839
|
+
children: b
|
|
840
|
+
})
|
|
841
|
+
]
|
|
842
|
+
}),
|
|
843
|
+
/* @__PURE__ */ D("div", {
|
|
844
|
+
className: "flex shrink-0 justify-center border-t border-border-subtle py-3",
|
|
845
|
+
children: S
|
|
846
|
+
})
|
|
847
|
+
] });
|
|
848
|
+
return /* @__PURE__ */ D(A.Provider, {
|
|
849
|
+
value: T,
|
|
850
|
+
children: /* @__PURE__ */ D("aside", {
|
|
851
|
+
ref: N,
|
|
852
|
+
"data-tour": n["data-tour"],
|
|
853
|
+
"data-shell-sidebar": "rail",
|
|
854
|
+
"data-shell-appearance": k ? "floating" : void 0,
|
|
855
|
+
className: j.aside,
|
|
856
|
+
children: k ? /* @__PURE__ */ D("div", {
|
|
857
|
+
"data-shell-panel": "",
|
|
858
|
+
className: me,
|
|
859
|
+
children: H
|
|
860
|
+
}) : H
|
|
861
|
+
})
|
|
710
862
|
});
|
|
711
863
|
}
|
|
712
|
-
export {
|
|
864
|
+
export { R as ShellKbd, be as ShellRailTooltipLabel, ge as ShellSidebar, ye as ShellSidebarCompactRow, we as ShellSidebarRail, ve as ShellSidebarSection };
|