import { i as ColorSupportLevel } from "./detect-Db6GbKOm.js"; //#region src/screen/cell.d.ts /** A terminal color before it is converted to an output profile. */ type Color = RgbColor | IndexedColor; type RgbColor = { readonly model: "rgb"; readonly red: number; readonly green: number; readonly blue: number; readonly alpha: number; }; type IndexedColor = { readonly model: "indexed"; readonly index: number; /** Preserve an explicit palette encoding when compatibility requires it. */ readonly encoding?: "ansi16" | "ansi256"; }; /** Bit flags for terminal text attributes. Multiple attributes may be combined. */ declare const cellAttributes: { readonly none: 0; readonly bold: number; readonly faint: number; readonly italic: number; readonly blink: number; readonly rapidBlink: number; readonly inverse: number; readonly hidden: number; readonly strikethrough: number; }; type UnderlineStyle = "none" | "single" | "double" | "curly" | "dotted" | "dashed"; type CellStyle = { readonly foreground?: Color; readonly background?: Color; readonly underlineColor?: Color; readonly underline: UnderlineStyle; readonly attributes: number; }; type Hyperlink = { readonly url: string; readonly parameters?: string; }; type CellContent = { readonly grapheme: string; readonly width: number; }; /** A compositing operation for one screen position. An absent field is transparent and preserves the destination channel. `null` explicitly resets a color or hyperlink to the terminal default. Supplying `content` paints a grapheme; `{grapheme: " ", width: 1}` is therefore an explicit blank, while an absent patch paints nothing at all. */ type CellPatch = { readonly content?: CellContent; readonly foreground?: Color | null; readonly background?: Color | null; readonly underlineColor?: Color | null; readonly underline?: UnderlineStyle; readonly attributes?: number; readonly hyperlink?: Hyperlink | null; }; /** One grapheme cluster in a terminal screen. A width of zero is reserved for the continuation columns of a wide grapheme and is created only by `Screen`. */ type Cell = { readonly grapheme: string; readonly width: number; readonly style: CellStyle; readonly hyperlink?: Hyperlink; /** Composition intent consumed when this cell is drawn over another surface. */ readonly reset?: { readonly foreground?: boolean; readonly background?: boolean; }; }; declare const emptyCellStyle: CellStyle; declare const emptyCell: Cell; declare const createCell: (grapheme: string, width: number, style?: CellStyle, hyperlink?: Hyperlink, reset?: Cell["reset"]) => Cell; declare const cellsEqual: (left: Cell | undefined, right: Cell | undefined) => boolean; //#endregion //#region src/screen/color-profile.d.ts /** The color model emitted by a terminal serializer. */ type ColorProfile = "none" | "ansi16" | "ansi256" | "truecolor"; declare function colorProfileFromLevel(level: ColorSupportLevel): ColorProfile; /** Quantizes a semantic color for an output profile. `undefined` means the terminal default and is also the result for the no-color profile. */ declare function quantizeColor(color: Color | undefined, profile: ColorProfile): Color | undefined; //#endregion export { emptyCellStyle as _, CellContent as a, Color as c, RgbColor as d, UnderlineStyle as f, emptyCell as g, createCell as h, Cell as i, Hyperlink as l, cellsEqual as m, colorProfileFromLevel as n, CellPatch as o, cellAttributes as p, quantizeColor as r, CellStyle as s, ColorProfile as t, IndexedColor as u };