import { HsonAttrs, HsonMeta } from "../../../../core/types.js"; /** * Extract Hson-facing attributes from a live DOM `Element`. * * Rules: * - Returns `attrs` for user-visible attributes, optional `meta` for reserved * structural metadata, and protected QUID input separately for canonical * attachment by the caller. * - Decodes dedicated Hson metadata transit names only for the string parser * path and rejects externally authored private names. * - Decodes generic ordinary-attribute transit names only for the string parser * path and rejects externally authored private names. * - Normalizes style into a structured object via `parse_style_string`. * - Ignores XML namespace noise (`xmlns`, `xmlns:*`, `xml:*`) so HTML/SVG/XML * sources don’t leak parser plumbing into Hson. * - Preserves SVG attribute names exactly as the DOM reports them. This keeps * case-sensitive SVG names such as `viewBox`, `stdDeviation`, and * `preserveAspectRatio` intact instead of relying on an incomplete repair map. * - Lowercases HTML attribute names for stable HTML/Hson behavior. * - For SVG, maps `xlink:href` → `href` only if `href` is not already present, * so downstream code can treat links uniformly. * - Canonicalizes boolean/presence flags so `disabled`, `disabled=""`, and * `disabled="disabled"` become `disabled="disabled"` in `attrs`; SVG presence * attributes preserve the SVG key spelling. * - Normalizes other attribute values with `normalize_attr_ws` to collapse * whitespace (but does not apply this to `style`, which is parsed separately). * * @param el - The DOM element to read attributes from. * @returns Parsed ordinary attributes plus optional structural metadata and a * separately captured protected QUID value. */ export declare function parse_html_attrs(el: Element, nodeTag: string, options?: Readonly<{ allowHsonTransit?: boolean; allowOrdinaryTransit?: boolean; }>): { attrs: HsonAttrs; meta?: HsonMeta; quid?: string; }; /** * Legacy SVG attr repair map. * * This is intentionally no longer used by `parse_html_attrs()` for live SVG DOM * reads. SVG attributes are now preserved exactly at the namespace boundary. * Keep the map available for older parse/repair paths that may need to recover * case-sensitive SVG attr names from already-lowercased legacy input. */ export declare const SVG_ATTR_CASE_MAP: Record; export declare function canonical_svg_attr_name(name: string): string; //# sourceMappingURL=parse_html_attrs.d.ts.map