import type { SignalDoc } from './build-context.js'; import { type SignalComponentDef } from './component.js'; /** A server DOM document: the node-factory subset the build needs. A `DomEnv` * from `@llui/dom/ssr/jsdom` or `@llui/dom/ssr/linkedom` satisfies it. */ export type ServerDoc = SignalDoc; /** Escape a string for use inside a double-quoted HTML attribute. Exported so the * head-management collector serializes html/body attribute strings through the * same escaping as the node serializer (no second, divergent escaper). */ export declare function escapeAttr(s: string): string; /** Serialize an array of (already-built) DOM nodes to an HTML string. Used by * adapters (`@llui/vike`) that compose layout + page node trees before one final * serialization pass. */ export declare function serializeNodes(nodes: readonly Node[]): string; /** * Build a signal component's DOM tree on the server, returning the (detached) * nodes plus a `dispose` that runs the build's teardowns. The caller composes / * serializes the nodes; effects are NOT dispatched (server render is pure). * * For persistent layouts, compose multiple `renderNodes` results before * `serializeNodes` so the layout/page trees are stitched at the slot position. */ export declare function renderNodes(def: SignalComponentDef, initialState: S | undefined, env: ServerDoc, contexts?: ReadonlyMap): { nodes: readonly Node[]; dispose: () => void; }; /** * Render a signal component to an HTML string against the initial state (or a * provided override). `env` is a server `DomEnv` from `@llui/dom/ssr/jsdom` or * `@llui/dom/ssr/linkedom`. */ export declare function renderToString(def: SignalComponentDef, initialState: S | undefined, env: ServerDoc): string; //# sourceMappingURL=ssr.d.ts.map