import { XMLElement } from './dom-adapter'; /** * Strip and collapse ASCII whitespace in a string. * Returns empty string for null/undefined input. */ export declare const normalizeWhitespace: (str: string | null | undefined) => string; /** * Get normalized text content of an XML element. */ export declare const getElementText: (el: XMLElement | null | undefined) => string; /** * Simplified CSS.escape for ID selectors and attribute values. * Escapes special characters that need escaping in CSS selectors. */ export declare const cssEscape: (str: string) => string; /** * Escape special regex characters in a string. */ export declare const regexEscape: (str: string) => string; /** * Replace matches asynchronously and sequentially. * Useful when replacement function returns a Promise. * * @example * const result = await replaceSeries( * 'Hello {name}', * /\{(\w+)\}/g, * async (match, key) => await lookup(key) * ) */ export declare const replaceSeries: (str: string, regex: RegExp, f: (...args: string[]) => Promise) => Promise; /** * Escape HTML special characters in a string. */ export declare const escapeHTML: (str: string) => string; /** * Escape HTML attribute value (quotes only). */ export declare const escapeAttr: (str: string) => string; /** * Unescape HTML entities in a string. */ export declare const unescapeHTML: (str: string | undefined) => string; /** * Escape XML special characters in a string. */ export declare const escapeXML: (str: string) => string; export declare function extensionFromPath(path: string): string | null; export declare function extensionFromMime(mimeType: string, path?: string): string; export declare function getMimeTypeFromPath(path: string): string; //# sourceMappingURL=utils.d.ts.map