@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,313 @@
|
|
|
1
|
+
//#region src/react-ui/blocks/Terminal/parsing/MultilineAggregator.ts
|
|
2
|
+
/**
|
|
3
|
+
* Box-drawing characters used for table borders.
|
|
4
|
+
* Unicode range: U+2500-U+257F
|
|
5
|
+
*/
|
|
6
|
+
const TABLE_CHARS = [
|
|
7
|
+
"─",
|
|
8
|
+
"│",
|
|
9
|
+
"┌",
|
|
10
|
+
"┐",
|
|
11
|
+
"└",
|
|
12
|
+
"┘",
|
|
13
|
+
"├",
|
|
14
|
+
"┤",
|
|
15
|
+
"┬",
|
|
16
|
+
"┴",
|
|
17
|
+
"┼",
|
|
18
|
+
"═",
|
|
19
|
+
"║",
|
|
20
|
+
"╔",
|
|
21
|
+
"╗",
|
|
22
|
+
"╚",
|
|
23
|
+
"╝",
|
|
24
|
+
"╠",
|
|
25
|
+
"╣",
|
|
26
|
+
"╦",
|
|
27
|
+
"╩",
|
|
28
|
+
"╬"
|
|
29
|
+
];
|
|
30
|
+
/**
|
|
31
|
+
* Multiline log aggregator class.
|
|
32
|
+
*
|
|
33
|
+
* Detects and aggregates lines that are part of a multiline JSON
|
|
34
|
+
* or structured data entry. Marks continuation lines so they don't
|
|
35
|
+
* get timestamp/level prefixes.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* const aggregator = new MultilineAggregator();
|
|
40
|
+
* const aggregated = aggregator.aggregate(entries);
|
|
41
|
+
* // Lines like '{', ' filter: {},', '}' get marked as continuation
|
|
42
|
+
* ```
|
|
43
|
+
*/
|
|
44
|
+
var MultilineAggregator = class {
|
|
45
|
+
/**
|
|
46
|
+
* Detect if a line is a continuation of multiline JSON/structured data.
|
|
47
|
+
*
|
|
48
|
+
* Continuation indicators:
|
|
49
|
+
* - Line starts with `{` or `[` alone → opens multiline
|
|
50
|
+
* - Line has indentation + `key: value,` → continuation
|
|
51
|
+
* - Line is just `}` or `]` → closes multiline
|
|
52
|
+
* - Line ends with `{` or `[` without match → opens multiline
|
|
53
|
+
* - When in multiline mode: lines ending with comma or containing key-value patterns
|
|
54
|
+
*
|
|
55
|
+
* @param line - Line to check
|
|
56
|
+
* @param state - Current multiline state
|
|
57
|
+
* @returns true if line is a continuation
|
|
58
|
+
*/
|
|
59
|
+
detectContinuation(line, state) {
|
|
60
|
+
const trimmed = line.trim();
|
|
61
|
+
if (state.isMultiline) {
|
|
62
|
+
if (this.isClosingBrace(trimmed, state.expectedClose)) return true;
|
|
63
|
+
if (this.isOpeningBrace(trimmed)) return true;
|
|
64
|
+
if (this.isContinuationLine(line)) return true;
|
|
65
|
+
if (this.isJsonContinuation(trimmed)) return true;
|
|
66
|
+
return false;
|
|
67
|
+
}
|
|
68
|
+
return this.opensMultiline(trimmed);
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Aggregate entries, marking continuation lines.
|
|
72
|
+
*
|
|
73
|
+
* Processes entries and marks lines that are continuations
|
|
74
|
+
* of a previous multiline entry. Handles:
|
|
75
|
+
* - JSON/structured data blocks
|
|
76
|
+
* - Table borders (box-drawing characters)
|
|
77
|
+
* - Indented continuation lines
|
|
78
|
+
*
|
|
79
|
+
* @param entries - Parsed log entries to aggregate
|
|
80
|
+
* @param initialState - Optional initial multiline state (for persistence across chunks)
|
|
81
|
+
* @returns Entries with continuation marking and new multiline state
|
|
82
|
+
*/
|
|
83
|
+
aggregate(entries, initialState) {
|
|
84
|
+
const result = [];
|
|
85
|
+
const state = initialState ?? {
|
|
86
|
+
buffer: [],
|
|
87
|
+
isMultiline: false,
|
|
88
|
+
depth: 0
|
|
89
|
+
};
|
|
90
|
+
for (const entry of entries) {
|
|
91
|
+
const trimmed = entry.raw.trim();
|
|
92
|
+
if (trimmed.length === 0) {
|
|
93
|
+
if (state.isMultiline) {
|
|
94
|
+
state.isMultiline = false;
|
|
95
|
+
state.buffer = [];
|
|
96
|
+
state.parentEntry = void 0;
|
|
97
|
+
state.depth = 0;
|
|
98
|
+
state.expectedClose = void 0;
|
|
99
|
+
}
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
if (!state.isMultiline && this.opensMultiline(trimmed)) {
|
|
103
|
+
state.isMultiline = true;
|
|
104
|
+
state.parentEntry = entry;
|
|
105
|
+
state.depth = this.countOpeningBraces(trimmed);
|
|
106
|
+
state.expectedClose = this.getExpectedClose(trimmed);
|
|
107
|
+
entry.is_continuation = false;
|
|
108
|
+
result.push(entry);
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
if (state.isMultiline) {
|
|
112
|
+
if (this.isClosingBrace(trimmed, state.expectedClose)) {
|
|
113
|
+
state.depth--;
|
|
114
|
+
if (state.depth <= 0) {
|
|
115
|
+
entry.is_continuation = true;
|
|
116
|
+
entry.parent_line_number = state.parentEntry?.line_number;
|
|
117
|
+
result.push(entry);
|
|
118
|
+
state.isMultiline = false;
|
|
119
|
+
state.buffer = [];
|
|
120
|
+
state.parentEntry = void 0;
|
|
121
|
+
state.depth = 0;
|
|
122
|
+
state.expectedClose = void 0;
|
|
123
|
+
continue;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
if (this.isOpeningBrace(trimmed)) state.depth += this.countOpeningBraces(trimmed);
|
|
127
|
+
if (this.isJsonContinuation(trimmed)) {
|
|
128
|
+
entry.is_continuation = true;
|
|
129
|
+
entry.parent_line_number = state.parentEntry?.line_number;
|
|
130
|
+
result.push(entry);
|
|
131
|
+
continue;
|
|
132
|
+
}
|
|
133
|
+
if (this.looksLikeNewEntry(trimmed)) {
|
|
134
|
+
state.isMultiline = false;
|
|
135
|
+
state.parentEntry = void 0;
|
|
136
|
+
state.depth = 0;
|
|
137
|
+
state.expectedClose = void 0;
|
|
138
|
+
if (this.opensMultiline(trimmed)) {
|
|
139
|
+
state.isMultiline = true;
|
|
140
|
+
state.parentEntry = entry;
|
|
141
|
+
state.depth = this.countOpeningBraces(trimmed);
|
|
142
|
+
state.expectedClose = this.getExpectedClose(trimmed);
|
|
143
|
+
}
|
|
144
|
+
entry.is_continuation = false;
|
|
145
|
+
result.push(entry);
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
entry.is_continuation = true;
|
|
149
|
+
entry.parent_line_number = state.parentEntry?.line_number;
|
|
150
|
+
result.push(entry);
|
|
151
|
+
continue;
|
|
152
|
+
}
|
|
153
|
+
entry.is_continuation = false;
|
|
154
|
+
result.push(entry);
|
|
155
|
+
}
|
|
156
|
+
return {
|
|
157
|
+
entries: result,
|
|
158
|
+
state
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Check if a line opens a multiline block.
|
|
163
|
+
*
|
|
164
|
+
* @param trimmed - Trimmed line to check
|
|
165
|
+
* @returns true if line opens multiline
|
|
166
|
+
* @private
|
|
167
|
+
*/
|
|
168
|
+
opensMultiline(trimmed) {
|
|
169
|
+
if (trimmed === "{" || trimmed === "[") return true;
|
|
170
|
+
const openCount = (trimmed.match(/\{/g) ?? []).length;
|
|
171
|
+
const closeCount = (trimmed.match(/\}/g) ?? []).length;
|
|
172
|
+
const bracketOpen = (trimmed.match(/\[/g) ?? []).length;
|
|
173
|
+
const bracketClose = (trimmed.match(/\]/g) ?? []).length;
|
|
174
|
+
if (openCount > closeCount || bracketOpen > bracketClose) return true;
|
|
175
|
+
if (trimmed.endsWith("{") || trimmed.endsWith("[")) return true;
|
|
176
|
+
return false;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Check if a line is an opening brace/bracket.
|
|
180
|
+
*
|
|
181
|
+
* @param trimmed - Trimmed line to check
|
|
182
|
+
* @returns true if line contains opening brace/bracket
|
|
183
|
+
* @private
|
|
184
|
+
*/
|
|
185
|
+
isOpeningBrace(trimmed) {
|
|
186
|
+
return trimmed.includes("{") || trimmed.includes("[");
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Check if a line is a closing brace/bracket for expected type.
|
|
190
|
+
*
|
|
191
|
+
* @param trimmed - Trimmed line to check
|
|
192
|
+
* @param expected - Expected close type
|
|
193
|
+
* @returns true if line closes the multiline block
|
|
194
|
+
* @private
|
|
195
|
+
*/
|
|
196
|
+
isClosingBrace(trimmed, expected) {
|
|
197
|
+
if (!expected) return false;
|
|
198
|
+
if (expected === "}" && trimmed === "}") return true;
|
|
199
|
+
if (expected === "]" && trimmed === "]") return true;
|
|
200
|
+
return false;
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Get the expected closing character for a line.
|
|
204
|
+
*
|
|
205
|
+
* @param trimmed - Trimmed line to check
|
|
206
|
+
* @returns Expected closing character or undefined
|
|
207
|
+
* @private
|
|
208
|
+
*/
|
|
209
|
+
getExpectedClose(trimmed) {
|
|
210
|
+
if (trimmed.includes("{")) return "}";
|
|
211
|
+
if (trimmed.includes("[")) return "]";
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Count opening braces/brackets in a line.
|
|
215
|
+
*
|
|
216
|
+
* @param trimmed - Trimmed line to check
|
|
217
|
+
* @returns Count of opening braces/brackets
|
|
218
|
+
* @private
|
|
219
|
+
*/
|
|
220
|
+
countOpeningBraces(trimmed) {
|
|
221
|
+
return (trimmed.match(/\{/g) ?? []).length + (trimmed.match(/\[/g) ?? []).length;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Check if a line is a table line (contains box-drawing characters).
|
|
225
|
+
*
|
|
226
|
+
* @param trimmed - Trimmed line to check
|
|
227
|
+
* @returns true if line contains table borders
|
|
228
|
+
* @private
|
|
229
|
+
*/
|
|
230
|
+
isTableLine(trimmed) {
|
|
231
|
+
let count = 0;
|
|
232
|
+
for (const char of TABLE_CHARS) {
|
|
233
|
+
if (trimmed.includes(char)) count++;
|
|
234
|
+
if (count >= 2) return true;
|
|
235
|
+
}
|
|
236
|
+
return count >= 2;
|
|
237
|
+
}
|
|
238
|
+
/**
|
|
239
|
+
* Check if a line looks like a new log entry (not a continuation).
|
|
240
|
+
*
|
|
241
|
+
* New entries typically start with:
|
|
242
|
+
* - Timestamp followed by log level
|
|
243
|
+
* - HTTP method followed by path
|
|
244
|
+
* - Component/module tag
|
|
245
|
+
*
|
|
246
|
+
* @param trimmed - Trimmed line to check
|
|
247
|
+
* @returns true if line looks like a new entry
|
|
248
|
+
* @private
|
|
249
|
+
*/
|
|
250
|
+
looksLikeNewEntry(trimmed) {
|
|
251
|
+
if (/^\d{1,2}:\d{2}:\d{2}(\.\d+)?\s+(TRACE|DEBUG|INFO|WARN|ERROR|FATAL)/i.test(trimmed)) return true;
|
|
252
|
+
if (/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/.test(trimmed)) return true;
|
|
253
|
+
if (/^(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS|CONNECT|TRACE)\s+/i.test(trimmed)) return true;
|
|
254
|
+
if (trimmed.startsWith("⦗") && trimmed.includes("⦘")) return true;
|
|
255
|
+
return false;
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Check if a trimmed line is a JSON/structured data continuation.
|
|
259
|
+
*
|
|
260
|
+
* This handles lines that have their own timestamp/level metadata
|
|
261
|
+
* but are actually continuations of a multiline JSON block.
|
|
262
|
+
*
|
|
263
|
+
* Examples:
|
|
264
|
+
* - `container: "name",` - ends with comma
|
|
265
|
+
* - `tail: 100,` - ends with comma
|
|
266
|
+
* - `key: "value"` - key-value pattern
|
|
267
|
+
* - `}` - closing brace
|
|
268
|
+
* - Lines with pipe characters (table rows)
|
|
269
|
+
*
|
|
270
|
+
* @param trimmed - Trimmed line to check
|
|
271
|
+
* @returns true if line is a JSON continuation
|
|
272
|
+
* @private
|
|
273
|
+
*/
|
|
274
|
+
isJsonContinuation(trimmed) {
|
|
275
|
+
if (trimmed === "}" || trimmed === "]") return true;
|
|
276
|
+
if (trimmed.endsWith(",")) return true;
|
|
277
|
+
if (trimmed.endsWith("{") || trimmed.endsWith("[")) return true;
|
|
278
|
+
if (trimmed.includes("│") && !this.isTableLine(trimmed)) return true;
|
|
279
|
+
let content = trimmed.replace(/^\d{1,2}:\d{2}:\d{2}(\.\d+)?\s+(TRACE|DEBUG|INFO|WARN|ERROR|FATAL)\s*/i, "").replace(/^\[(TRACE|DEBUG|INFO|WARN|ERROR|FATAL)\]\s*/i, "").replace(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.*?\s+/, "").trim();
|
|
280
|
+
if ([
|
|
281
|
+
/^[\w"']+\s*:\s*[\w"'\{[]/,
|
|
282
|
+
/^[\w"']+\s*:\s*".*",?\s*$/,
|
|
283
|
+
/^[\w"']+\s*:\s*\d+/,
|
|
284
|
+
/^[\w"']+\s*:\s*true|false/
|
|
285
|
+
].some((pattern) => pattern.test(content))) return true;
|
|
286
|
+
return false;
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* Check if a line looks like a continuation line (indented content).
|
|
290
|
+
*
|
|
291
|
+
* @param line - Line to check (not trimmed, to check indentation)
|
|
292
|
+
* @returns true if line appears to be a continuation
|
|
293
|
+
* @private
|
|
294
|
+
*/
|
|
295
|
+
isContinuationLine(line) {
|
|
296
|
+
return line.length > 0 && (line[0] === " " || line[0] === " ");
|
|
297
|
+
}
|
|
298
|
+
/**
|
|
299
|
+
* Create initial multiline state.
|
|
300
|
+
*
|
|
301
|
+
* @returns Fresh multiline state
|
|
302
|
+
*/
|
|
303
|
+
createInitialState() {
|
|
304
|
+
return {
|
|
305
|
+
buffer: [],
|
|
306
|
+
isMultiline: false,
|
|
307
|
+
depth: 0
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
//#endregion
|
|
313
|
+
export { MultilineAggregator };
|
|
@@ -0,0 +1,181 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Persistent circular buffer for log entries with periodic cleanup.
|
|
3
|
+
*
|
|
4
|
+
* Maintains a large history of logs without memory leaks by using
|
|
5
|
+
* a circular buffer with periodic cleanup. Supports pagination,
|
|
6
|
+
* search, and efficient querying.
|
|
7
|
+
*
|
|
8
|
+
* @module components/devenv/terminal/parsing/PersistentLogBuffer
|
|
9
|
+
*/
|
|
10
|
+
import type { IParsedLogEntry } from './LogParser.types';
|
|
11
|
+
/**
|
|
12
|
+
* Configuration for the persistent log buffer.
|
|
13
|
+
*/
|
|
14
|
+
export interface IPersistentLogBufferConfig {
|
|
15
|
+
/** Maximum number of entries to store (default: 50,000) */
|
|
16
|
+
maxSize: number;
|
|
17
|
+
/** Soft limit that triggers cleanup (default: 40,000) */
|
|
18
|
+
softLimit: number;
|
|
19
|
+
/** Number of entries to remove per cleanup batch (default: 5,000) */
|
|
20
|
+
cleanupBatch: number;
|
|
21
|
+
/** Cleanup interval in milliseconds (default: 30,000 ms = 30s) */
|
|
22
|
+
cleanupInterval: number;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Buffer statistics for monitoring.
|
|
26
|
+
*/
|
|
27
|
+
export interface IBufferStats {
|
|
28
|
+
/** Current number of entries */
|
|
29
|
+
size: number;
|
|
30
|
+
/** Maximum configured size */
|
|
31
|
+
maxSize: number;
|
|
32
|
+
/** Usage ratio (0-1) */
|
|
33
|
+
usage: number;
|
|
34
|
+
/** First line number in buffer */
|
|
35
|
+
firstLine: number | undefined;
|
|
36
|
+
/** Last line number in buffer */
|
|
37
|
+
lastLine: number | undefined;
|
|
38
|
+
/** Memory usage estimate (bytes) */
|
|
39
|
+
memoryUsage: number;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Search options for querying the buffer.
|
|
43
|
+
*/
|
|
44
|
+
export interface ISearchOptions {
|
|
45
|
+
/** Start from line number */
|
|
46
|
+
fromLine?: number;
|
|
47
|
+
/** Maximum results to return */
|
|
48
|
+
limit?: number;
|
|
49
|
+
/** Case insensitive search */
|
|
50
|
+
caseInsensitive?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Persistent circular buffer for log entries.
|
|
54
|
+
*
|
|
55
|
+
* Features:
|
|
56
|
+
* - Circular buffer with automatic cleanup
|
|
57
|
+
* - Pagination support for large datasets
|
|
58
|
+
* - Search by pattern
|
|
59
|
+
* - Memory-efficient storage
|
|
60
|
+
* - Periodic cleanup to prevent memory leaks
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```ts
|
|
64
|
+
* const buffer = new PersistentLogBuffer({ maxSize: 50000 });
|
|
65
|
+
* buffer.append(entries);
|
|
66
|
+
* const page1 = buffer.getEntries({ offset: 0, limit: 100 });
|
|
67
|
+
* const results = buffer.search(/error/i);
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
export declare class PersistentLogBuffer {
|
|
71
|
+
/** Internal storage for entries */
|
|
72
|
+
private buffer;
|
|
73
|
+
/** Buffer configuration */
|
|
74
|
+
private config;
|
|
75
|
+
/** Cleanup timer reference */
|
|
76
|
+
private cleanupTimer?;
|
|
77
|
+
/** Cleanup scheduled flag */
|
|
78
|
+
private cleanupScheduled;
|
|
79
|
+
/**
|
|
80
|
+
* Create a new persistent log buffer.
|
|
81
|
+
*
|
|
82
|
+
* @param config - Buffer configuration
|
|
83
|
+
*/
|
|
84
|
+
constructor(config?: Partial<IPersistentLogBufferConfig>);
|
|
85
|
+
/**
|
|
86
|
+
* Append entries to the buffer.
|
|
87
|
+
*
|
|
88
|
+
* If the buffer exceeds the soft limit, schedules a cleanup.
|
|
89
|
+
*
|
|
90
|
+
* @param entries - Entries to append
|
|
91
|
+
*/
|
|
92
|
+
append(entries: IParsedLogEntry[]): void;
|
|
93
|
+
/**
|
|
94
|
+
* Prepend entries to the buffer (for loading historical logs).
|
|
95
|
+
*
|
|
96
|
+
* @param entries - Entries to prepend
|
|
97
|
+
*/
|
|
98
|
+
prepend(entries: IParsedLogEntry[]): void;
|
|
99
|
+
/**
|
|
100
|
+
* Get entries from the buffer with pagination.
|
|
101
|
+
*
|
|
102
|
+
* @param options - Query options
|
|
103
|
+
* @returns Array of entries
|
|
104
|
+
*/
|
|
105
|
+
getEntries(options?: {
|
|
106
|
+
offset?: number;
|
|
107
|
+
limit?: number;
|
|
108
|
+
fromLine?: number;
|
|
109
|
+
toLine?: number;
|
|
110
|
+
}): IParsedLogEntry[];
|
|
111
|
+
/**
|
|
112
|
+
* Get all entries in the buffer.
|
|
113
|
+
*
|
|
114
|
+
* @returns All entries
|
|
115
|
+
*/
|
|
116
|
+
getAllEntries(): IParsedLogEntry[];
|
|
117
|
+
/**
|
|
118
|
+
* Get the total number of entries.
|
|
119
|
+
*
|
|
120
|
+
* @returns Entry count
|
|
121
|
+
*/
|
|
122
|
+
getSize(): number;
|
|
123
|
+
/**
|
|
124
|
+
* Search entries by pattern.
|
|
125
|
+
*
|
|
126
|
+
* @param pattern - RegExp pattern or string to search
|
|
127
|
+
* @param options - Search options
|
|
128
|
+
* @returns Matching entries
|
|
129
|
+
*/
|
|
130
|
+
search(pattern: RegExp | string, options?: ISearchOptions): IParsedLogEntry[];
|
|
131
|
+
/**
|
|
132
|
+
* Find entries by line number.
|
|
133
|
+
*
|
|
134
|
+
* @param lineNumbers - Array of line numbers to find
|
|
135
|
+
* @returns Matching entries
|
|
136
|
+
*/
|
|
137
|
+
findByLineNumbers(lineNumbers: number[]): IParsedLogEntry[];
|
|
138
|
+
/**
|
|
139
|
+
* Get entries filtered by log level.
|
|
140
|
+
*
|
|
141
|
+
* @param level - Log level to filter by
|
|
142
|
+
* @returns Filtered entries
|
|
143
|
+
*/
|
|
144
|
+
getByLevel(level: string): IParsedLogEntry[];
|
|
145
|
+
/**
|
|
146
|
+
* Clear all entries from the buffer.
|
|
147
|
+
*/
|
|
148
|
+
clear(): void;
|
|
149
|
+
/**
|
|
150
|
+
* Get buffer statistics.
|
|
151
|
+
*
|
|
152
|
+
* @returns Buffer statistics
|
|
153
|
+
*/
|
|
154
|
+
getStats(): IBufferStats;
|
|
155
|
+
/**
|
|
156
|
+
* Schedule a cleanup operation.
|
|
157
|
+
*/
|
|
158
|
+
private scheduleCleanup;
|
|
159
|
+
/**
|
|
160
|
+
* Perform cleanup of old entries.
|
|
161
|
+
*
|
|
162
|
+
* Removes the oldest entries to keep the buffer within limits.
|
|
163
|
+
*/
|
|
164
|
+
private cleanup;
|
|
165
|
+
/**
|
|
166
|
+
* Start the periodic cleanup timer.
|
|
167
|
+
*/
|
|
168
|
+
private startCleanupTimer;
|
|
169
|
+
/**
|
|
170
|
+
* Stop the cleanup timer and clear resources.
|
|
171
|
+
*/
|
|
172
|
+
destroy(): void;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Create a new persistent log buffer with default configuration.
|
|
176
|
+
*
|
|
177
|
+
* @param config - Optional configuration overrides
|
|
178
|
+
* @returns New buffer instance
|
|
179
|
+
*/
|
|
180
|
+
export declare function createPersistentLogBuffer(config?: Partial<IPersistentLogBufferConfig>): PersistentLogBuffer;
|
|
181
|
+
//# sourceMappingURL=PersistentLogBuffer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PersistentLogBuffer.d.ts","sourceRoot":"","sources":["../../../../../src/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,2DAA2D;IAC3D,OAAO,EAAE,MAAM,CAAC;IAEhB,yDAAyD;IACzD,SAAS,EAAE,MAAM,CAAC;IAElB,qEAAqE;IACrE,YAAY,EAAE,MAAM,CAAC;IAErB,kEAAkE;IAClE,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IAEb,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAEhB,wBAAwB;IACxB,KAAK,EAAE,MAAM,CAAC;IAEd,kCAAkC;IAClC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAE9B,iCAAiC;IACjC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAE7B,oCAAoC;IACpC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,gCAAgC;IAChC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,8BAA8B;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,mBAAmB;IAC9B,mCAAmC;IACnC,OAAO,CAAC,MAAM,CAAyB;IAEvC,2BAA2B;IAC3B,OAAO,CAAC,MAAM,CAA6B;IAE3C,8BAA8B;IAC9B,OAAO,CAAC,YAAY,CAAC,CAAgC;IAErD,6BAA6B;IAC7B,OAAO,CAAC,gBAAgB,CAAS;IAEjC;;;;OAIG;gBACS,MAAM,GAAE,OAAO,CAAC,0BAA0B,CAAM;IAW5D;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI;IAUxC;;;;OAIG;IACH,OAAO,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI;IAWzC;;;;;OAKG;IACH,UAAU,CAAC,OAAO,GAAE;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,MAAM,CAAC,EAAE,MAAM,CAAC;KACZ,GAAG,eAAe,EAAE;IAuB1B;;;;OAIG;IACH,aAAa,IAAI,eAAe,EAAE;IAIlC;;;;OAIG;IACH,OAAO,IAAI,MAAM;IAIjB;;;;;;OAMG;IACH,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,OAAO,GAAE,cAAmB,GAAG,eAAe,EAAE;IAsBjF;;;;;OAKG;IACH,iBAAiB,CAAC,WAAW,EAAE,MAAM,EAAE,GAAG,eAAe,EAAE;IAK3D;;;;;OAKG;IACH,UAAU,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,EAAE;IAI5C;;OAEG;IACH,KAAK,IAAI,IAAI;IAKb;;;;OAIG;IACH,QAAQ,IAAI,YAAY;IAoBxB;;OAEG;IACH,OAAO,CAAC,eAAe;IAQvB;;;;OAIG;IACH,OAAO,CAAC,OAAO;IAgBf;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAMzB;;OAEG;IACH,OAAO,IAAI,IAAI;CAOhB;AAED;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,GAAG,mBAAmB,CAE3G"}
|