/** * Type declarations for the `nuclo/ssr` subpath. * * Hand-written (mirroring src/ssr/index.ts) and shipped from `types/` so the * subpath stays typed even when `dist/` holds only watch-mode JS bundles — * `tsdown --watch` cleans dist and emits no declarations. Keep in sync with * src/ssr/index.ts. */ // Load the ambient nuclo globals (NodeModFn, ElementTagName, tag builders, …) // so SSR-only consumers get them without importing the main entry. import "./index"; /** * Anything renderToString accepts: a built tree (`App()`), a component * function (`App`, as render()/hydrate() take it), a DOM node, or nothing. */ export type RenderableInput = | NodeModFn | (() => NodeModFn) | Element | Node | null | undefined; /** * Renders a Nuclo component (or DOM node) to an HTML string. * Text children keep their `` markers so the output is hydratable. */ export function renderToString(input: RenderableInput): string; /** Renders multiple Nuclo components to HTML strings. */ export function renderManyToString(inputs: RenderableInput[]): string[]; /** Renders a Nuclo component wrapped in a container element. */ export function renderToStringWithContainer( input: RenderableInput, containerTag?: string, containerAttrs?: Record, ): string; /** Serialize every registered generated CSS rule (for a