From 3eac1bcb0b1f006fb6a7ae8a9aa76de4ad4edf1d Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Wed, 25 Jun 2025 23:05:14 +0200 Subject: refactor: move timeline clip into its separate component and type into /types --- apps/web/src/types/timeline.ts | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 apps/web/src/types/timeline.ts (limited to 'apps/web/src/types') diff --git a/apps/web/src/types/timeline.ts b/apps/web/src/types/timeline.ts new file mode 100644 index 00000000..21be520e --- /dev/null +++ b/apps/web/src/types/timeline.ts @@ -0,0 +1,27 @@ +import { TimelineTrack, TimelineClip } from "@/stores/timeline-store"; + +export interface TimelineClipProps { + clip: TimelineClip; + track: TimelineTrack; + zoomLevel: number; + isSelected: boolean; + onContextMenu: (e: React.MouseEvent, clipId: string) => void; + onClipMouseDown: (e: React.MouseEvent, clip: TimelineClip) => void; + onClipClick: (e: React.MouseEvent, clip: TimelineClip) => void; +} + +export interface ResizeState { + clipId: string; + side: "left" | "right"; + startX: number; + initialTrimStart: number; + initialTrimEnd: number; +} + +export interface ContextMenuState { + type: "track" | "clip"; + trackId: string; + clipId?: string; + x: number; + y: number; +} -- cgit v1.3.1