@mks2508/mks-ui 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (325) hide show
  1. package/dist/react-ui/blocks/Terminal/ResttyAdapter.d.ts +146 -0
  2. package/dist/react-ui/blocks/Terminal/ResttyAdapter.d.ts.map +1 -0
  3. package/dist/react-ui/blocks/Terminal/ResttyAdapter.js +213 -0
  4. package/dist/react-ui/blocks/Terminal/Terminal.adapter.d.ts +55 -0
  5. package/dist/react-ui/blocks/Terminal/Terminal.adapter.d.ts.map +1 -0
  6. package/dist/react-ui/blocks/Terminal/Terminal.adapter.js +68 -0
  7. package/dist/react-ui/blocks/Terminal/Terminal.theme.d.ts +43 -0
  8. package/dist/react-ui/blocks/Terminal/Terminal.theme.d.ts.map +1 -0
  9. package/dist/react-ui/blocks/Terminal/Terminal.theme.js +59 -0
  10. package/dist/react-ui/blocks/Terminal/Terminal.theme.restty.d.ts +63 -0
  11. package/dist/react-ui/blocks/Terminal/Terminal.theme.restty.d.ts.map +1 -0
  12. package/dist/react-ui/blocks/Terminal/Terminal.theme.restty.js +109 -0
  13. package/dist/react-ui/blocks/Terminal/Terminal.types.d.ts +351 -0
  14. package/dist/react-ui/blocks/Terminal/Terminal.types.d.ts.map +1 -0
  15. package/dist/react-ui/blocks/Terminal/TerminalPanel.d.ts +60 -0
  16. package/dist/react-ui/blocks/Terminal/TerminalPanel.d.ts.map +1 -0
  17. package/dist/react-ui/blocks/Terminal/TerminalPanel.js +183 -0
  18. package/dist/react-ui/blocks/Terminal/TerminalRestty.d.ts +111 -0
  19. package/dist/react-ui/blocks/Terminal/TerminalRestty.d.ts.map +1 -0
  20. package/dist/react-ui/blocks/Terminal/TerminalRestty.js +185 -0
  21. package/dist/react-ui/blocks/Terminal/TerminalXterm.d.ts +58 -0
  22. package/dist/react-ui/blocks/Terminal/TerminalXterm.d.ts.map +1 -0
  23. package/dist/react-ui/blocks/Terminal/TerminalXterm.js +143 -0
  24. package/dist/react-ui/blocks/Terminal/XTermAdapter.d.ts +87 -0
  25. package/dist/react-ui/blocks/Terminal/XTermAdapter.d.ts.map +1 -0
  26. package/dist/react-ui/blocks/Terminal/XTermAdapter.js +135 -0
  27. package/dist/react-ui/blocks/Terminal/components/LogLineBadges.d.ts +160 -0
  28. package/dist/react-ui/blocks/Terminal/components/LogLineBadges.d.ts.map +1 -0
  29. package/dist/react-ui/blocks/Terminal/components/LogLineBadges.js +185 -0
  30. package/dist/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.d.ts +48 -0
  31. package/dist/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.d.ts.map +1 -0
  32. package/dist/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.js +139 -0
  33. package/dist/react-ui/blocks/Terminal/components/SyntaxHighlight.d.ts +60 -0
  34. package/dist/react-ui/blocks/Terminal/components/SyntaxHighlight.d.ts.map +1 -0
  35. package/dist/react-ui/blocks/Terminal/components/SyntaxHighlight.js +352 -0
  36. package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge.d.ts +36 -0
  37. package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge.d.ts.map +1 -0
  38. package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge.js +52 -0
  39. package/dist/react-ui/blocks/Terminal/components/index.d.ts +10 -0
  40. package/dist/react-ui/blocks/Terminal/components/index.d.ts.map +1 -0
  41. package/dist/react-ui/blocks/Terminal/components/index.js +4 -0
  42. package/dist/react-ui/blocks/Terminal/hooks/index.d.ts +11 -0
  43. package/dist/react-ui/blocks/Terminal/hooks/index.d.ts.map +1 -0
  44. package/dist/react-ui/blocks/Terminal/hooks/index.js +2 -0
  45. package/dist/react-ui/blocks/Terminal/hooks/useTerminalSettings.d.ts +69 -0
  46. package/dist/react-ui/blocks/Terminal/hooks/useTerminalSettings.d.ts.map +1 -0
  47. package/dist/react-ui/blocks/Terminal/hooks/useTerminalSettings.js +162 -0
  48. package/dist/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.d.ts +104 -0
  49. package/dist/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.d.ts.map +1 -0
  50. package/dist/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.js +180 -0
  51. package/dist/react-ui/blocks/Terminal/index.d.ts +39 -0
  52. package/dist/react-ui/blocks/Terminal/index.d.ts.map +1 -0
  53. package/dist/react-ui/blocks/Terminal/index.js +38 -0
  54. package/dist/react-ui/blocks/Terminal/panel/LogLinesViewer.d.ts +58 -0
  55. package/dist/react-ui/blocks/Terminal/panel/LogLinesViewer.d.ts.map +1 -0
  56. package/dist/react-ui/blocks/Terminal/panel/LogLinesViewer.js +222 -0
  57. package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel.d.ts +74 -0
  58. package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel.d.ts.map +1 -0
  59. package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel.js +168 -0
  60. package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.d.ts +42 -0
  61. package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.d.ts.map +1 -0
  62. package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.js +175 -0
  63. package/dist/react-ui/blocks/Terminal/panel/TerminalFilterTabs.d.ts +43 -0
  64. package/dist/react-ui/blocks/Terminal/panel/TerminalFilterTabs.d.ts.map +1 -0
  65. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.d.ts +38 -0
  66. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.d.ts.map +1 -0
  67. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.js +62 -0
  68. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.d.ts +67 -0
  69. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.d.ts.map +1 -0
  70. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.d.ts +32 -0
  71. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.d.ts.map +1 -0
  72. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.js +326 -0
  73. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.d.ts +36 -0
  74. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.d.ts.map +1 -0
  75. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.js +371 -0
  76. package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.d.ts +67 -0
  77. package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.d.ts.map +1 -0
  78. package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.js +417 -0
  79. package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.d.ts +197 -0
  80. package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.d.ts.map +1 -0
  81. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.d.ts +54 -0
  82. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.d.ts.map +1 -0
  83. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.js +193 -0
  84. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.d.ts +57 -0
  85. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.d.ts.map +1 -0
  86. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter.d.ts +30 -0
  87. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter.d.ts.map +1 -0
  88. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter.js +126 -0
  89. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader.d.ts +31 -0
  90. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader.d.ts.map +1 -0
  91. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader.js +149 -0
  92. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.d.ts +35 -0
  93. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.d.ts.map +1 -0
  94. package/dist/react-ui/blocks/Terminal/panel/TerminalSessionControl.d.ts +58 -0
  95. package/dist/react-ui/blocks/Terminal/panel/TerminalSessionControl.d.ts.map +1 -0
  96. package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs.d.ts +63 -0
  97. package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs.d.ts.map +1 -0
  98. package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs.js +245 -0
  99. package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.d.ts +24 -0
  100. package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.d.ts.map +1 -0
  101. package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.js +225 -0
  102. package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector.d.ts +35 -0
  103. package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector.d.ts.map +1 -0
  104. package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector.js +187 -0
  105. package/dist/react-ui/blocks/Terminal/panel/index.d.ts +30 -0
  106. package/dist/react-ui/blocks/Terminal/panel/index.d.ts.map +1 -0
  107. package/dist/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module-Bovc57nm.css +60 -0
  108. package/dist/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module.js +5 -0
  109. package/dist/react-ui/blocks/Terminal/panel/terminal-session-tabs.module-QyxHO7cN.css +60 -0
  110. package/dist/react-ui/blocks/Terminal/panel/terminal-session-tabs.module.js +5 -0
  111. package/dist/react-ui/blocks/Terminal/parsing/BadgeFormatter.d.ts +73 -0
  112. package/dist/react-ui/blocks/Terminal/parsing/BadgeFormatter.d.ts.map +1 -0
  113. package/dist/react-ui/blocks/Terminal/parsing/BadgeFormatter.js +136 -0
  114. package/dist/react-ui/blocks/Terminal/parsing/HttpLogParser.d.ts +117 -0
  115. package/dist/react-ui/blocks/Terminal/parsing/HttpLogParser.d.ts.map +1 -0
  116. package/dist/react-ui/blocks/Terminal/parsing/HttpLogParser.js +174 -0
  117. package/dist/react-ui/blocks/Terminal/parsing/LogParser.types.d.ts +221 -0
  118. package/dist/react-ui/blocks/Terminal/parsing/LogParser.types.d.ts.map +1 -0
  119. package/dist/react-ui/blocks/Terminal/parsing/LogParserService.d.ts +184 -0
  120. package/dist/react-ui/blocks/Terminal/parsing/LogParserService.d.ts.map +1 -0
  121. package/dist/react-ui/blocks/Terminal/parsing/LogParserService.js +478 -0
  122. package/dist/react-ui/blocks/Terminal/parsing/MultilineAggregator.d.ts +173 -0
  123. package/dist/react-ui/blocks/Terminal/parsing/MultilineAggregator.d.ts.map +1 -0
  124. package/dist/react-ui/blocks/Terminal/parsing/MultilineAggregator.js +313 -0
  125. package/dist/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.d.ts +181 -0
  126. package/dist/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.d.ts.map +1 -0
  127. package/dist/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.js +221 -0
  128. package/dist/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.d.ts +69 -0
  129. package/dist/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.d.ts.map +1 -0
  130. package/dist/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.js +142 -0
  131. package/dist/react-ui/blocks/Terminal/parsing/TableParser.d.ts +125 -0
  132. package/dist/react-ui/blocks/Terminal/parsing/TableParser.d.ts.map +1 -0
  133. package/dist/react-ui/blocks/Terminal/parsing/TableParser.js +245 -0
  134. package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.d.ts +165 -0
  135. package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.d.ts.map +1 -0
  136. package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.js +225 -0
  137. package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.d.ts +164 -0
  138. package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.d.ts.map +1 -0
  139. package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.js +285 -0
  140. package/dist/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.d.ts +188 -0
  141. package/dist/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.d.ts.map +1 -0
  142. package/dist/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.js +178 -0
  143. package/dist/react-ui/blocks/Terminal/parsing/ansi/index.d.ts +12 -0
  144. package/dist/react-ui/blocks/Terminal/parsing/ansi/index.d.ts.map +1 -0
  145. package/dist/react-ui/blocks/Terminal/parsing/index.d.ts +24 -0
  146. package/dist/react-ui/blocks/Terminal/parsing/index.d.ts.map +1 -0
  147. package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.d.ts +56 -0
  148. package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.d.ts.map +1 -0
  149. package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.d.ts +140 -0
  150. package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.d.ts.map +1 -0
  151. package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.js +325 -0
  152. package/dist/react-ui/blocks/Terminal/parsing/levels/index.d.ts +10 -0
  153. package/dist/react-ui/blocks/Terminal/parsing/levels/index.d.ts.map +1 -0
  154. package/dist/react-ui/blocks/index.d.ts +11 -0
  155. package/dist/react-ui/blocks/index.d.ts.map +1 -0
  156. package/dist/react-ui/icons/lucide-animated/activity.js +1 -1
  157. package/dist/react-ui/icons/lucide-animated/bell-electric.js +1 -1
  158. package/dist/react-ui/icons/lucide-animated/bell.js +1 -1
  159. package/dist/react-ui/icons/lucide-animated/bot.js +1 -1
  160. package/dist/react-ui/icons/lucide-animated/box.js +1 -1
  161. package/dist/react-ui/icons/lucide-animated/circle-check.js +1 -1
  162. package/dist/react-ui/icons/lucide-animated/delete.js +1 -1
  163. package/dist/react-ui/icons/lucide-animated/download.js +1 -1
  164. package/dist/react-ui/icons/lucide-animated/home.js +1 -1
  165. package/dist/react-ui/icons/lucide-animated/layout-panel-top.js +1 -1
  166. package/dist/react-ui/icons/lucide-animated/plus.js +1 -1
  167. package/dist/react-ui/icons/lucide-animated/search.js +1 -1
  168. package/dist/react-ui/icons/lucide-animated/settings.js +1 -1
  169. package/dist/react-ui/icons/lucide-animated/trending-down.js +1 -1
  170. package/dist/react-ui/icons/lucide-animated/trending-up.js +1 -1
  171. package/dist/react-ui/icons/lucide-animated/x.js +1 -1
  172. package/dist/react-ui/index.js +4 -1
  173. package/dist/react-ui/lib/icon-wrapper.d.ts +37 -0
  174. package/dist/react-ui/lib/icon-wrapper.d.ts.map +1 -0
  175. package/dist/react-ui/lib/icon-wrapper.js +55 -0
  176. package/dist/react-ui/lib/index.d.ts +1 -0
  177. package/dist/react-ui/lib/index.d.ts.map +1 -1
  178. package/dist/react-ui/lib/index.js +1 -0
  179. package/dist/react-ui/primitives/AutoHeight/index.d.ts +1 -1
  180. package/dist/react-ui/primitives/CountingNumber/index.d.ts +1 -1
  181. package/dist/react-ui/primitives/waapi/SlidingNumber/SlidingNumber.styles.d.ts +1 -1
  182. package/dist/react-ui/primitives/waapi/SlidingText/SlidingText.styles.d.ts +1 -1
  183. package/dist/react-ui/ui/Accordion/Accordion.styles.d.ts +1 -1
  184. package/dist/react-ui/ui/Accordion/Accordion.types.d.ts +1 -1
  185. package/dist/react-ui/ui/AlertDialog/AlertDialog.styles.d.ts +1 -1
  186. package/dist/react-ui/ui/AlertDialog/AlertDialog.types.d.ts +1 -1
  187. package/dist/react-ui/ui/Badge/Badge.styles.d.ts +1 -1
  188. package/dist/react-ui/ui/Badge/Badge.types.d.ts +1 -1
  189. package/dist/react-ui/ui/Button/Button.styles.d.ts +2 -2
  190. package/dist/react-ui/ui/Button/Button.types.d.ts +1 -1
  191. package/dist/react-ui/ui/Card/Card.styles.d.ts +1 -1
  192. package/dist/react-ui/ui/Card/Card.types.d.ts +1 -1
  193. package/dist/react-ui/ui/Checkbox/Checkbox.styles.d.ts +1 -1
  194. package/dist/react-ui/ui/Checkbox/Checkbox.types.d.ts +1 -1
  195. package/dist/react-ui/ui/Combobox/Combobox.styles.d.ts +1 -1
  196. package/dist/react-ui/ui/Combobox/Combobox.types.d.ts +1 -1
  197. package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.d.ts +2 -2
  198. package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.js +1 -1
  199. package/dist/react-ui/ui/CornerBracket/CornerBracket.types.d.ts +1 -1
  200. package/dist/react-ui/ui/DataCard/DataCard.styles.d.ts +1 -1
  201. package/dist/react-ui/ui/DataCard/DataCard.types.d.ts +1 -1
  202. package/dist/react-ui/ui/DataCard/index.d.ts +1 -1
  203. package/dist/react-ui/ui/Dialog/Dialog.styles.d.ts +1 -1
  204. package/dist/react-ui/ui/Dialog/Dialog.types.d.ts +1 -1
  205. package/dist/react-ui/ui/DropdownMenu/DropdownMenu.styles.d.ts +1 -1
  206. package/dist/react-ui/ui/DropdownMenu/DropdownMenu.types.d.ts +1 -1
  207. package/dist/react-ui/ui/Field/Field.styles.d.ts +1 -1
  208. package/dist/react-ui/ui/Field/Field.types.d.ts +1 -1
  209. package/dist/react-ui/ui/Input/Input.styles.d.ts +1 -1
  210. package/dist/react-ui/ui/Input/Input.types.d.ts +1 -1
  211. package/dist/react-ui/ui/InputGroup/InputGroup.styles.d.ts +1 -1
  212. package/dist/react-ui/ui/InputGroup/InputGroup.types.d.ts +1 -1
  213. package/dist/react-ui/ui/Label/Label.styles.d.ts +1 -1
  214. package/dist/react-ui/ui/Label/Label.types.d.ts +1 -1
  215. package/dist/react-ui/ui/Menu/Menu.styles.d.ts +1 -1
  216. package/dist/react-ui/ui/Menu/Menu.types.d.ts +2 -2
  217. package/dist/react-ui/ui/Popover/Popover.styles.d.ts +1 -1
  218. package/dist/react-ui/ui/Popover/Popover.types.d.ts +1 -1
  219. package/dist/react-ui/ui/Progress/Progress.styles.d.ts +1 -1
  220. package/dist/react-ui/ui/Progress/Progress.types.d.ts +2 -2
  221. package/dist/react-ui/ui/Select/Select.styles.d.ts +1 -1
  222. package/dist/react-ui/ui/Select/Select.types.d.ts +1 -1
  223. package/dist/react-ui/ui/Separator/Separator.styles.d.ts +1 -1
  224. package/dist/react-ui/ui/Separator/Separator.types.d.ts +1 -1
  225. package/dist/react-ui/ui/Switch/Switch.styles.d.ts +1 -1
  226. package/dist/react-ui/ui/Switch/Switch.types.d.ts +1 -1
  227. package/dist/react-ui/ui/Tabs/Tabs.styles.d.ts +43 -25
  228. package/dist/react-ui/ui/Tabs/Tabs.styles.d.ts.map +1 -1
  229. package/dist/react-ui/ui/Tabs/Tabs.styles.js +105 -13
  230. package/dist/react-ui/ui/Tabs/Tabs.types.d.ts +9 -6
  231. package/dist/react-ui/ui/Tabs/Tabs.types.d.ts.map +1 -1
  232. package/dist/react-ui/ui/Tabs/index.d.ts +18 -9
  233. package/dist/react-ui/ui/Tabs/index.d.ts.map +1 -1
  234. package/dist/react-ui/ui/Tabs/index.js +99 -27
  235. package/dist/react-ui/ui/TextFlow/TextFlow.styles.d.ts +1 -1
  236. package/dist/react-ui/ui/Textarea/Textarea.styles.d.ts +1 -1
  237. package/dist/react-ui/ui/Textarea/Textarea.types.d.ts +1 -1
  238. package/dist/react-ui/ui/Tooltip/Tooltip.styles.d.ts +1 -1
  239. package/dist/react-ui/ui/Tooltip/Tooltip.types.d.ts +1 -1
  240. package/dist/react-ui/ui/index.d.ts +1 -0
  241. package/dist/react-ui/ui/index.d.ts.map +1 -1
  242. package/dist/react-ui/ui/index.js +2 -0
  243. package/package.json +54 -6
  244. package/src/react-ui/blocks/Terminal/ResttyAdapter.ts +278 -0
  245. package/src/react-ui/blocks/Terminal/Terminal.adapter.ts +97 -0
  246. package/src/react-ui/blocks/Terminal/Terminal.theme.restty.ts +155 -0
  247. package/src/react-ui/blocks/Terminal/Terminal.theme.ts +80 -0
  248. package/src/react-ui/blocks/Terminal/Terminal.types.ts +438 -0
  249. package/src/react-ui/blocks/Terminal/TerminalPanel.tsx +269 -0
  250. package/src/react-ui/blocks/Terminal/TerminalRestty.tsx +326 -0
  251. package/src/react-ui/blocks/Terminal/TerminalXterm.tsx +230 -0
  252. package/src/react-ui/blocks/Terminal/XTermAdapter.ts +163 -0
  253. package/src/react-ui/blocks/Terminal/components/LogLineBadges.tsx +316 -0
  254. package/src/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.tsx +218 -0
  255. package/src/react-ui/blocks/Terminal/components/SyntaxHighlight.tsx +386 -0
  256. package/src/react-ui/blocks/Terminal/components/TerminalLogBadge.tsx +67 -0
  257. package/src/react-ui/blocks/Terminal/components/index.ts +10 -0
  258. package/src/react-ui/blocks/Terminal/hooks/index.ts +22 -0
  259. package/src/react-ui/blocks/Terminal/hooks/useTerminalSettings.ts +229 -0
  260. package/src/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.ts +292 -0
  261. package/src/react-ui/blocks/Terminal/index.ts +103 -0
  262. package/src/react-ui/blocks/Terminal/panel/LogLinesViewer.tsx +330 -0
  263. package/src/react-ui/blocks/Terminal/panel/TerminalDebugPanel.tsx +242 -0
  264. package/src/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.tsx +202 -0
  265. package/src/react-ui/blocks/Terminal/panel/TerminalFilterTabs.tsx +140 -0
  266. package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.tsx +68 -0
  267. package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.ts +85 -0
  268. package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.tsx +383 -0
  269. package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.tsx +439 -0
  270. package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.tsx +550 -0
  271. package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.ts +259 -0
  272. package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.tsx +237 -0
  273. package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.ts +76 -0
  274. package/src/react-ui/blocks/Terminal/panel/TerminalPanelFooter.tsx +112 -0
  275. package/src/react-ui/blocks/Terminal/panel/TerminalPanelHeader.tsx +178 -0
  276. package/src/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.tsx +203 -0
  277. package/src/react-ui/blocks/Terminal/panel/TerminalSessionControl.tsx +252 -0
  278. package/src/react-ui/blocks/Terminal/panel/TerminalSessionTabs.tsx +334 -0
  279. package/src/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.tsx +261 -0
  280. package/src/react-ui/blocks/Terminal/panel/TerminalThemeSelector.tsx +248 -0
  281. package/src/react-ui/blocks/Terminal/panel/index.ts +72 -0
  282. package/src/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module.css +59 -0
  283. package/src/react-ui/blocks/Terminal/panel/terminal-session-tabs.module.css +59 -0
  284. package/src/react-ui/blocks/Terminal/parsing/BadgeFormatter.ts +180 -0
  285. package/src/react-ui/blocks/Terminal/parsing/HttpLogParser.ts +248 -0
  286. package/src/react-ui/blocks/Terminal/parsing/LogParser.types.ts +283 -0
  287. package/src/react-ui/blocks/Terminal/parsing/LogParserService.ts +686 -0
  288. package/src/react-ui/blocks/Terminal/parsing/MultilineAggregator.ts +466 -0
  289. package/src/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.ts +343 -0
  290. package/src/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.ts +167 -0
  291. package/src/react-ui/blocks/Terminal/parsing/TableParser.ts +348 -0
  292. package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.ts +251 -0
  293. package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.ts +390 -0
  294. package/src/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.ts +320 -0
  295. package/src/react-ui/blocks/Terminal/parsing/ansi/index.ts +20 -0
  296. package/src/react-ui/blocks/Terminal/parsing/index.ts +69 -0
  297. package/src/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.ts +68 -0
  298. package/src/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.ts +436 -0
  299. package/src/react-ui/blocks/Terminal/parsing/levels/index.ts +14 -0
  300. package/src/react-ui/blocks/index.ts +11 -0
  301. package/src/react-ui/icons/lucide-animated/activity.tsx +2 -2
  302. package/src/react-ui/icons/lucide-animated/bell-electric.tsx +1 -1
  303. package/src/react-ui/icons/lucide-animated/bell.tsx +2 -2
  304. package/src/react-ui/icons/lucide-animated/bot.tsx +1 -1
  305. package/src/react-ui/icons/lucide-animated/box.tsx +2 -2
  306. package/src/react-ui/icons/lucide-animated/circle-check.tsx +2 -2
  307. package/src/react-ui/icons/lucide-animated/delete.tsx +2 -2
  308. package/src/react-ui/icons/lucide-animated/download.tsx +2 -2
  309. package/src/react-ui/icons/lucide-animated/home.tsx +2 -2
  310. package/src/react-ui/icons/lucide-animated/layout-panel-top.tsx +1 -1
  311. package/src/react-ui/icons/lucide-animated/plus.tsx +1 -1
  312. package/src/react-ui/icons/lucide-animated/search.tsx +1 -1
  313. package/src/react-ui/icons/lucide-animated/settings.tsx +1 -1
  314. package/src/react-ui/icons/lucide-animated/trending-down.tsx +2 -2
  315. package/src/react-ui/icons/lucide-animated/trending-up.tsx +2 -2
  316. package/src/react-ui/icons/lucide-animated/x.tsx +2 -2
  317. package/src/react-ui/lib/icon-wrapper.tsx +70 -0
  318. package/src/react-ui/lib/index.ts +1 -0
  319. package/src/react-ui/ui/CornerBracket/CornerBracket.styles.ts +1 -1
  320. package/src/react-ui/ui/Tabs/Tabs.css +39 -0
  321. package/src/react-ui/ui/Tabs/Tabs.styles.ts +119 -31
  322. package/src/react-ui/ui/Tabs/Tabs.types.ts +8 -3
  323. package/src/react-ui/ui/Tabs/index.tsx +135 -27
  324. package/src/react-ui/ui/index.ts +1 -0
  325. package/dist/index.css +0 -129
