UNPKG

gnablib

Version:

A lean, zero dependency library to provide a useful base for your project.

105 lines (104 loc) 3.52 kB
/*! Copyright 2023-2024 the gnablib contributors MPL-1.1 */ declare class StyleSet { readonly off: number; readonly on: number[]; protected constructor(off: number, on?: number[]); now(): string; } export declare class Ctrl { readonly end: string; readonly by: number[]; protected constructor(end: string, by: number[]); exec(): string; static up(by?: number): Ctrl; static down(by?: number): Ctrl; static right(by?: number): Ctrl; static left(by?: number): Ctrl; static jump(row?: number, col?: number): Ctrl; static get clearScreen_toEnd(): Ctrl; static get clearScreen_toStart(): Ctrl; static get clearScreen_all(): Ctrl; static get clearScreen_allAndScroll(): Ctrl; static get clearLine_toEnd(): Ctrl; static get clearLine_toStart(): Ctrl; static get clearLine_all(): Ctrl; } export declare class Underline extends StyleSet { protected constructor(on?: number); static get off(): Underline; static get single(): Underline; static get double(): Underline; } export declare class Weight extends StyleSet { protected constructor(on?: number); static get regular(): Weight; static get bold(): Weight; static get faint(): Weight; } export declare class LetterStyle extends StyleSet { protected constructor(on?: number); static get regular(): LetterStyle; static get italic(): Weight; static get gothic(): Weight; } export declare class Blink extends StyleSet { protected constructor(on?: number); static get none(): Blink; static get slow(): Blink; static get fast(): Blink; } export declare class Invert extends StyleSet { protected constructor(on?: number); static get off(): Invert; static get on(): Invert; } export declare class Hide extends StyleSet { protected constructor(on?: number); static get off(): Hide; static get on(): Hide; } export declare class StrikeThrough extends StyleSet { protected constructor(on?: number); static get off(): StrikeThrough; static get on(): StrikeThrough; } export declare class Overline extends StyleSet { protected constructor(on?: number); static get off(): Overline; static get on(): Overline; } export declare class Color extends StyleSet { protected constructor(on?: number[]); static get default(): Color; static get black(): Color; static get red(): Color; static get green(): Color; static get yellow(): Color; static get blue(): Color; static get magenta(): Color; static get cyan(): Color; static get white(): Color; static get gray(): Color; static grey24(value: number): Color; static rgb6(r: number, g: number, b: number): Color; static rgb(r: number, g: number, b: number): Color; } export declare class BgColor extends StyleSet { protected constructor(on?: number[]); static get default(): BgColor; static get black(): BgColor; static get red(): BgColor; static get green(): BgColor; static get yellow(): BgColor; static get blue(): BgColor; static get magenta(): BgColor; static get cyan(): BgColor; static get white(): BgColor; static grey24(value: number): BgColor; static rgb6(r: number, g: number, b: number): BgColor; static rgb(r: number, g: number, b: number): BgColor; } export declare function reset(): string; export declare function tty(strings: TemplateStringsArray, ...expressions: unknown[]): string; export declare function demo(): string; export {};