UNPKG

dop-stick

Version:

Source control tooling for versionable-upgradeable smart contracts

119 lines 4.01 kB
export declare class Terminal { private static readonly ESC; private static readonly CSI; private static readonly ANSI_REGEX; static readonly colors: { readonly black: "\u001B[30m"; readonly red: "\u001B[31m"; readonly green: "\u001B[32m"; readonly yellow: "\u001B[33m"; readonly blue: "\u001B[34m"; readonly magenta: "\u001B[35m"; readonly cyan: "\u001B[36m"; readonly white: "\u001B[37m"; readonly brightBlack: "\u001B[90m"; readonly brightRed: "\u001B[91m"; readonly brightGreen: "\u001B[92m"; readonly brightYellow: "\u001B[93m"; readonly brightBlue: "\u001B[94m"; readonly brightMagenta: "\u001B[95m"; readonly brightCyan: "\u001B[96m"; readonly brightWhite: "\u001B[97m"; readonly reset: "\u001B[0m"; readonly bold: "\u001B[1m"; readonly dim: "\u001B[2m"; readonly italic: "\u001B[3m"; readonly underline: "\u001B[4m"; readonly success: "\u001B[32m"; readonly error: "\u001B[31m"; readonly warning: "\u001B[33m"; readonly info: "\u001B[90m"; readonly muted: "\u001B[90m"; readonly default: "\u001B[0m"; readonly matrix: (text: string) => string; readonly orange: "\u001B[38;5;208m"; readonly orangeBg: "\u001B[48;5;208m"; }; private static readonly capabilities; private static readonly chars; /** * Output Methods */ static write(text: string, newLine?: boolean, safe?: boolean): void; static clear(): void; static eraseLine(): void; /** * Styling Methods */ static style(text: string, color: string | string[]): string; static stripAnsi(text: string): string; /** * Cursor Control Methods */ static cursorTo(x: number, y?: number): void; static cursorUp(count?: number): void; static cursorDown(count?: number): void; static cursorForward(count?: number): void; static cursorBackward(count?: number): void; static cursorNextLine(count?: number): void; static cursorPrevLine(count?: number): void; static cursorHide(): void; static cursorShow(): void; static cursorSave(): void; static cursorRestore(): void; /** * Utility Methods */ static getChars(type: 'box' | 'spinner' | 'progress'): any; static supports(feature: keyof typeof Terminal.capabilities): boolean; static getWindowSize(): { columns: number; rows: number; }; static getContentWidth(margin?: number): number; private static hexToRgb; static writeLine(text: string): void; /** * Move cursor to specific position */ static moveCursor(dx: number, dy: number): void; /** * Clear the current line */ static clearLine(): void; /** * Clear everything from cursor down */ static clearScreenDown(): void; /** * Save cursor position */ static saveCursor(): void; /** * Restore cursor position */ static restoreCursor(): void; /** * Move cursor to start of line */ static cursorToLineStart(): void; static introStyles: { readonly elegant: (text: string) => string; readonly matrix: (text: string) => string; readonly wave: (text: string) => string; readonly sparkle: (text: string) => string; readonly minimal: (text: string) => string; readonly modern: (text: string) => string; readonly elegantBold: (text: string) => string; readonly matrixBright: (text: string) => string; readonly sparkleGlow: (text: string) => string; readonly baseWhite: (text: string) => string; }; /** * Prompts the user for input * @param question The prompt text to display * @returns Promise that resolves with user's input */ static prompt(question: string): Promise<string>; } //# sourceMappingURL=terminal.d.ts.map