@mks2508/mks-ui 0.3.2 → 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 (322) 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 +3 -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.js +1 -0
  241. package/package.json +54 -6
  242. package/src/react-ui/blocks/Terminal/ResttyAdapter.ts +278 -0
  243. package/src/react-ui/blocks/Terminal/Terminal.adapter.ts +97 -0
  244. package/src/react-ui/blocks/Terminal/Terminal.theme.restty.ts +155 -0
  245. package/src/react-ui/blocks/Terminal/Terminal.theme.ts +80 -0
  246. package/src/react-ui/blocks/Terminal/Terminal.types.ts +438 -0
  247. package/src/react-ui/blocks/Terminal/TerminalPanel.tsx +269 -0
  248. package/src/react-ui/blocks/Terminal/TerminalRestty.tsx +326 -0
  249. package/src/react-ui/blocks/Terminal/TerminalXterm.tsx +230 -0
  250. package/src/react-ui/blocks/Terminal/XTermAdapter.ts +163 -0
  251. package/src/react-ui/blocks/Terminal/components/LogLineBadges.tsx +316 -0
  252. package/src/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.tsx +218 -0
  253. package/src/react-ui/blocks/Terminal/components/SyntaxHighlight.tsx +386 -0
  254. package/src/react-ui/blocks/Terminal/components/TerminalLogBadge.tsx +67 -0
  255. package/src/react-ui/blocks/Terminal/components/index.ts +10 -0
  256. package/src/react-ui/blocks/Terminal/hooks/index.ts +22 -0
  257. package/src/react-ui/blocks/Terminal/hooks/useTerminalSettings.ts +229 -0
  258. package/src/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.ts +292 -0
  259. package/src/react-ui/blocks/Terminal/index.ts +103 -0
  260. package/src/react-ui/blocks/Terminal/panel/LogLinesViewer.tsx +330 -0
  261. package/src/react-ui/blocks/Terminal/panel/TerminalDebugPanel.tsx +242 -0
  262. package/src/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.tsx +202 -0
  263. package/src/react-ui/blocks/Terminal/panel/TerminalFilterTabs.tsx +140 -0
  264. package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.tsx +68 -0
  265. package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.ts +85 -0
  266. package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.tsx +383 -0
  267. package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.tsx +439 -0
  268. package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.tsx +550 -0
  269. package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.ts +259 -0
  270. package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.tsx +237 -0
  271. package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.ts +76 -0
  272. package/src/react-ui/blocks/Terminal/panel/TerminalPanelFooter.tsx +112 -0
  273. package/src/react-ui/blocks/Terminal/panel/TerminalPanelHeader.tsx +178 -0
  274. package/src/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.tsx +203 -0
  275. package/src/react-ui/blocks/Terminal/panel/TerminalSessionControl.tsx +252 -0
  276. package/src/react-ui/blocks/Terminal/panel/TerminalSessionTabs.tsx +334 -0
  277. package/src/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.tsx +261 -0
  278. package/src/react-ui/blocks/Terminal/panel/TerminalThemeSelector.tsx +248 -0
  279. package/src/react-ui/blocks/Terminal/panel/index.ts +72 -0
  280. package/src/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module.css +59 -0
  281. package/src/react-ui/blocks/Terminal/panel/terminal-session-tabs.module.css +59 -0
  282. package/src/react-ui/blocks/Terminal/parsing/BadgeFormatter.ts +180 -0
  283. package/src/react-ui/blocks/Terminal/parsing/HttpLogParser.ts +248 -0
  284. package/src/react-ui/blocks/Terminal/parsing/LogParser.types.ts +283 -0
  285. package/src/react-ui/blocks/Terminal/parsing/LogParserService.ts +686 -0
  286. package/src/react-ui/blocks/Terminal/parsing/MultilineAggregator.ts +466 -0
  287. package/src/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.ts +343 -0
  288. package/src/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.ts +167 -0
  289. package/src/react-ui/blocks/Terminal/parsing/TableParser.ts +348 -0
  290. package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.ts +251 -0
  291. package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.ts +390 -0
  292. package/src/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.ts +320 -0
  293. package/src/react-ui/blocks/Terminal/parsing/ansi/index.ts +20 -0
  294. package/src/react-ui/blocks/Terminal/parsing/index.ts +69 -0
  295. package/src/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.ts +68 -0
  296. package/src/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.ts +436 -0
  297. package/src/react-ui/blocks/Terminal/parsing/levels/index.ts +14 -0
  298. package/src/react-ui/blocks/index.ts +11 -0
  299. package/src/react-ui/icons/lucide-animated/activity.tsx +2 -2
  300. package/src/react-ui/icons/lucide-animated/bell-electric.tsx +1 -1
  301. package/src/react-ui/icons/lucide-animated/bell.tsx +2 -2
  302. package/src/react-ui/icons/lucide-animated/bot.tsx +1 -1
  303. package/src/react-ui/icons/lucide-animated/box.tsx +2 -2
  304. package/src/react-ui/icons/lucide-animated/circle-check.tsx +2 -2
  305. package/src/react-ui/icons/lucide-animated/delete.tsx +2 -2
  306. package/src/react-ui/icons/lucide-animated/download.tsx +2 -2
  307. package/src/react-ui/icons/lucide-animated/home.tsx +2 -2
  308. package/src/react-ui/icons/lucide-animated/layout-panel-top.tsx +1 -1
  309. package/src/react-ui/icons/lucide-animated/plus.tsx +1 -1
  310. package/src/react-ui/icons/lucide-animated/search.tsx +1 -1
  311. package/src/react-ui/icons/lucide-animated/settings.tsx +1 -1
  312. package/src/react-ui/icons/lucide-animated/trending-down.tsx +2 -2
  313. package/src/react-ui/icons/lucide-animated/trending-up.tsx +2 -2
  314. package/src/react-ui/icons/lucide-animated/x.tsx +2 -2
  315. package/src/react-ui/lib/icon-wrapper.tsx +70 -0
  316. package/src/react-ui/lib/index.ts +1 -0
  317. package/src/react-ui/ui/CornerBracket/CornerBracket.styles.ts +1 -1
  318. package/src/react-ui/ui/Tabs/Tabs.css +39 -0
  319. package/src/react-ui/ui/Tabs/Tabs.styles.ts +119 -31
  320. package/src/react-ui/ui/Tabs/Tabs.types.ts +8 -3
  321. package/src/react-ui/ui/Tabs/index.tsx +135 -27
  322. package/dist/index.css +0 -129
