@visulima/ansi
Version:
ANSI escape codes for some terminal swag.
53 lines (52 loc) • 2.51 kB
TypeScript
/**
* Returns a Select Character Set (SCS) sequence that designates `charset` into
* one of the G0–G3 character-set slots.
*
* `gset` is one of the designator characters (see {@link G0}, {@link G1},
* {@link G2}, {@link G3} for 94-character sets, or `"-"`, `"."`, `"/"` for the
* 96-character G1–G3 slots). `charset` selects the final character of the set,
* e.g. {@link USASCII} (`"B"`), {@link DEC_SPECIAL_GRAPHICS} (`"0"`) or
* {@link UNITED_KINGDOM} (`"A"`).
*
* Sequence: `ESC gset charset`
* @param gset The G-set designator character.
* @param charset The final character identifying the character set.
* @returns The SCS escape sequence.
* @see {@link https://vt100.net/docs/vt510-rm/SCS.html}
*/
declare const selectCharacterSet: (gset: string, charset: string) => string;
/** Alias for {@link selectCharacterSet} (Select Character Set). */
declare const SCS: typeof selectCharacterSet;
/** G0 designator for a 94-character set. */
declare const G0: string;
/** G1 designator for a 94-character set. */
declare const G1: string;
/** G2 designator for a 94-character set. */
declare const G2: string;
/** G3 designator for a 94-character set. */
declare const G3: string;
/** DEC Special Character and Line Drawing Set (final character `0`). */
declare const DEC_SPECIAL_GRAPHICS: string;
/** United Kingdom character set (final character `A`). */
declare const UNITED_KINGDOM: string;
/** United States (USASCII) character set (final character `B`). */
declare const USASCII: string;
/** Locking Shift 0 (LS0 / SI): invoke G0 into GL. Sequence: `SI` (`\u000F`). */
declare const LS0: string;
/** Alias for {@link LS0} (Shift In). */
declare const SI: string;
/** Locking Shift 1 (LS1 / SO): invoke G1 into GL. Sequence: `SO` (`\u000E`). */
declare const LS1: string;
/** Alias for {@link LS1} (Shift Out). */
declare const SO: string;
/** Locking Shift 1 Right (LS1R): invoke G1 into GR. Sequence: `ESC ~`. */
declare const LS1R: string;
/** Locking Shift 2 (LS2): invoke G2 into GL. Sequence: `ESC n`. */
declare const LS2: string;
/** Locking Shift 2 Right (LS2R): invoke G2 into GR. Sequence: `ESC }`. */
declare const LS2R: string;
/** Locking Shift 3 (LS3): invoke G3 into GL. Sequence: `ESC o`. */
declare const LS3: string;
/** Locking Shift 3 Right (LS3R): invoke G3 into GR. Sequence: `ESC |`. */
declare const LS3R: string;
export { DEC_SPECIAL_GRAPHICS, G0, G1, G2, G3, LS0, LS1, LS1R, LS2, LS2R, LS3, LS3R, SCS, SI, SO, UNITED_KINGDOM, USASCII, selectCharacterSet };