/** * Strip ANSI escape sequences, remove control characters / lone surrogates, * and normalize line endings. * * Bun-native implementation of the former native `sanitizeText` (see * `crates/pi-natives/src/text.rs::sanitize_text`). JavaScript strings are * already UTF-16 code-unit arrays. `toWellFormed()` handles the uncommon * malformed path; when it changes the input, replacement characters are * dropped and the normalized result goes through the well-formed sanitizer. * * Fast path: well-formed input with no controls or ANSI returns the original * string after the control probe. */ export declare function sanitizeText(text: string): string; /** * Escape the three XML-significant characters (`&`, `<`, `>`) in text destined * for an XML/markup element body. Allocation-conscious: returns the input * unchanged (same reference) when nothing needs escaping. Quotes are left as-is * — use it for element text, not attribute values. */ export declare function escapeXmlText(input: string): string; /** * Escape XML-significant characters for an attribute VALUE: the three body * characters (`&`, `<`, `>`) plus the double quote (`"` → `"`) that would * otherwise close the attribute. Allocation-conscious: returns the input * unchanged (same reference) when nothing needs escaping. Use it for attribute * values; {@link escapeXmlText} is for element bodies and leaves `"` intact. */ export declare function escapeXmlAttribute(input: string): string;