import { HsonNode } from "../../../../core/types.js"; /** * XML namespace URI for SVG elements. */ export declare const SVG_NS = "http://www.w3.org/2000/svg"; /** * XML namespace URI for HTML elements. */ export declare const HTML_NS = "http://www.w3.org/1999/xhtml"; /** * Detect whether a string looks like an SVG fragment. * * @param s - Raw markup string to test. * @returns True when the string begins with an `` tag. */ export declare const is_svg_markup: (s: string) => boolean; /** * Convert an SVG DOM `Element` subtree into an Hson node tree. * * Namespace / intent: * - Intended for SVG elements (namespace-aware pipelines can route here when `el.namespaceURI === SVG_NS` * or when `isSvgMarkup(...)` detects `` input). * - Tag names are normalized to lowercase for stable serialization (`` attributes remain verbatim). * * Attribute handling: * - Routes `quid` through canonical protected metadata assignment. * - Copies every other attribute as-is into `$_attrs` except for the established * `xlink:href` → `href` alias when no literal `href` is present. * - This preserves SVG-specific casing and names like `viewBox` and `stroke-width`. * * Child handling: * - Element children become nested Hson nodes via recursive conversion. * - Text nodes become `_hson_str` leaves with the raw text content preserved (including whitespace). * - Other node types (comments, processing instructions, etc.) are ignored. * * Output shape: * - Produces a canonical node and omits empty attribute/metadata containers. * * @param el - The root SVG `Element` to convert. * @returns An `HsonNode` representing `el` and its SVG subtree. */ export declare function node_from_svg(el: Element): HsonNode; //# sourceMappingURL=node-from-svg.d.ts.map