summaryrefslogtreecommitdiff
path: root/apps/web/src/types
diff options
context:
space:
mode:
authorgantiro <gantiro396@gmail.com>2025-07-15 22:51:38 +0700
committergantiro <gantiro396@gmail.com>2025-07-15 22:51:38 +0700
commitb266678fe4bb8c4053688fd037693fa2f930ac14 (patch)
tree89a8c3b7a151a42fecfc480b440c55fce79252da /apps/web/src/types
parent1f95bb98d6108a5fa059e0f9a08c98e5bdb72c08 (diff)
downloadopencut-b266678fe4bb8c4053688fd037693fa2f930ac14.tar.gz
Optimize timeline performance
Diffstat (limited to 'apps/web/src/types')
-rw-r--r--apps/web/src/types/timeline.ts20
1 files changed, 20 insertions, 0 deletions
diff --git a/apps/web/src/types/timeline.ts b/apps/web/src/types/timeline.ts
index 17dbb5d1..146205c4 100644
--- a/apps/web/src/types/timeline.ts
+++ b/apps/web/src/types/timeline.ts
@@ -1,5 +1,6 @@
import { MediaType } from "@/stores/media-store";
import { generateUUID } from "@/lib/utils";
+import { ReactNode } from "react";
export type TrackType = "media" | "text" | "audio";
@@ -155,3 +156,22 @@ export function validateElementTrackCompatibility(
return { isValid: true };
}
+
+export interface TimelineTick {
+ left: number;
+ label?: string;
+ isMajor?: boolean;
+}
+
+export interface TimelineCanvasRulerWrapperProps {
+ children: ReactNode;
+ onMouseDown?: (e: React.MouseEvent<HTMLDivElement>) => void;
+ className?: string;
+}
+
+export interface TimelineCanvasRulerProps {
+ zoomLevel: number;
+ duration: number;
+ width: number;
+ height?: number;
+}