@@ -0,0 +1,222 @@
1
+ 'use client';
2
+
3
+ import { cn } from "../../../lib/utils.js";
4
+ import { ContentTypeBadge, LevelBadge, TagBadges, TimestampBadge } from "../components/LogLineBadges.js";
5
+ import { SyntaxHighlightedText } from "../components/SyntaxHighlight.js";
6
+ import { SpecializedSyntaxHighlighter } from "../components/SpecializedSyntaxHighlighter.js";
7
+ import { memo, useEffect, useMemo, useRef } from "react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { useVirtualizer } from "@tanstack/react-virtual";
10
+
11
+ //#region src/react-ui/blocks/Terminal/panel/LogLinesViewer.tsx
12
+ /**
13
+ * Log lines viewer component (React mode).
14
+ *
15
+ * Displays parsed log entries with React components for:
16
+ * - Level badges with CSS styling
17
+ * - Syntax highlighted spans
18
+ * - Timestamps right-aligned
19
+ * - Virtual scrolling with @tanstack/react-virtual
20
+ * - Auto-scroll to bottom when following logs
21
+ *
22
+ * @module components/devenv/terminal/panel/LogLinesViewer
23
+ */
24
+ /**
25
+ * Get the severity value for a log level for filtering comparison.
26
+ */
27
+ function getSeverity(level) {
28
+ return level === "all" ? 0 : {
29
+ trace: 0,
30
+ debug: 1,
31
+ info: 2,
32
+ warn: 3,
33
+ error: 4,
34
+ fatal: 5,
35
+ unknown: 1
36
+ }[level] ?? 1;
37
+ }
38
+ /**
39
+ * Log lines viewer component.
40
+ *
41
+ * Displays parsed log entries with React components:
42
+ * - Level badges (colored based on log level)
43
+ * - Syntax highlighted message content
44
+ * - Timestamps right-aligned
45
+ * - Tag badges for component identification
46
+ * - Virtual scrolling for performance with large logs
47
+ * - Auto-scroll to bottom when following logs
48
+ *
49
+ * @example
50
+ * ```tsx
51
+ * <LogLinesViewer
52
+ * entries={parsedEntries}
53
+ * filterLevel="all"
54
+ * levelCounts={{ info: 42, warn: 3 }}
55
+ * showLineNumbers={true}
56
+ * followCursor={true}
57
+ * />
58
+ * ```
59
+ */
60
+ function LogLinesViewer({ entries, filterLevel, levelCounts, className, showLineNumbers = false, enableSyntaxHighlight = true, followCursor = false, onScrollToBottom }) {
61
+ const scrollContainerRef = useRef(null);
62
+ const prevEntriesLengthRef = useRef(entries.length);
63
+ /**
64
+ * Filter entries based on current filter level.
65
+ * Memoized to avoid re-filtering on every render.
66
+ */
67
+ const filteredEntries = useMemo(() => {
68
+ if (filterLevel === "all") return entries;
69
+ const minSeverity = getSeverity(filterLevel);
70
+ return entries.filter((entry) => {
71
+ return getSeverity(entry.level) >= minSeverity;
72
+ });
73
+ }, [entries, filterLevel]);
74
+ /**
75
+ * Virtual scrolling with @tanstack/react-virtual.
76
+ * Only renders visible rows + overscan buffer for optimal performance.
77
+ * Uses dynamic size measurement for variable-height rows.
78
+ */
79
+ const rowVirtualizer = useVirtualizer({
80
+ count: filteredEntries.length,
81
+ getScrollElement: () => scrollContainerRef.current,
82
+ estimateSize: () => 28,
83
+ overscan: 5
84
+ });
85
+ /**
86
+ * Auto-scroll to bottom when new entries arrive and followCursor is enabled.
87
+ * Uses requestAnimationFrame for non-blocking scroll.
88
+ */
89
+ useEffect(() => {
90
+ if (followCursor && entries.length > prevEntriesLengthRef.current) {
91
+ requestAnimationFrame(() => {
92
+ if (scrollContainerRef.current) scrollContainerRef.current.scrollTop = scrollContainerRef.current.scrollHeight;
93
+ });
94
+ onScrollToBottom?.();
95
+ }
96
+ prevEntriesLengthRef.current = entries.length;
97
+ }, [
98
+ entries.length,
99
+ followCursor,
100
+ onScrollToBottom
101
+ ]);
102
+ filteredEntries.length;
103
+ return /* @__PURE__ */ jsx("div", {
104
+ className: cn("flex flex-col h-full", className),
105
+ children: /* @__PURE__ */ jsx("div", {
106
+ ref: scrollContainerRef,
107
+ className: "flex-1 overflow-auto font-mono text-[13px] leading-relaxed bg-[#241B2F]",
108
+ style: { contain: "layout style" },
109
+ children: filteredEntries.length === 0 ? /* @__PURE__ */ jsxs("div", {
110
+ className: "flex flex-col items-center justify-center h-full gap-2 text-muted-foreground/50",
111
+ children: [/* @__PURE__ */ jsx("svg", {
112
+ className: "w-8 h-8 opacity-30",
113
+ fill: "none",
114
+ stroke: "currentColor",
115
+ viewBox: "0 0 24 24",
116
+ children: /* @__PURE__ */ jsx("path", {
117
+ strokeLinecap: "round",
118
+ strokeLinejoin: "round",
119
+ strokeWidth: 1.5,
120
+ d: "M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z"
121
+ })
122
+ }), /* @__PURE__ */ jsx("span", {
123
+ className: "text-xs font-mono",
124
+ children: "No log entries to display"
125
+ })]
126
+ }) : /* @__PURE__ */ jsx("div", {
127
+ style: {
128
+ height: `${rowVirtualizer.getTotalSize()}px`,
129
+ width: "100%",
130
+ position: "relative"
131
+ },
132
+ children: rowVirtualizer.getVirtualItems().map((virtualRow) => {
133
+ const entry = filteredEntries[virtualRow.index];
134
+ return /* @__PURE__ */ jsx("div", {
135
+ "data-index": virtualRow.index,
136
+ ref: rowVirtualizer.measureElement,
137
+ style: {
138
+ position: "absolute",
139
+ top: 0,
140
+ left: 0,
141
+ width: "100%",
142
+ transform: `translateY(${virtualRow.start}px)`
143
+ },
144
+ children: /* @__PURE__ */ jsx(LogLine, {
145
+ entry,
146
+ index: virtualRow.index,
147
+ showLineNumbers,
148
+ enableSyntaxHighlight
149
+ })
150
+ }, entry.line_number);
151
+ })
152
+ })
153
+ })
154
+ });
155
+ }
156
+ /**
157
+ * Level-specific left border color for log lines.
158
+ */
159
+ const LEVEL_BORDER_COLORS = {
160
+ error: "border-l-red-500/60",
161
+ fatal: "border-l-pink-500/60",
162
+ warn: "border-l-yellow-500/50",
163
+ info: "border-l-blue-500/30",
164
+ debug: "border-l-cyan-500/20",
165
+ trace: "border-l-gray-500/15",
166
+ unknown: "border-l-transparent"
167
+ };
168
+ /**
169
+ * Individual log line component (memoized).
170
+ *
171
+ * Renders a single log entry with badges and highlighted content.
172
+ * Memoized to prevent re-renders when entry hasn't changed.
173
+ */
174
+ const LogLine = memo(function LogLine({ entry, index, showLineNumbers, enableSyntaxHighlight }) {
175
+ return /* @__PURE__ */ jsxs("div", {
176
+ className: cn("flex items-start gap-2 px-3 py-1 border-l-2 transition-colors", LEVEL_BORDER_COLORS[entry.level] || "border-l-transparent", index % 2 === 0 ? "bg-white/[0.02]" : "", "hover:bg-white/[0.06]"),
177
+ children: [
178
+ showLineNumbers && /* @__PURE__ */ jsx("span", {
179
+ className: "text-muted-foreground/50 text-xs w-12 flex-shrink-0 select-none",
180
+ children: entry.line_number
181
+ }),
182
+ !entry.is_continuation && /* @__PURE__ */ jsx(LevelBadge, { level: entry.level }),
183
+ !entry.is_continuation && entry.content_type && entry.content_type !== "plain" && /* @__PURE__ */ jsx(ContentTypeBadge, {
184
+ contentType: entry.content_type,
185
+ httpMethod: entry.http_method
186
+ }),
187
+ !entry.is_continuation && entry.tags && entry.tags.length > 0 && /* @__PURE__ */ jsx(TagBadges, { tags: entry.tags }),
188
+ /* @__PURE__ */ jsxs("div", {
189
+ className: "flex-1 min-w-0",
190
+ children: [enableSyntaxHighlight ? entry.content_type === "http" || entry.content_type === "table" ? /* @__PURE__ */ jsx(SpecializedSyntaxHighlighter, {
191
+ contentType: entry.content_type,
192
+ httpMethod: entry.http_method,
193
+ httpPath: entry.http_path,
194
+ tableData: entry.table_data,
195
+ text: entry.message ?? entry.raw
196
+ }) : entry.content_type === "json" && entry.structured ? /* @__PURE__ */ jsx(SpecializedSyntaxHighlighter, {
197
+ contentType: "json",
198
+ jsonData: entry.structured,
199
+ text: entry.message ?? entry.raw
200
+ }) : /* @__PURE__ */ jsx(SyntaxHighlightedText, { text: entry.message ?? entry.raw }) : /* @__PURE__ */ jsx("span", {
201
+ className: "text-foreground/90",
202
+ children: entry.message ?? entry.raw
203
+ }), entry.structured && entry.content_type !== "json" && /* @__PURE__ */ jsxs("details", {
204
+ className: "mt-1 ml-4",
205
+ children: [/* @__PURE__ */ jsx("summary", {
206
+ className: "cursor-pointer text-xs text-muted-foreground hover:text-foreground",
207
+ children: "JSON data"
208
+ }), /* @__PURE__ */ jsx("pre", {
209
+ className: "mt-1 text-xs bg-black/20 p-2 rounded overflow-x-auto",
210
+ children: JSON.stringify(entry.structured, null, 2)
211
+ })]
212
+ })]
213
+ }),
214
+ !entry.is_continuation && entry.timestamp_display && /* @__PURE__ */ jsx(TimestampBadge, { timestamp: entry.timestamp_display })
215
+ ]
216
+ });
217
+ }, (prevProps, nextProps) => {
218
+ return prevProps.entry.line_number === nextProps.entry.line_number && prevProps.entry.raw === nextProps.entry.raw && prevProps.index === nextProps.index && prevProps.showLineNumbers === nextProps.showLineNumbers && prevProps.enableSyntaxHighlight === nextProps.enableSyntaxHighlight;
219
+ });
220
+
221
+ //#endregion
222
+ export { LogLinesViewer };
@@ -0,0 +1,74 @@
1
+ /**
2
+ * TerminalDebugPanel Component.
3
+ *
4
+ * Collapsible diagnostic panel below the terminal showing real-time
5
+ * GPU/renderer info, FPS, grid dimensions, PTY status, and connection details.
6
+ *
7
+ * @module components/devenv/terminal/panel/TerminalDebugPanel
8
+ */
9
+ /**
10
+ * Props for the TerminalDebugPanel component.
11
+ */
12
+ export interface ITerminalDebugPanelProps {
13
+ /** Whether the panel is visible */
14
+ visible: boolean;
15
+ /** Renderer name (e.g. "WebGPU", "WebGL2", "xterm") */
16
+ renderer?: string;
17
+ /** Current FPS */
18
+ fps?: number;
19
+ /** GPU adapter name (e.g. "Apple M3 Pro") */
20
+ gpu?: string;
21
+ /** Canvas pixel dimensions */
22
+ canvasSize?: {
23
+ width: number;
24
+ height: number;
25
+ };
26
+ /** Grid dimensions in cols/rows */
27
+ gridSize?: {
28
+ cols: number;
29
+ rows: number;
30
+ };
31
+ /** Cell size in pixels */
32
+ cellSize?: {
33
+ width: number;
34
+ height: number;
35
+ };
36
+ /** Font description (e.g. "JetBrains Mono 14px") */
37
+ font?: string;
38
+ /** PTY connection status */
39
+ ptyStatus?: string;
40
+ /** PTY WebSocket URL */
41
+ ptyUrl?: string;
42
+ /** Active remote label */
43
+ remoteName?: string;
44
+ /** Theme name */
45
+ themeName?: string;
46
+ /** CRT effect enabled */
47
+ crtEffect?: boolean;
48
+ /** Connection uptime in seconds */
49
+ uptimeSeconds?: number;
50
+ /** Additional CSS classes */
51
+ className?: string;
52
+ }
53
+ /**
54
+ * TerminalDebugPanel Component.
55
+ *
56
+ * Renders a compact diagnostic panel with terminal runtime information.
57
+ * Toggled via the debug panel setting in TerminalSettingsPopover.
58
+ *
59
+ * @param props - Debug panel props with runtime telemetry
60
+ * @returns React element or null when hidden
61
+ *
62
+ * @example
63
+ * ```tsx
64
+ * <TerminalDebugPanel
65
+ * visible={settings.debugPanel}
66
+ * renderer="WebGPU"
67
+ * fps={60}
68
+ * gridSize={{ cols: 120, rows: 30 }}
69
+ * ptyStatus="connected"
70
+ * />
71
+ * ```
72
+ */
73
+ export declare function TerminalDebugPanel({ visible, renderer, fps, gpu, canvasSize, gridSize, cellSize, font, ptyStatus, ptyUrl, remoteName, themeName, crtEffect, uptimeSeconds, className, }: ITerminalDebugPanelProps): import("react/jsx-runtime").JSX.Element | null;
74
+ //# sourceMappingURL=TerminalDebugPanel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TerminalDebugPanel.d.ts","sourceRoot":"","sources":["../../../../../src/react-ui/blocks/Terminal/panel/TerminalDebugPanel.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAOH;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACvC,mCAAmC;IACnC,OAAO,EAAE,OAAO,CAAC;IACjB,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,kBAAkB;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,6CAA6C;IAC7C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,UAAU,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/C,mCAAmC;IACnC,QAAQ,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,0BAA0B;IAC1B,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0BAA0B;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,yBAAyB;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,6BAA6B;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAkCD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,OAAO,EACP,QAAQ,EACR,GAAG,EACH,GAAG,EACH,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,IAAI,EACJ,SAAS,EACT,MAAM,EACN,UAAU,EACV,SAAS,EACT,SAAS,EACT,aAAa,EACb,SAAS,GACV,EAAE,wBAAwB,kDA2H1B"}
@@ -0,0 +1,168 @@
1
+ 'use client';
2
+
3
+ import { cn } from "../../../lib/utils.js";
4
+ import { useEffect, useRef, useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+
7
+ //#region src/react-ui/blocks/Terminal/panel/TerminalDebugPanel.tsx
8
+ /**
9
+ * TerminalDebugPanel Component.
10
+ *
11
+ * Collapsible diagnostic panel below the terminal showing real-time
12
+ * GPU/renderer info, FPS, grid dimensions, PTY status, and connection details.
13
+ *
14
+ * @module components/devenv/terminal/panel/TerminalDebugPanel
15
+ */
16
+ /**
17
+ * Format uptime from seconds to human-readable string.
18
+ *
19
+ * @param seconds - Total seconds of uptime
20
+ * @returns Formatted string (e.g. "5m 32s", "1h 23m")
21
+ */
22
+ function formatUptime(seconds) {
23
+ if (seconds < 60) return `${Math.floor(seconds)}s`;
24
+ const m = Math.floor(seconds / 60);
25
+ const s = Math.floor(seconds % 60);
26
+ if (m < 60) return `${m}m ${s}s`;
27
+ return `${Math.floor(m / 60)}h ${m % 60}m`;
28
+ }
29
+ /**
30
+ * Single row in the debug panel table.
31
+ */
32
+ function DebugRow({ label, value, valueColor }) {
33
+ return /* @__PURE__ */ jsxs("div", {
34
+ className: "flex items-center gap-3 px-3 py-1 hover:bg-white/5 transition-colors",
35
+ children: [/* @__PURE__ */ jsx("span", {
36
+ className: "text-[10px] font-mono text-muted-foreground/60 uppercase tracking-wider w-24 flex-shrink-0",
37
+ children: label
38
+ }), /* @__PURE__ */ jsx("span", {
39
+ className: cn("text-xs font-mono", valueColor ?? "text-foreground/80"),
40
+ children: value
41
+ })]
42
+ });
43
+ }
44
+ /**
45
+ * TerminalDebugPanel Component.
46
+ *
47
+ * Renders a compact diagnostic panel with terminal runtime information.
48
+ * Toggled via the debug panel setting in TerminalSettingsPopover.
49
+ *
50
+ * @param props - Debug panel props with runtime telemetry
51
+ * @returns React element or null when hidden
52
+ *
53
+ * @example
54
+ * ```tsx
55
+ * <TerminalDebugPanel
56
+ * visible={settings.debugPanel}
57
+ * renderer="WebGPU"
58
+ * fps={60}
59
+ * gridSize={{ cols: 120, rows: 30 }}
60
+ * ptyStatus="connected"
61
+ * />
62
+ * ```
63
+ */
64
+ function TerminalDebugPanel({ visible, renderer, fps, gpu, canvasSize, gridSize, cellSize, font, ptyStatus, ptyUrl, remoteName, themeName, crtEffect, uptimeSeconds, className }) {
65
+ const [isExpanded, setIsExpanded] = useState(true);
66
+ const [liveUptime, setLiveUptime] = useState(uptimeSeconds ?? 0);
67
+ const uptimeRef = useRef(uptimeSeconds ?? 0);
68
+ useEffect(() => {
69
+ uptimeRef.current = uptimeSeconds ?? 0;
70
+ setLiveUptime(uptimeRef.current);
71
+ }, [uptimeSeconds]);
72
+ useEffect(() => {
73
+ if (!visible || ptyStatus !== "connected") return;
74
+ const interval = setInterval(() => {
75
+ uptimeRef.current += 1;
76
+ setLiveUptime(uptimeRef.current);
77
+ }, 1e3);
78
+ return () => clearInterval(interval);
79
+ }, [visible, ptyStatus]);
80
+ if (!visible) return null;
81
+ const statusColor = ptyStatus === "connected" ? "text-green-400" : ptyStatus === "connecting" ? "text-yellow-400" : ptyStatus === "error" ? "text-red-400" : "text-muted-foreground/50";
82
+ return /* @__PURE__ */ jsxs("div", {
83
+ className: cn("border-t border-white/10 bg-black/20", className),
84
+ children: [/* @__PURE__ */ jsxs("button", {
85
+ type: "button",
86
+ onClick: () => setIsExpanded(!isExpanded),
87
+ className: "w-full flex items-center gap-2 px-3 py-1.5 text-[10px] font-mono text-muted-foreground/60 uppercase tracking-wider hover:text-muted-foreground transition-colors",
88
+ children: [
89
+ /* @__PURE__ */ jsx("svg", {
90
+ className: cn("w-3 h-3 transition-transform", isExpanded && "rotate-90"),
91
+ fill: "none",
92
+ stroke: "currentColor",
93
+ viewBox: "0 0 24 24",
94
+ strokeWidth: 2,
95
+ children: /* @__PURE__ */ jsx("polyline", { points: "9 18 15 12 9 6" })
96
+ }),
97
+ "Debug Panel",
98
+ fps != null && /* @__PURE__ */ jsxs("span", {
99
+ className: "ml-auto text-foreground/40",
100
+ children: [fps.toFixed(0), " FPS"]
101
+ })
102
+ ]
103
+ }), isExpanded && /* @__PURE__ */ jsxs("div", {
104
+ className: "pb-2",
105
+ children: [
106
+ renderer && /* @__PURE__ */ jsx(DebugRow, {
107
+ label: "Renderer",
108
+ value: renderer,
109
+ valueColor: "text-primary/80"
110
+ }),
111
+ fps != null && /* @__PURE__ */ jsx(DebugRow, {
112
+ label: "FPS",
113
+ value: fps.toFixed(1)
114
+ }),
115
+ gpu && /* @__PURE__ */ jsx(DebugRow, {
116
+ label: "GPU",
117
+ value: gpu
118
+ }),
119
+ canvasSize && /* @__PURE__ */ jsx(DebugRow, {
120
+ label: "Canvas",
121
+ value: `${canvasSize.width} \u00d7 ${canvasSize.height}`
122
+ }),
123
+ gridSize && /* @__PURE__ */ jsx(DebugRow, {
124
+ label: "Grid",
125
+ value: `${gridSize.cols} cols \u00d7 ${gridSize.rows} rows`
126
+ }),
127
+ cellSize && /* @__PURE__ */ jsx(DebugRow, {
128
+ label: "Cell",
129
+ value: `${cellSize.width.toFixed(1)} \u00d7 ${cellSize.height.toFixed(1)} px`
130
+ }),
131
+ font && /* @__PURE__ */ jsx(DebugRow, {
132
+ label: "Font",
133
+ value: font
134
+ }),
135
+ /* @__PURE__ */ jsx(DebugRow, {
136
+ label: "PTY Status",
137
+ value: ptyStatus ?? "unknown",
138
+ valueColor: statusColor
139
+ }),
140
+ ptyUrl && /* @__PURE__ */ jsx(DebugRow, {
141
+ label: "PTY URL",
142
+ value: ptyUrl,
143
+ valueColor: "text-foreground/40"
144
+ }),
145
+ remoteName && /* @__PURE__ */ jsx(DebugRow, {
146
+ label: "Remote",
147
+ value: remoteName
148
+ }),
149
+ themeName && /* @__PURE__ */ jsx(DebugRow, {
150
+ label: "Theme",
151
+ value: themeName
152
+ }),
153
+ /* @__PURE__ */ jsx(DebugRow, {
154
+ label: "CRT Effect",
155
+ value: crtEffect ? "ON" : "OFF",
156
+ valueColor: crtEffect ? "text-primary/60" : "text-muted-foreground/40"
157
+ }),
158
+ ptyStatus === "connected" && /* @__PURE__ */ jsx(DebugRow, {
159
+ label: "Uptime",
160
+ value: formatUptime(liveUptime)
161
+ })
162
+ ]
163
+ })]
164
+ });
165
+ }
166
+
167
+ //#endregion
168
+ export { TerminalDebugPanel };
@@ -0,0 +1,42 @@
1
+ /**
2
+ * TerminalFilterDropdown Component.
3
+ *
4
+ * Dropdown menu for log level filtering.
5
+ * Replaces tab-style filters with a compact dropdown menu.
6
+ *
7
+ * @module components/devenv/terminal/panel/filter-dropdown
8
+ */
9
+ import type { TLogLevelFilter, TLogLevel } from './TerminalLogsPanel.types';
10
+ /**
11
+ * Props for TerminalFilterDropdown component.
12
+ */
13
+ export interface ITerminalFilterDropdownProps {
14
+ /** Current log level filter */
15
+ filterLevel: TLogLevelFilter;
16
+ /** Log level counts for badges */
17
+ levelCounts: Partial<Record<TLogLevel, number>>;
18
+ /** Callback when filter level changes */
19
+ onFilterChange: (level: TLogLevelFilter) => void;
20
+ /** Custom class name */
21
+ className?: string;
22
+ }
23
+ /**
24
+ * TerminalFilterDropdown Component.
25
+ *
26
+ * Displays a dropdown menu with:
27
+ * - Current filter level as button label
28
+ * - Filter options with badges
29
+ * - Keyboard shortcuts
30
+ * - Glassmorphic dropdown menu
31
+ *
32
+ * @example
33
+ * ```tsx
34
+ * <TerminalFilterDropdown
35
+ * filterLevel="all"
36
+ * levelCounts={{ info: 42, warn: 3, error: 1 }}
37
+ * onFilterChange={(level) => setFilterLevel(level)}
38
+ * />
39
+ * ```
40
+ */
41
+ export declare function TerminalFilterDropdown({ filterLevel, levelCounts, onFilterChange, className, }: ITerminalFilterDropdownProps): import("react/jsx-runtime").JSX.Element;
42
+ //# sourceMappingURL=TerminalFilterDropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TerminalFilterDropdown.d.ts","sourceRoot":"","sources":["../../../../../src/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAG5E;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,+BAA+B;IAC/B,WAAW,EAAE,eAAe,CAAC;IAE7B,kCAAkC;IAClC,WAAW,EAAE,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;IAEhD,yCAAyC;IACzC,cAAc,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,CAAC;IAEjD,wBAAwB;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAyBD;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,WAAW,EACX,WAAW,EACX,cAAc,EACd,SAAS,GACV,EAAE,4BAA4B,2CA0H9B"}
@@ -0,0 +1,175 @@
1
+ 'use client';
2
+
3
+ import { cn } from "../../../lib/utils.js";
4
+ import terminal_filter_dropdown_module_default from "./terminal-filter-dropdown.module.js";
5
+ import { useEffect, useRef, useState } from "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+
8
+ //#region src/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.tsx
9
+ /**
10
+ * TerminalFilterDropdown Component.
11
+ *
12
+ * Dropdown menu for log level filtering.
13
+ * Replaces tab-style filters with a compact dropdown menu.
14
+ *
15
+ * @module components/devenv/terminal/panel/filter-dropdown
16
+ */
17
+ /**
18
+ * Log level filter configurations.
19
+ */
20
+ const FILTER_OPTIONS = [
21
+ {
22
+ value: "all",
23
+ label: "All Levels",
24
+ color: "text-foreground"
25
+ },
26
+ {
27
+ value: "trace",
28
+ label: "Trace",
29
+ color: "text-slate-400"
30
+ },
31
+ {
32
+ value: "debug",
33
+ label: "Debug",
34
+ color: "text-blue-400"
35
+ },
36
+ {
37
+ value: "info",
38
+ label: "Info",
39
+ color: "text-green-400"
40
+ },
41
+ {
42
+ value: "warn",
43
+ label: "Warn",
44
+ color: "text-yellow-400"
45
+ },
46
+ {
47
+ value: "error",
48
+ label: "Error",
49
+ color: "text-orange-400"
50
+ },
51
+ {
52
+ value: "fatal",
53
+ label: "Fatal",
54
+ color: "text-red-400"
55
+ }
56
+ ];
57
+ /**
58
+ * Get count for a specific log level.
59
+ */
60
+ function getCount(level, levelCounts) {
61
+ if (level === "all") return Object.values(levelCounts).reduce((sum, count) => sum + (count ?? 0), 0);
62
+ return levelCounts[level] ?? 0;
63
+ }
64
+ /**
65
+ * TerminalFilterDropdown Component.
66
+ *
67
+ * Displays a dropdown menu with:
68
+ * - Current filter level as button label
69
+ * - Filter options with badges
70
+ * - Keyboard shortcuts
71
+ * - Glassmorphic dropdown menu
72
+ *
73
+ * @example
74
+ * ```tsx
75
+ * <TerminalFilterDropdown
76
+ * filterLevel="all"
77
+ * levelCounts={{ info: 42, warn: 3, error: 1 }}
78
+ * onFilterChange={(level) => setFilterLevel(level)}
79
+ * />
80
+ * ```
81
+ */
82
+ function TerminalFilterDropdown({ filterLevel, levelCounts, onFilterChange, className }) {
83
+ const [isOpen, setIsOpen] = useState(false);
84
+ const containerRef = useRef(null);
85
+ useEffect(() => {
86
+ const handleClickOutside = (event) => {
87
+ if (containerRef.current && !containerRef.current.contains(event.target)) setIsOpen(false);
88
+ };
89
+ if (isOpen) {
90
+ document.addEventListener("mousedown", handleClickOutside);
91
+ return () => document.removeEventListener("mousedown", handleClickOutside);
92
+ }
93
+ }, [isOpen]);
94
+ const currentOption = FILTER_OPTIONS.find((opt) => opt.value === filterLevel);
95
+ const currentCount = getCount(filterLevel, levelCounts);
96
+ return /* @__PURE__ */ jsxs("div", {
97
+ className: cn("relative", className),
98
+ ref: containerRef,
99
+ children: [/* @__PURE__ */ jsxs("button", {
100
+ type: "button",
101
+ onClick: () => setIsOpen(!isOpen),
102
+ className: cn(terminal_filter_dropdown_module_default.triggerButton, "flex items-center gap-2 px-3 py-2 h-9 rounded-md transition-all duration-200", "bg-muted/40 text-muted-foreground hover:bg-muted/60 hover:text-foreground", "border border-border/30 hover:border-border/50", "shadow-[inset_0_0.5px_0_rgba(255,255,255,0.1)] hover:shadow-[0_0_8px_rgba(0,0,0,0.1)]", "text-xs font-mono font-medium uppercase tracking-wider"),
103
+ "aria-label": "Filter logs by level",
104
+ "aria-expanded": isOpen,
105
+ children: [
106
+ /* @__PURE__ */ jsx("svg", {
107
+ className: "w-3.5 h-3.5 flex-shrink-0",
108
+ fill: "none",
109
+ stroke: "currentColor",
110
+ viewBox: "0 0 24 24",
111
+ children: /* @__PURE__ */ jsx("path", {
112
+ strokeLinecap: "round",
113
+ strokeLinejoin: "round",
114
+ strokeWidth: 2,
115
+ d: "M3 4a1 1 0 011-1h16a1 1 0 011 1v2.586a1 1 0 01-.293.707l-6.414 6.414a1 1 0 00-.293.707V17l-4 4v-6.586a1 1 0 00-.293-.707L3.293 7.293A1 1 0 013 6.586V4z"
116
+ })
117
+ }),
118
+ /* @__PURE__ */ jsx("span", {
119
+ className: "flex-shrink-0",
120
+ children: currentOption?.label
121
+ }),
122
+ currentCount > 0 && /* @__PURE__ */ jsx("span", {
123
+ className: "inline-flex items-center justify-center px-1.5 py-0.5 min-w-[1.25rem] h-4 bg-primary/20 text-primary rounded font-mono text-[10px] font-bold",
124
+ children: currentCount
125
+ }),
126
+ /* @__PURE__ */ jsx("svg", {
127
+ className: cn("w-3 h-3 transition-transform duration-200 flex-shrink-0", isOpen && "rotate-180"),
128
+ fill: "none",
129
+ stroke: "currentColor",
130
+ viewBox: "0 0 24 24",
131
+ children: /* @__PURE__ */ jsx("path", {
132
+ strokeLinecap: "round",
133
+ strokeLinejoin: "round",
134
+ strokeWidth: 2,
135
+ d: "M19 9l-7 7-7-7"
136
+ })
137
+ })
138
+ ]
139
+ }), /* @__PURE__ */ jsx("div", {
140
+ className: terminal_filter_dropdown_module_default.dropdownMenu,
141
+ "data-open": isOpen,
142
+ children: /* @__PURE__ */ jsx("div", {
143
+ className: "glass-subtle rounded-lg py-1",
144
+ children: FILTER_OPTIONS.map((option) => {
145
+ const count = getCount(option.value, levelCounts);
146
+ const isActive = filterLevel === option.value;
147
+ return /* @__PURE__ */ jsxs("button", {
148
+ type: "button",
149
+ onClick: () => {
150
+ onFilterChange(option.value);
151
+ setIsOpen(false);
152
+ },
153
+ className: cn("w-full px-3 py-2 flex items-center justify-between gap-3", "transition-all duration-150", "hover:bg-primary/10", isActive && "bg-primary/15"),
154
+ children: [/* @__PURE__ */ jsxs("div", {
155
+ className: "flex items-center gap-2",
156
+ children: [/* @__PURE__ */ jsx("div", {
157
+ className: cn("w-2 h-2 rounded-full flex-shrink-0", option.value === "all" ? "bg-foreground" : `bg-${option.label.toLowerCase()}-400`),
158
+ style: { backgroundColor: option.value === "all" ? "hsl(var(--foreground))" : void 0 }
159
+ }), /* @__PURE__ */ jsx("span", {
160
+ className: cn("text-sm font-mono", isActive ? option.color : "text-muted-foreground"),
161
+ children: option.label
162
+ })]
163
+ }), count > 0 && /* @__PURE__ */ jsx("span", {
164
+ className: cn("inline-flex items-center justify-center px-1.5 py-0.5 min-w-[1.25rem] h-4 rounded font-mono text-[10px] font-bold", isActive ? "bg-primary/30 text-primary" : "bg-muted/40 text-muted-foreground"),
165
+ children: count
166
+ })]
167
+ }, option.value);
168
+ })
169
+ })
170
+ })]
171
+ });
172
+ }
173
+
174
+ //#endregion
175
+ export { TerminalFilterDropdown };