@orangecheck/design 0.32.0 → 0.32.2

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 +1 @@
1
- {"version":3,"sources":["../src/chrome/ecosystem-switcher.tsx","../src/tokens/cn.ts","../src/primitives/tooltip.tsx","../src/chrome/family-properties.ts","../src/chrome/logo-dropdown.tsx","../src/tokens/provider.tsx","../src/tokens/appearance-menu.tsx","../src/chrome/account-menu.tsx","../src/chrome/primary-nav.tsx","../src/chrome/dashboard-shell.tsx","../src/chrome/app-shell.tsx","../src/chrome/layout-sub-header.tsx","../src/chrome/app-bar.tsx","../src/chrome/family-footer.tsx"],"names":["useState","useRef","useEffect","jsxs","jsx","Boxes","ChevronDown","isActive","Link","Check","twMerge","clsx","React","Popover","CornerDownLeft","useId","router","useRouter","createContext","useContext","Sun","Moon","Monitor","useTheme","Waves","Pause","Copy","Loader2","fetchOcLinkedIdentities","useOcSession","X","Menu","Fragment","Plus"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAM,OAAA,GAA2B;AAAA,EAC7B;AAAA,IACI,IAAA,EAAM,MAAA;AAAA,IACN,IAAA,EAAM,iBAAA;AAAA,IACN,KAAA,EAAO,aAAA;AAAA,IACP,GAAA,EAAK,UAAA;AAAA,IACL,QAAA,EAAU;AAAA,GACd;AAAA,EACA;AAAA,IACI,IAAA,EAAM,MAAA;AAAA,IACN,IAAA,EAAM,sBAAA;AAAA,IACN,KAAA,EAAO,YAAA;AAAA,IACP,GAAA,EAAK,cAAA;AAAA,IACL,QAAA,EAAU;AAAA,GACd;AAAA,EACA;AAAA,IACI,IAAA,EAAM,IAAA;AAAA,IACN,IAAA,EAAM,oBAAA;AAAA,IACN,KAAA,EAAO,UAAA;AAAA,IACP,GAAA,EAAK,+BAAA;AAAA,IACL,QAAA,EAAU;AAAA,GACd;AAAA,EACA;AAAA,IACI,IAAA,EAAM,OAAA;AAAA,IAC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AC,gBAAA,EAAA,EAAoC,MAAA,EAAA,EAAd,MAAA,CAAO,KAAuB,CACtD;AAAA,KAAA,EACH,CAAA;AAAA,oBAEAD,eAAAA,CAAC,KAAA,EAAA,EAAI,SAAA,EAAU,iJAAA,EACb,QAAA,EAAA;AAAA,sBAAAC,cAAAA,CAAC,UAAK,SAAA,EAAU,uBAAA,EACb,4CAAkBD,eAAAA,CAAA6B,qBAAA,EAAE,QAAA,EAAA;AAAA,QAAA,OAAA;AAAA,QAAG,IAAA;AAAA,QAAK;AAAA,OAAA,EAA8B,CAAA,EAC7D,CAAA;AAAA,sBACA5B,eAAC,KAAA,EAAA,EAAI,SAAA,EAAU,wEACZ,QAAA,EAAA,KAAA,CAAM,GAAA,CAAI,CAAC,IAAA,qBACVA,cAAAA;AAAA,QAAC,GAAA;AAAA,QAAA;AAAA,UAEC,MAAM,IAAA,CAAK,IAAA;AAAA,UACV,GAAI,KAAK,QAAA,GACN,EAAE,QAAQ,QAAA,EAAU,GAAA,EAAK,YAAA,EAAa,GACtC,EAAC;AAAA,UACL,SAAA,EAAU,yCAAA;AAAA,UAET,QAAA,EAAA,IAAA,CAAK;AAAA,SAAA;AAAA,QAPD,IAAA,CAAK;AAAA,OASb,CAAA,EACH,CAAA;AAAA,sBACAD,eAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,wDAAA,EACd,QAAA,EAAA;AAAA,wBAAAC,cAAAA,CAAC,MAAA,EAAA,EAAK,SAAA,EAAU,uCAAA,EAAwC,QAAA,EAAA,QAAA,EAAC,CAAA;AAAA,wBACzDA,cAAAA,CAAC,MAAA,EAAA,EAAM,QAAA,EAAA,SAAA,IAAa,oBAAA,EAAqB;AAAA,OAAA,EAC3C;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ","file":"chrome.js","sourcesContent":["import { Boxes, Check, ChevronDown } from 'lucide-react';\nimport Link from 'next/link';\nimport { useEffect, useRef, useState } from 'react';\n\n/**\n * EcosystemSwitcher — cross-product dropdown for jumping between every\n * site in the OrangeCheck family. Drop one into every site's LayoutHeader\n * and mark the active site via the `current` prop.\n *\n * <EcosystemSwitcher current=\"lock\" />\n *\n * The component is dependency-self-contained: no Radix, no Headless UI,\n * just outside-click + Escape handling so it works identically in every\n * site without forcing a peer-dep upgrade. Every link stays in-tab — the\n * family is one app from the user's POV.\n */\n\nexport type EcosystemSlug =\n | 'home'\n | 'docs'\n | 'me'\n | 'vault'\n | 'chat'\n | 'cosign'\n | 'btc'\n | 'globe'\n | 'attest'\n | 'lock'\n | 'vote'\n | 'stamp'\n | 'agent'\n | 'pledge'\n | 'analytics'\n | 'bot'\n | 'forge';\n\ninterface SwitcherEntry {\n slug: EcosystemSlug;\n href: string;\n label: string;\n sub: string;\n docsHref: string;\n}\n\nconst ENTRIES: SwitcherEntry[] = [\n {\n slug: 'home',\n href: 'https://ochk.io',\n label: 'orangecheck',\n sub: 'umbrella',\n docsHref: 'https://docs.ochk.io',\n },\n {\n slug: 'docs',\n href: 'https://docs.ochk.io',\n label: 'oc·docs',\n sub: 'unified docs',\n docsHref: 'https://docs.ochk.io',\n },\n {\n slug: 'me',\n href: 'https://me.ochk.io',\n label: 'oc·me',\n sub: 'earn — consumer identity',\n docsHref: 'https://docs.ochk.io/me',\n },\n {\n slug: 'vault',\n href: 'https://vault.ochk.io',\n label: 'oc·vault',\n sub: 'keep — encrypted secrets',\n docsHref: 'https://docs.ochk.io/vault',\n },\n {\n slug: 'chat',\n href: 'https://chat.ochk.io',\n label: 'oc·chat',\n sub: 'message — encrypted chat',\n docsHref: 'https://docs.ochk.io/chat',\n },\n {\n slug: 'cosign',\n href: 'https://cosign.ochk.io',\n label: 'oc·cosign',\n sub: 'cofound — get behind builders',\n docsHref: 'https://docs.ochk.io/cosign',\n },\n {\n slug: 'btc',\n href: 'https://btc.ochk.io',\n label: 'oc·btc',\n sub: 'read — bitcoin desk',\n docsHref: 'https://btc.ochk.io/data',\n },\n {\n slug: 'globe',\n href: 'https://globe.ochk.io',\n label: 'oc·globe',\n sub: 'watch — the network, live',\n docsHref: 'https://globe.ochk.io/sources',\n },\n {\n slug: 'attest',\n href: 'https://attest.ochk.io',\n label: 'oc·attest',\n sub: 'am — sybil resistance',\n docsHref: 'https://docs.ochk.io/attest',\n },\n {\n slug: 'lock',\n href: 'https://lock.ochk.io',\n label: 'oc·lock',\n sub: 'whisper — encryption',\n docsHref: 'https://docs.ochk.io/lock',\n },\n {\n slug: 'vote',\n href: 'https://vote.ochk.io',\n label: 'oc·vote',\n sub: 'decide — polls',\n docsHref: 'https://docs.ochk.io/vote',\n },\n {\n slug: 'stamp',\n href: 'https://stamp.ochk.io',\n label: 'oc·stamp',\n sub: 'declare — block-anchored',\n docsHref: 'https://docs.ochk.io/stamp',\n },\n {\n slug: 'agent',\n href: 'https://agent.ochk.io',\n label: 'oc·agent',\n sub: 'delegate — scoped auth',\n docsHref: 'https://docs.ochk.io/agent',\n },\n {\n slug: 'pledge',\n href: 'https://pledge.ochk.io',\n label: 'oc·pledge',\n sub: 'swear — bonded commitment',\n docsHref: 'https://docs.ochk.io/pledge',\n },\n];\n\n/** Entries gated behind `showOwnerEntries={true}`. Owner-only family\n * properties (`oc·analytics` at analytics.ochk.io, `oc·bot` at\n * bot.ochk.io) live here so they're invisible to everyone except\n * verified owners — the JWT claim drives the gate. */\nconst OWNER_ENTRIES: SwitcherEntry[] = [\n {\n slug: 'analytics',\n href: 'https://analytics.ochk.io',\n label: 'oc·analytics',\n sub: 'owner cockpit',\n docsHref: 'https://analytics.ochk.io',\n },\n {\n slug: 'bot',\n href: 'https://bot.ochk.io',\n label: 'oc·bot',\n sub: 'social bot',\n docsHref: 'https://bot.ochk.io',\n },\n {\n slug: 'forge',\n href: 'https://forge.ochk.io',\n label: 'oc·forge',\n sub: 'agent ops',\n docsHref: 'https://forge.ochk.io',\n },\n];\n\nexport interface EcosystemSwitcherProps {\n current: EcosystemSlug;\n className?: string;\n /**\n * When true, append the owner-only entries (currently\n * `oc·analytics`) to the family-switcher dropdown. Consumers\n * pass this from their session: `useOcSession().account?.isOwner`.\n * Defaults to false so non-owners never see owner-only links.\n *\n * Not a security boundary — analytics.ochk.io re-checks the\n * live OWNER_OC_ADDRESSES env on every request. This prop only\n * decides whether the UX hint is visible.\n */\n showOwnerEntries?: boolean;\n}\n\nexport function EcosystemSwitcher({\n current,\n className,\n showOwnerEntries = false,\n}: EcosystemSwitcherProps) {\n const [open, setOpen] = useState(false);\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n // Outside-click + Escape close.\n useEffect(() => {\n if (!open) return;\n function onDoc(e: MouseEvent) {\n if (!containerRef.current) return;\n if (!containerRef.current.contains(e.target as Node)) setOpen(false);\n }\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setOpen(false);\n }\n document.addEventListener('mousedown', onDoc);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onDoc);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n return (\n <div ref={containerRef} className={'relative ' + (className ?? '')}>\n <button\n type=\"button\"\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-label=\"Switch OrangeCheck product\"\n title=\"Switch product\"\n onClick={() => setOpen((v) => !v)}\n className={\n 'inline-flex items-center gap-1 px-2 py-1 transition-colors ' +\n (open\n ? 'text-foreground'\n : 'text-muted-foreground hover:text-foreground')\n }\n >\n <Boxes className=\"h-4 w-4\" />\n <ChevronDown\n className={\n 'h-3.5 w-3.5 transition-transform ' + (open ? 'rotate-180' : '')\n }\n />\n </button>\n\n {open && (\n <div\n role=\"menu\"\n aria-label=\"Switch OrangeCheck product\"\n className=\"bg-background absolute right-0 top-full z-[60] mt-2 w-72 border shadow-lg\"\n >\n <div className=\"label-mono text-primary border-b px-4 py-2\">\n § the family\n </div>\n <ul className=\"py-1\">\n {[...ENTRIES, ...(showOwnerEntries ? OWNER_ENTRIES : [])].map((e) => {\n const isActive = e.slug === current;\n return (\n <li key={e.slug}>\n <Link\n href={e.href}\n onClick={() => setOpen(false)}\n aria-current={isActive ? 'page' : undefined}\n className={\n 'group flex items-baseline gap-3 px-4 py-2 transition-colors ' +\n (isActive\n ? 'bg-primary/5'\n : 'hover:bg-muted')\n }\n >\n <span\n className={\n 'font-display flex-1 text-[12px] font-semibold tracking-tight ' +\n (isActive\n ? 'text-primary'\n : 'text-foreground group-hover:text-primary transition-colors')\n }\n >\n {e.label}\n </span>\n <span className=\"text-muted-foreground font-mono text-[10px] tracking-wider uppercase\">\n {e.sub}\n </span>\n {isActive && (\n <Check className=\"text-primary h-3 w-3\" />\n )}\n </Link>\n </li>\n );\n })}\n </ul>\n <div className=\"border-t px-4 py-2 font-mono text-[10px] tracking-widest uppercase\">\n <Link\n href=\"https://docs.ochk.io\"\n onClick={() => setOpen(false)}\n className=\"text-muted-foreground hover:text-foreground inline-block transition-colors\"\n >\n docs.ochk.io →\n </Link>\n </div>\n </div>\n )}\n </div>\n );\n}\n","import type { ClassValue } from 'clsx';\n\nimport { clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Canonical class-name merge for the OrangeCheck family.\n * `clsx` for conditional composition, `tailwind-merge` to resolve\n * conflicting Tailwind utilities (last-wins by property).\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as Popover from '@radix-ui/react-popover';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\n/**\n * `<Tooltip>` — the family's hover/focus tooltip primitive.\n *\n * Built on `@radix-ui/react-popover` (already a dependency — we do NOT add\n * `@radix-ui/react-tooltip`) but driven by a *controlled* open boolean so we\n * own the timing and gating Radix's popover doesn't give a tooltip:\n *\n * - hover-intent: opens after `openDelay`ms of sustained pointer hover,\n * closes after a short `closeDelay` grace (WCAG 1.4.13 hoverable).\n * - keyboard parity: also opens on keyboard focus (detected via input-\n * modality, since `:focus-visible` isn't applied yet inside the focus\n * event), closes on blur/Escape, never steals or traps focus.\n * - pointer-fine only: the hover path is gated behind\n * `(hover: hover) and (pointer: fine)` so it never fires on touch — by\n * pointer *type*, not a width breakpoint (a coarse tablet ≥ sm is touch).\n * - `disabled`: a hard force-close, used by `OcLogoDropdown` so the tip and\n * the family menu (which share a trigger) can never paint at once.\n *\n * The content is decorative reinforcement: it's `aria-hidden`, and\n * `pointer-events-none` so a mis-detected pointer can never intercept the\n * click path to the trigger. The authoritative accessible name belongs on the\n * trigger's own `aria-label`.\n */\n\nconst TOOLTIP_SURFACE_CLASS =\n 'bg-popover text-popover-foreground border-border rounded-md border p-2.5 shadow-md';\n\n// Same idiom as the popover/dialog primitives, a touch faster (tooltips are\n// lighter than dialogs) with a smaller 4px travel. Reduced-motion is handled\n// globally by the family `prefers-reduced-motion` reset — nothing to add here.\nconst TOOLTIP_MOTION_CLASS =\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 origin-(--radix-popover-content-transform-origin) duration-150 ease-out';\n\nexport interface TooltipProps {\n /** The tooltip body. */\n content: React.ReactNode;\n /** A single trigger element (a `<button>` etc.); receives the hover/focus wiring. */\n children: React.ReactElement;\n side?: 'top' | 'right' | 'bottom' | 'left';\n align?: 'start' | 'center' | 'end';\n sideOffset?: number;\n collisionPadding?: number;\n /** ms of sustained hover before opening. Default 300 (deliberate, not twitchy). */\n openDelay?: number;\n /** ms grace before closing on pointer-leave. Default 90. */\n closeDelay?: number;\n /** Force the tooltip closed regardless of hover/focus (e.g. while a shared menu is open). */\n disabled?: boolean;\n /** Portal to `<body>` (default true). Set false to keep content inline so it inherits a scoped `data-oc-theme`. */\n portal?: boolean;\n /** z-index utility for the content. Default `z-50`. */\n zIndexClassName?: string;\n contentClassName?: string;\n}\n\ninterface TriggerHandlerProps {\n onPointerEnter?: React.PointerEventHandler;\n onPointerLeave?: React.PointerEventHandler;\n onPointerDown?: React.PointerEventHandler;\n onFocus?: React.FocusEventHandler;\n onBlur?: React.FocusEventHandler;\n onKeyDown?: React.KeyboardEventHandler;\n}\n\nfunction compose<E>(theirs: ((e: E) => void) | undefined, ours: (e: E) => void) {\n return (e: E) => {\n theirs?.(e);\n ours(e);\n };\n}\n\n/**\n * Input-modality tracker (the `:focus-visible` polyfill heuristic).\n * `:focus-visible` is NOT reliably applied synchronously inside the `focus`\n * event, so reading `el.matches(':focus-visible')` there misses keyboard focus.\n * Instead we record the last input type from global capture-phase listeners\n * that fire BEFORE focus: a keydown means the focus that follows is keyboard-\n * driven (show the hint); a pointerdown means it's a click (don't — that would\n * flash the tip over the menu).\n */\nlet lastInputWasKeyboard = false;\nlet modalityInstalled = false;\nfunction installModalityTracking() {\n if (modalityInstalled || typeof window === 'undefined') return;\n modalityInstalled = true;\n window.addEventListener('keydown', () => (lastInputWasKeyboard = true), true);\n window.addEventListener('pointerdown', () => (lastInputWasKeyboard = false), true);\n}\n\nexport function Tooltip({\n content,\n children,\n side = 'bottom',\n align = 'start',\n sideOffset = 8,\n collisionPadding = 12,\n openDelay = 300,\n closeDelay = 90,\n disabled = false,\n portal = true,\n zIndexClassName = 'z-50',\n contentClassName,\n}: TooltipProps) {\n const [hovering, setHovering] = React.useState(false);\n const [focusing, setFocusing] = React.useState(false);\n const [isFinePointer, setIsFinePointer] = React.useState(false);\n const openTimer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n const closeTimer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n\n // Detect a true mouse (fine pointer + real hover). Defaults false for SSR\n // and first client render, then resolves in the effect — a normal post-mount\n // update, not a hydration mismatch.\n React.useEffect(() => {\n installModalityTracking();\n const mq = window.matchMedia('(hover: hover) and (pointer: fine)');\n const apply = () => setIsFinePointer(mq.matches);\n apply();\n mq.addEventListener('change', apply);\n return () => mq.removeEventListener('change', apply);\n }, []);\n\n const clearTimers = React.useCallback(() => {\n if (openTimer.current) clearTimeout(openTimer.current);\n if (closeTimer.current) clearTimeout(closeTimer.current);\n }, []);\n\n React.useEffect(() => clearTimers, [clearTimers]);\n\n // When force-closed (e.g. the shared menu opened), drop the hover latch so\n // the tip doesn't snap back with no delay the instant the menu closes while\n // the pointer is still over the trigger. `focusing` is left alone — a\n // keyboard user who stays focused should still get the immediate hint.\n React.useEffect(() => {\n if (disabled) {\n clearTimers();\n setHovering(false);\n }\n }, [disabled, clearTimers]);\n\n const handlePointerEnter = () => {\n if (!isFinePointer) return;\n if (closeTimer.current) clearTimeout(closeTimer.current);\n openTimer.current = setTimeout(() => setHovering(true), openDelay);\n };\n const handlePointerLeave = () => {\n if (openTimer.current) clearTimeout(openTimer.current);\n closeTimer.current = setTimeout(() => setHovering(false), closeDelay);\n };\n // The first press of EITHER a single- or double-click tears the tip down\n // before the trigger's own onClick toggles a menu, so it never overlaps.\n const handlePointerDown = () => {\n clearTimers();\n setHovering(false);\n setFocusing(false);\n };\n const handleFocus = () => {\n // Only keyboard focus reveals the hint — a mouse click also focuses the\n // trigger, and re-popping the tip over an opening menu would be the bug.\n // Use the modality flag (set before focus fires) rather than\n // `:focus-visible`, which isn't applied yet inside the focus event.\n if (lastInputWasKeyboard) {\n clearTimers();\n setFocusing(true);\n }\n };\n const handleBlur = () => {\n clearTimers();\n setFocusing(false);\n };\n // Escape dismisses the focus-revealed tip without moving focus (WCAG 1.4.13).\n // Handled on the focused trigger directly — robust regardless of Radix's\n // dismissal internals (we suppress its focus-outside dismissal below).\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n clearTimers();\n setHovering(false);\n setFocusing(false);\n }\n };\n\n const effectiveOpen = !disabled && ((isFinePointer && hovering) || focusing);\n\n const extra: TriggerHandlerProps = {};\n const childProps = children.props as TriggerHandlerProps;\n extra.onPointerEnter = compose(childProps.onPointerEnter, handlePointerEnter);\n extra.onPointerLeave = compose(childProps.onPointerLeave, handlePointerLeave);\n extra.onPointerDown = compose(childProps.onPointerDown, handlePointerDown);\n extra.onFocus = compose(childProps.onFocus, handleFocus);\n extra.onBlur = compose(childProps.onBlur, handleBlur);\n extra.onKeyDown = compose(childProps.onKeyDown, handleKeyDown);\n const trigger = React.cloneElement(children, extra);\n\n const contentEl = (\n <Popover.Content\n side={side}\n align={align}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n aria-hidden\n onOpenAutoFocus={(e) => e.preventDefault()}\n onCloseAutoFocus={(e) => e.preventDefault()}\n // The tip is aria-hidden + non-focusable, so focus legitimately\n // stays on the trigger (outside the content). Don't let Radix's\n // focus-outside dismissal close a focus-revealed tip; Escape and\n // pointer-down-outside still dismiss.\n onFocusOutside={(e) => e.preventDefault()}\n className={cn(\n TOOLTIP_SURFACE_CLASS,\n TOOLTIP_MOTION_CLASS,\n 'pointer-events-none',\n zIndexClassName,\n contentClassName\n )}\n >\n {content}\n </Popover.Content>\n );\n\n return (\n <Popover.Root\n open={effectiveOpen}\n onOpenChange={(o) => {\n // Radix requests close on Escape / outside interaction — sync our\n // own state so a re-hover re-arms cleanly. We never open via Radix.\n if (!o) {\n clearTimers();\n setHovering(false);\n setFocusing(false);\n }\n }}\n modal={false}\n >\n <Popover.Anchor asChild>{trigger}</Popover.Anchor>\n {portal ? <Popover.Portal>{contentEl}</Popover.Portal> : contentEl}\n </Popover.Root>\n );\n}\n","/**\n * Family-property registry — the single source of truth for every\n * orangecheck-family site. Both `<OcLogoDropdown>` (the global logo →\n * property switcher) and `<OcAccountMenu>` (the global signed-in\n * account chip) read from this table, so a one-line edit here ripples\n * to every consumer simultaneously.\n *\n * Adding a new family member means appending one entry below. Removing\n * one means deleting the entry. There are no other call sites to chase.\n */\n\nimport type { EcosystemSlug } from './ecosystem-switcher';\n\nexport type FamilyCategory = 'hub' | 'product' | 'protocol' | 'owner';\n\nexport interface FamilyProperty {\n /** Stable URL-safe identifier (e.g. `'vault'`). */\n slug: EcosystemSlug;\n /** Absolute origin (e.g. `'https://vault.ochk.io'`). */\n origin: string;\n /** Bare hostname (e.g. `'vault.ochk.io'`). Used in account-menu headers. */\n hostname: string;\n /** Wordmark label (e.g. `'oc·vault'`). */\n label: string;\n /** Short tagline (verb — what-it-does), shown under the wordmark in the menu. */\n sub: string;\n /** Docs deep-link (e.g. `'https://docs.ochk.io/vault'`). */\n docsHref: string;\n /** Family-level category that shapes the visual chip + menu sectioning. */\n category: FamilyCategory;\n}\n\nexport const FAMILY_PROPERTIES: ReadonlyArray<FamilyProperty> = [\n {\n slug: 'home',\n origin: 'https://ochk.io',\n hostname: 'ochk.io',\n label: 'orangecheck',\n sub: 'umbrella · sign-in',\n docsHref: 'https://docs.ochk.io',\n category: 'hub',\n },\n {\n slug: 'docs',\n origin: 'https://docs.ochk.io',\n hostname: 'docs.ochk.io',\n label: 'oc·docs',\n sub: 'unified reference',\n docsHref: 'https://docs.ochk.io',\n category: 'hub',\n },\n {\n slug: 'me',\n origin: 'https://me.ochk.io',\n hostname: 'me.ochk.io',\n label: 'oc·me',\n sub: 'earn — consumer identity',\n docsHref: 'https://docs.ochk.io/me',\n category: 'product',\n },\n {\n slug: 'vault',\n origin: 'https://vault.ochk.io',\n hostname: 'vault.ochk.io',\n label: 'oc·vault',\n sub: 'keep — encrypted secrets',\n docsHref: 'https://docs.ochk.io/vault',\n category: 'product',\n },\n {\n slug: 'chat',\n origin: 'https://chat.ochk.io',\n hostname: 'chat.ochk.io',\n label: 'oc·chat',\n sub: 'message — encrypted chat',\n docsHref: 'https://docs.ochk.io/chat',\n category: 'product',\n },\n {\n slug: 'cosign',\n origin: 'https://cosign.ochk.io',\n hostname: 'cosign.ochk.io',\n label: 'oc·cosign',\n sub: 'cofound — get behind builders',\n docsHref: 'https://docs.ochk.io/cosign',\n category: 'product',\n },\n {\n slug: 'btc',\n origin: 'https://btc.ochk.io',\n hostname: 'btc.ochk.io',\n label: 'oc·btc',\n sub: 'read — bitcoin desk',\n docsHref: 'https://btc.ochk.io/data',\n category: 'product',\n },\n {\n slug: 'globe',\n origin: 'https://globe.ochk.io',\n hostname: 'globe.ochk.io',\n label: 'oc·globe',\n sub: 'watch — the network, live',\n docsHref: 'https://globe.ochk.io/sources',\n category: 'product',\n },\n {\n slug: 'attest',\n origin: 'https://attest.ochk.io',\n hostname: 'attest.ochk.io',\n label: 'oc·attest',\n sub: 'am — sybil resistance',\n docsHref: 'https://docs.ochk.io/attest',\n category: 'protocol',\n },\n {\n slug: 'lock',\n origin: 'https://lock.ochk.io',\n hostname: 'lock.ochk.io',\n label: 'oc·lock',\n sub: 'whisper — encryption',\n docsHref: 'https://docs.ochk.io/lock',\n category: 'protocol',\n },\n {\n slug: 'vote',\n origin: 'https://vote.ochk.io',\n hostname: 'vote.ochk.io',\n label: 'oc·vote',\n sub: 'decide — polls',\n docsHref: 'https://docs.ochk.io/vote',\n category: 'protocol',\n },\n {\n slug: 'stamp',\n origin: 'https://stamp.ochk.io',\n hostname: 'stamp.ochk.io',\n label: 'oc·stamp',\n sub: 'declare — block-anchored',\n docsHref: 'https://docs.ochk.io/stamp',\n category: 'protocol',\n },\n {\n slug: 'agent',\n origin: 'https://agent.ochk.io',\n hostname: 'agent.ochk.io',\n label: 'oc·agent',\n sub: 'delegate — scoped auth',\n docsHref: 'https://docs.ochk.io/agent',\n category: 'protocol',\n },\n {\n slug: 'pledge',\n origin: 'https://pledge.ochk.io',\n hostname: 'pledge.ochk.io',\n label: 'oc·pledge',\n sub: 'swear — bonded commitment',\n docsHref: 'https://docs.ochk.io/pledge',\n category: 'protocol',\n },\n {\n slug: 'analytics',\n origin: 'https://analytics.ochk.io',\n hostname: 'analytics.ochk.io',\n label: 'oc·analytics',\n sub: 'owner cockpit',\n docsHref: 'https://analytics.ochk.io',\n category: 'owner',\n },\n {\n slug: 'bot',\n origin: 'https://bot.ochk.io',\n hostname: 'bot.ochk.io',\n label: 'oc·bot',\n sub: 'social bot',\n docsHref: 'https://bot.ochk.io',\n category: 'owner',\n },\n {\n slug: 'forge',\n origin: 'https://forge.ochk.io',\n hostname: 'forge.ochk.io',\n label: 'oc·forge',\n sub: 'agent ops',\n docsHref: 'https://forge.ochk.io',\n category: 'owner',\n },\n];\n\n/**\n * Canonical lifecycle states for any family site. Used by both the\n * tiny chip rendered next to the wordmark and any other surface that\n * wants to display \"this site is still settling\" UX. Centralised\n * vocabulary so we can't accidentally drift to a parallel synonym\n * like `preview`/`experimental` on different sites.\n *\n * - `live` — production-ready; **no chip rendered** (the absence\n * of a chip is the affordance)\n * - `beta` — feature-complete but still iterating, soft launch\n * - `alpha` — early, breaking changes expected, integrators beware\n */\nexport type SiteState = 'alpha' | 'beta' | 'live';\n\nexport const SITE_STATE_LABEL: Record<Exclude<SiteState, 'live'>, string> = {\n alpha: 'alpha',\n beta: 'beta',\n};\n\n/** Find a property entry by its slug. */\nexport function findFamilyProperty(slug: EcosystemSlug): FamilyProperty | undefined {\n return FAMILY_PROPERTIES.find((p) => p.slug === slug);\n}\n","import { Check, ChevronDown, CornerDownLeft } from 'lucide-react';\nimport Link from 'next/link';\nimport { useRouter } from 'next/router';\nimport * as React from 'react';\nimport { useEffect, useId, useRef, useState, type ReactNode } from 'react';\n\nimport { Tooltip } from '../primitives/tooltip';\nimport { cn } from '../tokens/cn';\nimport type { EcosystemSlug } from './ecosystem-switcher';\nimport {\n FAMILY_PROPERTIES,\n SITE_STATE_LABEL,\n findFamilyProperty,\n type FamilyCategory,\n type SiteState,\n} from './family-properties';\n\n/**\n * `<OcLogoDropdown>` — the logo IS the dropdown.\n *\n * Wraps a site's local LogoMark + wordmark in a button that, on click,\n * drops a popover listing every OrangeCheck family property. The current\n * property is highlighted with a primary-tinted background, a left-edge\n * accent bar, and a \"home\" label — and is itself a clickable link to\n * the local home href (default `/`).\n *\n * Family properties carry one of three categories:\n *\n * - `hub` — orangecheck umbrella + docs (no badge)\n * - `product` — commercial products (me, vault) · primary chip\n * - `protocol` — open verb specs (attest, lock, vote, stamp, agent,\n * pledge) · muted chip\n *\n * The category of the *current* site is auto-rendered as a tiny mono\n * chip inside the trigger button, and the dropdown itself groups\n * entries by category with subtle mono dividers — so the product /\n * protocol distinction is visible both on the logo and in the menu,\n * with a single source of truth (`./family-properties.ts`).\n *\n * The optional `siteState` prop renders a second tiny chip after the\n * category chip — `alpha` or `beta` — for sites that aren't `live`.\n * The vocabulary is canonical across the family (see SiteState in\n * family-properties.ts). Pass it from your per-site config so a\n * single edit propagates to the logo, the account menu, and anywhere\n * else the chip surfaces.\n *\n * Mobile-aware: the popover's width is clamped to the viewport,\n * content scrolls when there are more entries than fit. The trigger\n * chips hide below `sm` to preserve mobile header space — the dropdown\n * itself still shows the grouping.\n *\n * On a fine pointer (mouse) the trigger reveals a themed `<Tooltip>` on\n * hover, and on keyboard focus — naming where you are and the two\n * affordances (`click · switch site`, `double-click · home`). It replaces\n * the old native `title=` (unthemed, undelayed, invisible on touch) and is\n * never shown on touch, where the menu's `home ✓` row is the path home.\n */\n\nconst SECTIONS: Array<{ category: FamilyCategory; label: string }> = [\n { category: 'hub', label: 'hub' },\n { category: 'product', label: 'products' },\n { category: 'protocol', label: 'protocols' },\n { category: 'owner', label: 'owner' },\n];\n\nexport interface OcLogoDropdownProps {\n /**\n * Which property this site IS. Used to highlight the active row,\n * route the active row's link to `homeHref` instead of the cross-\n * domain absolute URL, and pick the category chip rendered next\n * to the wordmark.\n */\n current: EcosystemSlug;\n /**\n * The site's local home path (for the active row). Default `/`.\n * Always a same-origin path — the logo's \"go home\" affordance is\n * preserved by clicking the highlighted row.\n */\n homeHref?: string;\n /**\n * Optional lifecycle state for this site. `'live'` (default) renders\n * no chip; `'alpha'` and `'beta'` render a small mono uppercase chip\n * after the category badge. Drive this from your per-site config so\n * one constant change ripples to every surface.\n */\n siteState?: SiteState;\n /**\n * Logo contents · typically `<LogoMark />` + `<span>oc·X</span>`.\n */\n children: ReactNode;\n /** className for the outer container. */\n className?: string;\n /** className for the trigger button. */\n triggerClassName?: string;\n /** className for the popover. */\n popoverClassName?: string;\n /**\n * When true, include the `owner` section (currently just\n * `oc·analytics`) in the family list. Consumers pass this from\n * their session: `useOcSession().account?.isOwner ?? false`.\n * Defaults to false so non-owners never see the entry.\n *\n * Not a security boundary — analytics.ochk.io re-checks the live\n * OWNER_OC_ADDRESSES env on every request. This prop only\n * controls UX visibility.\n */\n showOwnerEntries?: boolean;\n}\n\nfunction CategoryChip({ category }: { category: FamilyCategory }) {\n if (category === 'hub') return null;\n const label =\n category === 'product' ? 'product' : category === 'protocol' ? 'protocol' : 'owner';\n const tone =\n category === 'product'\n ? 'border-primary/25 bg-primary/10 text-primary'\n : category === 'protocol'\n ? 'border-muted-foreground/20 bg-muted/40 text-muted-foreground/85'\n : 'border-warning/30 bg-warning/10 text-warning';\n return (\n <span\n aria-label={\n category === 'product'\n ? 'commercial product'\n : category === 'protocol'\n ? 'protocol reference'\n : 'owner-only surface'\n }\n className={\n 'ml-1 hidden rounded-sm border px-1.5 py-[1px] font-mono text-[9px] font-medium tracking-widest uppercase sm:inline-block ' +\n tone\n }\n data-oc-category={category}\n >\n {label}\n </span>\n );\n}\n\nfunction SiteStateBadge({ state }: { state: SiteState }) {\n if (state === 'live') return null;\n return (\n <span\n aria-label={`site lifecycle: ${state}`}\n className=\"text-muted-foreground/70 ml-1 hidden font-mono text-[9px] font-medium tracking-widest uppercase sm:inline-block\"\n data-oc-site-state={state}\n >\n {SITE_STATE_LABEL[state]}\n </span>\n );\n}\n\nfunction MenuCategoryChip({ category }: { category: FamilyCategory }) {\n if (category === 'hub') return null;\n const label =\n category === 'product' ? 'pro' : category === 'protocol' ? 'spec' : 'own';\n const tone =\n category === 'product'\n ? 'bg-primary/10 text-primary'\n : category === 'protocol'\n ? 'bg-muted/60 text-muted-foreground/80'\n : 'bg-warning/15 text-warning';\n return (\n <span\n aria-hidden\n className={\n 'inline-block shrink-0 rounded-sm px-1 py-[1px] font-mono text-[9px] font-medium tracking-widest uppercase ' +\n tone\n }\n >\n {label}\n </span>\n );\n}\n\n/**\n * The hover/focus tooltip body — three rows that the native `title=` used to\n * hide: where you are, then `click · switch site` and `double-click · home`.\n * Decorative reinforcement of the trigger's `aria-label` (the tooltip itself\n * is `aria-hidden`); the same `CornerDownLeft` glyph as the in-menu home hint.\n */\nfunction SwitcherTooltipCard({ current }: { current: EcosystemSlug }) {\n const prop = findFamilyProperty(current);\n return (\n <div className=\"w-[13rem] max-w-[calc(100vw-1.5rem)]\">\n <div className=\"flex flex-col leading-tight\">\n <span className=\"flex flex-wrap items-baseline gap-x-1.5\">\n <span className=\"text-muted-foreground font-mono text-[9px] tracking-widest uppercase\">\n you’re on\n </span>\n <span className=\"text-primary font-display text-[12px] font-semibold tracking-tight\">\n {prop?.label ?? 'orangecheck family'}\n </span>\n </span>\n {prop?.sub && (\n <span className=\"text-muted-foreground mt-0.5 font-mono text-[10px] tracking-wide\">\n {prop.sub}\n </span>\n )}\n </div>\n <div className=\"border-border -mx-2.5 my-2 border-t\" />\n <div className=\"flex items-center gap-1.5\">\n <ChevronDown aria-hidden className=\"text-muted-foreground h-3 w-3 shrink-0\" />\n <span className=\"text-primary font-mono text-[10px] font-medium tracking-widest uppercase\">\n click\n </span>\n <span className=\"text-muted-foreground font-mono text-[10px]\">·</span>\n <span className=\"text-muted-foreground font-mono text-[10px] tracking-wide\">\n switch site\n </span>\n </div>\n <div className=\"mt-1.5 flex items-center gap-1.5\">\n <CornerDownLeft aria-hidden className=\"text-muted-foreground h-3 w-3 shrink-0\" />\n <span className=\"text-primary font-mono text-[10px] font-medium tracking-widest uppercase\">\n double-click\n </span>\n <span className=\"text-muted-foreground font-mono text-[10px]\">·</span>\n <span className=\"text-muted-foreground font-mono text-[10px] tracking-wide\">\n home\n </span>\n </div>\n </div>\n );\n}\n\nexport function OcLogoDropdown({\n current,\n homeHref = '/',\n siteState = 'live',\n children,\n className,\n triggerClassName,\n popoverClassName,\n showOwnerEntries = false,\n}: OcLogoDropdownProps) {\n const [open, setOpen] = useState(false);\n const containerRef = useRef<HTMLDivElement | null>(null);\n const menuId = useId();\n const router = useRouter();\n\n const currentCategory: FamilyCategory = findFamilyProperty(current)?.category ?? 'hub';\n\n /**\n * Trigger click semantics:\n *\n * single-click → toggle the family dropdown\n * double-click → navigate to `homeHref` (the local landing)\n *\n * `MouseEvent.detail` is the running click count for clicks within\n * the browser's double-click threshold (~500ms). The DOM still\n * fires the `click` event on the first tap, so the dropdown\n * momentarily opens during a double-click — and the second click\n * navigates home. That's the visual story the popover-side hint\n * sells: *open · tap again · home.*\n */\n function handleTriggerClick(e: React.MouseEvent<HTMLButtonElement>) {\n if (e.detail >= 2) {\n e.preventDefault();\n setOpen(false);\n void router.push(homeHref);\n return;\n }\n setOpen((v) => !v);\n }\n\n // Outside-click + Escape close.\n useEffect(() => {\n if (!open) return;\n function onDoc(e: MouseEvent) {\n if (!containerRef.current) return;\n if (!containerRef.current.contains(e.target as Node)) setOpen(false);\n }\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setOpen(false);\n }\n document.addEventListener('mousedown', onDoc);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onDoc);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n return (\n <div\n ref={containerRef}\n className={'relative inline-flex items-center ' + (className ?? '')}\n data-oc-logo-dropdown=\"\"\n data-oc-current-category={currentCategory}\n data-oc-site-state={siteState}\n >\n <Tooltip\n content={<SwitcherTooltipCard current={current} />}\n disabled={open}\n side=\"bottom\"\n align=\"start\"\n sideOffset={8}\n zIndexClassName=\"z-[70]\"\n >\n <button\n type=\"button\"\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-controls={menuId}\n aria-label=\"orangecheck family menu\"\n onClick={handleTriggerClick}\n className={cn(\n // focus indicator is guaranteed even if a consumer overrides triggerClassName\n 'focus-visible:ring-primary/60 rounded-sm focus-visible:ring-2 focus-visible:outline-none',\n triggerClassName ??\n 'group hover:bg-accent/30 -mx-1.5 -my-1 flex min-h-[40px] items-center gap-2 rounded-sm px-1.5 py-1 transition-colors ' +\n (open ? 'bg-accent/20' : '')\n )}\n data-oc-logo-dropdown-trigger=\"\"\n data-oc-logo-dropdown-open={open ? 'true' : 'false'}\n >\n {children}\n <CategoryChip category={currentCategory} />\n <SiteStateBadge state={siteState} />\n <ChevronDown\n aria-hidden\n className={\n 'text-muted-foreground/70 group-hover:text-foreground/80 h-3.5 w-3.5 shrink-0 transition-transform duration-200 ' +\n (open ? 'rotate-180' : '')\n }\n />\n </button>\n </Tooltip>\n {/* Home affordance · a sibling Link to the trigger button\n rather than a child of it (nested buttons would be\n invalid HTML). Fades + slides in when the dropdown is\n open, whispering \"tap again, you'll go home\". Clicking\n the hint navigates directly — works for users who\n discover it before they discover the double-click. The\n subtle motion-safe pulse on the icon nudges the eye\n without shouting. */}\n <Link\n href={homeHref}\n aria-label={'go to ' + homeHref + ' (this site\\'s home)'}\n onClick={() => setOpen(false)}\n tabIndex={open ? 0 : -1}\n className={\n 'hover:text-primary group/home -ml-1 hidden items-center gap-1 rounded-sm px-1.5 py-1 font-mono text-[9px] tracking-widest uppercase transition-all duration-200 sm:inline-flex ' +\n (open\n ? 'pointer-events-auto translate-x-0 text-muted-foreground/70 opacity-100 hover:bg-accent/30'\n : 'pointer-events-none -translate-x-1 opacity-0')\n }\n data-oc-logo-dropdown-home-hint=\"\"\n >\n <CornerDownLeft\n aria-hidden\n className={\n 'h-3 w-3 group-hover/home:text-primary ' +\n (open ? 'motion-safe:animate-pulse' : '')\n }\n />\n <span className=\"text-primary/70 group-hover/home:text-primary\">\n home\n </span>\n </Link>\n\n {open && (\n <div\n id={menuId}\n role=\"menu\"\n aria-label=\"orangecheck family\"\n className={\n popoverClassName ??\n 'bg-background absolute top-full left-0 z-[60] mt-2 w-[min(20rem,calc(100vw-1rem))] border shadow-lg'\n }\n data-oc-logo-dropdown-popover=\"\"\n >\n <div className=\"label-mono text-primary border-b px-4 py-2\">\n § the orangecheck family\n </div>\n <div className=\"max-h-[min(28rem,70vh)] overflow-y-auto py-1\" role=\"none\">\n {SECTIONS.map(({ category, label }) => {\n // Owner-only sections only render when the\n // consumer has explicitly opted in (caller\n // reads `useOcSession().account?.isOwner`).\n // Non-owners simply don't see them.\n if (category === 'owner' && !showOwnerEntries) return null;\n const sectionEntries = FAMILY_PROPERTIES.filter(\n (e) => e.category === category\n );\n if (sectionEntries.length === 0) return null;\n return (\n <div key={category} role=\"none\" data-oc-section={category}>\n <div\n role=\"separator\"\n aria-hidden\n className={\n 'text-muted-foreground/60 px-4 pt-2.5 pb-1 font-mono text-[9px] font-medium tracking-widest uppercase ' +\n (category === 'hub' ? '' : 'border-t mt-1')\n }\n >\n {label}\n </div>\n <ul role=\"none\" className=\"pb-1\">\n {sectionEntries.map((e) => {\n const isActive = e.slug === current;\n const href = isActive ? homeHref : e.origin;\n return (\n <li key={e.slug} role=\"none\">\n <Link\n href={href}\n role=\"menuitem\"\n onClick={() => setOpen(false)}\n aria-current={isActive ? 'page' : undefined}\n className={\n 'group flex items-center gap-2 px-4 py-2 transition-colors ' +\n (isActive\n ? 'bg-primary/8 border-primary -ml-px border-l-2'\n : 'hover:bg-muted -ml-px border-l-2 border-transparent')\n }\n data-oc-logo-dropdown-item={\n isActive ? 'current' : 'sibling'\n }\n data-oc-entry-category={e.category}\n >\n <span className=\"flex min-w-0 flex-1 flex-col leading-tight\">\n <span\n className={\n 'font-display text-[12px] font-semibold tracking-tight ' +\n (isActive\n ? 'text-primary'\n : 'text-foreground group-hover:text-primary transition-colors')\n }\n >\n {e.label}\n </span>\n <span className=\"text-muted-foreground mt-0.5 font-mono text-[10px] tracking-wide\">\n {e.sub}\n </span>\n </span>\n <MenuCategoryChip category={e.category} />\n {isActive ? (\n <span className=\"text-primary inline-flex shrink-0 items-center gap-1 font-mono text-[10px] tracking-widest uppercase\">\n home\n <Check className=\"h-3 w-3\" />\n </span>\n ) : null}\n </Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n })}\n </div>\n <div className=\"border-t px-4 py-2 font-mono text-[10px] tracking-widest uppercase\">\n <Link\n href=\"https://docs.ochk.io\"\n onClick={() => setOpen(false)}\n className=\"text-muted-foreground hover:text-foreground inline-block transition-colors\"\n >\n docs.ochk.io →\n </Link>\n </div>\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ReactNode,\n} from 'react';\n\nimport {\n accentFor,\n DEFAULT_OC_THEME,\n OC_DEFAULT_ACCENT,\n OC_MOTION_COOKIE,\n OC_SKIN_COOKIE,\n OC_THEMES,\n resolveTheme,\n type OcTheme,\n} from './themes';\nimport { OcAurora } from './aurora';\n\ndeclare global {\n interface Window {\n /** Defined by `getOcThemeInitScript()`; recolors favicon + theme-color. */\n __ocApplySkinChrome?: (skin: string) => void;\n }\n}\n\n/**\n * OcThemeProvider — the skin (named-theme) axis.\n *\n * Orthogonal to `next-themes`, which owns light/dark via the `.dark` class.\n * This provider owns the `data-oc-theme` attribute on `<html>` and persists the\n * choice in the `oc_skin` cookie at `Domain=.ochk.io`, so a skin chosen on one\n * `*.ochk.io` site is honored on every other. It re-reads the cookie on focus /\n * visibility change so a fresh choice picks up when the user returns to a tab\n * (same cross-site pickup trick `OcAccountMenu` uses for sign-in).\n *\n * Mount once, inside (or beside) the `next-themes` `<ThemeProvider>`:\n *\n * <ThemeProvider attribute=\"class\" defaultTheme=\"system\" enableSystem>\n * <OcThemeProvider>\n * …app…\n * </OcThemeProvider>\n * </ThemeProvider>\n *\n * Pair with `getOcThemeInitScript()` in `_document` to avoid a flash before\n * hydration.\n */\n\nconst ONE_YEAR = 60 * 60 * 24 * 365;\nconst ATTR = 'data-oc-theme';\nconst MOTION_ATTR = 'data-oc-motion';\n\n/** Ambient-motion switch. `'off'` freezes the aurora and every `.oc-ambient`. */\nexport type OcMotion = 'on' | 'off';\n\nfunction readSkinCookie(): string | null {\n if (typeof document === 'undefined') return null;\n const prefix = `${OC_SKIN_COOKIE}=`;\n for (const part of document.cookie.split(';')) {\n const trimmed = part.trim();\n if (trimmed.startsWith(prefix)) {\n const v = decodeURIComponent(trimmed.slice(prefix.length));\n return v.length > 0 ? v : null;\n }\n }\n return null;\n}\n\nfunction writeSkinCookie(value: string): void {\n if (typeof document === 'undefined') return;\n const isLocal =\n location.hostname === 'localhost' || location.hostname === '127.0.0.1';\n const parts = [\n `${OC_SKIN_COOKIE}=${encodeURIComponent(value)}`,\n 'Path=/',\n `Max-Age=${ONE_YEAR}`,\n 'SameSite=Lax',\n ];\n if (!isLocal) {\n parts.push('Domain=.ochk.io');\n parts.push('Secure');\n }\n document.cookie = parts.join('; ');\n}\n\nfunction applyAttr(skin: string): void {\n if (typeof document === 'undefined') return;\n document.documentElement.setAttribute(ATTR, skin);\n}\n\nfunction readMotionCookie(): OcMotion | null {\n if (typeof document === 'undefined') return null;\n const prefix = `${OC_MOTION_COOKIE}=`;\n for (const part of document.cookie.split(';')) {\n const trimmed = part.trim();\n if (trimmed.startsWith(prefix)) {\n const v = decodeURIComponent(trimmed.slice(prefix.length));\n return v === 'off' ? 'off' : v === 'on' ? 'on' : null;\n }\n }\n return null;\n}\n\nfunction writeMotionCookie(value: OcMotion): void {\n if (typeof document === 'undefined') return;\n const isLocal =\n location.hostname === 'localhost' || location.hostname === '127.0.0.1';\n const parts = [\n `${OC_MOTION_COOKIE}=${encodeURIComponent(value)}`,\n 'Path=/',\n `Max-Age=${ONE_YEAR}`,\n 'SameSite=Lax',\n ];\n if (!isLocal) {\n parts.push('Domain=.ochk.io');\n parts.push('Secure');\n }\n document.cookie = parts.join('; ');\n}\n\n/** Attribute is only present when motion is off — absence means the default. */\nfunction applyMotionAttr(motion: OcMotion): void {\n if (typeof document === 'undefined') return;\n if (motion === 'off') document.documentElement.setAttribute(MOTION_ATTR, 'off');\n else document.documentElement.removeAttribute(MOTION_ATTR);\n}\n\n/**\n * Swap the browser chrome (favicon + `<meta name=\"theme-color\">`) to the skin's\n * accent. The real work lives in the global installed by\n * `getOcThemeInitScript()` (so the favicon's original SVG is captured exactly\n * once, before the init script's own first recolor — avoids re-reading an\n * already-swapped data: URI). If the init script wasn't included, fall back to\n * the theme-color swap alone (favicon recolor needs the captured original).\n */\nfunction applySkinChrome(skin: string): void {\n if (typeof window === 'undefined') return;\n if (typeof window.__ocApplySkinChrome === 'function') {\n window.__ocApplySkinChrome(skin);\n return;\n }\n const meta = document.querySelector('meta[name=\"theme-color\"]');\n if (meta) meta.setAttribute('content', accentFor(skin));\n}\n\ninterface OcSkinContextValue {\n /** Current skin id (always resolved to a known theme). */\n skin: string;\n /** Set the skin: validates, applies the attribute, persists the cookie. */\n setSkin: (id: string) => void;\n /** The full registry, for rendering a picker. */\n themes: readonly OcTheme[];\n /** Ambient-motion switch ('off' pauses aurora + every `.oc-ambient`). */\n motion: OcMotion;\n /** Set ambient motion: applies the attribute, persists the cookie. */\n setMotion: (value: OcMotion) => void;\n}\n\nconst OcSkinContext = createContext<OcSkinContextValue | null>(null);\n\nexport interface OcThemeProviderProps {\n children: ReactNode;\n /** Skin to assume before the cookie is read (defaults to `orangecheck`). */\n defaultSkin?: string;\n /**\n * The ambient bitcoin-aurora background. `true` (default) renders it behind\n * the app; `false` disables it; `{ intensity }` tunes its strength for this\n * site (e.g. `aurora={{ intensity: 0.5 }}` on a reading-heavy surface).\n * OcAuroraGL (the silk-field upgrade) is ON by default (the CSS blobs\n * remain the permanent floor under every failure path). Reading- and\n * console-heavy surfaces opt OUT with `{ gl: false }`.\n */\n aurora?: boolean | { intensity?: number; gl?: boolean };\n}\n\nexport function OcThemeProvider({\n children,\n defaultSkin = DEFAULT_OC_THEME,\n aurora = true,\n}: OcThemeProviderProps) {\n const [skin, setSkinState] = useState<string>(() => resolveTheme(defaultSkin));\n const [motion, setMotionState] = useState<OcMotion>('on');\n const hydratedRef = useRef(false);\n\n // Hydrate from the cookies once on mount and align the attributes.\n useEffect(() => {\n if (hydratedRef.current) return;\n hydratedRef.current = true;\n const fromCookie = resolveTheme(readSkinCookie() ?? defaultSkin);\n applyAttr(fromCookie);\n applySkinChrome(fromCookie);\n setSkinState(fromCookie);\n const motionCookie = readMotionCookie() ?? 'on';\n applyMotionAttr(motionCookie);\n setMotionState(motionCookie);\n }, [defaultSkin]);\n\n // Cross-site pickup: re-read the cookies when the tab regains focus.\n useEffect(() => {\n function sync() {\n const fromCookie = resolveTheme(readSkinCookie() ?? skin);\n if (fromCookie !== skin) {\n applyAttr(fromCookie);\n applySkinChrome(fromCookie);\n setSkinState(fromCookie);\n }\n const motionCookie = readMotionCookie() ?? 'on';\n if (motionCookie !== motion) {\n applyMotionAttr(motionCookie);\n setMotionState(motionCookie);\n }\n }\n window.addEventListener('focus', sync);\n document.addEventListener('visibilitychange', sync);\n return () => {\n window.removeEventListener('focus', sync);\n document.removeEventListener('visibilitychange', sync);\n };\n }, [skin, motion]);\n\n const setSkin = useCallback((id: string) => {\n const next = resolveTheme(id);\n applyAttr(next);\n applySkinChrome(next);\n writeSkinCookie(next);\n setSkinState(next);\n }, []);\n\n const setMotion = useCallback((value: OcMotion) => {\n const next: OcMotion = value === 'off' ? 'off' : 'on';\n applyMotionAttr(next);\n writeMotionCookie(next);\n setMotionState(next);\n }, []);\n\n const value = useMemo<OcSkinContextValue>(\n () => ({ skin, setSkin, themes: OC_THEMES, motion, setMotion }),\n [skin, setSkin, motion, setMotion]\n );\n\n return (\n <OcSkinContext.Provider value={value}>\n {aurora !== false && (\n <OcAurora\n intensity={typeof aurora === 'object' ? aurora.intensity : undefined}\n // OcAuroraGL is the family default (aurora depth R2): a bare\n // provider, `aurora={true}`, or an object without `gl` opts\n // IN. Reading/console surfaces opt OUT with `gl: false`.\n gl={typeof aurora === 'object' ? (aurora.gl ?? true) : true}\n />\n )}\n {children}\n </OcSkinContext.Provider>\n );\n}\n\n/** Read the current skin + setter. Throws if used outside `OcThemeProvider`. */\nexport function useOcSkin(): OcSkinContextValue {\n const ctx = useContext(OcSkinContext);\n if (!ctx) {\n throw new Error('useOcSkin must be used within <OcThemeProvider>');\n }\n return ctx;\n}\n\n/**\n * Read the ambient-motion switch + setter. The WCAG 2.2.2 pause mechanism:\n * `'off'` sets `data-oc-motion=\"off\"` on `<html>` (persisted family-wide in the\n * `oc_motion` cookie), which pauses the aurora and any `.oc-ambient` element.\n * Throws if used outside `OcThemeProvider`.\n */\nexport function useOcMotion(): { motion: OcMotion; setMotion: (value: OcMotion) => void } {\n const { motion, setMotion } = useOcSkin();\n return { motion, setMotion };\n}\n\n/**\n * Blocking init script for `_document` (Pages Router) `<Head>`. Applies the\n * cookie's skin to `<html>` before first paint so there is no flash of the\n * default skin. Inject with:\n *\n * <script dangerouslySetInnerHTML={{ __html: getOcThemeInitScript() }} />\n */\nexport function getOcThemeInitScript(defaultSkin: string = DEFAULT_OC_THEME): string {\n // Self-contained IIFE — no imports available at parse time. Beyond applying\n // the skin attribute before first paint, it installs `window.__ocApplySkinChrome`\n // (the single owner of the favicon + theme-color swap) and runs it for the\n // saved skin. OcThemeProvider re-invokes the same global on later changes, so\n // the favicon's *original* SVG is captured exactly once (before any recolor)\n // and re-recolored from `#f97316` to the active skin's accent. The favicon\n // recolor is async (a fetch of the same-origin favicon.svg) — chrome updates\n // a beat after paint, which is fine; the skin attribute itself is synchronous.\n const accents = Object.fromEntries(OC_THEMES.map((t) => [t.id, t.accent]));\n return (\n `(function(){` +\n `var ACC=${JSON.stringify(accents)},DEF=${JSON.stringify(defaultSkin)},ORIG=${JSON.stringify(OC_DEFAULT_ACCENT)},fav=null;` +\n `function acc(s){return ACC[s]||ACC[DEF]||ORIG;}` +\n `window.__ocApplySkinChrome=function(s){try{` +\n `var a=acc(s);` +\n `var meta=document.querySelector('meta[name=\"theme-color\"]');if(meta){meta.setAttribute('content',a);}` +\n `var link=document.querySelector('link[rel~=\"icon\"][type=\"image/svg+xml\"]');if(!link){return;}` +\n `var paint=function(svg){link.setAttribute('href','data:image/svg+xml,'+encodeURIComponent(svg.split(ORIG).join(a)));};` +\n `if(fav!=null){paint(fav);return;}` +\n `var h=link.getAttribute('href');if(!h||h.indexOf('data:')===0){return;}` +\n `fetch(h).then(function(r){return r.text();}).then(function(svg){fav=svg;paint(svg);}).catch(function(){});` +\n `}catch(e){}};` +\n `try{var m=document.cookie.match(/(?:^|; )${OC_SKIN_COOKIE}=([^;]*)/);var s=m?decodeURIComponent(m[1]):DEF;if(!s){s=DEF;}` +\n `document.documentElement.setAttribute('${ATTR}',s);window.__ocApplySkinChrome(s);}` +\n `catch(e){document.documentElement.setAttribute('${ATTR}',DEF);}` +\n // Ambient-motion pause (oc_motion cookie) applied before first paint so\n // a paused choice never flashes a moving frame. Absence = motion on.\n `try{var mm=document.cookie.match(/(?:^|; )${OC_MOTION_COOKIE}=([^;]*)/);` +\n `if(mm&&decodeURIComponent(mm[1])==='off'){document.documentElement.setAttribute('${MOTION_ATTR}','off');}}` +\n `catch(e){}` +\n `})();`\n );\n}\n","'use client';\n\nimport { Check, Monitor, Moon, Palette, Pause, Sun, Waves } from 'lucide-react';\nimport { useTheme } from 'next-themes';\nimport { useEffect, useRef, useState } from 'react';\n\nimport { cn } from './cn';\nimport { useOcMotion, useOcSkin } from './provider';\n\n/**\n * OcAppearanceMenu — the single header control for ALL appearance settings.\n *\n * One icon button opens a dropdown with both axes:\n * • mode — light / dark / system (next-themes `.dark` class)\n * • theme — the registered skins (data-oc-theme, persisted .ochk.io)\n *\n * Replaces the separate `ThemeToggle` + `OcThemePicker` so every family site\n * carries exactly one appearance control. Self-contained dropdown (no Radix):\n * outside-click + Escape to close. Requires `<OcThemeProvider>` above it (skin\n * axis) and a next-themes `<ThemeProvider>` (mode axis) — both already mounted\n * on every family site.\n */\nexport interface OcAppearanceMenuProps {\n className?: string;\n triggerClassName?: string;\n popoverClassName?: string;\n}\n\nconst MODES = [\n { id: 'light', label: 'light', Icon: Sun },\n { id: 'dark', label: 'dark', Icon: Moon },\n { id: 'system', label: 'system', Icon: Monitor },\n] as const;\n\n/**\n * AppearanceControls — the mode segment + skin list, with no trigger/popover\n * chrome of its own. Embed it anywhere a surface wants to host appearance\n * settings inline (the standalone OcAppearanceMenu popover, the mobile account\n * menu, a site's Sheet drawer). Requires `<OcThemeProvider>` + next-themes\n * above it, like OcAppearanceMenu.\n */\nexport function AppearanceControls({ className }: { className?: string }) {\n const { skin, setSkin, themes } = useOcSkin();\n const { motion, setMotion } = useOcMotion();\n const { theme, setTheme } = useTheme();\n const [mounted, setMounted] = useState(false);\n useEffect(() => setMounted(true), []);\n const activeMode = mounted ? (theme ?? 'system') : null;\n const activeMotion = mounted ? motion : null;\n\n return (\n <div className={className}>\n <div className=\"label-mono text-muted-foreground px-3 pt-3 pb-2\">mode</div>\n <div className=\"grid grid-cols-3 gap-1 px-2 pb-2\">\n {MODES.map(({ id, label, Icon }) => {\n const active = activeMode === id;\n return (\n <button\n key={id}\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n onClick={() => setTheme(id)}\n className={cn(\n 'flex flex-col items-center gap-1 rounded-md border py-2 text-[11px] transition-colors',\n active\n ? 'border-primary text-foreground bg-accent'\n : 'border-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground'\n )}\n >\n <Icon className=\"size-4\" aria-hidden />\n {label}\n </button>\n );\n })}\n </div>\n <div className=\"label-mono text-muted-foreground border-t px-3 pt-3 pb-1\">theme</div>\n <ul className=\"pb-1\">\n {themes.map((t) => {\n const active = t.id === skin;\n return (\n <li key={t.id}>\n <button\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n onClick={() => setSkin(t.id)}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground flex w-full items-start gap-2 px-3 py-2 text-left transition-colors',\n active && 'text-foreground'\n )}\n >\n <span className=\"mt-0.5 size-4 shrink-0\">\n {active && <Check className=\"text-primary size-4\" aria-hidden />}\n </span>\n <span className=\"min-w-0\">\n <span className=\"block text-sm font-medium\">{t.label}</span>\n <span className=\"text-muted-foreground block text-xs leading-snug\">\n {t.description}\n </span>\n </span>\n </button>\n </li>\n );\n })}\n </ul>\n <div className=\"label-mono text-muted-foreground border-t px-3 pt-3 pb-2\">\n ambient motion\n </div>\n <div className=\"grid grid-cols-2 gap-1 px-2 pb-3\">\n {(\n [\n { id: 'on', label: 'on', Icon: Waves },\n { id: 'off', label: 'off', Icon: Pause },\n ] as const\n ).map(({ id, label, Icon }) => {\n const active = activeMotion === id;\n return (\n <button\n key={id}\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n aria-label={id === 'off' ? 'pause ambient motion' : 'ambient motion on'}\n onClick={() => setMotion(id)}\n className={cn(\n 'flex flex-col items-center gap-1 rounded-md border py-2 text-[11px] transition-colors',\n active\n ? 'border-primary text-foreground bg-accent'\n : 'border-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground'\n )}\n >\n <Icon className=\"size-4\" aria-hidden />\n {label}\n </button>\n );\n })}\n </div>\n </div>\n );\n}\n\nexport function OcAppearanceMenu({\n className,\n triggerClassName,\n popoverClassName,\n}: OcAppearanceMenuProps) {\n const [open, setOpen] = useState(false);\n const rootRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (!open) return;\n function onDown(e: MouseEvent) {\n if (rootRef.current && !rootRef.current.contains(e.target as Node)) setOpen(false);\n }\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setOpen(false);\n }\n document.addEventListener('mousedown', onDown);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onDown);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n return (\n <div ref={rootRef} className={cn('relative', className)}>\n <button\n type=\"button\"\n aria-label=\"appearance settings\"\n aria-haspopup=\"menu\"\n aria-expanded={open}\n title=\"appearance · mode + theme\"\n onClick={() => setOpen((v) => !v)}\n className={cn(\n 'text-muted-foreground hover:text-foreground inline-flex size-9 items-center justify-center rounded-md transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50',\n triggerClassName\n )}\n >\n <Palette className=\"size-4\" aria-hidden />\n </button>\n\n {open && (\n <div\n role=\"menu\"\n className={cn(\n 'bg-popover text-popover-foreground absolute right-0 z-50 mt-2 w-64 overflow-hidden rounded-md border shadow-md',\n popoverClassName\n )}\n >\n <AppearanceControls />\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport Link from 'next/link';\nimport { useEffect, useRef, useState, type ReactNode } from 'react';\nimport { Check, Copy, Loader2, Menu, Plus, X } from 'lucide-react';\nimport {\n fetchOcLinkedIdentities,\n useOcSession,\n type DisplayIdentity,\n type DisplayIdentityKind,\n type OcAccountSummary,\n type OcLinkedIdentity,\n type OcSignOutScope,\n} from '@orangecheck/auth-client';\n\nimport { AppearanceControls } from '../tokens/appearance-menu';\nimport { cn } from '../tokens/cn';\nimport type { EcosystemSlug } from './ecosystem-switcher';\nimport { findFamilyProperty, type SiteState } from './family-properties';\n\n/**\n * `<OcAccountMenu>` — the canonical top-right account affordance for\n * every family site. Replaces the older inline-styled `OcAccountChip`\n * from `@orangecheck/auth-client` with a Tailwind-styled, fully\n * configurable, cross-site-aware dropdown.\n *\n * Three explicit visual states:\n *\n * 1. **Pre-hydration / loading** — neutral `sign in` placeholder so\n * the header never goes blank on first paint.\n * 2. **Anonymous / error** — primary-styled `sign in` CTA pointing\n * at the site's local `/signin` (or whatever `signInUrl` you\n * pass).\n * 3. **Authenticated** — pill with a primary-tinted signal dot and\n * shortened did_oc (or display name if set); click → popover\n * with the full did_oc as a one-click copy-to-clipboard row,\n * optional site-specific menu items, family dashboard link,\n * sign-out, and an optional BuildFooter showing site name +\n * version + commit sha → GitHub.\n *\n * Cross-site recognition: the component re-fetches the session on\n * `visibilitychange` and `focus` events, so when a user signs in at a\n * sibling site (ochk.io, attest.ochk.io, etc.) and tabs back, the\n * chip flips from \"sign in\" to \"signed in\" without a hard reload.\n *\n * The component reads `useOcSession()` from `@orangecheck/auth-client`,\n * so the consuming app must mount `<OcSessionProvider>` somewhere in\n * its tree (already standard in every consumer's `_app.tsx`).\n */\n\nexport interface OcAccountMenuItem {\n /** Same-origin path or absolute URL. */\n href: string;\n /** Visible label. */\n label: string;\n /**\n * When `true`, opens in a new tab and renders a ↗ glyph after the\n * label. Use for cross-domain links (e.g. `https://ochk.io/dashboard`).\n */\n external?: boolean;\n}\n\nexport interface OcAccountMenuBuildInfo {\n /** Display version string, e.g. `'0.5.0'` (rendered as `v0.5.0`). */\n version: string;\n /**\n * 7+ character commit SHA. Render as `'dev'` (or omit) for local\n * dev to suppress the GitHub link.\n */\n sha?: string;\n /**\n * GitHub `owner/repo` slug — combined with `sha` to produce the\n * `https://github.com/<repo>/commit/<sha>` link.\n */\n repo?: string;\n}\n\n/**\n * Minimal session shape `<OcAccountMenuView>` needs. Compatible with\n * `useOcSession()`'s return value but explicit so consumers running\n * their own auth context (e.g. oc-www's local `useAuth`) can pass an\n * adapter without depending on `@orangecheck/auth-client`'s exact\n * types.\n */\nexport interface OcAccountMenuSession {\n status: 'loading' | 'authenticated' | 'anonymous' | 'error';\n account: {\n didOc: string;\n displayName: string | null;\n /**\n * The identity the user has promoted as their badge label —\n * `{ kind, value }`, always populated (defaults to the did).\n * Drives the collapsed-trigger label and the active row in the\n * \"show as\" promote list.\n */\n displayIdentity: DisplayIdentity;\n /** The user's Nostr npub, when set — a promotable badge\n * identity that (unlike btc/email) is a profile field, not a\n * linked-identity row, so it is read from the session. */\n nostrNpub?: string | null;\n } | null;\n /**\n * Sign out. Accepts an optional `{ scope }` so the multi-account\n * \"leave this account\" affordance can route through the same hook.\n * Defaults to `'all'` for back-compat.\n */\n signOut: (opts?: { scope?: OcSignOutScope }) => void | Promise<void>;\n refresh: () => void | Promise<void>;\n /**\n * Promote a linked identity to be the badge label across every\n * `.ochk.io` site. The connected `<OcAccountMenu>` wires this to\n * `useOcSession().setDisplayIdentity`; a site running its own auth\n * context passes its own equivalent.\n */\n setDisplayIdentity: (kind: DisplayIdentityKind) => Promise<void>;\n /**\n * Multi-account roster · other accounts in this browser the user\n * can switch to without re-authenticating. Optional: when omitted\n * (or empty), the `§ accounts` section in `<OcAccountMenu>` is\n * suppressed and the menu renders as single-account. Sites that\n * own their auth context (e.g. oc-www's local `useAuth`) can leave\n * this unset until they add multi-account support.\n */\n roster?: OcAccountSummary[];\n /**\n * Multi-account · flip the active session to the given did_oc.\n * Required when `roster` is non-empty (otherwise the picker rows\n * have nowhere to call).\n */\n switchAccount?: (didOc: string) => Promise<void>;\n /**\n * Multi-account · URL for the \"add another account\" entry point.\n * Defaults to `/signin?add=1` when omitted, which works for every\n * `.ochk.io` family site (in-place sign-in supports the query\n * param by default).\n */\n addAccountUrl?: (returnTo?: string) => string;\n /**\n * Per-tab pinning · `true` when this tab holds its own session\n * token and operates as `account` independently of the shared\n * `.ochk.io` cookie (switching accounts in another tab won't\n * change this one). Renders a quiet `· this tab` hint in the\n * signed-in header. Optional — omitted by pre-pinning auth\n * contexts.\n */\n tabPinned?: boolean;\n}\n\nexport interface OcAccountMenuProps {\n /**\n * Which family property this site IS. Used to label the section\n * header (`§ signed in · vault.ochk.io`) and to suppress the\n * family-dashboard menu item when the user is already on `home`.\n */\n current: EcosystemSlug;\n /**\n * Where the anonymous \"sign in\" affordance points. Default `'/signin'`\n * — works with every site's in-place `<OcSignIn>` page. Pass\n * `'https://ochk.io/signin'` if you want to bounce to the auth host\n * instead.\n */\n signInUrl?: string;\n /** Label for the anonymous \"sign in\" affordance. Default `'sign in'`. */\n signInLabel?: string;\n /**\n * Where the browser lands after the user signs out. Default `'/'`\n * — the current site's own home. On sign-out the menu fires\n * `signOut()` (whose logout round-trip is `keepalive`, so it\n * survives the navigation) and *immediately* hard-navigates here.\n *\n * Navigating in the same tick is deliberate: it forecloses the\n * race where an auth-gated page observes the session flip to\n * `anonymous` and runs its own redirect-to-sign-in first. Sign-out\n * means \"leave\", not \"go sign in again\" — so the family default is\n * the site's home, never a sign-in page or the auth host.\n */\n signOutRedirect?: string;\n /**\n * Site-specific menu items, rendered between the section header\n * and the family-dashboard / sign-out rows. Keep this short —\n * 2–6 entries is the sweet spot. Pass `[]` (or omit) for sites\n * with no per-site routes worth surfacing.\n */\n menuItems?: ReadonlyArray<OcAccountMenuItem>;\n /**\n * Centered primary nav links (typically dashboard · docs · spec).\n * Rendered inside the popover at viewport widths below `sm`\n * (640px) — these are the same links the `<OcPrimaryNav>` row\n * shows inline at sm+, but at ultra-small widths the inline row\n * hides and this popover section takes its place. The result: one\n * dropdown surface owns navigation on phones, no separate\n * hamburger drawer required.\n */\n primaryNavLinks?: ReadonlyArray<OcAccountMenuItem>;\n /**\n * Tertiary nav links (about / contact / status / privacy / etc.).\n * Always visible inside the popover. Folds the legacy mobile-only\n * hamburger drawer's contents into the same dropdown as everything\n * else, so there's exactly one nav surface to learn.\n */\n secondaryNavLinks?: ReadonlyArray<OcAccountMenuItem>;\n /**\n * When `true` (default), shows a `family dashboard ↗` link to\n * `https://ochk.io/dashboard`. Set `false` for `home` (already\n * there) or for sites that don't want it.\n */\n showFamilyDashboard?: boolean;\n /**\n * Optional BuildFooter info. When present, renders a tiny mono\n * footer at the bottom of the popover with `site · vX.Y.Z · sha`\n * — the SHA links to the matching GitHub commit when `repo` is\n * also provided. Drive this from your `next.config.ts` via\n * `NEXT_PUBLIC_APP_VERSION` / `NEXT_PUBLIC_BUILD_SHA` env vars.\n */\n build?: OcAccountMenuBuildInfo;\n /**\n * Optional lifecycle chip rendered inside the BuildFooter line\n * (between site and version). Mirrors the chip on the logo so\n * both surfaces agree.\n */\n siteState?: SiteState;\n /** className overrides for layout-level customisation. */\n className?: string;\n triggerClassName?: string;\n popoverClassName?: string;\n}\n\n/**\n * Partially obscure an identity value for display — first 6 characters,\n * an ellipsis, last 4. Applied uniformly to every kind (did, Bitcoin\n * address, email, npub) and at every length, so a rendered label never\n * exposes a full identity at rest; the full value stays one click away\n * via the copy affordance. Short values fall back to a 4/3 split so the\n * middle is always masked.\n */\nfunction obscureIdentity(value: string): string {\n if (value.length <= 12) {\n return `${value.slice(0, 4)}…${value.slice(-3)}`;\n }\n return `${value.slice(0, 6)}…${value.slice(-4)}`;\n}\n\n/** Human label for an identity kind, shown as the trailing tag on each\n * promote row. */\nconst IDENTITY_KIND_LABEL: Record<DisplayIdentityKind, string> = {\n did: 'did:oc',\n btc: 'bitcoin',\n email: 'email',\n nostr: 'nostr',\n};\n\n/**\n * Best-effort clipboard write. Prefers the async Clipboard API (the\n * only thing that works off a user gesture in modern browsers), and\n * falls back to a hidden-`<textarea>` + `execCommand('copy')` for\n * non-secure contexts or older engines. Returns `true` on success so\n * the caller can decide whether to show \"copied\" feedback.\n */\nasync function writeClipboard(text: string): Promise<boolean> {\n try {\n if (navigator.clipboard?.writeText) {\n await navigator.clipboard.writeText(text);\n return true;\n }\n } catch {\n // fall through to the legacy path\n }\n try {\n const ta = document.createElement('textarea');\n ta.value = text;\n ta.setAttribute('readonly', '');\n ta.style.position = 'fixed';\n ta.style.top = '-1000px';\n ta.style.opacity = '0';\n document.body.appendChild(ta);\n ta.select();\n const ok = document.execCommand('copy');\n document.body.removeChild(ta);\n return ok;\n } catch {\n return false;\n }\n}\n\n/**\n * The `did_oc` row inside the popover header, rendered as a single\n * one-click copy affordance. Clicking anywhere on the address copies\n * the full `did_oc` to the clipboard and flips the trailing glyph\n * from a copy icon to a check for ~1.6s. The popover deliberately\n * stays open so the user sees the confirmation. A visually-hidden\n * `aria-live` region announces the result to screen readers.\n *\n * This is the canonical pattern for surfacing a copyable OrangeCheck\n * identity — every family site gets it for free via `<OcAccountMenu>`.\n */\nfunction CopyableDid({ did }: { did: string }) {\n const [copied, setCopied] = useState(false);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(\n () => () => {\n if (timerRef.current) clearTimeout(timerRef.current);\n },\n [],\n );\n\n const onCopy = async () => {\n const ok = await writeClipboard(did);\n if (!ok) return;\n setCopied(true);\n if (timerRef.current) clearTimeout(timerRef.current);\n timerRef.current = setTimeout(() => setCopied(false), 1600);\n };\n\n return (\n <button\n type=\"button\"\n onClick={onCopy}\n aria-label={\n copied\n ? 'OrangeCheck identity copied to clipboard'\n : `Copy OrangeCheck identity ${did} to clipboard`\n }\n title=\"Copy identity\"\n data-oc-account-menu-copy-did=\"\"\n data-copied={copied ? '' : undefined}\n className=\"group/did hover:bg-accent focus-visible:ring-ring/60 -mx-1.5 mt-px flex w-[calc(100%+0.75rem)] items-start gap-1.5 rounded px-1.5 py-1 text-left transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n >\n <span className=\"text-foreground/90 min-w-0 flex-1 font-mono text-[11px] leading-tight break-all\">\n {did}\n </span>\n <span\n className={\n 'mt-px shrink-0 transition-colors ' +\n (copied\n ? 'text-primary'\n : 'text-muted-foreground/50 group-hover/did:text-foreground/80')\n }\n aria-hidden\n >\n {copied ? <Check className=\"size-3.5\" /> : <Copy className=\"size-3.5\" />}\n </span>\n <span className=\"sr-only\" aria-live=\"polite\">\n {copied ? 'Copied to clipboard' : ''}\n </span>\n </button>\n );\n}\n\n/**\n * One row in the \"§ show as\" list — a promote control and an\n * independent copy-to-clipboard affordance.\n *\n * The value is always rendered partially obscured (`obscureIdentity`).\n * The row body is a radio that promotes this identity to the badge\n * label; the trailing copy button writes the *full* value to the\n * clipboard via the same `writeClipboard` path as the did row (async\n * Clipboard API, hidden-`<textarea>` fallback — works on touch devices\n * and non-secure contexts). Copy and promote are deliberately separate\n * controls: one selects the identity, the other extracts it.\n */\nfunction PromoteRow({\n kind,\n value,\n active,\n busy,\n disabled,\n onPromote,\n}: {\n kind: DisplayIdentityKind;\n value: string;\n active: boolean;\n busy: boolean;\n disabled: boolean;\n onPromote: () => void;\n}) {\n const [copied, setCopied] = useState(false);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(\n () => () => {\n if (timerRef.current) clearTimeout(timerRef.current);\n },\n [],\n );\n\n const onCopy = async () => {\n const ok = await writeClipboard(value);\n if (!ok) return;\n setCopied(true);\n if (timerRef.current) clearTimeout(timerRef.current);\n timerRef.current = setTimeout(() => setCopied(false), 1600);\n };\n\n const kindLabel = IDENTITY_KIND_LABEL[kind];\n\n return (\n <div\n className=\"hover:bg-accent flex items-center gap-1 pr-2 transition-colors\"\n data-oc-account-menu-promote-row={kind}\n data-active={active ? '' : undefined}\n >\n <button\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n aria-label={active ? `Showing as ${kindLabel}` : `Show as ${kindLabel}`}\n disabled={disabled || active}\n onClick={onPromote}\n data-oc-account-menu-promote={kind}\n className=\"flex min-w-0 flex-1 items-center gap-2 py-2 pl-3 text-left font-mono text-[11px] tracking-wide disabled:cursor-default\"\n >\n <span\n className={\n 'flex size-3.5 shrink-0 items-center justify-center rounded-full border ' +\n (active ? 'border-primary' : 'border-muted-foreground/40')\n }\n aria-hidden\n >\n {active ? <span className=\"bg-primary size-1.5 rounded-full\" /> : null}\n </span>\n <span className=\"text-foreground/90 min-w-0 flex-1 truncate\">\n {obscureIdentity(value)}\n </span>\n </button>\n <button\n type=\"button\"\n onClick={() => void onCopy()}\n aria-label={\n copied ? `${kindLabel} copied to clipboard` : `Copy ${kindLabel} to clipboard`\n }\n title=\"Copy\"\n data-oc-account-menu-promote-copy={kind}\n data-copied={copied ? '' : undefined}\n className=\"hover:bg-background/70 focus-visible:ring-ring/60 flex size-6 shrink-0 items-center justify-center rounded transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n >\n {copied ? (\n <Check className=\"text-primary size-3.5\" />\n ) : (\n <Copy className=\"text-muted-foreground/50 size-3.5\" />\n )}\n </button>\n <span className=\"text-muted-foreground/50 w-14 shrink-0 text-right text-[9px] tracking-widest uppercase\">\n {busy ? <Loader2 className=\"ml-auto size-3 animate-spin\" /> : kindLabel}\n </span>\n <span className=\"sr-only\" aria-live=\"polite\">\n {copied ? 'Copied to clipboard' : ''}\n </span>\n </div>\n );\n}\n\n/**\n * The \"§ show as\" block inside the popover — lists the user's\n * identities and lets them promote one as the badge label across\n * every `.ochk.io` site.\n *\n * The did is always an option (read from the session); the npub too\n * when set. The Bitcoin address and email are *linked identities*, so\n * they're lazy-fetched from the auth host the first time the popover\n * opens — `fetchOcLinkedIdentities()` is one credentialed request,\n * cached for the menu's lifetime. The section renders only once that\n * resolves and only when there are ≥2 identities worth choosing\n * between; with a single identity there is nothing to promote.\n *\n * Promotion calls `setDisplayIdentity(kind)` — which PATCHes the auth\n * host, re-mints the cross-subdomain cookie, and refreshes the session\n * — so the selected row and the collapsed label update in place and\n * every other family tab picks the choice up on its next focus.\n */\nfunction IdentityPromoteSection({\n didOc,\n nostrNpub,\n current,\n open,\n setDisplayIdentity,\n}: {\n didOc: string;\n nostrNpub: string | null;\n current: DisplayIdentity;\n open: boolean;\n setDisplayIdentity: (kind: DisplayIdentityKind) => Promise<void>;\n}) {\n const [identities, setIdentities] = useState<OcLinkedIdentity[] | null>(null);\n const [loadFailed, setLoadFailed] = useState(false);\n const [promoting, setPromoting] = useState<DisplayIdentityKind | null>(null);\n const [promoteErr, setPromoteErr] = useState<string | null>(null);\n // Track the (open-state, account) we last fetched for. Refetch when\n // didOc changes — multi-account switches swap which account's linked\n // identities should appear here, and stale data manifested as the\n // popover visibly reflowing mid-switch (\"dropdown freaking out\").\n const lastFetchKeyRef = useRef<string | null>(null);\n\n useEffect(() => {\n if (!open) return;\n // Fetch on first open AND whenever the active didOc changes.\n if (lastFetchKeyRef.current === didOc) return;\n lastFetchKeyRef.current = didOc;\n let cancelled = false;\n // Reset so the section briefly returns null (suppresses flash)\n // until the new account's identities resolve.\n setIdentities(null);\n setLoadFailed(false);\n void fetchOcLinkedIdentities()\n .then((rows) => {\n if (!cancelled) setIdentities(rows);\n })\n .catch(() => {\n if (!cancelled) setLoadFailed(true);\n });\n return () => {\n cancelled = true;\n };\n }, [open, didOc]);\n\n // Wait for the fetch to settle before rendering — avoids a section\n // that flashes in then vanishes.\n if (identities === null && !loadFailed) return null;\n\n const btc =\n identities?.find((i) => i.kind === 'btc' && i.is_primary && i.value) ??\n identities?.find((i) => i.kind === 'btc' && i.value);\n const email =\n identities?.find((i) => i.kind === 'email' && i.is_primary && i.value) ??\n identities?.find((i) => i.kind === 'email' && i.value);\n\n const options: Array<{ kind: DisplayIdentityKind; value: string }> = [\n { kind: 'did', value: didOc },\n ];\n if (btc?.value) options.push({ kind: 'btc', value: btc.value });\n if (email?.value) options.push({ kind: 'email', value: email.value });\n if (nostrNpub) options.push({ kind: 'nostr', value: nostrNpub });\n\n // Nothing to choose between → no section.\n if (options.length < 2) return null;\n\n const promote = async (kind: DisplayIdentityKind) => {\n if (promoting || kind === current.kind) return;\n setPromoting(kind);\n setPromoteErr(null);\n try {\n await setDisplayIdentity(kind);\n } catch (e) {\n setPromoteErr(e instanceof Error ? e.message : 'promotion failed');\n } finally {\n setPromoting(null);\n }\n };\n\n return (\n <div className=\"border-border border-b p-1\" data-oc-account-menu-section=\"show-as\">\n <div className=\"text-muted-foreground/60 px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § show as\n </div>\n {options.map((opt) => (\n <PromoteRow\n key={opt.kind}\n kind={opt.kind}\n value={opt.value}\n active={opt.kind === current.kind}\n busy={promoting === opt.kind}\n disabled={promoting !== null}\n onPromote={() => void promote(opt.kind)}\n />\n ))}\n {promoteErr ? (\n <div className=\"text-destructive/80 px-3 pt-1 pb-2 font-mono text-[10px]\">\n {promoteErr}\n </div>\n ) : null}\n </div>\n );\n}\n\n/**\n * Connected variant — pulls the session from `useOcSession()`. This is\n * what every consumer site with `<OcSessionProvider>` mounted should\n * use. For sites running a parallel auth context (e.g. oc-www's local\n * `useAuth`), use `<OcAccountMenuView>` below and pass a session prop\n * directly.\n */\nexport function OcAccountMenu(props: OcAccountMenuProps) {\n const session = useOcSession();\n return (\n <OcAccountMenuView\n {...props}\n session={{\n status: session.status,\n account: session.account\n ? {\n didOc: session.account.didOc,\n displayName: session.account.displayName ?? null,\n displayIdentity: session.account.displayIdentity,\n nostrNpub: session.account.nostrNpub ?? null,\n }\n : null,\n signOut: session.signOut,\n refresh: session.refresh,\n setDisplayIdentity: session.setDisplayIdentity,\n // Multi-account · the connected variant always forwards\n // these from useOcSession(). The View variant accepts\n // them as optional so sites running their own auth\n // context (oc-www) can opt in incrementally.\n roster: session.roster,\n switchAccount: session.switchAccount,\n addAccountUrl: session.addAccountUrl,\n // Structural read keeps the auth-client peer floor at\n // ^2.17.0 — `tabPinned` ships in 2.18.0 and is simply\n // undefined (no hint) on older providers.\n tabPinned: (session as { tabPinned?: boolean }).tabPinned,\n }}\n />\n );\n}\n\nexport interface OcAccountMenuViewProps extends OcAccountMenuProps {\n /**\n * The session to render. When using `<OcAccountMenuView>` directly\n * (rather than the connected `<OcAccountMenu>`), pass an adapter\n * over your local auth context.\n */\n session: OcAccountMenuSession;\n}\n\n/**\n * Presentational variant — takes a session as an explicit prop. Use\n * this when your site runs its own auth context (e.g. ochk.io's\n * local `useAuth`) and you want the family-consistent visual without\n * mounting `<OcSessionProvider>`.\n */\n/**\n * MobileMenu — the `☰` rendered to the LEFT of the identity chip on phones\n * (`md:hidden`). Holds the site's nav links (primary + secondary) and the\n * appearance controls (mode + skin), so the mobile header is just\n * `[☰][identity]` with the theme folded in — no centered hamburger, no\n * standalone palette. Auth-independent: present whether signed in or out.\n */\nfunction MobileMenu({\n primary,\n secondary,\n}: {\n primary?: ReadonlyArray<OcAccountMenuItem>;\n secondary?: ReadonlyArray<OcAccountMenuItem>;\n}) {\n const [open, setOpen] = useState(false);\n const ref = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (!open) return;\n const onClick = (e: MouseEvent) => {\n if (ref.current && !ref.current.contains(e.target as Node)) setOpen(false);\n };\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') setOpen(false);\n };\n document.addEventListener('mousedown', onClick);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onClick);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n const links = [...(primary ?? []), ...(secondary ?? [])];\n const rowCls =\n 'font-display flex items-center gap-2 px-3 py-2 text-[12px] font-semibold tracking-wider uppercase text-muted-foreground hover:text-foreground hover:bg-accent transition-colors';\n\n return (\n <div ref={ref} className=\"relative md:hidden\" data-oc-account-mobile-menu=\"\">\n <button\n type=\"button\"\n onClick={() => setOpen((v) => !v)}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-label=\"menu\"\n className=\"border-input bg-background hover:bg-accent text-muted-foreground inline-flex size-8 items-center justify-center rounded-md border transition-colors\"\n data-oc-account-mobile-toggle=\"\"\n >\n {open ? <X className=\"size-4\" aria-hidden /> : <Menu className=\"size-4\" aria-hidden />}\n </button>\n {open && (\n <div\n role=\"menu\"\n aria-label=\"menu\"\n className=\"border-border bg-popover text-popover-foreground absolute top-[calc(100%+6px)] right-0 z-50 w-[min(16rem,calc(100vw-1rem))] overflow-hidden border shadow-xl\"\n data-oc-account-mobile-popover=\"\"\n >\n {links.length > 0 && (\n <div className=\"border-b p-1\">\n <div className=\"text-muted-foreground/60 px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § navigate\n </div>\n {links.map((l) =>\n l.external ? (\n <a\n key={l.href}\n href={l.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n role=\"menuitem\"\n onClick={() => setOpen(false)}\n className={rowCls}\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{l.label}</span>\n <span className=\"text-muted-foreground/70 text-[10px]\" aria-hidden>\n ↗\n </span>\n </a>\n ) : (\n <Link\n key={l.href}\n href={l.href}\n role=\"menuitem\"\n onClick={() => setOpen(false)}\n className={rowCls}\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{l.label}</span>\n </Link>\n )\n )}\n </div>\n )}\n <AppearanceControls />\n </div>\n )}\n </div>\n );\n}\n\nexport function OcAccountMenuView({\n current,\n signInUrl = '/signin',\n signInLabel = 'sign in',\n signOutRedirect = '/',\n menuItems,\n primaryNavLinks,\n secondaryNavLinks,\n showFamilyDashboard,\n build,\n siteState,\n className,\n triggerClassName,\n popoverClassName,\n session,\n}: OcAccountMenuViewProps) {\n const {\n status,\n account,\n signOut,\n refresh,\n setDisplayIdentity,\n roster,\n switchAccount,\n addAccountUrl,\n tabPinned,\n } = session;\n const [hydrated, setHydrated] = useState(false);\n const [open, setOpen] = useState(false);\n const wrapRef = useRef<HTMLDivElement | null>(null);\n\n const property = findFamilyProperty(current);\n const hostname = property?.hostname ?? `${current}.ochk.io`;\n const isHome = current === 'home';\n const familyDashboardEnabled = showFamilyDashboard ?? !isHome;\n\n useEffect(() => setHydrated(true), []);\n\n // Cross-site sign-in pickup: re-fetch on visibility / focus.\n useEffect(() => {\n const onWake = () => {\n if (document.visibilityState === 'visible') void refresh();\n };\n const onFocus = () => void refresh();\n document.addEventListener('visibilitychange', onWake);\n window.addEventListener('focus', onFocus);\n return () => {\n document.removeEventListener('visibilitychange', onWake);\n window.removeEventListener('focus', onFocus);\n };\n }, [refresh]);\n\n // Outside-click + Escape close.\n useEffect(() => {\n if (!open) return;\n const onClick = (e: MouseEvent) => {\n if (wrapRef.current && !wrapRef.current.contains(e.target as Node)) setOpen(false);\n };\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') setOpen(false);\n };\n document.addEventListener('mousedown', onClick);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onClick);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n const signInTrigger = (\n <a\n href={signInUrl}\n aria-label={signInLabel}\n data-oc-account-menu-signin=\"\"\n className={\n triggerClassName ??\n 'border-input bg-background hover:bg-accent inline-flex h-8 items-center justify-center rounded-md border px-3 font-mono text-[11px] font-semibold tracking-widest uppercase transition-colors'\n }\n >\n {signInLabel}\n </a>\n );\n\n // The mobile `☰` (nav + appearance) sits to the LEFT of the identity slot\n // on phones; on md+ it's hidden (nav is inline via OcPrimaryNav, appearance\n // is the desktop palette). Only rendered when this site has nav links.\n const hasNav = ((primaryNavLinks?.length ?? 0) + (secondaryNavLinks?.length ?? 0)) > 0;\n const wrap = (identity: ReactNode) => (\n <div className={cn('flex items-center gap-1', className)} data-oc-account-menu=\"\">\n {hasNav ? <MobileMenu primary={primaryNavLinks} secondary={secondaryNavLinks} /> : null}\n {identity}\n </div>\n );\n\n // States 1 + 2: pre-hydration or anonymous — render the same\n // placeholder/CTA so the slot is never empty.\n if (!hydrated || status === 'loading') {\n return wrap(signInTrigger);\n }\n\n if (status !== 'authenticated' || !account) {\n return wrap(signInTrigger);\n }\n\n // Authenticated — pill + popover. The collapsed label is the\n // user's vanity display name if they set one, otherwise the\n // identity they promoted (`displayIdentity` — defaults to their\n // sign-in identity, ultimately the did).\n const displayName = account.displayName ?? null;\n const label = displayName ?? obscureIdentity(account.displayIdentity.value);\n\n return wrap(\n <div ref={wrapRef} className=\"relative inline-block\">\n <button\n type=\"button\"\n onClick={() => setOpen((v) => !v)}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-label={`Signed in as ${account.didOc}. Open account menu.`}\n className={\n triggerClassName ??\n 'border-primary/40 bg-card hover:bg-accent inline-flex h-8 items-center gap-1.5 rounded-md border px-2 font-mono text-[11px] tracking-wide transition-colors sm:px-3'\n }\n data-oc-account-menu-trigger=\"\"\n >\n <span className=\"bg-primary inline-block size-1.5 shrink-0 rounded-full\" aria-hidden />\n {/* Below sm the chip condenses to dot + chevron only — a long\n display name / obscured did otherwise eats a phone header.\n The full label returns from sm up, capped so it can't blow\n out the row. */}\n <span className=\"text-foreground hidden max-w-[16ch] truncate sm:inline\">\n {label}\n </span>\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 10 10\"\n aria-hidden\n className={\n 'opacity-60 transition-transform ' + (open ? 'rotate-180' : 'rotate-0')\n }\n >\n <path\n d=\"M2 4 L5 7 L8 4\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n fill=\"none\"\n strokeLinecap=\"round\"\n />\n </svg>\n </button>\n\n {open && (\n <div\n role=\"menu\"\n aria-label=\"Account menu\"\n className={\n popoverClassName ??\n 'border-border bg-popover text-popover-foreground absolute top-[calc(100%+6px)] right-0 z-50 w-[min(20rem,calc(100vw-1rem))] border shadow-xl'\n }\n data-oc-account-menu-popover=\"\"\n >\n <div className=\"border-border border-b p-3\">\n <div className=\"text-primary mb-1 font-mono text-[10px] tracking-widest uppercase\">\n § signed in · {hostname}\n {tabPinned ? (\n <span\n className=\"text-muted-foreground/70 normal-case\"\n data-oc-account-menu-tab-pin=\"\"\n title=\"This tab keeps this account even if you switch accounts in another tab\"\n >\n {' '}\n · this tab\n </span>\n ) : null}\n </div>\n <CopyableDid did={account.didOc} />\n {/* Which identity this account actually IS (email /\n bitcoin / nostr) — surfaced next to the did so a tab\n signed into a DIFFERENT account than your other tabs\n is obvious at a glance, not buried behind the did.\n The did itself already shows above; skip the\n redundant did kind. */}\n {account.displayIdentity.kind !== 'did' &&\n account.displayIdentity.value ? (\n <div className=\"mt-1 flex items-center gap-1.5 font-mono text-[10px] tracking-wide\">\n <span className=\"text-muted-foreground/50 uppercase\">\n {IDENTITY_KIND_LABEL[account.displayIdentity.kind]}\n </span>\n <span className=\"text-foreground/75\">\n {obscureIdentity(account.displayIdentity.value)}\n </span>\n </div>\n ) : null}\n {displayName ? (\n <div className=\"text-muted-foreground/80 mt-1 font-mono text-[10px] tracking-wide\">\n {displayName}\n </div>\n ) : null}\n </div>\n\n <IdentityPromoteSection\n didOc={account.didOc}\n nostrNpub={account.nostrNpub ?? null}\n current={account.displayIdentity}\n open={open}\n setDisplayIdentity={setDisplayIdentity}\n />\n\n <AccountsSection\n roster={roster ?? []}\n switchAccount={switchAccount}\n addAccountUrl={addAccountUrl}\n signOut={signOut}\n onActionStart={() => setOpen(false)}\n />\n\n {primaryNavLinks && primaryNavLinks.length > 0 ? (\n <PopoverSection\n label=\"navigate\"\n items={primaryNavLinks}\n onItemClick={() => setOpen(false)}\n className=\"hidden md:block\"\n />\n ) : null}\n\n <div className=\"p-1\" data-oc-account-menu-section=\"account\">\n {menuItems?.map((item) => {\n const onClick = () => setOpen(false);\n const cls =\n 'hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors';\n const inner = (\n <>\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{item.label}</span>\n {item.external ? (\n <span\n className=\"text-muted-foreground/70 text-[10px]\"\n aria-hidden\n >\n ↗\n </span>\n ) : null}\n </>\n );\n return item.external ? (\n <a\n key={item.href}\n href={item.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={onClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n {inner}\n </a>\n ) : (\n <Link\n key={item.href}\n href={item.href}\n onClick={onClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n {inner}\n </Link>\n );\n })}\n\n {familyDashboardEnabled ? (\n <a\n href=\"https://ochk.io/dashboard\"\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={() => setOpen(false)}\n role=\"menuitem\"\n className=\"hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors\"\n data-oc-account-menu-item=\"\"\n data-oc-account-menu-family-dashboard=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">family dashboard</span>\n <span\n className=\"text-muted-foreground/70 text-[10px]\"\n aria-hidden\n >\n ↗\n </span>\n </a>\n ) : null}\n\n <button\n type=\"button\"\n role=\"menuitem\"\n onClick={() => {\n setOpen(false);\n // Await the logout round-trip — its response is\n // what clears the `.ochk.io` cookie — and only\n // THEN hard-navigate home. Navigating first\n // (the old behavior) raced the next page's\n // session check against the still-uncleared\n // cookie, so the account badge stayed \"signed\n // in\" until a second sign-out. The hard\n // navigation is a committed browser navigation,\n // so it still wins over any auth-gated page's\n // redirect-to-sign-in effect.\n void (async () => {\n await signOut();\n if (typeof window !== 'undefined') {\n window.location.assign(signOutRedirect);\n }\n })();\n }}\n className=\"hover:bg-accent flex w-full items-center gap-2 px-3 py-2 text-left font-mono text-[11px] tracking-wide transition-colors\"\n data-oc-account-menu-item=\"\"\n data-oc-account-menu-signout=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">sign out</span>\n </button>\n </div>\n\n {secondaryNavLinks && secondaryNavLinks.length > 0 ? (\n <PopoverSection\n label=\"more\"\n items={secondaryNavLinks}\n onItemClick={() => setOpen(false)}\n bordered\n className=\"hidden md:block\"\n />\n ) : null}\n\n {build ? <BuildFooter hostname={hostname} build={build} state={siteState} /> : null}\n </div>\n )}\n </div>\n );\n}\n\n/**\n * Multi-account · `§ accounts` section. Lists the other accounts the\n * user has signed into in this browser (the roster), lets them switch\n * with one click, surfaces an \"Add another account\" entry point that\n * routes through `addAccountUrl()` (the auth host preserves the\n * current roster_id when signing in via `?add=1`), and adapts the\n * sign-out affordance to support `scope: 'current'` per row.\n *\n * Gate: the whole section is suppressed when `addAccountUrl` isn't\n * provided. That's the back-compat signal for sites running a parallel\n * auth context (e.g. oc-www's local `useAuth`) — they can adopt\n * multi-account incrementally by wiring the new props on\n * `OcAccountMenuSession` as they build out support.\n */\nfunction AccountsSection({\n roster,\n switchAccount,\n addAccountUrl,\n signOut,\n onActionStart,\n}: {\n roster: OcAccountSummary[];\n switchAccount: ((didOc: string) => Promise<void>) | undefined;\n addAccountUrl: ((returnTo?: string) => string) | undefined;\n signOut: (opts?: { scope?: OcSignOutScope }) => void | Promise<void>;\n onActionStart: () => void;\n}) {\n const [switching, setSwitching] = useState<string | null>(null);\n const [err, setErr] = useState<string | null>(null);\n\n if (!addAccountUrl) return null;\n\n const onSwitch = async (didOc: string) => {\n if (!switchAccount || switching) return;\n setSwitching(didOc);\n setErr(null);\n try {\n await switchAccount(didOc);\n // Keep the menu open just long enough for the active label\n // to flip; the surrounding popover-close-on-outside-click\n // will pick up the user's next interaction.\n } catch (e) {\n setErr(e instanceof Error ? e.message : 'switch failed');\n } finally {\n setSwitching(null);\n }\n };\n\n return (\n <div className=\"border-border border-b p-1\" data-oc-account-menu-section=\"accounts\">\n <div className=\"text-muted-foreground/60 px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § accounts\n </div>\n {roster.map((peer) => (\n <SwitchRow\n key={peer.didOc}\n peer={peer}\n busy={switching === peer.didOc}\n disabled={switching !== null}\n onSwitch={() => void onSwitch(peer.didOc)}\n />\n ))}\n <a\n href={addAccountUrl()}\n onClick={() => onActionStart()}\n role=\"menuitem\"\n data-oc-account-menu-add-account=\"\"\n className=\"hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors\"\n >\n <Plus className=\"text-muted-foreground size-3.5 shrink-0\" aria-hidden />\n <span className=\"flex-1\">\n {roster.length === 0 ? 'add another account' : 'add another'}\n </span>\n </a>\n {/* \"leave this account\" only makes sense WITH peers in the\n * roster — without them, scope='current' degrades to scope='all'\n * and the parent menu's bottom \"sign out\" row already covers\n * that case. Rendering both produces two identical sign-out\n * affordances; gate on peer count to suppress the duplicate. */}\n {roster.length > 0 ? (\n <button\n type=\"button\"\n role=\"menuitem\"\n onClick={() => {\n onActionStart();\n void (async () => {\n try {\n await signOut({ scope: 'current' });\n } catch {\n // local state still flips · cookie may not\n }\n // No hard-nav · `scope: 'current'` with peers\n // in the roster keeps the browser signed-in to\n // the next-best account; the refresh() inside\n // signOut updates the badge in place.\n })();\n }}\n data-oc-account-menu-leave-current=\"\"\n className=\"hover:bg-accent flex w-full items-center gap-2 px-3 py-2 text-left font-mono text-[11px] tracking-wide transition-colors\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">leave this account</span>\n </button>\n ) : null}\n {err ? (\n <div className=\"text-destructive/80 px-3 pt-1 pb-2 font-mono text-[10px]\">\n {err}\n </div>\n ) : null}\n </div>\n );\n}\n\n/**\n * One row in `§ accounts` — a switch-target peer. Clicking the body\n * calls `onSwitch`; while in-flight the row shows a spinner and the\n * other rows in the list are disabled.\n */\nfunction SwitchRow({\n peer,\n busy,\n disabled,\n onSwitch,\n}: {\n peer: OcAccountSummary;\n busy: boolean;\n disabled: boolean;\n onSwitch: () => void;\n}) {\n const label = peer.displayName ?? obscureIdentity(peer.displayIdentity.value);\n const kindLabel = IDENTITY_KIND_LABEL[peer.displayIdentity.kind];\n return (\n <button\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={false}\n aria-label={`Switch to ${peer.didOc}`}\n disabled={disabled}\n onClick={onSwitch}\n data-oc-account-menu-switch-row=\"\"\n className=\"hover:bg-accent flex w-full items-center gap-2 px-3 py-2 text-left font-mono text-[11px] tracking-wide transition-colors disabled:cursor-default\"\n >\n <span\n className=\"border-muted-foreground/40 flex size-3.5 shrink-0 items-center justify-center rounded-full border\"\n aria-hidden\n />\n <span className=\"text-foreground/90 min-w-0 flex-1 truncate\">{label}</span>\n <span className=\"text-muted-foreground/50 w-14 shrink-0 text-right text-[9px] tracking-widest uppercase\">\n {busy ? <Loader2 className=\"ml-auto size-3 animate-spin\" /> : kindLabel}\n </span>\n </button>\n );\n}\n\n/**\n * Single nav section inside the identity popover (e.g. `§ navigate`, `§ more`).\n * Rendered DESKTOP-ONLY (`hidden md:block`) by callers: on mobile the same\n * links live in the account menu's `☰`, so showing them here too would double\n * up. On desktop it's the nav home for console sites that have no inline\n * OcPrimaryNav.\n */\nfunction PopoverSection({\n label,\n items,\n onItemClick,\n bordered,\n className,\n}: {\n label: string;\n items: ReadonlyArray<OcAccountMenuItem>;\n onItemClick: () => void;\n bordered?: boolean;\n className?: string;\n}) {\n const cls =\n 'hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors';\n return (\n <div\n className={cn('p-1', bordered && 'border-border border-t', className)}\n data-oc-account-menu-section={label}\n >\n <div className=\"text-muted-foreground/60 px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § {label}\n </div>\n {items.map((item) =>\n item.external ? (\n <a\n key={item.href}\n href={item.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={onItemClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{item.label}</span>\n <span className=\"text-muted-foreground/70 text-[10px]\" aria-hidden>\n ↗\n </span>\n </a>\n ) : (\n <Link\n key={item.href}\n href={item.href}\n onClick={onItemClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{item.label}</span>\n </Link>\n )\n )}\n </div>\n );\n}\n\nfunction BuildFooter({\n hostname,\n build,\n state,\n}: {\n hostname: string;\n build: OcAccountMenuBuildInfo;\n state?: SiteState;\n}) {\n const sha = build.sha;\n const showSha = !!sha && sha !== 'dev';\n const commitUrl = showSha && build.repo ? `https://github.com/${build.repo}/commit/${sha}` : null;\n return (\n <div\n className=\"text-muted-foreground/60 border-border border-t px-3 py-2 font-mono text-[9.5px] tracking-widest uppercase\"\n data-oc-account-menu-build=\"\"\n >\n {hostname}\n {state && state !== 'live' ? (\n <>\n {' · '}\n <span className=\"text-muted-foreground/80\">{state}</span>\n </>\n ) : null}{' '}\n <span className=\"text-muted-foreground/80\">\n v{build.version}\n {showSha ? (\n <>\n {' · '}\n {commitUrl ? (\n <a\n href={commitUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"hover:text-foreground/90 underline decoration-dotted underline-offset-2\"\n >\n {sha}\n </a>\n ) : (\n sha\n )}\n </>\n ) : null}\n </span>\n </div>\n );\n}\n","\"use client\";\n\nimport Link from \"next/link\";\nimport type { ReactNode } from \"react\";\n\n/**\n * `<OcPrimaryNav>` — the centered link row in every family site's\n * `<LayoutHeader>`. Replaces the per-site bespoke `<nav>` blocks.\n *\n * **Desktop-only.** The inline row shows at `md+`; below that it is hidden,\n * because on mobile the same links live in the account menu's `☰` drawer\n * (`OcAccountMenu`, rendered to the left of the identity chip) — one shared\n * mobile-nav pattern, no centered hamburger, no per-site fork.\n *\n * Active item is `text-primary`; siblings are muted. Active affordance is\n * text-only (no underline / bottom stripe) — deliberately restrained.\n *\n * **Usage:**\n *\n * <OcPrimaryNav\n * activePath={router.pathname}\n * links={[\n * { href: '/dashboard', label: 'dashboard' },\n * { href: 'https://docs.ochk.io/attest', label: 'docs', external: true },\n * ]}\n * />\n */\n\nexport interface OcPrimaryNavLink {\n /** Same-origin path or absolute URL. */\n href: string;\n /** Visible label · lowercase preferred (the chip styling applies tracking + uppercase). */\n label: string;\n /** When true, opens in a new tab and skips the `isActive` check. */\n external?: boolean;\n /** Optional override for the active-match. By default the link is\n * active when `activePath === href` or `activePath.startsWith(href + '/')`. */\n matchExact?: boolean;\n}\n\nexport interface OcPrimaryNavProps {\n /** Current router pathname for active-link highlight. */\n activePath: string;\n /** Link set. Keep to 2–5 entries. */\n links: ReadonlyArray<OcPrimaryNavLink>;\n /** className for the outer container. */\n className?: string;\n}\n\nfunction isActive(pathname: string, link: OcPrimaryNavLink): boolean {\n if (link.external) return false;\n if (link.matchExact) return pathname === link.href;\n if (link.href === \"/\") return pathname === \"/\";\n return pathname === link.href || pathname.startsWith(link.href + \"/\");\n}\n\nexport function OcPrimaryNav({\n activePath,\n links,\n className,\n}: OcPrimaryNavProps) {\n return (\n <nav\n aria-label=\"primary\"\n className={\n \"hidden items-center gap-0.5 sm:gap-1 md:flex \" + (className ?? \"\")\n }\n data-oc-primary-nav=\"\"\n >\n {links.map((link) => {\n const active = isActive(activePath, link);\n const cls =\n \"font-display shrink-0 px-2 py-1 sm:px-3 text-[11px] sm:text-[12px] font-semibold tracking-wider uppercase transition-colors \" +\n (active\n ? \"text-primary\"\n : \"text-muted-foreground hover:text-foreground\");\n const content: ReactNode = (\n <>\n {link.label}\n {link.external ? (\n <span\n aria-hidden\n className=\"text-muted-foreground/60 ml-1 text-[9px]\"\n >\n ↗\n </span>\n ) : null}\n </>\n );\n return link.external ? (\n <a\n key={link.href}\n href={link.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n className={cls}\n data-oc-primary-nav-item=\"\"\n >\n {content}\n </a>\n ) : (\n <Link\n key={link.href}\n href={link.href}\n aria-current={active ? \"page\" : undefined}\n className={cls}\n data-oc-primary-nav-item={active ? \"active\" : \"sibling\"}\n >\n {content}\n </Link>\n );\n })}\n </nav>\n );\n}\n","'use client';\n\nimport Link from 'next/link';\nimport { useEffect, useState, type ReactNode } from 'react';\n\n/**\n * `<OcDashboardShell>` — the canonical demo-app frame for protocol\n * sites. Mirrors the `MeShell` pattern from `me.ochk.io`: persistent\n * left-rail tools on desktop, off-canvas drawer on mobile, page\n * eyebrow + title + description above the children.\n *\n * Drives the unified \"dashboard pattern\" the family rolled out\n * 2026-05-14: every protocol site's `/dashboard` (and the demo pages\n * underneath — `/create`, `/verify`, `/discover`, `/playground`, etc.)\n * wraps in this shell, so visitors crossing protocols experience the\n * same chrome.\n *\n * Layout (desktop):\n *\n * ┌─────────────┬────────────────────────────────────┐\n * │ § dashboard │ eyebrow │\n * │ ── tools ── │ title │\n * │ create ● │ description │\n * │ verify │ │\n * │ discover │ ── children ─────────────────────│\n * │ ... │ │\n * └─────────────┴────────────────────────────────────┘\n *\n * Mobile (<md): sidebar collapses behind a hamburger button at the\n * top of the main column; tapping opens a full-width drawer.\n */\n\nexport interface OcDashboardTool {\n /** Stable identifier · used as `active` key. */\n id: string;\n /** Same-origin path the tool lives at. */\n href: string;\n /** Visible label · lowercase preferred. */\n label: string;\n /** Optional one-line tagline shown under the label in the rail and\n * on the dashboard hub cards. */\n tagline?: string;\n /** Optional ascii / unicode glyph rendered before the label. */\n icon?: ReactNode;\n /** When true, opens in a new tab (e.g. an external explorer). */\n external?: boolean;\n}\n\nexport interface OcDashboardShellProps {\n /**\n * Dashboard root path — the rail header links here (\"§ dashboard\").\n * Default `'/dashboard'`.\n */\n rootHref?: string;\n /**\n * Site display name shown in the rail header above the tools list\n * (e.g. `'oc·attest'`).\n */\n siteLabel?: ReactNode;\n /** Tools to surface in the left rail. */\n tools: ReadonlyArray<OcDashboardTool>;\n /**\n * Which tool is currently active — matched against each tool's\n * `id`. Pass `undefined` on the dashboard hub itself.\n */\n active?: string;\n /** Optional small mono label above the page title. */\n eyebrow?: ReactNode;\n /** Page title — rendered as h1. */\n title?: ReactNode;\n /** Page description — rendered as a paragraph below the title. */\n description?: ReactNode;\n /** Main column content. */\n children: ReactNode;\n /** className for the outer container. */\n className?: string;\n}\n\nexport function OcDashboardShell({\n rootHref = '/dashboard',\n siteLabel,\n tools,\n active,\n eyebrow,\n title,\n description,\n children,\n className,\n}: OcDashboardShellProps) {\n const [drawerOpen, setDrawerOpen] = useState(false);\n\n // Close drawer on Escape, lock body scroll while open.\n useEffect(() => {\n if (!drawerOpen) return;\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setDrawerOpen(false);\n }\n document.addEventListener('keydown', onKey);\n const prevOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n return () => {\n document.removeEventListener('keydown', onKey);\n document.body.style.overflow = prevOverflow;\n };\n }, [drawerOpen]);\n\n const hasHeader = Boolean(title) || Boolean(eyebrow);\n\n return (\n <div\n className={'container ' + (className ?? '')}\n data-oc-dashboard-shell=\"\"\n >\n <div className=\"flex min-h-[calc(100vh-3rem)] flex-col md:flex-row md:gap-8\">\n {/* Desktop sidebar */}\n <Sidebar\n rootHref={rootHref}\n siteLabel={siteLabel}\n tools={tools}\n active={active}\n variant=\"desktop\"\n />\n\n {/* Main column */}\n <div className=\"flex min-w-0 flex-1 flex-col\">\n {/* Mobile bar — hamburger + crumb */}\n <div className=\"border-border flex items-center justify-between border-b py-3 md:hidden\">\n <button\n type=\"button\"\n onClick={() => setDrawerOpen(true)}\n className=\"text-muted-foreground hover:text-foreground inline-flex h-9 items-center gap-2 px-1 font-mono text-[11px] tracking-widest uppercase transition-colors\"\n aria-label=\"open dashboard tools\"\n aria-expanded={drawerOpen}\n data-oc-dashboard-mobile-trigger=\"\"\n >\n <span className=\"text-[14px] leading-none\">≡</span>\n <span>tools</span>\n </button>\n <Link\n href={rootHref}\n className=\"text-primary font-mono text-[11px] tracking-widest uppercase\"\n >\n § dashboard\n </Link>\n </div>\n\n <div className=\"pt-6 md:pt-3\">\n {hasHeader && (\n <div className=\"max-w-3xl\">\n {eyebrow ? (\n <div className=\"label-mono text-primary mb-3 font-mono text-[10px] tracking-widest uppercase\">\n {eyebrow}\n </div>\n ) : null}\n {title ? (\n <h1 className=\"font-display text-2xl font-bold tracking-tight sm:text-3xl\">\n {title}\n </h1>\n ) : null}\n {description ? (\n <p className=\"text-muted-foreground mt-3 max-w-[64ch] text-sm leading-relaxed\">\n {description}\n </p>\n ) : null}\n </div>\n )}\n <div className={hasHeader ? 'mt-8 pb-12' : 'pb-12'}>{children}</div>\n </div>\n </div>\n </div>\n\n {/* Mobile drawer */}\n {drawerOpen ? (\n <div\n className=\"fixed inset-0 z-50 md:hidden\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"dashboard tools\"\n data-oc-dashboard-drawer=\"\"\n >\n <div\n className=\"absolute inset-0 bg-background/80 backdrop-blur-sm\"\n onClick={() => setDrawerOpen(false)}\n aria-hidden\n />\n <div className=\"bg-background absolute top-0 left-0 h-full w-[85vw] max-w-sm border-r shadow-xl\">\n <Sidebar\n rootHref={rootHref}\n siteLabel={siteLabel}\n tools={tools}\n active={active}\n variant=\"drawer\"\n onClose={() => setDrawerOpen(false)}\n />\n </div>\n </div>\n ) : null}\n </div>\n );\n}\n\nfunction Sidebar({\n rootHref,\n siteLabel,\n tools,\n active,\n variant,\n onClose,\n}: {\n rootHref: string;\n siteLabel?: ReactNode;\n tools: ReadonlyArray<OcDashboardTool>;\n active?: string;\n variant: 'desktop' | 'drawer';\n onClose?: () => void;\n}) {\n const isDrawer = variant === 'drawer';\n return (\n <aside\n className={\n isDrawer\n ? 'flex h-full w-full flex-col bg-card'\n : 'hidden md:sticky md:top-4 md:flex md:h-[calc(100vh-2rem)] md:w-56 md:shrink-0 md:flex-col md:self-start md:overflow-y-auto md:rounded md:border md:bg-card/40 lg:w-60'\n }\n aria-label=\"dashboard tools\"\n data-oc-dashboard-sidebar={variant}\n >\n {/* identity strip */}\n <div className=\"border-b px-4 py-3\">\n <div className=\"flex items-center justify-between\">\n <Link\n href={rootHref}\n onClick={onClose}\n className=\"hover:text-foreground font-display text-sm font-bold tracking-tight\"\n >\n § dashboard\n </Link>\n {isDrawer ? (\n <button\n type=\"button\"\n onClick={onClose}\n className=\"text-muted-foreground hover:text-foreground -mr-2 inline-flex h-8 w-8 items-center justify-center rounded font-mono text-lg\"\n aria-label=\"close navigation\"\n >\n ×\n </button>\n ) : null}\n </div>\n {siteLabel ? (\n <div className=\"text-muted-foreground/70 mt-1 font-mono text-[10px] tracking-widest uppercase\">\n {siteLabel}\n </div>\n ) : null}\n </div>\n\n <nav className=\"flex-1 overflow-y-auto px-2 py-3\">\n <div className=\"text-muted-foreground/60 mb-1 px-3 font-mono text-[10px] tracking-widest uppercase\">\n § tools\n </div>\n <ul className=\"space-y-0.5\">\n {tools.map((tool) => {\n const isActive = tool.id === active;\n const innerCls =\n 'flex items-baseline gap-2 rounded px-3 py-1.5 text-[12.5px] transition-colors ' +\n (isActive\n ? 'bg-primary/10 text-primary font-semibold'\n : 'text-muted-foreground hover:text-foreground hover:bg-muted/30');\n const content = (\n <>\n {tool.icon ? (\n <span\n className={\n 'shrink-0 font-mono text-[11px] ' +\n (isActive ? 'text-primary' : 'text-muted-foreground/70')\n }\n aria-hidden\n >\n {tool.icon}\n </span>\n ) : null}\n <span className=\"flex-1 leading-tight\">\n <span>{tool.label}</span>\n {tool.tagline ? (\n <span className=\"text-muted-foreground/60 mt-0.5 block font-mono text-[10px] tracking-wide normal-case\">\n {tool.tagline}\n </span>\n ) : null}\n </span>\n {tool.external ? (\n <span\n className=\"text-muted-foreground/60 text-[10px]\"\n aria-hidden\n >\n ↗\n </span>\n ) : null}\n </>\n );\n return (\n <li key={tool.id}>\n {tool.external ? (\n <a\n href={tool.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={onClose}\n className={innerCls}\n data-oc-dashboard-tool={isActive ? 'active' : 'sibling'}\n >\n {content}\n </a>\n ) : (\n <Link\n href={tool.href}\n onClick={onClose}\n aria-current={isActive ? 'page' : undefined}\n className={innerCls}\n data-oc-dashboard-tool={isActive ? 'active' : 'sibling'}\n >\n {content}\n </Link>\n )}\n </li>\n );\n })}\n </ul>\n </nav>\n </aside>\n );\n}\n\n/**\n * Convenience: the dashboard hub-page grid. Renders the same set of\n * tools as the sidebar, but as bigger card-style entries — used as\n * the body of `/dashboard/index.tsx` on each protocol site.\n */\nexport interface OcDashboardHubProps {\n tools: ReadonlyArray<OcDashboardTool>;\n className?: string;\n}\n\nexport function OcDashboardHub({ tools, className }: OcDashboardHubProps) {\n return (\n <ul\n className={\n 'grid gap-px border-t border-l sm:grid-cols-2 ' + (className ?? '')\n }\n data-oc-dashboard-hub=\"\"\n >\n {tools.map((tool) => {\n const content = (\n <span className=\"flex h-full flex-col gap-3 p-5 transition-colors\">\n <span className=\"flex items-baseline gap-3\">\n {tool.icon ? (\n <span\n className=\"text-primary font-mono text-[13px]\"\n aria-hidden\n >\n {tool.icon}\n </span>\n ) : null}\n <span className=\"font-display text-foreground text-base font-bold tracking-tight\">\n {tool.label}\n </span>\n {tool.external ? (\n <span\n className=\"text-muted-foreground/60 ml-auto text-xs\"\n aria-hidden\n >\n ↗\n </span>\n ) : (\n <span\n className=\"text-muted-foreground/60 ml-auto text-xs\"\n aria-hidden\n >\n →\n </span>\n )}\n </span>\n {tool.tagline ? (\n <span className=\"text-muted-foreground text-sm leading-relaxed\">\n {tool.tagline}\n </span>\n ) : null}\n </span>\n );\n const cls = 'hover:bg-muted/30 group block border-r border-b transition-colors';\n return (\n <li key={tool.id}>\n {tool.external ? (\n <a\n href={tool.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n className={cls}\n >\n {content}\n </a>\n ) : (\n <Link href={tool.href} className={cls}>\n {content}\n </Link>\n )}\n </li>\n );\n })}\n </ul>\n );\n}\n","import type { ReactNode } from 'react';\n\n/**\n * AppShell — shared page chrome for every authenticated dashboard surface\n * across the OC family (vault, me, future). Lifted from oc-me-web's\n * `MeShell` and oc-vault-web's `VaultShell` — same eyebrow / title /\n * description / actions header band, no sidebar (sidebars are app-specific\n * and stay in the consuming app).\n *\n * Usage:\n * <AppShell eyebrow=\"§ vault\" title=\"your vault.\" description=\"…\">\n * ...\n * </AppShell>\n *\n * The component is stateless and dependency-free. Tailwind classes assume\n * the consuming site loads the family `globals.css` (which defines\n * `.container`, `.label-mono`, the dark-by-default palette, etc.).\n */\n\nexport interface AppShellProps {\n eyebrow?: ReactNode;\n title?: ReactNode;\n description?: ReactNode;\n /** Right-aligned action node rendered next to the title (e.g. CTA buttons). */\n headerActions?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport function AppShell({\n eyebrow,\n title,\n description,\n headerActions,\n children,\n className,\n}: AppShellProps) {\n const hasHeader = Boolean(title);\n return (\n <div className={'container ' + (className ?? '')}>\n <div className=\"flex min-h-[calc(100vh-3rem)] flex-col\">\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <div className=\"pt-6 md:pt-8\">\n {hasHeader && (\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"max-w-3xl\">\n {eyebrow && (\n <div className=\"label-mono text-primary mb-3\">\n {eyebrow}\n </div>\n )}\n <h1 className=\"font-display text-2xl font-bold tracking-tight sm:text-3xl\">\n {title}\n </h1>\n {description && (\n <p className=\"text-muted-foreground mt-3 max-w-[64ch] text-sm leading-relaxed\">\n {description}\n </p>\n )}\n </div>\n {headerActions && (\n <div className=\"flex shrink-0 items-center gap-2\">\n {headerActions}\n </div>\n )}\n </div>\n )}\n <div className={hasHeader ? 'mt-8 pb-12' : 'pb-12'}>{children}</div>\n </div>\n </div>\n </div>\n </div>\n );\n}\n","import { cn } from '../tokens/cn';\n\nexport interface LayoutSubHeaderTag {\n label: string;\n /** Hide this tag below the given breakpoint (progressive disclosure). */\n hideBelow?: 'sm' | 'md' | 'lg';\n}\n\nexport interface LayoutSubHeaderProps {\n /** Product label shown after the status, e.g. \"oc · stamp\". */\n product: string;\n /** Left-side status text. Defaults to \"live · mainnet\". */\n status?: string;\n /**\n * Right-side capability tag(s). Keep it to ONE short phrase per site —\n * the strip reads as quiet supporting context, not a feature list. A\n * second/third tag is supported (spaced, never comma-jammed) for the rare\n * site that needs it, each with its own `hideBelow`.\n */\n tags?: LayoutSubHeaderTag[];\n /** Hide the pulsing heartbeat dot (e.g. on a degraded surface). */\n noHeartbeat?: boolean;\n className?: string;\n}\n\nconst HIDE: Record<NonNullable<LayoutSubHeaderTag['hideBelow']>, string> = {\n sm: 'hidden sm:inline',\n md: 'hidden md:inline',\n lg: 'hidden lg:inline',\n};\n\n/**\n * LayoutSubHeader — the ecosystem status strip below the header. One line,\n * never wraps. Identical shape across every family surface:\n *\n * ● live · mainnet oc · stamp ················· bip-322 · opentimestamps\n *\n * Left cluster (heartbeat + status + product) is the identity; the right\n * cluster is a quiet, low-contrast capability whisper. Below `sm` the strip\n * collapses to just the heartbeat + product so it never wraps or crowds a\n * phone header — the right cluster and the `status` reappear from `sm` up.\n *\n * The band carries a faint skin-tinted translucent shade (`.oc-substrip`) so\n * it has presence on every skin × mode without bleeding the hero/aurora\n * behind it. Pass `product`, optional `status`, and `tags`.\n */\nexport function LayoutSubHeader({\n product,\n status = 'live · mainnet',\n tags = [],\n noHeartbeat = false,\n className,\n}: LayoutSubHeaderProps) {\n return (\n <div className={cn('oc-substrip border-b', className)}>\n <div className=\"container flex items-center justify-between gap-x-6 py-2 font-mono text-[11px]\">\n <div className=\"flex min-w-0 items-center gap-2.5\">\n {!noHeartbeat && (\n <span\n className=\"bg-primary inline-block size-1.5 shrink-0 animate-pulse rounded-full ring-2 ring-[color-mix(in_oklch,var(--primary),transparent_78%)]\"\n aria-hidden\n />\n )}\n <span className=\"text-muted-foreground hidden tracking-widest whitespace-nowrap uppercase sm:inline\">\n {status}\n </span>\n <span className=\"text-foreground truncate\">{product}</span>\n </div>\n {tags.length > 0 && (\n <div className=\"text-muted-foreground/55 hidden shrink-0 items-center gap-x-3 tracking-wider whitespace-nowrap uppercase sm:flex\">\n {tags.map((tag, i) => (\n <span key={i} className={tag.hideBelow ? HIDE[tag.hideBelow] : undefined}>\n {tag.label}\n </span>\n ))}\n </div>\n )}\n </div>\n </div>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface OcAppBarProps {\n /**\n * `'full'` (default) = edge-to-edge app chrome: a `.app-bar` row (responsive\n * gutters, NO max-width), so the header's left/right edges align with a\n * full-bleed app shell below it. `'contained'` = the same row inside\n * `.container` (max-w-screen-xl), identical to the marketing/content header —\n * an escape hatch, rarely needed.\n */\n variant?: 'full' | 'contained';\n /** Logo slot — pass `<OcLogoDropdown>…</OcLogoDropdown>` with the site wordmark. */\n start?: ReactNode;\n /** Center slot — pass `<OcPrimaryNav … />`. Centered, flex-1, min-w-0. */\n center?: ReactNode;\n /** Trailing actions — pass e.g. `<HeaderAccount /><OcAppearanceMenu />`. */\n end?: ReactNode;\n /** Stick to the top of the viewport. Default `true`. Keeps `h-12` (3rem). */\n sticky?: boolean;\n className?: string;\n}\n\n/**\n * `OcAppBar` — the sanctioned FULL-BLEED application header for full-screen app\n * surfaces (chat `/app`, the analytics cockpit, the forge console, the me\n * operator plane …). It is the app-surface counterpart to the constrained\n * marketing/content header: the SAME primitives (`OcLogoDropdown` /\n * `OcPrimaryNav` / `OcAccountMenu`) mounted in an edge-to-edge `.app-bar` row\n * (gutters only, no `max-w-screen-xl`) instead of a centered `.container`, so a\n * full-bleed app shell underneath lines up edge-to-edge with the chrome above.\n *\n * Marketing / content / protocol pages keep the constrained `.container`\n * header — never use `OcAppBar` over a `.container`-capped body, or you\n * re-introduce the left/right misalignment this composition exists to fix.\n *\n * Auth-free and brand-free by design: all branding + session chrome arrive\n * through the `start` / `center` / `end` slots, so app sites and content sites\n * share one primitive layer and can never visually drift. The fixed `h-12`\n * (3rem) lets a shell below claim `h-[calc(100dvh-3rem)]`.\n */\nexport function OcAppBar({\n variant = 'full',\n start,\n center,\n end,\n sticky = true,\n className,\n}: OcAppBarProps) {\n return (\n <header\n className={cn(\n 'bg-background/90 supports-[backdrop-filter]:bg-background/70 w-full border-b backdrop-blur',\n sticky && 'sticky top-0 z-50',\n className\n )}\n >\n <div\n className={cn(\n variant === 'full' ? 'app-bar' : 'container',\n 'flex h-12 items-center justify-between gap-4'\n )}\n >\n {start}\n <div className=\"flex min-w-0 flex-1 justify-center px-2\">{center}</div>\n <div className=\"flex items-center gap-1\">{end}</div>\n </div>\n </header>\n );\n}\n","import Link from \"next/link\";\nimport type { ReactNode } from \"react\";\n\nimport { cn } from \"../tokens/cn\";\nimport { FAMILY_PROPERTIES, type FamilyCategory } from \"./family-properties\";\n\nexport interface FooterLink {\n href: string;\n label: string;\n /** Render as a cross-origin `<a target=\"_blank\">` with a ↗ affordance. */\n external?: boolean;\n}\n\nexport interface FooterColumn {\n /** Column heading, e.g. `'§ docs'`. */\n label: string;\n links: FooterLink[];\n}\n\nexport interface OcFamilyFooterBrand {\n /** The site's own logo mark (e.g. `<LogoMark size={20} />`). Optional. */\n mark?: ReactNode;\n /** Wordmark, e.g. `'oc·stamp'`. */\n wordmark: ReactNode;\n /** One-paragraph blurb under the wordmark (may contain links). */\n tagline: ReactNode;\n /** Optional license / attribution lines under the blurb. */\n meta?: ReactNode;\n}\n\nexport interface OcFamilyFooterProps {\n brand: OcFamilyFooterBrand;\n /** The site's own `§`-labelled link groups. */\n columns?: FooterColumn[];\n /**\n * Append registry-driven family columns (products / protocols) sourced from\n * `FAMILY_PROPERTIES`, so any footer that lists the family can never drift\n * from the canonical table. `'products'` is the five live products, etc.\n */\n family?: \"products\" | \"protocols\" | \"both\";\n /** Origin the legal-bar links resolve against. Defaults to ochk.io. */\n legalBase?: string;\n /** Override the left copyright line. Defaults to the canonical OC line. */\n legalCopyright?: ReactNode;\n /**\n * Override the centre legal links. Defaults to privacy / terms / security /\n * trademarks / contact (resolved against `legalBase`). Pass your own when a\n * site needs an extra link (e.g. a federation charter) or a shorter set.\n */\n legalLinks?: FooterLink[];\n /** Override the right-hand bitcoin tag (e.g. `'read on bitcoin'`). */\n builtWith?: ReactNode;\n className?: string;\n}\n\n// brand block + N content columns in one grid, mirroring the historical\n// per-site layout (`[1.2fr 1fr 1fr …]`). Keyed by content-column count so the\n// brand block keeps its wider share at every width.\nconst GRID: Record<number, string> = {\n 1: \"md:grid-cols-[1.2fr_1fr]\",\n 2: \"md:grid-cols-[1.2fr_1fr_1fr]\",\n 3: \"md:grid-cols-[1.2fr_1fr_1fr_1fr]\",\n 4: \"md:grid-cols-[1.2fr_1fr_1fr_1fr_1fr]\",\n 5: \"md:grid-cols-[1.2fr_1fr_1fr_1fr_1fr_1fr]\",\n};\n\nconst LINK_CLS =\n \"text-muted-foreground hover:text-foreground font-mono text-xs tracking-wide lowercase transition-colors\";\n\nfunction FooterLinkItem({ link }: { link: FooterLink }) {\n if (link.external) {\n return (\n <a href={link.href} target=\"_blank\" rel=\"noreferrer\" className={LINK_CLS}>\n {\"> \"}\n {link.label} ↗\n </a>\n );\n }\n return (\n <Link href={link.href} className={LINK_CLS}>\n {\"> \"}\n {link.label}\n </Link>\n );\n}\n\nfunction FooterColumnView({ column }: { column: FooterColumn }) {\n return (\n <div>\n <div className=\"label-mono text-primary mb-3\">{column.label}</div>\n <ul className=\"space-y-2\">\n {column.links.map((link) => (\n <li key={`${column.label}:${link.href}`}>\n <FooterLinkItem link={link} />\n </li>\n ))}\n </ul>\n </div>\n );\n}\n\nfunction familyColumn(category: FamilyCategory, label: string): FooterColumn {\n return {\n label,\n links: FAMILY_PROPERTIES.filter((p) => p.category === category).map(\n (p) => ({\n href: p.origin,\n label: p.label,\n external: true,\n }),\n ),\n };\n}\n\n/**\n * `<OcFamilyFooter>` — the one canonical family footer. Brand block on the\n * left, `§`-labelled link columns to the right, a single legal bar beneath.\n * Every `oc-*` site composes this with its own `brand` + `columns`; pass\n * `family` to surface the registry-driven product / protocol columns so any\n * footer listing the family always shows the full, current set.\n */\nexport function OcFamilyFooter({\n brand,\n columns = [],\n family,\n legalBase = \"https://ochk.io\",\n legalCopyright,\n legalLinks,\n builtWith,\n className,\n}: OcFamilyFooterProps) {\n const familyCols: FooterColumn[] = [];\n if (family === \"products\" || family === \"both\") {\n familyCols.push(familyColumn(\"product\", \"§ products\"));\n }\n if (family === \"protocols\" || family === \"both\") {\n familyCols.push(familyColumn(\"protocol\", \"§ protocols\"));\n }\n\n const allColumns = [...familyCols, ...columns];\n const grid = GRID[allColumns.length] ?? GRID[3];\n const year = new Date().getFullYear();\n const legal = (path: string) => `${legalBase}${path}`;\n const links: FooterLink[] = legalLinks ?? [\n { href: legal(\"/privacy\"), label: \"privacy\" },\n { href: legal(\"/terms\"), label: \"terms\" },\n { href: legal(\"/security\"), label: \"security\" },\n { href: legal(\"/trademark\"), label: \"trademarks\" },\n { href: legal(\"/contact\"), label: \"contact\" },\n ];\n\n return (\n <footer className={cn(\"border-t\", className)}>\n <div className=\"container py-10 sm:py-12 md:py-16\">\n <div className={cn(\"grid gap-8 sm:grid-cols-2 sm:gap-10\", grid)}>\n <div>\n <div className=\"flex items-center gap-2\">\n {brand.mark}\n <span className=\"font-display text-sm font-bold tracking-tight\">\n {brand.wordmark}\n </span>\n </div>\n <div className=\"text-muted-foreground mt-3 max-w-[34ch] text-sm leading-relaxed\">\n {brand.tagline}\n </div>\n {brand.meta && <div className=\"mt-4\">{brand.meta}</div>}\n </div>\n {allColumns.map((column) => (\n <FooterColumnView key={column.label} column={column} />\n ))}\n </div>\n\n <div className=\"mt-10 flex flex-col items-start justify-between gap-3 border-t pt-6 font-mono text-[11px] tracking-widest uppercase sm:flex-row sm:items-center\">\n <span className=\"text-muted-foreground\">\n {legalCopyright ?? <>© {year} orangecheck · mit + cc-by-4.0</>}\n </span>\n <div className=\"text-muted-foreground/80 flex flex-wrap items-center gap-x-4 gap-y-1\">\n {links.map((link) => (\n <a\n key={link.label}\n href={link.href}\n {...(link.external\n ? { target: \"_blank\", rel: \"noreferrer\" }\n : {})}\n className=\"hover:text-foreground transition-colors\"\n >\n {link.label}\n </a>\n ))}\n </div>\n <span className=\"text-muted-foreground inline-flex items-center gap-1.5\">\n <span className=\"text-primary text-[13px] leading-none\">₿</span>\n <span>{builtWith ?? \"built with bitcoin\"}</span>\n </span>\n </div>\n </div>\n </footer>\n );\n}\n"]}
1
+ {"version":3,"sources":["../src/chrome/ecosystem-switcher.tsx","../src/tokens/cn.ts","../src/primitives/tooltip.tsx","../src/chrome/family-properties.ts","../src/chrome/logo-dropdown.tsx","../src/tokens/provider.tsx","../src/tokens/appearance-menu.tsx","../src/chrome/account-menu.tsx","../src/chrome/primary-nav.tsx","../src/chrome/dashboard-shell.tsx","../src/chrome/app-shell.tsx","../src/chrome/layout-sub-header.tsx","../src/chrome/app-bar.tsx","../src/chrome/family-footer.tsx"],"names":["useState","useRef","useEffect","jsxs","jsx","Boxes","ChevronDown","isActive","Link","Check","twMerge","clsx","React","Popover","CornerDownLeft","useId","router","useRouter","createContext","useContext","Sun","Moon","Monitor","useTheme","Waves","Pause","Copy","Loader2","fetchOcLinkedIdentities","useOcSession","X","Menu","Fragment","Plus"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4CA,IAAM,OAAA,GAA2B;AAAA,EAC7B;AAAA,IACI,IAAA,EAAM,MAAA;AAAA,IACN,IAAA,EAAM,iBAAA;AAAA,IACN,KAAA,EAAO,aAAA;AAAA,IACP,GAAA,EAAK,UAAA;AAAA,IACL,QAAA,EAAU;AAAA,GACd;AAAA,EACA;AAAA,IACI,IAAA,EAAM,MAAA;AAAA,IACN,IAAA,EAAM,sBAAA;AAAA,IACN,KAAA,EAAO,YAAA;AAAA,IACP,GAAA,EAAK,cAAA;AAAA,IACL,QAAA,EAAU;AAAA,GACd;AAAA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AAa,oBAAA,EAAqB;AAAA,OAAA,EAC3C;AAAA,KAAA,EACF;AAAA,GAAA,EACF,CAAA,EACF,CAAA;AAEJ","file":"chrome.js","sourcesContent":["import { Boxes, Check, ChevronDown } from 'lucide-react';\nimport Link from 'next/link';\nimport { useEffect, useRef, useState } from 'react';\n\n/**\n * EcosystemSwitcher — cross-product dropdown for jumping between every\n * site in the OrangeCheck family. Drop one into every site's LayoutHeader\n * and mark the active site via the `current` prop.\n *\n * <EcosystemSwitcher current=\"lock\" />\n *\n * The component is dependency-self-contained: no Radix, no Headless UI,\n * just outside-click + Escape handling so it works identically in every\n * site without forcing a peer-dep upgrade. Every link stays in-tab — the\n * family is one app from the user's POV.\n */\n\nexport type EcosystemSlug =\n | 'home'\n | 'docs'\n | 'me'\n | 'vault'\n | 'chat'\n | 'cosign'\n | 'btc'\n | 'globe'\n | 'attest'\n | 'lock'\n | 'vote'\n | 'stamp'\n | 'agent'\n | 'pledge'\n | 'analytics'\n | 'bot'\n | 'forge';\n\ninterface SwitcherEntry {\n slug: EcosystemSlug;\n href: string;\n label: string;\n sub: string;\n docsHref: string;\n}\n\nconst ENTRIES: SwitcherEntry[] = [\n {\n slug: 'home',\n href: 'https://ochk.io',\n label: 'orangecheck',\n sub: 'umbrella',\n docsHref: 'https://docs.ochk.io',\n },\n {\n slug: 'docs',\n href: 'https://docs.ochk.io',\n label: 'oc·docs',\n sub: 'unified docs',\n docsHref: 'https://docs.ochk.io',\n },\n {\n slug: 'me',\n href: 'https://me.ochk.io',\n label: 'oc·me',\n sub: 'earn — consumer identity',\n docsHref: 'https://docs.ochk.io/me',\n },\n {\n slug: 'vault',\n href: 'https://vault.ochk.io',\n label: 'oc·vault',\n sub: 'keep — encrypted secrets',\n docsHref: 'https://docs.ochk.io/vault',\n },\n {\n slug: 'chat',\n href: 'https://chat.ochk.io',\n label: 'oc·chat',\n sub: 'message — encrypted chat',\n docsHref: 'https://docs.ochk.io/chat',\n },\n {\n slug: 'cosign',\n href: 'https://cosign.ochk.io',\n label: 'oc·cosign',\n sub: 'cofound — get behind builders',\n docsHref: 'https://docs.ochk.io/cosign',\n },\n {\n slug: 'btc',\n href: 'https://btc.ochk.io',\n label: 'oc·btc',\n sub: 'read — bitcoin desk',\n docsHref: 'https://btc.ochk.io/data',\n },\n {\n slug: 'globe',\n href: 'https://globe.ochk.io',\n label: 'oc·globe',\n sub: 'watch — the network, live',\n docsHref: 'https://globe.ochk.io/sources',\n },\n {\n slug: 'attest',\n href: 'https://attest.ochk.io',\n label: 'oc·attest',\n sub: 'am — sybil resistance',\n docsHref: 'https://docs.ochk.io/attest',\n },\n {\n slug: 'lock',\n href: 'https://lock.ochk.io',\n label: 'oc·lock',\n sub: 'whisper — encryption',\n docsHref: 'https://docs.ochk.io/lock',\n },\n {\n slug: 'vote',\n href: 'https://vote.ochk.io',\n label: 'oc·vote',\n sub: 'decide — polls',\n docsHref: 'https://docs.ochk.io/vote',\n },\n {\n slug: 'stamp',\n href: 'https://stamp.ochk.io',\n label: 'oc·stamp',\n sub: 'declare — block-anchored',\n docsHref: 'https://docs.ochk.io/stamp',\n },\n {\n slug: 'agent',\n href: 'https://agent.ochk.io',\n label: 'oc·agent',\n sub: 'delegate — scoped auth',\n docsHref: 'https://docs.ochk.io/agent',\n },\n {\n slug: 'pledge',\n href: 'https://pledge.ochk.io',\n label: 'oc·pledge',\n sub: 'swear — bonded commitment',\n docsHref: 'https://docs.ochk.io/pledge',\n },\n];\n\n/** Entries gated behind `showOwnerEntries={true}`. Owner-only family\n * properties (`oc·analytics` at analytics.ochk.io, `oc·bot` at\n * bot.ochk.io) live here so they're invisible to everyone except\n * verified owners — the JWT claim drives the gate. */\nconst OWNER_ENTRIES: SwitcherEntry[] = [\n {\n slug: 'analytics',\n href: 'https://analytics.ochk.io',\n label: 'oc·analytics',\n sub: 'owner cockpit',\n docsHref: 'https://analytics.ochk.io',\n },\n {\n slug: 'bot',\n href: 'https://bot.ochk.io',\n label: 'oc·bot',\n sub: 'social bot',\n docsHref: 'https://bot.ochk.io',\n },\n {\n slug: 'forge',\n href: 'https://forge.ochk.io',\n label: 'oc·forge',\n sub: 'agent ops',\n docsHref: 'https://forge.ochk.io',\n },\n];\n\nexport interface EcosystemSwitcherProps {\n current: EcosystemSlug;\n className?: string;\n /**\n * When true, append the owner-only entries (currently\n * `oc·analytics`) to the family-switcher dropdown. Consumers\n * pass this from their session: `useOcSession().account?.isOwner`.\n * Defaults to false so non-owners never see owner-only links.\n *\n * Not a security boundary — analytics.ochk.io re-checks the\n * live OWNER_OC_ADDRESSES env on every request. This prop only\n * decides whether the UX hint is visible.\n */\n showOwnerEntries?: boolean;\n}\n\nexport function EcosystemSwitcher({\n current,\n className,\n showOwnerEntries = false,\n}: EcosystemSwitcherProps) {\n const [open, setOpen] = useState(false);\n const containerRef = useRef<HTMLDivElement | null>(null);\n\n // Outside-click + Escape close.\n useEffect(() => {\n if (!open) return;\n function onDoc(e: MouseEvent) {\n if (!containerRef.current) return;\n if (!containerRef.current.contains(e.target as Node)) setOpen(false);\n }\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setOpen(false);\n }\n document.addEventListener('mousedown', onDoc);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onDoc);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n return (\n <div ref={containerRef} className={'relative ' + (className ?? '')}>\n <button\n type=\"button\"\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-label=\"Switch OrangeCheck product\"\n title=\"Switch product\"\n onClick={() => setOpen((v) => !v)}\n className={\n 'inline-flex items-center gap-1 px-2 py-1 transition-colors ' +\n (open\n ? 'text-foreground'\n : 'text-muted-foreground hover:text-foreground')\n }\n >\n <Boxes className=\"h-4 w-4\" />\n <ChevronDown\n className={\n 'h-3.5 w-3.5 transition-transform ' + (open ? 'rotate-180' : '')\n }\n />\n </button>\n\n {open && (\n <div\n role=\"menu\"\n aria-label=\"Switch OrangeCheck product\"\n className=\"bg-background absolute right-0 top-full z-[60] mt-2 w-72 border shadow-lg\"\n >\n <div className=\"label-mono text-primary border-b px-4 py-2\">\n § the family\n </div>\n <ul className=\"py-1\">\n {[...ENTRIES, ...(showOwnerEntries ? OWNER_ENTRIES : [])].map((e) => {\n const isActive = e.slug === current;\n return (\n <li key={e.slug}>\n <Link\n href={e.href}\n onClick={() => setOpen(false)}\n aria-current={isActive ? 'page' : undefined}\n className={\n 'group flex items-baseline gap-3 px-4 py-2 transition-colors ' +\n (isActive\n ? 'bg-primary/5'\n : 'hover:bg-muted')\n }\n >\n <span\n className={\n 'font-display flex-1 text-[12px] font-semibold tracking-tight ' +\n (isActive\n ? 'text-primary'\n : 'text-foreground group-hover:text-primary transition-colors')\n }\n >\n {e.label}\n </span>\n <span className=\"text-muted-foreground font-mono text-[10px] tracking-wider uppercase\">\n {e.sub}\n </span>\n {isActive && (\n <Check className=\"text-primary h-3 w-3\" />\n )}\n </Link>\n </li>\n );\n })}\n </ul>\n <div className=\"border-t px-4 py-2 font-mono text-[10px] tracking-widest uppercase\">\n <Link\n href=\"https://docs.ochk.io\"\n onClick={() => setOpen(false)}\n className=\"text-muted-foreground hover:text-foreground inline-block transition-colors\"\n >\n docs.ochk.io →\n </Link>\n </div>\n </div>\n )}\n </div>\n );\n}\n","import type { ClassValue } from 'clsx';\n\nimport { clsx } from 'clsx';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * Canonical class-name merge for the OrangeCheck family.\n * `clsx` for conditional composition, `tailwind-merge` to resolve\n * conflicting Tailwind utilities (last-wins by property).\n */\nexport function cn(...inputs: ClassValue[]): string {\n return twMerge(clsx(inputs));\n}\n","'use client';\n\nimport * as Popover from '@radix-ui/react-popover';\nimport * as React from 'react';\n\nimport { cn } from '../tokens/cn';\n\n/**\n * `<Tooltip>` — the family's hover/focus tooltip primitive.\n *\n * Built on `@radix-ui/react-popover` (already a dependency — we do NOT add\n * `@radix-ui/react-tooltip`) but driven by a *controlled* open boolean so we\n * own the timing and gating Radix's popover doesn't give a tooltip:\n *\n * - hover-intent: opens after `openDelay`ms of sustained pointer hover,\n * closes after a short `closeDelay` grace (WCAG 1.4.13 hoverable).\n * - keyboard parity: also opens on keyboard focus (detected via input-\n * modality, since `:focus-visible` isn't applied yet inside the focus\n * event), closes on blur/Escape, never steals or traps focus.\n * - pointer-fine only: the hover path is gated behind\n * `(hover: hover) and (pointer: fine)` so it never fires on touch — by\n * pointer *type*, not a width breakpoint (a coarse tablet ≥ sm is touch).\n * - `disabled`: a hard force-close, used by `OcLogoDropdown` so the tip and\n * the family menu (which share a trigger) can never paint at once.\n *\n * The content is decorative reinforcement: it's `aria-hidden`, and\n * `pointer-events-none` so a mis-detected pointer can never intercept the\n * click path to the trigger. The authoritative accessible name belongs on the\n * trigger's own `aria-label`.\n */\n\nconst TOOLTIP_SURFACE_CLASS =\n 'bg-popover text-popover-foreground border-border rounded-md border p-2.5 shadow-md';\n\n// Same idiom as the popover/dialog primitives, a touch faster (tooltips are\n// lighter than dialogs) with a smaller 4px travel. Reduced-motion is handled\n// globally by the family `prefers-reduced-motion` reset — nothing to add here.\nconst TOOLTIP_MOTION_CLASS =\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-1 data-[side=top]:slide-in-from-bottom-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 origin-(--radix-popover-content-transform-origin) duration-150 ease-out';\n\nexport interface TooltipProps {\n /** The tooltip body. */\n content: React.ReactNode;\n /** A single trigger element (a `<button>` etc.); receives the hover/focus wiring. */\n children: React.ReactElement;\n side?: 'top' | 'right' | 'bottom' | 'left';\n align?: 'start' | 'center' | 'end';\n sideOffset?: number;\n collisionPadding?: number;\n /** ms of sustained hover before opening. Default 300 (deliberate, not twitchy). */\n openDelay?: number;\n /** ms grace before closing on pointer-leave. Default 90. */\n closeDelay?: number;\n /** Force the tooltip closed regardless of hover/focus (e.g. while a shared menu is open). */\n disabled?: boolean;\n /** Portal to `<body>` (default true). Set false to keep content inline so it inherits a scoped `data-oc-theme`. */\n portal?: boolean;\n /** z-index utility for the content. Default `z-50`. */\n zIndexClassName?: string;\n contentClassName?: string;\n}\n\ninterface TriggerHandlerProps {\n onPointerEnter?: React.PointerEventHandler;\n onPointerLeave?: React.PointerEventHandler;\n onPointerDown?: React.PointerEventHandler;\n onFocus?: React.FocusEventHandler;\n onBlur?: React.FocusEventHandler;\n onKeyDown?: React.KeyboardEventHandler;\n}\n\nfunction compose<E>(theirs: ((e: E) => void) | undefined, ours: (e: E) => void) {\n return (e: E) => {\n theirs?.(e);\n ours(e);\n };\n}\n\n/**\n * Input-modality tracker (the `:focus-visible` polyfill heuristic).\n * `:focus-visible` is NOT reliably applied synchronously inside the `focus`\n * event, so reading `el.matches(':focus-visible')` there misses keyboard focus.\n * Instead we record the last input type from global capture-phase listeners\n * that fire BEFORE focus: a keydown means the focus that follows is keyboard-\n * driven (show the hint); a pointerdown means it's a click (don't — that would\n * flash the tip over the menu).\n */\nlet lastInputWasKeyboard = false;\nlet modalityInstalled = false;\nfunction installModalityTracking() {\n if (modalityInstalled || typeof window === 'undefined') return;\n modalityInstalled = true;\n window.addEventListener('keydown', () => (lastInputWasKeyboard = true), true);\n window.addEventListener('pointerdown', () => (lastInputWasKeyboard = false), true);\n}\n\nexport function Tooltip({\n content,\n children,\n side = 'bottom',\n align = 'start',\n sideOffset = 8,\n collisionPadding = 12,\n openDelay = 300,\n closeDelay = 90,\n disabled = false,\n portal = true,\n zIndexClassName = 'z-50',\n contentClassName,\n}: TooltipProps) {\n const [hovering, setHovering] = React.useState(false);\n const [focusing, setFocusing] = React.useState(false);\n const [isFinePointer, setIsFinePointer] = React.useState(false);\n const openTimer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n const closeTimer = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n\n // Detect a true mouse (fine pointer + real hover). Defaults false for SSR\n // and first client render, then resolves in the effect — a normal post-mount\n // update, not a hydration mismatch.\n React.useEffect(() => {\n installModalityTracking();\n const mq = window.matchMedia('(hover: hover) and (pointer: fine)');\n const apply = () => setIsFinePointer(mq.matches);\n apply();\n mq.addEventListener('change', apply);\n return () => mq.removeEventListener('change', apply);\n }, []);\n\n const clearTimers = React.useCallback(() => {\n if (openTimer.current) clearTimeout(openTimer.current);\n if (closeTimer.current) clearTimeout(closeTimer.current);\n }, []);\n\n React.useEffect(() => clearTimers, [clearTimers]);\n\n // When force-closed (e.g. the shared menu opened), drop the hover latch so\n // the tip doesn't snap back with no delay the instant the menu closes while\n // the pointer is still over the trigger. `focusing` is left alone — a\n // keyboard user who stays focused should still get the immediate hint.\n React.useEffect(() => {\n if (disabled) {\n clearTimers();\n setHovering(false);\n }\n }, [disabled, clearTimers]);\n\n const handlePointerEnter = () => {\n if (!isFinePointer) return;\n if (closeTimer.current) clearTimeout(closeTimer.current);\n openTimer.current = setTimeout(() => setHovering(true), openDelay);\n };\n const handlePointerLeave = () => {\n if (openTimer.current) clearTimeout(openTimer.current);\n closeTimer.current = setTimeout(() => setHovering(false), closeDelay);\n };\n // The first press of EITHER a single- or double-click tears the tip down\n // before the trigger's own onClick toggles a menu, so it never overlaps.\n const handlePointerDown = () => {\n clearTimers();\n setHovering(false);\n setFocusing(false);\n };\n const handleFocus = () => {\n // Only keyboard focus reveals the hint — a mouse click also focuses the\n // trigger, and re-popping the tip over an opening menu would be the bug.\n // Use the modality flag (set before focus fires) rather than\n // `:focus-visible`, which isn't applied yet inside the focus event.\n if (lastInputWasKeyboard) {\n clearTimers();\n setFocusing(true);\n }\n };\n const handleBlur = () => {\n clearTimers();\n setFocusing(false);\n };\n // Escape dismisses the focus-revealed tip without moving focus (WCAG 1.4.13).\n // Handled on the focused trigger directly — robust regardless of Radix's\n // dismissal internals (we suppress its focus-outside dismissal below).\n const handleKeyDown = (e: React.KeyboardEvent) => {\n if (e.key === 'Escape') {\n clearTimers();\n setHovering(false);\n setFocusing(false);\n }\n };\n\n const effectiveOpen = !disabled && ((isFinePointer && hovering) || focusing);\n\n const extra: TriggerHandlerProps = {};\n const childProps = children.props as TriggerHandlerProps;\n extra.onPointerEnter = compose(childProps.onPointerEnter, handlePointerEnter);\n extra.onPointerLeave = compose(childProps.onPointerLeave, handlePointerLeave);\n extra.onPointerDown = compose(childProps.onPointerDown, handlePointerDown);\n extra.onFocus = compose(childProps.onFocus, handleFocus);\n extra.onBlur = compose(childProps.onBlur, handleBlur);\n extra.onKeyDown = compose(childProps.onKeyDown, handleKeyDown);\n const trigger = React.cloneElement(children, extra);\n\n const contentEl = (\n <Popover.Content\n side={side}\n align={align}\n sideOffset={sideOffset}\n collisionPadding={collisionPadding}\n aria-hidden\n onOpenAutoFocus={(e) => e.preventDefault()}\n onCloseAutoFocus={(e) => e.preventDefault()}\n // The tip is aria-hidden + non-focusable, so focus legitimately\n // stays on the trigger (outside the content). Don't let Radix's\n // focus-outside dismissal close a focus-revealed tip; Escape and\n // pointer-down-outside still dismiss.\n onFocusOutside={(e) => e.preventDefault()}\n className={cn(\n TOOLTIP_SURFACE_CLASS,\n TOOLTIP_MOTION_CLASS,\n 'pointer-events-none',\n zIndexClassName,\n contentClassName\n )}\n >\n {content}\n </Popover.Content>\n );\n\n return (\n <Popover.Root\n open={effectiveOpen}\n onOpenChange={(o) => {\n // Radix requests close on Escape / outside interaction — sync our\n // own state so a re-hover re-arms cleanly. We never open via Radix.\n if (!o) {\n clearTimers();\n setHovering(false);\n setFocusing(false);\n }\n }}\n modal={false}\n >\n <Popover.Anchor asChild>{trigger}</Popover.Anchor>\n {portal ? <Popover.Portal>{contentEl}</Popover.Portal> : contentEl}\n </Popover.Root>\n );\n}\n","/**\n * Family-property registry — the single source of truth for every\n * orangecheck-family site. Both `<OcLogoDropdown>` (the global logo →\n * property switcher) and `<OcAccountMenu>` (the global signed-in\n * account chip) read from this table, so a one-line edit here ripples\n * to every consumer simultaneously.\n *\n * Adding a new family member means appending one entry below. Removing\n * one means deleting the entry. There are no other call sites to chase.\n */\n\nimport type { EcosystemSlug } from './ecosystem-switcher';\n\nexport type FamilyCategory = 'hub' | 'product' | 'protocol' | 'owner';\n\nexport interface FamilyProperty {\n /** Stable URL-safe identifier (e.g. `'vault'`). */\n slug: EcosystemSlug;\n /** Absolute origin (e.g. `'https://vault.ochk.io'`). */\n origin: string;\n /** Bare hostname (e.g. `'vault.ochk.io'`). Used in account-menu headers. */\n hostname: string;\n /** Wordmark label (e.g. `'oc·vault'`). */\n label: string;\n /** Short tagline (verb — what-it-does), shown under the wordmark in the menu. */\n sub: string;\n /** Docs deep-link (e.g. `'https://docs.ochk.io/vault'`). */\n docsHref: string;\n /** Family-level category that shapes the visual chip + menu sectioning. */\n category: FamilyCategory;\n}\n\nexport const FAMILY_PROPERTIES: ReadonlyArray<FamilyProperty> = [\n {\n slug: 'home',\n origin: 'https://ochk.io',\n hostname: 'ochk.io',\n label: 'orangecheck',\n sub: 'umbrella · sign-in',\n docsHref: 'https://docs.ochk.io',\n category: 'hub',\n },\n {\n slug: 'docs',\n origin: 'https://docs.ochk.io',\n hostname: 'docs.ochk.io',\n label: 'oc·docs',\n sub: 'unified reference',\n docsHref: 'https://docs.ochk.io',\n category: 'hub',\n },\n {\n slug: 'me',\n origin: 'https://me.ochk.io',\n hostname: 'me.ochk.io',\n label: 'oc·me',\n sub: 'earn — consumer identity',\n docsHref: 'https://docs.ochk.io/me',\n category: 'product',\n },\n {\n slug: 'vault',\n origin: 'https://vault.ochk.io',\n hostname: 'vault.ochk.io',\n label: 'oc·vault',\n sub: 'keep — encrypted secrets',\n docsHref: 'https://docs.ochk.io/vault',\n category: 'product',\n },\n {\n slug: 'chat',\n origin: 'https://chat.ochk.io',\n hostname: 'chat.ochk.io',\n label: 'oc·chat',\n sub: 'message — encrypted chat',\n docsHref: 'https://docs.ochk.io/chat',\n category: 'product',\n },\n {\n slug: 'cosign',\n origin: 'https://cosign.ochk.io',\n hostname: 'cosign.ochk.io',\n label: 'oc·cosign',\n sub: 'cofound — get behind builders',\n docsHref: 'https://docs.ochk.io/cosign',\n category: 'product',\n },\n {\n slug: 'btc',\n origin: 'https://btc.ochk.io',\n hostname: 'btc.ochk.io',\n label: 'oc·btc',\n sub: 'read — bitcoin desk',\n docsHref: 'https://btc.ochk.io/data',\n category: 'product',\n },\n {\n slug: 'globe',\n origin: 'https://globe.ochk.io',\n hostname: 'globe.ochk.io',\n label: 'oc·globe',\n sub: 'watch — the network, live',\n docsHref: 'https://globe.ochk.io/sources',\n category: 'product',\n },\n {\n slug: 'attest',\n origin: 'https://attest.ochk.io',\n hostname: 'attest.ochk.io',\n label: 'oc·attest',\n sub: 'am — sybil resistance',\n docsHref: 'https://docs.ochk.io/attest',\n category: 'protocol',\n },\n {\n slug: 'lock',\n origin: 'https://lock.ochk.io',\n hostname: 'lock.ochk.io',\n label: 'oc·lock',\n sub: 'whisper — encryption',\n docsHref: 'https://docs.ochk.io/lock',\n category: 'protocol',\n },\n {\n slug: 'vote',\n origin: 'https://vote.ochk.io',\n hostname: 'vote.ochk.io',\n label: 'oc·vote',\n sub: 'decide — polls',\n docsHref: 'https://docs.ochk.io/vote',\n category: 'protocol',\n },\n {\n slug: 'stamp',\n origin: 'https://stamp.ochk.io',\n hostname: 'stamp.ochk.io',\n label: 'oc·stamp',\n sub: 'declare — block-anchored',\n docsHref: 'https://docs.ochk.io/stamp',\n category: 'protocol',\n },\n {\n slug: 'agent',\n origin: 'https://agent.ochk.io',\n hostname: 'agent.ochk.io',\n label: 'oc·agent',\n sub: 'delegate — scoped auth',\n docsHref: 'https://docs.ochk.io/agent',\n category: 'protocol',\n },\n {\n slug: 'pledge',\n origin: 'https://pledge.ochk.io',\n hostname: 'pledge.ochk.io',\n label: 'oc·pledge',\n sub: 'swear — bonded commitment',\n docsHref: 'https://docs.ochk.io/pledge',\n category: 'protocol',\n },\n {\n slug: 'analytics',\n origin: 'https://analytics.ochk.io',\n hostname: 'analytics.ochk.io',\n label: 'oc·analytics',\n sub: 'owner cockpit',\n docsHref: 'https://analytics.ochk.io',\n category: 'owner',\n },\n {\n slug: 'bot',\n origin: 'https://bot.ochk.io',\n hostname: 'bot.ochk.io',\n label: 'oc·bot',\n sub: 'social bot',\n docsHref: 'https://bot.ochk.io',\n category: 'owner',\n },\n {\n slug: 'forge',\n origin: 'https://forge.ochk.io',\n hostname: 'forge.ochk.io',\n label: 'oc·forge',\n sub: 'agent ops',\n docsHref: 'https://forge.ochk.io',\n category: 'owner',\n },\n];\n\n/**\n * Canonical lifecycle states for any family site. Used by both the\n * tiny chip rendered next to the wordmark and any other surface that\n * wants to display \"this site is still settling\" UX. Centralised\n * vocabulary so we can't accidentally drift to a parallel synonym\n * like `preview`/`experimental` on different sites.\n *\n * - `live` — production-ready; **no chip rendered** (the absence\n * of a chip is the affordance)\n * - `beta` — feature-complete but still iterating, soft launch\n * - `alpha` — early, breaking changes expected, integrators beware\n */\nexport type SiteState = 'alpha' | 'beta' | 'live';\n\nexport const SITE_STATE_LABEL: Record<Exclude<SiteState, 'live'>, string> = {\n alpha: 'alpha',\n beta: 'beta',\n};\n\n/** Find a property entry by its slug. */\nexport function findFamilyProperty(slug: EcosystemSlug): FamilyProperty | undefined {\n return FAMILY_PROPERTIES.find((p) => p.slug === slug);\n}\n","import { Check, ChevronDown, CornerDownLeft } from 'lucide-react';\nimport Link from 'next/link';\nimport { useRouter } from 'next/router';\nimport * as React from 'react';\nimport { useEffect, useId, useRef, useState, type ReactNode } from 'react';\n\nimport { Tooltip } from '../primitives/tooltip';\nimport { cn } from '../tokens/cn';\nimport type { EcosystemSlug } from './ecosystem-switcher';\nimport {\n FAMILY_PROPERTIES,\n SITE_STATE_LABEL,\n findFamilyProperty,\n type FamilyCategory,\n type SiteState,\n} from './family-properties';\n\n/**\n * `<OcLogoDropdown>` — the logo IS the dropdown.\n *\n * Wraps a site's local LogoMark + wordmark in a button that, on click,\n * drops a popover listing every OrangeCheck family property. The current\n * property is highlighted with a primary-tinted background, a left-edge\n * accent bar, and a \"home\" label — and is itself a clickable link to\n * the local home href (default `/`).\n *\n * Family properties carry one of three categories:\n *\n * - `hub` — orangecheck umbrella + docs (no badge)\n * - `product` — commercial products (me, vault) · primary chip\n * - `protocol` — open verb specs (attest, lock, vote, stamp, agent,\n * pledge) · muted chip\n *\n * The category of the *current* site is auto-rendered as a tiny mono\n * chip inside the trigger button, and the dropdown itself groups\n * entries by category with subtle mono dividers — so the product /\n * protocol distinction is visible both on the logo and in the menu,\n * with a single source of truth (`./family-properties.ts`).\n *\n * The optional `siteState` prop renders a second tiny chip after the\n * category chip — `alpha` or `beta` — for sites that aren't `live`.\n * The vocabulary is canonical across the family (see SiteState in\n * family-properties.ts). Pass it from your per-site config so a\n * single edit propagates to the logo, the account menu, and anywhere\n * else the chip surfaces.\n *\n * Mobile-aware: the popover's width is clamped to the viewport,\n * content scrolls when there are more entries than fit. The trigger\n * chips hide below `sm` to preserve mobile header space — the dropdown\n * itself still shows the grouping.\n *\n * On a fine pointer (mouse) the trigger reveals a themed `<Tooltip>` on\n * hover, and on keyboard focus — naming where you are and the two\n * affordances (`click · switch site`, `double-click · home`). It replaces\n * the old native `title=` (unthemed, undelayed, invisible on touch) and is\n * never shown on touch, where the menu's `home ✓` row is the path home.\n */\n\nconst SECTIONS: Array<{ category: FamilyCategory; label: string }> = [\n { category: 'hub', label: 'hub' },\n { category: 'product', label: 'products' },\n { category: 'protocol', label: 'protocols' },\n { category: 'owner', label: 'owner' },\n];\n\nexport interface OcLogoDropdownProps {\n /**\n * Which property this site IS. Used to highlight the active row,\n * route the active row's link to `homeHref` instead of the cross-\n * domain absolute URL, and pick the category chip rendered next\n * to the wordmark.\n */\n current: EcosystemSlug;\n /**\n * The site's local home path (for the active row). Default `/`.\n * Always a same-origin path — the logo's \"go home\" affordance is\n * preserved by clicking the highlighted row.\n */\n homeHref?: string;\n /**\n * Optional lifecycle state for this site. `'live'` (default) renders\n * no chip; `'alpha'` and `'beta'` render a small mono uppercase chip\n * after the category badge. Drive this from your per-site config so\n * one constant change ripples to every surface.\n */\n siteState?: SiteState;\n /**\n * Logo contents · typically `<LogoMark />` + `<span>oc·X</span>`.\n */\n children: ReactNode;\n /** className for the outer container. */\n className?: string;\n /** className for the trigger button. */\n triggerClassName?: string;\n /** className for the popover. */\n popoverClassName?: string;\n /**\n * When true, include the `owner` section (currently just\n * `oc·analytics`) in the family list. Consumers pass this from\n * their session: `useOcSession().account?.isOwner ?? false`.\n * Defaults to false so non-owners never see the entry.\n *\n * Not a security boundary — analytics.ochk.io re-checks the live\n * OWNER_OC_ADDRESSES env on every request. This prop only\n * controls UX visibility.\n */\n showOwnerEntries?: boolean;\n}\n\nfunction CategoryChip({ category }: { category: FamilyCategory }) {\n if (category === 'hub') return null;\n const label =\n category === 'product' ? 'product' : category === 'protocol' ? 'protocol' : 'owner';\n const tone =\n category === 'product'\n ? 'border-primary/25 bg-primary/10 text-primary'\n : category === 'protocol'\n ? 'border-muted-foreground/20 bg-muted/40 text-muted-foreground'\n : 'border-warning/30 bg-warning/10 text-warning';\n return (\n <span\n aria-label={\n category === 'product'\n ? 'commercial product'\n : category === 'protocol'\n ? 'protocol reference'\n : 'owner-only surface'\n }\n className={\n 'ml-1 hidden rounded-sm border px-1.5 py-[1px] font-mono text-[9px] font-medium tracking-widest uppercase sm:inline-block ' +\n tone\n }\n data-oc-category={category}\n >\n {label}\n </span>\n );\n}\n\nfunction SiteStateBadge({ state }: { state: SiteState }) {\n if (state === 'live') return null;\n return (\n <span\n aria-label={`site lifecycle: ${state}`}\n className=\"text-muted-foreground ml-1 hidden font-mono text-[9px] font-medium tracking-widest uppercase sm:inline-block\"\n data-oc-site-state={state}\n >\n {SITE_STATE_LABEL[state]}\n </span>\n );\n}\n\nfunction MenuCategoryChip({ category }: { category: FamilyCategory }) {\n if (category === 'hub') return null;\n const label =\n category === 'product' ? 'pro' : category === 'protocol' ? 'spec' : 'own';\n const tone =\n category === 'product'\n ? 'bg-primary/10 text-primary'\n : category === 'protocol'\n ? 'bg-muted/60 text-muted-foreground'\n : 'bg-warning/15 text-warning';\n return (\n <span\n aria-hidden\n className={\n 'inline-block shrink-0 rounded-sm px-1 py-[1px] font-mono text-[9px] font-medium tracking-widest uppercase ' +\n tone\n }\n >\n {label}\n </span>\n );\n}\n\n/**\n * The hover/focus tooltip body — three rows that the native `title=` used to\n * hide: where you are, then `click · switch site` and `double-click · home`.\n * Decorative reinforcement of the trigger's `aria-label` (the tooltip itself\n * is `aria-hidden`); the same `CornerDownLeft` glyph as the in-menu home hint.\n */\nfunction SwitcherTooltipCard({ current }: { current: EcosystemSlug }) {\n const prop = findFamilyProperty(current);\n return (\n <div className=\"w-[13rem] max-w-[calc(100vw-1.5rem)]\">\n <div className=\"flex flex-col leading-tight\">\n <span className=\"flex flex-wrap items-baseline gap-x-1.5\">\n <span className=\"text-muted-foreground font-mono text-[9px] tracking-widest uppercase\">\n you’re on\n </span>\n <span className=\"text-primary font-display text-[12px] font-semibold tracking-tight\">\n {prop?.label ?? 'orangecheck family'}\n </span>\n </span>\n {prop?.sub && (\n <span className=\"text-muted-foreground mt-0.5 font-mono text-[10px] tracking-wide\">\n {prop.sub}\n </span>\n )}\n </div>\n <div className=\"border-border -mx-2.5 my-2 border-t\" />\n <div className=\"flex items-center gap-1.5\">\n <ChevronDown aria-hidden className=\"text-muted-foreground h-3 w-3 shrink-0\" />\n <span className=\"text-primary font-mono text-[10px] font-medium tracking-widest uppercase\">\n click\n </span>\n <span className=\"text-muted-foreground font-mono text-[10px]\">·</span>\n <span className=\"text-muted-foreground font-mono text-[10px] tracking-wide\">\n switch site\n </span>\n </div>\n <div className=\"mt-1.5 flex items-center gap-1.5\">\n <CornerDownLeft aria-hidden className=\"text-muted-foreground h-3 w-3 shrink-0\" />\n <span className=\"text-primary font-mono text-[10px] font-medium tracking-widest uppercase\">\n double-click\n </span>\n <span className=\"text-muted-foreground font-mono text-[10px]\">·</span>\n <span className=\"text-muted-foreground font-mono text-[10px] tracking-wide\">\n home\n </span>\n </div>\n </div>\n );\n}\n\nexport function OcLogoDropdown({\n current,\n homeHref = '/',\n siteState = 'live',\n children,\n className,\n triggerClassName,\n popoverClassName,\n showOwnerEntries = false,\n}: OcLogoDropdownProps) {\n const [open, setOpen] = useState(false);\n const containerRef = useRef<HTMLDivElement | null>(null);\n const menuId = useId();\n const router = useRouter();\n\n const currentCategory: FamilyCategory = findFamilyProperty(current)?.category ?? 'hub';\n\n /**\n * Trigger click semantics:\n *\n * single-click → toggle the family dropdown\n * double-click → navigate to `homeHref` (the local landing)\n *\n * `MouseEvent.detail` is the running click count for clicks within\n * the browser's double-click threshold (~500ms). The DOM still\n * fires the `click` event on the first tap, so the dropdown\n * momentarily opens during a double-click — and the second click\n * navigates home. That's the visual story the popover-side hint\n * sells: *open · tap again · home.*\n */\n function handleTriggerClick(e: React.MouseEvent<HTMLButtonElement>) {\n if (e.detail >= 2) {\n e.preventDefault();\n setOpen(false);\n void router.push(homeHref);\n return;\n }\n setOpen((v) => !v);\n }\n\n // Outside-click + Escape close.\n useEffect(() => {\n if (!open) return;\n function onDoc(e: MouseEvent) {\n if (!containerRef.current) return;\n if (!containerRef.current.contains(e.target as Node)) setOpen(false);\n }\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setOpen(false);\n }\n document.addEventListener('mousedown', onDoc);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onDoc);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n return (\n <div\n ref={containerRef}\n className={'relative inline-flex items-center ' + (className ?? '')}\n data-oc-logo-dropdown=\"\"\n data-oc-current-category={currentCategory}\n data-oc-site-state={siteState}\n >\n <Tooltip\n content={<SwitcherTooltipCard current={current} />}\n disabled={open}\n side=\"bottom\"\n align=\"start\"\n sideOffset={8}\n zIndexClassName=\"z-[70]\"\n >\n <button\n type=\"button\"\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-controls={menuId}\n aria-label=\"orangecheck family menu\"\n onClick={handleTriggerClick}\n className={cn(\n // focus indicator is guaranteed even if a consumer overrides triggerClassName\n 'focus-visible:ring-primary/60 rounded-sm focus-visible:ring-2 focus-visible:outline-none',\n triggerClassName ??\n 'group hover:bg-accent/30 -mx-1.5 -my-1 flex min-h-[40px] items-center gap-2 rounded-sm px-1.5 py-1 transition-colors ' +\n (open ? 'bg-accent/20' : '')\n )}\n data-oc-logo-dropdown-trigger=\"\"\n data-oc-logo-dropdown-open={open ? 'true' : 'false'}\n >\n {children}\n <CategoryChip category={currentCategory} />\n <SiteStateBadge state={siteState} />\n <ChevronDown\n aria-hidden\n className={\n 'text-muted-foreground group-hover:text-foreground/80 h-3.5 w-3.5 shrink-0 transition-transform duration-200 ' +\n (open ? 'rotate-180' : '')\n }\n />\n </button>\n </Tooltip>\n {/* Home affordance · a sibling Link to the trigger button\n rather than a child of it (nested buttons would be\n invalid HTML). Fades + slides in when the dropdown is\n open, whispering \"tap again, you'll go home\". Clicking\n the hint navigates directly — works for users who\n discover it before they discover the double-click. The\n subtle motion-safe pulse on the icon nudges the eye\n without shouting. */}\n <Link\n href={homeHref}\n aria-label={'go to ' + homeHref + ' (this site\\'s home)'}\n onClick={() => setOpen(false)}\n tabIndex={open ? 0 : -1}\n className={\n 'hover:text-primary group/home -ml-1 hidden items-center gap-1 rounded-sm px-1.5 py-1 font-mono text-[9px] tracking-widest uppercase transition-all duration-200 sm:inline-flex ' +\n (open\n ? 'pointer-events-auto translate-x-0 text-muted-foreground opacity-100 hover:bg-accent/30'\n : 'pointer-events-none -translate-x-1 opacity-0')\n }\n data-oc-logo-dropdown-home-hint=\"\"\n >\n <CornerDownLeft\n aria-hidden\n className={\n 'h-3 w-3 group-hover/home:text-primary ' +\n (open ? 'motion-safe:animate-pulse' : '')\n }\n />\n <span className=\"text-primary/70 group-hover/home:text-primary\">\n home\n </span>\n </Link>\n\n {open && (\n <div\n id={menuId}\n role=\"menu\"\n aria-label=\"orangecheck family\"\n className={\n popoverClassName ??\n 'bg-background absolute top-full left-0 z-[60] mt-2 w-[min(20rem,calc(100vw-1rem))] border shadow-lg'\n }\n data-oc-logo-dropdown-popover=\"\"\n >\n <div className=\"label-mono text-primary border-b px-4 py-2\">\n § the orangecheck family\n </div>\n <div className=\"max-h-[min(28rem,70vh)] overflow-y-auto py-1\" role=\"none\">\n {SECTIONS.map(({ category, label }) => {\n // Owner-only sections only render when the\n // consumer has explicitly opted in (caller\n // reads `useOcSession().account?.isOwner`).\n // Non-owners simply don't see them.\n if (category === 'owner' && !showOwnerEntries) return null;\n const sectionEntries = FAMILY_PROPERTIES.filter(\n (e) => e.category === category\n );\n if (sectionEntries.length === 0) return null;\n return (\n <div key={category} role=\"none\" data-oc-section={category}>\n <div\n role=\"separator\"\n aria-hidden\n className={\n 'text-muted-foreground px-4 pt-2.5 pb-1 font-mono text-[9px] font-medium tracking-widest uppercase ' +\n (category === 'hub' ? '' : 'border-t mt-1')\n }\n >\n {label}\n </div>\n <ul role=\"none\" className=\"pb-1\">\n {sectionEntries.map((e) => {\n const isActive = e.slug === current;\n const href = isActive ? homeHref : e.origin;\n return (\n <li key={e.slug} role=\"none\">\n <Link\n href={href}\n role=\"menuitem\"\n onClick={() => setOpen(false)}\n aria-current={isActive ? 'page' : undefined}\n className={\n 'group flex items-center gap-2 px-4 py-2 transition-colors ' +\n (isActive\n ? 'bg-primary/8 border-primary -ml-px border-l-2'\n : 'hover:bg-muted -ml-px border-l-2 border-transparent')\n }\n data-oc-logo-dropdown-item={\n isActive ? 'current' : 'sibling'\n }\n data-oc-entry-category={e.category}\n >\n <span className=\"flex min-w-0 flex-1 flex-col leading-tight\">\n <span\n className={\n 'font-display text-[12px] font-semibold tracking-tight ' +\n (isActive\n ? 'text-primary'\n : 'text-foreground group-hover:text-primary transition-colors')\n }\n >\n {e.label}\n </span>\n <span className=\"text-muted-foreground mt-0.5 font-mono text-[10px] tracking-wide\">\n {e.sub}\n </span>\n </span>\n <MenuCategoryChip category={e.category} />\n {isActive ? (\n <span className=\"text-primary inline-flex shrink-0 items-center gap-1 font-mono text-[10px] tracking-widest uppercase\">\n home\n <Check className=\"h-3 w-3\" />\n </span>\n ) : null}\n </Link>\n </li>\n );\n })}\n </ul>\n </div>\n );\n })}\n </div>\n <div className=\"border-t px-4 py-2 font-mono text-[10px] tracking-widest uppercase\">\n <Link\n href=\"https://docs.ochk.io\"\n onClick={() => setOpen(false)}\n className=\"text-muted-foreground hover:text-foreground inline-block transition-colors\"\n >\n docs.ochk.io →\n </Link>\n </div>\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport {\n createContext,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n type ReactNode,\n} from 'react';\n\nimport {\n accentFor,\n DEFAULT_OC_THEME,\n OC_DEFAULT_ACCENT,\n OC_MOTION_COOKIE,\n OC_SKIN_COOKIE,\n OC_THEMES,\n resolveTheme,\n type OcTheme,\n} from './themes';\nimport { OcAurora } from './aurora';\n\ndeclare global {\n interface Window {\n /** Defined by `getOcThemeInitScript()`; recolors favicon + theme-color. */\n __ocApplySkinChrome?: (skin: string) => void;\n }\n}\n\n/**\n * OcThemeProvider — the skin (named-theme) axis.\n *\n * Orthogonal to `next-themes`, which owns light/dark via the `.dark` class.\n * This provider owns the `data-oc-theme` attribute on `<html>` and persists the\n * choice in the `oc_skin` cookie at `Domain=.ochk.io`, so a skin chosen on one\n * `*.ochk.io` site is honored on every other. It re-reads the cookie on focus /\n * visibility change so a fresh choice picks up when the user returns to a tab\n * (same cross-site pickup trick `OcAccountMenu` uses for sign-in).\n *\n * Mount once, inside (or beside) the `next-themes` `<ThemeProvider>`:\n *\n * <ThemeProvider attribute=\"class\" defaultTheme=\"system\" enableSystem>\n * <OcThemeProvider>\n * …app…\n * </OcThemeProvider>\n * </ThemeProvider>\n *\n * Pair with `getOcThemeInitScript()` in `_document` to avoid a flash before\n * hydration.\n */\n\nconst ONE_YEAR = 60 * 60 * 24 * 365;\nconst ATTR = 'data-oc-theme';\nconst MOTION_ATTR = 'data-oc-motion';\n\n/** Ambient-motion switch. `'off'` freezes the aurora and every `.oc-ambient`. */\nexport type OcMotion = 'on' | 'off';\n\nfunction readSkinCookie(): string | null {\n if (typeof document === 'undefined') return null;\n const prefix = `${OC_SKIN_COOKIE}=`;\n for (const part of document.cookie.split(';')) {\n const trimmed = part.trim();\n if (trimmed.startsWith(prefix)) {\n const v = decodeURIComponent(trimmed.slice(prefix.length));\n return v.length > 0 ? v : null;\n }\n }\n return null;\n}\n\nfunction writeSkinCookie(value: string): void {\n if (typeof document === 'undefined') return;\n const isLocal =\n location.hostname === 'localhost' || location.hostname === '127.0.0.1';\n const parts = [\n `${OC_SKIN_COOKIE}=${encodeURIComponent(value)}`,\n 'Path=/',\n `Max-Age=${ONE_YEAR}`,\n 'SameSite=Lax',\n ];\n if (!isLocal) {\n parts.push('Domain=.ochk.io');\n parts.push('Secure');\n }\n document.cookie = parts.join('; ');\n}\n\nfunction applyAttr(skin: string): void {\n if (typeof document === 'undefined') return;\n document.documentElement.setAttribute(ATTR, skin);\n}\n\nfunction readMotionCookie(): OcMotion | null {\n if (typeof document === 'undefined') return null;\n const prefix = `${OC_MOTION_COOKIE}=`;\n for (const part of document.cookie.split(';')) {\n const trimmed = part.trim();\n if (trimmed.startsWith(prefix)) {\n const v = decodeURIComponent(trimmed.slice(prefix.length));\n return v === 'off' ? 'off' : v === 'on' ? 'on' : null;\n }\n }\n return null;\n}\n\nfunction writeMotionCookie(value: OcMotion): void {\n if (typeof document === 'undefined') return;\n const isLocal =\n location.hostname === 'localhost' || location.hostname === '127.0.0.1';\n const parts = [\n `${OC_MOTION_COOKIE}=${encodeURIComponent(value)}`,\n 'Path=/',\n `Max-Age=${ONE_YEAR}`,\n 'SameSite=Lax',\n ];\n if (!isLocal) {\n parts.push('Domain=.ochk.io');\n parts.push('Secure');\n }\n document.cookie = parts.join('; ');\n}\n\n/** Attribute is only present when motion is off — absence means the default. */\nfunction applyMotionAttr(motion: OcMotion): void {\n if (typeof document === 'undefined') return;\n if (motion === 'off') document.documentElement.setAttribute(MOTION_ATTR, 'off');\n else document.documentElement.removeAttribute(MOTION_ATTR);\n}\n\n/**\n * Swap the browser chrome (favicon + `<meta name=\"theme-color\">`) to the skin's\n * accent. The real work lives in the global installed by\n * `getOcThemeInitScript()` (so the favicon's original SVG is captured exactly\n * once, before the init script's own first recolor — avoids re-reading an\n * already-swapped data: URI). If the init script wasn't included, fall back to\n * the theme-color swap alone (favicon recolor needs the captured original).\n */\nfunction applySkinChrome(skin: string): void {\n if (typeof window === 'undefined') return;\n if (typeof window.__ocApplySkinChrome === 'function') {\n window.__ocApplySkinChrome(skin);\n return;\n }\n const meta = document.querySelector('meta[name=\"theme-color\"]');\n if (meta) meta.setAttribute('content', accentFor(skin));\n}\n\ninterface OcSkinContextValue {\n /** Current skin id (always resolved to a known theme). */\n skin: string;\n /** Set the skin: validates, applies the attribute, persists the cookie. */\n setSkin: (id: string) => void;\n /** The full registry, for rendering a picker. */\n themes: readonly OcTheme[];\n /** Ambient-motion switch ('off' pauses aurora + every `.oc-ambient`). */\n motion: OcMotion;\n /** Set ambient motion: applies the attribute, persists the cookie. */\n setMotion: (value: OcMotion) => void;\n}\n\nconst OcSkinContext = createContext<OcSkinContextValue | null>(null);\n\nexport interface OcThemeProviderProps {\n children: ReactNode;\n /** Skin to assume before the cookie is read (defaults to `orangecheck`). */\n defaultSkin?: string;\n /**\n * The ambient bitcoin-aurora background. `true` (default) renders it behind\n * the app; `false` disables it; `{ intensity }` tunes its strength for this\n * site (e.g. `aurora={{ intensity: 0.5 }}` on a reading-heavy surface).\n * OcAuroraGL (the silk-field upgrade) is ON by default (the CSS blobs\n * remain the permanent floor under every failure path). Reading- and\n * console-heavy surfaces opt OUT with `{ gl: false }`.\n */\n aurora?: boolean | { intensity?: number; gl?: boolean };\n}\n\nexport function OcThemeProvider({\n children,\n defaultSkin = DEFAULT_OC_THEME,\n aurora = true,\n}: OcThemeProviderProps) {\n const [skin, setSkinState] = useState<string>(() => resolveTheme(defaultSkin));\n const [motion, setMotionState] = useState<OcMotion>('on');\n const hydratedRef = useRef(false);\n\n // Hydrate from the cookies once on mount and align the attributes.\n useEffect(() => {\n if (hydratedRef.current) return;\n hydratedRef.current = true;\n const fromCookie = resolveTheme(readSkinCookie() ?? defaultSkin);\n applyAttr(fromCookie);\n applySkinChrome(fromCookie);\n setSkinState(fromCookie);\n const motionCookie = readMotionCookie() ?? 'on';\n applyMotionAttr(motionCookie);\n setMotionState(motionCookie);\n }, [defaultSkin]);\n\n // Cross-site pickup: re-read the cookies when the tab regains focus.\n useEffect(() => {\n function sync() {\n const fromCookie = resolveTheme(readSkinCookie() ?? skin);\n if (fromCookie !== skin) {\n applyAttr(fromCookie);\n applySkinChrome(fromCookie);\n setSkinState(fromCookie);\n }\n const motionCookie = readMotionCookie() ?? 'on';\n if (motionCookie !== motion) {\n applyMotionAttr(motionCookie);\n setMotionState(motionCookie);\n }\n }\n window.addEventListener('focus', sync);\n document.addEventListener('visibilitychange', sync);\n return () => {\n window.removeEventListener('focus', sync);\n document.removeEventListener('visibilitychange', sync);\n };\n }, [skin, motion]);\n\n const setSkin = useCallback((id: string) => {\n const next = resolveTheme(id);\n applyAttr(next);\n applySkinChrome(next);\n writeSkinCookie(next);\n setSkinState(next);\n }, []);\n\n const setMotion = useCallback((value: OcMotion) => {\n const next: OcMotion = value === 'off' ? 'off' : 'on';\n applyMotionAttr(next);\n writeMotionCookie(next);\n setMotionState(next);\n }, []);\n\n const value = useMemo<OcSkinContextValue>(\n () => ({ skin, setSkin, themes: OC_THEMES, motion, setMotion }),\n [skin, setSkin, motion, setMotion]\n );\n\n return (\n <OcSkinContext.Provider value={value}>\n {aurora !== false && (\n <OcAurora\n intensity={typeof aurora === 'object' ? aurora.intensity : undefined}\n // OcAuroraGL is the family default (aurora depth R2): a bare\n // provider, `aurora={true}`, or an object without `gl` opts\n // IN. Reading/console surfaces opt OUT with `gl: false`.\n gl={typeof aurora === 'object' ? (aurora.gl ?? true) : true}\n />\n )}\n {children}\n </OcSkinContext.Provider>\n );\n}\n\n/** Read the current skin + setter. Throws if used outside `OcThemeProvider`. */\nexport function useOcSkin(): OcSkinContextValue {\n const ctx = useContext(OcSkinContext);\n if (!ctx) {\n throw new Error('useOcSkin must be used within <OcThemeProvider>');\n }\n return ctx;\n}\n\n/**\n * Read the ambient-motion switch + setter. The WCAG 2.2.2 pause mechanism:\n * `'off'` sets `data-oc-motion=\"off\"` on `<html>` (persisted family-wide in the\n * `oc_motion` cookie), which pauses the aurora and any `.oc-ambient` element.\n * Throws if used outside `OcThemeProvider`.\n */\nexport function useOcMotion(): { motion: OcMotion; setMotion: (value: OcMotion) => void } {\n const { motion, setMotion } = useOcSkin();\n return { motion, setMotion };\n}\n\n/**\n * Blocking init script for `_document` (Pages Router) `<Head>`. Applies the\n * cookie's skin to `<html>` before first paint so there is no flash of the\n * default skin. Inject with:\n *\n * <script dangerouslySetInnerHTML={{ __html: getOcThemeInitScript() }} />\n */\nexport function getOcThemeInitScript(defaultSkin: string = DEFAULT_OC_THEME): string {\n // Self-contained IIFE — no imports available at parse time. Beyond applying\n // the skin attribute before first paint, it installs `window.__ocApplySkinChrome`\n // (the single owner of the favicon + theme-color swap) and runs it for the\n // saved skin. OcThemeProvider re-invokes the same global on later changes, so\n // the favicon's *original* SVG is captured exactly once (before any recolor)\n // and re-recolored from `#f97316` to the active skin's accent. The favicon\n // recolor is async (a fetch of the same-origin favicon.svg) — chrome updates\n // a beat after paint, which is fine; the skin attribute itself is synchronous.\n const accents = Object.fromEntries(OC_THEMES.map((t) => [t.id, t.accent]));\n return (\n `(function(){` +\n `var ACC=${JSON.stringify(accents)},DEF=${JSON.stringify(defaultSkin)},ORIG=${JSON.stringify(OC_DEFAULT_ACCENT)},fav=null;` +\n `function acc(s){return ACC[s]||ACC[DEF]||ORIG;}` +\n `window.__ocApplySkinChrome=function(s){try{` +\n `var a=acc(s);` +\n `var meta=document.querySelector('meta[name=\"theme-color\"]');if(meta){meta.setAttribute('content',a);}` +\n `var link=document.querySelector('link[rel~=\"icon\"][type=\"image/svg+xml\"]');if(!link){return;}` +\n `var paint=function(svg){link.setAttribute('href','data:image/svg+xml,'+encodeURIComponent(svg.split(ORIG).join(a)));};` +\n `if(fav!=null){paint(fav);return;}` +\n `var h=link.getAttribute('href');if(!h||h.indexOf('data:')===0){return;}` +\n `fetch(h).then(function(r){return r.text();}).then(function(svg){fav=svg;paint(svg);}).catch(function(){});` +\n `}catch(e){}};` +\n `try{var m=document.cookie.match(/(?:^|; )${OC_SKIN_COOKIE}=([^;]*)/);var s=m?decodeURIComponent(m[1]):DEF;if(!s){s=DEF;}` +\n `document.documentElement.setAttribute('${ATTR}',s);window.__ocApplySkinChrome(s);}` +\n `catch(e){document.documentElement.setAttribute('${ATTR}',DEF);}` +\n // Ambient-motion pause (oc_motion cookie) applied before first paint so\n // a paused choice never flashes a moving frame. Absence = motion on.\n `try{var mm=document.cookie.match(/(?:^|; )${OC_MOTION_COOKIE}=([^;]*)/);` +\n `if(mm&&decodeURIComponent(mm[1])==='off'){document.documentElement.setAttribute('${MOTION_ATTR}','off');}}` +\n `catch(e){}` +\n `})();`\n );\n}\n","'use client';\n\nimport { Check, Monitor, Moon, Palette, Pause, Sun, Waves } from 'lucide-react';\nimport { useTheme } from 'next-themes';\nimport { useEffect, useRef, useState } from 'react';\n\nimport { cn } from './cn';\nimport { useOcMotion, useOcSkin } from './provider';\n\n/**\n * OcAppearanceMenu — the single header control for ALL appearance settings.\n *\n * One icon button opens a dropdown with both axes:\n * • mode — light / dark / system (next-themes `.dark` class)\n * • theme — the registered skins (data-oc-theme, persisted .ochk.io)\n *\n * Replaces the separate `ThemeToggle` + `OcThemePicker` so every family site\n * carries exactly one appearance control. Self-contained dropdown (no Radix):\n * outside-click + Escape to close. Requires `<OcThemeProvider>` above it (skin\n * axis) and a next-themes `<ThemeProvider>` (mode axis) — both already mounted\n * on every family site.\n */\nexport interface OcAppearanceMenuProps {\n className?: string;\n triggerClassName?: string;\n popoverClassName?: string;\n}\n\nconst MODES = [\n { id: 'light', label: 'light', Icon: Sun },\n { id: 'dark', label: 'dark', Icon: Moon },\n { id: 'system', label: 'system', Icon: Monitor },\n] as const;\n\n/**\n * AppearanceControls — the mode segment + skin list, with no trigger/popover\n * chrome of its own. Embed it anywhere a surface wants to host appearance\n * settings inline (the standalone OcAppearanceMenu popover, the mobile account\n * menu, a site's Sheet drawer). Requires `<OcThemeProvider>` + next-themes\n * above it, like OcAppearanceMenu.\n */\nexport function AppearanceControls({ className }: { className?: string }) {\n const { skin, setSkin, themes } = useOcSkin();\n const { motion, setMotion } = useOcMotion();\n const { theme, setTheme } = useTheme();\n const [mounted, setMounted] = useState(false);\n useEffect(() => setMounted(true), []);\n const activeMode = mounted ? (theme ?? 'system') : null;\n const activeMotion = mounted ? motion : null;\n\n return (\n <div className={className}>\n <div className=\"label-mono text-muted-foreground px-3 pt-3 pb-2\">mode</div>\n <div className=\"grid grid-cols-3 gap-1 px-2 pb-2\">\n {MODES.map(({ id, label, Icon }) => {\n const active = activeMode === id;\n return (\n <button\n key={id}\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n onClick={() => setTheme(id)}\n className={cn(\n 'flex flex-col items-center gap-1 rounded-md border py-2 text-[11px] transition-colors',\n active\n ? 'border-primary text-foreground bg-accent'\n : 'border-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground'\n )}\n >\n <Icon className=\"size-4\" aria-hidden />\n {label}\n </button>\n );\n })}\n </div>\n <div className=\"label-mono text-muted-foreground border-t px-3 pt-3 pb-1\">theme</div>\n <ul className=\"pb-1\">\n {themes.map((t) => {\n const active = t.id === skin;\n return (\n <li key={t.id}>\n <button\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n onClick={() => setSkin(t.id)}\n className={cn(\n 'hover:bg-accent hover:text-accent-foreground flex w-full items-start gap-2 px-3 py-2 text-left transition-colors',\n active && 'text-foreground'\n )}\n >\n <span className=\"mt-0.5 size-4 shrink-0\">\n {active && <Check className=\"text-primary size-4\" aria-hidden />}\n </span>\n <span className=\"min-w-0\">\n <span className=\"block text-sm font-medium\">{t.label}</span>\n <span className=\"text-muted-foreground block text-xs leading-snug\">\n {t.description}\n </span>\n </span>\n </button>\n </li>\n );\n })}\n </ul>\n <div className=\"label-mono text-muted-foreground border-t px-3 pt-3 pb-2\">\n ambient motion\n </div>\n <div className=\"grid grid-cols-2 gap-1 px-2 pb-3\">\n {(\n [\n { id: 'on', label: 'on', Icon: Waves },\n { id: 'off', label: 'off', Icon: Pause },\n ] as const\n ).map(({ id, label, Icon }) => {\n const active = activeMotion === id;\n return (\n <button\n key={id}\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n aria-label={id === 'off' ? 'pause ambient motion' : 'ambient motion on'}\n onClick={() => setMotion(id)}\n className={cn(\n 'flex flex-col items-center gap-1 rounded-md border py-2 text-[11px] transition-colors',\n active\n ? 'border-primary text-foreground bg-accent'\n : 'border-transparent text-muted-foreground hover:bg-accent hover:text-accent-foreground'\n )}\n >\n <Icon className=\"size-4\" aria-hidden />\n {label}\n </button>\n );\n })}\n </div>\n </div>\n );\n}\n\nexport function OcAppearanceMenu({\n className,\n triggerClassName,\n popoverClassName,\n}: OcAppearanceMenuProps) {\n const [open, setOpen] = useState(false);\n const rootRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n if (!open) return;\n function onDown(e: MouseEvent) {\n if (rootRef.current && !rootRef.current.contains(e.target as Node)) setOpen(false);\n }\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setOpen(false);\n }\n document.addEventListener('mousedown', onDown);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onDown);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n return (\n <div ref={rootRef} className={cn('relative', className)}>\n <button\n type=\"button\"\n aria-label=\"appearance settings\"\n aria-haspopup=\"menu\"\n aria-expanded={open}\n title=\"appearance · mode + theme\"\n onClick={() => setOpen((v) => !v)}\n className={cn(\n 'text-muted-foreground hover:text-foreground inline-flex size-9 items-center justify-center rounded-md transition-colors outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50',\n triggerClassName\n )}\n >\n <Palette className=\"size-4\" aria-hidden />\n </button>\n\n {open && (\n <div\n role=\"menu\"\n className={cn(\n 'bg-popover text-popover-foreground absolute right-0 z-50 mt-2 w-64 overflow-hidden rounded-md border shadow-md',\n popoverClassName\n )}\n >\n <AppearanceControls />\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport Link from 'next/link';\nimport { useEffect, useRef, useState, type ReactNode } from 'react';\nimport { Check, Copy, Loader2, Menu, Plus, X } from 'lucide-react';\nimport {\n fetchOcLinkedIdentities,\n useOcSession,\n type DisplayIdentity,\n type DisplayIdentityKind,\n type OcAccountSummary,\n type OcLinkedIdentity,\n type OcSignOutScope,\n} from '@orangecheck/auth-client';\n\nimport { AppearanceControls } from '../tokens/appearance-menu';\nimport { cn } from '../tokens/cn';\nimport type { EcosystemSlug } from './ecosystem-switcher';\nimport { findFamilyProperty, type SiteState } from './family-properties';\n\n/**\n * `<OcAccountMenu>` — the canonical top-right account affordance for\n * every family site. Replaces the older inline-styled `OcAccountChip`\n * from `@orangecheck/auth-client` with a Tailwind-styled, fully\n * configurable, cross-site-aware dropdown.\n *\n * Three explicit visual states:\n *\n * 1. **Pre-hydration / loading** — neutral `sign in` placeholder so\n * the header never goes blank on first paint.\n * 2. **Anonymous / error** — primary-styled `sign in` CTA pointing\n * at the site's local `/signin` (or whatever `signInUrl` you\n * pass).\n * 3. **Authenticated** — pill with a primary-tinted signal dot and\n * shortened did_oc (or display name if set); click → popover\n * with the full did_oc as a one-click copy-to-clipboard row,\n * optional site-specific menu items, family dashboard link,\n * sign-out, and an optional BuildFooter showing site name +\n * version + commit sha → GitHub.\n *\n * Cross-site recognition: the component re-fetches the session on\n * `visibilitychange` and `focus` events, so when a user signs in at a\n * sibling site (ochk.io, attest.ochk.io, etc.) and tabs back, the\n * chip flips from \"sign in\" to \"signed in\" without a hard reload.\n *\n * The component reads `useOcSession()` from `@orangecheck/auth-client`,\n * so the consuming app must mount `<OcSessionProvider>` somewhere in\n * its tree (already standard in every consumer's `_app.tsx`).\n */\n\nexport interface OcAccountMenuItem {\n /** Same-origin path or absolute URL. */\n href: string;\n /** Visible label. */\n label: string;\n /**\n * When `true`, opens in a new tab and renders a ↗ glyph after the\n * label. Use for cross-domain links (e.g. `https://ochk.io/dashboard`).\n */\n external?: boolean;\n}\n\nexport interface OcAccountMenuBuildInfo {\n /** Display version string, e.g. `'0.5.0'` (rendered as `v0.5.0`). */\n version: string;\n /**\n * 7+ character commit SHA. Render as `'dev'` (or omit) for local\n * dev to suppress the GitHub link.\n */\n sha?: string;\n /**\n * GitHub `owner/repo` slug — combined with `sha` to produce the\n * `https://github.com/<repo>/commit/<sha>` link.\n */\n repo?: string;\n}\n\n/**\n * Minimal session shape `<OcAccountMenuView>` needs. Compatible with\n * `useOcSession()`'s return value but explicit so consumers running\n * their own auth context (e.g. oc-www's local `useAuth`) can pass an\n * adapter without depending on `@orangecheck/auth-client`'s exact\n * types.\n */\nexport interface OcAccountMenuSession {\n status: 'loading' | 'authenticated' | 'anonymous' | 'error';\n account: {\n didOc: string;\n displayName: string | null;\n /**\n * The identity the user has promoted as their badge label —\n * `{ kind, value }`, always populated (defaults to the did).\n * Drives the collapsed-trigger label and the active row in the\n * \"show as\" promote list.\n */\n displayIdentity: DisplayIdentity;\n /** The user's Nostr npub, when set — a promotable badge\n * identity that (unlike btc/email) is a profile field, not a\n * linked-identity row, so it is read from the session. */\n nostrNpub?: string | null;\n } | null;\n /**\n * Sign out. Accepts an optional `{ scope }` so the multi-account\n * \"leave this account\" affordance can route through the same hook.\n * Defaults to `'all'` for back-compat.\n */\n signOut: (opts?: { scope?: OcSignOutScope }) => void | Promise<void>;\n refresh: () => void | Promise<void>;\n /**\n * Promote a linked identity to be the badge label across every\n * `.ochk.io` site. The connected `<OcAccountMenu>` wires this to\n * `useOcSession().setDisplayIdentity`; a site running its own auth\n * context passes its own equivalent.\n */\n setDisplayIdentity: (kind: DisplayIdentityKind) => Promise<void>;\n /**\n * Multi-account roster · other accounts in this browser the user\n * can switch to without re-authenticating. Optional: when omitted\n * (or empty), the `§ accounts` section in `<OcAccountMenu>` is\n * suppressed and the menu renders as single-account. Sites that\n * own their auth context (e.g. oc-www's local `useAuth`) can leave\n * this unset until they add multi-account support.\n */\n roster?: OcAccountSummary[];\n /**\n * Multi-account · flip the active session to the given did_oc.\n * Required when `roster` is non-empty (otherwise the picker rows\n * have nowhere to call).\n */\n switchAccount?: (didOc: string) => Promise<void>;\n /**\n * Multi-account · URL for the \"add another account\" entry point.\n * Defaults to `/signin?add=1` when omitted, which works for every\n * `.ochk.io` family site (in-place sign-in supports the query\n * param by default).\n */\n addAccountUrl?: (returnTo?: string) => string;\n /**\n * Per-tab pinning · `true` when this tab holds its own session\n * token and operates as `account` independently of the shared\n * `.ochk.io` cookie (switching accounts in another tab won't\n * change this one). Renders a quiet `· this tab` hint in the\n * signed-in header. Optional — omitted by pre-pinning auth\n * contexts.\n */\n tabPinned?: boolean;\n}\n\nexport interface OcAccountMenuProps {\n /**\n * Which family property this site IS. Used to label the section\n * header (`§ signed in · vault.ochk.io`) and to suppress the\n * family-dashboard menu item when the user is already on `home`.\n */\n current: EcosystemSlug;\n /**\n * Where the anonymous \"sign in\" affordance points. Default `'/signin'`\n * — works with every site's in-place `<OcSignIn>` page. Pass\n * `'https://ochk.io/signin'` if you want to bounce to the auth host\n * instead.\n */\n signInUrl?: string;\n /** Label for the anonymous \"sign in\" affordance. Default `'sign in'`. */\n signInLabel?: string;\n /**\n * Where the browser lands after the user signs out. Default `'/'`\n * — the current site's own home. On sign-out the menu fires\n * `signOut()` (whose logout round-trip is `keepalive`, so it\n * survives the navigation) and *immediately* hard-navigates here.\n *\n * Navigating in the same tick is deliberate: it forecloses the\n * race where an auth-gated page observes the session flip to\n * `anonymous` and runs its own redirect-to-sign-in first. Sign-out\n * means \"leave\", not \"go sign in again\" — so the family default is\n * the site's home, never a sign-in page or the auth host.\n */\n signOutRedirect?: string;\n /**\n * Site-specific menu items, rendered between the section header\n * and the family-dashboard / sign-out rows. Keep this short —\n * 2–6 entries is the sweet spot. Pass `[]` (or omit) for sites\n * with no per-site routes worth surfacing.\n */\n menuItems?: ReadonlyArray<OcAccountMenuItem>;\n /**\n * Centered primary nav links (typically dashboard · docs · spec).\n * Rendered inside the popover at viewport widths below `sm`\n * (640px) — these are the same links the `<OcPrimaryNav>` row\n * shows inline at sm+, but at ultra-small widths the inline row\n * hides and this popover section takes its place. The result: one\n * dropdown surface owns navigation on phones, no separate\n * hamburger drawer required.\n */\n primaryNavLinks?: ReadonlyArray<OcAccountMenuItem>;\n /**\n * Tertiary nav links (about / contact / status / privacy / etc.).\n * Always visible inside the popover. Folds the legacy mobile-only\n * hamburger drawer's contents into the same dropdown as everything\n * else, so there's exactly one nav surface to learn.\n */\n secondaryNavLinks?: ReadonlyArray<OcAccountMenuItem>;\n /**\n * When `true` (default), shows a `family dashboard ↗` link to\n * `https://ochk.io/dashboard`. Set `false` for `home` (already\n * there) or for sites that don't want it.\n */\n showFamilyDashboard?: boolean;\n /**\n * Optional BuildFooter info. When present, renders a tiny mono\n * footer at the bottom of the popover with `site · vX.Y.Z · sha`\n * — the SHA links to the matching GitHub commit when `repo` is\n * also provided. Drive this from your `next.config.ts` via\n * `NEXT_PUBLIC_APP_VERSION` / `NEXT_PUBLIC_BUILD_SHA` env vars.\n */\n build?: OcAccountMenuBuildInfo;\n /**\n * Optional lifecycle chip rendered inside the BuildFooter line\n * (between site and version). Mirrors the chip on the logo so\n * both surfaces agree.\n */\n siteState?: SiteState;\n /** className overrides for layout-level customisation. */\n className?: string;\n triggerClassName?: string;\n popoverClassName?: string;\n}\n\n/**\n * Partially obscure an identity value for display — first 6 characters,\n * an ellipsis, last 4. Applied uniformly to every kind (did, Bitcoin\n * address, email, npub) and at every length, so a rendered label never\n * exposes a full identity at rest; the full value stays one click away\n * via the copy affordance. Short values fall back to a 4/3 split so the\n * middle is always masked.\n */\nfunction obscureIdentity(value: string): string {\n if (value.length <= 12) {\n return `${value.slice(0, 4)}…${value.slice(-3)}`;\n }\n return `${value.slice(0, 6)}…${value.slice(-4)}`;\n}\n\n/** Human label for an identity kind, shown as the trailing tag on each\n * promote row. */\nconst IDENTITY_KIND_LABEL: Record<DisplayIdentityKind, string> = {\n did: 'did:oc',\n btc: 'bitcoin',\n email: 'email',\n nostr: 'nostr',\n};\n\n/**\n * Best-effort clipboard write. Prefers the async Clipboard API (the\n * only thing that works off a user gesture in modern browsers), and\n * falls back to a hidden-`<textarea>` + `execCommand('copy')` for\n * non-secure contexts or older engines. Returns `true` on success so\n * the caller can decide whether to show \"copied\" feedback.\n */\nasync function writeClipboard(text: string): Promise<boolean> {\n try {\n if (navigator.clipboard?.writeText) {\n await navigator.clipboard.writeText(text);\n return true;\n }\n } catch {\n // fall through to the legacy path\n }\n try {\n const ta = document.createElement('textarea');\n ta.value = text;\n ta.setAttribute('readonly', '');\n ta.style.position = 'fixed';\n ta.style.top = '-1000px';\n ta.style.opacity = '0';\n document.body.appendChild(ta);\n ta.select();\n const ok = document.execCommand('copy');\n document.body.removeChild(ta);\n return ok;\n } catch {\n return false;\n }\n}\n\n/**\n * The `did_oc` row inside the popover header, rendered as a single\n * one-click copy affordance. Clicking anywhere on the address copies\n * the full `did_oc` to the clipboard and flips the trailing glyph\n * from a copy icon to a check for ~1.6s. The popover deliberately\n * stays open so the user sees the confirmation. A visually-hidden\n * `aria-live` region announces the result to screen readers.\n *\n * This is the canonical pattern for surfacing a copyable OrangeCheck\n * identity — every family site gets it for free via `<OcAccountMenu>`.\n */\nfunction CopyableDid({ did }: { did: string }) {\n const [copied, setCopied] = useState(false);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(\n () => () => {\n if (timerRef.current) clearTimeout(timerRef.current);\n },\n [],\n );\n\n const onCopy = async () => {\n const ok = await writeClipboard(did);\n if (!ok) return;\n setCopied(true);\n if (timerRef.current) clearTimeout(timerRef.current);\n timerRef.current = setTimeout(() => setCopied(false), 1600);\n };\n\n return (\n <button\n type=\"button\"\n onClick={onCopy}\n aria-label={\n copied\n ? 'OrangeCheck identity copied to clipboard'\n : `Copy OrangeCheck identity ${did} to clipboard`\n }\n title=\"Copy identity\"\n data-oc-account-menu-copy-did=\"\"\n data-copied={copied ? '' : undefined}\n className=\"group/did hover:bg-accent focus-visible:ring-ring/60 -mx-1.5 mt-px flex w-[calc(100%+0.75rem)] items-start gap-1.5 rounded px-1.5 py-1 text-left transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n >\n <span className=\"text-foreground/90 min-w-0 flex-1 font-mono text-[11px] leading-tight break-all\">\n {did}\n </span>\n <span\n className={\n 'mt-px shrink-0 transition-colors ' +\n (copied\n ? 'text-primary'\n : 'text-muted-foreground group-hover/did:text-foreground/80')\n }\n aria-hidden\n >\n {copied ? <Check className=\"size-3.5\" /> : <Copy className=\"size-3.5\" />}\n </span>\n <span className=\"sr-only\" aria-live=\"polite\">\n {copied ? 'Copied to clipboard' : ''}\n </span>\n </button>\n );\n}\n\n/**\n * One row in the \"§ show as\" list — a promote control and an\n * independent copy-to-clipboard affordance.\n *\n * The value is always rendered partially obscured (`obscureIdentity`).\n * The row body is a radio that promotes this identity to the badge\n * label; the trailing copy button writes the *full* value to the\n * clipboard via the same `writeClipboard` path as the did row (async\n * Clipboard API, hidden-`<textarea>` fallback — works on touch devices\n * and non-secure contexts). Copy and promote are deliberately separate\n * controls: one selects the identity, the other extracts it.\n */\nfunction PromoteRow({\n kind,\n value,\n active,\n busy,\n disabled,\n onPromote,\n}: {\n kind: DisplayIdentityKind;\n value: string;\n active: boolean;\n busy: boolean;\n disabled: boolean;\n onPromote: () => void;\n}) {\n const [copied, setCopied] = useState(false);\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n useEffect(\n () => () => {\n if (timerRef.current) clearTimeout(timerRef.current);\n },\n [],\n );\n\n const onCopy = async () => {\n const ok = await writeClipboard(value);\n if (!ok) return;\n setCopied(true);\n if (timerRef.current) clearTimeout(timerRef.current);\n timerRef.current = setTimeout(() => setCopied(false), 1600);\n };\n\n const kindLabel = IDENTITY_KIND_LABEL[kind];\n\n return (\n <div\n className=\"hover:bg-accent flex items-center gap-1 pr-2 transition-colors\"\n data-oc-account-menu-promote-row={kind}\n data-active={active ? '' : undefined}\n >\n <button\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={active}\n aria-label={active ? `Showing as ${kindLabel}` : `Show as ${kindLabel}`}\n disabled={disabled || active}\n onClick={onPromote}\n data-oc-account-menu-promote={kind}\n className=\"flex min-w-0 flex-1 items-center gap-2 py-2 pl-3 text-left font-mono text-[11px] tracking-wide disabled:cursor-default\"\n >\n <span\n className={\n 'flex size-3.5 shrink-0 items-center justify-center rounded-full border ' +\n (active ? 'border-primary' : 'border-muted-foreground/40')\n }\n aria-hidden\n >\n {active ? <span className=\"bg-primary size-1.5 rounded-full\" /> : null}\n </span>\n <span className=\"text-foreground/90 min-w-0 flex-1 truncate\">\n {obscureIdentity(value)}\n </span>\n </button>\n <button\n type=\"button\"\n onClick={() => void onCopy()}\n aria-label={\n copied ? `${kindLabel} copied to clipboard` : `Copy ${kindLabel} to clipboard`\n }\n title=\"Copy\"\n data-oc-account-menu-promote-copy={kind}\n data-copied={copied ? '' : undefined}\n className=\"hover:bg-background/70 focus-visible:ring-ring/60 flex size-6 shrink-0 items-center justify-center rounded transition-colors focus-visible:ring-2 focus-visible:outline-none\"\n >\n {copied ? (\n <Check className=\"text-primary size-3.5\" />\n ) : (\n <Copy className=\"text-muted-foreground size-3.5\" />\n )}\n </button>\n <span className=\"text-muted-foreground w-14 shrink-0 text-right text-[9px] tracking-widest uppercase\">\n {busy ? <Loader2 className=\"ml-auto size-3 animate-spin\" /> : kindLabel}\n </span>\n <span className=\"sr-only\" aria-live=\"polite\">\n {copied ? 'Copied to clipboard' : ''}\n </span>\n </div>\n );\n}\n\n/**\n * The \"§ show as\" block inside the popover — lists the user's\n * identities and lets them promote one as the badge label across\n * every `.ochk.io` site.\n *\n * The did is always an option (read from the session); the npub too\n * when set. The Bitcoin address and email are *linked identities*, so\n * they're lazy-fetched from the auth host the first time the popover\n * opens — `fetchOcLinkedIdentities()` is one credentialed request,\n * cached for the menu's lifetime. The section renders only once that\n * resolves and only when there are ≥2 identities worth choosing\n * between; with a single identity there is nothing to promote.\n *\n * Promotion calls `setDisplayIdentity(kind)` — which PATCHes the auth\n * host, re-mints the cross-subdomain cookie, and refreshes the session\n * — so the selected row and the collapsed label update in place and\n * every other family tab picks the choice up on its next focus.\n */\nfunction IdentityPromoteSection({\n didOc,\n nostrNpub,\n current,\n open,\n setDisplayIdentity,\n}: {\n didOc: string;\n nostrNpub: string | null;\n current: DisplayIdentity;\n open: boolean;\n setDisplayIdentity: (kind: DisplayIdentityKind) => Promise<void>;\n}) {\n const [identities, setIdentities] = useState<OcLinkedIdentity[] | null>(null);\n const [loadFailed, setLoadFailed] = useState(false);\n const [promoting, setPromoting] = useState<DisplayIdentityKind | null>(null);\n const [promoteErr, setPromoteErr] = useState<string | null>(null);\n // Track the (open-state, account) we last fetched for. Refetch when\n // didOc changes — multi-account switches swap which account's linked\n // identities should appear here, and stale data manifested as the\n // popover visibly reflowing mid-switch (\"dropdown freaking out\").\n const lastFetchKeyRef = useRef<string | null>(null);\n\n useEffect(() => {\n if (!open) return;\n // Fetch on first open AND whenever the active didOc changes.\n if (lastFetchKeyRef.current === didOc) return;\n lastFetchKeyRef.current = didOc;\n let cancelled = false;\n // Reset so the section briefly returns null (suppresses flash)\n // until the new account's identities resolve.\n setIdentities(null);\n setLoadFailed(false);\n void fetchOcLinkedIdentities()\n .then((rows) => {\n if (!cancelled) setIdentities(rows);\n })\n .catch(() => {\n if (!cancelled) setLoadFailed(true);\n });\n return () => {\n cancelled = true;\n };\n }, [open, didOc]);\n\n // Wait for the fetch to settle before rendering — avoids a section\n // that flashes in then vanishes.\n if (identities === null && !loadFailed) return null;\n\n const btc =\n identities?.find((i) => i.kind === 'btc' && i.is_primary && i.value) ??\n identities?.find((i) => i.kind === 'btc' && i.value);\n const email =\n identities?.find((i) => i.kind === 'email' && i.is_primary && i.value) ??\n identities?.find((i) => i.kind === 'email' && i.value);\n\n const options: Array<{ kind: DisplayIdentityKind; value: string }> = [\n { kind: 'did', value: didOc },\n ];\n if (btc?.value) options.push({ kind: 'btc', value: btc.value });\n if (email?.value) options.push({ kind: 'email', value: email.value });\n if (nostrNpub) options.push({ kind: 'nostr', value: nostrNpub });\n\n // Nothing to choose between → no section.\n if (options.length < 2) return null;\n\n const promote = async (kind: DisplayIdentityKind) => {\n if (promoting || kind === current.kind) return;\n setPromoting(kind);\n setPromoteErr(null);\n try {\n await setDisplayIdentity(kind);\n } catch (e) {\n setPromoteErr(e instanceof Error ? e.message : 'promotion failed');\n } finally {\n setPromoting(null);\n }\n };\n\n return (\n <div className=\"border-border border-b p-1\" data-oc-account-menu-section=\"show-as\">\n <div className=\"text-muted-foreground px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § show as\n </div>\n {options.map((opt) => (\n <PromoteRow\n key={opt.kind}\n kind={opt.kind}\n value={opt.value}\n active={opt.kind === current.kind}\n busy={promoting === opt.kind}\n disabled={promoting !== null}\n onPromote={() => void promote(opt.kind)}\n />\n ))}\n {promoteErr ? (\n <div className=\"text-destructive/80 px-3 pt-1 pb-2 font-mono text-[10px]\">\n {promoteErr}\n </div>\n ) : null}\n </div>\n );\n}\n\n/**\n * Connected variant — pulls the session from `useOcSession()`. This is\n * what every consumer site with `<OcSessionProvider>` mounted should\n * use. For sites running a parallel auth context (e.g. oc-www's local\n * `useAuth`), use `<OcAccountMenuView>` below and pass a session prop\n * directly.\n */\nexport function OcAccountMenu(props: OcAccountMenuProps) {\n const session = useOcSession();\n return (\n <OcAccountMenuView\n {...props}\n session={{\n status: session.status,\n account: session.account\n ? {\n didOc: session.account.didOc,\n displayName: session.account.displayName ?? null,\n displayIdentity: session.account.displayIdentity,\n nostrNpub: session.account.nostrNpub ?? null,\n }\n : null,\n signOut: session.signOut,\n refresh: session.refresh,\n setDisplayIdentity: session.setDisplayIdentity,\n // Multi-account · the connected variant always forwards\n // these from useOcSession(). The View variant accepts\n // them as optional so sites running their own auth\n // context (oc-www) can opt in incrementally.\n roster: session.roster,\n switchAccount: session.switchAccount,\n addAccountUrl: session.addAccountUrl,\n // Structural read keeps the auth-client peer floor at\n // ^2.17.0 — `tabPinned` ships in 2.18.0 and is simply\n // undefined (no hint) on older providers.\n tabPinned: (session as { tabPinned?: boolean }).tabPinned,\n }}\n />\n );\n}\n\nexport interface OcAccountMenuViewProps extends OcAccountMenuProps {\n /**\n * The session to render. When using `<OcAccountMenuView>` directly\n * (rather than the connected `<OcAccountMenu>`), pass an adapter\n * over your local auth context.\n */\n session: OcAccountMenuSession;\n}\n\n/**\n * Presentational variant — takes a session as an explicit prop. Use\n * this when your site runs its own auth context (e.g. ochk.io's\n * local `useAuth`) and you want the family-consistent visual without\n * mounting `<OcSessionProvider>`.\n */\n/**\n * MobileMenu — the `☰` rendered to the LEFT of the identity chip on phones\n * (`md:hidden`). Holds the site's nav links (primary + secondary) and the\n * appearance controls (mode + skin), so the mobile header is just\n * `[☰][identity]` with the theme folded in — no centered hamburger, no\n * standalone palette. Auth-independent: present whether signed in or out.\n */\nfunction MobileMenu({\n primary,\n secondary,\n}: {\n primary?: ReadonlyArray<OcAccountMenuItem>;\n secondary?: ReadonlyArray<OcAccountMenuItem>;\n}) {\n const [open, setOpen] = useState(false);\n const ref = useRef<HTMLDivElement | null>(null);\n\n useEffect(() => {\n if (!open) return;\n const onClick = (e: MouseEvent) => {\n if (ref.current && !ref.current.contains(e.target as Node)) setOpen(false);\n };\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') setOpen(false);\n };\n document.addEventListener('mousedown', onClick);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onClick);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n const links = [...(primary ?? []), ...(secondary ?? [])];\n const rowCls =\n 'font-display flex items-center gap-2 px-3 py-2 text-[12px] font-semibold tracking-wider uppercase text-muted-foreground hover:text-foreground hover:bg-accent transition-colors';\n\n return (\n <div ref={ref} className=\"relative md:hidden\" data-oc-account-mobile-menu=\"\">\n <button\n type=\"button\"\n onClick={() => setOpen((v) => !v)}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-label=\"menu\"\n className=\"border-input bg-background hover:bg-accent text-muted-foreground inline-flex size-8 items-center justify-center rounded-md border transition-colors\"\n data-oc-account-mobile-toggle=\"\"\n >\n {open ? <X className=\"size-4\" aria-hidden /> : <Menu className=\"size-4\" aria-hidden />}\n </button>\n {open && (\n <div\n role=\"menu\"\n aria-label=\"menu\"\n className=\"border-border bg-popover text-popover-foreground absolute top-[calc(100%+6px)] right-0 z-50 w-[min(16rem,calc(100vw-1rem))] overflow-hidden border shadow-xl\"\n data-oc-account-mobile-popover=\"\"\n >\n {links.length > 0 && (\n <div className=\"border-b p-1\">\n <div className=\"text-muted-foreground px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § navigate\n </div>\n {links.map((l) =>\n l.external ? (\n <a\n key={l.href}\n href={l.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n role=\"menuitem\"\n onClick={() => setOpen(false)}\n className={rowCls}\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{l.label}</span>\n <span className=\"text-muted-foreground text-[10px]\" aria-hidden>\n ↗\n </span>\n </a>\n ) : (\n <Link\n key={l.href}\n href={l.href}\n role=\"menuitem\"\n onClick={() => setOpen(false)}\n className={rowCls}\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{l.label}</span>\n </Link>\n )\n )}\n </div>\n )}\n <AppearanceControls />\n </div>\n )}\n </div>\n );\n}\n\nexport function OcAccountMenuView({\n current,\n signInUrl = '/signin',\n signInLabel = 'sign in',\n signOutRedirect = '/',\n menuItems,\n primaryNavLinks,\n secondaryNavLinks,\n showFamilyDashboard,\n build,\n siteState,\n className,\n triggerClassName,\n popoverClassName,\n session,\n}: OcAccountMenuViewProps) {\n const {\n status,\n account,\n signOut,\n refresh,\n setDisplayIdentity,\n roster,\n switchAccount,\n addAccountUrl,\n tabPinned,\n } = session;\n const [hydrated, setHydrated] = useState(false);\n const [open, setOpen] = useState(false);\n const wrapRef = useRef<HTMLDivElement | null>(null);\n\n const property = findFamilyProperty(current);\n const hostname = property?.hostname ?? `${current}.ochk.io`;\n const isHome = current === 'home';\n const familyDashboardEnabled = showFamilyDashboard ?? !isHome;\n\n useEffect(() => setHydrated(true), []);\n\n // Cross-site sign-in pickup: re-fetch on visibility / focus.\n useEffect(() => {\n const onWake = () => {\n if (document.visibilityState === 'visible') void refresh();\n };\n const onFocus = () => void refresh();\n document.addEventListener('visibilitychange', onWake);\n window.addEventListener('focus', onFocus);\n return () => {\n document.removeEventListener('visibilitychange', onWake);\n window.removeEventListener('focus', onFocus);\n };\n }, [refresh]);\n\n // Outside-click + Escape close.\n useEffect(() => {\n if (!open) return;\n const onClick = (e: MouseEvent) => {\n if (wrapRef.current && !wrapRef.current.contains(e.target as Node)) setOpen(false);\n };\n const onKey = (e: KeyboardEvent) => {\n if (e.key === 'Escape') setOpen(false);\n };\n document.addEventListener('mousedown', onClick);\n document.addEventListener('keydown', onKey);\n return () => {\n document.removeEventListener('mousedown', onClick);\n document.removeEventListener('keydown', onKey);\n };\n }, [open]);\n\n const signInTrigger = (\n <a\n href={signInUrl}\n aria-label={signInLabel}\n data-oc-account-menu-signin=\"\"\n className={\n triggerClassName ??\n 'border-input bg-background hover:bg-accent inline-flex h-8 items-center justify-center rounded-md border px-3 font-mono text-[11px] font-semibold tracking-widest uppercase transition-colors'\n }\n >\n {signInLabel}\n </a>\n );\n\n // The mobile `☰` (nav + appearance) sits to the LEFT of the identity slot\n // on phones; on md+ it's hidden (nav is inline via OcPrimaryNav, appearance\n // is the desktop palette). Only rendered when this site has nav links.\n const hasNav = ((primaryNavLinks?.length ?? 0) + (secondaryNavLinks?.length ?? 0)) > 0;\n const wrap = (identity: ReactNode) => (\n <div className={cn('flex items-center gap-1', className)} data-oc-account-menu=\"\">\n {hasNav ? <MobileMenu primary={primaryNavLinks} secondary={secondaryNavLinks} /> : null}\n {identity}\n </div>\n );\n\n // States 1 + 2: pre-hydration or anonymous — render the same\n // placeholder/CTA so the slot is never empty.\n if (!hydrated || status === 'loading') {\n return wrap(signInTrigger);\n }\n\n if (status !== 'authenticated' || !account) {\n return wrap(signInTrigger);\n }\n\n // Authenticated — pill + popover. The collapsed label is the\n // user's vanity display name if they set one, otherwise the\n // identity they promoted (`displayIdentity` — defaults to their\n // sign-in identity, ultimately the did).\n const displayName = account.displayName ?? null;\n const label = displayName ?? obscureIdentity(account.displayIdentity.value);\n\n return wrap(\n <div ref={wrapRef} className=\"relative inline-block\">\n <button\n type=\"button\"\n onClick={() => setOpen((v) => !v)}\n aria-haspopup=\"menu\"\n aria-expanded={open}\n aria-label={`Signed in as ${account.didOc}. Open account menu.`}\n className={\n triggerClassName ??\n 'border-primary/40 bg-card hover:bg-accent inline-flex h-8 items-center gap-1.5 rounded-md border px-2 font-mono text-[11px] tracking-wide transition-colors sm:px-3'\n }\n data-oc-account-menu-trigger=\"\"\n >\n <span className=\"bg-primary inline-block size-1.5 shrink-0 rounded-full\" aria-hidden />\n {/* Below sm the chip condenses to dot + chevron only — a long\n display name / obscured did otherwise eats a phone header.\n The full label returns from sm up, capped so it can't blow\n out the row. */}\n <span className=\"text-foreground hidden max-w-[16ch] truncate sm:inline\">\n {label}\n </span>\n <svg\n width=\"9\"\n height=\"9\"\n viewBox=\"0 0 10 10\"\n aria-hidden\n className={\n 'opacity-60 transition-transform ' + (open ? 'rotate-180' : 'rotate-0')\n }\n >\n <path\n d=\"M2 4 L5 7 L8 4\"\n stroke=\"currentColor\"\n strokeWidth=\"1.5\"\n fill=\"none\"\n strokeLinecap=\"round\"\n />\n </svg>\n </button>\n\n {open && (\n <div\n role=\"menu\"\n aria-label=\"Account menu\"\n className={\n popoverClassName ??\n 'border-border bg-popover text-popover-foreground absolute top-[calc(100%+6px)] right-0 z-50 w-[min(20rem,calc(100vw-1rem))] border shadow-xl'\n }\n data-oc-account-menu-popover=\"\"\n >\n <div className=\"border-border border-b p-3\">\n <div className=\"text-primary mb-1 font-mono text-[10px] tracking-widest uppercase\">\n § signed in · {hostname}\n {tabPinned ? (\n <span\n className=\"text-muted-foreground normal-case\"\n data-oc-account-menu-tab-pin=\"\"\n title=\"This tab keeps this account even if you switch accounts in another tab\"\n >\n {' '}\n · this tab\n </span>\n ) : null}\n </div>\n <CopyableDid did={account.didOc} />\n {/* Which identity this account actually IS (email /\n bitcoin / nostr) — surfaced next to the did so a tab\n signed into a DIFFERENT account than your other tabs\n is obvious at a glance, not buried behind the did.\n The did itself already shows above; skip the\n redundant did kind. */}\n {account.displayIdentity.kind !== 'did' &&\n account.displayIdentity.value ? (\n <div className=\"mt-1 flex items-center gap-1.5 font-mono text-[10px] tracking-wide\">\n <span className=\"text-muted-foreground uppercase\">\n {IDENTITY_KIND_LABEL[account.displayIdentity.kind]}\n </span>\n <span className=\"text-foreground/75\">\n {obscureIdentity(account.displayIdentity.value)}\n </span>\n </div>\n ) : null}\n {displayName ? (\n <div className=\"text-muted-foreground mt-1 font-mono text-[10px] tracking-wide\">\n {displayName}\n </div>\n ) : null}\n </div>\n\n <IdentityPromoteSection\n didOc={account.didOc}\n nostrNpub={account.nostrNpub ?? null}\n current={account.displayIdentity}\n open={open}\n setDisplayIdentity={setDisplayIdentity}\n />\n\n <AccountsSection\n roster={roster ?? []}\n switchAccount={switchAccount}\n addAccountUrl={addAccountUrl}\n signOut={signOut}\n onActionStart={() => setOpen(false)}\n />\n\n {primaryNavLinks && primaryNavLinks.length > 0 ? (\n <PopoverSection\n label=\"navigate\"\n items={primaryNavLinks}\n onItemClick={() => setOpen(false)}\n className=\"hidden md:block\"\n />\n ) : null}\n\n <div className=\"p-1\" data-oc-account-menu-section=\"account\">\n {menuItems?.map((item) => {\n const onClick = () => setOpen(false);\n const cls =\n 'hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors';\n const inner = (\n <>\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{item.label}</span>\n {item.external ? (\n <span\n className=\"text-muted-foreground text-[10px]\"\n aria-hidden\n >\n ↗\n </span>\n ) : null}\n </>\n );\n return item.external ? (\n <a\n key={item.href}\n href={item.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={onClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n {inner}\n </a>\n ) : (\n <Link\n key={item.href}\n href={item.href}\n onClick={onClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n {inner}\n </Link>\n );\n })}\n\n {familyDashboardEnabled ? (\n <a\n href=\"https://ochk.io/dashboard\"\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={() => setOpen(false)}\n role=\"menuitem\"\n className=\"hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors\"\n data-oc-account-menu-item=\"\"\n data-oc-account-menu-family-dashboard=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">family dashboard</span>\n <span\n className=\"text-muted-foreground text-[10px]\"\n aria-hidden\n >\n ↗\n </span>\n </a>\n ) : null}\n\n <button\n type=\"button\"\n role=\"menuitem\"\n onClick={() => {\n setOpen(false);\n // Await the logout round-trip — its response is\n // what clears the `.ochk.io` cookie — and only\n // THEN hard-navigate home. Navigating first\n // (the old behavior) raced the next page's\n // session check against the still-uncleared\n // cookie, so the account badge stayed \"signed\n // in\" until a second sign-out. The hard\n // navigation is a committed browser navigation,\n // so it still wins over any auth-gated page's\n // redirect-to-sign-in effect.\n void (async () => {\n await signOut();\n if (typeof window !== 'undefined') {\n window.location.assign(signOutRedirect);\n }\n })();\n }}\n className=\"hover:bg-accent flex w-full items-center gap-2 px-3 py-2 text-left font-mono text-[11px] tracking-wide transition-colors\"\n data-oc-account-menu-item=\"\"\n data-oc-account-menu-signout=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">sign out</span>\n </button>\n </div>\n\n {secondaryNavLinks && secondaryNavLinks.length > 0 ? (\n <PopoverSection\n label=\"more\"\n items={secondaryNavLinks}\n onItemClick={() => setOpen(false)}\n bordered\n className=\"hidden md:block\"\n />\n ) : null}\n\n {build ? <BuildFooter hostname={hostname} build={build} state={siteState} /> : null}\n </div>\n )}\n </div>\n );\n}\n\n/**\n * Multi-account · `§ accounts` section. Lists the other accounts the\n * user has signed into in this browser (the roster), lets them switch\n * with one click, surfaces an \"Add another account\" entry point that\n * routes through `addAccountUrl()` (the auth host preserves the\n * current roster_id when signing in via `?add=1`), and adapts the\n * sign-out affordance to support `scope: 'current'` per row.\n *\n * Gate: the whole section is suppressed when `addAccountUrl` isn't\n * provided. That's the back-compat signal for sites running a parallel\n * auth context (e.g. oc-www's local `useAuth`) — they can adopt\n * multi-account incrementally by wiring the new props on\n * `OcAccountMenuSession` as they build out support.\n */\nfunction AccountsSection({\n roster,\n switchAccount,\n addAccountUrl,\n signOut,\n onActionStart,\n}: {\n roster: OcAccountSummary[];\n switchAccount: ((didOc: string) => Promise<void>) | undefined;\n addAccountUrl: ((returnTo?: string) => string) | undefined;\n signOut: (opts?: { scope?: OcSignOutScope }) => void | Promise<void>;\n onActionStart: () => void;\n}) {\n const [switching, setSwitching] = useState<string | null>(null);\n const [err, setErr] = useState<string | null>(null);\n\n if (!addAccountUrl) return null;\n\n const onSwitch = async (didOc: string) => {\n if (!switchAccount || switching) return;\n setSwitching(didOc);\n setErr(null);\n try {\n await switchAccount(didOc);\n // Keep the menu open just long enough for the active label\n // to flip; the surrounding popover-close-on-outside-click\n // will pick up the user's next interaction.\n } catch (e) {\n setErr(e instanceof Error ? e.message : 'switch failed');\n } finally {\n setSwitching(null);\n }\n };\n\n return (\n <div className=\"border-border border-b p-1\" data-oc-account-menu-section=\"accounts\">\n <div className=\"text-muted-foreground px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § accounts\n </div>\n {roster.map((peer) => (\n <SwitchRow\n key={peer.didOc}\n peer={peer}\n busy={switching === peer.didOc}\n disabled={switching !== null}\n onSwitch={() => void onSwitch(peer.didOc)}\n />\n ))}\n <a\n href={addAccountUrl()}\n onClick={() => onActionStart()}\n role=\"menuitem\"\n data-oc-account-menu-add-account=\"\"\n className=\"hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors\"\n >\n <Plus className=\"text-muted-foreground size-3.5 shrink-0\" aria-hidden />\n <span className=\"flex-1\">\n {roster.length === 0 ? 'add another account' : 'add another'}\n </span>\n </a>\n {/* \"leave this account\" only makes sense WITH peers in the\n * roster — without them, scope='current' degrades to scope='all'\n * and the parent menu's bottom \"sign out\" row already covers\n * that case. Rendering both produces two identical sign-out\n * affordances; gate on peer count to suppress the duplicate. */}\n {roster.length > 0 ? (\n <button\n type=\"button\"\n role=\"menuitem\"\n onClick={() => {\n onActionStart();\n void (async () => {\n try {\n await signOut({ scope: 'current' });\n } catch {\n // local state still flips · cookie may not\n }\n // No hard-nav · `scope: 'current'` with peers\n // in the roster keeps the browser signed-in to\n // the next-best account; the refresh() inside\n // signOut updates the badge in place.\n })();\n }}\n data-oc-account-menu-leave-current=\"\"\n className=\"hover:bg-accent flex w-full items-center gap-2 px-3 py-2 text-left font-mono text-[11px] tracking-wide transition-colors\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">leave this account</span>\n </button>\n ) : null}\n {err ? (\n <div className=\"text-destructive/80 px-3 pt-1 pb-2 font-mono text-[10px]\">\n {err}\n </div>\n ) : null}\n </div>\n );\n}\n\n/**\n * One row in `§ accounts` — a switch-target peer. Clicking the body\n * calls `onSwitch`; while in-flight the row shows a spinner and the\n * other rows in the list are disabled.\n */\nfunction SwitchRow({\n peer,\n busy,\n disabled,\n onSwitch,\n}: {\n peer: OcAccountSummary;\n busy: boolean;\n disabled: boolean;\n onSwitch: () => void;\n}) {\n const label = peer.displayName ?? obscureIdentity(peer.displayIdentity.value);\n const kindLabel = IDENTITY_KIND_LABEL[peer.displayIdentity.kind];\n return (\n <button\n type=\"button\"\n role=\"menuitemradio\"\n aria-checked={false}\n aria-label={`Switch to ${peer.didOc}`}\n disabled={disabled}\n onClick={onSwitch}\n data-oc-account-menu-switch-row=\"\"\n className=\"hover:bg-accent flex w-full items-center gap-2 px-3 py-2 text-left font-mono text-[11px] tracking-wide transition-colors disabled:cursor-default\"\n >\n <span\n className=\"border-muted-foreground/40 flex size-3.5 shrink-0 items-center justify-center rounded-full border\"\n aria-hidden\n />\n <span className=\"text-foreground/90 min-w-0 flex-1 truncate\">{label}</span>\n <span className=\"text-muted-foreground w-14 shrink-0 text-right text-[9px] tracking-widest uppercase\">\n {busy ? <Loader2 className=\"ml-auto size-3 animate-spin\" /> : kindLabel}\n </span>\n </button>\n );\n}\n\n/**\n * Single nav section inside the identity popover (e.g. `§ navigate`, `§ more`).\n * Rendered DESKTOP-ONLY (`hidden md:block`) by callers: on mobile the same\n * links live in the account menu's `☰`, so showing them here too would double\n * up. On desktop it's the nav home for console sites that have no inline\n * OcPrimaryNav.\n */\nfunction PopoverSection({\n label,\n items,\n onItemClick,\n bordered,\n className,\n}: {\n label: string;\n items: ReadonlyArray<OcAccountMenuItem>;\n onItemClick: () => void;\n bordered?: boolean;\n className?: string;\n}) {\n const cls =\n 'hover:bg-accent flex items-center gap-2 px-3 py-2 font-mono text-[11px] tracking-wide transition-colors';\n return (\n <div\n className={cn('p-1', bordered && 'border-border border-t', className)}\n data-oc-account-menu-section={label}\n >\n <div className=\"text-muted-foreground px-3 pt-2 pb-1 font-mono text-[10px] tracking-widest uppercase\">\n § {label}\n </div>\n {items.map((item) =>\n item.external ? (\n <a\n key={item.href}\n href={item.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={onItemClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{item.label}</span>\n <span className=\"text-muted-foreground text-[10px]\" aria-hidden>\n ↗\n </span>\n </a>\n ) : (\n <Link\n key={item.href}\n href={item.href}\n onClick={onItemClick}\n role=\"menuitem\"\n className={cls}\n data-oc-account-menu-item=\"\"\n >\n <span className=\"text-muted-foreground\" aria-hidden>\n →\n </span>\n <span className=\"flex-1\">{item.label}</span>\n </Link>\n )\n )}\n </div>\n );\n}\n\nfunction BuildFooter({\n hostname,\n build,\n state,\n}: {\n hostname: string;\n build: OcAccountMenuBuildInfo;\n state?: SiteState;\n}) {\n const sha = build.sha;\n const showSha = !!sha && sha !== 'dev';\n const commitUrl = showSha && build.repo ? `https://github.com/${build.repo}/commit/${sha}` : null;\n return (\n <div\n className=\"text-muted-foreground border-border border-t px-3 py-2 font-mono text-[9.5px] tracking-widest uppercase\"\n data-oc-account-menu-build=\"\"\n >\n {hostname}\n {state && state !== 'live' ? (\n <>\n {' · '}\n <span className=\"text-muted-foreground\">{state}</span>\n </>\n ) : null}{' '}\n <span className=\"text-muted-foreground\">\n v{build.version}\n {showSha ? (\n <>\n {' · '}\n {commitUrl ? (\n <a\n href={commitUrl}\n target=\"_blank\"\n rel=\"noreferrer\"\n className=\"hover:text-foreground/90 underline decoration-dotted underline-offset-2\"\n >\n {sha}\n </a>\n ) : (\n sha\n )}\n </>\n ) : null}\n </span>\n </div>\n );\n}\n","\"use client\";\n\nimport Link from \"next/link\";\nimport type { ReactNode } from \"react\";\n\n/**\n * `<OcPrimaryNav>` — the centered link row in every family site's\n * `<LayoutHeader>`. Replaces the per-site bespoke `<nav>` blocks.\n *\n * **Desktop-only.** The inline row shows at `md+`; below that it is hidden,\n * because on mobile the same links live in the account menu's `☰` drawer\n * (`OcAccountMenu`, rendered to the left of the identity chip) — one shared\n * mobile-nav pattern, no centered hamburger, no per-site fork.\n *\n * Active item is `text-primary`; siblings are muted. Active affordance is\n * text-only (no underline / bottom stripe) — deliberately restrained.\n *\n * **Usage:**\n *\n * <OcPrimaryNav\n * activePath={router.pathname}\n * links={[\n * { href: '/dashboard', label: 'dashboard' },\n * { href: 'https://docs.ochk.io/attest', label: 'docs', external: true },\n * ]}\n * />\n */\n\nexport interface OcPrimaryNavLink {\n /** Same-origin path or absolute URL. */\n href: string;\n /** Visible label · lowercase preferred (the chip styling applies tracking + uppercase). */\n label: string;\n /** When true, opens in a new tab and skips the `isActive` check. */\n external?: boolean;\n /** Optional override for the active-match. By default the link is\n * active when `activePath === href` or `activePath.startsWith(href + '/')`. */\n matchExact?: boolean;\n}\n\nexport interface OcPrimaryNavProps {\n /** Current router pathname for active-link highlight. */\n activePath: string;\n /** Link set. Keep to 2–5 entries. */\n links: ReadonlyArray<OcPrimaryNavLink>;\n /** className for the outer container. */\n className?: string;\n}\n\nfunction isActive(pathname: string, link: OcPrimaryNavLink): boolean {\n if (link.external) return false;\n if (link.matchExact) return pathname === link.href;\n if (link.href === \"/\") return pathname === \"/\";\n return pathname === link.href || pathname.startsWith(link.href + \"/\");\n}\n\nexport function OcPrimaryNav({\n activePath,\n links,\n className,\n}: OcPrimaryNavProps) {\n return (\n <nav\n aria-label=\"primary\"\n className={\n \"hidden items-center gap-0.5 sm:gap-1 md:flex \" + (className ?? \"\")\n }\n data-oc-primary-nav=\"\"\n >\n {links.map((link) => {\n const active = isActive(activePath, link);\n const cls =\n \"font-display shrink-0 px-2 py-1 sm:px-3 text-[11px] sm:text-[12px] font-semibold tracking-wider uppercase transition-colors \" +\n (active\n ? \"text-primary\"\n : \"text-muted-foreground hover:text-foreground\");\n const content: ReactNode = (\n <>\n {link.label}\n {link.external ? (\n <span\n aria-hidden\n className=\"text-muted-foreground ml-1 text-[9px]\"\n >\n ↗\n </span>\n ) : null}\n </>\n );\n return link.external ? (\n <a\n key={link.href}\n href={link.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n className={cls}\n data-oc-primary-nav-item=\"\"\n >\n {content}\n </a>\n ) : (\n <Link\n key={link.href}\n href={link.href}\n aria-current={active ? \"page\" : undefined}\n className={cls}\n data-oc-primary-nav-item={active ? \"active\" : \"sibling\"}\n >\n {content}\n </Link>\n );\n })}\n </nav>\n );\n}\n","'use client';\n\nimport Link from 'next/link';\nimport { useEffect, useState, type ReactNode } from 'react';\n\n/**\n * `<OcDashboardShell>` — the canonical demo-app frame for protocol\n * sites. Mirrors the `MeShell` pattern from `me.ochk.io`: persistent\n * left-rail tools on desktop, off-canvas drawer on mobile, page\n * eyebrow + title + description above the children.\n *\n * Drives the unified \"dashboard pattern\" the family rolled out\n * 2026-05-14: every protocol site's `/dashboard` (and the demo pages\n * underneath — `/create`, `/verify`, `/discover`, `/playground`, etc.)\n * wraps in this shell, so visitors crossing protocols experience the\n * same chrome.\n *\n * Layout (desktop):\n *\n * ┌─────────────┬────────────────────────────────────┐\n * │ § dashboard │ eyebrow │\n * │ ── tools ── │ title │\n * │ create ● │ description │\n * │ verify │ │\n * │ discover │ ── children ─────────────────────│\n * │ ... │ │\n * └─────────────┴────────────────────────────────────┘\n *\n * Mobile (<md): sidebar collapses behind a hamburger button at the\n * top of the main column; tapping opens a full-width drawer.\n */\n\nexport interface OcDashboardTool {\n /** Stable identifier · used as `active` key. */\n id: string;\n /** Same-origin path the tool lives at. */\n href: string;\n /** Visible label · lowercase preferred. */\n label: string;\n /** Optional one-line tagline shown under the label in the rail and\n * on the dashboard hub cards. */\n tagline?: string;\n /** Optional ascii / unicode glyph rendered before the label. */\n icon?: ReactNode;\n /** When true, opens in a new tab (e.g. an external explorer). */\n external?: boolean;\n}\n\nexport interface OcDashboardShellProps {\n /**\n * Dashboard root path — the rail header links here (\"§ dashboard\").\n * Default `'/dashboard'`.\n */\n rootHref?: string;\n /**\n * Site display name shown in the rail header above the tools list\n * (e.g. `'oc·attest'`).\n */\n siteLabel?: ReactNode;\n /** Tools to surface in the left rail. */\n tools: ReadonlyArray<OcDashboardTool>;\n /**\n * Which tool is currently active — matched against each tool's\n * `id`. Pass `undefined` on the dashboard hub itself.\n */\n active?: string;\n /** Optional small mono label above the page title. */\n eyebrow?: ReactNode;\n /** Page title — rendered as h1. */\n title?: ReactNode;\n /** Page description — rendered as a paragraph below the title. */\n description?: ReactNode;\n /** Main column content. */\n children: ReactNode;\n /** className for the outer container. */\n className?: string;\n}\n\nexport function OcDashboardShell({\n rootHref = '/dashboard',\n siteLabel,\n tools,\n active,\n eyebrow,\n title,\n description,\n children,\n className,\n}: OcDashboardShellProps) {\n const [drawerOpen, setDrawerOpen] = useState(false);\n\n // Close drawer on Escape, lock body scroll while open.\n useEffect(() => {\n if (!drawerOpen) return;\n function onKey(e: KeyboardEvent) {\n if (e.key === 'Escape') setDrawerOpen(false);\n }\n document.addEventListener('keydown', onKey);\n const prevOverflow = document.body.style.overflow;\n document.body.style.overflow = 'hidden';\n return () => {\n document.removeEventListener('keydown', onKey);\n document.body.style.overflow = prevOverflow;\n };\n }, [drawerOpen]);\n\n const hasHeader = Boolean(title) || Boolean(eyebrow);\n\n return (\n <div\n className={'container ' + (className ?? '')}\n data-oc-dashboard-shell=\"\"\n >\n <div className=\"flex min-h-[calc(100vh-3rem)] flex-col md:flex-row md:gap-8\">\n {/* Desktop sidebar */}\n <Sidebar\n rootHref={rootHref}\n siteLabel={siteLabel}\n tools={tools}\n active={active}\n variant=\"desktop\"\n />\n\n {/* Main column */}\n <div className=\"flex min-w-0 flex-1 flex-col\">\n {/* Mobile bar — hamburger + crumb */}\n <div className=\"border-border flex items-center justify-between border-b py-3 md:hidden\">\n <button\n type=\"button\"\n onClick={() => setDrawerOpen(true)}\n className=\"text-muted-foreground hover:text-foreground inline-flex h-9 items-center gap-2 px-1 font-mono text-[11px] tracking-widest uppercase transition-colors\"\n aria-label=\"open dashboard tools\"\n aria-expanded={drawerOpen}\n data-oc-dashboard-mobile-trigger=\"\"\n >\n <span className=\"text-[14px] leading-none\">≡</span>\n <span>tools</span>\n </button>\n <Link\n href={rootHref}\n className=\"text-primary font-mono text-[11px] tracking-widest uppercase\"\n >\n § dashboard\n </Link>\n </div>\n\n <div className=\"pt-6 md:pt-3\">\n {hasHeader && (\n <div className=\"max-w-3xl\">\n {eyebrow ? (\n <div className=\"label-mono text-primary mb-3 font-mono text-[10px] tracking-widest uppercase\">\n {eyebrow}\n </div>\n ) : null}\n {title ? (\n <h1 className=\"font-display text-2xl font-bold tracking-tight sm:text-3xl\">\n {title}\n </h1>\n ) : null}\n {description ? (\n <p className=\"text-muted-foreground mt-3 max-w-[64ch] text-sm leading-relaxed\">\n {description}\n </p>\n ) : null}\n </div>\n )}\n <div className={hasHeader ? 'mt-8 pb-12' : 'pb-12'}>{children}</div>\n </div>\n </div>\n </div>\n\n {/* Mobile drawer */}\n {drawerOpen ? (\n <div\n className=\"fixed inset-0 z-50 md:hidden\"\n role=\"dialog\"\n aria-modal=\"true\"\n aria-label=\"dashboard tools\"\n data-oc-dashboard-drawer=\"\"\n >\n <div\n className=\"absolute inset-0 bg-background/80 backdrop-blur-sm\"\n onClick={() => setDrawerOpen(false)}\n aria-hidden\n />\n <div className=\"bg-background absolute top-0 left-0 h-full w-[85vw] max-w-sm border-r shadow-xl\">\n <Sidebar\n rootHref={rootHref}\n siteLabel={siteLabel}\n tools={tools}\n active={active}\n variant=\"drawer\"\n onClose={() => setDrawerOpen(false)}\n />\n </div>\n </div>\n ) : null}\n </div>\n );\n}\n\nfunction Sidebar({\n rootHref,\n siteLabel,\n tools,\n active,\n variant,\n onClose,\n}: {\n rootHref: string;\n siteLabel?: ReactNode;\n tools: ReadonlyArray<OcDashboardTool>;\n active?: string;\n variant: 'desktop' | 'drawer';\n onClose?: () => void;\n}) {\n const isDrawer = variant === 'drawer';\n return (\n <aside\n className={\n isDrawer\n ? 'flex h-full w-full flex-col bg-card'\n : 'hidden md:sticky md:top-4 md:flex md:h-[calc(100vh-2rem)] md:w-56 md:shrink-0 md:flex-col md:self-start md:overflow-y-auto md:rounded md:border md:bg-card/40 lg:w-60'\n }\n aria-label=\"dashboard tools\"\n data-oc-dashboard-sidebar={variant}\n >\n {/* identity strip */}\n <div className=\"border-b px-4 py-3\">\n <div className=\"flex items-center justify-between\">\n <Link\n href={rootHref}\n onClick={onClose}\n className=\"hover:text-foreground font-display text-sm font-bold tracking-tight\"\n >\n § dashboard\n </Link>\n {isDrawer ? (\n <button\n type=\"button\"\n onClick={onClose}\n className=\"text-muted-foreground hover:text-foreground -mr-2 inline-flex h-8 w-8 items-center justify-center rounded font-mono text-lg\"\n aria-label=\"close navigation\"\n >\n ×\n </button>\n ) : null}\n </div>\n {siteLabel ? (\n <div className=\"text-muted-foreground mt-1 font-mono text-[10px] tracking-widest uppercase\">\n {siteLabel}\n </div>\n ) : null}\n </div>\n\n <nav className=\"flex-1 overflow-y-auto px-2 py-3\">\n <div className=\"text-muted-foreground mb-1 px-3 font-mono text-[10px] tracking-widest uppercase\">\n § tools\n </div>\n <ul className=\"space-y-0.5\">\n {tools.map((tool) => {\n const isActive = tool.id === active;\n const innerCls =\n 'flex items-baseline gap-2 rounded px-3 py-1.5 text-[12.5px] transition-colors ' +\n (isActive\n ? 'bg-primary/10 text-primary font-semibold'\n : 'text-muted-foreground hover:text-foreground hover:bg-muted/30');\n const content = (\n <>\n {tool.icon ? (\n <span\n className={\n 'shrink-0 font-mono text-[11px] ' +\n (isActive ? 'text-primary' : 'text-muted-foreground')\n }\n aria-hidden\n >\n {tool.icon}\n </span>\n ) : null}\n <span className=\"flex-1 leading-tight\">\n <span>{tool.label}</span>\n {tool.tagline ? (\n <span className=\"text-muted-foreground mt-0.5 block font-mono text-[10px] tracking-wide normal-case\">\n {tool.tagline}\n </span>\n ) : null}\n </span>\n {tool.external ? (\n <span\n className=\"text-muted-foreground text-[10px]\"\n aria-hidden\n >\n ↗\n </span>\n ) : null}\n </>\n );\n return (\n <li key={tool.id}>\n {tool.external ? (\n <a\n href={tool.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n onClick={onClose}\n className={innerCls}\n data-oc-dashboard-tool={isActive ? 'active' : 'sibling'}\n >\n {content}\n </a>\n ) : (\n <Link\n href={tool.href}\n onClick={onClose}\n aria-current={isActive ? 'page' : undefined}\n className={innerCls}\n data-oc-dashboard-tool={isActive ? 'active' : 'sibling'}\n >\n {content}\n </Link>\n )}\n </li>\n );\n })}\n </ul>\n </nav>\n </aside>\n );\n}\n\n/**\n * Convenience: the dashboard hub-page grid. Renders the same set of\n * tools as the sidebar, but as bigger card-style entries — used as\n * the body of `/dashboard/index.tsx` on each protocol site.\n */\nexport interface OcDashboardHubProps {\n tools: ReadonlyArray<OcDashboardTool>;\n className?: string;\n}\n\nexport function OcDashboardHub({ tools, className }: OcDashboardHubProps) {\n return (\n <ul\n className={\n 'grid gap-px border-t border-l sm:grid-cols-2 ' + (className ?? '')\n }\n data-oc-dashboard-hub=\"\"\n >\n {tools.map((tool) => {\n const content = (\n <span className=\"flex h-full flex-col gap-3 p-5 transition-colors\">\n <span className=\"flex items-baseline gap-3\">\n {tool.icon ? (\n <span\n className=\"text-primary font-mono text-[13px]\"\n aria-hidden\n >\n {tool.icon}\n </span>\n ) : null}\n <span className=\"font-display text-foreground text-base font-bold tracking-tight\">\n {tool.label}\n </span>\n {tool.external ? (\n <span\n className=\"text-muted-foreground ml-auto text-xs\"\n aria-hidden\n >\n ↗\n </span>\n ) : (\n <span\n className=\"text-muted-foreground ml-auto text-xs\"\n aria-hidden\n >\n →\n </span>\n )}\n </span>\n {tool.tagline ? (\n <span className=\"text-muted-foreground text-sm leading-relaxed\">\n {tool.tagline}\n </span>\n ) : null}\n </span>\n );\n const cls = 'hover:bg-muted/30 group block border-r border-b transition-colors';\n return (\n <li key={tool.id}>\n {tool.external ? (\n <a\n href={tool.href}\n target=\"_blank\"\n rel=\"noreferrer\"\n className={cls}\n >\n {content}\n </a>\n ) : (\n <Link href={tool.href} className={cls}>\n {content}\n </Link>\n )}\n </li>\n );\n })}\n </ul>\n );\n}\n","import type { ReactNode } from 'react';\n\n/**\n * AppShell — shared page chrome for every authenticated dashboard surface\n * across the OC family (vault, me, future). Lifted from oc-me-web's\n * `MeShell` and oc-vault-web's `VaultShell` — same eyebrow / title /\n * description / actions header band, no sidebar (sidebars are app-specific\n * and stay in the consuming app).\n *\n * Usage:\n * <AppShell eyebrow=\"§ vault\" title=\"your vault.\" description=\"…\">\n * ...\n * </AppShell>\n *\n * The component is stateless and dependency-free. Tailwind classes assume\n * the consuming site loads the family `globals.css` (which defines\n * `.container`, `.label-mono`, the dark-by-default palette, etc.).\n */\n\nexport interface AppShellProps {\n eyebrow?: ReactNode;\n title?: ReactNode;\n description?: ReactNode;\n /** Right-aligned action node rendered next to the title (e.g. CTA buttons). */\n headerActions?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport function AppShell({\n eyebrow,\n title,\n description,\n headerActions,\n children,\n className,\n}: AppShellProps) {\n const hasHeader = Boolean(title);\n return (\n <div className={'container ' + (className ?? '')}>\n <div className=\"flex min-h-[calc(100vh-3rem)] flex-col\">\n <div className=\"flex min-w-0 flex-1 flex-col\">\n <div className=\"pt-6 md:pt-8\">\n {hasHeader && (\n <div className=\"flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between\">\n <div className=\"max-w-3xl\">\n {eyebrow && (\n <div className=\"label-mono text-primary mb-3\">\n {eyebrow}\n </div>\n )}\n <h1 className=\"font-display text-2xl font-bold tracking-tight sm:text-3xl\">\n {title}\n </h1>\n {description && (\n <p className=\"text-muted-foreground mt-3 max-w-[64ch] text-sm leading-relaxed\">\n {description}\n </p>\n )}\n </div>\n {headerActions && (\n <div className=\"flex shrink-0 items-center gap-2\">\n {headerActions}\n </div>\n )}\n </div>\n )}\n <div className={hasHeader ? 'mt-8 pb-12' : 'pb-12'}>{children}</div>\n </div>\n </div>\n </div>\n </div>\n );\n}\n","import { cn } from '../tokens/cn';\n\nexport interface LayoutSubHeaderTag {\n label: string;\n /** Hide this tag below the given breakpoint (progressive disclosure). */\n hideBelow?: 'sm' | 'md' | 'lg';\n}\n\nexport interface LayoutSubHeaderProps {\n /** Product label shown after the status, e.g. \"oc · stamp\". */\n product: string;\n /** Left-side status text. Defaults to \"live · mainnet\". */\n status?: string;\n /**\n * Right-side capability tag(s). Keep it to ONE short phrase per site —\n * the strip reads as quiet supporting context, not a feature list. A\n * second/third tag is supported (spaced, never comma-jammed) for the rare\n * site that needs it, each with its own `hideBelow`.\n */\n tags?: LayoutSubHeaderTag[];\n /** Hide the pulsing heartbeat dot (e.g. on a degraded surface). */\n noHeartbeat?: boolean;\n className?: string;\n}\n\nconst HIDE: Record<NonNullable<LayoutSubHeaderTag['hideBelow']>, string> = {\n sm: 'hidden sm:inline',\n md: 'hidden md:inline',\n lg: 'hidden lg:inline',\n};\n\n/**\n * LayoutSubHeader — the ecosystem status strip below the header. One line,\n * never wraps. Identical shape across every family surface:\n *\n * ● live · mainnet oc · stamp ················· bip-322 · opentimestamps\n *\n * Left cluster (heartbeat + status + product) is the identity; the right\n * cluster is a quiet capability whisper (full muted tone: any opacity drops it under 4.5:1). Below `sm` the strip\n * collapses to just the heartbeat + product so it never wraps or crowds a\n * phone header — the right cluster and the `status` reappear from `sm` up.\n *\n * The band carries a faint skin-tinted translucent shade (`.oc-substrip`) so\n * it has presence on every skin × mode without bleeding the hero/aurora\n * behind it. Pass `product`, optional `status`, and `tags`.\n */\nexport function LayoutSubHeader({\n product,\n status = 'live · mainnet',\n tags = [],\n noHeartbeat = false,\n className,\n}: LayoutSubHeaderProps) {\n return (\n <div className={cn('oc-substrip border-b', className)}>\n <div className=\"container flex items-center justify-between gap-x-6 py-2 font-mono text-[11px]\">\n <div className=\"flex min-w-0 items-center gap-2.5\">\n {!noHeartbeat && (\n <span\n className=\"bg-primary inline-block size-1.5 shrink-0 animate-pulse rounded-full ring-2 ring-[color-mix(in_oklch,var(--primary),transparent_78%)]\"\n aria-hidden\n />\n )}\n <span className=\"text-muted-foreground hidden tracking-widest whitespace-nowrap uppercase sm:inline\">\n {status}\n </span>\n <span className=\"text-foreground truncate\">{product}</span>\n </div>\n {tags.length > 0 && (\n <div className=\"text-muted-foreground hidden shrink-0 items-center gap-x-3 tracking-wider whitespace-nowrap uppercase sm:flex\">\n {tags.map((tag, i) => (\n <span key={i} className={tag.hideBelow ? HIDE[tag.hideBelow] : undefined}>\n {tag.label}\n </span>\n ))}\n </div>\n )}\n </div>\n </div>\n );\n}\n","import type { ReactNode } from 'react';\n\nimport { cn } from '../tokens/cn';\n\nexport interface OcAppBarProps {\n /**\n * `'full'` (default) = edge-to-edge app chrome: a `.app-bar` row (responsive\n * gutters, NO max-width), so the header's left/right edges align with a\n * full-bleed app shell below it. `'contained'` = the same row inside\n * `.container` (max-w-screen-xl), identical to the marketing/content header —\n * an escape hatch, rarely needed.\n */\n variant?: 'full' | 'contained';\n /** Logo slot — pass `<OcLogoDropdown>…</OcLogoDropdown>` with the site wordmark. */\n start?: ReactNode;\n /** Center slot — pass `<OcPrimaryNav … />`. Centered, flex-1, min-w-0. */\n center?: ReactNode;\n /** Trailing actions — pass e.g. `<HeaderAccount /><OcAppearanceMenu />`. */\n end?: ReactNode;\n /** Stick to the top of the viewport. Default `true`. Keeps `h-12` (3rem). */\n sticky?: boolean;\n className?: string;\n}\n\n/**\n * `OcAppBar` — the sanctioned FULL-BLEED application header for full-screen app\n * surfaces (chat `/app`, the analytics cockpit, the forge console, the me\n * operator plane …). It is the app-surface counterpart to the constrained\n * marketing/content header: the SAME primitives (`OcLogoDropdown` /\n * `OcPrimaryNav` / `OcAccountMenu`) mounted in an edge-to-edge `.app-bar` row\n * (gutters only, no `max-w-screen-xl`) instead of a centered `.container`, so a\n * full-bleed app shell underneath lines up edge-to-edge with the chrome above.\n *\n * Marketing / content / protocol pages keep the constrained `.container`\n * header — never use `OcAppBar` over a `.container`-capped body, or you\n * re-introduce the left/right misalignment this composition exists to fix.\n *\n * Auth-free and brand-free by design: all branding + session chrome arrive\n * through the `start` / `center` / `end` slots, so app sites and content sites\n * share one primitive layer and can never visually drift. The fixed `h-12`\n * (3rem) lets a shell below claim `h-[calc(100dvh-3rem)]`.\n */\nexport function OcAppBar({\n variant = 'full',\n start,\n center,\n end,\n sticky = true,\n className,\n}: OcAppBarProps) {\n return (\n <header\n className={cn(\n 'bg-background/90 supports-[backdrop-filter]:bg-background/70 w-full border-b backdrop-blur',\n sticky && 'sticky top-0 z-50',\n className\n )}\n >\n <div\n className={cn(\n variant === 'full' ? 'app-bar' : 'container',\n 'flex h-12 items-center justify-between gap-4'\n )}\n >\n {start}\n <div className=\"flex min-w-0 flex-1 justify-center px-2\">{center}</div>\n <div className=\"flex items-center gap-1\">{end}</div>\n </div>\n </header>\n );\n}\n","import Link from \"next/link\";\nimport type { ReactNode } from \"react\";\n\nimport { cn } from \"../tokens/cn\";\nimport { FAMILY_PROPERTIES, type FamilyCategory } from \"./family-properties\";\n\nexport interface FooterLink {\n href: string;\n label: string;\n /** Render as a cross-origin `<a target=\"_blank\">` with a ↗ affordance. */\n external?: boolean;\n}\n\nexport interface FooterColumn {\n /** Column heading, e.g. `'§ docs'`. */\n label: string;\n links: FooterLink[];\n}\n\nexport interface OcFamilyFooterBrand {\n /** The site's own logo mark (e.g. `<LogoMark size={20} />`). Optional. */\n mark?: ReactNode;\n /** Wordmark, e.g. `'oc·stamp'`. */\n wordmark: ReactNode;\n /** One-paragraph blurb under the wordmark (may contain links). */\n tagline: ReactNode;\n /** Optional license / attribution lines under the blurb. */\n meta?: ReactNode;\n}\n\nexport interface OcFamilyFooterProps {\n brand: OcFamilyFooterBrand;\n /** The site's own `§`-labelled link groups. */\n columns?: FooterColumn[];\n /**\n * Append registry-driven family columns (products / protocols) sourced from\n * `FAMILY_PROPERTIES`, so any footer that lists the family can never drift\n * from the canonical table. `'products'` is the five live products, etc.\n */\n family?: \"products\" | \"protocols\" | \"both\";\n /** Origin the legal-bar links resolve against. Defaults to ochk.io. */\n legalBase?: string;\n /** Override the left copyright line. Defaults to the canonical OC line. */\n legalCopyright?: ReactNode;\n /**\n * Override the centre legal links. Defaults to privacy / terms / security /\n * trademarks / contact (resolved against `legalBase`). Pass your own when a\n * site needs an extra link (e.g. a federation charter) or a shorter set.\n */\n legalLinks?: FooterLink[];\n /** Override the right-hand bitcoin tag (e.g. `'read on bitcoin'`). */\n builtWith?: ReactNode;\n className?: string;\n}\n\n// brand block + N content columns in one grid, mirroring the historical\n// per-site layout (`[1.2fr 1fr 1fr …]`). Keyed by content-column count so the\n// brand block keeps its wider share at every width.\nconst GRID: Record<number, string> = {\n 1: \"md:grid-cols-[1.2fr_1fr]\",\n 2: \"md:grid-cols-[1.2fr_1fr_1fr]\",\n 3: \"md:grid-cols-[1.2fr_1fr_1fr_1fr]\",\n 4: \"md:grid-cols-[1.2fr_1fr_1fr_1fr_1fr]\",\n 5: \"md:grid-cols-[1.2fr_1fr_1fr_1fr_1fr_1fr]\",\n};\n\n// min-h-11 on phones is the 44px tap target; md restores the dense desktop list.\nconst LINK_CLS =\n \"text-muted-foreground hover:text-foreground inline-flex min-h-11 min-w-11 items-center font-mono text-xs tracking-wide lowercase transition-colors md:min-h-0 md:min-w-0\";\n\nfunction FooterLinkItem({ link }: { link: FooterLink }) {\n if (link.external) {\n return (\n <a href={link.href} target=\"_blank\" rel=\"noreferrer\" className={LINK_CLS}>\n {\"> \"}\n {link.label} ↗\n </a>\n );\n }\n return (\n <Link href={link.href} className={LINK_CLS}>\n {\"> \"}\n {link.label}\n </Link>\n );\n}\n\nfunction FooterColumnView({ column }: { column: FooterColumn }) {\n return (\n <div>\n <div className=\"label-mono text-primary mb-3\">{column.label}</div>\n <ul className=\"md:space-y-2\">\n {column.links.map((link) => (\n <li key={`${column.label}:${link.href}`}>\n <FooterLinkItem link={link} />\n </li>\n ))}\n </ul>\n </div>\n );\n}\n\nfunction familyColumn(category: FamilyCategory, label: string): FooterColumn {\n return {\n label,\n links: FAMILY_PROPERTIES.filter((p) => p.category === category).map(\n (p) => ({\n href: p.origin,\n label: p.label,\n external: true,\n }),\n ),\n };\n}\n\n/**\n * `<OcFamilyFooter>` — the one canonical family footer. Brand block on the\n * left, `§`-labelled link columns to the right, a single legal bar beneath.\n * Every `oc-*` site composes this with its own `brand` + `columns`; pass\n * `family` to surface the registry-driven product / protocol columns so any\n * footer listing the family always shows the full, current set.\n */\nexport function OcFamilyFooter({\n brand,\n columns = [],\n family,\n legalBase = \"https://ochk.io\",\n legalCopyright,\n legalLinks,\n builtWith,\n className,\n}: OcFamilyFooterProps) {\n const familyCols: FooterColumn[] = [];\n if (family === \"products\" || family === \"both\") {\n familyCols.push(familyColumn(\"product\", \"§ products\"));\n }\n if (family === \"protocols\" || family === \"both\") {\n familyCols.push(familyColumn(\"protocol\", \"§ protocols\"));\n }\n\n const allColumns = [...familyCols, ...columns];\n const grid = GRID[allColumns.length] ?? GRID[3];\n const year = new Date().getFullYear();\n const legal = (path: string) => `${legalBase}${path}`;\n const links: FooterLink[] = legalLinks ?? [\n { href: legal(\"/privacy\"), label: \"privacy\" },\n { href: legal(\"/terms\"), label: \"terms\" },\n { href: legal(\"/security\"), label: \"security\" },\n { href: legal(\"/trademark\"), label: \"trademarks\" },\n { href: legal(\"/contact\"), label: \"contact\" },\n ];\n\n return (\n <footer className={cn(\"border-t\", className)}>\n <div className=\"container py-10 sm:py-12 md:py-16\">\n <div className={cn(\"grid gap-8 sm:grid-cols-2 sm:gap-10\", grid)}>\n <div>\n <div className=\"flex items-center gap-2\">\n {brand.mark}\n <span className=\"font-display text-sm font-bold tracking-tight\">\n {brand.wordmark}\n </span>\n </div>\n <div className=\"text-muted-foreground mt-3 max-w-[34ch] text-sm leading-relaxed\">\n {brand.tagline}\n </div>\n {brand.meta && <div className=\"mt-4\">{brand.meta}</div>}\n </div>\n {allColumns.map((column) => (\n <FooterColumnView key={column.label} column={column} />\n ))}\n </div>\n\n <div className=\"mt-10 flex flex-col items-start justify-between gap-3 border-t pt-6 font-mono text-[11px] tracking-widest uppercase sm:flex-row sm:items-center\">\n <span className=\"text-muted-foreground\">\n {legalCopyright ?? <>© {year} orangecheck · mit + cc-by-4.0</>}\n </span>\n <div className=\"text-muted-foreground flex flex-wrap items-center gap-x-4 md:gap-y-1\">\n {links.map((link) => (\n <a\n key={link.label}\n href={link.href}\n {...(link.external\n ? { target: \"_blank\", rel: \"noreferrer\" }\n : {})}\n className=\"hover:text-foreground inline-flex min-h-11 items-center transition-colors md:min-h-0\"\n >\n {link.label}\n </a>\n ))}\n </div>\n <span className=\"text-muted-foreground inline-flex items-center gap-1.5\">\n <span className=\"text-primary text-[13px] leading-none\">₿</span>\n <span>{builtWith ?? \"built with bitcoin\"}</span>\n </span>\n </div>\n </div>\n </footer>\n );\n}\n"]}