@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.
@@ -131,20 +131,13 @@ function clearPendingThemeChoice() {
131
131
  writeSharedCookie(THEME_PENDING_COOKIE, "", 0);
132
132
  }
133
133
  function resolveTheme(pref) {
134
- if (pref === "system") {
135
- try {
136
- return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
137
- } catch {
138
- return "light";
139
- }
140
- }
141
- return pref;
134
+ return "light";
142
135
  }
143
136
  function applyThemePreference(pref) {
144
137
  if (typeof document === "undefined") return;
145
- const resolved = resolveTheme(pref);
138
+ const resolved = resolveTheme();
146
139
  const d = document.documentElement;
147
- d.classList.toggle("dark", resolved === "dark");
140
+ d.classList.remove("dark");
148
141
  try {
149
142
  d.style.colorScheme = resolved;
150
143
  } catch {
@@ -159,11 +152,11 @@ var ls=null;try{ls=localStorage.getItem(KEY);}catch(e){}
159
152
  var pref=cookie||ls||"system";
160
153
  if(VALID.indexOf(pref)===-1)pref="system";
161
154
  if(cookie&&cookie!==ls){try{localStorage.setItem(KEY,cookie);}catch(e){}}
162
- var resolved=pref;
163
- if(pref==="system"){try{resolved=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";}catch(e){resolved="light";}}
155
+ // Dark Mode retired platform-wide 2026-09-21 \u2014 always light, and strip any
156
+ // stale dark class a pre-retirement cookie/localStorage value left behind.
164
157
  var d=document.documentElement;
165
- if(resolved==="dark"){d.classList.add("dark");}else{d.classList.remove("dark");}
166
- try{d.style.colorScheme=resolved;}catch(e){}
158
+ d.classList.remove("dark");
159
+ try{d.style.colorScheme="light";}catch(e){}
167
160
  }catch(e){}})();`;
168
161
  var CORE_APP_ORIGIN = "https://app.politogyvrm.com";
169
162
  var CORE_BILLING_PATH = "/organization-settings/subscription-billing/text-email";
@@ -1744,7 +1737,7 @@ function useThemePreference() {
1744
1737
  }
1745
1738
  const pref = cookie ?? (isThemePreference(ls) ? ls : null) ?? "system";
1746
1739
  setValueState(pref);
1747
- applyThemePreference(pref);
1740
+ applyThemePreference();
1748
1741
  }, []);
1749
1742
  const meCtx = react.useContext(NavChromeContext);
1750
1743
  react.useEffect(() => {
@@ -1753,7 +1746,7 @@ function useThemePreference() {
1753
1746
  if (pending) {
1754
1747
  if (meCtx?.me) reconciled.current = true;
1755
1748
  setValueState(pending);
1756
- applyThemePreference(pending);
1749
+ applyThemePreference();
1757
1750
  writeThemeCookie(pending);
1758
1751
  try {
1759
1752
  localStorage.setItem(THEME_STORAGE_KEY, pending);
@@ -1772,7 +1765,7 @@ function useThemePreference() {
1772
1765
  if (isThemePreference(pref)) {
1773
1766
  reconciled.current = true;
1774
1767
  setValueState(pref);
1775
- applyThemePreference(pref);
1768
+ applyThemePreference();
1776
1769
  writeThemeCookie(pref);
1777
1770
  try {
1778
1771
  localStorage.setItem(THEME_STORAGE_KEY, pref);
@@ -1791,7 +1784,7 @@ function useThemePreference() {
1791
1784
  const cookie = readThemeCookie();
1792
1785
  if (cookie) {
1793
1786
  setValueState((prev) => {
1794
- if (cookie !== prev) applyThemePreference(cookie);
1787
+ if (cookie !== prev) applyThemePreference();
1795
1788
  return cookie;
1796
1789
  });
1797
1790
  }
@@ -1813,14 +1806,14 @@ function useThemePreference() {
1813
1806
  } catch {
1814
1807
  return;
1815
1808
  }
1816
- const onChange = () => applyThemePreference("system");
1809
+ const onChange = () => applyThemePreference();
1817
1810
  mq.addEventListener("change", onChange);
1818
1811
  return () => mq.removeEventListener("change", onChange);
1819
1812
  }, [value]);
1820
1813
  const setValue = react.useCallback(
1821
1814
  (next) => {
1822
1815
  setValueState(next);
1823
- applyThemePreference(next);
1816
+ applyThemePreference();
1824
1817
  writeThemeCookie(next);
1825
1818
  try {
1826
1819
  localStorage.setItem(THEME_STORAGE_KEY, next);
@@ -2433,52 +2426,34 @@ function NavSidebar({
2433
2426
  }
2434
2427
  )
2435
2428
  ] }) : null,
2436
- mode ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mb-4", children: mode.options && mode.options.length > 1 && mode.onSelect ? /* @__PURE__ */ jsxRuntime.jsxs("details", { "data-nav-details": true, className: "group relative", children: [
2437
- /* @__PURE__ */ jsxRuntime.jsxs("summary", { className: "flex w-full cursor-pointer list-none 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 transition hover:bg-[color:var(--mode-accent-strong,var(--color-accent))] hover:opacity-95 [&::-webkit-details-marker]:hidden", children: [
2438
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2.5", children: [
2439
- ModeIcon ? /* @__PURE__ */ jsxRuntime.jsx(ModeIcon, { size: 16, className: "shrink-0" }) : null,
2440
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold tracking-[-0.01em]", children: mode.label })
2441
- ] }),
2442
- /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, {})
2443
- ] }),
2444
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-0 right-0 z-40 mt-1 overflow-hidden rounded-xl border border-[color:var(--line)] bg-[color:var(--panel-elevated)] py-1 shadow-[var(--shadow-soft)]", children: mode.options.map((opt) => {
2445
- const selected = opt.label === mode.label;
2446
- const OptIcon = opt.icon;
2447
- return /* @__PURE__ */ jsxRuntime.jsxs(
2448
- "button",
2449
- {
2450
- type: "button",
2451
- onClick: (e) => {
2452
- e.currentTarget.closest("details")?.removeAttribute("open");
2453
- if (!selected) mode.onSelect?.(opt.id);
2429
+ mode ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mb-4", children: [
2430
+ /* @__PURE__ */ jsxRuntime.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(
2431
+ (opt) => {
2432
+ const selected = opt.label === mode.label;
2433
+ const OptIcon = opt.icon;
2434
+ return /* @__PURE__ */ jsxRuntime.jsx(
2435
+ "button",
2436
+ {
2437
+ type: "button",
2438
+ title: opt.label,
2439
+ "aria-label": opt.label,
2440
+ "aria-current": selected ? "true" : void 0,
2441
+ onClick: () => {
2442
+ if (!selected) mode.onSelect?.(opt.id);
2443
+ },
2444
+ disabled: !mode.onSelect && !selected,
2445
+ className: [
2446
+ "flex h-9 flex-1 items-center justify-center rounded transition",
2447
+ 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))]"
2448
+ ].join(" "),
2449
+ children: OptIcon ? /* @__PURE__ */ jsxRuntime.jsx(OptIcon, { size: 16, className: "shrink-0" }) : null
2454
2450
  },
2455
- "aria-current": selected ? "true" : void 0,
2456
- className: [
2457
- "flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm",
2458
- selected ? "font-semibold text-[color:var(--color-accent)]" : "font-medium text-[color:var(--foreground)] hover:bg-[color:var(--panel)]"
2459
- ].join(" "),
2460
- children: [
2461
- OptIcon ? /* @__PURE__ */ jsxRuntime.jsx(OptIcon, { size: 15, className: "shrink-0 text-current" }) : null,
2462
- opt.label
2463
- ]
2464
- },
2465
- opt.id
2466
- );
2467
- }) })
2468
- ] }) : /* @__PURE__ */ jsxRuntime.jsxs(
2469
- "button",
2470
- {
2471
- type: "button",
2472
- 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",
2473
- children: [
2474
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex items-center gap-2.5", children: [
2475
- ModeIcon ? /* @__PURE__ */ jsxRuntime.jsx(ModeIcon, { size: 16, className: "shrink-0" }) : null,
2476
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold tracking-[-0.01em]", children: mode.label })
2477
- ] }),
2478
- /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, {})
2479
- ]
2480
- }
2481
- ) }) : null,
2451
+ opt.id
2452
+ );
2453
+ }
2454
+ ) }),
2455
+ /* @__PURE__ */ jsxRuntime.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 })
2456
+ ] }) : null,
2482
2457
  /* @__PURE__ */ jsxRuntime.jsxs("nav", { className: "flex flex-col gap-1", children: [
2483
2458
  nav.groupLabel ? /* @__PURE__ */ jsxRuntime.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,
2484
2459
  nav.items.map((item, idx) => {
@@ -2626,6 +2601,27 @@ function HamburgerIcon() {
2626
2601
  }
2627
2602
  );
2628
2603
  }
2604
+ function SearchIcon({ className } = {}) {
2605
+ return /* @__PURE__ */ jsxRuntime.jsxs(
2606
+ "svg",
2607
+ {
2608
+ width: 16,
2609
+ height: 16,
2610
+ viewBox: "0 0 24 24",
2611
+ fill: "none",
2612
+ stroke: "currentColor",
2613
+ strokeWidth: 2,
2614
+ strokeLinecap: "round",
2615
+ strokeLinejoin: "round",
2616
+ className,
2617
+ "aria-hidden": "true",
2618
+ children: [
2619
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "11", cy: "11", r: "7" }),
2620
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
2621
+ ]
2622
+ }
2623
+ );
2624
+ }
2629
2625
  function CloseIcon() {
2630
2626
  return /* @__PURE__ */ jsxRuntime.jsxs(
2631
2627
  "svg",
@@ -2920,214 +2916,231 @@ function NavTopBar({
2920
2916
  actions,
2921
2917
  themeToggle,
2922
2918
  onOpenNav,
2923
- navOpen
2919
+ navOpen,
2920
+ search,
2921
+ buildNotes
2924
2922
  }) {
2925
2923
  const rawName = user?.name?.trim() || "";
2926
2924
  const hasRealName = rawName.length > 0 && !rawName.includes("@");
2927
2925
  const displayName = hasRealName ? formatFirstLast(rawName) : user?.email ?? "Signed in";
2928
2926
  const initials = (hasRealName ? rawName : user?.email ?? "P").slice(0, 2).toUpperCase();
2929
2927
  const secondary = hasRealName ? user?.email || [user?.tier, user?.role].filter(Boolean).join(" \xB7 ") || "member" : [user?.tier, user?.role].filter(Boolean).join(" \xB7 ") || "member";
2930
- return /* @__PURE__ */ jsxRuntime.jsxs("header", { className: "sticky top-0 z-20 flex h-20 items-center justify-between gap-4 border-b border-[color:var(--line)] bg-[color:var(--panel)] px-4 backdrop-blur-xl", children: [
2931
- onOpenNav ? /* @__PURE__ */ jsxRuntime.jsx(
2932
- "button",
2933
- {
2934
- type: "button",
2935
- onClick: onOpenNav,
2936
- "aria-label": "Open menu",
2937
- "aria-expanded": navOpen ?? false,
2938
- "aria-controls": "politogy-nav-drawer",
2939
- className: `${topBarIconButtonClass("default")} mr-3 shrink-0 lg:hidden lg:mr-0`,
2940
- children: /* @__PURE__ */ jsxRuntime.jsx(HamburgerIcon, {})
2941
- }
2942
- ) : null,
2943
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0", children: [
2944
- /* @__PURE__ */ jsxRuntime.jsx(
2945
- "h1",
2928
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sticky top-0 z-20", children: [
2929
+ /* @__PURE__ */ jsxRuntime.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: [
2930
+ onOpenNav ? /* @__PURE__ */ jsxRuntime.jsx(
2931
+ "button",
2946
2932
  {
2947
- className: "truncate text-lg font-bold tracking-[-0.01em] text-[color:var(--foreground)]",
2948
- "data-display": "true",
2949
- children: title
2933
+ type: "button",
2934
+ onClick: onOpenNav,
2935
+ "aria-label": "Open menu",
2936
+ "aria-expanded": navOpen ?? false,
2937
+ "aria-controls": "politogy-nav-drawer",
2938
+ className: `${topBarIconButtonClass("default")} mr-1 shrink-0 lg:hidden`,
2939
+ children: /* @__PURE__ */ jsxRuntime.jsx(HamburgerIcon, {})
2950
2940
  }
2951
- ),
2952
- breadcrumbs && breadcrumbs.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Breadcrumb", className: "flex min-w-0 items-center gap-1.5 text-sm text-[color:var(--muted)]", children: breadcrumbs.map((b, i) => {
2953
- const last = i === breadcrumbs.length - 1;
2954
- return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
2955
- i > 0 ? /* @__PURE__ */ jsxRuntime.jsx("span", { "aria-hidden": true, className: "text-[color:var(--muted)] opacity-60", children: "\u203A" }) : null,
2956
- b.href && !last ? /* @__PURE__ */ jsxRuntime.jsx(
2957
- "a",
2958
- {
2959
- href: safeHref(b.href),
2960
- className: "truncate hover:text-[color:var(--foreground)] hover:underline",
2961
- children: b.label
2962
- }
2963
- ) : /* @__PURE__ */ jsxRuntime.jsx(
2964
- "span",
2965
- {
2966
- "aria-current": last ? "page" : void 0,
2967
- className: ["truncate", last ? "text-[color:var(--foreground)]" : ""].join(" "),
2968
- children: b.label
2969
- }
2970
- )
2971
- ] }, `${b.label}-${i}`);
2972
- }) }) : subtitle ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "truncate text-sm text-[color:var(--muted)]", children: subtitle }) : null
2973
- ] }),
2974
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex shrink-0 items-center gap-[var(--topbar-icon-gap,8px)]", children: [
2975
- actionsList && actionsList.length > 0 ? actionsList.map((action) => /* @__PURE__ */ jsxRuntime.jsx(NavTopBarActionButton, { action }, action.key)) : null,
2976
- actions,
2977
- themeToggle,
2978
- /* @__PURE__ */ jsxRuntime.jsxs("details", { "data-nav-details": true, className: "group/acct relative", children: [
2979
- /* @__PURE__ */ jsxRuntime.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: [
2980
- /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
2981
- "img",
2982
- {
2983
- src: user.avatarUrl || user.memojiUrl,
2984
- alt: "",
2985
- className: "h-full w-full object-cover"
2986
- }
2987
- ) : initials }),
2988
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "hidden flex-col leading-tight md:flex", children: [
2989
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-[color:var(--foreground)]", children: displayName }),
2990
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-[color:var(--muted)]", children: secondary })
2991
- ] }),
2992
- /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, {}),
2993
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "group-open/acct:hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
2994
- TopBarTooltip,
2995
- {
2996
- title: "My Account",
2997
- description: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2998
- hasRealName ? rawName : user?.email ?? "Signed in",
2999
- user?.email ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3000
- /* @__PURE__ */ jsxRuntime.jsx("br", {}),
3001
- user.email
3002
- ] }) : null,
3003
- /* @__PURE__ */ jsxRuntime.jsx("br", {}),
3004
- "Profile, organizations, appearance and sign out."
3005
- ] })
3006
- }
3007
- ) })
3008
- ] }),
3009
- /* @__PURE__ */ jsxRuntime.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: [
3010
- /* @__PURE__ */ jsxRuntime.jsx(TopBarPanelArrow, {}),
3011
- /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain", children: [
3012
- userMenu?.myProfileHref ? /* @__PURE__ */ jsxRuntime.jsxs(
3013
- "a",
2941
+ ) : null,
2942
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "relative flex w-[320px] max-w-full shrink-0 items-center", children: [
2943
+ /* @__PURE__ */ jsxRuntime.jsx(SearchIcon, { className: "pointer-events-none absolute left-3 h-4 w-4 text-[color:var(--muted)]" }),
2944
+ /* @__PURE__ */ jsxRuntime.jsx(
2945
+ "input",
2946
+ {
2947
+ type: "search",
2948
+ placeholder: search?.placeholder ?? "Search",
2949
+ value: search?.value,
2950
+ onChange: search?.onChange ? (e) => search.onChange?.(e.target.value) : void 0,
2951
+ onKeyDown: search?.onSubmit ? (e) => {
2952
+ if (e.key === "Enter") search.onSubmit?.(e.target.value);
2953
+ } : void 0,
2954
+ readOnly: !search?.onChange,
2955
+ 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)]"
2956
+ }
2957
+ ),
2958
+ /* @__PURE__ */ jsxRuntime.jsx(
2959
+ "kbd",
2960
+ {
2961
+ "aria-hidden": true,
2962
+ 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)]",
2963
+ children: "/"
2964
+ }
2965
+ )
2966
+ ] }),
2967
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative ml-auto flex shrink-0 items-center gap-[var(--topbar-icon-gap,8px)]", children: [
2968
+ /* @__PURE__ */ jsxRuntime.jsx(
2969
+ "button",
2970
+ {
2971
+ type: "button",
2972
+ onClick: buildNotes?.onOpen,
2973
+ 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)]",
2974
+ children: buildNotes?.label ?? "Build notes"
2975
+ }
2976
+ ),
2977
+ actionsList && actionsList.length > 0 ? actionsList.map((action) => /* @__PURE__ */ jsxRuntime.jsx(NavTopBarActionButton, { action }, action.key)) : null,
2978
+ actions,
2979
+ themeToggle,
2980
+ /* @__PURE__ */ jsxRuntime.jsxs("details", { "data-nav-details": true, className: "group/acct relative", children: [
2981
+ /* @__PURE__ */ jsxRuntime.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: [
2982
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx(
2983
+ "img",
3014
2984
  {
3015
- href: safeHref(userMenu.myProfileHref),
3016
- 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)]",
3017
- children: [
3018
- /* @__PURE__ */ jsxRuntime.jsx(ProfileIcon, {}),
3019
- "My Profile"
3020
- ]
2985
+ src: user.avatarUrl || user.memojiUrl,
2986
+ alt: "",
2987
+ className: "h-full w-full object-cover"
3021
2988
  }
3022
- ) : null,
3023
- userMenu?.organizationSettingsHref ? /* @__PURE__ */ jsxRuntime.jsxs(
3024
- "a",
2989
+ ) : initials }),
2990
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "hidden flex-col leading-tight md:flex", children: [
2991
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-semibold text-[color:var(--foreground)]", children: displayName }),
2992
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs text-[color:var(--muted)]", children: secondary })
2993
+ ] }),
2994
+ /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, {}),
2995
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "group-open/acct:hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
2996
+ TopBarTooltip,
3025
2997
  {
3026
- href: safeHref(userMenu.organizationSettingsHref),
3027
- 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)]",
3028
- children: [
3029
- /* @__PURE__ */ jsxRuntime.jsx(BriefcaseIcon, {}),
3030
- "Organization Settings"
3031
- ]
2998
+ title: "My Account",
2999
+ description: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3000
+ hasRealName ? rawName : user?.email ?? "Signed in",
3001
+ user?.email ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3002
+ /* @__PURE__ */ jsxRuntime.jsx("br", {}),
3003
+ user.email
3004
+ ] }) : null,
3005
+ /* @__PURE__ */ jsxRuntime.jsx("br", {}),
3006
+ "Profile, organizations, appearance and sign out."
3007
+ ] })
3032
3008
  }
3033
- ) : null,
3034
- userMenu?.roles && userMenu.roles.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-[color:var(--line)] px-4 py-3", children: [
3035
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-[color:var(--muted)]", children: "Roles & Organizations" }),
3036
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: userMenu.roles.map((r, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex flex-wrap items-center gap-1.5 text-sm", children: [
3037
- /* @__PURE__ */ jsxRuntime.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 }),
3038
- r.orgName ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[color:var(--muted)]", children: [
3039
- "in ",
3040
- r.orgName
3041
- ] }) : null
3042
- ] }, `${r.role}-${i}`)) })
3043
- ] }) : null,
3044
- userMenu?.accounts && userMenu.accounts.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-[color:var(--line)] px-4 py-3", children: [
3045
- /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-[color:var(--muted)]", children: "Accounts" }),
3046
- /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1", children: userMenu.accounts.map((a) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center gap-2.5", children: [
3047
- /* @__PURE__ */ jsxRuntime.jsxs(
3048
- "button",
3009
+ ) })
3010
+ ] }),
3011
+ /* @__PURE__ */ jsxRuntime.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: [
3012
+ /* @__PURE__ */ jsxRuntime.jsx(TopBarPanelArrow, {}),
3013
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain", children: [
3014
+ userMenu?.myProfileHref ? /* @__PURE__ */ jsxRuntime.jsxs(
3015
+ "a",
3016
+ {
3017
+ href: safeHref(userMenu.myProfileHref),
3018
+ 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)]",
3019
+ children: [
3020
+ /* @__PURE__ */ jsxRuntime.jsx(ProfileIcon, {}),
3021
+ "My Profile"
3022
+ ]
3023
+ }
3024
+ ) : null,
3025
+ userMenu?.organizationSettingsHref ? /* @__PURE__ */ jsxRuntime.jsxs(
3026
+ "a",
3027
+ {
3028
+ href: safeHref(userMenu.organizationSettingsHref),
3029
+ 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)]",
3030
+ children: [
3031
+ /* @__PURE__ */ jsxRuntime.jsx(BriefcaseIcon, {}),
3032
+ "Organization Settings"
3033
+ ]
3034
+ }
3035
+ ) : null,
3036
+ userMenu?.roles && userMenu.roles.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-[color:var(--line)] px-4 py-3", children: [
3037
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-[color:var(--muted)]", children: "Roles & Organizations" }),
3038
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1.5", children: userMenu.roles.map((r, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex flex-wrap items-center gap-1.5 text-sm", children: [
3039
+ /* @__PURE__ */ jsxRuntime.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 }),
3040
+ r.orgName ? /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[color:var(--muted)]", children: [
3041
+ "in ",
3042
+ r.orgName
3043
+ ] }) : null
3044
+ ] }, `${r.role}-${i}`)) })
3045
+ ] }) : null,
3046
+ userMenu?.accounts && userMenu.accounts.length > 0 ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-[color:var(--line)] px-4 py-3", children: [
3047
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-[color:var(--muted)]", children: "Accounts" }),
3048
+ /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "flex flex-col gap-1", children: userMenu.accounts.map((a) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center gap-2.5", children: [
3049
+ /* @__PURE__ */ jsxRuntime.jsxs(
3050
+ "button",
3051
+ {
3052
+ type: "button",
3053
+ onClick: () => {
3054
+ if (!a.active) userMenu.onSwitchAccount?.(a.id);
3055
+ },
3056
+ 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)]",
3057
+ children: [
3058
+ /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("img", { src: a.avatarUrl, alt: "", className: "h-full w-full object-cover" }) : (a.name ?? a.email ?? "?").slice(0, 2).toUpperCase() }),
3059
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 flex-col leading-tight", children: [
3060
+ /* @__PURE__ */ jsxRuntime.jsx(
3061
+ "span",
3062
+ {
3063
+ className: [
3064
+ "truncate text-sm font-semibold",
3065
+ a.active ? "text-[color:var(--color-accent)]" : "text-[color:var(--foreground)]"
3066
+ ].join(" "),
3067
+ children: a.name ?? a.email ?? a.id.slice(0, 8)
3068
+ }
3069
+ ),
3070
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs text-[color:var(--muted)]", children: a.active ? "Active" : a.email ?? "" })
3071
+ ] })
3072
+ ]
3073
+ }
3074
+ ),
3075
+ !a.active && userMenu.onRemoveAccount ? /* @__PURE__ */ jsxRuntime.jsx(
3076
+ "button",
3077
+ {
3078
+ type: "button",
3079
+ "aria-label": `Remove ${a.name ?? a.email ?? "account"}`,
3080
+ onClick: () => userMenu.onRemoveAccount?.(a.id),
3081
+ className: "shrink-0 rounded p-1 text-[color:var(--color-accent)] hover:bg-[color:var(--panel)]",
3082
+ children: /* @__PURE__ */ jsxRuntime.jsx(TrashIcon, {})
3083
+ }
3084
+ ) : null
3085
+ ] }, a.id)) }),
3086
+ userMenu.addAccountHref || userMenu.onAddAccount ? userMenu.addAccountHref ? /* @__PURE__ */ jsxRuntime.jsxs(
3087
+ "a",
3049
3088
  {
3050
- type: "button",
3051
- onClick: () => {
3052
- if (!a.active) userMenu.onSwitchAccount?.(a.id);
3053
- },
3054
- 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)]",
3089
+ href: safeHref(userMenu.addAccountHref),
3090
+ 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)]",
3055
3091
  children: [
3056
- /* @__PURE__ */ jsxRuntime.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__ */ jsxRuntime.jsx("img", { src: a.avatarUrl, alt: "", className: "h-full w-full object-cover" }) : (a.name ?? a.email ?? "?").slice(0, 2).toUpperCase() }),
3057
- /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "flex min-w-0 flex-col leading-tight", children: [
3058
- /* @__PURE__ */ jsxRuntime.jsx(
3059
- "span",
3060
- {
3061
- className: [
3062
- "truncate text-sm font-semibold",
3063
- a.active ? "text-[color:var(--color-accent)]" : "text-[color:var(--foreground)]"
3064
- ].join(" "),
3065
- children: a.name ?? a.email ?? a.id.slice(0, 8)
3066
- }
3067
- ),
3068
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate text-xs text-[color:var(--muted)]", children: a.active ? "Active" : a.email ?? "" })
3069
- ] })
3092
+ /* @__PURE__ */ jsxRuntime.jsx(AddUserIcon, {}),
3093
+ "Add Account"
3070
3094
  ]
3071
3095
  }
3072
- ),
3073
- !a.active && userMenu.onRemoveAccount ? /* @__PURE__ */ jsxRuntime.jsx(
3096
+ ) : /* @__PURE__ */ jsxRuntime.jsxs(
3074
3097
  "button",
3075
3098
  {
3076
3099
  type: "button",
3077
- "aria-label": `Remove ${a.name ?? a.email ?? "account"}`,
3078
- onClick: () => userMenu.onRemoveAccount?.(a.id),
3079
- className: "shrink-0 rounded p-1 text-[color:var(--color-accent)] hover:bg-[color:var(--panel)]",
3080
- children: /* @__PURE__ */ jsxRuntime.jsx(TrashIcon, {})
3100
+ onClick: userMenu.onAddAccount,
3101
+ 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)]",
3102
+ children: [
3103
+ /* @__PURE__ */ jsxRuntime.jsx(AddUserIcon, {}),
3104
+ "Add Account"
3105
+ ]
3081
3106
  }
3082
3107
  ) : null
3083
- ] }, a.id)) }),
3084
- userMenu.addAccountHref || userMenu.onAddAccount ? userMenu.addAccountHref ? /* @__PURE__ */ jsxRuntime.jsxs(
3085
- "a",
3086
- {
3087
- href: safeHref(userMenu.addAccountHref),
3088
- 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)]",
3089
- children: [
3090
- /* @__PURE__ */ jsxRuntime.jsx(AddUserIcon, {}),
3091
- "Add Account"
3092
- ]
3093
- }
3094
- ) : /* @__PURE__ */ jsxRuntime.jsxs(
3095
- "button",
3108
+ ] }) : null,
3109
+ userMenu?.theme ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-[color:var(--line)]", children: /* @__PURE__ */ jsxRuntime.jsx(
3110
+ NavThemeControl,
3096
3111
  {
3097
- type: "button",
3098
- onClick: userMenu.onAddAccount,
3099
- 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)]",
3100
- children: [
3101
- /* @__PURE__ */ jsxRuntime.jsx(AddUserIcon, {}),
3102
- "Add Account"
3103
- ]
3112
+ value: userMenu.theme.value,
3113
+ onChange: userMenu.theme.onChange
3104
3114
  }
3105
- ) : null
3106
- ] }) : null,
3107
- userMenu?.theme ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-[color:var(--line)]", children: /* @__PURE__ */ jsxRuntime.jsx(
3108
- NavThemeControl,
3115
+ ) }) : null
3116
+ ] }),
3117
+ onSignOut ? /* @__PURE__ */ jsxRuntime.jsxs(
3118
+ "button",
3109
3119
  {
3110
- value: userMenu.theme.value,
3111
- onChange: userMenu.theme.onChange
3120
+ type: "button",
3121
+ onClick: onSignOut,
3122
+ 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)]",
3123
+ children: [
3124
+ /* @__PURE__ */ jsxRuntime.jsx(SignOutIcon, {}),
3125
+ "Sign out"
3126
+ ]
3112
3127
  }
3113
- ) }) : null
3114
- ] }),
3115
- onSignOut ? /* @__PURE__ */ jsxRuntime.jsxs(
3116
- "button",
3117
- {
3118
- type: "button",
3119
- onClick: onSignOut,
3120
- 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)]",
3121
- children: [
3122
- /* @__PURE__ */ jsxRuntime.jsx(SignOutIcon, {}),
3123
- "Sign out"
3124
- ]
3125
- }
3126
- ) : null
3127
- ] })
3128
- ] }),
3129
- !hasRealName && user ? /* @__PURE__ */ jsxRuntime.jsx(NamePromptBubble, { profileHref: userMenu?.myProfileHref }) : null
3130
- ] })
3128
+ ) : null
3129
+ ] })
3130
+ ] }),
3131
+ !hasRealName && user ? /* @__PURE__ */ jsxRuntime.jsx(NamePromptBubble, { profileHref: userMenu?.myProfileHref }) : null
3132
+ ] })
3133
+ ] }),
3134
+ /* @__PURE__ */ jsxRuntime.jsx(
3135
+ "div",
3136
+ {
3137
+ "aria-hidden": true,
3138
+ className: "h-[3px] w-full shrink-0",
3139
+ style: {
3140
+ background: "var(--chrome-gradient, linear-gradient(to right, #007BFF, #A54B7A, #E63946))"
3141
+ }
3142
+ }
3143
+ )
3131
3144
  ] });
3132
3145
  }
3133
3146
  function NamePromptBubble({ profileHref }) {
@@ -3391,7 +3404,22 @@ function NavAppShell({
3391
3404
  /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "lg:pl-[240px]", children: [
3392
3405
  /* @__PURE__ */ jsxRuntime.jsx(NavTopBar, { ...topBar, onOpenNav: () => setNavOpen(true), navOpen }),
3393
3406
  betaBanner ? /* @__PURE__ */ jsxRuntime.jsx(NavBetaBanner, { ...betaBanner }) : null,
3394
- contentWrapper === "bare" ? /* @__PURE__ */ jsxRuntime.jsx("div", { "data-shell-content": "", children }) : /* @__PURE__ */ jsxRuntime.jsx("main", { "data-shell-content": "", className: "px-6 py-7", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto max-w-7xl", children }) })
3407
+ topBar.title ? /* @__PURE__ */ jsxRuntime.jsx("h1", { className: "px-6 pt-7 text-xl font-semibold text-[color:var(--foreground)]", children: topBar.title }) : null,
3408
+ contentWrapper === "bare" ? /* @__PURE__ */ jsxRuntime.jsx("div", { "data-shell-content": "", className: topBar.title ? "mt-[22px]" : void 0, children }) : (
3409
+ // Claude Design: "a rounded, inset frame on a light-grey page
3410
+ // background" — the shell owns the page background and the
3411
+ // gutter; it does not draw a hard border/box around the content
3412
+ // (that reads as a second frame on top of the page header). An
3413
+ // app's own cards are its own furniture and stay app-owned.
3414
+ /* @__PURE__ */ jsxRuntime.jsx(
3415
+ "main",
3416
+ {
3417
+ "data-shell-content": "",
3418
+ className: `min-h-[calc(100vh-63px)] bg-[color:var(--chrome-page-bg,#F4F5F7)] px-6 ${topBar.title ? "pb-7 pt-[22px]" : "py-7"}`,
3419
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto max-w-7xl", children })
3420
+ }
3421
+ )
3422
+ )
3395
3423
  ] })
3396
3424
  ]
3397
3425
  }
@@ -4324,7 +4352,7 @@ function FrameBody({
4324
4352
  footer,
4325
4353
  linkComponent
4326
4354
  },
4327
- betaBanner: meta.beta === false ? void 0 : {},
4355
+ betaBanner: meta.beta === true ? {} : void 0,
4328
4356
  modeId: appMode,
4329
4357
  contentWrapper: core?.contentWrapper ?? granted("contentWrapper"),
4330
4358
  topBar: {