/** * Cinematic Prototype Exporter — Generates Playwright scripts * that record interactive walkthroughs of generated pages as * video, screenshots, and animated GIF prototypes. * * Takes a page spec and produces a Playwright test that: * 1. Launches the preview server * 2. Navigates through each section * 3. Records video of interactions * 4. Captures screenshots at each state * 5. Generates a prototype HTML with transitions */ import type { Registry } from "../engine/registry.js"; export interface PrototypeConfig { outputDir: string; previewUrl: string; viewport: { width: number; height: number; }; transitions: TransitionStyle; recordVideo: boolean; captureScreenshots: boolean; } export type TransitionStyle = "fade" | "slide-left" | "slide-up" | "zoom" | "morph" | "cinematic"; export interface PrototypeScene { name: string; url: string; waitFor?: string; interactions: PrototypeInteraction[]; duration: number; transition: TransitionStyle; } export interface PrototypeInteraction { type: "click" | "hover" | "scroll" | "type" | "wait" | "screenshot"; target?: string; value?: string; delay?: number; } /** * Generate a Playwright script for a cinematic prototype walkthrough. */ export declare function generatePlaywrightPrototype(scenes: PrototypeScene[], config: PrototypeConfig): string; /** * Generate a cinematic HTML prototype that plays through scenes * with CSS transitions, auto-playing like a presentation. */ export declare function generateHtmlPrototype(scenes: PrototypeScene[], config: PrototypeConfig): string; /** * Build scenes from page specs for automatic prototype generation. */ export declare function buildScenesFromSpecs(registry: Registry, previewUrl: string): Promise; /** * Write all prototype files to disk. */ export declare function exportPrototype(scenes: PrototypeScene[], config: PrototypeConfig): Promise<{ playwright: string; html: string; }>;