@mks2508/better-logger 5.0.1 → 5.0.2

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 (310) hide show
  1. package/dist/Logger.d.ts +976 -0
  2. package/dist/Logger.d.ts.map +1 -0
  3. package/dist/ScopedLogger.d.ts +74 -0
  4. package/dist/ScopedLogger.d.ts.map +1 -0
  5. package/dist/chunks/Logger-CKqzXDh3.js +2 -0
  6. package/dist/chunks/Logger-CKqzXDh3.js.map +1 -0
  7. package/dist/chunks/Logger-D_vuKP4l.js +4511 -0
  8. package/dist/chunks/Logger-D_vuKP4l.js.map +1 -0
  9. package/dist/chunks/RemoteLogHandler-CjWpWZGl.js +33 -0
  10. package/dist/chunks/RemoteLogHandler-CjWpWZGl.js.map +1 -0
  11. package/dist/chunks/RemoteLogHandler-ymkQ97xl.js +2 -0
  12. package/dist/chunks/RemoteLogHandler-ymkQ97xl.js.map +1 -0
  13. package/dist/chunks/cli-module-B-njrTWb.js +2 -0
  14. package/dist/chunks/cli-module-B-njrTWb.js.map +1 -0
  15. package/dist/chunks/cli-module-Cx7qotPY.js +390 -0
  16. package/dist/chunks/cli-module-Cx7qotPY.js.map +1 -0
  17. package/dist/chunks/color-converter-CCSQRztd.js +2 -0
  18. package/dist/chunks/color-converter-CCSQRztd.js.map +1 -0
  19. package/dist/chunks/color-converter-_Xdmsy7E.js +462 -0
  20. package/dist/chunks/color-converter-_Xdmsy7E.js.map +1 -0
  21. package/dist/chunks/environment-C1xxvc8l.js +1127 -0
  22. package/dist/chunks/environment-C1xxvc8l.js.map +1 -0
  23. package/dist/chunks/environment-Cprkw3g9.js +4 -0
  24. package/dist/chunks/environment-Cprkw3g9.js.map +1 -0
  25. package/dist/chunks/formatting-DMJxYq9o.js +380 -0
  26. package/dist/chunks/formatting-DMJxYq9o.js.map +1 -0
  27. package/dist/chunks/formatting-DpKxCsXq.js +2 -0
  28. package/dist/chunks/formatting-DpKxCsXq.js.map +1 -0
  29. package/dist/cli/CommandProcessor.d.ts +100 -0
  30. package/dist/cli/CommandProcessor.d.ts.map +1 -0
  31. package/dist/cli/commands/ConfigCommand.d.ts +14 -0
  32. package/dist/cli/commands/ConfigCommand.d.ts.map +1 -0
  33. package/dist/cli/commands/ExportCommand.d.ts +48 -0
  34. package/dist/cli/commands/ExportCommand.d.ts.map +1 -0
  35. package/dist/cli/commands/HistoryCommand.d.ts +47 -0
  36. package/dist/cli/commands/HistoryCommand.d.ts.map +1 -0
  37. package/dist/cli/commands/StatusCommand.d.ts +30 -0
  38. package/dist/cli/commands/StatusCommand.d.ts.map +1 -0
  39. package/dist/cli/commands/ThemeCommand.d.ts +30 -0
  40. package/dist/cli/commands/ThemeCommand.d.ts.map +1 -0
  41. package/dist/cli/help.d.ts +12 -0
  42. package/dist/cli/help.d.ts.map +1 -0
  43. package/dist/cli/index.d.ts +15 -0
  44. package/dist/cli/index.d.ts.map +1 -0
  45. package/{src/cli-module.ts → dist/cli-module.d.ts} +2 -8
  46. package/dist/cli-module.d.ts.map +1 -0
  47. package/dist/cli-primitives/box.d.ts +11 -0
  48. package/dist/cli-primitives/box.d.ts.map +1 -0
  49. package/dist/cli-primitives/cli-table.d.ts +11 -0
  50. package/dist/cli-primitives/cli-table.d.ts.map +1 -0
  51. package/dist/cli-primitives/divider.d.ts +11 -0
  52. package/dist/cli-primitives/divider.d.ts.map +1 -0
  53. package/dist/cli-primitives/header.d.ts +12 -0
  54. package/dist/cli-primitives/header.d.ts.map +1 -0
  55. package/{src/cli-primitives/index.ts → dist/cli-primitives/index.d.ts} +1 -1
  56. package/dist/cli-primitives/index.d.ts.map +1 -0
  57. package/dist/cli-primitives/server-fallback.d.ts +25 -0
  58. package/dist/cli-primitives/server-fallback.d.ts.map +1 -0
  59. package/dist/cli-primitives/spinner.d.ts +47 -0
  60. package/dist/cli-primitives/spinner.d.ts.map +1 -0
  61. package/dist/cli-primitives/step.d.ts +11 -0
  62. package/dist/cli-primitives/step.d.ts.map +1 -0
  63. package/dist/cli.cjs +2 -0
  64. package/dist/cli.cjs.map +1 -0
  65. package/dist/cli.js +12 -0
  66. package/dist/cli.js.map +1 -0
  67. package/dist/constants.d.ts +235 -0
  68. package/dist/constants.d.ts.map +1 -0
  69. package/dist/core.cjs +2 -0
  70. package/dist/core.cjs.map +1 -0
  71. package/dist/core.d.ts +127 -0
  72. package/dist/core.d.ts.map +1 -0
  73. package/dist/core.js +291 -0
  74. package/dist/core.js.map +1 -0
  75. package/dist/example.d.ts +18 -0
  76. package/dist/example.d.ts.map +1 -0
  77. package/dist/exports-module.d.ts +196 -0
  78. package/dist/exports-module.d.ts.map +1 -0
  79. package/dist/exports.cjs +2 -0
  80. package/dist/exports.cjs.map +1 -0
  81. package/dist/exports.js +238 -0
  82. package/dist/exports.js.map +1 -0
  83. package/dist/handlers/AnalyticsLogHandler.d.ts +8 -0
  84. package/dist/handlers/AnalyticsLogHandler.d.ts.map +1 -0
  85. package/dist/handlers/ExportLogHandler.d.ts +100 -0
  86. package/dist/handlers/ExportLogHandler.d.ts.map +1 -0
  87. package/dist/handlers/FileLogHandler.d.ts +33 -0
  88. package/dist/handlers/FileLogHandler.d.ts.map +1 -0
  89. package/dist/handlers/RemoteLogHandler.d.ts +11 -0
  90. package/dist/handlers/RemoteLogHandler.d.ts.map +1 -0
  91. package/{src/handlers/index.ts → dist/handlers/index.d.ts} +2 -2
  92. package/dist/handlers/index.d.ts.map +1 -0
  93. package/dist/hooks/HookManager.d.ts +21 -0
  94. package/dist/hooks/HookManager.d.ts.map +1 -0
  95. package/{src/hooks/index.ts → dist/hooks/index.d.ts} +1 -0
  96. package/dist/hooks/index.d.ts.map +1 -0
  97. package/dist/index.cjs +2 -0
  98. package/dist/index.cjs.map +1 -0
  99. package/dist/index.d.ts +161 -0
  100. package/dist/index.d.ts.map +1 -0
  101. package/dist/index.js +627 -0
  102. package/dist/index.js.map +1 -0
  103. package/dist/main.d.ts +2 -0
  104. package/dist/main.d.ts.map +1 -0
  105. package/dist/serializers/SerializerRegistry.d.ts +16 -0
  106. package/dist/serializers/SerializerRegistry.d.ts.map +1 -0
  107. package/{src/serializers/index.ts → dist/serializers/index.d.ts} +1 -0
  108. package/dist/serializers/index.d.ts.map +1 -0
  109. package/dist/styling/LogStyleBuilder.d.ts +146 -0
  110. package/dist/styling/LogStyleBuilder.d.ts.map +1 -0
  111. package/dist/styling/SemanticStyles.d.ts +178 -0
  112. package/dist/styling/SemanticStyles.d.ts.map +1 -0
  113. package/dist/styling/SmartPresets.d.ts +22 -0
  114. package/dist/styling/SmartPresets.d.ts.map +1 -0
  115. package/dist/styling/StyleBuilder.d.ts +140 -0
  116. package/dist/styling/StyleBuilder.d.ts.map +1 -0
  117. package/dist/styling/StyleCache.d.ts +42 -0
  118. package/dist/styling/StyleCache.d.ts.map +1 -0
  119. package/dist/styling/banners.d.ts +42 -0
  120. package/dist/styling/banners.d.ts.map +1 -0
  121. package/dist/styling/index.d.ts +10 -0
  122. package/dist/styling/index.d.ts.map +1 -0
  123. package/dist/styling/themes.d.ts +7 -0
  124. package/dist/styling/themes.d.ts.map +1 -0
  125. package/dist/styling-module.d.ts +178 -0
  126. package/dist/styling-module.d.ts.map +1 -0
  127. package/dist/styling.cjs +2 -0
  128. package/dist/styling.cjs.map +1 -0
  129. package/dist/styling.js +146 -0
  130. package/dist/styling.js.map +1 -0
  131. package/dist/terminal/color-converter.d.ts +73 -0
  132. package/dist/terminal/color-converter.d.ts.map +1 -0
  133. package/dist/terminal/formatter.d.ts +20 -0
  134. package/dist/terminal/formatter.d.ts.map +1 -0
  135. package/dist/terminal/terminal-renderer.d.ts +77 -0
  136. package/dist/terminal/terminal-renderer.d.ts.map +1 -0
  137. package/dist/transports/ConsoleTransport.d.ts +9 -0
  138. package/dist/transports/ConsoleTransport.d.ts.map +1 -0
  139. package/dist/transports/FileTransport.d.ts +15 -0
  140. package/dist/transports/FileTransport.d.ts.map +1 -0
  141. package/dist/transports/HttpTransport.d.ts +16 -0
  142. package/dist/transports/HttpTransport.d.ts.map +1 -0
  143. package/dist/transports/TransportManager.d.ts +14 -0
  144. package/dist/transports/TransportManager.d.ts.map +1 -0
  145. package/{src/transports/index.ts → dist/transports/index.d.ts} +1 -0
  146. package/dist/transports/index.d.ts.map +1 -0
  147. package/{src/types/core.ts → dist/types/core.d.ts} +25 -62
  148. package/dist/types/core.d.ts.map +1 -0
  149. package/{src/types/handlers.ts → dist/types/handlers.d.ts} +5 -15
  150. package/dist/types/handlers.d.ts.map +1 -0
  151. package/{src/types/hooks.ts → dist/types/hooks.d.ts} +3 -12
  152. package/dist/types/hooks.d.ts.map +1 -0
  153. package/dist/types/index.d.ts +11 -0
  154. package/dist/types/index.d.ts.map +1 -0
  155. package/{src/types/serializers.ts → dist/types/serializers.d.ts} +1 -6
  156. package/dist/types/serializers.d.ts.map +1 -0
  157. package/{src/types/transports.ts → dist/types/transports.d.ts} +2 -7
  158. package/dist/types/transports.d.ts.map +1 -0
  159. package/dist/utils/adapter.d.ts +48 -0
  160. package/dist/utils/adapter.d.ts.map +1 -0
  161. package/dist/utils/ansi-colors.d.ts +156 -0
  162. package/dist/utils/ansi-colors.d.ts.map +1 -0
  163. package/dist/utils/environment-detector.d.ts +45 -0
  164. package/dist/utils/environment-detector.d.ts.map +1 -0
  165. package/dist/utils/environment.d.ts +47 -0
  166. package/dist/utils/environment.d.ts.map +1 -0
  167. package/dist/utils/formatting.d.ts +58 -0
  168. package/dist/utils/formatting.d.ts.map +1 -0
  169. package/dist/utils/index.d.ts +8 -0
  170. package/dist/utils/index.d.ts.map +1 -0
  171. package/dist/utils/opentui-detection.d.ts +34 -0
  172. package/dist/utils/opentui-detection.d.ts.map +1 -0
  173. package/dist/utils/output.d.ts +46 -0
  174. package/dist/utils/output.d.ts.map +1 -0
  175. package/dist/utils/stackTrace.d.ts +6 -0
  176. package/dist/utils/stackTrace.d.ts.map +1 -0
  177. package/dist/utils/timestamps.d.ts +20 -0
  178. package/dist/utils/timestamps.d.ts.map +1 -0
  179. package/{src/writers/BufferWriter.ts → dist/writers/BufferWriter.d.ts} +16 -77
  180. package/dist/writers/BufferWriter.d.ts.map +1 -0
  181. package/{src/writers/index.ts → dist/writers/index.d.ts} +1 -1
  182. package/dist/writers/index.d.ts.map +1 -0
  183. package/package.json +5 -1
  184. package/.claude/settings.local.json +0 -48
  185. package/.github/workflows/ci-quality.yml +0 -357
  186. package/.github/workflows/docs-demo.yml +0 -119
  187. package/.github/workflows/releases-core.yml +0 -512
  188. package/.github/workflows/releases-full.yml +0 -582
  189. package/.github/workflows-backup/ci.yml +0 -221
  190. package/.github/workflows-backup/nightly.yml +0 -196
  191. package/.github/workflows-backup/release-optimized.yml +0 -373
  192. package/.github/workflows-backup/release.yml +0 -269
  193. package/.release-notes-0.2.0.md +0 -129
  194. package/.yamllint +0 -28
  195. package/CHANGELOG.json +0 -1120
  196. package/CHANGELOG.md +0 -209
  197. package/CLAUDE.md +0 -217
  198. package/demo.html +0 -847
  199. package/docs/API.md +0 -918
  200. package/docs/CORE.md +0 -264
  201. package/docs/DEVELOPMENT.md +0 -731
  202. package/docs/EXPORTS.md +0 -467
  203. package/docs/PACKAGES.md +0 -244
  204. package/docs/STYLING.md +0 -405
  205. package/docs/_config.yml +0 -36
  206. package/docs/index.md +0 -179
  207. package/examples/README.md +0 -208
  208. package/examples/basic-logging.js +0 -75
  209. package/examples/data-export.js +0 -234
  210. package/examples/package.json +0 -16
  211. package/examples/performance-timing.js +0 -170
  212. package/examples/simplified-api.js +0 -124
  213. package/examples/styling-themes.js +0 -207
  214. package/index.html +0 -358
  215. package/packages/core/package.json +0 -57
  216. package/packages/exports/package.json +0 -41
  217. package/packages/nodejs-opentui/README.md +0 -232
  218. package/packages/nodejs-opentui/package.json +0 -72
  219. package/packages/nodejs-opentui/src/LogRenderer.ts +0 -171
  220. package/packages/nodejs-opentui/src/OpenTUILogHandler.ts +0 -178
  221. package/packages/nodejs-opentui/src/components/LogBadge.tsx +0 -131
  222. package/packages/nodejs-opentui/src/index.ts +0 -133
  223. package/packages/nodejs-opentui/src/types.ts +0 -158
  224. package/packages/nodejs-opentui/tsconfig.json +0 -20
  225. package/packages/styling/package.json +0 -41
  226. package/playground/demo-all.ts +0 -95
  227. package/playground/demo-box.ts +0 -85
  228. package/playground/demo-levels.ts +0 -56
  229. package/playground/demo-real-world.ts +0 -98
  230. package/playground/demo-spinner.ts +0 -77
  231. package/playground/demo-steps.ts +0 -72
  232. package/playground/demo-table.ts +0 -83
  233. package/project-utils/README.md +0 -172
  234. package/project-utils/auto-release-gemini.ts +0 -1193
  235. package/project-utils/auto-release-ui.ts +0 -1329
  236. package/project-utils/commit-generator.ts +0 -1385
  237. package/project-utils/commit-ui.ts +0 -264
  238. package/project-utils/git-utils.ts +0 -199
  239. package/project-utils/github-release-manager.ts +0 -466
  240. package/project-utils/project-config.ts +0 -260
  241. package/project-utils/prompt-templates.js +0 -345
  242. package/project-utils/prompt-templates.ts +0 -422
  243. package/project-utils/version-manager.ts +0 -1078
  244. package/src/Logger.ts +0 -1858
  245. package/src/ScopedLogger.ts +0 -256
  246. package/src/cli/CommandProcessor.ts +0 -248
  247. package/src/cli/commands/ConfigCommand.ts +0 -93
  248. package/src/cli/commands/ExportCommand.ts +0 -276
  249. package/src/cli/commands/HistoryCommand.ts +0 -117
  250. package/src/cli/commands/StatusCommand.ts +0 -112
  251. package/src/cli/commands/ThemeCommand.ts +0 -88
  252. package/src/cli/help.ts +0 -127
  253. package/src/cli/index.ts +0 -71
  254. package/src/cli-primitives/box.ts +0 -86
  255. package/src/cli-primitives/cli-table.ts +0 -62
  256. package/src/cli-primitives/divider.ts +0 -17
  257. package/src/cli-primitives/header.ts +0 -18
  258. package/src/cli-primitives/server-fallback.ts +0 -54
  259. package/src/cli-primitives/spinner.ts +0 -133
  260. package/src/cli-primitives/step.ts +0 -22
  261. package/src/constants.ts +0 -313
  262. package/src/core.ts +0 -397
  263. package/src/example.ts +0 -210
  264. package/src/exports-module.ts +0 -311
  265. package/src/handlers/AnalyticsLogHandler.ts +0 -22
  266. package/src/handlers/ExportLogHandler.ts +0 -610
  267. package/src/handlers/FileLogHandler.ts +0 -169
  268. package/src/handlers/RemoteLogHandler.ts +0 -42
  269. package/src/hooks/HookManager.ts +0 -177
  270. package/src/index.ts +0 -395
  271. package/src/main.ts +0 -196
  272. package/src/serializers/SerializerRegistry.ts +0 -173
  273. package/src/style.css +0 -96
  274. package/src/styling/LogStyleBuilder.ts +0 -355
  275. package/src/styling/SemanticStyles.ts +0 -380
  276. package/src/styling/SmartPresets.ts +0 -288
  277. package/src/styling/StyleBuilder.ts +0 -319
  278. package/src/styling/StyleCache.ts +0 -131
  279. package/src/styling/banners.ts +0 -168
  280. package/src/styling/index.ts +0 -27
  281. package/src/styling/themes.ts +0 -235
  282. package/src/styling-module.ts +0 -244
  283. package/src/terminal/color-converter.ts +0 -315
  284. package/src/terminal/formatter.ts +0 -242
  285. package/src/terminal/terminal-renderer.ts +0 -342
  286. package/src/transports/ConsoleTransport.ts +0 -28
  287. package/src/transports/FileTransport.ts +0 -53
  288. package/src/transports/HttpTransport.ts +0 -56
  289. package/src/transports/TransportManager.ts +0 -130
  290. package/src/types/index.ts +0 -83
  291. package/src/typescript.svg +0 -1
  292. package/src/utils/adapter.ts +0 -291
  293. package/src/utils/ansi-colors.ts +0 -333
  294. package/src/utils/environment-detector.ts +0 -170
  295. package/src/utils/environment.ts +0 -94
  296. package/src/utils/formatting.ts +0 -332
  297. package/src/utils/index.ts +0 -33
  298. package/src/utils/opentui-detection.ts +0 -138
  299. package/src/utils/output.ts +0 -227
  300. package/src/utils/stackTrace.ts +0 -144
  301. package/src/utils/timestamps.ts +0 -80
  302. package/src/vite-env.d.ts +0 -1
  303. package/test-core-browser.html +0 -237
  304. package/test-core-node.js +0 -63
  305. package/tests/test-conflict-resolution.ts +0 -391
  306. package/tests/validate-workflows.sh +0 -131
  307. package/tests/yaml-autofix.sh +0 -146
  308. package/tsconfig.json +0 -50
  309. package/vite.config.ts +0 -256
  310. /package/{public → dist}/vite.svg +0 -0
