@the-portland-company/shell 0.64.0 → 0.65.0
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/app-chrome.cjs +278 -250
- package/dist/app-chrome.cjs.map +1 -1
- package/dist/app-chrome.js +3 -3
- package/dist/app-chrome.js.map +1 -1
- package/dist/chrome.css +22 -95
- package/dist/{chunk-U4RZPZET.js → chunk-JHIFJZ73.js} +9 -16
- package/dist/chunk-JHIFJZ73.js.map +1 -0
- package/dist/{chunk-LFLN5GD6.js → chunk-XK2LWTHJ.js} +267 -232
- package/dist/chunk-XK2LWTHJ.js.map +1 -0
- package/dist/index.cjs +5 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/native.cjs +277 -249
- package/dist/native.cjs.map +1 -1
- package/dist/native.d.cts +21 -1
- package/dist/native.d.ts +21 -1
- package/dist/native.js +2 -2
- package/dist/theme-preference.cjs +7 -14
- package/dist/theme-preference.cjs.map +1 -1
- package/dist/theme-preference.d.cts +3 -1
- package/dist/theme-preference.d.ts +3 -1
- package/dist/theme-preference.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-LFLN5GD6.js.map +0 -1
- package/dist/chunk-U4RZPZET.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { readThemeCookie, THEME_STORAGE_KEY, isThemePreference, applyThemePreference, readPendingThemeChoice, writeThemeCookie, clearPendingThemeChoice, markThemeChoicePending } from './chunk-
|
|
1
|
+
import { readThemeCookie, THEME_STORAGE_KEY, isThemePreference, applyThemePreference, readPendingThemeChoice, writeThemeCookie, clearPendingThemeChoice, markThemeChoicePending } from './chunk-JHIFJZ73.js';
|
|
2
2
|
import { createContext, useRef, useState, useEffect, useContext, useCallback, useMemo, useSyncExternalStore } from 'react';
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { FiUser, FiSettings, FiMessageSquare, FiMail, FiInfo, FiSun, FiMoon, FiHelpCircle, FiLifeBuoy, FiAlertCircle, FiAlertTriangle, FiBell, FiGrid, FiZap, FiBatteryCharging, FiBattery } from 'react-icons/fi';
|
|
@@ -2333,52 +2333,34 @@ function NavSidebar({
|
|
|
2333
2333
|
}
|
|
2334
2334
|
)
|
|
2335
2335
|
] }) : null,
|
|
2336
|
-
mode ? /* @__PURE__ */
|
|
2337
|
-
/* @__PURE__ */
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2336
|
+
mode ? /* @__PURE__ */ jsxs("div", { className: "mb-4", children: [
|
|
2337
|
+
/* @__PURE__ */ jsx("div", { className: "flex items-center justify-center gap-2 rounded-md bg-[color:var(--panel-elevated)] p-1", children: (mode.options && mode.options.length > 0 ? mode.options : [{ id: mode.label, label: mode.label, icon: ModeIcon }]).map(
|
|
2338
|
+
(opt) => {
|
|
2339
|
+
const selected = opt.label === mode.label;
|
|
2340
|
+
const OptIcon = opt.icon;
|
|
2341
|
+
return /* @__PURE__ */ jsx(
|
|
2342
|
+
"button",
|
|
2343
|
+
{
|
|
2344
|
+
type: "button",
|
|
2345
|
+
title: opt.label,
|
|
2346
|
+
"aria-label": opt.label,
|
|
2347
|
+
"aria-current": selected ? "true" : void 0,
|
|
2348
|
+
onClick: () => {
|
|
2349
|
+
if (!selected) mode.onSelect?.(opt.id);
|
|
2350
|
+
},
|
|
2351
|
+
disabled: !mode.onSelect && !selected,
|
|
2352
|
+
className: [
|
|
2353
|
+
"flex h-9 flex-1 items-center justify-center rounded transition",
|
|
2354
|
+
selected ? "bg-[color:var(--mode-accent,var(--color-accent))] text-[color:var(--mode-on-accent,white)] shadow-sm" : "text-[color:var(--sidebar-text-muted,var(--muted))] hover:bg-[color:var(--panel)] hover:text-[color:var(--sidebar-text,var(--foreground))]"
|
|
2355
|
+
].join(" "),
|
|
2356
|
+
children: OptIcon ? /* @__PURE__ */ jsx(OptIcon, { size: 16, className: "shrink-0" }) : null
|
|
2354
2357
|
},
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
OptIcon ? /* @__PURE__ */ jsx(OptIcon, { size: 15, className: "shrink-0 text-current" }) : null,
|
|
2362
|
-
opt.label
|
|
2363
|
-
]
|
|
2364
|
-
},
|
|
2365
|
-
opt.id
|
|
2366
|
-
);
|
|
2367
|
-
}) })
|
|
2368
|
-
] }) : /* @__PURE__ */ jsxs(
|
|
2369
|
-
"button",
|
|
2370
|
-
{
|
|
2371
|
-
type: "button",
|
|
2372
|
-
className: "flex w-full items-center justify-between gap-2 rounded-md bg-[color:var(--mode-accent,var(--color-accent))] px-2.5 py-2 text-[color:var(--mode-on-accent,white)] shadow-sm",
|
|
2373
|
-
children: [
|
|
2374
|
-
/* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2.5", children: [
|
|
2375
|
-
ModeIcon ? /* @__PURE__ */ jsx(ModeIcon, { size: 16, className: "shrink-0" }) : null,
|
|
2376
|
-
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold tracking-[-0.01em]", children: mode.label })
|
|
2377
|
-
] }),
|
|
2378
|
-
/* @__PURE__ */ jsx(ChevronDown, {})
|
|
2379
|
-
]
|
|
2380
|
-
}
|
|
2381
|
-
) }) : null,
|
|
2358
|
+
opt.id
|
|
2359
|
+
);
|
|
2360
|
+
}
|
|
2361
|
+
) }),
|
|
2362
|
+
/* @__PURE__ */ jsx("p", { className: "mt-1.5 text-center text-[11px] font-semibold uppercase tracking-[0.08em] text-[color:var(--sidebar-text-muted,var(--muted))]", children: mode.label })
|
|
2363
|
+
] }) : null,
|
|
2382
2364
|
/* @__PURE__ */ jsxs("nav", { className: "flex flex-col gap-1", children: [
|
|
2383
2365
|
nav.groupLabel ? /* @__PURE__ */ jsx("p", { className: "px-2 pb-1 text-[11px] font-semibold uppercase tracking-[0.08em] text-[color:var(--sidebar-text-muted,var(--muted))]", children: nav.groupLabel }) : null,
|
|
2384
2366
|
nav.items.map((item, idx) => {
|
|
@@ -2526,6 +2508,27 @@ function HamburgerIcon() {
|
|
|
2526
2508
|
}
|
|
2527
2509
|
);
|
|
2528
2510
|
}
|
|
2511
|
+
function SearchIcon({ className } = {}) {
|
|
2512
|
+
return /* @__PURE__ */ jsxs(
|
|
2513
|
+
"svg",
|
|
2514
|
+
{
|
|
2515
|
+
width: 16,
|
|
2516
|
+
height: 16,
|
|
2517
|
+
viewBox: "0 0 24 24",
|
|
2518
|
+
fill: "none",
|
|
2519
|
+
stroke: "currentColor",
|
|
2520
|
+
strokeWidth: 2,
|
|
2521
|
+
strokeLinecap: "round",
|
|
2522
|
+
strokeLinejoin: "round",
|
|
2523
|
+
className,
|
|
2524
|
+
"aria-hidden": "true",
|
|
2525
|
+
children: [
|
|
2526
|
+
/* @__PURE__ */ jsx("circle", { cx: "11", cy: "11", r: "7" }),
|
|
2527
|
+
/* @__PURE__ */ jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
|
|
2528
|
+
]
|
|
2529
|
+
}
|
|
2530
|
+
);
|
|
2531
|
+
}
|
|
2529
2532
|
function CloseIcon() {
|
|
2530
2533
|
return /* @__PURE__ */ jsxs(
|
|
2531
2534
|
"svg",
|
|
@@ -2820,214 +2823,231 @@ function NavTopBar({
|
|
|
2820
2823
|
actions,
|
|
2821
2824
|
themeToggle,
|
|
2822
2825
|
onOpenNav,
|
|
2823
|
-
navOpen
|
|
2826
|
+
navOpen,
|
|
2827
|
+
search,
|
|
2828
|
+
buildNotes
|
|
2824
2829
|
}) {
|
|
2825
2830
|
const rawName = user?.name?.trim() || "";
|
|
2826
2831
|
const hasRealName = rawName.length > 0 && !rawName.includes("@");
|
|
2827
2832
|
const displayName = hasRealName ? formatFirstLast(rawName) : user?.email ?? "Signed in";
|
|
2828
2833
|
const initials = (hasRealName ? rawName : user?.email ?? "P").slice(0, 2).toUpperCase();
|
|
2829
2834
|
const secondary = hasRealName ? user?.email || [user?.tier, user?.role].filter(Boolean).join(" \xB7 ") || "member" : [user?.tier, user?.role].filter(Boolean).join(" \xB7 ") || "member";
|
|
2830
|
-
return /* @__PURE__ */ jsxs("
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
type: "button",
|
|
2835
|
-
onClick: onOpenNav,
|
|
2836
|
-
"aria-label": "Open menu",
|
|
2837
|
-
"aria-expanded": navOpen ?? false,
|
|
2838
|
-
"aria-controls": "politogy-nav-drawer",
|
|
2839
|
-
className: `${topBarIconButtonClass("default")} mr-3 shrink-0 lg:hidden lg:mr-0`,
|
|
2840
|
-
children: /* @__PURE__ */ jsx(HamburgerIcon, {})
|
|
2841
|
-
}
|
|
2842
|
-
) : null,
|
|
2843
|
-
/* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
|
|
2844
|
-
/* @__PURE__ */ jsx(
|
|
2845
|
-
"h1",
|
|
2835
|
+
return /* @__PURE__ */ jsxs("div", { className: "sticky top-0 z-20", children: [
|
|
2836
|
+
/* @__PURE__ */ jsxs("header", { className: "flex h-[var(--topbar-height,60px)] items-center justify-between gap-4 border-b border-[color:var(--line)] bg-[color:var(--panel)] px-[var(--topbar-padding-x,20px)]", children: [
|
|
2837
|
+
onOpenNav ? /* @__PURE__ */ jsx(
|
|
2838
|
+
"button",
|
|
2846
2839
|
{
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
|
|
2840
|
+
type: "button",
|
|
2841
|
+
onClick: onOpenNav,
|
|
2842
|
+
"aria-label": "Open menu",
|
|
2843
|
+
"aria-expanded": navOpen ?? false,
|
|
2844
|
+
"aria-controls": "politogy-nav-drawer",
|
|
2845
|
+
className: `${topBarIconButtonClass("default")} mr-1 shrink-0 lg:hidden`,
|
|
2846
|
+
children: /* @__PURE__ */ jsx(HamburgerIcon, {})
|
|
2850
2847
|
}
|
|
2851
|
-
),
|
|
2852
|
-
|
|
2853
|
-
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
"
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
|
|
2879
|
-
|
|
2880
|
-
|
|
2881
|
-
"
|
|
2882
|
-
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
|
|
2886
|
-
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
]
|
|
2892
|
-
|
|
2893
|
-
|
|
2894
|
-
TopBarTooltip,
|
|
2895
|
-
{
|
|
2896
|
-
title: "My Account",
|
|
2897
|
-
description: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2898
|
-
hasRealName ? rawName : user?.email ?? "Signed in",
|
|
2899
|
-
user?.email ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2900
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
2901
|
-
user.email
|
|
2902
|
-
] }) : null,
|
|
2903
|
-
/* @__PURE__ */ jsx("br", {}),
|
|
2904
|
-
"Profile, organizations, appearance and sign out."
|
|
2905
|
-
] })
|
|
2906
|
-
}
|
|
2907
|
-
) })
|
|
2908
|
-
] }),
|
|
2909
|
-
/* @__PURE__ */ jsxs("div", { className: "absolute right-0 z-30 mt-2 flex max-h-[calc(100vh-5rem)] w-72 flex-col overflow-hidden rounded-xl border border-[color:var(--line)] bg-[color:var(--panel-elevated)] py-1 shadow-[var(--shadow-soft)]", children: [
|
|
2910
|
-
/* @__PURE__ */ jsx(TopBarPanelArrow, {}),
|
|
2911
|
-
/* @__PURE__ */ jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain", children: [
|
|
2912
|
-
userMenu?.myProfileHref ? /* @__PURE__ */ jsxs(
|
|
2913
|
-
"a",
|
|
2848
|
+
) : null,
|
|
2849
|
+
/* @__PURE__ */ jsxs("label", { className: "relative flex w-[320px] max-w-full shrink-0 items-center", children: [
|
|
2850
|
+
/* @__PURE__ */ jsx(SearchIcon, { className: "pointer-events-none absolute left-3 h-4 w-4 text-[color:var(--muted)]" }),
|
|
2851
|
+
/* @__PURE__ */ jsx(
|
|
2852
|
+
"input",
|
|
2853
|
+
{
|
|
2854
|
+
type: "search",
|
|
2855
|
+
placeholder: search?.placeholder ?? "Search",
|
|
2856
|
+
value: search?.value,
|
|
2857
|
+
onChange: search?.onChange ? (e) => search.onChange?.(e.target.value) : void 0,
|
|
2858
|
+
onKeyDown: search?.onSubmit ? (e) => {
|
|
2859
|
+
if (e.key === "Enter") search.onSubmit?.(e.target.value);
|
|
2860
|
+
} : void 0,
|
|
2861
|
+
readOnly: !search?.onChange,
|
|
2862
|
+
className: "w-full rounded-md border border-[color:var(--line)] bg-[color:var(--panel-elevated)] py-1.5 pl-9 pr-10 text-sm text-[color:var(--foreground)] placeholder:text-[color:var(--muted)] focus:outline-none focus:ring-2 focus:ring-[color:var(--color-accent)]"
|
|
2863
|
+
}
|
|
2864
|
+
),
|
|
2865
|
+
/* @__PURE__ */ jsx(
|
|
2866
|
+
"kbd",
|
|
2867
|
+
{
|
|
2868
|
+
"aria-hidden": true,
|
|
2869
|
+
className: "pointer-events-none absolute right-2.5 rounded border border-[color:var(--line)] px-1 py-0.5 text-[10px] font-medium text-[color:var(--muted)]",
|
|
2870
|
+
children: "/"
|
|
2871
|
+
}
|
|
2872
|
+
)
|
|
2873
|
+
] }),
|
|
2874
|
+
/* @__PURE__ */ jsxs("div", { className: "relative ml-auto flex shrink-0 items-center gap-[var(--topbar-icon-gap,8px)]", children: [
|
|
2875
|
+
/* @__PURE__ */ jsx(
|
|
2876
|
+
"button",
|
|
2877
|
+
{
|
|
2878
|
+
type: "button",
|
|
2879
|
+
onClick: buildNotes?.onOpen,
|
|
2880
|
+
className: "shrink-0 rounded-md px-2 py-1.5 text-sm font-medium text-[color:var(--muted)] transition hover:bg-[color:var(--panel-elevated)] hover:text-[color:var(--foreground)]",
|
|
2881
|
+
children: buildNotes?.label ?? "Build notes"
|
|
2882
|
+
}
|
|
2883
|
+
),
|
|
2884
|
+
actionsList && actionsList.length > 0 ? actionsList.map((action) => /* @__PURE__ */ jsx(NavTopBarActionButton, { action }, action.key)) : null,
|
|
2885
|
+
actions,
|
|
2886
|
+
themeToggle,
|
|
2887
|
+
/* @__PURE__ */ jsxs("details", { "data-nav-details": true, className: "group/acct relative", children: [
|
|
2888
|
+
/* @__PURE__ */ jsxs("summary", { className: "group/tbtip relative flex cursor-pointer list-none items-center gap-2.5 rounded-full py-1 pl-1 pr-2 transition hover:bg-[color:var(--panel-elevated)] [&::-webkit-details-marker]:hidden", children: [
|
|
2889
|
+
/* @__PURE__ */ jsx("span", { className: "flex h-[var(--topbar-icon-button-size,32px)] w-[var(--topbar-icon-button-size,32px)] items-center justify-center overflow-hidden rounded-full bg-[color:var(--color-accent)] text-xs font-bold text-white", children: user?.avatarUrl || user?.memojiUrl ? /* @__PURE__ */ jsx(
|
|
2890
|
+
"img",
|
|
2914
2891
|
{
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
/* @__PURE__ */ jsx(ProfileIcon, {}),
|
|
2919
|
-
"My Profile"
|
|
2920
|
-
]
|
|
2892
|
+
src: user.avatarUrl || user.memojiUrl,
|
|
2893
|
+
alt: "",
|
|
2894
|
+
className: "h-full w-full object-cover"
|
|
2921
2895
|
}
|
|
2922
|
-
) :
|
|
2923
|
-
|
|
2924
|
-
"
|
|
2896
|
+
) : initials }),
|
|
2897
|
+
/* @__PURE__ */ jsxs("span", { className: "hidden flex-col leading-tight md:flex", children: [
|
|
2898
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-[color:var(--foreground)]", children: displayName }),
|
|
2899
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs text-[color:var(--muted)]", children: secondary })
|
|
2900
|
+
] }),
|
|
2901
|
+
/* @__PURE__ */ jsx(ChevronDown, {}),
|
|
2902
|
+
/* @__PURE__ */ jsx("span", { className: "group-open/acct:hidden", children: /* @__PURE__ */ jsx(
|
|
2903
|
+
TopBarTooltip,
|
|
2925
2904
|
{
|
|
2926
|
-
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
/* @__PURE__ */
|
|
2930
|
-
|
|
2931
|
-
|
|
2905
|
+
title: "My Account",
|
|
2906
|
+
description: /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2907
|
+
hasRealName ? rawName : user?.email ?? "Signed in",
|
|
2908
|
+
user?.email ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2909
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
2910
|
+
user.email
|
|
2911
|
+
] }) : null,
|
|
2912
|
+
/* @__PURE__ */ jsx("br", {}),
|
|
2913
|
+
"Profile, organizations, appearance and sign out."
|
|
2914
|
+
] })
|
|
2932
2915
|
}
|
|
2933
|
-
)
|
|
2934
|
-
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2916
|
+
) })
|
|
2917
|
+
] }),
|
|
2918
|
+
/* @__PURE__ */ jsxs("div", { className: "absolute right-0 z-30 mt-2 flex max-h-[calc(100vh-5rem)] w-72 flex-col overflow-hidden rounded-xl border border-[color:var(--line)] bg-[color:var(--panel-elevated)] py-1 shadow-[var(--shadow-soft)]", children: [
|
|
2919
|
+
/* @__PURE__ */ jsx(TopBarPanelArrow, {}),
|
|
2920
|
+
/* @__PURE__ */ jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain", children: [
|
|
2921
|
+
userMenu?.myProfileHref ? /* @__PURE__ */ jsxs(
|
|
2922
|
+
"a",
|
|
2923
|
+
{
|
|
2924
|
+
href: safeHref(userMenu.myProfileHref),
|
|
2925
|
+
className: "flex w-full items-center gap-2.5 px-4 py-2.5 text-left text-sm font-medium text-[color:var(--foreground)] hover:bg-[color:var(--panel)]",
|
|
2926
|
+
children: [
|
|
2927
|
+
/* @__PURE__ */ jsx(ProfileIcon, {}),
|
|
2928
|
+
"My Profile"
|
|
2929
|
+
]
|
|
2930
|
+
}
|
|
2931
|
+
) : null,
|
|
2932
|
+
userMenu?.organizationSettingsHref ? /* @__PURE__ */ jsxs(
|
|
2933
|
+
"a",
|
|
2934
|
+
{
|
|
2935
|
+
href: safeHref(userMenu.organizationSettingsHref),
|
|
2936
|
+
className: "flex w-full items-center gap-2.5 border-t border-[color:var(--line)] px-4 py-2.5 text-left text-sm font-medium text-[color:var(--foreground)] hover:bg-[color:var(--panel)]",
|
|
2937
|
+
children: [
|
|
2938
|
+
/* @__PURE__ */ jsx(BriefcaseIcon, {}),
|
|
2939
|
+
"Organization Settings"
|
|
2940
|
+
]
|
|
2941
|
+
}
|
|
2942
|
+
) : null,
|
|
2943
|
+
userMenu?.roles && userMenu.roles.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "border-t border-[color:var(--line)] px-4 py-3", children: [
|
|
2944
|
+
/* @__PURE__ */ jsx("p", { className: "mb-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-[color:var(--muted)]", children: "Roles & Organizations" }),
|
|
2945
|
+
/* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-1.5", children: userMenu.roles.map((r, i) => /* @__PURE__ */ jsxs("li", { className: "flex flex-wrap items-center gap-1.5 text-sm", children: [
|
|
2946
|
+
/* @__PURE__ */ jsx("span", { className: "rounded-md bg-[color:var(--panel)] px-2 py-0.5 text-xs font-bold uppercase tracking-wide text-[color:var(--foreground)]", children: r.role }),
|
|
2947
|
+
r.orgName ? /* @__PURE__ */ jsxs("span", { className: "text-[color:var(--muted)]", children: [
|
|
2948
|
+
"in ",
|
|
2949
|
+
r.orgName
|
|
2950
|
+
] }) : null
|
|
2951
|
+
] }, `${r.role}-${i}`)) })
|
|
2952
|
+
] }) : null,
|
|
2953
|
+
userMenu?.accounts && userMenu.accounts.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "border-t border-[color:var(--line)] px-4 py-3", children: [
|
|
2954
|
+
/* @__PURE__ */ jsx("p", { className: "mb-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-[color:var(--muted)]", children: "Accounts" }),
|
|
2955
|
+
/* @__PURE__ */ jsx("ul", { className: "flex flex-col gap-1", children: userMenu.accounts.map((a) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2.5", children: [
|
|
2956
|
+
/* @__PURE__ */ jsxs(
|
|
2957
|
+
"button",
|
|
2958
|
+
{
|
|
2959
|
+
type: "button",
|
|
2960
|
+
onClick: () => {
|
|
2961
|
+
if (!a.active) userMenu.onSwitchAccount?.(a.id);
|
|
2962
|
+
},
|
|
2963
|
+
className: "flex min-w-0 flex-1 items-center gap-2.5 rounded-lg px-1 py-1 text-left hover:bg-[color:var(--panel)]",
|
|
2964
|
+
children: [
|
|
2965
|
+
/* @__PURE__ */ jsx("span", { className: "flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-full bg-[color:var(--color-accent)] text-[11px] font-bold text-white", children: a.avatarUrl ? /* @__PURE__ */ jsx("img", { src: a.avatarUrl, alt: "", className: "h-full w-full object-cover" }) : (a.name ?? a.email ?? "?").slice(0, 2).toUpperCase() }),
|
|
2966
|
+
/* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col leading-tight", children: [
|
|
2967
|
+
/* @__PURE__ */ jsx(
|
|
2968
|
+
"span",
|
|
2969
|
+
{
|
|
2970
|
+
className: [
|
|
2971
|
+
"truncate text-sm font-semibold",
|
|
2972
|
+
a.active ? "text-[color:var(--color-accent)]" : "text-[color:var(--foreground)]"
|
|
2973
|
+
].join(" "),
|
|
2974
|
+
children: a.name ?? a.email ?? a.id.slice(0, 8)
|
|
2975
|
+
}
|
|
2976
|
+
),
|
|
2977
|
+
/* @__PURE__ */ jsx("span", { className: "truncate text-xs text-[color:var(--muted)]", children: a.active ? "Active" : a.email ?? "" })
|
|
2978
|
+
] })
|
|
2979
|
+
]
|
|
2980
|
+
}
|
|
2981
|
+
),
|
|
2982
|
+
!a.active && userMenu.onRemoveAccount ? /* @__PURE__ */ jsx(
|
|
2983
|
+
"button",
|
|
2984
|
+
{
|
|
2985
|
+
type: "button",
|
|
2986
|
+
"aria-label": `Remove ${a.name ?? a.email ?? "account"}`,
|
|
2987
|
+
onClick: () => userMenu.onRemoveAccount?.(a.id),
|
|
2988
|
+
className: "shrink-0 rounded p-1 text-[color:var(--color-accent)] hover:bg-[color:var(--panel)]",
|
|
2989
|
+
children: /* @__PURE__ */ jsx(TrashIcon, {})
|
|
2990
|
+
}
|
|
2991
|
+
) : null
|
|
2992
|
+
] }, a.id)) }),
|
|
2993
|
+
userMenu.addAccountHref || userMenu.onAddAccount ? userMenu.addAccountHref ? /* @__PURE__ */ jsxs(
|
|
2994
|
+
"a",
|
|
2949
2995
|
{
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
if (!a.active) userMenu.onSwitchAccount?.(a.id);
|
|
2953
|
-
},
|
|
2954
|
-
className: "flex min-w-0 flex-1 items-center gap-2.5 rounded-lg px-1 py-1 text-left hover:bg-[color:var(--panel)]",
|
|
2996
|
+
href: safeHref(userMenu.addAccountHref),
|
|
2997
|
+
className: "mt-1.5 flex items-center gap-2.5 rounded-lg px-1 py-1.5 text-sm font-semibold text-[color:var(--color-accent)] hover:bg-[color:var(--panel)]",
|
|
2955
2998
|
children: [
|
|
2956
|
-
/* @__PURE__ */ jsx(
|
|
2957
|
-
|
|
2958
|
-
/* @__PURE__ */ jsx(
|
|
2959
|
-
"span",
|
|
2960
|
-
{
|
|
2961
|
-
className: [
|
|
2962
|
-
"truncate text-sm font-semibold",
|
|
2963
|
-
a.active ? "text-[color:var(--color-accent)]" : "text-[color:var(--foreground)]"
|
|
2964
|
-
].join(" "),
|
|
2965
|
-
children: a.name ?? a.email ?? a.id.slice(0, 8)
|
|
2966
|
-
}
|
|
2967
|
-
),
|
|
2968
|
-
/* @__PURE__ */ jsx("span", { className: "truncate text-xs text-[color:var(--muted)]", children: a.active ? "Active" : a.email ?? "" })
|
|
2969
|
-
] })
|
|
2999
|
+
/* @__PURE__ */ jsx(AddUserIcon, {}),
|
|
3000
|
+
"Add Account"
|
|
2970
3001
|
]
|
|
2971
3002
|
}
|
|
2972
|
-
)
|
|
2973
|
-
!a.active && userMenu.onRemoveAccount ? /* @__PURE__ */ jsx(
|
|
3003
|
+
) : /* @__PURE__ */ jsxs(
|
|
2974
3004
|
"button",
|
|
2975
3005
|
{
|
|
2976
3006
|
type: "button",
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
3007
|
+
onClick: userMenu.onAddAccount,
|
|
3008
|
+
className: "mt-1.5 flex w-full items-center gap-2.5 rounded-lg px-1 py-1.5 text-left text-sm font-semibold text-[color:var(--color-accent)] hover:bg-[color:var(--panel)]",
|
|
3009
|
+
children: [
|
|
3010
|
+
/* @__PURE__ */ jsx(AddUserIcon, {}),
|
|
3011
|
+
"Add Account"
|
|
3012
|
+
]
|
|
2981
3013
|
}
|
|
2982
3014
|
) : null
|
|
2983
|
-
] }
|
|
2984
|
-
userMenu
|
|
2985
|
-
|
|
2986
|
-
{
|
|
2987
|
-
href: safeHref(userMenu.addAccountHref),
|
|
2988
|
-
className: "mt-1.5 flex items-center gap-2.5 rounded-lg px-1 py-1.5 text-sm font-semibold text-[color:var(--color-accent)] hover:bg-[color:var(--panel)]",
|
|
2989
|
-
children: [
|
|
2990
|
-
/* @__PURE__ */ jsx(AddUserIcon, {}),
|
|
2991
|
-
"Add Account"
|
|
2992
|
-
]
|
|
2993
|
-
}
|
|
2994
|
-
) : /* @__PURE__ */ jsxs(
|
|
2995
|
-
"button",
|
|
3015
|
+
] }) : null,
|
|
3016
|
+
userMenu?.theme ? /* @__PURE__ */ jsx("div", { className: "border-t border-[color:var(--line)]", children: /* @__PURE__ */ jsx(
|
|
3017
|
+
NavThemeControl,
|
|
2996
3018
|
{
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
className: "mt-1.5 flex w-full items-center gap-2.5 rounded-lg px-1 py-1.5 text-left text-sm font-semibold text-[color:var(--color-accent)] hover:bg-[color:var(--panel)]",
|
|
3000
|
-
children: [
|
|
3001
|
-
/* @__PURE__ */ jsx(AddUserIcon, {}),
|
|
3002
|
-
"Add Account"
|
|
3003
|
-
]
|
|
3019
|
+
value: userMenu.theme.value,
|
|
3020
|
+
onChange: userMenu.theme.onChange
|
|
3004
3021
|
}
|
|
3005
|
-
) : null
|
|
3006
|
-
] })
|
|
3007
|
-
|
|
3008
|
-
|
|
3022
|
+
) }) : null
|
|
3023
|
+
] }),
|
|
3024
|
+
onSignOut ? /* @__PURE__ */ jsxs(
|
|
3025
|
+
"button",
|
|
3009
3026
|
{
|
|
3010
|
-
|
|
3011
|
-
|
|
3027
|
+
type: "button",
|
|
3028
|
+
onClick: onSignOut,
|
|
3029
|
+
className: "flex w-full shrink-0 items-center gap-2.5 border-t border-[color:var(--line)] px-4 py-2.5 text-left text-sm font-medium text-[color:var(--foreground)] hover:bg-[color:var(--panel)] hover:text-[color:var(--color-accent)]",
|
|
3030
|
+
children: [
|
|
3031
|
+
/* @__PURE__ */ jsx(SignOutIcon, {}),
|
|
3032
|
+
"Sign out"
|
|
3033
|
+
]
|
|
3012
3034
|
}
|
|
3013
|
-
)
|
|
3014
|
-
] })
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
!hasRealName && user ? /* @__PURE__ */ jsx(NamePromptBubble, { profileHref: userMenu?.myProfileHref }) : null
|
|
3030
|
-
] })
|
|
3035
|
+
) : null
|
|
3036
|
+
] })
|
|
3037
|
+
] }),
|
|
3038
|
+
!hasRealName && user ? /* @__PURE__ */ jsx(NamePromptBubble, { profileHref: userMenu?.myProfileHref }) : null
|
|
3039
|
+
] })
|
|
3040
|
+
] }),
|
|
3041
|
+
/* @__PURE__ */ jsx(
|
|
3042
|
+
"div",
|
|
3043
|
+
{
|
|
3044
|
+
"aria-hidden": true,
|
|
3045
|
+
className: "h-[3px] w-full shrink-0",
|
|
3046
|
+
style: {
|
|
3047
|
+
background: "var(--chrome-gradient, linear-gradient(to right, #007BFF, #A54B7A, #E63946))"
|
|
3048
|
+
}
|
|
3049
|
+
}
|
|
3050
|
+
)
|
|
3031
3051
|
] });
|
|
3032
3052
|
}
|
|
3033
3053
|
function NamePromptBubble({ profileHref }) {
|
|
@@ -3389,7 +3409,22 @@ function NavAppShell({
|
|
|
3389
3409
|
/* @__PURE__ */ jsxs("div", { className: "lg:pl-[240px]", children: [
|
|
3390
3410
|
/* @__PURE__ */ jsx(NavTopBar, { ...topBar, onOpenNav: () => setNavOpen(true), navOpen }),
|
|
3391
3411
|
betaBanner ? /* @__PURE__ */ jsx(NavBetaBanner, { ...betaBanner }) : null,
|
|
3392
|
-
|
|
3412
|
+
topBar.title ? /* @__PURE__ */ jsx("h1", { className: "px-6 pt-7 text-xl font-semibold text-[color:var(--foreground)]", children: topBar.title }) : null,
|
|
3413
|
+
contentWrapper === "bare" ? /* @__PURE__ */ jsx("div", { "data-shell-content": "", className: topBar.title ? "mt-[22px]" : void 0, children }) : (
|
|
3414
|
+
// Claude Design: "a rounded, inset frame on a light-grey page
|
|
3415
|
+
// background" — the shell owns the page background and the
|
|
3416
|
+
// gutter; it does not draw a hard border/box around the content
|
|
3417
|
+
// (that reads as a second frame on top of the page header). An
|
|
3418
|
+
// app's own cards are its own furniture and stay app-owned.
|
|
3419
|
+
/* @__PURE__ */ jsx(
|
|
3420
|
+
"main",
|
|
3421
|
+
{
|
|
3422
|
+
"data-shell-content": "",
|
|
3423
|
+
className: `min-h-[calc(100vh-63px)] bg-[color:var(--chrome-page-bg,#F4F5F7)] px-6 ${topBar.title ? "pb-7 pt-[22px]" : "py-7"}`,
|
|
3424
|
+
children: /* @__PURE__ */ jsx("div", { className: "mx-auto max-w-7xl", children })
|
|
3425
|
+
}
|
|
3426
|
+
)
|
|
3427
|
+
)
|
|
3393
3428
|
] })
|
|
3394
3429
|
]
|
|
3395
3430
|
}
|
|
@@ -3397,5 +3432,5 @@ function NavAppShell({
|
|
|
3397
3432
|
}
|
|
3398
3433
|
|
|
3399
3434
|
export { BETA_BANNER_DISMISS_KEY, CAMPAIGN_FEATURE_AVAILABILITY, CORE_APP_ORIGIN, CORE_BILLING_PATH, FuelAction, NavAppShell, NavBetaBanner, NavChromeProvider, NavDisplayAction, NavSidebar, NavTabStrip, NavThemeControl, NavTopBar, NotificationsAction, SPECS_ORIGIN, SpecOverlayAction, SupportAction, TopBarCountBadge, TopBarPanelArrow, TopBarPopover, TopBarTooltip, TopBarWidgetSlot, clearBetaBannerDismissal, envChipClasses, isNavItemActive, resolveOrgLogoUrl, standardPolitogyNav, topBarIconButtonClass, useChromeMe, useChromeOrgs, useNavChromeFetcher, useThemePreference };
|
|
3400
|
-
//# sourceMappingURL=chunk-
|
|
3401
|
-
//# sourceMappingURL=chunk-
|
|
3435
|
+
//# sourceMappingURL=chunk-XK2LWTHJ.js.map
|
|
3436
|
+
//# sourceMappingURL=chunk-XK2LWTHJ.js.map
|