import { DomDocument, DomNode } from "./dom.js"; import { Mounted } from "./render.js"; import { Component, MindeesNode } from "@mindees/core"; //#region src/ssr.d.ts /** * Render an element tree (or component + props) to an HTML string on the server. * * Reactive bindings run once to produce the initial snapshot, then the scope is * disposed (SSR is a one-shot render — no live updates on the server). * * @example * const html = renderToString(App, {}) * // → "
(component: Component
, props: P): string;
/**
* Hydrate a server-rendered container on the client: render the same tree with
* the DOM backend so reactive bindings attach and take over updates.
*
* NOTE: this is a **developer-preview** hydration. It currently renders into the
* (cleared) container rather than adopting existing DOM nodes in place;
* node-adopting hydration (zero re-create) is tracked for a later phase. The
* observable result — a live, reactive tree matching the server HTML — is
* correct today.
*
* @param container - The element whose contents were server-rendered.
* @param node - The same tree (element or component+props) used on the server.
* @param options - Optionally supply a `document` (e.g. for tests).
*/
declare function hydrate(container: DomNode, node: MindeesNode, options?: {
document?: DomDocument;
}): Mounted (container: DomNode, component: Component , props: P, options?: {
document?: DomDocument;
}): Mounted