export declare const STREAMING_FRAME_MESSAGE = "agent-native:streaming-frame"; /** * Marks a placeholder in a skeleton-first build. Preview frames keep its * frame drawn until a later edit replaces it. */ export declare const SKELETON_ATTRIBUTE = "data-skeleton"; export declare const STREAMING_FRAME_READY_MESSAGE = "agent-native:streaming-frame-ready"; export declare const STREAMING_FRAME_CONNECT_MESSAGE = "agent-native:streaming-frame-connect"; /** * The document a sandboxed streaming preview frame loads once. Streamed HTML * then arrives through `postStreamingFrameHtml` and is patched in place, so * the frame never reloads: a plain head script such as a CSS runtime runs * once when it arrives, body and deferred scripts run once the document is * complete, and elements already on screen stay put while new ones draft in. */ export declare function buildStreamingFrameDocument(options?: { baseHref?: string | undefined; /** * Echoed in the frame's ready message so the parent can tell this * document from one the frame navigated to. Pass the same value to * `isStreamingFrameReadyMessage`. */ token?: string | undefined; }): string; /** * Opens the private channel streamed documents travel on. Call it once, on * the frame's ready message; the port only reaches the document that sent * it, so nothing posted on it can reach a page the frame navigates to. */ export declare function connectStreamingFrame(frame: HTMLIFrameElement): MessagePort | null; /** * Sends the document so far over the frame's port. `accent` is a resolved * CSS color; when present, each new element's frame is drawn in it before the * element fills in. */ export declare function postStreamingFrameHtml(port: MessagePort, html: string, options?: { accent?: string | undefined; }): void; export declare function isStreamingFrameReadyMessage(event: MessageEvent, frame: HTMLIFrameElement | null, token?: string): boolean;