@mks2508/better-logger 0.0.2-alpha.2 → 0.8.1-alpha.1

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 (231) hide show
  1. package/.github/workflows/ci-quality.yml +356 -0
  2. package/.github/workflows/docs-demo.yml +123 -0
  3. package/.github/workflows/releases-core.yml +448 -0
  4. package/.github/workflows/releases-full.yml +404 -0
  5. package/.github/{workflows → workflows-backup}/ci.yml +12 -110
  6. package/.github/workflows-backup/nightly.yml +196 -0
  7. package/.github/workflows-backup/release-optimized.yml +373 -0
  8. package/.release-notes-0.2.0.md +129 -0
  9. package/CHANGELOG.json +658 -0
  10. package/README.md +110 -512
  11. package/demo.html +9 -2
  12. package/dist/Logger.d.ts +176 -0
  13. package/dist/Logger.d.ts.map +1 -0
  14. package/dist/Logger.js +498 -0
  15. package/dist/chunks/{Logger-BrFKFZcD.js → Logger-CbCUS5pQ.js} +987 -5
  16. package/dist/chunks/Logger-CbCUS5pQ.js.map +1 -0
  17. package/dist/chunks/Logger-PCfgYKTP.js +2 -0
  18. package/dist/chunks/Logger-PCfgYKTP.js.map +1 -0
  19. package/dist/chunks/RemoteLogHandler-CjWpWZGl.js +33 -0
  20. package/dist/chunks/RemoteLogHandler-CjWpWZGl.js.map +1 -0
  21. package/dist/chunks/RemoteLogHandler-ymkQ97xl.js +2 -0
  22. package/dist/chunks/RemoteLogHandler-ymkQ97xl.js.map +1 -0
  23. package/dist/chunks/StyleBuilder-BoJTmskd.js +361 -0
  24. package/dist/chunks/StyleBuilder-BoJTmskd.js.map +1 -0
  25. package/dist/chunks/StyleBuilder-LPLzsoHY.js +4 -0
  26. package/dist/chunks/StyleBuilder-LPLzsoHY.js.map +1 -0
  27. package/dist/cli/CommandProcessor.d.ts +40 -0
  28. package/dist/cli/CommandProcessor.d.ts.map +1 -0
  29. package/dist/cli/CommandProcessor.js +57 -0
  30. package/dist/cli/commands/ConfigCommand.d.ts +17 -0
  31. package/dist/cli/commands/ConfigCommand.d.ts.map +1 -0
  32. package/dist/cli/commands/ConfigCommand.js +88 -0
  33. package/dist/cli/commands/ExportCommand.d.ts +51 -0
  34. package/dist/cli/commands/ExportCommand.d.ts.map +1 -0
  35. package/dist/cli/commands/ExportCommand.js +243 -0
  36. package/dist/cli/commands/StatusCommand.d.ts +33 -0
  37. package/dist/cli/commands/StatusCommand.d.ts.map +1 -0
  38. package/dist/cli/commands/StatusCommand.js +93 -0
  39. package/dist/cli/commands/ThemeCommand.d.ts +33 -0
  40. package/dist/cli/commands/ThemeCommand.d.ts.map +1 -0
  41. package/dist/cli/commands/ThemeCommand.js +79 -0
  42. package/dist/cli/help.d.ts +15 -0
  43. package/dist/cli/help.d.ts.map +1 -0
  44. package/dist/cli/help.js +118 -0
  45. package/dist/cli/index.d.ts +15 -0
  46. package/dist/cli/index.d.ts.map +1 -0
  47. package/dist/cli/index.js +40 -0
  48. package/dist/constants.d.ts +91 -0
  49. package/dist/constants.d.ts.map +1 -0
  50. package/dist/constants.js +80 -0
  51. package/dist/core.cjs +1 -1
  52. package/dist/core.cjs.map +1 -1
  53. package/dist/core.d.ts +130 -0
  54. package/dist/core.d.ts.map +1 -0
  55. package/dist/core.js +258 -242
  56. package/dist/core.js.map +1 -1
  57. package/dist/example.d.ts +18 -0
  58. package/dist/example.d.ts.map +1 -0
  59. package/dist/example.js +154 -0
  60. package/dist/exports-module.d.ts +203 -0
  61. package/dist/exports-module.d.ts.map +1 -0
  62. package/dist/exports-module.js +260 -0
  63. package/dist/exports.cjs +1 -1
  64. package/dist/exports.cjs.map +1 -1
  65. package/dist/exports.js +2 -2
  66. package/dist/handlers/AnalyticsLogHandler.d.ts +11 -0
  67. package/dist/handlers/AnalyticsLogHandler.d.ts.map +1 -0
  68. package/dist/handlers/AnalyticsLogHandler.js +19 -0
  69. package/dist/handlers/ExportLogHandler.d.ts +103 -0
  70. package/dist/handlers/ExportLogHandler.d.ts.map +1 -0
  71. package/dist/handlers/ExportLogHandler.js +516 -0
  72. package/dist/handlers/FileLogHandler.d.ts +13 -0
  73. package/dist/handlers/FileLogHandler.d.ts.map +1 -0
  74. package/dist/handlers/FileLogHandler.js +24 -0
  75. package/dist/handlers/RemoteLogHandler.d.ts +14 -0
  76. package/dist/handlers/RemoteLogHandler.d.ts.map +1 -0
  77. package/dist/handlers/RemoteLogHandler.js +37 -0
  78. package/dist/handlers/index.d.ts +8 -0
  79. package/dist/handlers/index.d.ts.map +1 -0
  80. package/dist/handlers/index.js +7 -0
  81. package/dist/index.cjs +1 -1
  82. package/dist/index.cjs.map +1 -1
  83. package/dist/index.d.ts +86 -0
  84. package/dist/index.d.ts.map +1 -0
  85. package/dist/index.js +89 -103
  86. package/dist/main.d.ts +2 -0
  87. package/dist/main.d.ts.map +1 -0
  88. package/dist/main.js +139 -0
  89. package/dist/styling/StyleBuilder.d.ts +132 -0
  90. package/dist/styling/StyleBuilder.d.ts.map +1 -0
  91. package/dist/styling/StyleBuilder.js +268 -0
  92. package/dist/styling/banners.d.ts +45 -0
  93. package/dist/styling/banners.d.ts.map +1 -0
  94. package/dist/styling/banners.js +155 -0
  95. package/dist/styling/index.d.ts +7 -0
  96. package/dist/styling/index.d.ts.map +1 -0
  97. package/dist/styling/index.js +6 -0
  98. package/dist/styling/themes.d.ts +10 -0
  99. package/dist/styling/themes.d.ts.map +1 -0
  100. package/dist/styling/themes.js +231 -0
  101. package/dist/styling-module.d.ts +185 -0
  102. package/dist/styling-module.d.ts.map +1 -0
  103. package/dist/styling-module.js +199 -0
  104. package/dist/styling.cjs +1 -1
  105. package/dist/styling.cjs.map +1 -1
  106. package/dist/styling.js +4 -4
  107. package/dist/types/Logger.d.ts +172 -0
  108. package/dist/types/Logger.d.ts.map +1 -0
  109. package/dist/types/cli/CommandProcessor.d.ts +37 -0
  110. package/dist/types/cli/CommandProcessor.d.ts.map +1 -0
  111. package/dist/types/cli/commands/ConfigCommand.d.ts +14 -0
  112. package/dist/types/cli/commands/ConfigCommand.d.ts.map +1 -0
  113. package/dist/types/cli/commands/ExportCommand.d.ts +48 -0
  114. package/dist/types/cli/commands/ExportCommand.d.ts.map +1 -0
  115. package/dist/types/cli/commands/StatusCommand.d.ts +30 -0
  116. package/dist/types/cli/commands/StatusCommand.d.ts.map +1 -0
  117. package/dist/types/cli/commands/ThemeCommand.d.ts +30 -0
  118. package/dist/types/cli/commands/ThemeCommand.d.ts.map +1 -0
  119. package/dist/types/cli/help.d.ts +12 -0
  120. package/dist/types/cli/help.d.ts.map +1 -0
  121. package/dist/types/cli/index.d.ts +15 -0
  122. package/dist/types/cli/index.d.ts.map +1 -0
  123. package/dist/types/constants.d.ts +88 -0
  124. package/dist/types/constants.d.ts.map +1 -0
  125. package/dist/types/core.d.ts +71 -211
  126. package/dist/types/core.d.ts.map +1 -0
  127. package/dist/types/core.js +13 -0
  128. package/dist/types/example.d.ts +18 -0
  129. package/dist/types/example.d.ts.map +1 -0
  130. package/dist/types/exports-module.d.ts +196 -0
  131. package/dist/types/exports-module.d.ts.map +1 -0
  132. package/dist/types/handlers/AnalyticsLogHandler.d.ts +8 -0
  133. package/dist/types/handlers/AnalyticsLogHandler.d.ts.map +1 -0
  134. package/dist/types/handlers/ExportLogHandler.d.ts +100 -0
  135. package/dist/types/handlers/ExportLogHandler.d.ts.map +1 -0
  136. package/dist/types/handlers/FileLogHandler.d.ts +10 -0
  137. package/dist/types/handlers/FileLogHandler.d.ts.map +1 -0
  138. package/dist/types/handlers/RemoteLogHandler.d.ts +11 -0
  139. package/dist/types/handlers/RemoteLogHandler.d.ts.map +1 -0
  140. package/dist/types/handlers/index.d.ts +8 -0
  141. package/dist/types/handlers/index.d.ts.map +1 -0
  142. package/dist/types/handlers.d.ts +88 -0
  143. package/dist/types/handlers.d.ts.map +1 -0
  144. package/dist/types/handlers.js +4 -0
  145. package/dist/types/index.d.ts +7 -675
  146. package/dist/types/index.d.ts.map +1 -0
  147. package/dist/types/index.js +4 -0
  148. package/dist/types/main.d.ts +2 -0
  149. package/dist/types/main.d.ts.map +1 -0
  150. package/dist/types/styling/StyleBuilder.d.ts +132 -0
  151. package/dist/types/styling/StyleBuilder.d.ts.map +1 -0
  152. package/dist/types/styling/banners.d.ts +42 -0
  153. package/dist/types/styling/banners.d.ts.map +1 -0
  154. package/dist/types/styling/index.d.ts +7 -0
  155. package/dist/types/styling/index.d.ts.map +1 -0
  156. package/dist/types/styling/themes.d.ts +7 -0
  157. package/dist/types/styling/themes.d.ts.map +1 -0
  158. package/dist/types/styling-module.d.ts +178 -0
  159. package/dist/types/styling-module.d.ts.map +1 -0
  160. package/dist/types/types/core.d.ts +71 -0
  161. package/dist/types/types/core.d.ts.map +1 -0
  162. package/dist/types/types/handlers.d.ts +85 -0
  163. package/dist/types/types/handlers.d.ts.map +1 -0
  164. package/dist/types/types/index.d.ts +7 -0
  165. package/dist/types/types/index.d.ts.map +1 -0
  166. package/dist/types/utils/index.d.ts +7 -0
  167. package/dist/types/utils/index.d.ts.map +1 -0
  168. package/dist/types/utils/output.d.ts +29 -0
  169. package/dist/types/utils/output.d.ts.map +1 -0
  170. package/dist/types/utils/stackTrace.d.ts +6 -0
  171. package/dist/types/utils/stackTrace.d.ts.map +1 -0
  172. package/dist/types/utils/timestamps.d.ts +20 -0
  173. package/dist/types/utils/timestamps.d.ts.map +1 -0
  174. package/dist/utils/index.d.ts +7 -0
  175. package/dist/utils/index.d.ts.map +1 -0
  176. package/dist/utils/index.js +6 -0
  177. package/dist/utils/output.d.ts +32 -0
  178. package/dist/utils/output.d.ts.map +1 -0
  179. package/dist/utils/output.js +97 -0
  180. package/dist/utils/stackTrace.d.ts +9 -0
  181. package/dist/utils/stackTrace.d.ts.map +1 -0
  182. package/dist/utils/stackTrace.js +81 -0
  183. package/dist/utils/timestamps.d.ts +20 -0
  184. package/dist/utils/timestamps.d.ts.map +1 -0
  185. package/dist/utils/timestamps.js +71 -0
  186. package/docs/API.md +607 -0
  187. package/docs/DEVELOPMENT.md +731 -0
  188. package/docs/_config.yml +36 -0
  189. package/docs/index.md +179 -0
  190. package/examples/README.md +208 -0
  191. package/examples/basic-logging.js +75 -0
  192. package/examples/data-export.js +234 -0
  193. package/examples/package.json +16 -0
  194. package/examples/performance-timing.js +170 -0
  195. package/examples/styling-themes.js +207 -0
  196. package/package.json +24 -21
  197. package/packages/core/package.json +35 -0
  198. package/packages/exports/package.json +41 -0
  199. package/packages/styling/package.json +41 -0
  200. package/project-utils/README.md +172 -0
  201. package/project-utils/auto-release-gemini.ts +1193 -0
  202. package/project-utils/commit-generator.ts +1000 -0
  203. package/project-utils/commit-ui.ts +246 -0
  204. package/project-utils/git-utils.ts +199 -0
  205. package/project-utils/github-release-manager.ts +466 -0
  206. package/project-utils/prompt-templates.js +345 -0
  207. package/project-utils/prompt-templates.ts +422 -0
  208. package/project-utils/version-manager.ts +1078 -0
  209. package/src/Logger.ts +2 -1
  210. package/src/handlers/ExportLogHandler.ts +141 -0
  211. package/vite.config.ts +152 -50
  212. package/.claude/settings.local.json +0 -22
  213. package/.npmrc.bak +0 -1
  214. package/dist/chunks/Logger-BQhMKy_T.js +0 -2
  215. package/dist/chunks/Logger-BQhMKy_T.js.map +0 -1
  216. package/dist/chunks/Logger-BrFKFZcD.js.map +0 -1
  217. package/dist/chunks/core-2opW4Pi3.js +0 -194
  218. package/dist/chunks/core-2opW4Pi3.js.map +0 -1
  219. package/dist/chunks/core-DyugwSYZ.js +0 -4
  220. package/dist/chunks/core-DyugwSYZ.js.map +0 -1
  221. package/dist/chunks/exports-BNP3R7dp.js +0 -421
  222. package/dist/chunks/exports-BNP3R7dp.js.map +0 -1
  223. package/dist/chunks/exports-U1xLBXrY.js +0 -2
  224. package/dist/chunks/exports-U1xLBXrY.js.map +0 -1
  225. package/dist/chunks/styling-DhUDzwlE.js +0 -654
  226. package/dist/chunks/styling-DhUDzwlE.js.map +0 -1
  227. package/dist/chunks/styling-tmRDI28D.js +0 -2
  228. package/dist/chunks/styling-tmRDI28D.js.map +0 -1
  229. package/dist/types/exports.d.ts +0 -600
  230. package/dist/types/styling.d.ts +0 -751
  231. /package/.github/{workflows → workflows-backup}/release.yml +0 -0
