@mks2508/mks-ui 0.3.2 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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/TerminalDisplay.d.ts +46 -0
- package/dist/react-ui/blocks/Terminal/TerminalDisplay.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/TerminalDisplay.js +168 -0
- package/dist/react-ui/blocks/Terminal/TerminalDisplay.styles.d.ts +21 -0
- package/dist/react-ui/blocks/Terminal/TerminalDisplay.styles.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/TerminalDisplay.styles.js +31 -0
- package/dist/react-ui/blocks/Terminal/TerminalDisplay.types.d.ts +56 -0
- package/dist/react-ui/blocks/Terminal/TerminalDisplay.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/chrome.d.ts +14 -0
- package/dist/react-ui/blocks/Terminal/chrome.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/chrome.js +6 -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/display.d.ts +20 -0
- package/dist/react-ui/blocks/Terminal/display.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/display.js +9 -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 +43 -0
- package/dist/react-ui/blocks/Terminal/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/index.js +41 -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 +55 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.js +214 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.styles.d.ts +35 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.styles.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.styles.js +57 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.d.ts +62 -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-CNVWCefU.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-cmyJ11jP.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/waapi/Morph/techniques/useCSSGridMorph.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/Morph/techniques/useCSSGridMorph.js +2 -0
- package/dist/react-ui/primitives/waapi/Morph/techniques/useFLIPClipPath.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/Morph/techniques/useFLIPClipPath.js +2 -0
- package/dist/react-ui/primitives/waapi/Morph/techniques/useViewTransitions.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/Morph/techniques/useViewTransitions.js +2 -0
- package/dist/react-ui/primitives/waapi/Morph/useMorph.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/Morph/useMorph.js +2 -0
- package/dist/react-ui/primitives/waapi/Reorder/useReorder.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/Reorder/useReorder.js +2 -0
- package/dist/react-ui/primitives/waapi/Reorder/useReorderPresence.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/Reorder/useReorderPresence.js +2 -0
- package/dist/react-ui/primitives/waapi/core/useAnimationOrchestrator.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/core/useAnimationOrchestrator.js +2 -0
- package/dist/react-ui/primitives/waapi/core/useElementRegistry.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/core/useElementRegistry.js +2 -0
- package/dist/react-ui/primitives/waapi/core/useFLIPAnimation.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/core/useFLIPAnimation.js +2 -0
- package/dist/react-ui/primitives/waapi/core/usePositionCapture.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/core/usePositionCapture.js +2 -0
- package/dist/react-ui/ui/Button/Button.styles.d.ts +1 -1
- package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.d.ts +1 -1
- package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.js +1 -1
- package/dist/react-ui/ui/InputGroup/index.d.ts.map +1 -1
- package/dist/react-ui/ui/InputGroup/index.js +2 -0
- 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 +6 -3
- 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/index.js +1 -0
- package/package.json +84 -29
- package/src/css.d.ts +6 -0
- 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/TerminalDisplay.styles.ts +38 -0
- package/src/react-ui/blocks/Terminal/TerminalDisplay.tsx +243 -0
- package/src/react-ui/blocks/Terminal/TerminalDisplay.types.ts +73 -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/chrome.ts +25 -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/display.ts +46 -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 +111 -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.styles.ts +75 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.tsx +266 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.ts +82 -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/primitives/waapi/Morph/techniques/useCSSGridMorph.ts +1 -0
- package/src/react-ui/primitives/waapi/Morph/techniques/useFLIPClipPath.ts +1 -0
- package/src/react-ui/primitives/waapi/Morph/techniques/useViewTransitions.ts +1 -0
- package/src/react-ui/primitives/waapi/Morph/useMorph.ts +1 -0
- package/src/react-ui/primitives/waapi/Reorder/useReorder.ts +1 -0
- package/src/react-ui/primitives/waapi/Reorder/useReorderPresence.ts +1 -0
- package/src/react-ui/primitives/waapi/core/useAnimationOrchestrator.ts +1 -0
- package/src/react-ui/primitives/waapi/core/useElementRegistry.ts +1 -0
- package/src/react-ui/primitives/waapi/core/useFLIPAnimation.ts +1 -0
- package/src/react-ui/primitives/waapi/core/usePositionCapture.ts +1 -0
- package/src/react-ui/ui/Accordion/index.tsx +3 -3
- package/src/react-ui/ui/CornerBracket/CornerBracket.styles.ts +1 -1
- package/src/react-ui/ui/InputGroup/index.tsx +2 -0
- 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
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/react-ui/blocks/Terminal/components/SyntaxHighlight.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Syntax highlighting for log messages (React spans).
|
|
9
|
+
*
|
|
10
|
+
* Applies color highlighting to specific elements within log messages
|
|
11
|
+
* using React span elements with Tailwind CSS classes.
|
|
12
|
+
*
|
|
13
|
+
* IMPORTANT: Only highlights plain text - skips lines with existing ANSI codes
|
|
14
|
+
* to prevent mixing codes and creating visual artifacts.
|
|
15
|
+
*
|
|
16
|
+
* Features LRU cache to avoid re-parsing identical text.
|
|
17
|
+
*
|
|
18
|
+
* @module components/devenv/terminal/SyntaxHighlight
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* LRU cache for syntax highlighting results.
|
|
22
|
+
* Avoids re-parsing identical text on every render.
|
|
23
|
+
*/
|
|
24
|
+
const highlightCache = /* @__PURE__ */ new Map();
|
|
25
|
+
const MAX_CACHE_SIZE = 1e3;
|
|
26
|
+
/**
|
|
27
|
+
* Strip ANSI escape codes from text.
|
|
28
|
+
*
|
|
29
|
+
* @param text - Text with ANSI codes
|
|
30
|
+
* @returns Text without ANSI codes
|
|
31
|
+
*/
|
|
32
|
+
function stripAnsiCodes(text) {
|
|
33
|
+
return text.replace(/\x1b\[[0-9;]*[mGKH]/g, "").replace(/\x1b\][^\x07\x1b\\]*[\x07\x1b\\]/g, "").replace(/\x1b\\/g, "");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get cached highlighted text or compute and cache it.
|
|
37
|
+
*/
|
|
38
|
+
function getCachedHighlight(text) {
|
|
39
|
+
if (highlightCache.has(text)) return highlightCache.get(text);
|
|
40
|
+
const result = highlightText(text);
|
|
41
|
+
if (highlightCache.size >= MAX_CACHE_SIZE) {
|
|
42
|
+
const firstKey = highlightCache.keys().next().value;
|
|
43
|
+
if (firstKey) highlightCache.delete(firstKey);
|
|
44
|
+
}
|
|
45
|
+
highlightCache.set(text, result);
|
|
46
|
+
return result;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Clear the highlight cache (useful for memory management).
|
|
50
|
+
*/
|
|
51
|
+
function clearHighlightCache() {
|
|
52
|
+
highlightCache.clear();
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Check if text contains ANSI escape codes.
|
|
56
|
+
*
|
|
57
|
+
* Detects all types of ANSI escape sequences:
|
|
58
|
+
* - CSI (Control Sequence Introducer): \x1b[... (parameters)
|
|
59
|
+
* - OSC (Operating System Command): \x1b]...
|
|
60
|
+
* - General escape sequences: \x1b...
|
|
61
|
+
*/
|
|
62
|
+
function hasAnsiCodes(text) {
|
|
63
|
+
return /\x1b\[/.test(text) || /\x1b\]/.test(text) || /\x1b/.test(text);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Syntax highlighted text component.
|
|
67
|
+
*
|
|
68
|
+
* Applies syntax highlighting to plain text messages.
|
|
69
|
+
* Strips ANSI codes before highlighting to prevent visual artifacts
|
|
70
|
+
* from mixed escape sequences.
|
|
71
|
+
*
|
|
72
|
+
* @example
|
|
73
|
+
* ```tsx
|
|
74
|
+
* <SyntaxHighlightedText text="GET /api/workspaces { filter: {} }" />
|
|
75
|
+
* ```
|
|
76
|
+
*/
|
|
77
|
+
function SyntaxHighlightedText({ text, className }) {
|
|
78
|
+
if (!text || text.length === 0) return /* @__PURE__ */ jsx("span", {
|
|
79
|
+
className,
|
|
80
|
+
children: text
|
|
81
|
+
});
|
|
82
|
+
const highlighted = getCachedHighlight(hasAnsiCodes(text) ? stripAnsiCodes(text) : text);
|
|
83
|
+
return /* @__PURE__ */ jsx("span", {
|
|
84
|
+
className: cn("font-mono text-sm", className),
|
|
85
|
+
children: highlighted
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Apply syntax highlighting to text.
|
|
90
|
+
*
|
|
91
|
+
* Returns an array of React nodes with appropriate styling.
|
|
92
|
+
* Patterns are applied in order (most specific first).
|
|
93
|
+
*/
|
|
94
|
+
function highlightText(text) {
|
|
95
|
+
let result = text;
|
|
96
|
+
const tokens = [];
|
|
97
|
+
result = extractTokens(result, tokens, [
|
|
98
|
+
{
|
|
99
|
+
pattern: /\b\d{1,2}:\d{2}:\d{2}(\.\d{1,3})?\b/g,
|
|
100
|
+
className: "text-cyan-400/70"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
pattern: /\[([A-Z][A-Z0-9_]*)\]/g,
|
|
104
|
+
className: "text-purple-400 bg-purple-500/10 px-1 rounded font-semibold"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
pattern: /\b([a-zA-Z0-9_-]+\.([a-zA-Z]{2,4}|[A-Z]{2})(?::\d+:\d+)?)\b/g,
|
|
108
|
+
className: "text-orange-400 bg-orange-500/10 px-1 rounded text-xs"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
pattern: /\(([a-zA-Z0-9_-]+\.[a-zA-Z]{2,4}:\d+:\d+)\)/g,
|
|
112
|
+
className: "text-orange-400/80"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
pattern: /\{([^}]+)\}/g,
|
|
116
|
+
className: "text-yellow-400 bg-yellow-500/5 px-0.5 rounded"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
pattern: /\(([^)]+)\)/g,
|
|
120
|
+
className: "text-purple-300/80"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
pattern: /\b<([^>]+)>/g,
|
|
124
|
+
className: "text-cyan-300/80"
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
pattern: /\bv?\d+\.\d+\.\d+(-[a-z0-9.]+)?\b/gi,
|
|
128
|
+
className: "text-green-400 font-semibold"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
pattern: /\b([a-zA-Z_][a-zA-Z0-9_-]*)\s*:/g,
|
|
132
|
+
className: "text-green-500"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
pattern: /\b(success|error|failed|warning|warn|info|debug|trace|fatal):/gi,
|
|
136
|
+
className: "text-pink-400 font-semibold"
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
pattern: /(['"])(.*?)\1/g,
|
|
140
|
+
className: "text-green-400"
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
pattern: /(?<!\w)(-?\d+(?:\.\d+)?)(?!\w)/g,
|
|
144
|
+
className: "text-yellow-400"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
pattern: /\b(true|false)\b/gi,
|
|
148
|
+
className: "text-blue-400"
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
pattern: /\b(null|undefined)\b/gi,
|
|
152
|
+
className: "text-gray-500"
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
pattern: /\b(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS|CONNECT|TRACE)\b/g,
|
|
156
|
+
className: "text-pink-400 font-semibold"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
pattern: /(^|[\s(])\/[a-zA-Z0-9_/-]+/g,
|
|
160
|
+
className: "text-cyan-400"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
pattern: /\b\w+\.(js|ts|jsx|tsx|json|py|rs|go|java|c|cpp|h|cs|sh|bash|yml|yaml|toml|md|txt|log)\b/g,
|
|
164
|
+
className: "text-orange-400"
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
pattern: /([{}[\]()])/g,
|
|
168
|
+
className: "text-yellow-500"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
pattern: /\s*=\s*/g,
|
|
172
|
+
className: "text-gray-400"
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
pattern: /->|=>/g,
|
|
176
|
+
className: "text-purple-400 font-semibold"
|
|
177
|
+
}
|
|
178
|
+
]);
|
|
179
|
+
return tokens.map((token, index) => /* @__PURE__ */ jsx("span", {
|
|
180
|
+
className: token.className,
|
|
181
|
+
children: token.text
|
|
182
|
+
}, index));
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* Extract tokens from text using patterns.
|
|
186
|
+
*
|
|
187
|
+
* Iteratively applies patterns and extracts matched tokens.
|
|
188
|
+
*/
|
|
189
|
+
function extractTokens(text, tokens, patterns) {
|
|
190
|
+
let result = text;
|
|
191
|
+
let hasMatches = true;
|
|
192
|
+
while (hasMatches) {
|
|
193
|
+
hasMatches = false;
|
|
194
|
+
for (const { pattern, className } of patterns) {
|
|
195
|
+
const match = pattern.exec(result);
|
|
196
|
+
if (match) {
|
|
197
|
+
hasMatches = true;
|
|
198
|
+
const matchedText = match[0];
|
|
199
|
+
const startIndex = match.index;
|
|
200
|
+
const endIndex = startIndex + matchedText.length;
|
|
201
|
+
if (startIndex > 0) {
|
|
202
|
+
const beforeText = result.slice(0, startIndex);
|
|
203
|
+
if (beforeText) tokens.push({ text: beforeText });
|
|
204
|
+
}
|
|
205
|
+
tokens.push({
|
|
206
|
+
text: matchedText,
|
|
207
|
+
className
|
|
208
|
+
});
|
|
209
|
+
result = result.slice(endIndex);
|
|
210
|
+
pattern.lastIndex = 0;
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
if (result) tokens.push({ text: result });
|
|
216
|
+
return result;
|
|
217
|
+
}
|
|
218
|
+
/**
|
|
219
|
+
* Highlighted JSON component.
|
|
220
|
+
*
|
|
221
|
+
* Displays JSON with syntax highlighting and proper indentation.
|
|
222
|
+
*
|
|
223
|
+
* @example
|
|
224
|
+
* ```tsx
|
|
225
|
+
* <HighlightedJson json={{ filter: {}, name: "test" }} />
|
|
226
|
+
* ```
|
|
227
|
+
*/
|
|
228
|
+
function HighlightedJson({ json, className }) {
|
|
229
|
+
const formatted = JSON.stringify(json, null, 2);
|
|
230
|
+
try {
|
|
231
|
+
const highlighted = highlightJson(JSON.parse(formatted));
|
|
232
|
+
return /* @__PURE__ */ jsx("pre", {
|
|
233
|
+
className: cn("font-mono text-xs", className),
|
|
234
|
+
children: highlighted
|
|
235
|
+
});
|
|
236
|
+
} catch {
|
|
237
|
+
return /* @__PURE__ */ jsx("pre", {
|
|
238
|
+
className: cn("font-mono text-xs text-gray-400", className),
|
|
239
|
+
children: formatted
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* Recursively highlight JSON.
|
|
245
|
+
*/
|
|
246
|
+
function highlightJson(value, indent = 0) {
|
|
247
|
+
const indentStr = " ".repeat(indent);
|
|
248
|
+
if (value === null) return /* @__PURE__ */ jsx("span", {
|
|
249
|
+
className: "text-gray-500",
|
|
250
|
+
children: "null"
|
|
251
|
+
});
|
|
252
|
+
if (value === void 0) return /* @__PURE__ */ jsx("span", {
|
|
253
|
+
className: "text-gray-500",
|
|
254
|
+
children: "undefined"
|
|
255
|
+
});
|
|
256
|
+
if (typeof value === "boolean") return /* @__PURE__ */ jsx("span", {
|
|
257
|
+
className: "text-blue-400",
|
|
258
|
+
children: String(value)
|
|
259
|
+
});
|
|
260
|
+
if (typeof value === "number") return /* @__PURE__ */ jsx("span", {
|
|
261
|
+
className: "text-yellow-400",
|
|
262
|
+
children: String(value)
|
|
263
|
+
});
|
|
264
|
+
if (typeof value === "string") return /* @__PURE__ */ jsxs("span", {
|
|
265
|
+
className: "text-green-400",
|
|
266
|
+
children: [
|
|
267
|
+
"\"",
|
|
268
|
+
value,
|
|
269
|
+
"\""
|
|
270
|
+
]
|
|
271
|
+
});
|
|
272
|
+
if (Array.isArray(value)) {
|
|
273
|
+
if (value.length === 0) return /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("span", {
|
|
274
|
+
className: "text-yellow-500",
|
|
275
|
+
children: "["
|
|
276
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
277
|
+
className: "text-yellow-500",
|
|
278
|
+
children: "]"
|
|
279
|
+
})] });
|
|
280
|
+
return /* @__PURE__ */ jsxs("span", { children: [
|
|
281
|
+
/* @__PURE__ */ jsx("span", {
|
|
282
|
+
className: "text-yellow-500",
|
|
283
|
+
children: "["
|
|
284
|
+
}),
|
|
285
|
+
"\n",
|
|
286
|
+
value.map((item, index) => /* @__PURE__ */ jsxs("span", { children: [
|
|
287
|
+
indentStr + " ",
|
|
288
|
+
highlightJson(item, indent + 1),
|
|
289
|
+
index < value.length - 1 ? /* @__PURE__ */ jsx("span", {
|
|
290
|
+
className: "text-gray-500",
|
|
291
|
+
children: ","
|
|
292
|
+
}) : null,
|
|
293
|
+
"\n"
|
|
294
|
+
] }, index)),
|
|
295
|
+
indentStr,
|
|
296
|
+
/* @__PURE__ */ jsx("span", {
|
|
297
|
+
className: "text-yellow-500",
|
|
298
|
+
children: "]"
|
|
299
|
+
})
|
|
300
|
+
] });
|
|
301
|
+
}
|
|
302
|
+
if (typeof value === "object") {
|
|
303
|
+
const entries = Object.entries(value);
|
|
304
|
+
if (entries.length === 0) return /* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("span", {
|
|
305
|
+
className: "text-yellow-500",
|
|
306
|
+
children: "{"
|
|
307
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
308
|
+
className: "text-yellow-500",
|
|
309
|
+
children: "}"
|
|
310
|
+
})] });
|
|
311
|
+
return /* @__PURE__ */ jsxs("span", { children: [
|
|
312
|
+
/* @__PURE__ */ jsx("span", {
|
|
313
|
+
className: "text-yellow-500",
|
|
314
|
+
children: "{"
|
|
315
|
+
}),
|
|
316
|
+
"\n",
|
|
317
|
+
entries.map(([key, val], index) => /* @__PURE__ */ jsxs("span", { children: [
|
|
318
|
+
indentStr + " ",
|
|
319
|
+
/* @__PURE__ */ jsxs("span", {
|
|
320
|
+
className: "text-green-500",
|
|
321
|
+
children: [
|
|
322
|
+
"\"",
|
|
323
|
+
key,
|
|
324
|
+
"\""
|
|
325
|
+
]
|
|
326
|
+
}),
|
|
327
|
+
/* @__PURE__ */ jsx("span", {
|
|
328
|
+
className: "text-gray-500",
|
|
329
|
+
children: ": "
|
|
330
|
+
}),
|
|
331
|
+
highlightJson(val, indent + 1),
|
|
332
|
+
index < entries.length - 1 ? /* @__PURE__ */ jsx("span", {
|
|
333
|
+
className: "text-gray-500",
|
|
334
|
+
children: ","
|
|
335
|
+
}) : null,
|
|
336
|
+
"\n"
|
|
337
|
+
] }, key)),
|
|
338
|
+
indentStr,
|
|
339
|
+
/* @__PURE__ */ jsx("span", {
|
|
340
|
+
className: "text-yellow-500",
|
|
341
|
+
children: "}"
|
|
342
|
+
})
|
|
343
|
+
] });
|
|
344
|
+
}
|
|
345
|
+
return /* @__PURE__ */ jsx("span", {
|
|
346
|
+
className: "text-gray-500",
|
|
347
|
+
children: String(value)
|
|
348
|
+
});
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
//#endregion
|
|
352
|
+
export { HighlightedJson, SyntaxHighlightedText, clearHighlightCache };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TerminalLogBadge Component.
|
|
3
|
+
*
|
|
4
|
+
* Wraps the base Badge component with terminal log level color styling.
|
|
5
|
+
* Maps log levels to appropriate Tailwind color classes matching the
|
|
6
|
+
* Synthwave Dark design system.
|
|
7
|
+
*
|
|
8
|
+
* @module @mks2508/mks-ui/react/blocks/Terminal/components/TerminalLogBadge
|
|
9
|
+
*/
|
|
10
|
+
import type { ReactNode } from 'react';
|
|
11
|
+
import type { TLogLevelFilter } from '../parsing/LogParser.types';
|
|
12
|
+
/**
|
|
13
|
+
* Props for the TerminalLogBadge component.
|
|
14
|
+
*/
|
|
15
|
+
export interface ITerminalLogBadgeProps {
|
|
16
|
+
/** Log level to display */
|
|
17
|
+
level: TLogLevelFilter | string;
|
|
18
|
+
/** Badge content (typically a count) */
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
/** Additional class name */
|
|
21
|
+
className?: string;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* TerminalLogBadge Component.
|
|
25
|
+
*
|
|
26
|
+
* Renders a Badge styled for terminal log levels with appropriate
|
|
27
|
+
* color coding for each severity level.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <TerminalLogBadge level="error">3</TerminalLogBadge>
|
|
32
|
+
* <TerminalLogBadge level="info">42</TerminalLogBadge>
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function TerminalLogBadge({ level, children, className }: ITerminalLogBadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
//# sourceMappingURL=TerminalLogBadge.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TerminalLogBadge.d.ts","sourceRoot":"","sources":["../../../../../src/react-ui/blocks/Terminal/components/TerminalLogBadge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAgBlE;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,2BAA2B;IAC3B,KAAK,EAAE,eAAe,GAAG,MAAM,CAAC;IAChC,wCAAwC;IACxC,QAAQ,EAAE,SAAS,CAAC;IACpB,4BAA4B;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,sBAAsB,2CAUtF"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { Badge } from "../../../ui/Badge/index.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/react-ui/blocks/Terminal/components/TerminalLogBadge.tsx
|
|
8
|
+
/**
|
|
9
|
+
* TerminalLogBadge Component.
|
|
10
|
+
*
|
|
11
|
+
* Wraps the base Badge component with terminal log level color styling.
|
|
12
|
+
* Maps log levels to appropriate Tailwind color classes matching the
|
|
13
|
+
* Synthwave Dark design system.
|
|
14
|
+
*
|
|
15
|
+
* @module @mks2508/mks-ui/react/blocks/Terminal/components/TerminalLogBadge
|
|
16
|
+
*/
|
|
17
|
+
/**
|
|
18
|
+
* Color classes for each log level.
|
|
19
|
+
*/
|
|
20
|
+
const LEVEL_COLORS = {
|
|
21
|
+
all: "bg-muted/40 text-muted-foreground border-muted/60",
|
|
22
|
+
trace: "bg-slate-500/20 text-slate-400 border-slate-500/30",
|
|
23
|
+
debug: "bg-blue-500/20 text-blue-400 border-blue-500/30",
|
|
24
|
+
info: "bg-green-500/20 text-green-400 border-green-500/30",
|
|
25
|
+
warn: "bg-yellow-500/20 text-yellow-400 border-yellow-500/30",
|
|
26
|
+
error: "bg-orange-500/20 text-orange-400 border-orange-500/30",
|
|
27
|
+
fatal: "bg-red-500/20 text-red-400 border-red-500/30",
|
|
28
|
+
unknown: "bg-muted/40 text-muted-foreground border-muted/60"
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* TerminalLogBadge Component.
|
|
32
|
+
*
|
|
33
|
+
* Renders a Badge styled for terminal log levels with appropriate
|
|
34
|
+
* color coding for each severity level.
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```tsx
|
|
38
|
+
* <TerminalLogBadge level="error">3</TerminalLogBadge>
|
|
39
|
+
* <TerminalLogBadge level="info">42</TerminalLogBadge>
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
function TerminalLogBadge({ level, children, className }) {
|
|
43
|
+
return /* @__PURE__ */ jsx(Badge, {
|
|
44
|
+
variant: "outline",
|
|
45
|
+
size: "sm",
|
|
46
|
+
className: cn(LEVEL_COLORS[level] ?? LEVEL_COLORS.unknown, className),
|
|
47
|
+
children
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
//#endregion
|
|
52
|
+
export { TerminalLogBadge };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Terminal components barrel export.
|
|
3
|
+
*
|
|
4
|
+
* @module @mks2508/mks-ui/react/blocks/Terminal/components
|
|
5
|
+
*/
|
|
6
|
+
export * from './LogLineBadges';
|
|
7
|
+
export * from './SyntaxHighlight';
|
|
8
|
+
export * from './SpecializedSyntaxHighlighter';
|
|
9
|
+
export * from './TerminalLogBadge';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/react-ui/blocks/Terminal/components/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ContentTypeBadge, LevelBadge, LogLineContainer, TagBadge, TagBadges, TimestampBadge } from "./LogLineBadges.js";
|
|
2
|
+
import { HighlightedJson, SyntaxHighlightedText, clearHighlightCache } from "./SyntaxHighlight.js";
|
|
3
|
+
import { SpecializedSyntaxHighlighter } from "./SpecializedSyntaxHighlighter.js";
|
|
4
|
+
import { TerminalLogBadge } from "./TerminalLogBadge.js";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Terminal Display — lightweight barrel export.
|
|
3
|
+
*
|
|
4
|
+
* Exports the readonly TerminalDisplay component + restty wrapper + chrome.
|
|
5
|
+
* Depends on restty only (not xterm, not shiki, not xterm addons).
|
|
6
|
+
* Use `@mks2508/mks-ui/react/blocks/Terminal/display` for minimal deps.
|
|
7
|
+
*
|
|
8
|
+
* @module @mks2508/mks-ui/react/blocks/Terminal/display
|
|
9
|
+
*/
|
|
10
|
+
export { TerminalDisplay } from './TerminalDisplay';
|
|
11
|
+
export { terminalDisplayStyles, terminalDisplayVariants, type TerminalDisplayVariantProps, } from './TerminalDisplay.styles';
|
|
12
|
+
export type { ITerminalDisplayProps, ITerminalDisplayRef, TerminalDisplaySlot, } from './TerminalDisplay.types';
|
|
13
|
+
export { TerminalRestty } from './TerminalRestty';
|
|
14
|
+
export type { ITerminalResttyProps, ITerminalResttyRef } from './TerminalRestty';
|
|
15
|
+
export { TerminalPanelChrome, NOISE_TEXTURE_SVG, terminalScrollStyles } from './panel/TerminalPanelChrome';
|
|
16
|
+
export type { ITerminalPanelChromeProps } from './panel/TerminalPanelChrome.types';
|
|
17
|
+
export { terminalChromeStyles, terminalChromeVariants, ACCENT_GRADIENTS, type TerminalChromeSlot, } from './panel/TerminalPanelChrome.styles';
|
|
18
|
+
export { SYNTHWAVE_TERMINAL_THEME, getTerminalTheme } from './Terminal.theme';
|
|
19
|
+
export { hexToResttyColor, xtermThemeToGhostty, getSynthwaveGhosttyTheme, type IResttyThemeColor, type IResttyGhosttyTheme, } from './Terminal.theme.restty';
|
|
20
|
+
//# sourceMappingURL=display.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display.d.ts","sourceRoot":"","sources":["../../../../src/react-ui/blocks/Terminal/display.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EACL,qBAAqB,EACrB,uBAAuB,EACvB,KAAK,2BAA2B,GACjC,MAAM,0BAA0B,CAAC;AAClC,YAAY,EACV,qBAAqB,EACrB,mBAAmB,EACnB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAGjF,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAC3G,YAAY,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AACnF,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,gBAAgB,EAChB,KAAK,kBAAkB,GACxB,MAAM,oCAAoC,CAAC;AAG5C,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,wBAAwB,EACxB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,GACzB,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SYNTHWAVE_TERMINAL_THEME, getTerminalTheme } from "./Terminal.theme.js";
|
|
2
|
+
import { ACCENT_GRADIENTS, terminalChromeStyles, terminalChromeVariants } from "./panel/TerminalPanelChrome.styles.js";
|
|
3
|
+
import { NOISE_TEXTURE_SVG, TerminalPanelChrome, terminalScrollStyles } from "./panel/TerminalPanelChrome.js";
|
|
4
|
+
import { getSynthwaveGhosttyTheme, hexToResttyColor, xtermThemeToGhostty } from "./Terminal.theme.restty.js";
|
|
5
|
+
import { TerminalRestty } from "./TerminalRestty.js";
|
|
6
|
+
import { terminalDisplayStyles, terminalDisplayVariants } from "./TerminalDisplay.styles.js";
|
|
7
|
+
import { TerminalDisplay } from "./TerminalDisplay.js";
|
|
8
|
+
|
|
9
|
+
export { ACCENT_GRADIENTS, NOISE_TEXTURE_SVG, SYNTHWAVE_TERMINAL_THEME, TerminalDisplay, TerminalPanelChrome, TerminalRestty, getSynthwaveGhosttyTheme, getTerminalTheme, hexToResttyColor, terminalChromeStyles, terminalChromeVariants, terminalDisplayStyles, terminalDisplayVariants, terminalScrollStyles, xtermThemeToGhostty };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Terminal Hooks Module.
|
|
3
|
+
*
|
|
4
|
+
* Reusable hooks for terminal WebSocket connections
|
|
5
|
+
* and global settings management.
|
|
6
|
+
*
|
|
7
|
+
* @module @mks2508/mks-ui/react/blocks/Terminal/hooks
|
|
8
|
+
*/
|
|
9
|
+
export { useTerminalWebSocket, type IUseTerminalWebSocketOptions, type IUseTerminalWebSocketReturn, type ITerminalWsServerMessage, type TTerminalWsStatus, } from './useTerminalWebSocket';
|
|
10
|
+
export { useTerminalSettings, type ITerminalSettings, type IUseTerminalSettingsReturn, } from './useTerminalSettings';
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/react-ui/blocks/Terminal/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,oBAAoB,EACpB,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,GACvB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACL,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,0BAA0B,GAChC,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global terminal settings hook with localStorage persistence.
|
|
3
|
+
*
|
|
4
|
+
* Manages renderer, PTY backend, theme, and font size preferences
|
|
5
|
+
* using `useSyncExternalStore` for SSR safety and cross-component sync.
|
|
6
|
+
*
|
|
7
|
+
* @module components/devenv/terminal/hooks/useTerminalSettings
|
|
8
|
+
*/
|
|
9
|
+
import type { ITerminalRendererType, ITerminalPtyBackendType } from '../Terminal.types';
|
|
10
|
+
/**
|
|
11
|
+
* Persisted terminal settings.
|
|
12
|
+
*/
|
|
13
|
+
export interface ITerminalSettings {
|
|
14
|
+
/** Terminal renderer engine (default: 'xterm') */
|
|
15
|
+
renderer: ITerminalRendererType;
|
|
16
|
+
/** PTY backend type (default: 'nodepty') */
|
|
17
|
+
ptyBackend: ITerminalPtyBackendType;
|
|
18
|
+
/** Restty built-in theme name (default: 'Synthwave Alpha') */
|
|
19
|
+
resttyThemeName: string;
|
|
20
|
+
/** Font size in CSS pixels (default: 14) */
|
|
21
|
+
fontSize: number;
|
|
22
|
+
/** Enable CRT shader effects (scanlines, bloom, vignette) */
|
|
23
|
+
crtEffect: boolean;
|
|
24
|
+
/** Show debug panel below the terminal */
|
|
25
|
+
debugPanel: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Return type for the useTerminalSettings hook.
|
|
29
|
+
*/
|
|
30
|
+
export interface IUseTerminalSettingsReturn {
|
|
31
|
+
/** Current settings snapshot */
|
|
32
|
+
settings: ITerminalSettings;
|
|
33
|
+
/** Switch terminal renderer */
|
|
34
|
+
setRenderer: (renderer: ITerminalRendererType) => void;
|
|
35
|
+
/** Switch PTY backend */
|
|
36
|
+
setPtyBackend: (backend: ITerminalPtyBackendType) => void;
|
|
37
|
+
/** Set restty built-in theme by name */
|
|
38
|
+
setResttyThemeName: (name: string) => void;
|
|
39
|
+
/** Set font size (clamped to 10-24) */
|
|
40
|
+
setFontSize: (size: number) => void;
|
|
41
|
+
/** Toggle CRT shader effects (scanlines, bloom, vignette) */
|
|
42
|
+
setCrtEffect: (enabled: boolean) => void;
|
|
43
|
+
/** Toggle debug panel visibility */
|
|
44
|
+
setDebugPanel: (enabled: boolean) => void;
|
|
45
|
+
/** Reset all settings to defaults */
|
|
46
|
+
resetToDefaults: () => void;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Hook for reading and mutating global terminal settings.
|
|
50
|
+
*
|
|
51
|
+
* Settings persist to localStorage and sync across all components
|
|
52
|
+
* using `useSyncExternalStore`. SSR-safe via `getServerSnapshot`.
|
|
53
|
+
*
|
|
54
|
+
* @returns Settings state and mutation functions
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* ```tsx
|
|
58
|
+
* const { settings, setRenderer, setResttyThemeName } = useTerminalSettings();
|
|
59
|
+
*
|
|
60
|
+
* // Read
|
|
61
|
+
* console.log(settings.renderer); // 'xterm' | 'restty'
|
|
62
|
+
*
|
|
63
|
+
* // Mutate — triggers re-render in all consumers
|
|
64
|
+
* setRenderer('restty');
|
|
65
|
+
* setResttyThemeName('Dracula');
|
|
66
|
+
* ```
|
|
67
|
+
*/
|
|
68
|
+
export declare function useTerminalSettings(): IUseTerminalSettingsReturn;
|
|
69
|
+
//# sourceMappingURL=useTerminalSettings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTerminalSettings.d.ts","sourceRoot":"","sources":["../../../../../src/react-ui/blocks/Terminal/hooks/useTerminalSettings.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,KAAK,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAExF;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,kDAAkD;IAClD,QAAQ,EAAE,qBAAqB,CAAC;IAEhC,4CAA4C;IAC5C,UAAU,EAAE,uBAAuB,CAAC;IAEpC,8DAA8D;IAC9D,eAAe,EAAE,MAAM,CAAC;IAExB,4CAA4C;IAC5C,QAAQ,EAAE,MAAM,CAAC;IAEjB,6DAA6D;IAC7D,SAAS,EAAE,OAAO,CAAC;IAEnB,0CAA0C;IAC1C,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,gCAAgC;IAChC,QAAQ,EAAE,iBAAiB,CAAC;IAE5B,+BAA+B;IAC/B,WAAW,EAAE,CAAC,QAAQ,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAEvD,yBAAyB;IACzB,aAAa,EAAE,CAAC,OAAO,EAAE,uBAAuB,KAAK,IAAI,CAAC;IAE1D,wCAAwC;IACxC,kBAAkB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAE3C,uCAAuC;IACvC,WAAW,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAEpC,6DAA6D;IAC7D,YAAY,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAEzC,oCAAoC;IACpC,aAAa,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAE1C,qCAAqC;IACrC,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAwGD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,mBAAmB,IAAI,0BAA0B,CA0ChE"}
|