@mks2508/mks-ui 0.3.2 → 0.5.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 (329) 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/TerminalDisplay.d.ts +46 -0
  16. package/dist/react-ui/blocks/Terminal/TerminalDisplay.d.ts.map +1 -0
  17. package/dist/react-ui/blocks/Terminal/TerminalDisplay.js +168 -0
  18. package/dist/react-ui/blocks/Terminal/TerminalDisplay.styles.d.ts +21 -0
  19. package/dist/react-ui/blocks/Terminal/TerminalDisplay.styles.d.ts.map +1 -0
  20. package/dist/react-ui/blocks/Terminal/TerminalDisplay.styles.js +31 -0
  21. package/dist/react-ui/blocks/Terminal/TerminalDisplay.types.d.ts +56 -0
  22. package/dist/react-ui/blocks/Terminal/TerminalDisplay.types.d.ts.map +1 -0
  23. package/dist/react-ui/blocks/Terminal/TerminalPanel.d.ts +60 -0
  24. package/dist/react-ui/blocks/Terminal/TerminalPanel.d.ts.map +1 -0
  25. package/dist/react-ui/blocks/Terminal/TerminalPanel.js +183 -0
  26. package/dist/react-ui/blocks/Terminal/TerminalRestty.d.ts +111 -0
  27. package/dist/react-ui/blocks/Terminal/TerminalRestty.d.ts.map +1 -0
  28. package/dist/react-ui/blocks/Terminal/TerminalRestty.js +185 -0
  29. package/dist/react-ui/blocks/Terminal/TerminalXterm.d.ts +58 -0
  30. package/dist/react-ui/blocks/Terminal/TerminalXterm.d.ts.map +1 -0
  31. package/dist/react-ui/blocks/Terminal/TerminalXterm.js +143 -0
  32. package/dist/react-ui/blocks/Terminal/XTermAdapter.d.ts +87 -0
  33. package/dist/react-ui/blocks/Terminal/XTermAdapter.d.ts.map +1 -0
  34. package/dist/react-ui/blocks/Terminal/XTermAdapter.js +135 -0
  35. package/dist/react-ui/blocks/Terminal/chrome.d.ts +14 -0
  36. package/dist/react-ui/blocks/Terminal/chrome.d.ts.map +1 -0
  37. package/dist/react-ui/blocks/Terminal/chrome.js +6 -0
  38. package/dist/react-ui/blocks/Terminal/components/LogLineBadges.d.ts +160 -0
  39. package/dist/react-ui/blocks/Terminal/components/LogLineBadges.d.ts.map +1 -0
  40. package/dist/react-ui/blocks/Terminal/components/LogLineBadges.js +185 -0
  41. package/dist/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.d.ts +48 -0
  42. package/dist/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.d.ts.map +1 -0
  43. package/dist/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.js +139 -0
  44. package/dist/react-ui/blocks/Terminal/components/SyntaxHighlight.d.ts +60 -0
  45. package/dist/react-ui/blocks/Terminal/components/SyntaxHighlight.d.ts.map +1 -0
  46. package/dist/react-ui/blocks/Terminal/components/SyntaxHighlight.js +352 -0
  47. package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge.d.ts +36 -0
  48. package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge.d.ts.map +1 -0
  49. package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge.js +52 -0
  50. package/dist/react-ui/blocks/Terminal/components/index.d.ts +10 -0
  51. package/dist/react-ui/blocks/Terminal/components/index.d.ts.map +1 -0
  52. package/dist/react-ui/blocks/Terminal/components/index.js +4 -0
  53. package/dist/react-ui/blocks/Terminal/display.d.ts +20 -0
  54. package/dist/react-ui/blocks/Terminal/display.d.ts.map +1 -0
  55. package/dist/react-ui/blocks/Terminal/display.js +9 -0
  56. package/dist/react-ui/blocks/Terminal/hooks/index.d.ts +11 -0
  57. package/dist/react-ui/blocks/Terminal/hooks/index.d.ts.map +1 -0
  58. package/dist/react-ui/blocks/Terminal/hooks/index.js +2 -0
  59. package/dist/react-ui/blocks/Terminal/hooks/useTerminalSettings.d.ts +69 -0
  60. package/dist/react-ui/blocks/Terminal/hooks/useTerminalSettings.d.ts.map +1 -0
  61. package/dist/react-ui/blocks/Terminal/hooks/useTerminalSettings.js +162 -0
  62. package/dist/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.d.ts +104 -0
  63. package/dist/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.d.ts.map +1 -0
  64. package/dist/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.js +180 -0
  65. package/dist/react-ui/blocks/Terminal/index.d.ts +43 -0
  66. package/dist/react-ui/blocks/Terminal/index.d.ts.map +1 -0
  67. package/dist/react-ui/blocks/Terminal/index.js +41 -0
  68. package/dist/react-ui/blocks/Terminal/panel/LogLinesViewer.d.ts +58 -0
  69. package/dist/react-ui/blocks/Terminal/panel/LogLinesViewer.d.ts.map +1 -0
  70. package/dist/react-ui/blocks/Terminal/panel/LogLinesViewer.js +222 -0
  71. package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel.d.ts +74 -0
  72. package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel.d.ts.map +1 -0
  73. package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel.js +168 -0
  74. package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.d.ts +42 -0
  75. package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.d.ts.map +1 -0
  76. package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.js +175 -0
  77. package/dist/react-ui/blocks/Terminal/panel/TerminalFilterTabs.d.ts +43 -0
  78. package/dist/react-ui/blocks/Terminal/panel/TerminalFilterTabs.d.ts.map +1 -0
  79. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.d.ts +38 -0
  80. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.d.ts.map +1 -0
  81. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.js +62 -0
  82. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.d.ts +67 -0
  83. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.d.ts.map +1 -0
  84. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.d.ts +32 -0
  85. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.d.ts.map +1 -0
  86. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.js +326 -0
  87. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.d.ts +36 -0
  88. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.d.ts.map +1 -0
  89. package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.js +371 -0
  90. package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.d.ts +67 -0
  91. package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.d.ts.map +1 -0
  92. package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.js +417 -0
  93. package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.d.ts +197 -0
  94. package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.d.ts.map +1 -0
  95. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.d.ts +55 -0
  96. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.d.ts.map +1 -0
  97. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.js +214 -0
  98. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.styles.d.ts +35 -0
  99. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.styles.d.ts.map +1 -0
  100. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.styles.js +57 -0
  101. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.d.ts +62 -0
  102. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.d.ts.map +1 -0
  103. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter.d.ts +30 -0
  104. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter.d.ts.map +1 -0
  105. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter.js +126 -0
  106. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader.d.ts +31 -0
  107. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader.d.ts.map +1 -0
  108. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader.js +149 -0
  109. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.d.ts +35 -0
  110. package/dist/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.d.ts.map +1 -0
  111. package/dist/react-ui/blocks/Terminal/panel/TerminalSessionControl.d.ts +58 -0
  112. package/dist/react-ui/blocks/Terminal/panel/TerminalSessionControl.d.ts.map +1 -0
  113. package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs.d.ts +63 -0
  114. package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs.d.ts.map +1 -0
  115. package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs.js +245 -0
  116. package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.d.ts +24 -0
  117. package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.d.ts.map +1 -0
  118. package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.js +225 -0
  119. package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector.d.ts +35 -0
  120. package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector.d.ts.map +1 -0
  121. package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector.js +187 -0
  122. package/dist/react-ui/blocks/Terminal/panel/index.d.ts +30 -0
  123. package/dist/react-ui/blocks/Terminal/panel/index.d.ts.map +1 -0
  124. package/dist/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module-CNVWCefU.css +60 -0
  125. package/dist/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module.js +5 -0
  126. package/dist/react-ui/blocks/Terminal/panel/terminal-session-tabs.module-cmyJ11jP.css +60 -0
  127. package/dist/react-ui/blocks/Terminal/panel/terminal-session-tabs.module.js +5 -0
  128. package/dist/react-ui/blocks/Terminal/parsing/BadgeFormatter.d.ts +73 -0
  129. package/dist/react-ui/blocks/Terminal/parsing/BadgeFormatter.d.ts.map +1 -0
  130. package/dist/react-ui/blocks/Terminal/parsing/BadgeFormatter.js +136 -0
  131. package/dist/react-ui/blocks/Terminal/parsing/HttpLogParser.d.ts +117 -0
  132. package/dist/react-ui/blocks/Terminal/parsing/HttpLogParser.d.ts.map +1 -0
  133. package/dist/react-ui/blocks/Terminal/parsing/HttpLogParser.js +174 -0
  134. package/dist/react-ui/blocks/Terminal/parsing/LogParser.types.d.ts +221 -0
  135. package/dist/react-ui/blocks/Terminal/parsing/LogParser.types.d.ts.map +1 -0
  136. package/dist/react-ui/blocks/Terminal/parsing/LogParserService.d.ts +184 -0
  137. package/dist/react-ui/blocks/Terminal/parsing/LogParserService.d.ts.map +1 -0
  138. package/dist/react-ui/blocks/Terminal/parsing/LogParserService.js +478 -0
  139. package/dist/react-ui/blocks/Terminal/parsing/MultilineAggregator.d.ts +173 -0
  140. package/dist/react-ui/blocks/Terminal/parsing/MultilineAggregator.d.ts.map +1 -0
  141. package/dist/react-ui/blocks/Terminal/parsing/MultilineAggregator.js +313 -0
  142. package/dist/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.d.ts +181 -0
  143. package/dist/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.d.ts.map +1 -0
  144. package/dist/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.js +221 -0
  145. package/dist/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.d.ts +69 -0
  146. package/dist/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.d.ts.map +1 -0
  147. package/dist/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.js +142 -0
  148. package/dist/react-ui/blocks/Terminal/parsing/TableParser.d.ts +125 -0
  149. package/dist/react-ui/blocks/Terminal/parsing/TableParser.d.ts.map +1 -0
  150. package/dist/react-ui/blocks/Terminal/parsing/TableParser.js +245 -0
  151. package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.d.ts +165 -0
  152. package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.d.ts.map +1 -0
  153. package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.js +225 -0
  154. package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.d.ts +164 -0
  155. package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.d.ts.map +1 -0
  156. package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.js +285 -0
  157. package/dist/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.d.ts +188 -0
  158. package/dist/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.d.ts.map +1 -0
  159. package/dist/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.js +178 -0
  160. package/dist/react-ui/blocks/Terminal/parsing/ansi/index.d.ts +12 -0
  161. package/dist/react-ui/blocks/Terminal/parsing/ansi/index.d.ts.map +1 -0
  162. package/dist/react-ui/blocks/Terminal/parsing/index.d.ts +24 -0
  163. package/dist/react-ui/blocks/Terminal/parsing/index.d.ts.map +1 -0
  164. package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.d.ts +56 -0
  165. package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.d.ts.map +1 -0
  166. package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.d.ts +140 -0
  167. package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.d.ts.map +1 -0
  168. package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.js +325 -0
  169. package/dist/react-ui/blocks/Terminal/parsing/levels/index.d.ts +10 -0
  170. package/dist/react-ui/blocks/Terminal/parsing/levels/index.d.ts.map +1 -0
  171. package/dist/react-ui/blocks/index.d.ts +11 -0
  172. package/dist/react-ui/blocks/index.d.ts.map +1 -0
  173. package/dist/react-ui/icons/lucide-animated/activity.js +1 -1
  174. package/dist/react-ui/icons/lucide-animated/bell-electric.js +1 -1
  175. package/dist/react-ui/icons/lucide-animated/bell.js +1 -1
  176. package/dist/react-ui/icons/lucide-animated/bot.js +1 -1
  177. package/dist/react-ui/icons/lucide-animated/box.js +1 -1
  178. package/dist/react-ui/icons/lucide-animated/circle-check.js +1 -1
  179. package/dist/react-ui/icons/lucide-animated/delete.js +1 -1
  180. package/dist/react-ui/icons/lucide-animated/download.js +1 -1
  181. package/dist/react-ui/icons/lucide-animated/home.js +1 -1
  182. package/dist/react-ui/icons/lucide-animated/layout-panel-top.js +1 -1
  183. package/dist/react-ui/icons/lucide-animated/plus.js +1 -1
  184. package/dist/react-ui/icons/lucide-animated/search.js +1 -1
  185. package/dist/react-ui/icons/lucide-animated/settings.js +1 -1
  186. package/dist/react-ui/icons/lucide-animated/trending-down.js +1 -1
  187. package/dist/react-ui/icons/lucide-animated/trending-up.js +1 -1
  188. package/dist/react-ui/icons/lucide-animated/x.js +1 -1
  189. package/dist/react-ui/index.js +3 -1
  190. package/dist/react-ui/lib/icon-wrapper.d.ts +37 -0
  191. package/dist/react-ui/lib/icon-wrapper.d.ts.map +1 -0
  192. package/dist/react-ui/lib/icon-wrapper.js +55 -0
  193. package/dist/react-ui/lib/index.d.ts +1 -0
  194. package/dist/react-ui/lib/index.d.ts.map +1 -1
  195. package/dist/react-ui/lib/index.js +1 -0
  196. package/dist/react-ui/primitives/waapi/Morph/techniques/useCSSGridMorph.d.ts.map +1 -1
  197. package/dist/react-ui/primitives/waapi/Morph/techniques/useCSSGridMorph.js +2 -0
  198. package/dist/react-ui/primitives/waapi/Morph/techniques/useFLIPClipPath.d.ts.map +1 -1
  199. package/dist/react-ui/primitives/waapi/Morph/techniques/useFLIPClipPath.js +2 -0
  200. package/dist/react-ui/primitives/waapi/Morph/techniques/useViewTransitions.d.ts.map +1 -1
  201. package/dist/react-ui/primitives/waapi/Morph/techniques/useViewTransitions.js +2 -0
  202. package/dist/react-ui/primitives/waapi/Morph/useMorph.d.ts.map +1 -1
  203. package/dist/react-ui/primitives/waapi/Morph/useMorph.js +2 -0
  204. package/dist/react-ui/primitives/waapi/Reorder/useReorder.d.ts.map +1 -1
  205. package/dist/react-ui/primitives/waapi/Reorder/useReorder.js +2 -0
  206. package/dist/react-ui/primitives/waapi/Reorder/useReorderPresence.d.ts.map +1 -1
  207. package/dist/react-ui/primitives/waapi/Reorder/useReorderPresence.js +2 -0
  208. package/dist/react-ui/primitives/waapi/core/useAnimationOrchestrator.d.ts.map +1 -1
  209. package/dist/react-ui/primitives/waapi/core/useAnimationOrchestrator.js +2 -0
  210. package/dist/react-ui/primitives/waapi/core/useElementRegistry.d.ts.map +1 -1
  211. package/dist/react-ui/primitives/waapi/core/useElementRegistry.js +2 -0
  212. package/dist/react-ui/primitives/waapi/core/useFLIPAnimation.d.ts.map +1 -1
  213. package/dist/react-ui/primitives/waapi/core/useFLIPAnimation.js +2 -0
  214. package/dist/react-ui/primitives/waapi/core/usePositionCapture.d.ts.map +1 -1
  215. package/dist/react-ui/primitives/waapi/core/usePositionCapture.js +2 -0
  216. package/dist/react-ui/ui/Button/Button.styles.d.ts +1 -1
  217. package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.d.ts +1 -1
  218. package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.js +1 -1
  219. package/dist/react-ui/ui/InputGroup/index.d.ts.map +1 -1
  220. package/dist/react-ui/ui/InputGroup/index.js +2 -0
  221. package/dist/react-ui/ui/Tabs/Tabs.styles.d.ts +43 -25
  222. package/dist/react-ui/ui/Tabs/Tabs.styles.d.ts.map +1 -1
  223. package/dist/react-ui/ui/Tabs/Tabs.styles.js +105 -13
  224. package/dist/react-ui/ui/Tabs/Tabs.types.d.ts +6 -3
  225. package/dist/react-ui/ui/Tabs/Tabs.types.d.ts.map +1 -1
  226. package/dist/react-ui/ui/Tabs/index.d.ts +18 -9
  227. package/dist/react-ui/ui/Tabs/index.d.ts.map +1 -1
  228. package/dist/react-ui/ui/Tabs/index.js +99 -27
  229. package/dist/react-ui/ui/index.js +1 -0
  230. package/package.json +84 -29
  231. package/src/css.d.ts +6 -0
  232. package/src/react-ui/blocks/Terminal/ResttyAdapter.ts +278 -0
  233. package/src/react-ui/blocks/Terminal/Terminal.adapter.ts +97 -0
  234. package/src/react-ui/blocks/Terminal/Terminal.theme.restty.ts +155 -0
  235. package/src/react-ui/blocks/Terminal/Terminal.theme.ts +80 -0
  236. package/src/react-ui/blocks/Terminal/Terminal.types.ts +438 -0
  237. package/src/react-ui/blocks/Terminal/TerminalDisplay.styles.ts +38 -0
  238. package/src/react-ui/blocks/Terminal/TerminalDisplay.tsx +243 -0
  239. package/src/react-ui/blocks/Terminal/TerminalDisplay.types.ts +73 -0
  240. package/src/react-ui/blocks/Terminal/TerminalPanel.tsx +269 -0
  241. package/src/react-ui/blocks/Terminal/TerminalRestty.tsx +326 -0
  242. package/src/react-ui/blocks/Terminal/TerminalXterm.tsx +230 -0
  243. package/src/react-ui/blocks/Terminal/XTermAdapter.ts +163 -0
  244. package/src/react-ui/blocks/Terminal/chrome.ts +25 -0
  245. package/src/react-ui/blocks/Terminal/components/LogLineBadges.tsx +316 -0
  246. package/src/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.tsx +218 -0
  247. package/src/react-ui/blocks/Terminal/components/SyntaxHighlight.tsx +386 -0
  248. package/src/react-ui/blocks/Terminal/components/TerminalLogBadge.tsx +67 -0
  249. package/src/react-ui/blocks/Terminal/components/index.ts +10 -0
  250. package/src/react-ui/blocks/Terminal/display.ts +46 -0
  251. package/src/react-ui/blocks/Terminal/hooks/index.ts +22 -0
  252. package/src/react-ui/blocks/Terminal/hooks/useTerminalSettings.ts +229 -0
  253. package/src/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.ts +292 -0
  254. package/src/react-ui/blocks/Terminal/index.ts +111 -0
  255. package/src/react-ui/blocks/Terminal/panel/LogLinesViewer.tsx +330 -0
  256. package/src/react-ui/blocks/Terminal/panel/TerminalDebugPanel.tsx +242 -0
  257. package/src/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.tsx +202 -0
  258. package/src/react-ui/blocks/Terminal/panel/TerminalFilterTabs.tsx +140 -0
  259. package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.tsx +68 -0
  260. package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.ts +85 -0
  261. package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.tsx +383 -0
  262. package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.tsx +439 -0
  263. package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.tsx +550 -0
  264. package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.ts +259 -0
  265. package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.styles.ts +75 -0
  266. package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.tsx +266 -0
  267. package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.ts +82 -0
  268. package/src/react-ui/blocks/Terminal/panel/TerminalPanelFooter.tsx +112 -0
  269. package/src/react-ui/blocks/Terminal/panel/TerminalPanelHeader.tsx +178 -0
  270. package/src/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.tsx +203 -0
  271. package/src/react-ui/blocks/Terminal/panel/TerminalSessionControl.tsx +252 -0
  272. package/src/react-ui/blocks/Terminal/panel/TerminalSessionTabs.tsx +334 -0
  273. package/src/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.tsx +261 -0
  274. package/src/react-ui/blocks/Terminal/panel/TerminalThemeSelector.tsx +248 -0
  275. package/src/react-ui/blocks/Terminal/panel/index.ts +72 -0
  276. package/src/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module.css +59 -0
  277. package/src/react-ui/blocks/Terminal/panel/terminal-session-tabs.module.css +59 -0
  278. package/src/react-ui/blocks/Terminal/parsing/BadgeFormatter.ts +180 -0
  279. package/src/react-ui/blocks/Terminal/parsing/HttpLogParser.ts +248 -0
  280. package/src/react-ui/blocks/Terminal/parsing/LogParser.types.ts +283 -0
  281. package/src/react-ui/blocks/Terminal/parsing/LogParserService.ts +686 -0
  282. package/src/react-ui/blocks/Terminal/parsing/MultilineAggregator.ts +466 -0
  283. package/src/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.ts +343 -0
  284. package/src/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.ts +167 -0
  285. package/src/react-ui/blocks/Terminal/parsing/TableParser.ts +348 -0
  286. package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.ts +251 -0
  287. package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.ts +390 -0
  288. package/src/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.ts +320 -0
  289. package/src/react-ui/blocks/Terminal/parsing/ansi/index.ts +20 -0
  290. package/src/react-ui/blocks/Terminal/parsing/index.ts +69 -0
  291. package/src/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.ts +68 -0
  292. package/src/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.ts +436 -0
  293. package/src/react-ui/blocks/Terminal/parsing/levels/index.ts +14 -0
  294. package/src/react-ui/blocks/index.ts +11 -0
  295. package/src/react-ui/icons/lucide-animated/activity.tsx +2 -2
  296. package/src/react-ui/icons/lucide-animated/bell-electric.tsx +1 -1
  297. package/src/react-ui/icons/lucide-animated/bell.tsx +2 -2
  298. package/src/react-ui/icons/lucide-animated/bot.tsx +1 -1
  299. package/src/react-ui/icons/lucide-animated/box.tsx +2 -2
  300. package/src/react-ui/icons/lucide-animated/circle-check.tsx +2 -2
  301. package/src/react-ui/icons/lucide-animated/delete.tsx +2 -2
  302. package/src/react-ui/icons/lucide-animated/download.tsx +2 -2
  303. package/src/react-ui/icons/lucide-animated/home.tsx +2 -2
  304. package/src/react-ui/icons/lucide-animated/layout-panel-top.tsx +1 -1
  305. package/src/react-ui/icons/lucide-animated/plus.tsx +1 -1
  306. package/src/react-ui/icons/lucide-animated/search.tsx +1 -1
  307. package/src/react-ui/icons/lucide-animated/settings.tsx +1 -1
  308. package/src/react-ui/icons/lucide-animated/trending-down.tsx +2 -2
  309. package/src/react-ui/icons/lucide-animated/trending-up.tsx +2 -2
  310. package/src/react-ui/icons/lucide-animated/x.tsx +2 -2
  311. package/src/react-ui/lib/icon-wrapper.tsx +70 -0
  312. package/src/react-ui/lib/index.ts +1 -0
  313. package/src/react-ui/primitives/waapi/Morph/techniques/useCSSGridMorph.ts +1 -0
  314. package/src/react-ui/primitives/waapi/Morph/techniques/useFLIPClipPath.ts +1 -0
  315. package/src/react-ui/primitives/waapi/Morph/techniques/useViewTransitions.ts +1 -0
  316. package/src/react-ui/primitives/waapi/Morph/useMorph.ts +1 -0
  317. package/src/react-ui/primitives/waapi/Reorder/useReorder.ts +1 -0
  318. package/src/react-ui/primitives/waapi/Reorder/useReorderPresence.ts +1 -0
  319. package/src/react-ui/primitives/waapi/core/useAnimationOrchestrator.ts +1 -0
  320. package/src/react-ui/primitives/waapi/core/useElementRegistry.ts +1 -0
  321. package/src/react-ui/primitives/waapi/core/useFLIPAnimation.ts +1 -0
  322. package/src/react-ui/primitives/waapi/core/usePositionCapture.ts +1 -0
  323. package/src/react-ui/ui/Accordion/index.tsx +3 -3
  324. package/src/react-ui/ui/CornerBracket/CornerBracket.styles.ts +1 -1
  325. package/src/react-ui/ui/InputGroup/index.tsx +2 -0
  326. package/src/react-ui/ui/Tabs/Tabs.css +39 -0
  327. package/src/react-ui/ui/Tabs/Tabs.styles.ts +119 -31
  328. package/src/react-ui/ui/Tabs/Tabs.types.ts +8 -3
  329. package/src/react-ui/ui/Tabs/index.tsx +135 -27
