analogger 2.0.1 → 2.1.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/ana-logger.d.cts +6 -1
- package/browser/ana-logger.mjs +154 -4
- package/browser/html-to-image.js +2 -2
- package/cli.cjs +1 -1
- package/dist/ana-light.min.css +1 -1
- package/dist/analogger-browser.min.mjs +8 -8
- package/dist/analogger.min.css +1 -1
- package/dist/html-to-image-plugin.min.mjs +8 -8
- package/esm/ana-logger.mjs +154 -4
- package/package.json +1 -1
- package/src/ana-logger.cjs +154 -4
- package/src/constants.cjs +50 -50
- package/src/html-to-image.js +2 -2
- package/browser/ana-logger.d.mts +0 -488
- package/browser/constants.d.mts +0 -19
- package/browser/imported/flatted/esm/index.d.mts +0 -4
- package/browser/imported/to-ansi/index.d.mts +0 -144
- package/browser/src/ana-logger.mjs +0 -2675
- package/browser/src/constants.mjs +0 -56
- package/esm/browser/ana-logger.mjs +0 -2660
- package/esm/browser/constants.mjs +0 -56
- package/esm/browser/imported/flatted/esm/index.mjs +0 -94
- package/esm/browser/imported/to-ansi/index.mjs +0 -682
- package/esm/html-to-image.mjs +0 -31
- package/esm/src/ana-logger.mjs +0 -2688
- package/esm/src/constants.mjs +0 -56
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns ANSI code for given RGB color
|
|
3
|
-
* @param {RGBType}
|
|
4
|
-
* @param {boolean} isForeground
|
|
5
|
-
* @returns {string}
|
|
6
|
-
*/
|
|
7
|
-
export function fromRgb({ red, blue, green }: RGBType, isForeground?: boolean): string;
|
|
8
|
-
/**
|
|
9
|
-
* Returns ANSI code for given hexadecimal color
|
|
10
|
-
* @param {string} hexa
|
|
11
|
-
* @param {boolean} isForeground
|
|
12
|
-
* @returns {string}
|
|
13
|
-
*/
|
|
14
|
-
export function fromHexa(hexa: string, isForeground?: boolean): string;
|
|
15
|
-
/**
|
|
16
|
-
* Returns ANSI code for given HSL color
|
|
17
|
-
* @param {HSLType}
|
|
18
|
-
* @param {boolean} isForeground
|
|
19
|
-
* @returns {string}
|
|
20
|
-
*/
|
|
21
|
-
export function fromHsl({ hue, saturation, lightness }: HSLType, isForeground: boolean): string;
|
|
22
|
-
/**
|
|
23
|
-
* Return ANSI code color for a given value
|
|
24
|
-
* @param {string|Object} okayColor Actual name color (i.e. orange, yellow) or color code (#00F00F)
|
|
25
|
-
* @param isForeground
|
|
26
|
-
* @returns {string}
|
|
27
|
-
*/
|
|
28
|
-
export function fromColor(okayColor: string | any, isForeground?: boolean): string;
|
|
29
|
-
export function getTextFromRgb(text: any, { fg, bg, isUnderline, isBold, isReversed }: {
|
|
30
|
-
fg?: {};
|
|
31
|
-
bg?: {};
|
|
32
|
-
isUnderline?: boolean;
|
|
33
|
-
isBold?: boolean;
|
|
34
|
-
isReversed?: boolean;
|
|
35
|
-
}): any;
|
|
36
|
-
export function getTextFromHsl(text: any, { fg, bg, isUnderline, isBold, isReversed }: {
|
|
37
|
-
fg?: string;
|
|
38
|
-
bg?: string;
|
|
39
|
-
isUnderline?: boolean;
|
|
40
|
-
isBold?: boolean;
|
|
41
|
-
isReversed?: boolean;
|
|
42
|
-
}): any;
|
|
43
|
-
export function getTextFromHex(text: any, { fg, bg, isUnderline, isBold, isReversed }: {
|
|
44
|
-
fg?: string;
|
|
45
|
-
bg?: string;
|
|
46
|
-
isUnderline?: boolean;
|
|
47
|
-
isBold?: boolean;
|
|
48
|
-
isReversed?: boolean;
|
|
49
|
-
}): any;
|
|
50
|
-
/**
|
|
51
|
-
* Return colorized text based on given value
|
|
52
|
-
* @param text
|
|
53
|
-
* @param {ColorPropType} props
|
|
54
|
-
* @returns {string}
|
|
55
|
-
*/
|
|
56
|
-
export function getTextFromColor(text: any, props?: ColorPropType): string;
|
|
57
|
-
export const RESET: string;
|
|
58
|
-
export namespace FONT_STYLE {
|
|
59
|
-
const Bold: string;
|
|
60
|
-
const Underline: string;
|
|
61
|
-
const Reversed: string;
|
|
62
|
-
}
|
|
63
|
-
export namespace STYLE {
|
|
64
|
-
const Bold_1: string;
|
|
65
|
-
export { Bold_1 as Bold };
|
|
66
|
-
const Underline_1: string;
|
|
67
|
-
export { Underline_1 as Underline };
|
|
68
|
-
const Reversed_1: string;
|
|
69
|
-
export { Reversed_1 as Reversed };
|
|
70
|
-
}
|
|
71
|
-
export function rgbToAnsi256(red: number, green: number, blue: number): number;
|
|
72
|
-
export function hexToRgb(hex: any): {
|
|
73
|
-
red: number;
|
|
74
|
-
green: number;
|
|
75
|
-
blue: number;
|
|
76
|
-
} | null;
|
|
77
|
-
export function rgbToHex({ red, green, blue }: {
|
|
78
|
-
red: any;
|
|
79
|
-
green: any;
|
|
80
|
-
blue: any;
|
|
81
|
-
}): string;
|
|
82
|
-
export function rgbStringToRgb(rgbString: any): {
|
|
83
|
-
red: number;
|
|
84
|
-
green: number;
|
|
85
|
-
blue: number;
|
|
86
|
-
};
|
|
87
|
-
export function rgbStringToHex(rgbString: any): string | {
|
|
88
|
-
red: number;
|
|
89
|
-
green: number;
|
|
90
|
-
blue: number;
|
|
91
|
-
};
|
|
92
|
-
export function hue2rgb(p: any, q: any, t: any): any;
|
|
93
|
-
export function hslToRgb({ hue, saturation, lightness }: HSLType): any[];
|
|
94
|
-
export function colorNameToHex(colour: string): boolean | any;
|
|
95
|
-
declare namespace _default {
|
|
96
|
-
export { fromRgb };
|
|
97
|
-
export { fromHexa };
|
|
98
|
-
export { fromHsl };
|
|
99
|
-
export { fromColor };
|
|
100
|
-
export { getTextFromRgb };
|
|
101
|
-
export { getTextFromHsl };
|
|
102
|
-
export { getTextFromHex };
|
|
103
|
-
export { getTextFromColor };
|
|
104
|
-
export { colorNameToHex };
|
|
105
|
-
export { hslToRgb };
|
|
106
|
-
export { hexToRgb };
|
|
107
|
-
export { rgbToHex };
|
|
108
|
-
export { rgbToAnsi256 };
|
|
109
|
-
export { rgbStringToRgb };
|
|
110
|
-
export { rgbStringToHex };
|
|
111
|
-
export { hue2rgb };
|
|
112
|
-
export { RESET };
|
|
113
|
-
export { FONT_STYLE };
|
|
114
|
-
export { STYLE };
|
|
115
|
-
}
|
|
116
|
-
export default _default;
|
|
117
|
-
export type RGBType = {
|
|
118
|
-
red: number;
|
|
119
|
-
green: number;
|
|
120
|
-
blue: number;
|
|
121
|
-
};
|
|
122
|
-
export type HSLType = {
|
|
123
|
-
hue: number;
|
|
124
|
-
lightness: number;
|
|
125
|
-
saturation: number;
|
|
126
|
-
};
|
|
127
|
-
/**
|
|
128
|
-
* Return colorized text based on given value
|
|
129
|
-
*/
|
|
130
|
-
export type ColorPropType = {
|
|
131
|
-
/**
|
|
132
|
-
* colourName Actual name color (i.e. orange, yellow), color code (#00F00F), or
|
|
133
|
-
* color object
|
|
134
|
-
* (rgb, hsl)
|
|
135
|
-
*/
|
|
136
|
-
fg?: string | RGBType | HSLType;
|
|
137
|
-
/**
|
|
138
|
-
* colourName Actual name color (i.e. orange, yellow) or color code (#00F00F)
|
|
139
|
-
*/
|
|
140
|
-
bg?: string | RGBType | HSLType;
|
|
141
|
-
isUnderline?: boolean | null;
|
|
142
|
-
isBold?: boolean | null;
|
|
143
|
-
isReversed?: boolean | null;
|
|
144
|
-
};
|