import { w as SchemaMeta } from "../types-BBQaEPfE.mjs"; import { r as SchemaIoSide } from "../adapter-ktQaheWB.mjs"; import { s as HtmlResolver } from "../renderer-ab9E52Bp.mjs"; import { f as RejectUnrepresentableZod } from "../typeInference-Y8tNEQJk.mjs"; import { a as InferredValue, t as InferFields } from "../inferValue-eAnh50EM.mjs"; //#region src/html/renderToHtml.d.ts /** * Build the recursion-cap sentinel element used when the renderer * encounters circular schema references. The label is interpolated via * `h()` + `serialize` so any HTML in `meta.description` (which is * schema-author content but can equally be sourced from user-supplied * JSON Schema input) is escaped — never interpolated into raw markup. * * @group HTML */ declare function recursionSentinelHtml(label: string): string; /** * Options accepted by {@link renderToHtml}. * * The generic parameters mirror `` so a typed * `schema` argument drives typed `value`, `ref`, and `fields` options. * * @group HTML */ interface RenderToHtmlOptions { /** * The data value to render. Typed against `InferredValue` * so a typed `schema` argument drives the rendered value's shape. */ value?: InferredValue; /** For OpenAPI: a ref string like "#/components/schemas/User". */ ref?: Ref; /** * Per-field meta overrides — nested object mirroring schema shape. * Typed against {@link InferFields} so a typed `schema` argument * drives autocomplete on the override map. */ fields?: InferFields; /** Meta overrides applied to the root schema. */ meta?: SchemaMeta; /** Force all fields read-only. */ readOnly?: boolean; /** Force all fields as inputs. */ writeOnly?: boolean; /** Root description. */ description?: string; /** Custom HTML resolver. Falls back to defaultHtmlResolver. */ resolver?: HtmlResolver; } /** * Render a schema to a semantic HTML string. * * Framework-agnostic alternative to the React rendering pipeline. * Shares the same normalise → walk → render pipeline, but emits * escaped HTML with `sc-` prefixed classes rather than ReactNodes. * Pass `resolver` to plug in a custom HTML renderer. * * @group HTML * @param schema - Zod schema, JSON Schema, or OpenAPI document * @param options - Value, overrides, and resolver options * @returns Semantic HTML string with `sc-` prefixed classes * @example * ```tsx * import { renderToHtml } from "schema-components/html/renderToHtml"; * * const html = renderToHtml(userSchema, { value: user, readOnly: true }); * ``` */ declare function renderToHtml(schema: RejectUnrepresentableZod, options?: RenderToHtmlOptions): string; //#endregion export { RenderToHtmlOptions, recursionSentinelHtml, renderToHtml };