package/docs/STYLING.md DELETED
@@ -1,405 +0,0 @@
1
- # 🎨 Styling Module
2
-
3
- **Advanced visual features with themes, SVG support, and CSS animations**
4
-
5
- ```typescript
6
- import { setTheme, logAnimated, logWithSVG } from '@mks2508/better-logger/styling'
7
- ```
8
-
9
- **Bundle Size:** 26KB • **Gzipped:** 5KB
10
-
11
- ---
12
-
13
- ## ✨ Features
14
-
15
- - 🌈 **5 Built-in Themes** (default, dark, neon, cyberpunk, retro)
16
- - 🎭 **5 Banner Types** (simple, ascii, unicode, svg, animated)
17
- - 🖼️ **SVG Background Support** with custom graphics
18
- - ✨ **CSS Animations** with keyframe injection
19
- - 🎨 **Style Builder API** for custom console styles
20
- - 🎯 **Theme-aware Components** with automatic styling
21
- - 🔄 **Live Theme Switching** with visual feedback
22
-
23
- ## 🚀 Quick Start
24
-
25
- ```typescript
26
- import {
27
- setTheme, showBanner,
28
- logAnimated, logWithSVG,
29
- createStyle, stylePresets
30
- } from '@mks2508/better-logger/styling'
31
-
32
- // Apply theme with visual banner
33
- setTheme('cyberpunk')
34
- showBanner('animated')
35
-
36
- // Animated logging
37
- logAnimated('🚀 Application starting...', 3)
38
-
39
- // SVG backgrounds
40
- const logoSVG = `<svg>...</svg>`
41
- logWithSVG('Company Logo', logoSVG, {
42
- width: 400,
43
- height: 80
44
- })
45
-
46
- // Custom styles
47
- const customStyle = createStyle()
48
- .bg('linear-gradient(45deg, #ff6b6b, #feca57)')
49
- .color('white')
50
- .padding('15px')
51
- .rounded('10px')
52
- .build()
53
-
54
- console.log('%cCustom Message', customStyle)
55
- ```
56
-
57
- ## 🌈 Theme System
58
-
59
- ### Available Themes
60
-
61
- | Theme | Primary Colors | Best For |
62
- |-------|---------------|----------|
63
- | `default` | Blue gradients | Professional apps |
64
- | `dark` | Dark theme | Night mode |
65
- | `neon` | Bright neon colors | Gaming/Creative |
66
- | `cyberpunk` | Purple/Pink | Futuristic UIs |
67
- | `retro` | Warm vintage | Nostalgic designs |
68
-
69
- ### Theme Usage
70
-
71
- ```typescript
72
- import { setTheme, getAvailableThemes } from '@mks2508/better-logger/styling'
73
-
74
- // Apply theme
75
- setTheme('neon') // Shows themed banner automatically
76
-
77
- // List available themes
78
- console.log(getAvailableThemes())
79
- // ['default', 'dark', 'neon', 'cyberpunk', 'retro']
80
-
81
- // Theme switching
82
- const themes = ['default', 'dark', 'neon']
83
- themes.forEach((theme, index) => {
84
- setTimeout(() => setTheme(theme), index * 2000)
85
- })
86
- ```
87
-
88
- ## 🎭 Banner System
89
-
90
- ### Banner Types
91
-
92
- ```typescript
93
- import { showBanner, setBannerType } from '@mks2508/better-logger/styling'
94
-
95
- // Show specific banner
96
- showBanner('simple') // Text-only
97
- showBanner('ascii') // ASCII art
98
- showBanner('unicode') // Unicode box drawing
99
- showBanner('svg') // SVG graphics
100
- showBanner('animated') // CSS animations
101
-
102
- // Set default banner type
103
- setBannerType('svg')
104
- ```
105
-
106
- ### Banner Examples
107
-
108
- **ASCII Banner:**
109
- ```
110
- ╔══════════════════════════════════╗
111
- ║ BETTER LOGGER ║
112
- ║ Advanced Console Logging ║
113
- ╚══════════════════════════════════╝
114
- ```
115
-
116
- **SVG Banner:**
117
- - Custom graphics with gradients
118
- - Logo integration
119
- - Responsive sizing
120
-
121
- **Animated Banner:**
122
- - Gradient animations
123
- - Fade transitions
124
- - Loading effects
125
-
126
- ## 🖼️ SVG Support
127
-
128
- ### Basic SVG Logging
129
-
130
- ```typescript
131
- import { logWithSVG } from '@mks2508/better-logger/styling'
132
-
133
- // Default branded SVG
134
- logWithSVG('Welcome to Better Logger!')
135
-
136
- // Custom SVG content
137
- const customSVG = `
138
- <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 80'>
139
- <defs>
140
- <linearGradient id='brand' x1='0%' y1='0%' x2='100%' y2='0%'>
141
- <stop offset='0%' style='stop-color:#667eea'/>
142
- <stop offset='100%' style='stop-color:#764ba2'/>
143
- </linearGradient>
144
- </defs>
145
- <rect width='100%' height='100%' fill='url(#brand)' rx='8'/>
146
- <text x='200' y='45' text-anchor='middle' fill='white'
147
- font-family='Arial' font-size='18' font-weight='bold'>
148
- My Application
149
- </text>
150
- </svg>`
151
-
152
- logWithSVG('Custom Branding', customSVG, {
153
- width: 400,
154
- height: 80,
155
- padding: '40px 200px'
156
- })
157
- ```
158
-
159
- ### Advanced SVG Options
160
-
161
- ```typescript
162
- interface StyleOptions {
163
- width?: number // SVG width in pixels
164
- height?: number // SVG height in pixels
165
- padding?: string // CSS padding around SVG
166
- }
167
-
168
- // Logo with specific dimensions
169
- logWithSVG('Product Launch', logoSVG, {
170
- width: 600,
171
- height: 120,
172
- padding: '60px 300px'
173
- })
174
-
175
- // Compact notification
176
- logWithSVG('Alert', alertSVG, {
177
- width: 200,
178
- height: 40,
179
- padding: '20px 100px'
180
- })
181
- ```
182
-
183
- ## ✨ CSS Animations
184
-
185
- ### Animated Logging
186
-
187
- ```typescript
188
- import { logAnimated } from '@mks2508/better-logger/styling'
189
-
190
- // Basic animation (3 seconds)
191
- logAnimated('Loading...')
192
-
193
- // Custom duration
194
- logAnimated('🌟 Feature launched!', 5) // 5 seconds
195
-
196
- // Multiple animations
197
- logAnimated('Phase 1 complete', 2)
198
- setTimeout(() => {
199
- logAnimated('Phase 2 starting', 2)
200
- }, 2500)
201
- ```
202
-
203
- ### Animation Effects
204
-
205
- **Gradient Animation:**
206
- - Moving background gradients
207
- - Smooth color transitions
208
- - Infinite loop animation
209
-
210
- **Technical Implementation:**
211
- ```css
212
- @keyframes loggerGradient {
213
- 0% { background-position: 0% 50%; }
214
- 50% { background-position: 100% 50%; }
215
- 100% { background-position: 0% 50%; }
216
- }
217
- ```
218
-
219
- ## 🎨 Style Builder API
220
-
221
- ### Building Custom Styles
222
-
223
- ```typescript
224
- import { createStyle, StyleBuilder } from '@mks2508/better-logger/styling'
225
-
226
- // Fluent interface
227
- const alertStyle = createStyle()
228
- .bg('linear-gradient(135deg, #ff6b6b 0%, #ee5a52 100%)')
229
- .color('#ffffff')
230
- .padding('12px 20px')
231
- .rounded('8px')
232
- .border('2px solid #ff5252')
233
- .shadow('0 4px 15px rgba(255, 107, 107, 0.4)')
234
- .bold()
235
- .font('Monaco, Consolas, monospace')
236
- .animation('pulse 1s ease-in-out infinite')
237
- .build()
238
-
239
- console.log('%c🚨 Critical Alert', alertStyle)
240
-
241
- // Chaining methods
242
- const successStyle = new StyleBuilder()
243
- .bg('#4caf50')
244
- .color('white')
245
- .padding('8px 16px')
246
- .rounded('4px')
247
- .build()
248
- ```
249
-
250
- ### Available Style Methods
251
-
252
- ```typescript
253
- interface StyleBuilder {
254
- // Background
255
- bg(gradient: string): StyleBuilder
256
- backgroundColor(color: string): StyleBuilder
257
-
258
- // Typography
259
- color(color: string): StyleBuilder
260
- font(family: string): StyleBuilder
261
- fontSize(size: string): StyleBuilder
262
- bold(): StyleBuilder
263
- italic(): StyleBuilder
264
-
265
- // Layout
266
- padding(padding: string): StyleBuilder
267
- margin(margin: string): StyleBuilder
268
- display(display: string): StyleBuilder
269
-
270
- // Visual effects
271
- border(border: string): StyleBuilder
272
- rounded(radius: string): StyleBuilder
273
- shadow(shadow: string): StyleBuilder
274
-
275
- // Animations
276
- animation(animation: string): StyleBuilder
277
- transition(transition: string): StyleBuilder
278
-
279
- // Custom CSS
280
- css(property: string, value: string): StyleBuilder
281
-
282
- // Build final style
283
- build(): string
284
- }
285
- ```
286
-
287
- ## 🎯 Pre-built Style Presets
288
-
289
- ### Using Style Presets
290
-
291
- ```typescript
292
- import { stylePresets } from '@mks2508/better-logger/styling'
293
-
294
- // Available presets
295
- console.log('%c✅ Success!', stylePresets.success)
296
- console.log('%c❌ Error!', stylePresets.error)
297
- console.log('%c⚠️ Warning!', stylePresets.warning)
298
- console.log('%cℹ️ Info', stylePresets.info)
299
- console.log('%c🎯 Accent', stylePresets.accent)
300
- ```
301
-
302
- ### Preset Definitions
303
-
304
- ```typescript
305
- const stylePresets = {
306
- success: 'background: linear-gradient(135deg, #4caf50, #45a049); color: white; ...',
307
- error: 'background: linear-gradient(135deg, #f44336, #d32f2f); color: white; ...',
308
- warning: 'background: linear-gradient(135deg, #ff9800, #f57c00); color: white; ...',
309
- info: 'background: linear-gradient(135deg, #2196f3, #1976d2); color: white; ...',
310
- accent: 'background: linear-gradient(135deg, #9c27b0, #7b1fa2); color: white; ...'
311
- }
312
- ```
313
-
314
- ## 🔧 Advanced Usage
315
-
316
- ### Theme-aware Logging
317
-
318
- ```typescript
319
- import { setTheme } from '@mks2508/better-logger/styling'
320
- import { info, success, error } from '@mks2508/better-logger'
321
-
322
- // Apply theme
323
- setTheme('cyberpunk')
324
-
325
- // All subsequent logs use theme colors
326
- info('System initialized') // Uses cyberpunk info colors
327
- success('Connection established') // Uses cyberpunk success colors
328
- error('Authentication failed') // Uses cyberpunk error colors
329
- ```
330
-
331
- ### Dynamic Style Generation
332
-
333
- ```typescript
334
- import { createStyle } from '@mks2508/better-logger/styling'
335
-
336
- // Generate styles based on log level
337
- function getLogStyle(level: string) {
338
- const colors = {
339
- error: ['#f44336', '#d32f2f'],
340
- warn: ['#ff9800', '#f57c00'],
341
- info: ['#2196f3', '#1976d2'],
342
- success: ['#4caf50', '#45a049']
343
- }
344
-
345
- const [primary, secondary] = colors[level] || colors.info
346
-
347
- return createStyle()
348
- .bg(`linear-gradient(135deg, ${primary}, ${secondary})`)
349
- .color('white')
350
- .padding('8px 16px')
351
- .rounded('6px')
352
- .bold()
353
- .build()
354
- }
355
-
356
- console.log('%cDynamic Error', getLogStyle('error'))
357
- console.log('%cDynamic Success', getLogStyle('success'))
358
- ```
359
-
360
- ### Performance Optimization
361
-
362
- ```typescript
363
- // Pre-build styles for better performance
364
- const CACHED_STYLES = {
365
- header: createStyle().bg('#1976d2').color('white').padding('15px').build(),
366
- footer: createStyle().bg('#424242').color('#ccc').padding('10px').build(),
367
- highlight: createStyle().bg('#ffeb3b').color('#333').padding('5px').build()
368
- }
369
-
370
- // Use cached styles
371
- console.log('%cApplication Header', CACHED_STYLES.header)
372
- console.log('%cHighlighted text', CACHED_STYLES.highlight)
373
- console.log('%cFooter info', CACHED_STYLES.footer)
374
- ```
375
-
376
- ## 📱 Browser Compatibility
377
-
378
- ### Feature Detection
379
-
380
- ```typescript
381
- // Automatic fallbacks for unsupported features
382
- if (typeof document !== 'undefined') {
383
- // Browser environment - full styling support
384
- logWithSVG('Rich graphics available')
385
- logAnimated('Animations supported')
386
- } else {
387
- // Node.js environment - graceful degradation
388
- console.log('Text-only fallback')
389
- }
390
- ```
391
-
392
- ### Support Matrix
393
-
394
- | Feature | Chrome | Firefox | Safari | Node.js |
395
- |---------|--------|---------|--------|---------|
396
- | CSS Styling | ✅ | ✅ | ✅ | ❌ |
397
- | SVG Backgrounds | ✅ | ✅ | ✅ | ❌ |
398
- | Animations | ✅ | ✅ | ✅ | ❌ |
399
- | Unicode Banners | ✅ | ✅ | ✅ | ✅ |
400
-
401
- ---
402
-
403
- **Perfect for:** Frontend applications • Interactive demos • Creative projects • Brand-aware logging
404
-
405
- [← Back to main documentation](../README.md)
package/docs/_config.yml DELETED
@@ -1,36 +0,0 @@
1
- title: "Better Logger Documentation"
2
- description: "State-of-the-art console logger with advanced CSS styling, SVG support, animations, and CLI interface"
3
- theme: minima
4
- url: "https://mks2508.github.io"
5
- baseurl: "/advanced-logger/docs"
6
-
7
- markdown: kramdown
8
- highlighter: rouge
9
- kramdown:
10
- syntax_highlighter: rouge
11
-
12
- plugins:
13
- - jekyll-feed
14
- - jekyll-sitemap
15
- - jekyll-seo-tag
16
-
17
- exclude:
18
- - Gemfile
19
- - Gemfile.lock
20
- - node_modules
21
- - vendor/bundle/
22
- - vendor/cache/
23
- - vendor/gems/
24
- - vendor/ruby/
25
-
26
- header_pages:
27
- - API.md
28
- - DEVELOPMENT.md
29
-
30
- navigation:
31
- - title: API Reference
32
- url: /advanced-logger/docs/API
33
- - title: Development Guide
34
- url: /advanced-logger/docs/DEVELOPMENT
35
- - title: Live Demo
36
- url: /advanced-logger/
package/docs/index.md DELETED
@@ -1,179 +0,0 @@
1
- ---
2
- layout: default
3
- title: Better Logger Documentation
4
- ---
5
-
6
- # 🚀 Better Logger
7
-
8
- **State-of-the-art console logger with advanced CSS styling, SVG support, animations, and CLI interface**
9
-
10
- [![NPM Version](https://img.shields.io/npm/v/@mks2508/better-logger)](https://www.npmjs.com/package/@mks2508/better-logger)
11
- [![Bundle Size](https://img.shields.io/bundlephobia/minzip/@mks2508/better-logger)](https://bundlephobia.com/package/@mks2508/better-logger)
12
- [![TypeScript](https://img.shields.io/badge/TypeScript-Ready-blue)](https://www.typescriptlang.org/)
13
- [![License](https://img.shields.io/npm/l/@mks2508/better-logger)](https://github.com/MKS2508/advanced-logger/blob/main/LICENSE)
14
-
15
- Transform your console logging experience with beautiful styling, professional themes, and advanced features that make debugging and monitoring a visual delight.
16
-
17
- ## ✨ Features
18
-
19
- - 🎨 **Advanced CSS Styling** - Beautiful gradients, shadows, and animations
20
- - 🌈 **5 Professional Themes** - Default, Dark, Neon, Cyberpunk, Retro
21
- - 🖼️ **SVG Background Support** - Custom graphics in console output
22
- - ⚡ **Performance Monitoring** - Built-in timing and benchmarking
23
- - 📊 **Data Export** - CSV, JSON, XML export with filtering
24
- - 📡 **Remote Logging** - Send logs to external services
25
- - 💻 **Interactive CLI** - Built-in command interface
26
- - 🔧 **Modular Architecture** - Import only what you need
27
- - 📱 **Universal Compatibility** - Browser & Node.js with graceful fallbacks
28
- - 🎯 **TypeScript First** - Complete type safety and IntelliSense
29
-
30
- ## 📦 Installation
31
-
32
- ```bash
33
- npm install @mks2508/better-logger
34
- ```
35
-
36
- ## 🚀 Quick Start
37
-
38
- ```typescript
39
- import { Logger } from '@mks2508/better-logger';
40
-
41
- const logger = new Logger({ prefix: 'APP' });
42
-
43
- // Beautiful styled logging
44
- logger.info('Application started', { version: '1.0.0' });
45
- logger.success('Database connected successfully');
46
- logger.warn('Memory usage high', { usage: '85%' });
47
- logger.error('API request failed', { status: 500 });
48
-
49
- // Performance timing
50
- logger.time('operation');
51
- await performOperation();
52
- logger.timeEnd('operation'); // Shows duration with beautiful styling
53
- ```
54
-
55
- ## 🔧 Modular Usage
56
-
57
- Import only what you need for optimal bundle sizes:
58
-
59
- ```typescript
60
- // Core logging only (6KB) - Essential features
61
- import { Logger } from '@mks2508/better-logger/core';
62
-
63
- // Styling features (26KB) - Themes, SVG, animations
64
- import { setTheme, logAnimated } from '@mks2508/better-logger/styling';
65
-
66
- // Export capabilities (12KB) - Data export, remote logging
67
- import { ExportLogger } from '@mks2508/better-logger/exports';
68
- ```
69
-
70
- ## 📊 Bundle Analysis
71
-
72
- | Module | Size | Gzipped | Best For |
73
- |--------|------|---------|----------|
74
- | **Core** | 6KB | 2KB | Essential logging, Node.js apps |
75
- | **Styling** | 26KB | 5KB | Frontend apps, visual debugging |
76
- | **Exports** | 12KB | 3KB | Production logging, analytics |
77
- | **Full** | 64KB | 13KB | Complete feature set |
78
-
79
- ## 📚 Documentation
80
-
81
- ### 🎮 Interactive Demo
82
- - **[🌟 Live Demo](https://mks2508.github.io/advanced-logger/)** - Try all features in your browser
83
-
84
- ### 📖 Complete Documentation
85
- - **[📋 API Reference](API)** - Complete method documentation
86
- - **[🛠️ Development Guide](DEVELOPMENT)** - Use cases and development workflow
87
-
88
- ### 🏃 Examples
89
- ```bash
90
- # Clone and try examples
91
- git clone https://github.com/MKS2508/advanced-logger.git
92
- cd advanced-logger/examples && npm install
93
-
94
- npm run basic # Learn fundamentals
95
- npm run performance # Master timing operations
96
- npm run styling # Explore visual features
97
- npm run export # Data management
98
- ```
99
-
100
- ## 🎨 Visual Showcase
101
-
102
- ### Professional Themes
103
- ```typescript
104
- import { setTheme } from '@mks2508/better-logger/styling';
105
-
106
- setTheme('cyberpunk'); // Purple/pink futuristic
107
- setTheme('neon'); // Bright electric colors
108
- setTheme('dark'); // Dark mode optimized
109
- ```
110
-
111
- ### Custom Styling
112
- ```typescript
113
- import { createStyle } from '@mks2508/better-logger/styling';
114
-
115
- const customStyle = createStyle()
116
- .bg('linear-gradient(45deg, #667eea, #764ba2)')
117
- .color('white')
118
- .padding('12px 24px')
119
- .rounded('8px')
120
- .shadow('0 4px 15px rgba(102, 126, 234, 0.4)')
121
- .build();
122
-
123
- console.log('%c🚀 Beautiful Custom Style!', customStyle);
124
- ```
125
-
126
- ## ⚡ Advanced Features
127
-
128
- ### CLI Interface
129
- ```typescript
130
- import { initializeCLI } from '@mks2508/better-logger/cli';
131
- initializeCLI(logger);
132
-
133
- // Available in browser console:
134
- // /help /theme /export /clear /status
135
- ```
136
-
137
- ### Performance Monitoring
138
- ```typescript
139
- logger.time('api-request');
140
- const result = await fetch('/api/data');
141
- logger.timeEnd('api-request'); // Automatic duration display
142
- ```
143
-
144
- ### Data Export
145
- ```typescript
146
- import { ExportLogger } from '@mks2508/better-logger/exports';
147
-
148
- const logger = new ExportLogger();
149
- const csvData = await logger.exportLogs('csv', {
150
- filter: { level: 'error' },
151
- limit: 100
152
- });
153
- ```
154
-
155
- ## 🌐 Compatibility
156
-
157
- - ✅ **All Modern Browsers** - Full feature support
158
- - ✅ **Node.js** - Core features with graceful fallbacks
159
- - ✅ **TypeScript** - Complete type definitions
160
- - ✅ **ESM & CommonJS** - Both module systems supported
161
-
162
- ## 🔗 Resources
163
-
164
- - 📦 **[NPM Package](https://www.npmjs.com/package/@mks2508/better-logger)**
165
- - 📚 **[GitHub Repository](https://github.com/MKS2508/advanced-logger)**
166
- - 🧩 **[Examples](https://github.com/MKS2508/advanced-logger/tree/main/examples)**
167
- - 🐛 **[Issues & Support](https://github.com/MKS2508/advanced-logger/issues)**
168
-
169
- ## 🤝 Contributing
170
-
171
- Contributions welcome! See our [Contributing Guide](https://github.com/MKS2508/advanced-logger/blob/main/CONTRIBUTING.md) for details.
172
-
173
- ## 📄 License
174
-
175
- MIT License - see [LICENSE](https://github.com/MKS2508/advanced-logger/blob/main/LICENSE) for details.
176
-
177
- ---
178
-
179
- **Made with ❤️ by [MKS2508](https://github.com/MKS2508)**