import type { MaskableElement, VisualElement } from "./types"; import type { ParamValues } from "@/params"; import type { TransitionKind } from "@/rendering/transition"; interface BaseDragData { id: string; name: string; } export interface MediaDragData extends BaseDragData { type: "media"; mediaType: "image" | "video" | "audio"; targetElementTypes?: MaskableElement["type"][]; } export interface TextDragData extends BaseDragData { type: "text"; content: string; } export interface StickerDragData extends BaseDragData { type: "sticker"; stickerId: string; } export interface GraphicDragData extends BaseDragData { type: "graphic"; definitionId: string; params: Partial; } export interface EffectDragData extends BaseDragData { type: "effect"; effectType: string; targetElementTypes: VisualElement["type"][]; } export interface TransitionDragData extends BaseDragData { type: "transition"; transitionKind: TransitionKind; inDuration: number; outDuration: number; } export type TimelineDragData = | MediaDragData | TextDragData | StickerDragData | GraphicDragData | EffectDragData | TransitionDragData;