@mks2508/better-logger 0.0.2-alpha.2 → 0.3.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/.claude/settings.local.json +18 -2
- package/.github/workflows/ci-quality.yml +357 -0
- package/.github/workflows/docs-demo.yml +119 -0
- package/.github/workflows/releases-core.yml +512 -0
- package/.github/workflows/releases-full.yml +582 -0
- package/.github/{workflows → workflows-backup}/ci.yml +12 -110
- package/.github/workflows-backup/nightly.yml +196 -0
- package/.github/workflows-backup/release-optimized.yml +373 -0
- package/.release-notes-0.2.0.md +129 -0
- package/.yamllint +28 -0
- package/CHANGELOG.json +783 -0
- package/CLAUDE.md +92 -1
- package/README.md +198 -490
- package/bun.lock +323 -0
- package/demo.html +9 -2
- package/dist/.tsbuildinfo +1 -0
- package/dist/Logger.d.ts +272 -0
- package/dist/Logger.d.ts.map +1 -0
- package/dist/Logger.js +680 -0
- package/dist/ScopedLogger.d.ts +126 -0
- package/dist/ScopedLogger.d.ts.map +1 -0
- package/dist/ScopedLogger.js +234 -0
- package/dist/chunks/Logger-BpeuYIxR.js +2 -0
- package/dist/chunks/Logger-BpeuYIxR.js.map +1 -0
- package/dist/chunks/Logger-Didxtr23.js +3275 -0
- package/dist/chunks/Logger-Didxtr23.js.map +1 -0
- package/dist/chunks/RemoteLogHandler-CjWpWZGl.js +33 -0
- package/dist/chunks/RemoteLogHandler-CjWpWZGl.js.map +1 -0
- package/dist/chunks/RemoteLogHandler-ymkQ97xl.js +2 -0
- package/dist/chunks/RemoteLogHandler-ymkQ97xl.js.map +1 -0
- package/dist/chunks/environment-Bxbnw4pd.js +544 -0
- package/dist/chunks/environment-Bxbnw4pd.js.map +1 -0
- package/dist/chunks/environment-Dm66zOML.js +4 -0
- package/dist/chunks/environment-Dm66zOML.js.map +1 -0
- package/dist/chunks/formatting-C0riPC5_.js +95 -0
- package/dist/chunks/formatting-C0riPC5_.js.map +1 -0
- package/dist/chunks/formatting-DNCAV66-.js +2 -0
- package/dist/chunks/formatting-DNCAV66-.js.map +1 -0
- package/dist/cli/CommandProcessor.d.ts +103 -0
- package/dist/cli/CommandProcessor.d.ts.map +1 -0
- package/dist/cli/CommandProcessor.js +184 -0
- package/dist/cli/commands/ConfigCommand.d.ts +17 -0
- package/dist/cli/commands/ConfigCommand.d.ts.map +1 -0
- package/dist/cli/commands/ConfigCommand.js +88 -0
- package/dist/cli/commands/ExportCommand.d.ts +51 -0
- package/dist/cli/commands/ExportCommand.d.ts.map +1 -0
- package/dist/cli/commands/ExportCommand.js +243 -0
- package/dist/cli/commands/HistoryCommand.d.ts +50 -0
- package/dist/cli/commands/HistoryCommand.d.ts.map +1 -0
- package/dist/cli/commands/HistoryCommand.js +96 -0
- package/dist/cli/commands/StatusCommand.d.ts +33 -0
- package/dist/cli/commands/StatusCommand.d.ts.map +1 -0
- package/dist/cli/commands/StatusCommand.js +93 -0
- package/dist/cli/commands/ThemeCommand.d.ts +33 -0
- package/dist/cli/commands/ThemeCommand.d.ts.map +1 -0
- package/dist/cli/commands/ThemeCommand.js +79 -0
- package/dist/cli/help.d.ts +15 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +118 -0
- package/dist/cli/index.d.ts +15 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +46 -0
- package/dist/constants.d.ts +122 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +159 -0
- package/dist/core.cjs +1 -1
- package/dist/core.cjs.map +1 -1
- package/dist/core.d.ts +134 -0
- package/dist/core.d.ts.map +1 -0
- package/dist/core.js +315 -242
- package/dist/core.js.map +1 -1
- package/dist/example.d.ts +18 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +154 -0
- package/dist/exports-module.d.ts +203 -0
- package/dist/exports-module.d.ts.map +1 -0
- package/dist/exports-module.js +260 -0
- package/dist/exports.cjs +1 -1
- package/dist/exports.cjs.map +1 -1
- package/dist/exports.js +5 -4
- package/dist/exports.js.map +1 -1
- package/dist/handlers/AnalyticsLogHandler.d.ts +11 -0
- package/dist/handlers/AnalyticsLogHandler.d.ts.map +1 -0
- package/dist/handlers/AnalyticsLogHandler.js +19 -0
- package/dist/handlers/ExportLogHandler.d.ts +103 -0
- package/dist/handlers/ExportLogHandler.d.ts.map +1 -0
- package/dist/handlers/ExportLogHandler.js +516 -0
- package/dist/handlers/FileLogHandler.d.ts +36 -0
- package/dist/handlers/FileLogHandler.d.ts.map +1 -0
- package/dist/handlers/FileLogHandler.js +156 -0
- package/dist/handlers/RemoteLogHandler.d.ts +14 -0
- package/dist/handlers/RemoteLogHandler.d.ts.map +1 -0
- package/dist/handlers/RemoteLogHandler.js +37 -0
- package/dist/handlers/index.d.ts +8 -0
- package/dist/handlers/index.d.ts.map +1 -0
- package/dist/handlers/index.js +7 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +86 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +89 -103
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +139 -0
- package/dist/styling/LogStyleBuilder.d.ts +149 -0
- package/dist/styling/LogStyleBuilder.d.ts.map +1 -0
- package/dist/styling/LogStyleBuilder.js +289 -0
- package/dist/styling/SemanticStyles.d.ts +181 -0
- package/dist/styling/SemanticStyles.d.ts.map +1 -0
- package/dist/styling/SemanticStyles.js +339 -0
- package/dist/styling/SmartPresets.d.ts +25 -0
- package/dist/styling/SmartPresets.d.ts.map +1 -0
- package/dist/styling/SmartPresets.js +276 -0
- package/dist/styling/StyleBuilder.d.ts +140 -0
- package/dist/styling/StyleBuilder.d.ts.map +1 -0
- package/dist/styling/StyleBuilder.js +280 -0
- package/dist/styling/banners.d.ts +45 -0
- package/dist/styling/banners.d.ts.map +1 -0
- package/dist/styling/banners.js +155 -0
- package/dist/styling/index.d.ts +10 -0
- package/dist/styling/index.d.ts.map +1 -0
- package/dist/styling/index.js +9 -0
- package/dist/styling/themes.d.ts +10 -0
- package/dist/styling/themes.d.ts.map +1 -0
- package/dist/styling/themes.js +231 -0
- package/dist/styling-module.d.ts +185 -0
- package/dist/styling-module.d.ts.map +1 -0
- package/dist/styling-module.js +199 -0
- package/dist/styling.cjs +1 -1
- package/dist/styling.cjs.map +1 -1
- package/dist/styling.js +6 -6
- package/dist/styling.js.map +1 -1
- package/dist/types/Logger.d.ts +268 -0
- package/dist/types/Logger.d.ts.map +1 -0
- package/dist/types/ScopedLogger.d.ts +123 -0
- package/dist/types/ScopedLogger.d.ts.map +1 -0
- package/dist/types/cli/CommandProcessor.d.ts +100 -0
- package/dist/types/cli/CommandProcessor.d.ts.map +1 -0
- package/dist/types/cli/commands/ConfigCommand.d.ts +14 -0
- package/dist/types/cli/commands/ConfigCommand.d.ts.map +1 -0
- package/dist/types/cli/commands/ExportCommand.d.ts +48 -0
- package/dist/types/cli/commands/ExportCommand.d.ts.map +1 -0
- package/dist/types/cli/commands/HistoryCommand.d.ts +47 -0
- package/dist/types/cli/commands/HistoryCommand.d.ts.map +1 -0
- package/dist/types/cli/commands/StatusCommand.d.ts +30 -0
- package/dist/types/cli/commands/StatusCommand.d.ts.map +1 -0
- package/dist/types/cli/commands/ThemeCommand.d.ts +30 -0
- package/dist/types/cli/commands/ThemeCommand.d.ts.map +1 -0
- package/dist/types/cli/help.d.ts +12 -0
- package/dist/types/cli/help.d.ts.map +1 -0
- package/dist/types/cli/index.d.ts +15 -0
- package/dist/types/cli/index.d.ts.map +1 -0
- package/dist/types/constants.d.ts +119 -0
- package/dist/types/constants.d.ts.map +1 -0
- package/dist/types/core.d.ts +125 -211
- package/dist/types/core.d.ts.map +1 -0
- package/dist/types/core.js +13 -0
- package/dist/types/example.d.ts +18 -0
- package/dist/types/example.d.ts.map +1 -0
- package/dist/types/exports-module.d.ts +196 -0
- package/dist/types/exports-module.d.ts.map +1 -0
- package/dist/types/handlers/AnalyticsLogHandler.d.ts +8 -0
- package/dist/types/handlers/AnalyticsLogHandler.d.ts.map +1 -0
- package/dist/types/handlers/ExportLogHandler.d.ts +100 -0
- package/dist/types/handlers/ExportLogHandler.d.ts.map +1 -0
- package/dist/types/handlers/FileLogHandler.d.ts +33 -0
- package/dist/types/handlers/FileLogHandler.d.ts.map +1 -0
- package/dist/types/handlers/RemoteLogHandler.d.ts +11 -0
- package/dist/types/handlers/RemoteLogHandler.d.ts.map +1 -0
- package/dist/types/handlers/index.d.ts +8 -0
- package/dist/types/handlers/index.d.ts.map +1 -0
- package/dist/types/handlers.d.ts +88 -0
- package/dist/types/handlers.d.ts.map +1 -0
- package/dist/types/handlers.js +4 -0
- package/dist/types/index.d.ts +7 -675
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +4 -0
- package/dist/types/main.d.ts +2 -0
- package/dist/types/main.d.ts.map +1 -0
- package/dist/types/styling/LogStyleBuilder.d.ts +146 -0
- package/dist/types/styling/LogStyleBuilder.d.ts.map +1 -0
- package/dist/types/styling/SemanticStyles.d.ts +178 -0
- package/dist/types/styling/SemanticStyles.d.ts.map +1 -0
- package/dist/types/styling/SmartPresets.d.ts +22 -0
- package/dist/types/styling/SmartPresets.d.ts.map +1 -0
- package/dist/types/styling/StyleBuilder.d.ts +140 -0
- package/dist/types/styling/StyleBuilder.d.ts.map +1 -0
- package/dist/types/styling/banners.d.ts +42 -0
- package/dist/types/styling/banners.d.ts.map +1 -0
- package/dist/types/styling/index.d.ts +10 -0
- package/dist/types/styling/index.d.ts.map +1 -0
- package/dist/types/styling/themes.d.ts +7 -0
- package/dist/types/styling/themes.d.ts.map +1 -0
- package/dist/types/styling-module.d.ts +178 -0
- package/dist/types/styling-module.d.ts.map +1 -0
- package/dist/types/types/core.d.ts +125 -0
- package/dist/types/types/core.d.ts.map +1 -0
- package/dist/types/types/handlers.d.ts +85 -0
- package/dist/types/types/handlers.d.ts.map +1 -0
- package/dist/types/types/index.d.ts +7 -0
- package/dist/types/types/index.d.ts.map +1 -0
- package/dist/types/utils/environment.d.ts +47 -0
- package/dist/types/utils/environment.d.ts.map +1 -0
- package/dist/types/utils/formatting.d.ts +37 -0
- package/dist/types/utils/formatting.d.ts.map +1 -0
- package/dist/types/utils/index.d.ts +7 -0
- package/dist/types/utils/index.d.ts.map +1 -0
- package/dist/types/utils/opentui-detection.d.ts +34 -0
- package/dist/types/utils/opentui-detection.d.ts.map +1 -0
- package/dist/types/utils/output.d.ts +41 -0
- package/dist/types/utils/output.d.ts.map +1 -0
- package/dist/types/utils/stackTrace.d.ts +6 -0
- package/dist/types/utils/stackTrace.d.ts.map +1 -0
- package/dist/types/utils/timestamps.d.ts +20 -0
- package/dist/types/utils/timestamps.d.ts.map +1 -0
- package/dist/utils/environment.d.ts +47 -0
- package/dist/utils/environment.d.ts.map +1 -0
- package/dist/utils/environment.js +85 -0
- package/dist/utils/formatting.d.ts +40 -0
- package/dist/utils/formatting.d.ts.map +1 -0
- package/dist/utils/formatting.js +117 -0
- package/dist/utils/index.d.ts +7 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +6 -0
- package/dist/utils/opentui-detection.d.ts +34 -0
- package/dist/utils/opentui-detection.d.ts.map +1 -0
- package/dist/utils/opentui-detection.js +116 -0
- package/dist/utils/output.d.ts +44 -0
- package/dist/utils/output.d.ts.map +1 -0
- package/dist/utils/output.js +150 -0
- package/dist/utils/stackTrace.d.ts +9 -0
- package/dist/utils/stackTrace.d.ts.map +1 -0
- package/dist/utils/stackTrace.js +81 -0
- package/dist/utils/timestamps.d.ts +20 -0
- package/dist/utils/timestamps.d.ts.map +1 -0
- package/dist/utils/timestamps.js +71 -0
- package/docs/API.md +691 -0
- package/docs/CORE.md +10 -10
- package/docs/DEVELOPMENT.md +731 -0
- package/docs/PACKAGES.md +244 -0
- package/docs/_config.yml +36 -0
- package/docs/index.md +179 -0
- package/examples/README.md +208 -0
- package/examples/basic-logging.js +75 -0
- package/examples/data-export.js +234 -0
- package/examples/package.json +16 -0
- package/examples/performance-timing.js +170 -0
- package/examples/simplified-api.js +124 -0
- package/examples/styling-themes.js +207 -0
- package/package.json +37 -21
- package/packages/core/package.json +57 -0
- package/packages/exports/package.json +41 -0
- package/packages/nodejs-opentui/README.md +232 -0
- package/packages/nodejs-opentui/package.json +72 -0
- package/packages/nodejs-opentui/src/LogRenderer.ts +171 -0
- package/packages/nodejs-opentui/src/OpenTUILogHandler.ts +178 -0
- package/packages/nodejs-opentui/src/components/LogBadge.tsx +131 -0
- package/packages/nodejs-opentui/src/index.ts +133 -0
- package/packages/nodejs-opentui/src/types.ts +158 -0
- package/packages/nodejs-opentui/tsconfig.json +20 -0
- package/packages/styling/package.json +41 -0
- package/project-utils/README.md +172 -0
- package/project-utils/auto-release-gemini.ts +1193 -0
- package/project-utils/auto-release-ui.ts +1329 -0
- package/project-utils/commit-generator.ts +1385 -0
- package/project-utils/commit-ui.ts +264 -0
- package/project-utils/git-utils.ts +199 -0
- package/project-utils/github-release-manager.ts +466 -0
- package/project-utils/project-config.ts +260 -0
- package/project-utils/prompt-templates.js +345 -0
- package/project-utils/prompt-templates.ts +422 -0
- package/project-utils/version-manager.ts +1078 -0
- package/src/Logger.ts +251 -16
- package/src/ScopedLogger.ts +262 -0
- package/src/cli/CommandProcessor.ts +173 -2
- package/src/cli/commands/HistoryCommand.ts +117 -0
- package/src/cli/index.ts +12 -0
- package/src/constants.ts +84 -2
- package/src/core.ts +119 -46
- package/src/example.ts +4 -4
- package/src/exports-module.ts +1 -1
- package/src/handlers/ExportLogHandler.ts +141 -0
- package/src/handlers/FileLogHandler.ts +144 -5
- package/src/index.ts +1 -1
- package/src/main.ts +3 -3
- package/src/styling/LogStyleBuilder.ts +355 -0
- package/src/styling/SemanticStyles.ts +380 -0
- package/src/styling/SmartPresets.ts +288 -0
- package/src/styling/StyleBuilder.ts +14 -0
- package/src/styling/index.ts +16 -1
- package/src/styling-module.ts +1 -1
- package/src/types/core.ts +60 -0
- package/src/types/index.ts +6 -0
- package/src/utils/environment.ts +94 -0
- package/src/utils/formatting.ts +142 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/opentui-detection.ts +138 -0
- package/src/utils/output.ts +66 -8
- package/test-core-browser.html +237 -0
- package/test-core-node.js +63 -0
- package/tests/test-conflict-resolution.ts +391 -0
- package/tests/validate-workflows.sh +131 -0
- package/tests/yaml-autofix.sh +146 -0
- package/vite.config.ts +189 -50
- package/.npmrc.bak +0 -1
- package/dist/chunks/Logger-BQhMKy_T.js +0 -2
- package/dist/chunks/Logger-BQhMKy_T.js.map +0 -1
- package/dist/chunks/Logger-BrFKFZcD.js +0 -978
- package/dist/chunks/Logger-BrFKFZcD.js.map +0 -1
- package/dist/chunks/core-2opW4Pi3.js +0 -194
- package/dist/chunks/core-2opW4Pi3.js.map +0 -1
- package/dist/chunks/core-DyugwSYZ.js +0 -4
- package/dist/chunks/core-DyugwSYZ.js.map +0 -1
- package/dist/chunks/exports-BNP3R7dp.js +0 -421
- package/dist/chunks/exports-BNP3R7dp.js.map +0 -1
- package/dist/chunks/exports-U1xLBXrY.js +0 -2
- package/dist/chunks/exports-U1xLBXrY.js.map +0 -1
- package/dist/chunks/styling-DhUDzwlE.js +0 -654
- package/dist/chunks/styling-DhUDzwlE.js.map +0 -1
- package/dist/chunks/styling-tmRDI28D.js +0 -2
- package/dist/chunks/styling-tmRDI28D.js.map +0 -1
- package/dist/types/exports.d.ts +0 -600
- package/dist/types/styling.d.ts +0 -751
- package/src/Logger.ts.backup +0 -1684
- /package/.github/{workflows → workflows-backup}/release.yml +0 -0
|
@@ -0,0 +1,181 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,YAAY,IAAI,IAAI;IASpB;;OAEG;IACH,IAAI,IAAI,IAAI;IAUZ;;OAEG;IACH,QAAQ,CAAC,IAAI,GAAE,MAAkB,EAAE,EAAE,GAAE,MAAkB,GAAG,IAAI;IAKhE;;OAEG;IACH,IAAI,IAAI,IAAI;IAKZ;;OAEG;IACH,SAAS,CAAC,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAKpC;;OAEG;IACH,KAAK,IAAI,MAAM;CAGlB;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,UAAU;IAC3C;;OAEG;IACH,OAAO,IAAI,IAAI;IAMf;;OAEG;IACH,MAAM,IAAI,IAAI;IAKd;;OAEG;IACH,OAAO,IAAI,IAAI;IAMf;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;CAI3B;AAED;;GAEG;AACH,qBAAa,WAAY,SAAQ,UAAU;IACvC;;OAEG;IACH,KAAK,IAAI,IAAI;IASb;;OAEG;IACH,OAAO,IAAI,IAAI;IAIf;;OAEG;IACH,IAAI,IAAI,IAAI;IASZ;;OAEG;IACH,SAAS,IAAI,IAAI;CAIpB;AAED;;GAEG;AACH,qBAAa,YAAa,SAAQ,UAAU;IACxC;;OAEG;IACH,IAAI,IAAI,IAAI;IAeZ;;OAEG;IACH,KAAK,IAAI,IAAI;IAab;;OAEG;IACH,OAAO,IAAI,IAAI;CAOlB;AAED;;GAEG;AACH,qBAAa,aAAc,SAAQ,UAAU;IACzC;;OAEG;IACH,QAAQ,IAAI,IAAI;IAQhB;;OAEG;IACH,IAAI,IAAI,IAAI;IAWZ;;OAEG;IACH,KAAK,IAAI,IAAI;CAMhB;AAED;;GAEG;AACH,qBAAa,cAAe,SAAQ,UAAU;IAC1C;;OAEG;IACH,MAAM,IAAI,IAAI;IASd;;OAEG;IACH,MAAM,IAAI,IAAI;IAKd;;OAEG;IACH,SAAS,IAAI,IAAI;CAKpB"}
|
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Semantic styling system for Advanced Logger
|
|
3
|
+
*/
|
|
4
|
+
import { StyleBuilder } from './StyleBuilder.js';
|
|
5
|
+
import { ADAPTIVE_COLORS } from '../constants.js';
|
|
6
|
+
import { getAdaptiveColor } from '../utils/index.js';
|
|
7
|
+
/**
|
|
8
|
+
* Base semantic styler with common style methods
|
|
9
|
+
*/
|
|
10
|
+
export class BaseStyler {
|
|
11
|
+
builder;
|
|
12
|
+
constructor(builder = new StyleBuilder()) {
|
|
13
|
+
this.builder = builder;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Primary brand color (typically blue)
|
|
17
|
+
*/
|
|
18
|
+
primary() {
|
|
19
|
+
return this.color('#007bff');
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Secondary color (typically gray)
|
|
23
|
+
*/
|
|
24
|
+
secondary() {
|
|
25
|
+
return this.color('#6c757d');
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Accent color for highlights
|
|
29
|
+
*/
|
|
30
|
+
accent() {
|
|
31
|
+
return this.color('#17a2b8');
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Muted/subtle color - automatically adaptive
|
|
35
|
+
*/
|
|
36
|
+
muted() {
|
|
37
|
+
const mutedColors = { light: '#6c757d', dark: '#a0aec0' };
|
|
38
|
+
return this.color(getAdaptiveColor(mutedColors));
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Success color (green)
|
|
42
|
+
*/
|
|
43
|
+
success() {
|
|
44
|
+
return this.color('#28a745');
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Warning color (yellow/orange)
|
|
48
|
+
*/
|
|
49
|
+
warning() {
|
|
50
|
+
return this.color('#ffc107');
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Danger/error color (red)
|
|
54
|
+
*/
|
|
55
|
+
danger() {
|
|
56
|
+
return this.color('#dc3545');
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Monospace font family
|
|
60
|
+
*/
|
|
61
|
+
mono() {
|
|
62
|
+
this.builder.font('Monaco, Consolas, "Courier New", monospace');
|
|
63
|
+
return this;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* System font family
|
|
67
|
+
*/
|
|
68
|
+
system() {
|
|
69
|
+
this.builder.font('system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif');
|
|
70
|
+
return this;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Readable font optimized for text
|
|
74
|
+
*/
|
|
75
|
+
readable() {
|
|
76
|
+
this.builder.font('Georgia, "Times New Roman", serif');
|
|
77
|
+
return this;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Compact spacing
|
|
81
|
+
*/
|
|
82
|
+
compact() {
|
|
83
|
+
this.builder.padding('1px 4px').margin('0 1px');
|
|
84
|
+
return this;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Spacious layout
|
|
88
|
+
*/
|
|
89
|
+
spacious() {
|
|
90
|
+
this.builder.padding('6px 12px').margin('2px 4px');
|
|
91
|
+
return this;
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Inline display
|
|
95
|
+
*/
|
|
96
|
+
inline() {
|
|
97
|
+
this.builder.display('inline-block');
|
|
98
|
+
return this;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Glass morphism effect
|
|
102
|
+
*/
|
|
103
|
+
glassmorphic() {
|
|
104
|
+
this.builder
|
|
105
|
+
.css('backdrop-filter', 'blur(10px)')
|
|
106
|
+
.css('background', 'rgba(255, 255, 255, 0.1)')
|
|
107
|
+
.border('1px solid rgba(255, 255, 255, 0.2)')
|
|
108
|
+
.rounded('8px');
|
|
109
|
+
return this;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Neon glow effect
|
|
113
|
+
*/
|
|
114
|
+
neon() {
|
|
115
|
+
const neonColor = '#00ffff';
|
|
116
|
+
this.builder
|
|
117
|
+
.color(neonColor)
|
|
118
|
+
.border(`1px solid ${neonColor}`)
|
|
119
|
+
.shadow(`0 0 10px ${neonColor}, 0 0 20px ${neonColor}`)
|
|
120
|
+
.css('text-shadow', `0 0 5px ${neonColor}`);
|
|
121
|
+
return this;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Gradient background
|
|
125
|
+
*/
|
|
126
|
+
gradient(from = '#667eea', to = '#764ba2') {
|
|
127
|
+
this.builder.bg(`linear-gradient(135deg, ${from} 0%, ${to} 100%)`);
|
|
128
|
+
return this;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Bold text
|
|
132
|
+
*/
|
|
133
|
+
bold() {
|
|
134
|
+
this.builder.bold();
|
|
135
|
+
return this;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Set color with automatic adaptation
|
|
139
|
+
*/
|
|
140
|
+
color(color) {
|
|
141
|
+
this.builder.color(color);
|
|
142
|
+
return this;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Build the final CSS string
|
|
146
|
+
*/
|
|
147
|
+
build() {
|
|
148
|
+
return this.builder.build();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Timestamp-specific styling
|
|
153
|
+
*/
|
|
154
|
+
export class TimestampStyler extends BaseStyler {
|
|
155
|
+
/**
|
|
156
|
+
* Default timestamp style - subtle and informative
|
|
157
|
+
*/
|
|
158
|
+
default() {
|
|
159
|
+
this.muted().mono();
|
|
160
|
+
this.builder.size('11px');
|
|
161
|
+
return this;
|
|
162
|
+
}
|
|
163
|
+
/**
|
|
164
|
+
* Hide timestamp
|
|
165
|
+
*/
|
|
166
|
+
hidden() {
|
|
167
|
+
this.builder.display('none');
|
|
168
|
+
return this;
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Minimal timestamp (just time, no date)
|
|
172
|
+
*/
|
|
173
|
+
minimal() {
|
|
174
|
+
this.muted().mono();
|
|
175
|
+
this.builder.size('10px').opacity(0.7);
|
|
176
|
+
return this;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Set font size
|
|
180
|
+
*/
|
|
181
|
+
size(size) {
|
|
182
|
+
this.builder.size(size);
|
|
183
|
+
return this;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Level badge styling
|
|
188
|
+
*/
|
|
189
|
+
export class LevelStyler extends BaseStyler {
|
|
190
|
+
/**
|
|
191
|
+
* Colorful gradient badge
|
|
192
|
+
*/
|
|
193
|
+
badge() {
|
|
194
|
+
this.builder
|
|
195
|
+
.padding('2px 8px')
|
|
196
|
+
.rounded('4px')
|
|
197
|
+
.bold()
|
|
198
|
+
.color('#ffffff');
|
|
199
|
+
return this;
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* Glowing effect for dark themes
|
|
203
|
+
*/
|
|
204
|
+
glowing() {
|
|
205
|
+
return this.neon().badge();
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Minimal flat style
|
|
209
|
+
*/
|
|
210
|
+
flat() {
|
|
211
|
+
this.builder
|
|
212
|
+
.padding('1px 6px')
|
|
213
|
+
.rounded('2px')
|
|
214
|
+
.border('1px solid currentColor')
|
|
215
|
+
.css('background', 'transparent');
|
|
216
|
+
return this;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Uppercase text
|
|
220
|
+
*/
|
|
221
|
+
uppercase() {
|
|
222
|
+
this.builder.uppercase();
|
|
223
|
+
return this;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Prefix styling
|
|
228
|
+
*/
|
|
229
|
+
export class PrefixStyler extends BaseStyler {
|
|
230
|
+
/**
|
|
231
|
+
* Dark theme prefix
|
|
232
|
+
*/
|
|
233
|
+
dark() {
|
|
234
|
+
const prefixColors = { light: '#2d3748', dark: '#4a5568' };
|
|
235
|
+
const textColors = { light: '#e2e8f0', dark: '#f7fafc' };
|
|
236
|
+
this.builder
|
|
237
|
+
.bg(getAdaptiveColor(prefixColors))
|
|
238
|
+
.color(getAdaptiveColor(textColors))
|
|
239
|
+
.padding('2px 6px')
|
|
240
|
+
.rounded('3px')
|
|
241
|
+
.bold()
|
|
242
|
+
.mono()
|
|
243
|
+
.size('11px');
|
|
244
|
+
return this;
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* Light theme prefix
|
|
248
|
+
*/
|
|
249
|
+
light() {
|
|
250
|
+
this.builder
|
|
251
|
+
.bg('#f8f9fa')
|
|
252
|
+
.color('#495057')
|
|
253
|
+
.padding('2px 6px')
|
|
254
|
+
.rounded('3px')
|
|
255
|
+
.bold()
|
|
256
|
+
.mono()
|
|
257
|
+
.size('11px')
|
|
258
|
+
.border('1px solid #dee2e6');
|
|
259
|
+
return this;
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* Compact prefix
|
|
263
|
+
*/
|
|
264
|
+
compact() {
|
|
265
|
+
this.builder
|
|
266
|
+
.padding('1px 4px')
|
|
267
|
+
.size('10px')
|
|
268
|
+
.rounded('2px');
|
|
269
|
+
return this;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Message text styling
|
|
274
|
+
*/
|
|
275
|
+
export class MessageStyler extends BaseStyler {
|
|
276
|
+
/**
|
|
277
|
+
* Readable message text - automatically adaptive
|
|
278
|
+
*/
|
|
279
|
+
readable() {
|
|
280
|
+
this.builder
|
|
281
|
+
.color(getAdaptiveColor(ADAPTIVE_COLORS.messageText))
|
|
282
|
+
.system()
|
|
283
|
+
.size('14px');
|
|
284
|
+
return this;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Code-style monospace text
|
|
288
|
+
*/
|
|
289
|
+
code() {
|
|
290
|
+
this.builder
|
|
291
|
+
.mono()
|
|
292
|
+
.size('13px')
|
|
293
|
+
.color(getAdaptiveColor(ADAPTIVE_COLORS.messageText))
|
|
294
|
+
.bg('rgba(0, 0, 0, 0.05)')
|
|
295
|
+
.padding('1px 4px')
|
|
296
|
+
.rounded('3px');
|
|
297
|
+
return this;
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Large, prominent text
|
|
301
|
+
*/
|
|
302
|
+
large() {
|
|
303
|
+
this.builder
|
|
304
|
+
.size('16px')
|
|
305
|
+
.color(getAdaptiveColor(ADAPTIVE_COLORS.messageText));
|
|
306
|
+
return this;
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
/**
|
|
310
|
+
* Location info styling
|
|
311
|
+
*/
|
|
312
|
+
export class LocationStyler extends BaseStyler {
|
|
313
|
+
/**
|
|
314
|
+
* Subtle location info - automatically adaptive
|
|
315
|
+
*/
|
|
316
|
+
subtle() {
|
|
317
|
+
this.builder
|
|
318
|
+
.color(getAdaptiveColor(ADAPTIVE_COLORS.location))
|
|
319
|
+
.mono()
|
|
320
|
+
.size('11px')
|
|
321
|
+
.opacity(0.7);
|
|
322
|
+
return this;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Hide location info
|
|
326
|
+
*/
|
|
327
|
+
hidden() {
|
|
328
|
+
this.builder.display('none');
|
|
329
|
+
return this;
|
|
330
|
+
}
|
|
331
|
+
/**
|
|
332
|
+
* Clickable style (for IDE integration)
|
|
333
|
+
*/
|
|
334
|
+
clickable() {
|
|
335
|
+
this.subtle();
|
|
336
|
+
this.builder.css('text-decoration', 'underline').cursor('pointer');
|
|
337
|
+
return this;
|
|
338
|
+
}
|
|
339
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Smart presets for simplified logger configuration
|
|
3
|
+
*/
|
|
4
|
+
import type { LogStyles } from '../types/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* Smart presets that configure the entire log appearance
|
|
7
|
+
*/
|
|
8
|
+
export declare const SMART_PRESETS: Record<string, LogStyles>;
|
|
9
|
+
/**
|
|
10
|
+
* Get a smart preset by name
|
|
11
|
+
*/
|
|
12
|
+
export declare function getSmartPreset(name: string): LogStyles | null;
|
|
13
|
+
/**
|
|
14
|
+
* List all available smart presets
|
|
15
|
+
*/
|
|
16
|
+
export declare function getAvailablePresets(): string[];
|
|
17
|
+
/**
|
|
18
|
+
* Check if a preset exists
|
|
19
|
+
*/
|
|
20
|
+
export declare function hasPreset(name: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Preset descriptions for help/documentation
|
|
23
|
+
*/
|
|
24
|
+
export declare const PRESET_DESCRIPTIONS: Record<string, string>;
|
|
25
|
+
//# sourceMappingURL=SmartPresets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SmartPresets.d.ts","sourceRoot":"","sources":["../../src/styling/SmartPresets.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,mBAAmB,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAqPnD,CAAC;AAEF;;GAEG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,CAE7D;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,MAAM,EAAE,CAE9C;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAE/C;AAED;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAOtD,CAAC"}
|