Expand description
Timeline editing — split + undo/redo (ED.11 / M-EDIT).
The razor on the bench and the trim bin. A split divides the clip
under the playhead into two segments; undo/redo walk the trim bin so
nothing is ever lost. The heavy lifting is the (proptest-verified)
[edit::History] from ED.2 — this module is the thin layer that runs an
edit against that history and syncs the result into the reactive project
signal the timeline reads.
Split is duration-preserving, so the playhead clock needs no update.
Duration-changing edits (ripple delete, trim) land next and use
EditorPlayer::set_duration.
Functions§
- add_
zoom_ at_ cursor - Like
add_zoom_defaultbut punches in on the cursor at the playhead — the manual “zoom into the cursor” action. The target is the cursor’s position atatfrom the project’s captured track ([EditProject::zoom_cursor_target]), falling back to centre when no track was captured (so it degrades to the same result asadd_zoom_default). - add_
zoom_ default - Add a default ~1.5 s zoom (1.6× centre) starting at project frame
at, clamped to the timeline. No-op if the window would be empty.AddZoomassigns the region a fresh id. - apply_
logged 🔒 - Apply an op to the history, logging a rejection rather than silently
dropping it. A stale-id / out-of-range op is a legitimate no-op (e.g. a
RemoveZoomwhose target was already removed across an undo), but a swallowedErris invisible — surfacing it to the console keeps wiring regressions debuggable. - redo
- Redo the last undone edit.
- remove_
zoom - Remove the zoom region with the given id.
- resolve_
history - Reuse the existing edit history if it belongs to
current(same source clip), otherwise start fresh. A different source path means a different clip was opened, so the old undo stack no longer applies. Pure. - ripple_
delete_ selected - Ripple-delete the selected clip — remove it and close the gap (the downstream clips slide left; the timeline shortens).
- run 🔒
- Run
editagainst the project’s persistent history, then sync the project signal to the result.historycarries the undo/redo stacks across calls. - set_
aspect - Set the output aspect ratio (reframes the export canvas).
- set_
background - Set the background framing config (backdrop + padding / radius / shadow).
- set_
crop - Set the crop rectangle (a full-frame rect clears the crop). The op sanitizes the rect to a valid in-frame sub-rect.
- set_
cursor - Set the cursor styling config (size / smoothing / ripples / etc.).
- set_
speed - Set segment
index’s playback speed (timescale). This changes the project length, sorunre-syncs the backend clock viaSetDuration. - set_
zoom_ ease - Retune the easing curve of the zoom with the given id (ED.13 dopesheet).
- split_
at - Split the clip under the playhead into two (the razor).
- undo
- Undo the last edit (the trim bin — nothing is lost).