import { IOConfig } from './types.mjs'; /** * Parses an SVG string into an `SVGSVGElement` using an *unsafe* but faster DOM method. * * @remarks * - Parsing itself does **not** execute scripts or handlers, since the element * is never mounted to the live DOM during this step. * - ⚠️ Security risk arises if the returned element is later attached to the DOM: * embedded scripts, event handlers, or external references could execute. * - Implementation detail: uses a temporary `
` to convert raw SVG markup. * - Recommended only for trusted or pre-sanitized SVG sources. */ declare const unsafeParseSvg: (svgString: string, config: Pick) => SVGSVGElement; /** * Parse an SVG string into an SVGSVGElement (client side). * * @remarks * - Safe mode (default): uses DOMParser. * - Unsafe mode: uses a temporary
. Faster, but requires sanitization * since malicious SVGs can contain scripts or handlers. * * @throws Error if the root element is not (for `Safe` mode). */ declare const parseSvg: (svgString: string, config?: IOConfig) => SVGSVGElement; /** * Serialize an SVGSVGElement back to string (browser, sync). * * @remarks * Uses XMLSerializer instead of element.outerHTML to ensure * consistent, standards-compliant output across browsers and Server. * outerHTML is simpler but may drop namespaces or produce inconsistent markup. */ declare const serializeSvg: (element: SVGSVGElement, config?: IOConfig) => string; export { parseSvg, serializeSvg, unsafeParseSvg };