interface Props { content: string; scrollRatio?: number; // 0-1, where the viewport is visibleRatio?: number; // 0-1, what fraction of content is visible } export function Minimap({ content, scrollRatio = 0, visibleRatio = 1 }: Props) { const lines = content.split('\n'); // Compute viewport position in the minimap const viewportTop = Math.round(scrollRatio * 100); const viewportHeight = Math.round(visibleRatio * 100); return (