/* ============================================================ IBC Labs — Shared Components ============================================================ */ const { useState, useEffect, useRef } = React; /* Navigation helper — app.jsx sets window.IBC.navigate */ function go(path) { if (window.IBC.navigate) window.IBC.navigate(path); } function Link({ to, className, children, style, onClick }) { return ( { e.preventDefault(); if (onClick) onClick(e); go(to); }} > {children} ); } /* Inline arrow glyph */ function Arrow({ dir }) { return ; } /* Status badge */ function Badge({ status }) { const cls = { Published: "badge badge--published", Active: "badge badge--active", Forthcoming: "badge badge--forthcoming", }[status] || "badge"; return {status}; } /* Signature navy hairline */ function Rule({ thin }) { return
; } /* ---------- Navbar ---------- */ const NAV_LINKS = [ ["research", "Research"], ["methodologies", "Methodologies"], ["concepts", "Concepts"], ["problem", "Problem"], ["notes", "Notes"], ["contact", "Contact"], ]; function Navbar({ route }) { const [open, setOpen] = useState(false); const top = (route || "home").split("/")[0]; useEffect(() => { setOpen(false); }, [route]); return (
IBC Labs
{open && (
setOpen(false)}>
)}
); } /* ---------- Footer ---------- */ function Footer() { const org = window.IBC.org; return ( ); } /* ---------- Page header (signature rule under heading) ---------- */ function PageHeader({ eyebrow, title, lead }) { return (
{eyebrow &&
{eyebrow}
}

{title}

{lead &&

{lead}

}
); } /* ---------- Back link ---------- */ function BackLink({ to, children }) { return ( {children} ); } /* ---------- Paper row (research index) ---------- */ function PaperRow({ paper }) { return (

{paper.title}

{paper.authors.join(", ")} · · {paper.year}

{paper.abstract}

View Paper e.preventDefault()}>Download PDF
); } /* ---------- Area card (home) ---------- */ function AreaCard({ area }) { return (
{area.code}

{area.name}

{area.blurb}

Read paper ); } /* ---------- Note card ---------- */ function NoteCard({ note }) { return (
{note.date} · {note.author} {note.tag}

{note.title}

{note.excerpt}

e.preventDefault()}>Read note
); } Object.assign(window, { Link, Arrow, Badge, Rule, Navbar, Footer, PageHeader, BackLink, PaperRow, AreaCard, NoteCard, go, });