@peteanderson/ansi 1.0.1 → 2.0.1
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 +23 -3
- package/dist/ansi.d.ts +79 -41
- package/dist/ansi.d.ts.map +1 -1
- package/dist/ansi.js +9 -6
- package/dist/ansi.js.map +1 -1
- package/dist/features/features.d.ts +1 -3
- package/dist/features/features.d.ts.map +1 -1
- package/dist/features/features.js +1 -1
- package/dist/features/features.js.map +1 -1
- package/dist/features/index.d.ts +1 -0
- package/dist/features/index.d.ts.map +1 -1
- package/dist/features/types.d.ts +2 -0
- package/dist/features/types.d.ts.map +1 -1
- package/dist/pad.d.ts +2 -0
- package/dist/pad.d.ts.map +1 -1
- package/dist/sgr/color/channel.d.ts +4 -0
- package/dist/sgr/color/channel.d.ts.map +1 -0
- package/dist/sgr/color/channel.js +33 -0
- package/dist/sgr/color/channel.js.map +1 -0
- package/dist/sgr/color/color.d.ts +3 -4
- package/dist/sgr/color/color.d.ts.map +1 -1
- package/dist/sgr/color/color.js +16 -65
- package/dist/sgr/color/color.js.map +1 -1
- package/dist/sgr/color/context.d.ts +13 -0
- package/dist/sgr/color/context.d.ts.map +1 -0
- package/dist/sgr/color/context.js +24 -0
- package/dist/sgr/color/context.js.map +1 -0
- package/dist/sgr/color/rgb.d.ts +5 -0
- package/dist/sgr/color/rgb.d.ts.map +1 -0
- package/dist/sgr/color/rgb.js +32 -0
- package/dist/sgr/color/rgb.js.map +1 -0
- package/dist/sgr/color/utils.d.ts.map +1 -1
- package/dist/sgr/color/utils.js.map +1 -1
- package/dist/sgr/combine.d.ts +3 -0
- package/dist/sgr/combine.d.ts.map +1 -0
- package/dist/sgr/combine.js +14 -0
- package/dist/sgr/combine.js.map +1 -0
- package/dist/sgr/format-builder.d.ts +3 -0
- package/dist/sgr/format-builder.d.ts.map +1 -0
- package/dist/sgr/format-builder.js +33 -0
- package/dist/sgr/format-builder.js.map +1 -0
- package/dist/sgr/index.d.ts +2 -3
- package/dist/sgr/index.d.ts.map +1 -1
- package/dist/sgr/index.js +1 -3
- package/dist/sgr/index.js.map +1 -1
- package/dist/sgr/lazy.d.ts +6 -0
- package/dist/sgr/lazy.d.ts.map +1 -0
- package/dist/sgr/lazy.js +17 -0
- package/dist/sgr/lazy.js.map +1 -0
- package/dist/sgr/sgr.d.ts +3 -14
- package/dist/sgr/sgr.d.ts.map +1 -1
- package/dist/sgr/sgr.js +45 -39
- package/dist/sgr/sgr.js.map +1 -1
- package/dist/sgr/style.d.ts +2 -14
- package/dist/sgr/style.d.ts.map +1 -1
- package/dist/sgr/style.js +27 -16
- package/dist/sgr/style.js.map +1 -1
- package/dist/sgr/types.d.ts +59 -0
- package/dist/sgr/types.d.ts.map +1 -0
- package/dist/sgr/{color/types.js.map → types.js.map} +1 -1
- package/dist/simplify/simplify.d.ts +1 -0
- package/dist/simplify/simplify.d.ts.map +1 -1
- package/dist/slice.d.ts +1 -0
- package/dist/slice.d.ts.map +1 -1
- package/dist/strip.d.ts +3 -0
- package/dist/strip.d.ts.map +1 -1
- package/dist/typed-object.d.ts +16 -0
- package/dist/typed-object.d.ts.map +1 -0
- package/dist/typed-object.js +36 -0
- package/dist/typed-object.js.map +1 -0
- package/dist/types.d.ts +25 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +3 -2
- package/src/ansi.ts +11 -36
- package/src/features/features.ts +2 -9
- package/src/features/index.ts +3 -1
- package/src/features/types.ts +10 -1
- package/src/pad.ts +4 -1
- package/src/sgr/color/channel.ts +44 -0
- package/src/sgr/color/color.ts +30 -95
- package/src/sgr/color/context.ts +44 -0
- package/src/sgr/color/rgb.ts +48 -0
- package/src/sgr/color/utils.ts +2 -3
- package/src/sgr/combine.ts +13 -0
- package/src/sgr/format-builder.ts +47 -0
- package/src/sgr/index.ts +3 -3
- package/src/sgr/lazy.ts +21 -0
- package/src/sgr/sgr.ts +61 -54
- package/src/sgr/style.ts +35 -18
- package/src/sgr/types.ts +91 -0
- package/src/simplify/simplify.ts +3 -1
- package/src/slice.ts +3 -1
- package/src/strip.ts +5 -1
- package/src/typed-object.ts +85 -0
- package/src/types.ts +28 -0
- package/src/utility-types.d.ts +18 -0
- package/dist/sgr/color/types.d.ts +0 -30
- package/dist/sgr/color/types.d.ts.map +0 -1
- package/dist/sgr/utils.d.ts +0 -3
- package/dist/sgr/utils.d.ts.map +0 -1
- package/dist/sgr/utils.js +0 -16
- package/dist/sgr/utils.js.map +0 -1
- package/src/sgr/color/types.ts +0 -32
- package/src/sgr/utils.ts +0 -17
- /package/dist/sgr/{color/types.js → types.js} +0 -0
package/README.md
CHANGED
|
@@ -15,7 +15,8 @@ npm install @peteanderson/ansi
|
|
|
15
15
|
const ansi = require("@peteanderson/ansi");
|
|
16
16
|
|
|
17
17
|
console.log(ansi.fg.red("error: something went wrong"));
|
|
18
|
-
|
|
18
|
+
// Fluent chaining with .and
|
|
19
|
+
console.log(ansi.bg.blue.and.fg.white.and.bold("highlighted"));
|
|
19
20
|
console.log(ansi.style.bold("important"));
|
|
20
21
|
console.log(ansi.fg.rgb(5, 2, 0)("custom color"));
|
|
21
22
|
|
|
@@ -63,7 +64,8 @@ Functions that wrap text with color codes (or plain text if disabled):
|
|
|
63
64
|
- `fg.rgb(r, g, b)(text)` - 24-bit RGB color, downscaled for lower color depths
|
|
64
65
|
- `fg.x256(code)(text)` or `fg.x256(r, g, b)(text)` - 256-color palette, downscaled as needed
|
|
65
66
|
|
|
66
|
-
All return functions with `open` and `close` properties for raw sequences
|
|
67
|
+
All return functions with `open` and `close` properties for raw sequences and an `and` property for
|
|
68
|
+
fluent chaining.
|
|
67
69
|
|
|
68
70
|
### `bg` — background colors
|
|
69
71
|
|
|
@@ -75,6 +77,9 @@ Functions that wrap text with color codes (or plain text if disabled):
|
|
|
75
77
|
- `bg.rgb(r, g, b)(text)` - 24-bit RGB color, downscaled for lower color depths
|
|
76
78
|
- `bg.x256(code)(text)` or `bg.x256(r, g, b)(text)` - 256-color palette, downscaled as needed
|
|
77
79
|
|
|
80
|
+
All return functions with `open` and `close` properties for raw sequences and an `and` property for
|
|
81
|
+
fluent chaining.
|
|
82
|
+
|
|
78
83
|
### `style`
|
|
79
84
|
|
|
80
85
|
Functions that wrap text with style codes (disabled if color depth = 1):
|
|
@@ -82,7 +87,22 @@ Functions that wrap text with style codes (disabled if color depth = 1):
|
|
|
82
87
|
`bold` `dim` `italic` `underline` `inverse` `hidden` `strikethrough` `doubleUnderline` `framed`
|
|
83
88
|
`encircled` `overline`
|
|
84
89
|
|
|
85
|
-
All return functions with `open` and `close` properties for raw sequences
|
|
90
|
+
All return functions with `open` and `close` properties for raw sequences and an `and` property for
|
|
91
|
+
fluent chaining.
|
|
92
|
+
|
|
93
|
+
#### Fluent Chaining with `.and`
|
|
94
|
+
|
|
95
|
+
Styles can be chained using the `.and` property for a natural, fluent interface. The `style`
|
|
96
|
+
namespace is unnested in chains:
|
|
97
|
+
|
|
98
|
+
```js
|
|
99
|
+
// Top-level: use style namespace
|
|
100
|
+
ansi.style.bold("bold text");
|
|
101
|
+
|
|
102
|
+
// In a chain: no need for style namespace
|
|
103
|
+
ansi.fg.white.and.bg.blue.and.bold("white on blue, bold");
|
|
104
|
+
ansi.fg.red.and.underline("red underlined");
|
|
105
|
+
```
|
|
86
106
|
|
|
87
107
|
### `reset`
|
|
88
108
|
|
package/dist/ansi.d.ts
CHANGED
|
@@ -1,46 +1,84 @@
|
|
|
1
1
|
import { padEnd, padStart } from "./pad";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
padEnd: typeof padEnd;
|
|
20
|
-
padStart: typeof padStart;
|
|
21
|
-
strip: typeof strip;
|
|
22
|
-
visibleLength: typeof visibleLength;
|
|
23
|
-
sanitize: typeof sanitize;
|
|
24
|
-
slice: typeof slice;
|
|
25
|
-
simplify: typeof simplify;
|
|
26
|
-
features: Features;
|
|
2
|
+
import { strip, visibleLength } from "./strip";
|
|
3
|
+
import type { Args } from "./features";
|
|
4
|
+
import type { Ansi } from "./types";
|
|
5
|
+
declare function makeAnsi(...args: Args): Ansi;
|
|
6
|
+
export declare const ansi: typeof makeAnsi & import("./sgr").SGR & {
|
|
7
|
+
caret: import("./caret").Caret;
|
|
8
|
+
erase: import("./erase").Erase;
|
|
9
|
+
scroll: import("./scroll").Scroll;
|
|
10
|
+
terminal: import("./terminal").Terminal;
|
|
11
|
+
padEnd: import("./pad").PadEnd;
|
|
12
|
+
padStart: import("./pad").PadStart;
|
|
13
|
+
strip: import("./strip").Strip;
|
|
14
|
+
visibleLength: import("./strip").VisibleLength;
|
|
15
|
+
sanitize: import("./strip").Sanitize;
|
|
16
|
+
slice: import("./slice").Slice;
|
|
17
|
+
simplify: import("./simplify").Simplify;
|
|
18
|
+
features: import("./features").Features;
|
|
27
19
|
};
|
|
28
|
-
export declare
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
20
|
+
export declare const fg: import("./sgr/types").Channel<"bg" | import("./sgr/types").StyleKey>, bg: import("./sgr/types").Channel<"fg" | import("./sgr/types").StyleKey>, style: import("./sgr/types").Style<import("./sgr/types").ChainKey>, reset: string, caret: {
|
|
21
|
+
up: (count?: number) => string;
|
|
22
|
+
down: (count?: number) => string;
|
|
23
|
+
forward: (count?: number) => string;
|
|
24
|
+
backward: (count?: number) => string;
|
|
25
|
+
nextLine: (count?: number) => string;
|
|
26
|
+
prevLine: (count?: number) => string;
|
|
27
|
+
x: (x: number) => string;
|
|
28
|
+
save: string;
|
|
29
|
+
restore: string;
|
|
30
|
+
hide: string;
|
|
31
|
+
show: string;
|
|
32
|
+
position: {
|
|
33
|
+
get: string;
|
|
34
|
+
set: (x: number, y: number) => string;
|
|
35
|
+
};
|
|
36
|
+
shape: {
|
|
37
|
+
steadyBlock: string;
|
|
38
|
+
steadyBar: string;
|
|
39
|
+
steadyUnderline: string;
|
|
40
|
+
blinkingBlock: string;
|
|
41
|
+
blinkingBar: string;
|
|
42
|
+
blinkingUnderline: string;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
45
|
+
}, erase: {
|
|
46
|
+
line: {
|
|
47
|
+
toStart: string;
|
|
48
|
+
toEnd: string;
|
|
49
|
+
full: string;
|
|
50
|
+
};
|
|
51
|
+
screen: {
|
|
52
|
+
toStart: string;
|
|
53
|
+
toEnd: string;
|
|
54
|
+
full: string;
|
|
55
|
+
scrollback: string;
|
|
56
|
+
};
|
|
57
|
+
}, scroll: {
|
|
58
|
+
up: (lines?: number) => string;
|
|
59
|
+
down: (lines?: number) => string;
|
|
60
|
+
}, terminal: {
|
|
61
|
+
focusReporting: {
|
|
62
|
+
enable: string;
|
|
63
|
+
disable: string;
|
|
64
|
+
focus: string;
|
|
65
|
+
blur: string;
|
|
66
|
+
};
|
|
67
|
+
alternateScreen: {
|
|
68
|
+
enable: string;
|
|
69
|
+
disable: string;
|
|
70
|
+
legacy: {
|
|
71
|
+
enable: string;
|
|
72
|
+
disable: string;
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
bracketedPaste: {
|
|
76
|
+
enable: string;
|
|
77
|
+
disable: string;
|
|
78
|
+
start: string;
|
|
79
|
+
end: string;
|
|
80
|
+
};
|
|
44
81
|
};
|
|
82
|
+
export { padEnd, padStart, strip, visibleLength };
|
|
45
83
|
export default ansi;
|
|
46
84
|
//# sourceMappingURL=ansi.d.ts.map
|
package/dist/ansi.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ansi.d.ts","sourceRoot":"","sources":["../src/ansi.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAqB,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ansi.d.ts","sourceRoot":"","sources":["../src/ansi.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAC,MAAqB,OAAO,CAAC;AAKtD,OAAO,EAAW,KAAK,EAAE,aAAa,EAAC,MAAO,SAAS,CAAC;AAGxD,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,YAAY,CAAC;AACrC,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,SAAS,CAAC;AAElC,iBAAS,QAAQ,CAAC,GAAG,IAAI,EAAE,IAAI,GAAG,IAAI,CAuBrC;AAED,eAAO,MAAM,IAAI;;;;;;;;;;;;;CAAsC,CAAC;AAExD,eAAO,MAAO,EAAE,wEAAE,EAAE,wEAAE,KAAK,+DAAE,KAAK,UAAE,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;GAAE,KAAK;;;;;;;;;;;;GAAE,MAAM;;;GAAE,QAAQ;;;;;;;;;;;;;;;;;;;;;CAAQ,CAAC;AAE3E,OAAO,EAAC,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAC,CAAA;AAE/C,eAAe,IAAI,CAAC"}
|
package/dist/ansi.js
CHANGED
|
@@ -1,25 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.visibleLength = exports.strip = exports.padStart = exports.padEnd = exports.terminal = exports.scroll = exports.erase = exports.caret = exports.reset = exports.style = exports.bg = exports.fg = exports.ansi = void 0;
|
|
4
4
|
const caret_1 = require("./caret");
|
|
5
5
|
const erase_1 = require("./erase");
|
|
6
6
|
const features_1 = require("./features");
|
|
7
7
|
const pad_1 = require("./pad");
|
|
8
|
+
Object.defineProperty(exports, "padEnd", { enumerable: true, get: function () { return pad_1.padEnd; } });
|
|
9
|
+
Object.defineProperty(exports, "padStart", { enumerable: true, get: function () { return pad_1.padStart; } });
|
|
8
10
|
const scroll_1 = require("./scroll");
|
|
9
11
|
const sgr_1 = require("./sgr");
|
|
10
12
|
const simplify_1 = require("./simplify");
|
|
11
13
|
const slice_1 = require("./slice");
|
|
12
14
|
const strip_1 = require("./strip");
|
|
15
|
+
Object.defineProperty(exports, "strip", { enumerable: true, get: function () { return strip_1.strip; } });
|
|
16
|
+
Object.defineProperty(exports, "visibleLength", { enumerable: true, get: function () { return strip_1.visibleLength; } });
|
|
13
17
|
const terminal_1 = require("./terminal");
|
|
14
18
|
function makeAnsi(...args) {
|
|
15
19
|
const features = (0, features_1.getFeatures)(...args);
|
|
16
20
|
return {
|
|
21
|
+
...(0, sgr_1.makeSGR)(features),
|
|
17
22
|
caret: (0, caret_1.makeCaret)(features.caret),
|
|
18
23
|
erase: (0, erase_1.makeErase)(features.erase),
|
|
19
24
|
scroll: (0, scroll_1.makeScroll)(features.scroll),
|
|
20
|
-
reset: (0, sgr_1.makeReset)(features.colorDepth > 1),
|
|
21
|
-
style: (0, sgr_1.makeStyle)(features.style),
|
|
22
|
-
...(0, sgr_1.makeColor)(features.colorDepth),
|
|
23
25
|
terminal: (0, terminal_1.makeTerminal)(features.terminal),
|
|
24
26
|
padEnd: pad_1.padEnd,
|
|
25
27
|
padStart: pad_1.padStart,
|
|
@@ -31,6 +33,7 @@ function makeAnsi(...args) {
|
|
|
31
33
|
features,
|
|
32
34
|
};
|
|
33
35
|
}
|
|
34
|
-
|
|
35
|
-
exports.
|
|
36
|
+
exports.ansi = Object.assign(makeAnsi, makeAnsi());
|
|
37
|
+
exports.fg = exports.ansi.fg, exports.bg = exports.ansi.bg, exports.style = exports.ansi.style, exports.reset = exports.ansi.reset, exports.caret = exports.ansi.caret, exports.erase = exports.ansi.erase, exports.scroll = exports.ansi.scroll, exports.terminal = exports.ansi.terminal;
|
|
38
|
+
exports.default = exports.ansi;
|
|
36
39
|
//# sourceMappingURL=ansi.js.map
|
package/dist/ansi.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ansi.js","sourceRoot":"","sources":["../src/ansi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ansi.js","sourceRoot":"","sources":["../src/ansi.ts"],"names":[],"mappings":";;;AAAA,mCAAwD;AACxD,mCAAwD;AACxD,yCAA2D;AAC3D,+BAAsD;AAwC9C,uFAxCA,YAAM,OAwCA;AAAE,yFAxCA,cAAQ,OAwCA;AAvCxB,qCAAyD;AACzD,+BAAsD;AACtD,yCAA2D;AAC3D,mCAAwD;AACxD,mCAAwD;AAmC9B,sFAnCR,aAAK,OAmCQ;AAAE,8FAnCR,qBAAa,OAmCQ;AAlC9C,yCAA2D;AAK3D,SAAS,QAAQ,CAAC,GAAG,IAAU;IAC9B,MAAM,QAAQ,GAAG,IAAA,sBAAW,EAAC,GAAG,IAAI,CAAC,CAAC;IAEtC,OAAO;QACN,GAAG,IAAA,aAAO,EAAC,QAAQ,CAAC;QAEpB,KAAK,EAAI,IAAA,iBAAS,EAAC,QAAQ,CAAC,KAAK,CAAC;QAClC,KAAK,EAAI,IAAA,iBAAS,EAAC,QAAQ,CAAC,KAAK,CAAC;QAClC,MAAM,EAAG,IAAA,mBAAU,EAAC,QAAQ,CAAC,MAAM,CAAC;QAEpC,QAAQ,EAAE,IAAA,uBAAY,EAAC,QAAQ,CAAC,QAAQ,CAAC;QAEzC,MAAM,EAAN,YAAM;QACN,QAAQ,EAAR,cAAQ;QAER,KAAK,EAAL,aAAK;QACL,aAAa,EAAb,qBAAa;QACb,QAAQ,EAAR,gBAAQ;QACR,KAAK,EAAL,aAAK;QACL,QAAQ,EAAR,mBAAQ;QAER,QAAQ;KACR,CAAC;AACH,CAAC;AAEY,QAAA,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,QAAQ,EAAE,QAAQ,EAAE,CAAC,CAAC;AAE1C,UAAE,GAAsD,YAAI,KAAxD,UAAE,GAAkD,YAAI,KAApD,aAAK,GAA2C,YAAI,QAA7C,aAAK,GAAoC,YAAI,QAAtC,aAAK,GAA6B,YAAI,QAA/B,aAAK,GAAsB,YAAI,QAAxB,cAAM,GAAc,YAAI,SAAhB,gBAAQ,GAAI,YAAI,UAAC;AAI3E,kBAAe,YAAI,CAAC"}
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { ColorDepth, Features } from "./types";
|
|
3
|
-
export type Args = [enabled: boolean, stream?: NodeJS.WriteStream] | [colorDepth: ColorDepth, stream?: NodeJS.WriteStream] | [features: Partial<Features>, stream?: NodeJS.WriteStream] | [socket: Socket] | [stream?: NodeJS.WriteStream];
|
|
1
|
+
import type { Args, Features } from "./types";
|
|
4
2
|
export declare function getFeatures(...args: Args): Features;
|
|
5
3
|
//# sourceMappingURL=features.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/features/features.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"features.d.ts","sourceRoot":"","sources":["../../src/features/features.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,SAAS,CAAC;AAE5C,wBAAgB,WAAW,CAAC,GAAG,IAAI,EAAE,IAAI,GAAG,QAAQ,CA6BnD"}
|
|
@@ -20,7 +20,7 @@ function getFeatures(...args) {
|
|
|
20
20
|
const { colorDepth, style, caret, erase, scroll, terminal } = features;
|
|
21
21
|
stream ?? (stream = process.stdout);
|
|
22
22
|
if (colorDepth)
|
|
23
|
-
(0, build_1.build)(stream.isTTY, colorDepth, style, caret, erase, scroll, terminal);
|
|
23
|
+
return (0, build_1.build)(stream.isTTY, colorDepth, style, caret, erase, scroll, terminal);
|
|
24
24
|
if (stream.isTTY)
|
|
25
25
|
return (0, build_1.build)(true, (0, detect_1.getColorDepth)(stream), style, caret, erase, scroll, terminal);
|
|
26
26
|
return (0, build_1.build)(false, (0, detect_1.getColorDepth)(), style, caret, erase, scroll, terminal);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features.js","sourceRoot":"","sources":["../../src/features/features.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"features.js","sourceRoot":"","sources":["../../src/features/features.ts"],"names":[],"mappings":";;AAOA,kCA6BC;AApCD,uCAA2D;AAC3D,uCAA2D;AAC3D,mCAA0D;AAC1D,qCAA2D;AAI3D,SAAgB,WAAW,CAAC,GAAG,IAAU;IACxC,IAAI,CAAC,QAAQ,EAAE,MAAM,CAAC,GAAG,IAAI,CAAC;IAE9B,IAAI,OAAO,QAAQ,KAAK,SAAS;QAChC,OAAO,IAAA,eAAO,EAAC,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAE5D,IAAI,OAAO,QAAQ,KAAK,QAAQ;QAC/B,OAAO,IAAA,cAAM,EAAC,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAE3D,IAAI,CAAC,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ;QAC5C,QAAQ,GAAG,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAEvC,IAAI,QAAQ,YAAY,sBAAW;QAClC,OAAO,IAAA,WAAG,EAAC,QAAQ,CAAC,CAAC;IAEtB,IAAI,QAAQ,YAAY,iBAAM;QAC7B,OAAO,IAAA,YAAI,GAAE,CAAC;IAEf,MAAM,EAAC,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAC,GAAG,QAAQ,CAAC;IAErE,MAAM,KAAN,MAAM,GAAK,OAAO,CAAC,MAAM,EAAC;IAE1B,IAAI,UAAU;QACb,OAAO,IAAA,aAAK,EAAC,MAAM,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAE/E,IAAI,MAAM,CAAC,KAAK;QACf,OAAO,IAAA,aAAK,EAAC,IAAI,EAAE,IAAA,sBAAa,EAAC,MAAM,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;IAElF,OAAO,IAAA,aAAK,EAAC,KAAK,EAAE,IAAA,sBAAa,GAAE,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;AAC7E,CAAC"}
|
package/dist/features/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/features/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/features/index.ts"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC;AAE3B,mBAAmB,SAAS,CAAC"}
|
package/dist/features/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Socket } from "node:net";
|
|
1
2
|
export type ColorDepth = 1 | 3 | 4 | 8 | 24;
|
|
2
3
|
export interface Features {
|
|
3
4
|
colorDepth: ColorDepth;
|
|
@@ -7,4 +8,5 @@ export interface Features {
|
|
|
7
8
|
scroll: boolean;
|
|
8
9
|
terminal: boolean;
|
|
9
10
|
}
|
|
11
|
+
export type Args = [enabled: boolean, stream?: NodeJS.WriteStream] | [colorDepth: ColorDepth, stream?: NodeJS.WriteStream] | [features: Partial<Features>, stream?: NodeJS.WriteStream] | [socket: Socket] | [stream?: NodeJS.WriteStream];
|
|
10
12
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/features/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AAE5C,MAAM,WAAW,QAAQ;IACxB,UAAU,EAAG,UAAU,CAAC;IACxB,KAAK,EAAQ,OAAO,CAAC;IACrB,KAAK,EAAQ,OAAO,CAAC;IACrB,KAAK,EAAQ,OAAO,CAAC;IACrB,MAAM,EAAO,OAAO,CAAC;IACrB,QAAQ,EAAK,OAAO,CAAC;CACrB"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/features/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,UAAU,CAAC;AAErC,MAAM,MAAM,UAAU,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;AAE5C,MAAM,WAAW,QAAQ;IACxB,UAAU,EAAG,UAAU,CAAC;IACxB,KAAK,EAAQ,OAAO,CAAC;IACrB,KAAK,EAAQ,OAAO,CAAC;IACrB,KAAK,EAAQ,OAAO,CAAC;IACrB,MAAM,EAAO,OAAO,CAAC;IACrB,QAAQ,EAAK,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,IAAI,GACb,CAAC,OAAO,EAAM,OAAO,EAAY,MAAM,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,GAC7D,CAAC,UAAU,EAAG,UAAU,EAAS,MAAM,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,GAC7D,CAAC,QAAQ,EAAK,OAAO,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,WAAW,CAAC,GAC7D,CAAC,MAAM,EAAO,MAAM,CAAC,GACrB,CAAC,MAAM,CAAC,EAAM,MAAM,CAAC,WAAW,CAAC,CAAC"}
|
package/dist/pad.d.ts
CHANGED
|
@@ -8,4 +8,6 @@ export declare const padEnd: (text: string, targetLength: number, fillString?: s
|
|
|
8
8
|
* without counting ANSI escape codes.
|
|
9
9
|
*/
|
|
10
10
|
export declare const padStart: (text: string, targetLength: number, fillString?: string) => string;
|
|
11
|
+
export type PadEnd = typeof padEnd;
|
|
12
|
+
export type PadStart = typeof padStart;
|
|
11
13
|
//# sourceMappingURL=pad.d.ts.map
|
package/dist/pad.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pad.d.ts","sourceRoot":"","sources":["../src/pad.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,EAAE,cAAc,MAAM,EAAE,mBAAgB,KAAG,MACgB,CAAC;AAE/F;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,EAAE,cAAc,MAAM,EAAE,mBAAgB,KAAG,MACc,CAAC"}
|
|
1
|
+
{"version":3,"file":"pad.d.ts","sourceRoot":"","sources":["../src/pad.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,EAAE,cAAc,MAAM,EAAE,mBAAgB,KAAG,MACgB,CAAC;AAE/F;;;GAGG;AACH,eAAO,MAAM,QAAQ,GAAI,MAAM,MAAM,EAAE,cAAc,MAAM,EAAE,mBAAgB,KAAG,MACc,CAAC;AAE/F,MAAM,MAAM,MAAM,GAAK,OAAO,MAAM,CAAC;AACrC,MAAM,MAAM,QAAQ,GAAG,OAAO,QAAQ,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ColorDepth } from "../../features";
|
|
2
|
+
import type { ChainKey, Channel, ColorKey, FormatBuilder, Style } from "../types";
|
|
3
|
+
export declare function makeChannel(keys: ReadonlySet<ChainKey>, makeFormatter: FormatBuilder, style: Style, colorDepth: ColorDepth, channel: ColorKey): Channel;
|
|
4
|
+
//# sourceMappingURL=channel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel.d.ts","sourceRoot":"","sources":["../../../src/sgr/color/channel.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,UAAU,EAAC,MAA6C,gBAAgB,CAAC;AACtF,OAAO,KAAK,EAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAC,MAAM,UAAU,CAAC;AAahF,wBAAgB,WAAW,CAC1B,IAAI,EAAY,WAAW,CAAC,QAAQ,CAAC,EACrC,aAAa,EAAG,aAAa,EAC7B,KAAK,EAAW,KAAK,EACrB,UAAU,EAAM,UAAU,EAC1B,OAAO,EAAS,QAAQ,GACtB,OAAO,CAmBT"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeChannel = makeChannel;
|
|
4
|
+
const lazy_1 = require("../lazy");
|
|
5
|
+
const context_1 = require("./context");
|
|
6
|
+
const rgb_1 = require("./rgb");
|
|
7
|
+
const colors = [
|
|
8
|
+
"black",
|
|
9
|
+
"red",
|
|
10
|
+
"green",
|
|
11
|
+
"yellow",
|
|
12
|
+
"blue",
|
|
13
|
+
"magenta",
|
|
14
|
+
"cyan",
|
|
15
|
+
"white",
|
|
16
|
+
];
|
|
17
|
+
function makeChannel(keys, makeFormatter, style, colorDepth, channel) {
|
|
18
|
+
const ctx = (0, context_1.buildContext)(keys, makeFormatter, style, colorDepth, channel);
|
|
19
|
+
const { build, bright, open, close } = ctx;
|
|
20
|
+
const rtn = {
|
|
21
|
+
rgb: (0, rgb_1.makeRGB)(ctx),
|
|
22
|
+
x256: (0, rgb_1.makeX256)(ctx),
|
|
23
|
+
default: colorDepth > 1 ? `\x1b[${close}m` : "",
|
|
24
|
+
};
|
|
25
|
+
for (let i = 0; i < colors.length; i++) {
|
|
26
|
+
const color = colors[i];
|
|
27
|
+
const brightColor = `bright${color[0].toUpperCase()}${color.slice(1)}`;
|
|
28
|
+
lazy_1.lazy.add(rtn, color, () => build(open + i));
|
|
29
|
+
lazy_1.lazy.add(rtn, brightColor, () => bright(i));
|
|
30
|
+
}
|
|
31
|
+
return rtn;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=channel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"channel.js","sourceRoot":"","sources":["../../../src/sgr/color/channel.ts"],"names":[],"mappings":";;AAkBA,kCAyBC;AA3CD,kCAA0C;AAC1C,uCAA4C;AAC5C,+BAAwC;AAKxC,MAAM,MAAM,GAAG;IACd,OAAO;IACP,KAAK;IACL,OAAO;IACP,QAAQ;IACR,MAAM;IACN,SAAS;IACT,MAAM;IACN,OAAO;CACE,CAAC;AAEX,SAAgB,WAAW,CAC1B,IAAqC,EACrC,aAA6B,EAC7B,KAAqB,EACrB,UAA0B,EAC1B,OAAwB;IAExB,MAAM,GAAG,GAAG,IAAA,sBAAY,EAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;IAC1E,MAAM,EAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAC,GAAG,GAAG,CAAC;IAEzC,MAAM,GAAG,GAAG;QACX,GAAG,EAAO,IAAA,aAAO,EAAC,GAAG,CAAC;QACtB,IAAI,EAAM,IAAA,cAAQ,EAAC,GAAG,CAAC;QACvB,OAAO,EAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,KAAK,GAAG,CAAC,CAAC,CAAC,EAAE;KACrC,CAAC;IAEb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACxC,MAAM,KAAK,GAAS,MAAM,CAAC,CAAC,CAAC,CAAC;QAC9B,MAAM,WAAW,GAAG,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;QAEvE,WAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,EAAQ,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC;QAClD,WAAI,CAAC,GAAG,CAAC,GAAG,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7C,CAAC;IAED,OAAO,GAAG,CAAC;AACZ,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { ColorDepth } from "../../features
|
|
2
|
-
import type { Color } from "
|
|
3
|
-
export
|
|
4
|
-
export declare const makeColor: (colorDepth?: ColorDepth) => Color;
|
|
1
|
+
import type { ColorDepth } from "../../features";
|
|
2
|
+
import type { ChainKey, Color, FormatBuilder, Style } from "../types";
|
|
3
|
+
export declare function makeColor(keys: ReadonlySet<ChainKey>, makeFormatter: FormatBuilder, style: Style, colorDepth: ColorDepth): Color<any>;
|
|
5
4
|
//# sourceMappingURL=color.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../src/sgr/color/color.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../../src/sgr/color/color.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAiC,gBAAgB,CAAC;AAC1E,OAAO,KAAK,EAAC,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAC,MAAM,UAAU,CAAC;AAIpE,wBAAgB,SAAS,CACxB,IAAI,EAAY,WAAW,CAAC,QAAQ,CAAC,EACrC,aAAa,EAAG,aAAa,EAC7B,KAAK,EAAW,KAAK,EACrB,UAAU,EAAM,UAAU,GACxB,KAAK,CAAC,GAAG,CAAC,CAcZ"}
|
package/dist/sgr/color/color.js
CHANGED
|
@@ -1,69 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.makeColor = void 0;
|
|
4
|
-
const sgr_1 = require("../sgr");
|
|
5
|
-
const style_1 = require("../style");
|
|
6
|
-
const utils_1 = require("./utils");
|
|
7
|
-
const fgOpen = 30, fgClose = 39;
|
|
8
|
-
const bgOpen = 40, bgClose = 49;
|
|
9
|
-
function makeChannel(colorDepth, open, close) {
|
|
10
|
-
const sgrBase = (0, sgr_1.makeSGR)(colorDepth > 1);
|
|
11
|
-
const style = (0, style_1.makeStyle)(colorDepth > 1);
|
|
12
|
-
const sgr = (code) => sgrBase(code, close);
|
|
13
|
-
const bright = colorDepth >= 4 ? index => sgr(open + 60 + index) :
|
|
14
|
-
colorDepth === 3 ?
|
|
15
|
-
open === fgOpen ?
|
|
16
|
-
index => style.bold.combine(sgr(open + index)) :
|
|
17
|
-
index => sgr(open + index) :
|
|
18
|
-
() => sgr(0);
|
|
19
|
-
const x16ToX8 = open === fgOpen ?
|
|
20
|
-
code => code >= 60 ? style.bold.combine(sgr(open + code - 60)) : sgr(open + code) :
|
|
21
|
-
code => code >= 60 ? sgr(open + code - 60) : sgr(open + code);
|
|
22
|
-
return {
|
|
23
|
-
black: sgr(open + 0),
|
|
24
|
-
red: sgr(open + 1),
|
|
25
|
-
green: sgr(open + 2),
|
|
26
|
-
yellow: sgr(open + 3),
|
|
27
|
-
blue: sgr(open + 4),
|
|
28
|
-
magenta: sgr(open + 5),
|
|
29
|
-
cyan: sgr(open + 6),
|
|
30
|
-
white: sgr(open + 7),
|
|
31
|
-
brightBlack: bright(0),
|
|
32
|
-
brightRed: bright(1),
|
|
33
|
-
brightGreen: bright(2),
|
|
34
|
-
brightYellow: bright(3),
|
|
35
|
-
brightBlue: bright(4),
|
|
36
|
-
brightMagenta: bright(5),
|
|
37
|
-
brightCyan: bright(6),
|
|
38
|
-
brightWhite: bright(7),
|
|
39
|
-
rgb: colorDepth >= 24 ? (r, g, b) => sgr([open + 8, 2, ...(0, utils_1.clip)(r, g, b)]) :
|
|
40
|
-
colorDepth >= 8 ? (r, g, b) => sgr([open + 8, 5, (0, utils_1.rgbToX256)(...(0, utils_1.clip)(r, g, b))]) :
|
|
41
|
-
colorDepth >= 4 ? (r, g, b) => sgr(open + (0, utils_1.rgbToX16)(...(0, utils_1.clip)(r, g, b))) :
|
|
42
|
-
colorDepth === 3 ?
|
|
43
|
-
open === fgOpen ?
|
|
44
|
-
(r, g, b) => x16ToX8((0, utils_1.rgbToX16)(...(0, utils_1.clip)(r, g, b))) :
|
|
45
|
-
(r, g, b) => sgr(open + (0, utils_1.rgbToX8)(...(0, utils_1.clip)(r, g, b))) :
|
|
46
|
-
() => sgr(0),
|
|
47
|
-
x256: colorDepth >= 8 ?
|
|
48
|
-
(...args) => sgr([open + 8, 5, args.length === 3 ? (0, utils_1.rgbToX256)(...(0, utils_1.clip)(...args)) : (0, utils_1.clip)(args[0])]) :
|
|
49
|
-
colorDepth >= 4 ?
|
|
50
|
-
(...args) => sgr(open +
|
|
51
|
-
(0, utils_1.rgbToX16)(...(args.length === 3 ? (0, utils_1.clip)(...args) : (0, utils_1.x256ToRgb)((0, utils_1.clip)(args[0]))))) :
|
|
52
|
-
colorDepth === 3 ?
|
|
53
|
-
open === fgOpen ?
|
|
54
|
-
(...args) => x16ToX8(args.length === 3
|
|
55
|
-
? (0, utils_1.rgbToX16)(...(0, utils_1.clip)(...args))
|
|
56
|
-
: (0, utils_1.rgbToX16)(...(0, utils_1.x256ToRgb)((0, utils_1.clip)(args[0])))) :
|
|
57
|
-
(...args) => sgr(open +
|
|
58
|
-
(0, utils_1.rgbToX8)(...args.length === 3 ? (0, utils_1.clip)(...args) : (0, utils_1.x256ToRgb)((0, utils_1.clip)(args[0])))) :
|
|
59
|
-
() => sgr(0),
|
|
60
|
-
default: colorDepth > 1 ? `\x1b[${close}m` : "",
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
const cache = {};
|
|
64
|
-
const makeColor = (colorDepth = 4) => cache[colorDepth] ?? (cache[colorDepth] = {
|
|
65
|
-
fg: makeChannel(colorDepth, fgOpen, fgClose),
|
|
66
|
-
bg: makeChannel(colorDepth, bgOpen, bgClose),
|
|
67
|
-
});
|
|
68
3
|
exports.makeColor = makeColor;
|
|
4
|
+
const lazy_1 = require("../lazy");
|
|
5
|
+
const channel_1 = require("./channel");
|
|
6
|
+
const channels = ["fg", "bg"];
|
|
7
|
+
function makeColor(keys, makeFormatter, style, colorDepth) {
|
|
8
|
+
const rtn = {};
|
|
9
|
+
for (const channel of channels) {
|
|
10
|
+
if (keys.has(channel)) {
|
|
11
|
+
lazy_1.lazy.add(rtn, channel, () => {
|
|
12
|
+
const newKeys = new Set(keys);
|
|
13
|
+
newKeys.delete(channel);
|
|
14
|
+
return (0, channel_1.makeChannel)(newKeys, makeFormatter, style, colorDepth, channel);
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
return rtn;
|
|
19
|
+
}
|
|
69
20
|
//# sourceMappingURL=color.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"color.js","sourceRoot":"","sources":["../../../src/sgr/color/color.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"color.js","sourceRoot":"","sources":["../../../src/sgr/color/color.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAUb,8BAmBC;AA3BD,kCAAoC;AACpC,uCAAsC;AAKtC,MAAM,QAAQ,GAAG,CAAC,IAAI,EAAE,IAAI,CAAU,CAAC;AAEvC,SAAgB,SAAS,CACxB,IAAqC,EACrC,aAA6B,EAC7B,KAAqB,EACrB,UAA0B;IAE1B,MAAM,GAAG,GAAG,EAAgB,CAAC;IAE7B,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;QAChC,IAAI,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;YACvB,WAAI,CAAC,GAAG,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE;gBAC3B,MAAM,OAAO,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,CAAC;gBAC9B,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;gBACxB,OAAO,IAAA,qBAAW,EAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;YACxE,CAAC,CAAC,CAAC;QACJ,CAAC;IACF,CAAC;IAED,OAAO,GAAG,CAAC;AACZ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ColorDepth } from "../../features";
|
|
2
|
+
import type { ChainKey, Code, ColorKey, Format, FormatBuilder, Style } from "../types";
|
|
3
|
+
export declare function buildContext(keys: ReadonlySet<ChainKey>, makeFormatter: FormatBuilder, style: Style, colorDepth: ColorDepth, channel: ColorKey): {
|
|
4
|
+
colorDepth: ColorDepth;
|
|
5
|
+
channel: ColorKey;
|
|
6
|
+
open: number;
|
|
7
|
+
close: number;
|
|
8
|
+
build: (open: Code) => Format;
|
|
9
|
+
bright: (index: number) => Format;
|
|
10
|
+
x16ToX8: (code: number) => Format;
|
|
11
|
+
};
|
|
12
|
+
export type Context = ReturnType<typeof buildContext>;
|
|
13
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/sgr/color/context.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAc,aAAa,EAAE,KAAK,EAAC,MAAM,UAAU,CAAC;AAOjG,wBAAgB,YAAY,CAC3B,IAAI,EAAY,WAAW,CAAC,QAAQ,CAAC,EACrC,aAAa,EAAG,aAAa,EAC7B,KAAK,EAAW,KAAK,EACrB,UAAU,EAAM,UAAU,EAC1B,OAAO,EAAS,QAAQ;;;;;kBAIH,IAAI,KAAG,MAAM;oBAQZ,MAAM,KAAK,MAAM;oBAQjB,MAAM,KAAK,MAAM;EAMvC;AAED,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.buildContext = buildContext;
|
|
4
|
+
const combine_1 = require("../combine");
|
|
5
|
+
const baseCodes = {
|
|
6
|
+
fg: { open: 30, close: 39 },
|
|
7
|
+
bg: { open: 40, close: 49 },
|
|
8
|
+
};
|
|
9
|
+
function buildContext(keys, makeFormatter, style, colorDepth, channel) {
|
|
10
|
+
const { open, close } = baseCodes[channel];
|
|
11
|
+
const build = (open) => makeFormatter(keys, open, close);
|
|
12
|
+
const combine = (base, style) => makeFormatter(keys, (0, combine_1.combineCodes)(base.codes.open, style.codes.open), (0, combine_1.combineCodes)(base.codes.close, style.codes.close));
|
|
13
|
+
const bright = colorDepth >= 4 ? index => build(open + 60 + index) :
|
|
14
|
+
colorDepth === 3 ?
|
|
15
|
+
channel === "fg" ?
|
|
16
|
+
index => combine(style.bold, build(open + index)) :
|
|
17
|
+
index => build(open + index) :
|
|
18
|
+
() => build(0);
|
|
19
|
+
const x16ToX8 = channel === "fg" ?
|
|
20
|
+
code => code >= 60 ? combine(style.bold, build(open + code - 60)) : build(open + code) :
|
|
21
|
+
code => code >= 60 ? build(open + code - 60) : build(open + code);
|
|
22
|
+
return { colorDepth, channel, open, close, build, bright, x16ToX8 };
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../src/sgr/color/context.ts"],"names":[],"mappings":";;AAUA,oCA+BC;AAzCD,wCAAwC;AAKxC,MAAM,SAAS,GAAG;IACjB,EAAE,E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AC,CAAC;QACjB,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC;QACxF,IAAI,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAEpE,OAAO,EAAC,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAC,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Channel, Format } from "../types";
|
|
2
|
+
import type { Context } from "./context";
|
|
3
|
+
export declare function makeRGB(ctx: Context): Channel["rgb"];
|
|
4
|
+
export declare function makeX256(ctx: Context): (...args: [number] | [number, number, number]) => Format;
|
|
5
|
+
//# sourceMappingURL=rgb.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rgb.d.ts","sourceRoot":"","sources":["../../../src/sgr/color/rgb.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,OAAO,EAAE,MAAM,EAAC,MAAM,UAAU,CAAC;AAC9C,OAAO,KAAK,EAAC,OAAO,EAAC,MAAc,WAAW,CAAC;AAE/C,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,CAapD;AAED,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,CAAC,GAAG,IAAI,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,KAAK,MAAM,CA2B/F"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.makeRGB = makeRGB;
|
|
4
|
+
exports.makeX256 = makeX256;
|
|
5
|
+
const utils_1 = require("./utils");
|
|
6
|
+
function makeRGB(ctx) {
|
|
7
|
+
const { colorDepth, channel, build, open, x16ToX8 } = ctx;
|
|
8
|
+
return (colorDepth >= 24 ? (r, g, b) => build([open + 8, 2, ...(0, utils_1.clip)(r, g, b)]) :
|
|
9
|
+
colorDepth >= 8 ? (r, g, b) => build([open + 8, 5, (0, utils_1.rgbToX256)(...(0, utils_1.clip)(r, g, b))]) :
|
|
10
|
+
colorDepth >= 4 ? (r, g, b) => build(open + (0, utils_1.rgbToX16)(...(0, utils_1.clip)(r, g, b))) :
|
|
11
|
+
colorDepth === 3 ?
|
|
12
|
+
channel === "fg" ?
|
|
13
|
+
(r, g, b) => x16ToX8((0, utils_1.rgbToX16)(...(0, utils_1.clip)(r, g, b))) :
|
|
14
|
+
(r, g, b) => build(open + (0, utils_1.rgbToX8)(...(0, utils_1.clip)(r, g, b))) :
|
|
15
|
+
() => build(0));
|
|
16
|
+
}
|
|
17
|
+
function makeX256(ctx) {
|
|
18
|
+
const { colorDepth, channel, build, open, x16ToX8 } = ctx;
|
|
19
|
+
return (colorDepth >= 8 ?
|
|
20
|
+
(...args) => build([open + 8, 5, args.length === 3 ? (0, utils_1.rgbToX256)(...(0, utils_1.clip)(...args)) : (0, utils_1.clip)(args[0])]) :
|
|
21
|
+
colorDepth >= 4 ?
|
|
22
|
+
(...args) => build(open +
|
|
23
|
+
(0, utils_1.rgbToX16)(...(args.length === 3 ? (0, utils_1.clip)(...args) : (0, utils_1.x256ToRgb)((0, utils_1.clip)(args[0]))))) :
|
|
24
|
+
colorDepth === 3 ?
|
|
25
|
+
channel === "fg" ?
|
|
26
|
+
(...args) => x16ToX8(args.length === 3 ?
|
|
27
|
+
(0, utils_1.rgbToX16)(...(0, utils_1.clip)(...args)) :
|
|
28
|
+
(0, utils_1.rgbToX16)(...(0, utils_1.x256ToRgb)((0, utils_1.clip)(args[0])))) :
|
|
29
|
+
(...args) => build(open + (0, utils_1.rgbToX8)(...args.length === 3 ? (0, utils_1.clip)(...args) : (0, utils_1.x256ToRgb)((0, utils_1.clip)(args[0])))) :
|
|
30
|
+
() => build(0));
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=rgb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rgb.js","sourceRoot":"","sources":["../../../src/sgr/color/rgb.ts"],"names":[],"mappings":";;AAKA,0BAaC;AAED,4BA2BC;AA/CD,mCAAsE;AAKtE,SAAgB,OAAO,CAAC,GAAY;IACnC,MAAM,EAAC,UAAU,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAC,GAAG,GAAG,CAAC;IAExD,OAAO,CACN,UAAU,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,EAAE,GAAG,IAAA,YAAI,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACxE,UAAU,IAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,IAAI,GAAG,CAAC,EAAE,CAAC,EAAE,IAAA,iBAAS,EAAC,GAAG,IAAA,YAAI,EAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACnF,UAAU,IAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,GAAG,IAAA,gBAAQ,EAAC,GAAG,IAAA,YAAI,E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;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/sgr/color/utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,SAAS,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAajE;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAYhE;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAiBhE;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAM/D;AAED,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;AACxC,wBAAgB,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/sgr/color/utils.ts"],"names":[],"mappings":";;AAAA,8BAaC;AAED,8BAYC;AAED,
|
|
1
|
+
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/sgr/color/utils.ts"],"names":[],"mappings":";;AAAA,8BAaC;AAED,8BAYC;AAED,4BAiBC;AAED,0BAMC;AAID,oBAQC;AAlED,SAAgB,SAAS,CAAC,CAAS,EAAE,CAAS,EAAE,CAAS;IACxD,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CA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