import { n as setVikeState, r as store, t as VikeState } from "../store-DRuFjsY3.mjs";
//#region src/__internal/server.d.ts
interface HtmlShellParams {
pageTitleTag: string;
cssLinks: string;
jsPreloads: string;
/** Statically rendered
content (not part of the hydrated tree). */
headHtml: string;
/** Server-rendered app markup, or '' in Client Takeover mode. */
appHtml: string;
serializedContext: string;
entryClient: string;
nonce?: string;
/**
* Extra markup injected right after `headHtml`, before the context script.
* Used by Solid for `generateHydrationScript()`.
*/
extraHeadHtml?: string;
}
/**
* Renders the HTML document shell shared by every adapter: doctype, meta tags,
* asset links, the injected `__PAGE_CONTEXT__` script, the root container and
* the client entry script. Centralized so that CSP nonce handling (and any other
* cross-cutting concern) is applied consistently instead of drifting between
* React/Vue/Solid, as it did before this was factored out.
*/
declare function renderHtmlShell({ pageTitleTag, cssLinks, jsPreloads, headHtml, appHtml, serializedContext, entryClient, nonce, extraHeadHtml }: HtmlShellParams): string;
interface HtmlShellStreamParams extends Omit {
/**
* The app markup, as a stream of `string` or `Uint8Array` chunks (whatever the
* UI framework's streaming renderer produces). Framework adapters build this by
* calling their framework's own Web Streams-based SSR API — e.g. React's
* `renderToReadableStream` (from `react-dom/server.edge`) or Vue's
* `renderToWebStream` (from `vue/server-renderer`).
*/
appStream: ReadableStream;
}
/**
* Same document shell as {@link renderHtmlShell}, but returns a standard
* `ReadableStream` instead of a fully-buffered `string`: the shell's
* opening tags are enqueued immediately, the framework's app stream is piped
* through chunk by chunk as it becomes available, and the closing tags are
* enqueued once the app stream ends.
*
* Built entirely on the platform-native `ReadableStream`/`TextEncoder` globals
* (no Node-specific stream types), so the exact same code streams correctly on
* Node.js (18+), Deno, Bun, and Edge runtimes (Cloudflare Workers, Vercel Edge,
* etc.) — anywhere a `Response` with a streamed body can be returned.
*/
declare function renderHtmlShellStream({ appStream, ...shellParams }: HtmlShellStreamParams): ReadableStream;
//#endregion
export { VikeState, renderHtmlShell, renderHtmlShellStream, setVikeState, store };