@mks2508/better-logger 0.14.0-alpha.1 → 1.0.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.
Files changed (145) hide show
  1. package/dist/chunks/{Logger-BW-kn5_7.js → Logger-CTAaDeZi.js} +49 -366
  2. package/dist/chunks/Logger-CTAaDeZi.js.map +1 -0
  3. package/dist/chunks/Logger-D8pK7XXt.js +2 -0
  4. package/dist/chunks/Logger-D8pK7XXt.js.map +1 -0
  5. package/dist/chunks/ScopedLogger-D-7q8uVP.js +2 -0
  6. package/dist/chunks/ScopedLogger-D-7q8uVP.js.map +1 -0
  7. package/dist/chunks/ScopedLogger-hS0qSkZD.js +361 -0
  8. package/dist/chunks/ScopedLogger-hS0qSkZD.js.map +1 -0
  9. package/dist/core.js +280 -307
  10. package/dist/exports.cjs +1 -1
  11. package/dist/exports.js +1 -1
  12. package/dist/index.cjs +1 -1
  13. package/dist/index.cjs.map +1 -1
  14. package/dist/index.js +226 -159
  15. package/dist/index.js.map +1 -1
  16. package/dist/styling.cjs +1 -1
  17. package/dist/styling.js +2 -2
  18. package/dist/types/Logger.d.ts +17 -15
  19. package/dist/types/Logger.d.ts.map +1 -1
  20. package/dist/types/core.d.ts +122 -216
  21. package/dist/types/core.d.ts.map +1 -1
  22. package/dist/types/exports-module.d.ts +1 -1
  23. package/dist/types/exports-module.d.ts.map +1 -1
  24. package/dist/types/index.d.ts +119 -4
  25. package/dist/types/index.d.ts.map +1 -1
  26. package/dist/types/styling-module.d.ts +1 -1
  27. package/dist/types/styling-module.d.ts.map +1 -1
  28. package/package.json +2 -1
  29. package/src/Logger.ts +105 -58
  30. package/src/index.ts +32 -25
  31. package/dist/.tsbuildinfo +0 -1
  32. package/dist/Logger.d.ts +0 -710
  33. package/dist/Logger.d.ts.map +0 -1
  34. package/dist/Logger.js +0 -1118
  35. package/dist/ScopedLogger.d.ts +0 -318
  36. package/dist/ScopedLogger.d.ts.map +0 -1
  37. package/dist/ScopedLogger.js +0 -426
  38. package/dist/chunks/Logger-BW-kn5_7.js.map +0 -1
  39. package/dist/chunks/Logger-BpeuYIxR.js +0 -2
  40. package/dist/chunks/Logger-BpeuYIxR.js.map +0 -1
  41. package/dist/cli/CommandProcessor.d.ts +0 -103
  42. package/dist/cli/CommandProcessor.d.ts.map +0 -1
  43. package/dist/cli/CommandProcessor.js +0 -184
  44. package/dist/cli/commands/ConfigCommand.d.ts +0 -17
  45. package/dist/cli/commands/ConfigCommand.d.ts.map +0 -1
  46. package/dist/cli/commands/ConfigCommand.js +0 -88
  47. package/dist/cli/commands/ExportCommand.d.ts +0 -51
  48. package/dist/cli/commands/ExportCommand.d.ts.map +0 -1
  49. package/dist/cli/commands/ExportCommand.js +0 -243
  50. package/dist/cli/commands/HistoryCommand.d.ts +0 -50
  51. package/dist/cli/commands/HistoryCommand.d.ts.map +0 -1
  52. package/dist/cli/commands/HistoryCommand.js +0 -96
  53. package/dist/cli/commands/StatusCommand.d.ts +0 -33
  54. package/dist/cli/commands/StatusCommand.d.ts.map +0 -1
  55. package/dist/cli/commands/StatusCommand.js +0 -93
  56. package/dist/cli/commands/ThemeCommand.d.ts +0 -33
  57. package/dist/cli/commands/ThemeCommand.d.ts.map +0 -1
  58. package/dist/cli/commands/ThemeCommand.js +0 -79
  59. package/dist/cli/help.d.ts +0 -15
  60. package/dist/cli/help.d.ts.map +0 -1
  61. package/dist/cli/help.js +0 -118
  62. package/dist/cli/index.d.ts +0 -15
  63. package/dist/cli/index.d.ts.map +0 -1
  64. package/dist/cli/index.js +0 -46
  65. package/dist/constants.d.ts +0 -122
  66. package/dist/constants.d.ts.map +0 -1
  67. package/dist/constants.js +0 -159
  68. package/dist/core.d.ts +0 -134
  69. package/dist/core.d.ts.map +0 -1
  70. package/dist/example.d.ts +0 -18
  71. package/dist/example.d.ts.map +0 -1
  72. package/dist/example.js +0 -154
  73. package/dist/exports-module.d.ts +0 -203
  74. package/dist/exports-module.d.ts.map +0 -1
  75. package/dist/exports-module.js +0 -260
  76. package/dist/handlers/AnalyticsLogHandler.d.ts +0 -11
  77. package/dist/handlers/AnalyticsLogHandler.d.ts.map +0 -1
  78. package/dist/handlers/AnalyticsLogHandler.js +0 -19
  79. package/dist/handlers/ExportLogHandler.d.ts +0 -103
  80. package/dist/handlers/ExportLogHandler.d.ts.map +0 -1
  81. package/dist/handlers/ExportLogHandler.js +0 -516
  82. package/dist/handlers/FileLogHandler.d.ts +0 -36
  83. package/dist/handlers/FileLogHandler.d.ts.map +0 -1
  84. package/dist/handlers/FileLogHandler.js +0 -156
  85. package/dist/handlers/RemoteLogHandler.d.ts +0 -14
  86. package/dist/handlers/RemoteLogHandler.d.ts.map +0 -1
  87. package/dist/handlers/RemoteLogHandler.js +0 -37
  88. package/dist/handlers/index.d.ts +0 -8
  89. package/dist/handlers/index.d.ts.map +0 -1
  90. package/dist/handlers/index.js +0 -7
  91. package/dist/index.d.ts +0 -157
  92. package/dist/index.d.ts.map +0 -1
  93. package/dist/main.d.ts +0 -2
  94. package/dist/main.d.ts.map +0 -1
  95. package/dist/main.js +0 -139
  96. package/dist/styling/LogStyleBuilder.d.ts +0 -149
  97. package/dist/styling/LogStyleBuilder.d.ts.map +0 -1
  98. package/dist/styling/LogStyleBuilder.js +0 -289
  99. package/dist/styling/SemanticStyles.d.ts +0 -181
  100. package/dist/styling/SemanticStyles.d.ts.map +0 -1
  101. package/dist/styling/SemanticStyles.js +0 -339
  102. package/dist/styling/SmartPresets.d.ts +0 -25
  103. package/dist/styling/SmartPresets.d.ts.map +0 -1
  104. package/dist/styling/SmartPresets.js +0 -276
  105. package/dist/styling/StyleBuilder.d.ts +0 -140
  106. package/dist/styling/StyleBuilder.d.ts.map +0 -1
  107. package/dist/styling/StyleBuilder.js +0 -280
  108. package/dist/styling/banners.d.ts +0 -45
  109. package/dist/styling/banners.d.ts.map +0 -1
  110. package/dist/styling/banners.js +0 -155
  111. package/dist/styling/index.d.ts +0 -10
  112. package/dist/styling/index.d.ts.map +0 -1
  113. package/dist/styling/index.js +0 -9
  114. package/dist/styling/themes.d.ts +0 -10
  115. package/dist/styling/themes.d.ts.map +0 -1
  116. package/dist/styling/themes.js +0 -231
  117. package/dist/styling-module.d.ts +0 -185
  118. package/dist/styling-module.d.ts.map +0 -1
  119. package/dist/styling-module.js +0 -199
  120. package/dist/types/core.js +0 -28
  121. package/dist/types/handlers.d.ts +0 -88
  122. package/dist/types/handlers.d.ts.map +0 -1
  123. package/dist/types/handlers.js +0 -4
  124. package/dist/types/index.js +0 -4
  125. package/dist/utils/environment.d.ts +0 -47
  126. package/dist/utils/environment.d.ts.map +0 -1
  127. package/dist/utils/environment.js +0 -85
  128. package/dist/utils/formatting.d.ts +0 -40
  129. package/dist/utils/formatting.d.ts.map +0 -1
  130. package/dist/utils/formatting.js +0 -117
  131. package/dist/utils/index.d.ts +0 -7
  132. package/dist/utils/index.d.ts.map +0 -1
  133. package/dist/utils/index.js +0 -6
  134. package/dist/utils/opentui-detection.d.ts +0 -34
  135. package/dist/utils/opentui-detection.d.ts.map +0 -1
  136. package/dist/utils/opentui-detection.js +0 -116
  137. package/dist/utils/output.d.ts +0 -44
  138. package/dist/utils/output.d.ts.map +0 -1
  139. package/dist/utils/output.js +0 -150
  140. package/dist/utils/stackTrace.d.ts +0 -9
  141. package/dist/utils/stackTrace.d.ts.map +0 -1
  142. package/dist/utils/stackTrace.js +0 -81
  143. package/dist/utils/timestamps.d.ts +0 -20
  144. package/dist/utils/timestamps.d.ts.map +0 -1
  145. package/dist/utils/timestamps.js +0 -71