@@ -0,0 +1,386 @@
1
+ /**
2
+ * Syntax highlighting for log messages (React spans).
3
+ *
4
+ * Applies color highlighting to specific elements within log messages
5
+ * using React span elements with Tailwind CSS classes.
6
+ *
7
+ * IMPORTANT: Only highlights plain text - skips lines with existing ANSI codes
8
+ * to prevent mixing codes and creating visual artifacts.
9
+ *
10
+ * Features LRU cache to avoid re-parsing identical text.
11
+ *
12
+ * @module components/devenv/terminal/SyntaxHighlight
13
+ */
14
+
15
+ 'use client';
16
+
17
+ import { cn } from '@/react-ui/lib/utils';
18
+
19
+ /**
20
+ * LRU cache for syntax highlighting results.
21
+ * Avoids re-parsing identical text on every render.
22
+ */
23
+ const highlightCache = new Map<string, React.ReactNode>();
24
+ const MAX_CACHE_SIZE = 1000;
25
+
26
+ /**
27
+ * Strip ANSI escape codes from text.
28
+ *
29
+ * @param text - Text with ANSI codes
30
+ * @returns Text without ANSI codes
31
+ */
32
+ function stripAnsiCodes(text: string): string {
33
+ // CSI sequences: \x1b[... (parameters)
34
+ // OSC sequences: \x1b]... (ST is \x07 or \x1b\\)
35
+ // General escape sequences
36
+ return text
37
+ .replace(/\x1b\[[0-9;]*[mGKH]/g, '') // CSI SGR sequences
38
+ .replace(/\x1b\][^\x07\x1b\\]*[\x07\x1b\\]/g, '') // OSC sequences
39
+ .replace(/\x1b\\/g, ''); // ST (String Terminator)
40
+ }
41
+
42
+ /**
43
+ * Get cached highlighted text or compute and cache it.
44
+ */
45
+ function getCachedHighlight(text: string): React.ReactNode {
46
+ if (highlightCache.has(text)) {
47
+ return highlightCache.get(text)!;
48
+ }
49
+
50
+ const result = highlightText(text);
51
+
52
+ // LRU: remove oldest entry if cache is full
53
+ if (highlightCache.size >= MAX_CACHE_SIZE) {
54
+ const firstKey = highlightCache.keys().next().value;
55
+ if (firstKey) highlightCache.delete(firstKey);
56
+ }
57
+
58
+ highlightCache.set(text, result);
59
+ return result;
60
+ }
61
+
62
+ /**
63
+ * Clear the highlight cache (useful for memory management).
64
+ */
65
+ export function clearHighlightCache(): void {
66
+ highlightCache.clear();
67
+ }
68
+
69
+ /**
70
+ * Check if text contains ANSI escape codes.
71
+ *
72
+ * Detects all types of ANSI escape sequences:
73
+ * - CSI (Control Sequence Introducer): \x1b[... (parameters)
74
+ * - OSC (Operating System Command): \x1b]...
75
+ * - General escape sequences: \x1b...
76
+ */
77
+ function hasAnsiCodes(text: string): boolean {
78
+ // CSI sequences: \x1b[ followed by params and final byte
79
+ // OSC sequences: \x1b] followed by content and ST
80
+ // Any ESC character: \x1b
81
+ return /\x1b\[/.test(text) || /\x1b\]/.test(text) || /\x1b/.test(text);
82
+ }
83
+
84
+ /**
85
+ * Props for SyntaxHighlightedText component.
86
+ */
87
+ export interface ISyntaxHighlightedTextProps {
88
+ /** Text to highlight */
89
+ text: string;
90
+ /** Optional custom class name */
91
+ className?: string;
92
+ }
93
+
94
+ /**
95
+ * Syntax highlighted text component.
96
+ *
97
+ * Applies syntax highlighting to plain text messages.
98
+ * Strips ANSI codes before highlighting to prevent visual artifacts
99
+ * from mixed escape sequences.
100
+ *
101
+ * @example
102
+ * ```tsx
103
+ * <SyntaxHighlightedText text="GET /api/workspaces { filter: {} }" />
104
+ * ```
105
+ */
106
+ export function SyntaxHighlightedText({ text, className }: ISyntaxHighlightedTextProps): React.JSX.Element {
107
+ if (!text || text.length === 0) {
108
+ return <span className={className}>{text}</span>;
109
+ }
110
+
111
+ // Strip ANSI codes before highlighting to enable syntax highlighting on colored logs
112
+ const cleanText = hasAnsiCodes(text) ? stripAnsiCodes(text) : text;
113
+
114
+ const highlighted = getCachedHighlight(cleanText);
115
+
116
+ return (
117
+ <span className={cn('font-mono text-sm', className)}>
118
+ {highlighted}
119
+ </span>
120
+ );
121
+ }
122
+
123
+ /**
124
+ * Apply syntax highlighting to text.
125
+ *
126
+ * Returns an array of React nodes with appropriate styling.
127
+ * Patterns are applied in order (most specific first).
128
+ */
129
+ function highlightText(text: string): React.ReactNode {
130
+ let result = text;
131
+ const tokens: { text: string; className?: string }[] = [];
132
+
133
+ // Apply highlighting in order (most specific first)
134
+ result = extractTokens(result, tokens, [
135
+ // Timestamps (HH:MM:SS, HH:MM:SS.mmm)
136
+ { pattern: /\b\d{1,2}:\d{2}:\d{2}(\.\d{1,3})?\b/g, className: 'text-cyan-400/70' },
137
+
138
+ // Bracketed badges: [INFO], [WARN], etc.
139
+ { pattern: /\[([A-Z][A-Z0-9_]*)\]/g, className: 'text-purple-400 bg-purple-500/10 px-1 rounded font-semibold' },
140
+
141
+ // Source location: file.ts:7:45 or file.TS:7:45 or NATIVE:7:39
142
+ { pattern: /\b([a-zA-Z0-9_-]+\.([a-zA-Z]{2,4}|[A-Z]{2})(?::\d+:\d+)?)\b/g, className: 'text-orange-400 bg-orange-500/10 px-1 rounded text-xs' },
143
+
144
+ // Source location: (file.ts:42:10)
145
+ { pattern: /\(([a-zA-Z0-9_-]+\.[a-zA-Z]{2,4}:\d+:\d+)\)/g, className: 'text-orange-400/80' },
146
+
147
+ // Curly braces content: {key} or {value}
148
+ { pattern: /\{([^}]+)\}/g, className: 'text-yellow-400 bg-yellow-500/5 px-0.5 rounded' },
149
+
150
+ // Parentheses content: (WARN), (debug)
151
+ { pattern: /\(([^)]+)\)/g, className: 'text-purple-300/80' },
152
+
153
+ // Angle brackets: <ERROR>, <path>
154
+ { pattern: /\b<([^>]+)>/g, className: 'text-cyan-300/80' },
155
+
156
+ // Version numbers: v1.2.3, 2.0.0-beta
157
+ { pattern: /\bv?\d+\.\d+\.\d+(-[a-z0-9.]+)?\b/gi, className: 'text-green-400 font-semibold' },
158
+
159
+ // Property keys (before colons): key:
160
+ { pattern: /\b([a-zA-Z_][a-zA-Z0-9_-]*)\s*:/g, className: 'text-green-500' },
161
+
162
+ // Keyword badges with colon: success:, error:, failed:, warning:
163
+ { pattern: /\b(success|error|failed|warning|warn|info|debug|trace|fatal):/gi, className: 'text-pink-400 font-semibold' },
164
+
165
+ // Strings (quoted values)
166
+ { pattern: /(['"])(.*?)\1/g, className: 'text-green-400' },
167
+
168
+ // Numbers (integers and floats)
169
+ { pattern: /(?<!\w)(-?\d+(?:\.\d+)?)(?!\w)/g, className: 'text-yellow-400' },
170
+
171
+ // Booleans
172
+ { pattern: /\b(true|false)\b/gi, className: 'text-blue-400' },
173
+
174
+ // Null/undefined
175
+ { pattern: /\b(null|undefined)\b/gi, className: 'text-gray-500' },
176
+
177
+ // HTTP methods
178
+ { pattern: /\b(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS|CONNECT|TRACE)\b/g, className: 'text-pink-400 font-semibold' },
179
+
180
+ // URL paths: /api/users
181
+ { pattern: /(^|[\s(])\/[a-zA-Z0-9_/-]+/g, className: 'text-cyan-400' },
182
+
183
+ // File extensions: .js, .ts, .json, .py
184
+ { pattern: /\b\w+\.(js|ts|jsx|tsx|json|py|rs|go|java|c|cpp|h|cs|sh|bash|yml|yaml|toml|md|txt|log)\b/g, className: 'text-orange-400' },
185
+
186
+ // Standalone braces and brackets (structural)
187
+ { pattern: /([{}[\]()])/g, className: 'text-yellow-500' },
188
+
189
+ // Equals signs in assignments
190
+ { pattern: /\s*=\s*/g, className: 'text-gray-400' },
191
+
192
+ // Arrows: ->, =>
193
+ { pattern: /->|=>/g, className: 'text-purple-400 font-semibold' },
194
+ ]);
195
+
196
+ // Build React nodes from tokens
197
+ return tokens.map((token, index) => (
198
+ <span key={index} className={token.className}>
199
+ {token.text}
200
+ </span>
201
+ ));
202
+ }
203
+
204
+ /**
205
+ * Extract tokens from text using patterns.
206
+ *
207
+ * Iteratively applies patterns and extracts matched tokens.
208
+ */
209
+ function extractTokens(
210
+ text: string,
211
+ tokens: { text: string; className?: string }[],
212
+ patterns: { pattern: RegExp; className?: string }[]
213
+ ): string {
214
+ let result = text;
215
+ let hasMatches = true;
216
+
217
+ while (hasMatches) {
218
+ hasMatches = false;
219
+
220
+ for (const { pattern, className } of patterns) {
221
+ const match = pattern.exec(result);
222
+ if (match) {
223
+ hasMatches = true;
224
+
225
+ // Extract matched portion
226
+ const matchedText = match[0];
227
+ const startIndex = match.index;
228
+ const endIndex = startIndex + matchedText.length;
229
+
230
+ // Add text before match (if any) as plain token
231
+ if (startIndex > 0) {
232
+ const beforeText = result.slice(0, startIndex);
233
+ if (beforeText) {
234
+ tokens.push({ text: beforeText });
235
+ }
236
+ }
237
+
238
+ // Add matched text with styling
239
+ tokens.push({ text: matchedText, className });
240
+
241
+ // Update result to continue after match
242
+ result = result.slice(endIndex);
243
+
244
+ // Reset pattern for next iteration
245
+ pattern.lastIndex = 0;
246
+ break;
247
+ }
248
+ }
249
+ }
250
+
251
+ // Add remaining text
252
+ if (result) {
253
+ tokens.push({ text: result });
254
+ }
255
+
256
+ return result;
257
+ }
258
+
259
+ /**
260
+ * Props for HighlightedJson component.
261
+ */
262
+ export interface IHighlightedJsonProps {
263
+ /** JSON object to highlight */
264
+ json: Record<string, unknown>;
265
+ /** Optional custom class name */
266
+ className?: string;
267
+ }
268
+
269
+ /**
270
+ * Highlighted JSON component.
271
+ *
272
+ * Displays JSON with syntax highlighting and proper indentation.
273
+ *
274
+ * @example
275
+ * ```tsx
276
+ * <HighlightedJson json={{ filter: {}, name: "test" }} />
277
+ * ```
278
+ */
279
+ export function HighlightedJson({ json, className }: IHighlightedJsonProps): React.JSX.Element {
280
+ const formatted = JSON.stringify(json, null, 2);
281
+
282
+ try {
283
+ const parsed = JSON.parse(formatted);
284
+ const highlighted = highlightJson(parsed);
285
+
286
+ return (
287
+ <pre className={cn('font-mono text-xs', className)}>
288
+ {highlighted}
289
+ </pre>
290
+ );
291
+ } catch {
292
+ return (
293
+ <pre className={cn('font-mono text-xs text-gray-400', className)}>
294
+ {formatted}
295
+ </pre>
296
+ );
297
+ }
298
+ }
299
+
300
+ /**
301
+ * Recursively highlight JSON.
302
+ */
303
+ function highlightJson(value: unknown, indent = 0): React.ReactNode {
304
+ const indentStr = ' '.repeat(indent);
305
+
306
+ if (value === null) {
307
+ return <span className="text-gray-500">null</span>;
308
+ }
309
+
310
+ if (value === undefined) {
311
+ return <span className="text-gray-500">undefined</span>;
312
+ }
313
+
314
+ if (typeof value === 'boolean') {
315
+ return <span className="text-blue-400">{String(value)}</span>;
316
+ }
317
+
318
+ if (typeof value === 'number') {
319
+ return <span className="text-yellow-400">{String(value)}</span>;
320
+ }
321
+
322
+ if (typeof value === 'string') {
323
+ return <span className="text-green-400">"{value}"</span>;
324
+ }
325
+
326
+ if (Array.isArray(value)) {
327
+ if (value.length === 0) {
328
+ return (
329
+ <span>
330
+ <span className="text-yellow-500">[</span>
331
+ <span className="text-yellow-500">]</span>
332
+ </span>
333
+ );
334
+ }
335
+
336
+ return (
337
+ <span>
338
+ <span className="text-yellow-500">[</span>
339
+ {'\n'}
340
+ {value.map((item, index) => (
341
+ <span key={index}>
342
+ {indentStr + ' '}
343
+ {highlightJson(item, indent + 1)}
344
+ {index < value.length - 1 ? <span className="text-gray-500">,</span> : null}
345
+ {'\n'}
346
+ </span>
347
+ ))}
348
+ {indentStr}
349
+ <span className="text-yellow-500">]</span>
350
+ </span>
351
+ );
352
+ }
353
+
354
+ if (typeof value === 'object') {
355
+ const entries = Object.entries(value as Record<string, unknown>);
356
+ if (entries.length === 0) {
357
+ return (
358
+ <span>
359
+ <span className="text-yellow-500">{'{'}</span>
360
+ <span className="text-yellow-500">{'}'}</span>
361
+ </span>
362
+ );
363
+ }
364
+
365
+ return (
366
+ <span>
367
+ <span className="text-yellow-500">{'{'}</span>
368
+ {'\n'}
369
+ {entries.map(([key, val], index) => (
370
+ <span key={key}>
371
+ {indentStr + ' '}
372
+ <span className="text-green-500">"{key}"</span>
373
+ <span className="text-gray-500">: </span>
374
+ {highlightJson(val, indent + 1)}
375
+ {index < entries.length - 1 ? <span className="text-gray-500">,</span> : null}
376
+ {'\n'}
377
+ </span>
378
+ ))}
379
+ {indentStr}
380
+ <span className="text-yellow-500">{'}'}</span>
381
+ </span>
382
+ );
383
+ }
384
+
385
+ return <span className="text-gray-500">{String(value)}</span>;
386
+ }
@@ -0,0 +1,67 @@
1
+ /**
2
+ * TerminalLogBadge Component.
3
+ *
4
+ * Wraps the base Badge component with terminal log level color styling.
5
+ * Maps log levels to appropriate Tailwind color classes matching the
6
+ * Synthwave Dark design system.
7
+ *
8
+ * @module @mks2508/mks-ui/react/blocks/Terminal/components/TerminalLogBadge
9
+ */
10
+
11
+ 'use client';
12
+
13
+ import type { ReactNode } from 'react';
14
+ import { Badge } from '@/react-ui/ui/Badge';
15
+ import { cn } from '@/react-ui/lib/utils';
16
+
17
+ import type { TLogLevelFilter } from '../parsing/LogParser.types';
18
+
19
+ /**
20
+ * Color classes for each log level.
21
+ */
22
+ const LEVEL_COLORS: Record<string, string> = {
23
+ all: 'bg-muted/40 text-muted-foreground border-muted/60',
24
+ trace: 'bg-slate-500/20 text-slate-400 border-slate-500/30',
25
+ debug: 'bg-blue-500/20 text-blue-400 border-blue-500/30',
26
+ info: 'bg-green-500/20 text-green-400 border-green-500/30',
27
+ warn: 'bg-yellow-500/20 text-yellow-400 border-yellow-500/30',
28
+ error: 'bg-orange-500/20 text-orange-400 border-orange-500/30',
29
+ fatal: 'bg-red-500/20 text-red-400 border-red-500/30',
30
+ unknown: 'bg-muted/40 text-muted-foreground border-muted/60',
31
+ };
32
+
33
+ /**
34
+ * Props for the TerminalLogBadge component.
35
+ */
36
+ export interface ITerminalLogBadgeProps {
37
+ /** Log level to display */
38
+ level: TLogLevelFilter | string;
39
+ /** Badge content (typically a count) */
40
+ children: ReactNode;
41
+ /** Additional class name */
42
+ className?: string;
43
+ }
44
+
45
+ /**
46
+ * TerminalLogBadge Component.
47
+ *
48
+ * Renders a Badge styled for terminal log levels with appropriate
49
+ * color coding for each severity level.
50
+ *
51
+ * @example
52
+ * ```tsx
53
+ * <TerminalLogBadge level="error">3</TerminalLogBadge>
54
+ * <TerminalLogBadge level="info">42</TerminalLogBadge>
55
+ * ```
56
+ */
57
+ export function TerminalLogBadge({ level, children, className }: ITerminalLogBadgeProps) {
58
+ return (
59
+ <Badge
60
+ variant="outline"
61
+ size="sm"
62
+ className={cn(LEVEL_COLORS[level] ?? LEVEL_COLORS.unknown, className)}
63
+ >
64
+ {children}
65
+ </Badge>
66
+ );
67
+ }
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Terminal components barrel export.
3
+ *
4
+ * @module @mks2508/mks-ui/react/blocks/Terminal/components
5
+ */
6
+
7
+ export * from './LogLineBadges';
8
+ export * from './SyntaxHighlight';
9
+ export * from './SpecializedSyntaxHighlighter';
10
+ export * from './TerminalLogBadge';
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Terminal Display — lightweight barrel export.
3
+ *
4
+ * Exports the readonly TerminalDisplay component + restty wrapper + chrome.
5
+ * Depends on restty only (not xterm, not shiki, not xterm addons).
6
+ * Use `@mks2508/mks-ui/react/blocks/Terminal/display` for minimal deps.
7
+ *
8
+ * @module @mks2508/mks-ui/react/blocks/Terminal/display
9
+ */
10
+
11
+ // TerminalDisplay (readonly restty terminal)
12
+ export { TerminalDisplay } from './TerminalDisplay';
13
+ export {
14
+ terminalDisplayStyles,
15
+ terminalDisplayVariants,
16
+ type TerminalDisplayVariantProps,
17
+ } from './TerminalDisplay.styles';
18
+ export type {
19
+ ITerminalDisplayProps,
20
+ ITerminalDisplayRef,
21
+ TerminalDisplaySlot,
22
+ } from './TerminalDisplay.types';
23
+
24
+ // Restty React wrapper (for advanced use)
25
+ export { TerminalRestty } from './TerminalRestty';
26
+ export type { ITerminalResttyProps, ITerminalResttyRef } from './TerminalRestty';
27
+
28
+ // Chrome (re-exported for convenience)
29
+ export { TerminalPanelChrome, NOISE_TEXTURE_SVG, terminalScrollStyles } from './panel/TerminalPanelChrome';
30
+ export type { ITerminalPanelChromeProps } from './panel/TerminalPanelChrome.types';
31
+ export {
32
+ terminalChromeStyles,
33
+ terminalChromeVariants,
34
+ ACCENT_GRADIENTS,
35
+ type TerminalChromeSlot,
36
+ } from './panel/TerminalPanelChrome.styles';
37
+
38
+ // Theme utilities (needed for display customization)
39
+ export { SYNTHWAVE_TERMINAL_THEME, getTerminalTheme } from './Terminal.theme';
40
+ export {
41
+ hexToResttyColor,
42
+ xtermThemeToGhostty,
43
+ getSynthwaveGhosttyTheme,
44
+ type IResttyThemeColor,
45
+ type IResttyGhosttyTheme,
46
+ } from './Terminal.theme.restty';
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Terminal Hooks Module.
3
+ *
4
+ * Reusable hooks for terminal WebSocket connections
5
+ * and global settings management.
6
+ *
7
+ * @module @mks2508/mks-ui/react/blocks/Terminal/hooks
8
+ */
9
+
10
+ export {
11
+ useTerminalWebSocket,
12
+ type IUseTerminalWebSocketOptions,
13
+ type IUseTerminalWebSocketReturn,
14
+ type ITerminalWsServerMessage,
15
+ type TTerminalWsStatus,
16
+ } from './useTerminalWebSocket';
17
+
18
+ export {
19
+ useTerminalSettings,
20
+ type ITerminalSettings,
21
+ type IUseTerminalSettingsReturn,
22
+ } from './useTerminalSettings';