@mks2508/mks-ui 0.5.4 → 0.5.8
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/primitives/waapi/Gooey/Gooey.types.d.ts +23 -4
- package/dist/react-ui/primitives/waapi/Gooey/Gooey.types.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/Gooey/GooeyCanvas.d.ts +2 -2
- package/dist/react-ui/primitives/waapi/Gooey/GooeyCanvas.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/Gooey/GooeyCanvas.js +292 -31
- package/dist/react-ui/primitives/waapi/Gooey/gooey-utils.d.ts +7 -0
- package/dist/react-ui/primitives/waapi/Gooey/gooey-utils.d.ts.map +1 -1
- package/dist/react-ui/primitives/waapi/Gooey/gooey-utils.js +6 -1
- package/dist/react-ui/ui/DynamicToggle/{DynamicToggle-Cm6-VceQ.css → DynamicToggle-DJLwEkHr.css} +116 -51
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.css +116 -51
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.styles.d.ts +1 -0
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.styles.d.ts.map +1 -1
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.styles.js +9 -3
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.types.d.ts +61 -31
- package/dist/react-ui/ui/DynamicToggle/DynamicToggle.types.d.ts.map +1 -1
- package/dist/react-ui/ui/DynamicToggle/index.d.ts +9 -3
- package/dist/react-ui/ui/DynamicToggle/index.d.ts.map +1 -1
- package/dist/react-ui/ui/DynamicToggle/index.js +68 -37
- package/package.json +52 -13
- package/src/assets/react.svg +0 -1
- package/src/core/index.ts +0 -7
- package/src/core/types.ts +0 -82
- package/src/css.d.ts +0 -7
- package/src/index.css +0 -129
- package/src/index.ts +0 -29
- package/src/react-ui/blocks/Terminal/ResttyAdapter.ts +0 -278
- package/src/react-ui/blocks/Terminal/Terminal.adapter.ts +0 -97
- package/src/react-ui/blocks/Terminal/Terminal.theme.restty.ts +0 -155
- package/src/react-ui/blocks/Terminal/Terminal.theme.ts +0 -80
- package/src/react-ui/blocks/Terminal/Terminal.types.ts +0 -438
- package/src/react-ui/blocks/Terminal/TerminalDisplay.styles.ts +0 -38
- package/src/react-ui/blocks/Terminal/TerminalDisplay.tsx +0 -254
- package/src/react-ui/blocks/Terminal/TerminalDisplay.types.ts +0 -73
- package/src/react-ui/blocks/Terminal/TerminalPanel.tsx +0 -269
- package/src/react-ui/blocks/Terminal/TerminalRestty.tsx +0 -326
- package/src/react-ui/blocks/Terminal/TerminalXterm.tsx +0 -230
- package/src/react-ui/blocks/Terminal/XTermAdapter.ts +0 -163
- package/src/react-ui/blocks/Terminal/chrome.ts +0 -25
- package/src/react-ui/blocks/Terminal/components/LogLineBadges.tsx +0 -316
- package/src/react-ui/blocks/Terminal/components/SpecializedSyntaxHighlighter.tsx +0 -218
- package/src/react-ui/blocks/Terminal/components/SyntaxHighlight.tsx +0 -386
- package/src/react-ui/blocks/Terminal/components/TerminalLogBadge.tsx +0 -67
- package/src/react-ui/blocks/Terminal/components/index.ts +0 -10
- package/src/react-ui/blocks/Terminal/display.ts +0 -46
- package/src/react-ui/blocks/Terminal/hooks/index.ts +0 -22
- package/src/react-ui/blocks/Terminal/hooks/useTerminalSettings.ts +0 -229
- package/src/react-ui/blocks/Terminal/hooks/useTerminalWebSocket.ts +0 -292
- package/src/react-ui/blocks/Terminal/index.ts +0 -111
- package/src/react-ui/blocks/Terminal/panel/LogLinesViewer.tsx +0 -330
- package/src/react-ui/blocks/Terminal/panel/TerminalDebugPanel.tsx +0 -242
- package/src/react-ui/blocks/Terminal/panel/TerminalFilterDropdown.tsx +0 -202
- package/src/react-ui/blocks/Terminal/panel/TerminalFilterTabs.tsx +0 -140
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.tsx +0 -68
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanel.types.ts +0 -85
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelRestty.tsx +0 -383
- package/src/react-ui/blocks/Terminal/panel/TerminalInteractivePanelXterm.tsx +0 -439
- package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.tsx +0 -550
- package/src/react-ui/blocks/Terminal/panel/TerminalLogsPanel.types.ts +0 -259
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.styles.ts +0 -75
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.tsx +0 -266
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelChrome.types.ts +0 -82
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelFooter.tsx +0 -112
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelHeader.tsx +0 -178
- package/src/react-ui/blocks/Terminal/panel/TerminalPanelToolbar.tsx +0 -203
- package/src/react-ui/blocks/Terminal/panel/TerminalSessionControl.tsx +0 -252
- package/src/react-ui/blocks/Terminal/panel/TerminalSessionTabs.tsx +0 -334
- package/src/react-ui/blocks/Terminal/panel/TerminalSettingsPopover.tsx +0 -261
- package/src/react-ui/blocks/Terminal/panel/TerminalThemeSelector.tsx +0 -248
- package/src/react-ui/blocks/Terminal/panel/index.ts +0 -72
- package/src/react-ui/blocks/Terminal/panel/terminal-filter-dropdown.module.css +0 -59
- package/src/react-ui/blocks/Terminal/panel/terminal-session-tabs.module.css +0 -59
- package/src/react-ui/blocks/Terminal/parsing/BadgeFormatter.ts +0 -180
- package/src/react-ui/blocks/Terminal/parsing/HttpLogParser.ts +0 -248
- package/src/react-ui/blocks/Terminal/parsing/LogParser.types.ts +0 -283
- package/src/react-ui/blocks/Terminal/parsing/LogParserService.ts +0 -686
- package/src/react-ui/blocks/Terminal/parsing/MultilineAggregator.ts +0 -466
- package/src/react-ui/blocks/Terminal/parsing/PersistentLogBuffer.ts +0 -343
- package/src/react-ui/blocks/Terminal/parsing/SyntaxHighlighter.ts +0 -167
- package/src/react-ui/blocks/Terminal/parsing/TableParser.ts +0 -348
- package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiColorMapper.ts +0 -251
- package/src/react-ui/blocks/Terminal/parsing/ansi/AnsiParser.ts +0 -390
- package/src/react-ui/blocks/Terminal/parsing/ansi/ansi.constants.ts +0 -320
- package/src/react-ui/blocks/Terminal/parsing/ansi/index.ts +0 -20
- package/src/react-ui/blocks/Terminal/parsing/index.ts +0 -69
- package/src/react-ui/blocks/Terminal/parsing/levels/LogLevel.types.ts +0 -68
- package/src/react-ui/blocks/Terminal/parsing/levels/LogLevelDetector.ts +0 -436
- package/src/react-ui/blocks/Terminal/parsing/levels/index.ts +0 -14
- package/src/react-ui/blocks/index.ts +0 -11
- package/src/react-ui/components/MorphingPopover/MorphingPopover.types.ts +0 -49
- package/src/react-ui/components/MorphingPopover/index.tsx +0 -186
- package/src/react-ui/components/MorphingPopover/morphing-popover.module.css +0 -153
- package/src/react-ui/components/index.ts +0 -9
- package/src/react-ui/hooks/Animation/UseAutoHeight.tsx +0 -123
- package/src/react-ui/hooks/DOM/UseIsInView.tsx +0 -44
- package/src/react-ui/hooks/Formatting/UseListFormat.ts +0 -134
- package/src/react-ui/hooks/State/UseControlledState.tsx +0 -57
- package/src/react-ui/hooks/State/UseDataState.tsx +0 -76
- package/src/react-ui/hooks/index.ts +0 -20
- package/src/react-ui/icons/index.ts +0 -12
- package/src/react-ui/icons/lucide-animated/activity.tsx +0 -109
- package/src/react-ui/icons/lucide-animated/arrow-down-to-line.tsx +0 -51
- package/src/react-ui/icons/lucide-animated/arrow-up.tsx +0 -50
- package/src/react-ui/icons/lucide-animated/bell-electric.tsx +0 -124
- package/src/react-ui/icons/lucide-animated/bell.tsx +0 -93
- package/src/react-ui/icons/lucide-animated/bot.tsx +0 -122
- package/src/react-ui/icons/lucide-animated/box.tsx +0 -117
- package/src/react-ui/icons/lucide-animated/check.tsx +0 -21
- package/src/react-ui/icons/lucide-animated/circle-check.tsx +0 -107
- package/src/react-ui/icons/lucide-animated/delete.tsx +0 -133
- package/src/react-ui/icons/lucide-animated/download.tsx +0 -99
- package/src/react-ui/icons/lucide-animated/edit-2.tsx +0 -21
- package/src/react-ui/icons/lucide-animated/globe.tsx +0 -23
- package/src/react-ui/icons/lucide-animated/home.tsx +0 -103
- package/src/react-ui/icons/lucide-animated/index.ts +0 -38
- package/src/react-ui/icons/lucide-animated/layers.tsx +0 -23
- package/src/react-ui/icons/lucide-animated/layout-panel-top.tsx +0 -143
- package/src/react-ui/icons/lucide-animated/list.tsx +0 -54
- package/src/react-ui/icons/lucide-animated/package.tsx +0 -24
- package/src/react-ui/icons/lucide-animated/palette.tsx +0 -25
- package/src/react-ui/icons/lucide-animated/plus.tsx +0 -92
- package/src/react-ui/icons/lucide-animated/refresh-cw.tsx +0 -24
- package/src/react-ui/icons/lucide-animated/rocket.tsx +0 -24
- package/src/react-ui/icons/lucide-animated/save.tsx +0 -23
- package/src/react-ui/icons/lucide-animated/search.tsx +0 -94
- package/src/react-ui/icons/lucide-animated/settings.tsx +0 -92
- package/src/react-ui/icons/lucide-animated/terminal.tsx +0 -46
- package/src/react-ui/icons/lucide-animated/trash-2.tsx +0 -25
- package/src/react-ui/icons/lucide-animated/trending-down.tsx +0 -151
- package/src/react-ui/icons/lucide-animated/trending-up.tsx +0 -150
- package/src/react-ui/icons/lucide-animated/type.tsx +0 -23
- package/src/react-ui/icons/lucide-animated/upload.tsx +0 -23
- package/src/react-ui/icons/lucide-animated/x.tsx +0 -102
- package/src/react-ui/index.ts +0 -30
- package/src/react-ui/lib/get-strict-context.tsx +0 -56
- package/src/react-ui/lib/icon-wrapper.tsx +0 -70
- package/src/react-ui/lib/index.ts +0 -9
- package/src/react-ui/lib/utils.ts +0 -24
- package/src/react-ui/primitives/AutoHeight/index.tsx +0 -74
- package/src/react-ui/primitives/CountingNumber/index.tsx +0 -147
- package/src/react-ui/primitives/Highlight/Highlight.types.ts +0 -136
- package/src/react-ui/primitives/Highlight/index.tsx +0 -577
- package/src/react-ui/primitives/Slot/index.tsx +0 -128
- package/src/react-ui/primitives/index.ts +0 -16
- package/src/react-ui/primitives/waapi/Gooey/Gooey.types.ts +0 -123
- package/src/react-ui/primitives/waapi/Gooey/GooeyCanvas.tsx +0 -80
- package/src/react-ui/primitives/waapi/Gooey/GooeyFilter.tsx +0 -77
- package/src/react-ui/primitives/waapi/Gooey/MorphPath.tsx +0 -58
- package/src/react-ui/primitives/waapi/Gooey/gooey-utils.ts +0 -244
- package/src/react-ui/primitives/waapi/Gooey/index.ts +0 -50
- package/src/react-ui/primitives/waapi/Gooey/useMorphPath.ts +0 -48
- package/src/react-ui/primitives/waapi/Morph/Morph.types.ts +0 -106
- package/src/react-ui/primitives/waapi/Morph/MorphContext.tsx +0 -21
- package/src/react-ui/primitives/waapi/Morph/index.tsx +0 -56
- package/src/react-ui/primitives/waapi/Morph/techniques/index.ts +0 -12
- package/src/react-ui/primitives/waapi/Morph/techniques/useCSSGridMorph.ts +0 -89
- package/src/react-ui/primitives/waapi/Morph/techniques/useFLIPClipPath.ts +0 -176
- package/src/react-ui/primitives/waapi/Morph/techniques/useViewTransitions.ts +0 -87
- package/src/react-ui/primitives/waapi/Morph/useMorph.ts +0 -101
- package/src/react-ui/primitives/waapi/Reorder/Reorder.types.ts +0 -177
- package/src/react-ui/primitives/waapi/Reorder/index.tsx +0 -260
- package/src/react-ui/primitives/waapi/Reorder/useReorder.ts +0 -47
- package/src/react-ui/primitives/waapi/Reorder/useReorderPresence.ts +0 -209
- package/src/react-ui/primitives/waapi/Reorder/utils/separatorCoordination.ts +0 -104
- package/src/react-ui/primitives/waapi/SlidingNumber/SlidingNumber.styles.ts +0 -14
- package/src/react-ui/primitives/waapi/SlidingNumber/SlidingNumber.types.ts +0 -84
- package/src/react-ui/primitives/waapi/SlidingNumber/index.tsx +0 -474
- package/src/react-ui/primitives/waapi/SlidingText/SlidingText.styles.ts +0 -32
- package/src/react-ui/primitives/waapi/SlidingText/SlidingText.types.ts +0 -69
- package/src/react-ui/primitives/waapi/SlidingText/index.tsx +0 -140
- package/src/react-ui/primitives/waapi/core/animationConstants.ts +0 -215
- package/src/react-ui/primitives/waapi/core/index.ts +0 -53
- package/src/react-ui/primitives/waapi/core/types.ts +0 -200
- package/src/react-ui/primitives/waapi/core/useAnimationOrchestrator.ts +0 -430
- package/src/react-ui/primitives/waapi/core/useElementRegistry.ts +0 -81
- package/src/react-ui/primitives/waapi/core/useFLIPAnimation.ts +0 -138
- package/src/react-ui/primitives/waapi/core/usePositionCapture.ts +0 -106
- package/src/react-ui/primitives/waapi/index.ts +0 -139
- package/src/react-ui/styles/animations.css +0 -369
- package/src/react-ui/ui/Accordion/Accordion.styles.ts +0 -72
- package/src/react-ui/ui/Accordion/Accordion.types.ts +0 -199
- package/src/react-ui/ui/Accordion/index.tsx +0 -362
- package/src/react-ui/ui/AlertDialog/AlertDialog.styles.ts +0 -38
- package/src/react-ui/ui/AlertDialog/AlertDialog.types.ts +0 -296
- package/src/react-ui/ui/AlertDialog/index.tsx +0 -540
- package/src/react-ui/ui/Badge/Badge.styles.ts +0 -43
- package/src/react-ui/ui/Badge/Badge.types.ts +0 -26
- package/src/react-ui/ui/Badge/index.tsx +0 -34
- package/src/react-ui/ui/Button/Button.styles.ts +0 -57
- package/src/react-ui/ui/Button/Button.types.ts +0 -63
- package/src/react-ui/ui/Button/index.tsx +0 -155
- package/src/react-ui/ui/Card/Card.styles.ts +0 -32
- package/src/react-ui/ui/Card/Card.types.ts +0 -39
- package/src/react-ui/ui/Card/index.tsx +0 -130
- package/src/react-ui/ui/Checkbox/Checkbox.styles.ts +0 -40
- package/src/react-ui/ui/Checkbox/Checkbox.types.ts +0 -98
- package/src/react-ui/ui/Checkbox/index.tsx +0 -233
- package/src/react-ui/ui/Combobox/Combobox.styles.ts +0 -34
- package/src/react-ui/ui/Combobox/Combobox.types.ts +0 -89
- package/src/react-ui/ui/Combobox/index.tsx +0 -331
- package/src/react-ui/ui/CornerBracket/CornerBracket.styles.ts +0 -38
- package/src/react-ui/ui/CornerBracket/CornerBracket.types.ts +0 -15
- package/src/react-ui/ui/CornerBracket/index.tsx +0 -49
- package/src/react-ui/ui/DataCard/DataCard.styles.ts +0 -94
- package/src/react-ui/ui/DataCard/DataCard.types.ts +0 -125
- package/src/react-ui/ui/DataCard/index.tsx +0 -340
- package/src/react-ui/ui/Dialog/Dialog.styles.ts +0 -59
- package/src/react-ui/ui/Dialog/Dialog.types.ts +0 -284
- package/src/react-ui/ui/Dialog/index.tsx +0 -452
- package/src/react-ui/ui/DropdownMenu/DropdownMenu.styles.ts +0 -35
- package/src/react-ui/ui/DropdownMenu/DropdownMenu.types.ts +0 -81
- package/src/react-ui/ui/DropdownMenu/index.tsx +0 -300
- package/src/react-ui/ui/DynamicToggle/DynamicToggle.css +0 -303
- package/src/react-ui/ui/DynamicToggle/DynamicToggle.styles.ts +0 -85
- package/src/react-ui/ui/DynamicToggle/DynamicToggle.types.ts +0 -174
- package/src/react-ui/ui/DynamicToggle/index.tsx +0 -294
- package/src/react-ui/ui/DynamicToggle/prototype-v7.html +0 -615
- package/src/react-ui/ui/DynamicToggle/prototype.html +0 -419
- package/src/react-ui/ui/Field/Field.styles.ts +0 -47
- package/src/react-ui/ui/Field/Field.types.ts +0 -60
- package/src/react-ui/ui/Field/index.tsx +0 -254
- package/src/react-ui/ui/Input/Input.styles.ts +0 -11
- package/src/react-ui/ui/Input/Input.types.ts +0 -10
- package/src/react-ui/ui/Input/index.tsx +0 -32
- package/src/react-ui/ui/InputGroup/InputGroup.styles.ts +0 -53
- package/src/react-ui/ui/InputGroup/InputGroup.types.ts +0 -44
- package/src/react-ui/ui/InputGroup/index.tsx +0 -149
- package/src/react-ui/ui/Label/Label.styles.ts +0 -10
- package/src/react-ui/ui/Label/Label.types.ts +0 -9
- package/src/react-ui/ui/Label/index.tsx +0 -27
- package/src/react-ui/ui/Menu/Menu.styles.ts +0 -71
- package/src/react-ui/ui/Menu/Menu.types.ts +0 -425
- package/src/react-ui/ui/Menu/index.tsx +0 -900
- package/src/react-ui/ui/Popover/Popover.styles.ts +0 -55
- package/src/react-ui/ui/Popover/Popover.types.ts +0 -261
- package/src/react-ui/ui/Popover/index.tsx +0 -422
- package/src/react-ui/ui/Progress/Progress.styles.ts +0 -36
- package/src/react-ui/ui/Progress/Progress.types.ts +0 -162
- package/src/react-ui/ui/Progress/index.tsx +0 -254
- package/src/react-ui/ui/Select/Select.styles.ts +0 -30
- package/src/react-ui/ui/Select/Select.types.ts +0 -51
- package/src/react-ui/ui/Select/index.tsx +0 -225
- package/src/react-ui/ui/Separator/Separator.styles.ts +0 -10
- package/src/react-ui/ui/Separator/Separator.types.ts +0 -10
- package/src/react-ui/ui/Separator/index.tsx +0 -37
- package/src/react-ui/ui/Switch/Switch.styles.ts +0 -50
- package/src/react-ui/ui/Switch/Switch.types.ts +0 -155
- package/src/react-ui/ui/Switch/index.tsx +0 -253
- package/src/react-ui/ui/Tabs/Tabs.css +0 -39
- package/src/react-ui/ui/Tabs/Tabs.styles.ts +0 -148
- package/src/react-ui/ui/Tabs/Tabs.types.ts +0 -255
- package/src/react-ui/ui/Tabs/index.tsx +0 -529
- package/src/react-ui/ui/TextFlow/TextFlow.styles.ts +0 -36
- package/src/react-ui/ui/TextFlow/TextFlow.types.ts +0 -118
- package/src/react-ui/ui/TextFlow/index.tsx +0 -276
- package/src/react-ui/ui/Textarea/Textarea.styles.ts +0 -10
- package/src/react-ui/ui/Textarea/Textarea.types.ts +0 -9
- package/src/react-ui/ui/Textarea/index.tsx +0 -27
- package/src/react-ui/ui/Tooltip/Tooltip.styles.ts +0 -43
- package/src/react-ui/ui/Tooltip/Tooltip.types.ts +0 -253
- package/src/react-ui/ui/Tooltip/index.tsx +0 -394
- package/src/react-ui/ui/index.ts +0 -41
- package/src/types/css-modules.d.ts +0 -18
|
@@ -1,259 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Types for TerminalLogsPanel components.
|
|
3
|
-
*
|
|
4
|
-
* @module components/devenv/terminal/panel/types
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type { IParsedLogEntry, TLogLevel } from "../parsing";
|
|
8
|
-
|
|
9
|
-
// Re-export TLogLevel for convenience
|
|
10
|
-
export type { TLogLevel };
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Terminal session information for multi-session support.
|
|
14
|
-
*/
|
|
15
|
-
export interface ITerminalSession {
|
|
16
|
-
/** Unique session identifier */
|
|
17
|
-
id: string;
|
|
18
|
-
/** Display name for the session */
|
|
19
|
-
name: string;
|
|
20
|
-
/** Current connection status */
|
|
21
|
-
status: "connected" | "connecting" | "disconnected" | "error";
|
|
22
|
-
/** Associated container name (optional) */
|
|
23
|
-
containerName?: string;
|
|
24
|
-
/** Backend type for this session */
|
|
25
|
-
backend: "xterm" | "webcontainer";
|
|
26
|
-
/** Session mode - interactive or readonly */
|
|
27
|
-
mode: "interactive" | "readonly";
|
|
28
|
-
/** Session creation timestamp */
|
|
29
|
-
createdAt: number;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// Re-export component props types from their respective files
|
|
33
|
-
export type { ITerminalSessionTabsProps } from "./TerminalSessionTabs";
|
|
34
|
-
export type { ITerminalFilterTabsProps } from "./TerminalFilterTabs";
|
|
35
|
-
export type { ITerminalFilterDropdownProps } from "./TerminalFilterDropdown";
|
|
36
|
-
export type { ITerminalSessionControlProps } from "./TerminalSessionControl";
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Props for TerminalLogsPanel main component.
|
|
40
|
-
*/
|
|
41
|
-
export interface ITerminalLogsPanelProps {
|
|
42
|
-
/** Container name to display in header */
|
|
43
|
-
containerName: string;
|
|
44
|
-
|
|
45
|
-
/** Whether container connection is active */
|
|
46
|
-
isConnected: boolean;
|
|
47
|
-
|
|
48
|
-
/** Raw logs content (kept for compatibility, will be removed) */
|
|
49
|
-
logs?: string;
|
|
50
|
-
|
|
51
|
-
/** Internal raw logs content (kept for API compatibility, unused in favor of parsedEntries) */
|
|
52
|
-
_logs?: string;
|
|
53
|
-
|
|
54
|
-
/** Parsed log entries with level detection and metadata */
|
|
55
|
-
parsedEntries: IParsedLogEntry[];
|
|
56
|
-
|
|
57
|
-
/** Log level filter state */
|
|
58
|
-
filterLevel: TLogLevelFilter;
|
|
59
|
-
|
|
60
|
-
/** Follow cursor state (auto-scroll) */
|
|
61
|
-
followCursor: boolean;
|
|
62
|
-
|
|
63
|
-
/** Show line numbers state */
|
|
64
|
-
showLineNumbers: boolean;
|
|
65
|
-
|
|
66
|
-
/** Level counts for badges */
|
|
67
|
-
levelCounts: Partial<Record<TLogLevel, number>>;
|
|
68
|
-
|
|
69
|
-
/** Custom class name */
|
|
70
|
-
className?: string;
|
|
71
|
-
|
|
72
|
-
/** View mode: 'terminal' for xterm.js, 'react' for React viewer */
|
|
73
|
-
viewMode?: "terminal" | "react";
|
|
74
|
-
|
|
75
|
-
/** Container management: Available containers (for session control) */
|
|
76
|
-
containers?: Array<{
|
|
77
|
-
id: string;
|
|
78
|
-
name: string;
|
|
79
|
-
state: string;
|
|
80
|
-
}>;
|
|
81
|
-
|
|
82
|
-
/** Session management: Available sessions (optional for single-session mode) */
|
|
83
|
-
sessions?: ITerminalSession[];
|
|
84
|
-
|
|
85
|
-
/** Session management: Currently active session ID (optional) */
|
|
86
|
-
activeSessionId?: string | null;
|
|
87
|
-
|
|
88
|
-
/** Session management: Callback when session changes */
|
|
89
|
-
onSessionChange?: (sessionId: string) => void;
|
|
90
|
-
|
|
91
|
-
/** Session management: Callback when session is closed */
|
|
92
|
-
onSessionClose?: (sessionId: string) => void;
|
|
93
|
-
|
|
94
|
-
/** Session management: Callback when new session button is clicked */
|
|
95
|
-
onNewSession?: () => void;
|
|
96
|
-
|
|
97
|
-
/** Available containers for adding new tabs */
|
|
98
|
-
availableContainers?: Array<{
|
|
99
|
-
id: string;
|
|
100
|
-
name: string;
|
|
101
|
-
state: string;
|
|
102
|
-
}>;
|
|
103
|
-
|
|
104
|
-
/** Callback when a container is selected to add as a new tab */
|
|
105
|
-
onAddContainer?: (containerName: string) => void;
|
|
106
|
-
|
|
107
|
-
/** Callback when container is selected from session control */
|
|
108
|
-
onContainerSelect?: (containerName: string) => void;
|
|
109
|
-
|
|
110
|
-
/** Callback when session close button is clicked */
|
|
111
|
-
onSessionStop?: () => void;
|
|
112
|
-
|
|
113
|
-
/** Callback when filter level changes */
|
|
114
|
-
onFilterChange: (level: TLogLevelFilter) => void;
|
|
115
|
-
|
|
116
|
-
/** Callback when follow cursor toggle changes */
|
|
117
|
-
onFollowCursorChange: (enabled: boolean) => void;
|
|
118
|
-
|
|
119
|
-
/** Callback when line numbers toggle changes */
|
|
120
|
-
onShowLineNumbersChange: (enabled: boolean) => void;
|
|
121
|
-
|
|
122
|
-
/** Callback when view mode changes */
|
|
123
|
-
onViewModeChange?: (mode: "terminal" | "react") => void;
|
|
124
|
-
|
|
125
|
-
/** Callback when clear button is clicked */
|
|
126
|
-
onClear: () => void;
|
|
127
|
-
|
|
128
|
-
/** Callback when download button is clicked */
|
|
129
|
-
onDownload: () => void;
|
|
130
|
-
|
|
131
|
-
/** Callback when search button is clicked */
|
|
132
|
-
onSearch: () => void;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
/**
|
|
136
|
-
* Props for TerminalPanelHeader component.
|
|
137
|
-
*/
|
|
138
|
-
export interface ITerminalPanelHeaderProps {
|
|
139
|
-
/** Container name to display */
|
|
140
|
-
containerName: string;
|
|
141
|
-
|
|
142
|
-
/** Whether container connection is active */
|
|
143
|
-
isConnected: boolean;
|
|
144
|
-
|
|
145
|
-
/** Current view mode */
|
|
146
|
-
viewMode?: "terminal" | "react";
|
|
147
|
-
|
|
148
|
-
/** Callback when view mode changes */
|
|
149
|
-
onViewModeChange?: (mode: "terminal" | "react") => void;
|
|
150
|
-
|
|
151
|
-
/** Callback when close button is clicked */
|
|
152
|
-
onClose?: () => void;
|
|
153
|
-
|
|
154
|
-
/** Callback when minimize button is clicked */
|
|
155
|
-
onMinimize?: () => void;
|
|
156
|
-
|
|
157
|
-
/** Callback when maximize button is clicked */
|
|
158
|
-
onMaximize?: () => void;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/**
|
|
162
|
-
* Props for TerminalPanelToolbar component.
|
|
163
|
-
*/
|
|
164
|
-
export interface ITerminalPanelToolbarProps {
|
|
165
|
-
/** Current log level filter */
|
|
166
|
-
filterLevel: TLogLevelFilter;
|
|
167
|
-
|
|
168
|
-
/** Follow cursor state */
|
|
169
|
-
followCursor: boolean;
|
|
170
|
-
|
|
171
|
-
/** Show line numbers state */
|
|
172
|
-
showLineNumbers: boolean;
|
|
173
|
-
|
|
174
|
-
/** Log level counts for badges */
|
|
175
|
-
levelCounts: Partial<Record<TLogLevel, number>>;
|
|
176
|
-
|
|
177
|
-
/** Callback when filter level changes */
|
|
178
|
-
onFilterChange: (level: TLogLevelFilter) => void;
|
|
179
|
-
|
|
180
|
-
/** Callback when follow cursor toggle changes */
|
|
181
|
-
onFollowCursorChange: (enabled: boolean) => void;
|
|
182
|
-
|
|
183
|
-
/** Callback when line numbers toggle changes */
|
|
184
|
-
onShowLineNumbersChange: (enabled: boolean) => void;
|
|
185
|
-
|
|
186
|
-
/** Callback when clear button is clicked */
|
|
187
|
-
onClear: () => void;
|
|
188
|
-
|
|
189
|
-
/** Callback when download button is clicked */
|
|
190
|
-
onDownload: () => void;
|
|
191
|
-
|
|
192
|
-
/** Callback when search button is clicked */
|
|
193
|
-
onSearch: () => void;
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
/**
|
|
197
|
-
* Props for TerminalPanelFooter component.
|
|
198
|
-
*/
|
|
199
|
-
export interface ITerminalPanelFooterProps {
|
|
200
|
-
/** Number of log lines */
|
|
201
|
-
lineCount: number;
|
|
202
|
-
|
|
203
|
-
/** Number of bytes */
|
|
204
|
-
byteCount: number;
|
|
205
|
-
|
|
206
|
-
/** Current filter level display */
|
|
207
|
-
filterLevel: TLogLevelFilter;
|
|
208
|
-
|
|
209
|
-
/** Current filter count (filtered vs total) */
|
|
210
|
-
filteredCount?: number;
|
|
211
|
-
totalCount?: number;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
/**
|
|
215
|
-
* Log level filter options.
|
|
216
|
-
* - 'all': Show all log levels
|
|
217
|
-
* - Specific level: Show only that level and above (by severity)
|
|
218
|
-
*/
|
|
219
|
-
export type TLogLevelFilter = "all" | TLogLevel;
|
|
220
|
-
|
|
221
|
-
/**
|
|
222
|
-
* Level filter button configuration.
|
|
223
|
-
*/
|
|
224
|
-
export interface ILevelFilterButton {
|
|
225
|
-
/** Filter value */
|
|
226
|
-
value: TLogLevelFilter;
|
|
227
|
-
|
|
228
|
-
/** Display label */
|
|
229
|
-
label: string;
|
|
230
|
-
|
|
231
|
-
/** Icon component (optional) */
|
|
232
|
-
icon?: React.ComponentType<{ className?: string }>;
|
|
233
|
-
|
|
234
|
-
/** Badge count */
|
|
235
|
-
count?: number;
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
/**
|
|
239
|
-
* Terminal panel action button types.
|
|
240
|
-
*/
|
|
241
|
-
export type TTerminalAction = "clear" | "download" | "search" | "copy";
|
|
242
|
-
|
|
243
|
-
/**
|
|
244
|
-
* Imperative handle for TerminalLogsPanel.
|
|
245
|
-
* Exposes terminal control methods to parent components.
|
|
246
|
-
*/
|
|
247
|
-
export interface ITerminalLogsPanelRef {
|
|
248
|
-
/** Search for term in terminal buffer */
|
|
249
|
-
search: (term: string) => void;
|
|
250
|
-
|
|
251
|
-
/** Clear terminal and reset position */
|
|
252
|
-
clear: () => void;
|
|
253
|
-
|
|
254
|
-
/** Write text to terminal */
|
|
255
|
-
write: (text: string) => void;
|
|
256
|
-
|
|
257
|
-
/** Scroll to bottom of terminal */
|
|
258
|
-
scrollToBottom: () => void;
|
|
259
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TerminalPanelChrome style definitions.
|
|
3
|
-
*
|
|
4
|
-
* StyleSlots + CVA variants for the Ghostty-inspired glassmorphism shell.
|
|
5
|
-
* Follows the mks-ui composable pattern: base styles via StyleSlots,
|
|
6
|
-
* visual variants via CVA, consumer overrides via SlotOverrides.
|
|
7
|
-
*
|
|
8
|
-
* @module components/devenv/terminal/panel/chrome/styles
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
import { cva, type VariantProps } from 'class-variance-authority';
|
|
12
|
-
import type { StyleSlots } from '@/core/types';
|
|
13
|
-
|
|
14
|
-
/** Slot names for TerminalPanelChrome sub-regions */
|
|
15
|
-
export type TerminalChromeSlot =
|
|
16
|
-
| 'root'
|
|
17
|
-
| 'accentLine'
|
|
18
|
-
| 'accentGradient'
|
|
19
|
-
| 'accentShimmer'
|
|
20
|
-
| 'header'
|
|
21
|
-
| 'sessionTabs'
|
|
22
|
-
| 'actionBar'
|
|
23
|
-
| 'content'
|
|
24
|
-
| 'footer';
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Default style slots for each chrome sub-region.
|
|
28
|
-
*/
|
|
29
|
-
export const terminalChromeStyles: StyleSlots<TerminalChromeSlot> = {
|
|
30
|
-
root: 'glass-heavy glass-noise rounded-2xl overflow-hidden relative',
|
|
31
|
-
accentLine: 'absolute top-0 left-0 right-0 h-px z-10 pointer-events-none overflow-hidden',
|
|
32
|
-
accentGradient: 'h-full w-full',
|
|
33
|
-
accentShimmer: 'absolute inset-0 bg-gradient-to-r from-transparent via-white/40 to-transparent',
|
|
34
|
-
header: '',
|
|
35
|
-
sessionTabs: '',
|
|
36
|
-
actionBar: '',
|
|
37
|
-
content: '',
|
|
38
|
-
footer: '',
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Accent line gradient classes per variant.
|
|
43
|
-
*/
|
|
44
|
-
export const ACCENT_GRADIENTS = {
|
|
45
|
-
default: 'bg-gradient-to-r from-transparent via-primary/70 to-transparent shadow-[0_0_12px_hsla(330,85%,43%,0.5)]',
|
|
46
|
-
error: 'bg-gradient-to-r from-transparent via-destructive/70 to-transparent shadow-[0_0_12px_hsla(0,72%,51%,0.5)]',
|
|
47
|
-
minimal: '',
|
|
48
|
-
} as const;
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* CVA variants for the chrome root element.
|
|
52
|
-
*/
|
|
53
|
-
export const terminalChromeVariants = cva(terminalChromeStyles.root, {
|
|
54
|
-
variants: {
|
|
55
|
-
variant: {
|
|
56
|
-
/** Default: magenta accent line, full glassmorphism */
|
|
57
|
-
default: '',
|
|
58
|
-
/** Minimal: no accent line, no noise texture, simpler rounding */
|
|
59
|
-
minimal: 'rounded-lg',
|
|
60
|
-
/** Error: red/destructive accent line instead of magenta */
|
|
61
|
-
error: '',
|
|
62
|
-
},
|
|
63
|
-
size: {
|
|
64
|
-
default: '',
|
|
65
|
-
compact: 'rounded-xl',
|
|
66
|
-
},
|
|
67
|
-
},
|
|
68
|
-
defaultVariants: {
|
|
69
|
-
variant: 'default',
|
|
70
|
-
size: 'default',
|
|
71
|
-
},
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
/** Extracted variant props type for consumer use */
|
|
75
|
-
export type TerminalChromeVariantProps = VariantProps<typeof terminalChromeVariants>;
|
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* TerminalPanelChrome Component.
|
|
3
|
-
*
|
|
4
|
-
* Reusable Ghostty-styled wrapper providing shared visual chrome
|
|
5
|
-
* for both log viewer and interactive terminal panels.
|
|
6
|
-
*
|
|
7
|
-
* Includes:
|
|
8
|
-
* - Multi-layer glassmorphism shell
|
|
9
|
-
* - Noise texture SVG overlay for depth
|
|
10
|
-
* - Animated top accent line (primary gradient with glow)
|
|
11
|
-
* - Session tabs (TerminalSessionTabs)
|
|
12
|
-
* - macOS-style header (TerminalPanelHeader)
|
|
13
|
-
* - Slots for action bar, children (terminal content), and footer
|
|
14
|
-
* - Neon magenta scrollbar styles
|
|
15
|
-
* - StyleSlots + CVA variants for customization
|
|
16
|
-
*
|
|
17
|
-
* @module components/devenv/terminal/panel/chrome
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
'use client';
|
|
21
|
-
|
|
22
|
-
import type { ITerminalPanelChromeProps } from './TerminalPanelChrome.types';
|
|
23
|
-
import {
|
|
24
|
-
terminalChromeStyles,
|
|
25
|
-
terminalChromeVariants,
|
|
26
|
-
ACCENT_GRADIENTS,
|
|
27
|
-
} from './TerminalPanelChrome.styles';
|
|
28
|
-
import { TerminalPanelHeader } from './TerminalPanelHeader';
|
|
29
|
-
import { TerminalSessionTabs } from './TerminalSessionTabs';
|
|
30
|
-
import { cn } from '@/react-ui/lib/utils';
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Noise texture SVG for glassmorphism depth.
|
|
34
|
-
* Fractal noise pattern applied as background image.
|
|
35
|
-
*/
|
|
36
|
-
export const NOISE_TEXTURE_SVG = `"data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E"`;
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Terminal scroll customization with neon magenta glow effect.
|
|
40
|
-
* Applied to xterm.js viewport scrollbar.
|
|
41
|
-
*/
|
|
42
|
-
export const terminalScrollStyles = `
|
|
43
|
-
@keyframes shimmer-line {
|
|
44
|
-
0%, 100% { background-position: 200% 0; }
|
|
45
|
-
50% { background-position: -200% 0; }
|
|
46
|
-
}
|
|
47
|
-
.terminal-scroll .xterm-viewport {
|
|
48
|
-
overflow-y: auto;
|
|
49
|
-
}
|
|
50
|
-
.terminal-scroll .xterm-viewport::-webkit-scrollbar {
|
|
51
|
-
width: 8px;
|
|
52
|
-
}
|
|
53
|
-
.terminal-scroll .xterm-viewport::-webkit-scrollbar-track {
|
|
54
|
-
background: rgba(36, 27, 47, 0.5);
|
|
55
|
-
}
|
|
56
|
-
.terminal-scroll .xterm-viewport::-webkit-scrollbar-thumb {
|
|
57
|
-
background: linear-gradient(
|
|
58
|
-
180deg,
|
|
59
|
-
rgba(212, 12, 103, 0.3) 0%,
|
|
60
|
-
rgba(212, 12, 103, 0.5) 50%,
|
|
61
|
-
rgba(212, 12, 103, 0.3) 100%
|
|
62
|
-
);
|
|
63
|
-
border-radius: 4px;
|
|
64
|
-
box-shadow: 0 0 10px rgba(212, 12, 103, 0.3);
|
|
65
|
-
}
|
|
66
|
-
.terminal-scroll .xterm-viewport::-webkit-scrollbar-thumb:hover {
|
|
67
|
-
background: linear-gradient(
|
|
68
|
-
180deg,
|
|
69
|
-
rgba(212, 12, 103, 0.5) 0%,
|
|
70
|
-
rgba(212, 12, 103, 0.7) 50%,
|
|
71
|
-
rgba(212, 12, 103, 0.5) 100%
|
|
72
|
-
);
|
|
73
|
-
box-shadow: 0 0 15px rgba(212, 12, 103, 0.5);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
/* === CRT Shader Effects (opt-in via settings) === */
|
|
77
|
-
|
|
78
|
-
/* Scanline overlay - replicates bettercrt.glsl scanline effect */
|
|
79
|
-
.terminal-crt {
|
|
80
|
-
position: relative;
|
|
81
|
-
}
|
|
82
|
-
.terminal-crt::after {
|
|
83
|
-
content: '';
|
|
84
|
-
position: absolute;
|
|
85
|
-
inset: 0;
|
|
86
|
-
pointer-events: none;
|
|
87
|
-
z-index: 20;
|
|
88
|
-
background: repeating-linear-gradient(
|
|
89
|
-
0deg,
|
|
90
|
-
rgba(0, 0, 0, 0.12) 0px,
|
|
91
|
-
rgba(0, 0, 0, 0.12) 1px,
|
|
92
|
-
transparent 1px,
|
|
93
|
-
transparent 2px
|
|
94
|
-
);
|
|
95
|
-
mix-blend-mode: multiply;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/* Vignette - CRT monitor light falloff */
|
|
99
|
-
.terminal-crt::before {
|
|
100
|
-
content: '';
|
|
101
|
-
position: absolute;
|
|
102
|
-
inset: 0;
|
|
103
|
-
pointer-events: none;
|
|
104
|
-
z-index: 19;
|
|
105
|
-
background: radial-gradient(
|
|
106
|
-
ellipse at center,
|
|
107
|
-
transparent 60%,
|
|
108
|
-
rgba(0, 0, 0, 0.15) 100%
|
|
109
|
-
);
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
/* Bloom/glow - replicates bloom.glsl text glow on bright text */
|
|
113
|
-
.terminal-bloom * {
|
|
114
|
-
text-shadow: 0 0 4px currentColor;
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
/* Bloom on xterm canvas - subtle drop-shadow filter on the canvas element */
|
|
118
|
-
.terminal-bloom canvas {
|
|
119
|
-
filter: drop-shadow(0 0 1px rgba(255, 200, 100, 0.15));
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/* Reduced motion - disable all CRT effects */
|
|
123
|
-
@media (prefers-reduced-motion: reduce) {
|
|
124
|
-
.terminal-crt::after,
|
|
125
|
-
.terminal-crt::before { display: none; }
|
|
126
|
-
.terminal-bloom * { text-shadow: none !important; }
|
|
127
|
-
.terminal-bloom canvas { filter: none !important; }
|
|
128
|
-
}
|
|
129
|
-
`;
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* TerminalPanelChrome Component.
|
|
133
|
-
*
|
|
134
|
-
* Reusable Ghostty-styled shell that wraps terminal content with
|
|
135
|
-
* consistent visual chrome. Used by both TerminalLogsPanel (readonly)
|
|
136
|
-
* and TerminalInteractivePanel (interactive).
|
|
137
|
-
*
|
|
138
|
-
* Supports StyleSlots for class overrides and CVA variants
|
|
139
|
-
* for visual presets (default, minimal, error).
|
|
140
|
-
*
|
|
141
|
-
* @example
|
|
142
|
-
* ```tsx
|
|
143
|
-
* <TerminalPanelChrome
|
|
144
|
-
* containerName="devenv-agent-backend"
|
|
145
|
-
* isConnected={true}
|
|
146
|
-
* variant="error"
|
|
147
|
-
* slots={{ root: 'max-h-[400px]', content: 'p-2' }}
|
|
148
|
-
* actionBar={<TerminalFilterTabs ... />}
|
|
149
|
-
* footer={<TerminalPanelFooter ... />}
|
|
150
|
-
* >
|
|
151
|
-
* <div ref={containerRef} className="terminal-container" />
|
|
152
|
-
* </TerminalPanelChrome>
|
|
153
|
-
* ```
|
|
154
|
-
*/
|
|
155
|
-
export function TerminalPanelChrome({
|
|
156
|
-
containerName,
|
|
157
|
-
isConnected,
|
|
158
|
-
variant = 'default',
|
|
159
|
-
size = 'default',
|
|
160
|
-
viewMode = 'terminal',
|
|
161
|
-
onViewModeChange,
|
|
162
|
-
sessions,
|
|
163
|
-
activeSessionId,
|
|
164
|
-
onSessionTabClick,
|
|
165
|
-
onSessionClose,
|
|
166
|
-
onNewSession,
|
|
167
|
-
availableContainers,
|
|
168
|
-
onAddContainer,
|
|
169
|
-
children,
|
|
170
|
-
actionBar,
|
|
171
|
-
footer,
|
|
172
|
-
onClose,
|
|
173
|
-
onMinimize,
|
|
174
|
-
onMaximize,
|
|
175
|
-
crtEffect,
|
|
176
|
-
slots,
|
|
177
|
-
className,
|
|
178
|
-
}: ITerminalPanelChromeProps) {
|
|
179
|
-
/** Whether to render session tabs (multi-session mode) */
|
|
180
|
-
const showSessionTabs =
|
|
181
|
-
(sessions && sessions.length > 0) ||
|
|
182
|
-
(availableContainers && availableContainers.length > 0);
|
|
183
|
-
|
|
184
|
-
/** Whether to show the accent line (hidden in minimal variant) */
|
|
185
|
-
const showAccentLine = variant !== 'minimal';
|
|
186
|
-
|
|
187
|
-
/** Accent gradient based on variant */
|
|
188
|
-
const accentGradient = ACCENT_GRADIENTS[variant ?? 'default'] ?? ACCENT_GRADIENTS.default;
|
|
189
|
-
|
|
190
|
-
return (
|
|
191
|
-
<div
|
|
192
|
-
className={cn(
|
|
193
|
-
terminalChromeVariants({ variant, size }),
|
|
194
|
-
slots?.root,
|
|
195
|
-
className,
|
|
196
|
-
)}
|
|
197
|
-
>
|
|
198
|
-
{/* Animated top accent line with shimmer */}
|
|
199
|
-
{showAccentLine && (
|
|
200
|
-
<div className={cn(terminalChromeStyles.accentLine, slots?.accentLine)}>
|
|
201
|
-
<div className={cn(accentGradient, slots?.accentGradient)} />
|
|
202
|
-
<div
|
|
203
|
-
className={cn(terminalChromeStyles.accentShimmer, slots?.accentShimmer)}
|
|
204
|
-
style={{
|
|
205
|
-
backgroundSize: '200% 100%',
|
|
206
|
-
animation: 'shimmer-line 4s ease-in-out infinite',
|
|
207
|
-
}}
|
|
208
|
-
/>
|
|
209
|
-
</div>
|
|
210
|
-
)}
|
|
211
|
-
|
|
212
|
-
{/* Session Tabs */}
|
|
213
|
-
{showSessionTabs && (
|
|
214
|
-
<div className={cn(slots?.sessionTabs)}>
|
|
215
|
-
<TerminalSessionTabs
|
|
216
|
-
sessions={sessions || []}
|
|
217
|
-
activeSessionId={activeSessionId || null}
|
|
218
|
-
onTabClick={(sessionId) => onSessionTabClick?.(sessionId)}
|
|
219
|
-
onClose={(sessionId) => onSessionClose?.(sessionId)}
|
|
220
|
-
onNewSession={onNewSession}
|
|
221
|
-
availableContainers={availableContainers}
|
|
222
|
-
onAddContainer={onAddContainer}
|
|
223
|
-
/>
|
|
224
|
-
</div>
|
|
225
|
-
)}
|
|
226
|
-
|
|
227
|
-
{/* Header */}
|
|
228
|
-
<div className={cn(slots?.header)}>
|
|
229
|
-
<TerminalPanelHeader
|
|
230
|
-
containerName={containerName}
|
|
231
|
-
isConnected={isConnected}
|
|
232
|
-
viewMode={viewMode}
|
|
233
|
-
onViewModeChange={onViewModeChange}
|
|
234
|
-
onClose={onClose}
|
|
235
|
-
onMinimize={onMinimize}
|
|
236
|
-
onMaximize={onMaximize}
|
|
237
|
-
/>
|
|
238
|
-
</div>
|
|
239
|
-
|
|
240
|
-
{/* Action Bar Slot */}
|
|
241
|
-
{actionBar && (
|
|
242
|
-
<div className={cn(slots?.actionBar)}>
|
|
243
|
-
{actionBar}
|
|
244
|
-
</div>
|
|
245
|
-
)}
|
|
246
|
-
|
|
247
|
-
{/* Terminal Content - with optional CRT effects */}
|
|
248
|
-
<div className={cn(
|
|
249
|
-
crtEffect && 'terminal-crt terminal-bloom',
|
|
250
|
-
slots?.content,
|
|
251
|
-
)}>
|
|
252
|
-
{children}
|
|
253
|
-
</div>
|
|
254
|
-
|
|
255
|
-
{/* Footer Slot */}
|
|
256
|
-
{footer && (
|
|
257
|
-
<div className={cn(slots?.footer)}>
|
|
258
|
-
{footer}
|
|
259
|
-
</div>
|
|
260
|
-
)}
|
|
261
|
-
|
|
262
|
-
{/* Terminal scroll styles */}
|
|
263
|
-
<style>{terminalScrollStyles}</style>
|
|
264
|
-
</div>
|
|
265
|
-
);
|
|
266
|
-
}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Types for TerminalPanelChrome component.
|
|
3
|
-
*
|
|
4
|
-
* @module components/devenv/terminal/panel/chrome/types
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import type { SlotOverrides } from '@/core/types';
|
|
8
|
-
import type { ITerminalSession } from './TerminalLogsPanel.types';
|
|
9
|
-
import type { TerminalChromeSlot, TerminalChromeVariantProps } from './TerminalPanelChrome.styles';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Props for TerminalPanelChrome - reusable Ghostty-styled wrapper.
|
|
13
|
-
*
|
|
14
|
-
* Provides the shared visual shell for both log viewer
|
|
15
|
-
* and interactive terminal panels. Supports StyleSlots for
|
|
16
|
-
* class overrides and CVA variants for visual presets.
|
|
17
|
-
*/
|
|
18
|
-
export interface ITerminalPanelChromeProps extends TerminalChromeVariantProps {
|
|
19
|
-
/** Container/session name displayed in header */
|
|
20
|
-
containerName: string;
|
|
21
|
-
|
|
22
|
-
/** Connection status indicator */
|
|
23
|
-
isConnected: boolean;
|
|
24
|
-
|
|
25
|
-
/** Current view mode (terminal xterm.js or react viewer) */
|
|
26
|
-
viewMode?: 'terminal' | 'react';
|
|
27
|
-
|
|
28
|
-
/** Callback when view mode changes */
|
|
29
|
-
onViewModeChange?: (mode: 'terminal' | 'react') => void;
|
|
30
|
-
|
|
31
|
-
/** Available sessions for tab bar */
|
|
32
|
-
sessions?: ITerminalSession[];
|
|
33
|
-
|
|
34
|
-
/** Currently active session ID */
|
|
35
|
-
activeSessionId?: string | null;
|
|
36
|
-
|
|
37
|
-
/** Callback when a session tab is clicked */
|
|
38
|
-
onSessionTabClick?: (sessionId: string) => void;
|
|
39
|
-
|
|
40
|
-
/** Callback when a session tab close button is clicked */
|
|
41
|
-
onSessionClose?: (sessionId: string) => void;
|
|
42
|
-
|
|
43
|
-
/** Callback when new session button is clicked */
|
|
44
|
-
onNewSession?: () => void;
|
|
45
|
-
|
|
46
|
-
/** Available containers for the add-container dropdown */
|
|
47
|
-
availableContainers?: Array<{
|
|
48
|
-
id: string;
|
|
49
|
-
name: string;
|
|
50
|
-
state: string;
|
|
51
|
-
}>;
|
|
52
|
-
|
|
53
|
-
/** Callback when a container is selected from the dropdown */
|
|
54
|
-
onAddContainer?: (containerName: string) => void;
|
|
55
|
-
|
|
56
|
-
/** Terminal content (children) */
|
|
57
|
-
children: React.ReactNode;
|
|
58
|
-
|
|
59
|
-
/** Action bar slot rendered between header and children */
|
|
60
|
-
actionBar?: React.ReactNode;
|
|
61
|
-
|
|
62
|
-
/** Footer slot rendered after children */
|
|
63
|
-
footer?: React.ReactNode;
|
|
64
|
-
|
|
65
|
-
/** Traffic light close handler */
|
|
66
|
-
onClose?: () => void;
|
|
67
|
-
|
|
68
|
-
/** Traffic light minimize handler */
|
|
69
|
-
onMinimize?: () => void;
|
|
70
|
-
|
|
71
|
-
/** Traffic light maximize handler */
|
|
72
|
-
onMaximize?: () => void;
|
|
73
|
-
|
|
74
|
-
/** Enable CRT shader effects (scanlines, bloom, vignette) */
|
|
75
|
-
crtEffect?: boolean;
|
|
76
|
-
|
|
77
|
-
/** Slot class overrides for each chrome sub-region */
|
|
78
|
-
slots?: SlotOverrides<TerminalChromeSlot>;
|
|
79
|
-
|
|
80
|
-
/** Custom class name appended to outer wrapper */
|
|
81
|
-
className?: string;
|
|
82
|
-
}
|