@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,185 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { memo } from "react";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
|
|
7
|
+
//#region src/react-ui/blocks/Terminal/components/LogLineBadges.tsx
|
|
8
|
+
/**
|
|
9
|
+
* React badge components for log lines.
|
|
10
|
+
*
|
|
11
|
+
* Styled badge components using Tailwind CSS for the React log viewer.
|
|
12
|
+
* Provides level badges, timestamp badges, and tag badges with consistent
|
|
13
|
+
* Synthwave Dark theme styling.
|
|
14
|
+
*
|
|
15
|
+
* All badge components are memoized for optimal performance.
|
|
16
|
+
*
|
|
17
|
+
* @module components/devenv/terminal/LogLineBadges
|
|
18
|
+
*/
|
|
19
|
+
/**
|
|
20
|
+
* Level badge color mapping.
|
|
21
|
+
*
|
|
22
|
+
* Maps each log level to its corresponding Tailwind color classes.
|
|
23
|
+
*/
|
|
24
|
+
const LEVEL_COLORS = {
|
|
25
|
+
info: "bg-blue-500/15 text-blue-400 border-blue-500/25 shadow-[0_0_6px_rgba(59,130,246,0.15)]",
|
|
26
|
+
warn: "bg-yellow-500/15 text-yellow-400 border-yellow-500/25 shadow-[0_0_6px_rgba(234,179,8,0.15)]",
|
|
27
|
+
error: "bg-red-500/20 text-red-400 border-red-500/30 shadow-[0_0_8px_rgba(239,68,68,0.2)]",
|
|
28
|
+
fatal: "bg-pink-500/20 text-pink-400 border-pink-500/30 shadow-[0_0_8px_rgba(236,72,153,0.2)]",
|
|
29
|
+
debug: "bg-cyan-500/15 text-cyan-400 border-cyan-500/25 shadow-[0_0_6px_rgba(6,182,212,0.15)]",
|
|
30
|
+
trace: "bg-gray-500/10 text-gray-400 border-gray-500/20",
|
|
31
|
+
unknown: "bg-gray-500/8 text-gray-500 border-gray-500/15"
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Level badge component (memoized).
|
|
35
|
+
*
|
|
36
|
+
* Displays a colored badge with the log level label.
|
|
37
|
+
* Uses Synthwave Dark theme colors with glassmorphic effect.
|
|
38
|
+
*
|
|
39
|
+
* @example
|
|
40
|
+
* ```tsx
|
|
41
|
+
* <LevelBadge level="info" />
|
|
42
|
+
* // Renders: [INFO] with blue background
|
|
43
|
+
* ```
|
|
44
|
+
*/
|
|
45
|
+
const LevelBadge = memo(function LevelBadge({ level, className }) {
|
|
46
|
+
return /* @__PURE__ */ jsx("span", {
|
|
47
|
+
className: cn("px-2 py-0.5 rounded border font-mono text-[10px] font-bold tracking-wider", LEVEL_COLORS[level], className),
|
|
48
|
+
children: level.toUpperCase()
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* Timestamp badge component (memoized).
|
|
53
|
+
*
|
|
54
|
+
* Displays a timestamp with muted styling.
|
|
55
|
+
* Uses tabular numbers for consistent alignment.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```tsx
|
|
59
|
+
* <TimestampBadge timestamp="22:41:03" />
|
|
60
|
+
* // Renders: 22:41:03 in gray
|
|
61
|
+
* ```
|
|
62
|
+
*/
|
|
63
|
+
const TimestampBadge = memo(function TimestampBadge({ timestamp, className }) {
|
|
64
|
+
const timeOnly = timestamp.includes(".") ? timestamp.split(".")[0] : timestamp;
|
|
65
|
+
return /* @__PURE__ */ jsx("span", {
|
|
66
|
+
className: cn("ml-auto text-muted-foreground font-mono text-xs tabular-nums", "opacity-70", className),
|
|
67
|
+
children: timeOnly
|
|
68
|
+
});
|
|
69
|
+
});
|
|
70
|
+
/**
|
|
71
|
+
* Tag badge component (memoized).
|
|
72
|
+
*
|
|
73
|
+
* Displays a component tag (e.g., "API", "ROUTES").
|
|
74
|
+
* Truncates long tags to 12 characters.
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* ```tsx
|
|
78
|
+
* <TagBadge tag="WORKSPACEMANAGER" />
|
|
79
|
+
* // Renders: [WORKSPACEMAN...] in cyan
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
const TagBadge = memo(function TagBadge({ tag, className }) {
|
|
83
|
+
const displayTag = tag.length > 12 ? tag.slice(0, 9) + "..." : tag;
|
|
84
|
+
return /* @__PURE__ */ jsx("span", {
|
|
85
|
+
className: cn("px-1.5 py-0.5 rounded border font-mono text-xs", "bg-purple-500/10 text-purple-400 border-purple-500/20", className),
|
|
86
|
+
children: displayTag
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
/**
|
|
90
|
+
* Tag badges container component (memoized).
|
|
91
|
+
*
|
|
92
|
+
* Displays multiple tag badges with consistent spacing.
|
|
93
|
+
*
|
|
94
|
+
* @example
|
|
95
|
+
* ```tsx
|
|
96
|
+
* <TagBadges tags={['API', 'ROUTES']} />
|
|
97
|
+
* // Renders: [API][ROUTES] with spacing
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
100
|
+
const TagBadges = memo(function TagBadges({ tags, className }) {
|
|
101
|
+
if (!tags || tags.length === 0) return null;
|
|
102
|
+
return /* @__PURE__ */ jsx("span", {
|
|
103
|
+
className: cn("flex items-center gap-1", className),
|
|
104
|
+
children: tags.map((tag) => /* @__PURE__ */ jsx(TagBadge, { tag }, tag))
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
/**
|
|
108
|
+
* Content type badge color and label mapping.
|
|
109
|
+
*
|
|
110
|
+
* Maps each content type to its display label and Tailwind color classes.
|
|
111
|
+
* 'plain' entries are hidden (no badge rendered).
|
|
112
|
+
*/
|
|
113
|
+
const CONTENT_TYPE_STYLES = {
|
|
114
|
+
plain: {
|
|
115
|
+
label: "",
|
|
116
|
+
className: ""
|
|
117
|
+
},
|
|
118
|
+
http: {
|
|
119
|
+
label: "HTTP",
|
|
120
|
+
className: "bg-cyan-500/15 text-cyan-400 border-cyan-500/25 shadow-[0_0_6px_rgba(6,182,212,0.15)]"
|
|
121
|
+
},
|
|
122
|
+
json: {
|
|
123
|
+
label: "JSON",
|
|
124
|
+
className: "bg-emerald-500/15 text-emerald-400 border-emerald-500/25 shadow-[0_0_6px_rgba(16,185,129,0.15)]"
|
|
125
|
+
},
|
|
126
|
+
table: {
|
|
127
|
+
label: "TABLE",
|
|
128
|
+
className: "bg-violet-500/15 text-violet-400 border-violet-500/25 shadow-[0_0_6px_rgba(139,92,246,0.15)]"
|
|
129
|
+
},
|
|
130
|
+
error: {
|
|
131
|
+
label: "ERR",
|
|
132
|
+
className: "bg-red-500/20 text-red-400 border-red-500/30 shadow-[0_0_8px_rgba(239,68,68,0.2)]"
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Content type badge component (memoized).
|
|
137
|
+
*
|
|
138
|
+
* Displays a colored badge indicating the content type of a log entry
|
|
139
|
+
* (HTTP, JSON, TABLE, ERR). HTTP entries show the actual method
|
|
140
|
+
* (GET, POST, etc.) instead of a generic "HTTP" label.
|
|
141
|
+
*
|
|
142
|
+
* Returns null for 'plain' content type — no badge rendered.
|
|
143
|
+
*
|
|
144
|
+
* @example
|
|
145
|
+
* ```tsx
|
|
146
|
+
* <ContentTypeBadge contentType="http" httpMethod="GET" />
|
|
147
|
+
* // Renders: [GET] in cyan
|
|
148
|
+
*
|
|
149
|
+
* <ContentTypeBadge contentType="json" />
|
|
150
|
+
* // Renders: [JSON] in emerald
|
|
151
|
+
* ```
|
|
152
|
+
*/
|
|
153
|
+
const ContentTypeBadge = memo(function ContentTypeBadge({ contentType, httpMethod, className }) {
|
|
154
|
+
if (contentType === "plain" || !contentType) return null;
|
|
155
|
+
const style = CONTENT_TYPE_STYLES[contentType];
|
|
156
|
+
const label = contentType === "http" && httpMethod ? httpMethod.toUpperCase() : style.label;
|
|
157
|
+
return /* @__PURE__ */ jsx("span", {
|
|
158
|
+
className: cn("px-1.5 py-0.5 rounded border font-mono text-[10px] font-bold tracking-wider", style.className, className),
|
|
159
|
+
children: label
|
|
160
|
+
});
|
|
161
|
+
});
|
|
162
|
+
/**
|
|
163
|
+
* Log line container component.
|
|
164
|
+
*
|
|
165
|
+
* Provides consistent styling and structure for log lines.
|
|
166
|
+
* Adds subtle hover effect and line number on hover.
|
|
167
|
+
*
|
|
168
|
+
* @example
|
|
169
|
+
* ```tsx
|
|
170
|
+
* <LogLineContainer level="info" lineNumber={42}>
|
|
171
|
+
* <LevelBadge level="info" />
|
|
172
|
+
* <span>Log message here</span>
|
|
173
|
+
* </LogLineContainer>
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
176
|
+
function LogLineContainer({ level, lineNumber, isContinuation = false, className, children }) {
|
|
177
|
+
return /* @__PURE__ */ jsx("div", {
|
|
178
|
+
className: cn("group flex items-start gap-2 py-0.5 px-2 rounded-sm", "hover:bg-white/5 transition-colors duration-150", "border-l-2", isContinuation ? "border-transparent ml-6" : "border-transparent", `hover:border-${level === "error" || level === "fatal" ? "red" : level === "warn" ? "yellow" : "blue"}-500/50`, className),
|
|
179
|
+
title: `Line ${lineNumber}`,
|
|
180
|
+
children
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
//#endregion
|
|
185
|
+
export { ContentTypeBadge, LevelBadge, LogLineContainer, TagBadge, TagBadges, TimestampBadge };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Specialized syntax highlighter for different log content types.
|
|
3
|
+
*
|
|
4
|
+
* Provides syntax highlighting for HTTP requests, tables, and JSON
|
|
5
|
+
* with appropriate styling for each type.
|
|
6
|
+
*
|
|
7
|
+
* @module components/devenv/terminal/SpecializedSyntaxHighlighter
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* Props for specialized syntax highlighting.
|
|
11
|
+
*/
|
|
12
|
+
export interface ISpecializedSyntaxHighlighterProps {
|
|
13
|
+
/** Content type */
|
|
14
|
+
contentType?: 'plain' | 'http' | 'json' | 'table' | 'error';
|
|
15
|
+
/** HTTP method (for HTTP content) */
|
|
16
|
+
httpMethod?: string;
|
|
17
|
+
/** HTTP path (for HTTP content) */
|
|
18
|
+
httpPath?: string;
|
|
19
|
+
/** Table data (for table content) */
|
|
20
|
+
tableData?: unknown;
|
|
21
|
+
/** JSON data (for JSON content) */
|
|
22
|
+
jsonData?: Record<string, unknown> | unknown;
|
|
23
|
+
/** Raw text to highlight */
|
|
24
|
+
text: string;
|
|
25
|
+
/** Optional custom class name */
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Specialized syntax highlighter component.
|
|
30
|
+
*
|
|
31
|
+
* Applies appropriate highlighting based on content type:
|
|
32
|
+
* - HTTP: pink method, cyan path
|
|
33
|
+
* - JSON: structured syntax highlighting
|
|
34
|
+
* - Table: borders in gray, content in colors
|
|
35
|
+
* - Plain: default highlighting
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```tsx
|
|
39
|
+
* <SpecializedSyntaxHighlighter
|
|
40
|
+
* contentType="http"
|
|
41
|
+
* httpMethod="GET"
|
|
42
|
+
* httpPath="/api/endpoint"
|
|
43
|
+
* text="GET /api/endpoint {"
|
|
44
|
+
* />
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare function SpecializedSyntaxHighlighter({ contentType, httpMethod: _httpMethod, httpPath: _httpPath, tableData: _tableData, jsonData, text, className, }: ISpecializedSyntaxHighlighterProps): React.JSX.Element;
|
|
48
|
+
//# sourceMappingURL=SpecializedSyntaxHighlighter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SpecializedSyntaxHighlighter.d.ts","sourceRoot":"","sources":["../../../../../src/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AASH;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,mBAAmB;IACnB,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;IAE5D,qCAAqC;IACrC,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,qCAAqC;IACrC,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,CAAC;IAE7C,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IAEb,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAMD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,4BAA4B,CAAC,EAC3C,WAAqB,EACrB,UAAU,EAAE,WAAW,EACvB,QAAQ,EAAE,SAAS,EACnB,SAAS,EAAE,UAAU,EACrB,QAAQ,EACR,IAAI,EACJ,SAAS,GACV,EAAE,kCAAkC,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAsBxD"}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { HttpLogParser } from "../parsing/HttpLogParser.js";
|
|
5
|
+
import { TABLE_CHARS, TableParser } from "../parsing/TableParser.js";
|
|
6
|
+
import { HighlightedJson } from "./SyntaxHighlight.js";
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
|
|
9
|
+
//#region src/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.tsx
|
|
10
|
+
/**
|
|
11
|
+
* Specialized syntax highlighter for different log content types.
|
|
12
|
+
*
|
|
13
|
+
* Provides syntax highlighting for HTTP requests, tables, and JSON
|
|
14
|
+
* with appropriate styling for each type.
|
|
15
|
+
*
|
|
16
|
+
* @module components/devenv/terminal/SpecializedSyntaxHighlighter
|
|
17
|
+
*/
|
|
18
|
+
const httpParser = new HttpLogParser();
|
|
19
|
+
const tableParser = new TableParser();
|
|
20
|
+
/**
|
|
21
|
+
* Specialized syntax highlighter component.
|
|
22
|
+
*
|
|
23
|
+
* Applies appropriate highlighting based on content type:
|
|
24
|
+
* - HTTP: pink method, cyan path
|
|
25
|
+
* - JSON: structured syntax highlighting
|
|
26
|
+
* - Table: borders in gray, content in colors
|
|
27
|
+
* - Plain: default highlighting
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* <SpecializedSyntaxHighlighter
|
|
32
|
+
* contentType="http"
|
|
33
|
+
* httpMethod="GET"
|
|
34
|
+
* httpPath="/api/endpoint"
|
|
35
|
+
* text="GET /api/endpoint {"
|
|
36
|
+
* />
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
function SpecializedSyntaxHighlighter({ contentType = "plain", httpMethod: _httpMethod, httpPath: _httpPath, tableData: _tableData, jsonData, text, className }) {
|
|
40
|
+
if (contentType === "http") return /* @__PURE__ */ jsx(HttpHighlighter, {
|
|
41
|
+
text,
|
|
42
|
+
className
|
|
43
|
+
});
|
|
44
|
+
if (contentType === "json" && jsonData) return /* @__PURE__ */ jsx("div", {
|
|
45
|
+
className: cn("font-mono text-xs", className),
|
|
46
|
+
children: /* @__PURE__ */ jsx(HighlightedJson, { json: jsonData })
|
|
47
|
+
});
|
|
48
|
+
if (contentType === "table") return /* @__PURE__ */ jsx(TableHighlighter, {
|
|
49
|
+
text,
|
|
50
|
+
className
|
|
51
|
+
});
|
|
52
|
+
return /* @__PURE__ */ jsx("span", {
|
|
53
|
+
className: cn("font-mono text-sm", className),
|
|
54
|
+
children: text
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* HTTP request syntax highlighter.
|
|
59
|
+
*
|
|
60
|
+
* Highlights HTTP method (pink) and path (cyan).
|
|
61
|
+
*/
|
|
62
|
+
function HttpHighlighter({ text, className }) {
|
|
63
|
+
const parts = httpParser.highlightLine(text);
|
|
64
|
+
return /* @__PURE__ */ jsx("span", {
|
|
65
|
+
className: cn("font-mono text-sm", className),
|
|
66
|
+
children: parts.map((part, i) => /* @__PURE__ */ jsx("span", {
|
|
67
|
+
className: part.className,
|
|
68
|
+
children: part.text
|
|
69
|
+
}, i))
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Table syntax highlighter.
|
|
74
|
+
*
|
|
75
|
+
* Renders detected tables as actual styled HTML tables
|
|
76
|
+
* with header detection, alternating rows, and proper borders.
|
|
77
|
+
* Falls back to box-drawing character highlighting.
|
|
78
|
+
*/
|
|
79
|
+
function TableHighlighter({ text, className }) {
|
|
80
|
+
const lines = text.split("\n").filter((l) => l.trim().length > 0);
|
|
81
|
+
const { headers, dataRows } = tableParser.parseTable(lines, 0);
|
|
82
|
+
if (dataRows.length > 0 && (headers || dataRows.length > 1)) {
|
|
83
|
+
const displayHeaders = headers || (dataRows.length > 1 ? dataRows[0] : void 0);
|
|
84
|
+
const displayRows = headers ? dataRows.filter((r) => r !== headers) : dataRows.slice(displayHeaders ? 1 : 0);
|
|
85
|
+
return /* @__PURE__ */ jsx("div", {
|
|
86
|
+
className: cn("my-1 overflow-x-auto rounded-md border border-border/20", className),
|
|
87
|
+
children: /* @__PURE__ */ jsxs("table", {
|
|
88
|
+
className: "w-full font-mono text-xs border-collapse",
|
|
89
|
+
children: [displayHeaders && /* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", {
|
|
90
|
+
className: "bg-muted/30 border-b border-border/30",
|
|
91
|
+
children: displayHeaders.map((header, i) => /* @__PURE__ */ jsx("th", {
|
|
92
|
+
className: "px-3 py-1.5 text-left text-[10px] font-bold uppercase tracking-wider text-muted-foreground/80",
|
|
93
|
+
children: header
|
|
94
|
+
}, i))
|
|
95
|
+
}) }), /* @__PURE__ */ jsx("tbody", { children: displayRows.map((row, i) => /* @__PURE__ */ jsx("tr", {
|
|
96
|
+
className: cn("border-b border-border/10 transition-colors hover:bg-white/[0.04]", i % 2 === 0 ? "bg-transparent" : "bg-white/[0.02]"),
|
|
97
|
+
children: row.map((cell, j) => /* @__PURE__ */ jsx("td", {
|
|
98
|
+
className: "px-3 py-1 text-foreground/85 whitespace-nowrap",
|
|
99
|
+
children: cell
|
|
100
|
+
}, j))
|
|
101
|
+
}, i)) })]
|
|
102
|
+
})
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
return /* @__PURE__ */ jsx("div", {
|
|
106
|
+
className: cn("font-mono text-xs", className),
|
|
107
|
+
children: lines.map((line, i) => {
|
|
108
|
+
const rowType = tableParser.getRowType(line);
|
|
109
|
+
return /* @__PURE__ */ jsx("div", {
|
|
110
|
+
className: tableParser.getRowClass(rowType),
|
|
111
|
+
children: /* @__PURE__ */ jsx(TableRowLine, { line })
|
|
112
|
+
}, i);
|
|
113
|
+
})
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Individual table row with box-drawing character highlighting.
|
|
118
|
+
*/
|
|
119
|
+
function TableRowLine({ line }) {
|
|
120
|
+
const parts = [];
|
|
121
|
+
let lastIndex = 0;
|
|
122
|
+
for (let i = 0; i < line.length; i++) {
|
|
123
|
+
const char = line[i];
|
|
124
|
+
if (TABLE_CHARS.includes(char)) {
|
|
125
|
+
if (i > lastIndex) parts.push(/* @__PURE__ */ jsx("span", { children: line.slice(lastIndex, i) }, lastIndex));
|
|
126
|
+
parts.push(/* @__PURE__ */ jsx("span", {
|
|
127
|
+
className: "text-border/40",
|
|
128
|
+
children: char
|
|
129
|
+
}, i));
|
|
130
|
+
lastIndex = i + 1;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (lastIndex < line.length) parts.push(/* @__PURE__ */ jsx("span", { children: line.slice(lastIndex) }, lastIndex));
|
|
134
|
+
if (parts.length === 0) return /* @__PURE__ */ jsx("span", { children: line });
|
|
135
|
+
return /* @__PURE__ */ jsx(Fragment, { children: parts });
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
//#endregion
|
|
139
|
+
export { SpecializedSyntaxHighlighter };
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Syntax highlighting for log messages (React spans).
|
|
3
|
+
*
|
|
4
|
+
* Applies color highlighting to specific elements within log messages
|
|
5
|
+
* using React span elements with Tailwind CSS classes.
|
|
6
|
+
*
|
|
7
|
+
* IMPORTANT: Only highlights plain text - skips lines with existing ANSI codes
|
|
8
|
+
* to prevent mixing codes and creating visual artifacts.
|
|
9
|
+
*
|
|
10
|
+
* Features LRU cache to avoid re-parsing identical text.
|
|
11
|
+
*
|
|
12
|
+
* @module components/devenv/terminal/SyntaxHighlight
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Clear the highlight cache (useful for memory management).
|
|
16
|
+
*/
|
|
17
|
+
export declare function clearHighlightCache(): void;
|
|
18
|
+
/**
|
|
19
|
+
* Props for SyntaxHighlightedText component.
|
|
20
|
+
*/
|
|
21
|
+
export interface ISyntaxHighlightedTextProps {
|
|
22
|
+
/** Text to highlight */
|
|
23
|
+
text: string;
|
|
24
|
+
/** Optional custom class name */
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Syntax highlighted text component.
|
|
29
|
+
*
|
|
30
|
+
* Applies syntax highlighting to plain text messages.
|
|
31
|
+
* Strips ANSI codes before highlighting to prevent visual artifacts
|
|
32
|
+
* from mixed escape sequences.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```tsx
|
|
36
|
+
* <SyntaxHighlightedText text="GET /api/workspaces { filter: {} }" />
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare function SyntaxHighlightedText({ text, className }: ISyntaxHighlightedTextProps): React.JSX.Element;
|
|
40
|
+
/**
|
|
41
|
+
* Props for HighlightedJson component.
|
|
42
|
+
*/
|
|
43
|
+
export interface IHighlightedJsonProps {
|
|
44
|
+
/** JSON object to highlight */
|
|
45
|
+
json: Record<string, unknown>;
|
|
46
|
+
/** Optional custom class name */
|
|
47
|
+
className?: string;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Highlighted JSON component.
|
|
51
|
+
*
|
|
52
|
+
* Displays JSON with syntax highlighting and proper indentation.
|
|
53
|
+
*
|
|
54
|
+
* @example
|
|
55
|
+
* ```tsx
|
|
56
|
+
* <HighlightedJson json={{ filter: {}, name: "test" }} />
|
|
57
|
+
* ```
|
|
58
|
+
*/
|
|
59
|
+
export declare function HighlightedJson({ json, className }: IHighlightedJsonProps): React.JSX.Element;
|
|
60
|
+
//# sourceMappingURL=SyntaxHighlight.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SyntaxHighlight.d.ts","sourceRoot":"","sources":["../../../../../src/react-ui/blocks/Terminal/components/SyntaxHighlight.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAiDH;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C;AAiBD;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,2BAA2B,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAezG;AA0ID;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,iCAAiC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,qBAAqB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAmB7F"}
|