@orangecheck/app-design 0.2.1 → 0.3.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/chrome.d.mts +20 -3
- package/dist/chrome.d.ts +20 -3
- package/dist/chrome.js +105 -30
- package/dist/chrome.js.map +1 -1
- package/dist/chrome.mjs +107 -34
- package/dist/chrome.mjs.map +1 -1
- package/dist/components.d.mts +60 -7
- package/dist/components.d.ts +60 -7
- package/dist/components.js +757 -260
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +734 -262
- package/dist/components.mjs.map +1 -1
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +820 -329
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +814 -332
- package/dist/index.mjs.map +1 -1
- package/dist/primitives.d.mts +10 -2
- package/dist/primitives.d.ts +10 -2
- package/dist/primitives.js +87 -11
- package/dist/primitives.js.map +1 -1
- package/dist/primitives.mjs +87 -13
- package/dist/primitives.mjs.map +1 -1
- package/dist/styles/tokens.css +17 -5
- package/package.json +1 -1
package/dist/chrome.d.mts
CHANGED
|
@@ -36,8 +36,18 @@ interface ShellNavGroup {
|
|
|
36
36
|
label?: string;
|
|
37
37
|
items: ShellNavItem[];
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
interface ShellSection {
|
|
40
|
+
id: string;
|
|
41
|
+
label: string;
|
|
42
|
+
title?: string;
|
|
43
|
+
href: string;
|
|
44
|
+
groups: ShellNavGroup[];
|
|
45
|
+
}
|
|
46
|
+
declare function AppShell({ nav, sections, activeSection, persistent, home, account, banner, footer, children, className, }: {
|
|
47
|
+
nav?: ShellNavGroup[];
|
|
48
|
+
sections?: ShellSection[];
|
|
49
|
+
activeSection?: string;
|
|
50
|
+
persistent?: ShellNavGroup[];
|
|
41
51
|
home?: string;
|
|
42
52
|
account?: ReactNode;
|
|
43
53
|
banner?: ReactNode;
|
|
@@ -61,4 +71,11 @@ declare function ThemeToggle({ className }: {
|
|
|
61
71
|
className?: string;
|
|
62
72
|
}): react.JSX.Element;
|
|
63
73
|
|
|
64
|
-
|
|
74
|
+
interface ShellPlace {
|
|
75
|
+
section?: string;
|
|
76
|
+
page?: string;
|
|
77
|
+
}
|
|
78
|
+
declare const ShellContext: react.Context<ShellPlace>;
|
|
79
|
+
declare function useShellPlace(): ShellPlace;
|
|
80
|
+
|
|
81
|
+
export { AccountMenu, type AccountMenuItem, AppShell, type FooterColumn, type NavItem, ShellContext, type ShellNavGroup, type ShellNavItem, type ShellPlace, type ShellSection, SiteFooter, SiteHeader, ThemeToggle, useShellPlace };
|
package/dist/chrome.d.ts
CHANGED
|
@@ -36,8 +36,18 @@ interface ShellNavGroup {
|
|
|
36
36
|
label?: string;
|
|
37
37
|
items: ShellNavItem[];
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
interface ShellSection {
|
|
40
|
+
id: string;
|
|
41
|
+
label: string;
|
|
42
|
+
title?: string;
|
|
43
|
+
href: string;
|
|
44
|
+
groups: ShellNavGroup[];
|
|
45
|
+
}
|
|
46
|
+
declare function AppShell({ nav, sections, activeSection, persistent, home, account, banner, footer, children, className, }: {
|
|
47
|
+
nav?: ShellNavGroup[];
|
|
48
|
+
sections?: ShellSection[];
|
|
49
|
+
activeSection?: string;
|
|
50
|
+
persistent?: ShellNavGroup[];
|
|
41
51
|
home?: string;
|
|
42
52
|
account?: ReactNode;
|
|
43
53
|
banner?: ReactNode;
|
|
@@ -61,4 +71,11 @@ declare function ThemeToggle({ className }: {
|
|
|
61
71
|
className?: string;
|
|
62
72
|
}): react.JSX.Element;
|
|
63
73
|
|
|
64
|
-
|
|
74
|
+
interface ShellPlace {
|
|
75
|
+
section?: string;
|
|
76
|
+
page?: string;
|
|
77
|
+
}
|
|
78
|
+
declare const ShellContext: react.Context<ShellPlace>;
|
|
79
|
+
declare function useShellPlace(): ShellPlace;
|
|
80
|
+
|
|
81
|
+
export { AccountMenu, type AccountMenuItem, AppShell, type FooterColumn, type NavItem, ShellContext, type ShellNavGroup, type ShellNavItem, type ShellPlace, type ShellSection, SiteFooter, SiteHeader, ThemeToggle, useShellPlace };
|
package/dist/chrome.js
CHANGED
|
@@ -324,12 +324,12 @@ function SiteFooter({
|
|
|
324
324
|
className
|
|
325
325
|
}) {
|
|
326
326
|
return /* @__PURE__ */ jsxRuntime.jsxs("footer", { className: cn("border-t border-border bg-background", className), children: [
|
|
327
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oca-container grid gap-10 py-14 md:grid-cols-[1.3fr_repeat(3,1fr)] md:py-16", children: [
|
|
328
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
327
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "oca-container grid grid-cols-2 gap-x-6 gap-y-10 py-14 md:grid-cols-[1.3fr_repeat(3,1fr)] md:py-16", children: [
|
|
328
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "col-span-2 flex flex-col gap-4 md:col-span-1", children: [
|
|
329
329
|
/* @__PURE__ */ jsxRuntime.jsx(Lockup, { size: 26 }),
|
|
330
330
|
fineprint ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "max-w-xs text-[0.9375rem] leading-relaxed text-muted-foreground", children: fineprint }) : null
|
|
331
331
|
] }),
|
|
332
|
-
columns.map((col) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-1", children: [
|
|
332
|
+
columns.map((col) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col gap-1", children: [
|
|
333
333
|
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-[0.875rem] font-medium", children: col.heading }),
|
|
334
334
|
col.links.map((l) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
335
335
|
NavLink,
|
|
@@ -344,9 +344,13 @@ function SiteFooter({
|
|
|
344
344
|
meta ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "oca-container border-t border-border py-6 text-[0.875rem] text-muted-foreground", children: meta }) : null
|
|
345
345
|
] });
|
|
346
346
|
}
|
|
347
|
+
var ShellContext = react.createContext({});
|
|
348
|
+
function useShellPlace() {
|
|
349
|
+
return react.useContext(ShellContext);
|
|
350
|
+
}
|
|
347
351
|
function SideNav({ groups, onNavigate }) {
|
|
348
|
-
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "
|
|
349
|
-
g.label ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 pb-1
|
|
352
|
+
return /* @__PURE__ */ jsxRuntime.jsx("nav", { "aria-label": "Pages", className: "flex flex-col gap-5", children: groups.map((g, gi) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col gap-0.5", children: [
|
|
353
|
+
g.label ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-3 pb-1 text-[0.8125rem] text-muted-foreground", children: g.label }) : null,
|
|
350
354
|
g.items.map((it) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
351
355
|
Link2__default.default,
|
|
352
356
|
{
|
|
@@ -354,8 +358,8 @@ function SideNav({ groups, onNavigate }) {
|
|
|
354
358
|
onClick: onNavigate,
|
|
355
359
|
"aria-current": it.active ? "page" : void 0,
|
|
356
360
|
className: cn(
|
|
357
|
-
"flex h-
|
|
358
|
-
"[&_svg]:size-[1.
|
|
361
|
+
"flex h-9 items-center gap-3 rounded-xl px-3 text-[0.9375rem] transition-colors",
|
|
362
|
+
"[&_svg]:size-[1.0625rem] [&_svg]:shrink-0",
|
|
359
363
|
it.active ? "bg-card text-foreground shadow-sm ring-1 ring-border [&_svg]:text-foreground" : "text-muted-foreground hover:bg-accent hover:text-foreground"
|
|
360
364
|
),
|
|
361
365
|
children: [
|
|
@@ -368,8 +372,56 @@ function SideNav({ groups, onNavigate }) {
|
|
|
368
372
|
))
|
|
369
373
|
] }, g.label ?? gi)) });
|
|
370
374
|
}
|
|
375
|
+
function SectionSwitch({
|
|
376
|
+
sections,
|
|
377
|
+
current,
|
|
378
|
+
onNavigate
|
|
379
|
+
}) {
|
|
380
|
+
const cols = sections.length <= 3 ? sections.length : 2;
|
|
381
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
382
|
+
"nav",
|
|
383
|
+
{
|
|
384
|
+
"aria-label": "Sections",
|
|
385
|
+
className: cn("grid gap-1 bg-muted p-1", cols === sections.length ? "rounded-full" : "rounded-[1.25rem]"),
|
|
386
|
+
style: { gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))` },
|
|
387
|
+
children: sections.map((sec) => {
|
|
388
|
+
const on = sec.id === current.id;
|
|
389
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
390
|
+
Link2__default.default,
|
|
391
|
+
{
|
|
392
|
+
href: sec.href,
|
|
393
|
+
onClick: onNavigate,
|
|
394
|
+
"aria-current": on ? "true" : void 0,
|
|
395
|
+
className: cn(
|
|
396
|
+
"flex h-8 min-w-0 items-center justify-center rounded-full px-1.5 text-[0.8125rem] font-medium transition-colors",
|
|
397
|
+
on ? "bg-card text-foreground shadow-sm" : "text-muted-foreground hover:text-foreground"
|
|
398
|
+
),
|
|
399
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate", children: sec.label })
|
|
400
|
+
},
|
|
401
|
+
sec.id
|
|
402
|
+
);
|
|
403
|
+
})
|
|
404
|
+
}
|
|
405
|
+
);
|
|
406
|
+
}
|
|
407
|
+
var activeItem = (groups) => groups.flatMap((g) => g.items).find((it) => it.active);
|
|
408
|
+
var warned = /* @__PURE__ */ new Set();
|
|
409
|
+
function warnDuplicateLabels(groups) {
|
|
410
|
+
if (typeof process === "undefined" || process.env.NODE_ENV === "production") return;
|
|
411
|
+
const seen = /* @__PURE__ */ new Set();
|
|
412
|
+
for (const it of groups.flatMap((g) => g.items)) {
|
|
413
|
+
if (seen.has(it.label) && !warned.has(it.label)) {
|
|
414
|
+
warned.add(it.label);
|
|
415
|
+
console.warn(`AppShell: two pages are labelled "${it.label}"; give each its own name.`);
|
|
416
|
+
}
|
|
417
|
+
seen.add(it.label);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
371
420
|
function AppShell({
|
|
372
421
|
nav,
|
|
422
|
+
sections,
|
|
423
|
+
activeSection,
|
|
424
|
+
persistent = [],
|
|
373
425
|
home = "/",
|
|
374
426
|
account,
|
|
375
427
|
banner,
|
|
@@ -378,38 +430,59 @@ function AppShell({
|
|
|
378
430
|
className
|
|
379
431
|
}) {
|
|
380
432
|
const [open, setOpen] = react.useState(false);
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
395
|
-
|
|
433
|
+
const current = sections && sections.length > 0 ? sections.find((sec) => sec.id === activeSection) ?? sections.find((sec) => activeItem(sec.groups)) ?? sections[0] : void 0;
|
|
434
|
+
const groups = current ? [...current.groups, ...persistent] : [...nav ?? [], ...persistent];
|
|
435
|
+
warnDuplicateLabels(groups);
|
|
436
|
+
const page = activeItem(groups);
|
|
437
|
+
const place = react.useMemo(
|
|
438
|
+
() => ({ section: current ? current.title ?? current.label : void 0, page: page?.label }),
|
|
439
|
+
[current, page?.label]
|
|
440
|
+
);
|
|
441
|
+
const switcher = sections && current && sections.length > 1 ? /* @__PURE__ */ jsxRuntime.jsx(SectionSwitch, { sections, current, onNavigate: () => setOpen(false) }) : null;
|
|
442
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ShellContext.Provider, { value: place, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("min-h-dvh bg-background", className), children: [
|
|
443
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "sticky top-0 z-40 border-b border-border bg-background/90 backdrop-blur-md lg:hidden", children: [
|
|
444
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-14 items-center gap-2 px-3", children: [
|
|
445
|
+
/* @__PURE__ */ jsxRuntime.jsxs(Sheet, { open, onOpenChange: setOpen, children: [
|
|
446
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
447
|
+
SheetTrigger,
|
|
448
|
+
{
|
|
449
|
+
className: "inline-flex size-10 items-center justify-center rounded-full hover:bg-accent",
|
|
450
|
+
"aria-label": "Open navigation",
|
|
451
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Menu, { className: "size-5" })
|
|
452
|
+
}
|
|
453
|
+
),
|
|
454
|
+
/* @__PURE__ */ jsxRuntime.jsxs(SheetContent, { side: "left", className: "flex flex-col gap-6 overflow-y-auto p-4 pt-16", children: [
|
|
455
|
+
/* @__PURE__ */ jsxRuntime.jsx(SheetTitle, { className: "sr-only", children: "Navigation" }),
|
|
456
|
+
switcher,
|
|
457
|
+
/* @__PURE__ */ jsxRuntime.jsx(SideNav, { groups, onNavigate: () => setOpen(false) }),
|
|
458
|
+
footer ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto flex flex-col gap-3", children: footer }) : null
|
|
459
|
+
] })
|
|
460
|
+
] }),
|
|
461
|
+
/* @__PURE__ */ jsxRuntime.jsx(Link2__default.default, { href: home, "aria-label": "Home", className: "rounded-lg p-1", children: /* @__PURE__ */ jsxRuntime.jsx(Lockup, { size: 22 }) }),
|
|
462
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "ml-auto flex items-center", children: account })
|
|
396
463
|
] }),
|
|
397
|
-
/* @__PURE__ */ jsxRuntime.
|
|
398
|
-
|
|
464
|
+
place.page ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-9 items-center gap-1.5 border-t border-border px-4 text-[0.875rem]", children: [
|
|
465
|
+
place.section ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
466
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "shrink-0 text-muted-foreground", children: place.section }),
|
|
467
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { "aria-hidden": true, className: "size-3.5 shrink-0 text-muted-foreground" })
|
|
468
|
+
] }) : null,
|
|
469
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "truncate font-medium", children: place.page })
|
|
470
|
+
] }) : null
|
|
399
471
|
] }),
|
|
400
472
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mx-auto flex w-full max-w-[90rem]", children: [
|
|
401
|
-
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "sticky top-0 hidden h-dvh w-
|
|
473
|
+
/* @__PURE__ */ jsxRuntime.jsxs("aside", { className: "sticky top-0 hidden h-dvh w-[17rem] shrink-0 flex-col gap-6 overflow-y-auto px-4 py-6 lg:flex", children: [
|
|
402
474
|
/* @__PURE__ */ jsxRuntime.jsx(Link2__default.default, { href: home, className: "px-2", "aria-label": "Home", children: /* @__PURE__ */ jsxRuntime.jsx(Lockup, { size: 26 }) }),
|
|
403
|
-
|
|
475
|
+
switcher,
|
|
476
|
+
/* @__PURE__ */ jsxRuntime.jsx(SideNav, { groups }),
|
|
404
477
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-auto flex flex-col gap-3", children: footer })
|
|
405
478
|
] }),
|
|
406
479
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
407
480
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "hidden h-[4.5rem] items-center justify-end gap-3 px-8 lg:flex", children: account }),
|
|
408
481
|
banner ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pb-2 pt-4 md:px-8 lg:pt-0", children: banner }) : null,
|
|
409
|
-
/* @__PURE__ */ jsxRuntime.jsx("main", { id: "main-content", className: "flex-1 px-4 pb-16 pt-6 md:px-8 lg:pt-2", children })
|
|
482
|
+
/* @__PURE__ */ jsxRuntime.jsx("main", { id: "main-content", className: "flex-1 px-4 pb-16 pt-6 md:px-8 lg:pt-2", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mx-auto w-full max-w-[72rem]", children }) })
|
|
410
483
|
] })
|
|
411
484
|
] })
|
|
412
|
-
] });
|
|
485
|
+
] }) });
|
|
413
486
|
}
|
|
414
487
|
function AccountMenu({
|
|
415
488
|
name,
|
|
@@ -421,11 +494,11 @@ function AccountMenu({
|
|
|
421
494
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
422
495
|
DropdownMenuTrigger,
|
|
423
496
|
{
|
|
424
|
-
className: "inline-flex h-10 items-center gap-2.5 rounded-full border border-border bg-card pl-1 pr-
|
|
497
|
+
className: "inline-flex h-10 items-center gap-2.5 rounded-full border border-border bg-card pl-1 pr-1 text-[0.9375rem] outline-none transition-colors hover:border-oca-hairline-strong focus-visible:ring-2 focus-visible:ring-ring sm:pr-3.5",
|
|
425
498
|
"aria-label": `Account: ${name}`,
|
|
426
499
|
children: [
|
|
427
500
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-8 items-center justify-center rounded-full bg-foreground text-[0.8125rem] font-medium text-background", children: initial }),
|
|
428
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "max-w-[10rem] truncate", children: name })
|
|
501
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "max-w-[10rem] truncate max-sm:hidden", children: name })
|
|
429
502
|
]
|
|
430
503
|
}
|
|
431
504
|
),
|
|
@@ -472,8 +545,10 @@ function ThemeToggle({ className }) {
|
|
|
472
545
|
|
|
473
546
|
exports.AccountMenu = AccountMenu;
|
|
474
547
|
exports.AppShell = AppShell;
|
|
548
|
+
exports.ShellContext = ShellContext;
|
|
475
549
|
exports.SiteFooter = SiteFooter;
|
|
476
550
|
exports.SiteHeader = SiteHeader;
|
|
477
551
|
exports.ThemeToggle = ThemeToggle;
|
|
552
|
+
exports.useShellPlace = useShellPlace;
|
|
478
553
|
//# sourceMappingURL=chrome.js.map
|
|
479
554
|
//# sourceMappingURL=chrome.js.map
|
package/dist/chrome.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/lib/cn.ts","../src/brand/mark.tsx","../src/primitives/overlay.tsx","../src/chrome/site.tsx","../src/chrome/app-shell.tsx"],"names":["extendTailwindMerge","clsx","jsxs","jsx","forwardRef","DialogContent","DialogPrimitive","X","DialogTitle","DialogDescription","SheetContent","PopoverContent","PopoverPrimitive","TooltipContent","TooltipPrimitive","DropdownMenuPrimitive","DropdownMenuContent","DropdownMenuItem","DropdownMenuLabel","DropdownMenuSeparator","Link","useState","Menu","useTheme","useEffect","Sun","Moon","SunMoon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAM,QAAQA,iCAAA,CAAgC;AAAA,EAC1C,MAAA,EAAQ;AAAA,IACJ,WAAA,EAAa;AAAA,MACT,UAAA,EAAY;AAAA,QACR,eAAA;AAAA,QACA,eAAA;AAAA,QACA,eAAA;AAAA,QACA,WAAA;AAAA,QACA,cAAA;AAAA,QACA,aAAA;AAAA,QACA,UAAA;AAAA,QACA,UAAA;AAAA,QACA;AAAA;AACJ;AACJ;AAER,CAAC,CAAA;AAEM,SAAS,MAAM,MAAA,EAA8B;AAChD,EAAA,OAAO,KAAA,CAAMC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACfA,IAAM,GAAA,GAAM,2BAAA;AACZ,IAAM,IAAA,GAAO,iBAAA;AACb,IAAM,KAAA,GAAQ,mBAAA;AAEP,IAAM,aAAa,EAAE,GAAA,EAAK,WAAW,IAAA,EAAM,SAAA,EAAW,OAAO,SAAA,EAAU;AAkCvE,SAAS,OAAA,CAAQ,EAAE,KAAA,EAAO,IAAA,GAAO,IAAI,SAAA,EAAW,GAAG,MAAK,EAAiB;AAC5E,EAAA,uBACIC,eAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACG,OAAA,EAAQ,WAAA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AA,GAAS,OAAA,KAAY,SAAS,QAAA,GAAW,OAAA;AAC5E,EAAA,MAAM,OAAO,OAAA,KAAY,OAAA,GAAUC,eAAA,GAAM,OAAA,KAAY,SAASC,gBAAA,GAAOC,mBAAA;AACrE,EAAA,uBACIxB,cAAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACG,IAAA,EAAK,QAAA;AAAA,MACL,OAAA,EAAS,MAAM,QAAA,CAAS,IAAI,CAAA;AAAA,MAC5B,YAAA,EAAY,CAAA,OAAA,EAAU,OAAO,CAAA,YAAA,EAAe,IAAI,CAAA,CAAA;AAAA,MAChD,KAAA,EAAO,UAAU,OAAO,CAAA,CAAA;AAAA,MACxB,SAAA,EAAW,EAAA;AAAA,QACP,4IAAA;AAAA,QACA;AAAA,OACJ;AAAA,MAEA,QAAA,kBAAAA,cAAAA,CAAC,IAAA,EAAA,EAAK,SAAA,EAAU,iBAAA,EAAkB;AAAA;AAAA,GACtC;AAER","file":"chrome.js","sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\n// tailwind-merge would treat `oca-display-1` and `text-foreground` as the same\n// group and drop one; teach it the package's own type utilities.\nconst merge = extendTailwindMerge<'oca-type'>({\n extend: {\n classGroups: {\n 'oca-type': [\n 'oca-display-1',\n 'oca-display-2',\n 'oca-display-3',\n 'oca-title',\n 'oca-title-sm',\n 'oca-eyebrow',\n 'oca-lead',\n 'oca-body',\n 'oca-numeral',\n ],\n },\n },\n});\n\nexport function cn(...inputs: ClassValue[]): string {\n return merge(clsx(inputs));\n}\n","import type { SVGProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/*\n * The isometric check, measured from Sou's deck (slide 9) onto a 16×8 grid:\n * a chevron with a 3-unit short arm and a 5-unit long arm, one unit thick,\n * extruded two units. Three faces, three oranges.\n */\n\nconst TOP = '0,3 2,2 6,4 14,0 16,1 6,6';\nconst LEFT = '0,3 6,6 6,8 0,5';\nconst RIGHT = '6,6 16,1 16,3 6,8';\n\nexport const MARK_FACES = { top: '#FED8AB', left: '#FB933C', right: '#EA580B' } as const;\n\nexport interface MarkProps extends Omit<SVGProps<SVGSVGElement>, 'children'> {\n /** Accessible name. Omit to render the mark as decoration. */\n title?: string;\n /** Rendered width in px; height follows the 2:1 grid. */\n size?: number;\n}\n\nexport function Mark({ title, size, className, ...rest }: MarkProps) {\n return (\n <svg\n viewBox=\"0 0 16 8\"\n width={size}\n height={size ? size / 2 : undefined}\n role={title ? 'img' : undefined}\n aria-hidden={title ? undefined : true}\n className={cn('shrink-0', className)}\n {...rest}\n >\n {title ? <title>{title}</title> : null}\n <polygon points={LEFT} fill={MARK_FACES.left} />\n <polygon points={RIGHT} fill={MARK_FACES.right} />\n <polygon points={TOP} fill={MARK_FACES.top} />\n </svg>\n );\n}\n\nexport interface AppIconProps extends Omit<SVGProps<SVGSVGElement>, 'children'> {\n title?: string;\n size?: number;\n}\n\n/** The app icon: the mark on an ink squircle, as in the deck's lockup. */\nexport function AppIcon({ title, size = 32, className, ...rest }: AppIconProps) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width={size}\n height={size}\n role={title ? 'img' : undefined}\n aria-hidden={title ? undefined : true}\n className={cn('shrink-0', className)}\n {...rest}\n >\n {title ? <title>{title}</title> : null}\n <rect\n width=\"24\"\n height=\"24\"\n rx=\"6.25\"\n style={{ fill: 'var(--oca-icon-tile, #0A0A0A)', stroke: 'var(--oca-icon-ring, transparent)' }}\n strokeWidth=\"0.5\"\n />\n <g transform=\"translate(4.25 8.1) scale(0.97)\">\n <polygon points={LEFT} fill={MARK_FACES.left} />\n <polygon points={RIGHT} fill={MARK_FACES.right} />\n <polygon points={TOP} fill={MARK_FACES.top} />\n </g>\n </svg>\n );\n}\n\nexport interface LockupProps {\n /** The word beside the icon. */\n name?: string;\n /** Icon size in px; the word scales with it. */\n size?: number;\n className?: string;\n}\n\n/** Icon and wordmark, lowercase, as the deck sets it. */\nexport function Lockup({ name = 'orangecheck', size = 28, className }: LockupProps) {\n return (\n <span\n className={cn('inline-flex items-center font-medium tracking-[-0.01em]', className)}\n style={{ gap: size * 0.32, fontSize: size * 0.56 }}\n >\n <AppIcon size={size} />\n <span>{name}</span>\n </span>\n );\n}\n","import * as DialogPrimitive from '@radix-ui/react-dialog';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { X } from 'lucide-react';\nimport { forwardRef, type ComponentPropsWithoutRef, type ElementRef, type HTMLAttributes } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/* ── Dialog ───────────────────────────────────────────────────────────── */\n\nexport const Dialog = DialogPrimitive.Root;\nexport const DialogTrigger = DialogPrimitive.Trigger;\nexport const DialogClose = DialogPrimitive.Close;\n\nconst overlayClass =\n 'oca-animate-fade fixed inset-0 z-50 bg-[rgb(10_10_10/0.38)] backdrop-blur-[2px] data-[state=closed]:opacity-0';\n\nexport const DialogContent = forwardRef<\n ElementRef<typeof DialogPrimitive.Content>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & { hideClose?: boolean }\n>(function DialogContent({ className, children, hideClose, ...props }, ref) {\n return (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay className={overlayClass} />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'oca-animate-rise fixed left-1/2 top-1/2 z-50 w-[min(92vw,34rem)] -translate-x-1/2 -translate-y-1/2',\n 'max-h-[88vh] overflow-y-auto rounded-[1.5rem] border border-border bg-popover p-6 text-popover-foreground shadow-xl md:p-8',\n 'outline-none',\n className\n )}\n {...props}\n >\n {children}\n {hideClose ? null : (\n <DialogPrimitive.Close\n className=\"absolute right-4 top-4 inline-flex size-9 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground\"\n aria-label=\"Close\"\n >\n <X className=\"size-4\" />\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n );\n});\n\nexport function DialogHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n return <div className={cn('mb-5 flex flex-col gap-2 pr-8', className)} {...props} />;\n}\n\nexport function DialogFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n return <div className={cn('mt-7 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end', className)} {...props} />;\n}\n\nexport const DialogTitle = forwardRef<\n ElementRef<typeof DialogPrimitive.Title>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(function DialogTitle({ className, ...props }, ref) {\n return (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-[1.5rem] font-normal leading-tight tracking-[-0.02em]', className)}\n {...props}\n />\n );\n});\n\nexport const DialogDescription = forwardRef<\n ElementRef<typeof DialogPrimitive.Description>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(function DialogDescription({ className, ...props }, ref) {\n return <DialogPrimitive.Description ref={ref} className={cn('oca-body', className)} {...props} />;\n});\n\n/* ── Sheet: a dialog from an edge ────────────────────────────────────── */\n\nexport const Sheet = DialogPrimitive.Root;\nexport const SheetTrigger = DialogPrimitive.Trigger;\nexport const SheetClose = DialogPrimitive.Close;\nexport const SheetTitle = DialogTitle;\nexport const SheetDescription = DialogDescription;\n\nconst sheetSide = {\n right: 'inset-y-0 right-0 h-full w-[min(88vw,24rem)] border-l',\n left: 'inset-y-0 left-0 h-full w-[min(88vw,24rem)] border-r',\n bottom: 'inset-x-0 bottom-0 max-h-[88vh] rounded-t-[1.5rem] border-t',\n} as const;\n\nexport const SheetContent = forwardRef<\n ElementRef<typeof DialogPrimitive.Content>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & { side?: keyof typeof sheetSide }\n>(function SheetContent({ className, children, side = 'right', ...props }, ref) {\n return (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay className={overlayClass} />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'oca-animate-fade fixed z-50 flex flex-col gap-4 overflow-y-auto border-border bg-popover p-6 text-popover-foreground shadow-xl outline-none',\n sheetSide[side],\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close\n className=\"absolute right-4 top-4 inline-flex size-9 items-center justify-center rounded-full text-muted-foreground hover:bg-accent hover:text-foreground\"\n aria-label=\"Close\"\n >\n <X className=\"size-4\" />\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n );\n});\n\n/* ── Popover ──────────────────────────────────────────────────────────── */\n\nexport const Popover = PopoverPrimitive.Root;\nexport const PopoverTrigger = PopoverPrimitive.Trigger;\nexport const PopoverAnchor = PopoverPrimitive.Anchor;\n\nexport const PopoverContent = forwardRef<\n ElementRef<typeof PopoverPrimitive.Content>,\n ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(function PopoverContent({ className, align = 'center', sideOffset = 8, ...props }, ref) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'oca-animate-fade z-50 w-72 rounded-2xl border border-border bg-popover p-4 text-popover-foreground shadow-lg outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n});\n\n/* ── Tooltip: ink, small, quick ───────────────────────────────────────── */\n\nexport const TooltipProvider = TooltipPrimitive.Provider;\nexport const Tooltip = TooltipPrimitive.Root;\nexport const TooltipTrigger = TooltipPrimitive.Trigger;\n\nexport const TooltipContent = forwardRef<\n ElementRef<typeof TooltipPrimitive.Content>,\n ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(function TooltipContent({ className, sideOffset = 6, ...props }, ref) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'oca-animate-fade z-50 max-w-xs rounded-lg bg-oca-ink px-2.5 py-1.5 text-[0.8125rem] leading-snug text-oca-ink-foreground',\n className\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n );\n});\n\n/* ── Menu ─────────────────────────────────────────────────────────────── */\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nexport const DropdownMenuContent = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Content>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(function DropdownMenuContent({ className, sideOffset = 8, ...props }, ref) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'oca-animate-fade z-50 min-w-56 overflow-hidden rounded-2xl border border-border bg-popover p-1.5 text-popover-foreground shadow-lg',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n});\n\nexport const DropdownMenuItem = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Item>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & { destructive?: boolean }\n>(function DropdownMenuItem({ className, destructive, ...props }, ref) {\n return (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'flex h-10 cursor-default select-none items-center gap-2.5 rounded-xl px-3 text-[0.9375rem] outline-none',\n 'data-[highlighted]:bg-accent data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:text-muted-foreground',\n destructive && 'text-destructive [&_svg]:text-destructive',\n className\n )}\n {...props}\n />\n );\n});\n\nexport const DropdownMenuLabel = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Label>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label>\n>(function DropdownMenuLabel({ className, ...props }, ref) {\n return (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-3 pb-1.5 pt-2 text-[0.8125rem] text-muted-foreground', className)}\n {...props}\n />\n );\n});\n\nexport const DropdownMenuSeparator = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Separator>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(function DropdownMenuSeparator({ className, ...props }, ref) {\n return <DropdownMenuPrimitive.Separator ref={ref} className={cn('my-1.5 h-px bg-border', className)} {...props} />;\n});\n","import { Menu } from 'lucide-react';\nimport Link from 'next/link';\nimport { useState, type ReactNode } from 'react';\n\nimport { Lockup } from '../brand/mark';\nimport { cn } from '../lib/cn';\nimport { Sheet, SheetContent, SheetTitle, SheetTrigger } from '../primitives/overlay';\n\nexport interface NavItem {\n href: string;\n label: ReactNode;\n /** Marks the current section for styling and aria-current. */\n active?: boolean;\n external?: boolean;\n}\n\nfunction NavLink({ item, className, onNavigate }: { item: NavItem; className?: string; onNavigate?: () => void }) {\n const cls = cn(\n 'rounded-full px-3 py-2 text-[0.9375rem] transition-colors',\n item.active ? 'text-foreground' : 'text-muted-foreground hover:text-foreground',\n className\n );\n if (item.external) {\n return (\n <a href={item.href} className={cls} rel=\"noreferrer\" onClick={onNavigate}>\n {item.label}\n </a>\n );\n }\n return (\n <Link href={item.href} className={cls} aria-current={item.active ? 'page' : undefined} onClick={onNavigate}>\n {item.label}\n </Link>\n );\n}\n\n/**\n * The public header: lockup, a few words of navigation, actions on the right.\n * Below md the navigation moves into a sheet; the actions stay.\n */\nexport function SiteHeader({\n home = '/',\n brand,\n nav = [],\n actions,\n className,\n}: {\n home?: string;\n brand?: ReactNode;\n nav?: NavItem[];\n actions?: ReactNode;\n className?: string;\n}) {\n const [open, setOpen] = useState(false);\n return (\n <header\n className={cn(\n 'sticky top-0 z-40 w-full border-b border-transparent bg-background/85 backdrop-blur-md supports-[backdrop-filter]:bg-background/70',\n className\n )}\n >\n <div className=\"oca-container flex h-16 items-center justify-between gap-4 md:h-[4.5rem]\">\n <Link href={home} className=\"-ml-1 rounded-lg p-1\" aria-label=\"Home\">\n {brand ?? <Lockup size={28} />}\n </Link>\n {nav.length > 0 ? (\n <nav aria-label=\"Main\" className=\"hidden items-center gap-1 md:flex\">\n {nav.map((n) => (\n <NavLink key={n.href} item={n} />\n ))}\n </nav>\n ) : null}\n <div className=\"flex items-center gap-2\">\n {actions}\n {nav.length > 0 ? (\n <Sheet open={open} onOpenChange={setOpen}>\n <SheetTrigger\n className=\"inline-flex size-10 items-center justify-center rounded-full text-foreground hover:bg-accent md:hidden\"\n aria-label=\"Open menu\"\n >\n <Menu className=\"size-5\" />\n </SheetTrigger>\n <SheetContent side=\"right\" className=\"pt-16\">\n <SheetTitle className=\"sr-only\">Menu</SheetTitle>\n <nav aria-label=\"Main\" className=\"flex flex-col\">\n {nav.map((n) => (\n <NavLink\n key={n.href}\n item={n}\n className=\"rounded-xl px-3 py-3 text-[1.0625rem]\"\n onNavigate={() => setOpen(false)}\n />\n ))}\n </nav>\n </SheetContent>\n </Sheet>\n ) : null}\n </div>\n </div>\n </header>\n );\n}\n\nexport interface FooterColumn {\n heading: string;\n links: NavItem[];\n}\n\n/**\n * The footer, in the deck's register: a line of fine print, the support credit,\n * and a few columns of links. Links are 44px tall on phones.\n */\nexport function SiteFooter({\n columns = [],\n fineprint,\n meta,\n className,\n}: {\n columns?: FooterColumn[];\n fineprint?: ReactNode;\n meta?: ReactNode;\n className?: string;\n}) {\n return (\n <footer className={cn('border-t border-border bg-background', className)}>\n <div className=\"oca-container grid gap-10 py-14 md:grid-cols-[1.3fr_repeat(3,1fr)] md:py-16\">\n <div className=\"flex flex-col gap-4\">\n <Lockup size={26} />\n {fineprint ? <p className=\"max-w-xs text-[0.9375rem] leading-relaxed text-muted-foreground\">{fineprint}</p> : null}\n </div>\n {columns.map((col) => (\n <div key={col.heading} className=\"flex flex-col gap-1\">\n <p className=\"mb-2 text-[0.875rem] font-medium\">{col.heading}</p>\n {col.links.map((l) => (\n <NavLink\n key={l.href}\n item={l}\n className=\"-mx-3 py-2.5 text-[0.9375rem] md:py-1.5\"\n />\n ))}\n </div>\n ))}\n </div>\n {meta ? (\n <div className=\"oca-container border-t border-border py-6 text-[0.875rem] text-muted-foreground\">{meta}</div>\n ) : null}\n </footer>\n );\n}\n","import { Menu, Moon, Sun, SunMoon } from 'lucide-react';\nimport Link from 'next/link';\nimport { useTheme } from 'next-themes';\nimport { useEffect, useState, type ReactNode } from 'react';\n\nimport { AppIcon, Lockup } from '../brand/mark';\nimport { cn } from '../lib/cn';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n Sheet,\n SheetContent,\n SheetTitle,\n SheetTrigger,\n} from '../primitives/overlay';\n\nexport interface ShellNavItem {\n href: string;\n label: string;\n icon?: ReactNode;\n active?: boolean;\n /** A count or a dot beside the label (unread, needs attention). */\n badge?: ReactNode;\n}\n\nexport interface ShellNavGroup {\n /** Omit for the first, unlabeled group. */\n label?: string;\n items: ShellNavItem[];\n}\n\nfunction SideNav({ groups, onNavigate }: { groups: ShellNavGroup[]; onNavigate?: () => void }) {\n return (\n <nav aria-label=\"Sections\" className=\"flex flex-col gap-6\">\n {groups.map((g, gi) => (\n <div key={g.label ?? gi} className=\"flex flex-col gap-0.5\">\n {g.label ? <p className=\"px-3 pb-1.5 text-[0.8125rem] text-muted-foreground\">{g.label}</p> : null}\n {g.items.map((it) => (\n <Link\n key={it.href}\n href={it.href}\n onClick={onNavigate}\n aria-current={it.active ? 'page' : undefined}\n className={cn(\n 'flex h-10 items-center gap-3 rounded-xl px-3 text-[0.9375rem] transition-colors',\n '[&_svg]:size-[1.125rem] [&_svg]:shrink-0',\n it.active\n ? 'bg-card text-foreground shadow-sm ring-1 ring-border [&_svg]:text-foreground'\n : 'text-muted-foreground hover:bg-accent hover:text-foreground'\n )}\n >\n {it.icon}\n <span className=\"min-w-0 flex-1 truncate\">{it.label}</span>\n {it.badge ? <span className=\"shrink-0\">{it.badge}</span> : null}\n </Link>\n ))}\n </div>\n ))}\n </nav>\n );\n}\n\n/**\n * The signed-in frame: a quiet sidebar on the canvas, content on the right. On\n * phones the sidebar becomes a sheet behind a top bar. The account control and\n * any banner are slots, so the shell knows nothing about sessions.\n */\nexport function AppShell({\n nav,\n home = '/',\n account,\n banner,\n footer,\n children,\n className,\n}: {\n nav: ShellNavGroup[];\n home?: string;\n account?: ReactNode;\n banner?: ReactNode;\n footer?: ReactNode;\n children: ReactNode;\n className?: string;\n}) {\n const [open, setOpen] = useState(false);\n return (\n <div className={cn('min-h-dvh bg-background', className)}>\n <div className=\"sticky top-0 z-40 flex h-14 items-center justify-between border-b border-border bg-background/85 px-4 backdrop-blur-md lg:hidden\">\n <Sheet open={open} onOpenChange={setOpen}>\n <SheetTrigger\n className=\"inline-flex size-10 items-center justify-center rounded-full hover:bg-accent\"\n aria-label=\"Open navigation\"\n >\n <Menu className=\"size-5\" />\n </SheetTrigger>\n <SheetContent side=\"left\" className=\"p-4 pt-16\">\n <SheetTitle className=\"sr-only\">Navigation</SheetTitle>\n <SideNav groups={nav} onNavigate={() => setOpen(false)} />\n </SheetContent>\n </Sheet>\n <Link href={home} aria-label=\"Home\">\n <AppIcon size={28} />\n </Link>\n <div className=\"flex items-center\">{account}</div>\n </div>\n <div className=\"mx-auto flex w-full max-w-[90rem]\">\n <aside className=\"sticky top-0 hidden h-dvh w-64 shrink-0 flex-col gap-8 overflow-y-auto px-4 py-6 lg:flex\">\n <Link href={home} className=\"px-2\" aria-label=\"Home\">\n <Lockup size={26} />\n </Link>\n <SideNav groups={nav} />\n <div className=\"mt-auto flex flex-col gap-3\">{footer}</div>\n </aside>\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <div className=\"hidden h-[4.5rem] items-center justify-end gap-3 px-8 lg:flex\">{account}</div>\n {banner ? <div className=\"px-4 pb-2 pt-4 md:px-8 lg:pt-0\">{banner}</div> : null}\n <main id=\"main-content\" className=\"flex-1 px-4 pb-16 pt-6 md:px-8 lg:pt-2\">\n {children}\n </main>\n </div>\n </div>\n </div>\n );\n}\n\nexport interface AccountMenuItem {\n label: string;\n href?: string;\n onSelect?: () => void;\n icon?: ReactNode;\n destructive?: boolean;\n}\n\n/** The account button: initial + short id, a menu of items. */\nexport function AccountMenu({\n name,\n detail,\n items,\n}: {\n name: string;\n /** A second line: the short did, an address. */\n detail?: string;\n items: (AccountMenuItem | 'separator')[];\n}) {\n const initial = name.trim().charAt(0).toUpperCase() || '·';\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n className=\"inline-flex h-10 items-center gap-2.5 rounded-full border border-border bg-card pl-1 pr-3.5 text-[0.9375rem] outline-none transition-colors hover:border-oca-hairline-strong focus-visible:ring-2 focus-visible:ring-ring\"\n aria-label={`Account: ${name}`}\n >\n <span className=\"flex size-8 items-center justify-center rounded-full bg-foreground text-[0.8125rem] font-medium text-background\">\n {initial}\n </span>\n <span className=\"max-w-[10rem] truncate\">{name}</span>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-64\">\n <DropdownMenuLabel className=\"flex flex-col gap-0.5\">\n <span className=\"truncate text-[0.9375rem] font-medium text-foreground\">{name}</span>\n {detail ? <span className=\"truncate font-mono text-[0.75rem]\">{detail}</span> : null}\n </DropdownMenuLabel>\n <DropdownMenuSeparator />\n {items.map((it, i) =>\n it === 'separator' ? (\n <DropdownMenuSeparator key={`sep-${i}`} />\n ) : it.href ? (\n <DropdownMenuItem key={it.label} asChild destructive={it.destructive}>\n <Link href={it.href}>\n {it.icon}\n {it.label}\n </Link>\n </DropdownMenuItem>\n ) : (\n <DropdownMenuItem key={it.label} onSelect={it.onSelect} destructive={it.destructive}>\n {it.icon}\n {it.label}\n </DropdownMenuItem>\n )\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/** Light, dark, or follow the system: one button that cycles. */\nexport function ThemeToggle({ className }: { className?: string }) {\n const { theme, setTheme } = useTheme();\n const [mounted, setMounted] = useState(false);\n useEffect(() => setMounted(true), []);\n const current = mounted ? (theme ?? 'system') : 'system';\n const next = current === 'light' ? 'dark' : current === 'dark' ? 'system' : 'light';\n const Icon = current === 'light' ? Sun : current === 'dark' ? Moon : SunMoon;\n return (\n <button\n type=\"button\"\n onClick={() => setTheme(next)}\n aria-label={`Theme: ${current}. Switch to ${next}`}\n title={`Theme: ${current}`}\n className={cn(\n 'inline-flex size-10 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground',\n className\n )}\n >\n <Icon className=\"size-[1.125rem]\" />\n </button>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/lib/cn.ts","../src/brand/mark.tsx","../src/primitives/overlay.tsx","../src/chrome/site.tsx","../src/lib/shell-context.ts","../src/chrome/app-shell.tsx"],"names":["extendTailwindMerge","clsx","jsxs","jsx","forwardRef","DialogContent","DialogPrimitive","X","DialogTitle","DialogDescription","SheetContent","PopoverContent","PopoverPrimitive","TooltipContent","TooltipPrimitive","DropdownMenuPrimitive","DropdownMenuContent","DropdownMenuItem","DropdownMenuLabel","DropdownMenuSeparator","Link","useState","Menu","createContext","useContext","useMemo","Fragment","ChevronRight","useTheme","useEffect","Sun","Moon","SunMoon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,IAAM,QAAQA,iCAAA,CAAgC;AAAA,EAC1C,MAAA,EAAQ;AAAA,IACJ,WAAA,EAAa;AAAA,MACT,UAAA,EAAY;AAAA,QACR,eAAA;AAAA,QACA,eAAA;AAAA,QACA,eAAA;AAAA,QACA,WAAA;AAAA,QACA,cAAA;AAAA,QACA,aAAA;AAAA,QACA,UAAA;AAAA,QACA,UAAA;AAAA,QACA;AAAA;AACJ;AACJ;AAER,CAAC,CAAA;AAEM,SAAS,MAAM,MAAA,EAA8B;AAChD,EAAA,OAAO,KAAA,CAAMC,SAAA,CAAK,MAAM,CAAC,CAAA;AAC7B;ACfA,IAAM,GAAA,GAAM,2BAAA;AACZ,IAAM,IAAA,GAAO,iBAAA;AACb,IAAM,KAAA,GAAQ,mBAAA;AAEP,IAAM,aAAa,EAAE,GAAA,EAAK,WAAW,IAAA,EAAM,SAA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;AAAA,SAAA,EAAA,EAFe,GAAG,KAG1B;AAAA;AAER,KAAA,EACJ;AAAA,GAAA,EACJ,CAAA;AAER;AAGO,SAAS,WAAA,CAAY,EAAE,SAAA,EAAU,EAA2B;AAC/D,EAAA,MAAM,EAAE,KAAA,EAAO,QAAA,EAAS,GAAI0B,mBAAA,EAAS;AACrC,EAAA,MAAM,CAAC,OAAA,EAAS,UAAU,CAAA,GAAIP,eAAS,KAAK,CAAA;AAC5C,EAAAQ,eAAA,CAAU,MAAM,UAAA,CAAW,IAAI,CAAA,EAAG,EAAE,CAAA;AACpC,EAAA,MAAM,OAAA,GAAU,OAAA,GAAW,KAAA,IAAS,QAAA,GAAY,QAAA;AAChD,EAAA,MAAM,OAAO,OAAA,KAAY,OAAA,GAAU,MAAA,GAAS,OAAA,KAAY,SAAS,QAAA,GAAW,OAAA;AAC5E,EAAA,MAAM,OAAO,OAAA,KAAY,OAAA,GAAUC,eAAA,GAAM,OAAA,KAAY,SAASC,gBAAA,GAAOC,mBAAA;AACrE,EAAA,uBACI7B,cAAAA;AAAA,IAAC,QAAA;AAAA,IAAA;AAAA,MACG,IAAA,EAAK,QAAA;AAAA,MACL,OAAA,EAAS,MAAM,QAAA,CAAS,IAAI,CAAA;AAAA,MAC5B,YAAA,EAAY,CAAA,OAAA,EAAU,OAAO,CAAA,YAAA,EAAe,IAAI,CAAA,CAAA;AAAA,MAChD,KAAA,EAAO,UAAU,OAAO,CAAA,CAAA;AAAA,MACxB,SAAA,EAAW,EAAA;AAAA,QACP,4IAAA;AAAA,QACA;AAAA,OACJ;AAAA,MAEA,QAAA,kBAAAA,cAAAA,CAAC,IAAA,EAAA,EAAK,SAAA,EAAU,iBAAA,EAAkB;AAAA;AAAA,GACtC;AAER","file":"chrome.js","sourcesContent":["import { clsx, type ClassValue } from 'clsx';\nimport { extendTailwindMerge } from 'tailwind-merge';\n\n// tailwind-merge would treat `oca-display-1` and `text-foreground` as the same\n// group and drop one; teach it the package's own type utilities.\nconst merge = extendTailwindMerge<'oca-type'>({\n extend: {\n classGroups: {\n 'oca-type': [\n 'oca-display-1',\n 'oca-display-2',\n 'oca-display-3',\n 'oca-title',\n 'oca-title-sm',\n 'oca-eyebrow',\n 'oca-lead',\n 'oca-body',\n 'oca-numeral',\n ],\n },\n },\n});\n\nexport function cn(...inputs: ClassValue[]): string {\n return merge(clsx(inputs));\n}\n","import type { SVGProps } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/*\n * The isometric check, measured from Sou's deck (slide 9) onto a 16×8 grid:\n * a chevron with a 3-unit short arm and a 5-unit long arm, one unit thick,\n * extruded two units. Three faces, three oranges.\n */\n\nconst TOP = '0,3 2,2 6,4 14,0 16,1 6,6';\nconst LEFT = '0,3 6,6 6,8 0,5';\nconst RIGHT = '6,6 16,1 16,3 6,8';\n\nexport const MARK_FACES = { top: '#FED8AB', left: '#FB933C', right: '#EA580B' } as const;\n\nexport interface MarkProps extends Omit<SVGProps<SVGSVGElement>, 'children'> {\n /** Accessible name. Omit to render the mark as decoration. */\n title?: string;\n /** Rendered width in px; height follows the 2:1 grid. */\n size?: number;\n}\n\nexport function Mark({ title, size, className, ...rest }: MarkProps) {\n return (\n <svg\n viewBox=\"0 0 16 8\"\n width={size}\n height={size ? size / 2 : undefined}\n role={title ? 'img' : undefined}\n aria-hidden={title ? undefined : true}\n className={cn('shrink-0', className)}\n {...rest}\n >\n {title ? <title>{title}</title> : null}\n <polygon points={LEFT} fill={MARK_FACES.left} />\n <polygon points={RIGHT} fill={MARK_FACES.right} />\n <polygon points={TOP} fill={MARK_FACES.top} />\n </svg>\n );\n}\n\nexport interface AppIconProps extends Omit<SVGProps<SVGSVGElement>, 'children'> {\n title?: string;\n size?: number;\n}\n\n/** The app icon: the mark on an ink squircle, as in the deck's lockup. */\nexport function AppIcon({ title, size = 32, className, ...rest }: AppIconProps) {\n return (\n <svg\n viewBox=\"0 0 24 24\"\n width={size}\n height={size}\n role={title ? 'img' : undefined}\n aria-hidden={title ? undefined : true}\n className={cn('shrink-0', className)}\n {...rest}\n >\n {title ? <title>{title}</title> : null}\n <rect\n width=\"24\"\n height=\"24\"\n rx=\"6.25\"\n style={{ fill: 'var(--oca-icon-tile, #0A0A0A)', stroke: 'var(--oca-icon-ring, transparent)' }}\n strokeWidth=\"0.5\"\n />\n <g transform=\"translate(4.25 8.1) scale(0.97)\">\n <polygon points={LEFT} fill={MARK_FACES.left} />\n <polygon points={RIGHT} fill={MARK_FACES.right} />\n <polygon points={TOP} fill={MARK_FACES.top} />\n </g>\n </svg>\n );\n}\n\nexport interface LockupProps {\n /** The word beside the icon. */\n name?: string;\n /** Icon size in px; the word scales with it. */\n size?: number;\n className?: string;\n}\n\n/** Icon and wordmark, lowercase, as the deck sets it. */\nexport function Lockup({ name = 'orangecheck', size = 28, className }: LockupProps) {\n return (\n <span\n className={cn('inline-flex items-center font-medium tracking-[-0.01em]', className)}\n style={{ gap: size * 0.32, fontSize: size * 0.56 }}\n >\n <AppIcon size={size} />\n <span>{name}</span>\n </span>\n );\n}\n","import * as DialogPrimitive from '@radix-ui/react-dialog';\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport { X } from 'lucide-react';\nimport { forwardRef, type ComponentPropsWithoutRef, type ElementRef, type HTMLAttributes } from 'react';\n\nimport { cn } from '../lib/cn';\n\n/* ── Dialog ───────────────────────────────────────────────────────────── */\n\nexport const Dialog = DialogPrimitive.Root;\nexport const DialogTrigger = DialogPrimitive.Trigger;\nexport const DialogClose = DialogPrimitive.Close;\n\nconst overlayClass =\n 'oca-animate-fade fixed inset-0 z-50 bg-[rgb(10_10_10/0.38)] backdrop-blur-[2px] data-[state=closed]:opacity-0';\n\nexport const DialogContent = forwardRef<\n ElementRef<typeof DialogPrimitive.Content>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & { hideClose?: boolean }\n>(function DialogContent({ className, children, hideClose, ...props }, ref) {\n return (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay className={overlayClass} />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'oca-animate-rise fixed left-1/2 top-1/2 z-50 w-[min(92vw,34rem)] -translate-x-1/2 -translate-y-1/2',\n 'max-h-[88vh] overflow-y-auto rounded-[1.5rem] border border-border bg-popover p-6 text-popover-foreground shadow-xl md:p-8',\n 'outline-none',\n className\n )}\n {...props}\n >\n {children}\n {hideClose ? null : (\n <DialogPrimitive.Close\n className=\"absolute right-4 top-4 inline-flex size-9 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground\"\n aria-label=\"Close\"\n >\n <X className=\"size-4\" />\n </DialogPrimitive.Close>\n )}\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n );\n});\n\nexport function DialogHeader({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n return <div className={cn('mb-5 flex flex-col gap-2 pr-8', className)} {...props} />;\n}\n\nexport function DialogFooter({ className, ...props }: HTMLAttributes<HTMLDivElement>) {\n return <div className={cn('mt-7 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end', className)} {...props} />;\n}\n\nexport const DialogTitle = forwardRef<\n ElementRef<typeof DialogPrimitive.Title>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Title>\n>(function DialogTitle({ className, ...props }, ref) {\n return (\n <DialogPrimitive.Title\n ref={ref}\n className={cn('text-[1.5rem] font-normal leading-tight tracking-[-0.02em]', className)}\n {...props}\n />\n );\n});\n\nexport const DialogDescription = forwardRef<\n ElementRef<typeof DialogPrimitive.Description>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Description>\n>(function DialogDescription({ className, ...props }, ref) {\n return <DialogPrimitive.Description ref={ref} className={cn('oca-body', className)} {...props} />;\n});\n\n/* ── Sheet: a dialog from an edge ────────────────────────────────────── */\n\nexport const Sheet = DialogPrimitive.Root;\nexport const SheetTrigger = DialogPrimitive.Trigger;\nexport const SheetClose = DialogPrimitive.Close;\nexport const SheetTitle = DialogTitle;\nexport const SheetDescription = DialogDescription;\n\nconst sheetSide = {\n right: 'inset-y-0 right-0 h-full w-[min(88vw,24rem)] border-l',\n left: 'inset-y-0 left-0 h-full w-[min(88vw,24rem)] border-r',\n bottom: 'inset-x-0 bottom-0 max-h-[88vh] rounded-t-[1.5rem] border-t',\n} as const;\n\nexport const SheetContent = forwardRef<\n ElementRef<typeof DialogPrimitive.Content>,\n ComponentPropsWithoutRef<typeof DialogPrimitive.Content> & { side?: keyof typeof sheetSide }\n>(function SheetContent({ className, children, side = 'right', ...props }, ref) {\n return (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay className={overlayClass} />\n <DialogPrimitive.Content\n ref={ref}\n className={cn(\n 'oca-animate-fade fixed z-50 flex flex-col gap-4 overflow-y-auto border-border bg-popover p-6 text-popover-foreground shadow-xl outline-none',\n sheetSide[side],\n className\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close\n className=\"absolute right-4 top-4 inline-flex size-9 items-center justify-center rounded-full text-muted-foreground hover:bg-accent hover:text-foreground\"\n aria-label=\"Close\"\n >\n <X className=\"size-4\" />\n </DialogPrimitive.Close>\n </DialogPrimitive.Content>\n </DialogPrimitive.Portal>\n );\n});\n\n/* ── Popover ──────────────────────────────────────────────────────────── */\n\nexport const Popover = PopoverPrimitive.Root;\nexport const PopoverTrigger = PopoverPrimitive.Trigger;\nexport const PopoverAnchor = PopoverPrimitive.Anchor;\n\nexport const PopoverContent = forwardRef<\n ElementRef<typeof PopoverPrimitive.Content>,\n ComponentPropsWithoutRef<typeof PopoverPrimitive.Content>\n>(function PopoverContent({ className, align = 'center', sideOffset = 8, ...props }, ref) {\n return (\n <PopoverPrimitive.Portal>\n <PopoverPrimitive.Content\n ref={ref}\n align={align}\n sideOffset={sideOffset}\n className={cn(\n 'oca-animate-fade z-50 w-72 rounded-2xl border border-border bg-popover p-4 text-popover-foreground shadow-lg outline-none',\n className\n )}\n {...props}\n />\n </PopoverPrimitive.Portal>\n );\n});\n\n/* ── Tooltip: ink, small, quick ───────────────────────────────────────── */\n\nexport const TooltipProvider = TooltipPrimitive.Provider;\nexport const Tooltip = TooltipPrimitive.Root;\nexport const TooltipTrigger = TooltipPrimitive.Trigger;\n\nexport const TooltipContent = forwardRef<\n ElementRef<typeof TooltipPrimitive.Content>,\n ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(function TooltipContent({ className, sideOffset = 6, ...props }, ref) {\n return (\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'oca-animate-fade z-50 max-w-xs rounded-lg bg-oca-ink px-2.5 py-1.5 text-[0.8125rem] leading-snug text-oca-ink-foreground',\n className\n )}\n {...props}\n />\n </TooltipPrimitive.Portal>\n );\n});\n\n/* ── Menu ─────────────────────────────────────────────────────────────── */\n\nexport const DropdownMenu = DropdownMenuPrimitive.Root;\nexport const DropdownMenuTrigger = DropdownMenuPrimitive.Trigger;\nexport const DropdownMenuGroup = DropdownMenuPrimitive.Group;\n\nexport const DropdownMenuContent = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Content>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Content>\n>(function DropdownMenuContent({ className, sideOffset = 8, ...props }, ref) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n ref={ref}\n sideOffset={sideOffset}\n className={cn(\n 'oca-animate-fade z-50 min-w-56 overflow-hidden rounded-2xl border border-border bg-popover p-1.5 text-popover-foreground shadow-lg',\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n});\n\nexport const DropdownMenuItem = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Item>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Item> & { destructive?: boolean }\n>(function DropdownMenuItem({ className, destructive, ...props }, ref) {\n return (\n <DropdownMenuPrimitive.Item\n ref={ref}\n className={cn(\n 'flex h-10 cursor-default select-none items-center gap-2.5 rounded-xl px-3 text-[0.9375rem] outline-none',\n 'data-[highlighted]:bg-accent data-[disabled]:opacity-50 [&_svg]:size-4 [&_svg]:text-muted-foreground',\n destructive && 'text-destructive [&_svg]:text-destructive',\n className\n )}\n {...props}\n />\n );\n});\n\nexport const DropdownMenuLabel = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Label>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Label>\n>(function DropdownMenuLabel({ className, ...props }, ref) {\n return (\n <DropdownMenuPrimitive.Label\n ref={ref}\n className={cn('px-3 pb-1.5 pt-2 text-[0.8125rem] text-muted-foreground', className)}\n {...props}\n />\n );\n});\n\nexport const DropdownMenuSeparator = forwardRef<\n ElementRef<typeof DropdownMenuPrimitive.Separator>,\n ComponentPropsWithoutRef<typeof DropdownMenuPrimitive.Separator>\n>(function DropdownMenuSeparator({ className, ...props }, ref) {\n return <DropdownMenuPrimitive.Separator ref={ref} className={cn('my-1.5 h-px bg-border', className)} {...props} />;\n});\n","import { Menu } from 'lucide-react';\nimport Link from 'next/link';\nimport { useState, type ReactNode } from 'react';\n\nimport { Lockup } from '../brand/mark';\nimport { cn } from '../lib/cn';\nimport { Sheet, SheetContent, SheetTitle, SheetTrigger } from '../primitives/overlay';\n\nexport interface NavItem {\n href: string;\n label: ReactNode;\n /** Marks the current section for styling and aria-current. */\n active?: boolean;\n external?: boolean;\n}\n\nfunction NavLink({ item, className, onNavigate }: { item: NavItem; className?: string; onNavigate?: () => void }) {\n const cls = cn(\n 'rounded-full px-3 py-2 text-[0.9375rem] transition-colors',\n item.active ? 'text-foreground' : 'text-muted-foreground hover:text-foreground',\n className\n );\n if (item.external) {\n return (\n <a href={item.href} className={cls} rel=\"noreferrer\" onClick={onNavigate}>\n {item.label}\n </a>\n );\n }\n return (\n <Link href={item.href} className={cls} aria-current={item.active ? 'page' : undefined} onClick={onNavigate}>\n {item.label}\n </Link>\n );\n}\n\n/**\n * The public header: lockup, a few words of navigation, actions on the right.\n * Below md the navigation moves into a sheet; the actions stay.\n */\nexport function SiteHeader({\n home = '/',\n brand,\n nav = [],\n actions,\n className,\n}: {\n home?: string;\n brand?: ReactNode;\n nav?: NavItem[];\n actions?: ReactNode;\n className?: string;\n}) {\n const [open, setOpen] = useState(false);\n return (\n <header\n className={cn(\n 'sticky top-0 z-40 w-full border-b border-transparent bg-background/85 backdrop-blur-md supports-[backdrop-filter]:bg-background/70',\n className\n )}\n >\n <div className=\"oca-container flex h-16 items-center justify-between gap-4 md:h-[4.5rem]\">\n <Link href={home} className=\"-ml-1 rounded-lg p-1\" aria-label=\"Home\">\n {brand ?? <Lockup size={28} />}\n </Link>\n {nav.length > 0 ? (\n <nav aria-label=\"Main\" className=\"hidden items-center gap-1 md:flex\">\n {nav.map((n) => (\n <NavLink key={n.href} item={n} />\n ))}\n </nav>\n ) : null}\n <div className=\"flex items-center gap-2\">\n {actions}\n {nav.length > 0 ? (\n <Sheet open={open} onOpenChange={setOpen}>\n <SheetTrigger\n className=\"inline-flex size-10 items-center justify-center rounded-full text-foreground hover:bg-accent md:hidden\"\n aria-label=\"Open menu\"\n >\n <Menu className=\"size-5\" />\n </SheetTrigger>\n <SheetContent side=\"right\" className=\"pt-16\">\n <SheetTitle className=\"sr-only\">Menu</SheetTitle>\n <nav aria-label=\"Main\" className=\"flex flex-col\">\n {nav.map((n) => (\n <NavLink\n key={n.href}\n item={n}\n className=\"rounded-xl px-3 py-3 text-[1.0625rem]\"\n onNavigate={() => setOpen(false)}\n />\n ))}\n </nav>\n </SheetContent>\n </Sheet>\n ) : null}\n </div>\n </div>\n </header>\n );\n}\n\nexport interface FooterColumn {\n heading: string;\n links: NavItem[];\n}\n\n/**\n * The footer, in the deck's register: a line of fine print, the support credit,\n * and a few columns of links. Links are 44px tall on phones.\n */\nexport function SiteFooter({\n columns = [],\n fineprint,\n meta,\n className,\n}: {\n columns?: FooterColumn[];\n fineprint?: ReactNode;\n meta?: ReactNode;\n className?: string;\n}) {\n return (\n <footer className={cn('border-t border-border bg-background', className)}>\n <div className=\"oca-container grid grid-cols-2 gap-x-6 gap-y-10 py-14 md:grid-cols-[1.3fr_repeat(3,1fr)] md:py-16\">\n <div className=\"col-span-2 flex flex-col gap-4 md:col-span-1\">\n <Lockup size={26} />\n {fineprint ? <p className=\"max-w-xs text-[0.9375rem] leading-relaxed text-muted-foreground\">{fineprint}</p> : null}\n </div>\n {columns.map((col) => (\n <div key={col.heading} className=\"flex min-w-0 flex-col gap-1\">\n <p className=\"mb-2 text-[0.875rem] font-medium\">{col.heading}</p>\n {col.links.map((l) => (\n <NavLink\n key={l.href}\n item={l}\n className=\"-mx-3 py-2.5 text-[0.9375rem] md:py-1.5\"\n />\n ))}\n </div>\n ))}\n </div>\n {meta ? (\n <div className=\"oca-container border-t border-border py-6 text-[0.875rem] text-muted-foreground\">{meta}</div>\n ) : null}\n </footer>\n );\n}\n","import { createContext, useContext } from 'react';\n\n/** Where the viewer is inside the signed-in shell: its section and page. */\nexport interface ShellPlace {\n section?: string;\n page?: string;\n}\n\nexport const ShellContext = createContext<ShellPlace>({});\n\nexport function useShellPlace(): ShellPlace {\n return useContext(ShellContext);\n}\n","import { ChevronRight, Menu, Moon, Sun, SunMoon } from 'lucide-react';\nimport Link from 'next/link';\nimport { useTheme } from 'next-themes';\nimport { useEffect, useMemo, useState, type ReactNode } from 'react';\n\nimport { Lockup } from '../brand/mark';\nimport { cn } from '../lib/cn';\nimport { ShellContext } from '../lib/shell-context';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n Sheet,\n SheetContent,\n SheetTitle,\n SheetTrigger,\n} from '../primitives/overlay';\n\nexport interface ShellNavItem {\n href: string;\n label: string;\n icon?: ReactNode;\n active?: boolean;\n /** A count or a dot beside the label (unread, needs attention). */\n badge?: ReactNode;\n}\n\nexport interface ShellNavGroup {\n /** Omit for the first, unlabeled group. */\n label?: string;\n items: ShellNavItem[];\n}\n\n/**\n * A part of the app with its own pages: \"You\", \"Build\", \"Operate\", \"Admin\".\n * The sidebar lists one section's pages at a time, under a switcher.\n */\nexport interface ShellSection {\n id: string;\n /** Short, for the switcher: one word. */\n label: string;\n /** The section's eyebrow on its pages; defaults to `label`. */\n title?: string;\n /** Where the switcher goes: the section's first page. */\n href: string;\n groups: ShellNavGroup[];\n}\n\nfunction SideNav({ groups, onNavigate }: { groups: ShellNavGroup[]; onNavigate?: () => void }) {\n return (\n <nav aria-label=\"Pages\" className=\"flex flex-col gap-5\">\n {groups.map((g, gi) => (\n <div key={g.label ?? gi} className=\"flex flex-col gap-0.5\">\n {g.label ? <p className=\"px-3 pb-1 text-[0.8125rem] text-muted-foreground\">{g.label}</p> : null}\n {g.items.map((it) => (\n <Link\n key={it.href}\n href={it.href}\n onClick={onNavigate}\n aria-current={it.active ? 'page' : undefined}\n className={cn(\n 'flex h-9 items-center gap-3 rounded-xl px-3 text-[0.9375rem] transition-colors',\n '[&_svg]:size-[1.0625rem] [&_svg]:shrink-0',\n it.active\n ? 'bg-card text-foreground shadow-sm ring-1 ring-border [&_svg]:text-foreground'\n : 'text-muted-foreground hover:bg-accent hover:text-foreground'\n )}\n >\n {it.icon}\n <span className=\"min-w-0 flex-1 truncate\">{it.label}</span>\n {it.badge ? <span className=\"shrink-0\">{it.badge}</span> : null}\n </Link>\n ))}\n </div>\n ))}\n </nav>\n );\n}\n\nfunction SectionSwitch({\n sections,\n current,\n onNavigate,\n}: {\n sections: ShellSection[];\n current: ShellSection;\n onNavigate?: () => void;\n}) {\n // Up to three fit one row of the sidebar; four go two by two, so no label\n // is ever cut short.\n const cols = sections.length <= 3 ? sections.length : 2;\n return (\n <nav\n aria-label=\"Sections\"\n className={cn('grid gap-1 bg-muted p-1', cols === sections.length ? 'rounded-full' : 'rounded-[1.25rem]')}\n style={{ gridTemplateColumns: `repeat(${cols}, minmax(0, 1fr))` }}\n >\n {sections.map((sec) => {\n const on = sec.id === current.id;\n return (\n <Link\n key={sec.id}\n href={sec.href}\n onClick={onNavigate}\n aria-current={on ? 'true' : undefined}\n className={cn(\n 'flex h-8 min-w-0 items-center justify-center rounded-full px-1.5 text-[0.8125rem] font-medium transition-colors',\n on ? 'bg-card text-foreground shadow-sm' : 'text-muted-foreground hover:text-foreground'\n )}\n >\n <span className=\"truncate\">{sec.label}</span>\n </Link>\n );\n })}\n </nav>\n );\n}\n\nconst activeItem = (groups: ShellNavGroup[]) => groups.flatMap((g) => g.items).find((it) => it.active);\n\n// Bundlers replace process.env.NODE_ENV; the typeof guard covers one that doesn't.\ndeclare const process: { env: { NODE_ENV?: string } } | undefined;\n\nconst warned = new Set<string>();\n\nfunction warnDuplicateLabels(groups: ShellNavGroup[]) {\n if (typeof process === 'undefined' || process.env.NODE_ENV === 'production') return;\n const seen = new Set<string>();\n for (const it of groups.flatMap((g) => g.items)) {\n if (seen.has(it.label) && !warned.has(it.label)) {\n warned.add(it.label);\n console.warn(`AppShell: two pages are labelled \"${it.label}\"; give each its own name.`);\n }\n seen.add(it.label);\n }\n}\n\n/**\n * The signed-in frame: a quiet sidebar on the canvas, content on the right.\n *\n * Give it `sections` and the sidebar shows a switcher (only when there is more\n * than one) and the current section's pages, so it never outgrows the screen;\n * `persistent` groups (Account) follow every section. The section is the one\n * holding an active item, or `activeSection`. On phones a top bar carries the\n * wordmark and the account, a strip under it names the section and page, and\n * the sidebar opens as a sheet. `nav` (flat groups) still works for a simple\n * app. Pages get the section through context: PageHeader uses it as its\n * eyebrow. The account control and any banner are slots.\n */\nexport function AppShell({\n nav,\n sections,\n activeSection,\n persistent = [],\n home = '/',\n account,\n banner,\n footer,\n children,\n className,\n}: {\n /** Flat groups, for an app without sections. */\n nav?: ShellNavGroup[];\n sections?: ShellSection[];\n activeSection?: string;\n /** Groups shown under every section, after its own. */\n persistent?: ShellNavGroup[];\n home?: string;\n account?: ReactNode;\n banner?: ReactNode;\n footer?: ReactNode;\n children: ReactNode;\n className?: string;\n}) {\n const [open, setOpen] = useState(false);\n const current =\n sections && sections.length > 0\n ? (sections.find((sec) => sec.id === activeSection) ??\n sections.find((sec) => activeItem(sec.groups)) ??\n sections[0]!)\n : undefined;\n const groups = current ? [...current.groups, ...persistent] : [...(nav ?? []), ...persistent];\n warnDuplicateLabels(groups);\n const page = activeItem(groups);\n const place = useMemo(\n () => ({ section: current ? (current.title ?? current.label) : undefined, page: page?.label }),\n [current, page?.label]\n );\n const switcher =\n sections && current && sections.length > 1 ? (\n <SectionSwitch sections={sections} current={current} onNavigate={() => setOpen(false)} />\n ) : null;\n return (\n <ShellContext.Provider value={place}>\n <div className={cn('min-h-dvh bg-background', className)}>\n <div className=\"sticky top-0 z-40 border-b border-border bg-background/90 backdrop-blur-md lg:hidden\">\n <div className=\"flex h-14 items-center gap-2 px-3\">\n <Sheet open={open} onOpenChange={setOpen}>\n <SheetTrigger\n className=\"inline-flex size-10 items-center justify-center rounded-full hover:bg-accent\"\n aria-label=\"Open navigation\"\n >\n <Menu className=\"size-5\" />\n </SheetTrigger>\n <SheetContent side=\"left\" className=\"flex flex-col gap-6 overflow-y-auto p-4 pt-16\">\n <SheetTitle className=\"sr-only\">Navigation</SheetTitle>\n {switcher}\n <SideNav groups={groups} onNavigate={() => setOpen(false)} />\n {footer ? <div className=\"mt-auto flex flex-col gap-3\">{footer}</div> : null}\n </SheetContent>\n </Sheet>\n <Link href={home} aria-label=\"Home\" className=\"rounded-lg p-1\">\n <Lockup size={22} />\n </Link>\n <div className=\"ml-auto flex items-center\">{account}</div>\n </div>\n {place.page ? (\n <div className=\"flex h-9 items-center gap-1.5 border-t border-border px-4 text-[0.875rem]\">\n {place.section ? (\n <>\n <span className=\"shrink-0 text-muted-foreground\">{place.section}</span>\n <ChevronRight aria-hidden className=\"size-3.5 shrink-0 text-muted-foreground\" />\n </>\n ) : null}\n <span className=\"truncate font-medium\">{place.page}</span>\n </div>\n ) : null}\n </div>\n <div className=\"mx-auto flex w-full max-w-[90rem]\">\n <aside className=\"sticky top-0 hidden h-dvh w-[17rem] shrink-0 flex-col gap-6 overflow-y-auto px-4 py-6 lg:flex\">\n <Link href={home} className=\"px-2\" aria-label=\"Home\">\n <Lockup size={26} />\n </Link>\n {switcher}\n <SideNav groups={groups} />\n <div className=\"mt-auto flex flex-col gap-3\">{footer}</div>\n </aside>\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <div className=\"hidden h-[4.5rem] items-center justify-end gap-3 px-8 lg:flex\">{account}</div>\n {banner ? <div className=\"px-4 pb-2 pt-4 md:px-8 lg:pt-0\">{banner}</div> : null}\n <main id=\"main-content\" className=\"flex-1 px-4 pb-16 pt-6 md:px-8 lg:pt-2\">\n {/* One width for every signed-in page. */}\n <div className=\"mx-auto w-full max-w-[72rem]\">{children}</div>\n </main>\n </div>\n </div>\n </div>\n </ShellContext.Provider>\n );\n}\n\nexport interface AccountMenuItem {\n label: string;\n href?: string;\n onSelect?: () => void;\n icon?: ReactNode;\n destructive?: boolean;\n}\n\n/** The account button: initial + short id, a menu of items. */\nexport function AccountMenu({\n name,\n detail,\n items,\n}: {\n name: string;\n /** A second line: the short did, an address. */\n detail?: string;\n items: (AccountMenuItem | 'separator')[];\n}) {\n const initial = name.trim().charAt(0).toUpperCase() || '·';\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n className=\"inline-flex h-10 items-center gap-2.5 rounded-full border border-border bg-card pl-1 pr-1 text-[0.9375rem] outline-none transition-colors hover:border-oca-hairline-strong focus-visible:ring-2 focus-visible:ring-ring sm:pr-3.5\"\n aria-label={`Account: ${name}`}\n >\n <span className=\"flex size-8 items-center justify-center rounded-full bg-foreground text-[0.8125rem] font-medium text-background\">\n {initial}\n </span>\n <span className=\"max-w-[10rem] truncate max-sm:hidden\">{name}</span>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-64\">\n <DropdownMenuLabel className=\"flex flex-col gap-0.5\">\n <span className=\"truncate text-[0.9375rem] font-medium text-foreground\">{name}</span>\n {detail ? <span className=\"truncate font-mono text-[0.75rem]\">{detail}</span> : null}\n </DropdownMenuLabel>\n <DropdownMenuSeparator />\n {items.map((it, i) =>\n it === 'separator' ? (\n <DropdownMenuSeparator key={`sep-${i}`} />\n ) : it.href ? (\n <DropdownMenuItem key={it.label} asChild destructive={it.destructive}>\n <Link href={it.href}>\n {it.icon}\n {it.label}\n </Link>\n </DropdownMenuItem>\n ) : (\n <DropdownMenuItem key={it.label} onSelect={it.onSelect} destructive={it.destructive}>\n {it.icon}\n {it.label}\n </DropdownMenuItem>\n )\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\n/** Light, dark, or follow the system: one button that cycles. */\nexport function ThemeToggle({ className }: { className?: string }) {\n const { theme, setTheme } = useTheme();\n const [mounted, setMounted] = useState(false);\n useEffect(() => setMounted(true), []);\n const current = mounted ? (theme ?? 'system') : 'system';\n const next = current === 'light' ? 'dark' : current === 'dark' ? 'system' : 'light';\n const Icon = current === 'light' ? Sun : current === 'dark' ? Moon : SunMoon;\n return (\n <button\n type=\"button\"\n onClick={() => setTheme(next)}\n aria-label={`Theme: ${current}. Switch to ${next}`}\n title={`Theme: ${current}`}\n className={cn(\n 'inline-flex size-10 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground',\n className\n )}\n >\n <Icon className=\"size-[1.125rem]\" />\n </button>\n );\n}\n"]}
|