import { i as ColorSupportLevel, n as ColorInfo } from "./detect-Db6GbKOm.js"; import { A as exitAlternativeScreen, C as enableBracketedPaste, D as eraseLines, E as eraseLine, F as popKittyKeyboard, I as pushKittyKeyboard, L as resetCursorColor, M as link, N as pasteEnd, O as eraseScreen, P as pasteStart, S as disableBracketedPaste, T as eraseEndLine, _ as cursorNextLine, a as CursorShape, b as cursorTo, c as OSC, d as bsu, f as clearTerminal, g as cursorLeft, h as cursorHide, i as CSI, j as kittyQuery, k as esu, l as ST, m as cursorDown, n as C1_CSI, o as DEL, p as cursorColor, r as C1_ST, s as ESC, t as BEL, u as ansiEscapes, v as cursorShape, w as enterAlternativeScreen, x as cursorUp, y as cursorShow } from "./escapes-CB_6CWOE.js"; import { a as queryClipboard, c as setTerminalProgress, d as tmuxPassthrough, i as notify, l as setWindowTitle, n as TerminalProgressState, o as setClipboard, r as clearClipboard, s as setPointerShape, t as ClipboardSelection, u as setWorkingDirectory } from "./osc-Cn0fw77g.js"; import { _ as tokenize, a as StyledChar, c as diffAnsiCodes, d as getLinkStartCode, f as isIntensityCode, g as styledCharsToString, h as styledCharsFromTokens, i as ControlToken, l as endCodesSet, m as reduceAnsiCodesIncremental, n as AnsiToken, o as Token, p as reduceAnsiCodes, r as CharToken, s as ansiCodesToString, t as AnsiCode, u as getEndCode, v as undoAnsiCodes } from "./tokenize-Dx1y_l5H.js"; //#region src/ansi/sgr.d.ts export type StylePair = { readonly open: string; readonly close: string; }; declare const modifierCodes: { readonly reset: readonly [0, 0]; readonly bold: readonly [1, 22]; readonly dim: readonly [2, 22]; readonly italic: readonly [3, 23]; readonly underline: readonly [4, 24]; readonly overline: readonly [53, 55]; readonly inverse: readonly [7, 27]; readonly hidden: readonly [8, 28]; readonly strikethrough: readonly [9, 29]; }; declare const colorCodes: { readonly black: readonly [30, 39]; readonly red: readonly [31, 39]; readonly green: readonly [32, 39]; readonly yellow: readonly [33, 39]; readonly blue: readonly [34, 39]; readonly magenta: readonly [35, 39]; readonly cyan: readonly [36, 39]; readonly white: readonly [37, 39]; readonly blackBright: readonly [90, 39]; readonly gray: readonly [90, 39]; readonly grey: readonly [90, 39]; readonly redBright: readonly [91, 39]; readonly greenBright: readonly [92, 39]; readonly yellowBright: readonly [93, 39]; readonly blueBright: readonly [94, 39]; readonly magentaBright: readonly [95, 39]; readonly cyanBright: readonly [96, 39]; readonly whiteBright: readonly [97, 39]; }; declare const bgColorCodes: { readonly bgBlack: readonly [40, 49]; readonly bgRed: readonly [41, 49]; readonly bgGreen: readonly [42, 49]; readonly bgYellow: readonly [43, 49]; readonly bgBlue: readonly [44, 49]; readonly bgMagenta: readonly [45, 49]; readonly bgCyan: readonly [46, 49]; readonly bgWhite: readonly [47, 49]; readonly bgBlackBright: readonly [100, 49]; readonly bgGray: readonly [100, 49]; readonly bgGrey: readonly [100, 49]; readonly bgRedBright: readonly [101, 49]; readonly bgGreenBright: readonly [102, 49]; readonly bgYellowBright: readonly [103, 49]; readonly bgBlueBright: readonly [104, 49]; readonly bgMagentaBright: readonly [105, 49]; readonly bgCyanBright: readonly [106, 49]; readonly bgWhiteBright: readonly [107, 49]; }; export type ModifierName = keyof typeof modifierCodes; export type ForegroundColorName = keyof typeof colorCodes; export type BackgroundColorName = keyof typeof bgColorCodes; export type StyleName = ModifierName | ForegroundColorName | BackgroundColorName; export declare const modifierNames: ModifierName[]; export declare const foregroundColorNames: ForegroundColorName[]; export declare const backgroundColorNames: BackgroundColorName[]; /** Named SGR styles as `{open, close}` escape sequence pairs. */ export declare const styles: Record; /** Raw SGR code numbers: open code → close code. */ export declare const codes: ReadonlyMap; export declare const foreground: { close: string; ansi: (code: number) => string; ansi256: (code: number) => string; ansi16m: (red: number, green: number, blue: number) => string; }; export declare const background: { close: string; ansi: (code: number) => string; ansi256: (code: number) => string; ansi16m: (red: number, green: number, blue: number) => string; }; export declare const rgbToAnsi256: (red: number, green: number, blue: number) => number; export declare const hexToRgb: (hex: string) => [number, number, number]; export declare const hexToAnsi256: (hex: string) => number; export declare const ansi256ToAnsi: (code: number) => number; export declare const rgbToAnsi: (red: number, green: number, blue: number) => number; export declare const hexToAnsi: (hex: string) => number; //#endregion //#region src/ansi/chalk.d.ts type StyleFunction = (text: string) => string; type NamedStyles = Record; type Chalk = NamedStyles & { level: ColorSupportLevel; hex: (color: string) => StyleFunction; bgHex: (color: string) => StyleFunction; rgb: (red: number, green: number, blue: number) => StyleFunction; bgRgb: (red: number, green: number, blue: number) => StyleFunction; ansi256: (code: number) => StyleFunction; bgAnsi256: (code: number) => StyleFunction; }; export declare const chalk: Chalk; export declare const supportsColor: ColorInfo; //#endregion //#region src/ansi/hyperlink.d.ts type HyperlinkOptions = { /** When the terminal does not support OSC 8 hyperlinks, append the URL in parentheses after the text so it stays reachable. Set to `false` to return the text alone. @default true */ fallback?: boolean; /** The stream the text will be written to, for support detection. @default process.stdout */ stream?: { isTTY?: boolean; }; }; /** Wraps text in a clickable OSC 8 hyperlink when the terminal supports it, falling back to `text (url)`. ```ts import { hyperlink } from "@alchemy.run/sigil/ansi"; console.log(hyperlink("Documentation", "https://example.com")); ``` */ export declare const hyperlink: (text: string, url: string, { fallback, stream }?: HyperlinkOptions) => string; //#endregion //#region src/ansi/cursor.d.ts type CursorStream = { isTTY?: boolean; write: (data: string) => unknown; }; export declare const cliCursor: { show(writableStream?: CursorStream): void; hide(writableStream?: CursorStream): void; }; //#endregion //#region src/ansi/string-width.d.ts export declare const stringWidth: (input: string) => number; export declare const widestLine: (text: string) => number; //#endregion //#region src/ansi/east-asian-width.d.ts export type EastAsianWidthType = "ambiguous" | "fullwidth" | "halfwidth" | "narrow" | "neutral" | "wide"; export declare const ambiguousMinimalCodePoint = 161; export declare const ambiguousMaximumCodePoint = 1114109; export declare const ambiguousRanges: readonly number[]; export declare const fullwidthMinimalCodePoint = 12288; export declare const fullwidthMaximumCodePoint = 65510; export declare const fullwidthRanges: readonly number[]; export declare const halfwidthMinimalCodePoint = 8361; export declare const halfwidthMaximumCodePoint = 65518; export declare const halfwidthRanges: readonly number[]; export declare const narrowMinimalCodePoint = 32; export declare const narrowMaximumCodePoint = 10630; export declare const narrowRanges: readonly number[]; export declare const wideMinimalCodePoint = 4352; export declare const wideMaximumCodePoint = 262141; export declare const wideRanges: readonly number[]; export declare const isAmbiguous: (codePoint: number) => boolean; export declare const isFullWidth: (codePoint: number) => boolean; export declare const isWide: (codePoint: number) => boolean; export declare function getCategory(codePoint: number): EastAsianWidthType; export declare function eastAsianWidthType(codePoint: number): EastAsianWidthType; export declare function eastAsianWidth(codePoint: number, { ambiguousAsWide }?: { ambiguousAsWide?: boolean; }): 1 | 2; /** Grapheme-cluster width test shared by the tokenizer (slice/clip path): the base code point's East Asian Width, plus emoji presentation rules. */ export declare function isFullwidthGrapheme(grapheme: string, baseCodePoint: number): boolean; /** Wide code points not covered by string-width's CJKT script regex or emoji regex — the fallback bucket of its block parser. A disjoint decomposition of the `wide` table above, kept alongside it so the width data lives in one module. */ export declare const isWideNotCJKTNotEmoji: (x: number) => boolean; export declare function isFullwidthCodePoint(codePoint: number): boolean; //#endregion //#region src/ansi/strip.d.ts export declare const stripAnsi: (input: string) => string; //#endregion //#region src/ansi/slice.d.ts export declare function sliceAnsi(string: string, start: number, end?: number): string; //#endregion //#region src/ansi/truncate.d.ts type TruncateOptions = { readonly position?: "start" | "middle" | "end"; readonly space?: boolean; readonly preferTruncationOnSpace?: boolean; readonly truncationCharacter?: string; }; declare function cliTruncate(text: string, columns: number, options?: TruncateOptions): string; //#endregion //#region src/ansi/wrap.d.ts type WrapOptions = { readonly trim?: boolean; readonly hard?: boolean; readonly wordWrap?: boolean; }; export declare function wrapAnsi(string: string, columns: number, options?: WrapOptions): string; //#endregion export { AnsiCode, AnsiToken, BEL, C1_CSI, C1_ST, CSI, CharToken, ClipboardSelection, ControlToken, CursorShape, DEL, ESC, OSC, ST, StyledChar, TerminalProgressState, Token, ansiCodesToString, ansiEscapes, bsu, clearClipboard, clearTerminal, cursorColor, cursorDown, cursorHide, cursorLeft, cursorNextLine, cursorShape, cursorShow, cursorTo, cursorUp, diffAnsiCodes, disableBracketedPaste, enableBracketedPaste, endCodesSet, enterAlternativeScreen, eraseEndLine, eraseLine, eraseLines, eraseScreen, esu, exitAlternativeScreen, getEndCode, getLinkStartCode, isIntensityCode, kittyQuery, link, notify, pasteEnd, pasteStart, popKittyKeyboard, pushKittyKeyboard, queryClipboard, reduceAnsiCodes, reduceAnsiCodesIncremental, resetCursorColor, setClipboard, setPointerShape, setTerminalProgress, setWindowTitle, setWorkingDirectory, styledCharsFromTokens, styledCharsToString, tmuxPassthrough, tokenize, cliTruncate as truncateAnsi, undoAnsiCodes };