/** * Screen and cursor control functionality * Port of github.com/muesli/termenv/screen.go */ import type { Color, Output } from './types.js'; /** * Terminal control sequences */ export declare const SEQUENCES: { readonly CursorUp: "\u001B[%dA"; readonly CursorDown: "\u001B[%dB"; readonly CursorForward: "\u001B[%dC"; readonly CursorBack: "\u001B[%dD"; readonly CursorNextLine: "\u001B[%dE"; readonly CursorPreviousLine: "\u001B[%dF"; readonly CursorHorizontalAbsolute: "\u001B[%dG"; readonly CursorPosition: "\u001B[%d;%dH"; readonly SaveCursorPosition: "\u001B7"; readonly RestoreCursorPosition: "\u001B8"; readonly HideCursor: "\u001B[?25l"; readonly ShowCursor: "\u001B[?25h"; readonly EraseDisplay: "\u001B[%dJ"; readonly EraseLine: "\u001B[%dK"; readonly AltScreen: "\u001B[?1049h"; readonly ExitAltScreen: "\u001B[?1049l"; readonly SaveScreen: "\u001B[?47h"; readonly RestoreScreen: "\u001B[?47l"; readonly Reset: "\u001Bc"; readonly EnableMouse: "\u001B[?1000h"; readonly DisableMouse: "\u001B[?1000l"; readonly EnableMousePress: "\u001B[?1000h"; readonly DisableMousePress: "\u001B[?1000l"; readonly EnableMouseHilite: "\u001B[?1001h"; readonly DisableMouseHilite: "\u001B[?1001l"; readonly EnableMouseCellMotion: "\u001B[?1002h"; readonly DisableMouseCellMotion: "\u001B[?1002l"; readonly EnableMouseAllMotion: "\u001B[?1003h"; readonly DisableMouseAllMotion: "\u001B[?1003l"; readonly EnableMouseExtendedMode: "\u001B[?1006h"; readonly DisableMouseExtendedMode: "\u001B[?1006l"; readonly EnableMousePixelsMode: "\u001B[?1016h"; readonly DisableMousePixelsMode: "\u001B[?1016l"; readonly EnableBracketedPaste: "\u001B[?2004h"; readonly DisableBracketedPaste: "\u001B[?2004l"; readonly ChangeScrollingRegion: "\u001B[%d;%dr"; readonly InsertLines: "\u001B[%dL"; readonly DeleteLines: "\u001B[%dM"; }; /** * Erase modes for EraseDisplay */ export declare enum EraseMode { EraseToEnd = 0, EraseToBeginning = 1, EraseEntireDisplay = 2, EraseSavedLines = 3 } /** * Erase modes for EraseLine */ export declare enum EraseLineMode { EraseToEnd = 0, EraseToBeginning = 1, EraseEntireLine = 2 } /** * Screen control functionality */ export declare class ScreenControl { private output; constructor(output: Output); moveCursor(row: number, column: number): this; cursorUp(n?: number): this; cursorDown(n?: number): this; cursorForward(n?: number): this; cursorBack(n?: number): this; cursorNextLine(n?: number): this; cursorPreviousLine(n?: number): this; saveCursorPosition(): this; restoreCursorPosition(): this; hideCursor(): this; showCursor(): this; clearScreen(): this; clearLine(): this; clearLines(n: number): this; altScreen(): this; exitAltScreen(): this; saveScreen(): this; restoreScreen(): this; reset(): this; setForegroundColor(color: Color): this; setBackgroundColor(color: Color): this; setCursorColor(color: Color): this; setWindowTitle(title: string): this; enableMouse(): this; disableMouse(): this; enableMousePress(): this; disableMousePress(): this; enableMouseHilite(): this; disableMouseHilite(): this; enableMouseCellMotion(): this; disableMouseCellMotion(): this; enableMouseAllMotion(): this; disableMouseAllMotion(): this; enableMouseExtendedMode(): this; disableMouseExtendedMode(): this; enableMousePixelsMode(): this; disableMousePixelsMode(): this; enableBracketedPaste(): this; disableBracketedPaste(): this; changeScrollingRegion(top: number, bottom: number): this; insertLines(n: number): this; deleteLines(n: number): this; } //# sourceMappingURL=screen.d.ts.map