@mks2508/mks-ui 0.3.1 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react-ui/blocks/Terminal/ResttyAdapter.d.ts +146 -0
- package/dist/react-ui/blocks/Terminal/ResttyAdapter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/ResttyAdapter.js +213 -0
- package/dist/react-ui/blocks/Terminal/Terminal.adapter.d.ts +55 -0
- package/dist/react-ui/blocks/Terminal/Terminal.adapter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/Terminal.adapter.js +68 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.d.ts +43 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.js +59 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.restty.d.ts +63 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.restty.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.restty.js +109 -0
- package/dist/react-ui/blocks/Terminal/Terminal.types.d.ts +351 -0
- package/dist/react-ui/blocks/Terminal/Terminal.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/TerminalPanel.d.ts +60 -0
- package/dist/react-ui/blocks/Terminal/TerminalPanel.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/TerminalPanel.js +183 -0
- package/dist/react-ui/blocks/Terminal/TerminalRestty.d.ts +111 -0
- package/dist/react-ui/blocks/Terminal/TerminalRestty.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/TerminalRestty.js +185 -0
- package/dist/react-ui/blocks/Terminal/TerminalXterm.d.ts +58 -0
- package/dist/react-ui/blocks/Terminal/TerminalXterm.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/TerminalXterm.js +143 -0
- package/dist/react-ui/blocks/Terminal/XTermAdapter.d.ts +87 -0
- package/dist/react-ui/blocks/Terminal/XTermAdapter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/XTermAdapter.js +135 -0
- package/dist/react-ui/blocks/Terminal/components/LogLineBadges.d.ts +160 -0
- package/dist/react-ui/blocks/Terminal/components/LogLineBadges.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/components/LogLineBadges.js +185 -0
- package/dist/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.d.ts +48 -0
- package/dist/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.js +139 -0
- package/dist/react-ui/blocks/Terminal/components/SyntaxHighlight.d.ts +60 -0
- package/dist/react-ui/blocks/Terminal/components/SyntaxHighlight.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/components/SyntaxHighlight.js +352 -0
- package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge.d.ts +36 -0
- package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge.js +52 -0
- package/dist/react-ui/blocks/Terminal/components/index.d.ts +10 -0
- package/dist/react-ui/blocks/Terminal/components/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/components/index.js +4 -0
- package/dist/react-ui/blocks/Terminal/hooks/index.d.ts +11 -0
- package/dist/react-ui/blocks/Terminal/hooks/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/hooks/index.js +2 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalSettings.d.ts +69 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalSettings.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalSettings.js +162 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.d.ts +104 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.js +180 -0
- package/dist/react-ui/blocks/Terminal/index.d.ts +39 -0
- package/dist/react-ui/blocks/Terminal/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/index.js +38 -0
- package/dist/react-ui/blocks/Terminal/panel/LogLinesViewer.d.ts +58 -0
- package/dist/react-ui/blocks/Terminal/panel/LogLinesViewer.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/LogLinesViewer.js +222 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel.d.ts +74 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel.js +168 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.d.ts +42 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.js +175 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterTabs.d.ts +43 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterTabs.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.d.ts +38 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.js +62 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.d.ts +67 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.d.ts +32 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.js +326 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.d.ts +36 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.js +371 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.d.ts +67 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.js +417 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.d.ts +197 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.d.ts +54 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.js +193 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.d.ts +57 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter.d.ts +30 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter.js +126 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader.d.ts +31 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader.js +149 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.d.ts +35 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionControl.d.ts +58 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionControl.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs.d.ts +63 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs.js +245 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.d.ts +24 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.js +225 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector.d.ts +35 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector.js +187 -0
- package/dist/react-ui/blocks/Terminal/panel/index.d.ts +30 -0
- package/dist/react-ui/blocks/Terminal/panel/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module-Bovc57nm.css +60 -0
- package/dist/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module.js +5 -0
- package/dist/react-ui/blocks/Terminal/panel/terminal-session-tabs.module-QyxHO7cN.css +60 -0
- package/dist/react-ui/blocks/Terminal/panel/terminal-session-tabs.module.js +5 -0
- package/dist/react-ui/blocks/Terminal/parsing/BadgeFormatter.d.ts +73 -0
- package/dist/react-ui/blocks/Terminal/parsing/BadgeFormatter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/BadgeFormatter.js +136 -0
- package/dist/react-ui/blocks/Terminal/parsing/HttpLogParser.d.ts +117 -0
- package/dist/react-ui/blocks/Terminal/parsing/HttpLogParser.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/HttpLogParser.js +174 -0
- package/dist/react-ui/blocks/Terminal/parsing/LogParser.types.d.ts +221 -0
- package/dist/react-ui/blocks/Terminal/parsing/LogParser.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/LogParserService.d.ts +184 -0
- package/dist/react-ui/blocks/Terminal/parsing/LogParserService.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/LogParserService.js +478 -0
- package/dist/react-ui/blocks/Terminal/parsing/MultilineAggregator.d.ts +173 -0
- package/dist/react-ui/blocks/Terminal/parsing/MultilineAggregator.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/MultilineAggregator.js +313 -0
- package/dist/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.d.ts +181 -0
- package/dist/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.js +221 -0
- package/dist/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.d.ts +69 -0
- package/dist/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.js +142 -0
- package/dist/react-ui/blocks/Terminal/parsing/TableParser.d.ts +125 -0
- package/dist/react-ui/blocks/Terminal/parsing/TableParser.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/TableParser.js +245 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.d.ts +165 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.js +225 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.d.ts +164 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.js +285 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.d.ts +188 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.js +178 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/index.d.ts +12 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/index.d.ts +24 -0
- package/dist/react-ui/blocks/Terminal/parsing/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.d.ts +56 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.d.ts +140 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.js +325 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/index.d.ts +10 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/index.d.ts +11 -0
- package/dist/react-ui/blocks/index.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/activity.js +1 -1
- package/dist/react-ui/icons/lucide-animated/bell-electric.js +1 -1
- package/dist/react-ui/icons/lucide-animated/bell.js +1 -1
- package/dist/react-ui/icons/lucide-animated/bot.js +1 -1
- package/dist/react-ui/icons/lucide-animated/box.js +1 -1
- package/dist/react-ui/icons/lucide-animated/circle-check.js +1 -1
- package/dist/react-ui/icons/lucide-animated/delete.js +1 -1
- package/dist/react-ui/icons/lucide-animated/download.js +1 -1
- package/dist/react-ui/icons/lucide-animated/home.js +1 -1
- package/dist/react-ui/icons/lucide-animated/layout-panel-top.js +1 -1
- package/dist/react-ui/icons/lucide-animated/plus.js +1 -1
- package/dist/react-ui/icons/lucide-animated/search.js +1 -1
- package/dist/react-ui/icons/lucide-animated/settings.js +1 -1
- package/dist/react-ui/icons/lucide-animated/trending-down.js +1 -1
- package/dist/react-ui/icons/lucide-animated/trending-up.js +1 -1
- package/dist/react-ui/icons/lucide-animated/x.js +1 -1
- package/dist/react-ui/index.js +4 -1
- package/dist/react-ui/lib/icon-wrapper.d.ts +37 -0
- package/dist/react-ui/lib/icon-wrapper.d.ts.map +1 -0
- package/dist/react-ui/lib/icon-wrapper.js +55 -0
- package/dist/react-ui/lib/index.d.ts +1 -0
- package/dist/react-ui/lib/index.d.ts.map +1 -1
- package/dist/react-ui/lib/index.js +1 -0
- package/dist/react-ui/primitives/AutoHeight/index.d.ts +1 -1
- package/dist/react-ui/primitives/CountingNumber/index.d.ts +1 -1
- package/dist/react-ui/primitives/waapi/SlidingNumber/SlidingNumber.styles.d.ts +1 -1
- package/dist/react-ui/primitives/waapi/SlidingText/SlidingText.styles.d.ts +1 -1
- package/dist/react-ui/ui/Accordion/Accordion.styles.d.ts +1 -1
- package/dist/react-ui/ui/Accordion/Accordion.types.d.ts +1 -1
- package/dist/react-ui/ui/AlertDialog/AlertDialog.styles.d.ts +1 -1
- package/dist/react-ui/ui/AlertDialog/AlertDialog.types.d.ts +1 -1
- package/dist/react-ui/ui/Badge/Badge.styles.d.ts +1 -1
- package/dist/react-ui/ui/Badge/Badge.types.d.ts +1 -1
- package/dist/react-ui/ui/Button/Button.styles.d.ts +2 -2
- package/dist/react-ui/ui/Button/Button.types.d.ts +1 -1
- package/dist/react-ui/ui/Card/Card.styles.d.ts +1 -1
- package/dist/react-ui/ui/Card/Card.types.d.ts +1 -1
- package/dist/react-ui/ui/Checkbox/Checkbox.styles.d.ts +1 -1
- package/dist/react-ui/ui/Checkbox/Checkbox.types.d.ts +1 -1
- package/dist/react-ui/ui/Combobox/Combobox.styles.d.ts +1 -1
- package/dist/react-ui/ui/Combobox/Combobox.types.d.ts +1 -1
- package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.d.ts +2 -2
- package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.js +1 -1
- package/dist/react-ui/ui/CornerBracket/CornerBracket.types.d.ts +1 -1
- package/dist/react-ui/ui/DataCard/DataCard.styles.d.ts +1 -1
- package/dist/react-ui/ui/DataCard/DataCard.types.d.ts +1 -1
- package/dist/react-ui/ui/DataCard/index.d.ts +1 -1
- package/dist/react-ui/ui/Dialog/Dialog.styles.d.ts +1 -1
- package/dist/react-ui/ui/Dialog/Dialog.types.d.ts +1 -1
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.styles.d.ts +1 -1
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.types.d.ts +1 -1
- package/dist/react-ui/ui/Field/Field.styles.d.ts +1 -1
- package/dist/react-ui/ui/Field/Field.types.d.ts +1 -1
- package/dist/react-ui/ui/Input/Input.styles.d.ts +1 -1
- package/dist/react-ui/ui/Input/Input.types.d.ts +1 -1
- package/dist/react-ui/ui/InputGroup/InputGroup.styles.d.ts +1 -1
- package/dist/react-ui/ui/InputGroup/InputGroup.types.d.ts +1 -1
- package/dist/react-ui/ui/Label/Label.styles.d.ts +1 -1
- package/dist/react-ui/ui/Label/Label.types.d.ts +1 -1
- package/dist/react-ui/ui/Menu/Menu.styles.d.ts +1 -1
- package/dist/react-ui/ui/Menu/Menu.types.d.ts +2 -2
- package/dist/react-ui/ui/Popover/Popover.styles.d.ts +1 -1
- package/dist/react-ui/ui/Popover/Popover.types.d.ts +1 -1
- package/dist/react-ui/ui/Progress/Progress.styles.d.ts +1 -1
- package/dist/react-ui/ui/Progress/Progress.types.d.ts +2 -2
- package/dist/react-ui/ui/Select/Select.styles.d.ts +1 -1
- package/dist/react-ui/ui/Select/Select.types.d.ts +1 -1
- package/dist/react-ui/ui/Separator/Separator.styles.d.ts +1 -1
- package/dist/react-ui/ui/Separator/Separator.types.d.ts +1 -1
- package/dist/react-ui/ui/Switch/Switch.styles.d.ts +1 -1
- package/dist/react-ui/ui/Switch/Switch.types.d.ts +1 -1
- package/dist/react-ui/ui/Tabs/Tabs.styles.d.ts +43 -25
- package/dist/react-ui/ui/Tabs/Tabs.styles.d.ts.map +1 -1
- package/dist/react-ui/ui/Tabs/Tabs.styles.js +105 -13
- package/dist/react-ui/ui/Tabs/Tabs.types.d.ts +9 -6
- package/dist/react-ui/ui/Tabs/Tabs.types.d.ts.map +1 -1
- package/dist/react-ui/ui/Tabs/index.d.ts +18 -9
- package/dist/react-ui/ui/Tabs/index.d.ts.map +1 -1
- package/dist/react-ui/ui/Tabs/index.js +99 -27
- package/dist/react-ui/ui/TextFlow/TextFlow.styles.d.ts +1 -1
- package/dist/react-ui/ui/Textarea/Textarea.styles.d.ts +1 -1
- package/dist/react-ui/ui/Textarea/Textarea.types.d.ts +1 -1
- package/dist/react-ui/ui/Tooltip/Tooltip.styles.d.ts +1 -1
- package/dist/react-ui/ui/Tooltip/Tooltip.types.d.ts +1 -1
- package/dist/react-ui/ui/index.d.ts +1 -0
- package/dist/react-ui/ui/index.d.ts.map +1 -1
- package/dist/react-ui/ui/index.js +2 -0
- package/package.json +54 -6
- package/src/react-ui/blocks/Terminal/ResttyAdapter.ts +278 -0
- package/src/react-ui/blocks/Terminal/Terminal.adapter.ts +97 -0
- package/src/react-ui/blocks/Terminal/Terminal.theme.restty.ts +155 -0
- package/src/react-ui/blocks/Terminal/Terminal.theme.ts +80 -0
- package/src/react-ui/blocks/Terminal/Terminal.types.ts +438 -0
- package/src/react-ui/blocks/Terminal/TerminalPanel.tsx +269 -0
- package/src/react-ui/blocks/Terminal/TerminalRestty.tsx +326 -0
- package/src/react-ui/blocks/Terminal/TerminalXterm.tsx +230 -0
- package/src/react-ui/blocks/Terminal/XTermAdapter.ts +163 -0
- package/src/react-ui/blocks/Terminal/components/LogLineBadges.tsx +316 -0
- package/src/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.tsx +218 -0
- package/src/react-ui/blocks/Terminal/components/SyntaxHighlight.tsx +386 -0
- package/src/react-ui/blocks/Terminal/components/TerminalLogBadge.tsx +67 -0
- package/src/react-ui/blocks/Terminal/components/index.ts +10 -0
- package/src/react-ui/blocks/Terminal/hooks/index.ts +22 -0
- package/src/react-ui/blocks/Terminal/hooks/useTerminalSettings.ts +229 -0
- package/src/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.ts +292 -0
- package/src/react-ui/blocks/Terminal/index.ts +103 -0
- package/src/react-ui/blocks/Terminal/panel/LogLinesViewer.tsx +330 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalDebugPanel.tsx +242 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.tsx +202 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalFilterTabs.tsx +140 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.tsx +68 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.ts +85 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.tsx +383 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.tsx +439 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.tsx +550 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.ts +259 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.tsx +237 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.ts +76 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelFooter.tsx +112 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelHeader.tsx +178 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.tsx +203 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalSessionControl.tsx +252 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalSessionTabs.tsx +334 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.tsx +261 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalThemeSelector.tsx +248 -0
- package/src/react-ui/blocks/Terminal/panel/index.ts +72 -0
- package/src/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module.css +59 -0
- package/src/react-ui/blocks/Terminal/panel/terminal-session-tabs.module.css +59 -0
- package/src/react-ui/blocks/Terminal/parsing/BadgeFormatter.ts +180 -0
- package/src/react-ui/blocks/Terminal/parsing/HttpLogParser.ts +248 -0
- package/src/react-ui/blocks/Terminal/parsing/LogParser.types.ts +283 -0
- package/src/react-ui/blocks/Terminal/parsing/LogParserService.ts +686 -0
- package/src/react-ui/blocks/Terminal/parsing/MultilineAggregator.ts +466 -0
- package/src/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.ts +343 -0
- package/src/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.ts +167 -0
- package/src/react-ui/blocks/Terminal/parsing/TableParser.ts +348 -0
- package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.ts +251 -0
- package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.ts +390 -0
- package/src/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.ts +320 -0
- package/src/react-ui/blocks/Terminal/parsing/ansi/index.ts +20 -0
- package/src/react-ui/blocks/Terminal/parsing/index.ts +69 -0
- package/src/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.ts +68 -0
- package/src/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.ts +436 -0
- package/src/react-ui/blocks/Terminal/parsing/levels/index.ts +14 -0
- package/src/react-ui/blocks/index.ts +11 -0
- package/src/react-ui/icons/lucide-animated/activity.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/bell-electric.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/bell.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/bot.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/box.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/circle-check.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/delete.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/download.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/home.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/layout-panel-top.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/plus.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/search.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/settings.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/trending-down.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/trending-up.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/x.tsx +2 -2
- package/src/react-ui/lib/icon-wrapper.tsx +70 -0
- package/src/react-ui/lib/index.ts +1 -0
- package/src/react-ui/ui/CornerBracket/CornerBracket.styles.ts +1 -1
- package/src/react-ui/ui/Tabs/Tabs.css +39 -0
- package/src/react-ui/ui/Tabs/Tabs.styles.ts +119 -31
- package/src/react-ui/ui/Tabs/Tabs.types.ts +8 -3
- package/src/react-ui/ui/Tabs/index.tsx +135 -27
- package/src/react-ui/ui/index.ts +1 -0
- package/dist/index.css +0 -129
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import { cn } from "../../../lib/utils.js";
|
|
4
|
+
import { Popover, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverTrigger } from "../../../ui/Popover/index.js";
|
|
5
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
|
|
8
|
+
//#region src/react-ui/blocks/Terminal/panel/TerminalThemeSelector.tsx
|
|
9
|
+
/**
|
|
10
|
+
* TerminalThemeSelector Component.
|
|
11
|
+
*
|
|
12
|
+
* Searchable dropdown for restty's 458 built-in terminal themes.
|
|
13
|
+
* Uses Popover for the dropdown UI with glassmorphism styling
|
|
14
|
+
* matching the existing TerminalFilterDropdown pattern.
|
|
15
|
+
*
|
|
16
|
+
* @module components/devenv/terminal/panel/TerminalThemeSelector
|
|
17
|
+
*/
|
|
18
|
+
/**
|
|
19
|
+
* Favorite themes displayed at the top of the list.
|
|
20
|
+
*/
|
|
21
|
+
const FAVORITE_THEMES = [
|
|
22
|
+
"Synthwave Alpha",
|
|
23
|
+
"Synthwave",
|
|
24
|
+
"Dracula",
|
|
25
|
+
"Nord",
|
|
26
|
+
"One Dark",
|
|
27
|
+
"Tokyo Night",
|
|
28
|
+
"Catppuccin Mocha",
|
|
29
|
+
"Gruvbox Dark"
|
|
30
|
+
];
|
|
31
|
+
/**
|
|
32
|
+
* Action button base styles (matches TerminalInteractivePanel pattern).
|
|
33
|
+
*/
|
|
34
|
+
const triggerStyles = "h-8 px-2.5 rounded-md transition-all hover:bg-muted/20 active:bg-muted/30 flex items-center justify-center gap-1.5 text-xs font-mono text-muted-foreground hover:text-foreground flex-shrink-0 border border-border/30";
|
|
35
|
+
/**
|
|
36
|
+
* TerminalThemeSelector Component.
|
|
37
|
+
*
|
|
38
|
+
* Searchable dropdown for restty's built-in theme catalog.
|
|
39
|
+
* Favorites are pinned to the top, followed by alphabetically
|
|
40
|
+
* sorted themes. Search filters by case-insensitive substring.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```tsx
|
|
44
|
+
* <TerminalThemeSelector
|
|
45
|
+
* currentTheme="Synthwave Alpha"
|
|
46
|
+
* onThemeChange={(name) => setResttyThemeName(name)}
|
|
47
|
+
* />
|
|
48
|
+
* ```
|
|
49
|
+
*/
|
|
50
|
+
function TerminalThemeSelector({ currentTheme, onThemeChange }) {
|
|
51
|
+
const [open, setOpen] = useState(false);
|
|
52
|
+
const [search, setSearch] = useState("");
|
|
53
|
+
const [themeNames, setThemeNames] = useState([]);
|
|
54
|
+
const searchInputRef = useRef(null);
|
|
55
|
+
/**
|
|
56
|
+
* Load the theme catalog from restty on first open.
|
|
57
|
+
*/
|
|
58
|
+
useEffect(() => {
|
|
59
|
+
if (!open || themeNames.length > 0) return;
|
|
60
|
+
import("restty").then(({ listBuiltinThemeNames }) => {
|
|
61
|
+
const names = listBuiltinThemeNames();
|
|
62
|
+
if (Array.isArray(names)) setThemeNames(names.sort((a, b) => a.localeCompare(b)));
|
|
63
|
+
}).catch(() => {});
|
|
64
|
+
}, [open, themeNames.length]);
|
|
65
|
+
/**
|
|
66
|
+
* Focus search input on open.
|
|
67
|
+
*/
|
|
68
|
+
useEffect(() => {
|
|
69
|
+
if (open) requestAnimationFrame(() => searchInputRef.current?.focus());
|
|
70
|
+
else setSearch("");
|
|
71
|
+
}, [open]);
|
|
72
|
+
/**
|
|
73
|
+
* Filter and group themes based on search query.
|
|
74
|
+
*/
|
|
75
|
+
const { favorites, others } = useMemo(() => {
|
|
76
|
+
const query = search.toLowerCase().trim();
|
|
77
|
+
const allNames = themeNames.length > 0 ? themeNames : FAVORITE_THEMES;
|
|
78
|
+
const favSet = new Set(FAVORITE_THEMES);
|
|
79
|
+
return {
|
|
80
|
+
favorites: FAVORITE_THEMES.filter((name) => !query || name.toLowerCase().includes(query)),
|
|
81
|
+
others: allNames.filter((name) => !favSet.has(name) && (!query || name.toLowerCase().includes(query)))
|
|
82
|
+
};
|
|
83
|
+
}, [search, themeNames]);
|
|
84
|
+
/**
|
|
85
|
+
* Handle theme selection.
|
|
86
|
+
*/
|
|
87
|
+
const handleSelect = useCallback((themeName) => {
|
|
88
|
+
onThemeChange(themeName);
|
|
89
|
+
setOpen(false);
|
|
90
|
+
}, [onThemeChange]);
|
|
91
|
+
return /* @__PURE__ */ jsxs(Popover, {
|
|
92
|
+
open,
|
|
93
|
+
onOpenChange: setOpen,
|
|
94
|
+
children: [/* @__PURE__ */ jsx(PopoverTrigger, { children: /* @__PURE__ */ jsxs("button", {
|
|
95
|
+
type: "button",
|
|
96
|
+
className: triggerStyles,
|
|
97
|
+
title: "Select terminal theme",
|
|
98
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
99
|
+
className: "truncate max-w-[140px]",
|
|
100
|
+
children: currentTheme
|
|
101
|
+
}), /* @__PURE__ */ jsx("svg", {
|
|
102
|
+
className: cn("w-3 h-3 transition-transform flex-shrink-0", open && "rotate-180"),
|
|
103
|
+
viewBox: "0 0 12 12",
|
|
104
|
+
fill: "none",
|
|
105
|
+
stroke: "currentColor",
|
|
106
|
+
strokeWidth: "2",
|
|
107
|
+
children: /* @__PURE__ */ jsx("path", { d: "M3 5l3 3 3-3" })
|
|
108
|
+
})]
|
|
109
|
+
}) }), /* @__PURE__ */ jsx(PopoverPortal, { children: /* @__PURE__ */ jsx(PopoverPositioner, {
|
|
110
|
+
align: "start",
|
|
111
|
+
sideOffset: 6,
|
|
112
|
+
children: /* @__PURE__ */ jsxs(PopoverPopup, {
|
|
113
|
+
className: "w-64 p-0 glass-subtle rounded-lg",
|
|
114
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
115
|
+
className: "p-2 border-b border-border/30",
|
|
116
|
+
children: /* @__PURE__ */ jsx("input", {
|
|
117
|
+
ref: searchInputRef,
|
|
118
|
+
type: "text",
|
|
119
|
+
value: search,
|
|
120
|
+
onChange: (e) => setSearch(e.target.value),
|
|
121
|
+
placeholder: "Search themes...",
|
|
122
|
+
className: "w-full h-8 px-2.5 rounded-md bg-muted/20 border border-border/30 text-xs font-mono text-foreground placeholder:text-muted-foreground/50 outline-none focus:border-primary/40 focus:ring-1 focus:ring-primary/20 transition-colors"
|
|
123
|
+
})
|
|
124
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
125
|
+
className: "max-h-[300px] overflow-y-auto py-1",
|
|
126
|
+
children: [
|
|
127
|
+
favorites.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
128
|
+
className: "px-3 py-1.5",
|
|
129
|
+
children: /* @__PURE__ */ jsx("span", {
|
|
130
|
+
className: "text-[10px] font-mono text-muted-foreground/60 uppercase tracking-wider",
|
|
131
|
+
children: "Favorites"
|
|
132
|
+
})
|
|
133
|
+
}), favorites.map((name) => /* @__PURE__ */ jsx(ThemeOption, {
|
|
134
|
+
name,
|
|
135
|
+
isActive: name === currentTheme,
|
|
136
|
+
onSelect: handleSelect
|
|
137
|
+
}, `fav-${name}`))] }),
|
|
138
|
+
others.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
139
|
+
favorites.length > 0 && /* @__PURE__ */ jsx("div", { className: "mx-2 my-1 h-px bg-border/20" }),
|
|
140
|
+
/* @__PURE__ */ jsx("div", {
|
|
141
|
+
className: "px-3 py-1.5",
|
|
142
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
143
|
+
className: "text-[10px] font-mono text-muted-foreground/60 uppercase tracking-wider",
|
|
144
|
+
children: [
|
|
145
|
+
"All Themes (",
|
|
146
|
+
others.length,
|
|
147
|
+
")"
|
|
148
|
+
]
|
|
149
|
+
})
|
|
150
|
+
}),
|
|
151
|
+
others.map((name) => /* @__PURE__ */ jsx(ThemeOption, {
|
|
152
|
+
name,
|
|
153
|
+
isActive: name === currentTheme,
|
|
154
|
+
onSelect: handleSelect
|
|
155
|
+
}, name))
|
|
156
|
+
] }),
|
|
157
|
+
favorites.length === 0 && others.length === 0 && /* @__PURE__ */ jsx("div", {
|
|
158
|
+
className: "px-3 py-4 text-center",
|
|
159
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
160
|
+
className: "text-xs font-mono text-muted-foreground/50",
|
|
161
|
+
children: [
|
|
162
|
+
"No themes match \"",
|
|
163
|
+
search,
|
|
164
|
+
"\""
|
|
165
|
+
]
|
|
166
|
+
})
|
|
167
|
+
})
|
|
168
|
+
]
|
|
169
|
+
})]
|
|
170
|
+
})
|
|
171
|
+
}) })]
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Individual theme option in the dropdown list.
|
|
176
|
+
*/
|
|
177
|
+
function ThemeOption({ name, isActive, onSelect }) {
|
|
178
|
+
return /* @__PURE__ */ jsxs("button", {
|
|
179
|
+
type: "button",
|
|
180
|
+
onClick: () => onSelect(name),
|
|
181
|
+
className: cn("w-full text-left px-3 py-1.5 text-xs font-mono transition-colors", "hover:bg-muted/20", isActive ? "text-primary bg-primary/10" : "text-foreground/80"),
|
|
182
|
+
children: [isActive && /* @__PURE__ */ jsx("span", { className: "inline-block w-1.5 h-1.5 rounded-full bg-primary mr-2 align-middle" }), name]
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
//#endregion
|
|
187
|
+
export { TerminalThemeSelector };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Terminal Panel Module.
|
|
3
|
+
*
|
|
4
|
+
* Complete terminal panel with session tabs, header, filter tabs,
|
|
5
|
+
* action bar, display, and footer. Ghostty-inspired design with
|
|
6
|
+
* glassmorphism effects and premium visual details.
|
|
7
|
+
*
|
|
8
|
+
* @module components/devenv/terminal/panel
|
|
9
|
+
*/
|
|
10
|
+
export { TerminalLogsPanel } from './TerminalLogsPanel';
|
|
11
|
+
export { TerminalInteractivePanel } from './TerminalInteractivePanel';
|
|
12
|
+
export { TerminalInteractivePanelRestty } from './TerminalInteractivePanelRestty';
|
|
13
|
+
export { TerminalPanelChrome } from './TerminalPanelChrome';
|
|
14
|
+
export { TerminalSettingsPopover } from './TerminalSettingsPopover';
|
|
15
|
+
export { TerminalThemeSelector } from './TerminalThemeSelector';
|
|
16
|
+
export { TerminalDebugPanel, type ITerminalDebugPanelProps } from './TerminalDebugPanel';
|
|
17
|
+
export { NOISE_TEXTURE_SVG, terminalScrollStyles } from './TerminalPanelChrome';
|
|
18
|
+
export { TerminalPanelHeader } from './TerminalPanelHeader';
|
|
19
|
+
export { TerminalPanelFooter } from './TerminalPanelFooter';
|
|
20
|
+
export { TerminalSessionTabs } from './TerminalSessionTabs';
|
|
21
|
+
export { TerminalFilterTabs } from './TerminalFilterTabs';
|
|
22
|
+
export { TerminalFilterDropdown } from './TerminalFilterDropdown';
|
|
23
|
+
export { TerminalSessionControl } from './TerminalSessionControl';
|
|
24
|
+
export { LogLinesViewer } from './LogLinesViewer';
|
|
25
|
+
export type { ITerminalPanelChromeProps } from './TerminalPanelChrome.types';
|
|
26
|
+
export type { ITerminalInteractivePanelProps, ITerminalInteractivePanelRef, } from './TerminalInteractivePanel.types';
|
|
27
|
+
export type { ITerminalThemeSelectorProps } from './TerminalThemeSelector';
|
|
28
|
+
export type { ITerminalLogsPanelProps, ITerminalLogsPanelRef, ITerminalPanelHeaderProps, ITerminalPanelToolbarProps, ITerminalPanelFooterProps, ITerminalSession, ITerminalSessionTabsProps, ITerminalFilterTabsProps, ITerminalFilterDropdownProps, ITerminalSessionControlProps, TLogLevelFilter, ILevelFilterButton, TTerminalAction, TLogLevel, } from './TerminalLogsPanel.types';
|
|
29
|
+
export type { ILogLinesViewerProps, } from './LogLinesViewer';
|
|
30
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/react-ui/blocks/Terminal/panel/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAGhE,OAAO,EAAE,kBAAkB,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAGzF,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAGhF,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,YAAY,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAG7E,YAAY,EACV,8BAA8B,EAC9B,4BAA4B,GAC7B,MAAM,kCAAkC,CAAC;AAG1C,YAAY,EAAE,2BAA2B,EAAE,MAAM,yBAAyB,CAAC;AAG3E,YAAY,EACV,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,EACzB,gBAAgB,EAChB,yBAAyB,EACzB,wBAAwB,EACxB,4BAA4B,EAC5B,4BAA4B,EAC5B,eAAe,EACf,kBAAkB,EAClB,eAAe,EACf,SAAS,GACV,MAAM,2BAA2B,CAAC;AAEnC,YAAY,EACV,oBAAoB,GACrB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TerminalFilterDropdown Styles.
|
|
3
|
+
*
|
|
4
|
+
* Uses CSS Anchor Positioning API for dropdown placement.
|
|
5
|
+
* Button acts as anchor, dropdown is positioned relative to it
|
|
6
|
+
* with automatic flip behavior at viewport edges.
|
|
7
|
+
*
|
|
8
|
+
* @module components/devenv/terminal/panel/terminal-filter-dropdown/styles
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/* Trigger button - acts as CSS anchor */
|
|
12
|
+
.triggerButton {
|
|
13
|
+
anchor-name: --filter-dropdown-anchor;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Dropdown menu - anchored to trigger button */
|
|
17
|
+
.dropdownMenu {
|
|
18
|
+
position-anchor: --filter-dropdown-anchor;
|
|
19
|
+
position: fixed;
|
|
20
|
+
|
|
21
|
+
/* Position below and left-aligned */
|
|
22
|
+
left: anchor(left);
|
|
23
|
+
top: anchor(bottom);
|
|
24
|
+
margin-top: 4px;
|
|
25
|
+
|
|
26
|
+
/* Flip to above if no room below */
|
|
27
|
+
position-try-fallbacks: flip-block, flip-inline;
|
|
28
|
+
|
|
29
|
+
min-width: 180px;
|
|
30
|
+
z-index: 50;
|
|
31
|
+
|
|
32
|
+
/* Hidden by default */
|
|
33
|
+
display: none;
|
|
34
|
+
opacity: 0;
|
|
35
|
+
transform: translateY(-4px);
|
|
36
|
+
transition: opacity 0.15s ease-out, transform 0.15s ease-out;
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.dropdownMenu[data-open="true"] {
|
|
41
|
+
display: block;
|
|
42
|
+
opacity: 1;
|
|
43
|
+
transform: translateY(0);
|
|
44
|
+
pointer-events: auto;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Fallback for browsers without CSS Anchor Positioning */
|
|
48
|
+
@supports not (anchor-name: none) {
|
|
49
|
+
.dropdownMenu {
|
|
50
|
+
position: absolute;
|
|
51
|
+
left: 0;
|
|
52
|
+
top: calc(100% + 4px);
|
|
53
|
+
z-index: 50;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.dropdownMenu[data-open="true"] {
|
|
57
|
+
display: block;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TerminalSessionTabs Dropdown Styles.
|
|
3
|
+
*
|
|
4
|
+
* Uses CSS Anchor Positioning API for the "add container" dropdown.
|
|
5
|
+
* The + button acts as anchor, dropdown is positioned below it
|
|
6
|
+
* with automatic flip behavior at viewport edges.
|
|
7
|
+
*
|
|
8
|
+
* @module components/devenv/terminal/panel/terminal-session-tabs/styles
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/* + button - acts as CSS anchor */
|
|
12
|
+
.addButton {
|
|
13
|
+
anchor-name: --session-tabs-add-anchor;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Container dropdown - anchored to + button */
|
|
17
|
+
.containerDropdown {
|
|
18
|
+
position-anchor: --session-tabs-add-anchor;
|
|
19
|
+
position: fixed;
|
|
20
|
+
|
|
21
|
+
/* Position below and left-aligned */
|
|
22
|
+
left: anchor(left);
|
|
23
|
+
top: anchor(bottom);
|
|
24
|
+
margin-top: 4px;
|
|
25
|
+
|
|
26
|
+
/* Flip to above if no room below */
|
|
27
|
+
position-try-fallbacks: flip-block, flip-inline;
|
|
28
|
+
|
|
29
|
+
min-width: 200px;
|
|
30
|
+
z-index: 50;
|
|
31
|
+
|
|
32
|
+
/* Hidden by default */
|
|
33
|
+
display: none;
|
|
34
|
+
opacity: 0;
|
|
35
|
+
transform: translateY(-4px);
|
|
36
|
+
transition: opacity 0.15s ease-out, transform 0.15s ease-out;
|
|
37
|
+
pointer-events: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.containerDropdown[data-open="true"] {
|
|
41
|
+
display: block;
|
|
42
|
+
opacity: 1;
|
|
43
|
+
transform: translateY(0);
|
|
44
|
+
pointer-events: auto;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* Fallback for browsers without CSS Anchor Positioning */
|
|
48
|
+
@supports not (anchor-name: none) {
|
|
49
|
+
.containerDropdown {
|
|
50
|
+
position: absolute;
|
|
51
|
+
left: 0;
|
|
52
|
+
top: calc(100% + 4px);
|
|
53
|
+
z-index: 50;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.containerDropdown[data-open="true"] {
|
|
57
|
+
display: block;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Badge formatter for terminal logs.
|
|
3
|
+
*
|
|
4
|
+
* Creates stylized badges using standard ANSI escape codes
|
|
5
|
+
* compatible with xterm.js.
|
|
6
|
+
*
|
|
7
|
+
* @module components/devenv/terminal/parsing/badge
|
|
8
|
+
*/
|
|
9
|
+
import type { TLogLevel } from './LogParser.types';
|
|
10
|
+
/**
|
|
11
|
+
* Badge formatter class.
|
|
12
|
+
*
|
|
13
|
+
* Creates simple ANSI badges for log levels, tags, and timestamps.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```ts
|
|
17
|
+
* const formatter = new BadgeFormatter();
|
|
18
|
+
* const infoBadge = formatter.createLevelBadge('info');
|
|
19
|
+
* // Returns: '\x1b[1m\x1b[44m\x1b[97m[ INFO ]\x1b[0m'
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare class BadgeFormatter {
|
|
23
|
+
/**
|
|
24
|
+
* Create a level badge.
|
|
25
|
+
*
|
|
26
|
+
* Badge format: [ INFO ] with background color
|
|
27
|
+
*
|
|
28
|
+
* @param level - Log level
|
|
29
|
+
* @returns ANSI-formatted level badge string
|
|
30
|
+
*/
|
|
31
|
+
createLevelBadge(level: TLogLevel): string;
|
|
32
|
+
/**
|
|
33
|
+
* Create a timestamp badge for end of line.
|
|
34
|
+
*
|
|
35
|
+
* Badge format: " 22:55:20" aligned to right
|
|
36
|
+
*
|
|
37
|
+
* @param timestamp - Display timestamp string
|
|
38
|
+
* @returns ANSI-formatted timestamp string
|
|
39
|
+
*/
|
|
40
|
+
createTimestampBadge(timestamp: string): string;
|
|
41
|
+
/**
|
|
42
|
+
* Create a tag badge.
|
|
43
|
+
*
|
|
44
|
+
* Badge format: [TAG] with subtle styling
|
|
45
|
+
*
|
|
46
|
+
* @param tag - Tag string
|
|
47
|
+
* @returns ANSI-formatted tag badge string
|
|
48
|
+
*/
|
|
49
|
+
createTagBadge(tag: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* Create multiple tag badges joined with space.
|
|
52
|
+
*
|
|
53
|
+
* @param tags - Array of tag strings
|
|
54
|
+
* @returns ANSI-formatted tag badges string
|
|
55
|
+
*/
|
|
56
|
+
createTagBadges(tags: string[]): string;
|
|
57
|
+
/**
|
|
58
|
+
* Create a status indicator.
|
|
59
|
+
*
|
|
60
|
+
* @param status - Status type
|
|
61
|
+
* @returns ANSI-formatted status indicator
|
|
62
|
+
*/
|
|
63
|
+
createStatusIndicator(status: 'success' | 'warning' | 'error' | 'info'): string;
|
|
64
|
+
/**
|
|
65
|
+
* Create a box badge (multi-line).
|
|
66
|
+
*
|
|
67
|
+
* @param text - Text to display
|
|
68
|
+
* @param level - Log level for color
|
|
69
|
+
* @returns Multi-line ANSI box
|
|
70
|
+
*/
|
|
71
|
+
createBoxBadge(text: string, level?: TLogLevel): string;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=BadgeFormatter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BadgeFormatter.d.ts","sourceRoot":"","sources":["../../../../../src/react-ui/blocks/Terminal/parsing/BadgeFormatter.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAkDnD;;;;;;;;;;;GAWG;AACH,qBAAa,cAAc;IACzB;;;;;;;OAOG;IACH,gBAAgB,CAAC,KAAK,EAAE,SAAS,GAAG,MAAM;IAS1C;;;;;;;OAOG;IACH,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM;IAc/C;;;;;;;OAOG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAOnC;;;;;OAKG;IACH,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM;IAKvC;;;;;OAKG;IACH,qBAAqB,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM;IAkB/E;;;;;;OAMG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,SAAkB,GAAG,MAAM;CAWhE"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
//#region src/react-ui/blocks/Terminal/parsing/BadgeFormatter.ts
|
|
2
|
+
/**
|
|
3
|
+
* ANSI color combinations for badges.
|
|
4
|
+
*
|
|
5
|
+
* Uses standard 16-color palette for maximum compatibility.
|
|
6
|
+
*/
|
|
7
|
+
const BADGE_COLORS = {
|
|
8
|
+
info: "\x1B[44m\x1B[97m",
|
|
9
|
+
warn: "\x1B[43m\x1B[30m",
|
|
10
|
+
error: "\x1B[41m\x1B[97m",
|
|
11
|
+
debug: "\x1B[46m\x1B[30m",
|
|
12
|
+
fatal: "\x1B[45m\x1B[97m",
|
|
13
|
+
trace: "\x1B[47m\x1B[30m",
|
|
14
|
+
unknown: "\x1B[47m\x1B[30m"
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Tag badge colors (cyan on gray).
|
|
18
|
+
*/
|
|
19
|
+
const TAG_COLORS = "\x1B[90m\x1B[36m";
|
|
20
|
+
/**
|
|
21
|
+
* Timestamp colors (gray).
|
|
22
|
+
*/
|
|
23
|
+
const TIMESTAMP_COLORS = "\x1B[90m\x1B[37m";
|
|
24
|
+
/**
|
|
25
|
+
* Reset code.
|
|
26
|
+
*/
|
|
27
|
+
const RESET = "\x1B[0m";
|
|
28
|
+
/**
|
|
29
|
+
* Bold modifier.
|
|
30
|
+
*/
|
|
31
|
+
const BOLD = "\x1B[1m";
|
|
32
|
+
/**
|
|
33
|
+
* Level badge icons.
|
|
34
|
+
*/
|
|
35
|
+
const LEVEL_ICONS = {
|
|
36
|
+
info: "I",
|
|
37
|
+
warn: "W",
|
|
38
|
+
error: "E",
|
|
39
|
+
fatal: "F",
|
|
40
|
+
debug: "D",
|
|
41
|
+
trace: "T",
|
|
42
|
+
unknown: "?"
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Badge formatter class.
|
|
46
|
+
*
|
|
47
|
+
* Creates simple ANSI badges for log levels, tags, and timestamps.
|
|
48
|
+
*
|
|
49
|
+
* @example
|
|
50
|
+
* ```ts
|
|
51
|
+
* const formatter = new BadgeFormatter();
|
|
52
|
+
* const infoBadge = formatter.createLevelBadge('info');
|
|
53
|
+
* // Returns: '\x1b[1m\x1b[44m\x1b[97m[ INFO ]\x1b[0m'
|
|
54
|
+
* ```
|
|
55
|
+
*/
|
|
56
|
+
var BadgeFormatter = class {
|
|
57
|
+
/**
|
|
58
|
+
* Create a level badge.
|
|
59
|
+
*
|
|
60
|
+
* Badge format: [ INFO ] with background color
|
|
61
|
+
*
|
|
62
|
+
* @param level - Log level
|
|
63
|
+
* @returns ANSI-formatted level badge string
|
|
64
|
+
*/
|
|
65
|
+
createLevelBadge(level) {
|
|
66
|
+
return `${BOLD}${BADGE_COLORS[level] ?? BADGE_COLORS.unknown}[${LEVEL_ICONS[level] ?? LEVEL_ICONS.unknown}${level.toUpperCase().padEnd(4)}]${RESET}`;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Create a timestamp badge for end of line.
|
|
70
|
+
*
|
|
71
|
+
* Badge format: " 22:55:20" aligned to right
|
|
72
|
+
*
|
|
73
|
+
* @param timestamp - Display timestamp string
|
|
74
|
+
* @returns ANSI-formatted timestamp string
|
|
75
|
+
*/
|
|
76
|
+
createTimestampBadge(timestamp) {
|
|
77
|
+
if (!timestamp) return "";
|
|
78
|
+
return `${TIMESTAMP_COLORS}${(timestamp.includes(".") ? timestamp.split(".")[0] : timestamp).padStart(12)}${RESET}`;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Create a tag badge.
|
|
82
|
+
*
|
|
83
|
+
* Badge format: [TAG] with subtle styling
|
|
84
|
+
*
|
|
85
|
+
* @param tag - Tag string
|
|
86
|
+
* @returns ANSI-formatted tag badge string
|
|
87
|
+
*/
|
|
88
|
+
createTagBadge(tag) {
|
|
89
|
+
return `${TAG_COLORS}[${tag.length > 12 ? tag.slice(0, 9) + "..." : tag}]${RESET}`;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Create multiple tag badges joined with space.
|
|
93
|
+
*
|
|
94
|
+
* @param tags - Array of tag strings
|
|
95
|
+
* @returns ANSI-formatted tag badges string
|
|
96
|
+
*/
|
|
97
|
+
createTagBadges(tags) {
|
|
98
|
+
if (!tags || tags.length === 0) return "";
|
|
99
|
+
return tags.map((tag) => this.createTagBadge(tag)).join("");
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Create a status indicator.
|
|
103
|
+
*
|
|
104
|
+
* @param status - Status type
|
|
105
|
+
* @returns ANSI-formatted status indicator
|
|
106
|
+
*/
|
|
107
|
+
createStatusIndicator(status) {
|
|
108
|
+
return `${{
|
|
109
|
+
success: "\x1B[42m\x1B[97m",
|
|
110
|
+
warning: "\x1B[43m\x1B[30m",
|
|
111
|
+
error: "\x1B[41m\x1B[97m",
|
|
112
|
+
info: "\x1B[44m\x1B[97m"
|
|
113
|
+
}[status]} ${{
|
|
114
|
+
success: "✓",
|
|
115
|
+
warning: "⚠",
|
|
116
|
+
error: "✖",
|
|
117
|
+
info: "i"
|
|
118
|
+
}[status]} ${RESET}`;
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Create a box badge (multi-line).
|
|
122
|
+
*
|
|
123
|
+
* @param text - Text to display
|
|
124
|
+
* @param level - Log level for color
|
|
125
|
+
* @returns Multi-line ANSI box
|
|
126
|
+
*/
|
|
127
|
+
createBoxBadge(text, level = "info") {
|
|
128
|
+
const colors = BADGE_COLORS[level] ?? BADGE_COLORS.unknown;
|
|
129
|
+
const padding = 2;
|
|
130
|
+
const width = text.length + padding * 2 + 2;
|
|
131
|
+
return `${`\x1b[90m┌${"─".repeat(width)}┐${RESET}`}\r\n${`${colors}│${" ".repeat(padding)}${text}${" ".repeat(padding)}│${RESET}`}\r\n${`\x1b[90m└${"─".repeat(width)}┘${RESET}`}`;
|
|
132
|
+
}
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
//#endregion
|
|
136
|
+
export { BadgeFormatter };
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HTTP log parser for specialized HTTP request detection.
|
|
3
|
+
*
|
|
4
|
+
* Detects and parses HTTP request logs with syntax highlighting
|
|
5
|
+
* for methods (GET, POST, etc.), routes, and parameters.
|
|
6
|
+
*
|
|
7
|
+
* @module components/devenv/terminal/parsing/HttpLogParser
|
|
8
|
+
*/
|
|
9
|
+
import type { IParsedLogEntry } from './LogParser.types';
|
|
10
|
+
/**
|
|
11
|
+
* HTTP method enumeration.
|
|
12
|
+
*/
|
|
13
|
+
export type THttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'CONNECT' | 'TRACE';
|
|
14
|
+
/**
|
|
15
|
+
* Parsed HTTP request data.
|
|
16
|
+
*/
|
|
17
|
+
export interface IHttpParsedData {
|
|
18
|
+
/** HTTP method */
|
|
19
|
+
method: THttpMethod;
|
|
20
|
+
/** Request path/route */
|
|
21
|
+
path: string;
|
|
22
|
+
/** Query parameters extracted from path */
|
|
23
|
+
params?: Record<string, string>;
|
|
24
|
+
/** Whether request opens a multiline block (has brace) */
|
|
25
|
+
opensMultiline: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* HTTP log parser class.
|
|
29
|
+
*
|
|
30
|
+
* Detects HTTP requests in log lines and extracts structured data.
|
|
31
|
+
* Supports various log formats:
|
|
32
|
+
*
|
|
33
|
+
* - `GET /api/endpoint`
|
|
34
|
+
* - `GET /api/endpoint/:param {`
|
|
35
|
+
* - `POST /api/users HTTP/1.1`
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const parser = new HttpLogParser();
|
|
40
|
+
* const parsed = parser.parseLine('GET /api/logs/containers/:name/stream {');
|
|
41
|
+
* // parsed.method = 'GET'
|
|
42
|
+
* // parsed.path = '/api/logs/containers/:name/stream'
|
|
43
|
+
* // parsed.opensMultiline = true
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export declare class HttpLogParser {
|
|
47
|
+
/** HTTP method pattern */
|
|
48
|
+
private readonly HTTP_PATTERN;
|
|
49
|
+
/** URL path with parameters pattern */
|
|
50
|
+
private readonly PATH_PARAM_PATTERN;
|
|
51
|
+
/**
|
|
52
|
+
* Parse a log line for HTTP request data.
|
|
53
|
+
*
|
|
54
|
+
* @param line - Log line to parse
|
|
55
|
+
* @returns Parsed HTTP data or null if not an HTTP line
|
|
56
|
+
*/
|
|
57
|
+
parseLine(line: string): IHttpParsedData | null;
|
|
58
|
+
/**
|
|
59
|
+
* Check if a line is an HTTP request line.
|
|
60
|
+
*
|
|
61
|
+
* @param line - Line to check
|
|
62
|
+
* @returns true if line is an HTTP request
|
|
63
|
+
*/
|
|
64
|
+
isHttpLine(line: string): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Extract path parameters from a route path.
|
|
67
|
+
*
|
|
68
|
+
* @param path - Route path (e.g., `/api/users/:id`)
|
|
69
|
+
* @returns Object with parameter names
|
|
70
|
+
*/
|
|
71
|
+
extractPathParams(path: string): Record<string, string> | undefined;
|
|
72
|
+
/**
|
|
73
|
+
* Format HTTP method with syntax highlighting class.
|
|
74
|
+
*
|
|
75
|
+
* @param _method - HTTP method
|
|
76
|
+
* @returns CSS class for highlighting
|
|
77
|
+
*/
|
|
78
|
+
getMethodClass(_method: THttpMethod): string;
|
|
79
|
+
/**
|
|
80
|
+
* Format path with syntax highlighting.
|
|
81
|
+
*
|
|
82
|
+
* @param path - Request path
|
|
83
|
+
* @returns CSS class for path highlighting
|
|
84
|
+
*/
|
|
85
|
+
getPathClass(): string;
|
|
86
|
+
/**
|
|
87
|
+
* Highlight an HTTP request line.
|
|
88
|
+
*
|
|
89
|
+
* Returns an array of parts with their associated CSS classes.
|
|
90
|
+
*
|
|
91
|
+
* @param line - HTTP request line
|
|
92
|
+
* @returns Array of {text, className} parts
|
|
93
|
+
*/
|
|
94
|
+
highlightLine(line: string): Array<{
|
|
95
|
+
text: string;
|
|
96
|
+
className?: string;
|
|
97
|
+
}>;
|
|
98
|
+
/**
|
|
99
|
+
* Highlight path segments (routes and parameters).
|
|
100
|
+
*
|
|
101
|
+
* @param path - Path string
|
|
102
|
+
* @returns Highlighted parts
|
|
103
|
+
* @private
|
|
104
|
+
*/
|
|
105
|
+
private highlightPath;
|
|
106
|
+
/**
|
|
107
|
+
* Parse a multiline HTTP request block.
|
|
108
|
+
*
|
|
109
|
+
* Combines the initial request line with continuation lines
|
|
110
|
+
* that form JSON or structured data.
|
|
111
|
+
*
|
|
112
|
+
* @param lines - Array of log lines
|
|
113
|
+
* @returns Parsed entry with HTTP data
|
|
114
|
+
*/
|
|
115
|
+
parseHttpBlock(lines: string[]): IParsedLogEntry | null;
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=HttpLogParser.d.ts.map
|