import type { PageRoute, ScannedRoutes } from "../router/route-scanner.js"; import type { BuildConfig } from "../build/build.js"; export interface StreamingPageOptions { route: PageRoute; params: Record; searchParams: URLSearchParams; config: Pick; importer?: (path: string) => Promise; actions?: Record; request?: Request; } /** * Render a page shell that shows the loading boundary while the real content * is fetched and injected by the client. */ export declare function renderStreamingPage(options: StreamingPageOptions): Promise; export interface RenderPageBodyOptions { routes: ScannedRoutes; pathname: string; searchParams: URLSearchParams; config: Pick; actions?: Record; importer?: (path: string) => Promise; request?: Request; } export interface RenderPageBodyResult { /** Inner HTML body for the page (without the document shell). */ body: string; /** Page title extracted from the rendered shell. */ title: string; /** Full rendered document shell (used for ISR caching). */ fullHtml?: string; /** `Set-Cookie` value that clears a consumed action error cookie. */ clearActionErrorCookie?: string; /** `` tags (title, meta, OG, twitter) for the SPA router to merge. */ head?: string; /** First-class Response when a loader threw one (A-22). */ response?: Response; } /** Thrown by `renderPageBody` when the requested path has no matching route. */ export declare class RouteNotFoundError extends Error { constructor(pathname: string); } /** * Render only the inner HTML body for a page. Used by the streaming endpoint * to inject the real content into the shell. */ export declare function renderPageBody(options: RenderPageBodyOptions): Promise;