/** * 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 is full-width (occupies 2 columns). * Covers CJK unified ideographs, Hangul, fullwidth forms, etc. */ export declare function isFullWidth(code: number): boolean; /** * Calculate the display width of a plain text string. * Full-width characters (CJK etc.) count as 2, others as 1. */ 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; 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