export interface VideoMeta { width: number; height: number; duration: number; fps: number; } export interface Caption { id: string; text: string; startMs: number; endMs: number; } export interface CaptionStyle { fontFamily: string; fontSize: number; fillColor: string; strokeColor: string; strokeWidth: number; highlightColor?: string; /** rgba plate drawn behind the text — keeps captions readable over light page content */ backdrop?: string; shadow: { color: string; blur: number; offsetX: number; offsetY: number; }; uppercase: boolean; letterSpacing: number; } export interface CaptionLayout { position: "top" | "center" | "bottom"; yOffset: number; maxWidthPercent: number; maxLines: number; } export interface AnimationSettings { speed: number; style: "bounce" | "fade" | "pop"; } export type ProgressStage = | "extracting" | "rendering" | "encoding" | "done" | "error" | "fetching_repo" | "generating_script" | "generating_tts" | "recording_scroll" | "syncing_captions"; export interface Project { id: string; videoPath: string; videoMeta: VideoMeta; captions: Caption[]; style: CaptionStyle; layout: CaptionLayout; animation: AnimationSettings; status: "draft" | "rendering" | "done" | "error" | "generating"; exportPath?: string; createdAt: string; source?: "upload" | "github"; githubUrl?: string; repoName?: string; script?: string; audioPath?: string; } export interface RenderProgress { percent: number; stage: ProgressStage; message: string; etaSeconds?: number; } export interface StylePreset { id: string; name: string; style: CaptionStyle; layout: CaptionLayout; animation: AnimationSettings; } export interface GitHubRepoData { owner: string; repo: string; fullName: string; htmlUrl: string; description: string; stars: number; language: string; topics: string[]; readme: string; }