// Miniatures: a tiny CSS-drawn likeness of what each section actually renders,
// so the floorplan board is legible as a shape before you read a label — four
// dots for Workers, a stubbed progress bar for Active jobs, a meter with a
// threshold notch for Disk. Purely decorative (aria-hidden); the section's real
// name is always next to it.
import type { SectionId } from "../../lib/sections";
const FRAME =
"flex h-5 w-8 shrink-0 flex-col justify-center gap-[2px] overflow-hidden rounded-sm border border-border/60 bg-background px-[3px]";
// A row of text, as the widget's strips mostly are: a rule of some width.
function Rule({ w, tone = "bg-muted-foreground/40" }: { w: string; tone?: string }) {
return ;
}
function Dot({ tone }: { tone: string }) {
return ;
}
// A list row: a label rule with a small chip pushed to the right, the shape the
// Needs work / Needs cleaning strips repeat.
function ListRow({ chip }: { chip: string }) {
return (
);
}
const MINIS: Record React.ReactElement> = {
// Two buttons side by side.
controls: () => (
),
// Two readout lines, the second shorter.
lastSync: () => (
<>
>
),
// Status dot plus a line.
scheduler: () => (
),
// A meter with the low-disk threshold notched into it.
disk: () => (
),
// One number, warning-tinted.
cleanable: () => (
),
// Stacked channel rows with reclaim chips.
cleanChannels: () => (
<>
>
),
// Four worker dots, one idle.
workers: () => (
),
// A job heading over a part-filled progress bar.
jobs: () => (
<>
>
),
// Stacked channel rows with backlog chips.
actionable: () => (
<>
>
),
// A dot plus two rules of different lengths — the strip's shape, and a
// deliberate likeness of its content: two numbers that are NOT the same size
// and are never added together.
backfill: () => (
),
};
export function SectionMini({ id }: { id: SectionId }) {
const Draw = MINIS[id];
return (
);
}