@the-portland-company/shell 0.63.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.
@@ -1,4 +1,4 @@
1
- import { readThemeCookie, THEME_STORAGE_KEY, isThemePreference, applyThemePreference, readPendingThemeChoice, writeThemeCookie, clearPendingThemeChoice, markThemeChoicePending } from './chunk-U4RZPZET.js';
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';
@@ -2195,10 +2195,7 @@ function NavSidebar({
2195
2195
  ),
2196
2196
  /* @__PURE__ */ jsxs("div", { className: "flex flex-1 flex-col overflow-y-auto px-4 pb-2", children: [
2197
2197
  org ? /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
2198
- /* @__PURE__ */ jsxs("div", { className: "mb-2 flex items-center justify-between px-1", children: [
2199
- /* @__PURE__ */ jsx("p", { className: "text-[11px] font-semibold uppercase tracking-[0.08em] text-[color:var(--sidebar-text-muted,var(--muted))]", children: "Organization" }),
2200
- org.id && !org.loading ? /* @__PURE__ */ jsx(OrgIdCopyButton, { id: org.id }) : null
2201
- ] }),
2198
+ /* @__PURE__ */ jsx("div", { className: "mb-2 flex items-center justify-between px-1", children: /* @__PURE__ */ jsx("p", { className: "text-[11px] font-semibold uppercase tracking-[0.08em] text-[color:var(--sidebar-text-muted,var(--muted))]", children: "Organization" }) }),
2202
2199
  org.loading ? /* @__PURE__ */ jsxs("div", { className: "flex w-full items-center gap-2.5 rounded-md border border-[color:var(--line)] bg-[color:var(--panel-elevated)] px-2.5 py-2 shadow-sm", children: [
2203
2200
  /* @__PURE__ */ jsx(
2204
2201
  "span",
@@ -2226,14 +2223,17 @@ function NavSidebar({
2226
2223
  children: orgLogoSrc ? /* @__PURE__ */ jsx("img", { src: orgLogoSrc, alt: "", className: "h-full w-full object-cover" }) : (org.name ?? "Org").slice(0, 2).toUpperCase()
2227
2224
  }
2228
2225
  ),
2229
- /* @__PURE__ */ jsx(
2230
- "span",
2231
- {
2232
- title: org.name ?? void 0,
2233
- className: "truncate text-sm font-semibold",
2234
- children: org.name ?? "No organizations"
2235
- }
2236
- )
2226
+ /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col", children: [
2227
+ /* @__PURE__ */ jsx(
2228
+ "span",
2229
+ {
2230
+ title: org.name ?? void 0,
2231
+ className: "truncate text-sm font-semibold",
2232
+ children: org.name ?? "No organizations"
2233
+ }
2234
+ ),
2235
+ org.id && !org.loading ? /* @__PURE__ */ jsx(OrgIdCopyButton, { id: org.id }) : null
2236
+ ] })
2237
2237
  ] }),
2238
2238
  /* @__PURE__ */ jsx(ChevronDown, {})
2239
2239
  ] }),
@@ -2316,59 +2316,51 @@ function NavSidebar({
2316
2316
  children: orgLogoSrc ? /* @__PURE__ */ jsx("img", { src: orgLogoSrc, alt: "", className: "h-full w-full object-cover" }) : (org.name ?? "Org").slice(0, 2).toUpperCase()
2317
2317
  }
2318
2318
  ),
2319
- /* @__PURE__ */ jsx("span", { className: "truncate text-sm font-semibold", children: org.name ?? "No organizations" })
2319
+ /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col", children: [
2320
+ /* @__PURE__ */ jsx(
2321
+ "span",
2322
+ {
2323
+ title: org.name ?? void 0,
2324
+ className: "truncate text-sm font-semibold",
2325
+ children: org.name ?? "No organizations"
2326
+ }
2327
+ ),
2328
+ org.id && !org.loading ? /* @__PURE__ */ jsx(OrgIdCopyButton, { id: org.id }) : null
2329
+ ] })
2320
2330
  ] }),
2321
2331
  /* @__PURE__ */ jsx(ChevronDown, {})
2322
2332
  ]
2323
2333
  }
