@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
@@ -0,0 +1,700 @@
1
+ import { a as getTerminalWidth } from "./environment-detector-CI3TrWK_.js";
2
+ //#region src/terminal/color-converter.ts
3
+ const ANSI_16_COLORS = {
4
+ black: {
5
+ fg: "30",
6
+ bg: "40",
7
+ bright: {
8
+ fg: "90",
9
+ bg: "100"
10
+ }
11
+ },
12
+ red: {
13
+ fg: "31",
14
+ bg: "41",
15
+ bright: {
16
+ fg: "91",
17
+ bg: "101"
18
+ }
19
+ },
20
+ green: {
21
+ fg: "32",
22
+ bg: "42",
23
+ bright: {
24
+ fg: "92",
25
+ bg: "102"
26
+ }
27
+ },
28
+ yellow: {
29
+ fg: "33",
30
+ bg: "43",
31
+ bright: {
32
+ fg: "93",
33
+ bg: "103"
34
+ }
35
+ },
36
+ blue: {
37
+ fg: "34",
38
+ bg: "44",
39
+ bright: {
40
+ fg: "94",
41
+ bg: "104"
42
+ }
43
+ },
44
+ magenta: {
45
+ fg: "35",
46
+ bg: "45",
47
+ bright: {
48
+ fg: "95",
49
+ bg: "105"
50
+ }
51
+ },
52
+ cyan: {
53
+ fg: "36",
54
+ bg: "46",
55
+ bright: {
56
+ fg: "96",
57
+ bg: "106"
58
+ }
59
+ },
60
+ white: {
61
+ fg: "37",
62
+ bg: "47",
63
+ bright: {
64
+ fg: "97",
65
+ bg: "107"
66
+ }
67
+ },
68
+ gray: {
69
+ fg: "90",
70
+ bg: "100",
71
+ bright: {
72
+ fg: "37",
73
+ bg: "47"
74
+ }
75
+ },
76
+ grey: {
77
+ fg: "90",
78
+ bg: "100",
79
+ bright: {
80
+ fg: "37",
81
+ bg: "47"
82
+ }
83
+ }
84
+ };
85
+ const CSS_NAMED_COLORS = {
86
+ aliceblue: "#f0f8ff",
87
+ antiquewhite: "#faebd7",
88
+ aqua: "#00ffff",
89
+ aquamarine: "#7fffd4",
90
+ azure: "#f0ffff",
91
+ beige: "#f5f5dc",
92
+ bisque: "#ffe4c4",
93
+ black: "#000000",
94
+ blanchedalmond: "#ffebcd",
95
+ blue: "#0000ff",
96
+ blueviolet: "#8a2be2",
97
+ brown: "#a52a2a",
98
+ burlywood: "#deb887",
99
+ cadetblue: "#5f9ea0",
100
+ chartreuse: "#7fff00",
101
+ chocolate: "#d2691e",
102
+ coral: "#ff7f50",
103
+ cornflowerblue: "#6495ed",
104
+ cornsilk: "#fff8dc",
105
+ crimson: "#dc143c",
106
+ cyan: "#00ffff",
107
+ darkblue: "#00008b",
108
+ darkcyan: "#008b8b",
109
+ darkgoldenrod: "#b8860b",
110
+ darkgray: "#a9a9a9",
111
+ darkgreen: "#006400",
112
+ darkkhaki: "#bdb76b",
113
+ darkmagenta: "#8b008b",
114
+ darkolivegreen: "#556b2f",
115
+ darkorange: "#ff8c00",
116
+ darkorchid: "#9932cc",
117
+ darkred: "#8b0000",
118
+ darksalmon: "#e9967a",
119
+ darkseagreen: "#8fbc8f",
120
+ darkslateblue: "#483d8b",
121
+ darkslategray: "#2f4f4f",
122
+ darkturquoise: "#00ced1",
123
+ darkviolet: "#9400d3",
124
+ deeppink: "#ff1493",
125
+ deepskyblue: "#00bfff",
126
+ dimgray: "#696969",
127
+ dodgerblue: "#1e90ff",
128
+ firebrick: "#b22222",
129
+ floralwhite: "#fffaf0",
130
+ forestgreen: "#228b22",
131
+ fuchsia: "#ff00ff",
132
+ gainsboro: "#dcdcdc",
133
+ ghostwhite: "#f8f8ff",
134
+ gold: "#ffd700",
135
+ goldenrod: "#daa520",
136
+ gray: "#808080",
137
+ green: "#008000",
138
+ greenyellow: "#adff2f",
139
+ honeydew: "#f0fff0",
140
+ hotpink: "#ff69b4",
141
+ indianred: "#cd5c5c",
142
+ indigo: "#4b0082",
143
+ ivory: "#fffff0",
144
+ khaki: "#f0e68c",
145
+ lavender: "#e6e6fa",
146
+ lavenderblush: "#fff0f5",
147
+ lawngreen: "#7cfc00",
148
+ lemonchiffon: "#fffacd",
149
+ lightblue: "#add8e6",
150
+ lightcoral: "#f08080",
151
+ lightcyan: "#e0ffff",
152
+ lightgoldenrodyellow: "#fafad2",
153
+ lightgray: "#d3d3d3",
154
+ lightgreen: "#90ee90",
155
+ lightpink: "#ffb6c1",
156
+ lightsalmon: "#ffa07a",
157
+ lightseagreen: "#20b2aa",
158
+ lightskyblue: "#87cefa",
159
+ lightslategray: "#778899",
160
+ lightsteelblue: "#b0c4de",
161
+ lightyellow: "#ffffe0",
162
+ lime: "#00ff00",
163
+ limegreen: "#32cd32",
164
+ linen: "#faf0e6",
165
+ magenta: "#ff00ff",
166
+ maroon: "#800000",
167
+ mediumaquamarine: "#66cdaa",
168
+ mediumblue: "#0000cd",
169
+ mediumorchid: "#ba55d3",
170
+ mediumpurple: "#9370db",
171
+ mediumseagreen: "#3cb371",
172
+ mediumslateblue: "#7b68ee",
173
+ mediumspringgreen: "#00fa9a",
174
+ mediumturquoise: "#48d1cc",
175
+ mediumvioletred: "#c71585",
176
+ midnightblue: "#191970",
177
+ mintcream: "#f5fffa",
178
+ mistyrose: "#ffe4e1",
179
+ moccasin: "#ffe4b5",
180
+ navajowhite: "#ffdead",
181
+ navy: "#000080",
182
+ oldlace: "#fdf5e6",
183
+ olive: "#808000",
184
+ olivedrab: "#6b8e23",
185
+ orange: "#ffa500",
186
+ orangered: "#ff4500",
187
+ orchid: "#da70d6",
188
+ palegoldenrod: "#eee8aa",
189
+ palegreen: "#98fb98",
190
+ paleturquoise: "#afeeee",
191
+ palevioletred: "#db7093",
192
+ papayawhip: "#ffefd5",
193
+ peachpuff: "#ffdab9",
194
+ peru: "#cd853f",
195
+ pink: "#ffc0cb",
196
+ plum: "#dda0dd",
197
+ powderblue: "#b0e0e6",
198
+ purple: "#800080",
199
+ rebeccapurple: "#663399",
200
+ red: "#ff0000",
201
+ rosybrown: "#bc8f8f",
202
+ royalblue: "#4169e1",
203
+ saddlebrown: "#8b4513",
204
+ salmon: "#fa8072",
205
+ sandybrown: "#f4a460",
206
+ seagreen: "#2e8b57",
207
+ seashell: "#fff5ee",
208
+ sienna: "#a0522d",
209
+ silver: "#c0c0c0",
210
+ skyblue: "#87ceeb",
211
+ slateblue: "#6a5acd",
212
+ slategray: "#708090",
213
+ snow: "#fffafa",
214
+ springgreen: "#00ff7f",
215
+ steelblue: "#4682b4",
216
+ tan: "#d2b48c",
217
+ teal: "#008080",
218
+ thistle: "#d8bfd8",
219
+ tomato: "#ff6347",
220
+ turquoise: "#40e0d0",
221
+ violet: "#ee82ee",
222
+ wheat: "#f5deb3",
223
+ white: "#ffffff",
224
+ whitesmoke: "#f5f5f5",
225
+ yellow: "#ffff00",
226
+ yellowgreen: "#9acd32"
227
+ };
228
+ function hexToRgb(hex) {
229
+ const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
230
+ if (!result || !result[1] || !result[2] || !result[3]) return {
231
+ r: 255,
232
+ g: 255,
233
+ b: 255
234
+ };
235
+ return {
236
+ r: parseInt(result[1], 16),
237
+ g: parseInt(result[2], 16),
238
+ b: parseInt(result[3], 16)
239
+ };
240
+ }
241
+ function rgbToHex(r, g, b) {
242
+ return "#" + [
243
+ r,
244
+ g,
245
+ b
246
+ ].map((x) => x.toString(16).padStart(2, "0")).join("");
247
+ }
248
+ function colorToHex(color) {
249
+ if (color.startsWith("#")) return color;
250
+ const named = CSS_NAMED_COLORS[color.toLowerCase()];
251
+ if (named) return named;
252
+ const rgbMatch = color.match(/rgba?\((\d+),\s*(\d+),\s*(\d+)/);
253
+ if (rgbMatch && rgbMatch[1] && rgbMatch[2] && rgbMatch[3]) return rgbToHex(parseInt(rgbMatch[1]), parseInt(rgbMatch[2]), parseInt(rgbMatch[3]));
254
+ return "#ffffff";
255
+ }
256
+ function getANSIForeground(color, capability) {
257
+ if (capability === "none") return "";
258
+ const lowerColor = color.toLowerCase();
259
+ if (capability === "basic" && ANSI_16_COLORS[lowerColor]) return `\x1b[${ANSI_16_COLORS[lowerColor].fg}m`;
260
+ if (capability === "basic") {
261
+ const nearestBasic = findNearestBasicColor(colorToHex(color));
262
+ const basicColor = ANSI_16_COLORS[nearestBasic];
263
+ return basicColor ? `\x1b[${basicColor.fg}m` : "\x1B[37m";
264
+ }
265
+ const { r, g, b } = hexToRgb(colorToHex(color));
266
+ return `\x1b[38;2;${r};${g};${b}m`;
267
+ }
268
+ function getANSIBackground(color, capability) {
269
+ if (capability === "none") return "";
270
+ const lowerColor = color.toLowerCase();
271
+ if (capability === "basic" && ANSI_16_COLORS[lowerColor]) return `\x1b[${ANSI_16_COLORS[lowerColor].bg}m`;
272
+ if (capability === "basic") {
273
+ const nearestBasic = findNearestBasicColor(colorToHex(color));
274
+ const basicColor = ANSI_16_COLORS[nearestBasic];
275
+ return basicColor ? `\x1b[${basicColor.bg}m` : "\x1B[47m";
276
+ }
277
+ const { r, g, b } = hexToRgb(colorToHex(color));
278
+ return `\x1b[48;2;${r};${g};${b}m`;
279
+ }
280
+ function findNearestBasicColor(hex) {
281
+ const { r, g, b } = hexToRgb(hex);
282
+ const basicColors = {
283
+ black: {
284
+ r: 0,
285
+ g: 0,
286
+ b: 0
287
+ },
288
+ red: {
289
+ r: 205,
290
+ g: 0,
291
+ b: 0
292
+ },
293
+ green: {
294
+ r: 0,
295
+ g: 205,
296
+ b: 0
297
+ },
298
+ yellow: {
299
+ r: 205,
300
+ g: 205,
301
+ b: 0
302
+ },
303
+ blue: {
304
+ r: 0,
305
+ g: 0,
306
+ b: 238
307
+ },
308
+ magenta: {
309
+ r: 205,
310
+ g: 0,
311
+ b: 205
312
+ },
313
+ cyan: {
314
+ r: 0,
315
+ g: 205,
316
+ b: 205
317
+ },
318
+ white: {
319
+ r: 229,
320
+ g: 229,
321
+ b: 229
322
+ }
323
+ };
324
+ let nearest = "white";
325
+ let minDistance = Infinity;
326
+ for (const [name, rgb] of Object.entries(basicColors)) {
327
+ const distance = Math.sqrt(Math.pow(r - rgb.r, 2) + Math.pow(g - rgb.g, 2) + Math.pow(b - rgb.b, 2));
328
+ if (distance < minDistance) {
329
+ minDistance = distance;
330
+ nearest = name;
331
+ }
332
+ }
333
+ return nearest;
334
+ }
335
+ const ANSI = {
336
+ reset: "\x1B[0m",
337
+ bold: "\x1B[1m",
338
+ dim: "\x1B[2m",
339
+ italic: "\x1B[3m",
340
+ underline: "\x1B[4m",
341
+ blink: "\x1B[5m",
342
+ inverse: "\x1B[7m",
343
+ hidden: "\x1B[8m",
344
+ strikethrough: "\x1B[9m",
345
+ fg: {
346
+ black: "\x1B[30m",
347
+ red: "\x1B[31m",
348
+ green: "\x1B[32m",
349
+ yellow: "\x1B[33m",
350
+ blue: "\x1B[34m",
351
+ magenta: "\x1B[35m",
352
+ cyan: "\x1B[36m",
353
+ white: "\x1B[37m",
354
+ gray: "\x1B[90m",
355
+ brightRed: "\x1B[91m",
356
+ brightGreen: "\x1B[92m",
357
+ brightYellow: "\x1B[93m",
358
+ brightBlue: "\x1B[94m",
359
+ brightMagenta: "\x1B[95m",
360
+ brightCyan: "\x1B[96m",
361
+ brightWhite: "\x1B[97m"
362
+ },
363
+ bg: {
364
+ black: "\x1B[40m",
365
+ red: "\x1B[41m",
366
+ green: "\x1B[42m",
367
+ yellow: "\x1B[43m",
368
+ blue: "\x1B[44m",
369
+ magenta: "\x1B[45m",
370
+ cyan: "\x1B[46m",
371
+ white: "\x1B[47m",
372
+ gray: "\x1B[100m",
373
+ brightRed: "\x1B[101m",
374
+ brightGreen: "\x1B[102m",
375
+ brightYellow: "\x1B[103m",
376
+ brightBlue: "\x1B[104m",
377
+ brightMagenta: "\x1B[105m",
378
+ brightCyan: "\x1B[106m",
379
+ brightWhite: "\x1B[107m"
380
+ },
381
+ rgb: (r, g, b) => `\x1b[38;2;${r};${g};${b}m`,
382
+ bgRgb: (r, g, b) => `\x1b[48;2;${r};${g};${b}m`,
383
+ color256: (n) => `\x1b[38;5;${n}m`,
384
+ bgColor256: (n) => `\x1b[48;5;${n}m`
385
+ };
386
+ //#endregion
387
+ //#region src/terminal/formatter.ts
388
+ function stripAnsi(str) {
389
+ return str.replace(/\x1b\[[0-9;]*m/g, "");
390
+ }
391
+ function getVisibleLength(str) {
392
+ return stripAnsi(str).length;
393
+ }
394
+ function padToWidth(str, width, align = "left") {
395
+ const visibleLen = getVisibleLength(str);
396
+ if (visibleLen >= width) return str;
397
+ const padding = width - visibleLen;
398
+ switch (align) {
399
+ case "right": return " ".repeat(padding) + str;
400
+ case "center":
401
+ const leftPad = Math.floor(padding / 2);
402
+ const rightPad = padding - leftPad;
403
+ return " ".repeat(leftPad) + str + " ".repeat(rightPad);
404
+ default: return str + " ".repeat(padding);
405
+ }
406
+ }
407
+ function formatBadge(badge, style = "brackets", colorCapability = "full", color) {
408
+ const reset = colorCapability !== "none" ? ANSI.reset : "";
409
+ const text = badge.toUpperCase();
410
+ switch (style) {
411
+ case "rounded":
412
+ const colorCode1 = color && colorCapability !== "none" ? getANSIForeground(color, colorCapability) : "";
413
+ return `${colorCapability !== "none" ? ANSI.bg.black : ""}${colorCode1}⟨${text}⟩${reset}`;
414
+ case "plain": return `${color && colorCapability !== "none" ? getANSIForeground(color, colorCapability) : ""}${text}${reset}`;
415
+ case "unicode":
416
+ const colorCode3 = color && colorCapability !== "none" ? getANSIForeground(color, colorCapability) : "";
417
+ return `${colorCapability !== "none" ? ANSI.bg.black : ""}${colorCode3}╭${text}╮${reset}`;
418
+ case "pill": return `${color && colorCapability !== "none" ? getANSIBackground(color, colorCapability) : ""}${colorCapability !== "none" ? getANSIForeground("#000000", colorCapability) : ""}[${text}]${reset}`;
419
+ default:
420
+ const colorCode5 = color && colorCapability !== "none" ? getANSIForeground(color, colorCapability) : "";
421
+ return `${colorCapability !== "none" ? ANSI.bg.black : ""}${colorCode5}[${text}]${reset}`;
422
+ }
423
+ }
424
+ //#endregion
425
+ //#region src/playground/step.ts
426
+ /**
427
+ * @fileoverview Step progress renderer for CLI primitives
428
+ */
429
+ /**
430
+ * Renders a step progress indicator like ` [2/5] Analyzing repository...`
431
+ * @param current - Current step number
432
+ * @param total - Total number of steps
433
+ * @param msg - Step description message
434
+ * @param colorCap - Terminal color capability
435
+ * @returns Formatted step string
436
+ */
437
+ function renderStep(current, total, msg, colorCap) {
438
+ const label = `[${current}/${total}]`;
439
+ return ` ${colorCap !== "none" ? getANSIForeground("#00bcd4", colorCap) + ANSI.bold + label + ANSI.reset : label} ${msg}`;
440
+ }
441
+ //#endregion
442
+ //#region src/playground/header.ts
443
+ /**
444
+ * @fileoverview Header renderer for CLI primitives
445
+ */
446
+ /**
447
+ * Renders a styled header with optional subtitle
448
+ * @param title - Main title text
449
+ * @param subtitle - Optional subtitle (rendered dimmed)
450
+ * @returns Formatted header string
451
+ */
452
+ function renderHeader(title, subtitle) {
453
+ return ` ${ANSI.bold + title + ANSI.reset}${subtitle ? ANSI.dim + ` ${subtitle}` + ANSI.reset : ""}`;
454
+ }
455
+ //#endregion
456
+ //#region src/playground/divider.ts
457
+ /**
458
+ * @fileoverview Divider renderer for CLI primitives
459
+ */
460
+ /**
461
+ * Renders a horizontal divider line
462
+ * @param width - Optional explicit width (defaults to terminal width capped at 60)
463
+ * @returns Formatted divider string
464
+ */
465
+ function renderDivider(width) {
466
+ const w = width ?? Math.min(getTerminalWidth() - 4, 60);
467
+ return ANSI.dim + " " + "─".repeat(w) + ANSI.reset;
468
+ }
469
+ //#endregion
470
+ //#region src/playground/box.ts
471
+ /**
472
+ * Border character sets for different styles
473
+ */
474
+ const BORDER_CHARS = {
475
+ single: {
476
+ tl: "┌",
477
+ tr: "┐",
478
+ bl: "└",
479
+ br: "┘",
480
+ h: "─",
481
+ v: "│"
482
+ },
483
+ rounded: {
484
+ tl: "╭",
485
+ tr: "╮",
486
+ bl: "╰",
487
+ br: "╯",
488
+ h: "─",
489
+ v: "│"
490
+ },
491
+ double: {
492
+ tl: "╔",
493
+ tr: "╗",
494
+ bl: "╚",
495
+ br: "╝",
496
+ h: "═",
497
+ v: "║"
498
+ },
499
+ bold: {
500
+ tl: "┏",
501
+ tr: "┓",
502
+ bl: "┗",
503
+ br: "┛",
504
+ h: "━",
505
+ v: "┃"
506
+ }
507
+ };
508
+ /**
509
+ * Renders content inside a bordered box
510
+ * @param content - Content string (may contain newlines)
511
+ * @param options - Box rendering options
512
+ * @param colorCap - Terminal color capability
513
+ * @returns Formatted box string with border
514
+ */
515
+ function renderBox(content, options = {}, colorCap = "full") {
516
+ const { title, borderColor, borderStyle = "rounded", padding = 0 } = options;
517
+ const chars = BORDER_CHARS[borderStyle] ?? BORDER_CHARS.rounded;
518
+ const lines = content.split("\n");
519
+ const maxTermWidth = Math.min(getTerminalWidth() - 4, 80);
520
+ const contentWidths = lines.map((l) => getVisibleLength(l));
521
+ const titleWidth = title ? stripAnsi(title).length + 2 : 0;
522
+ const maxContentWidth = Math.max(...contentWidths, titleWidth);
523
+ const innerWidth = Math.min(maxContentWidth + 2, maxTermWidth);
524
+ const bc = borderColor && colorCap !== "none" ? getANSIForeground(borderColor, colorCap) : "";
525
+ const reset = bc ? ANSI.reset : "";
526
+ const wrap = (char) => `${bc}${char}${reset}`;
527
+ let topBorder;
528
+ if (title) {
529
+ const titleStr = ` ${title} `;
530
+ const afterTitle = innerWidth - stripAnsi(titleStr).length;
531
+ topBorder = ` ${wrap(chars.tl)}${wrap(chars.h)}${wrap(titleStr)}${wrap(chars.h.repeat(Math.max(0, afterTitle - 1)))}${wrap(chars.tr)}`;
532
+ } else topBorder = ` ${wrap(chars.tl)}${wrap(chars.h.repeat(innerWidth))}${wrap(chars.tr)}`;
533
+ const bottomBorder = ` ${wrap(chars.bl)}${wrap(chars.h.repeat(innerWidth))}${wrap(chars.br)}`;
534
+ const emptyLine = ` ${wrap(chars.v)}${" ".repeat(innerWidth)}${wrap(chars.v)}`;
535
+ const paddingLines = padding > 0 ? Array(padding).fill(emptyLine) : [];
536
+ const contentLines = lines.map((line) => {
537
+ const visible = getVisibleLength(line);
538
+ const pad = innerWidth - visible - 1;
539
+ return ` ${wrap(chars.v)} ${line}${" ".repeat(Math.max(0, pad))}${wrap(chars.v)}`;
540
+ });
541
+ return [
542
+ topBorder,
543
+ ...paddingLines,
544
+ ...contentLines,
545
+ ...paddingLines,
546
+ bottomBorder
547
+ ].join("\n");
548
+ }
549
+ //#endregion
550
+ //#region src/playground/cli-table.ts
551
+ /**
552
+ * Renders an array of objects as a formatted ASCII table
553
+ * @param rows - Array of row objects
554
+ * @param options - Table rendering options
555
+ * @param colorCap - Terminal color capability
556
+ * @returns Formatted table string
557
+ */
558
+ function renderTable(rows, options = {}, colorCap = "full") {
559
+ if (rows.length === 0) return "";
560
+ const columns = options.columns ?? Object.keys(rows[0]);
561
+ const headers = options.head ?? columns;
562
+ const colWidths = columns.map((col, i) => {
563
+ const headerLen = getVisibleLength(headers[i] ?? col);
564
+ const maxValueLen = rows.reduce((max, row) => {
565
+ const val = String(row[col] ?? "");
566
+ return Math.max(max, getVisibleLength(val));
567
+ }, 0);
568
+ return Math.max(headerLen, maxValueLen) + 2;
569
+ });
570
+ const cyan = colorCap !== "none" ? getANSIForeground("#00bcd4", colorCap) : "";
571
+ const dim = colorCap !== "none" ? ANSI.dim : "";
572
+ const reset = colorCap !== "none" ? ANSI.reset : "";
573
+ return [
574
+ " " + columns.map((col, i) => {
575
+ const label = headers[i] ?? col;
576
+ return cyan + ANSI.bold + padToWidth(` ${label}`, colWidths[i]) + reset;
577
+ }).join(""),
578
+ " " + dim + colWidths.map((w) => "─".repeat(w)).join("─") + reset,
579
+ ...rows.map((row) => {
580
+ return " " + columns.map((col, i) => {
581
+ return padToWidth(` ${String(row[col] ?? "")}`, colWidths[i]);
582
+ }).join("");
583
+ })
584
+ ].join("\n");
585
+ }
586
+ //#endregion
587
+ //#region src/playground/spinner.ts
588
+ /** Braille-based spinner animation frames */
589
+ const SPINNER_FRAMES = [
590
+ "⠋",
591
+ "⠙",
592
+ "⠹",
593
+ "⠸",
594
+ "⠼",
595
+ "⠴",
596
+ "⠦",
597
+ "⠧",
598
+ "⠇",
599
+ "⠏"
600
+ ];
601
+ /** Spinner frame interval in milliseconds */
602
+ const FRAME_INTERVAL = 80;
603
+ /**
604
+ * Interactive terminal spinner with in-place line updates.
605
+ * Writes to stderr to avoid polluting piped stdout.
606
+ *
607
+ * @implements {ISpinnerHandle}
608
+ */
609
+ var SpinnerManager = class {
610
+ message;
611
+ frameIndex = 0;
612
+ interval = null;
613
+ _logger;
614
+ constructor(message, _config, logger) {
615
+ this.message = message;
616
+ this._logger = logger;
617
+ }
618
+ /** Start the spinner animation */
619
+ start() {
620
+ if (this.interval) return;
621
+ this._logger.updateConfig({ outputMode: "silent" });
622
+ this.frameIndex = 0;
623
+ this.render();
624
+ this.interval = setInterval(() => {
625
+ this.frameIndex = (this.frameIndex + 1) % SPINNER_FRAMES.length;
626
+ this.render();
627
+ }, FRAME_INTERVAL);
628
+ }
629
+ /** Stop the spinner without a status message */
630
+ stop() {
631
+ this.clearInterval();
632
+ this.clearLine();
633
+ this._logger.updateConfig({ outputMode: "console" });
634
+ }
635
+ /** Stop with a success indicator */
636
+ succeed(msg) {
637
+ this.clearInterval();
638
+ this.clearLine();
639
+ const text = msg ?? this.message;
640
+ process.stderr.write(` ${ANSI.fg.green}\u2713${ANSI.reset} ${text}\n`);
641
+ this._logger.updateConfig({ outputMode: "console" });
642
+ }
643
+ /** Stop with a failure indicator */
644
+ fail(msg) {
645
+ this.clearInterval();
646
+ this.clearLine();
647
+ const text = msg ?? this.message;
648
+ process.stderr.write(` ${ANSI.fg.red}\u2717${ANSI.reset} ${text}\n`);
649
+ this._logger.updateConfig({ outputMode: "console" });
650
+ }
651
+ /** Update the spinner text while running */
652
+ text(msg) {
653
+ this.message = msg;
654
+ }
655
+ render() {
656
+ const frame = SPINNER_FRAMES[this.frameIndex] ?? SPINNER_FRAMES[0];
657
+ const line = ` ${ANSI.fg.cyan}${frame}${ANSI.reset} ${this.message}`;
658
+ process.stderr.write(`\r\x1b[K${line}`);
659
+ }
660
+ clearLine() {
661
+ process.stderr.write("\r\x1B[K");
662
+ }
663
+ clearInterval() {
664
+ if (this.interval) {
665
+ clearInterval(this.interval);
666
+ this.interval = null;
667
+ }
668
+ }
669
+ };
670
+ /**
671
+ * No-op spinner for non-TTY environments or silent mode.
672
+ * Logs start/succeed/fail as plain log messages.
673
+ *
674
+ * @implements {ISpinnerHandle}
675
+ */
676
+ var NoopSpinner = class {
677
+ message;
678
+ _logger;
679
+ constructor(message, logger) {
680
+ this.message = message;
681
+ this._logger = logger;
682
+ }
683
+ start() {
684
+ this._logger.info(this.message);
685
+ }
686
+ stop() {}
687
+ succeed(msg) {
688
+ this._logger.success(msg ?? this.message);
689
+ }
690
+ fail(msg) {
691
+ this._logger.error(msg ?? this.message);
692
+ }
693
+ text(msg) {
694
+ this.message = msg;
695
+ }
696
+ };
697
+ //#endregion
698
+ export { renderDivider as a, formatBadge as c, renderBox as i, SpinnerManager as n, renderHeader as o, renderTable as r, renderStep as s, NoopSpinner as t };
699
+
700
+ //# sourceMappingURL=spinner-D3FsF78o.js.map