@@ -0,0 +1,231 @@
1
+ /**
2
+ * @fileoverview Theme presets for Advanced Logger
3
+ */
4
+ /**
5
+ * Theme configurations for different visual styles
6
+ */
7
+ export const THEME_PRESETS = {
8
+ default: {
9
+ debug: {
10
+ emoji: '🐞', label: 'DEBUG',
11
+ background: 'linear-gradient(135deg, #667eea 0%, #764ba2 100%)',
12
+ color: '#ffffff', border: '1px solid #667eea',
13
+ shadow: '0 2px 4px rgba(102, 126, 234, 0.3)',
14
+ },
15
+ info: {
16
+ emoji: 'ℹ️', label: 'INFO',
17
+ background: 'linear-gradient(135deg, #74b9ff 0%, #0984e3 100%)',
18
+ color: '#ffffff', border: '1px solid #74b9ff',
19
+ shadow: '0 2px 4px rgba(116, 185, 255, 0.3)',
20
+ },
21
+ warn: {
22
+ emoji: '⚠️', label: 'WARN',
23
+ background: 'linear-gradient(135deg, #fdcb6e 0%, #e17055 100%)',
24
+ color: '#2d3436', border: '1px solid #fdcb6e',
25
+ shadow: '0 2px 4px rgba(253, 203, 110, 0.3)',
26
+ },
27
+ error: {
28
+ emoji: '❌', label: 'ERROR',
29
+ background: 'linear-gradient(135deg, #e84393 0%, #d63031 100%)',
30
+ color: '#ffffff', border: '1px solid #e84393',
31
+ shadow: '0 2px 4px rgba(232, 67, 147, 0.3)',
32
+ },
33
+ success: {
34
+ emoji: '✅', label: 'SUCCESS',
35
+ background: 'linear-gradient(135deg, #00b894 0%, #00a085 100%)',
36
+ color: '#ffffff', border: '1px solid #00b894',
37
+ shadow: '0 2px 4px rgba(0, 184, 148, 0.3)',
38
+ },
39
+ critical: {
40
+ emoji: '🔥', label: 'CRITICAL',
41
+ background: 'linear-gradient(135deg, #ff3838 0%, #ff1744 100%)',
42
+ color: '#ffffff', border: '2px solid #ff3838',
43
+ shadow: '0 4px 8px rgba(255, 56, 56, 0.5)',
44
+ },
45
+ },
46
+ dark: {
47
+ debug: {
48
+ emoji: '🌙', label: 'DEBUG',
49
+ background: 'linear-gradient(135deg, #2d3748 0%, #4a5568 100%)',
50
+ color: '#e2e8f0', border: '1px solid #4a5568',
51
+ shadow: '0 2px 4px rgba(45, 55, 72, 0.8)',
52
+ },
53
+ info: {
54
+ emoji: '💡', label: 'INFO',
55
+ background: 'linear-gradient(135deg, #1a202c 0%, #2d3748 100%)',
56
+ color: '#90cdf4', border: '1px solid #3182ce',
57
+ shadow: '0 2px 4px rgba(26, 32, 44, 0.8)',
58
+ },
59
+ warn: {
60
+ emoji: '⚡', label: 'WARN',
61
+ background: 'linear-gradient(135deg, #744210 0%, #975a16 100%)',
62
+ color: '#faf089', border: '1px solid #d69e2e',
63
+ shadow: '0 2px 4px rgba(116, 66, 16, 0.8)',
64
+ },
65
+ error: {
66
+ emoji: '💀', label: 'ERROR',
67
+ background: 'linear-gradient(135deg, #742a2a 0%, #9b2c2c 100%)',
68
+ color: '#feb2b2', border: '1px solid #e53e3e',
69
+ shadow: '0 2px 4px rgba(116, 42, 42, 0.8)',
70
+ },
71
+ success: {
72
+ emoji: '🎯', label: 'SUCCESS',
73
+ background: 'linear-gradient(135deg, #276749 0%, #2f855a 100%)',
74
+ color: '#9ae6b4', border: '1px solid #38a169',
75
+ shadow: '0 2px 4px rgba(39, 103, 73, 0.8)',
76
+ },
77
+ critical: {
78
+ emoji: '💥', label: 'CRITICAL',
79
+ background: 'linear-gradient(135deg, #1a1a1a 0%, #ff0000 100%)',
80
+ color: '#ffffff', border: '2px solid #ff0000',
81
+ shadow: '0 4px 8px rgba(255, 0, 0, 0.9)',
82
+ },
83
+ },
84
+ neon: {
85
+ debug: {
86
+ emoji: '⚡', label: 'DEBUG',
87
+ background: 'linear-gradient(135deg, #0f3460 0%, #e94560 100%)',
88
+ color: '#00ffff', border: '1px solid #00ffff',
89
+ shadow: '0 0 10px rgba(0, 255, 255, 0.5)',
90
+ },
91
+ info: {
92
+ emoji: '🔮', label: 'INFO',
93
+ background: 'linear-gradient(135deg, #16213e 0%, #0f3460 100%)',
94
+ color: '#00ff41', border: '1px solid #00ff41',
95
+ shadow: '0 0 10px rgba(0, 255, 65, 0.5)',
96
+ },
97
+ warn: {
98
+ emoji: '⚠️', label: 'WARN',
99
+ background: 'linear-gradient(135deg, #533a03 0%, #e94560 100%)',
100
+ color: '#ffff00', border: '1px solid #ffff00',
101
+ shadow: '0 0 10px rgba(255, 255, 0, 0.5)',
102
+ },
103
+ error: {
104
+ emoji: '💥', label: 'ERROR',
105
+ background: 'linear-gradient(135deg, #5c0a0a 0%, #ff073a 100%)',
106
+ color: '#ff073a', border: '1px solid #ff073a',
107
+ shadow: '0 0 10px rgba(255, 7, 58, 0.8)',
108
+ },
109
+ success: {
110
+ emoji: '✨', label: 'SUCCESS',
111
+ background: 'linear-gradient(135deg, #0a5c0a 0%, #39ff14 100%)',
112
+ color: '#39ff14', border: '1px solid #39ff14',
113
+ shadow: '0 0 10px rgba(57, 255, 20, 0.8)',
114
+ },
115
+ critical: {
116
+ emoji: '🌟', label: 'CRITICAL',
117
+ background: 'linear-gradient(135deg, #000000 0%, #ff0080 100%)',
118
+ color: '#ff0080', border: '2px solid #ff0080',
119
+ shadow: '0 0 20px rgba(255, 0, 128, 1)',
120
+ },
121
+ },
122
+ minimal: {
123
+ debug: {
124
+ emoji: '', label: 'DEBUG',
125
+ background: '#f7fafc', color: '#4a5568',
126
+ border: '1px solid #e2e8f0', shadow: 'none',
127
+ },
128
+ info: {
129
+ emoji: '', label: 'INFO',
130
+ background: '#ebf8ff', color: '#2b6cb0',
131
+ border: '1px solid #bee3f8', shadow: 'none',
132
+ },
133
+ warn: {
134
+ emoji: '', label: 'WARN',
135
+ background: '#fffbf0', color: '#c05621',
136
+ border: '1px solid #fed7aa', shadow: 'none',
137
+ },
138
+ error: {
139
+ emoji: '', label: 'ERROR',
140
+ background: '#fef5f5', color: '#c53030',
141
+ border: '1px solid #fca5a5', shadow: 'none',
142
+ },
143
+ success: {
144
+ emoji: '', label: 'SUCCESS',
145
+ background: '#f0fff4', color: '#2f855a',
146
+ border: '1px solid #9ae6b4', shadow: 'none',
147
+ },
148
+ critical: {
149
+ emoji: '', label: 'CRITICAL',
150
+ background: '#fef5f5', color: '#e53e3e',
151
+ border: '2px solid #f56565', shadow: 'none',
152
+ },
153
+ },
154
+ // Additional theme variants can be added here
155
+ light: {
156
+ debug: {
157
+ emoji: '🔍', label: 'DEBUG',
158
+ background: 'linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%)',
159
+ color: '#1565c0', border: '1px solid #90caf9',
160
+ shadow: '0 1px 3px rgba(33, 150, 243, 0.2)',
161
+ },
162
+ info: {
163
+ emoji: 'ℹ️', label: 'INFO',
164
+ background: 'linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%)',
165
+ color: '#7b1fa2', border: '1px solid #ce93d8',
166
+ shadow: '0 1px 3px rgba(156, 39, 176, 0.2)',
167
+ },
168
+ warn: {
169
+ emoji: '⚠️', label: 'WARN',
170
+ background: 'linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%)',
171
+ color: '#f57c00', border: '1px solid #ffcc02',
172
+ shadow: '0 1px 3px rgba(255, 152, 0, 0.2)',
173
+ },
174
+ error: {
175
+ emoji: '❌', label: 'ERROR',
176
+ background: 'linear-gradient(135deg, #ffebee 0%, #ffcdd2 100%)',
177
+ color: '#d32f2f', border: '1px solid #f44336',
178
+ shadow: '0 1px 3px rgba(244, 67, 54, 0.2)',
179
+ },
180
+ success: {
181
+ emoji: '✅', label: 'SUCCESS',
182
+ background: 'linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%)',
183
+ color: '#388e3c', border: '1px solid #4caf50',
184
+ shadow: '0 1px 3px rgba(76, 175, 80, 0.2)',
185
+ },
186
+ critical: {
187
+ emoji: '🚨', label: 'CRITICAL',
188
+ background: 'linear-gradient(135deg, #fce4ec 0%, #f8bbd9 100%)',
189
+ color: '#c2185b', border: '2px solid #e91e63',
190
+ shadow: '0 2px 6px rgba(233, 30, 99, 0.3)',
191
+ },
192
+ },
193
+ cyberpunk: {
194
+ debug: {
195
+ emoji: '🤖', label: 'DEBUG',
196
+ background: 'linear-gradient(135deg, #0d1b2a 0%, #415a77 100%)',
197
+ color: '#00d4aa', border: '1px solid #00d4aa',
198
+ shadow: '0 0 15px rgba(0, 212, 170, 0.4)',
199
+ },
200
+ info: {
201
+ emoji: '🔗', label: 'INFO',
202
+ background: 'linear-gradient(135deg, #1b263b 0%, #0d1b2a 100%)',
203
+ color: '#00b4d8', border: '1px solid #00b4d8',
204
+ shadow: '0 0 15px rgba(0, 180, 216, 0.4)',
205
+ },
206
+ warn: {
207
+ emoji: '⚡', label: 'WARN',
208
+ background: 'linear-gradient(135deg, #f72585 0%, #b5179e 100%)',
209
+ color: '#ffff3f', border: '1px solid #ffff3f',
210
+ shadow: '0 0 15px rgba(255, 255, 63, 0.4)',
211
+ },
212
+ error: {
213
+ emoji: '💀', label: 'ERROR',
214
+ background: 'linear-gradient(135deg, #7209b7 0%, #480ca8 100%)',
215
+ color: '#ff006e', border: '1px solid #ff006e',
216
+ shadow: '0 0 15px rgba(255, 0, 110, 0.6)',
217
+ },
218
+ success: {
219
+ emoji: '⚡', label: 'SUCCESS',
220
+ background: 'linear-gradient(135deg, #003566 0%, #001d3d 100%)',
221
+ color: '#00f5ff', border: '1px solid #00f5ff',
222
+ shadow: '0 0 15px rgba(0, 245, 255, 0.4)',
223
+ },
224
+ critical: {
225
+ emoji: '💥', label: 'CRITICAL',
226
+ background: 'linear-gradient(135deg, #000000 0%, #ff0040 100%)',
227
+ color: '#ff0040', border: '2px solid #ff0040',
228
+ shadow: '0 0 25px rgba(255, 0, 64, 0.8)',
229
+ },
230
+ },
231
+ };
@@ -0,0 +1,185 @@
1
+ /**
2
+ * @fileoverview Styling Module - Advanced visual features for Better Logger
3
+ * @version 0.0.1
4
+ *
5
+ * This module provides advanced styling features including SVG support, CSS animations,
6
+ * themed banners, and visual enhancements for console logging.
7
+ */
8
+ import { Logger } from './Logger.js';
9
+ import { StyleBuilder } from './styling/index.js';
10
+ import type { ThemeVariant, BannerType, StyleOptions } from './types/index.js';
11
+ /**
12
+ * Enhanced Logger with advanced styling capabilities
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * import { StyledLogger } from '@mks2508/better-logger/styling';
17
+ *
18
+ * const logger = new StyledLogger();
19
+ * logger.setTheme('neon');
20
+ * logger.logAnimated('🌟 Animated message!');
21
+ * logger.logWithSVG('Custom SVG Logo', svgContent);
22
+ * ```
23
+ */
24
+ export declare class StyledLogger extends Logger {
25
+ /**
26
+ * Log with SVG background image
27
+ *
28
+ * @param message - The message to log
29
+ * @param svgContent - SVG content as string (optional)
30
+ * @param options - Styling options
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * logger.logWithSVG('My App', '<svg>...</svg>', {
35
+ * width: 400,
36
+ * height: 80,
37
+ * padding: '40px 200px'
38
+ * });
39
+ * ```
40
+ */
41
+ logWithSVG(message: string, svgContent?: string, options?: StyleOptions): void;
42
+ /**
43
+ * Log with animated background gradient
44
+ *
45
+ * @param message - The message to log
46
+ * @param duration - Animation duration in seconds
47
+ *
48
+ * @example
49
+ * ```typescript
50
+ * logger.logAnimated('🚀 Loading...', 2);
51
+ * ```
52
+ */
53
+ logAnimated(message: string, duration?: number): void;
54
+ /**
55
+ * Display banner with specified type
56
+ *
57
+ * @param bannerType - Type of banner to display
58
+ *
59
+ * @example
60
+ * ```typescript
61
+ * logger.showBanner('animated');
62
+ * ```
63
+ */
64
+ showBanner(bannerType?: BannerType): void;
65
+ /**
66
+ * Set banner type for initialization display
67
+ *
68
+ * @param bannerType - Type of banner to display
69
+ *
70
+ * @example
71
+ * ```typescript
72
+ * logger.setBannerType('svg');
73
+ * ```
74
+ */
75
+ setBannerType(bannerType: BannerType): void;
76
+ /**
77
+ * Sets the logger theme with visual banner
78
+ *
79
+ * @param theme - Theme variant to apply
80
+ *
81
+ * @example
82
+ * ```typescript
83
+ * logger.setTheme('cyberpunk'); // Shows themed banner
84
+ * ```
85
+ */
86
+ setTheme(theme: ThemeVariant): void;
87
+ }
88
+ declare const styledLogger: StyledLogger;
89
+ /**
90
+ * Utility functions for creating custom styles
91
+ *
92
+ * @example
93
+ * ```typescript
94
+ * import { createStyle, StyleBuilder } from '@mks2508/better-logger/styling';
95
+ *
96
+ * const myStyle = createStyle()
97
+ * .bg('linear-gradient(45deg, #ff6b6b, #feca57)')
98
+ * .color('white')
99
+ * .padding('10px')
100
+ * .build();
101
+ *
102
+ * console.log('%cCustom Message', myStyle);
103
+ * ```
104
+ */
105
+ export declare const createStyle: () => StyleBuilder;
106
+ /**
107
+ * Pre-built style presets
108
+ *
109
+ * @example
110
+ * ```typescript
111
+ * import { stylePresets } from '@mks2508/better-logger/styling';
112
+ *
113
+ * console.log('%cSuccess!', stylePresets.success);
114
+ * console.log('%cError!', stylePresets.error);
115
+ * ```
116
+ */
117
+ export declare const stylePresets: {
118
+ success: string;
119
+ error: string;
120
+ warning: string;
121
+ info: string;
122
+ accent: string;
123
+ };
124
+ /**
125
+ * Available themes for the logger
126
+ *
127
+ * @example
128
+ * ```typescript
129
+ * import { themes } from '@mks2508/better-logger/styling';
130
+ *
131
+ * console.log('Available themes:', Object.keys(themes));
132
+ * ```
133
+ */
134
+ export declare const themes: string[];
135
+ /**
136
+ * Available banner types
137
+ *
138
+ * @example
139
+ * ```typescript
140
+ * import { bannerTypes } from '@mks2508/better-logger/styling';
141
+ *
142
+ * console.log('Available banners:', bannerTypes);
143
+ * ```
144
+ */
145
+ export declare const bannerTypes: string[];
146
+ /**
147
+ * Display initialization banner
148
+ *
149
+ * @param bannerType - Type of banner to display
150
+ *
151
+ * @example
152
+ * ```typescript
153
+ * import { showInitBanner } from '@mks2508/better-logger/styling';
154
+ *
155
+ * showInitBanner('animated');
156
+ * ```
157
+ */
158
+ export declare const showInitBanner: (bannerType?: BannerType) => void;
159
+ /**
160
+ * Export individual styled logging methods
161
+ */
162
+ export declare const debug: (...args: any[]) => void;
163
+ export declare const info: (...args: any[]) => void;
164
+ export declare const warn: (...args: any[]) => void;
165
+ export declare const error: (...args: any[]) => void;
166
+ export declare const success: (...args: any[]) => void;
167
+ export declare const critical: (...args: any[]) => void;
168
+ export declare const trace: (...args: any[]) => void;
169
+ export declare const table: (data: any, columns?: string[]) => void;
170
+ export declare const group: (label: string, collapsed?: boolean) => void;
171
+ export declare const groupEnd: () => void;
172
+ export declare const time: (label: string) => void;
173
+ export declare const timeEnd: (label: string) => void;
174
+ export declare const setGlobalPrefix: (prefix: string) => void;
175
+ export declare const createScopedLogger: (prefix: string) => Logger;
176
+ export declare const setVerbosity: (level: any) => void;
177
+ export declare const setTheme: (theme: ThemeVariant) => void;
178
+ export declare const setBannerType: (bannerType: BannerType) => void;
179
+ export declare const showBanner: (bannerType?: BannerType) => void;
180
+ export declare const logWithSVG: (message: string, svgContent?: string, options?: StyleOptions) => void;
181
+ export declare const logAnimated: (message: string, duration?: number) => void;
182
+ export default styledLogger;
183
+ export { StyleBuilder, StylePresets, THEME_PRESETS, THEME_BANNERS, BANNER_VARIANTS } from './styling/index.js';
184
+ export type { ThemeVariant, BannerType, StyleOptions } from './types/index.js';
185
+ //# sourceMappingURL=styling-module.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styling-module.d.ts","sourceRoot":"","sources":["../src/styling-module.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EACH,YAAY,EAMf,MAAM,oBAAoB,CAAC;AAG5B,OAAO,KAAK,EACR,YAAY,EACZ,UAAU,EACV,YAAY,EACf,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;;;;GAYG;AACH,qBAAa,YAAa,SAAQ,MAAM;IACpC;;;;;;;;;;;;;;;OAeG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,EAAE,OAAO,GAAE,YAAiB,GAAG,IAAI;IAIlF;;;;;;;;;;OAUG;IACH,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,GAAE,MAAU,GAAG,IAAI;IAIxD;;;;;;;;;OASG;IACH,UAAU,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,IAAI;IAIzC;;;;;;;;;OASG;IACH,aAAa,CAAC,UAAU,EAAE,UAAU,GAAG,IAAI;IAI3C;;;;;;;;;OASG;IACH,QAAQ,CAAC,KAAK,EAAE,YAAY,GAAG,IAAI;CAGtC;AAGD,QAAA,MAAM,YAAY,cAAqB,CAAC;AAExC;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,oBAA2B,CAAC;AAEpD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,YAAY;;;;;;CAMxB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,MAAM,UAA6B,CAAC;AAEjD;;;;;;;;;GASG;AACH,eAAO,MAAM,WAAW,UAA+B,CAAC;AAExD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,GAAI,aAAa,UAAU,SAErD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,GAAG,EAAE,SAAgC,CAAC;AACrE,eAAO,MAAM,IAAI,GAAI,GAAG,MAAM,GAAG,EAAE,SAA+B,CAAC;AACnE,eAAO,MAAM,IAAI,GAAI,GAAG,MAAM,GAAG,EAAE,SAA+B,CAAC;AACnE,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,GAAG,EAAE,SAAgC,CAAC;AACrE,eAAO,MAAM,OAAO,GAAI,GAAG,MAAM,GAAG,EAAE,SAAkC,CAAC;AACzE,eAAO,MAAM,QAAQ,GAAI,GAAG,MAAM,GAAG,EAAE,SAAmC,CAAC;AAC3E,eAAO,MAAM,KAAK,GAAI,GAAG,MAAM,GAAG,EAAE,SAAgC,CAAC;AACrE,eAAO,MAAM,KAAK,GAAI,MAAM,GAAG,EAAE,UAAU,MAAM,EAAE,SAAsC,CAAC;AAC1F,eAAO,MAAM,KAAK,GAAI,OAAO,MAAM,EAAE,YAAY,OAAO,SAAyC,CAAC;AAClG,eAAO,MAAM,QAAQ,YAAgC,CAAC;AACtD,eAAO,MAAM,IAAI,GAAI,OAAO,MAAM,SAA6B,CAAC;AAChE,eAAO,MAAM,OAAO,GAAI,OAAO,MAAM,SAAgC,CAAC;AACtE,eAAO,MAAM,eAAe,GAAI,QAAQ,MAAM,SAAyC,CAAC;AACxF,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,WAA4C,CAAC;AAC9F,eAAO,MAAM,YAAY,GAAI,OAAO,GAAG,SAAqC,CAAC;AAC7E,eAAO,MAAM,QAAQ,GAAI,OAAO,YAAY,SAAiC,CAAC;AAC9E,eAAO,MAAM,aAAa,GAAI,YAAY,UAAU,SAA2C,CAAC;AAChG,eAAO,MAAM,UAAU,GAAI,aAAa,UAAU,SAAwC,CAAC;AAC3F,eAAO,MAAM,UAAU,GAAI,SAAS,MAAM,EAAE,aAAa,MAAM,EAAE,UAAU,YAAY,SAC9B,CAAC;AAC1D,eAAO,MAAM,WAAW,GAAI,SAAS,MAAM,EAAE,WAAW,MAAM,SACf,CAAC;AAGhD,eAAe,YAAY,CAAC;AAG5B,OAAO,EACH,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,aAAa,EACb,eAAe,EAClB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EACR,YAAY,EACZ,UAAU,EACV,YAAY,EACf,MAAM,kBAAkB,CAAC"}
@@ -0,0 +1,199 @@
1
+ /**
2
+ * @fileoverview Styling Module - Advanced visual features for Better Logger
3
+ * @version 0.0.1
4
+ *
5
+ * This module provides advanced styling features including SVG support, CSS animations,
6
+ * themed banners, and visual enhancements for console logging.
7
+ */
8
+ // Import core logger
9
+ import { Logger } from './Logger.js';
10
+ // Styling imports
11
+ import { StyleBuilder, StylePresets, THEME_PRESETS, displayInitBanner, BANNER_VARIANTS } from './styling/index.js';
12
+ /**
13
+ * Enhanced Logger with advanced styling capabilities
14
+ *
15
+ * @example
16
+ * ```typescript
17
+ * import { StyledLogger } from '@mks2508/better-logger/styling';
18
+ *
19
+ * const logger = new StyledLogger();
20
+ * logger.setTheme('neon');
21
+ * logger.logAnimated('🌟 Animated message!');
22
+ * logger.logWithSVG('Custom SVG Logo', svgContent);
23
+ * ```
24
+ */
25
+ export class StyledLogger extends Logger {
26
+ /**
27
+ * Log with SVG background image
28
+ *
29
+ * @param message - The message to log
30
+ * @param svgContent - SVG content as string (optional)
31
+ * @param options - Styling options
32
+ *
33
+ * @example
34
+ * ```typescript
35
+ * logger.logWithSVG('My App', '<svg>...</svg>', {
36
+ * width: 400,
37
+ * height: 80,
38
+ * padding: '40px 200px'
39
+ * });
40
+ * ```
41
+ */
42
+ logWithSVG(message, svgContent, options = {}) {
43
+ super.logWithSVG(message, svgContent, options);
44
+ }
45
+ /**
46
+ * Log with animated background gradient
47
+ *
48
+ * @param message - The message to log
49
+ * @param duration - Animation duration in seconds
50
+ *
51
+ * @example
52
+ * ```typescript
53
+ * logger.logAnimated('🚀 Loading...', 2);
54
+ * ```
55
+ */
56
+ logAnimated(message, duration = 3) {
57
+ super.logAnimated(message, duration);
58
+ }
59
+ /**
60
+ * Display banner with specified type
61
+ *
62
+ * @param bannerType - Type of banner to display
63
+ *
64
+ * @example
65
+ * ```typescript
66
+ * logger.showBanner('animated');
67
+ * ```
68
+ */
69
+ showBanner(bannerType) {
70
+ super.showBanner(bannerType);
71
+ }
72
+ /**
73
+ * Set banner type for initialization display
74
+ *
75
+ * @param bannerType - Type of banner to display
76
+ *
77
+ * @example
78
+ * ```typescript
79
+ * logger.setBannerType('svg');
80
+ * ```
81
+ */
82
+ setBannerType(bannerType) {
83
+ super.setBannerType(bannerType);
84
+ }
85
+ /**
86
+ * Sets the logger theme with visual banner
87
+ *
88
+ * @param theme - Theme variant to apply
89
+ *
90
+ * @example
91
+ * ```typescript
92
+ * logger.setTheme('cyberpunk'); // Shows themed banner
93
+ * ```
94
+ */
95
+ setTheme(theme) {
96
+ super.setTheme(theme);
97
+ }
98
+ }
99
+ // Create singleton instance
100
+ const styledLogger = new StyledLogger();
101
+ /**
102
+ * Utility functions for creating custom styles
103
+ *
104
+ * @example
105
+ * ```typescript
106
+ * import { createStyle, StyleBuilder } from '@mks2508/better-logger/styling';
107
+ *
108
+ * const myStyle = createStyle()
109
+ * .bg('linear-gradient(45deg, #ff6b6b, #feca57)')
110
+ * .color('white')
111
+ * .padding('10px')
112
+ * .build();
113
+ *
114
+ * console.log('%cCustom Message', myStyle);
115
+ * ```
116
+ */
117
+ export const createStyle = () => new StyleBuilder();
118
+ /**
119
+ * Pre-built style presets
120
+ *
121
+ * @example
122
+ * ```typescript
123
+ * import { stylePresets } from '@mks2508/better-logger/styling';
124
+ *
125
+ * console.log('%cSuccess!', stylePresets.success);
126
+ * console.log('%cError!', stylePresets.error);
127
+ * ```
128
+ */
129
+ export const stylePresets = {
130
+ success: StylePresets.success().build(),
131
+ error: StylePresets.error().build(),
132
+ warning: StylePresets.warning().build(),
133
+ info: StylePresets.info().build(),
134
+ accent: StylePresets.accent().build(),
135
+ };
136
+ /**
137
+ * Available themes for the logger
138
+ *
139
+ * @example
140
+ * ```typescript
141
+ * import { themes } from '@mks2508/better-logger/styling';
142
+ *
143
+ * console.log('Available themes:', Object.keys(themes));
144
+ * ```
145
+ */
146
+ export const themes = Object.keys(THEME_PRESETS);
147
+ /**
148
+ * Available banner types
149
+ *
150
+ * @example
151
+ * ```typescript
152
+ * import { bannerTypes } from '@mks2508/better-logger/styling';
153
+ *
154
+ * console.log('Available banners:', bannerTypes);
155
+ * ```
156
+ */
157
+ export const bannerTypes = Object.keys(BANNER_VARIANTS);
158
+ /**
159
+ * Display initialization banner
160
+ *
161
+ * @param bannerType - Type of banner to display
162
+ *
163
+ * @example
164
+ * ```typescript
165
+ * import { showInitBanner } from '@mks2508/better-logger/styling';
166
+ *
167
+ * showInitBanner('animated');
168
+ * ```
169
+ */
170
+ export const showInitBanner = (bannerType) => {
171
+ displayInitBanner(bannerType);
172
+ };
173
+ /**
174
+ * Export individual styled logging methods
175
+ */
176
+ export const debug = (...args) => styledLogger.debug(...args);
177
+ export const info = (...args) => styledLogger.info(...args);
178
+ export const warn = (...args) => styledLogger.warn(...args);
179
+ export const error = (...args) => styledLogger.error(...args);
180
+ export const success = (...args) => styledLogger.success(...args);
181
+ export const critical = (...args) => styledLogger.critical(...args);
182
+ export const trace = (...args) => styledLogger.trace(...args);
183
+ export const table = (data, columns) => styledLogger.table(data, columns);
184
+ export const group = (label, collapsed) => styledLogger.group(label, collapsed);
185
+ export const groupEnd = () => styledLogger.groupEnd();
186
+ export const time = (label) => styledLogger.time(label);
187
+ export const timeEnd = (label) => styledLogger.timeEnd(label);
188
+ export const setGlobalPrefix = (prefix) => styledLogger.setGlobalPrefix(prefix);
189
+ export const createScopedLogger = (prefix) => styledLogger.createScopedLogger(prefix);
190
+ export const setVerbosity = (level) => styledLogger.setVerbosity(level);
191
+ export const setTheme = (theme) => styledLogger.setTheme(theme);
192
+ export const setBannerType = (bannerType) => styledLogger.setBannerType(bannerType);
193
+ export const showBanner = (bannerType) => styledLogger.showBanner(bannerType);
194
+ export const logWithSVG = (message, svgContent, options) => styledLogger.logWithSVG(message, svgContent, options);
195
+ export const logAnimated = (message, duration) => styledLogger.logAnimated(message, duration);
196
+ // Export the singleton as default
197
+ export default styledLogger;
198
+ // Re-export styling utilities
199
+ export { StyleBuilder, StylePresets, THEME_PRESETS, THEME_BANNERS, BANNER_VARIANTS } from './styling/index.js';
package/dist/styling.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./chunks/Logger-BQhMKy_T.js"),t=require("./chunks/styling-tmRDI28D.js");class StyledLogger extends e.Logger{logWithSVG(e,t,r={}){super.logWithSVG(e,t,r)}logAnimated(e,t=3){super.logAnimated(e,t)}showBanner(e){super.showBanner(e)}setBannerType(e){super.setBannerType(e)}setTheme(e){super.setTheme(e)}}const r=new StyledLogger,s={success:t.StylePresets.success().build(),error:t.StylePresets.error().build(),warning:t.StylePresets.warning().build(),info:t.StylePresets.info().build(),accent:t.StylePresets.accent().build()},o=Object.keys(t.THEME_PRESETS),n=Object.keys(t.BANNER_VARIANTS);exports.BANNER_VARIANTS=t.BANNER_VARIANTS,exports.StyleBuilder=t.StyleBuilder,exports.StylePresets=t.StylePresets,exports.THEME_BANNERS=t.THEME_BANNERS,exports.THEME_PRESETS=t.THEME_PRESETS,exports.StyledLogger=StyledLogger,exports.bannerTypes=n,exports.createScopedLogger=e=>r.createScopedLogger(e),exports.createStyle=()=>new t.StyleBuilder,exports.critical=(...e)=>r.critical(...e),exports.debug=(...e)=>r.debug(...e),exports.default=r,exports.error=(...e)=>r.error(...e),exports.group=(e,t)=>r.group(e,t),exports.groupEnd=()=>r.groupEnd(),exports.info=(...e)=>r.info(...e),exports.logAnimated=(e,t)=>r.logAnimated(e,t),exports.logWithSVG=(e,t,s)=>r.logWithSVG(e,t,s),exports.setBannerType=e=>r.setBannerType(e),exports.setGlobalPrefix=e=>r.setGlobalPrefix(e),exports.setTheme=e=>r.setTheme(e),exports.setVerbosity=e=>r.setVerbosity(e),exports.showBanner=e=>r.showBanner(e),exports.showInitBanner=e=>{t.displayInitBanner(e)},exports.stylePresets=s,exports.success=(...e)=>r.success(...e),exports.table=(e,t)=>r.table(e,t),exports.themes=o,exports.time=e=>r.time(e),exports.timeEnd=e=>r.timeEnd(e),exports.trace=(...e)=>r.trace(...e),exports.warn=(...e)=>r.warn(...e);
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("./chunks/Logger-PCfgYKTP.js"),t=require("./chunks/StyleBuilder-LPLzsoHY.js");class StyledLogger extends e.Logger{logWithSVG(e,t,r={}){super.logWithSVG(e,t,r)}logAnimated(e,t=3){super.logAnimated(e,t)}showBanner(e){super.showBanner(e)}setBannerType(e){super.setBannerType(e)}setTheme(e){super.setTheme(e)}}const r=new StyledLogger,s={success:t.StylePresets.success().build(),error:t.StylePresets.error().build(),warning:t.StylePresets.warning().build(),info:t.StylePresets.info().build(),accent:t.StylePresets.accent().build()},o=Object.keys(e.THEME_PRESETS),n=Object.keys(e.BANNER_VARIANTS);exports.BANNER_VARIANTS=e.BANNER_VARIANTS,exports.THEME_BANNERS=e.THEME_BANNERS,exports.THEME_PRESETS=e.THEME_PRESETS,exports.StyleBuilder=t.StyleBuilder,exports.StylePresets=t.StylePresets,exports.StyledLogger=StyledLogger,exports.bannerTypes=n,exports.createScopedLogger=e=>r.createScopedLogger(e),exports.createStyle=()=>new t.StyleBuilder,exports.critical=(...e)=>r.critical(...e),exports.debug=(...e)=>r.debug(...e),exports.default=r,exports.error=(...e)=>r.error(...e),exports.group=(e,t)=>r.group(e,t),exports.groupEnd=()=>r.groupEnd(),exports.info=(...e)=>r.info(...e),exports.logAnimated=(e,t)=>r.logAnimated(e,t),exports.logWithSVG=(e,t,s)=>r.logWithSVG(e,t,s),exports.setBannerType=e=>r.setBannerType(e),exports.setGlobalPrefix=e=>r.setGlobalPrefix(e),exports.setTheme=e=>r.setTheme(e),exports.setVerbosity=e=>r.setVerbosity(e),exports.showBanner=e=>r.showBanner(e),exports.showInitBanner=t=>{e.displayInitBanner(t)},exports.stylePresets=s,exports.success=(...e)=>r.success(...e),exports.table=(e,t)=>r.table(e,t),exports.themes=o,exports.time=e=>r.time(e),exports.timeEnd=e=>r.timeEnd(e),exports.trace=(...e)=>r.trace(...e),exports.warn=(...e)=>r.warn(...e);
2
2
  //# sourceMappingURL=styling.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"styling.cjs","sources":["../src/styling-module.ts"],"sourcesContent":["/**\n * @fileoverview Styling Module - Advanced visual features for Better Logger\n * @version 0.0.1\n * \n * This module provides advanced styling features including SVG support, CSS animations,\n * themed banners, and visual enhancements for console logging.\n */\n\n// Import core logger\nimport { Logger } from './Logger.js';\n\n// Styling imports\nimport {\n StyleBuilder,\n StylePresets,\n THEME_PRESETS,\n THEME_BANNERS,\n displayInitBanner,\n BANNER_VARIANTS\n} from './styling/index.js';\n\n// Types\nimport type {\n ThemeVariant,\n BannerType,\n StyleOptions\n} from './types/index.js';\n\n/**\n * Enhanced Logger with advanced styling capabilities\n * \n * @example\n * ```typescript\n * import { StyledLogger } from '@mks2508/better-logger/styling';\n * \n * const logger = new StyledLogger();\n * logger.setTheme('neon');\n * logger.logAnimated('🌟 Animated message!');\n * logger.logWithSVG('Custom SVG Logo', svgContent);\n * ```\n */\nexport class StyledLogger extends Logger {\n /**\n * Log with SVG background image\n * \n * @param message - The message to log\n * @param svgContent - SVG content as string (optional)\n * @param options - Styling options\n * \n * @example\n * ```typescript\n * logger.logWithSVG('My App', '<svg>...</svg>', {\n * width: 400,\n * height: 80,\n * padding: '40px 200px'\n * });\n * ```\n */\n logWithSVG(message: string, svgContent?: string, options: StyleOptions = {}): void {\n super.logWithSVG(message, svgContent, options);\n }\n\n /**\n * Log with animated background gradient\n * \n * @param message - The message to log \n * @param duration - Animation duration in seconds\n * \n * @example\n * ```typescript\n * logger.logAnimated('🚀 Loading...', 2);\n * ```\n */\n logAnimated(message: string, duration: number = 3): void {\n super.logAnimated(message, duration);\n }\n\n /**\n * Display banner with specified type\n * \n * @param bannerType - Type of banner to display\n * \n * @example\n * ```typescript\n * logger.showBanner('animated');\n * ```\n */\n showBanner(bannerType?: BannerType): void {\n super.showBanner(bannerType);\n }\n\n /**\n * Set banner type for initialization display\n * \n * @param bannerType - Type of banner to display\n * \n * @example\n * ```typescript\n * logger.setBannerType('svg');\n * ```\n */\n setBannerType(bannerType: BannerType): void {\n super.setBannerType(bannerType);\n }\n\n /**\n * Sets the logger theme with visual banner\n * \n * @param theme - Theme variant to apply\n * \n * @example\n * ```typescript\n * logger.setTheme('cyberpunk'); // Shows themed banner\n * ```\n */\n setTheme(theme: ThemeVariant): void {\n super.setTheme(theme);\n }\n}\n\n// Create singleton instance\nconst styledLogger = new StyledLogger();\n\n/**\n * Utility functions for creating custom styles\n * \n * @example\n * ```typescript\n * import { createStyle, StyleBuilder } from '@mks2508/better-logger/styling';\n * \n * const myStyle = createStyle()\n * .bg('linear-gradient(45deg, #ff6b6b, #feca57)')\n * .color('white')\n * .padding('10px')\n * .build();\n * \n * console.log('%cCustom Message', myStyle);\n * ```\n */\nexport const createStyle = () => new StyleBuilder();\n\n/**\n * Pre-built style presets\n * \n * @example\n * ```typescript\n * import { stylePresets } from '@mks2508/better-logger/styling';\n * \n * console.log('%cSuccess!', stylePresets.success);\n * console.log('%cError!', stylePresets.error);\n * ```\n */\nexport const stylePresets = {\n success: StylePresets.success().build(),\n error: StylePresets.error().build(),\n warning: StylePresets.warning().build(),\n info: StylePresets.info().build(),\n accent: StylePresets.accent().build(),\n};\n\n/**\n * Available themes for the logger\n * \n * @example\n * ```typescript\n * import { themes } from '@mks2508/better-logger/styling';\n * \n * console.log('Available themes:', Object.keys(themes));\n * ```\n */\nexport const themes = Object.keys(THEME_PRESETS);\n\n/**\n * Available banner types\n * \n * @example\n * ```typescript\n * import { bannerTypes } from '@mks2508/better-logger/styling';\n * \n * console.log('Available banners:', bannerTypes);\n * ```\n */\nexport const bannerTypes = Object.keys(BANNER_VARIANTS);\n\n/**\n * Display initialization banner\n * \n * @param bannerType - Type of banner to display\n * \n * @example\n * ```typescript\n * import { showInitBanner } from '@mks2508/better-logger/styling';\n * \n * showInitBanner('animated');\n * ```\n */\nexport const showInitBanner = (bannerType?: BannerType) => {\n displayInitBanner(bannerType);\n};\n\n/**\n * Export individual styled logging methods\n */\nexport const debug = (...args: any[]) => styledLogger.debug(...args);\nexport const info = (...args: any[]) => styledLogger.info(...args);\nexport const warn = (...args: any[]) => styledLogger.warn(...args);\nexport const error = (...args: any[]) => styledLogger.error(...args);\nexport const success = (...args: any[]) => styledLogger.success(...args);\nexport const critical = (...args: any[]) => styledLogger.critical(...args);\nexport const trace = (...args: any[]) => styledLogger.trace(...args);\nexport const table = (data: any, columns?: string[]) => styledLogger.table(data, columns);\nexport const group = (label: string, collapsed?: boolean) => styledLogger.group(label, collapsed);\nexport const groupEnd = () => styledLogger.groupEnd();\nexport const time = (label: string) => styledLogger.time(label);\nexport const timeEnd = (label: string) => styledLogger.timeEnd(label);\nexport const setGlobalPrefix = (prefix: string) => styledLogger.setGlobalPrefix(prefix);\nexport const createScopedLogger = (prefix: string) => styledLogger.createScopedLogger(prefix);\nexport const setVerbosity = (level: any) => styledLogger.setVerbosity(level);\nexport const setTheme = (theme: ThemeVariant) => styledLogger.setTheme(theme);\nexport const setBannerType = (bannerType: BannerType) => styledLogger.setBannerType(bannerType);\nexport const showBanner = (bannerType?: BannerType) => styledLogger.showBanner(bannerType);\nexport const logWithSVG = (message: string, svgContent?: string, options?: StyleOptions) => \n styledLogger.logWithSVG(message, svgContent, options);\nexport const logAnimated = (message: string, duration?: number) => \n styledLogger.logAnimated(message, duration);\n\n// Export the singleton as default\nexport default styledLogger;\n\n// Re-export styling utilities\nexport {\n StyleBuilder,\n StylePresets,\n THEME_PRESETS,\n THEME_BANNERS,\n BANNER_VARIANTS\n} from './styling/index.js';\n\n// Re-export types\nexport type {\n ThemeVariant,\n BannerType,\n StyleOptions\n} from './types/index.js';"],"names":["StyledLogger","Logger","logWithSVG","message","svgContent","options","super","logAnimated","duration","showBanner","bannerType","setBannerType","setTheme","theme","styledLogger","stylePresets","success","StylePresets","build","error","warning","info","accent","themes","Object","keys","THEME_PRESETS","bannerTypes","BANNER_VARIANTS","prefix","createScopedLogger","StyleBuilder","args","critical","debug","label","collapsed","group","groupEnd","setGlobalPrefix","level","setVerbosity","displayInitBanner","data","columns","table","time","timeEnd","trace","warn"],"mappings":"qMAyCO,MAAMA,qBAAqBC,EAAAA,OAiB9B,UAAAC,CAAWC,EAAiBC,EAAqBC,EAAwB,CAAA,GACrEC,MAAMJ,WAAWC,EAASC,EAAYC,EAC1C,CAaA,WAAAE,CAAYJ,EAAiBK,EAAmB,GAC5CF,MAAMC,YAAYJ,EAASK,EAC/B,CAYA,UAAAC,CAAWC,GACPJ,MAAMG,WAAWC,EACrB,CAYA,aAAAC,CAAcD,GACVJ,MAAMK,cAAcD,EACxB,CAYA,QAAAE,CAASC,GACLP,MAAMM,SAASC,EACnB,EAIJ,MAAMC,EAAe,IAAId,aA+BZe,EAAe,CACxBC,QAASC,EAAAA,aAAaD,UAAUE,QAChCC,MAAOF,EAAAA,aAAaE,QAAQD,QAC5BE,QAASH,EAAAA,aAAaG,UAAUF,QAChCG,KAAMJ,EAAAA,aAAaI,OAAOH,QAC1BI,OAAQL,EAAAA,aAAaK,SAASJ,SAarBK,EAASC,OAAOC,KAAKC,EAAAA,eAYrBC,EAAcH,OAAOC,KAAKG,EAAAA,kSAkCJC,GAAmBf,EAAagB,mBAAmBD,uBA7E3D,IAAM,IAAIE,EAAAA,8BAqEb,IAAIC,IAAgBlB,EAAamB,YAAYD,iBALhD,IAAIA,IAAgBlB,EAAaoB,SAASF,mCAG1C,IAAIA,IAAgBlB,EAAaK,SAASa,iBAK1C,CAACG,EAAeC,IAAwBtB,EAAauB,MAAMF,EAAOC,oBAC/D,IAAMtB,EAAawB,wBARvB,IAAIN,IAAgBlB,EAAaO,QAAQW,uBAmBlC,CAAC7B,EAAiBK,IACzCM,EAAaP,YAAYJ,EAASK,sBAHZ,CAACL,EAAiBC,EAAqBC,IAC7DS,EAAaZ,WAAWC,EAASC,EAAYC,yBAHnBK,GAA2BI,EAAaH,cAAcD,2BAJpDmB,GAAmBf,EAAayB,gBAAgBV,oBAGvDhB,GAAwBC,EAAaF,SAASC,wBAD1C2B,GAAe1B,EAAa2B,aAAaD,sBAG3C9B,GAA4BI,EAAaL,WAAWC,0BAxBhDA,IAC3BgC,EAAAA,kBAAkBhC,2CAUC,IAAIsB,IAAgBlB,EAAaE,WAAWgB,iBAG9C,CAACW,EAAWC,IAAuB9B,EAAa+B,MAAMF,EAAMC,iCAG5DT,GAAkBrB,EAAagC,KAAKX,mBACjCA,GAAkBrB,EAAaiC,QAAQZ,iBAL1C,IAAIH,IAAgBlB,EAAakC,SAAShB,gBAJ3C,IAAIA,IAAgBlB,EAAamC,QAAQjB"}