2324
2334
  )
2325
2335
  ] }) : null,
2326
- mode ? /* @__PURE__ */ jsx("div", { className: "mb-4", children: mode.options && mode.options.length > 1 && mode.onSelect ? /* @__PURE__ */ jsxs("details", { "data-nav-details": true, className: "group relative", children: [
2327
- /* @__PURE__ */ 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: [
2328
- /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2.5", children: [
2329
- ModeIcon ? /* @__PURE__ */ jsx(ModeIcon, { size: 16, className: "shrink-0" }) : null,
2330
- /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold tracking-[-0.01em]", children: mode.label })
2331
- ] }),
2332
- /* @__PURE__ */ jsx(ChevronDown, {})
2333
- ] }),
2334
- /* @__PURE__ */ 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) => {
2335
- const selected = opt.label === mode.label;
2336
- const OptIcon = opt.icon;
2337
- return /* @__PURE__ */ jsxs(
2338
- "button",
2339
- {
2340
- type: "button",
2341
- onClick: (e) => {
2342
- e.currentTarget.closest("details")?.removeAttribute("open");
2343
- if (!selected) mode.onSelect?.(opt.id);
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
2344
2357
  },
2345
- "aria-current": selected ? "true" : void 0,
2346
- className: [
2347
- "flex w-full items-center gap-2.5 px-3 py-2 text-left text-sm",
2348
- selected ? "font-semibold text-[color:var(--color-accent)]" : "font-medium text-[color:var(--foreground)] hover:bg-[color:var(--panel)]"
2349
- ].join(" "),
2350
- children: [
2351
- OptIcon ? /* @__PURE__ */ jsx(OptIcon, { size: 15, className: "shrink-0 text-current" }) : null,
2352
- opt.label
2353
- ]
2354
- },
2355
- opt.id
2356
- );
2357
- }) })
2358
- ] }) : /* @__PURE__ */ jsxs(
2359
- "button",
2360
- {
2361
- type: "button",
2362
- 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",
2363
- children: [
2364
- /* @__PURE__ */ jsxs("span", { className: "flex items-center gap-2.5", children: [
2365
- ModeIcon ? /* @__PURE__ */ jsx(ModeIcon, { size: 16, className: "shrink-0" }) : null,
2366
- /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold tracking-[-0.01em]", children: mode.label })
2367
- ] }),
2368
- /* @__PURE__ */ jsx(ChevronDown, {})
2369
- ]
2370
- }
2371
- ) }) : 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,
2372
2364
  /* @__PURE__ */ jsxs("nav", { className: "flex flex-col gap-1", children: [
2373
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,
2374
2366
  nav.items.map((item, idx) => {
@@ -2449,7 +2441,7 @@ function NavSidebar({
2449
2441
  }
2450
2442
  )
2451
2443
  ] }, l.label)) }) : null,
