@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,146 @@
1
+ /**
2
+ * ResttyAdapter - ITerminalAdapter implementation for restty.
3
+ *
4
+ * Wraps restty's GPU-accelerated terminal renderer into the
5
+ * pluggable adapter interface, enabling renderer switching in the UI.
6
+ *
7
+ * Key differences from XTermAdapter:
8
+ * - Restty manages its own PTY WebSocket via custom PtyTransport
9
+ * - GPU rendering (WebGPU/WebGL2) instead of DOM/canvas
10
+ * - No write()/writeln() for injecting display text — restty renders PTY output
11
+ * - Built-in multi-pane, theme catalog, and text shaping with ligatures
12
+ *
13
+ * @module components/devenv/terminal/ResttyAdapter
14
+ */
15
+ import type { ITerminalAdapter, ITerminalAdapterCapabilities, ITerminalBackendType, ITerminalMode, ITerminalOptions, IPtyTransportFactory } from './Terminal.types';
16
+ import type { Restty, ResttyPaneHandle } from 'restty';
17
+ /**
18
+ * ITerminalAdapter implementation backed by restty.
19
+ *
20
+ * Uses restty's Restty class with a custom DevenvPtyTransport
21
+ * that bridges the mks-devenv WebSocket JSON protocol. Status messages
22
+ * are not rendered in the terminal — they should be handled as React overlays.
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const adapter = new ResttyAdapter({ fontSize: 14 });
27
+ * await adapter.initialize(containerEl, options);
28
+ * adapter.connectPty?.('ws://localhost:3100/terminal/session-1');
29
+ * ```
30
+ */
31
+ export declare class ResttyAdapter implements ITerminalAdapter {
32
+ /** Backend type identifier for factory pattern */
33
+ readonly type: ITerminalBackendType;
34
+ /** Adapter capabilities — restty manages its own connection and supports GPU */
35
+ readonly capabilities: ITerminalAdapterCapabilities;
36
+ private restty;
37
+ private transport;
38
+ private options;
39
+ private rootElement;
40
+ private createTransport?;
41
+ /**
42
+ * @param options - Terminal initialization options
43
+ * @param createTransport - Optional factory to create a custom PTY transport.
44
+ * If not provided, restty manages its own PTY connection internally.
45
+ */
46
+ constructor(options: ITerminalOptions, createTransport?: IPtyTransportFactory);
47
+ /**
48
+ * Initialize restty in the given container element.
49
+ * Dynamically imports restty to enable code-splitting and SSR safety.
50
+ *
51
+ * @param container - DOM element to render the terminal into
52
+ * @param options - Terminal initialization options
53
+ */
54
+ initialize(container: HTMLElement, options: ITerminalOptions): Promise<void>;
55
+ /**
56
+ * Write data to the terminal display.
57
+ * No-op for restty — it renders PTY output via its own connection.
58
+ * Status messages should be displayed as React overlays.
59
+ */
60
+ write(_data: string): void;
61
+ /**
62
+ * Write data with newline to the terminal display.
63
+ * No-op for restty — see write().
64
+ */
65
+ writeln(_data: string): void;
66
+ /**
67
+ * Clear the terminal screen and scrollback.
68
+ */
69
+ clear(): void;
70
+ /**
71
+ * Resize the terminal to explicit dimensions.
72
+ * Uses Restty's native resize() (v0.1.21+) for precise control.
73
+ *
74
+ * @param cols - Number of columns
75
+ * @param rows - Number of rows
76
+ */
77
+ resize(cols: number, rows: number): void;
78
+ /**
79
+ * Dispose of restty and release all resources (GPU, WASM, WebSocket).
80
+ */
81
+ dispose(): void;
82
+ /**
83
+ * Switch between interactive and readonly modes.
84
+ * No-op for restty — mode is determined by PTY connection state.
85
+ */
86
+ setMode(_mode: ITerminalMode): void;
87
+ /**
88
+ * Focus the terminal for keyboard input.
89
+ * Uses Restty's native focus() (v0.1.21+) which handles pane focus correctly.
90
+ */
91
+ focus(): void;
92
+ /**
93
+ * Remove focus from the terminal.
94
+ * Uses Restty's native blur() (v0.1.21+).
95
+ */
96
+ blur(): void;
97
+ /**
98
+ * Connect to a PTY backend via WebSocket URL.
99
+ *
100
+ * @param url - WebSocket URL for PTY connection
101
+ */
102
+ connectPty(url: string): void;
103
+ /**
104
+ * Disconnect from the PTY backend.
105
+ */
106
+ disconnectPty(): void;
107
+ /**
108
+ * Check if PTY WebSocket is connected.
109
+ */
110
+ isPtyConnected(): boolean;
111
+ /**
112
+ * Update font size at runtime.
113
+ *
114
+ * @param size - Font size in CSS pixels
115
+ */
116
+ setFontSize(size: number): void;
117
+ /**
118
+ * Send raw input data to the terminal PTY.
119
+ *
120
+ * @param data - Input data string
121
+ */
122
+ sendInput(data: string): void;
123
+ /**
124
+ * Copy the current text selection to the clipboard.
125
+ */
126
+ copySelection(): Promise<boolean>;
127
+ /**
128
+ * Paste clipboard contents into the terminal.
129
+ */
130
+ pasteClipboard(): Promise<boolean>;
131
+ /**
132
+ * Get the underlying Restty instance for advanced usage.
133
+ * Use sparingly — prefer the adapter interface.
134
+ */
135
+ getResttyInstance(): Restty | null;
136
+ /**
137
+ * Get the active pane handle for direct restty pane operations.
138
+ */
139
+ getActivePane(): ResttyPaneHandle | null;
140
+ /**
141
+ * Build font source list following restty's priority pattern:
142
+ * local fonts first (fast), then CDN fallback.
143
+ */
144
+ private buildFontSources;
145
+ }
146
+ //# sourceMappingURL=ResttyAdapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ResttyAdapter.d.ts","sourceRoot":"","sources":["../../../../src/react-ui/blocks/Terminal/ResttyAdapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,4BAA4B,EAC5B,oBAAoB,EACpB,aAAa,EACb,gBAAgB,EAEhB,oBAAoB,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,QAAQ,CAAC;AAGvD;;;;;;;;;;;;;GAaG;AACH,qBAAa,aAAc,YAAW,gBAAgB;IACpD,kDAAkD;IAClD,SAAgB,IAAI,EAAE,oBAAoB,CAAW;IAErD,gFAAgF;IAChF,SAAgB,YAAY,EAAE,4BAA4B,CAKxD;IAEF,OAAO,CAAC,MAAM,CAAuB;IACrC,OAAO,CAAC,SAAS,CAA8B;IAC/C,OAAO,CAAC,OAAO,CAAmB;IAClC,OAAO,CAAC,WAAW,CAA4B;IAC/C,OAAO,CAAC,eAAe,CAAC,CAAuB;IAE/C;;;;OAIG;gBACS,OAAO,EAAE,gBAAgB,EAAE,eAAe,CAAC,EAAE,oBAAoB;IAK7E;;;;;;OAMG;IACG,UAAU,CAAC,SAAS,EAAE,WAAW,EAAE,OAAO,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IA+BlF;;;;OAIG;IACH,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI1B;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAI5B;;OAEG;IACH,KAAK,IAAI,IAAI;IAIb;;;;;;OAMG;IACH,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI;IAIxC;;OAEG;IACH,OAAO,IAAI,IAAI;IAOf;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,aAAa,GAAG,IAAI;IAInC;;;OAGG;IACH,KAAK,IAAI,IAAI;IAIb;;;OAGG;IACH,IAAI,IAAI,IAAI;IAIZ;;;;OAIG;IACH,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAI7B;;OAEG;IACH,aAAa,IAAI,IAAI;IAIrB;;OAEG;IACH,cAAc,IAAI,OAAO;IAIzB;;;;OAIG;IACH,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI/B;;;;OAIG;IACH,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI7B;;OAEG;IACG,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC;IAIvC;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IAIxC;;;OAGG;IACH,iBAAiB,IAAI,MAAM,GAAG,IAAI;IAIlC;;OAEG;IACH,aAAa,IAAI,gBAAgB,GAAG,IAAI;IAIxC;;;OAGG;IACH,OAAO,CAAC,gBAAgB;CA2BzB"}
@@ -0,0 +1,213 @@
1
+ import { getSynthwaveGhosttyTheme, xtermThemeToGhostty } from "./Terminal.theme.restty.js";
2
+
3
+ //#region src/react-ui/blocks/Terminal/ResttyAdapter.ts
4
+ /**
5
+ * ITerminalAdapter implementation backed by restty.
6
+ *
7
+ * Uses restty's Restty class with a custom DevenvPtyTransport
8
+ * that bridges the mks-devenv WebSocket JSON protocol. Status messages
9
+ * are not rendered in the terminal — they should be handled as React overlays.
10
+ *
11
+ * @example
12
+ * ```ts
13
+ * const adapter = new ResttyAdapter({ fontSize: 14 });
14
+ * await adapter.initialize(containerEl, options);
15
+ * adapter.connectPty?.('ws://localhost:3100/terminal/session-1');
16
+ * ```
17
+ */
18
+ var ResttyAdapter = class {
19
+ /** Backend type identifier for factory pattern */
20
+ type = "xterm";
21
+ /** Adapter capabilities — restty manages its own connection and supports GPU */
22
+ capabilities = {
23
+ managesOwnConnection: true,
24
+ gpuRendering: true,
25
+ multiPane: true,
26
+ builtinThemes: true
27
+ };
28
+ restty = null;
29
+ transport = null;
30
+ options;
31
+ rootElement = null;
32
+ createTransport;
33
+ /**
34
+ * @param options - Terminal initialization options
35
+ * @param createTransport - Optional factory to create a custom PTY transport.
36
+ * If not provided, restty manages its own PTY connection internally.
37
+ */
38
+ constructor(options, createTransport) {
39
+ this.options = options;
40
+ this.createTransport = createTransport;
41
+ }
42
+ /**
43
+ * Initialize restty in the given container element.
44
+ * Dynamically imports restty to enable code-splitting and SSR safety.
45
+ *
46
+ * @param container - DOM element to render the terminal into
47
+ * @param options - Terminal initialization options
48
+ */
49
+ async initialize(container, options) {
50
+ this.options = {
51
+ ...this.options,
52
+ ...options
53
+ };
54
+ this.rootElement = container;
55
+ const { Restty } = await import("restty");
56
+ this.transport = this.createTransport?.() ?? null;
57
+ this.restty = new Restty({
58
+ root: container,
59
+ appOptions: {
60
+ renderer: "auto",
61
+ fontSize: this.options.fontSize ?? 14,
62
+ autoResize: true,
63
+ ...this.transport ? { ptyTransport: this.transport } : {}
64
+ },
65
+ fontSources: this.buildFontSources(),
66
+ createInitialPane: true,
67
+ shortcuts: false,
68
+ defaultContextMenu: true
69
+ });
70
+ if (this.options.theme) this.restty.applyTheme(xtermThemeToGhostty(this.options.theme));
71
+ else this.restty.applyTheme(getSynthwaveGhosttyTheme());
72
+ }
73
+ /**
74
+ * Write data to the terminal display.
75
+ * No-op for restty — it renders PTY output via its own connection.
76
+ * Status messages should be displayed as React overlays.
77
+ */
78
+ write(_data) {}
79
+ /**
80
+ * Write data with newline to the terminal display.
81
+ * No-op for restty — see write().
82
+ */
83
+ writeln(_data) {}
84
+ /**
85
+ * Clear the terminal screen and scrollback.
86
+ */
87
+ clear() {
88
+ this.restty?.clearScreen();
89
+ }
90
+ /**
91
+ * Resize the terminal to explicit dimensions.
92
+ * Uses Restty's native resize() (v0.1.21+) for precise control.
93
+ *
94
+ * @param cols - Number of columns
95
+ * @param rows - Number of rows
96
+ */
97
+ resize(cols, rows) {
98
+ this.restty?.resize(cols, rows);
99
+ }
100
+ /**
101
+ * Dispose of restty and release all resources (GPU, WASM, WebSocket).
102
+ */
103
+ dispose() {
104
+ this.restty?.destroy();
105
+ this.restty = null;
106
+ this.transport = null;
107
+ this.rootElement = null;
108
+ }
109
+ /**
110
+ * Switch between interactive and readonly modes.
111
+ * No-op for restty — mode is determined by PTY connection state.
112
+ */
113
+ setMode(_mode) {}
114
+ /**
115
+ * Focus the terminal for keyboard input.
116
+ * Uses Restty's native focus() (v0.1.21+) which handles pane focus correctly.
117
+ */
118
+ focus() {
119
+ this.restty?.focus();
120
+ }
121
+ /**
122
+ * Remove focus from the terminal.
123
+ * Uses Restty's native blur() (v0.1.21+).
124
+ */
125
+ blur() {
126
+ this.restty?.blur();
127
+ }
128
+ /**
129
+ * Connect to a PTY backend via WebSocket URL.
130
+ *
131
+ * @param url - WebSocket URL for PTY connection
132
+ */
133
+ connectPty(url) {
134
+ this.restty?.connectPty(url);
135
+ }
136
+ /**
137
+ * Disconnect from the PTY backend.
138
+ */
139
+ disconnectPty() {
140
+ this.restty?.disconnectPty();
141
+ }
142
+ /**
143
+ * Check if PTY WebSocket is connected.
144
+ */
145
+ isPtyConnected() {
146
+ return this.restty?.isPtyConnected() ?? false;
147
+ }
148
+ /**
149
+ * Update font size at runtime.
150
+ *
151
+ * @param size - Font size in CSS pixels
152
+ */
153
+ setFontSize(size) {
154
+ this.restty?.setFontSize(size);
155
+ }
156
+ /**
157
+ * Send raw input data to the terminal PTY.
158
+ *
159
+ * @param data - Input data string
160
+ */
161
+ sendInput(data) {
162
+ this.restty?.sendInput(data);
163
+ }
164
+ /**
165
+ * Copy the current text selection to the clipboard.
166
+ */
167
+ async copySelection() {
168
+ return this.restty?.copySelectionToClipboard() ?? false;
169
+ }
170
+ /**
171
+ * Paste clipboard contents into the terminal.
172
+ */
173
+ async pasteClipboard() {
174
+ return this.restty?.pasteFromClipboard() ?? false;
175
+ }
176
+ /**
177
+ * Get the underlying Restty instance for advanced usage.
178
+ * Use sparingly — prefer the adapter interface.
179
+ */
180
+ getResttyInstance() {
181
+ return this.restty;
182
+ }
183
+ /**
184
+ * Get the active pane handle for direct restty pane operations.
185
+ */
186
+ getActivePane() {
187
+ return this.restty?.activePane() ?? null;
188
+ }
189
+ /**
190
+ * Build font source list following restty's priority pattern:
191
+ * local fonts first (fast), then CDN fallback.
192
+ */
193
+ buildFontSources() {
194
+ const family = this.options.fontFamily;
195
+ if (family) return [{
196
+ type: "local",
197
+ matchers: family.split(",").map((f) => f.trim().replace(/['"]/g, "").toLowerCase()).filter(Boolean)
198
+ }];
199
+ return [{
200
+ type: "local",
201
+ matchers: [
202
+ "jetbrains mono",
203
+ "fira code",
204
+ "sf mono",
205
+ "cascadia code",
206
+ "meslo"
207
+ ]
208
+ }];
209
+ }
210
+ };
211
+
212
+ //#endregion
213
+ export { ResttyAdapter };
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Terminal adapter interface and factory.
3
+ *
4
+ * Allows switching between xterm.js, WebContainer, and Monaco backends
5
+ * through a unified interface. Backends are loaded dynamically to enable
6
+ * code-splitting and reduce initial bundle size.
7
+ *
8
+ * @module components/devenv/terminal/adapter
9
+ */
10
+ import type { ITerminalAdapter, ITerminalBackendType, ITerminalRendererType, ITerminalOptions } from './Terminal.types';
11
+ /**
12
+ * Create terminal adapter based on backend type.
13
+ *
14
+ * Factory function that instantiates the appropriate terminal backend
15
+ * adapter. Currently only xterm.js is implemented, with WebContainer
16
+ * and Monaco planned for future releases.
17
+ *
18
+ * @param backend - Backend type to instantiate
19
+ * @param options - Terminal options to pass to the adapter
20
+ * @returns Promise resolving to the configured adapter
21
+ *
22
+ * @throws {Error} If backend type is not supported yet
23
+ *
24
+ * @example
25
+ * ```ts
26
+ * const adapter = await createTerminalAdapter('xterm', {
27
+ * mode: 'interactive',
28
+ * wsUrl: 'ws://localhost:3100/terminal/session-123',
29
+ * });
30
+ * await adapter.initialize(container, options);
31
+ * ```
32
+ */
33
+ export declare function createTerminalAdapter(backend: ITerminalBackendType, options: ITerminalOptions): Promise<ITerminalAdapter>;
34
+ /**
35
+ * Create terminal adapter based on renderer type.
36
+ *
37
+ * Factory function that instantiates the appropriate terminal renderer
38
+ * adapter. Uses dynamic import for code-splitting — restty's WASM bundle
39
+ * is only loaded when the `'restty'` renderer is selected.
40
+ *
41
+ * @param renderer - Renderer type to instantiate
42
+ * @param options - Terminal options to pass to the adapter
43
+ * @returns Promise resolving to the configured adapter
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const adapter = await createTerminalAdapterForRenderer('restty', {
48
+ * mode: 'interactive',
49
+ * wsUrl: 'ws://localhost:3100/terminal/session-123',
50
+ * });
51
+ * await adapter.initialize(container, options);
52
+ * ```
53
+ */
54
+ export declare function createTerminalAdapterForRenderer(renderer: ITerminalRendererType, options: ITerminalOptions): Promise<ITerminalAdapter>;
55
+ //# sourceMappingURL=Terminal.adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Terminal.adapter.d.ts","sourceRoot":"","sources":["../../../../src/react-ui/blocks/Terminal/Terminal.adapter.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAE1B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,qBAAqB,CACzC,OAAO,EAAE,oBAAoB,EAC7B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,gBAAgB,CAAC,CAgB3B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,gCAAgC,CACpD,QAAQ,EAAE,qBAAqB,EAC/B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,gBAAgB,CAAC,CAa3B"}
@@ -0,0 +1,68 @@
1
+ //#region src/react-ui/blocks/Terminal/Terminal.adapter.ts
2
+ /**
3
+ * Create terminal adapter based on backend type.
4
+ *
5
+ * Factory function that instantiates the appropriate terminal backend
6
+ * adapter. Currently only xterm.js is implemented, with WebContainer
7
+ * and Monaco planned for future releases.
8
+ *
9
+ * @param backend - Backend type to instantiate
10
+ * @param options - Terminal options to pass to the adapter
11
+ * @returns Promise resolving to the configured adapter
12
+ *
13
+ * @throws {Error} If backend type is not supported yet
14
+ *
15
+ * @example
16
+ * ```ts
17
+ * const adapter = await createTerminalAdapter('xterm', {
18
+ * mode: 'interactive',
19
+ * wsUrl: 'ws://localhost:3100/terminal/session-123',
20
+ * });
21
+ * await adapter.initialize(container, options);
22
+ * ```
23
+ */
24
+ async function createTerminalAdapter(backend, options) {
25
+ switch (backend) {
26
+ case "xterm":
27
+ const { XTermAdapter } = await import("./XTermAdapter.js");
28
+ return new XTermAdapter(options);
29
+ case "webcontainer":
30
+ case "monaco": throw new Error(`Backend '${backend}' is not yet implemented. Use 'xterm' backend for now.`);
31
+ default: throw new Error(`Unknown terminal backend: ${backend}`);
32
+ }
33
+ }
34
+ /**
35
+ * Create terminal adapter based on renderer type.
36
+ *
37
+ * Factory function that instantiates the appropriate terminal renderer
38
+ * adapter. Uses dynamic import for code-splitting — restty's WASM bundle
39
+ * is only loaded when the `'restty'` renderer is selected.
40
+ *
41
+ * @param renderer - Renderer type to instantiate
42
+ * @param options - Terminal options to pass to the adapter
43
+ * @returns Promise resolving to the configured adapter
44
+ *
45
+ * @example
46
+ * ```ts
47
+ * const adapter = await createTerminalAdapterForRenderer('restty', {
48
+ * mode: 'interactive',
49
+ * wsUrl: 'ws://localhost:3100/terminal/session-123',
50
+ * });
51
+ * await adapter.initialize(container, options);
52
+ * ```
53
+ */
54
+ async function createTerminalAdapterForRenderer(renderer, options) {
55
+ switch (renderer) {
56
+ case "restty": {
57
+ const { ResttyAdapter } = await import("./ResttyAdapter.js");
58
+ return new ResttyAdapter(options);
59
+ }
60
+ default: {
61
+ const { XTermAdapter } = await import("./XTermAdapter.js");
62
+ return new XTermAdapter(options);
63
+ }
64
+ }
65
+ }
66
+
67
+ //#endregion
68
+ export { createTerminalAdapter, createTerminalAdapterForRenderer };
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Synthwave Industrial Dark theme for xterm.js.
3
+ *
4
+ * Matches mks-dev-environment design system from globals.css:
5
+ * - background: #241B2F (220 25% 15%)
6
+ * - primary: #D40C67 (330 85% 43%)
7
+ * - success: #44ffaa (142 100% 62%)
8
+ *
9
+ * Color palette optimized for dark terminal with high contrast
10
+ * and cyberpunk/synthwave aesthetic.
11
+ *
12
+ * @module components/devenv/terminal/theme
13
+ */
14
+ import type { ITerminalTheme } from './Terminal.types';
15
+ /**
16
+ * Synthwave Industrial Dark theme for xterm.js.
17
+ *
18
+ * Features:
19
+ * - Deep purple background (#241B2F) matching design system
20
+ * - Primary magenta cursor (#D40C67) with glow effect support
21
+ * - High-contrast ANSI colors for readability
22
+ * - Cyan selection with transparency for visual feedback
23
+ */
24
+ export declare const SYNTHWAVE_TERMINAL_THEME: ITerminalTheme;
25
+ /**
26
+ * Get terminal theme with optional overrides.
27
+ *
28
+ * Allows customizing the Synthwave theme while preserving
29
+ * the default color scheme. Useful for per-session theming.
30
+ *
31
+ * @param overrides - Partial theme properties to override
32
+ * @returns Complete terminal theme with applied overrides
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * const customTheme = getTerminalTheme({
37
+ * cursor: '#00ff00',
38
+ * fontSize: 16,
39
+ * });
40
+ * ```
41
+ */
42
+ export declare function getTerminalTheme(overrides?: Partial<ITerminalTheme>): ITerminalTheme;
43
+ //# sourceMappingURL=Terminal.theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Terminal.theme.d.ts","sourceRoot":"","sources":["../../../../src/react-ui/blocks/Terminal/Terminal.theme.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD;;;;;;;;GAQG;AACH,eAAO,MAAM,wBAAwB,EAAE,cA+BtC,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAC9B,SAAS,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,GAClC,cAAc,CAEhB"}
@@ -0,0 +1,59 @@
1
+ //#region src/react-ui/blocks/Terminal/Terminal.theme.ts
2
+ /**
3
+ * Synthwave Industrial Dark theme for xterm.js.
4
+ *
5
+ * Features:
6
+ * - Deep purple background (#241B2F) matching design system
7
+ * - Primary magenta cursor (#D40C67) with glow effect support
8
+ * - High-contrast ANSI colors for readability
9
+ * - Cyan selection with transparency for visual feedback
10
+ */
11
+ const SYNTHWAVE_TERMINAL_THEME = {
12
+ background: "#241B2F",
13
+ foreground: "#e8e8ec",
14
+ cursor: "#D40C67",
15
+ cursorAccent: "#D40C67",
16
+ selectionBackground: "rgba(0, 217, 255, 0.3)",
17
+ black: "#1a1a2e",
18
+ red: "#ff4466",
19
+ green: "#44ffaa",
20
+ yellow: "#ffcc00",
21
+ blue: "#00d9ff",
22
+ magenta: "#D40C67",
23
+ cyan: "#00d9ff",
24
+ white: "#e8e8ec",
25
+ brightBlack: "#2d2d44",
26
+ brightRed: "#ff6b6b",
27
+ brightGreen: "#66ffcc",
28
+ brightYellow: "#ffdd33",
29
+ brightBlue: "#33e0ff",
30
+ brightMagenta: "#ff3399",
31
+ brightCyan: "#33e0ff",
32
+ brightWhite: "#ffffff"
33
+ };
34
+ /**
35
+ * Get terminal theme with optional overrides.
36
+ *
37
+ * Allows customizing the Synthwave theme while preserving
38
+ * the default color scheme. Useful for per-session theming.
39
+ *
40
+ * @param overrides - Partial theme properties to override
41
+ * @returns Complete terminal theme with applied overrides
42
+ *
43
+ * @example
44
+ * ```ts
45
+ * const customTheme = getTerminalTheme({
46
+ * cursor: '#00ff00',
47
+ * fontSize: 16,
48
+ * });
49
+ * ```
50
+ */
51
+ function getTerminalTheme(overrides) {
52
+ return {
53
+ ...SYNTHWAVE_TERMINAL_THEME,
54
+ ...overrides
55
+ };
56
+ }
57
+
58
+ //#endregion
59
+ export { SYNTHWAVE_TERMINAL_THEME, getTerminalTheme };
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Theme bridge between ITerminalTheme (xterm.js format) and GhosttyTheme (restty format).
3
+ *
4
+ * Converts the mks-dev-environment Synthwave theme colors into
5
+ * restty's Ghostty-compatible theme format for GPU-rendered terminals.
6
+ *
7
+ * @module components/devenv/terminal/theme-restty
8
+ */
9
+ import type { ITerminalTheme } from './Terminal.types';
10
+ /**
11
+ * RGB color as used by restty's Ghostty theme format.
12
+ * Each channel is 0-255.
13
+ */
14
+ export interface IResttyThemeColor {
15
+ r: number;
16
+ g: number;
17
+ b: number;
18
+ a?: number;
19
+ }
20
+ /**
21
+ * Ghostty theme structure compatible with restty's applyTheme().
22
+ * Mirrors the GhosttyTheme type from restty/theme.
23
+ */
24
+ export interface IResttyGhosttyTheme {
25
+ name?: string;
26
+ colors: {
27
+ background?: IResttyThemeColor;
28
+ foreground?: IResttyThemeColor;
29
+ cursor?: IResttyThemeColor;
30
+ cursorText?: IResttyThemeColor;
31
+ selectionBackground?: IResttyThemeColor;
32
+ selectionForeground?: IResttyThemeColor;
33
+ palette: Array<IResttyThemeColor | undefined>;
34
+ };
35
+ raw: Record<string, string>;
36
+ }
37
+ /**
38
+ * Convert a hex color string (#RRGGBB or #RGB) to restty's ThemeColor format.
39
+ *
40
+ * @param hex - Hex color string (e.g., '#D40C67', '#fff')
41
+ * @returns RGB color object with channels 0-255
42
+ */
43
+ export declare function hexToResttyColor(hex: string): IResttyThemeColor;
44
+ /**
45
+ * Convert ITerminalTheme (xterm.js format) to GhosttyTheme (restty format).
46
+ *
47
+ * Maps the 16-color ANSI palette plus background, foreground, cursor,
48
+ * and selection colors to restty's Ghostty theme structure.
49
+ *
50
+ * @param theme - xterm.js theme with hex color values
51
+ * @returns Ghostty theme compatible with restty's applyTheme()
52
+ */
53
+ export declare function xtermThemeToGhostty(theme: ITerminalTheme): IResttyGhosttyTheme;
54
+ /**
55
+ * Get the Synthwave Industrial Dark theme in Ghostty format for restty.
56
+ *
57
+ * Pre-built conversion of the default terminal theme, ready to pass
58
+ * directly to `restty.applyTheme()`.
59
+ *
60
+ * @returns GhosttyTheme with Synthwave colors
61
+ */
62
+ export declare function getSynthwaveGhosttyTheme(): IResttyGhosttyTheme;
63
+ //# sourceMappingURL=Terminal.theme.restty.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Terminal.theme.restty.d.ts","sourceRoot":"","sources":["../../../../src/react-ui/blocks/Terminal/Terminal.theme.restty.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGvD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,CAAC,EAAE,MAAM,CAAC;CACZ;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE;QACN,UAAU,CAAC,EAAE,iBAAiB,CAAC;QAC/B,UAAU,CAAC,EAAE,iBAAiB,CAAC;QAC/B,MAAM,CAAC,EAAE,iBAAiB,CAAC;QAC3B,UAAU,CAAC,EAAE,iBAAiB,CAAC;QAC/B,mBAAmB,CAAC,EAAE,iBAAiB,CAAC;QACxC,mBAAmB,CAAC,EAAE,iBAAiB,CAAC;QACxC,OAAO,EAAE,KAAK,CAAC,iBAAiB,GAAG,SAAS,CAAC,CAAC;KAC/C,CAAC;IACF,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,iBAAiB,CAa/D;AAiCD;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,cAAc,GAAG,mBAAmB,CAwC9E;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,IAAI,mBAAmB,CAE9D"}