console-toolkit 1.2.9 → 1.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +74 -29
- package/llms-full.txt +429 -0
- package/llms.txt +80 -0
- package/package.json +29 -7
- package/src/alphanumeric/arrows.d.ts +48 -0
- package/src/alphanumeric/arrows.js +23 -0
- package/src/alphanumeric/fractions.d.ts +65 -0
- package/src/alphanumeric/fractions.js +49 -0
- package/src/alphanumeric/number-formatters.d.ts +91 -0
- package/src/alphanumeric/number-formatters.js +45 -1
- package/src/alphanumeric/roman.d.ts +15 -0
- package/src/alphanumeric/roman.js +12 -0
- package/src/alphanumeric/unicode-cultural-numbers.d.ts +65 -0
- package/src/alphanumeric/unicode-cultural-numbers.js +1 -0
- package/src/alphanumeric/unicode-letters.d.ts +32 -0
- package/src/alphanumeric/unicode-letters.js +8 -0
- package/src/alphanumeric/unicode-numbers.d.ts +44 -0
- package/src/alphanumeric/unicode-numbers.js +21 -0
- package/src/alphanumeric/utils.d.ts +45 -0
- package/src/alphanumeric/utils.js +26 -0
- package/src/ansi/csi.d.ts +141 -0
- package/src/ansi/csi.js +51 -2
- package/src/ansi/index.d.ts +26 -0
- package/src/ansi/sgr-constants.d.ts +173 -0
- package/src/ansi/sgr-state.d.ts +91 -0
- package/src/ansi/sgr-state.js +45 -0
- package/src/ansi/sgr.d.ts +587 -0
- package/src/ansi/sgr.js +426 -6
- package/src/box.d.ts +160 -0
- package/src/box.js +113 -12
- package/src/charts/bars/block-frac-grouped.d.ts +12 -0
- package/src/charts/bars/block-frac-grouped.js +6 -0
- package/src/charts/bars/block-frac.d.ts +34 -0
- package/src/charts/bars/block-frac.js +13 -0
- package/src/charts/bars/block-grouped.d.ts +12 -0
- package/src/charts/bars/block-grouped.js +6 -0
- package/src/charts/bars/block.d.ts +43 -0
- package/src/charts/bars/block.js +13 -0
- package/src/charts/bars/draw-grouped.d.ts +46 -0
- package/src/charts/bars/draw-grouped.js +4 -0
- package/src/charts/bars/draw-stacked.d.ts +52 -0
- package/src/charts/bars/draw-stacked.js +4 -0
- package/src/charts/bars/frac-grouped.d.ts +32 -0
- package/src/charts/bars/frac-grouped.js +13 -0
- package/src/charts/bars/plain-grouped.d.ts +12 -0
- package/src/charts/bars/plain-grouped.js +6 -0
- package/src/charts/bars/plain.d.ts +85 -0
- package/src/charts/bars/plain.js +27 -0
- package/src/charts/columns/block-frac-grouped.d.ts +12 -0
- package/src/charts/columns/block-frac-grouped.js +6 -0
- package/src/charts/columns/block-frac.d.ts +39 -0
- package/src/charts/columns/block-frac.js +13 -0
- package/src/charts/columns/block-grouped.d.ts +12 -0
- package/src/charts/columns/block-grouped.js +6 -0
- package/src/charts/columns/block.d.ts +43 -0
- package/src/charts/columns/block.js +13 -0
- package/src/charts/columns/draw-grouped.d.ts +46 -0
- package/src/charts/columns/draw-grouped.js +4 -0
- package/src/charts/columns/draw-stacked.d.ts +44 -0
- package/src/charts/columns/draw-stacked.js +4 -0
- package/src/charts/columns/frac-grouped.d.ts +37 -0
- package/src/charts/columns/frac-grouped.js +13 -0
- package/src/charts/columns/plain-grouped.d.ts +12 -0
- package/src/charts/columns/plain-grouped.js +6 -0
- package/src/charts/columns/plain.d.ts +32 -0
- package/src/charts/columns/plain.js +13 -0
- package/src/charts/themes/default.d.ts +6 -0
- package/src/charts/themes/default.js +1 -0
- package/src/charts/themes/rainbow-reversed.d.ts +6 -0
- package/src/charts/themes/rainbow-reversed.js +2 -1
- package/src/charts/themes/rainbow.d.ts +6 -0
- package/src/charts/themes/rainbow.js +1 -0
- package/src/charts/utils.d.ts +79 -0
- package/src/charts/utils.js +32 -4
- package/src/draw-block-frac.d.ts +16 -0
- package/src/draw-block-frac.js +14 -0
- package/src/draw-block.d.ts +43 -0
- package/src/draw-block.js +25 -1
- package/src/meta.d.ts +84 -0
- package/src/meta.js +64 -0
- package/src/output/show.d.ts +55 -0
- package/src/output/show.js +28 -0
- package/src/output/updater.d.ts +114 -0
- package/src/output/updater.js +58 -4
- package/src/output/writer.d.ts +87 -0
- package/src/output/writer.js +57 -5
- package/src/panel.d.ts +402 -0
- package/src/panel.js +219 -5
- package/src/plot/bitmap.d.ts +80 -0
- package/src/plot/bitmap.js +33 -4
- package/src/plot/draw-line.d.ts +13 -0
- package/src/plot/draw-line.js +8 -0
- package/src/plot/draw-rect.d.ts +13 -0
- package/src/plot/draw-rect.js +38 -30
- package/src/plot/index.d.ts +39 -0
- package/src/plot/index.js +22 -0
- package/src/plot/to-quads.d.ts +10 -0
- package/src/plot/to-quads.js +5 -0
- package/src/spinner/index.d.ts +4 -0
- package/src/spinner/index.js +0 -2
- package/src/spinner/spin.d.ts +13 -0
- package/src/spinner/spin.js +13 -2
- package/src/spinner/spinner.d.ts +69 -0
- package/src/spinner/spinner.js +30 -2
- package/src/spinner/spinners.d.ts +34 -0
- package/src/spinner/spinners.js +23 -9
- package/src/strings/clip.d.ts +21 -0
- package/src/strings/clip.js +10 -0
- package/src/strings/parse.d.ts +23 -0
- package/src/strings/parse.js +7 -0
- package/src/strings/split.d.ts +38 -0
- package/src/strings/split.js +15 -0
- package/src/strings.d.ts +44 -0
- package/src/strings.js +34 -4
- package/src/style.d.ts +462 -0
- package/src/style.js +58 -4
- package/src/symbols.d.ts +167 -0
- package/src/symbols.js +91 -7
- package/src/table/draw-borders.d.ts +38 -0
- package/src/table/draw-borders.js +10 -2
- package/src/table/index.d.ts +8 -0
- package/src/table/index.js +1 -0
- package/src/table/table.d.ts +239 -0
- package/src/table/table.js +59 -1
- package/src/themes/blocks/unicode-half.d.ts +6 -0
- package/src/themes/blocks/unicode-half.js +1 -0
- package/src/themes/blocks/unicode-thin.d.ts +6 -0
- package/src/themes/blocks/unicode-thin.js +1 -0
- package/src/themes/lines/ascii-compact.d.ts +6 -0
- package/src/themes/lines/ascii-compact.js +1 -0
- package/src/themes/lines/ascii-dots.d.ts +6 -0
- package/src/themes/lines/ascii-dots.js +1 -0
- package/src/themes/lines/ascii-girder.d.ts +6 -0
- package/src/themes/lines/ascii-girder.js +1 -0
- package/src/themes/lines/ascii-github.d.ts +6 -0
- package/src/themes/lines/ascii-github.js +1 -0
- package/src/themes/lines/ascii-reddit.d.ts +6 -0
- package/src/themes/lines/ascii-reddit.js +1 -0
- package/src/themes/lines/ascii-rounded.d.ts +6 -0
- package/src/themes/lines/ascii-rounded.js +1 -0
- package/src/themes/lines/ascii.d.ts +6 -0
- package/src/themes/lines/ascii.js +1 -0
- package/src/themes/lines/unicode-bold.d.ts +6 -0
- package/src/themes/lines/unicode-bold.js +1 -0
- package/src/themes/lines/unicode-rounded.d.ts +6 -0
- package/src/themes/lines/unicode-rounded.js +1 -0
- package/src/themes/lines/unicode.d.ts +6 -0
- package/src/themes/lines/unicode.js +1 -0
- package/src/themes/utils.d.ts +33 -0
- package/src/themes/utils.js +7 -0
- package/src/turtle/draw-line-art.d.ts +19 -0
- package/src/turtle/draw-line-art.js +7 -0
- package/src/turtle/draw-unicode.d.ts +19 -0
- package/src/turtle/draw-unicode.js +8 -0
- package/src/turtle/index.d.ts +21 -0
- package/src/turtle/index.js +8 -0
- package/src/turtle/turtle.d.ts +269 -0
- package/src/turtle/turtle.js +124 -4
|
@@ -5,6 +5,7 @@ const range = (fromCapital, fromSmall) =>
|
|
|
5
5
|
x => x
|
|
6
6
|
);
|
|
7
7
|
|
|
8
|
+
/** Transcode tables for mathematical and decorative letter styles. */
|
|
8
9
|
export const transcodeTables = {
|
|
9
10
|
bold: range('\u{1D400}', '\u{1D41A}'),
|
|
10
11
|
italic: range('\u{1D434}', '\u{1D44E}'),
|
|
@@ -56,6 +57,13 @@ transcodeTables.script[1].overlay = {e: '\u{212F}', g: '\u{210A}', o: '\u{2134}'
|
|
|
56
57
|
|
|
57
58
|
// API
|
|
58
59
|
|
|
60
|
+
/** Transcodes a string to a Unicode letter style.
|
|
61
|
+
* @param {string} s - The string to transcode.
|
|
62
|
+
* @param {string|import('./utils.js').SymbolRange[]} name - Style name (key of `transcodeTables`) or an array of SymbolRanges.
|
|
63
|
+
* @param {object} [options] - Options.
|
|
64
|
+
* @param {string} [options.missing] - Replacement for unmapped characters.
|
|
65
|
+
* @returns {string} The transcoded string.
|
|
66
|
+
*/
|
|
59
67
|
export const transcode = (s, name, options) => {
|
|
60
68
|
let tables = typeof name == 'string' ? transcodeTables[name] : name;
|
|
61
69
|
if (!tables) throw new Error(`There is no transcode table "${name}"`);
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import {SymbolRange} from './utils.js';
|
|
2
|
+
|
|
3
|
+
/** Transcode tables for Unicode number styles and embellishments. */
|
|
4
|
+
export const transcodeTables: {
|
|
5
|
+
circled: SymbolRange;
|
|
6
|
+
parens: SymbolRange;
|
|
7
|
+
dots: SymbolRange;
|
|
8
|
+
doubleCircled: SymbolRange;
|
|
9
|
+
bold: SymbolRange;
|
|
10
|
+
doubleStruck: SymbolRange;
|
|
11
|
+
sansSerif: SymbolRange;
|
|
12
|
+
sansSerifBold: SymbolRange;
|
|
13
|
+
mono: SymbolRange;
|
|
14
|
+
commas: SymbolRange;
|
|
15
|
+
roman: SymbolRange;
|
|
16
|
+
romanLower: SymbolRange;
|
|
17
|
+
dingbatsCircledSansSerif: SymbolRange;
|
|
18
|
+
dingbatsNegativeCircled: SymbolRange;
|
|
19
|
+
dingbatsNegativeCircledSansSerif: SymbolRange;
|
|
20
|
+
superscript: SymbolRange;
|
|
21
|
+
subscript: SymbolRange;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** Transcodes a string of digits to a Unicode number style.
|
|
25
|
+
* @param s - The digit string to transcode.
|
|
26
|
+
* @param name - Style name (key of `transcodeTables`) or a SymbolRange.
|
|
27
|
+
* @param options - Options.
|
|
28
|
+
* @returns The transcoded string.
|
|
29
|
+
*/
|
|
30
|
+
export function transcode(s: string, name: string | SymbolRange, options?: {missing?: string}): string;
|
|
31
|
+
|
|
32
|
+
/** Replaces digit-punctuation pairs with Unicode enclosed digits.
|
|
33
|
+
* @param s - The string containing digits with commas/dots.
|
|
34
|
+
* @param options - Options for surrounding text.
|
|
35
|
+
* @returns The string with Unicode punctuation replacements.
|
|
36
|
+
*/
|
|
37
|
+
export function numberPunctuation(s: string, options?: {addBefore?: string; addAfter?: string}): string;
|
|
38
|
+
|
|
39
|
+
/** Converts scientific notation to Unicode superscript exponent form.
|
|
40
|
+
* @param s - The number string in scientific notation (e.g., '1.5e10').
|
|
41
|
+
* @param options - Options.
|
|
42
|
+
* @returns The formatted string with Unicode superscripts.
|
|
43
|
+
*/
|
|
44
|
+
export function numberExponent(s: string, options?: {useSpecialMinus?: boolean}): string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {SymbolRange, transcode as internalTranscode} from './utils.js';
|
|
2
2
|
import {minus, multiplication, superscriptPlus, superscriptMinus} from '../symbols.js';
|
|
3
3
|
|
|
4
|
+
/** Transcode tables for Unicode number styles and embellishments. */
|
|
4
5
|
export const transcodeTables = {
|
|
5
6
|
// Enclosed Alphanumeric
|
|
6
7
|
circled: new SymbolRange('①', 1, 20),
|
|
@@ -50,18 +51,38 @@ transcodeTables.superscript.overlay = {1: '¹', 2: '²', 3: '³'};
|
|
|
50
51
|
|
|
51
52
|
// API
|
|
52
53
|
|
|
54
|
+
/** Transcodes a string of digits to a Unicode number style.
|
|
55
|
+
* @param {string} s - The digit string to transcode.
|
|
56
|
+
* @param {string|import('./utils.js').SymbolRange} name - Style name (key of `transcodeTables`) or a SymbolRange.
|
|
57
|
+
* @param {object} [options] - Options.
|
|
58
|
+
* @param {string} [options.missing] - Replacement for unmapped characters.
|
|
59
|
+
* @returns {string} The transcoded string.
|
|
60
|
+
*/
|
|
53
61
|
export const transcode = (s, name, options) => {
|
|
54
62
|
const table = typeof name == 'string' ? transcodeTables[name] : name;
|
|
55
63
|
if (!table) throw new Error(`There is no transcode table "${name}"`);
|
|
56
64
|
return internalTranscode(s, table, options);
|
|
57
65
|
};
|
|
58
66
|
|
|
67
|
+
/** Replaces digit-punctuation pairs with Unicode enclosed digits.
|
|
68
|
+
* @param {string} s - The string containing digits with commas/dots.
|
|
69
|
+
* @param {object} [options] - Options for surrounding text.
|
|
70
|
+
* @param {string} [options.addBefore=''] - String to add before a digit.
|
|
71
|
+
* @param {string} [options.addAfter=' '] - String to add after a digit.
|
|
72
|
+
* @returns {string} The string with Unicode punctuation replacements.
|
|
73
|
+
*/
|
|
59
74
|
export const numberPunctuation = (s, {addBefore = '', addAfter = ' '} = {}) =>
|
|
60
75
|
s.replace(
|
|
61
76
|
/(\d)([\,\.])/g,
|
|
62
77
|
(_, d, p) => addBefore + transcodeTables[p === '.' ? 'dots' : 'commas'].transcode(d) + addAfter
|
|
63
78
|
);
|
|
64
79
|
|
|
80
|
+
/** Converts scientific notation to Unicode superscript exponent form.
|
|
81
|
+
* @param {string} s - The number string in scientific notation (e.g., '1.5e10').
|
|
82
|
+
* @param {object} [options] - Options.
|
|
83
|
+
* @param {boolean} [options.useSpecialMinus] - If true, use a special math minus symbol.
|
|
84
|
+
* @returns {string} The formatted string with Unicode superscripts.
|
|
85
|
+
*/
|
|
65
86
|
export const numberExponent = (s, {useSpecialMinus} = {}) => {
|
|
66
87
|
const r = /^([+-]?)([^e]+)e([+-]?)(.+)$/i.exec(s);
|
|
67
88
|
return r
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Maps a range of numeric values to Unicode code points for transcoding digits/letters. */
|
|
2
|
+
export class SymbolRange {
|
|
3
|
+
/** Start of the numeric range. */
|
|
4
|
+
from: number;
|
|
5
|
+
/** End of the numeric range (inclusive). */
|
|
6
|
+
to: number;
|
|
7
|
+
/** Unicode code point base offset. */
|
|
8
|
+
base: number;
|
|
9
|
+
/** Code point of the input character corresponding to 0. */
|
|
10
|
+
inputBase: number;
|
|
11
|
+
/** Optional overlay for custom symbol replacements. */
|
|
12
|
+
overlay: SymbolRange | Record<string, string> | null;
|
|
13
|
+
|
|
14
|
+
/** Creates a new SymbolRange.
|
|
15
|
+
* @param fromSymbol - The Unicode character corresponding to the `from` value.
|
|
16
|
+
* @param from - Start of the range (default: 0).
|
|
17
|
+
* @param to - End of the range inclusive (default: 9).
|
|
18
|
+
* @param inputBase - The input character corresponding to 0 (default: '0').
|
|
19
|
+
*/
|
|
20
|
+
constructor(fromSymbol: string, from?: number, to?: number, inputBase?: string);
|
|
21
|
+
|
|
22
|
+
/** Gets the transcoded symbol for a value or character.
|
|
23
|
+
* @param i - Numeric index or input character.
|
|
24
|
+
* @returns The transcoded symbol, or `false` if out of range.
|
|
25
|
+
*/
|
|
26
|
+
get(i: number | string): string | false;
|
|
27
|
+
/** Transcodes a string by replacing each character with its mapped symbol.
|
|
28
|
+
* @param s - The string to transcode.
|
|
29
|
+
* @param options - Options.
|
|
30
|
+
* @returns The transcoded string.
|
|
31
|
+
*/
|
|
32
|
+
transcode(s: string, options?: {missing?: string}): string;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** Transcodes a string using one or more lookup tables.
|
|
36
|
+
* @param s - The string to transcode.
|
|
37
|
+
* @param tables - A function, SymbolRange, array of SymbolRanges, or a plain mapping object.
|
|
38
|
+
* @param options - Options.
|
|
39
|
+
* @returns The transcoded string.
|
|
40
|
+
*/
|
|
41
|
+
export function transcode(
|
|
42
|
+
s: string,
|
|
43
|
+
tables: ((m: string) => string | undefined) | SymbolRange | SymbolRange[] | Record<string, string>,
|
|
44
|
+
options?: {missing?: string}
|
|
45
|
+
): string;
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
/** Maps a range of numeric values to Unicode code points for transcoding digits/letters.
|
|
2
|
+
* Supports overlays for custom symbol replacements.
|
|
3
|
+
*/
|
|
1
4
|
export class SymbolRange {
|
|
5
|
+
/**
|
|
6
|
+
* @param {string} fromSymbol - The Unicode character corresponding to the `from` value.
|
|
7
|
+
* @param {number} [from=0] - Start of the range.
|
|
8
|
+
* @param {number} [to=9] - End of the range (inclusive).
|
|
9
|
+
* @param {string} [inputBase='0'] - The input character corresponding to 0.
|
|
10
|
+
*/
|
|
2
11
|
constructor(fromSymbol, from = 0, to = 9, inputBase = '0') {
|
|
3
12
|
this.from = from;
|
|
4
13
|
this.to = to;
|
|
@@ -6,6 +15,10 @@ export class SymbolRange {
|
|
|
6
15
|
this.inputBase = inputBase.codePointAt(0);
|
|
7
16
|
this.overlay = null;
|
|
8
17
|
}
|
|
18
|
+
/** Gets the transcoded symbol for a value or character.
|
|
19
|
+
* @param {number|string} i - Numeric index or input character.
|
|
20
|
+
* @returns {string|false} The transcoded symbol, or false if out of range.
|
|
21
|
+
*/
|
|
9
22
|
get(i) {
|
|
10
23
|
if (this.overlay) {
|
|
11
24
|
const result =
|
|
@@ -19,11 +32,24 @@ export class SymbolRange {
|
|
|
19
32
|
}
|
|
20
33
|
return this.from <= i && i <= this.to && String.fromCodePoint(this.base + i);
|
|
21
34
|
}
|
|
35
|
+
/** Transcodes a string by replacing each character with its mapped symbol.
|
|
36
|
+
* @param {string} s - The string to transcode.
|
|
37
|
+
* @param {object} [options] - Options.
|
|
38
|
+
* @param {string} [options.missing] - Replacement for unmapped characters.
|
|
39
|
+
* @returns {string} The transcoded string.
|
|
40
|
+
*/
|
|
22
41
|
transcode(s, {missing} = {}) {
|
|
23
42
|
return s.replace(/./g, missing ? m => this.get(m) || missing : m => this.get(m) || m);
|
|
24
43
|
}
|
|
25
44
|
}
|
|
26
45
|
|
|
46
|
+
/** Transcodes a string using one or more lookup tables.
|
|
47
|
+
* @param {string} s - The string to transcode.
|
|
48
|
+
* @param {Function|object|Array} tables - A function, object, SymbolRange, or array of them.
|
|
49
|
+
* @param {object} [options] - Options.
|
|
50
|
+
* @param {string} [options.missing] - Replacement for unmapped characters.
|
|
51
|
+
* @returns {string} The transcoded string.
|
|
52
|
+
*/
|
|
27
53
|
export const transcode = (s, tables, {missing} = {}) => {
|
|
28
54
|
let fn;
|
|
29
55
|
if (typeof tables == 'function') {
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
export * from './sgr.js';
|
|
2
|
+
|
|
3
|
+
/** RegExp matching CSI (Control Sequence Introducer) escape sequences. */
|
|
4
|
+
export const matchCsi: RegExp;
|
|
5
|
+
|
|
6
|
+
/** Moves cursor up 1 row. */
|
|
7
|
+
export const CURSOR_UP1: string;
|
|
8
|
+
/** Moves cursor down 1 row. */
|
|
9
|
+
export const CURSOR_DOWN1: string;
|
|
10
|
+
/** Moves cursor forward 1 column. */
|
|
11
|
+
export const CURSOR_FORWARD1: string;
|
|
12
|
+
/** Moves cursor back 1 column. */
|
|
13
|
+
export const CURSOR_BACK1: string;
|
|
14
|
+
/** Moves cursor to beginning of next line. */
|
|
15
|
+
export const CURSOR_NEXT_LINE1: string;
|
|
16
|
+
/** Moves cursor to beginning of previous line. */
|
|
17
|
+
export const CURSOR_PREV_LINE1: string;
|
|
18
|
+
/** Moves cursor to column 1. */
|
|
19
|
+
export const CURSOR_COLUMN1: string;
|
|
20
|
+
/** Moves cursor to home position (1,1). */
|
|
21
|
+
export const CURSOR_HOME: string;
|
|
22
|
+
|
|
23
|
+
/** Requests cursor position report. */
|
|
24
|
+
export const CURSOR_GET_POS: string;
|
|
25
|
+
/** Saves cursor position. */
|
|
26
|
+
export const CURSOR_SAVE_POS: string;
|
|
27
|
+
/** Restores saved cursor position. */
|
|
28
|
+
export const CURSOR_RESTORE_POS: string;
|
|
29
|
+
/** Shows the cursor. */
|
|
30
|
+
export const CURSOR_NORMAL: string;
|
|
31
|
+
/** Hides the cursor. */
|
|
32
|
+
export const CURSOR_INVISIBLE: string;
|
|
33
|
+
|
|
34
|
+
/** Moves the cursor up by `n` rows.
|
|
35
|
+
* @param n - Number of rows (default: 1).
|
|
36
|
+
* @returns CSI escape sequence.
|
|
37
|
+
*/
|
|
38
|
+
export function cursorUp(n?: number): string;
|
|
39
|
+
/** Moves the cursor down by `n` rows.
|
|
40
|
+
* @param n - Number of rows (default: 1).
|
|
41
|
+
* @returns CSI escape sequence.
|
|
42
|
+
*/
|
|
43
|
+
export function cursorDown(n?: number): string;
|
|
44
|
+
/** Moves the cursor forward by `n` columns.
|
|
45
|
+
* @param n - Number of columns (default: 1).
|
|
46
|
+
* @returns CSI escape sequence.
|
|
47
|
+
*/
|
|
48
|
+
export function cursorForward(n?: number): string;
|
|
49
|
+
/** Moves the cursor back by `n` columns.
|
|
50
|
+
* @param n - Number of columns (default: 1).
|
|
51
|
+
* @returns CSI escape sequence.
|
|
52
|
+
*/
|
|
53
|
+
export function cursorBack(n?: number): string;
|
|
54
|
+
/** Moves cursor to beginning of line `n` lines down.
|
|
55
|
+
* @param n - Number of lines (default: 1).
|
|
56
|
+
* @returns CSI escape sequence.
|
|
57
|
+
*/
|
|
58
|
+
export function cursorNextLine(n?: number): string;
|
|
59
|
+
/** Moves cursor to beginning of line `n` lines up.
|
|
60
|
+
* @param n - Number of lines (default: 1).
|
|
61
|
+
* @returns CSI escape sequence.
|
|
62
|
+
*/
|
|
63
|
+
export function cursorPrevLine(n?: number): string;
|
|
64
|
+
/** Moves cursor to column `n`.
|
|
65
|
+
* @param n - Column number (default: 1).
|
|
66
|
+
* @returns CSI escape sequence.
|
|
67
|
+
*/
|
|
68
|
+
export function cursorColumn(n?: number): string;
|
|
69
|
+
/** Sets the cursor to row `n`, column `m` (1-based).
|
|
70
|
+
* @param n - Row.
|
|
71
|
+
* @param m - Column.
|
|
72
|
+
* @returns CSI escape sequence.
|
|
73
|
+
*/
|
|
74
|
+
export function cursorSetPos(n: number, m: number): string;
|
|
75
|
+
/** Sets the cursor position (alternative sequence).
|
|
76
|
+
* @param n - Row.
|
|
77
|
+
* @param m - Column.
|
|
78
|
+
* @returns CSI escape sequence.
|
|
79
|
+
*/
|
|
80
|
+
export function cursorSetPosAlt(n: number, m: number): string;
|
|
81
|
+
|
|
82
|
+
/** Alias for CURSOR_FORWARD1. */
|
|
83
|
+
export const CURSOR_RIGHT1: string;
|
|
84
|
+
/** Alias for CURSOR_BACK1. */
|
|
85
|
+
export const CURSOR_LEFT1: string;
|
|
86
|
+
/** Alias for cursorForward. */
|
|
87
|
+
export const cursorRight: typeof cursorForward;
|
|
88
|
+
/** Alias for cursorBack. */
|
|
89
|
+
export const cursorLeft: typeof cursorBack;
|
|
90
|
+
|
|
91
|
+
/** Clears from cursor to end of screen. */
|
|
92
|
+
export const CLEAR_EOS: string;
|
|
93
|
+
/** Clears from cursor to beginning of screen. */
|
|
94
|
+
export const CLEAR_BOS: string;
|
|
95
|
+
/** Clears the entire screen. */
|
|
96
|
+
export const CLEAR_SCREEN: string;
|
|
97
|
+
/** Clears the entire screen and scrollback buffer. */
|
|
98
|
+
export const CLEAR_SCREEN_ALL: string;
|
|
99
|
+
/** Clears from cursor to end of line. */
|
|
100
|
+
export const CLEAR_EOL: string;
|
|
101
|
+
/** Clears from cursor to beginning of line. */
|
|
102
|
+
export const CLEAR_BOL: string;
|
|
103
|
+
/** Clears the entire line. */
|
|
104
|
+
export const CLEAR_LINE: string;
|
|
105
|
+
|
|
106
|
+
/** Saves the screen state. */
|
|
107
|
+
export const SCREEN_SAVE: string;
|
|
108
|
+
/** Restores the screen state. */
|
|
109
|
+
export const SCREEN_RESTORE: string;
|
|
110
|
+
/** Enables the alternative screen buffer. */
|
|
111
|
+
export const SCREEN_ALT_ON: string;
|
|
112
|
+
/** Disables the alternative screen buffer. */
|
|
113
|
+
export const SCREEN_ALT_OFF: string;
|
|
114
|
+
/** Scrolls screen up 1 line. */
|
|
115
|
+
export const SCREEN_SCROLL_UP1: string;
|
|
116
|
+
/** Scrolls screen down 1 line. */
|
|
117
|
+
export const SCREEN_SCROLL_DOWN1: string;
|
|
118
|
+
/** Enables focus reporting. */
|
|
119
|
+
export const SCREEN_REPORT_FOCUS_ON: string;
|
|
120
|
+
/** Disables focus reporting. */
|
|
121
|
+
export const SCREEN_REPORT_FOCUS_OFF: string;
|
|
122
|
+
|
|
123
|
+
/** Scrolls the screen up by `n` lines.
|
|
124
|
+
* @param n - Number of lines (default: 1).
|
|
125
|
+
* @returns CSI escape sequence.
|
|
126
|
+
*/
|
|
127
|
+
export function screenScrollUp(n?: number): string;
|
|
128
|
+
/** Scrolls the screen down by `n` lines.
|
|
129
|
+
* @param n - Number of lines (default: 1).
|
|
130
|
+
* @returns CSI escape sequence.
|
|
131
|
+
*/
|
|
132
|
+
export function screenScrollDown(n?: number): string;
|
|
133
|
+
|
|
134
|
+
/** Enables line wrapping. */
|
|
135
|
+
export const WRAPPING_ON: string;
|
|
136
|
+
/** Disables line wrapping. */
|
|
137
|
+
export const WRAPPING_OFF: string;
|
|
138
|
+
/** Enables bracketed paste mode. */
|
|
139
|
+
export const BRACKETED_PASTE_ON: string;
|
|
140
|
+
/** Disables bracketed paste mode. */
|
|
141
|
+
export const BRACKETED_PASTE_OFF: string;
|
package/src/ansi/csi.js
CHANGED
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
export * from './sgr.js';
|
|
8
8
|
|
|
9
9
|
// matcher
|
|
10
|
+
/** RegExp matching CSI (Control Sequence Introducer) escape sequences with parameter, intermediate, and final byte groups.
|
|
11
|
+
* @type {RegExp}
|
|
12
|
+
*/
|
|
10
13
|
export const matchCsi = /\x1B\[([\x30-\x3F]*)([\x20-\x2F]*)([\x40-\x7E])/g;
|
|
11
14
|
|
|
12
15
|
const CSI = '\x1B[';
|
|
@@ -26,14 +29,52 @@ export const CURSOR_RESTORE_POS = CSI + 'u';
|
|
|
26
29
|
export const CURSOR_NORMAL = CSI + '?25h';
|
|
27
30
|
export const CURSOR_INVISIBLE = CSI + '?25l';
|
|
28
31
|
|
|
32
|
+
/** Moves the cursor up by `n` rows.
|
|
33
|
+
* @param {number} [n=1]
|
|
34
|
+
* @returns {string} CSI sequence.
|
|
35
|
+
*/
|
|
29
36
|
export const cursorUp = (n = 1) => CSI + (n > 1 ? n.toFixed() : '') + 'A';
|
|
37
|
+
/** Moves the cursor down by `n` rows.
|
|
38
|
+
* @param {number} [n=1]
|
|
39
|
+
* @returns {string} CSI sequence.
|
|
40
|
+
*/
|
|
30
41
|
export const cursorDown = (n = 1) => CSI + (n > 1 ? n.toFixed() : '') + 'B';
|
|
42
|
+
/** Moves the cursor forward by `n` columns.
|
|
43
|
+
* @param {number} [n=1]
|
|
44
|
+
* @returns {string} CSI sequence.
|
|
45
|
+
*/
|
|
31
46
|
export const cursorForward = (n = 1) => CSI + (n > 1 ? n.toFixed() : '') + 'C';
|
|
47
|
+
/** Moves the cursor back by `n` columns.
|
|
48
|
+
* @param {number} [n=1]
|
|
49
|
+
* @returns {string} CSI sequence.
|
|
50
|
+
*/
|
|
32
51
|
export const cursorBack = (n = 1) => CSI + (n > 1 ? n.toFixed() : '') + 'D';
|
|
52
|
+
/** Moves cursor to beginning of line `n` lines down.
|
|
53
|
+
* @param {number} [n=1]
|
|
54
|
+
* @returns {string} CSI sequence.
|
|
55
|
+
*/
|
|
33
56
|
export const cursorNextLine = (n = 1) => CSI + (n > 1 ? n.toFixed() : '') + 'E';
|
|
57
|
+
/** Moves cursor to beginning of line `n` lines up.
|
|
58
|
+
* @param {number} [n=1]
|
|
59
|
+
* @returns {string} CSI sequence.
|
|
60
|
+
*/
|
|
34
61
|
export const cursorPrevLine = (n = 1) => CSI + (n > 1 ? n.toFixed() : '') + 'F';
|
|
62
|
+
/** Moves cursor to column `n`.
|
|
63
|
+
* @param {number} [n=1]
|
|
64
|
+
* @returns {string} CSI sequence.
|
|
65
|
+
*/
|
|
35
66
|
export const cursorColumn = (n = 1) => CSI + (n > 1 ? n.toFixed() : '') + 'G';
|
|
67
|
+
/** Sets the cursor to row `n`, column `m` (1-based).
|
|
68
|
+
* @param {number} n - Row.
|
|
69
|
+
* @param {number} m - Column.
|
|
70
|
+
* @returns {string} CSI sequence.
|
|
71
|
+
*/
|
|
36
72
|
export const cursorSetPos = (n, m) => CSI + (n > 1 ? n.toFixed() : '') + ';' + (m > 1 ? m.toFixed() : '') + 'H';
|
|
73
|
+
/** Sets the cursor position (alternative HVP sequence).
|
|
74
|
+
* @param {number} n - Row.
|
|
75
|
+
* @param {number} m - Column.
|
|
76
|
+
* @returns {string} CSI sequence.
|
|
77
|
+
*/
|
|
37
78
|
export const cursorSetPosAlt = (n, m) => CSI + (n > 1 ? n.toFixed() : '') + ';' + (m > 1 ? m.toFixed() : '') + 'f'; // HVP
|
|
38
79
|
|
|
39
80
|
export const CURSOR_RIGHT1 = CURSOR_FORWARD1;
|
|
@@ -53,12 +94,20 @@ export const SCREEN_SAVE = CSI + '?47h';
|
|
|
53
94
|
export const SCREEN_RESTORE = CSI + '?47l';
|
|
54
95
|
export const SCREEN_ALT_ON = CSI + '?1049h'; // alternative screen buffer
|
|
55
96
|
export const SCREEN_ALT_OFF = CSI + '?1049l';
|
|
56
|
-
export const SCREEN_SCROLL_UP1 = CSI + 'S'
|
|
57
|
-
export const SCREEN_SCROLL_DOWN1 = CSI + 'T'
|
|
97
|
+
export const SCREEN_SCROLL_UP1 = CSI + 'S';
|
|
98
|
+
export const SCREEN_SCROLL_DOWN1 = CSI + 'T';
|
|
58
99
|
export const SCREEN_REPORT_FOCUS_ON = CSI + '?1004h';
|
|
59
100
|
export const SCREEN_REPORT_FOCUS_OFF = CSI + '?1004l';
|
|
60
101
|
|
|
102
|
+
/** Scrolls the screen up by `n` lines.
|
|
103
|
+
* @param {number} [n=1]
|
|
104
|
+
* @returns {string} CSI sequence.
|
|
105
|
+
*/
|
|
61
106
|
export const screenScrollUp = (n = 1) => CSI + (n > 1 ? n.toFixed() : '') + 'S';
|
|
107
|
+
/** Scrolls the screen down by `n` lines.
|
|
108
|
+
* @param {number} [n=1]
|
|
109
|
+
* @returns {string} CSI sequence.
|
|
110
|
+
*/
|
|
62
111
|
export const screenScrollDown = (n = 1) => CSI + (n > 1 ? n.toFixed() : '') + 'T';
|
|
63
112
|
|
|
64
113
|
export const WRAPPING_ON = CSI + '=7h';
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export * from './csi.js';
|
|
2
|
+
|
|
3
|
+
/** The ESC character (\x1B). */
|
|
4
|
+
export const ESC: string;
|
|
5
|
+
|
|
6
|
+
/** Deletes the character at the cursor. */
|
|
7
|
+
export const CURSOR_DELETE: string;
|
|
8
|
+
|
|
9
|
+
/** Moves cursor up 1 row (Fe sequence). */
|
|
10
|
+
export const CURSOR_GO_UP1: string;
|
|
11
|
+
|
|
12
|
+
/** Saves cursor position (Fe sequence). */
|
|
13
|
+
export const CURSOR_SAVE: string;
|
|
14
|
+
/** Restores cursor position (Fe sequence). */
|
|
15
|
+
export const CURSOR_RESTORE: string;
|
|
16
|
+
|
|
17
|
+
/** RegExp matching Fe escape sequences. */
|
|
18
|
+
export const matchFe: RegExp;
|
|
19
|
+
/** RegExp matching Fs escape sequences. */
|
|
20
|
+
export const matchFs: RegExp;
|
|
21
|
+
/** RegExp matching Fp escape sequences. */
|
|
22
|
+
export const matchFp: RegExp;
|
|
23
|
+
/** RegExp matching Nf escape sequences. */
|
|
24
|
+
export const matchNf: RegExp;
|
|
25
|
+
/** RegExp matching OSC escape sequences. */
|
|
26
|
+
export const matchOsc: RegExp;
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
/** Pre-built SGR escape sequences for common text styling commands.
|
|
2
|
+
* Each constant is a complete escape sequence string ready to write to the terminal.
|
|
3
|
+
* @see {@link https://github.com/uhop/console-toolkit/wiki/Package:-ansi}
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/** SGR sequence: enable bold. */
|
|
7
|
+
export const BOLD: string;
|
|
8
|
+
/** SGR sequence: enable dim/faint. */
|
|
9
|
+
export const DIM: string;
|
|
10
|
+
/** SGR sequence: enable italic. */
|
|
11
|
+
export const ITALIC: string;
|
|
12
|
+
/** SGR sequence: enable underline. */
|
|
13
|
+
export const UNDERLINE: string;
|
|
14
|
+
/** SGR sequence: enable blink. */
|
|
15
|
+
export const BLINK: string;
|
|
16
|
+
/** SGR sequence: enable rapid blink. */
|
|
17
|
+
export const RAPID_BLINK: string;
|
|
18
|
+
/** SGR sequence: enable inverse/reverse video. */
|
|
19
|
+
export const INVERSE: string;
|
|
20
|
+
/** SGR sequence: enable hidden/invisible text. */
|
|
21
|
+
export const HIDDEN: string;
|
|
22
|
+
/** SGR sequence: enable strikethrough. */
|
|
23
|
+
export const STRIKETHROUGH: string;
|
|
24
|
+
/** SGR sequence: enable overline. */
|
|
25
|
+
export const OVERLINE: string;
|
|
26
|
+
|
|
27
|
+
/** SGR sequence: reset all attributes. */
|
|
28
|
+
export const RESET_ALL: string;
|
|
29
|
+
/** SGR sequence: reset all attributes (alias of RESET_ALL). */
|
|
30
|
+
export const RESET: string;
|
|
31
|
+
|
|
32
|
+
/** SGR sequence: reset bold (also resets dim). */
|
|
33
|
+
export const RESET_BOLD: string;
|
|
34
|
+
/** SGR sequence: reset dim (also resets bold). */
|
|
35
|
+
export const RESET_DIM: string;
|
|
36
|
+
/** SGR sequence: reset italic. */
|
|
37
|
+
export const RESET_ITALIC: string;
|
|
38
|
+
/** SGR sequence: reset underline. */
|
|
39
|
+
export const RESET_UNDERLINE: string;
|
|
40
|
+
/** SGR sequence: reset blink. */
|
|
41
|
+
export const RESET_BLINK: string;
|
|
42
|
+
/** SGR sequence: reset rapid blink. */
|
|
43
|
+
export const RESET_RAPID_BLINK: string;
|
|
44
|
+
/** SGR sequence: reset inverse. */
|
|
45
|
+
export const RESET_INVERSE: string;
|
|
46
|
+
/** SGR sequence: reset hidden. */
|
|
47
|
+
export const RESET_HIDDEN: string;
|
|
48
|
+
/** SGR sequence: reset strikethrough. */
|
|
49
|
+
export const RESET_STRIKETHROUGH: string;
|
|
50
|
+
/** SGR sequence: reset overline. */
|
|
51
|
+
export const RESET_OVERLINE: string;
|
|
52
|
+
|
|
53
|
+
/** SGR sequence: reset foreground color to default. */
|
|
54
|
+
export const RESET_COLOR: string;
|
|
55
|
+
/** SGR sequence: reset background color to default. */
|
|
56
|
+
export const RESET_BG_COLOR: string;
|
|
57
|
+
/** SGR sequence: reset font to default. */
|
|
58
|
+
export const RESET_FONT: string;
|
|
59
|
+
|
|
60
|
+
/** SGR sequence: set foreground to black. */
|
|
61
|
+
export const BLACK: string;
|
|
62
|
+
/** SGR sequence: set foreground to red. */
|
|
63
|
+
export const RED: string;
|
|
64
|
+
/** SGR sequence: set foreground to green. */
|
|
65
|
+
export const GREEN: string;
|
|
66
|
+
/** SGR sequence: set foreground to yellow. */
|
|
67
|
+
export const YELLOW: string;
|
|
68
|
+
/** SGR sequence: set foreground to blue. */
|
|
69
|
+
export const BLUE: string;
|
|
70
|
+
/** SGR sequence: set foreground to magenta. */
|
|
71
|
+
export const MAGENTA: string;
|
|
72
|
+
/** SGR sequence: set foreground to cyan. */
|
|
73
|
+
export const CYAN: string;
|
|
74
|
+
/** SGR sequence: set foreground to white. */
|
|
75
|
+
export const WHITE: string;
|
|
76
|
+
|
|
77
|
+
/** SGR sequence: set foreground to bright black. */
|
|
78
|
+
export const BRIGHT_BLACK: string;
|
|
79
|
+
/** SGR sequence: set foreground to bright red. */
|
|
80
|
+
export const BRIGHT_RED: string;
|
|
81
|
+
/** SGR sequence: set foreground to bright green. */
|
|
82
|
+
export const BRIGHT_GREEN: string;
|
|
83
|
+
/** SGR sequence: set foreground to bright yellow. */
|
|
84
|
+
export const BRIGHT_YELLOW: string;
|
|
85
|
+
/** SGR sequence: set foreground to bright blue. */
|
|
86
|
+
export const BRIGHT_BLUE: string;
|
|
87
|
+
/** SGR sequence: set foreground to bright magenta. */
|
|
88
|
+
export const BRIGHT_MAGENTA: string;
|
|
89
|
+
/** SGR sequence: set foreground to bright cyan. */
|
|
90
|
+
export const BRIGHT_CYAN: string;
|
|
91
|
+
/** SGR sequence: set foreground to bright white. */
|
|
92
|
+
export const BRIGHT_WHITE: string;
|
|
93
|
+
|
|
94
|
+
/** SGR sequence: set background to black. */
|
|
95
|
+
export const BG_BLACK: string;
|
|
96
|
+
/** SGR sequence: set background to red. */
|
|
97
|
+
export const BG_RED: string;
|
|
98
|
+
/** SGR sequence: set background to green. */
|
|
99
|
+
export const BG_GREEN: string;
|
|
100
|
+
/** SGR sequence: set background to yellow. */
|
|
101
|
+
export const BG_YELLOW: string;
|
|
102
|
+
/** SGR sequence: set background to blue. */
|
|
103
|
+
export const BG_BLUE: string;
|
|
104
|
+
/** SGR sequence: set background to magenta. */
|
|
105
|
+
export const BG_MAGENTA: string;
|
|
106
|
+
/** SGR sequence: set background to cyan. */
|
|
107
|
+
export const BG_CYAN: string;
|
|
108
|
+
/** SGR sequence: set background to white. */
|
|
109
|
+
export const BG_WHITE: string;
|
|
110
|
+
|
|
111
|
+
/** SGR sequence: set background to bright black. */
|
|
112
|
+
export const BG_BRIGHT_BLACK: string;
|
|
113
|
+
/** SGR sequence: set background to bright red. */
|
|
114
|
+
export const BG_BRIGHT_RED: string;
|
|
115
|
+
/** SGR sequence: set background to bright green. */
|
|
116
|
+
export const BG_BRIGHT_GREEN: string;
|
|
117
|
+
/** SGR sequence: set background to bright yellow. */
|
|
118
|
+
export const BG_BRIGHT_YELLOW: string;
|
|
119
|
+
/** SGR sequence: set background to bright blue. */
|
|
120
|
+
export const BG_BRIGHT_BLUE: string;
|
|
121
|
+
/** SGR sequence: set background to bright magenta. */
|
|
122
|
+
export const BG_BRIGHT_MAGENTA: string;
|
|
123
|
+
/** SGR sequence: set background to bright cyan. */
|
|
124
|
+
export const BG_BRIGHT_CYAN: string;
|
|
125
|
+
/** SGR sequence: set background to bright white. */
|
|
126
|
+
export const BG_BRIGHT_WHITE: string;
|
|
127
|
+
|
|
128
|
+
/** SGR sequence: set foreground to black (explicit FG_ prefix). */
|
|
129
|
+
export const FG_BLACK: string;
|
|
130
|
+
/** SGR sequence: set foreground to red (explicit FG_ prefix). */
|
|
131
|
+
export const FG_RED: string;
|
|
132
|
+
/** SGR sequence: set foreground to green (explicit FG_ prefix). */
|
|
133
|
+
export const FG_GREEN: string;
|
|
134
|
+
/** SGR sequence: set foreground to yellow (explicit FG_ prefix). */
|
|
135
|
+
export const FG_YELLOW: string;
|
|
136
|
+
/** SGR sequence: set foreground to blue (explicit FG_ prefix). */
|
|
137
|
+
export const FG_BLUE: string;
|
|
138
|
+
/** SGR sequence: set foreground to magenta (explicit FG_ prefix). */
|
|
139
|
+
export const FG_MAGENTA: string;
|
|
140
|
+
/** SGR sequence: set foreground to cyan (explicit FG_ prefix). */
|
|
141
|
+
export const FG_CYAN: string;
|
|
142
|
+
/** SGR sequence: set foreground to white (explicit FG_ prefix). */
|
|
143
|
+
export const FG_WHITE: string;
|
|
144
|
+
|
|
145
|
+
/** SGR sequence: set foreground to bright black (explicit FG_ prefix). */
|
|
146
|
+
export const FG_BRIGHT_BLACK: string;
|
|
147
|
+
/** SGR sequence: set foreground to bright red (explicit FG_ prefix). */
|
|
148
|
+
export const FG_BRIGHT_RED: string;
|
|
149
|
+
/** SGR sequence: set foreground to bright green (explicit FG_ prefix). */
|
|
150
|
+
export const FG_BRIGHT_GREEN: string;
|
|
151
|
+
/** SGR sequence: set foreground to bright yellow (explicit FG_ prefix). */
|
|
152
|
+
export const FG_BRIGHT_YELLOW: string;
|
|
153
|
+
/** SGR sequence: set foreground to bright blue (explicit FG_ prefix). */
|
|
154
|
+
export const FG_BRIGHT_BLUE: string;
|
|
155
|
+
/** SGR sequence: set foreground to bright magenta (explicit FG_ prefix). */
|
|
156
|
+
export const FG_BRIGHT_MAGENTA: string;
|
|
157
|
+
/** SGR sequence: set foreground to bright cyan (explicit FG_ prefix). */
|
|
158
|
+
export const FG_BRIGHT_CYAN: string;
|
|
159
|
+
/** SGR sequence: set foreground to bright white (explicit FG_ prefix). */
|
|
160
|
+
export const FG_BRIGHT_WHITE: string;
|
|
161
|
+
|
|
162
|
+
/** SGR sequence: set foreground to gray (alias of BRIGHT_BLACK). */
|
|
163
|
+
export const GRAY: string;
|
|
164
|
+
/** SGR sequence: set foreground to grey (alias of BRIGHT_BLACK). */
|
|
165
|
+
export const GREY: string;
|
|
166
|
+
/** SGR sequence: set background to gray (alias of BG_BRIGHT_BLACK). */
|
|
167
|
+
export const BG_GRAY: string;
|
|
168
|
+
/** SGR sequence: set background to grey (alias of BG_BRIGHT_BLACK). */
|
|
169
|
+
export const BG_GREY: string;
|
|
170
|
+
/** SGR sequence: set foreground to gray (alias of FG_BRIGHT_BLACK). */
|
|
171
|
+
export const FG_GRAY: string;
|
|
172
|
+
/** SGR sequence: set foreground to grey (alias of FG_BRIGHT_BLACK). */
|
|
173
|
+
export const FG_GREY: string;
|