2452
- footer.envLabel ? /* @__PURE__ */ jsxs(
2444
+ footer.envLabel && footer.envLabel.trim().toLowerCase() !== "production" ? /* @__PURE__ */ jsxs(
2453
2445
  "div",
2454
2446
  {
2455
2447
  "data-shell-meta": true,
@@ -2516,6 +2508,27 @@ function HamburgerIcon() {
2516
2508
  }
2517
2509
  );
2518
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
+ }
2519
2532
  function CloseIcon() {
2520
2533
  return /* @__PURE__ */ jsxs(
2521
2534
  "svg",
@@ -2810,214 +2823,231 @@ function NavTopBar({
2810
2823
  actions,
2811
2824
  themeToggle,
2812
2825
  onOpenNav,
2813
- navOpen
2826
+ navOpen,
2827
+ search,
2828
+ buildNotes
2814
2829
  }) {
2815
2830
  const rawName = user?.name?.trim() || "";
2816
2831
  const hasRealName = rawName.length > 0 && !rawName.includes("@");
2817
2832
  const displayName = hasRealName ? formatFirstLast(rawName) : user?.email ?? "Signed in";
2818
2833
  const initials = (hasRealName ? rawName : user?.email ?? "P").slice(0, 2).toUpperCase();
2819
2834
  const secondary = hasRealName ? user?.email || [user?.tier, user?.role].filter(Boolean).join(" \xB7 ") || "member" : [user?.tier, user?.role].filter(Boolean).join(" \xB7 ") || "member";
2820
- return /* @__PURE__ */ 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: [
2821
- onOpenNav ? /* @__PURE__ */ jsx(
2822
- "button",
2823
- {
2824
- type: "button",
2825
- onClick: onOpenNav,
2826
- "aria-label": "Open menu",
2827
- "aria-expanded": navOpen ?? false,
2828
- "aria-controls": "politogy-nav-drawer",
2829
- className: `${topBarIconButtonClass("default")} mr-3 shrink-0 lg:hidden lg:mr-0`,
2830
- children: /* @__PURE__ */ jsx(HamburgerIcon, {})
2831
- }
2832
- ) : null,
2833
- /* @__PURE__ */ jsxs("div", { className: "min-w-0", children: [
2834
- /* @__PURE__ */ jsx(
2835
- "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",
2836
2839
  {
2837
- className: "truncate text-lg font-bold tracking-[-0.01em] text-[color:var(--foreground)]",
2838
- "data-display": "true",
2839
- children: title
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, {})
2840
2847
  }
2841
- ),
2842
- breadcrumbs && breadcrumbs.length > 0 ? /* @__PURE__ */ 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) => {
2843
- const last = i === breadcrumbs.length - 1;
2844
- return /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 items-center gap-1.5", children: [
2845
- i > 0 ? /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-[color:var(--muted)] opacity-60", children: "\u203A" }) : null,
2846
- b.href && !last ? /* @__PURE__ */ jsx(
2847
- "a",
2848
- {
2849
- href: safeHref(b.href),
2850
- className: "truncate hover:text-[color:var(--foreground)] hover:underline",
2851
- children: b.label
2852
- }
2853
- ) : /* @__PURE__ */ jsx(
2854
- "span",
2855
- {
2856
- "aria-current": last ? "page" : void 0,
2857
- className: ["truncate", last ? "text-[color:var(--foreground)]" : ""].join(" "),
2858
- children: b.label
2859
- }
2860
- )
2861
- ] }, `${b.label}-${i}`);
2862
- }) }) : subtitle ? /* @__PURE__ */ jsx("p", { className: "truncate text-sm text-[color:var(--muted)]", children: subtitle }) : null
2863
- ] }),
2864
- /* @__PURE__ */ jsxs("div", { className: "relative flex shrink-0 items-center gap-[var(--topbar-icon-gap,8px)]", children: [
2865
- actionsList && actionsList.length > 0 ? actionsList.map((action) => /* @__PURE__ */ jsx(NavTopBarActionButton, { action }, action.key)) : null,
2866
- actions,
2867
- themeToggle,
2868
- /* @__PURE__ */ jsxs("details", { "data-nav-details": true, className: "group/acct relative", children: [
2869
- /* @__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: [
2870
- /* @__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(
2871
- "img",
2872
- {
2873
- src: user.avatarUrl || user.memojiUrl,
2874
- alt: "",
2875
- className: "h-full w-full object-cover"
2876
- }
2877
- ) : initials }),
2878
- /* @__PURE__ */ jsxs("span", { className: "hidden flex-col leading-tight md:flex", children: [
2879
- /* @__PURE__ */ jsx("span", { className: "text-sm font-semibold text-[color:var(--foreground)]", children: displayName }),
2880
- /* @__PURE__ */ jsx("span", { className: "text-xs text-[color:var(--muted)]", children: secondary })
2881
- ] }),
2882
- /* @__PURE__ */ jsx(ChevronDown, {}),
2883
- /* @__PURE__ */ jsx("span", { className: "group-open/acct:hidden", children: /* @__PURE__ */ jsx(
2884
- TopBarTooltip,
2885
- {
2886
- title: "My Account",
2887
- description: /* @__PURE__ */ jsxs(Fragment, { children: [
2888
- hasRealName ? rawName : user?.email ?? "Signed in",
2889
- user?.email ? /* @__PURE__ */ jsxs(Fragment, { children: [
2890
- /* @__PURE__ */ jsx("br", {}),
2891
- user.email
2892
- ] }) : null,
2893
- /* @__PURE__ */ jsx("br", {}),
2894
- "Profile, organizations, appearance and sign out."
2895
- ] })
2896
- }
2897
- ) })
2898
- ] }),
2899
- /* @__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: [
2900
- /* @__PURE__ */ jsx(TopBarPanelArrow, {}),
2901
- /* @__PURE__ */ jsxs("div", { className: "min-h-0 flex-1 overflow-y-auto overscroll-contain", children: [
2902
- userMenu?.myProfileHref ? /* @__PURE__ */ jsxs(
2903
- "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",
2904
2891
  {
2905
- href: safeHref(userMenu.myProfileHref),
2906
- 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)]",
2907
- children: [
2908
- /* @__PURE__ */ jsx(ProfileIcon, {}),
2909
- "My Profile"
2910
- ]
2892
+ src: user.avatarUrl || user.memojiUrl,
2893
+ alt: "",
2894
+ className: "h-full w-full object-cover"
2911
2895
  }
2912
- ) : null,
2913
- userMenu?.organizationSettingsHref ? /* @__PURE__ */ jsxs(
2914
- "a",
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,
2915
2904
  {
2916
- href: safeHref(userMenu.organizationSettingsHref),
2917
- 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)]",
2918
- children: [
2919
- /* @__PURE__ */ jsx(BriefcaseIcon, {}),
2920
- "Organization Settings"
2921
- ]
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
+ ] })
2922
2915
  }
