/** * ANSI escape codes for terminal control * Low-level building blocks for custom renderer */ export declare const cursor: { hide: string; show: string; home: string; to: (row: number, col: number) => string; up: (n?: number) => string; down: (n?: number) => string; right: (n?: number) => string; left: (n?: number) => string; save: string; restore: string; getPosition: string; }; export declare const screen: { clear: string; clearLine: string; clearToEnd: string; clearToLineEnd: string; setScrollRegion: (top: number, bottom: number) => string; resetScrollRegion: string; enterAltBuffer: string; exitAltBuffer: string; }; export declare const fg: { black: string; red: string; green: string; yellow: string; blue: string; magenta: string; cyan: string; white: string; gray: string; brightRed: string; brightGreen: string; brightYellow: string; brightBlue: string; brightMagenta: string; brightCyan: string; brightWhite: string; color256: (n: number) => string; rgb: (r: number, g: number, b: number) => string; }; export declare const bg: { black: string; red: string; green: string; yellow: string; blue: string; magenta: string; cyan: string; white: string; gray: string; color256: (n: number) => string; rgb: (r: number, g: number, b: number) => string; }; export declare const style: { reset: string; bold: string; dim: string; italic: string; underline: string; blink: string; inverse: string; hidden: string; strikethrough: string; resetBold: string; resetDim: string; resetItalic: string; resetUnderline: string; resetBlink: string; resetInverse: string; resetHidden: string; resetStrikethrough: string; }; /** * Helper to create styled text */ export declare function styled(text: string, ...styles: string[]): string; /** * Render text with a horizontal RGB gradient across multiple color stops. * Each character gets its own fg.rgb() code. * Stops: array of [r,g,b] colors distributed evenly across the text. */ export declare function gradientText(text: string, stops: Array<[number, number, number]>): string; /** * Render a full-width separator line with a gradient. * Uses the given char (default '─') repeated across width. */ export declare function gradientLine(width: number, stops: Array<[number, number, number]>, char?: string): string; /** * Get terminal display width of a single character * CJK, fullwidth, and emoji characters take 2 columns */ export declare function charWidth(char: string): number; /** * Get terminal display width of a string (excluding ANSI codes) */ export declare function stringWidth(str: string): number; /** * Strip ANSI codes from string (for length calculation) */ export declare function stripAnsi(str: string): string; /** * Get visible length of string (excluding ANSI codes) */ export declare function visibleLength(str: string): number; /** * Truncate string to visible length, preserving ANSI codes */ export declare function truncate(str: string, maxLength: number, suffix?: string): string; /** * Wrap text to fit width, respecting ANSI codes */ export declare function wordWrap(str: string, width: number): string[];