/** * 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; /** * Sanitize untrusted text that must occupy exactly one rendered row. * * {@link sanitizeText} deliberately preserves `\n`, and width-based truncation * treats it as zero-width, so a value carrying line breaks can still inject * extra rows and evade a single-line width budget. Flatten every CR/LF run to a * single space before the usual control/ANSI strip, then remove directional * format controls that can visually reorder an otherwise safe row. */ export declare function sanitizeDisplayLine(text: string): string;