@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.
- package/dist/react-ui/blocks/Terminal/ResttyAdapter.d.ts +146 -0
- package/dist/react-ui/blocks/Terminal/ResttyAdapter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/ResttyAdapter.js +213 -0
- package/dist/react-ui/blocks/Terminal/Terminal.adapter.d.ts +55 -0
- package/dist/react-ui/blocks/Terminal/Terminal.adapter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/Terminal.adapter.js +68 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.d.ts +43 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.js +59 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.restty.d.ts +63 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.restty.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.restty.js +109 -0
- package/dist/react-ui/blocks/Terminal/Terminal.types.d.ts +351 -0
- package/dist/react-ui/blocks/Terminal/Terminal.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/TerminalPanel.d.ts +60 -0
- package/dist/react-ui/blocks/Terminal/TerminalPanel.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/TerminalPanel.js +183 -0
- package/dist/react-ui/blocks/Terminal/TerminalRestty.d.ts +111 -0
- package/dist/react-ui/blocks/Terminal/TerminalRestty.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/TerminalRestty.js +185 -0
- package/dist/react-ui/blocks/Terminal/TerminalXterm.d.ts +58 -0
- package/dist/react-ui/blocks/Terminal/TerminalXterm.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/TerminalXterm.js +143 -0
- package/dist/react-ui/blocks/Terminal/XTermAdapter.d.ts +87 -0
- package/dist/react-ui/blocks/Terminal/XTermAdapter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/XTermAdapter.js +135 -0
- package/dist/react-ui/blocks/Terminal/components/LogLineBadges.d.ts +160 -0
- package/dist/react-ui/blocks/Terminal/components/LogLineBadges.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/components/LogLineBadges.js +185 -0
- package/dist/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.d.ts +48 -0
- package/dist/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.js +139 -0
- package/dist/react-ui/blocks/Terminal/components/SyntaxHighlight.d.ts +60 -0
- package/dist/react-ui/blocks/Terminal/components/SyntaxHighlight.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/components/SyntaxHighlight.js +352 -0
- package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge.d.ts +36 -0
- package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge.js +52 -0
- package/dist/react-ui/blocks/Terminal/components/index.d.ts +10 -0
- package/dist/react-ui/blocks/Terminal/components/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/components/index.js +4 -0
- package/dist/react-ui/blocks/Terminal/hooks/index.d.ts +11 -0
- package/dist/react-ui/blocks/Terminal/hooks/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/hooks/index.js +2 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalSettings.d.ts +69 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalSettings.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalSettings.js +162 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.d.ts +104 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.js +180 -0
- package/dist/react-ui/blocks/Terminal/index.d.ts +39 -0
- package/dist/react-ui/blocks/Terminal/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/index.js +38 -0
- package/dist/react-ui/blocks/Terminal/panel/LogLinesViewer.d.ts +58 -0
- package/dist/react-ui/blocks/Terminal/panel/LogLinesViewer.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/LogLinesViewer.js +222 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel.d.ts +74 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel.js +168 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.d.ts +42 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.js +175 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterTabs.d.ts +43 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterTabs.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.d.ts +38 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.js +62 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.d.ts +67 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.d.ts +32 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.js +326 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.d.ts +36 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.js +371 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.d.ts +67 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.js +417 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.d.ts +197 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.d.ts +54 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.js +193 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.d.ts +57 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter.d.ts +30 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter.js +126 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader.d.ts +31 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader.js +149 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.d.ts +35 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionControl.d.ts +58 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionControl.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs.d.ts +63 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs.js +245 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.d.ts +24 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.js +225 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector.d.ts +35 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector.js +187 -0
- package/dist/react-ui/blocks/Terminal/panel/index.d.ts +30 -0
- package/dist/react-ui/blocks/Terminal/panel/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module-Bovc57nm.css +60 -0
- package/dist/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module.js +5 -0
- package/dist/react-ui/blocks/Terminal/panel/terminal-session-tabs.module-QyxHO7cN.css +60 -0
- package/dist/react-ui/blocks/Terminal/panel/terminal-session-tabs.module.js +5 -0
- package/dist/react-ui/blocks/Terminal/parsing/BadgeFormatter.d.ts +73 -0
- package/dist/react-ui/blocks/Terminal/parsing/BadgeFormatter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/BadgeFormatter.js +136 -0
- package/dist/react-ui/blocks/Terminal/parsing/HttpLogParser.d.ts +117 -0
- package/dist/react-ui/blocks/Terminal/parsing/HttpLogParser.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/HttpLogParser.js +174 -0
- package/dist/react-ui/blocks/Terminal/parsing/LogParser.types.d.ts +221 -0
- package/dist/react-ui/blocks/Terminal/parsing/LogParser.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/LogParserService.d.ts +184 -0
- package/dist/react-ui/blocks/Terminal/parsing/LogParserService.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/LogParserService.js +478 -0
- package/dist/react-ui/blocks/Terminal/parsing/MultilineAggregator.d.ts +173 -0
- package/dist/react-ui/blocks/Terminal/parsing/MultilineAggregator.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/MultilineAggregator.js +313 -0
- package/dist/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.d.ts +181 -0
- package/dist/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.js +221 -0
- package/dist/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.d.ts +69 -0
- package/dist/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.js +142 -0
- package/dist/react-ui/blocks/Terminal/parsing/TableParser.d.ts +125 -0
- package/dist/react-ui/blocks/Terminal/parsing/TableParser.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/TableParser.js +245 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.d.ts +165 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.js +225 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.d.ts +164 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.js +285 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.d.ts +188 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.js +178 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/index.d.ts +12 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/index.d.ts +24 -0
- package/dist/react-ui/blocks/Terminal/parsing/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.d.ts +56 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.d.ts +140 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.js +325 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/index.d.ts +10 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/index.d.ts +11 -0
- package/dist/react-ui/blocks/index.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/activity.js +1 -1
- package/dist/react-ui/icons/lucide-animated/bell-electric.js +1 -1
- package/dist/react-ui/icons/lucide-animated/bell.js +1 -1
- package/dist/react-ui/icons/lucide-animated/bot.js +1 -1
- package/dist/react-ui/icons/lucide-animated/box.js +1 -1
- package/dist/react-ui/icons/lucide-animated/circle-check.js +1 -1
- package/dist/react-ui/icons/lucide-animated/delete.js +1 -1
- package/dist/react-ui/icons/lucide-animated/download.js +1 -1
- package/dist/react-ui/icons/lucide-animated/home.js +1 -1
- package/dist/react-ui/icons/lucide-animated/layout-panel-top.js +1 -1
- package/dist/react-ui/icons/lucide-animated/plus.js +1 -1
- package/dist/react-ui/icons/lucide-animated/search.js +1 -1
- package/dist/react-ui/icons/lucide-animated/settings.js +1 -1
- package/dist/react-ui/icons/lucide-animated/trending-down.js +1 -1
- package/dist/react-ui/icons/lucide-animated/trending-up.js +1 -1
- package/dist/react-ui/icons/lucide-animated/x.js +1 -1
- package/dist/react-ui/index.js +3 -1
- package/dist/react-ui/lib/icon-wrapper.d.ts +37 -0
- package/dist/react-ui/lib/icon-wrapper.d.ts.map +1 -0
- package/dist/react-ui/lib/icon-wrapper.js +55 -0
- package/dist/react-ui/lib/index.d.ts +1 -0
- package/dist/react-ui/lib/index.d.ts.map +1 -1
- package/dist/react-ui/lib/index.js +1 -0
- package/dist/react-ui/primitives/AutoHeight/index.d.ts +1 -1
- package/dist/react-ui/primitives/CountingNumber/index.d.ts +1 -1
- package/dist/react-ui/primitives/waapi/SlidingNumber/SlidingNumber.styles.d.ts +1 -1
- package/dist/react-ui/primitives/waapi/SlidingText/SlidingText.styles.d.ts +1 -1
- package/dist/react-ui/ui/Accordion/Accordion.styles.d.ts +1 -1
- package/dist/react-ui/ui/Accordion/Accordion.types.d.ts +1 -1
- package/dist/react-ui/ui/AlertDialog/AlertDialog.styles.d.ts +1 -1
- package/dist/react-ui/ui/AlertDialog/AlertDialog.types.d.ts +1 -1
- package/dist/react-ui/ui/Badge/Badge.styles.d.ts +1 -1
- package/dist/react-ui/ui/Badge/Badge.types.d.ts +1 -1
- package/dist/react-ui/ui/Button/Button.styles.d.ts +2 -2
- package/dist/react-ui/ui/Button/Button.types.d.ts +1 -1
- package/dist/react-ui/ui/Card/Card.styles.d.ts +1 -1
- package/dist/react-ui/ui/Card/Card.types.d.ts +1 -1
- package/dist/react-ui/ui/Checkbox/Checkbox.styles.d.ts +1 -1
- package/dist/react-ui/ui/Checkbox/Checkbox.types.d.ts +1 -1
- package/dist/react-ui/ui/Combobox/Combobox.styles.d.ts +1 -1
- package/dist/react-ui/ui/Combobox/Combobox.types.d.ts +1 -1
- package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.d.ts +2 -2
- package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.js +1 -1
- package/dist/react-ui/ui/CornerBracket/CornerBracket.types.d.ts +1 -1
- package/dist/react-ui/ui/DataCard/DataCard.styles.d.ts +1 -1
- package/dist/react-ui/ui/DataCard/DataCard.types.d.ts +1 -1
- package/dist/react-ui/ui/DataCard/index.d.ts +1 -1
- package/dist/react-ui/ui/Dialog/Dialog.styles.d.ts +1 -1
- package/dist/react-ui/ui/Dialog/Dialog.types.d.ts +1 -1
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.styles.d.ts +1 -1
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.types.d.ts +1 -1
- package/dist/react-ui/ui/Field/Field.styles.d.ts +1 -1
- package/dist/react-ui/ui/Field/Field.types.d.ts +1 -1
- package/dist/react-ui/ui/Input/Input.styles.d.ts +1 -1
- package/dist/react-ui/ui/Input/Input.types.d.ts +1 -1
- package/dist/react-ui/ui/InputGroup/InputGroup.styles.d.ts +1 -1
- package/dist/react-ui/ui/InputGroup/InputGroup.types.d.ts +1 -1
- package/dist/react-ui/ui/Label/Label.styles.d.ts +1 -1
- package/dist/react-ui/ui/Label/Label.types.d.ts +1 -1
- package/dist/react-ui/ui/Menu/Menu.styles.d.ts +1 -1
- package/dist/react-ui/ui/Menu/Menu.types.d.ts +2 -2
- package/dist/react-ui/ui/Popover/Popover.styles.d.ts +1 -1
- package/dist/react-ui/ui/Popover/Popover.types.d.ts +1 -1
- package/dist/react-ui/ui/Progress/Progress.styles.d.ts +1 -1
- package/dist/react-ui/ui/Progress/Progress.types.d.ts +2 -2
- package/dist/react-ui/ui/Select/Select.styles.d.ts +1 -1
- package/dist/react-ui/ui/Select/Select.types.d.ts +1 -1
- package/dist/react-ui/ui/Separator/Separator.styles.d.ts +1 -1
- package/dist/react-ui/ui/Separator/Separator.types.d.ts +1 -1
- package/dist/react-ui/ui/Switch/Switch.styles.d.ts +1 -1
- package/dist/react-ui/ui/Switch/Switch.types.d.ts +1 -1
- package/dist/react-ui/ui/Tabs/Tabs.styles.d.ts +43 -25
- package/dist/react-ui/ui/Tabs/Tabs.styles.d.ts.map +1 -1
- package/dist/react-ui/ui/Tabs/Tabs.styles.js +105 -13
- package/dist/react-ui/ui/Tabs/Tabs.types.d.ts +9 -6
- package/dist/react-ui/ui/Tabs/Tabs.types.d.ts.map +1 -1
- package/dist/react-ui/ui/Tabs/index.d.ts +18 -9
- package/dist/react-ui/ui/Tabs/index.d.ts.map +1 -1
- package/dist/react-ui/ui/Tabs/index.js +99 -27
- package/dist/react-ui/ui/TextFlow/TextFlow.styles.d.ts +1 -1
- package/dist/react-ui/ui/Textarea/Textarea.styles.d.ts +1 -1
- package/dist/react-ui/ui/Textarea/Textarea.types.d.ts +1 -1
- package/dist/react-ui/ui/Tooltip/Tooltip.styles.d.ts +1 -1
- package/dist/react-ui/ui/Tooltip/Tooltip.types.d.ts +1 -1
- package/dist/react-ui/ui/index.js +1 -0
- package/package.json +54 -6
- package/src/react-ui/blocks/Terminal/ResttyAdapter.ts +278 -0
- package/src/react-ui/blocks/Terminal/Terminal.adapter.ts +97 -0
- package/src/react-ui/blocks/Terminal/Terminal.theme.restty.ts +155 -0
- package/src/react-ui/blocks/Terminal/Terminal.theme.ts +80 -0
- package/src/react-ui/blocks/Terminal/Terminal.types.ts +438 -0
- package/src/react-ui/blocks/Terminal/TerminalPanel.tsx +269 -0
- package/src/react-ui/blocks/Terminal/TerminalRestty.tsx +326 -0
- package/src/react-ui/blocks/Terminal/TerminalXterm.tsx +230 -0
- package/src/react-ui/blocks/Terminal/XTermAdapter.ts +163 -0
- package/src/react-ui/blocks/Terminal/components/LogLineBadges.tsx +316 -0
- package/src/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.tsx +218 -0
- package/src/react-ui/blocks/Terminal/components/SyntaxHighlight.tsx +386 -0
- package/src/react-ui/blocks/Terminal/components/TerminalLogBadge.tsx +67 -0
- package/src/react-ui/blocks/Terminal/components/index.ts +10 -0
- package/src/react-ui/blocks/Terminal/hooks/index.ts +22 -0
- package/src/react-ui/blocks/Terminal/hooks/useTerminalSettings.ts +229 -0
- package/src/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.ts +292 -0
- package/src/react-ui/blocks/Terminal/index.ts +103 -0
- package/src/react-ui/blocks/Terminal/panel/LogLinesViewer.tsx +330 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalDebugPanel.tsx +242 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.tsx +202 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalFilterTabs.tsx +140 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.tsx +68 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.ts +85 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.tsx +383 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.tsx +439 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.tsx +550 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.ts +259 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.tsx +237 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.ts +76 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelFooter.tsx +112 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelHeader.tsx +178 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.tsx +203 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalSessionControl.tsx +252 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalSessionTabs.tsx +334 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.tsx +261 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalThemeSelector.tsx +248 -0
- package/src/react-ui/blocks/Terminal/panel/index.ts +72 -0
- package/src/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module.css +59 -0
- package/src/react-ui/blocks/Terminal/panel/terminal-session-tabs.module.css +59 -0
- package/src/react-ui/blocks/Terminal/parsing/BadgeFormatter.ts +180 -0
- package/src/react-ui/blocks/Terminal/parsing/HttpLogParser.ts +248 -0
- package/src/react-ui/blocks/Terminal/parsing/LogParser.types.ts +283 -0
- package/src/react-ui/blocks/Terminal/parsing/LogParserService.ts +686 -0
- package/src/react-ui/blocks/Terminal/parsing/MultilineAggregator.ts +466 -0
- package/src/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.ts +343 -0
- package/src/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.ts +167 -0
- package/src/react-ui/blocks/Terminal/parsing/TableParser.ts +348 -0
- package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.ts +251 -0
- package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.ts +390 -0
- package/src/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.ts +320 -0
- package/src/react-ui/blocks/Terminal/parsing/ansi/index.ts +20 -0
- package/src/react-ui/blocks/Terminal/parsing/index.ts +69 -0
- package/src/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.ts +68 -0
- package/src/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.ts +436 -0
- package/src/react-ui/blocks/Terminal/parsing/levels/index.ts +14 -0
- package/src/react-ui/blocks/index.ts +11 -0
- package/src/react-ui/icons/lucide-animated/activity.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/bell-electric.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/bell.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/bot.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/box.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/circle-check.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/delete.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/download.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/home.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/layout-panel-top.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/plus.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/search.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/settings.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/trending-down.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/trending-up.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/x.tsx +2 -2
- package/src/react-ui/lib/icon-wrapper.tsx +70 -0
- package/src/react-ui/lib/index.ts +1 -0
- package/src/react-ui/ui/CornerBracket/CornerBracket.styles.ts +1 -1
- package/src/react-ui/ui/Tabs/Tabs.css +39 -0
- package/src/react-ui/ui/Tabs/Tabs.styles.ts +119 -31
- package/src/react-ui/ui/Tabs/Tabs.types.ts +8 -3
- package/src/react-ui/ui/Tabs/index.tsx +135 -27
- 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"}
|