feat(studio): batch timeline timing commits

Persist group timing edits through one coalesced write per source file.

Keep batch timing queued behind any z-index commit for the same gesture.
This commit is contained in:
Miguel Angel Simon Sierra
2026-07-09 16:54:34 -04:00
parent 1d858f004d
commit 1cf601202d
7 changed files with 714 additions and 22 deletions
@@ -2,6 +2,11 @@
// fallow-ignore-file dead-code
import type { TimelineElement } from "../store/playerStore";
import type { BlockedTimelineEditIntent, TimelineStackingReorderIntent } from "./timelineEditing";
import type {
TimelineGroupCommitOptions,
TimelineGroupMoveChange,
TimelineGroupResizeChange,
} from "../../hooks/useTimelineGroupEditing";
/**
* Shared callback signatures for timeline editing operations.
@@ -34,6 +39,14 @@ export interface TimelineEditCallbacks {
element: TimelineElement,
updates: Pick<TimelineElement, "start" | "duration" | "playbackStart">,
) => Promise<void> | void;
onMoveElements?: (
changes: TimelineGroupMoveChange[],
options?: TimelineGroupCommitOptions,
) => Promise<void> | void;
onResizeElements?: (
changes: TimelineGroupResizeChange[],
options?: TimelineGroupCommitOptions,
) => Promise<void> | void;
onToggleTrackHidden?: (track: number, hidden: boolean) => Promise<void> | void;
onToggleElementHidden?: (elementKey: string, hidden: boolean) => Promise<void> | void;
onBlockedEditAttempt?: (element: TimelineElement, intent: BlockedTimelineEditIntent) => void;