AI media harness for planning, generating, and editing locally
TypeScript
Timeline clips: kind colours and glyphs, track chips, clip states, edit feedback, mono timecode
Bitti7d7aff03cf75
diff --git a/src/components/workspace/TimelineView.test.tsx b/src/components/workspace/TimelineView.test.tsxindex 1d8f36a..28b36ea 100644--- a/src/components/workspace/TimelineView.test.tsx+++ b/src/components/workspace/TimelineView.test.tsx@@ -346,6 +346,39 @@ describe("waveforms and thumbnails on clips", () => {expect(wrote(onChange.mock.calls[0][0], config).timeline.tracks[0].muted).toBe(true);});+ it("colours clips by kind, with a glyph, an fx badge, and their own colour when they have one", () => {+ const config = withClips(projectWithMedia(), [+ { assetId: "asset-macro", sharpen: { amount: 50 } },+ { assetId: "asset-room", startMs: 5_000, color: "#123456", blur: { radius: 4, enabled: false } },+ ]);+ const { container } = render_(config);+ const [video, audio] = Array.from(container.querySelectorAll(".timeline-clip"));+ expect(video.classList.contains("timeline-clip--video")).toBe(true);+ expect(audio.classList.contains("timeline-clip--audio")).toBe(true);+ // A clip with no colour of its own takes its kind's rather than a blanket blue.+ expect((video.parentElement as HTMLElement).style.getPropertyValue("--clip-color")).toBe("");+ expect((audio.parentElement as HTMLElement).style.getPropertyValue("--clip-color")).toBe("#123456");+ expect(video.querySelector(".timeline-clip__strip svg")).not.toBeNull();+ expect(video.querySelector(".timeline-clip__fx")!.textContent).toBe("fx 1");+ expect(video.querySelector(".timeline-clip__fx--off")).toBeNull();+ expect(audio.querySelector(".timeline-clip__fx--off")).not.toBeNull();+ expect(audio.getAttribute("aria-label")).toContain("1 effects all off");+ });++ it("gives caption tracks their own kind and hatches locked lanes", () => {+ const base = projectWithMedia();+ const config: ProjectConfig = { ...base, timeline: { tracks: [+ { ...base.timeline.tracks[0], locked: true },+ { id: "track-c1", kind: "caption", name: "Captions", locked: false, muted: false, clips: [] },+ ] } };+ const { container } = render_(config);+ expect(Array.from(container.querySelectorAll(".track-label")).map((label) => label.textContent)).toEqual(["V1", "C1"]);+ expect(container.querySelector(".track-head--caption")).not.toBeNull();+ expect(container.querySelector(".track-lane--caption")).not.toBeNull();+ expect(container.querySelector(".track-lane--video")!.classList.contains("track-lane--locked")).toBe(true);+ expect((container.querySelector(".track-label") as HTMLElement).style.getPropertyValue("--track-kind")).toBe("var(--clip-video)");+ });+it("labels tracks V1, V2… with 20px toggles beside an editable name", () => {const { container } = render_(projectWithMedia());expect(Array.from(container.querySelectorAll(".track-label")).map((label) => label.textContent)).toEqual(["V1", "V2", "V3"]);@@ -503,6 +536,24 @@ describe("dragging clips on the timeline", () => {expect(view.clipsOn(STORY_TRACK_ID).map((clip) => [clip.startMs, clip.durationMs])).toEqual([[0, 4_000], [4_000, 4_000]]);});+ it("draws a snap line while an edge sits on a target, and clears it on release", () => {+ const view = timeline(withClips(measuredVideo(projectWithMedia(), 40_000), [{ startMs: 0, durationMs: 4_000 }, { startMs: 12_000, durationMs: 4_000 }]));+ fireEvent(view.container.querySelectorAll(".timeline-clip")[1], pointerEvent("pointerdown", 400));+ fireEvent(window, pointerEvent("pointermove", 135));+ expect(view.container.querySelector(".timeline-snap")!.textContent).toBe("snap · clip edge");+ fireEvent(window, pointerEvent("pointerup", 135));+ expect(view.container.querySelector(".timeline-snap")).toBeNull();+ });++ it("flags the playhead with its time while it is being scrubbed", () => {+ const { container } = render_(withClip(measuredVideo(projectWithMedia(), 40_000), {}));+ expect(container.querySelector(".timeline-playhead__flag")).toBeNull();+ fireEvent(container.querySelector(".timeline-playhead__head")!, pointerEvent("pointerdown", 0));+ expect(container.querySelector(".timeline-playhead__flag")!.textContent).toBe("00:00:00:00");+ fireEvent(window, pointerEvent("pointerup", 0));+ expect(container.querySelector(".timeline-playhead__flag")).toBeNull();+ });+it("trims both ends, and never past the footage", () => {const config = withClips(measuredVideo(projectWithMedia(), 40_000), [{ startMs: 0, durationMs: 6_000, sourceStartMs: 1_000 }]);const view = timeline(config);@@ -687,6 +738,7 @@ describe("the transport and the playhead", () => {expect(range.style.left).toBe(`${(1000 / 40_000) * 100}%`);expect(range.style.width).toBe(`${(2000 / 40_000) * 100}%`);expect(screen.getByLabelText("In to out").textContent).toBe("00:00:02:00");+ expect(container.querySelector(".timeline-range")).not.toBeNull();fireEvent.contextMenu(container.querySelector(".time-ruler")!);fireEvent.click(screen.getByRole("menuitem", { name: /Clear in and out/ }));expect(container.querySelector(".time-ruler__range")).toBeNull();diff --git a/src/components/workspace/TimelineView.tsx b/src/components/workspace/TimelineView.tsxindex 08dcd27..b10fc5f 100644--- a/src/components/workspace/TimelineView.tsx+++ b/src/components/workspace/TimelineView.tsx@@ -116,10 +116,21 @@ interface DragSession {grabOffsetMs: number;startXPx: number;snap: SnapOptions;+ /** The same targets as a set, to tell whether an edge landed on one. */+ snapSet: ReadonlySet<number>;+ /** Where the playhead was, so a snap to it can be named. */+ playheadMs: number;room: SourceRoom;moved: boolean;}+/** An edge of the dragged clip sitting on a snap target, drawn as a dashed+ * line through the lanes with what it snapped to. */+interface SnapMark {+ ms: number;+ label: string;+}+/** Which lane the pointer is over, for a drag that has left the lane it started* in. Read from the document rather than from React state because the pointer* is captured elsewhere: what is under it is a question only the DOM can@@ -265,6 +276,7 @@ export function TimelineView({ config, folderPath, generationCompletionTimes = {const dragRef = useRef<DragSession | null>(null);const previewRef = useRef<TimelineTrack[] | null>(null);const [preview, setPreview] = useState<TimelineTrack[] | null>(null);+ const [snapMark, setSnapMark] = useState<SnapMark | null>(null);const [dragging, setDragging] = useState(false);/* Whether the pointer is dragging the playhead (on the ruler or by itshead). A press alone moves it once; this is what makes the moves keep@@ -908,6 +920,7 @@ export function TimelineView({ config, folderPath, generationCompletionTimes = {if (!rect || rect.width <= 0) { setSelectedId(clip.id); return; }dropSelection();const msPerPx = duration / rect.width;+ const snap = snapFor(rect.width, clip.id);dragRef.current = {clipId: clip.id,mode,@@ -919,7 +932,9 @@ export function TimelineView({ config, folderPath, generationCompletionTimes = {/* Every lane in the grid shares one column, so a lane's left edge andwidth are the whole timeline's — which is why a drag that crosses intoanother lane can keep using the geometry it measured on this one. */- snap: snapFor(rect.width, clip.id),+ snap,+ snapSet: new Set(snap.toleranceMs > 0 ? snap.targets : []),+ playheadMs: Math.round(playhead),room: roomFor(clip),moved: false,};@@ -932,12 +947,29 @@ export function TimelineView({ config, folderPath, generationCompletionTimes = {dragRef.current = null;previewRef.current = null;setPreview(null);+ setSnapMark(null);setDragging(false);};useEffect(() => {if (!dragging) return;- const show = (next: TimelineTrack[] | null) => { previewRef.current = next; setPreview(next); };+ /* The preview, and whether the edge being placed landed on a snap target.+ Both are set in the same handler, so it is still one render per move. */+ const show = (next: TimelineTrack[] | null) => {+ previewRef.current = next;+ setPreview(next);+ const session = dragRef.current;+ const placed = next && session ? findClip(next, session.clipId)?.clip : undefined;+ if (!session || !placed || session.snapSet.size === 0) { setSnapMark(null); return; }+ const edges = session.mode === "trim-start" ? [placed.startMs]+ : session.mode === "trim-end" ? [clipEndMs(placed)]+ : [placed.startMs, clipEndMs(placed)];+ const ms = edges.find((edge) => session.snapSet.has(edge));+ setSnapMark(ms === undefined ? null : {+ ms,+ label: ms === 0 ? "timeline start" : ms === session.playheadMs ? "playhead" : "clip edge",+ });+ };const onMove = (event: PointerEvent) => {const session = dragRef.current;if (!session) return;@@ -1104,6 +1136,8 @@ export function TimelineView({ config, folderPath, generationCompletionTimes = {const onRulerMenu = useCallback((event: React.MouseEvent<HTMLElement>) => rulerHandlers.current.rulerMenu(event), []);const playheadRatio = Math.max(0, Math.min(1, playhead / duration));+ const playheadTimecode = formatTimecode(playhead, fps);+ const framesAt = playheadTimecode.lastIndexOf(":");const panelsClass = `edit-panels${sourcesOpen ? "" : " edit-panels--no-sources"}${inspectorOpen ? "" : " edit-panels--no-inspector"}`;return (@@ -1416,7 +1450,9 @@ export function TimelineView({ config, folderPath, generationCompletionTimes = {aria-label={`Playhead ${formatTimecode(playhead, fps)}. Select to type a time.`}{...tooltipProps("Go to time")}onClick={() => setTimecodeDraft(formatTimecode(playhead, fps))}- >{formatTimecode(playhead, fps)}</button>+ >{/* Frames a step dimmer than the time they count within. */}+ {playheadTimecode.slice(0, framesAt)}<span className="transport-time__frames">{playheadTimecode.slice(framesAt)}</span>+ </button>: <inputclassName="text-field transport-time transport-time--editing"aria-label="Go to time"@@ -1451,8 +1487,8 @@ export function TimelineView({ config, folderPath, generationCompletionTimes = {<Slider className="timeline-zoom" aria-label="Timeline zoom" min={0} max={100} step={1} value={zoomSliderValue} disabled={!lanePx} onChange={zoomFromSlider} /><button className="timeline-tools__icon" onClick={() => zoomTo(pxPerSecond * ZOOM_STEP)} disabled={!lanePx || pxPerSecond >= maxPps - 1e-6} aria-label="Zoom in" {...tooltipProps("Zoom in", "=")}><ZoomIn size={16} /></button><span className="timeline-tools__separator" aria-hidden="true" />- <button className={`timeline-tools__icon${sourcesOpen ? " active" : ""}`} onClick={toggleSources} aria-pressed={sourcesOpen} aria-label="Media panel" {...tooltipProps(sourcesOpen ? "Hide media panel" : "Show media panel")}><PanelLeft size={16} /></button>- <button className={`timeline-tools__icon${inspectorOpen ? " active" : ""}`} onClick={toggleInspector} aria-pressed={inspectorOpen} aria-label="Inspector" {...tooltipProps(inspectorOpen ? "Hide inspector" : "Show inspector")}><PanelRight size={16} /></button>+ <button className="timeline-tools__icon ui-toggle-button" onClick={toggleSources} aria-pressed={sourcesOpen} aria-label="Media panel" {...tooltipProps(sourcesOpen ? "Hide media panel" : "Show media panel")}><PanelLeft size={16} /></button>+ <button className="timeline-tools__icon ui-toggle-button" onClick={toggleInspector} aria-pressed={inspectorOpen} aria-label="Inspector" {...tooltipProps(inspectorOpen ? "Hide inspector" : "Show inspector")}><PanelRight size={16} /></button></div></header><div className="timeline-body">@@ -1498,10 +1534,27 @@ export function TimelineView({ config, folderPath, generationCompletionTimes = {|| (draggedScene !== undefined && !acceptsScene(track, draggedScene))}actions={actions}/>)}+ {/* The in/out range, carried down through the lanes from the+ ruler so what it covers can be read against the clips. */}+ {(inMs !== null || outMs !== null) && <div+ className="timeline-range"+ aria-hidden="true"+ style={{+ left: `calc(var(--track-column) + (100% - var(--track-column)) * ${(inMs ?? 0) / duration})`,+ width: `calc((100% - var(--track-column)) * ${((outMs ?? duration) - (inMs ?? 0)) / duration})`,+ }}+ />}+ {snapMark && <div+ className="timeline-snap"+ aria-hidden="true"+ style={{ left: `calc(var(--track-column) + (100% - var(--track-column)) * ${snapMark.ms / duration})` }}+ ><span>snap · {snapMark.label}</span></div>}{/* The playhead: a pentagon head in the ruler that can be dragged,- and a line through every track. */}+ and a line through every track. While it is being dragged it+ carries a flag with the time it is at. */}<div className="timeline-playhead" style={{ left: `calc(var(--track-column) + (100% - var(--track-column)) * ${playheadRatio})` }}><span className="timeline-playhead__head" onPointerDown={beginScrub} aria-hidden="true" />+ {scrubbing && <span className="timeline-playhead__flag" aria-hidden="true">{formatTimecode(playhead, fps)}</span>}</div></div></div>@@ -1596,10 +1649,11 @@ const TrackRow = memo(function TrackRow({ track, alt, label, duration, folderPatactions: MutableRefObject<TrackActions>;}) {const named = track.name;- const kind = track.kind === "audio" ? "audio" : "video";+ /* A caption track is its own kind (and height), not a video track. */+ const kind = trackKindOf(track);return <><div className={`track-head track-head--${kind}`} onContextMenu={(event) => actions.current.laneMenu(event, track)}>- <b className="track-label">{label}</b>+ <b className="track-label" style={{ "--track-kind": CLIP_KINDS[kind].color } as React.CSSProperties}>{label}</b>{/* The name is an editable field, not a label: a project with three videolayers needs the user's own words on them, and an always-live inputneeds no discovery. Blanking it falls back the way a clip name does,@@ -1615,7 +1669,7 @@ const TrackRow = memo(function TrackRow({ track, alt, label, duration, folderPat<button className={track.locked ? "active" : ""} onClick={() => actions.current.toggle(track.id, "locked")} aria-label={`${track.locked ? "Unlock" : "Lock"} ${named}`} aria-pressed={track.locked} {...tooltipProps(track.locked ? "Unlock" : "Lock")}>{track.locked ? <Lock size={14} /> : <LockOpen size={14} />}</button></div><div- className={`track-lane track-lane--${kind}${alt ? " track-lane--alt" : ""} ${track.muted ? "muted" : ""} ${dropActive ? "track-lane--drop" : ""} ${dropBlocked ? "track-lane--reject" : ""}`}+ className={`track-lane track-lane--${kind}${alt ? " track-lane--alt" : ""}${track.locked ? " track-lane--locked" : ""} ${track.muted ? "muted" : ""} ${dropActive ? "track-lane--drop" : ""} ${dropBlocked ? "track-lane--reject" : ""}`}/* Which track this lane IS, readable from the DOM: a clip dragged acrosslanes is hit-tested against the document, and the id is how the answergets back to the model. */@@ -1640,26 +1694,40 @@ const TrackRow = memo(function TrackRow({ track, alt, label, duration, folderPat&& !generation.error?.startsWith("Saved without sound"),);const isSelected = selectedId === clip.id;+ const clipKind = clipKindOf(asset, track);+ const effects = clipEffectCount(clip);+ /* The colour is the clip's own when it has one, and otherwise its+ kind's (--clip-kind, from the class) — never a blanket video blue. */return <divkey={clip.id}className={`clip-slot ${isSelected ? "selected" : ""} ${draggingId === clip.id ? "clip-slot--dragging" : ""}`}- style={{ left: `${clip.startMs / duration * 100}%`, width: `${clip.durationMs / duration * 100}%`, "--clip-color": clip.color } as React.CSSProperties}+ style={{ left: `${clip.startMs / duration * 100}%`, width: `${clip.durationMs / duration * 100}%`, "--clip-color": clip.color || undefined } as React.CSSProperties}>{/* The clip is a div with a button's role rather than a <button>: itcarries two trim handles of its own, and a button inside a buttonis not a thing a browser or a screen reader can make sense of. */}<div- className={`timeline-clip ${audioOnly ? "timeline-clip--audio-only" : ""} ${hasAudio ? "timeline-clip--has-audio" : ""} ${isSelected ? "selected" : ""} ${track.locked ? "timeline-clip--locked" : ""}`}+ className={`timeline-clip timeline-clip--${clipKind} ${audioOnly ? "timeline-clip--audio-only" : ""} ${hasAudio ? "timeline-clip--has-audio" : ""} ${isSelected ? "selected" : ""} ${track.locked ? "timeline-clip--locked" : ""}`}role="button"tabIndex={0}aria-pressed={isSelected}- aria-label={`${clip.label}, ${(clip.durationMs / 1000).toFixed(1)} seconds, on ${track.name}`}+ aria-label={`${clip.label}, ${(clip.durationMs / 1000).toFixed(1)} seconds, on ${track.name}${effects.total === 0 ? "" : effects.on === 0 ? `, ${effects.total} effects all off` : `, ${effects.total} effects`}`}onClick={() => actions.current.select(clip.id)}onKeyDown={(event) => { if (event.key === "Enter") actions.current.select(clip.id); }}onPointerDown={(event) => actions.current.clipPointerDown(event, clip, "move")}onContextMenu={(event) => actions.current.clipMenu(event, clip)}>- <b className="timeline-clip__title">{clip.label}</b>+ {/* The title strip: the kind's glyph, the name, and an fx badge+ counting the clip's effects (struck through when every one of+ them is bypassed). */}+ <span className="timeline-clip__strip">+ {CLIP_KINDS[clipKind].glyph}+ <b className="timeline-clip__title">{clip.label}</b>+ {effects.total > 0 && <span+ className={`timeline-clip__fx${effects.on === 0 ? " timeline-clip__fx--off" : ""}`}+ aria-hidden="true"+ >fx {effects.total}</span>}+ </span>{!audioOnly && generation && <TimelineClipThumbnailsfolderPath={folderPath}job={generation}diff --git a/src/styles/timeline.css b/src/styles/timeline.cssindex a93d508..f21eb67 100644--- a/src/styles/timeline.css+++ b/src/styles/timeline.css@@ -23,6 +23,7 @@--ruler-height: 28px;--track-video-height: 56px;--track-audio-height: 40px;+ --track-caption-height: 32px;height: 100%;min-height: 0;@@ -1029,28 +1030,35 @@line-height: var(--leading-snug);}-/* The playhead clock: tabular figures so the row does not twitch under- playback. Click it to type a time; Enter seeks. */+/* The playhead clock, the anchor of the row: mono at 18px so it does not+ twitch under playback, the frames a step dimmer. Click it to type a time;+ Enter seeks. */.transport-time {flex: none;- height: 28px;- padding: 0 var(--space-2);+ height: var(--control-sm);+ padding: 0 var(--space-1);border: 0;border-radius: var(--radius-sm);color: var(--text-primary);background: transparent;- font-size: var(--text-xs);+ font-family: var(--font-mono);+ font-size: var(--text-md);+ font-weight: var(--weight-semibold);font-variant-numeric: tabular-nums;+ line-height: 1;white-space: nowrap;transition: var(--transition-control);}+.transport-time__frames { color: var(--text-muted); }+button.transport-time:hover { background: var(--fill-subtle-hover); }.transport-time--editing.text-field {- width: 112px;+ width: 148px;min-height: 0;height: var(--control-sm);+ font-size: var(--text-sm);}.transport-format {@@ -1061,9 +1069,9 @@ button.transport-time:hover { background: var(--fill-subtle-hover); }}/* --- Transport -------------------------------------------------------------- Go to start · Frame back · Play/Pause · Frame forward · Go to end. Flat 28px- squares with 4px corners and a fill-only hover; Play carries no accent — it- is one control of five. */+ Go to start · Frame back · Play/Pause · Frame forward · Go to end. Flat 24px+ (--control-sm) squares with 4px corners and a fill-only hover; Play carries+ no accent — it is one control of five. */.timeline-transport {display: flex;@@ -1073,8 +1081,8 @@ button.transport-time:hover { background: var(--fill-subtle-hover); }}.timeline-transport button {- width: 28px;- height: 28px;+ width: var(--control-sm);+ height: var(--control-sm);flex: 0 0 auto;display: grid;place-items: center;@@ -1110,8 +1118,8 @@ button.transport-time:hover { background: var(--fill-subtle-hover); }}.timeline-tools button {- height: 28px;- min-width: 28px;+ height: var(--control-sm);+ min-width: var(--control-sm);flex: none;display: flex;align-items: center;@@ -1127,10 +1135,11 @@ button.transport-time:hover { background: var(--fill-subtle-hover); }transition: var(--transition-control);}+/* The pane toggles are .ui-toggle-button: their on state is the shared+ accent tint, so nothing here restates it. */.timeline-tools button.timeline-tools__icon { padding: 0; }.timeline-tools button:hover:not(:disabled) { background: var(--fill-subtle-hover); }-.timeline-tools button:active:not(:disabled),-.timeline-tools button.active { background: var(--fill-subtle-pressed); }+.timeline-tools button:active:not(:disabled) { background: var(--fill-subtle-pressed); }.timeline-tools button:disabled { color: var(--text-disabled); }.timeline-tools__separator {@@ -1154,7 +1163,7 @@ button.transport-time:hover { background: var(--fill-subtle-hover); }.timeline-toolbar h2,.transport-format { display: none; }.timeline-tools button:not(.timeline-tools__icon) {- width: 28px;+ width: var(--control-sm);gap: 0;padding: 0;font-size: 0;@@ -1231,9 +1240,10 @@ button.transport-time:hover { background: var(--fill-subtle-hover); }position: absolute;top: 0;height: 100%;- padding: 3px 0 0 var(--space-1);+ padding: 5px 0 0 var(--space-1);border-left: 1px solid var(--text-muted);color: var(--text-secondary);+ font-family: var(--font-mono);font-size: var(--text-2xs);font-variant-numeric: tabular-nums;line-height: 1;@@ -1273,12 +1283,27 @@ button.transport-time:hover { background: var(--fill-subtle-hover); }height: var(--track-audio-height);}-/* "V1", "A1": the track's kind and number, the way every NLE labels a track. */+.track-head--caption,+.track-lane--caption {+ height: var(--track-caption-height);+}++/* "V1", "A1", "C1": the track's kind and number, the way every NLE labels a+ track — a chip filled in the kind's colour (--track-kind, set inline). */.track-label {- min-width: 20px;- color: var(--text-primary);+ --track-kind: var(--clip-video);+ min-width: 26px;+ height: 20px;+ display: inline-grid;+ place-items: center;+ padding: 0 var(--space-1);+ border-radius: var(--radius-sm);+ color: var(--on-accent);+ background: var(--track-kind);+ font-family: var(--font-mono);font-size: var(--text-xs);font-weight: var(--weight-semibold);+ line-height: 1;}/* An editable field that reads as a label until it is used — a border around@@ -1291,10 +1316,11 @@ button.transport-time:hover { background: var(--fill-subtle-hover); }border: 1px solid transparent;border-radius: var(--radius-sm);overflow: hidden;- color: var(--text-secondary);+ color: var(--text-primary);background: none;font-family: inherit;font-size: var(--text-xs);+ font-weight: var(--weight-medium);line-height: 1;text-overflow: ellipsis;white-space: nowrap;@@ -1363,10 +1389,27 @@ button.transport-time:hover { background: var(--fill-subtle-hover); }opacity: 0.45;}+/* A locked track: hatched over its clips, and the clips themselves drained+ of most of their colour, so "nothing here moves" reads at a glance. */+.track-lane--locked::after {+ content: "";+ position: absolute;+ z-index: 6;+ inset: 0;+ background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--text-primary) 9%, transparent) 0 6px, transparent 6px 12px);+ pointer-events: none;+}++.track-lane--locked .timeline-clip {+ filter: saturate(0.45);+}+/* --- Clips ------------------------------------------------------------------ Flat: the clip colour mixed into the panel, a 1px darker border, 4px- corners, and an 18px title strip carrying the clip's name. Selected is a- crisp inner outline. No gradients, sheen, stripes or brightness filters. */+ Flat: an 18px title strip in the clip's solid colour with white ink (the+ kind's glyph, the name, an fx badge), over a body of that colour mixed 62%+ into the well. The colour is the clip's own (--clip-color, inline) and+ otherwise its kind's (--clip-kind, from the class). Hover changes the fill+ only; selected is a 2px accent ring with the trim handles drawn in. *//* The clip and the two trim handles that ride on it share one box, positionedon the ruler. They are siblings rather than children of the clip because the@@ -1385,42 +1428,76 @@ button.transport-time:hover { background: var(--fill-subtle-hover); }.clip-slot--dragging { z-index: 5; }.timeline-clip {+ --clip-kind: var(--clip-video);+ --clip-fill: var(--clip-color, var(--clip-kind));position: absolute;inset: 0;overflow: hidden;padding: 0;cursor: grab;- border: 1px solid color-mix(in srgb, var(--clip-color, var(--clip-video-default)) 40%, var(--stage-bg));+ border: 1px solid color-mix(in srgb, var(--clip-fill) 75%, var(--stage-bg));border-radius: var(--radius-sm);text-align: left;color: var(--text-primary);- background: color-mix(in srgb, var(--clip-color, var(--clip-video-default)) 55%, var(--panel));+ background: color-mix(in srgb, var(--clip-fill) 62%, var(--surface-well));+ transition: background-color var(--motion-fast) linear;}-.timeline-clip--audio-only {- border-color: color-mix(in srgb, var(--clip-color, var(--clip-audio-default)) 40%, var(--stage-bg));- background: color-mix(in srgb, var(--clip-color, var(--clip-audio-default)) 55%, var(--panel));+.timeline-clip--generated { --clip-kind: var(--clip-generated); }+.timeline-clip--image { --clip-kind: var(--clip-image); }+.timeline-clip--audio { --clip-kind: var(--clip-audio); }+.timeline-clip--caption { --clip-kind: var(--clip-caption); }++.timeline-clip:hover {+ background: color-mix(in srgb, var(--clip-fill) 74%, var(--surface-well));}.timeline-clip.selected {- box-shadow: inset 0 0 0 1px var(--text-primary);+ box-shadow: 0 0 0 2px var(--accent);}-.timeline-clip__title {+.timeline-clip__strip {position: relative;z-index: 3;- display: block;height: 18px;- padding: 0 var(--space-2);+ display: flex;+ align-items: center;+ gap: var(--space-1);+ padding: 0 var(--space-1) 0 var(--space-2);+ overflow: hidden;+ color: var(--on-accent);+ background: var(--clip-fill);+ pointer-events: none;+}++.timeline-clip__strip > svg { flex: none; }++.timeline-clip__title {+ min-width: 0;overflow: hidden;- color: var(--text-primary);- background: color-mix(in srgb, var(--stage-bg) 22%, transparent);font-size: var(--text-xs);- font-weight: var(--weight-regular);+ font-weight: var(--weight-medium);line-height: 17px;text-overflow: ellipsis;white-space: nowrap;- pointer-events: none;+}++/* "fx 2": how many effects the clip carries. Struck through when every one+ of them is bypassed. */+.timeline-clip__fx {+ flex: none;+ margin-left: auto;+ padding: 0 var(--space-1);+ border-radius: 2px;+ background: color-mix(in srgb, var(--stage-bg) 28%, transparent);+ font-family: var(--font-mono);+ font-size: var(--text-2xs);+ line-height: 14px;+}++.timeline-clip__fx--off {+ text-decoration: line-through;+ opacity: 0.75;}.timeline-clip__thumbnails {@@ -1428,6 +1505,7 @@ button.transport-time:hover { background: var(--fill-subtle-hover); }z-index: 0;inset: 18px 0 0;overflow: hidden;+ opacity: 0.7;pointer-events: none;}@@ -1454,7 +1532,7 @@ button.transport-time:hover { background: var(--fill-subtle-hover); }padding: 1px var(--space-1);overflow: hidden;border-top: 1px solid color-mix(in srgb, var(--stage-bg) 30%, transparent);- background: color-mix(in srgb, var(--panel) 34%, transparent);+ background: color-mix(in srgb, var(--surface-well) 34%, transparent);transition: opacity var(--motion-fast) linear;pointer-events: none;}@@ -1475,7 +1553,7 @@ button.transport-time:hover { background: var(--fill-subtle-hover); }.clip-audio-visualization__samples {fill: none;- stroke: color-mix(in srgb, var(--text-primary) 82%, var(--clip-color, var(--audio)));+ stroke: color-mix(in srgb, var(--on-accent) 70%, var(--clip-fill, var(--clip-audio)));stroke-width: 1px;stroke-linecap: round;vector-effect: non-scaling-stroke;@@ -1512,6 +1590,13 @@ button.transport-time:hover { background: var(--fill-subtle-hover); }.clip-handle--start:hover { box-shadow: inset 2px 0 0 var(--text-primary); }.clip-handle--end:hover { box-shadow: inset -2px 0 0 var(--text-primary); }+/* A selected clip shows its handles: accent bars on both ends, inside the+ ring, wider under the pointer. */+.clip-slot.selected .clip-handle--start { box-shadow: inset 4px 0 0 var(--accent); }+.clip-slot.selected .clip-handle--end { box-shadow: inset -4px 0 0 var(--accent); }+.clip-slot.selected .clip-handle--start:hover { box-shadow: inset 6px 0 0 var(--accent-bright); }+.clip-slot.selected .clip-handle--end:hover { box-shadow: inset -6px 0 0 var(--accent-bright); }+/* Selection is off everywhere outside a text field (see base.css), so a dragonly has to say what it IS. */.timeline-view--dragging,@@ -1534,6 +1619,59 @@ button.transport-time:hover { background: var(--fill-subtle-hover); }pointer-events: none;}+/* While scrubbing, the time the playhead is at rides beside its head. */+.timeline-playhead__flag {+ position: absolute;+ top: 1px;+ left: 8px;+ padding: 0 var(--space-1);+ border-radius: 2px;+ color: var(--on-accent);+ background: var(--danger);+ font-family: var(--font-mono);+ font-size: var(--text-2xs);+ font-weight: var(--weight-semibold);+ line-height: 16px;+ white-space: nowrap;+}++/* --- Edit feedback ------------------------------------------------------------+ The in/out range carried down through the lanes, and the dashed snap line+ with what it snapped to while a clip edge is sitting on a target. */++.timeline-range {+ position: absolute;+ z-index: 7;+ top: var(--ruler-height);+ bottom: 0;+ border-left: 1px solid var(--accent);+ border-right: 1px solid var(--accent);+ background: var(--accent-soft);+ opacity: 0.55;+ pointer-events: none;+}++.timeline-snap {+ position: absolute;+ z-index: 9;+ top: var(--ruler-height);+ bottom: 0;+ border-left: 1px dashed var(--snap);+ pointer-events: none;+}++.timeline-snap span {+ position: absolute;+ bottom: var(--space-1);+ left: var(--space-1);+ color: var(--snap);+ font-family: var(--font-mono);+ font-size: var(--text-2xs);+ font-weight: var(--weight-semibold);+ line-height: 1;+ white-space: nowrap;+}+.timeline-playhead__head {position: absolute;top: 0;