/** * Text display width utilities * * Pure functions for calculating and truncating text based on * terminal display width, with full-width (CJK) character support. */ export declare const MAX_TERMINAL_OUTPUT_BYTES: number; /** Check if a Unicode code point occupies 2 terminal columns. */ export declare function isFullWidth(code: number): boolean; /** Calculate the display width of a plain text string. */ export declare function getDisplayWidth(text: string): number; /** * Strip all ANSI escape sequences from a string. * Removes CSI sequences (colors, cursor motion, etc.), * OSC sequences, and other single-character escape codes. */ export declare function stripAnsi(text: string): string; /** * Sanitize terminal-bound text by removing ANSI escapes and visualizing control characters. */ export declare function sanitizeTerminalText(text: string): string; /** Sanitize streamed terminal text while preserving LF and TAB and removing CR. */ export declare function sanitizeTerminalStreamText(text: string): string; export declare function truncateUtf8WithMarker(text: string, maxBytes: number, createMarker: (omittedBytes: number) => string): string; export declare function truncateUtf8PreservingMarker(text: string, maxBytes: number): string; export declare function sanitizeTerminalTextWithinBytes(text: string, maxBytes: number): string; /** * Truncate plain text to fit within maxWidth display columns. * Appends '…' if truncated. The ellipsis itself counts as 1 column. */ export declare function truncateText(text: string, maxWidth: number): string; //# sourceMappingURL=text.d.ts.map