/** * ansi — generates escape sequences (CSI/SGR) and defines the colour vocabulary. * The lowest level that "knows" the terminal protocol. No I/O. */ /** The colour depth the terminal supports (see TerminalCapabilities). */ export type ColorLevel = 'truecolor' | 'ansi256' | 'ansi16' | 'none'; /** A concrete colour already resolved for a depth — ready to become SGR bytes. */ export type AnsiColor = { readonly kind: 'rgb'; readonly r: number; readonly g: number; readonly b: number; } | { readonly kind: 'ansi256'; readonly index: number; } | { readonly kind: 'ansi16'; readonly index: number; } | { readonly kind: 'default'; }; /** * Text attributes as a bitmask (comparable by value, cheap to diff). * A const object, not a `const enum`, to stay compatible with `isolatedModules`. */ export declare const Attr: { readonly None: 0; readonly Bold: number; readonly Dim: number; readonly Italic: number; readonly Underline: number; readonly Inverse: number; readonly Strike: number; readonly Blink: number; }; /** An attribute bitmask value (combinable with bitwise OR). */ export type Attr = number; export declare const ESC = "\u001B"; /** Builds a CSI sequence (`ESC [ … `). e.g. csi("2J"), csi(`${y};${x}H`). */ export declare function csi(body: string): string; /** * Incremental SGR builder that emits ONLY the delta against the current state — * the key to minimizing bytes in the encoder (ARCHITECTURE §17). */ export interface SgrBuilder { transition(fg: AnsiColor, bg: AnsiColor, attrs: Attr): string; reset(): string; clear(): void; } export declare function createSgrBuilder(): SgrBuilder; //# sourceMappingURL=index.d.ts.map