@promptctl/rich-js 0.18.1 → 0.19.0
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 +9 -7
- package/dist/core/box.d.ts +3 -1
- package/dist/core/box.js +6 -13
- package/dist/core/cells.d.ts +61 -28
- package/dist/core/cells.js +171 -124
- package/dist/core/clock.d.ts +48 -0
- package/dist/core/clock.js +42 -0
- package/dist/core/color.d.ts +98 -18
- package/dist/core/color.js +331 -144
- package/dist/core/console.d.ts +38 -7
- package/dist/core/console.js +159 -90
- package/dist/core/easing.d.ts +86 -0
- package/dist/core/easing.js +171 -0
- package/dist/core/env.d.ts +16 -0
- package/dist/core/env.js +16 -0
- package/dist/core/export-html.js +1 -4
- package/dist/core/export-lines.d.ts +22 -13
- package/dist/core/export-lines.js +37 -19
- package/dist/core/export-svg.d.ts +49 -0
- package/dist/core/export-svg.js +213 -0
- package/dist/core/fnv1a.d.ts +10 -0
- package/dist/core/fnv1a.js +17 -0
- package/dist/core/highlighter.d.ts +2 -2
- package/dist/core/highlighter.js +113 -47
- package/dist/core/json.js +1 -1
- package/dist/core/markup.d.ts +28 -7
- package/dist/core/markup.js +235 -312
- package/dist/core/measure.d.ts +3 -3
- package/dist/core/measure.js +12 -7
- package/dist/core/memo.d.ts +19 -0
- package/dist/core/memo.js +34 -0
- package/dist/core/osc8.d.ts +6 -6
- package/dist/core/osc8.js +9 -21
- package/dist/core/paint.d.ts +107 -0
- package/dist/core/paint.js +150 -0
- package/dist/core/place.d.ts +1 -1
- package/dist/core/place.js +4 -6
- package/dist/core/pretty.d.ts +105 -2
- package/dist/core/pretty.js +527 -97
- package/dist/core/protocol.d.ts +41 -3
- package/dist/core/protocol.js +20 -0
- package/dist/core/render.d.ts +33 -30
- package/dist/core/render.js +43 -83
- package/dist/core/segment.d.ts +6 -5
- package/dist/core/segment.js +11 -15
- package/dist/core/strip.d.ts +13 -2
- package/dist/core/strip.js +44 -23
- package/dist/core/style.d.ts +27 -7
- package/dist/core/style.js +97 -34
- package/dist/core/text.d.ts +43 -16
- package/dist/core/text.js +180 -59
- package/dist/core/wrap.d.ts +5 -0
- package/dist/core/wrap.js +16 -3
- package/dist/host/app.d.ts +31 -19
- package/dist/host/app.js +90 -60
- package/dist/host/index.d.ts +2 -1
- package/dist/host/terminal-host.d.ts +3 -2
- package/dist/index.d.ts +17 -10
- package/dist/index.js +11 -4
- package/dist/node/prompt.d.ts +13 -0
- package/dist/node/prompt.js +30 -9
- package/dist/node/save.d.ts +4 -3
- package/dist/node/save.js +6 -3
- package/dist/node/terminal-host.d.ts +3 -2
- package/dist/node/traceback.d.ts +2 -1
- package/dist/node/traceback.js +3 -39
- package/dist/renderables/align.js +2 -9
- package/dist/renderables/columns.d.ts +45 -29
- package/dist/renderables/columns.js +142 -103
- package/dist/renderables/constrain.js +6 -12
- package/dist/renderables/effect.d.ts +98 -0
- package/dist/renderables/effect.js +160 -0
- package/dist/renderables/embed.d.ts +87 -30
- package/dist/renderables/embed.js +134 -45
- package/dist/renderables/group.d.ts +6 -3
- package/dist/renderables/group.js +5 -0
- package/dist/renderables/layout.d.ts +6 -23
- package/dist/renderables/layout.js +24 -113
- package/dist/renderables/live.d.ts +40 -16
- package/dist/renderables/live.js +96 -83
- package/dist/renderables/markdown.d.ts +16 -2
- package/dist/renderables/markdown.js +521 -118
- package/dist/renderables/padding.d.ts +22 -1
- package/dist/renderables/padding.js +30 -24
- package/dist/renderables/panel.d.ts +31 -33
- package/dist/renderables/panel.js +137 -141
- package/dist/renderables/progress.d.ts +104 -16
- package/dist/renderables/progress.js +205 -81
- package/dist/renderables/progressBar.d.ts +2 -2
- package/dist/renderables/progressBar.js +30 -19
- package/dist/renderables/prompt.d.ts +37 -15
- package/dist/renderables/prompt.js +125 -85
- package/dist/renderables/ratio.d.ts +123 -0
- package/dist/renderables/ratio.js +213 -0
- package/dist/renderables/rule.d.ts +1 -0
- package/dist/renderables/rule.js +44 -48
- package/dist/renderables/spinner.d.ts +28 -2
- package/dist/renderables/spinner.js +52 -19
- package/dist/renderables/status.d.ts +13 -7
- package/dist/renderables/status.js +15 -29
- package/dist/renderables/syntax.d.ts +37 -7
- package/dist/renderables/syntax.js +134 -83
- package/dist/renderables/table.d.ts +58 -20
- package/dist/renderables/table.js +370 -192
- package/dist/renderables/traceback.d.ts +5 -4
- package/dist/renderables/traceback.js +239 -68
- package/dist/renderables/tree.d.ts +10 -2
- package/dist/renderables/tree.js +61 -34
- package/dist/renderables/viewport.js +2 -4
- package/dist/template-bindings/color-funcs.d.ts +31 -9
- package/dist/template-bindings/color-funcs.js +40 -14
- package/dist/template-bindings/helpers.d.ts +4 -2
- package/dist/template-bindings/helpers.js +5 -20
- package/dist/template-bindings/index.d.ts +29 -17
- package/dist/template-bindings/index.js +36 -20
- package/dist/template-bindings/palette-funcs.d.ts +3 -1
- package/dist/template-bindings/palette-funcs.js +11 -7
- package/dist/template-bindings/style-funcs.js +4 -2
- package/dist/themes/buildPalette.d.ts +24 -3
- package/dist/themes/buildPalette.js +52 -8
- package/dist/themes/colorMath.d.ts +29 -17
- package/dist/themes/colorMath.js +74 -48
- package/dist/themes/colorRef.d.ts +2 -17
- package/dist/themes/colorRef.js +13 -31
- package/dist/themes/palette.d.ts +24 -0
- package/dist/themes/palette.js +46 -3
- package/dist/themes/ramp.d.ts +21 -34
- package/dist/themes/ramp.js +23 -42
- package/dist/themes/registry.js +39 -28
- package/dist/widgets/button.d.ts +2 -6
- package/dist/widgets/button.js +9 -40
- package/dist/widgets/checkbox.d.ts +2 -5
- package/dist/widgets/checkbox.js +9 -31
- package/dist/widgets/dropdown.d.ts +2 -5
- package/dist/widgets/dropdown.js +14 -48
- package/dist/widgets/ink.d.ts +22 -0
- package/dist/widgets/ink.js +31 -0
- package/dist/widgets/slider.d.ts +2 -5
- package/dist/widgets/slider.js +11 -34
- package/dist/widgets/text-input.d.ts +19 -10
- package/dist/widgets/text-input.js +156 -147
- package/dist/widgets/themed-widget.d.ts +20 -0
- package/dist/widgets/themed-widget.js +89 -0
- package/dist/widgets/toggle.d.ts +2 -5
- package/dist/widgets/toggle.js +8 -31
- package/dist/widgets/widget-app.d.ts +2 -0
- package/dist/widgets/widget-app.js +13 -6
- package/dist/widgets/widget-base.d.ts +2 -0
- package/dist/widgets/widget-base.js +9 -2
- package/package.json +11 -1
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Clock — the time source and timer whoever draws frames is handed, and the
|
|
3
|
+
* frame rate it ticks at.
|
|
4
|
+
*
|
|
5
|
+
* [LAW:no-ambient-temporal-coupling] Frame rate belongs to whoever draws the
|
|
6
|
+
* frames — an `App`, a `Live` — never to what is drawn, and each ticks on the
|
|
7
|
+
* `Clock` it was given. An `App` reads the frame's time through that clock and
|
|
8
|
+
* hands it to its view as data, so nothing rendered reads a clock, and an
|
|
9
|
+
* effect sampled thirty times a second or once every two seconds runs the
|
|
10
|
+
* same code.
|
|
11
|
+
*
|
|
12
|
+
* [LAW:effects-at-boundaries] The clock is a capability passed in, like the
|
|
13
|
+
* `TerminalHost`: a test hands over a clock whose time it moves by hand and
|
|
14
|
+
* counts frames with no real timer, and nothing it starts can outlive the
|
|
15
|
+
* thing that started it. `systemClock` is the one place the library reads the
|
|
16
|
+
* platform's clock and timers, and it reads them only when called.
|
|
17
|
+
*/
|
|
18
|
+
// The longest delay a platform timer holds, in seconds: setInterval clamps a
|
|
19
|
+
// longer one to a millisecond, which would turn the slowest rate into the
|
|
20
|
+
// fastest.
|
|
21
|
+
const LONGEST_INTERVAL = (2 ** 31 - 1) / 1000;
|
|
22
|
+
/**
|
|
23
|
+
* `perSecond` as a `FrameRate`; anything but a positive, finite number throws,
|
|
24
|
+
* and so does a rate whose frames are further apart than a timer can wait —
|
|
25
|
+
* about 24.8 days.
|
|
26
|
+
*/
|
|
27
|
+
export function frameRate(perSecond) {
|
|
28
|
+
if (!(Number.isFinite(perSecond) && perSecond > 0 && 1 / perSecond <= LONGEST_INTERVAL)) {
|
|
29
|
+
throw new RangeError(`a frame rate is a positive, finite number of frames a second, at most ${LONGEST_INTERVAL} s apart, not ${perSecond}`);
|
|
30
|
+
}
|
|
31
|
+
return { perSecond, interval: 1 / perSecond };
|
|
32
|
+
}
|
|
33
|
+
/** The platform's monotonic clock and its interval timer. */
|
|
34
|
+
export function systemClock() {
|
|
35
|
+
return {
|
|
36
|
+
now: () => performance.now() / 1000,
|
|
37
|
+
every: (rate, tick) => {
|
|
38
|
+
const timer = setInterval(tick, rate.interval * 1000);
|
|
39
|
+
return () => clearInterval(timer);
|
|
40
|
+
},
|
|
41
|
+
};
|
|
42
|
+
}
|
package/dist/core/color.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Terminal color representation, parsing, downgrading, and ANSI code generation.
|
|
3
3
|
*/
|
|
4
|
+
import type { Env } from "./env.js";
|
|
4
5
|
/**
|
|
5
6
|
* Immutable RGBA color value. Alpha defaults to 1 (fully opaque).
|
|
6
7
|
*
|
|
@@ -34,8 +35,9 @@ export declare class ColorRgba {
|
|
|
34
35
|
/**
|
|
35
36
|
* The surface a terminal draws a translucent colour over. A terminal cannot
|
|
36
37
|
* know what lies under its cells, so the SGR writer (`Style.toSgrCodes`), the
|
|
37
|
-
*
|
|
38
|
-
*
|
|
38
|
+
* exports that picture its output (`resolveLook`), the strip's seam test and
|
|
39
|
+
* the contrast choosers (`themes/colorMath`) all composite over this one
|
|
40
|
+
* colour. [LAW:one-source-of-truth] One constant, so
|
|
39
41
|
* the colour text is chosen against is the colour the writer draws.
|
|
40
42
|
*/
|
|
41
43
|
export declare const SURFACE_BLACK: ColorRgba;
|
|
@@ -56,11 +58,17 @@ export declare function relativeLuminance(c: ColorRgba): number;
|
|
|
56
58
|
* foreground, flatten it first (or use `ensureContrast`, which does).
|
|
57
59
|
*/
|
|
58
60
|
export declare function contrastRatio(a: ColorRgba, b: ColorRgba): number;
|
|
61
|
+
/**
|
|
62
|
+
* An indexed palette: entry `i` of `colors` is terminal index `firstIndex + i`.
|
|
63
|
+
* `firstIndex` lets a table hold only the part of a palette a downgrade may
|
|
64
|
+
* choose (the 256-colour cube and grey ramp start at 16) while every index it
|
|
65
|
+
* reports is the terminal's own.
|
|
66
|
+
*/
|
|
59
67
|
export declare class ColorTable {
|
|
60
68
|
private readonly colors;
|
|
61
|
-
|
|
62
|
-
private readonly
|
|
63
|
-
private readonly
|
|
69
|
+
readonly firstIndex: number;
|
|
70
|
+
private readonly matchMemo;
|
|
71
|
+
private readonly readableMemo;
|
|
64
72
|
constructor(colors: ColorRgba[], firstIndex?: number);
|
|
65
73
|
get(index: number): ColorRgba;
|
|
66
74
|
private luminanceCache;
|
|
@@ -74,6 +82,7 @@ export declare class ColorTable {
|
|
|
74
82
|
* don't collide, but is not used in the distance metric.
|
|
75
83
|
*/
|
|
76
84
|
match(value: ColorRgba): number;
|
|
85
|
+
private nearest;
|
|
77
86
|
/**
|
|
78
87
|
* The nearest entry to `value` (the distance `match` uses) among those that
|
|
79
88
|
* clear `minRatio` against `on`; when none does, the entry with the most
|
|
@@ -84,6 +93,7 @@ export declare class ColorTable {
|
|
|
84
93
|
* the ratio decides which one wins.
|
|
85
94
|
*/
|
|
86
95
|
matchReadable(value: ColorRgba, on: ColorRgba, minRatio: number): number;
|
|
96
|
+
private nearestReadable;
|
|
87
97
|
/**
|
|
88
98
|
* The nearest entry to `value` (the distance `match` uses) among those
|
|
89
99
|
* `accept` takes, given each entry's colour and terminal index; `undefined`
|
|
@@ -103,10 +113,22 @@ export declare enum ColorDepth {
|
|
|
103
113
|
}
|
|
104
114
|
export interface DetectColorOptions {
|
|
105
115
|
/** Environment to probe. Defaults to `process.env`. */
|
|
106
|
-
env?:
|
|
116
|
+
env?: Env;
|
|
107
117
|
/** Whether output is going to a real terminal. Defaults to `process.stdout?.isTTY`. */
|
|
108
118
|
isTTY?: boolean;
|
|
109
119
|
}
|
|
120
|
+
declare const COLOR_SYSTEM_DEPTHS: {
|
|
121
|
+
readonly truecolor: ColorDepth.TRUECOLOR;
|
|
122
|
+
readonly "256": ColorDepth.EIGHT_BIT;
|
|
123
|
+
readonly ansi: ColorDepth.STANDARD;
|
|
124
|
+
readonly none: null;
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* A colour system by name: `"auto"` detects it from the environment, and each
|
|
128
|
+
* other name is a fixed depth — `"none"` no colour. `ColorDepth.WINDOWS` has
|
|
129
|
+
* no name; pass the enum value where a `ColorDepth` is accepted.
|
|
130
|
+
*/
|
|
131
|
+
export type ColorSystemName = "auto" | keyof typeof COLOR_SYSTEM_DEPTHS;
|
|
110
132
|
/**
|
|
111
133
|
* Detect the terminal's color capability from env + TTY state.
|
|
112
134
|
*
|
|
@@ -119,6 +141,12 @@ export interface DetectColorOptions {
|
|
|
119
141
|
* in the env values, not in which checks execute.
|
|
120
142
|
*/
|
|
121
143
|
export declare function detectColorSystem(options?: DetectColorOptions): ColorDepth | null;
|
|
144
|
+
/**
|
|
145
|
+
* A terminal that says it cannot be drawn on: `TERM` is `dumb` or `unknown`,
|
|
146
|
+
* as Emacs' shell mode sets it. It takes no colour and nothing that moves the
|
|
147
|
+
* cursor.
|
|
148
|
+
*/
|
|
149
|
+
export declare function isDumbTerminal(env: Env): boolean;
|
|
122
150
|
/**
|
|
123
151
|
* Where segments are written, as everything the serializer (`segmentsToString`)
|
|
124
152
|
* needs to know about it: the colour depth SGR is drawn at, and whether OSC 8
|
|
@@ -139,17 +167,17 @@ export interface Destination {
|
|
|
139
167
|
* colour preferences, leave them alone. A FORCE_COLOR that forces colour on
|
|
140
168
|
* declares the destination takes escapes, so it keeps links on a pipe too.
|
|
141
169
|
*/
|
|
142
|
-
export declare function resolveDestination(spec:
|
|
170
|
+
export declare function resolveDestination(spec: ColorSystemName | ColorDepth | null, options?: DetectColorOptions): Destination;
|
|
143
171
|
/**
|
|
144
|
-
* Resolve a
|
|
172
|
+
* Resolve a colour system name into a `ColorDepth` (or `null` for no color).
|
|
145
173
|
*
|
|
146
|
-
* `"auto"` triggers env-based detection;
|
|
147
|
-
*
|
|
148
|
-
*
|
|
174
|
+
* `"auto"` triggers env-based detection; every other name is a fixed depth.
|
|
175
|
+
* A name outside the vocabulary — reachable only from untyped JavaScript —
|
|
176
|
+
* throws: silent fallback would mask a typo.
|
|
149
177
|
*
|
|
150
|
-
* [LAW:single-enforcer] All
|
|
178
|
+
* [LAW:single-enforcer] All name→ColorDepth resolution flows through here.
|
|
151
179
|
*/
|
|
152
|
-
export declare function resolveColorSystem(spec:
|
|
180
|
+
export declare function resolveColorSystem(spec: ColorSystemName, options?: DetectColorOptions): ColorDepth | null;
|
|
153
181
|
export declare class ColorParseError extends Error {
|
|
154
182
|
constructor(message: string);
|
|
155
183
|
}
|
|
@@ -166,8 +194,9 @@ export declare class ColorSpec {
|
|
|
166
194
|
* any alpha is flattened, so a translucent value is drawn composited over
|
|
167
195
|
* its ground (`flattenAlpha`) and should be measured that way: a
|
|
168
196
|
* truecolor value, or a 256-colour cube or grey-ramp entry (xterm fixes
|
|
169
|
-
* indices 16–255, and `fromAnsi` types only those as EIGHT_BIT). ANSI 0–15
|
|
170
|
-
*
|
|
197
|
+
* indices 16–255, and `fromAnsi` types only those as EIGHT_BIT). ANSI 0–15,
|
|
198
|
+
* the default colour and a blend reaching either are the terminal theme's
|
|
199
|
+
* own, so they have none.
|
|
171
200
|
*/
|
|
172
201
|
get fixedValue(): ColorRgba | undefined;
|
|
173
202
|
get isSystemDefined(): boolean;
|
|
@@ -203,17 +232,52 @@ export declare class ColorSpec {
|
|
|
203
232
|
static fromRgba(value: ColorRgba): ColorSpec;
|
|
204
233
|
static fromRgb(r: number, g: number, b: number): ColorSpec;
|
|
205
234
|
/**
|
|
206
|
-
*
|
|
235
|
+
* The colour `t` of the way from `from` to `to`: what `blend(from,to,t)`
|
|
236
|
+
* parses to. Two fixed colours mix to a fixed colour. A mix reaching a
|
|
237
|
+
* theme's own colour stays a mix until it is drawn, so whatever theme draws
|
|
238
|
+
* an end draws the mix from it: exported under a theme whose `blue` is
|
|
239
|
+
* #61afef, a mix with `blue` starts from #61afef. A terminal is told its RGB
|
|
240
|
+
* under the standard table, the only one a render has.
|
|
241
|
+
*
|
|
242
|
+
* Each end is one opaque colour: `default` is no colour to mix, and a
|
|
243
|
+
* translucent end has no one shade until it is laid on a ground.
|
|
244
|
+
*/
|
|
245
|
+
static blend(from: ColorSpec, to: ColorSpec, t: number): ColorSpec;
|
|
246
|
+
/**
|
|
247
|
+
* The spec that draws `value` nearest to it at `depth` on a terminal known
|
|
248
|
+
* to show `theme`, as the colour of the glyph (`foreground`) or of the
|
|
249
|
+
* ground. Where `downgrade` knows no terminal, and so rounds only against
|
|
250
|
+
* colours every terminal fixes (or, at sixteen colours, the stock
|
|
251
|
+
* sixteen), this rounds against every colour the depth can write whose
|
|
252
|
+
* look `theme` fixes: the default colour, the theme's sixteen, and at 256
|
|
253
|
+
* colours the cube and grey ramp too. A colour read off any of those and
|
|
254
|
+
* moved a little is drawn as the colour it came from — or, where the theme
|
|
255
|
+
* gives two slots one colour, as the lower slot, which looks the same.
|
|
256
|
+
*
|
|
257
|
+
* `value` is opaque: a translucent colour has no one look until it is laid
|
|
258
|
+
* on a ground (`flattenAlpha`).
|
|
259
|
+
*/
|
|
260
|
+
static matchOn(value: ColorRgba, depth: ColorDepth, theme: TerminalTheme, foreground: boolean): ColorSpec;
|
|
261
|
+
/**
|
|
262
|
+
* Parse a color string. Memoized (`Memo`): a string parsed again while
|
|
263
|
+
* remembered returns the same instance.
|
|
207
264
|
*/
|
|
208
265
|
static parse(colorString: string): ColorSpec;
|
|
209
266
|
private performDowngrade;
|
|
210
267
|
}
|
|
268
|
+
/** Six hex digits, no `#`, as an opaque colour. @throws {ColorParseError} on anything else. */
|
|
211
269
|
export declare function parseRgbHex(hex: string): ColorRgba;
|
|
270
|
+
/** Eight hex digits, no `#`, the last pair alpha. @throws {ColorParseError} on anything else. */
|
|
212
271
|
export declare function parseRgbaHex(hex: string): ColorRgba;
|
|
272
|
+
/**
|
|
273
|
+
* A `#RRGGBB` or `#RRGGBBAA` literal, exactly — no surrounding whitespace.
|
|
274
|
+
* @throws {ColorParseError} on anything else.
|
|
275
|
+
*/
|
|
276
|
+
export declare function parseHexColor(literal: string): ColorRgba;
|
|
213
277
|
export declare function blendRgb(color1: ColorRgba, color2: ColorRgba, crossFade?: number): ColorRgba;
|
|
214
278
|
/**
|
|
215
|
-
* A terminal theme — surface/foreground baseline, the ANSI
|
|
216
|
-
* semantic palette.
|
|
279
|
+
* A terminal theme — surface/foreground baseline, the sixteen ANSI colours,
|
|
280
|
+
* and a semantic palette.
|
|
217
281
|
*
|
|
218
282
|
* **`ansiColors` is the theme's own sixteen colours**, the shades a terminal
|
|
219
283
|
* showing this theme draws `red`, `blue` and the rest in. `ColorSpec.parse("red")`
|
|
@@ -237,6 +301,21 @@ export declare const EIGHT_BIT_TABLE: ColorTable;
|
|
|
237
301
|
*/
|
|
238
302
|
export declare const EIGHT_BIT_DOWNGRADE_TABLE: ColorTable;
|
|
239
303
|
export declare const WINDOWS_TABLE: ColorTable;
|
|
304
|
+
/**
|
|
305
|
+
* The terminal a colour at `depth` is drawn by: `theme`, or when a caller names
|
|
306
|
+
* none, the one the depth assumes — the Windows console at WINDOWS, the VGA
|
|
307
|
+
* sixteen otherwise — for `ColorSpec.getTruecolor` and the contrast measurement
|
|
308
|
+
* that reads it. (Widgets fall back to `DEFAULT_TERMINAL_THEME`, which carries a
|
|
309
|
+
* palette this does not.)
|
|
310
|
+
*/
|
|
311
|
+
export declare function resolveTerminal(theme: TerminalTheme | undefined, depth: ColorDepth): TerminalTheme;
|
|
312
|
+
/**
|
|
313
|
+
* The table a downgrade to `depth` rounds a fixed colour against.
|
|
314
|
+
* [LAW:one-source-of-truth] `ColorSpec.downgrade` picks the index a colour is
|
|
315
|
+
* written as from it, and colorMath hands back its entries as colours the
|
|
316
|
+
* writer rounds to those same indices.
|
|
317
|
+
*/
|
|
318
|
+
export declare function downgradeTable(depth: ColorDepth.EIGHT_BIT | ColorDepth.STANDARD | ColorDepth.WINDOWS): ColorTable;
|
|
240
319
|
export declare const ANSI_COLOR_NAMES: Record<string, number>;
|
|
241
320
|
/**
|
|
242
321
|
* Every word `ColorSpec.parse` accepts as a name rather than a `#hex`,
|
|
@@ -244,3 +323,4 @@ export declare const ANSI_COLOR_NAMES: Record<string, number>;
|
|
|
244
323
|
* are exactly the two name checks `parseSingle` makes.
|
|
245
324
|
*/
|
|
246
325
|
export declare const COLOR_NAMES: readonly string[];
|
|
326
|
+
export {};
|