import { Primitive } from '../../../core/types.js'; import { HsonNode } from '../../../core/types.js'; export declare function escape_attr(v: string): string; /** Serialize one canonical graph value into its HTML transport spelling. */ export declare function serialize_xml(node: HsonNode | Primitive | undefined): string; /** * Public HTML serializer for Hson trees (2.0 surface). * * Pipeline: * 1. Clone & guard: * - `clone_node($node)` to avoid mutating the original IR. * - Require that the clone is a valid `HsonNode`, otherwise throw. * * 2. Invariant check: * - `assert_invariants(clone, "serialize_html")` ensures that the * internal Hson structure is well-formed before any emission. * * 3. XML stage: * - Delegates to `serialize_xml(clone)` to produce an XML-like string * that faithfully represents Hson semantics (including `_hson_val`, `_hson_obj`, * `_hson_arr`, `_hson_ii`, etc.). * * 4. HTML normalization: * - Converts boolean attributes from `key="key"` to `key` using a regex * replacement; this matches standard HTML boolean attribute semantics. * * 5. Finalization: * - Returns `htmlString.trim()` to remove leading/trailing whitespace. * * Characteristics: * - `_hson_str` is explicit when required to preserve a transport boundary. * - `_hson_val` uses a `<_hson_val>…` literal representation. * - `_hson_elem` appears only when its transport boundary is required; * `_hson_root` never appears as a tag. * - `_hson_obj` and other clusters remain visible where necessary to preserve * Hson’s JSON-mode structure. * * @param node - Root Hson node or primitive to serialize as HTML. * @returns A trimmed HTML string ready for DOM insertion or inspection. * @throws If invariants fail or if the input is not a valid HsonNode. */ export declare function serialize_html(node: HsonNode | Primitive): string; //# sourceMappingURL=serialize-html.d.ts.map