@burdenoff/fe-libs 2026.1021.6 → 2026.1021.7
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/AccountSwitcher.js +7 -7
- package/dist/chrome/AutoBreadcrumbs.js +3 -3
- package/dist/chrome/Breadcrumbs.js +24 -24
- package/dist/chrome/ContextSwitcher.js +7 -7
- package/dist/chrome/DynamicFooter.js +3 -3
- package/dist/chrome/HeaderThemeSwitcher.js +14 -14
- package/dist/chrome/LanguagePickerSheet.js +7 -7
- package/dist/chrome/NativeTopBar.js +4 -4
- package/dist/chrome/NavCustomizeDialog.js +12 -12
- package/dist/chrome/ProductPickerSheet.js +7 -7
- package/dist/chrome/SideNavigation.js +17 -17
- package/dist/chrome/Sidebar.js +34 -34
- package/dist/chrome/Tabs.js +20 -20
- package/dist/chrome/ThemePreferences.js +188 -188
- package/dist/shared/assistant/ui/AssistantChatArea.js +4 -4
- package/dist/shared/components/ContextConversationWidget.js +7 -7
- package/dist/shared/components/QuotaUpgradeBridge.js +13 -13
- package/dist/shared/pages/AiPage.js +6 -6
- package/dist/shared/providers/shell/ProfileI18nBridge.js +11 -11
- package/dist/shared-hooks-shell.js +7 -7
- package/dist/shared-providers-shell.js +6 -6
- package/dist/ui/branded-splash.d.ts +25 -2
- package/dist/ui/branded-splash.js +48 -31
- package/dist/ui/cta-overflow-menu.js +17 -17
- package/dist/ui/guidance.js +19 -19
- package/dist/ui/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useShellLabel as e } from "../shared/providers/shell/useShellLabel.js";
|
|
2
|
+
import { Sheet as t, SheetContent as n, SheetHeader as r, SheetTitle as i } from "../ui/sheet.js";
|
|
3
3
|
import { useEffect as a, useRef as o, useState as s } from "react";
|
|
4
4
|
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
5
5
|
//#region src/chrome/AccountSwitcher.tsx
|
|
@@ -16,7 +16,7 @@ function f(e, t, n) {
|
|
|
16
16
|
return r.length >= 2 ? `${r[0].charAt(0)}${r[1].charAt(0)}`.toUpperCase() : e.substring(0, 2).toUpperCase();
|
|
17
17
|
}
|
|
18
18
|
var p = ({ accounts: p, activeAccountId: m, onSwitchAccount: h, onAddAccount: g, onRemoveAccount: _, onLogoutAll: v, compact: y = !1 }) => {
|
|
19
|
-
let b =
|
|
19
|
+
let b = e(), [x, S] = s(!1), C = d(), w = o(null), T = p.find((e) => e.id === m) || p[0], E = p.filter((e) => e.id !== m);
|
|
20
20
|
a(() => {
|
|
21
21
|
if (C) return;
|
|
22
22
|
let e = (e) => {
|
|
@@ -194,15 +194,15 @@ var p = ({ accounts: p, activeAccountId: m, onSwitchAccount: h, onAddAccount: g,
|
|
|
194
194
|
});
|
|
195
195
|
return C ? /* @__PURE__ */ u("div", {
|
|
196
196
|
className: "relative",
|
|
197
|
-
children: [A, /* @__PURE__ */ l(
|
|
197
|
+
children: [A, /* @__PURE__ */ l(t, {
|
|
198
198
|
open: x,
|
|
199
199
|
onOpenChange: S,
|
|
200
|
-
children: /* @__PURE__ */ u(
|
|
200
|
+
children: /* @__PURE__ */ u(n, {
|
|
201
201
|
side: "bottom",
|
|
202
202
|
className: "h-auto max-h-[70vh] flex flex-col p-0",
|
|
203
|
-
children: [/* @__PURE__ */ l(
|
|
203
|
+
children: [/* @__PURE__ */ l(r, {
|
|
204
204
|
className: "px-4 pt-4 pb-2 border-b border-border-subtle",
|
|
205
|
-
children: /* @__PURE__ */ l(
|
|
205
|
+
children: /* @__PURE__ */ l(i, {
|
|
206
206
|
className: "text-text-primary",
|
|
207
207
|
children: b("userMenu.accounts", "Accounts")
|
|
208
208
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useShellLabel as e } from "../shared/providers/shell/useShellLabel.js";
|
|
2
|
+
import { useNavRegistryStore as t } from "../shared/hooks/shell/useNavRegistry.js";
|
|
3
3
|
import { useSafeShellUi as n } from "../shared/providers/shell/ShellUiProvider.js";
|
|
4
4
|
import { resolveBreadcrumbLabel as r } from "./breadcrumbLabel.js";
|
|
5
5
|
import { useEffect as i, useMemo as a, useState as o } from "react";
|
|
@@ -19,7 +19,7 @@ typeof window < "u" && (window.__breadcrumbRegistry = {
|
|
|
19
19
|
unregister: v
|
|
20
20
|
});
|
|
21
21
|
function y() {
|
|
22
|
-
let _ = p(), v = m(), y =
|
|
22
|
+
let _ = p(), v = m(), y = e(), b = t((e) => e.items), x = n(), [S, C] = o(0);
|
|
23
23
|
i(() => {
|
|
24
24
|
let e = setInterval(() => {
|
|
25
25
|
C((e) => e + 1);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useShellLabel as e } from "../shared/providers/shell/useShellLabel.js";
|
|
2
|
+
import { cn as t } from "../shared-utils.js";
|
|
3
3
|
import { Fragment as n, useMemo as r } from "react";
|
|
4
4
|
import { ChevronRight as i, Home as a } from "lucide-react";
|
|
5
5
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
@@ -9,7 +9,7 @@ var c = /* @__PURE__ */ o(i, {
|
|
|
9
9
|
className: "size-3.5 shrink-0 text-text-muted opacity-70",
|
|
10
10
|
strokeWidth: 2
|
|
11
11
|
}), l = "inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 text-text-secondary transition-colors duration-150 hover:bg-bg-sunken hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-strong", u = "inline-flex items-center gap-1 rounded-md px-1.5 py-0.5 font-semibold text-text-primary cursor-default", d = ({ items: i, separator: d, showHome: f = !0, onHomeClick: p, maxItems: m = 5, className: h }) => {
|
|
12
|
-
let g =
|
|
12
|
+
let g = e(), _ = r(() => i.length <= m ? i : [
|
|
13
13
|
i[0],
|
|
14
14
|
{
|
|
15
15
|
label: "...",
|
|
@@ -19,7 +19,7 @@ var c = /* @__PURE__ */ o(i, {
|
|
|
19
19
|
], [i, m]), v = d ?? c;
|
|
20
20
|
return /* @__PURE__ */ o("nav", {
|
|
21
21
|
"aria-label": g("nav.breadcrumb", "Breadcrumb"),
|
|
22
|
-
className:
|
|
22
|
+
className: t("flex min-w-0 items-center gap-1 text-[13px] font-medium", h),
|
|
23
23
|
children: /* @__PURE__ */ s("ol", {
|
|
24
24
|
className: "flex min-w-0 flex-wrap items-center gap-0.5",
|
|
25
25
|
children: [f && /* @__PURE__ */ o("li", {
|
|
@@ -27,13 +27,13 @@ var c = /* @__PURE__ */ o(i, {
|
|
|
27
27
|
children: /* @__PURE__ */ o("button", {
|
|
28
28
|
type: "button",
|
|
29
29
|
onClick: p,
|
|
30
|
-
className:
|
|
30
|
+
className: t(l, "p-1.5"),
|
|
31
31
|
"aria-label": g("nav.home", "Home"),
|
|
32
32
|
children: /* @__PURE__ */ o(a, { className: "size-3.5" })
|
|
33
33
|
})
|
|
34
|
-
}), _.map((
|
|
35
|
-
if (!
|
|
36
|
-
let i = "isEllipsis" in
|
|
34
|
+
}), _.map((e, r) => {
|
|
35
|
+
if (!e) return null;
|
|
36
|
+
let i = "isEllipsis" in e && e.isEllipsis;
|
|
37
37
|
return /* @__PURE__ */ s(n, { children: [(f || r > 0) && /* @__PURE__ */ o("li", {
|
|
38
38
|
"aria-hidden": "true",
|
|
39
39
|
className: "flex items-center px-0.5",
|
|
@@ -44,38 +44,38 @@ var c = /* @__PURE__ */ o(i, {
|
|
|
44
44
|
className: "px-1 text-text-muted",
|
|
45
45
|
"aria-hidden": "true",
|
|
46
46
|
children: "…"
|
|
47
|
-
}) :
|
|
48
|
-
className:
|
|
47
|
+
}) : e.isCurrentPage ? /* @__PURE__ */ s("span", {
|
|
48
|
+
className: t(u, "max-w-[260px] truncate"),
|
|
49
49
|
"aria-current": "page",
|
|
50
|
-
children: [
|
|
50
|
+
children: [e.icon && /* @__PURE__ */ o("span", {
|
|
51
51
|
className: "flex items-center",
|
|
52
|
-
children:
|
|
52
|
+
children: e.icon
|
|
53
53
|
}), /* @__PURE__ */ o("span", {
|
|
54
54
|
className: "truncate",
|
|
55
|
-
children:
|
|
55
|
+
children: e.label
|
|
56
56
|
})]
|
|
57
|
-
}) :
|
|
57
|
+
}) : e.href || e.onClick ? /* @__PURE__ */ s("button", {
|
|
58
58
|
type: "button",
|
|
59
|
-
onClick:
|
|
60
|
-
className:
|
|
61
|
-
children: [
|
|
59
|
+
onClick: e.onClick,
|
|
60
|
+
className: t(l, "max-w-[180px] truncate"),
|
|
61
|
+
children: [e.icon && /* @__PURE__ */ o("span", {
|
|
62
62
|
className: "flex items-center",
|
|
63
|
-
children:
|
|
63
|
+
children: e.icon
|
|
64
64
|
}), /* @__PURE__ */ o("span", {
|
|
65
65
|
className: "truncate",
|
|
66
|
-
children:
|
|
66
|
+
children: e.label
|
|
67
67
|
})]
|
|
68
68
|
}) : /* @__PURE__ */ s("span", {
|
|
69
|
-
className:
|
|
70
|
-
children: [
|
|
69
|
+
className: t(l, "pointer-events-none max-w-[180px] truncate"),
|
|
70
|
+
children: [e.icon && /* @__PURE__ */ o("span", {
|
|
71
71
|
className: "flex items-center",
|
|
72
|
-
children:
|
|
72
|
+
children: e.icon
|
|
73
73
|
}), /* @__PURE__ */ o("span", {
|
|
74
74
|
className: "truncate",
|
|
75
|
-
children:
|
|
75
|
+
children: e.label
|
|
76
76
|
})]
|
|
77
77
|
})
|
|
78
|
-
})] }, `${
|
|
78
|
+
})] }, `${e.label}-${r}`);
|
|
79
79
|
})]
|
|
80
80
|
})
|
|
81
81
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useShellLabel as e } from "../shared/providers/shell/useShellLabel.js";
|
|
2
|
+
import { Sheet as t, SheetContent as n, SheetHeader as r, SheetTitle as i } from "../ui/sheet.js";
|
|
3
3
|
import { useAssistantControl as a } from "../shared/assistant/appControls/useAssistantControl.js";
|
|
4
4
|
import { EscapeLayer as ee } from "../shared/components/EscapeLayer.js";
|
|
5
5
|
import { useIsMobile as te } from "./contextSwitcher/useIsMobile.js";
|
|
@@ -13,7 +13,7 @@ import { useCallback as f, useEffect as p, useMemo as m, useRef as h, useState a
|
|
|
13
13
|
import { Fragment as ne, jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
14
14
|
//#region src/chrome/ContextSwitcher.tsx
|
|
15
15
|
var y = ({ organizations: y, workspaces: b, projects: x, currentOrganizationId: S, currentWorkspaceId: C, currentProjectId: w, onOrganizationChange: T, onWorkspaceChange: E, onProjectChange: D, onWorkspaceWideChange: O, compact: re = !1 }) => {
|
|
16
|
-
let k =
|
|
16
|
+
let k = e(), [A, j] = g(!1), [M, N] = g(() => S ? "workspace" : "org"), [P, F] = g({
|
|
17
17
|
org: "",
|
|
18
18
|
workspace: "",
|
|
19
19
|
project: ""
|
|
@@ -148,15 +148,15 @@ var y = ({ organizations: y, workspaces: b, projects: x, currentOrganizationId:
|
|
|
148
148
|
});
|
|
149
149
|
return I ? /* @__PURE__ */ v("div", {
|
|
150
150
|
className: "relative",
|
|
151
|
-
children: [$, /* @__PURE__ */ _(
|
|
151
|
+
children: [$, /* @__PURE__ */ _(t, {
|
|
152
152
|
open: A,
|
|
153
153
|
onOpenChange: j,
|
|
154
|
-
children: /* @__PURE__ */ v(
|
|
154
|
+
children: /* @__PURE__ */ v(n, {
|
|
155
155
|
side: "bottom",
|
|
156
156
|
className: "h-[70vh] flex flex-col p-0",
|
|
157
|
-
children: [/* @__PURE__ */ _(
|
|
157
|
+
children: [/* @__PURE__ */ _(r, {
|
|
158
158
|
className: "px-4 pt-4 pb-2 border-b border-[var(--color-border-subtle)]",
|
|
159
|
-
children: /* @__PURE__ */ _(
|
|
159
|
+
children: /* @__PURE__ */ _(i, {
|
|
160
160
|
className: "text-[var(--color-text-primary)]",
|
|
161
161
|
children: k("contextSwitcher.title", "Switch Context")
|
|
162
162
|
})
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useGatewayClient as e } from "../shared/graphql/GatewayContext.js";
|
|
2
2
|
import "../shared-graphql.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { useI18n as t } from "../shared/providers/shell/I18nProvider.js";
|
|
4
|
+
import { useActiveContext as n } from "../shared/providers/shell/ActiveContextProvider.js";
|
|
5
5
|
import { DEFAULT_FOOTER_COLUMNS as r, DEFAULT_SOCIAL_LINKS as i, Footer as a } from "./Footer.js";
|
|
6
6
|
import { BrandMark as o } from "./BrandMark.js";
|
|
7
7
|
import { useEffect as s, useMemo as c, useState as l } from "react";
|
|
@@ -61,7 +61,7 @@ function w(e) {
|
|
|
61
61
|
return e.trim().replace(/[^A-Za-z0-9 ]/g, "").split(/\s+/).map((e, t) => t === 0 ? e.toLowerCase() : e.charAt(0).toUpperCase() + e.slice(1).toLowerCase()).join("");
|
|
62
62
|
}
|
|
63
63
|
function T({ productSlug: u, productName: f, tagline: p, version: m = "v1.0.0", columns: h, socialLinks: _, legalPageOrder: T = C, deferRemoteData: E = !1, hideOnInstalledApp: D = !0 }) {
|
|
64
|
-
let { workspaceId: O, projectId: k } =
|
|
64
|
+
let { workspaceId: O, projectId: k } = n(), A = e("global"), { t: j } = t(), [M, N] = l(null), [P, F] = l(null);
|
|
65
65
|
s(() => {
|
|
66
66
|
if (!A || E) return;
|
|
67
67
|
let e = !1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { useShellLabel as e } from "../shared/providers/shell/useShellLabel.js";
|
|
2
|
+
import { DropdownMenu as t, DropdownMenuContent as n, DropdownMenuItem as r, DropdownMenuLabel as i, DropdownMenuSeparator as a, DropdownMenuTrigger as o } from "../ui/dropdown-menu.js";
|
|
3
|
+
import { useTheme as s } from "../shared/providers/shell/ThemeProvider.js";
|
|
4
4
|
import { useExclusiveMenu as c } from "../shared/hooks/useExclusiveMenu.js";
|
|
5
5
|
import { useThemeOptionLabels as l } from "./useThemeOptionLabels.js";
|
|
6
6
|
import { cn as u } from "../utils/cn.js";
|
|
@@ -42,37 +42,37 @@ var w = {
|
|
|
42
42
|
label: "High contrast"
|
|
43
43
|
}
|
|
44
44
|
];
|
|
45
|
-
function E({ mobileOptimized:
|
|
45
|
+
function E({ mobileOptimized: r = !0 }) {
|
|
46
46
|
let [p, m] = f(!1);
|
|
47
47
|
c("header-theme", p, d(() => m(!1), []));
|
|
48
|
-
let { mode: y, setMode: b, resolvedTheme: x } =
|
|
49
|
-
return /* @__PURE__ */ C(
|
|
48
|
+
let { mode: y, setMode: b, resolvedTheme: x } = s(), E = e(), O = l(), k = E("themeSwitcher.label", "Theme"), A = x === "dark" ? g : v, j = d((e) => b(e), [b]);
|
|
49
|
+
return /* @__PURE__ */ C(t, {
|
|
50
50
|
open: p,
|
|
51
51
|
onOpenChange: m,
|
|
52
|
-
children: [/* @__PURE__ */ S(
|
|
52
|
+
children: [/* @__PURE__ */ S(o, {
|
|
53
53
|
asChild: !0,
|
|
54
54
|
children: /* @__PURE__ */ S("button", {
|
|
55
55
|
type: "button",
|
|
56
56
|
"aria-label": k,
|
|
57
57
|
title: k,
|
|
58
|
-
className: u("flex size-9 items-center justify-center rounded-button text-text-primary transition-colors", "hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]",
|
|
58
|
+
className: u("flex size-9 items-center justify-center rounded-button text-text-primary transition-colors", "hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", r ? "hidden md:flex" : ""),
|
|
59
59
|
children: /* @__PURE__ */ S(A, {
|
|
60
60
|
className: "size-5",
|
|
61
61
|
"aria-hidden": "true"
|
|
62
62
|
})
|
|
63
63
|
})
|
|
64
|
-
}), /* @__PURE__ */ C(
|
|
64
|
+
}), /* @__PURE__ */ C(n, {
|
|
65
65
|
align: "end",
|
|
66
66
|
className: "w-56",
|
|
67
67
|
children: [
|
|
68
|
-
/* @__PURE__ */ C(
|
|
68
|
+
/* @__PURE__ */ C(i, {
|
|
69
69
|
className: "flex items-center gap-2 text-text-secondary",
|
|
70
70
|
children: [/* @__PURE__ */ S(_, {
|
|
71
71
|
className: "size-4",
|
|
72
72
|
"aria-hidden": "true"
|
|
73
73
|
}), E("themeSwitcher.heading", "Appearance")]
|
|
74
74
|
}),
|
|
75
|
-
/* @__PURE__ */ S(
|
|
75
|
+
/* @__PURE__ */ S(a, {}),
|
|
76
76
|
/* @__PURE__ */ S(D, {
|
|
77
77
|
active: y === "system",
|
|
78
78
|
icon: h,
|
|
@@ -89,8 +89,8 @@ function E({ mobileOptimized: n = !0 }) {
|
|
|
89
89
|
})]
|
|
90
90
|
});
|
|
91
91
|
}
|
|
92
|
-
function D({ active: e, icon: t, label:
|
|
93
|
-
return /* @__PURE__ */ C(
|
|
92
|
+
function D({ active: e, icon: t, label: n, onSelect: i }) {
|
|
93
|
+
return /* @__PURE__ */ C(r, {
|
|
94
94
|
onSelect: i,
|
|
95
95
|
className: u("gap-2", e && "bg-[var(--color-accent-soft)] text-text-primary"),
|
|
96
96
|
children: [
|
|
@@ -100,7 +100,7 @@ function D({ active: e, icon: t, label: r, onSelect: i }) {
|
|
|
100
100
|
}),
|
|
101
101
|
/* @__PURE__ */ S("span", {
|
|
102
102
|
className: "flex-1",
|
|
103
|
-
children:
|
|
103
|
+
children: n
|
|
104
104
|
}),
|
|
105
105
|
e && /* @__PURE__ */ S(p, {
|
|
106
106
|
className: "size-4 text-action-primary-bg",
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useShellLabel as e } from "../shared/providers/shell/useShellLabel.js";
|
|
2
|
+
import { Sheet as t, SheetContent as n, SheetHeader as r, SheetTitle as i } from "../ui/sheet.js";
|
|
3
3
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
4
4
|
//#region src/chrome/LanguagePickerSheet.tsx
|
|
5
5
|
var s = ({ open: s, onOpenChange: c, languages: l, currentLanguage: u, onLanguageChange: d }) => {
|
|
6
|
-
let f =
|
|
6
|
+
let f = e(), p = (e) => {
|
|
7
7
|
d && d(e), c(!1);
|
|
8
8
|
};
|
|
9
|
-
return /* @__PURE__ */ a(
|
|
9
|
+
return /* @__PURE__ */ a(t, {
|
|
10
10
|
open: s,
|
|
11
11
|
onOpenChange: c,
|
|
12
|
-
children: /* @__PURE__ */ o(
|
|
12
|
+
children: /* @__PURE__ */ o(n, {
|
|
13
13
|
side: "bottom",
|
|
14
14
|
className: "h-[60vh] flex flex-col p-0",
|
|
15
|
-
children: [/* @__PURE__ */ a(
|
|
15
|
+
children: [/* @__PURE__ */ a(r, {
|
|
16
16
|
className: "px-4 pt-4 pb-2 border-b border-border-subtle",
|
|
17
|
-
children: /* @__PURE__ */ a(
|
|
17
|
+
children: /* @__PURE__ */ a(i, {
|
|
18
18
|
className: "text-text-primary",
|
|
19
19
|
children: f("languageSwitcher.title", "Select Language")
|
|
20
20
|
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn as e } from "../lib/utils.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useShellLabel as t } from "../shared/providers/shell/useShellLabel.js";
|
|
3
|
+
import { nativeImpact as n } from "../shared/native/consumers.js";
|
|
4
4
|
import { useLayoutEffect as r, useRef as i, useState as a } from "react";
|
|
5
5
|
import { ChevronLeft as o } from "lucide-react";
|
|
6
6
|
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
@@ -17,7 +17,7 @@ function d() {
|
|
|
17
17
|
return !1;
|
|
18
18
|
}
|
|
19
19
|
function f({ title: f, backLabel: p, onBack: m, rightActions: h, leftSlot: g, showBack: _, className: v }) {
|
|
20
|
-
let y =
|
|
20
|
+
let y = t(), b = l(), x = i(null), [S] = a(d), C = _ ?? S, w = p ?? y("nav.back", "Back");
|
|
21
21
|
return r(() => {
|
|
22
22
|
let e = x.current;
|
|
23
23
|
if (!e || typeof window > "u") return;
|
|
@@ -40,7 +40,7 @@ function f({ title: f, backLabel: p, onBack: m, rightActions: h, leftSlot: g, sh
|
|
|
40
40
|
children: C ? /* @__PURE__ */ c("button", {
|
|
41
41
|
type: "button",
|
|
42
42
|
onClick: () => {
|
|
43
|
-
|
|
43
|
+
n("light"), m ? m() : b(-1);
|
|
44
44
|
},
|
|
45
45
|
"aria-label": w,
|
|
46
46
|
className: "native-topbar__back flex min-h-11 items-center gap-0.5 pr-2 text-text-link",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ResponsiveDialog as e, ResponsiveDialogContent as t, ResponsiveDialogDescription as n, ResponsiveDialogHeader as r, ResponsiveDialogTitle as i } from "../ui/responsive-dialog.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
2
|
+
import { useShellLabel as a } from "../shared/providers/shell/useShellLabel.js";
|
|
3
|
+
import { useNavRegistryStore as o } from "../shared/hooks/shell/useNavRegistry.js";
|
|
4
|
+
import { Switch as s } from "../ui/switch.js";
|
|
5
5
|
import { useSafePermissions as c } from "../shared/providers/shell/PermissionProvider.js";
|
|
6
6
|
import { useSafePersonaSurface as l } from "../shared/providers/shell/PersonaSurfaceProvider.js";
|
|
7
7
|
import { interpolateShellLabel as u } from "../shared/providers/shell/interpolateShellLabel.js";
|
|
@@ -9,17 +9,17 @@ import { applyPermissionFilter as d, isItemEffectivelyShown as f } from "./sideN
|
|
|
9
9
|
import { useEffect as ee, useMemo as p, useState as m } from "react";
|
|
10
10
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
11
11
|
//#region src/chrome/NavCustomizeDialog.tsx
|
|
12
|
-
function v({ item: e, depth: t, parentShown: n, surfaceVisibleItems: r, overrides: i, onToggle:
|
|
13
|
-
let c =
|
|
12
|
+
function v({ item: e, depth: t, parentShown: n, surfaceVisibleItems: r, overrides: i, onToggle: o }) {
|
|
13
|
+
let c = a(), l = f(e, n, r, i), u = l && (!r || r.includes(e.id) || i[e.id] === "shown");
|
|
14
14
|
return /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ _("div", {
|
|
15
15
|
className: "flex items-center justify-between gap-3 py-1.5",
|
|
16
16
|
style: { paddingLeft: t * 16 },
|
|
17
17
|
children: [/* @__PURE__ */ g("span", {
|
|
18
18
|
className: `truncate text-body-sm ${l ? "text-text-primary" : "text-text-muted"}`,
|
|
19
19
|
children: e.label
|
|
20
|
-
}), /* @__PURE__ */ g(
|
|
20
|
+
}), /* @__PURE__ */ g(s, {
|
|
21
21
|
checked: l,
|
|
22
|
-
onCheckedChange: (t) =>
|
|
22
|
+
onCheckedChange: (t) => o(e, n, t === !0),
|
|
23
23
|
"aria-label": c("nav.showNamedItem", "Show {{label}} in the menu", { label: e.label }),
|
|
24
24
|
"data-testid": `persona-toggle-${e.id}`
|
|
25
25
|
})]
|
|
@@ -29,7 +29,7 @@ function v({ item: e, depth: t, parentShown: n, surfaceVisibleItems: r, override
|
|
|
29
29
|
parentShown: u,
|
|
30
30
|
surfaceVisibleItems: r,
|
|
31
31
|
overrides: i,
|
|
32
|
-
onToggle:
|
|
32
|
+
onToggle: o
|
|
33
33
|
}, e.id))] });
|
|
34
34
|
}
|
|
35
35
|
function y(e, t, n) {
|
|
@@ -43,8 +43,8 @@ function y(e, t, n) {
|
|
|
43
43
|
};
|
|
44
44
|
return i(e, !1), r;
|
|
45
45
|
}
|
|
46
|
-
function b({ groupLabels:
|
|
47
|
-
let x =
|
|
46
|
+
function b({ groupLabels: s, groupOrder: h, everythingLabel: b = "Everything" }) {
|
|
47
|
+
let x = a(), S = l(), C = c(), w = o((e) => e.items), [T, E] = m(""), [D, O] = m(null), [k, A] = m(!1), [j, M] = m(null), N = C?.hasPermission, P = C?.isLoading ?? !1, F = p(() => {
|
|
48
48
|
let e = w.filter((e) => e.visible !== !1);
|
|
49
49
|
return !N || P ? e : d(e, N);
|
|
50
50
|
}, [
|
|
@@ -63,13 +63,13 @@ function b({ groupLabels: o, groupOrder: h, everythingLabel: b = "Everything" })
|
|
|
63
63
|
}
|
|
64
64
|
return [...h ?? [], ...Array.from(e.keys()).filter((e) => !(h ?? []).includes(e))].filter((t) => (e.get(t)?.length ?? 0) > 0).map((t) => ({
|
|
65
65
|
key: t,
|
|
66
|
-
label: t === "__default__" ? null :
|
|
66
|
+
label: t === "__default__" ? null : s?.[t] ?? t,
|
|
67
67
|
items: e.get(t) ?? []
|
|
68
68
|
}));
|
|
69
69
|
}, [
|
|
70
70
|
F,
|
|
71
71
|
h,
|
|
72
|
-
|
|
72
|
+
s
|
|
73
73
|
]);
|
|
74
74
|
if (!S) return null;
|
|
75
75
|
let { activeSurfaceId: L, activeSurface: R, overrides: z, setItemOverride: B, resetOverrides: V, customizeOpen: H, setCustomizeOpen: U, simulation: W, customViews: G, canManageViews: K, createCustomView: te, renameCustomView: ne, deleteCustomView: re } = S, q = R ? R.visibleItems : null, ie = (e, t, n) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { isSameProductSlug as e } from "../shared/config/productSlug.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useShellLabel as t } from "../shared/providers/shell/useShellLabel.js";
|
|
3
|
+
import { Sheet as n, SheetContent as r, SheetHeader as i, SheetTitle as a } from "../ui/sheet.js";
|
|
4
4
|
import { filterProducts as o, resolveProductLogo as s } from "./ProductSwitcher.js";
|
|
5
5
|
import { useMemo as c, useState as l } from "react";
|
|
6
6
|
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
@@ -26,21 +26,21 @@ var f = 6, p = ({ product: e }) => {
|
|
|
26
26
|
})
|
|
27
27
|
});
|
|
28
28
|
}, m = ({ open: s, onOpenChange: m, products: h, currentProductId: g, onProductChange: _ }) => {
|
|
29
|
-
let v =
|
|
29
|
+
let v = t(), [y, b] = l(""), x = h.length > f, S = c(() => o(h, y), [h, y]), C = (e) => {
|
|
30
30
|
_ && _(e), m(!1);
|
|
31
31
|
};
|
|
32
|
-
return /* @__PURE__ */ u(
|
|
32
|
+
return /* @__PURE__ */ u(n, {
|
|
33
33
|
open: s,
|
|
34
34
|
onOpenChange: (e) => {
|
|
35
35
|
e || b(""), m(e);
|
|
36
36
|
},
|
|
37
|
-
children: /* @__PURE__ */ d(
|
|
37
|
+
children: /* @__PURE__ */ d(r, {
|
|
38
38
|
side: "bottom",
|
|
39
39
|
className: "h-[60vh] flex flex-col p-0",
|
|
40
40
|
children: [
|
|
41
|
-
/* @__PURE__ */ u(
|
|
41
|
+
/* @__PURE__ */ u(i, {
|
|
42
42
|
className: "px-4 pt-4 pb-2 border-b border-border-subtle",
|
|
43
|
-
children: /* @__PURE__ */ u(
|
|
43
|
+
children: /* @__PURE__ */ u(a, {
|
|
44
44
|
className: "text-text-primary",
|
|
45
45
|
children: v("productSwitcher.title", "Switch Product")
|
|
46
46
|
})
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { useShellLabel as e } from "../shared/providers/shell/useShellLabel.js";
|
|
2
|
+
import { Tooltip as t, TooltipContent as n, TooltipProvider as r, TooltipTrigger as i } from "../ui/tooltip.js";
|
|
3
3
|
import { useAssistantControl as a } from "../shared/assistant/appControls/useAssistantControl.js";
|
|
4
4
|
import "./sideNavigation/navVisibility.js";
|
|
5
5
|
import { NavItemRenderer as o } from "./sideNavigation/NavItemRenderer.js";
|
|
@@ -58,7 +58,7 @@ var h = ({ items: h, currentPath: g, collapsed: _ = !1, onItemClick: v, onToggle
|
|
|
58
58
|
return n.expandedItems.has(e) === t ? { status: "already" } : (n.toggleExpand(e), { status: "done" });
|
|
59
59
|
}
|
|
60
60
|
} : null, [N]));
|
|
61
|
-
let P =
|
|
61
|
+
let P = e(), F = b ?? P("nav.collapse", "Collapse"), I = P("nav.expand", "Expand"), L = h.filter((e) => e.visible !== !1), R = (() => {
|
|
62
62
|
if (_) return [{
|
|
63
63
|
id: "__all__",
|
|
64
64
|
label: null,
|
|
@@ -136,24 +136,24 @@ var h = ({ items: h, currentPath: g, collapsed: _ = !1, onItemClick: v, onToggle
|
|
|
136
136
|
}),
|
|
137
137
|
/* @__PURE__ */ p("nav", {
|
|
138
138
|
className: "scrollbar-slim scrollbar-hover-only flex-1 min-h-0 py-card-padding overflow-y-auto overflow-x-hidden",
|
|
139
|
-
children: /* @__PURE__ */ p(
|
|
139
|
+
children: /* @__PURE__ */ p(r, {
|
|
140
140
|
delayDuration: 300,
|
|
141
141
|
children: /* @__PURE__ */ p("ul", {
|
|
142
142
|
className: "space-y-list-gap",
|
|
143
|
-
children: R.map((
|
|
143
|
+
children: R.map((e, r) => /* @__PURE__ */ m("li", {
|
|
144
144
|
className: "list-none",
|
|
145
145
|
children: [
|
|
146
|
-
|
|
147
|
-
|
|
146
|
+
r > 0 && !_ && /* @__PURE__ */ p("div", { className: "my-2 border-t border-border-subtle" }),
|
|
147
|
+
e.label && !_ && /* @__PURE__ */ p("p", {
|
|
148
148
|
className: "px-3 pb-1.5 pt-0.5 text-[11px] font-medium uppercase tracking-wider text-text-muted",
|
|
149
|
-
children:
|
|
149
|
+
children: e.label
|
|
150
150
|
}),
|
|
151
151
|
/* @__PURE__ */ p("ul", {
|
|
152
152
|
className: "space-y-list-gap",
|
|
153
|
-
children:
|
|
153
|
+
children: e.items.map((e) => _ ? /* @__PURE__ */ m(t, { children: [/* @__PURE__ */ p(i, {
|
|
154
154
|
asChild: !0,
|
|
155
155
|
children: /* @__PURE__ */ p(o, {
|
|
156
|
-
item:
|
|
156
|
+
item: e,
|
|
157
157
|
depth: 0,
|
|
158
158
|
maxDepth: E,
|
|
159
159
|
currentPath: g,
|
|
@@ -164,14 +164,14 @@ var h = ({ items: h, currentPath: g, collapsed: _ = !1, onItemClick: v, onToggle
|
|
|
164
164
|
collapsed: _,
|
|
165
165
|
contextSearchParams: D
|
|
166
166
|
})
|
|
167
|
-
}), /* @__PURE__ */ m(
|
|
167
|
+
}), /* @__PURE__ */ m(n, {
|
|
168
168
|
side: "right",
|
|
169
|
-
children: [/* @__PURE__ */ p("p", { children:
|
|
169
|
+
children: [/* @__PURE__ */ p("p", { children: e.label }), e.badge !== void 0 && e.badge > 0 && /* @__PURE__ */ p("span", {
|
|
170
170
|
className: "ml-2 text-xs bg-status-error-bg-subtle text-status-error-text px-2 py-0.5 rounded-full",
|
|
171
|
-
children:
|
|
171
|
+
children: e.badge
|
|
172
172
|
})]
|
|
173
|
-
})] },
|
|
174
|
-
item:
|
|
173
|
+
})] }, e.id) : /* @__PURE__ */ p(o, {
|
|
174
|
+
item: e,
|
|
175
175
|
depth: 0,
|
|
176
176
|
maxDepth: E,
|
|
177
177
|
currentPath: g,
|
|
@@ -181,10 +181,10 @@ var h = ({ items: h, currentPath: g, collapsed: _ = !1, onItemClick: v, onToggle
|
|
|
181
181
|
onToggleCollapse: y,
|
|
182
182
|
collapsed: _,
|
|
183
183
|
contextSearchParams: D
|
|
184
|
-
},
|
|
184
|
+
}, e.id))
|
|
185
185
|
})
|
|
186
186
|
]
|
|
187
|
-
},
|
|
187
|
+
}, e.id))
|
|
188
188
|
})
|
|
189
189
|
})
|
|
190
190
|
}),
|