@@ -1,149 +0,0 @@
1
- /**
2
- * @fileoverview LogStyleBuilder for fluent log styling API
3
- */
4
- import type { Logger } from '../Logger.js';
5
- import type { LogStyles, SpacingType } from '../types/index.js';
6
- /**
7
- * Fluent API builder for log styling with semantic methods
8
- */
9
- export declare class LogStyleBuilder {
10
- private logStyles;
11
- private logger;
12
- constructor(logger: Logger);
13
- /**
14
- * Configure timestamp styling
15
- */
16
- timestamp(): TimestampStyleBuilderProxy;
17
- /**
18
- * Configure level badge styling
19
- */
20
- level(): LevelStyleBuilderProxy;
21
- /**
22
- * Configure prefix styling
23
- */
24
- prefix(): PrefixStyleBuilderProxy;
25
- /**
26
- * Configure message text styling
27
- */
28
- message(): MessageStyleBuilderProxy;
29
- /**
30
- * Configure location info styling
31
- */
32
- location(): LocationStyleBuilderProxy;
33
- /**
34
- * Use a predefined preset
35
- */
36
- usePreset(presetName: string): LogStyleBuilder;
37
- /**
38
- * Customize with partial configuration
39
- */
40
- customize(overrides: Partial<LogStyles>): LogStyleBuilder;
41
- /**
42
- * Set layout spacing
43
- */
44
- spacing(type: SpacingType): LogStyleBuilder;
45
- /**
46
- * Set backdrop filter for glassmorphism effects
47
- */
48
- backdrop(filter: string): LogStyleBuilder;
49
- /**
50
- * Set overall transparency
51
- */
52
- transparency(value: number): LogStyleBuilder;
53
- /**
54
- * Apply the configured styles to the logger
55
- */
56
- apply(): void;
57
- /**
58
- * Get current configuration (for debugging)
59
- */
60
- getConfig(): LogStyles;
61
- /**
62
- * Internal method to update part configuration
63
- */
64
- _updatePartConfig(part: keyof LogStyles, styles: string): void;
65
- }
66
- /**
67
- * Base proxy class for part-specific styling
68
- */
69
- declare abstract class PartStyleBuilderProxy {
70
- protected parentBuilder: LogStyleBuilder;
71
- protected partName: keyof LogStyles;
72
- constructor(parentBuilder: LogStyleBuilder, partName: keyof LogStyles);
73
- /**
74
- * Return to the main builder for chaining other parts
75
- */
76
- and(): LogStyleBuilder;
77
- /**
78
- * Apply styles and finish configuration
79
- */
80
- apply(): void;
81
- /**
82
- * Helper to apply styles to the parent builder
83
- */
84
- protected applyStyles(styler: any): this;
85
- }
86
- /**
87
- * Timestamp styling proxy with fluent API
88
- */
89
- declare class TimestampStyleBuilderProxy extends PartStyleBuilderProxy {
90
- constructor(parentBuilder: LogStyleBuilder);
91
- default(): TimestampStyleBuilderProxy;
92
- hidden(): TimestampStyleBuilderProxy;
93
- minimal(): TimestampStyleBuilderProxy;
94
- muted(): TimestampStyleBuilderProxy;
95
- mono(): TimestampStyleBuilderProxy;
96
- compact(): TimestampStyleBuilderProxy;
97
- }
98
- /**
99
- * Level badge styling proxy with fluent API
100
- */
101
- declare class LevelStyleBuilderProxy extends PartStyleBuilderProxy {
102
- constructor(parentBuilder: LogStyleBuilder);
103
- badge(): LevelStyleBuilderProxy;
104
- gradient(from?: string, to?: string): LevelStyleBuilderProxy;
105
- glowing(): LevelStyleBuilderProxy;
106
- flat(): LevelStyleBuilderProxy;
107
- bold(): LevelStyleBuilderProxy;
108
- uppercase(): LevelStyleBuilderProxy;
109
- neon(): LevelStyleBuilderProxy;
110
- }
111
- /**
112
- * Prefix styling proxy with fluent API
113
- */
114
- declare class PrefixStyleBuilderProxy extends PartStyleBuilderProxy {
115
- constructor(parentBuilder: LogStyleBuilder);
116
- dark(): PrefixStyleBuilderProxy;
117
- light(): PrefixStyleBuilderProxy;
118
- compact(): PrefixStyleBuilderProxy;
119
- muted(): PrefixStyleBuilderProxy;
120
- mono(): PrefixStyleBuilderProxy;
121
- }
122
- /**
123
- * Message styling proxy with fluent API
124
- */
125
- declare class MessageStyleBuilderProxy extends PartStyleBuilderProxy {
126
- constructor(parentBuilder: LogStyleBuilder);
127
- readable(): MessageStyleBuilderProxy;
128
- code(): MessageStyleBuilderProxy;
129
- large(): MessageStyleBuilderProxy;
130
- system(): MessageStyleBuilderProxy;
131
- mono(): MessageStyleBuilderProxy;
132
- }
133
- /**
134
- * Location styling proxy with fluent API
135
- */
136
- declare class LocationStyleBuilderProxy extends PartStyleBuilderProxy {
137
- constructor(parentBuilder: LogStyleBuilder);
138
- subtle(): LocationStyleBuilderProxy;
139
- hidden(): LocationStyleBuilderProxy;
140
- clickable(): LocationStyleBuilderProxy;
141
- muted(): LocationStyleBuilderProxy;
142
- mono(): LocationStyleBuilderProxy;
143
- }
144
- /**
145
- * Create a new LogStyleBuilder instance
146
- */
147
- export declare function createLogStyleBuilder(logger: Logger): LogStyleBuilder;
148
- export {};
149
- //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M,yBAA0B,SAAQ,qBAAqB;gBAC7C,aAAa,EAAE,eAAe;IAI1C,MAAM,IAAI,yBAAyB;IAInC,MAAM,IAAI,yBAAyB;IAInC,SAAS,IAAI,yBAAyB;IAItC,KAAK,IAAI,yBAAyB;IAIlC,IAAI,IAAI,yBAAyB;CAGpC;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,eAAe,CAErE"}
@@ -1,289 +0,0 @@
1
- /**
2
- * @fileoverview LogStyleBuilder for fluent log styling API
3
- */
4
- import { TimestampStyler, LevelStyler, PrefixStyler, MessageStyler, LocationStyler } from './SemanticStyles.js';
5
- /**
6
- * Fluent API builder for log styling with semantic methods
7
- */
8
- export class LogStyleBuilder {
9
- logStyles = {};
10
- logger;
11
- constructor(logger) {
12
- this.logger = logger;
13
- }
14
- /**
15
- * Configure timestamp styling
16
- */
17
- timestamp() {
18
- return new TimestampStyleBuilderProxy(this);
19
- }
20
- /**
21
- * Configure level badge styling
22
- */
23
- level() {
24
- return new LevelStyleBuilderProxy(this);
25
- }
26
- /**
27
- * Configure prefix styling
28
- */
29
- prefix() {
30
- return new PrefixStyleBuilderProxy(this);
31
- }
32
- /**
33
- * Configure message text styling
34
- */
35
- message() {
36
- return new MessageStyleBuilderProxy(this);
37
- }
38
- /**
39
- * Configure location info styling
40
- */
41
- location() {
42
- return new LocationStyleBuilderProxy(this);
43
- }
44
- /**
45
- * Use a predefined preset
46
- */
47
- usePreset(presetName) {
48
- // Will be implemented when we create the presets
49
- console.warn(`Preset '${presetName}' will be available in next implementation phase`);
50
- return this;
51
- }
52
- /**
53
- * Customize with partial configuration
54
- */
55
- customize(overrides) {
56
- this.logStyles = { ...this.logStyles, ...overrides };
57
- return this;
58
- }
59
- /**
60
- * Set layout spacing
61
- */
62
- spacing(type) {
63
- if (!this.logStyles.layout) {
64
- this.logStyles.layout = { spacing: type };
65
- }
66
- else {
67
- this.logStyles.layout.spacing = type;
68
- }
69
- // Apply spacing-specific configurations
70
- switch (type) {
71
- case 'compact':
72
- this.logStyles.layout.innerPadding = '1px';
73
- this.logStyles.layout.outerMargin = '0px';
74
- break;
75
- case 'spacious':
76
- this.logStyles.layout.innerPadding = '4px';
77
- this.logStyles.layout.outerMargin = '2px';
78
- break;
79
- default: // normal
80
- this.logStyles.layout.innerPadding = '2px';
81
- this.logStyles.layout.outerMargin = '1px';
82
- }
83
- return this;
84
- }
85
- /**
86
- * Set backdrop filter for glassmorphism effects
87
- */
88
- backdrop(filter) {
89
- this.logStyles.backdrop = filter;
90
- return this;
91
- }
92
- /**
93
- * Set overall transparency
94
- */
95
- transparency(value) {
96
- this.logStyles.transparency = Math.max(0, Math.min(1, value));
97
- return this;
98
- }
99
- /**
100
- * Apply the configured styles to the logger
101
- */
102
- apply() {
103
- // Store the configuration in the logger
104
- // This will be implemented when we integrate with the main Logger
105
- this.logger._customLogStyles = this.logStyles;
106
- console.log('Applied log styles:', this.logStyles);
107
- }
108
- /**
109
- * Get current configuration (for debugging)
110
- */
111
- getConfig() {
112
- return { ...this.logStyles };
113
- }
114
- /**
115
- * Internal method to update part configuration
116
- */
117
- _updatePartConfig(part, styles) {
118
- if (part === 'layout' || part === 'backdrop' || part === 'transparency') {
119
- return; // Skip these non-part configs
120
- }
121
- if (!this.logStyles[part]) {
122
- this.logStyles[part] = {};
123
- }
124
- // Parse basic CSS styles into config
125
- // This is a simplified approach - in production might want more sophisticated parsing
126
- this.logStyles[part].style = styles;
127
- }
128
- }
129
- /**
130
- * Base proxy class for part-specific styling
131
- */
132
- class PartStyleBuilderProxy {
133
- parentBuilder;
134
- partName;
135
- constructor(parentBuilder, partName) {
136
- this.parentBuilder = parentBuilder;
137
- this.partName = partName;
138
- }
139
- /**
140
- * Return to the main builder for chaining other parts
141
- */
142
- and() {
143
- return this.parentBuilder;
144
- }
145
- /**
146
- * Apply styles and finish configuration
147
- */
148
- apply() {
149
- this.parentBuilder.apply();
150
- }
151
- /**
152
- * Helper to apply styles to the parent builder
153
- */
154
- applyStyles(styler) {
155
- const styles = styler.build();
156
- this.parentBuilder._updatePartConfig(this.partName, styles);
157
- return this;
158
- }
159
- }
160
- /**
161
- * Timestamp styling proxy with fluent API
162
- */
163
- class TimestampStyleBuilderProxy extends PartStyleBuilderProxy {
164
- constructor(parentBuilder) {
165
- super(parentBuilder, 'timestamp');
166
- }
167
- default() {
168
- return this.applyStyles(new TimestampStyler().default());
169
- }
170
- hidden() {
171
- return this.applyStyles(new TimestampStyler().hidden());
172
- }
173
- minimal() {
174
- return this.applyStyles(new TimestampStyler().minimal());
175
- }
176
- muted() {
177
- return this.applyStyles(new TimestampStyler().muted());
178
- }
179
- mono() {
180
- return this.applyStyles(new TimestampStyler().mono());
181
- }
182
- compact() {
183
- return this.applyStyles(new TimestampStyler().compact());
184
- }
185
- }
186
- /**
187
- * Level badge styling proxy with fluent API
188
- */
189
- class LevelStyleBuilderProxy extends PartStyleBuilderProxy {
190
- constructor(parentBuilder) {
191
- super(parentBuilder, 'level');
192
- }
193
- badge() {
194
- return this.applyStyles(new LevelStyler().badge());
195
- }
196
- gradient(from, to) {
197
- return this.applyStyles(new LevelStyler().gradient(from, to));
198
- }
199
- glowing() {
200
- return this.applyStyles(new LevelStyler().glowing());
201
- }
202
- flat() {
203
- return this.applyStyles(new LevelStyler().flat());
204
- }
205
- bold() {
206
- return this.applyStyles(new LevelStyler().bold());
207
- }
208
- uppercase() {
209
- return this.applyStyles(new LevelStyler().uppercase());
210
- }
211
- neon() {
212
- return this.applyStyles(new LevelStyler().neon());
213
- }
214
- }
215
- /**
216
- * Prefix styling proxy with fluent API
217
- */
218
- class PrefixStyleBuilderProxy extends PartStyleBuilderProxy {
219
- constructor(parentBuilder) {
220
- super(parentBuilder, 'prefix');
221
- }
222
- dark() {
223
- return this.applyStyles(new PrefixStyler().dark());
224
- }
225
- light() {
226
- return this.applyStyles(new PrefixStyler().light());
227
- }
228
- compact() {
229
- return this.applyStyles(new PrefixStyler().compact());
230
- }
231
- muted() {
232
- return this.applyStyles(new PrefixStyler().muted());
233
- }
234
- mono() {
235
- return this.applyStyles(new PrefixStyler().mono());
236
- }
237
- }
238
- /**
239
- * Message styling proxy with fluent API
240
- */
241
- class MessageStyleBuilderProxy extends PartStyleBuilderProxy {
242
- constructor(parentBuilder) {
243
- super(parentBuilder, 'message');
244
- }
245
- readable() {
246
- return this.applyStyles(new MessageStyler().readable());
247
- }
248
- code() {
249
- return this.applyStyles(new MessageStyler().code());
250
- }
251
- large() {
252
- return this.applyStyles(new MessageStyler().large());
253
- }
254
- system() {
255
- return this.applyStyles(new MessageStyler().system());
256
- }
257
- mono() {
258
- return this.applyStyles(new MessageStyler().mono());
259
- }
260
- }
261
- /**
262
- * Location styling proxy with fluent API
263
- */
264
- class LocationStyleBuilderProxy extends PartStyleBuilderProxy {
265
- constructor(parentBuilder) {
266
- super(parentBuilder, 'location');
267
- }
268
- subtle() {
269
- return this.applyStyles(new LocationStyler().subtle());
270
- }
271
- hidden() {
272
- return this.applyStyles(new LocationStyler().hidden());
273
- }
274
- clickable() {
275
- return this.applyStyles(new LocationStyler().clickable());
276
- }
277
- muted() {
278
- return this.applyStyles(new LocationStyler().muted());
279
- }
280
- mono() {
281
- return this.applyStyles(new LocationStyler().mono());
282
- }
283
- }
284
- /**
285
- * Create a new LogStyleBuilder instance
286
- */
287
- export function createLogStyleBuilder(logger) {
288
- return new LogStyleBuilder(logger);
289
- }
@@ -1,181 +0,0 @@
1
- /**
2
- * @fileoverview Semantic styling system for Advanced Logger
3
- */
4
- import { StyleBuilder } from './StyleBuilder.js';
5
- /**
6
- * Base semantic styler with common style methods
7
- */
8
- export declare abstract class BaseStyler {
9
- protected builder: StyleBuilder;
10
- constructor(builder?: StyleBuilder);
11
- /**
12
- * Primary brand color (typically blue)
13
- */
14
- primary(): this;
15
- /**
16
- * Secondary color (typically gray)
17
- */
18
- secondary(): this;
19
- /**
20
- * Accent color for highlights
21
- */
22
- accent(): this;
23
- /**
24
- * Muted/subtle color - automatically adaptive
25
- */
26
- muted(): this;
27
- /**
28
- * Success color (green)
29
- */
30
- success(): this;
31
- /**
32
- * Warning color (yellow/orange)
33
- */
34
- warning(): this;
35
- /**
36
- * Danger/error color (red)
37
- */
38
- danger(): this;
39
- /**
40
- * Monospace font family
41
- */
42
- mono(): this;
43
- /**
44
- * System font family
45
- */
46
- system(): this;
47
- /**
48
- * Readable font optimized for text
49
- */
50
- readable(): this;
51
- /**
52
- * Compact spacing
53
- */
54
- compact(): this;
55
- /**
56
- * Spacious layout
57
- */
58
- spacious(): this;
59
- /**
60
- * Inline display
61
- */
62
- inline(): this;
63
- /**
64
- * Glass morphism effect
65
- */
66
- glassmorphic(): this;
67
- /**
68
- * Neon glow effect
69
- */
70
- neon(): this;
71
- /**
72
- * Gradient background
73
- */
74
- gradient(from?: string, to?: string): this;
75
- /**
76
- * Bold text
77
- */
78
- bold(): this;
79
- /**
80
- * Set color with automatic adaptation
81
- */
82
- protected color(color: string): this;
83
- /**
84
- * Build the final CSS string
85
- */
86
- build(): string;
87
- }
88
- /**
89
- * Timestamp-specific styling
90
- */
91
- export declare class TimestampStyler extends BaseStyler {
92
- /**
93
- * Default timestamp style - subtle and informative
94
- */
95
- default(): this;
96
- /**
97
- * Hide timestamp
98
- */
99
- hidden(): this;
100
- /**
101
- * Minimal timestamp (just time, no date)
102
- */
103
- minimal(): this;
104
- /**
105
- * Set font size
106
- */
107
- size(size: string): this;
108
- }
109
- /**
110
- * Level badge styling
111
- */
112
- export declare class LevelStyler extends BaseStyler {
113
- /**
114
- * Colorful gradient badge
115
- */
116
- badge(): this;
117
- /**
118
- * Glowing effect for dark themes
119
- */
120
- glowing(): this;
121
- /**
122
- * Minimal flat style
123
- */
124
- flat(): this;
125
- /**
126
- * Uppercase text
127
- */
128
- uppercase(): this;
129
- }
130
- /**
131
- * Prefix styling
132
- */
133
- export declare class PrefixStyler extends BaseStyler {
134
- /**
135
- * Dark theme prefix
136
- */
137
- dark(): this;
138
- /**
139
- * Light theme prefix
140
- */
141
- light(): this;
142
- /**
143
- * Compact prefix
144
- */
145
- compact(): this;
146
- }
147
- /**
148
- * Message text styling
149
- */
150
- export declare class MessageStyler extends BaseStyler {
151
- /**
152
- * Readable message text - automatically adaptive
153
- */
154
- readable(): this;
155
- /**
156
- * Code-style monospace text
157
- */
158
- code(): this;
159
- /**
160
- * Large, prominent text
161
- */
162
- large(): this;
163
- }
164
- /**
165
- * Location info styling
166
- */
167
- export declare class LocationStyler extends BaseStyler {
168
- /**
169
- * Subtle location info - automatically adaptive
170
- */
171
- subtle(): this;
172
- /**
173
- * Hide location info
174
- */
175
- hidden(): this;
176
- /**
177
- * Clickable style (for IDE integration)
178
- */
179
- clickable(): this;
180
- }
181
- //# sourceMappingURL=SemanticStyles.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SemanticStyles.d.ts","sourceRoot":"","sources":["../../src/styling/SemanticStyles.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKjD;;GAEG;AACH,8BAAsB,UAAU;IAC5B,SAAS,CAAC,OAAO,EAAE,YAAY,CAAC;gBAEpB,OAAO,GAAE,YAAiC;IAItD;;OAEG;IACH,OAAO,IAAI,IAAI;IAIf;;OAEG;IACH,SAAS,IAAI,IAAI;IAIjB;;OAEG;IACH,MAAM,IAAI,IAAI;IAId;;OAEG;IACH,KAAK,IAAI,IAAI;IAKb;;OAEG;IACH,OAAO,IAAI,IAAI;IAIf;;OAEG;IACH,OAAO,IAAI,IAAI;IAIf;;OAEG;IACH,MAAM,IAAI,IAAI;IAId;;OAEG;IACH,IAAI,IAAI,IAAI;IAKZ;;OAEG;IACH,MAAM,IAAI,IAAI;IAKd;;OAEG;IACH,QAAQ,IAAI,IAAI;IAKhB;;OAEG;IACH,OAAO,IAAI,IAAI;IAKf;;OAEG;IACH,QAAQ,IAAI,IAAI;IAKhB;;OAEG;IACH,MAAM,IAAI,IAAI;IAKd;;OAEG;IACH,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