1
+ {"version":3,"file":"styling.cjs","sources":["../src/styling-module.ts"],"sourcesContent":["/**\n * @fileoverview Styling Module - Advanced visual features for Better Logger\n * @version 0.0.1\n * \n * This module provides advanced styling features including SVG support, CSS animations,\n * themed banners, and visual enhancements for console logging.\n */\n\n// Import core logger\nimport { Logger } from './Logger.js';\n\n// Styling imports\nimport {\n StyleBuilder,\n StylePresets,\n THEME_PRESETS,\n THEME_BANNERS,\n displayInitBanner,\n BANNER_VARIANTS\n} from './styling/index.js';\n\n// Types\nimport type {\n ThemeVariant,\n BannerType,\n StyleOptions\n} from './types/index.js';\n\n/**\n * Enhanced Logger with advanced styling capabilities\n * \n * @example\n * ```typescript\n * import { StyledLogger } from '@mks2508/better-logger/styling';\n * \n * const logger = new StyledLogger();\n * logger.setTheme('neon');\n * logger.logAnimated('🌟 Animated message!');\n * logger.logWithSVG('Custom SVG Logo', svgContent);\n * ```\n */\nexport class StyledLogger extends Logger {\n /**\n * Log with SVG background image\n * \n * @param message - The message to log\n * @param svgContent - SVG content as string (optional)\n * @param options - Styling options\n * \n * @example\n * ```typescript\n * logger.logWithSVG('My App', '<svg>...</svg>', {\n * width: 400,\n * height: 80,\n * padding: '40px 200px'\n * });\n * ```\n */\n logWithSVG(message: string, svgContent?: string, options: StyleOptions = {}): void {\n super.logWithSVG(message, svgContent, options);\n }\n\n /**\n * Log with animated background gradient\n * \n * @param message - The message to log \n * @param duration - Animation duration in seconds\n * \n * @example\n * ```typescript\n * logger.logAnimated('🚀 Loading...', 2);\n * ```\n */\n logAnimated(message: string, duration: number = 3): void {\n super.logAnimated(message, duration);\n }\n\n /**\n * Display banner with specified type\n * \n * @param bannerType - Type of banner to display\n * \n * @example\n * ```typescript\n * logger.showBanner('animated');\n * ```\n */\n showBanner(bannerType?: BannerType): void {\n super.showBanner(bannerType);\n }\n\n /**\n * Set banner type for initialization display\n * \n * @param bannerType - Type of banner to display\n * \n * @example\n * ```typescript\n * logger.setBannerType('svg');\n * ```\n */\n setBannerType(bannerType: BannerType): void {\n super.setBannerType(bannerType);\n }\n\n /**\n * Sets the logger theme with visual banner\n * \n * @param theme - Theme variant to apply\n * \n * @example\n * ```typescript\n * logger.setTheme('cyberpunk'); // Shows themed banner\n * ```\n */\n setTheme(theme: ThemeVariant): void {\n super.setTheme(theme);\n }\n}\n\n// Create singleton instance\nconst styledLogger = new StyledLogger();\n\n/**\n * Utility functions for creating custom styles\n * \n * @example\n * ```typescript\n * import { createStyle, StyleBuilder } from '@mks2508/better-logger/styling';\n * \n * const myStyle = createStyle()\n * .bg('linear-gradient(45deg, #ff6b6b, #feca57)')\n * .color('white')\n * .padding('10px')\n * .build();\n * \n * console.log('%cCustom Message', myStyle);\n * ```\n */\nexport const createStyle = () => new StyleBuilder();\n\n/**\n * Pre-built style presets\n * \n * @example\n * ```typescript\n * import { stylePresets } from '@mks2508/better-logger/styling';\n * \n * console.log('%cSuccess!', stylePresets.success);\n * console.log('%cError!', stylePresets.error);\n * ```\n */\nexport const stylePresets = {\n success: StylePresets.success().build(),\n error: StylePresets.error().build(),\n warning: StylePresets.warning().build(),\n info: StylePresets.info().build(),\n accent: StylePresets.accent().build(),\n};\n\n/**\n * Available themes for the logger\n * \n * @example\n * ```typescript\n * import { themes } from '@mks2508/better-logger/styling';\n * \n * console.log('Available themes:', Object.keys(themes));\n * ```\n */\nexport const themes = Object.keys(THEME_PRESETS);\n\n/**\n * Available banner types\n * \n * @example\n * ```typescript\n * import { bannerTypes } from '@mks2508/better-logger/styling';\n * \n * console.log('Available banners:', bannerTypes);\n * ```\n */\nexport const bannerTypes = Object.keys(BANNER_VARIANTS);\n\n/**\n * Display initialization banner\n * \n * @param bannerType - Type of banner to display\n * \n * @example\n * ```typescript\n * import { showInitBanner } from '@mks2508/better-logger/styling';\n * \n * showInitBanner('animated');\n * ```\n */\nexport const showInitBanner = (bannerType?: BannerType) => {\n displayInitBanner(bannerType);\n};\n\n/**\n * Export individual styled logging methods\n */\nexport const debug = (...args: any[]) => styledLogger.debug(...args);\nexport const info = (...args: any[]) => styledLogger.info(...args);\nexport const warn = (...args: any[]) => styledLogger.warn(...args);\nexport const error = (...args: any[]) => styledLogger.error(...args);\nexport const success = (...args: any[]) => styledLogger.success(...args);\nexport const critical = (...args: any[]) => styledLogger.critical(...args);\nexport const trace = (...args: any[]) => styledLogger.trace(...args);\nexport const table = (data: any, columns?: string[]) => styledLogger.table(data, columns);\nexport const group = (label: string, collapsed?: boolean) => styledLogger.group(label, collapsed);\nexport const groupEnd = () => styledLogger.groupEnd();\nexport const time = (label: string) => styledLogger.time(label);\nexport const timeEnd = (label: string) => styledLogger.timeEnd(label);\nexport const setGlobalPrefix = (prefix: string) => styledLogger.setGlobalPrefix(prefix);\nexport const createScopedLogger = (prefix: string) => styledLogger.createScopedLogger(prefix);\nexport const setVerbosity = (level: any) => styledLogger.setVerbosity(level);\nexport const setTheme = (theme: ThemeVariant) => styledLogger.setTheme(theme);\nexport const setBannerType = (bannerType: BannerType) => styledLogger.setBannerType(bannerType);\nexport const showBanner = (bannerType?: BannerType) => styledLogger.showBanner(bannerType);\nexport const logWithSVG = (message: string, svgContent?: string, options?: StyleOptions) => \n styledLogger.logWithSVG(message, svgContent, options);\nexport const logAnimated = (message: string, duration?: number) => \n styledLogger.logAnimated(message, duration);\n\n// Export the singleton as default\nexport default styledLogger;\n\n// Re-export styling utilities\nexport {\n StyleBuilder,\n StylePresets,\n THEME_PRESETS,\n THEME_BANNERS,\n BANNER_VARIANTS\n} from './styling/index.js';\n\n// Re-export types\nexport type {\n ThemeVariant,\n BannerType,\n StyleOptions\n} from './types/index.js';"],"names":["StyledLogger","Logger","logWithSVG","message","svgContent","options","super","logAnimated","duration","showBanner","bannerType","setBannerType","setTheme","theme","styledLogger","stylePresets","success","StylePresets","build","error","warning","info","accent","themes","Object","keys","THEME_PRESETS","bannerTypes","BANNER_VARIANTS","prefix","createScopedLogger","StyleBuilder","args","critical","debug","label","collapsed","group","groupEnd","setGlobalPrefix","level","setVerbosity","displayInitBanner","data","columns","table","time","timeEnd","trace","warn"],"mappings":"0MAyCO,MAAMA,qBAAqBC,EAAAA,OAiB9B,UAAAC,CAAWC,EAAiBC,EAAqBC,EAAwB,CAAA,GACrEC,MAAMJ,WAAWC,EAASC,EAAYC,EAC1C,CAaA,WAAAE,CAAYJ,EAAiBK,EAAmB,GAC5CF,MAAMC,YAAYJ,EAASK,EAC/B,CAYA,UAAAC,CAAWC,GACPJ,MAAMG,WAAWC,EACrB,CAYA,aAAAC,CAAcD,GACVJ,MAAMK,cAAcD,EACxB,CAYA,QAAAE,CAASC,GACLP,MAAMM,SAASC,EACnB,EAIJ,MAAMC,EAAe,IAAId,aA+BZe,EAAe,CACxBC,QAASC,EAAAA,aAAaD,UAAUE,QAChCC,MAAOF,EAAAA,aAAaE,QAAQD,QAC5BE,QAASH,EAAAA,aAAaG,UAAUF,QAChCG,KAAMJ,EAAAA,aAAaI,OAAOH,QAC1BI,OAAQL,EAAAA,aAAaK,SAASJ,SAarBK,EAASC,OAAOC,KAAKC,EAAAA,eAYrBC,EAAcH,OAAOC,KAAKG,EAAAA,kSAkCJC,GAAmBf,EAAagB,mBAAmBD,uBA7E3D,IAAM,IAAIE,EAAAA,8BAqEb,IAAIC,IAAgBlB,EAAamB,YAAYD,iBALhD,IAAIA,IAAgBlB,EAAaoB,SAASF,mCAG1C,IAAIA,IAAgBlB,EAAaK,SAASa,iBAK1C,CAACG,EAAeC,IAAwBtB,EAAauB,MAAMF,EAAOC,oBAC/D,IAAMtB,EAAawB,wBARvB,IAAIN,IAAgBlB,EAAaO,QAAQW,uBAmBlC,CAAC7B,EAAiBK,IACzCM,EAAaP,YAAYJ,EAASK,sBAHZ,CAACL,EAAiBC,EAAqBC,IAC7DS,EAAaZ,WAAWC,EAASC,EAAYC,yBAHnBK,GAA2BI,EAAaH,cAAcD,2BAJpDmB,GAAmBf,EAAayB,gBAAgBV,oBAGvDhB,GAAwBC,EAAaF,SAASC,wBAD1C2B,GAAe1B,EAAa2B,aAAaD,sBAG3C9B,GAA4BI,EAAaL,WAAWC,0BAxBhDA,IAC3BgC,EAAAA,kBAAkBhC,2CAUC,IAAIsB,IAAgBlB,EAAaE,WAAWgB,iBAG9C,CAACW,EAAWC,IAAuB9B,EAAa+B,MAAMF,EAAMC,iCAG5DT,GAAkBrB,EAAagC,KAAKX,mBACjCA,GAAkBrB,EAAaiC,QAAQZ,iBAL1C,IAAIH,IAAgBlB,EAAakC,SAAShB,gBAJ3C,IAAIA,IAAgBlB,EAAamC,QAAQjB"}