import { j as WalkedField } from "../types-BBQaEPfE.mjs"; import { i as DiagnosticsOptions } from "../diagnostics-mftUZI7c.mjs"; import { s as HtmlResolver } from "../renderer-ab9E52Bp.mjs"; import { HtmlElement } from "./html.mjs"; //#region src/html/streamRenderers.d.ts /** * Serialise the opening tag of an element so a generator can yield it * without the matching closing tag. Void elements (e.g. `input`) are * emitted self-closed so the chunk is structurally valid on its own. */ declare function yieldOpen(el: HtmlElement): string; /** * Serialise the closing tag of an element so a generator can yield it * after its children. Returns an empty string for void elements (their * opening tag was emitted self-closed by {@link yieldOpen}). */ declare function yieldClose(el: HtmlElement): string; /** * Render a leaf {@link WalkedField} entirely as a single HTML chunk. * Used inside the streaming generators when descent into containers is * complete. * * Delegates to the framework-agnostic {@link dispatchRenderField} * dispatcher so resolver lookup, the (unused) widget step, error * wrapping, and the unresolved-type fallback share one implementation * with the sync HTML renderer and the React adapter. * * @param depth - Current recursion depth — defaults to `0` so the * public signature stays additive. Callers inside the streaming * pipeline thread the live `currentDepth` so the dispatcher's * internal depth check is consistent with the streamField gate. */ declare function renderLeaf(tree: WalkedField, value: unknown, mergedResolver: HtmlResolver, path: string, depth?: number): string; /** * Drain {@link streamField} into a single string. Used when a streamed * sub-tree needs to be embedded inside a non-streaming chunk (e.g. as * children of a parent element). */ declare function renderFieldSync(tree: WalkedField, value: unknown, mergedResolver: HtmlResolver, path: string, rawResolver: HtmlResolver, currentDepth: number, diagnostics: DiagnosticsOptions | undefined): string; /** * Render a {@link WalkedField} as a generator that yields HTML chunks * at natural boundaries (opening tag, one chunk per child, closing * tag). Threads `currentDepth` so cyclic walked-field graphs terminate * at `MAX_RENDER_DEPTH` with a recursion sentinel rather than * overflowing the stack. */ declare function streamField(tree: WalkedField, value: unknown, mergedResolver: HtmlResolver, path: string, rawResolver: HtmlResolver, currentDepth?: number, diagnostics?: DiagnosticsOptions): Iterable; //#endregion export { renderFieldSync, renderLeaf, streamField, yieldClose, yieldOpen };