@mks2508/better-logger 0.14.0-alpha.2 → 0.18.2-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 (454) hide show
  1. package/README.md +289 -185
  2. package/dist/Logger.d.ts +576 -205
  3. package/dist/Logger.d.ts.map +1 -1
  4. package/dist/ScopedLogger.d.ts +48 -292
  5. package/dist/ScopedLogger.d.ts.map +1 -1
  6. package/dist/chunks/HookBridge-CiRfR67f.cjs +190 -0
  7. package/dist/chunks/HookBridge-CiRfR67f.cjs.map +1 -0
  8. package/dist/chunks/HookBridge-SgMmbXZB.js +173 -0
  9. package/dist/chunks/HookBridge-SgMmbXZB.js.map +1 -0
  10. package/dist/chunks/LogContext-Cwn-1Zzb.js +85 -0
  11. package/dist/chunks/LogContext-Cwn-1Zzb.js.map +1 -0
  12. package/dist/chunks/LogContext-L7HzynFw.cjs +90 -0
  13. package/dist/chunks/LogContext-L7HzynFw.cjs.map +1 -0
  14. package/dist/chunks/SerializerBridge-BaOQOb8q.cjs +166 -0
  15. package/dist/chunks/SerializerBridge-BaOQOb8q.cjs.map +1 -0
  16. package/dist/chunks/SerializerBridge-BkpQu5c9.js +149 -0
  17. package/dist/chunks/SerializerBridge-BkpQu5c9.js.map +1 -0
  18. package/dist/chunks/StyleManager-CIpd6wbO.cjs +92 -0
  19. package/dist/chunks/StyleManager-CIpd6wbO.cjs.map +1 -0
  20. package/dist/chunks/StyleManager-LCvVlVdx.js +87 -0
  21. package/dist/chunks/StyleManager-LCvVlVdx.js.map +1 -0
  22. package/dist/chunks/core-Dzz7agGa.cjs +39 -0
  23. package/dist/chunks/core-Dzz7agGa.cjs.map +1 -0
  24. package/dist/chunks/core-PoT7RrTK.js +34 -0
  25. package/dist/chunks/core-PoT7RrTK.js.map +1 -0
  26. package/dist/chunks/environment-detector-CI3TrWK_.js +110 -0
  27. package/dist/chunks/environment-detector-CI3TrWK_.js.map +1 -0
  28. package/dist/chunks/environment-detector-Cnn6wr6O.cjs +163 -0
  29. package/dist/chunks/environment-detector-Cnn6wr6O.cjs.map +1 -0
  30. package/dist/chunks/server-fallback-BUKjdLS7.cjs +42 -0
  31. package/dist/chunks/server-fallback-BUKjdLS7.cjs.map +1 -0
  32. package/dist/chunks/server-fallback-BsuWH1Dk.js +37 -0
  33. package/dist/chunks/server-fallback-BsuWH1Dk.js.map +1 -0
  34. package/dist/chunks/spinner-D3FsF78o.js +700 -0
  35. package/dist/chunks/spinner-D3FsF78o.js.map +1 -0
  36. package/dist/chunks/spinner-DNvxbM9a.cjs +747 -0
  37. package/dist/chunks/spinner-DNvxbM9a.cjs.map +1 -0
  38. package/dist/chunks/styling-84N8T97t.js +941 -0
  39. package/dist/chunks/styling-84N8T97t.js.map +1 -0
  40. package/dist/chunks/styling-Cg5saQ46.cjs +994 -0
  41. package/dist/chunks/styling-Cg5saQ46.cjs.map +1 -0
  42. package/dist/chunks/transports-BiDk345e.js +715 -0
  43. package/dist/chunks/transports-BiDk345e.js.map +1 -0
  44. package/dist/chunks/transports-COPWmlF1.cjs +756 -0
  45. package/dist/chunks/transports-COPWmlF1.cjs.map +1 -0
  46. package/dist/chunks/utils-BqlFYocD.cjs +698 -0
  47. package/dist/chunks/utils-BqlFYocD.cjs.map +1 -0
  48. package/dist/chunks/utils-VETbVpkR.js +579 -0
  49. package/dist/chunks/utils-VETbVpkR.js.map +1 -0
  50. package/dist/cli/commands/ExportCommand.d.ts +8 -26
  51. package/dist/cli/commands/ExportCommand.d.ts.map +1 -1
  52. package/dist/cli/index.d.ts +1 -2
  53. package/dist/cli/index.d.ts.map +1 -1
  54. package/dist/cli-module.d.ts +13 -0
  55. package/dist/cli-module.d.ts.map +1 -0
  56. package/dist/cli.cjs +11 -0
  57. package/dist/cli.js +3 -0
  58. package/dist/constants.d.ts +16 -47
  59. package/dist/constants.d.ts.map +1 -1
  60. package/dist/context/LogContext.d.ts +146 -0
  61. package/dist/context/LogContext.d.ts.map +1 -0
  62. package/dist/context/index.d.ts +6 -0
  63. package/dist/context/index.d.ts.map +1 -0
  64. package/dist/context-module.d.ts +6 -0
  65. package/dist/context-module.d.ts.map +1 -0
  66. package/dist/context.cjs +3 -0
  67. package/dist/context.js +2 -0
  68. package/dist/core.cjs +281 -2
  69. package/dist/core.cjs.map +1 -1
  70. package/dist/core.d.ts +6 -7
  71. package/dist/core.d.ts.map +1 -1
  72. package/dist/core.js +258 -314
  73. package/dist/core.js.map +1 -1
  74. package/dist/example.d.ts.map +1 -1
  75. package/dist/hooks/HookBridge.d.ts +26 -0
  76. package/dist/hooks/HookBridge.d.ts.map +1 -0
  77. package/dist/hooks/HookManager.d.ts +26 -0
  78. package/dist/hooks/HookManager.d.ts.map +1 -0
  79. package/dist/hooks/index.d.ts +7 -0
  80. package/dist/hooks/index.d.ts.map +1 -0
  81. package/dist/hooks-module.d.ts +7 -0
  82. package/dist/hooks-module.d.ts.map +1 -0
  83. package/dist/hooks.cjs +5 -0
  84. package/dist/hooks.js +2 -0
  85. package/dist/index.cjs +2522 -2
  86. package/dist/index.cjs.map +1 -1
  87. package/dist/index.d.ts +42 -130
  88. package/dist/index.d.ts.map +1 -1
  89. package/dist/index.js +2447 -158
  90. package/dist/index.js.map +1 -1
  91. package/dist/node-module.d.ts +10 -0
  92. package/dist/node-module.d.ts.map +1 -0
  93. package/dist/node.cjs +13 -0
  94. package/dist/node.cjs.map +1 -0
  95. package/dist/node.js +12 -0
  96. package/dist/node.js.map +1 -0
  97. package/dist/playground/TerminalBridge.d.ts +46 -0
  98. package/dist/playground/TerminalBridge.d.ts.map +1 -0
  99. package/dist/playground/box.d.ts +14 -0
  100. package/dist/playground/box.d.ts.map +1 -0
  101. package/dist/playground/cli-table.d.ts +14 -0
  102. package/dist/playground/cli-table.d.ts.map +1 -0
  103. package/dist/playground/divider.d.ts +10 -0
  104. package/dist/playground/divider.d.ts.map +1 -0
  105. package/dist/playground/header.d.ts +11 -0
  106. package/dist/playground/header.d.ts.map +1 -0
  107. package/dist/playground/index.d.ts +11 -0
  108. package/dist/playground/index.d.ts.map +1 -0
  109. package/dist/playground/server-fallback.d.ts +27 -0
  110. package/dist/playground/server-fallback.d.ts.map +1 -0
  111. package/dist/playground/spinner.d.ts +48 -0
  112. package/dist/playground/spinner.d.ts.map +1 -0
  113. package/dist/playground/step.d.ts +14 -0
  114. package/dist/playground/step.d.ts.map +1 -0
  115. package/dist/playground-module.d.ts +11 -0
  116. package/dist/playground-module.d.ts.map +1 -0
  117. package/dist/playground.cjs +9 -0
  118. package/dist/playground.js +2 -0
  119. package/dist/serializers/SerializerBridge.d.ts +21 -0
  120. package/dist/serializers/SerializerBridge.d.ts.map +1 -0
  121. package/dist/serializers/SerializerRegistry.d.ts +16 -0
  122. package/dist/serializers/SerializerRegistry.d.ts.map +1 -0
  123. package/dist/serializers/index.d.ts +7 -0
  124. package/dist/serializers/index.d.ts.map +1 -0
  125. package/dist/serializers-module.d.ts +7 -0
  126. package/dist/serializers-module.d.ts.map +1 -0
  127. package/dist/serializers.cjs +5 -0
  128. package/dist/serializers.js +2 -0
  129. package/dist/styles/StyleManager.d.ts +83 -0
  130. package/dist/styles/StyleManager.d.ts.map +1 -0
  131. package/dist/styles/index.d.ts +7 -0
  132. package/dist/styles/index.d.ts.map +1 -0
  133. package/dist/styles-module.d.ts +7 -0
  134. package/dist/styles-module.d.ts.map +1 -0
  135. package/dist/styles.cjs +7 -0
  136. package/dist/styles.js +3 -0
  137. package/dist/styling/banners.d.ts +6 -2
  138. package/dist/styling/banners.d.ts.map +1 -1
  139. package/dist/styling/index.d.ts +8 -3
  140. package/dist/styling/index.d.ts.map +1 -1
  141. package/dist/terminal/color-converter.d.ts +73 -0
  142. package/dist/terminal/color-converter.d.ts.map +1 -0
  143. package/dist/terminal/formatter.d.ts +23 -0
  144. package/dist/terminal/formatter.d.ts.map +1 -0
  145. package/dist/transports/ConsoleTransport.d.ts +9 -0
  146. package/dist/transports/ConsoleTransport.d.ts.map +1 -0
  147. package/dist/transports/FileTransport.d.ts +56 -0
  148. package/dist/transports/FileTransport.d.ts.map +1 -0
  149. package/dist/transports/HttpTransport.d.ts +67 -0
  150. package/dist/transports/HttpTransport.d.ts.map +1 -0
  151. package/dist/transports/OtlpTransport.d.ts +148 -0
  152. package/dist/transports/OtlpTransport.d.ts.map +1 -0
  153. package/dist/transports/TransportBridge.d.ts +37 -0
  154. package/dist/transports/TransportBridge.d.ts.map +1 -0
  155. package/dist/transports/TransportManager.d.ts +36 -0
  156. package/dist/transports/TransportManager.d.ts.map +1 -0
  157. package/dist/transports/index.d.ts +6 -0
  158. package/dist/transports/index.d.ts.map +1 -0
  159. package/dist/transports-module.d.ts +10 -0
  160. package/dist/transports-module.d.ts.map +1 -0
  161. package/dist/transports.cjs +7 -0
  162. package/dist/transports.js +2 -0
  163. package/dist/types/core.d.ts +188 -6
  164. package/dist/types/core.d.ts.map +1 -1
  165. package/dist/types/handlers.d.ts +0 -67
  166. package/dist/types/handlers.d.ts.map +1 -1
  167. package/dist/types/hooks.d.ts +60 -0
  168. package/dist/types/hooks.d.ts.map +1 -0
  169. package/dist/types/index.d.ts +7 -3
  170. package/dist/types/index.d.ts.map +1 -1
  171. package/dist/types/serializers.d.ts +25 -0
  172. package/dist/types/serializers.d.ts.map +1 -0
  173. package/dist/types/transports.d.ts +127 -0
  174. package/dist/types/transports.d.ts.map +1 -0
  175. package/dist/utils/ansi-colors.d.ts +115 -0
  176. package/dist/utils/ansi-colors.d.ts.map +1 -0
  177. package/dist/utils/environment-detector.d.ts +53 -0
  178. package/dist/utils/environment-detector.d.ts.map +1 -0
  179. package/dist/utils/formatting.d.ts +1 -0
  180. package/dist/utils/formatting.d.ts.map +1 -1
  181. package/dist/utils/index.d.ts +3 -2
  182. package/dist/utils/index.d.ts.map +1 -1
  183. package/dist/utils/output.d.ts +8 -11
  184. package/dist/utils/output.d.ts.map +1 -1
  185. package/dist/utils/stackTrace.d.ts.map +1 -1
  186. package/dist/utils/timestamps.d.ts +0 -12
  187. package/dist/utils/timestamps.d.ts.map +1 -1
  188. package/package.json +96 -21
  189. package/.claude/settings.local.json +0 -39
  190. package/.github/workflows/ci-quality.yml +0 -357
  191. package/.github/workflows/docs-demo.yml +0 -119
  192. package/.github/workflows/releases-core.yml +0 -512
  193. package/.github/workflows/releases-full.yml +0 -582
  194. package/.github/workflows-backup/ci.yml +0 -221
  195. package/.github/workflows-backup/nightly.yml +0 -196
  196. package/.github/workflows-backup/release-optimized.yml +0 -373
  197. package/.github/workflows-backup/release.yml +0 -269
  198. package/.release-notes-0.2.0.md +0 -129
  199. package/.yamllint +0 -28
  200. package/CHANGELOG.json +0 -865
  201. package/CLAUDE.md +0 -204
  202. package/bun.lock +0 -323
  203. package/demo.html +0 -847
  204. package/dist/.tsbuildinfo +0 -1
  205. package/dist/Logger.js +0 -1124
  206. package/dist/ScopedLogger.js +0 -426
  207. package/dist/chunks/Logger-Crw1woqR.js +0 -3464
  208. package/dist/chunks/Logger-Crw1woqR.js.map +0 -1
  209. package/dist/chunks/Logger-D_p3xnbq.js +0 -2
  210. package/dist/chunks/Logger-D_p3xnbq.js.map +0 -1
  211. package/dist/chunks/RemoteLogHandler-CjWpWZGl.js +0 -33
  212. package/dist/chunks/RemoteLogHandler-CjWpWZGl.js.map +0 -1
  213. package/dist/chunks/RemoteLogHandler-ymkQ97xl.js +0 -2
  214. package/dist/chunks/RemoteLogHandler-ymkQ97xl.js.map +0 -1
  215. package/dist/chunks/environment-Bxbnw4pd.js +0 -544
  216. package/dist/chunks/environment-Bxbnw4pd.js.map +0 -1
  217. package/dist/chunks/environment-Dm66zOML.js +0 -4
  218. package/dist/chunks/environment-Dm66zOML.js.map +0 -1
  219. package/dist/chunks/formatting-C0riPC5_.js +0 -95
  220. package/dist/chunks/formatting-C0riPC5_.js.map +0 -1
  221. package/dist/chunks/formatting-DNCAV66-.js +0 -2
  222. package/dist/chunks/formatting-DNCAV66-.js.map +0 -1
  223. package/dist/cli/CommandProcessor.js +0 -184
  224. package/dist/cli/commands/ConfigCommand.js +0 -88
  225. package/dist/cli/commands/ExportCommand.js +0 -243
  226. package/dist/cli/commands/HistoryCommand.d.ts +0 -50
  227. package/dist/cli/commands/HistoryCommand.d.ts.map +0 -1
  228. package/dist/cli/commands/HistoryCommand.js +0 -96
  229. package/dist/cli/commands/StatusCommand.d.ts +0 -33
  230. package/dist/cli/commands/StatusCommand.d.ts.map +0 -1
  231. package/dist/cli/commands/StatusCommand.js +0 -93
  232. package/dist/cli/commands/ThemeCommand.js +0 -79
  233. package/dist/cli/help.js +0 -118
  234. package/dist/cli/index.js +0 -46
  235. package/dist/constants.js +0 -159
  236. package/dist/example.js +0 -154
  237. package/dist/exports-module.d.ts +0 -203
  238. package/dist/exports-module.d.ts.map +0 -1
  239. package/dist/exports-module.js +0 -260
  240. package/dist/exports.cjs +0 -2
  241. package/dist/exports.cjs.map +0 -1
  242. package/dist/exports.js +0 -238
  243. package/dist/exports.js.map +0 -1
  244. package/dist/handlers/AnalyticsLogHandler.d.ts +0 -11
  245. package/dist/handlers/AnalyticsLogHandler.d.ts.map +0 -1
  246. package/dist/handlers/AnalyticsLogHandler.js +0 -19
  247. package/dist/handlers/ExportLogHandler.d.ts +0 -103
  248. package/dist/handlers/ExportLogHandler.d.ts.map +0 -1
  249. package/dist/handlers/ExportLogHandler.js +0 -516
  250. package/dist/handlers/FileLogHandler.d.ts +0 -36
  251. package/dist/handlers/FileLogHandler.d.ts.map +0 -1
  252. package/dist/handlers/FileLogHandler.js +0 -156
  253. package/dist/handlers/RemoteLogHandler.d.ts +0 -14
  254. package/dist/handlers/RemoteLogHandler.d.ts.map +0 -1
  255. package/dist/handlers/RemoteLogHandler.js +0 -37
  256. package/dist/handlers/index.d.ts +0 -8
  257. package/dist/handlers/index.d.ts.map +0 -1
  258. package/dist/handlers/index.js +0 -7
  259. package/dist/main.js +0 -139
  260. package/dist/styling/LogStyleBuilder.d.ts +0 -149
  261. package/dist/styling/LogStyleBuilder.d.ts.map +0 -1
  262. package/dist/styling/LogStyleBuilder.js +0 -289
  263. package/dist/styling/SemanticStyles.d.ts +0 -181
  264. package/dist/styling/SemanticStyles.d.ts.map +0 -1
  265. package/dist/styling/SemanticStyles.js +0 -339
  266. package/dist/styling/SmartPresets.js +0 -276
  267. package/dist/styling/StyleBuilder.js +0 -280
  268. package/dist/styling/banners.js +0 -155
  269. package/dist/styling/index.js +0 -9
  270. package/dist/styling/themes.js +0 -231
  271. package/dist/styling-module.d.ts +0 -185
  272. package/dist/styling-module.d.ts.map +0 -1
  273. package/dist/styling-module.js +0 -199
  274. package/dist/styling.cjs +0 -2
  275. package/dist/styling.cjs.map +0 -1
  276. package/dist/styling.js +0 -146
  277. package/dist/styling.js.map +0 -1
  278. package/dist/types/Logger.d.ts +0 -700
  279. package/dist/types/Logger.d.ts.map +0 -1
  280. package/dist/types/ScopedLogger.d.ts +0 -310
  281. package/dist/types/ScopedLogger.d.ts.map +0 -1
  282. package/dist/types/cli/CommandProcessor.d.ts +0 -100
  283. package/dist/types/cli/CommandProcessor.d.ts.map +0 -1
  284. package/dist/types/cli/commands/ConfigCommand.d.ts +0 -14
  285. package/dist/types/cli/commands/ConfigCommand.d.ts.map +0 -1
  286. package/dist/types/cli/commands/ExportCommand.d.ts +0 -48
  287. package/dist/types/cli/commands/ExportCommand.d.ts.map +0 -1
  288. package/dist/types/cli/commands/HistoryCommand.d.ts +0 -47
  289. package/dist/types/cli/commands/HistoryCommand.d.ts.map +0 -1
  290. package/dist/types/cli/commands/StatusCommand.d.ts +0 -30
  291. package/dist/types/cli/commands/StatusCommand.d.ts.map +0 -1
  292. package/dist/types/cli/commands/ThemeCommand.d.ts +0 -30
  293. package/dist/types/cli/commands/ThemeCommand.d.ts.map +0 -1
  294. package/dist/types/cli/help.d.ts +0 -12
  295. package/dist/types/cli/help.d.ts.map +0 -1
  296. package/dist/types/cli/index.d.ts +0 -15
  297. package/dist/types/cli/index.d.ts.map +0 -1
  298. package/dist/types/constants.d.ts +0 -119
  299. package/dist/types/constants.d.ts.map +0 -1
  300. package/dist/types/core.js +0 -28
  301. package/dist/types/example.d.ts +0 -18
  302. package/dist/types/example.d.ts.map +0 -1
  303. package/dist/types/exports-module.d.ts +0 -196
  304. package/dist/types/exports-module.d.ts.map +0 -1
  305. package/dist/types/handlers/AnalyticsLogHandler.d.ts +0 -8
  306. package/dist/types/handlers/AnalyticsLogHandler.d.ts.map +0 -1
  307. package/dist/types/handlers/ExportLogHandler.d.ts +0 -100
  308. package/dist/types/handlers/ExportLogHandler.d.ts.map +0 -1
  309. package/dist/types/handlers/FileLogHandler.d.ts +0 -33
  310. package/dist/types/handlers/FileLogHandler.d.ts.map +0 -1
  311. package/dist/types/handlers/RemoteLogHandler.d.ts +0 -11
  312. package/dist/types/handlers/RemoteLogHandler.d.ts.map +0 -1
  313. package/dist/types/handlers/index.d.ts +0 -8
  314. package/dist/types/handlers/index.d.ts.map +0 -1
  315. package/dist/types/handlers.js +0 -4
  316. package/dist/types/index.js +0 -4
  317. package/dist/types/main.d.ts +0 -2
  318. package/dist/types/main.d.ts.map +0 -1
  319. package/dist/types/styling/LogStyleBuilder.d.ts +0 -146
  320. package/dist/types/styling/LogStyleBuilder.d.ts.map +0 -1
  321. package/dist/types/styling/SemanticStyles.d.ts +0 -178
  322. package/dist/types/styling/SemanticStyles.d.ts.map +0 -1
  323. package/dist/types/styling/SmartPresets.d.ts +0 -22
  324. package/dist/types/styling/SmartPresets.d.ts.map +0 -1
  325. package/dist/types/styling/StyleBuilder.d.ts +0 -140
  326. package/dist/types/styling/StyleBuilder.d.ts.map +0 -1
  327. package/dist/types/styling/banners.d.ts +0 -42
  328. package/dist/types/styling/banners.d.ts.map +0 -1
  329. package/dist/types/styling/index.d.ts +0 -10
  330. package/dist/types/styling/index.d.ts.map +0 -1
  331. package/dist/types/styling/themes.d.ts +0 -7
  332. package/dist/types/styling/themes.d.ts.map +0 -1
  333. package/dist/types/styling-module.d.ts +0 -178
  334. package/dist/types/styling-module.d.ts.map +0 -1
  335. package/dist/types/types/core.d.ts +0 -221
  336. package/dist/types/types/core.d.ts.map +0 -1
  337. package/dist/types/types/handlers.d.ts +0 -85
  338. package/dist/types/types/handlers.d.ts.map +0 -1
  339. package/dist/types/types/index.d.ts +0 -7
  340. package/dist/types/types/index.d.ts.map +0 -1
  341. package/dist/types/utils/environment.d.ts +0 -47
  342. package/dist/types/utils/environment.d.ts.map +0 -1
  343. package/dist/types/utils/formatting.d.ts +0 -37
  344. package/dist/types/utils/formatting.d.ts.map +0 -1
  345. package/dist/types/utils/index.d.ts +0 -7
  346. package/dist/types/utils/index.d.ts.map +0 -1
  347. package/dist/types/utils/opentui-detection.d.ts +0 -34
  348. package/dist/types/utils/opentui-detection.d.ts.map +0 -1
  349. package/dist/types/utils/output.d.ts +0 -41
  350. package/dist/types/utils/output.d.ts.map +0 -1
  351. package/dist/types/utils/stackTrace.d.ts +0 -6
  352. package/dist/types/utils/stackTrace.d.ts.map +0 -1
  353. package/dist/types/utils/timestamps.d.ts +0 -20
  354. package/dist/types/utils/timestamps.d.ts.map +0 -1
  355. package/dist/utils/environment.d.ts +0 -47
  356. package/dist/utils/environment.d.ts.map +0 -1
  357. package/dist/utils/environment.js +0 -85
  358. package/dist/utils/formatting.js +0 -117
  359. package/dist/utils/index.js +0 -6
  360. package/dist/utils/opentui-detection.d.ts +0 -34
  361. package/dist/utils/opentui-detection.d.ts.map +0 -1
  362. package/dist/utils/opentui-detection.js +0 -116
  363. package/dist/utils/output.js +0 -150
  364. package/dist/utils/stackTrace.js +0 -81
  365. package/dist/utils/timestamps.js +0 -71
  366. package/dist/vite.svg +0 -1
  367. package/docs/API.md +0 -691
  368. package/docs/CORE.md +0 -264
  369. package/docs/DEVELOPMENT.md +0 -731
  370. package/docs/EXPORTS.md +0 -467
  371. package/docs/PACKAGES.md +0 -244
  372. package/docs/STYLING.md +0 -405
  373. package/docs/_config.yml +0 -36
  374. package/docs/index.md +0 -179
  375. package/examples/README.md +0 -208
  376. package/examples/basic-logging.js +0 -75
  377. package/examples/data-export.js +0 -234
  378. package/examples/package.json +0 -16
  379. package/examples/performance-timing.js +0 -170
  380. package/examples/simplified-api.js +0 -124
  381. package/examples/styling-themes.js +0 -207
  382. package/index.html +0 -358
  383. package/packages/core/package.json +0 -57
  384. package/packages/exports/package.json +0 -41
  385. package/packages/nodejs-opentui/README.md +0 -232
  386. package/packages/nodejs-opentui/package.json +0 -72
  387. package/packages/nodejs-opentui/src/LogRenderer.ts +0 -171
  388. package/packages/nodejs-opentui/src/OpenTUILogHandler.ts +0 -178
  389. package/packages/nodejs-opentui/src/components/LogBadge.tsx +0 -131
  390. package/packages/nodejs-opentui/src/index.ts +0 -133
  391. package/packages/nodejs-opentui/src/types.ts +0 -158
  392. package/packages/nodejs-opentui/tsconfig.json +0 -20
  393. package/packages/styling/package.json +0 -41
  394. package/project-utils/README.md +0 -172
  395. package/project-utils/auto-release-gemini.ts +0 -1193
  396. package/project-utils/auto-release-ui.ts +0 -1329
  397. package/project-utils/commit-generator.ts +0 -1385
  398. package/project-utils/commit-ui.ts +0 -264
  399. package/project-utils/git-utils.ts +0 -199
  400. package/project-utils/github-release-manager.ts +0 -466
  401. package/project-utils/project-config.ts +0 -260
  402. package/project-utils/prompt-templates.js +0 -345
  403. package/project-utils/prompt-templates.ts +0 -422
  404. package/project-utils/version-manager.ts +0 -1078
  405. package/public/vite.svg +0 -1
  406. package/src/Logger.ts +0 -1276
  407. package/src/ScopedLogger.ts +0 -454
  408. package/src/cli/CommandProcessor.ts +0 -248
  409. package/src/cli/commands/ConfigCommand.ts +0 -93
  410. package/src/cli/commands/ExportCommand.ts +0 -276
  411. package/src/cli/commands/HistoryCommand.ts +0 -117
  412. package/src/cli/commands/StatusCommand.ts +0 -112
  413. package/src/cli/commands/ThemeCommand.ts +0 -88
  414. package/src/cli/help.ts +0 -127
  415. package/src/cli/index.ts +0 -71
  416. package/src/constants.ts +0 -171
  417. package/src/core.ts +0 -393
  418. package/src/example.ts +0 -210
  419. package/src/exports-module.ts +0 -311
  420. package/src/handlers/AnalyticsLogHandler.ts +0 -22
  421. package/src/handlers/ExportLogHandler.ts +0 -609
  422. package/src/handlers/FileLogHandler.ts +0 -169
  423. package/src/handlers/RemoteLogHandler.ts +0 -42
  424. package/src/handlers/index.ts +0 -8
  425. package/src/index.ts +0 -209
  426. package/src/main.ts +0 -196
  427. package/src/style.css +0 -96
  428. package/src/styling/LogStyleBuilder.ts +0 -355
  429. package/src/styling/SemanticStyles.ts +0 -380
  430. package/src/styling/SmartPresets.ts +0 -288
  431. package/src/styling/StyleBuilder.ts +0 -319
  432. package/src/styling/banners.ts +0 -168
  433. package/src/styling/index.ts +0 -27
  434. package/src/styling/themes.ts +0 -235
  435. package/src/styling-module.ts +0 -244
  436. package/src/types/core.ts +0 -236
  437. package/src/types/handlers.ts +0 -95
  438. package/src/types/index.ts +0 -35
  439. package/src/typescript.svg +0 -1
  440. package/src/utils/environment.ts +0 -94
  441. package/src/utils/formatting.ts +0 -142
  442. package/src/utils/index.ts +0 -21
  443. package/src/utils/opentui-detection.ts +0 -138
  444. package/src/utils/output.ts +0 -185
  445. package/src/utils/stackTrace.ts +0 -95
  446. package/src/utils/timestamps.ts +0 -80
  447. package/src/vite-env.d.ts +0 -1
  448. package/test-core-browser.html +0 -237
  449. package/test-core-node.js +0 -63
  450. package/tests/test-conflict-resolution.ts +0 -391
  451. package/tests/validate-workflows.sh +0 -131
  452. package/tests/yaml-autofix.sh +0 -146
  453. package/tsconfig.json +0 -50
  454. package/vite.config.ts +0 -223
