/**
 * ANSI / terminal-styling helpers.
 *
 * Replacements for the Bun-specific `Bun.color`, `Bun.stringWidth`,
 * and `Bun.stripANSI` APIs used by `tui.ts` and `banner.ts`.
 *
 * - `color(spec, mode)` returns the SGR (Select Graphic Rendition)
 *   escape that selects the given foreground color. Mirrors Bun's
 *   `Bun.color('cyan', 'ansi-16m')` /
 *   `Bun.color('#5C9CFF', 'ansi')` shape:
 *   - `mode: 'ansi-16m'` -> 24-bit truecolor (`\\x1b[38;2;R;G;Bm`).
 *     Wide compatibility on modern terminals.
 *   - `mode: 'ansi'`    -> 16-color palette
 *     (`\\x1b[3{0-7}m` / `\\x1b[9{0-7}m`). Use when the consumer
 *     needs to land on dumb terminals.
 *
 * - `stringWidth(s)` is re-exported from the `string-width` npm
 *   package. Inlining a correct implementation that handles emoji,
 *   CJK, ZWJ sequences, and ANSI escapes is ~150 lines of edge
 *   cases that the npm package already gets right.
 *
 * - `stripAnsi(s)` removes SGR (color/style) escape sequences. The
 *   CLI only feeds this with logger output, so SGR-only stripping
 *   suffices; we don't try to handle cursor or OSC codes.
 */
import stringWidthLib from 'string-width';
/** Re-export of the `string-width` npm package's default export. */
export declare const stringWidth: typeof stringWidthLib;
/** Color rendering modes accepted by `color()`. Mirrors `Bun.color`. */
export type ColorMode = 'ansi' | 'ansi-16m';
/**
 * Color spec: either a CSS named color (a small subset that the CLI
 * actually uses) or a `#RRGGBB` hex string.
 */
export type ColorSpec = NamedColor | `#${string}`;
/**
 * Return the SGR escape sequence that sets the foreground color to
 * `spec` in the requested rendering `mode`. Returns an empty string
 * if the spec cannot be resolved (rather than throwing) so callers
 * can use the result inline without nesting null checks.
 */
export declare function color(spec: ColorSpec, mode?: ColorMode): string;
/**
 * Strip SGR (color/style) escape sequences from `s`. Cursor /
 * OSC / DCS sequences are left in place; the CLI doesn't generate
 * them in places that flow through `stripAnsi`.
 */
export declare function stripAnsi(s: string): string;
/**
 * Subset of CSS named colors actually used by the CLI today. Each
 * carries both its RGB triple (for 24-bit mode) and its 16-color
 * SGR code (for `ansi` mode).
 *
 * If a future call site needs a color not listed here, add it to
 * this map rather than falling back to a hex literal at the call
 * site. Keeping the named-color list short is intentional.
 */
declare const NAMED_COLORS: {
    black: {
        rgb: {
            r: number;
            g: number;
            b: number;
        };
        ansi: number;
    };
    red: {
        rgb: {
            r: number;
            g: number;
            b: number;
        };
        ansi: number;
    };
    green: {
        rgb: {
            r: number;
            g: number;
            b: number;
        };
        ansi: number;
    };
    yellow: {
        rgb: {
            r: number;
            g: number;
            b: number;
        };
        ansi: number;
    };
    blue: {
        rgb: {
            r: number;
            g: number;
            b: number;
        };
        ansi: number;
    };
    magenta: {
        rgb: {
            r: number;
            g: number;
            b: number;
        };
        ansi: number;
    };
    cyan: {
        rgb: {
            r: number;
            g: number;
            b: number;
        };
        ansi: number;
    };
    white: {
        rgb: {
            r: number;
            g: number;
            b: number;
        };
        ansi: number;
    };
    gray: {
        rgb: {
            r: number;
            g: number;
            b: number;
        };
        ansi: number;
    };
};
type NamedColor = keyof typeof NAMED_COLORS;
export {};
//# sourceMappingURL=ansi.d.ts.map