@mks2508/mks-ui 0.3.2 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/react-ui/blocks/Terminal/ResttyAdapter.d.ts +146 -0
- package/dist/react-ui/blocks/Terminal/ResttyAdapter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/ResttyAdapter.js +213 -0
- package/dist/react-ui/blocks/Terminal/Terminal.adapter.d.ts +55 -0
- package/dist/react-ui/blocks/Terminal/Terminal.adapter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/Terminal.adapter.js +68 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.d.ts +43 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.js +59 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.restty.d.ts +63 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.restty.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/Terminal.theme.restty.js +109 -0
- package/dist/react-ui/blocks/Terminal/Terminal.types.d.ts +351 -0
- package/dist/react-ui/blocks/Terminal/Terminal.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/TerminalPanel.d.ts +60 -0
- package/dist/react-ui/blocks/Terminal/TerminalPanel.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/TerminalPanel.js +183 -0
- package/dist/react-ui/blocks/Terminal/TerminalRestty.d.ts +111 -0
- package/dist/react-ui/blocks/Terminal/TerminalRestty.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/TerminalRestty.js +185 -0
- package/dist/react-ui/blocks/Terminal/TerminalXterm.d.ts +58 -0
- package/dist/react-ui/blocks/Terminal/TerminalXterm.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/TerminalXterm.js +143 -0
- package/dist/react-ui/blocks/Terminal/XTermAdapter.d.ts +87 -0
- package/dist/react-ui/blocks/Terminal/XTermAdapter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/XTermAdapter.js +135 -0
- package/dist/react-ui/blocks/Terminal/components/LogLineBadges.d.ts +160 -0
- package/dist/react-ui/blocks/Terminal/components/LogLineBadges.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/components/LogLineBadges.js +185 -0
- package/dist/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.d.ts +48 -0
- package/dist/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.js +139 -0
- package/dist/react-ui/blocks/Terminal/components/SyntaxHighlight.d.ts +60 -0
- package/dist/react-ui/blocks/Terminal/components/SyntaxHighlight.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/components/SyntaxHighlight.js +352 -0
- package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge.d.ts +36 -0
- package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/components/TerminalLogBadge.js +52 -0
- package/dist/react-ui/blocks/Terminal/components/index.d.ts +10 -0
- package/dist/react-ui/blocks/Terminal/components/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/components/index.js +4 -0
- package/dist/react-ui/blocks/Terminal/hooks/index.d.ts +11 -0
- package/dist/react-ui/blocks/Terminal/hooks/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/hooks/index.js +2 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalSettings.d.ts +69 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalSettings.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalSettings.js +162 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.d.ts +104 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.js +180 -0
- package/dist/react-ui/blocks/Terminal/index.d.ts +39 -0
- package/dist/react-ui/blocks/Terminal/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/index.js +38 -0
- package/dist/react-ui/blocks/Terminal/panel/LogLinesViewer.d.ts +58 -0
- package/dist/react-ui/blocks/Terminal/panel/LogLinesViewer.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/LogLinesViewer.js +222 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel.d.ts +74 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalDebugPanel.js +168 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.d.ts +42 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.js +175 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterTabs.d.ts +43 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalFilterTabs.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.d.ts +38 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.js +62 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.d.ts +67 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.d.ts +32 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.js +326 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.d.ts +36 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.js +371 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.d.ts +67 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.js +417 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.d.ts +197 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.d.ts +54 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.js +193 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.d.ts +57 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter.d.ts +30 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelFooter.js +126 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader.d.ts +31 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelHeader.js +149 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.d.ts +35 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionControl.d.ts +58 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionControl.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs.d.ts +63 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSessionTabs.js +245 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.d.ts +24 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.js +225 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector.d.ts +35 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/TerminalThemeSelector.js +187 -0
- package/dist/react-ui/blocks/Terminal/panel/index.d.ts +30 -0
- package/dist/react-ui/blocks/Terminal/panel/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module-Bovc57nm.css +60 -0
- package/dist/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module.js +5 -0
- package/dist/react-ui/blocks/Terminal/panel/terminal-session-tabs.module-QyxHO7cN.css +60 -0
- package/dist/react-ui/blocks/Terminal/panel/terminal-session-tabs.module.js +5 -0
- package/dist/react-ui/blocks/Terminal/parsing/BadgeFormatter.d.ts +73 -0
- package/dist/react-ui/blocks/Terminal/parsing/BadgeFormatter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/BadgeFormatter.js +136 -0
- package/dist/react-ui/blocks/Terminal/parsing/HttpLogParser.d.ts +117 -0
- package/dist/react-ui/blocks/Terminal/parsing/HttpLogParser.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/HttpLogParser.js +174 -0
- package/dist/react-ui/blocks/Terminal/parsing/LogParser.types.d.ts +221 -0
- package/dist/react-ui/blocks/Terminal/parsing/LogParser.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/LogParserService.d.ts +184 -0
- package/dist/react-ui/blocks/Terminal/parsing/LogParserService.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/LogParserService.js +478 -0
- package/dist/react-ui/blocks/Terminal/parsing/MultilineAggregator.d.ts +173 -0
- package/dist/react-ui/blocks/Terminal/parsing/MultilineAggregator.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/MultilineAggregator.js +313 -0
- package/dist/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.d.ts +181 -0
- package/dist/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.js +221 -0
- package/dist/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.d.ts +69 -0
- package/dist/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.js +142 -0
- package/dist/react-ui/blocks/Terminal/parsing/TableParser.d.ts +125 -0
- package/dist/react-ui/blocks/Terminal/parsing/TableParser.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/TableParser.js +245 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.d.ts +165 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.js +225 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.d.ts +164 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.js +285 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.d.ts +188 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.js +178 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/index.d.ts +12 -0
- package/dist/react-ui/blocks/Terminal/parsing/ansi/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/index.d.ts +24 -0
- package/dist/react-ui/blocks/Terminal/parsing/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.d.ts +56 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.d.ts +140 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.d.ts.map +1 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.js +325 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/index.d.ts +10 -0
- package/dist/react-ui/blocks/Terminal/parsing/levels/index.d.ts.map +1 -0
- package/dist/react-ui/blocks/index.d.ts +11 -0
- package/dist/react-ui/blocks/index.d.ts.map +1 -0
- package/dist/react-ui/icons/lucide-animated/activity.js +1 -1
- package/dist/react-ui/icons/lucide-animated/bell-electric.js +1 -1
- package/dist/react-ui/icons/lucide-animated/bell.js +1 -1
- package/dist/react-ui/icons/lucide-animated/bot.js +1 -1
- package/dist/react-ui/icons/lucide-animated/box.js +1 -1
- package/dist/react-ui/icons/lucide-animated/circle-check.js +1 -1
- package/dist/react-ui/icons/lucide-animated/delete.js +1 -1
- package/dist/react-ui/icons/lucide-animated/download.js +1 -1
- package/dist/react-ui/icons/lucide-animated/home.js +1 -1
- package/dist/react-ui/icons/lucide-animated/layout-panel-top.js +1 -1
- package/dist/react-ui/icons/lucide-animated/plus.js +1 -1
- package/dist/react-ui/icons/lucide-animated/search.js +1 -1
- package/dist/react-ui/icons/lucide-animated/settings.js +1 -1
- package/dist/react-ui/icons/lucide-animated/trending-down.js +1 -1
- package/dist/react-ui/icons/lucide-animated/trending-up.js +1 -1
- package/dist/react-ui/icons/lucide-animated/x.js +1 -1
- package/dist/react-ui/index.js +3 -1
- package/dist/react-ui/lib/icon-wrapper.d.ts +37 -0
- package/dist/react-ui/lib/icon-wrapper.d.ts.map +1 -0
- package/dist/react-ui/lib/icon-wrapper.js +55 -0
- package/dist/react-ui/lib/index.d.ts +1 -0
- package/dist/react-ui/lib/index.d.ts.map +1 -1
- package/dist/react-ui/lib/index.js +1 -0
- package/dist/react-ui/primitives/AutoHeight/index.d.ts +1 -1
- package/dist/react-ui/primitives/CountingNumber/index.d.ts +1 -1
- package/dist/react-ui/primitives/waapi/SlidingNumber/SlidingNumber.styles.d.ts +1 -1
- package/dist/react-ui/primitives/waapi/SlidingText/SlidingText.styles.d.ts +1 -1
- package/dist/react-ui/ui/Accordion/Accordion.styles.d.ts +1 -1
- package/dist/react-ui/ui/Accordion/Accordion.types.d.ts +1 -1
- package/dist/react-ui/ui/AlertDialog/AlertDialog.styles.d.ts +1 -1
- package/dist/react-ui/ui/AlertDialog/AlertDialog.types.d.ts +1 -1
- package/dist/react-ui/ui/Badge/Badge.styles.d.ts +1 -1
- package/dist/react-ui/ui/Badge/Badge.types.d.ts +1 -1
- package/dist/react-ui/ui/Button/Button.styles.d.ts +2 -2
- package/dist/react-ui/ui/Button/Button.types.d.ts +1 -1
- package/dist/react-ui/ui/Card/Card.styles.d.ts +1 -1
- package/dist/react-ui/ui/Card/Card.types.d.ts +1 -1
- package/dist/react-ui/ui/Checkbox/Checkbox.styles.d.ts +1 -1
- package/dist/react-ui/ui/Checkbox/Checkbox.types.d.ts +1 -1
- package/dist/react-ui/ui/Combobox/Combobox.styles.d.ts +1 -1
- package/dist/react-ui/ui/Combobox/Combobox.types.d.ts +1 -1
- package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.d.ts +2 -2
- package/dist/react-ui/ui/CornerBracket/CornerBracket.styles.js +1 -1
- package/dist/react-ui/ui/CornerBracket/CornerBracket.types.d.ts +1 -1
- package/dist/react-ui/ui/DataCard/DataCard.styles.d.ts +1 -1
- package/dist/react-ui/ui/DataCard/DataCard.types.d.ts +1 -1
- package/dist/react-ui/ui/DataCard/index.d.ts +1 -1
- package/dist/react-ui/ui/Dialog/Dialog.styles.d.ts +1 -1
- package/dist/react-ui/ui/Dialog/Dialog.types.d.ts +1 -1
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.styles.d.ts +1 -1
- package/dist/react-ui/ui/DropdownMenu/DropdownMenu.types.d.ts +1 -1
- package/dist/react-ui/ui/Field/Field.styles.d.ts +1 -1
- package/dist/react-ui/ui/Field/Field.types.d.ts +1 -1
- package/dist/react-ui/ui/Input/Input.styles.d.ts +1 -1
- package/dist/react-ui/ui/Input/Input.types.d.ts +1 -1
- package/dist/react-ui/ui/InputGroup/InputGroup.styles.d.ts +1 -1
- package/dist/react-ui/ui/InputGroup/InputGroup.types.d.ts +1 -1
- package/dist/react-ui/ui/Label/Label.styles.d.ts +1 -1
- package/dist/react-ui/ui/Label/Label.types.d.ts +1 -1
- package/dist/react-ui/ui/Menu/Menu.styles.d.ts +1 -1
- package/dist/react-ui/ui/Menu/Menu.types.d.ts +2 -2
- package/dist/react-ui/ui/Popover/Popover.styles.d.ts +1 -1
- package/dist/react-ui/ui/Popover/Popover.types.d.ts +1 -1
- package/dist/react-ui/ui/Progress/Progress.styles.d.ts +1 -1
- package/dist/react-ui/ui/Progress/Progress.types.d.ts +2 -2
- package/dist/react-ui/ui/Select/Select.styles.d.ts +1 -1
- package/dist/react-ui/ui/Select/Select.types.d.ts +1 -1
- package/dist/react-ui/ui/Separator/Separator.styles.d.ts +1 -1
- package/dist/react-ui/ui/Separator/Separator.types.d.ts +1 -1
- package/dist/react-ui/ui/Switch/Switch.styles.d.ts +1 -1
- package/dist/react-ui/ui/Switch/Switch.types.d.ts +1 -1
- package/dist/react-ui/ui/Tabs/Tabs.styles.d.ts +43 -25
- package/dist/react-ui/ui/Tabs/Tabs.styles.d.ts.map +1 -1
- package/dist/react-ui/ui/Tabs/Tabs.styles.js +105 -13
- package/dist/react-ui/ui/Tabs/Tabs.types.d.ts +9 -6
- package/dist/react-ui/ui/Tabs/Tabs.types.d.ts.map +1 -1
- package/dist/react-ui/ui/Tabs/index.d.ts +18 -9
- package/dist/react-ui/ui/Tabs/index.d.ts.map +1 -1
- package/dist/react-ui/ui/Tabs/index.js +99 -27
- package/dist/react-ui/ui/TextFlow/TextFlow.styles.d.ts +1 -1
- package/dist/react-ui/ui/Textarea/Textarea.styles.d.ts +1 -1
- package/dist/react-ui/ui/Textarea/Textarea.types.d.ts +1 -1
- package/dist/react-ui/ui/Tooltip/Tooltip.styles.d.ts +1 -1
- package/dist/react-ui/ui/Tooltip/Tooltip.types.d.ts +1 -1
- package/dist/react-ui/ui/index.js +1 -0
- package/package.json +54 -6
- package/src/react-ui/blocks/Terminal/ResttyAdapter.ts +278 -0
- package/src/react-ui/blocks/Terminal/Terminal.adapter.ts +97 -0
- package/src/react-ui/blocks/Terminal/Terminal.theme.restty.ts +155 -0
- package/src/react-ui/blocks/Terminal/Terminal.theme.ts +80 -0
- package/src/react-ui/blocks/Terminal/Terminal.types.ts +438 -0
- package/src/react-ui/blocks/Terminal/TerminalPanel.tsx +269 -0
- package/src/react-ui/blocks/Terminal/TerminalRestty.tsx +326 -0
- package/src/react-ui/blocks/Terminal/TerminalXterm.tsx +230 -0
- package/src/react-ui/blocks/Terminal/XTermAdapter.ts +163 -0
- package/src/react-ui/blocks/Terminal/components/LogLineBadges.tsx +316 -0
- package/src/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.tsx +218 -0
- package/src/react-ui/blocks/Terminal/components/SyntaxHighlight.tsx +386 -0
- package/src/react-ui/blocks/Terminal/components/TerminalLogBadge.tsx +67 -0
- package/src/react-ui/blocks/Terminal/components/index.ts +10 -0
- package/src/react-ui/blocks/Terminal/hooks/index.ts +22 -0
- package/src/react-ui/blocks/Terminal/hooks/useTerminalSettings.ts +229 -0
- package/src/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.ts +292 -0
- package/src/react-ui/blocks/Terminal/index.ts +103 -0
- package/src/react-ui/blocks/Terminal/panel/LogLinesViewer.tsx +330 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalDebugPanel.tsx +242 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.tsx +202 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalFilterTabs.tsx +140 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.tsx +68 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.ts +85 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.tsx +383 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.tsx +439 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.tsx +550 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.ts +259 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.tsx +237 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.ts +76 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelFooter.tsx +112 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelHeader.tsx +178 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.tsx +203 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalSessionControl.tsx +252 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalSessionTabs.tsx +334 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.tsx +261 -0
- package/src/react-ui/blocks/Terminal/panel/TerminalThemeSelector.tsx +248 -0
- package/src/react-ui/blocks/Terminal/panel/index.ts +72 -0
- package/src/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module.css +59 -0
- package/src/react-ui/blocks/Terminal/panel/terminal-session-tabs.module.css +59 -0
- package/src/react-ui/blocks/Terminal/parsing/BadgeFormatter.ts +180 -0
- package/src/react-ui/blocks/Terminal/parsing/HttpLogParser.ts +248 -0
- package/src/react-ui/blocks/Terminal/parsing/LogParser.types.ts +283 -0
- package/src/react-ui/blocks/Terminal/parsing/LogParserService.ts +686 -0
- package/src/react-ui/blocks/Terminal/parsing/MultilineAggregator.ts +466 -0
- package/src/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.ts +343 -0
- package/src/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.ts +167 -0
- package/src/react-ui/blocks/Terminal/parsing/TableParser.ts +348 -0
- package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.ts +251 -0
- package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.ts +390 -0
- package/src/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.ts +320 -0
- package/src/react-ui/blocks/Terminal/parsing/ansi/index.ts +20 -0
- package/src/react-ui/blocks/Terminal/parsing/index.ts +69 -0
- package/src/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.ts +68 -0
- package/src/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.ts +436 -0
- package/src/react-ui/blocks/Terminal/parsing/levels/index.ts +14 -0
- package/src/react-ui/blocks/index.ts +11 -0
- package/src/react-ui/icons/lucide-animated/activity.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/bell-electric.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/bell.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/bot.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/box.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/circle-check.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/delete.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/download.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/home.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/layout-panel-top.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/plus.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/search.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/settings.tsx +1 -1
- package/src/react-ui/icons/lucide-animated/trending-down.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/trending-up.tsx +2 -2
- package/src/react-ui/icons/lucide-animated/x.tsx +2 -2
- package/src/react-ui/lib/icon-wrapper.tsx +70 -0
- package/src/react-ui/lib/index.ts +1 -0
- package/src/react-ui/ui/CornerBracket/CornerBracket.styles.ts +1 -1
- package/src/react-ui/ui/Tabs/Tabs.css +39 -0
- package/src/react-ui/ui/Tabs/Tabs.styles.ts +119 -31
- package/src/react-ui/ui/Tabs/Tabs.types.ts +8 -3
- package/src/react-ui/ui/Tabs/index.tsx +135 -27
- package/dist/index.css +0 -129
|
@@ -0,0 +1,248 @@
|
|
|
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
|
+
|
|
10
|
+
import type { IParsedLogEntry } from './LogParser.types';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* HTTP method enumeration.
|
|
14
|
+
*/
|
|
15
|
+
export type THttpMethod = 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'CONNECT' | 'TRACE';
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Parsed HTTP request data.
|
|
19
|
+
*/
|
|
20
|
+
export interface IHttpParsedData {
|
|
21
|
+
/** HTTP method */
|
|
22
|
+
method: THttpMethod;
|
|
23
|
+
|
|
24
|
+
/** Request path/route */
|
|
25
|
+
path: string;
|
|
26
|
+
|
|
27
|
+
/** Query parameters extracted from path */
|
|
28
|
+
params?: Record<string, string>;
|
|
29
|
+
|
|
30
|
+
/** Whether request opens a multiline block (has brace) */
|
|
31
|
+
opensMultiline: boolean;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* HTTP log parser class.
|
|
36
|
+
*
|
|
37
|
+
* Detects HTTP requests in log lines and extracts structured data.
|
|
38
|
+
* Supports various log formats:
|
|
39
|
+
*
|
|
40
|
+
* - `GET /api/endpoint`
|
|
41
|
+
* - `GET /api/endpoint/:param {`
|
|
42
|
+
* - `POST /api/users HTTP/1.1`
|
|
43
|
+
*
|
|
44
|
+
* @example
|
|
45
|
+
* ```ts
|
|
46
|
+
* const parser = new HttpLogParser();
|
|
47
|
+
* const parsed = parser.parseLine('GET /api/logs/containers/:name/stream {');
|
|
48
|
+
* // parsed.method = 'GET'
|
|
49
|
+
* // parsed.path = '/api/logs/containers/:name/stream'
|
|
50
|
+
* // parsed.opensMultiline = true
|
|
51
|
+
* ```
|
|
52
|
+
*/
|
|
53
|
+
export class HttpLogParser {
|
|
54
|
+
/** HTTP method pattern */
|
|
55
|
+
private readonly HTTP_PATTERN = /^(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS|CONNECT|TRACE)\s+(.+?)(?:\s+(\{))?$/i;
|
|
56
|
+
|
|
57
|
+
/** URL path with parameters pattern */
|
|
58
|
+
private readonly PATH_PARAM_PATTERN = /:([a-zA-Z_][a-zA-Z0-9_]*)/g;
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Parse a log line for HTTP request data.
|
|
62
|
+
*
|
|
63
|
+
* @param line - Log line to parse
|
|
64
|
+
* @returns Parsed HTTP data or null if not an HTTP line
|
|
65
|
+
*/
|
|
66
|
+
parseLine(line: string): IHttpParsedData | null {
|
|
67
|
+
const match = line.match(this.HTTP_PATTERN);
|
|
68
|
+
if (!match) return null;
|
|
69
|
+
|
|
70
|
+
const [, method, path, hasBrace] = match;
|
|
71
|
+
|
|
72
|
+
return {
|
|
73
|
+
method: method.toUpperCase() as THttpMethod,
|
|
74
|
+
path: path.trim(),
|
|
75
|
+
params: this.extractPathParams(path),
|
|
76
|
+
opensMultiline: hasBrace === '{',
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Check if a line is an HTTP request line.
|
|
82
|
+
*
|
|
83
|
+
* @param line - Line to check
|
|
84
|
+
* @returns true if line is an HTTP request
|
|
85
|
+
*/
|
|
86
|
+
isHttpLine(line: string): boolean {
|
|
87
|
+
return this.HTTP_PATTERN.test(line);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Extract path parameters from a route path.
|
|
92
|
+
*
|
|
93
|
+
* @param path - Route path (e.g., `/api/users/:id`)
|
|
94
|
+
* @returns Object with parameter names
|
|
95
|
+
*/
|
|
96
|
+
extractPathParams(path: string): Record<string, string> | undefined {
|
|
97
|
+
const matches = path.matchAll(this.PATH_PARAM_PATTERN);
|
|
98
|
+
const params: Record<string, string> = {};
|
|
99
|
+
|
|
100
|
+
for (const match of matches) {
|
|
101
|
+
params[match[1]] = `:${match[1]}`;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return Object.keys(params).length > 0 ? params : undefined;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Format HTTP method with syntax highlighting class.
|
|
109
|
+
*
|
|
110
|
+
* @param _method - HTTP method
|
|
111
|
+
* @returns CSS class for highlighting
|
|
112
|
+
*/
|
|
113
|
+
getMethodClass(_method: THttpMethod): string {
|
|
114
|
+
// All methods get the same pink color
|
|
115
|
+
return 'text-pink-400 font-semibold';
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Format path with syntax highlighting.
|
|
120
|
+
*
|
|
121
|
+
* @param path - Request path
|
|
122
|
+
* @returns CSS class for path highlighting
|
|
123
|
+
*/
|
|
124
|
+
getPathClass(): string {
|
|
125
|
+
return 'text-cyan-400';
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* Highlight an HTTP request line.
|
|
130
|
+
*
|
|
131
|
+
* Returns an array of parts with their associated CSS classes.
|
|
132
|
+
*
|
|
133
|
+
* @param line - HTTP request line
|
|
134
|
+
* @returns Array of {text, className} parts
|
|
135
|
+
*/
|
|
136
|
+
highlightLine(line: string): Array<{ text: string; className?: string }> {
|
|
137
|
+
const parts: Array<{ text: string; className?: string }> = [];
|
|
138
|
+
|
|
139
|
+
const match = line.match(this.HTTP_PATTERN);
|
|
140
|
+
if (!match) {
|
|
141
|
+
return [{ text: line }];
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
const [fullMatch, method, path, hasBrace] = match;
|
|
145
|
+
const beforeMethod = line.indexOf(fullMatch);
|
|
146
|
+
|
|
147
|
+
// Text before the HTTP request (timestamp, level, etc)
|
|
148
|
+
if (beforeMethod > 0) {
|
|
149
|
+
parts.push({ text: line.slice(0, beforeMethod) });
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// HTTP method
|
|
153
|
+
parts.push({
|
|
154
|
+
text: method.toUpperCase(),
|
|
155
|
+
className: this.getMethodClass(method as THttpMethod),
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
// Space after method
|
|
159
|
+
parts.push({ text: ' ' });
|
|
160
|
+
|
|
161
|
+
// Path - highlight segments
|
|
162
|
+
const pathParts = this.highlightPath(path.trim());
|
|
163
|
+
parts.push(...pathParts);
|
|
164
|
+
|
|
165
|
+
// Opening brace if present
|
|
166
|
+
if (hasBrace) {
|
|
167
|
+
parts.push({
|
|
168
|
+
text: ' {',
|
|
169
|
+
className: 'text-yellow-500',
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
return parts;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Highlight path segments (routes and parameters).
|
|
178
|
+
*
|
|
179
|
+
* @param path - Path string
|
|
180
|
+
* @returns Highlighted parts
|
|
181
|
+
* @private
|
|
182
|
+
*/
|
|
183
|
+
private highlightPath(path: string): Array<{ text: string; className?: string }> {
|
|
184
|
+
const parts: Array<{ text: string; className?: string }> = [];
|
|
185
|
+
let remaining = path;
|
|
186
|
+
|
|
187
|
+
while (remaining.length > 0) {
|
|
188
|
+
// Find next path parameter
|
|
189
|
+
const paramMatch = remaining.match(/^\/?:([a-zA-Z_][a-zA-Z0-9_]*)/);
|
|
190
|
+
|
|
191
|
+
if (paramMatch) {
|
|
192
|
+
// Text before parameter (path segments)
|
|
193
|
+
const beforeParam = remaining.slice(0, paramMatch.index);
|
|
194
|
+
if (beforeParam.length > 0) {
|
|
195
|
+
parts.push({ text: beforeParam, className: this.getPathClass() });
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
// Parameter
|
|
199
|
+
parts.push({
|
|
200
|
+
text: paramMatch[0],
|
|
201
|
+
className: 'text-purple-400 bg-purple-500/10 px-0.5 rounded',
|
|
202
|
+
});
|
|
203
|
+
|
|
204
|
+
remaining = remaining.slice(paramMatch[0].length);
|
|
205
|
+
} else {
|
|
206
|
+
// No more parameters, add remaining text
|
|
207
|
+
parts.push({ text: remaining, className: this.getPathClass() });
|
|
208
|
+
break;
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
return parts;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Parse a multiline HTTP request block.
|
|
217
|
+
*
|
|
218
|
+
* Combines the initial request line with continuation lines
|
|
219
|
+
* that form JSON or structured data.
|
|
220
|
+
*
|
|
221
|
+
* @param lines - Array of log lines
|
|
222
|
+
* @returns Parsed entry with HTTP data
|
|
223
|
+
*/
|
|
224
|
+
parseHttpBlock(lines: string[]): IParsedLogEntry | null {
|
|
225
|
+
if (lines.length === 0) return null;
|
|
226
|
+
|
|
227
|
+
const firstLine = lines[0];
|
|
228
|
+
const httpData = this.parseLine(firstLine);
|
|
229
|
+
|
|
230
|
+
if (!httpData) return null;
|
|
231
|
+
|
|
232
|
+
// Combine all lines into the raw text
|
|
233
|
+
const raw = lines.join('\n');
|
|
234
|
+
|
|
235
|
+
return {
|
|
236
|
+
raw,
|
|
237
|
+
formatted: raw,
|
|
238
|
+
level: 'info',
|
|
239
|
+
line_number: 0, // Set by caller
|
|
240
|
+
is_stderr: false,
|
|
241
|
+
message: firstLine,
|
|
242
|
+
content_type: 'http',
|
|
243
|
+
http_method: httpData.method,
|
|
244
|
+
http_path: httpData.path,
|
|
245
|
+
is_continuation: false,
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
}
|
|
@@ -0,0 +1,283 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Log parser types for terminal log processing.
|
|
3
|
+
*
|
|
4
|
+
* Provides interfaces and types for parsing raw log strings into
|
|
5
|
+
* structured, formatted output with ANSI colorization, log level detection,
|
|
6
|
+
* timestamp extraction, and structured data handling.
|
|
7
|
+
*
|
|
8
|
+
* @module components/devenv/terminal/parsing/types
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Log level enumeration matching common logging frameworks.
|
|
13
|
+
*
|
|
14
|
+
* Ordered from least to most severe for filtering operations.
|
|
15
|
+
* Maps to Synthwave design system colors:
|
|
16
|
+
* - trace: gray (hsl(240, 10%, 50%))
|
|
17
|
+
* - debug: cyan (hsl(190, 100%, 50%))
|
|
18
|
+
* - info: blue (hsl(210, 100%, 60%))
|
|
19
|
+
* - warn: yellow (hsl(45, 100%, 50%))
|
|
20
|
+
* - error: red (hsl(350, 100%, 63%))
|
|
21
|
+
* - fatal: magenta (hsl(330, 85%, 43%))
|
|
22
|
+
*/
|
|
23
|
+
export type TLogLevel =
|
|
24
|
+
| 'trace'
|
|
25
|
+
| 'debug'
|
|
26
|
+
| 'info'
|
|
27
|
+
| 'warn'
|
|
28
|
+
| 'error'
|
|
29
|
+
| 'fatal'
|
|
30
|
+
| 'unknown';
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Content type for specialized syntax highlighting.
|
|
34
|
+
*/
|
|
35
|
+
export type TContentType = 'plain' | 'http' | 'json' | 'table' | 'error';
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Filter type for log level filtering.
|
|
39
|
+
*
|
|
40
|
+
* Extends TLogLevel to include 'all' for showing all logs.
|
|
41
|
+
*/
|
|
42
|
+
export type TLogLevelFilter = TLogLevel | 'all';
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Parsed log entry representing a single line from a log stream.
|
|
46
|
+
*
|
|
47
|
+
* Contains the original raw text along with parsed metadata including
|
|
48
|
+
* formatted text with ANSI codes, detected log level, timestamp, and
|
|
49
|
+
* any structured data extracted from JSON logs.
|
|
50
|
+
*/
|
|
51
|
+
export interface IParsedLogEntry {
|
|
52
|
+
/** Original raw text from log stream */
|
|
53
|
+
raw: string;
|
|
54
|
+
|
|
55
|
+
/** Parsed and formatted text with ANSI escape codes for xterm.js */
|
|
56
|
+
formatted: string;
|
|
57
|
+
|
|
58
|
+
/** Detected log level based on pattern matching */
|
|
59
|
+
level: TLogLevel;
|
|
60
|
+
|
|
61
|
+
/** ISO 8601 timestamp if present in the log line */
|
|
62
|
+
timestamp?: string;
|
|
63
|
+
|
|
64
|
+
/** Display-formatted timestamp (time, date, or relative) */
|
|
65
|
+
timestamp_display?: string;
|
|
66
|
+
|
|
67
|
+
/** Line number in the stream (1-indexed) */
|
|
68
|
+
line_number: number;
|
|
69
|
+
|
|
70
|
+
/** Whether this line is from stderr (vs stdout) */
|
|
71
|
+
is_stderr: boolean;
|
|
72
|
+
|
|
73
|
+
/** Structured data if log line contains valid JSON */
|
|
74
|
+
structured?: Record<string, unknown>;
|
|
75
|
+
|
|
76
|
+
/** Detected components/tags (e.g., ⦗COMPONENT⦘ ⦗LOGSROUTES⦘) */
|
|
77
|
+
tags?: string[];
|
|
78
|
+
|
|
79
|
+
/** Message content after removing metadata */
|
|
80
|
+
message?: string;
|
|
81
|
+
|
|
82
|
+
/** Whether this line is a continuation of a multiline JSON/structured entry */
|
|
83
|
+
is_continuation?: boolean;
|
|
84
|
+
|
|
85
|
+
/** Line number of parent entry if this is a continuation line */
|
|
86
|
+
parent_line_number?: number;
|
|
87
|
+
|
|
88
|
+
/** Content type for specialized syntax highlighting */
|
|
89
|
+
content_type?: TContentType;
|
|
90
|
+
|
|
91
|
+
/** HTTP method if this is an HTTP request line */
|
|
92
|
+
http_method?: string;
|
|
93
|
+
|
|
94
|
+
/** HTTP path if this is an HTTP request line */
|
|
95
|
+
http_path?: string;
|
|
96
|
+
|
|
97
|
+
/** Table data if this is part of a table */
|
|
98
|
+
table_data?: unknown;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Parser state for incremental parsing of streaming logs.
|
|
103
|
+
*
|
|
104
|
+
* Maintains buffer and context between chunks for proper
|
|
105
|
+
* multiline log aggregation.
|
|
106
|
+
*/
|
|
107
|
+
export interface IParserState {
|
|
108
|
+
/** Incomplete multiline log buffer */
|
|
109
|
+
buffer: string;
|
|
110
|
+
|
|
111
|
+
/** Current line number (continues across chunks) */
|
|
112
|
+
line_number: number;
|
|
113
|
+
|
|
114
|
+
/** Last detected level (for multiline continuation) */
|
|
115
|
+
last_level: TLogLevel;
|
|
116
|
+
|
|
117
|
+
/** Last detected timestamp (for multiline continuation) */
|
|
118
|
+
last_timestamp?: string;
|
|
119
|
+
|
|
120
|
+
/** Multiline aggregation state (persists across chunks) */
|
|
121
|
+
multiline_state?: {
|
|
122
|
+
/** Whether currently in multiline mode */
|
|
123
|
+
isMultiline: boolean;
|
|
124
|
+
/** Parent entry for continuation lines */
|
|
125
|
+
parentEntry?: {
|
|
126
|
+
line_number: number;
|
|
127
|
+
level: TLogLevel;
|
|
128
|
+
};
|
|
129
|
+
/** Current depth of nested braces/brackets */
|
|
130
|
+
depth: number;
|
|
131
|
+
/** Expected closing character */
|
|
132
|
+
expectedClose?: '}' | ']';
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* ANSI style information extracted from escape codes.
|
|
138
|
+
*
|
|
139
|
+
* Represents parsed ANSI SGR (Select Graphic Rendition) sequences
|
|
140
|
+
* for color and text styling.
|
|
141
|
+
*/
|
|
142
|
+
export interface IAnsiStyle {
|
|
143
|
+
/** Foreground color code (30-37, 90-97) or undefined */
|
|
144
|
+
fg_color?: number;
|
|
145
|
+
|
|
146
|
+
/** Background color code (40-47, 100-107) or undefined */
|
|
147
|
+
bg_color?: number;
|
|
148
|
+
|
|
149
|
+
/** Text modifiers: bold, dim, italic, underline, blink, inverse, hidden */
|
|
150
|
+
modifiers: string[];
|
|
151
|
+
|
|
152
|
+
/** Index in the styles array (for tracking order) */
|
|
153
|
+
index?: number;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* ANSI parse result with converted text and extracted styles.
|
|
158
|
+
*
|
|
159
|
+
* Result of parsing ANSI escape codes from a text string.
|
|
160
|
+
*/
|
|
161
|
+
export interface IAnsiParseResult {
|
|
162
|
+
/** Text with ANSI codes converted to xterm.js format */
|
|
163
|
+
text: string;
|
|
164
|
+
|
|
165
|
+
/** Detected styles (for potential CSS mapping) */
|
|
166
|
+
styles: IAnsiStyle[];
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Log level detection result with confidence scoring.
|
|
171
|
+
*
|
|
172
|
+
* Provides the detected level along with metadata about
|
|
173
|
+
* the match for filtering and display purposes.
|
|
174
|
+
*/
|
|
175
|
+
export interface ILogLevelDetection {
|
|
176
|
+
/** Detected log level */
|
|
177
|
+
level: TLogLevel;
|
|
178
|
+
|
|
179
|
+
/** Confidence score (0-1, higher = more certain) */
|
|
180
|
+
confidence: number;
|
|
181
|
+
|
|
182
|
+
/** Matched string that triggered the detection */
|
|
183
|
+
matched: string;
|
|
184
|
+
|
|
185
|
+
/** Position of match in the string (0-indexed) */
|
|
186
|
+
position: number;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Log parser options for customization.
|
|
191
|
+
*
|
|
192
|
+
* Configuration options for the LogParserService to customize
|
|
193
|
+
* parsing behavior for different log formats.
|
|
194
|
+
*/
|
|
195
|
+
export interface ILogParserOptions {
|
|
196
|
+
/** Enable ANSI escape code parsing (default: true) */
|
|
197
|
+
enable_ansi?: boolean;
|
|
198
|
+
|
|
199
|
+
/** Timestamp format for display (default: 'time') */
|
|
200
|
+
timestamp_format?: 'full' | 'time' | 'relative' | 'none';
|
|
201
|
+
|
|
202
|
+
/** Custom log level pattern overrides */
|
|
203
|
+
level_patterns?: Partial<Record<TLogLevel, RegExp>>;
|
|
204
|
+
|
|
205
|
+
/** Whether to detect and parse JSON structured logs (default: true) */
|
|
206
|
+
enable_structured?: boolean;
|
|
207
|
+
|
|
208
|
+
/** Whether to extract tags from log lines (default: true) */
|
|
209
|
+
enable_tags?: boolean;
|
|
210
|
+
|
|
211
|
+
/** Maximum line length before truncation (default: 10000) */
|
|
212
|
+
max_line_length?: number;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/**
|
|
216
|
+
* Log filter options for filtering parsed entries.
|
|
217
|
+
*
|
|
218
|
+
* Options for filtering log entries by level, time range, or content.
|
|
219
|
+
*/
|
|
220
|
+
export interface ILogFilterOptions {
|
|
221
|
+
/** Minimum log level to include (trace is most permissive) */
|
|
222
|
+
min_level?: TLogLevel;
|
|
223
|
+
|
|
224
|
+
/** Only include logs after this timestamp (ISO string) */
|
|
225
|
+
after?: string;
|
|
226
|
+
|
|
227
|
+
/** Only include logs before this timestamp (ISO string) */
|
|
228
|
+
before?: string;
|
|
229
|
+
|
|
230
|
+
/** Only include logs matching this regex pattern */
|
|
231
|
+
pattern?: RegExp;
|
|
232
|
+
|
|
233
|
+
/** Only include logs from stderr (if true) or stdout (if false) */
|
|
234
|
+
stderr_only?: boolean;
|
|
235
|
+
|
|
236
|
+
/** Only include logs containing specific tags */
|
|
237
|
+
tags?: string[];
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* Timestamp format options for display.
|
|
242
|
+
*/
|
|
243
|
+
export type TTimestampFormat = 'full' | 'time' | 'relative' | 'none';
|
|
244
|
+
|
|
245
|
+
/**
|
|
246
|
+
* Log statistics for a collection of entries.
|
|
247
|
+
*
|
|
248
|
+
* Aggregate statistics about log entries for display in
|
|
249
|
+
* status bars and footers.
|
|
250
|
+
*/
|
|
251
|
+
export interface ILogStats {
|
|
252
|
+
/** Total number of log entries */
|
|
253
|
+
total: number;
|
|
254
|
+
|
|
255
|
+
/** Count per log level */
|
|
256
|
+
by_level: Partial<Record<TLogLevel, number>>;
|
|
257
|
+
|
|
258
|
+
/** Total bytes (raw text size) */
|
|
259
|
+
bytes: number;
|
|
260
|
+
|
|
261
|
+
/** Earliest timestamp (ISO string) */
|
|
262
|
+
earliest?: string;
|
|
263
|
+
|
|
264
|
+
/** Latest timestamp (ISO string) */
|
|
265
|
+
latest?: string;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Log export options for downloading logs.
|
|
270
|
+
*/
|
|
271
|
+
export interface ILogExportOptions {
|
|
272
|
+
/** Format for export */
|
|
273
|
+
format: 'raw' | 'json' | 'csv';
|
|
274
|
+
|
|
275
|
+
/** Whether to include ANSI codes in raw export */
|
|
276
|
+
include_ansi?: boolean;
|
|
277
|
+
|
|
278
|
+
/** Filter options to apply before export */
|
|
279
|
+
filter?: ILogFilterOptions;
|
|
280
|
+
|
|
281
|
+
/** Filename for download (without extension) */
|
|
282
|
+
filename?: string;
|
|
283
|
+
}
|