/** * Terminal Utilities * * Shared utilities for terminal output manipulation including * ANSI escape codes and text formatting. */ /** * ANSI escape codes for terminal control */ export declare const ANSI: { readonly CLEAR_LINE: "\u001B[2K"; readonly CLEAR_TO_END: "\u001B[K"; readonly cursorDown: (n: number) => string; readonly cursorUp: (n: number) => string; readonly HIDE_CURSOR: "\u001B[?25l"; readonly moveToCol: (n: number) => string; readonly RESET: "\u001B[0m"; readonly RESTORE_CURSOR: "\u001B[u"; readonly SAVE_CURSOR: "\u001B[s"; readonly SHOW_CURSOR: "\u001B[?25h"; }; /** * Strip ANSI escape codes to get visible text */ export declare function stripAnsi(str: string): string; /** * Get visible length of text (excluding ANSI codes) */ export declare function getVisibleLength(str: string): number; /** * Truncate text to fit terminal width, preserving ANSI codes */ export declare function truncateToWidth(text: string, maxWidth: number): string; /** * Pad text to a specific visible width */ export declare function padToWidth(text: string, width: number, padChar?: string): string; /** * Center text within a specific width */ export declare function centerText(text: string, width: number): string; /** * Spinner frames for animated indicators */ export declare const SPINNER_FRAMES: readonly ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]; /** * Get next spinner frame */ export declare function getSpinnerFrame(index: number): string; //# sourceMappingURL=terminal-utils.d.ts.map