@mks2508/better-logger 0.18.2-alpha.1 → 0.18.3
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 +38 -336
- package/dist/Logger.d.ts +356 -157
- package/dist/Logger.d.ts.map +1 -1
- package/dist/ScopedLogger.d.ts +549 -9
- package/dist/ScopedLogger.d.ts.map +1 -1
- package/dist/chunks/HookBridge-C-AvXmPD.cjs +504 -0
- package/dist/chunks/HookBridge-C-AvXmPD.cjs.map +1 -0
- package/dist/chunks/HookBridge-CI2PH79S.js +487 -0
- package/dist/chunks/HookBridge-CI2PH79S.js.map +1 -0
- package/dist/chunks/{LogContext-L7HzynFw.cjs → LogContext-BaMXleWj.cjs} +19 -4
- package/dist/chunks/LogContext-BaMXleWj.cjs.map +1 -0
- package/dist/chunks/LogContext-DZasm_P5.cjs +141 -0
- package/dist/chunks/LogContext-DZasm_P5.cjs.map +1 -0
- package/dist/chunks/{LogContext-Cwn-1Zzb.js → LogContext-DjlITOzZ.js} +19 -4
- package/dist/chunks/LogContext-DjlITOzZ.js.map +1 -0
- package/dist/chunks/LogContext-Dyzs61XG.js +136 -0
- package/dist/chunks/LogContext-Dyzs61XG.js.map +1 -0
- package/dist/chunks/SerializerBridge-Ba43Mk7j.js +393 -0
- package/dist/chunks/SerializerBridge-Ba43Mk7j.js.map +1 -0
- package/dist/chunks/SerializerBridge-C4a9Z37F.cjs +410 -0
- package/dist/chunks/SerializerBridge-C4a9Z37F.cjs.map +1 -0
- package/dist/chunks/{StyleManager-CIpd6wbO.cjs → StyleManager-DQ6UNRB-.cjs} +37 -11
- package/dist/chunks/StyleManager-DQ6UNRB-.cjs.map +1 -0
- package/dist/chunks/StyleManager-DjwAYbxE.js +113 -0
- package/dist/chunks/StyleManager-DjwAYbxE.js.map +1 -0
- package/dist/chunks/{core-PoT7RrTK.js → core-Blfi2klP.js} +1 -4
- package/dist/chunks/core-Blfi2klP.js.map +1 -0
- package/dist/chunks/{core-Dzz7agGa.cjs → core-CqS_UBzJ.cjs} +1 -4
- package/dist/chunks/core-CqS_UBzJ.cjs.map +1 -0
- package/dist/chunks/{environment-detector-CI3TrWK_.js → environment-detector-7NvnYUfr.js} +11 -11
- package/dist/chunks/environment-detector-7NvnYUfr.js.map +1 -0
- package/dist/chunks/{environment-detector-Cnn6wr6O.cjs → environment-detector-D-tHkKWA.cjs} +11 -11
- package/dist/chunks/environment-detector-D-tHkKWA.cjs.map +1 -0
- package/dist/chunks/server-fallback-CaCPjWby.cjs +119 -0
- package/dist/chunks/server-fallback-CaCPjWby.cjs.map +1 -0
- package/dist/chunks/server-fallback-jj0T6XaK.js +114 -0
- package/dist/chunks/server-fallback-jj0T6XaK.js.map +1 -0
- package/dist/chunks/{spinner-DNvxbM9a.cjs → spinner-BHyYEXsM.cjs} +319 -37
- package/dist/chunks/spinner-BHyYEXsM.cjs.map +1 -0
- package/dist/chunks/{spinner-D3FsF78o.js → spinner-BtkwpzYv.js} +319 -37
- package/dist/chunks/spinner-BtkwpzYv.js.map +1 -0
- package/dist/chunks/styling-CRw3KQW4.js +1592 -0
- package/dist/chunks/styling-CRw3KQW4.js.map +1 -0
- package/dist/chunks/styling-Cel2wPRy.cjs +1645 -0
- package/dist/chunks/styling-Cel2wPRy.cjs.map +1 -0
- package/dist/chunks/transports-BGfwwakw.js +1237 -0
- package/dist/chunks/transports-BGfwwakw.js.map +1 -0
- package/dist/chunks/transports-BZ-Mc2IT.cjs +1450 -0
- package/dist/chunks/transports-BZ-Mc2IT.cjs.map +1 -0
- package/dist/chunks/transports-DvaLAeGJ.js +1403 -0
- package/dist/chunks/transports-DvaLAeGJ.js.map +1 -0
- package/dist/chunks/transports-yK6CL0Ml.cjs +1278 -0
- package/dist/chunks/transports-yK6CL0Ml.cjs.map +1 -0
- package/dist/chunks/{utils-BqlFYocD.cjs → utils-W_cxqriN.cjs} +44 -37
- package/dist/chunks/utils-W_cxqriN.cjs.map +1 -0
- package/dist/chunks/{utils-VETbVpkR.js → utils-tKfBAWUM.js} +44 -37
- package/dist/chunks/utils-tKfBAWUM.js.map +1 -0
- package/dist/cli/CommandProcessor.d.ts +166 -19
- package/dist/cli/CommandProcessor.d.ts.map +1 -1
- package/dist/cli/commands/ConfigCommand.d.ts +36 -1
- package/dist/cli/commands/ConfigCommand.d.ts.map +1 -1
- package/dist/cli/commands/ExportCommand.d.ts +49 -3
- package/dist/cli/commands/ExportCommand.d.ts.map +1 -1
- package/dist/cli/commands/ThemeCommand.d.ts +62 -3
- package/dist/cli/commands/ThemeCommand.d.ts.map +1 -1
- package/dist/cli/help.d.ts +30 -2
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/index.d.ts +29 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli.cjs +2 -2
- package/dist/cli.js +2 -2
- package/dist/context/LogContext.d.ts +167 -70
- package/dist/context/LogContext.d.ts.map +1 -1
- package/dist/context.cjs +1 -1
- package/dist/context.js +1 -1
- package/dist/core.cjs +52 -29
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.ts +50 -27
- package/dist/core.d.ts.map +1 -1
- package/dist/core.js +52 -29
- package/dist/core.js.map +1 -1
- package/dist/hooks/HookBridge.d.ts +15 -9
- package/dist/hooks/HookBridge.d.ts.map +1 -1
- package/dist/hooks/HookManager.d.ts +295 -2
- package/dist/hooks/HookManager.d.ts.map +1 -1
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.js +1 -1
- package/dist/index.cjs +1415 -214
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1413 -215
- package/dist/index.js.map +1 -1
- package/dist/playground/TerminalBridge.d.ts +23 -16
- package/dist/playground/TerminalBridge.d.ts.map +1 -1
- package/dist/playground/box.d.ts +36 -5
- package/dist/playground/box.d.ts.map +1 -1
- package/dist/playground/cli-table.d.ts +41 -5
- package/dist/playground/cli-table.d.ts.map +1 -1
- package/dist/playground/divider.d.ts +22 -3
- package/dist/playground/divider.d.ts.map +1 -1
- package/dist/playground/header.d.ts +21 -4
- package/dist/playground/header.d.ts.map +1 -1
- package/dist/playground/server-fallback.d.ts +96 -9
- package/dist/playground/server-fallback.d.ts.map +1 -1
- package/dist/playground/spinner.d.ts +159 -10
- package/dist/playground/spinner.d.ts.map +1 -1
- package/dist/playground/step.d.ts +25 -6
- package/dist/playground/step.d.ts.map +1 -1
- package/dist/playground.cjs +1 -1
- package/dist/playground.js +1 -1
- package/dist/serializers/SerializerBridge.d.ts +13 -6
- package/dist/serializers/SerializerBridge.d.ts.map +1 -1
- package/dist/serializers/SerializerRegistry.d.ts +236 -0
- package/dist/serializers/SerializerRegistry.d.ts.map +1 -1
- package/dist/serializers.cjs +1 -1
- package/dist/serializers.js +1 -1
- package/dist/styles/StyleManager.d.ts +138 -31
- package/dist/styles/StyleManager.d.ts.map +1 -1
- package/dist/styles.cjs +2 -2
- package/dist/styles.js +2 -2
- package/dist/styling/SmartPresets.d.ts +100 -6
- package/dist/styling/SmartPresets.d.ts.map +1 -1
- package/dist/styling/StyleBuilder.d.ts +453 -32
- package/dist/styling/StyleBuilder.d.ts.map +1 -1
- package/dist/styling/banners.d.ts +83 -7
- package/dist/styling/banners.d.ts.map +1 -1
- package/dist/styling/themes.d.ts +41 -2
- package/dist/styling/themes.d.ts.map +1 -1
- package/dist/transports/ConsoleTransport.d.ts +95 -0
- package/dist/transports/ConsoleTransport.d.ts.map +1 -1
- package/dist/transports/FileTransport.d.ts +99 -18
- package/dist/transports/FileTransport.d.ts.map +1 -1
- package/dist/transports/HttpTransport.d.ts +135 -22
- package/dist/transports/HttpTransport.d.ts.map +1 -1
- package/dist/transports/OtlpTraceTransport.d.ts +118 -0
- package/dist/transports/OtlpTraceTransport.d.ts.map +1 -0
- package/dist/transports/OtlpTransport.d.ts +80 -37
- package/dist/transports/OtlpTransport.d.ts.map +1 -1
- package/dist/transports/SpanRuntime.d.ts +73 -0
- package/dist/transports/SpanRuntime.d.ts.map +1 -0
- package/dist/transports/TransportBridge.d.ts +19 -13
- package/dist/transports/TransportBridge.d.ts.map +1 -1
- package/dist/transports/TransportManager.d.ts +232 -10
- package/dist/transports/TransportManager.d.ts.map +1 -1
- package/dist/transports/index.d.ts +1 -0
- package/dist/transports/index.d.ts.map +1 -1
- package/dist/transports-module.d.ts +3 -1
- package/dist/transports-module.d.ts.map +1 -1
- package/dist/transports.cjs +2 -1
- package/dist/transports.js +2 -2
- package/dist/types/core.d.ts +155 -59
- package/dist/types/core.d.ts.map +1 -1
- package/dist/types/hooks.d.ts +92 -14
- package/dist/types/hooks.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/serializers.d.ts +72 -0
- package/dist/types/serializers.d.ts.map +1 -1
- package/dist/types/transports.d.ts +163 -39
- package/dist/types/transports.d.ts.map +1 -1
- package/dist/utils/ansi-colors.d.ts +15 -15
- package/dist/utils/asyncLocalStorage.d.ts +33 -0
- package/dist/utils/asyncLocalStorage.d.ts.map +1 -0
- package/dist/utils/environment-detector.d.ts +11 -11
- package/dist/utils/formatting.d.ts +8 -8
- package/dist/utils/output.d.ts +9 -9
- package/dist/utils/output.d.ts.map +1 -1
- package/dist/utils/stackTrace.d.ts +2 -2
- package/package.json +24 -25
- package/dist/chunks/HookBridge-CiRfR67f.cjs +0 -190
- package/dist/chunks/HookBridge-CiRfR67f.cjs.map +0 -1
- package/dist/chunks/HookBridge-SgMmbXZB.js +0 -173
- package/dist/chunks/HookBridge-SgMmbXZB.js.map +0 -1
- package/dist/chunks/LogContext-Cwn-1Zzb.js.map +0 -1
- package/dist/chunks/LogContext-L7HzynFw.cjs.map +0 -1
- package/dist/chunks/SerializerBridge-BaOQOb8q.cjs +0 -166
- package/dist/chunks/SerializerBridge-BaOQOb8q.cjs.map +0 -1
- package/dist/chunks/SerializerBridge-BkpQu5c9.js +0 -149
- package/dist/chunks/SerializerBridge-BkpQu5c9.js.map +0 -1
- package/dist/chunks/StyleManager-CIpd6wbO.cjs.map +0 -1
- package/dist/chunks/StyleManager-LCvVlVdx.js +0 -87
- package/dist/chunks/StyleManager-LCvVlVdx.js.map +0 -1
- package/dist/chunks/core-Dzz7agGa.cjs.map +0 -1
- package/dist/chunks/core-PoT7RrTK.js.map +0 -1
- package/dist/chunks/environment-detector-CI3TrWK_.js.map +0 -1
- package/dist/chunks/environment-detector-Cnn6wr6O.cjs.map +0 -1
- package/dist/chunks/server-fallback-BUKjdLS7.cjs +0 -42
- package/dist/chunks/server-fallback-BUKjdLS7.cjs.map +0 -1
- package/dist/chunks/server-fallback-BsuWH1Dk.js +0 -37
- package/dist/chunks/server-fallback-BsuWH1Dk.js.map +0 -1
- package/dist/chunks/spinner-D3FsF78o.js.map +0 -1
- package/dist/chunks/spinner-DNvxbM9a.cjs.map +0 -1
- package/dist/chunks/styling-84N8T97t.js +0 -941
- package/dist/chunks/styling-84N8T97t.js.map +0 -1
- package/dist/chunks/styling-Cg5saQ46.cjs +0 -994
- package/dist/chunks/styling-Cg5saQ46.cjs.map +0 -1
- package/dist/chunks/transports-BiDk345e.js +0 -715
- package/dist/chunks/transports-BiDk345e.js.map +0 -1
- package/dist/chunks/transports-COPWmlF1.cjs +0 -756
- package/dist/chunks/transports-COPWmlF1.cjs.map +0 -1
- package/dist/chunks/utils-BqlFYocD.cjs.map +0 -1
- package/dist/chunks/utils-VETbVpkR.js.map +0 -1
- package/dist/example.d.ts +0 -18
- package/dist/example.d.ts.map +0 -1
- package/dist/main.d.ts +0 -2
- package/dist/main.d.ts.map +0 -1
|
@@ -1,941 +0,0 @@
|
|
|
1
|
-
//#region src/styling/StyleBuilder.ts
|
|
2
|
-
/**
|
|
3
|
-
* @fileoverview StyleBuilder class for Advanced Logger
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Utility class for creating dynamic console styles with method chaining
|
|
7
|
-
*/
|
|
8
|
-
var StyleBuilder = class StyleBuilder {
|
|
9
|
-
styles = [];
|
|
10
|
-
constructor(baseStyle = "") {
|
|
11
|
-
if (baseStyle) this.styles.push(baseStyle);
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Add background color or gradient
|
|
15
|
-
*/
|
|
16
|
-
bg(background) {
|
|
17
|
-
this.styles.push(`background: ${background}`);
|
|
18
|
-
return this;
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Add text color
|
|
22
|
-
*/
|
|
23
|
-
color(color) {
|
|
24
|
-
this.styles.push(`color: ${color}`);
|
|
25
|
-
return this;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Add border styling
|
|
29
|
-
*/
|
|
30
|
-
border(border) {
|
|
31
|
-
this.styles.push(`border: ${border}`);
|
|
32
|
-
return this;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Add box shadow
|
|
36
|
-
*/
|
|
37
|
-
shadow(shadow) {
|
|
38
|
-
this.styles.push(`box-shadow: ${shadow}`);
|
|
39
|
-
return this;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Add padding
|
|
43
|
-
*/
|
|
44
|
-
padding(padding) {
|
|
45
|
-
this.styles.push(`padding: ${padding}`);
|
|
46
|
-
return this;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Add margin
|
|
50
|
-
*/
|
|
51
|
-
margin(margin) {
|
|
52
|
-
this.styles.push(`margin: ${margin}`);
|
|
53
|
-
return this;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Add border radius
|
|
57
|
-
*/
|
|
58
|
-
rounded(radius = "4px") {
|
|
59
|
-
this.styles.push(`border-radius: ${radius}`);
|
|
60
|
-
return this;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Add font weight
|
|
64
|
-
*/
|
|
65
|
-
bold() {
|
|
66
|
-
this.styles.push("font-weight: bold");
|
|
67
|
-
return this;
|
|
68
|
-
}
|
|
69
|
-
/**
|
|
70
|
-
* Add font styling
|
|
71
|
-
*/
|
|
72
|
-
font(font) {
|
|
73
|
-
this.styles.push(`font-family: ${font}`);
|
|
74
|
-
return this;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Set monospace font family (alias for common monospace fonts)
|
|
78
|
-
*/
|
|
79
|
-
mono() {
|
|
80
|
-
return this.font("Monaco, Consolas, \"Courier New\", monospace");
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Set system font family (alias for system fonts)
|
|
84
|
-
*/
|
|
85
|
-
system() {
|
|
86
|
-
return this.font("system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif");
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Add font size
|
|
90
|
-
*/
|
|
91
|
-
size(size) {
|
|
92
|
-
this.styles.push(`font-size: ${size}`);
|
|
93
|
-
return this;
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* Add line height
|
|
97
|
-
*/
|
|
98
|
-
lineHeight(height) {
|
|
99
|
-
this.styles.push(`line-height: ${height}`);
|
|
100
|
-
return this;
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Add text decoration
|
|
104
|
-
*/
|
|
105
|
-
underline() {
|
|
106
|
-
this.styles.push("text-decoration: underline");
|
|
107
|
-
return this;
|
|
108
|
-
}
|
|
109
|
-
/**
|
|
110
|
-
* Add text transform
|
|
111
|
-
*/
|
|
112
|
-
uppercase() {
|
|
113
|
-
this.styles.push("text-transform: uppercase");
|
|
114
|
-
return this;
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Add opacity
|
|
118
|
-
*/
|
|
119
|
-
opacity(value) {
|
|
120
|
-
this.styles.push(`opacity: ${value}`);
|
|
121
|
-
return this;
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Add display property
|
|
125
|
-
*/
|
|
126
|
-
display(value) {
|
|
127
|
-
this.styles.push(`display: ${value}`);
|
|
128
|
-
return this;
|
|
129
|
-
}
|
|
130
|
-
/**
|
|
131
|
-
* Add position property
|
|
132
|
-
*/
|
|
133
|
-
position(value) {
|
|
134
|
-
this.styles.push(`position: ${value}`);
|
|
135
|
-
return this;
|
|
136
|
-
}
|
|
137
|
-
/**
|
|
138
|
-
* Add transform property
|
|
139
|
-
*/
|
|
140
|
-
transform(value) {
|
|
141
|
-
this.styles.push(`transform: ${value}`);
|
|
142
|
-
return this;
|
|
143
|
-
}
|
|
144
|
-
/**
|
|
145
|
-
* Add animation property
|
|
146
|
-
*/
|
|
147
|
-
animation(value) {
|
|
148
|
-
this.styles.push(`animation: ${value}`);
|
|
149
|
-
return this;
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Add transition property
|
|
153
|
-
*/
|
|
154
|
-
transition(value) {
|
|
155
|
-
this.styles.push(`transition: ${value}`);
|
|
156
|
-
return this;
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Add cursor property
|
|
160
|
-
*/
|
|
161
|
-
cursor(value) {
|
|
162
|
-
this.styles.push(`cursor: ${value}`);
|
|
163
|
-
return this;
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
* Add any custom CSS property
|
|
167
|
-
*/
|
|
168
|
-
custom(property, value) {
|
|
169
|
-
this.styles.push(`${property}: ${value}`);
|
|
170
|
-
return this;
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Add any CSS property (alias for custom)
|
|
174
|
-
*/
|
|
175
|
-
css(property, value) {
|
|
176
|
-
return this.custom(property, value);
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Build the final CSS string
|
|
180
|
-
*/
|
|
181
|
-
build() {
|
|
182
|
-
return this.styles.join("; ");
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Clear all styles and start fresh
|
|
186
|
-
*/
|
|
187
|
-
clear() {
|
|
188
|
-
this.styles = [];
|
|
189
|
-
return this;
|
|
190
|
-
}
|
|
191
|
-
/**
|
|
192
|
-
* Clone this StyleBuilder with the same styles
|
|
193
|
-
*/
|
|
194
|
-
clone() {
|
|
195
|
-
const cloned = new StyleBuilder();
|
|
196
|
-
cloned.styles = [...this.styles];
|
|
197
|
-
return cloned;
|
|
198
|
-
}
|
|
199
|
-
/**
|
|
200
|
-
* Merge another StyleBuilder's styles into this one
|
|
201
|
-
*/
|
|
202
|
-
merge(other) {
|
|
203
|
-
this.styles.push(...other.styles);
|
|
204
|
-
return this;
|
|
205
|
-
}
|
|
206
|
-
};
|
|
207
|
-
/**
|
|
208
|
-
* Proxy-based dynamic styler for chainable console styling
|
|
209
|
-
*/
|
|
210
|
-
function createStyler() {
|
|
211
|
-
const builder = new StyleBuilder();
|
|
212
|
-
return new Proxy(builder, { get(target, prop) {
|
|
213
|
-
if (prop in target) {
|
|
214
|
-
const method = target[prop];
|
|
215
|
-
if (typeof method === "function") return method.bind(target);
|
|
216
|
-
return method;
|
|
217
|
-
}
|
|
218
|
-
} });
|
|
219
|
-
}
|
|
220
|
-
createStyler();
|
|
221
|
-
/**
|
|
222
|
-
* Pre-defined style presets for common use cases
|
|
223
|
-
*/
|
|
224
|
-
const StylePresets = {
|
|
225
|
-
success: () => new StyleBuilder().bg("linear-gradient(135deg, #00b894 0%, #00a085 100%)").color("#ffffff").padding("4px 8px").rounded("4px").bold(),
|
|
226
|
-
error: () => new StyleBuilder().bg("linear-gradient(135deg, #e84393 0%, #d63031 100%)").color("#ffffff").padding("4px 8px").rounded("4px").bold(),
|
|
227
|
-
warning: () => new StyleBuilder().bg("linear-gradient(135deg, #fdcb6e 0%, #e17055 100%)").color("#2d3436").padding("4px 8px").rounded("4px").bold(),
|
|
228
|
-
info: () => new StyleBuilder().bg("linear-gradient(135deg, #74b9ff 0%, #0984e3 100%)").color("#ffffff").padding("4px 8px").rounded("4px").bold(),
|
|
229
|
-
debug: () => new StyleBuilder().bg("linear-gradient(135deg, #667eea 0%, #764ba2 100%)").color("#ffffff").padding("4px 8px").rounded("4px").bold(),
|
|
230
|
-
muted: () => new StyleBuilder().color("#6c757d").font("Monaco, Consolas, monospace").size("12px"),
|
|
231
|
-
accent: () => new StyleBuilder().bg("#f8f9fa").color("#495057").padding("2px 6px").rounded("3px").border("1px solid #dee2e6"),
|
|
232
|
-
neon: () => new StyleBuilder().bg("linear-gradient(135deg, #0f3460 0%, #e94560 100%)").color("#00ffff").padding("4px 8px").rounded("4px").bold().shadow("0 0 10px rgba(0, 255, 255, 0.5)")
|
|
233
|
-
};
|
|
234
|
-
//#endregion
|
|
235
|
-
//#region src/styling/themes.ts
|
|
236
|
-
/**
|
|
237
|
-
* Theme configurations for different visual styles
|
|
238
|
-
*/
|
|
239
|
-
const THEME_PRESETS = {
|
|
240
|
-
default: {
|
|
241
|
-
debug: {
|
|
242
|
-
emoji: "🐞",
|
|
243
|
-
label: "DEBUG",
|
|
244
|
-
background: "linear-gradient(135deg, #667eea 0%, #764ba2 100%)",
|
|
245
|
-
color: "#ffffff",
|
|
246
|
-
border: "1px solid #667eea",
|
|
247
|
-
shadow: "0 2px 4px rgba(102, 126, 234, 0.3)"
|
|
248
|
-
},
|
|
249
|
-
info: {
|
|
250
|
-
emoji: "ℹ️",
|
|
251
|
-
label: "INFO",
|
|
252
|
-
background: "linear-gradient(135deg, #74b9ff 0%, #0984e3 100%)",
|
|
253
|
-
color: "#ffffff",
|
|
254
|
-
border: "1px solid #74b9ff",
|
|
255
|
-
shadow: "0 2px 4px rgba(116, 185, 255, 0.3)"
|
|
256
|
-
},
|
|
257
|
-
warn: {
|
|
258
|
-
emoji: "⚠️",
|
|
259
|
-
label: "WARN",
|
|
260
|
-
background: "linear-gradient(135deg, #fdcb6e 0%, #e17055 100%)",
|
|
261
|
-
color: "#2d3436",
|
|
262
|
-
border: "1px solid #fdcb6e",
|
|
263
|
-
shadow: "0 2px 4px rgba(253, 203, 110, 0.3)"
|
|
264
|
-
},
|
|
265
|
-
error: {
|
|
266
|
-
emoji: "❌",
|
|
267
|
-
label: "ERROR",
|
|
268
|
-
background: "linear-gradient(135deg, #e84393 0%, #d63031 100%)",
|
|
269
|
-
color: "#ffffff",
|
|
270
|
-
border: "1px solid #e84393",
|
|
271
|
-
shadow: "0 2px 4px rgba(232, 67, 147, 0.3)"
|
|
272
|
-
},
|
|
273
|
-
success: {
|
|
274
|
-
emoji: "✅",
|
|
275
|
-
label: "SUCCESS",
|
|
276
|
-
background: "linear-gradient(135deg, #00b894 0%, #00a085 100%)",
|
|
277
|
-
color: "#ffffff",
|
|
278
|
-
border: "1px solid #00b894",
|
|
279
|
-
shadow: "0 2px 4px rgba(0, 184, 148, 0.3)"
|
|
280
|
-
},
|
|
281
|
-
critical: {
|
|
282
|
-
emoji: "🔥",
|
|
283
|
-
label: "CRITICAL",
|
|
284
|
-
background: "linear-gradient(135deg, #ff3838 0%, #ff1744 100%)",
|
|
285
|
-
color: "#ffffff",
|
|
286
|
-
border: "2px solid #ff3838",
|
|
287
|
-
shadow: "0 4px 8px rgba(255, 56, 56, 0.5)"
|
|
288
|
-
}
|
|
289
|
-
},
|
|
290
|
-
dark: {
|
|
291
|
-
debug: {
|
|
292
|
-
emoji: "🌙",
|
|
293
|
-
label: "DEBUG",
|
|
294
|
-
background: "linear-gradient(135deg, #2d3748 0%, #4a5568 100%)",
|
|
295
|
-
color: "#e2e8f0",
|
|
296
|
-
border: "1px solid #4a5568",
|
|
297
|
-
shadow: "0 2px 4px rgba(45, 55, 72, 0.8)"
|
|
298
|
-
},
|
|
299
|
-
info: {
|
|
300
|
-
emoji: "💡",
|
|
301
|
-
label: "INFO",
|
|
302
|
-
background: "linear-gradient(135deg, #1a202c 0%, #2d3748 100%)",
|
|
303
|
-
color: "#90cdf4",
|
|
304
|
-
border: "1px solid #3182ce",
|
|
305
|
-
shadow: "0 2px 4px rgba(26, 32, 44, 0.8)"
|
|
306
|
-
},
|
|
307
|
-
warn: {
|
|
308
|
-
emoji: "⚡",
|
|
309
|
-
label: "WARN",
|
|
310
|
-
background: "linear-gradient(135deg, #744210 0%, #975a16 100%)",
|
|
311
|
-
color: "#faf089",
|
|
312
|
-
border: "1px solid #d69e2e",
|
|
313
|
-
shadow: "0 2px 4px rgba(116, 66, 16, 0.8)"
|
|
314
|
-
},
|
|
315
|
-
error: {
|
|
316
|
-
emoji: "💀",
|
|
317
|
-
label: "ERROR",
|
|
318
|
-
background: "linear-gradient(135deg, #742a2a 0%, #9b2c2c 100%)",
|
|
319
|
-
color: "#feb2b2",
|
|
320
|
-
border: "1px solid #e53e3e",
|
|
321
|
-
shadow: "0 2px 4px rgba(116, 42, 42, 0.8)"
|
|
322
|
-
},
|
|
323
|
-
success: {
|
|
324
|
-
emoji: "🎯",
|
|
325
|
-
label: "SUCCESS",
|
|
326
|
-
background: "linear-gradient(135deg, #276749 0%, #2f855a 100%)",
|
|
327
|
-
color: "#9ae6b4",
|
|
328
|
-
border: "1px solid #38a169",
|
|
329
|
-
shadow: "0 2px 4px rgba(39, 103, 73, 0.8)"
|
|
330
|
-
},
|
|
331
|
-
critical: {
|
|
332
|
-
emoji: "💥",
|
|
333
|
-
label: "CRITICAL",
|
|
334
|
-
background: "linear-gradient(135deg, #1a1a1a 0%, #ff0000 100%)",
|
|
335
|
-
color: "#ffffff",
|
|
336
|
-
border: "2px solid #ff0000",
|
|
337
|
-
shadow: "0 4px 8px rgba(255, 0, 0, 0.9)"
|
|
338
|
-
}
|
|
339
|
-
},
|
|
340
|
-
neon: {
|
|
341
|
-
debug: {
|
|
342
|
-
emoji: "⚡",
|
|
343
|
-
label: "DEBUG",
|
|
344
|
-
background: "linear-gradient(135deg, #0f3460 0%, #e94560 100%)",
|
|
345
|
-
color: "#00ffff",
|
|
346
|
-
border: "1px solid #00ffff",
|
|
347
|
-
shadow: "0 0 10px rgba(0, 255, 255, 0.5)"
|
|
348
|
-
},
|
|
349
|
-
info: {
|
|
350
|
-
emoji: "🔮",
|
|
351
|
-
label: "INFO",
|
|
352
|
-
background: "linear-gradient(135deg, #16213e 0%, #0f3460 100%)",
|
|
353
|
-
color: "#00ff41",
|
|
354
|
-
border: "1px solid #00ff41",
|
|
355
|
-
shadow: "0 0 10px rgba(0, 255, 65, 0.5)"
|
|
356
|
-
},
|
|
357
|
-
warn: {
|
|
358
|
-
emoji: "⚠️",
|
|
359
|
-
label: "WARN",
|
|
360
|
-
background: "linear-gradient(135deg, #533a03 0%, #e94560 100%)",
|
|
361
|
-
color: "#ffff00",
|
|
362
|
-
border: "1px solid #ffff00",
|
|
363
|
-
shadow: "0 0 10px rgba(255, 255, 0, 0.5)"
|
|
364
|
-
},
|
|
365
|
-
error: {
|
|
366
|
-
emoji: "💥",
|
|
367
|
-
label: "ERROR",
|
|
368
|
-
background: "linear-gradient(135deg, #5c0a0a 0%, #ff073a 100%)",
|
|
369
|
-
color: "#ff073a",
|
|
370
|
-
border: "1px solid #ff073a",
|
|
371
|
-
shadow: "0 0 10px rgba(255, 7, 58, 0.8)"
|
|
372
|
-
},
|
|
373
|
-
success: {
|
|
374
|
-
emoji: "✨",
|
|
375
|
-
label: "SUCCESS",
|
|
376
|
-
background: "linear-gradient(135deg, #0a5c0a 0%, #39ff14 100%)",
|
|
377
|
-
color: "#39ff14",
|
|
378
|
-
border: "1px solid #39ff14",
|
|
379
|
-
shadow: "0 0 10px rgba(57, 255, 20, 0.8)"
|
|
380
|
-
},
|
|
381
|
-
critical: {
|
|
382
|
-
emoji: "🌟",
|
|
383
|
-
label: "CRITICAL",
|
|
384
|
-
background: "linear-gradient(135deg, #000000 0%, #ff0080 100%)",
|
|
385
|
-
color: "#ff0080",
|
|
386
|
-
border: "2px solid #ff0080",
|
|
387
|
-
shadow: "0 0 20px rgba(255, 0, 128, 1)"
|
|
388
|
-
}
|
|
389
|
-
},
|
|
390
|
-
minimal: {
|
|
391
|
-
debug: {
|
|
392
|
-
emoji: "",
|
|
393
|
-
label: "DEBUG",
|
|
394
|
-
background: "#f7fafc",
|
|
395
|
-
color: "#4a5568",
|
|
396
|
-
border: "1px solid #e2e8f0",
|
|
397
|
-
shadow: "none"
|
|
398
|
-
},
|
|
399
|
-
info: {
|
|
400
|
-
emoji: "",
|
|
401
|
-
label: "INFO",
|
|
402
|
-
background: "#ebf8ff",
|
|
403
|
-
color: "#2b6cb0",
|
|
404
|
-
border: "1px solid #bee3f8",
|
|
405
|
-
shadow: "none"
|
|
406
|
-
},
|
|
407
|
-
warn: {
|
|
408
|
-
emoji: "",
|
|
409
|
-
label: "WARN",
|
|
410
|
-
background: "#fffbf0",
|
|
411
|
-
color: "#c05621",
|
|
412
|
-
border: "1px solid #fed7aa",
|
|
413
|
-
shadow: "none"
|
|
414
|
-
},
|
|
415
|
-
error: {
|
|
416
|
-
emoji: "",
|
|
417
|
-
label: "ERROR",
|
|
418
|
-
background: "#fef5f5",
|
|
419
|
-
color: "#c53030",
|
|
420
|
-
border: "1px solid #fca5a5",
|
|
421
|
-
shadow: "none"
|
|
422
|
-
},
|
|
423
|
-
success: {
|
|
424
|
-
emoji: "",
|
|
425
|
-
label: "SUCCESS",
|
|
426
|
-
background: "#f0fff4",
|
|
427
|
-
color: "#2f855a",
|
|
428
|
-
border: "1px solid #9ae6b4",
|
|
429
|
-
shadow: "none"
|
|
430
|
-
},
|
|
431
|
-
critical: {
|
|
432
|
-
emoji: "",
|
|
433
|
-
label: "CRITICAL",
|
|
434
|
-
background: "#fef5f5",
|
|
435
|
-
color: "#e53e3e",
|
|
436
|
-
border: "2px solid #f56565",
|
|
437
|
-
shadow: "none"
|
|
438
|
-
}
|
|
439
|
-
},
|
|
440
|
-
light: {
|
|
441
|
-
debug: {
|
|
442
|
-
emoji: "🔍",
|
|
443
|
-
label: "DEBUG",
|
|
444
|
-
background: "linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%)",
|
|
445
|
-
color: "#1565c0",
|
|
446
|
-
border: "1px solid #90caf9",
|
|
447
|
-
shadow: "0 1px 3px rgba(33, 150, 243, 0.2)"
|
|
448
|
-
},
|
|
449
|
-
info: {
|
|
450
|
-
emoji: "ℹ️",
|
|
451
|
-
label: "INFO",
|
|
452
|
-
background: "linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%)",
|
|
453
|
-
color: "#7b1fa2",
|
|
454
|
-
border: "1px solid #ce93d8",
|
|
455
|
-
shadow: "0 1px 3px rgba(156, 39, 176, 0.2)"
|
|
456
|
-
},
|
|
457
|
-
warn: {
|
|
458
|
-
emoji: "⚠️",
|
|
459
|
-
label: "WARN",
|
|
460
|
-
background: "linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%)",
|
|
461
|
-
color: "#f57c00",
|
|
462
|
-
border: "1px solid #ffcc02",
|
|
463
|
-
shadow: "0 1px 3px rgba(255, 152, 0, 0.2)"
|
|
464
|
-
},
|
|
465
|
-
error: {
|
|
466
|
-
emoji: "❌",
|
|
467
|
-
label: "ERROR",
|
|
468
|
-
background: "linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%)",
|
|
469
|
-
color: "#d32f2f",
|
|
470
|
-
border: "1px solid #f44336",
|
|
471
|
-
shadow: "0 1px 3px rgba(244, 67, 54, 0.2)"
|
|
472
|
-
},
|
|
473
|
-
success: {
|
|
474
|
-
emoji: "✅",
|
|
475
|
-
label: "SUCCESS",
|
|
476
|
-
background: "linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%)",
|
|
477
|
-
color: "#388e3c",
|
|
478
|
-
border: "1px solid #4caf50",
|
|
479
|
-
shadow: "0 1px 3px rgba(76, 175, 80, 0.2)"
|
|
480
|
-
},
|
|
481
|
-
critical: {
|
|
482
|
-
emoji: "🚨",
|
|
483
|
-
label: "CRITICAL",
|
|
484
|
-
background: "linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%)",
|
|
485
|
-
color: "#c2185b",
|
|
486
|
-
border: "2px solid #e91e63",
|
|
487
|
-
shadow: "0 2px 6px rgba(233, 30, 99, 0.3)"
|
|
488
|
-
}
|
|
489
|
-
},
|
|
490
|
-
cyberpunk: {
|
|
491
|
-
debug: {
|
|
492
|
-
emoji: "🤖",
|
|
493
|
-
label: "DEBUG",
|
|
494
|
-
background: "linear-gradient(135deg, #0d1b2a 0%, #415a77 100%)",
|
|
495
|
-
color: "#00d4aa",
|
|
496
|
-
border: "1px solid #00d4aa",
|
|
497
|
-
shadow: "0 0 15px rgba(0, 212, 170, 0.4)"
|
|
498
|
-
},
|
|
499
|
-
info: {
|
|
500
|
-
emoji: "🔗",
|
|
501
|
-
label: "INFO",
|
|
502
|
-
background: "linear-gradient(135deg, #1b263b 0%, #0d1b2a 100%)",
|
|
503
|
-
color: "#00b4d8",
|
|
504
|
-
border: "1px solid #00b4d8",
|
|
505
|
-
shadow: "0 0 15px rgba(0, 180, 216, 0.4)"
|
|
506
|
-
},
|
|
507
|
-
warn: {
|
|
508
|
-
emoji: "⚡",
|
|
509
|
-
label: "WARN",
|
|
510
|
-
background: "linear-gradient(135deg, #f72585 0%, #b5179e 100%)",
|
|
511
|
-
color: "#ffff3f",
|
|
512
|
-
border: "1px solid #ffff3f",
|
|
513
|
-
shadow: "0 0 15px rgba(255, 255, 63, 0.4)"
|
|
514
|
-
},
|
|
515
|
-
error: {
|
|
516
|
-
emoji: "💀",
|
|
517
|
-
label: "ERROR",
|
|
518
|
-
background: "linear-gradient(135deg, #7209b7 0%, #480ca8 100%)",
|
|
519
|
-
color: "#ff006e",
|
|
520
|
-
border: "1px solid #ff006e",
|
|
521
|
-
shadow: "0 0 15px rgba(255, 0, 110, 0.6)"
|
|
522
|
-
},
|
|
523
|
-
success: {
|
|
524
|
-
emoji: "⚡",
|
|
525
|
-
label: "SUCCESS",
|
|
526
|
-
background: "linear-gradient(135deg, #003566 0%, #001d3d 100%)",
|
|
527
|
-
color: "#00f5ff",
|
|
528
|
-
border: "1px solid #00f5ff",
|
|
529
|
-
shadow: "0 0 15px rgba(0, 245, 255, 0.4)"
|
|
530
|
-
},
|
|
531
|
-
critical: {
|
|
532
|
-
emoji: "💥",
|
|
533
|
-
label: "CRITICAL",
|
|
534
|
-
background: "linear-gradient(135deg, #000000 0%, #ff0040 100%)",
|
|
535
|
-
color: "#ff0040",
|
|
536
|
-
border: "2px solid #ff0040",
|
|
537
|
-
shadow: "0 0 25px rgba(255, 0, 64, 0.8)"
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
};
|
|
541
|
-
//#endregion
|
|
542
|
-
//#region src/styling/banners.ts
|
|
543
|
-
/**
|
|
544
|
-
* Banner variants for different display capabilities
|
|
545
|
-
*/
|
|
546
|
-
const BANNER_VARIANTS = {
|
|
547
|
-
simple: {
|
|
548
|
-
text: "🚀 ADVANCED LOGGER v2.0.0 - State-of-the-art Console Styling 🚀",
|
|
549
|
-
style: "background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 12px 20px; border-radius: 8px; font-weight: bold; font-size: 14px;"
|
|
550
|
-
},
|
|
551
|
-
ascii: {
|
|
552
|
-
text: `
|
|
553
|
-
___ ____ _ __ ___ _ __ _____ _____ ____ __ ___ _____ _____ _____ ____
|
|
554
|
-
/ _ \\ / __ \\| | / / / _ \\ | \\ | |/ ____| ____| _ \\ | | / _ \\ / ____| ___| _ | _ \\
|
|
555
|
-
/ /_\\ \\ / / _\` | |/ / / /_\\ \\ | \\| | | | |__ | | | | | | / / \\ \\| | __| |_ | |_| | |_) |
|
|
556
|
-
| _ || | (_| | < | _ | | . \` | | | __| | | | | | | | | | | | |_ | _| | /| _ <
|
|
557
|
-
| | | |\\ \\__,_|_|\\_\\ | | | | | |\\ | |___| |____| |_| | | |__\\ \\_/ /| |__| | |___| |\\ \\| |_) |
|
|
558
|
-
\\_| |_/ \\____/ \\_| |_/ |_| \\_|\\_____|______|____/ |_____/\\___/ \\_____|_____|_| \\_|____/
|
|
559
|
-
|
|
560
|
-
Advanced Logger v2.0.0 - Console Excellence`,
|
|
561
|
-
style: "font-family: \"Courier New\", Consolas, Monaco, monospace; color: #667eea; font-size: 11px; line-height: 1.2;"
|
|
562
|
-
},
|
|
563
|
-
unicode: {
|
|
564
|
-
text: `
|
|
565
|
-
╔══════════════════════════════════════════════════════════════════════════╗
|
|
566
|
-
║ 🚀 ADVANCED LOGGER v2.0.0 ║
|
|
567
|
-
║ State-of-the-art Console Styling ║
|
|
568
|
-
╚══════════════════════════════════════════════════════════════════════════╝`,
|
|
569
|
-
style: "font-family: \"Courier New\", Consolas, Monaco, monospace; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 15px; border-radius: 8px; font-size: 12px; line-height: 1.3;"
|
|
570
|
-
},
|
|
571
|
-
svg: {
|
|
572
|
-
text: " ",
|
|
573
|
-
style: `
|
|
574
|
-
background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 80'><defs><linearGradient id='grad' x1='0%' y1='0%' x2='100%' y2='0%'><stop offset='0%' style='stop-color:%23667eea'/><stop offset='100%' style='stop-color:%23764ba2'/></linearGradient></defs><rect width='100%' height='100%' fill='url(%23grad)' rx='8'/><text x='200' y='30' text-anchor='middle' fill='white' font-family='monospace' font-size='14' font-weight='bold'>🚀 ADVANCED LOGGER</text><text x='200' y='50' text-anchor='middle' fill='white' font-family='monospace' font-size='12'>State-of-the-art Console Styling</text><text x='200' y='65' text-anchor='middle' fill='white' font-family='monospace' font-size='10'>v2.0.0</text></svg>");
|
|
575
|
-
background-repeat: no-repeat;
|
|
576
|
-
background-size: 400px 80px;
|
|
577
|
-
padding: 40px 200px;
|
|
578
|
-
color: transparent;
|
|
579
|
-
display: inline-block;
|
|
580
|
-
border-radius: 8px;
|
|
581
|
-
`
|
|
582
|
-
},
|
|
583
|
-
animated: {
|
|
584
|
-
text: " 🚀 ADVANCED LOGGER v2.0.0 ",
|
|
585
|
-
style: `
|
|
586
|
-
background: linear-gradient(-45deg, #667eea, #764ba2, #667eea, #764ba2);
|
|
587
|
-
background-size: 400% 400%;
|
|
588
|
-
color: white;
|
|
589
|
-
padding: 15px 25px;
|
|
590
|
-
border-radius: 10px;
|
|
591
|
-
font-weight: bold;
|
|
592
|
-
font-size: 14px;
|
|
593
|
-
font-family: monospace;
|
|
594
|
-
animation: gradientShift 3s ease infinite;
|
|
595
|
-
display: inline-block;
|
|
596
|
-
`
|
|
597
|
-
}
|
|
598
|
-
};
|
|
599
|
-
/**
|
|
600
|
-
* Theme-specific banners for enhanced visual theming
|
|
601
|
-
*/
|
|
602
|
-
const THEME_BANNERS = {
|
|
603
|
-
default: {
|
|
604
|
-
simple: "🚀 ADVANCED LOGGER v2.0.0 - State-of-the-art Console Styling 🚀",
|
|
605
|
-
style: "background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 12px 20px; border-radius: 8px; font-weight: bold;"
|
|
606
|
-
},
|
|
607
|
-
dark: {
|
|
608
|
-
simple: "🌙 ADVANCED LOGGER v2.0.0 - Dark Mode Console Excellence 🌙",
|
|
609
|
-
style: "background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%); color: #e2e8f0; padding: 12px 20px; border-radius: 8px; font-weight: bold; border: 1px solid #4a5568;"
|
|
610
|
-
},
|
|
611
|
-
neon: {
|
|
612
|
-
simple: "⚡ ADVANCED LOGGER v2.0.0 - Cyberpunk Console Experience ⚡",
|
|
613
|
-
style: "background: linear-gradient(135deg, #0f3460 0%, #e94560 100%); color: #00ffff; padding: 12px 20px; border-radius: 8px; font-weight: bold; text-shadow: 0 0 10px #00ffff;"
|
|
614
|
-
},
|
|
615
|
-
minimal: {
|
|
616
|
-
simple: "ADVANCED LOGGER v2.0.0 - Clean Console Styling",
|
|
617
|
-
style: "background: #f7fafc; color: #2d3748; padding: 8px 16px; border: 1px solid #e2e8f0; border-radius: 4px; font-weight: 500;"
|
|
618
|
-
},
|
|
619
|
-
light: {
|
|
620
|
-
simple: "☀️ ADVANCED LOGGER v2.0.0 - Bright Console Styling ☀️",
|
|
621
|
-
style: "background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%); color: #495057; padding: 12px 20px; border-radius: 8px; font-weight: bold; border: 1px solid #dee2e6;"
|
|
622
|
-
},
|
|
623
|
-
cyberpunk: {
|
|
624
|
-
simple: "🤖 ADVANCED LOGGER v2.0.0 - Neural Console Interface 🤖",
|
|
625
|
-
style: "background: linear-gradient(135deg, #0d1b2a 0%, #415a77 100%); color: #00d4aa; padding: 12px 20px; border-radius: 8px; font-weight: bold; text-shadow: 0 0 10px #00d4aa; border: 1px solid #00d4aa;"
|
|
626
|
-
}
|
|
627
|
-
};
|
|
628
|
-
/**
|
|
629
|
-
* Feature detection for banner capabilities. Returns `'simple'` immediately
|
|
630
|
-
* if neither `navigator` nor `document` exist (Node, SSR, workers).
|
|
631
|
-
*
|
|
632
|
-
*/
|
|
633
|
-
function detectBannerCapabilities() {
|
|
634
|
-
if (typeof navigator === "undefined" || typeof document === "undefined") return "simple";
|
|
635
|
-
const userAgent = navigator.userAgent;
|
|
636
|
-
const isChrome = /Chrome/.test(userAgent);
|
|
637
|
-
const isFirefox = /Firefox/.test(userAgent);
|
|
638
|
-
const isSafari = /Safari/.test(userAgent) && !/Chrome/.test(userAgent);
|
|
639
|
-
const supportsSVG = !!document.createElementNS && !!document.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect;
|
|
640
|
-
if ("animationName" in document.createElement("div").style && isChrome) return "animated";
|
|
641
|
-
else if (supportsSVG && (isChrome || isFirefox)) return "svg";
|
|
642
|
-
else if (isChrome || isFirefox) return "unicode";
|
|
643
|
-
else if (isSafari) return "ascii";
|
|
644
|
-
return "simple";
|
|
645
|
-
}
|
|
646
|
-
/**
|
|
647
|
-
* Display initialization banner with advanced styling. No-op in Node,
|
|
648
|
-
* SSR, or Web Workers (DOM-guard at the top).
|
|
649
|
-
*
|
|
650
|
-
*/
|
|
651
|
-
function displayInitBanner(bannerType) {
|
|
652
|
-
if (typeof document === "undefined") return;
|
|
653
|
-
const selectedType = bannerType || detectBannerCapabilities();
|
|
654
|
-
const banner = BANNER_VARIANTS[selectedType];
|
|
655
|
-
if (selectedType === "animated") {
|
|
656
|
-
const style = document.createElement("style");
|
|
657
|
-
style.textContent = `
|
|
658
|
-
@keyframes gradientShift {
|
|
659
|
-
0% { background-position: 0% 50%; }
|
|
660
|
-
50% { background-position: 100% 50%; }
|
|
661
|
-
100% { background-position: 0% 50%; }
|
|
662
|
-
}
|
|
663
|
-
`;
|
|
664
|
-
document.head.appendChild(style);
|
|
665
|
-
}
|
|
666
|
-
console.log(`%c${banner.text}`, banner.style);
|
|
667
|
-
const features = [
|
|
668
|
-
"🎨 Advanced CSS Console Styling",
|
|
669
|
-
"📍 Automatic Stack Trace Parsing",
|
|
670
|
-
"🔧 Scoped Loggers & Prefixes",
|
|
671
|
-
"⚡ Performance Timers",
|
|
672
|
-
"🎯 Verbosity Filtering",
|
|
673
|
-
"🔌 Extensible Handlers",
|
|
674
|
-
"📱 Modern TypeScript Patterns",
|
|
675
|
-
"📤 Export & Clipboard Support"
|
|
676
|
-
];
|
|
677
|
-
console.group(`%c✨ Features`, "background: #f8f9fa; color: #495057; padding: 4px 8px; border-radius: 4px; font-weight: bold;");
|
|
678
|
-
features.forEach((feature) => {
|
|
679
|
-
console.log(`%c${feature}`, "color: #6c757d; font-size: 13px;");
|
|
680
|
-
});
|
|
681
|
-
console.groupEnd();
|
|
682
|
-
console.log("");
|
|
683
|
-
}
|
|
684
|
-
//#endregion
|
|
685
|
-
//#region src/styling/SmartPresets.ts
|
|
686
|
-
/**
|
|
687
|
-
* Smart presets that configure the entire log appearance
|
|
688
|
-
*/
|
|
689
|
-
const SMART_PRESETS = {
|
|
690
|
-
/**
|
|
691
|
-
* Default preset - works perfectly out-of-the-box
|
|
692
|
-
* Clean, readable, automatically adaptive to dark/light themes
|
|
693
|
-
*/
|
|
694
|
-
default: {
|
|
695
|
-
layout: {
|
|
696
|
-
spacing: "normal",
|
|
697
|
-
innerPadding: "2px",
|
|
698
|
-
outerMargin: "1px"
|
|
699
|
-
},
|
|
700
|
-
timestamp: {
|
|
701
|
-
show: true,
|
|
702
|
-
color: "auto",
|
|
703
|
-
font: "Monaco, Consolas, monospace",
|
|
704
|
-
size: "11px"
|
|
705
|
-
},
|
|
706
|
-
level: {
|
|
707
|
-
show: true,
|
|
708
|
-
style: "badge",
|
|
709
|
-
uppercase: false,
|
|
710
|
-
padding: "2px 8px"
|
|
711
|
-
},
|
|
712
|
-
prefix: {
|
|
713
|
-
show: true,
|
|
714
|
-
style: "dark",
|
|
715
|
-
padding: "2px 6px"
|
|
716
|
-
},
|
|
717
|
-
message: {
|
|
718
|
-
show: true,
|
|
719
|
-
color: "auto",
|
|
720
|
-
font: "system-ui, -apple-system, sans-serif",
|
|
721
|
-
size: "14px"
|
|
722
|
-
},
|
|
723
|
-
location: {
|
|
724
|
-
show: true,
|
|
725
|
-
color: "auto",
|
|
726
|
-
font: "Monaco, Consolas, monospace",
|
|
727
|
-
size: "11px"
|
|
728
|
-
}
|
|
729
|
-
},
|
|
730
|
-
/**
|
|
731
|
-
* Cyberpunk preset - neon colors, glowing effects, dark theme
|
|
732
|
-
*/
|
|
733
|
-
cyberpunk: {
|
|
734
|
-
layout: {
|
|
735
|
-
spacing: "compact",
|
|
736
|
-
innerPadding: "1px",
|
|
737
|
-
outerMargin: "0px"
|
|
738
|
-
},
|
|
739
|
-
timestamp: {
|
|
740
|
-
show: true,
|
|
741
|
-
color: "#00ffff",
|
|
742
|
-
font: "Monaco, Consolas, monospace",
|
|
743
|
-
size: "10px",
|
|
744
|
-
style: "neon"
|
|
745
|
-
},
|
|
746
|
-
level: {
|
|
747
|
-
show: true,
|
|
748
|
-
style: "glowing",
|
|
749
|
-
uppercase: true,
|
|
750
|
-
padding: "2px 8px"
|
|
751
|
-
},
|
|
752
|
-
prefix: {
|
|
753
|
-
show: true,
|
|
754
|
-
color: "#ff0080",
|
|
755
|
-
background: "rgba(255, 0, 128, 0.1)",
|
|
756
|
-
border: "1px solid #ff0080",
|
|
757
|
-
style: "neon"
|
|
758
|
-
},
|
|
759
|
-
message: {
|
|
760
|
-
show: true,
|
|
761
|
-
color: "#00ff41",
|
|
762
|
-
font: "Monaco, Consolas, monospace",
|
|
763
|
-
size: "13px"
|
|
764
|
-
},
|
|
765
|
-
location: { show: false },
|
|
766
|
-
backdrop: "blur(2px)",
|
|
767
|
-
transparency: .9
|
|
768
|
-
},
|
|
769
|
-
/**
|
|
770
|
-
* Glassmorphism preset - modern blur effects, transparency
|
|
771
|
-
*/
|
|
772
|
-
glassmorphism: {
|
|
773
|
-
layout: {
|
|
774
|
-
spacing: "spacious",
|
|
775
|
-
innerPadding: "4px",
|
|
776
|
-
outerMargin: "2px"
|
|
777
|
-
},
|
|
778
|
-
timestamp: {
|
|
779
|
-
show: true,
|
|
780
|
-
color: "auto",
|
|
781
|
-
font: "system-ui, sans-serif",
|
|
782
|
-
size: "11px",
|
|
783
|
-
style: "glassmorphic"
|
|
784
|
-
},
|
|
785
|
-
level: {
|
|
786
|
-
show: true,
|
|
787
|
-
style: "glassmorphic",
|
|
788
|
-
uppercase: false,
|
|
789
|
-
padding: "4px 12px"
|
|
790
|
-
},
|
|
791
|
-
prefix: {
|
|
792
|
-
show: true,
|
|
793
|
-
style: "glassmorphic",
|
|
794
|
-
padding: "3px 8px"
|
|
795
|
-
},
|
|
796
|
-
message: {
|
|
797
|
-
show: true,
|
|
798
|
-
color: "auto",
|
|
799
|
-
font: "system-ui, sans-serif",
|
|
800
|
-
size: "14px"
|
|
801
|
-
},
|
|
802
|
-
location: {
|
|
803
|
-
show: true,
|
|
804
|
-
color: "auto",
|
|
805
|
-
font: "system-ui, sans-serif",
|
|
806
|
-
size: "11px",
|
|
807
|
-
style: "glassmorphic"
|
|
808
|
-
},
|
|
809
|
-
backdrop: "blur(10px)",
|
|
810
|
-
transparency: .8
|
|
811
|
-
},
|
|
812
|
-
/**
|
|
813
|
-
* Minimal preset - clean, no decorations, maximum readability
|
|
814
|
-
*/
|
|
815
|
-
minimal: {
|
|
816
|
-
layout: {
|
|
817
|
-
spacing: "compact",
|
|
818
|
-
innerPadding: "0px",
|
|
819
|
-
outerMargin: "0px"
|
|
820
|
-
},
|
|
821
|
-
timestamp: { show: false },
|
|
822
|
-
level: {
|
|
823
|
-
show: true,
|
|
824
|
-
style: "flat",
|
|
825
|
-
uppercase: true,
|
|
826
|
-
padding: "0px 4px",
|
|
827
|
-
border: "none",
|
|
828
|
-
background: "transparent"
|
|
829
|
-
},
|
|
830
|
-
prefix: {
|
|
831
|
-
show: true,
|
|
832
|
-
style: "flat",
|
|
833
|
-
padding: "0px 4px",
|
|
834
|
-
border: "none",
|
|
835
|
-
background: "transparent"
|
|
836
|
-
},
|
|
837
|
-
message: {
|
|
838
|
-
show: true,
|
|
839
|
-
color: "auto",
|
|
840
|
-
font: "system-ui, sans-serif",
|
|
841
|
-
size: "14px"
|
|
842
|
-
},
|
|
843
|
-
location: { show: false }
|
|
844
|
-
},
|
|
845
|
-
/**
|
|
846
|
-
* Debug preset - monospace, detailed, compact for development
|
|
847
|
-
*/
|
|
848
|
-
debug: {
|
|
849
|
-
layout: {
|
|
850
|
-
spacing: "compact",
|
|
851
|
-
innerPadding: "1px",
|
|
852
|
-
outerMargin: "0px"
|
|
853
|
-
},
|
|
854
|
-
timestamp: {
|
|
855
|
-
show: true,
|
|
856
|
-
color: "auto",
|
|
857
|
-
font: "Monaco, Consolas, monospace",
|
|
858
|
-
size: "10px"
|
|
859
|
-
},
|
|
860
|
-
level: {
|
|
861
|
-
show: true,
|
|
862
|
-
style: "compact",
|
|
863
|
-
uppercase: true,
|
|
864
|
-
padding: "1px 4px",
|
|
865
|
-
font: "Monaco, Consolas, monospace",
|
|
866
|
-
size: "10px"
|
|
867
|
-
},
|
|
868
|
-
prefix: {
|
|
869
|
-
show: true,
|
|
870
|
-
style: "compact",
|
|
871
|
-
padding: "1px 4px",
|
|
872
|
-
font: "Monaco, Consolas, monospace",
|
|
873
|
-
size: "10px"
|
|
874
|
-
},
|
|
875
|
-
message: {
|
|
876
|
-
show: true,
|
|
877
|
-
color: "auto",
|
|
878
|
-
font: "Monaco, Consolas, monospace",
|
|
879
|
-
size: "12px"
|
|
880
|
-
},
|
|
881
|
-
location: {
|
|
882
|
-
show: true,
|
|
883
|
-
color: "auto",
|
|
884
|
-
font: "Monaco, Consolas, monospace",
|
|
885
|
-
size: "10px",
|
|
886
|
-
style: "clickable"
|
|
887
|
-
}
|
|
888
|
-
},
|
|
889
|
-
/**
|
|
890
|
-
* Production preset - clean, essential info only
|
|
891
|
-
*/
|
|
892
|
-
production: {
|
|
893
|
-
layout: {
|
|
894
|
-
spacing: "normal",
|
|
895
|
-
innerPadding: "2px",
|
|
896
|
-
outerMargin: "1px"
|
|
897
|
-
},
|
|
898
|
-
timestamp: {
|
|
899
|
-
show: true,
|
|
900
|
-
color: "auto",
|
|
901
|
-
font: "system-ui, sans-serif",
|
|
902
|
-
size: "11px"
|
|
903
|
-
},
|
|
904
|
-
level: {
|
|
905
|
-
show: true,
|
|
906
|
-
style: "badge",
|
|
907
|
-
uppercase: false,
|
|
908
|
-
padding: "2px 6px"
|
|
909
|
-
},
|
|
910
|
-
prefix: { show: false },
|
|
911
|
-
message: {
|
|
912
|
-
show: true,
|
|
913
|
-
color: "auto",
|
|
914
|
-
font: "system-ui, sans-serif",
|
|
915
|
-
size: "14px"
|
|
916
|
-
},
|
|
917
|
-
location: { show: false }
|
|
918
|
-
}
|
|
919
|
-
};
|
|
920
|
-
/**
|
|
921
|
-
* Get a smart preset by name
|
|
922
|
-
*/
|
|
923
|
-
function getSmartPreset(name) {
|
|
924
|
-
return SMART_PRESETS[name] || null;
|
|
925
|
-
}
|
|
926
|
-
/**
|
|
927
|
-
* List all available smart presets
|
|
928
|
-
*/
|
|
929
|
-
function getAvailablePresets() {
|
|
930
|
-
return Object.keys(SMART_PRESETS);
|
|
931
|
-
}
|
|
932
|
-
/**
|
|
933
|
-
* Check if a preset exists
|
|
934
|
-
*/
|
|
935
|
-
function hasPreset(name) {
|
|
936
|
-
return name in SMART_PRESETS;
|
|
937
|
-
}
|
|
938
|
-
//#endregion
|
|
939
|
-
export { THEME_BANNERS as a, StyleBuilder as c, BANNER_VARIANTS as i, StylePresets as l, getSmartPreset as n, displayInitBanner as o, hasPreset as r, THEME_PRESETS as s, getAvailablePresets as t };
|
|
940
|
-
|
|
941
|
-
//# sourceMappingURL=styling-84N8T97t.js.map
|