import type { ReactNode } from "react"; import { useStoryboard } from "../../hooks/useStoryboard"; import { StoryboardLoaded } from "./StoryboardLoaded"; export interface StoryboardViewProps { projectId: string; /** Select a composition in the timeline (used by the frame focus "Open in Preview"). */ onSelectComposition: (path: string) => void; } /** * Top-level storyboard stage. Replaces the timeline/preview when the view mode * is `storyboard`. Handles the load states here; once a storyboard exists, * {@link StoryboardLoaded} owns the Board ↔ Source experience. */ // fallow-ignore-next-line complexity export function StoryboardView({ projectId, onSelectComposition }: StoryboardViewProps) { const { data, loading, error, reload } = useStoryboard(projectId); if (loading) return {Loading storyboard…}; if (error) { return ( Couldn’t load the storyboard: {error} ); } if (!data) return {null}; if (!data.exists) { return ( ); } return ( ); } function StoryboardFrame({ children }: { children: ReactNode }) { return (
{children}
); } function Message({ children, tone = "muted" }: { children: ReactNode; tone?: "muted" | "error" }) { return (
{children}
); } function EmptyState({ path }: { path: string }) { return (

No storyboard yet

Add a {path} at the project root to plan this video frame by frame. Your agent can create and iterate on it for you.

); }