/** * ACE-TUI ANSI Renderer * * Direct terminal rendering via ANSI escape sequences. * Zero dependencies — uses process.stdout.write() exclusively. * Inspired by arttime's rendering approach. */ /** Cursor movement */ export declare const cursor: { readonly to: (x: number, y: number) => string; readonly up: (n?: number) => string; readonly down: (n?: number) => string; readonly right: (n?: number) => string; readonly left: (n?: number) => string; readonly hide: "\u001B[?25l"; readonly show: "\u001B[?25h"; readonly save: "\u001B7"; readonly restore: "\u001B8"; readonly home: "\u001B[H"; }; /** Screen operations */ export declare const screen: { readonly clear: "\u001B[2J"; readonly clearLine: "\u001B[2K"; readonly clearDown: "\u001B[J"; readonly clearRight: "\u001B[K"; readonly altBuffer: "\u001B[?1049h"; readonly mainBuffer: "\u001B[?1049l"; readonly enableMouse: "\u001B[?1003h\u001B[?1006h"; readonly disableMouse: "\u001B[?1003l\u001B[?1006l"; }; /** Style codes */ export declare const style: { readonly reset: "\u001B[0m"; readonly bold: "\u001B[1m"; readonly dim: "\u001B[2m"; readonly italic: "\u001B[3m"; readonly underline: "\u001B[4m"; readonly inverse: "\u001B[7m"; readonly strikethrough: "\u001B[9m"; }; export type ColorLevel = "none" | "basic" | "256" | "truecolor"; export declare function detectColorLevel(): ColorLevel; /** 16-color CGA foreground */ export declare const fg: { readonly black: "\u001B[30m"; readonly red: "\u001B[31m"; readonly green: "\u001B[32m"; readonly yellow: "\u001B[33m"; readonly blue: "\u001B[34m"; readonly magenta: "\u001B[35m"; readonly cyan: "\u001B[36m"; readonly white: "\u001B[37m"; readonly gray: "\u001B[90m"; readonly brightRed: "\u001B[91m"; readonly brightGreen: "\u001B[92m"; readonly brightYellow: "\u001B[93m"; readonly brightBlue: "\u001B[94m"; readonly brightMagenta: "\u001B[95m"; readonly brightCyan: "\u001B[96m"; readonly brightWhite: "\u001B[97m"; }; /** 16-color CGA background */ export declare const bg: { readonly black: "\u001B[40m"; readonly red: "\u001B[41m"; readonly green: "\u001B[42m"; readonly yellow: "\u001B[43m"; readonly blue: "\u001B[44m"; readonly magenta: "\u001B[45m"; readonly cyan: "\u001B[46m"; readonly white: "\u001B[47m"; readonly gray: "\u001B[100m"; readonly brightBlue: "\u001B[104m"; readonly brightCyan: "\u001B[106m"; }; /** 256-color codes */ export declare function fg256(n: number): string; export declare function bg256(n: number): string; /** 24-bit RGB colors */ export declare function fgRgb(r: number, g: number, b: number): string; export declare function bgRgb(r: number, g: number, b: number): string; export declare const box: { readonly topLeft: "┌"; readonly topRight: "┐"; readonly bottomLeft: "└"; readonly bottomRight: "┘"; readonly horizontal: "─"; readonly vertical: "│"; readonly teeRight: "├"; readonly teeLeft: "┤"; readonly teeDown: "┬"; readonly teeUp: "┴"; readonly cross: "┼"; readonly heavyHorizontal: "━"; readonly heavyVertical: "┃"; readonly roundTopLeft: "╭"; readonly roundTopRight: "╮"; readonly roundBottomLeft: "╰"; readonly roundBottomRight: "╯"; }; export declare const symbols: { readonly check: "✓"; readonly cross: "✗"; readonly bullet: "●"; readonly hollowBullet: "○"; readonly arrow: "→"; readonly arrowLeft: "←"; readonly arrowUp: "↑"; readonly arrowDown: "↓"; readonly spinner: readonly ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]; readonly progress: { readonly filled: "█"; readonly partial: "▓"; readonly empty: "░"; }; readonly tab: "▎"; readonly activeTab: "▌"; }; /** Strip ANSI escape codes from a string (arttime: sed -e 's/\x1b\[[0-9;]*m//g') */ export declare function stripAnsi(text: string): string; /** Get visible width of a string (ANSI-aware) */ export declare function visibleWidth(text: string): number; /** Truncate text to fit width, add ellipsis if needed */ export declare function truncate(text: string, maxWidth: number): string; /** Pad text to exact width (ANSI-aware) */ export declare function padRight(text: string, width: number): string; /** Center text in width (ANSI-aware, arttime centering math) */ export declare function center(text: string, width: number): string; /** Write raw string to stdout */ export declare function write(s: string): void; /** Write at specific position */ export declare function writeAt(x: number, y: number, text: string): void; /** Draw a horizontal line */ export declare function hline(x: number, y: number, width: number, char?: "─"): void; /** Draw a vertical line */ export declare function vline(x: number, y: number, height: number, char?: "│"): void; /** Draw a box with optional title */ export declare function drawBox(x: number, y: number, width: number, height: number, opts?: { title?: string; titleColor?: string; borderColor?: string; rounded?: boolean; }): void; /** Fill a rectangular region with spaces (clear region) */ export declare function clearRegion(x: number, y: number, width: number, height: number): void; /** Draw a progress bar (arttime-inspired) */ export declare function progressBar(x: number, y: number, width: number, ratio: number, opts?: { filledColor?: string; emptyColor?: string; showPercent?: boolean; }): void; /** Draw a spinner frame */ export declare function spinnerFrame(frame: number): string; /** Get terminal dimensions */ export declare function getTermSize(): { cols: number; rows: number; }; /** Format elapsed time (arttime contextual time display) */ export declare function formatElapsed(ms: number): string; /** Format timestamp as HH:MM:SS */ export declare function formatTime(date?: Date): string; /** Format a number with commas */ export declare function formatNumber(n: number): string; //# sourceMappingURL=renderer.d.ts.map