import Link from "next/link"; import type { StateRow } from "@/lib/dashboard"; import Panel from "./Panel"; // One row per kind, the six states as proportional segments. // // ONE meaningful colour. `stale` is the only state that is a judgement -- a // deliverable older than what describes it -- so it wears --color-dirty, and // every other state is a step on a neutral ramp. A strip that coloured "built" // green would be handing a verdict hue to a fact. const FILL: Record = { draft: "var(--color-panel-2)", windows: "var(--color-line)", fetched: "color-mix(in srgb, var(--color-dim) 45%, transparent)", built: "color-mix(in srgb, var(--color-text) 55%, transparent)", shipped: "var(--color-text)", stale: "var(--color-dirty)", }; export default function StateStrip({ rows, note }: { rows: StateRow[]; note: string }) { return (

{note}

{rows.map((r) => (
{r.label} {r.total}
{r.segments .filter((s) => s.n > 0) .map((s) => ( ))}
{r.segments.filter((s) => s.n > 0).map((s) => `${s.n} ${s.state}`).join(" · ")}
))}
); }