/** * Safe DOM text node — never use innerHTML with user-generated content. * Returns a text node that can be appended to any element. */ export declare function safeText(str: string): Text; /** * Set an element's text content safely (no HTML injection). */ export declare function setTextContent(el: Element, str: string): void; /** * Create an element with safe text content. */ export declare function el(tag: K, text?: string, attrs?: Record): HTMLElementTagNameMap[K]; /** * Render comment content as safe DOM nodes. * Supports newlines →
but no raw HTML from user input. * Returns a DocumentFragment. */ export declare function renderCommentContent(raw: string): DocumentFragment; /** * Validate that a URL is safe (http/https only). * Returns null if unsafe. */ export declare function sanitizeUrl(url: string): string | null;