type XenoColorPolicy = "auto" | "always" | "never"; type XenoColorDepth = 1 | 4 | 8 | 24; interface XenoAnsiPolicy { color: XenoColorPolicy; colorDepth?: XenoColorDepth; } interface XenoAnsiStyle { readonly open: string; readonly close: string; } type XenoAnsiFormatter = ((text: unknown) => string) & { readonly styles: readonly XenoAnsiStyle[]; }; type XenoAnsiEscapeFamily = "csi" | "osc" | "dcs" | "sos" | "pm" | "apc" | "single"; type XenoAnsiToken = { readonly kind: "text"; readonly value: string; } | { readonly kind: "escape"; readonly value: string; readonly family: XenoAnsiEscapeFamily; readonly final?: string; }; interface XenoAnsiWrapOptions { preserveStyles?: boolean; } declare const xenoAnsi: Readonly<{ bold: XenoAnsiFormatter; dim: XenoAnsiFormatter; italic: XenoAnsiFormatter; strikethrough: XenoAnsiFormatter; black: XenoAnsiFormatter; red: XenoAnsiFormatter; green: XenoAnsiFormatter; yellow: XenoAnsiFormatter; blue: XenoAnsiFormatter; magenta: XenoAnsiFormatter; cyan: XenoAnsiFormatter; white: XenoAnsiFormatter; gray: XenoAnsiFormatter; rgb: (red: number, green: number, blue: number) => XenoAnsiFormatter; bgRgb: (red: number, green: number, blue: number) => XenoAnsiFormatter; hex: (value: string) => XenoAnsiFormatter; bgHex: (value: string) => XenoAnsiFormatter; compose: (...formatters: readonly XenoAnsiFormatter[]) => XenoAnsiFormatter; format: (text: unknown, ...terminalStyles: XenoAnsiStyle[]) => string; }>; declare function configureXenoAnsi(policy: Partial): XenoAnsiPolicy; declare function resetXenoAnsiPolicy(): void; declare function parseXenoAnsi(value: string): XenoAnsiToken[]; declare function stripXenoAnsi(value: string): string; declare function xenoAnsiVisibleWidth(value: string): number; declare function clipXenoAnsi(value: string, columns: number, marker?: string): string; declare function wrapXenoAnsi(value: string, columns: number, options?: XenoAnsiWrapOptions): string[]; export { type XenoAnsiEscapeFamily, type XenoAnsiFormatter, type XenoAnsiPolicy, type XenoAnsiStyle, type XenoAnsiToken, type XenoAnsiWrapOptions, type XenoColorDepth, type XenoColorPolicy, clipXenoAnsi, configureXenoAnsi, parseXenoAnsi, resetXenoAnsiPolicy, stripXenoAnsi, wrapXenoAnsi, xenoAnsi, xenoAnsiVisibleWidth };