import type { Theme } from "@design-parity/core"; /** One breakpoint to capture the prototype at. */ export interface LiveViewport { /** * Breakpoint label recorded on the resulting {@link Image} as its `size`, e.g. * `"compact"` / `"medium"` / `"expanded"`. Keys the reference frame against the * candidate's matching per-size render. */ size: string; /** CSS-pixel width to drive the prototype at. */ width: number; /** * CSS-pixel height that seeds the browser window; the capture reads the PNG's * intrinsic size back, so a full-page render taller than this still records its * true height. Defaults to {@link DEFAULT_VIEWPORT_HEIGHT}. */ height?: number; } /** A request to live-render one viewport of a prototype. */ export interface LiveRenderRequest { /** * Absolute path to the prototype to drive — a clickable Claude Design HTML * export (or a built prototype entry point). Rendered via a `file://` URL. */ prototypePath: string; viewport: LiveViewport; /** The theme the prototype should render under, when it honours one. */ theme?: Theme; } /** The product of a live render: an absolute PNG path and its intrinsic size. */ export interface LiveRenderResult { /** Absolute path to the written PNG. */ pngPath: string; width: number; height: number; } /** Drives a prototype and captures one viewport to a PNG on disk. */ export type LiveRenderer = (req: LiveRenderRequest) => Promise; /** Fallback window height (px) when a viewport doesn't pin one. */ export declare const DEFAULT_VIEWPORT_HEIGHT = 915; /** * The viewports the adapter captures when a live ref doesn't configure its own. * A single compact frame — the lighter default; callers opt into a wider matrix * by passing `liveViewports`. */ export declare const DEFAULT_LIVE_VIEWPORTS: LiveViewport[]; /** * Default live renderer: drives the prototype in a headless Chrome/Chromium sized * to the viewport and captures it via `--screenshot`. * * Writes the PNG into a fresh temp directory and reads back its intrinsic * dimensions from the bytes (never a caller-supplied size). A caller that already * runs Playwright injects that instead of this. * * @throws a clear, actionable error if no Chrome/Chromium binary is found. */ export declare const browserLiveRenderer: LiveRenderer; //# sourceMappingURL=live-renderer.d.ts.map