diff options
| author | Maze Winther <mazewinther@gmail.com> | 2025-06-25 23:05:14 +0200 |
|---|---|---|
| committer | Maze Winther <mazewinther@gmail.com> | 2025-06-25 23:05:14 +0200 |
| commit | 3eac1bcb0b1f006fb6a7ae8a9aa76de4ad4edf1d (patch) | |
| tree | 129a7ba058434aec6d5eccba7dca4bf561243540 /apps/web/src/types | |
| parent | 3ea6b002547beb58ac7cd54b9c95c1755ead5ad1 (diff) | |
| download | opencut-3eac1bcb0b1f006fb6a7ae8a9aa76de4ad4edf1d.tar.gz | |
refactor: move timeline clip into its separate component and type into /types
Diffstat (limited to 'apps/web/src/types')
| -rw-r--r-- | apps/web/src/types/timeline.ts | 27 |
1 files changed, 27 insertions, 0 deletions
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;
+}
|