@@ -1,124 +0,0 @@
1
- /**
2
- * @fileoverview Examples of the new Simplified API for Advanced Logger
3
- */
4
-
5
- import logger, {
6
- preset,
7
- hideTimestamp,
8
- showLocation,
9
- component,
10
- api,
11
- scope,
12
- customize,
13
- styles
14
- } from '../dist/index.js';
15
-
16
- console.log('=== Advanced Logger - Simplified API Examples ===\n');
17
-
18
- // ===== BASIC USAGE - OUT-OF-THE-BOX =====
19
- console.log('1. Basic usage (no configuration needed):');
20
- logger.info('Application started');
21
- logger.success('Database connected');
22
- logger.warn('High memory usage detected');
23
- logger.error('Failed to load configuration');
24
-
25
- console.log('\n2. Available presets:');
26
- console.log('Available presets:', logger.presets());
27
-
28
- // ===== PRESET EXAMPLES =====
29
- console.log('\n3. Using presets:');
30
-
31
- console.log('\n → Cyberpunk preset:');
32
- preset('cyberpunk');
33
- logger.info('System online');
34
- logger.critical('Security breach detected!');
35
-
36
- console.log('\n → Minimal preset:');
37
- preset('minimal');
38
- logger.info('Clean and simple logging');
39
- logger.success('Task completed successfully');
40
-
41
- console.log('\n → Debug preset:');
42
- preset('debug');
43
- logger.debug('Detailed debugging info');
44
- logger.info('Processing data...');
45
-
46
- // Reset to default
47
- preset('default');
48
-
49
- // ===== TOGGLE EXAMPLES =====
50
- console.log('\n4. Toggle features:');
51
-
52
- console.log('\n → Hide timestamp:');
53
- hideTimestamp();
54
- logger.info('No timestamp shown');
55
-
56
- console.log('\n → Show location (with timestamp hidden):');
57
- showLocation();
58
- logger.info('Location info visible');
59
-
60
- // Reset for next examples
61
- logger.showTimestamp();
62
-
63
- // ===== SCOPED LOGGERS =====
64
- console.log('\n5. Scoped loggers:');
65
-
66
- console.log('\n → Component logger:');
67
- const auth = component('UserAuth');
68
- auth.info('Login attempt');
69
- auth.success('User authenticated');
70
- auth.lifecycle('mount', 'Component mounted');
71
- auth.stateChange('idle', 'loading');
72
-
73
- console.log('\n → API logger with badges:');
74
- const graphql = api('GraphQL').badges(['SLOW', 'CACHE']);
75
- graphql.info('Query executed');
76
- graphql.slow('Complex query', 2500);
77
- graphql.auth('Invalid token');
78
-
79
- console.log('\n → Custom scoped logger:');
80
- const payment = scope('Payment').badges(['CRITICAL', 'AUDIT']);
81
- payment.info('Processing payment');
82
- payment.success('Payment completed');
83
-
84
- // ===== CONTEXT EXAMPLES =====
85
- console.log('\n6. Context logging:');
86
- const dbLogger = component('Database');
87
-
88
- dbLogger.context('Migration').run(() => {
89
- dbLogger.info('Starting migration');
90
- dbLogger.success('Tables created');
91
- dbLogger.info('Migration completed');
92
- });
93
- // Context automatically removed after run()
94
-
95
- // ===== SIMPLE CUSTOMIZATION =====
96
- console.log('\n7. Simple customization:');
97
- customize({
98
- message: { color: '#007bff', size: '15px' },
99
- timestamp: { show: true },
100
- location: { show: false }
101
- });
102
-
103
- logger.info('Customized message styling');
104
- logger.success('Custom color and size applied');
105
-
106
- // ===== ADVANCED STYLING (For power users) =====
107
- console.log('\n8. Advanced styling (power users):');
108
-
109
- styles()
110
- .timestamp().muted().mono().compact()
111
- .level().neon().uppercase()
112
- .message().large().system()
113
- .spacing('compact')
114
- .apply();
115
-
116
- logger.info('Advanced custom styling applied');
117
- logger.warn('Neon level badges with large system font');
118
-
119
- console.log('\n=== Examples completed! ===');
120
-
121
- // Reset to clean state for any other examples
122
- preset('default');
123
- logger.showTimestamp();
124
- logger.showLocation();
@@ -1,207 +0,0 @@
1
- /**
2
- * Styling and Themes Example
3
- *
4
- * Demonstrates visual styling capabilities including:
5
- * - Theme switching and customization
6
- * - Custom style creation with StyleBuilder
7
- * - Banner display variations
8
- * - SVG background integration
9
- * - Pre-built style presets
10
- *
11
- * Run: node examples/styling-themes.js
12
- * Note: Best viewed in browser console for full visual effects
13
- */
14
-
15
- import { Logger } from '@mks2508/better-logger';
16
- import {
17
- setTheme,
18
- showBanner,
19
- createStyle,
20
- stylePresets,
21
- logAnimated,
22
- logWithSVG
23
- } from '@mks2508/better-logger/styling';
24
-
25
- console.log('🎨 Better Logger - Styling and Themes Example\n');
26
-
27
- const logger = new Logger({ prefix: 'STYLE' });
28
-
29
- // Theme demonstration
30
- console.log('🌈 Testing different themes:');
31
-
32
- const themes = ['default', 'dark', 'neon', 'cyberpunk', 'retro'];
33
-
34
- for (const theme of themes) {
35
- setTheme(theme);
36
- logger.info(`Theme changed to: ${theme}`);
37
-
38
- // Show some logs in this theme
39
- logger.success(`${theme} theme is active!`);
40
- logger.warn(`Warning message in ${theme} theme`);
41
- logger.error(`Error message in ${theme} theme`);
42
-
43
- console.log(''); // Add spacing
44
- }
45
-
46
- // Banner demonstrations
47
- console.log('\n🎭 Testing different banner types:');
48
-
49
- const bannerTypes = ['simple', 'ascii', 'unicode', 'svg', 'animated'];
50
-
51
- bannerTypes.forEach((type, index) => {
52
- setTimeout(() => {
53
- console.log(`\n--- ${type.toUpperCase()} BANNER ---`);
54
- showBanner(type);
55
- logger.info(`Showing ${type} banner style`);
56
- }, index * 1000);
57
- });
58
-
59
- // Wait for banners, then continue
60
- setTimeout(() => {
61
- console.log('\n✨ Testing custom style creation:');
62
-
63
- // Create custom styles using StyleBuilder
64
- const headerStyle = createStyle()
65
- .bg('linear-gradient(135deg, #667eea, #764ba2)')
66
- .color('white')
67
- .padding('12px 24px')
68
- .rounded('8px')
69
- .bold()
70
- .shadow('0 4px 15px rgba(102, 126, 234, 0.3)')
71
- .build();
72
-
73
- const alertStyle = createStyle()
74
- .bg('linear-gradient(45deg, #ff6b6b, #feca57)')
75
- .color('#333')
76
- .padding('10px 20px')
77
- .border('2px solid #ff5252')
78
- .rounded('25px')
79
- .bold()
80
- .animation('pulse 1s ease-in-out infinite')
81
- .build();
82
-
83
- const codeStyle = createStyle()
84
- .backgroundColor('#2c3e50')
85
- .color('#ecf0f1')
86
- .padding('8px 12px')
87
- .font('Monaco, Consolas, monospace')
88
- .border('1px solid #34495e')
89
- .rounded('4px')
90
- .build();
91
-
92
- console.log('%cCustom Header Style', headerStyle);
93
- console.log('%cCustom Alert Style', alertStyle);
94
- console.log('%cCustom Code Style', codeStyle);
95
-
96
- // Using pre-built style presets
97
- console.log('\nđŸŽ¯ Testing style presets:');
98
-
99
- console.log('%c✅ Success Preset', stylePresets.success);
100
- console.log('%c❌ Error Preset', stylePresets.error);
101
- console.log('%câš ī¸ Warning Preset', stylePresets.warning);
102
- console.log('%câ„šī¸ Info Preset', stylePresets.info);
103
- console.log('%cđŸŽ¯ Accent Preset', stylePresets.accent);
104
-
105
- // Advanced styling combinations
106
- console.log('\n🔧 Advanced styling combinations:');
107
-
108
- const gradientButton = createStyle()
109
- .bg('linear-gradient(45deg, #667eea, #764ba2, #f093fb, #f5576c)')
110
- .color('white')
111
- .padding('15px 30px')
112
- .rounded('50px')
113
- .bold()
114
- .shadow('0 8px 25px rgba(102, 126, 234, 0.4)')
115
- .animation('backgroundMove 3s ease infinite')
116
- .css('background-size', '400% 400%')
117
- .build();
118
-
119
- console.log('%c🚀 Gradient Button Style', gradientButton);
120
-
121
- const glassMorphism = createStyle()
122
- .bg('rgba(255, 255, 255, 0.1)')
123
- .color('#333')
124
- .padding('20px')
125
- .rounded('15px')
126
- .border('1px solid rgba(255, 255, 255, 0.2)')
127
- .css('backdrop-filter', 'blur(10px)')
128
- .shadow('0 8px 32px rgba(0, 0, 0, 0.1)')
129
- .build();
130
-
131
- console.log('%cđŸĒŸ Glass Morphism Style', glassMorphism);
132
-
133
- // SVG background demonstration (works in browser)
134
- if (typeof document !== 'undefined') {
135
- console.log('\nđŸ–ŧī¸ Testing SVG backgrounds:');
136
-
137
- const brandSVG = `
138
- <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 80'>
139
- <defs>
140
- <linearGradient id='brandGrad' 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(#brandGrad)' rx='8'/>
146
- <text x='200' y='45' text-anchor='middle' fill='white'
147
- font-family='Arial' font-size='18' font-weight='bold'>
148
- BETTER LOGGER
149
- </text>
150
- </svg>
151
- `;
152
-
153
- logWithSVG('Custom SVG Background!', brandSVG, {
154
- width: 400,
155
- height: 80,
156
- padding: '40px 200px'
157
- });
158
-
159
- // Animated logging (browser only)
160
- console.log('\n✨ Testing animated logging:');
161
-
162
- logAnimated('🌟 This message has animated gradients!', 3);
163
-
164
- setTimeout(() => {
165
- logAnimated('🎉 Animation completed!', 2);
166
- }, 3500);
167
- }
168
-
169
- // Style combinations for different contexts
170
- console.log('\n📱 Context-specific styling:');
171
-
172
- const mobileStyle = createStyle()
173
- .bg('#007AFF')
174
- .color('white')
175
- .padding('8px 16px')
176
- .rounded('18px')
177
- .fontSize('14px')
178
- .build();
179
-
180
- const desktopStyle = createStyle()
181
- .bg('linear-gradient(135deg, #74b9ff, #0984e3)')
182
- .color('white')
183
- .padding('12px 24px')
184
- .rounded('8px')
185
- .fontSize('16px')
186
- .shadow('0 4px 12px rgba(116, 185, 255, 0.3)')
187
- .build();
188
-
189
- const terminalStyle = createStyle()
190
- .backgroundColor('#1e1e1e')
191
- .color('#00ff00')
192
- .padding('6px 12px')
193
- .font('Fira Code, Monaco, monospace')
194
- .border('1px solid #333')
195
- .build();
196
-
197
- console.log('%c📱 Mobile Style', mobileStyle);
198
- console.log('%cđŸ–Ĩī¸ Desktop Style', desktopStyle);
199
- console.log('%cđŸ’ģ Terminal Style', terminalStyle);
200
-
201
- console.log('\n✅ Styling and themes examples completed!');
202
-
203
- // Reset to default theme
204
- setTheme('default');
205
- logger.info('Theme reset to default');
206
-
207
- }, 6000); // Wait for banner demonstrations
package/index.html DELETED
@@ -1,358 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>Advanced Logger Test Page - 2025</title>
7
- <style>
8
- * {
9
- margin: 0;
10
- padding: 0;
11
- box-sizing: border-box;
12
- }
13
-
14
- body {
15
- font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
16
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
17
- min-height: 100vh;
18
- display: flex;
19
- align-items: center;
20
- justify-content: center;
21
- padding: 20px;
22
- }
23
-
24
- .container {
25
- background: rgba(255, 255, 255, 0.95);
26
- backdrop-filter: blur(10px);
27
- border-radius: 20px;
28
- padding: 40px;
29
- box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
30
- max-width: 800px;
31
- width: 100%;
32
- }
33
-
34
- .header {
35
- text-align: center;
36
- margin-bottom: 40px;
37
- }
38
-
39
- .header h1 {
40
- font-size: 2.5rem;
41
- font-weight: 700;
42
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
43
- -webkit-background-clip: text;
44
- -webkit-text-fill-color: transparent;
45
- background-clip: text;
46
- margin-bottom: 10px;
47
- }
48
-
49
- .header p {
50
- color: #6b7280;
51
- font-size: 1.1rem;
52
- margin-bottom: 20px;
53
- }
54
-
55
- .console-note {
56
- background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
57
- border: 1px solid #f59e0b;
58
- border-radius: 12px;
59
- padding: 15px;
60
- margin-bottom: 30px;
61
- text-align: center;
62
- color: #92400e;
63
- font-weight: 500;
64
- }
65
-
66
- .devtools-button {
67
- background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
68
- border: none;
69
- border-radius: 8px;
70
- color: white;
71
- padding: 8px 16px;
72
- margin-top: 10px;
73
- font-size: 12px;
74
- font-weight: 600;
75
- cursor: pointer;
76
- transition: all 0.2s ease;
77
- display: inline-block;
78
- }
79
-
80
- .devtools-button:hover {
81
- background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
82
- transform: translateY(-1px);
83
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
84
- }
85
-
86
- .button-grid {
87
- display: grid;
88
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
89
- gap: 15px;
90
- margin-bottom: 30px;
91
- }
92
-
93
- .log-button {
94
- background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
95
- border: 2px solid #e2e8f0;
96
- border-radius: 12px;
97
- padding: 15px 20px;
98
- font-size: 14px;
99
- font-weight: 600;
100
- cursor: pointer;
101
- transition: all 0.3s ease;
102
- display: flex;
103
- align-items: center;
104
- justify-content: center;
105
- gap: 8px;
106
- min-height: 60px;
107
- }
108
-
109
- .log-button:hover {
110
- transform: translateY(-2px);
111
- box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
112
- }
113
-
114
- .log-button.debug {
115
- border-color: #667eea;
116
- color: #667eea;
117
- }
118
-
119
- .log-button.debug:hover {
120
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
121
- color: white;
122
- }
123
-
124
- .log-button.info {
125
- border-color: #74b9ff;
126
- color: #74b9ff;
127
- }
128
-
129
- .log-button.info:hover {
130
- background: linear-gradient(135deg, #74b9ff 0%, #0984e3 100%);
131
- color: white;
132
- }
133
-
134
- .log-button.warn {
135
- border-color: #fdcb6e;
136
- color: #e17055;
137
- }
138
-
139
- .log-button.warn:hover {
140
- background: linear-gradient(135deg, #fdcb6e 0%, #e17055 100%);
141
- color: white;
142
- }
143
-
144
- .log-button.error {
145
- border-color: #e84393;
146
- color: #e84393;
147
- }
148
-
149
- .log-button.error:hover {
150
- background: linear-gradient(135deg, #e84393 0%, #d63031 100%);
151
- color: white;
152
- }
153
-
154
- .log-button.success {
155
- border-color: #00b894;
156
- color: #00b894;
157
- }
158
-
159
- .log-button.success:hover {
160
- background: linear-gradient(135deg, #00b894 0%, #00a085 100%);
161
- color: white;
162
- }
163
-
164
- .log-button.critical {
165
- border-color: #ff3838;
166
- color: #ff3838;
167
- }
168
-
169
- .log-button.critical:hover {
170
- background: linear-gradient(135deg, #ff3838 0%, #ff1744 100%);
171
- color: white;
172
- }
173
-
174
- .advanced-section {
175
- border-top: 2px solid #e2e8f0;
176
- padding-top: 30px;
177
- margin-top: 30px;
178
- }
179
-
180
- .advanced-section h2 {
181
- color: #374151;
182
- margin-bottom: 20px;
183
- font-size: 1.5rem;
184
- text-align: center;
185
- }
186
-
187
- .footer {
188
- text-align: center;
189
- margin-top: 40px;
190
- color: #6b7280;
191
- font-size: 0.9rem;
192
- }
193
-
194
- @media (max-width: 640px) {
195
- .container {
196
- padding: 20px;
197
- }
198
-
199
- .header h1 {
200
- font-size: 2rem;
201
- }
202
-
203
- .button-grid {
204
- grid-template-columns: 1fr;
205
- }
206
- }
207
- </style>
208
- </head>
209
- <body>
210
- <div class="container">
211
- <header class="header">
212
- <h1>🚀 Better Logger Demo</h1>
213
- <p>Complete library with styling, SVG, animations, export & CLI features</p>
214
- <div class="console-note">
215
- 📝 Open your browser's Developer Console to see the styled log output
216
- <button class="devtools-button" id="devtools-btn" onclick="tryOpenDevTools()">
217
- 🔧 Press F12 to Open DevTools
218
- </button>
219
- <div id="devtools-status" style="margin-top: 8px; font-size: 12px; display: none;">
220
- ✅ DevTools detected! Check the Console tab
221
- </div>
222
- </div>
223
- </header>
224
-
225
- <main>
226
- <section class="button-grid">
227
- <button class="log-button debug" onclick="testDebug()">
228
- 🐞 Debug Log
229
- </button>
230
- <button class="log-button info" onclick="testInfo()">
231
- â„šī¸ Info Log
232
- </button>
233
- <button class="log-button warn" onclick="testWarn()">
234
- âš ī¸ Warning Log
235
- </button>
236
- <button class="log-button error" onclick="testError()">
237
- ❌ Error Log
238
- </button>
239
- <button class="log-button success" onclick="testSuccess()">
240
- ✅ Success Log
241
- </button>
242
- <button class="log-button critical" onclick="testCritical()">
243
- đŸ”Ĩ Critical Log
244
- </button>
245
- </section>
246
-
247
- <section class="advanced-section">
248
- <h2>Visual Features</h2>
249
- <div class="button-grid">
250
- <button class="log-button info" onclick="testBanners()">
251
- 🎨 Banner System
252
- </button>
253
- <button class="log-button debug" onclick="testThemes()">
254
- 🌈 Theme Switching
255
- </button>
256
- <button class="log-button success" onclick="testSVG()">
257
- đŸ–ŧī¸ SVG Backgrounds
258
- </button>
259
- <button class="log-button warn" onclick="testAnimations()">
260
- ✨ CSS Animations
261
- </button>
262
- <button class="log-button info" onclick="testCLI()">
263
- đŸ’ģ CLI Commands
264
- </button>
265
- <button class="log-button critical" onclick="testExports()">
266
- 📤 Export Features
267
- </button>
268
- </div>
269
- </section>
270
-
271
- <section class="advanced-section">
272
- <h2>Core Features</h2>
273
- <div class="button-grid">
274
- <button class="log-button info" onclick="testTable()">
275
- 📊 Table Display
276
- </button>
277
- <button class="log-button debug" onclick="testGrouping()">
278
- 📁 Grouped Logs
279
- </button>
280
- <button class="log-button warn" onclick="testTiming()">
281
- âąī¸ Performance Timer
282
- </button>
283
- <button class="log-button info" onclick="testScopedLogger()">
284
- đŸŽ¯ Scoped Logger
285
- </button>
286
- <button class="log-button debug" onclick="testTrace()">
287
- 🔍 Stack Trace
288
- </button>
289
- <button class="log-button success" onclick="testAllFeatures()">
290
- 🌟 Demo All Features
291
- </button>
292
- </div>
293
- </section>
294
- </main>
295
-
296
- <footer class="footer">
297
- <p>Better Logger v0.0.1 | Built with TypeScript & Modern Web Standards</p>
298
- </footer>
299
- </div>
300
- <script>
301
- let devToolsOpen = false;
302
-
303
- function detectDevTools() {
304
- const threshold = 160;
305
- const widthThreshold = window.outerWidth - window.innerWidth > threshold;
306
- const heightThreshold = window.outerHeight - window.innerHeight > threshold;
307
-
308
- return widthThreshold || heightThreshold;
309
- }
310
-
311
- function updateDevToolsStatus() {
312
- const isOpen = detectDevTools();
313
- const btn = document.getElementById('devtools-btn');
314
- const status = document.getElementById('devtools-status');
315
-
316
- if (isOpen && !devToolsOpen) {
317
- devToolsOpen = true;
318
- btn.textContent = '✅ DevTools Open - Check Console!';
319
- btn.style.background = 'linear-gradient(135deg, #00b894 0%, #00a085 100%)';
320
- status.style.display = 'block';
321
-
322
- // Welcome message when devtools opens
323
- console.log('%c🎉 DevTools Detected! Welcome to Advanced Logger Demo',
324
- 'background: linear-gradient(135deg, #00b894 0%, #00a085 100%); color: white; padding: 12px 20px; border-radius: 8px; font-weight: bold; font-size: 14px;');
325
- } else if (!isOpen && devToolsOpen) {
326
- devToolsOpen = false;
327
- btn.textContent = '🔧 Press F12 to Open DevTools';
328
- btn.style.background = 'linear-gradient(135deg, #f59e0b 0%, #d97706 100%)';
329
- status.style.display = 'none';
330
- }
331
- }
332
-
333
- function tryOpenDevTools() {
334
- if (!devToolsOpen) {
335
- // Simulate F12 keypress (doesn't actually open devtools, but is educational)
336
- console.log('%c💡 Tip: Press F12 or right-click → Inspect Element to open DevTools!',
337
- 'background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 10px 15px; border-radius: 5px; font-weight: bold;');
338
-
339
- // Show platform-specific shortcuts
340
- const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
341
- const shortcut = isMac ? 'Cmd+Option+I' : 'F12 or Ctrl+Shift+I';
342
-
343
- alert(`🔧 DevTools Shortcut:\n\n${shortcut}\n\nOnce open, check the Console tab to see styled logs!`);
344
- } else {
345
- console.log('%c🚀 DevTools already open! Check this console for styled logs!',
346
- 'background: linear-gradient(135deg, #00b894 0%, #00a085 100%); color: white; padding: 10px 15px; border-radius: 5px; font-weight: bold;');
347
- }
348
- }
349
-
350
- // Check devtools status every 500ms
351
- setInterval(updateDevToolsStatus, 500);
352
-
353
- // Initial check
354
- setTimeout(updateDevToolsStatus, 100);
355
- </script>
356
- <script type="module" src="./src/main.ts"></script>
357
- </body>
358
- </html>