// Composite preview of the timeline, laid out in output pixels and scaled to fit, so it matches the export. import { useCallback, useEffect, useRef, useState, type CSSProperties, type SyntheticEvent } from 'react'; import type { Crop, Take, Video } from '../../shared/types.ts'; import { cropOf, systemVolumeOf } from '../../shared/types.ts'; import { computeGeometry, outputSize, placeCropped, type Box, type Camera } from '../../shared/layout.ts'; import { takeFileUrl } from '../api.ts'; import { usePlayerActiveTake, type TimelinePlayer } from '../lib/player.ts'; const boxStyle = (b: Box): CSSProperties => ({ left: b.x, top: b.y, width: b.w, height: b.h }); type Dims = { w: number; h: number } | null; // The intrinsic size of a