/** * Render engine: walks a `BlockNode[]` AST and dispatches each node to a * {@link MarkdownComponents} renderer. * * Responsibilities the engine keeps (so components stay simple and design * systems can't accidentally break streaming): * - AST recursion — children are fully rendered before a component is called. * - Stable reconciliation keys — `VNode.key` is stamped from the AST node's * streaming key after the component returns, so finalized blocks never * remount regardless of which element a component produced. */ import type { JSXElement } from '@sigx/lynx'; import type { BlockNode } from '../ast.js'; import type { MarkdownComponents } from './components.js'; export interface RenderContext { components: MarkdownComponents; onLink?: (href: string) => void; onImageTap?: (src: string) => void; } /** Render top-level blocks and wrap them in the `root` container. */ export declare function renderDocument(blocks: BlockNode[], ctx: RenderContext): JSXElement;