@visulima/colorize 1.4.27 → 1.4.29

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.
Files changed (77) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/ansi-codes.d.cts +18 -0
  3. package/dist/ansi-codes.d.mts +18 -0
  4. package/dist/ansi-codes.d.ts +18 -0
  5. package/dist/colorize.browser.d.mts +3 -0
  6. package/dist/colorize.server.d.cts +10 -0
  7. package/dist/colorize.server.d.mts +10 -0
  8. package/dist/colorize.server.d.ts +10 -0
  9. package/dist/css-code.d.mts +11 -0
  10. package/dist/gradient/gradient-builder.d.cts +10 -0
  11. package/dist/gradient/gradient-builder.d.mts +10 -0
  12. package/dist/gradient/gradient-builder.d.ts +10 -0
  13. package/dist/gradient/util/color-names.d.cts +2 -0
  14. package/dist/gradient/util/color-names.d.mts +2 -0
  15. package/dist/gradient/util/color-names.d.ts +2 -0
  16. package/dist/gradient/util/compute.d.cts +2 -0
  17. package/dist/gradient/util/compute.d.mts +2 -0
  18. package/dist/gradient/util/compute.d.ts +2 -0
  19. package/dist/gradient/util/hsv-to-rgb.d.cts +5 -0
  20. package/dist/gradient/util/hsv-to-rgb.d.mts +5 -0
  21. package/dist/gradient/util/hsv-to-rgb.d.ts +5 -0
  22. package/dist/gradient/util/interpolate.d.cts +3 -0
  23. package/dist/gradient/util/interpolate.d.mts +3 -0
  24. package/dist/gradient/util/interpolate.d.ts +3 -0
  25. package/dist/gradient/util/rgb-to-hsv.d.cts +9 -0
  26. package/dist/gradient/util/rgb-to-hsv.d.mts +9 -0
  27. package/dist/gradient/util/rgb-to-hsv.d.ts +9 -0
  28. package/dist/gradient.d.cts +4 -16
  29. package/dist/gradient.d.mts +4 -16
  30. package/dist/gradient.d.ts +4 -16
  31. package/dist/index.browser.d.mts +60 -64
  32. package/dist/index.browser.mjs +56 -58
  33. package/dist/index.server.cjs +3 -6
  34. package/dist/index.server.d.cts +7 -73
  35. package/dist/index.server.d.mts +60 -64
  36. package/dist/index.server.d.ts +8 -65
  37. package/dist/index.server.mjs +56 -58
  38. package/dist/template/make-colorize-template.d.cts +9 -0
  39. package/dist/template/make-colorize-template.d.mts +9 -0
  40. package/dist/template/make-colorize-template.d.ts +9 -0
  41. package/dist/template/make-template.d.cts +10 -0
  42. package/dist/template/make-template.d.mts +10 -0
  43. package/dist/template/make-template.d.ts +10 -0
  44. package/dist/template.cjs +2 -2
  45. package/dist/template.d.cts +5 -11
  46. package/dist/template.d.mts +5 -7
  47. package/dist/template.d.ts +5 -11
  48. package/dist/template.mjs +2 -2
  49. package/dist/types.d.cts +174 -0
  50. package/dist/types.d.mts +174 -0
  51. package/dist/types.d.ts +174 -0
  52. package/dist/util/ansi-code-hex-map.d.mts +8 -0
  53. package/dist/util/clamp.d.cts +12 -0
  54. package/dist/util/clamp.d.mts +12 -0
  55. package/dist/util/clamp.d.ts +12 -0
  56. package/dist/util/convert-hex-to-rgb.d.cts +22 -0
  57. package/dist/util/convert-hex-to-rgb.d.mts +22 -0
  58. package/dist/util/convert-hex-to-rgb.d.ts +22 -0
  59. package/dist/util/convert-rgb-to-ansi.d.cts +18 -0
  60. package/dist/util/convert-rgb-to-ansi.d.mts +18 -0
  61. package/dist/util/convert-rgb-to-ansi.d.ts +18 -0
  62. package/dist/util/string-replace-all.d.cts +12 -0
  63. package/dist/util/string-replace-all.d.mts +12 -0
  64. package/dist/util/string-replace-all.d.ts +12 -0
  65. package/dist/util/unescape.d.cts +9 -0
  66. package/dist/util/unescape.d.mts +9 -0
  67. package/dist/util/unescape.d.ts +9 -0
  68. package/dist/utils.d.cts +2 -9
  69. package/dist/utils.d.mts +2 -9
  70. package/dist/utils.d.ts +2 -9
  71. package/package.json +2 -2
  72. package/dist/index.browser.d.ts +0 -65
  73. package/dist/packem_shared/types-CuuGv4d0.d.cts +0 -81
  74. package/dist/packem_shared/types-CuuGv4d0.d.mts +0 -81
  75. package/dist/packem_shared/types-CuuGv4d0.d.ts +0 -81
  76. package/dist/packem_shared/types-M28Oe2t1.d.mts +0 -67
  77. package/dist/packem_shared/types-M28Oe2t1.d.ts +0 -67
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copy of https://github.com/Qix-/color-convert/blob/master/conversions.js#L551
3
+ *
4
+ * MIT License
5
+ *
6
+ * Copyright (c) 2011-2016 Heather Arthur <fayearthur@gmail.com>.
7
+ * Copyright (c) 2016-2021 Josh Junon <josh@junon.me>.
8
+ */
9
+ /**
10
+ * Convert RGB values to approximate code of ANSI 256 colors.
11
+ *
12
+ */
13
+ export declare const rgbToAnsi256: (r: number, g: number, b: number) => number;
14
+ /**
15
+ * Convert ANSI 256 color code to approximate code of ANSI 16 colors.
16
+ */
17
+ export declare const ansi256To16: (code: number) => number;
18
+ export declare const rgbToAnsi16: (r: number, g: number, b: number) => number;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Copy of https://github.com/Qix-/color-convert/blob/master/conversions.js#L551
3
+ *
4
+ * MIT License
5
+ *
6
+ * Copyright (c) 2011-2016 Heather Arthur <fayearthur@gmail.com>.
7
+ * Copyright (c) 2016-2021 Josh Junon <josh@junon.me>.
8
+ */
9
+ /**
10
+ * Convert RGB values to approximate code of ANSI 256 colors.
11
+ *
12
+ */
13
+ export declare const rgbToAnsi256: (r: number, g: number, b: number) => number;
14
+ /**
15
+ * Convert ANSI 256 color code to approximate code of ANSI 16 colors.
16
+ */
17
+ export declare const ansi256To16: (code: number) => number;
18
+ export declare const rgbToAnsi16: (r: number, g: number, b: number) => number;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Modified copy of https://github.com/webdiscus/ansis/blob/master/src/utils.js
3
+ *
4
+ * ISC License
5
+ *
6
+ * Copyright (c) 2023, webdiscus
7
+ */
8
+ /**
9
+ * Replace all matched strings.
10
+ * Note: this implementation is over 30% faster than String.replaceAll().
11
+ */
12
+ export declare const stringReplaceAll: (string_: string, searchValue: string, replaceValue: string) => string;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Modified copy of https://github.com/webdiscus/ansis/blob/master/src/utils.js
3
+ *
4
+ * ISC License
5
+ *
6
+ * Copyright (c) 2023, webdiscus
7
+ */
8
+ /**
9
+ * Replace all matched strings.
10
+ * Note: this implementation is over 30% faster than String.replaceAll().
11
+ */
12
+ export declare const stringReplaceAll: (string_: string, searchValue: string, replaceValue: string) => string;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Modified copy of https://github.com/webdiscus/ansis/blob/master/src/utils.js
3
+ *
4
+ * ISC License
5
+ *
6
+ * Copyright (c) 2023, webdiscus
7
+ */
8
+ /**
9
+ * Replace all matched strings.
10
+ * Note: this implementation is over 30% faster than String.replaceAll().
11
+ */
12
+ export declare const stringReplaceAll: (string_: string, searchValue: string, replaceValue: string) => string;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Modified copy of https://github.com/chalk/chalk-template/blob/main/index.js
3
+ *
4
+ * MIT License
5
+ *
6
+ * Copyright (c) Josh Junon
7
+ * Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
8
+ */
9
+ export declare const unescape: (c: string) => string;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Modified copy of https://github.com/chalk/chalk-template/blob/main/index.js
3
+ *
4
+ * MIT License
5
+ *
6
+ * Copyright (c) Josh Junon
7
+ * Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
8
+ */
9
+ export declare const unescape: (c: string) => string;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Modified copy of https://github.com/chalk/chalk-template/blob/main/index.js
3
+ *
4
+ * MIT License
5
+ *
6
+ * Copyright (c) Josh Junon
7
+ * Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
8
+ */
9
+ export declare const unescape: (c: string) => string;
package/dist/utils.d.cts CHANGED
@@ -1,9 +1,2 @@
1
- import { a as ColorValueHex } from './packem_shared/types-CuuGv4d0.cjs';
2
-
3
- declare const convertHexToRgb: (hex: ColorValueHex | string) => [number, number, number];
4
-
5
- declare const rgbToAnsi256: (r: number, g: number, b: number) => number;
6
- declare const ansi256To16: (code: number) => number;
7
- declare const rgbToAnsi16: (r: number, g: number, b: number) => number;
8
-
9
- export { ansi256To16, convertHexToRgb, rgbToAnsi16, rgbToAnsi256 };
1
+ export { convertHexToRgb } from "./util/convert-hex-to-rgb.d.cts";
2
+ export { ansi256To16, rgbToAnsi16, rgbToAnsi256 } from "./util/convert-rgb-to-ansi.d.cts";
package/dist/utils.d.mts CHANGED
@@ -1,9 +1,2 @@
1
- import { a as ColorValueHex } from './packem_shared/types-CuuGv4d0.mjs';
2
-
3
- declare const convertHexToRgb: (hex: ColorValueHex | string) => [number, number, number];
4
-
5
- declare const rgbToAnsi256: (r: number, g: number, b: number) => number;
6
- declare const ansi256To16: (code: number) => number;
7
- declare const rgbToAnsi16: (r: number, g: number, b: number) => number;
8
-
9
- export { ansi256To16, convertHexToRgb, rgbToAnsi16, rgbToAnsi256 };
1
+ export { convertHexToRgb } from "./util/convert-hex-to-rgb.d.mts";
2
+ export { ansi256To16, rgbToAnsi16, rgbToAnsi256 } from "./util/convert-rgb-to-ansi.d.mts";
package/dist/utils.d.ts CHANGED
@@ -1,9 +1,2 @@
1
- import { a as ColorValueHex } from './packem_shared/types-CuuGv4d0.js';
2
-
3
- declare const convertHexToRgb: (hex: ColorValueHex | string) => [number, number, number];
4
-
5
- declare const rgbToAnsi256: (r: number, g: number, b: number) => number;
6
- declare const ansi256To16: (code: number) => number;
7
- declare const rgbToAnsi16: (r: number, g: number, b: number) => number;
8
-
9
- export { ansi256To16, convertHexToRgb, rgbToAnsi16, rgbToAnsi256 };
1
+ export { convertHexToRgb } from "./util/convert-hex-to-rgb.d.ts";
2
+ export { ansi256To16, rgbToAnsi16, rgbToAnsi256 } from "./util/convert-rgb-to-ansi.d.ts";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visulima/colorize",
3
- "version": "1.4.27",
3
+ "version": "1.4.29",
4
4
  "description": "Terminal and Console string styling done right.",
