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
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];
};
type ModifierName = keyof typeof modifierCodes;
type ForegroundColorName = keyof typeof colorCodes;
type BackgroundColorName = keyof typeof bgColorCodes;
type StyleName = ModifierName | ForegroundColorName | BackgroundColorName;
declare const modifierNames: ModifierName[];
declare const foregroundColorNames: ForegroundColorName[];
declare const backgroundColorNames: BackgroundColorName[];
/**
Named SGR styles as `{open, close}` escape sequence pairs.
*/
declare const styles: Record<StyleName, StylePair>;
/**
Raw SGR code numbers: open code → close code.
*/
declare const codes: ReadonlyMap<number, number>;
declare const foreground: {
  close: string;
  ansi: (code: number) => string;
  ansi256: (code: number) => string;
  ansi16m: (red: number, green: number, blue: number) => string;
};
declare const background: {
  close: string;
  ansi: (code: number) => string;
  ansi256: (code: number) => string;
  ansi16m: (red: number, green: number, blue: number) => string;
};
declare const rgbToAnsi256: (red: number, green: number, blue: number) => number;
declare const hexToRgb: (hex: string) => [number, number, number];
declare const hexToAnsi256: (hex: string) => number;
declare const ansi256ToAnsi: (code: number) => number;
declare const rgbToAnsi: (red: number, green: number, blue: number) => number;
declare const hexToAnsi: (hex: string) => number;
//#endregion
//#region src/ansi/chalk.d.ts
type StyleFunction = (text: string) => string;
type NamedStyles = Record<ModifierName | ForegroundColorName | BackgroundColorName, StyleFunction>;
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;
};
declare const chalk: Chalk;
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"));
```
*/
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;
};
declare const cliCursor: {
  show(writableStream?: CursorStream): void;
  hide(writableStream?: CursorStream): void;
};
//#endregion
//#region src/ansi/string-width.d.ts
declare const stringWidth: (input: string) => number;
declare const widestLine: (text: string) => number;
//#endregion
//#region src/ansi/east-asian-width.d.ts
type EastAsianWidthType = "ambiguous" | "fullwidth" | "halfwidth" | "narrow" | "neutral" | "wide";
declare const ambiguousMinimalCodePoint = 161;
declare const ambiguousMaximumCodePoint = 1114109;
declare const ambiguousRanges: readonly number[];
declare const fullwidthMinimalCodePoint = 12288;
declare const fullwidthMaximumCodePoint = 65510;
declare const fullwidthRanges: readonly number[];
declare const halfwidthMinimalCodePoint = 8361;
declare const halfwidthMaximumCodePoint = 65518;
declare const halfwidthRanges: readonly number[];
declare const narrowMinimalCodePoint = 32;
declare const narrowMaximumCodePoint = 10630;
declare const narrowRanges: readonly number[];
declare const wideMinimalCodePoint = 4352;
declare const wideMaximumCodePoint = 262141;
declare const wideRanges: readonly number[];
declare const isAmbiguous: (codePoint: number) => boolean;
declare const isFullWidth: (codePoint: number) => boolean;
declare const isWide: (codePoint: number) => boolean;
declare function getCategory(codePoint: number): EastAsianWidthType;
declare function eastAsianWidthType(codePoint: number): EastAsianWidthType;
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.
*/
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.
*/
declare const isWideNotCJKTNotEmoji: (x: number) => boolean;
declare function isFullwidthCodePoint(codePoint: number): boolean;
//#endregion
//#region src/ansi/strip.d.ts
declare const stripAnsi: (input: string) => string;
//#endregion
//#region src/ansi/slice.d.ts
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;
};
declare function wrapAnsi(string: string, columns: number, options?: WrapOptions): string;
//#endregion
export { AnsiCode, AnsiToken, BEL, BackgroundColorName, C1_CSI, C1_ST, CSI, CharToken, ClipboardSelection, ControlToken, CursorShape, DEL, ESC, EastAsianWidthType, ForegroundColorName, ModifierName, OSC, ST, StyleName, StylePair, StyledChar, TerminalProgressState, Token, ambiguousMaximumCodePoint, ambiguousMinimalCodePoint, ambiguousRanges, ansi256ToAnsi, ansiCodesToString, ansiEscapes, background, backgroundColorNames, bsu, chalk, clearClipboard, clearTerminal, cliCursor, codes, cursorColor, cursorDown, cursorHide, cursorLeft, cursorNextLine, cursorShape, cursorShow, cursorTo, cursorUp, diffAnsiCodes, disableBracketedPaste, eastAsianWidth, eastAsianWidthType, enableBracketedPaste, endCodesSet, enterAlternativeScreen, eraseEndLine, eraseLine, eraseLines, eraseScreen, esu, exitAlternativeScreen, foreground, foregroundColorNames, fullwidthMaximumCodePoint, fullwidthMinimalCodePoint, fullwidthRanges, getCategory, getEndCode, getLinkStartCode, halfwidthMaximumCodePoint, halfwidthMinimalCodePoint, halfwidthRanges, hexToAnsi, hexToAnsi256, hexToRgb, hyperlink, isAmbiguous, isFullWidth, isFullwidthCodePoint, isFullwidthGrapheme, isIntensityCode, isWide, isWideNotCJKTNotEmoji, kittyQuery, link, modifierNames, narrowMaximumCodePoint, narrowMinimalCodePoint, narrowRanges, notify, pasteEnd, pasteStart, popKittyKeyboard, pushKittyKeyboard, queryClipboard, reduceAnsiCodes, reduceAnsiCodesIncremental, resetCursorColor, rgbToAnsi, rgbToAnsi256, setClipboard, setPointerShape, setTerminalProgress, setWindowTitle, setWorkingDirectory, sliceAnsi, stringWidth, stripAnsi, styledCharsFromTokens, styledCharsToString, styles, supportsColor, tmuxPassthrough, tokenize, cliTruncate as truncateAnsi, undoAnsiCodes, wideMaximumCodePoint, wideMinimalCodePoint, wideRanges, widestLine, wrapAnsi };