2923
- ) : null,
2924
- userMenu?.roles && userMenu.roles.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "border-t border-[color:var(--line)] px-4 py-3", children: [
2925
- /* @__PURE__ */ jsx("p", { className: "mb-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-[color:var(--muted)]", children: "Roles & Organizations" }),
2926
- /* @__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: [
2927
- /* @__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 }),
2928
- r.orgName ? /* @__PURE__ */ jsxs("span", { className: "text-[color:var(--muted)]", children: [
2929
- "in ",
2930
- r.orgName
2931
- ] }) : null
2932
- ] }, `${r.role}-${i}`)) })
2933
- ] }) : null,
2934
- userMenu?.accounts && userMenu.accounts.length > 0 ? /* @__PURE__ */ jsxs("div", { className: "border-t border-[color:var(--line)] px-4 py-3", children: [
2935
- /* @__PURE__ */ jsx("p", { className: "mb-2 text-[11px] font-semibold uppercase tracking-[0.08em] text-[color:var(--muted)]", children: "Accounts" }),
2936
- /* @__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: [
2937
- /* @__PURE__ */ jsxs(
2938
- "button",
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",
2939
2995
  {
2940
- type: "button",
2941
- onClick: () => {
2942
- if (!a.active) userMenu.onSwitchAccount?.(a.id);
2943
- },
2944
- 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)]",
2945
2998
  children: [
2946
- /* @__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() }),
2947
- /* @__PURE__ */ jsxs("span", { className: "flex min-w-0 flex-col leading-tight", children: [
2948
- /* @__PURE__ */ jsx(
2949
- "span",
2950
- {
2951
- className: [
2952
- "truncate text-sm font-semibold",
2953
- a.active ? "text-[color:var(--color-accent)]" : "text-[color:var(--foreground)]"
2954
- ].join(" "),
2955
- children: a.name ?? a.email ?? a.id.slice(0, 8)
2956
- }
2957
- ),
2958
- /* @__PURE__ */ jsx("span", { className: "truncate text-xs text-[color:var(--muted)]", children: a.active ? "Active" : a.email ?? "" })
2959
- ] })
2999
+ /* @__PURE__ */ jsx(AddUserIcon, {}),
3000
+ "Add Account"
2960
3001
  ]
2961
3002
  }
2962
- ),
2963
- !a.active && userMenu.onRemoveAccount ? /* @__PURE__ */ jsx(
3003
+ ) : /* @__PURE__ */ jsxs(
2964
3004
  "button",
2965
3005
  {
2966
3006
  type: "button",
2967
- "aria-label": `Remove ${a.name ?? a.email ?? "account"}`,
2968
- onClick: () => userMenu.onRemoveAccount?.(a.id),
2969
- className: "shrink-0 rounded p-1 text-[color:var(--color-accent)] hover:bg-[color:var(--panel)]",
2970
- children: /* @__PURE__ */ jsx(TrashIcon, {})
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
+ ]
2971
3013
  }
2972
3014
  ) : null