@@ -0,0 +1,316 @@
1
+ /**
2
+ * React badge components for log lines.
3
+ *
4
+ * Styled badge components using Tailwind CSS for the React log viewer.
5
+ * Provides level badges, timestamp badges, and tag badges with consistent
6
+ * Synthwave Dark theme styling.
7
+ *
8
+ * All badge components are memoized for optimal performance.
9
+ *
10
+ * @module components/devenv/terminal/LogLineBadges
11
+ */
12
+
13
+ 'use client';
14
+
15
+ import { memo } from 'react';
16
+ import type { TLogLevel, TContentType } from '../parsing';
17
+ import { cn } from '@/react-ui/lib/utils';
18
+
19
+ /**
20
+ * Level badge color mapping.
21
+ *
22
+ * Maps each log level to its corresponding Tailwind color classes.
23
+ */
24
+ const LEVEL_COLORS: Record<TLogLevel, string> = {
25
+ info: 'bg-blue-500/15 text-blue-400 border-blue-500/25 shadow-[0_0_6px_rgba(59,130,246,0.15)]',
26
+ warn: 'bg-yellow-500/15 text-yellow-400 border-yellow-500/25 shadow-[0_0_6px_rgba(234,179,8,0.15)]',
27
+ error: 'bg-red-500/20 text-red-400 border-red-500/30 shadow-[0_0_8px_rgba(239,68,68,0.2)]',
28
+ fatal: 'bg-pink-500/20 text-pink-400 border-pink-500/30 shadow-[0_0_8px_rgba(236,72,153,0.2)]',
29
+ debug: 'bg-cyan-500/15 text-cyan-400 border-cyan-500/25 shadow-[0_0_6px_rgba(6,182,212,0.15)]',
30
+ trace: 'bg-gray-500/10 text-gray-400 border-gray-500/20',
31
+ unknown: 'bg-gray-500/8 text-gray-500 border-gray-500/15',
32
+ };
33
+
34
+ /**
35
+ * Props for LevelBadge component.
36
+ */
37
+ export interface ILevelBadgeProps {
38
+ /** Log level to display */
39
+ level: TLogLevel;
40
+ /** Optional custom class name */
41
+ className?: string;
42
+ }
43
+
44
+ /**
45
+ * Level badge component (memoized).
46
+ *
47
+ * Displays a colored badge with the log level label.
48
+ * Uses Synthwave Dark theme colors with glassmorphic effect.
49
+ *
50
+ * @example
51
+ * ```tsx
52
+ * <LevelBadge level="info" />
53
+ * // Renders: [INFO] with blue background
54
+ * ```
55
+ */
56
+ export const LevelBadge = memo(function LevelBadge({ level, className }: ILevelBadgeProps): React.JSX.Element {
57
+ return (
58
+ <span
59
+ className={cn(
60
+ 'px-2 py-0.5 rounded border font-mono text-[10px] font-bold tracking-wider',
61
+ LEVEL_COLORS[level],
62
+ className
63
+ )}
64
+ >
65
+ {level.toUpperCase()}
66
+ </span>
67
+ );
68
+ });
69
+
70
+ /**
71
+ * Props for TimestampBadge component.
72
+ */
73
+ export interface ITimestampBadgeProps {
74
+ /** Timestamp string to display */
75
+ timestamp: string;
76
+ /** Optional custom class name */
77
+ className?: string;
78
+ }
79
+
80
+ /**
81
+ * Timestamp badge component (memoized).
82
+ *
83
+ * Displays a timestamp with muted styling.
84
+ * Uses tabular numbers for consistent alignment.
85
+ *
86
+ * @example
87
+ * ```tsx
88
+ * <TimestampBadge timestamp="22:41:03" />
89
+ * // Renders: 22:41:03 in gray
90
+ * ```
91
+ */
92
+ export const TimestampBadge = memo(function TimestampBadge({ timestamp, className }: ITimestampBadgeProps): React.JSX.Element {
93
+ // Truncate to HH:MM:SS format for consistent width
94
+ const timeOnly = timestamp.includes('.')
95
+ ? timestamp.split('.')[0]
96
+ : timestamp;
97
+
98
+ return (
99
+ <span
100
+ className={cn(
101
+ 'ml-auto text-muted-foreground font-mono text-xs tabular-nums',
102
+ 'opacity-70',
103
+ className
104
+ )}
105
+ >
106
+ {timeOnly}
107
+ </span>
108
+ );
109
+ });
110
+
111
+ /**
112
+ * Props for TagBadge component.
113
+ */
114
+ export interface ITagBadgeProps {
115
+ /** Tag string to display */
116
+ tag: string;
117
+ /** Optional custom class name */
118
+ className?: string;
119
+ }
120
+
121
+ /**
122
+ * Tag badge component (memoized).
123
+ *
124
+ * Displays a component tag (e.g., "API", "ROUTES").
125
+ * Truncates long tags to 12 characters.
126
+ *
127
+ * @example
128
+ * ```tsx
129
+ * <TagBadge tag="WORKSPACEMANAGER" />
130
+ * // Renders: [WORKSPACEMAN...] in cyan
131
+ * ```
132
+ */
133
+ export const TagBadge = memo(function TagBadge({ tag, className }: ITagBadgeProps): React.JSX.Element {
134
+ // Truncate long tags
135
+ const displayTag = tag.length > 12 ? tag.slice(0, 9) + '...' : tag;
136
+
137
+ return (
138
+ <span
139
+ className={cn(
140
+ 'px-1.5 py-0.5 rounded border font-mono text-xs',
141
+ 'bg-purple-500/10 text-purple-400 border-purple-500/20',
142
+ className
143
+ )}
144
+ >
145
+ {displayTag}
146
+ </span>
147
+ );
148
+ });
149
+
150
+ /**
151
+ * Props for TagBadges component.
152
+ */
153
+ export interface ITagBadgesProps {
154
+ /** Array of tag strings */
155
+ tags: string[];
156
+ /** Optional custom class name */
157
+ className?: string;
158
+ }
159
+
160
+ /**
161
+ * Tag badges container component (memoized).
162
+ *
163
+ * Displays multiple tag badges with consistent spacing.
164
+ *
165
+ * @example
166
+ * ```tsx
167
+ * <TagBadges tags={['API', 'ROUTES']} />
168
+ * // Renders: [API][ROUTES] with spacing
169
+ * ```
170
+ */
171
+ export const TagBadges = memo(function TagBadges({ tags, className }: ITagBadgesProps): React.JSX.Element | null {
172
+ if (!tags || tags.length === 0) return null;
173
+
174
+ return (
175
+ <span className={cn('flex items-center gap-1', className)}>
176
+ {tags.map((tag) => (
177
+ <TagBadge key={tag} tag={tag} />
178
+ ))}
179
+ </span>
180
+ );
181
+ });
182
+
183
+ /**
184
+ * Content type badge color and label mapping.
185
+ *
186
+ * Maps each content type to its display label and Tailwind color classes.
187
+ * 'plain' entries are hidden (no badge rendered).
188
+ */
189
+ const CONTENT_TYPE_STYLES: Record<TContentType, { label: string; className: string }> = {
190
+ plain: { label: '', className: '' },
191
+ http: {
192
+ label: 'HTTP',
193
+ className: 'bg-cyan-500/15 text-cyan-400 border-cyan-500/25 shadow-[0_0_6px_rgba(6,182,212,0.15)]',
194
+ },
195
+ json: {
196
+ label: 'JSON',
197
+ className: 'bg-emerald-500/15 text-emerald-400 border-emerald-500/25 shadow-[0_0_6px_rgba(16,185,129,0.15)]',
198
+ },
199
+ table: {
200
+ label: 'TABLE',
201
+ className: 'bg-violet-500/15 text-violet-400 border-violet-500/25 shadow-[0_0_6px_rgba(139,92,246,0.15)]',
202
+ },
203
+ error: {
204
+ label: 'ERR',
205
+ className: 'bg-red-500/20 text-red-400 border-red-500/30 shadow-[0_0_8px_rgba(239,68,68,0.2)]',
206
+ },
207
+ };
208
+
209
+ /**
210
+ * Props for ContentTypeBadge component.
211
+ */
212
+ export interface IContentTypeBadgeProps {
213
+ /** Content type of the log entry */
214
+ contentType: TContentType;
215
+ /** HTTP method (GET, POST, etc.) — shown instead of generic "HTTP" label */
216
+ httpMethod?: string;
217
+ /** Optional custom class name */
218
+ className?: string;
219
+ }
220
+
221
+ /**
222
+ * Content type badge component (memoized).
223
+ *
224
+ * Displays a colored badge indicating the content type of a log entry
225
+ * (HTTP, JSON, TABLE, ERR). HTTP entries show the actual method
226
+ * (GET, POST, etc.) instead of a generic "HTTP" label.
227
+ *
228
+ * Returns null for 'plain' content type — no badge rendered.
229
+ *
230
+ * @example
231
+ * ```tsx
232
+ * <ContentTypeBadge contentType="http" httpMethod="GET" />
233
+ * // Renders: [GET] in cyan
234
+ *
235
+ * <ContentTypeBadge contentType="json" />
236
+ * // Renders: [JSON] in emerald
237
+ * ```
238
+ */
239
+ export const ContentTypeBadge = memo(function ContentTypeBadge({
240
+ contentType,
241
+ httpMethod,
242
+ className,
243
+ }: IContentTypeBadgeProps): React.JSX.Element | null {
244
+ if (contentType === 'plain' || !contentType) return null;
245
+ const style = CONTENT_TYPE_STYLES[contentType];
246
+
247
+ // HTTP entries show the actual method (GET, POST, etc.) instead of generic "HTTP"
248
+ const label = contentType === 'http' && httpMethod
249
+ ? httpMethod.toUpperCase()
250
+ : style.label;
251
+
252
+ return (
253
+ <span className={cn(
254
+ 'px-1.5 py-0.5 rounded border font-mono text-[10px] font-bold tracking-wider',
255
+ style.className,
256
+ className
257
+ )}>
258
+ {label}
259
+ </span>
260
+ );
261
+ });
262
+
263
+ /**
264
+ * Props for LogLineContainer component.
265
+ */
266
+ export interface ILogLineContainerProps {
267
+ /** Log level for styling */
268
+ level: TLogLevel;
269
+ /** Line number */
270
+ lineNumber: number;
271
+ /** Whether this is a continuation line */
272
+ isContinuation?: boolean;
273
+ /** Optional custom class name */
274
+ className?: string;
275
+ /** Child elements */
276
+ children: React.ReactNode;
277
+ }
278
+
279
+ /**
280
+ * Log line container component.
281
+ *
282
+ * Provides consistent styling and structure for log lines.
283
+ * Adds subtle hover effect and line number on hover.
284
+ *
285
+ * @example
286
+ * ```tsx
287
+ * <LogLineContainer level="info" lineNumber={42}>
288
+ * <LevelBadge level="info" />
289
+ * <span>Log message here</span>
290
+ * </LogLineContainer>
291
+ * ```
292
+ */
293
+ export function LogLineContainer({
294
+ level,
295
+ lineNumber,
296
+ isContinuation = false,
297
+ className,
298
+ children,
299
+ }: ILogLineContainerProps): React.JSX.Element {
300
+ return (
301
+ <div
302
+ className={cn(
303
+ 'group flex items-start gap-2 py-0.5 px-2 rounded-sm',
304
+ 'hover:bg-white/5 transition-colors duration-150',
305
+ 'border-l-2',
306
+ isContinuation ? 'border-transparent ml-6' : 'border-transparent',
307
+ // Add colored left border on hover based on level
308
+ `hover:border-${level === 'error' || level === 'fatal' ? 'red' : level === 'warn' ? 'yellow' : 'blue'}-500/50`,
309
+ className
310
+ )}
311
+ title={`Line ${lineNumber}`}
312
+ >
313
+ {children}
314
+ </div>
315
+ );
316
+ }
@@ -0,0 +1,218 @@
1
+ /**
2
+ * Specialized syntax highlighter for different log content types.
3
+ *
4
+ * Provides syntax highlighting for HTTP requests, tables, and JSON
5
+ * with appropriate styling for each type.
6
+ *
7
+ * @module components/devenv/terminal/SpecializedSyntaxHighlighter
8
+ */
9
+
10
+ 'use client';
11
+
12
+ import { HttpLogParser } from '../parsing/HttpLogParser';
13
+ import { TableParser, TABLE_CHARS } from '../parsing/TableParser';
14
+ import { HighlightedJson } from './SyntaxHighlight';
15
+ import { cn } from '@/react-ui/lib/utils';
16
+
17
+ /**
18
+ * Props for specialized syntax highlighting.
19
+ */
20
+ export interface ISpecializedSyntaxHighlighterProps {
21
+ /** Content type */
22
+ contentType?: 'plain' | 'http' | 'json' | 'table' | 'error';
23
+
24
+ /** HTTP method (for HTTP content) */
25
+ httpMethod?: string;
26
+
27
+ /** HTTP path (for HTTP content) */
28
+ httpPath?: string;
29
+
30
+ /** Table data (for table content) */
31
+ tableData?: unknown;
32
+
33
+ /** JSON data (for JSON content) */
34
+ jsonData?: Record<string, unknown> | unknown;
35
+
36
+ /** Raw text to highlight */
37
+ text: string;
38
+
39
+ /** Optional custom class name */
40
+ className?: string;
41
+ }
42
+
43
+ // Singleton instances
44
+ const httpParser = new HttpLogParser();
45
+ const tableParser = new TableParser();
46
+
47
+ /**
48
+ * Specialized syntax highlighter component.
49
+ *
50
+ * Applies appropriate highlighting based on content type:
51
+ * - HTTP: pink method, cyan path
52
+ * - JSON: structured syntax highlighting
53
+ * - Table: borders in gray, content in colors
54
+ * - Plain: default highlighting
55
+ *
56
+ * @example
57
+ * ```tsx
58
+ * <SpecializedSyntaxHighlighter
59
+ * contentType="http"
60
+ * httpMethod="GET"
61
+ * httpPath="/api/endpoint"
62
+ * text="GET /api/endpoint {"
63
+ * />
64
+ * ```
65
+ */
66
+ export function SpecializedSyntaxHighlighter({
67
+ contentType = 'plain',
68
+ httpMethod: _httpMethod,
69
+ httpPath: _httpPath,
70
+ tableData: _tableData,
71
+ jsonData,
72
+ text,
73
+ className,
74
+ }: ISpecializedSyntaxHighlighterProps): React.JSX.Element {
75
+ // HTTP content highlighting
76
+ if (contentType === 'http') {
77
+ return <HttpHighlighter text={text} className={className} />;
78
+ }
79
+
80
+ // JSON content highlighting
81
+ if (contentType === 'json' && jsonData) {
82
+ return (
83
+ <div className={cn('font-mono text-xs', className)}>
84
+ <HighlightedJson json={jsonData as Record<string, unknown>} />
85
+ </div>
86
+ );
87
+ }
88
+
89
+ // Table content highlighting
90
+ if (contentType === 'table') {
91
+ return <TableHighlighter text={text} className={className} />;
92
+ }
93
+
94
+ // Plain content - use default syntax highlighting
95
+ return <span className={cn('font-mono text-sm', className)}>{text}</span>;
96
+ }
97
+
98
+ /**
99
+ * HTTP request syntax highlighter.
100
+ *
101
+ * Highlights HTTP method (pink) and path (cyan).
102
+ */
103
+ function HttpHighlighter({ text, className }: { text: string; className?: string }): React.JSX.Element {
104
+ const parts = httpParser.highlightLine(text);
105
+
106
+ return (
107
+ <span className={cn('font-mono text-sm', className)}>
108
+ {parts.map((part, i) => (
109
+ <span key={i} className={part.className}>
110
+ {part.text}
111
+ </span>
112
+ ))}
113
+ </span>
114
+ );
115
+ }
116
+
117
+ /**
118
+ * Table syntax highlighter.
119
+ *
120
+ * Renders detected tables as actual styled HTML tables
121
+ * with header detection, alternating rows, and proper borders.
122
+ * Falls back to box-drawing character highlighting.
123
+ */
124
+ function TableHighlighter({ text, className }: { text: string; className?: string }): React.JSX.Element {
125
+ const lines = text.split('\n').filter((l) => l.trim().length > 0);
126
+
127
+ // Try to extract structured table data
128
+ const tableData = tableParser.parseTable(lines, 0);
129
+ const { headers, dataRows } = tableData;
130
+
131
+ // If we have structured data, render as an actual HTML table
132
+ if (dataRows.length > 0 && (headers || dataRows.length > 1)) {
133
+ const displayHeaders = headers || (dataRows.length > 1 ? dataRows[0] : undefined);
134
+ const displayRows = headers ? dataRows.filter((r) => r !== headers) : dataRows.slice(displayHeaders ? 1 : 0);
135
+
136
+ return (
137
+ <div className={cn('my-1 overflow-x-auto rounded-md border border-border/20', className)}>
138
+ <table className="w-full font-mono text-xs border-collapse">
139
+ {displayHeaders && (
140
+ <thead>
141
+ <tr className="bg-muted/30 border-b border-border/30">
142
+ {displayHeaders.map((header, i) => (
143
+ <th
144
+ key={i}
145
+ className="px-3 py-1.5 text-left text-[10px] font-bold uppercase tracking-wider text-muted-foreground/80"
146
+ >
147
+ {header}
148
+ </th>
149
+ ))}
150
+ </tr>
151
+ </thead>
152
+ )}
153
+ <tbody>
154
+ {displayRows.map((row, i) => (
155
+ <tr
156
+ key={i}
157
+ className={cn(
158
+ 'border-b border-border/10 transition-colors hover:bg-white/[0.04]',
159
+ i % 2 === 0 ? 'bg-transparent' : 'bg-white/[0.02]'
160
+ )}
161
+ >
162
+ {row.map((cell, j) => (
163
+ <td key={j} className="px-3 py-1 text-foreground/85 whitespace-nowrap">
164
+ {cell}
165
+ </td>
166
+ ))}
167
+ </tr>
168
+ ))}
169
+ </tbody>
170
+ </table>
171
+ </div>
172
+ );
173
+ }
174
+
175
+ // Fallback: render with box-drawing character highlighting
176
+ return (
177
+ <div className={cn('font-mono text-xs', className)}>
178
+ {lines.map((line, i) => {
179
+ const rowType = tableParser.getRowType(line);
180
+ const rowClass = tableParser.getRowClass(rowType);
181
+ return (
182
+ <div key={i} className={rowClass}>
183
+ <TableRowLine line={line} />
184
+ </div>
185
+ );
186
+ })}
187
+ </div>
188
+ );
189
+ }
190
+
191
+ /**
192
+ * Individual table row with box-drawing character highlighting.
193
+ */
194
+ function TableRowLine({ line }: { line: string }): React.JSX.Element {
195
+ const parts: React.ReactNode[] = [];
196
+ let lastIndex = 0;
197
+
198
+ for (let i = 0; i < line.length; i++) {
199
+ const char = line[i];
200
+ if (TABLE_CHARS.includes(char as typeof TABLE_CHARS[number])) {
201
+ if (i > lastIndex) {
202
+ parts.push(<span key={lastIndex}>{line.slice(lastIndex, i)}</span>);
203
+ }
204
+ parts.push(<span key={i} className="text-border/40">{char}</span>);
205
+ lastIndex = i + 1;
206
+ }
207
+ }
208
+
209
+ if (lastIndex < line.length) {
210
+ parts.push(<span key={lastIndex}>{line.slice(lastIndex)}</span>);
211
+ }
212
+
213
+ if (parts.length === 0) {
214
+ return <span>{line}</span>;
215
+ }
216
+
217
+ return <>{parts}</>;
218
+ }