@breadc/color 0.9.6 → 0.9.7

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.
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Detect how much colors the current terminal supports
3
+ */
4
+ declare const enum SupportLevel {
5
+ none = 0,
6
+ ansi = 1,
7
+ ansi256 = 2
8
+ }
9
+ /**
10
+ * Config whether enable color output
11
+ */
12
+ declare const options: {
13
+ enabled: boolean;
14
+ supportLevel: SupportLevel;
15
+ };
16
+ declare function kolorist(start: number | string, end: number | string, level?: SupportLevel): (str: string | number) => string;
17
+ declare function combine(...fns: ReturnType<typeof kolorist>[]): (str: string | number) => string | number;
18
+ declare function stripColors(str: string | number): string;
19
+ declare const reset: (str: string | number) => string;
20
+ declare const bold: (str: string | number) => string;
21
+ declare const dim: (str: string | number) => string;
22
+ declare const italic: (str: string | number) => string;
23
+ declare const underline: (str: string | number) => string;
24
+ declare const inverse: (str: string | number) => string;
25
+ declare const hidden: (str: string | number) => string;
26
+ declare const strikethrough: (str: string | number) => string;
27
+ declare const black: (str: string | number) => string;
28
+ declare const red: (str: string | number) => string;
29
+ declare const green: (str: string | number) => string;
30
+ declare const yellow: (str: string | number) => string;
31
+ declare const blue: (str: string | number) => string;
32
+ declare const magenta: (str: string | number) => string;
33
+ declare const cyan: (str: string | number) => string;
34
+ declare const white: (str: string | number) => string;
35
+ declare const gray: (str: string | number) => string;
36
+ declare const lightRed: (str: string | number) => string;
37
+ declare const lightGreen: (str: string | number) => string;
38
+ declare const lightYellow: (str: string | number) => string;
39
+ declare const lightBlue: (str: string | number) => string;
40
+ declare const lightMagenta: (str: string | number) => string;
41
+ declare const lightCyan: (str: string | number) => string;
42
+ declare const lightGray: (str: string | number) => string;
43
+ declare const bgBlack: (str: string | number) => string;
44
+ declare const bgRed: (str: string | number) => string;
45
+ declare const bgGreen: (str: string | number) => string;
46
+ declare const bgYellow: (str: string | number) => string;
47
+ declare const bgBlue: (str: string | number) => string;
48
+ declare const bgMagenta: (str: string | number) => string;
49
+ declare const bgCyan: (str: string | number) => string;
50
+ declare const bgWhite: (str: string | number) => string;
51
+ declare const bgGray: (str: string | number) => string;
52
+ declare const bgLightRed: (str: string | number) => string;
53
+ declare const bgLightGreen: (str: string | number) => string;
54
+ declare const bgLightYellow: (str: string | number) => string;
55
+ declare const bgLightBlue: (str: string | number) => string;
56
+ declare const bgLightMagenta: (str: string | number) => string;
57
+ declare const bgLightCyan: (str: string | number) => string;
58
+ declare const bgLightGray: (str: string | number) => string;
59
+ declare const ansi256: (n: number) => (str: string | number) => string;
60
+ declare const ansi256Bg: (n: number) => (str: string | number) => string;
61
+ declare function link(text: string, url: string): string;
62
+
63
+ export { SupportLevel, ansi256, ansi256Bg, bgBlack, bgBlue, bgCyan, bgGray, bgGreen, bgLightBlue, bgLightCyan, bgLightGray, bgLightGreen, bgLightMagenta, bgLightRed, bgLightYellow, bgMagenta, bgRed, bgWhite, bgYellow, black, blue, bold, combine, cyan, dim, gray, green, hidden, inverse, italic, lightBlue, lightCyan, lightGray, lightGreen, lightMagenta, lightRed, lightYellow, link, magenta, options, red, reset, strikethrough, stripColors, underline, white, yellow };
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Detect how much colors the current terminal supports
3
+ */
4
+ declare const enum SupportLevel {
5
+ none = 0,
6
+ ansi = 1,
7
+ ansi256 = 2
8
+ }
9
+ /**
10
+ * Config whether enable color output
11
+ */
12
+ declare const options: {
13
+ enabled: boolean;
14
+ supportLevel: SupportLevel;
15
+ };
16
+ declare function kolorist(start: number | string, end: number | string, level?: SupportLevel): (str: string | number) => string;
17
+ declare function combine(...fns: ReturnType<typeof kolorist>[]): (str: string | number) => string | number;
18
+ declare function stripColors(str: string | number): string;
19
+ declare const reset: (str: string | number) => string;
20
+ declare const bold: (str: string | number) => string;
21
+ declare const dim: (str: string | number) => string;
22
+ declare const italic: (str: string | number) => string;
23
+ declare const underline: (str: string | number) => string;
24
+ declare const inverse: (str: string | number) => string;
25
+ declare const hidden: (str: string | number) => string;
26
+ declare const strikethrough: (str: string | number) => string;
27
+ declare const black: (str: string | number) => string;
28
+ declare const red: (str: string | number) => string;
29
+ declare const green: (str: string | number) => string;
30
+ declare const yellow: (str: string | number) => string;
31
+ declare const blue: (str: string | number) => string;
32
+ declare const magenta: (str: string | number) => string;
33
+ declare const cyan: (str: string | number) => string;
34
+ declare const white: (str: string | number) => string;
35
+ declare const gray: (str: string | number) => string;
36
+ declare const lightRed: (str: string | number) => string;
37
+ declare const lightGreen: (str: string | number) => string;
38
+ declare const lightYellow: (str: string | number) => string;
39
+ declare const lightBlue: (str: string | number) => string;
40
+ declare const lightMagenta: (str: string | number) => string;
41
+ declare const lightCyan: (str: string | number) => string;
42
+ declare const lightGray: (str: string | number) => string;
43
+ declare const bgBlack: (str: string | number) => string;
44
+ declare const bgRed: (str: string | number) => string;
45
+ declare const bgGreen: (str: string | number) => string;
46
+ declare const bgYellow: (str: string | number) => string;
47
+ declare const bgBlue: (str: string | number) => string;
48
+ declare const bgMagenta: (str: string | number) => string;
49
+ declare const bgCyan: (str: string | number) => string;
50
+ declare const bgWhite: (str: string | number) => string;
51
+ declare const bgGray: (str: string | number) => string;
52
+ declare const bgLightRed: (str: string | number) => string;
53
+ declare const bgLightGreen: (str: string | number) => string;
54
+ declare const bgLightYellow: (str: string | number) => string;
55
+ declare const bgLightBlue: (str: string | number) => string;
56
+ declare const bgLightMagenta: (str: string | number) => string;
57
+ declare const bgLightCyan: (str: string | number) => string;
58
+ declare const bgLightGray: (str: string | number) => string;
59
+ declare const ansi256: (n: number) => (str: string | number) => string;
60
+ declare const ansi256Bg: (n: number) => (str: string | number) => string;
61
+ declare function link(text: string, url: string): string;
62
+
63
+ export { SupportLevel, ansi256, ansi256Bg, bgBlack, bgBlue, bgCyan, bgGray, bgGreen, bgLightBlue, bgLightCyan, bgLightGray, bgLightGreen, bgLightMagenta, bgLightRed, bgLightYellow, bgMagenta, bgRed, bgWhite, bgYellow, black, blue, bold, combine, cyan, dim, gray, green, hidden, inverse, italic, lightBlue, lightCyan, lightGray, lightGreen, lightMagenta, lightRed, lightYellow, link, magenta, options, red, reset, strikethrough, stripColors, underline, white, yellow };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breadc/color",
3
- "version": "0.9.6",
3
+ "version": "0.9.7",
4
4
  "description": "Terminal color for Breadc",
5
5
  "keywords": [
6
6
  "breadc",
@@ -35,8 +35,8 @@
35
35
  "dist"
36
36
  ],
37
37
  "devDependencies": {
38
- "@types/node": "^18.16.18",
39
- "vitest": "^0.32.2"
38
+ "@types/node": "^20.8.7",
39
+ "vitest": "^0.34.6"
40
40
  },
41
41
  "scripts": {
42
42
  "build": "unbuild",