5
5
  "keywords": [
6
6
  "256",
@@ -165,7 +165,7 @@
165
165
  "LICENSE.md"
166
166
  ],
167
167
  "dependencies": {
168
- "@visulima/is-ansi-color-supported": "2.3.3"
168
+ "@visulima/is-ansi-color-supported": "2.3.5"
169
169
  },
170
170
  "engines": {
171
171
  "node": ">=18.0.0 <=25.x"
@@ -1,65 +0,0 @@
1
- import { C as ColorizeType, a as ColorValueHex } from './packem_shared/types-M28Oe2t1.js';
2
- export { A as AnsiColors, b as AnsiStyles } from './packem_shared/types-M28Oe2t1.js';
3
-
4
- declare const WebColorize: new () => ColorizeType;
5
-
6
- declare const _default: ColorizeType;
7
-
8
- declare const ansi256: (code: number) => ColorizeType;
9
- declare const bg: (code: number) => ColorizeType;
10
- declare const bgAnsi256: (code: number) => ColorizeType;
11
- declare const bgBlack: ColorizeType;
12
- declare const bgBlackBright: ColorizeType;
13
- declare const bgBlue: ColorizeType;
14
- declare const bgBlueBright: ColorizeType;
15
- declare const bgCyan: ColorizeType;
16
- declare const bgCyanBright: ColorizeType;
17
- declare const bgGray: ColorizeType;
18
- declare const bgGreen: ColorizeType;
19
- declare const bgGreenBright: ColorizeType;
20
- declare const bgGrey: ColorizeType;
21
- declare const bgHex: (color: ColorValueHex) => ColorizeType;
22
- declare const bgMagenta: ColorizeType;
23
- declare const bgMagentaBright: ColorizeType;
24
- declare const bgRed: ColorizeType;
25
- declare const bgRedBright: ColorizeType;
26
- declare const bgRgb: (red: number, green: number, blue: number) => ColorizeType;
27
- declare const bgWhite: ColorizeType;
28
- declare const bgWhiteBright: ColorizeType;
29
- declare const bgYellow: ColorizeType;
30
- declare const bgYellowBright: ColorizeType;
31
- declare const black: ColorizeType;
32
- declare const blackBright: ColorizeType;
33
- declare const blue: ColorizeType;
34
- declare const blueBright: ColorizeType;
35
- declare const bold: ColorizeType;
36
- declare const cyan: ColorizeType;
37
- declare const cyanBright: ColorizeType;
38
- declare const dim: ColorizeType;
39
- declare const fg: (code: number) => ColorizeType;
40
- declare const gray: ColorizeType;
41
- declare const green: ColorizeType;
42
- declare const greenBright: ColorizeType;
43
- declare const grey: ColorizeType;
44
- declare const hex: (color: ColorValueHex) => ColorizeType;
45
- declare const hidden: ColorizeType;
46
- declare const inverse: ColorizeType;
47
- declare const italic: ColorizeType;
48
- declare const magenta: ColorizeType;
49
- declare const magentaBright: ColorizeType;
50
- declare const overline: ColorizeType;
51
- declare const red: ColorizeType;
52
- declare const redBright: ColorizeType;
53
- declare const reset: ColorizeType;
54
- declare const rgb: (red: number, green: number, blue: number) => ColorizeType;
55
- declare const strike: ColorizeType;
56
- declare const strikethrough: ColorizeType;
57
- declare const strip: (string: string) => string;
58
- declare const underline: ColorizeType;
59
- declare const visible: ColorizeType;
60
- declare const white: ColorizeType;
61
- declare const whiteBright: ColorizeType;
62
- declare const yellow: ColorizeType;
63
- declare const yellowBright: ColorizeType;
64
-
65
- export { WebColorize as Colorize, ColorizeType, ansi256, bg, bgAnsi256, bgBlack, bgBlackBright, bgBlue, bgBlueBright, bgCyan, bgCyanBright, bgGray, bgGreen, bgGreenBright, bgGrey, bgHex, bgMagenta, bgMagentaBright, bgRed, bgRedBright, bgRgb, bgWhite, bgWhiteBright, bgYellow, bgYellowBright, black, blackBright, blue, blueBright, bold, cyan, cyanBright, _default as default, dim, fg, gray, green, greenBright, grey, hex, hidden, inverse, italic, magenta, magentaBright, overline, red, redBright, reset, rgb, strike, strikethrough, strip, underline, visible, white, whiteBright, yellow, yellowBright };
@@ -1,81 +0,0 @@
1
- type ColorValueHex = `#${string}`;
2
- interface ColorizeType {
3
- (string: number | string): string;
4
- (string: TemplateStringsArray, ...parameters: string[]): string;
5
- ansi256: (code: number) => this;
6
- bg: (code: number) => this;
7
- bgAnsi256: (code: number) => this;
8
- readonly bgBlack: this;
9
- readonly bgBlackBright: this;
10
- readonly bgBlue: this;
11
- readonly bgBlueBright: this;
12
- readonly bgCyan: this;
13
- readonly bgCyanBright: this;
14
- readonly bgGray: this;
15
- readonly bgGreen: this;
16
- readonly bgGreenBright: this;
17
- readonly bgGrey: this;
18
- bgHex: (color: ColorValueHex) => this;
19
- readonly bgMagenta: this;
20
- readonly bgMagentaBright: this;
21
- readonly bgRed: this;
22
- readonly bgRedBright: this;
23
- bgRgb: (red: number, green: number, blue: number) => this;
24
- readonly bgWhite: this;
25
- readonly bgWhiteBright: this;
26
- readonly bgYellow: this;
27
- readonly bgYellowBright: this;
28
- readonly black: this;
29
- readonly blackBright: this;
30
- readonly blue: this;
31
- readonly blueBright: this;
32
- readonly bold: this;
33
- readonly close: string;
34
- readonly cyan: this;
35
- readonly cyanBright: this;
36
- readonly dim: this;
37
- fg: (code: number) => this;
38
- readonly gray: this;
39
- readonly green: this;
40
- readonly greenBright: this;
41
- readonly grey: this;
42
- hex: (color: ColorValueHex) => this;
43
- readonly hidden: this;
44
- readonly inverse: this;
45
- readonly italic: this;
46
- readonly magenta: this;
47
- readonly magentaBright: this;
48
- readonly open: string;
49
- readonly overline: this;
50
- readonly red: this;
51
- readonly redBright: this;
52
- readonly reset: this;
53
- rgb: (red: number, green: number, blue: number) => this;
54
- readonly strike: this;
55
- readonly strikethrough: this;
56
- strip: (string: string) => string;
57
- readonly underline: this;
58
- readonly visible: this;
59
- readonly white: this;
60
- readonly whiteBright: this;
61
- readonly yellow: this;
62
- readonly yellowBright: this;
63
- }
64
- type CssColorName = "aliceblue" | "antiquewhite" | "aqua" | "aquamarine" | "azure" | "beige" | "bisque" | "black" | "blanchedalmond" | "blue" | "blueviolet" | "brown" | "burlywood" | "cadetblue" | "chartreuse" | "chocolate" | "coral" | "cornflowerblue" | "cornsilk" | "crimson" | "cyan" | "darkblue" | "darkcyan" | "darkgoldenrod" | "darkgray" | "darkgreen" | "darkgrey" | "darkkhaki" | "darkmagenta" | "darkolivegreen" | "darkorange" | "darkorchid" | "darkred" | "darksalmon" | "darkseagreen" | "darkslateblue" | "darkslategray" | "darkslategrey" | "darkturquoise" | "darkviolet" | "deeppink" | "deepskyblue" | "dimgray" | "dimgrey" | "dodgerblue" | "firebrick" | "floralwhite" | "forestgreen" | "fuchsia" | "gainsboro" | "ghostwhite" | "gold" | "goldenrod" | "gray" | "green" | "greenyellow" | "grey" | "honeydew" | "hotpink" | "indianred" | "indigo" | "ivory" | "khaki" | "lavender" | "lavenderblush" | "lawngreen" | "lemonchiffon" | "lightblue" | "lightcoral" | "lightcyan" | "lightgoldenrodyellow" | "lightgray" | "lightgreen" | "lightgrey" | "lightpink" | "lightsalmon" | "lightseagreen" | "lightskyblue" | "lightslategray" | "lightslategrey" | "lightsteelblue" | "lightyellow" | "lime" | "limegreen" | "linen" | "magenta" | "maroon" | "mediumaquamarine" | "mediumblue" | "mediumorchid" | "mediumpurple" | "mediumseagreen" | "mediumslateblue" | "mediumspringgreen" | "mediumturquoise" | "mediumvioletred" | "midnightblue" | "mintcream" | "mistyrose" | "moccasin" | "navajowhite" | "navy" | "oldlace" | "olive" | "olivedrab" | "orange" | "orangered" | "orchid" | "palegoldenrod" | "palegreen" | "paleturquoise" | "palevioletred" | "papayawhip" | "peachpuff" | "peru" | "pink" | "plum" | "powderblue" | "purple" | "rebeccapurple" | "red" | "rosybrown" | "royalblue" | "saddlebrown" | "salmon" | "sandybrown" | "seagreen" | "seashell" | "sienna" | "silver" | "skyblue" | "slateblue" | "slategray" | "slategrey" | "snow" | "springgreen" | "steelblue" | "tan" | "teal" | "thistle" | "tomato" | "turquoise" | "violet" | "wheat" | "white" | "whitesmoke" | "yellow" | "yellowgreen";
65
- type StopInput = {
66
- color?: ColorValueHex | CssColorName | RGB | [number, number, number];
67
- colorLess?: boolean;
68
- position: number;
69
- };
70
- type StopOutput = {
71
- color: [number, number, number] | undefined;
72
- colorLess?: boolean;
73
- position: number;
74
- };
75
- type RGB = {
76
- b: number;
77
- g: number;
78
- r: number;
79
- };
80
-
81
- export type { ColorizeType as C, RGB as R, StopOutput as S, ColorValueHex as a, CssColorName as b, StopInput as c };
@@ -1,81 +0,0 @@
1
- type ColorValueHex = `#${string}`;
2
- interface ColorizeType {
3
- (string: number | string): string;
4
- (string: TemplateStringsArray, ...parameters: string[]): string;
5
- ansi256: (code: number) => this;
6
- bg: (code: number) => this;
7
- bgAnsi256: (code: number) => this;
8
- readonly bgBlack: this;
9
- readonly bgBlackBright: this;
10
- readonly bgBlue: this;
11
- readonly bgBlueBright: this;
12
- readonly bgCyan: this;
13
- readonly bgCyanBright: this;
14
- readonly bgGray: this;
15
- readonly bgGreen: this;
16
- readonly bgGreenBright: this;
17
- readonly bgGrey: this;
18
- bgHex: (color: ColorValueHex) => this;
19
- readonly bgMagenta: this;
20
- readonly bgMagentaBright: this;
21
- readonly bgRed: this;
22
- readonly bgRedBright: this;
23
- bgRgb: (red: number, green: number, blue: number) => this;
24
- readonly bgWhite: this;
25
- readonly bgWhiteBright: this;
26
- readonly bgYellow: this;
27
- readonly bgYellowBright: this;
28
- readonly black: this;
29
- readonly blackBright: this;
30
- readonly blue: this;
31
- readonly blueBright: this;
32
- readonly bold: this;
33
- readonly close: string;
34
- readonly cyan: this;
35
- readonly cyanBright: this;
36
- readonly dim: this;
37
- fg: (code: number) => this;
38
- readonly gray: this;
39
- readonly green: this;
40
- readonly greenBright: this;
41
- readonly grey: this;
42
- hex: (color: ColorValueHex) => this;
43
- readonly hidden: this;
44
- readonly inverse: this;
45
- readonly italic: this;
46
- readonly magenta: this;
47
- readonly magentaBright: this;
48
- readonly open: string;
49
- readonly overline: this;
50
- readonly red: this;
51
- readonly redBright: this;
52
- readonly reset: this;
53
- rgb: (red: number, green: number, blue: number) => this;
54
- readonly strike: this;
55
- readonly strikethrough: this;
56
- strip: (string: string) => string;
57
- readonly underline: this;
58
- readonly visible: this;
59
- readonly white: this;
60
- readonly whiteBright: this;
61
- readonly yellow: this;
62
- readonly yellowBright: this;
63
- }
64
- type CssColorName = "aliceblue" | "antiquewhite" | "aqua" | "aquamarine" | "azure" | "beige" | "bisque" | "black" | "blanchedalmond" | "blue" | "blueviolet" | "brown" | "burlywood" | "cadetblue" | "chartreuse" | "chocolate" | "coral" | "cornflowerblue" | "cornsilk" | "crimson" | "cyan" | "darkblue" | "darkcyan" | "darkgoldenrod" | "darkgray" | "darkgreen" | "darkgrey" | "darkkhaki" | "darkmagenta" | "darkolivegreen" | "darkorange" | "darkorchid" | "darkred" | "darksalmon" | "darkseagreen" | "darkslateblue" | "darkslategray" | "darkslategrey" | "darkturquoise" | "darkviolet" | "deeppink" | "deepskyblue" | "dimgray" | "dimgrey" | "dodgerblue" | "firebrick" | "floralwhite" | "forestgreen" | "fuchsia" | "gainsboro" | "ghostwhite" | "gold" | "goldenrod" | "gray" | "green" | "greenyellow" | "grey" | "honeydew" | "hotpink" | "indianred" | "indigo" | "ivory" | "khaki" | "lavender" | "lavenderblush" | "lawngreen" | "lemonchiffon" | "lightblue" | "lightcoral" | "lightcyan" | "lightgoldenrodyellow" | "lightgray" | "lightgreen" | "lightgrey" | "lightpink" | "lightsalmon" | "lightseagreen" | "lightskyblue" | "lightslategray" | "lightslategrey" | "lightsteelblue" | "lightyellow" | "lime" | "limegreen" | "linen" | "magenta" | "maroon" | "mediumaquamarine" | "mediumblue" | "mediumorchid" | "mediumpurple" | "mediumseagreen" | "mediumslateblue" | "mediumspringgreen" | "mediumturquoise" | "mediumvioletred" | "midnightblue" | "mintcream" | "mistyrose" | "moccasin" | "navajowhite" | "navy" | "oldlace" | "olive" | "olivedrab" | "orange" | "orangered" | "orchid" | "palegoldenrod" | "palegreen" | "paleturquoise" | "palevioletred" | "papayawhip" | "peachpuff" | "peru" | "pink" | "plum" | "powderblue" | "purple" | "rebeccapurple" | "red" | "rosybrown" | "royalblue" | "saddlebrown" | "salmon" | "sandybrown" | "seagreen" | "seashell" | "sienna" | "silver" | "skyblue" | "slateblue" | "slategray" | "slategrey" | "snow" | "springgreen" | "steelblue" | "tan" | "teal" | "thistle" | "tomato" | "turquoise" | "violet" | "wheat" | "white" | "whitesmoke" | "yellow" | "yellowgreen";
65
- type StopInput = {
66
- color?: ColorValueHex | CssColorName | RGB | [number, number, number];
67
- colorLess?: boolean;
68
- position: number;
69
- };
70
- type StopOutput = {
71
- color: [number, number, number] | undefined;
72
- colorLess?: boolean;
73
- position: number;
74
- };
75
- type RGB = {
76
- b: number;
77
- g: number;
78
- r: number;
79
- };
80
-
81
- export type { ColorizeType as C, RGB as R, StopOutput as S, ColorValueHex as a, CssColorName as b, StopInput as c };
@@ -1,81 +0,0 @@
1
- type ColorValueHex = `#${string}`;
2
- interface ColorizeType {
3
- (string: number | string): string;
4
- (string: TemplateStringsArray, ...parameters: string[]): string;
5
- ansi256: (code: number) => this;
6
- bg: (code: number) => this;
7
- bgAnsi256: (code: number) => this;
8
- readonly bgBlack: this;
9
- readonly bgBlackBright: this;
10
- readonly bgBlue: this;
11
- readonly bgBlueBright: this;
12
- readonly bgCyan: this;
13
- readonly bgCyanBright: this;
14
- readonly bgGray: this;
15
- readonly bgGreen: this;
16
- readonly bgGreenBright: this;
17
- readonly bgGrey: this;
18
- bgHex: (color: ColorValueHex) => this;
19
- readonly bgMagenta: this;
20
- readonly bgMagentaBright: this;
21
- readonly bgRed: this;
22
- readonly bgRedBright: this;
23
- bgRgb: (red: number, green: number, blue: number) => this;
24
- readonly bgWhite: this;
25
- readonly bgWhiteBright: this;
26
- readonly bgYellow: this;
27
- readonly bgYellowBright: this;
28
- readonly black: this;
29
- readonly blackBright: this;
30
- readonly blue: this;
31
- readonly blueBright: this;
32
- readonly bold: this;
33
- readonly close: string;
34
- readonly cyan: this;
35
- readonly cyanBright: this;
36
- readonly dim: this;
37
- fg: (code: number) => this;
38
- readonly gray: this;
39
- readonly green: this;
40
- readonly greenBright: this;
41
- readonly grey: this;
42
- hex: (color: ColorValueHex) => this;
43
- readonly hidden: this;
44
- readonly inverse: this;
45
- readonly italic: this;
46
- readonly magenta: this;
47
- readonly magentaBright: this;
48
- readonly open: string;
49
- readonly overline: this;
50
- readonly red: this;
51
- readonly redBright: this;
52
- readonly reset: this;
53
- rgb: (red: number, green: number, blue: number) => this;
54
- readonly strike: this;
55
- readonly strikethrough: this;
56
- strip: (string: string) => string;
57
- readonly underline: this;
58
- readonly visible: this;
59
- readonly white: this;
60
- readonly whiteBright: this;
61
- readonly yellow: this;
62
- readonly yellowBright: this;
63
- }
64
- type CssColorName = "aliceblue" | "antiquewhite" | "aqua" | "aquamarine" | "azure" | "beige" | "bisque" | "black" | "blanchedalmond" | "blue" | "blueviolet" | "brown" | "burlywood" | "cadetblue" | "chartreuse" | "chocolate" | "coral" | "cornflowerblue" | "cornsilk" | "crimson" | "cyan" | "darkblue" | "darkcyan" | "darkgoldenrod" | "darkgray" | "darkgreen" | "darkgrey" | "darkkhaki" | "darkmagenta" | "darkolivegreen" | "darkorange" | "darkorchid" | "darkred" | "darksalmon" | "darkseagreen" | "darkslateblue" | "darkslategray" | "darkslategrey" | "darkturquoise" | "darkviolet" | "deeppink" | "deepskyblue" | "dimgray" | "dimgrey" | "dodgerblue" | "firebrick" | "floralwhite" | "forestgreen" | "fuchsia" | "gainsboro" | "ghostwhite" | "gold" | "goldenrod" | "gray" | "green" | "greenyellow" | "grey" | "honeydew" | "hotpink" | "indianred" | "indigo" | "ivory" | "khaki" | "lavender" | "lavenderblush" | "lawngreen" | "lemonchiffon" | "lightblue" | "lightcoral" | "lightcyan" | "lightgoldenrodyellow" | "lightgray" | "lightgreen" | "lightgrey" | "lightpink" | "lightsalmon" | "lightseagreen" | "lightskyblue" | "lightslategray" | "lightslategrey" | "lightsteelblue" | "lightyellow" | "lime" | "limegreen" | "linen" | "magenta" | "maroon" | "mediumaquamarine" | "mediumblue" | "mediumorchid" | "mediumpurple" | "mediumseagreen" | "mediumslateblue" | "mediumspringgreen" | "mediumturquoise" | "mediumvioletred" | "midnightblue" | "mintcream" | "mistyrose" | "moccasin" | "navajowhite" | "navy" | "oldlace" | "olive" | "olivedrab" | "orange" | "orangered" | "orchid" | "palegoldenrod" | "palegreen" | "paleturquoise" | "palevioletred" | "papayawhip" | "peachpuff" | "peru" | "pink" | "plum" | "powderblue" | "purple" | "rebeccapurple" | "red" | "rosybrown" | "royalblue" | "saddlebrown" | "salmon" | "sandybrown" | "seagreen" | "seashell" | "sienna" | "silver" | "skyblue" | "slateblue" | "slategray" | "slategrey" | "snow" | "springgreen" | "steelblue" | "tan" | "teal" | "thistle" | "tomato" | "turquoise" | "violet" | "wheat" | "white" | "whitesmoke" | "yellow" | "yellowgreen";
65
- type StopInput = {
66
- color?: ColorValueHex | CssColorName | RGB | [number, number, number];
67
- colorLess?: boolean;
68
- position: number;
69
- };
70
- type StopOutput = {
71
- color: [number, number, number] | undefined;
72
- colorLess?: boolean;
73
- position: number;
74
- };
75
- type RGB = {
76
- b: number;
77
- g: number;
78
- r: number;
79
- };
80
-
81
- export type { ColorizeType as C, RGB as R, StopOutput as S, ColorValueHex as a, CssColorName as b, StopInput as c };
@@ -1,67 +0,0 @@
1
- type ColorValueHex = `#${string}`;
2
- interface ColorizeType {
3
- (string: number | string): string;
4
- (string: TemplateStringsArray, ...parameters: string[]): string;
5
- ansi256: (code: number) => this;
6
- bg: (code: number) => this;
7
- bgAnsi256: (code: number) => this;
8
- readonly bgBlack: this;
9
- readonly bgBlackBright: this;
10
- readonly bgBlue: this;
11
- readonly bgBlueBright: this;
12
- readonly bgCyan: this;
13
- readonly bgCyanBright: this;
14
- readonly bgGray: this;
15
- readonly bgGreen: this;
16
- readonly bgGreenBright: this;
17
- readonly bgGrey: this;
18
- bgHex: (color: ColorValueHex) => this;
19
- readonly bgMagenta: this;
20
- readonly bgMagentaBright: this;
21
- readonly bgRed: this;
22
- readonly bgRedBright: this;
23
- bgRgb: (red: number, green: number, blue: number) => this;
24
- readonly bgWhite: this;
25
- readonly bgWhiteBright: this;
26
- readonly bgYellow: this;
27
- readonly bgYellowBright: this;
28
- readonly black: this;
29
- readonly blackBright: this;
30
- readonly blue: this;
31
- readonly blueBright: this;
32
- readonly bold: this;
33
- readonly close: string;
34
- readonly cyan: this;
35
- readonly cyanBright: this;
36
- readonly dim: this;
37
- fg: (code: number) => this;
38
- readonly gray: this;
39
- readonly green: this;
40
- readonly greenBright: this;
41
- readonly grey: this;
42
- hex: (color: ColorValueHex) => this;
43
- readonly hidden: this;
44
- readonly inverse: this;
45
- readonly italic: this;
46
- readonly magenta: this;
47
- readonly magentaBright: this;
48
- readonly open: string;
49
- readonly overline: this;
50
- readonly red: this;
51
- readonly redBright: this;
52
- readonly reset: this;
53
- rgb: (red: number, green: number, blue: number) => this;
54
- readonly strike: this;
55
- readonly strikethrough: this;
56
- strip: (string: string) => string;
57
- readonly underline: this;
58
- readonly visible: this;
59
- readonly white: this;
60
- readonly whiteBright: this;
61
- readonly yellow: this;
62
- readonly yellowBright: this;
63
- }
64
- type AnsiStyles = "bold" | "dim" | "hidden" | "inverse" | "italic" | "overline" | "reset" | "strike" | "strikethrough" | "underline" | "visible";
65
- type AnsiColors = "bgBlack" | "bgBlackBright" | "bgBlue" | "bgBlueBright" | "bgCyan" | "bgCyanBright" | "bgGray" | "bgGreen" | "bgGreenBright" | "bgGrey" | "bgMagenta" | "bgMagentaBright" | "bgRed" | "bgRedBright" | "bgWhite" | "bgWhiteBright" | "bgYellow" | "bgYellowBright" | "black" | "blackBright" | "blue" | "blueBright" | "cyan" | "cyanBright" | "gray" | "green" | "greenBright" | "grey" | "magenta" | "magentaBright" | "red" | "redBright" | "white" | "whiteBright" | "yellow" | "yellowBright";
66
-
67
- export type { AnsiColors as A, ColorizeType as C, ColorValueHex as a, AnsiStyles as b };
@@ -1,67 +0,0 @@
1
- type ColorValueHex = `#${string}`;
2
- interface ColorizeType {
3
- (string: number | string): string;
4
- (string: TemplateStringsArray, ...parameters: string[]): string;
5
- ansi256: (code: number) => this;
6
- bg: (code: number) => this;
7
- bgAnsi256: (code: number) => this;
8
- readonly bgBlack: this;
9
- readonly bgBlackBright: this;
10
- readonly bgBlue: this;
11
- readonly bgBlueBright: this;
12
- readonly bgCyan: this;
13
- readonly bgCyanBright: this;
14
- readonly bgGray: this;
15
- readonly bgGreen: this;
16
- readonly bgGreenBright: this;
17
- readonly bgGrey: this;
18
- bgHex: (color: ColorValueHex) => this;
19
- readonly bgMagenta: this;
20
- readonly bgMagentaBright: this;
21
- readonly bgRed: this;
22
- readonly bgRedBright: this;
23
- bgRgb: (red: number, green: number, blue: number) => this;
24
- readonly bgWhite: this;
25
- readonly bgWhiteBright: this;
26
- readonly bgYellow: this;
27
- readonly bgYellowBright: this;
28
- readonly black: this;
29
- readonly blackBright: this;
30
- readonly blue: this;
31
- readonly blueBright: this;
32
- readonly bold: this;
33
- readonly close: string;
34
- readonly cyan: this;
35
- readonly cyanBright: this;
36
- readonly dim: this;
37
- fg: (code: number) => this;
38
- readonly gray: this;
39
- readonly green: this;
40
- readonly greenBright: this;
41
- readonly grey: this;
42
- hex: (color: ColorValueHex) => this;
43
- readonly hidden: this;
44
- readonly inverse: this;
45
- readonly italic: this;
46
- readonly magenta: this;
47
- readonly magentaBright: this;
48
- readonly open: string;
49
- readonly overline: this;
50
- readonly red: this;
51
- readonly redBright: this;
52
- readonly reset: this;
53
- rgb: (red: number, green: number, blue: number) => this;
54
- readonly strike: this;
55
- readonly strikethrough: this;
56
- strip: (string: string) => string;
57
- readonly underline: this;
58
- readonly visible: this;
59
- readonly white: this;
60
- readonly whiteBright: this;
61
- readonly yellow: this;
62
- readonly yellowBright: this;
63
- }
64
- type AnsiStyles = "bold" | "dim" | "hidden" | "inverse" | "italic" | "overline" | "reset" | "strike" | "strikethrough" | "underline" | "visible";
65
- type AnsiColors = "bgBlack" | "bgBlackBright" | "bgBlue" | "bgBlueBright" | "bgCyan" | "bgCyanBright" | "bgGray" | "bgGreen" | "bgGreenBright" | "bgGrey" | "bgMagenta" | "bgMagentaBright" | "bgRed" | "bgRedBright" | "bgWhite" | "bgWhiteBright" | "bgYellow" | "bgYellowBright" | "black" | "blackBright" | "blue" | "blueBright" | "cyan" | "cyanBright" | "gray" | "green" | "greenBright" | "grey" | "magenta" | "magentaBright" | "red" | "redBright" | "white" | "whiteBright" | "yellow" | "yellowBright";
66
-
67
- export type { AnsiColors as A, ColorizeType as C, ColorValueHex as a, AnsiStyles as b };