const GAP = 34; const PAD = 16; const MID = 16; /** The trace drawn as the refs line: one hollow station per card, a halo on the card in view. */ export function TraceLine({ names, active, onSelect }: { names: readonly string[]; active: number; onSelect: (index: number) => void }) { if (!names.length) return null; const width = PAD * 2 + (names.length - 1) * GAP; return (
{names.map((name, index) => { const x = PAD + index * GAP; const current = index === active; return ( onSelect(index)} onKeyDown={(event) => (event.key === "Enter" || event.key === " ") && onSelect(index)}> {name} {current && } {index + 1} ); })}
); }