import { cn } from "@/lib/utils"; import { threadLabels } from "@/lib/cite-thread.mjs"; import { clock } from "./clock"; // Where a cited second sits in its source (canvas `.cthread` / `.pthread`): a // hairline the length of the recording, a notch at the cite. Information, not // decoration -- a quote at 1:02:14 of a four-hour VOD reads differently from one // at 0:00:40 of a clip. // // On the DESK (a result line) it is one row with "at / of" on the right, and // shows on the lit line only (wrap it in `data-lit-only`); on the READER (a // pane's header) it carries 0:00, the cite and the end under the line. export function CiteThread({ at, duration, className, }: { /** The cited second. */ at: number; /** The recording's length, seconds. */ duration: number; className?: string; }) { const pct = duration > 0 ? Math.min(100, Math.max(0, (at / duration) * 100)) : 0; const label = `${clock(at)} of ${clock(duration)}`; return (