2973
- ] }, a.id)) }),
2974
- userMenu.addAccountHref || userMenu.onAddAccount ? userMenu.addAccountHref ? /* @__PURE__ */ jsxs(
2975
- "a",
2976
- {
2977
- href: safeHref(userMenu.addAccountHref),
2978
- 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)]",
2979
- children: [
2980
- /* @__PURE__ */ jsx(AddUserIcon, {}),
2981
- "Add Account"
2982
- ]
2983
- }
2984
- ) : /* @__PURE__ */ jsxs(
2985
- "button",
3015
+ ] }) : null,
3016
+ userMenu?.theme ? /* @__PURE__ */ jsx("div", { className: "border-t border-[color:var(--line)]", children: /* @__PURE__ */ jsx(
3017
+ NavThemeControl,
2986
3018
  {
2987
- type: "button",
2988
- onClick: userMenu.onAddAccount,
2989
- 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)]",
2990
- children: [
2991
- /* @__PURE__ */ jsx(AddUserIcon, {}),
2992
- "Add Account"
2993
- ]
3019
+ value: userMenu.theme.value,
3020
+ onChange: userMenu.theme.onChange
2994
3021
  }
2995
- ) : null
2996
- ] }) : null,
2997
- userMenu?.theme ? /* @__PURE__ */ jsx("div", { className: "border-t border-[color:var(--line)]", children: /* @__PURE__ */ jsx(
2998
- NavThemeControl,
3022
+ ) }) : null
3023
+ ] }),
3024
+ onSignOut ? /* @__PURE__ */ jsxs(
3025
+ "button",
2999
3026
  {
3000
- value: userMenu.theme.value,
3001
- onChange: userMenu.theme.onChange
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
+ ]
3002
3034
  }
3003
- ) }) : null
3004
- ] }),
3005
- onSignOut ? /* @__PURE__ */ jsxs(
3006
- "button",
3007
- {
3008
- type: "button",
3009
- onClick: onSignOut,
3010
- 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)]",
3011
- children: [
3012
- /* @__PURE__ */ jsx(SignOutIcon, {}),
3013
- "Sign out"
3014
- ]
3015
- }
3016
- ) : null
3017
- ] })
3018
- ] }),
3019
- !hasRealName && user ? /* @__PURE__ */ jsx(NamePromptBubble, { profileHref: userMenu?.myProfileHref }) : null
3020
- ] })
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
+ )
3021
3051
  ] });
3022
3052
  }
3023
3053
  function NamePromptBubble({ profileHref }) {
@@ -3379,7 +3409,22 @@ function NavAppShell({
3379
3409
  /* @__PURE__ */ jsxs("div", { className: "lg:pl-[240px]", children: [
3380
3410
  /* @__PURE__ */ jsx(NavTopBar, { ...topBar, onOpenNav: () => setNavOpen(true), navOpen }),
3381
3411
  betaBanner ? /* @__PURE__ */ jsx(NavBetaBanner, { ...betaBanner }) : null,
3382
- contentWrapper === "bare" ? /* @__PURE__ */ jsx("div", { "data-shell-content": "", children }) : /* @__PURE__ */ jsx("main", { "data-shell-content": "", className: "px-6 py-7", children: /* @__PURE__ */ jsx("div", { className: "mx-auto max-w-7xl", children }) })
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
+ )
3383
3428
  ] })
3384
3429
  ]
3385
3430
  }
@@ -3387,5 +3432,5 @@ function NavAppShell({
3387
3432
  }
3388
3433
 
3389
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 };
3390
- //# sourceMappingURL=chunk-2SF25TVU.js.map
3391
- //# sourceMappingURL=chunk-2SF25TVU.js.map
3435
+ //# sourceMappingURL=chunk-XK2LWTHJ.js.map
3436
+ //# sourceMappingURL=chunk-XK2LWTHJ.js.map