@pstdio/ui 0.15.0 → 0.16.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/{MermaidComponent-DBJsTOmj.js → MermaidComponent-BCMQqPqu.js} +11 -11
- package/dist/{MermaidComponent-DBJsTOmj.js.map → MermaidComponent-BCMQqPqu.js.map} +1 -1
- package/dist/browser-storage-BinyFNJX.js +40 -0
- package/dist/browser-storage-BinyFNJX.js.map +1 -0
- package/dist/chat-ui.js +1188 -1147
- package/dist/chat-ui.js.map +1 -1
- package/dist/checkbox-D5AzFRlb.js +70 -0
- package/dist/checkbox-D5AzFRlb.js.map +1 -0
- package/dist/components/chat-ui/components/ai-conversation.d.ts +1 -1
- package/dist/components/chat-ui/components/ai-message.d.ts +1 -1
- package/dist/components/chat-ui/components/ai-response.d.ts +0 -1
- package/dist/components/chat-ui/components/attachment-list.d.ts +1 -1
- package/dist/components/chat-ui/components/auto-scroll.d.ts +27 -0
- package/dist/components/chat-ui/components/chat-message-animation.d.ts +22 -0
- package/dist/components/chat-ui/components/timeline.d.ts +0 -2
- package/dist/components/chat-ui/performance/chat-performance-fixtures.d.ts +0 -1
- package/dist/components/chat-ui/tool-rendering/build-timeline.d.ts +2 -12
- package/dist/components/chat-ui/tool-rendering/shared.d.ts +1 -1
- package/dist/components/chat-ui/tool-rendering/types.d.ts +1 -2
- package/dist/components/command-palette/index.d.ts +4 -0
- package/dist/components/data-renderer/data-renderer-board.d.ts +1 -1
- package/dist/components/data-renderer/data-renderer-card.d.ts +1 -1
- package/dist/components/data-renderer/data-renderer-list.d.ts +1 -1
- package/dist/components/data-renderer/data-renderer.d.ts +1 -1
- package/dist/components/data-renderer/index.d.ts +18 -0
- package/dist/components/data-renderer/types.d.ts +0 -6
- package/dist/components/diff-viewer/diff-card.d.ts +1 -0
- package/dist/components/diff-viewer/diff-drawer-scroll.d.ts +0 -19
- package/dist/components/diff-viewer/diff-drawer.d.ts +1 -0
- package/dist/components/diff-viewer/index.d.ts +2 -0
- package/dist/components/diff-viewer/use-selected-diff-scroll.d.ts +7 -3
- package/dist/components/internal/style-guide.d.ts +14 -0
- package/dist/components/internal/token-editor-controls.d.ts +8 -0
- package/dist/components/internal/token-editor-data.d.ts +40 -0
- package/dist/components/internal/token-editor-state.d.ts +22 -0
- package/dist/components/layout/index.d.ts +6 -0
- package/dist/components/list-row/list-row.types.d.ts +1 -1
- package/dist/components/overlays/index.d.ts +12 -0
- package/dist/components/{search-modal-content.d.ts → overlays/search-modal-content.d.ts} +1 -1
- package/dist/components/{searchable-menu.d.ts → overlays/searchable-menu.d.ts} +1 -1
- package/dist/components/param-editor/index.d.ts +23 -0
- package/dist/components/param-editor/inputs/action-input.d.ts +13 -0
- package/dist/components/param-editor/inputs/anchor-grid-input.d.ts +12 -0
- package/dist/components/param-editor/inputs/anchor-grid.d.ts +4 -0
- package/dist/components/param-editor/inputs/file-accept.d.ts +22 -0
- package/dist/components/param-editor/inputs/file-drop-input.d.ts +14 -0
- package/dist/components/param-editor/inputs/numeric-value.d.ts +6 -0
- package/dist/components/param-editor/inputs/range-input.d.ts +17 -0
- package/dist/components/param-editor/inputs/range-value.d.ts +5 -0
- package/dist/components/param-editor/inputs/resource-input-chips.d.ts +15 -0
- package/dist/components/param-editor/inputs/resource-input.d.ts +18 -0
- package/dist/components/param-editor/inputs/segmented-input.d.ts +14 -0
- package/dist/components/param-editor/inputs/slider-marks.d.ts +5 -0
- package/dist/components/param-editor/inputs/vector-input.d.ts +17 -0
- package/dist/components/param-editor/inputs/vector-value.d.ts +7 -0
- package/dist/components/param-editor/param-editor-control-item.d.ts +15 -0
- package/dist/components/param-editor/param-editor-control-list.d.ts +5 -0
- package/dist/components/param-editor/param-editor-field-label.d.ts +1 -0
- package/dist/components/param-editor/param-editor-field.d.ts +11 -0
- package/dist/components/param-editor/param-editor-inline-group.d.ts +5 -0
- package/dist/components/param-editor/param-editor-section.d.ts +16 -0
- package/dist/components/param-editor/param-editor.d.ts +2 -1
- package/dist/components/param-editor/param-editor.types.d.ts +101 -19
- package/dist/components/{breadcrumb.d.ts → primitives/breadcrumb.d.ts} +1 -1
- package/dist/components/primitives/index.d.ts +28 -0
- package/dist/components/{number-input.d.ts → primitives/number-input.d.ts} +0 -2
- package/dist/components/{session-indicator.d.ts → primitives/session-indicator.d.ts} +2 -1
- package/dist/components/{tooltip.d.ts → primitives/tooltip.d.ts} +0 -1
- package/dist/components/rich-text/prompt-input/commands.d.ts +0 -17
- package/dist/components/rich-text/prompt-input/events.d.ts +0 -13
- package/dist/components/rich-text/prompt-input/plugins/CommentPlugin/nodes/CommentNode/CommentNode.d.ts +1 -2
- package/dist/components/rich-text/prompt-input/plugins/ReferencePlugin/nodes/ReferenceNode/ReferenceNode.d.ts +1 -2
- package/dist/components/rich-text/prompt-input/utils.d.ts +1 -2
- package/dist/components/rich-text/shared/plugins/MermaidPlugin/MermaidNode.d.ts +0 -1
- package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -1
- package/dist/components/sidebar/sidebar.types.d.ts +1 -1
- package/dist/components/tab-strip/tab-visibility-filter.d.ts +1 -1
- package/dist/components/tag-editor/tag-editor-row.d.ts +1 -1
- package/dist/components/tag-editor/tag-editor.types.d.ts +1 -1
- package/dist/components/terminal/bind-session.d.ts +33 -0
- package/dist/components/terminal/index.d.ts +6 -0
- package/dist/components/terminal/scripted-bridge.d.ts +35 -0
- package/dist/components/terminal/terminal-contract.d.ts +22 -0
- package/dist/components/terminal/terminal-theme.d.ts +12 -0
- package/dist/components/terminal/terminal.d.ts +45 -0
- package/dist/components/terminal/types.d.ts +35 -0
- package/dist/components/terminal/use-terminal-session.d.ts +21 -0
- package/dist/components/tree-list/tree-list-order-filter.d.ts +1 -2
- package/dist/components/tree-list/tree-list-visibility-filter.d.ts +1 -1
- package/dist/components/tree-list/tree-list.d.ts +1 -1
- package/dist/data-renderer.js +1669 -0
- package/dist/data-renderer.js.map +1 -0
- package/dist/diff-editor-BnfV8cYB.js +182 -0
- package/dist/diff-editor-BnfV8cYB.js.map +1 -0
- package/dist/diff.js +1313 -0
- package/dist/diff.js.map +1 -0
- package/dist/empty-state-Bo4HVrgr.js +34 -0
- package/dist/empty-state-Bo4HVrgr.js.map +1 -0
- package/dist/foundations/gallery/gallery-frame.d.ts +21 -0
- package/dist/foundations/gallery/sections/badges-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/buttons-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/composite-chat-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/composites-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/feedback-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/input-authoring-card.d.ts +1 -0
- package/dist/foundations/gallery/sections/inputs-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/layout-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/navigation-identity-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/overlays-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/panels-section.d.ts +1 -0
- package/dist/foundations/gallery/sections/param-editor-composite-card.d.ts +1 -0
- package/dist/foundations/gallery/sections/settings-composite-cards.d.ts +1 -0
- package/dist/index.d.ts +11 -84
- package/dist/index.js +3570 -7569
- package/dist/index.js.map +1 -1
- package/dist/list-row-mi3Hn-Um.js +740 -0
- package/dist/list-row-mi3Hn-Um.js.map +1 -0
- package/dist/mermaid-renderer-DZo3qj6D.js +425 -0
- package/dist/mermaid-renderer-DZo3qj6D.js.map +1 -0
- package/dist/mermaid.js +5 -0
- package/dist/mermaid.js.map +1 -0
- package/dist/radio-cLMEBBZk.js +76 -0
- package/dist/radio-cLMEBBZk.js.map +1 -0
- package/dist/resource-badge-qCWHP-wQ.js +99 -0
- package/dist/resource-badge-qCWHP-wQ.js.map +1 -0
- package/dist/{rich-message-DNSEhxXh.js → rich-message-DBf_5YlW.js} +462 -481
- package/dist/rich-message-DBf_5YlW.js.map +1 -0
- package/dist/rich-text.js +300 -299
- package/dist/rich-text.js.map +1 -1
- package/dist/scroll-area-BMbg1WcD.js +91 -0
- package/dist/scroll-area-BMbg1WcD.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/terminal.js +339 -0
- package/dist/terminal.js.map +1 -0
- package/dist/theme/global.d.ts +3 -0
- package/dist/theme/recipes/badge.d.ts +50 -0
- package/dist/theme/recipes/button.d.ts +24 -19
- package/dist/theme/recipes/color-picker.d.ts +1 -0
- package/dist/theme/recipes/dialog.d.ts +1 -1
- package/dist/theme/recipes/drawer.d.ts +1 -1
- package/dist/theme/recipes/input.d.ts +55 -0
- package/dist/theme/recipes/number-input.d.ts +98 -0
- package/dist/theme/recipes/tabs.d.ts +49 -28
- package/dist/theme/recipes/textarea.d.ts +62 -1
- package/dist/theme/recipes/timeline.d.ts +74 -0
- package/dist/theme/tokens/borders.d.ts +0 -3
- package/dist/theme/tokens/colors.d.ts +100 -70
- package/dist/{theme-25P7ij4C.js → theme-CJBYBJaA.js} +1194 -315
- package/dist/theme-CJBYBJaA.js.map +1 -0
- package/dist/theme-preference-DOzHx64J.js +123 -0
- package/dist/theme-preference-DOzHx64J.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/tree-list-CcuZMLS5.js +930 -0
- package/dist/tree-list-CcuZMLS5.js.map +1 -0
- package/dist/workspace-badge-Fuo-1zPj.js +314 -0
- package/dist/workspace-badge-Fuo-1zPj.js.map +1 -0
- package/package.json +23 -3
- package/dist/components/file-tree-helpers.d.ts +0 -8
- package/dist/components/open-source-notices-screen.d.ts +0 -20
- package/dist/components/param-editor/input-group.d.ts +0 -10
- package/dist/components/rich-text/shared/plugins/MermaidPlugin/index.d.ts +0 -1
- package/dist/components/rich-text/shared/plugins/TableActionMenuPlugin/TableActionMenuPlugin.d.ts +0 -5
- package/dist/components/rich-text/shared/plugins/TableCellResizerPlugin/TableCellResizerPlugin.d.ts +0 -2
- package/dist/components/rich-text/theme/report-theme.d.ts +0 -3
- package/dist/components/style-guide-data.d.ts +0 -40
- package/dist/components/style-guide.d.ts +0 -1
- package/dist/mermaid-renderer-CPGj6vsb.js +0 -570
- package/dist/mermaid-renderer-CPGj6vsb.js.map +0 -1
- package/dist/radio-DJtQY9po.js +0 -286
- package/dist/radio-DJtQY9po.js.map +0 -1
- package/dist/resource-badge-CeJTOn8F.js +0 -188
- package/dist/resource-badge-CeJTOn8F.js.map +0 -1
- package/dist/rich-message-DNSEhxXh.js.map +0 -1
- package/dist/theme-25P7ij4C.js.map +0 -1
- package/dist/utils/formats.d.ts +0 -7
- /package/dist/components/{palette-filter.d.ts → command-palette/palette-filter.d.ts} +0 -0
- /package/dist/components/{palette-list.d.ts → command-palette/palette-list.d.ts} +0 -0
- /package/dist/components/{palette-shortcut.d.ts → command-palette/palette-shortcut.d.ts} +0 -0
- /package/dist/components/{palette.d.ts → command-palette/palette.d.ts} +0 -0
- /package/dist/components/{code-editor.d.ts → diff-viewer/code-editor.d.ts} +0 -0
- /package/dist/components/{column-file-browser.d.ts → file-browser/column-file-browser.d.ts} +0 -0
- /package/dist/components/{performance-panel.d.ts → internal/performance-panel.d.ts} +0 -0
- /package/dist/components/{header.d.ts → layout/header.d.ts} +0 -0
- /package/dist/components/{horizontal-menu-stack.d.ts → layout/horizontal-menu-stack.d.ts} +0 -0
- /package/dist/components/{item-section.d.ts → layout/item-section.d.ts} +0 -0
- /package/dist/components/{panel-header.constants.d.ts → layout/panel-header.constants.d.ts} +0 -0
- /package/dist/components/{resizable-split-layout.d.ts → layout/resizable-split-layout.d.ts} +0 -0
- /package/dist/components/{resizable-split-layout.handle.d.ts → layout/resizable-split-layout.handle.d.ts} +0 -0
- /package/dist/components/{attached-panel.d.ts → overlays/attached-panel.d.ts} +0 -0
- /package/dist/components/{bubble-button.d.ts → overlays/bubble-button.d.ts} +0 -0
- /package/dist/components/{bubble-panel.d.ts → overlays/bubble-panel.d.ts} +0 -0
- /package/dist/components/{delete-confirmation-modal.d.ts → overlays/delete-confirmation-modal.d.ts} +0 -0
- /package/dist/components/{repo-picker-dialog.d.ts → overlays/repo-picker-dialog.d.ts} +0 -0
- /package/dist/components/{resource-context-menu.d.ts → overlays/resource-context-menu.d.ts} +0 -0
- /package/dist/components/param-editor/{color-input.d.ts → inputs/color-input.d.ts} +0 -0
- /package/dist/components/param-editor/{date-input.d.ts → inputs/date-input.d.ts} +0 -0
- /package/dist/components/param-editor/{horizontal-text-input.d.ts → inputs/horizontal-text-input.d.ts} +0 -0
- /package/dist/components/param-editor/{number-input.d.ts → inputs/number-input.d.ts} +0 -0
- /package/dist/components/param-editor/{selection-input.d.ts → inputs/selection-input.d.ts} +0 -0
- /package/dist/components/param-editor/{text-input.d.ts → inputs/text-input.d.ts} +0 -0
- /package/dist/components/{alert.d.ts → primitives/alert.d.ts} +0 -0
- /package/dist/components/{checkbox.d.ts → primitives/checkbox.d.ts} +0 -0
- /package/dist/components/{content-placeholder.d.ts → primitives/content-placeholder.d.ts} +0 -0
- /package/dist/components/{empty-state.d.ts → primitives/empty-state.d.ts} +0 -0
- /package/dist/components/{error-boundary.d.ts → primitives/error-boundary.d.ts} +0 -0
- /package/dist/components/{icon-color-picker.d.ts → primitives/icon-color-picker.d.ts} +0 -0
- /package/dist/components/{info-card.d.ts → primitives/info-card.d.ts} +0 -0
- /package/dist/components/{integration-card.d.ts → primitives/integration-card.d.ts} +0 -0
- /package/dist/components/{radio.d.ts → primitives/radio.d.ts} +0 -0
- /package/dist/components/{resource-badge.d.ts → primitives/resource-badge.d.ts} +0 -0
- /package/dist/components/{scroll-area.d.ts → primitives/scroll-area.d.ts} +0 -0
- /package/dist/components/{simple-card.d.ts → primitives/simple-card.d.ts} +0 -0
- /package/dist/components/{slider.d.ts → primitives/slider.d.ts} +0 -0
- /package/dist/components/{switch.d.ts → primitives/switch.d.ts} +0 -0
- /package/dist/components/{toaster.d.ts → primitives/toaster.d.ts} +0 -0
- /package/dist/components/{workspace-badge.d.ts → primitives/workspace-badge.d.ts} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface TerminalSessionRequest {
|
|
2
|
+
/** Command + args to run; defaults to the user's login shell when omitted. */
|
|
3
|
+
command?: string[];
|
|
4
|
+
/** Working directory; falls back to the extension's workspace root. */
|
|
5
|
+
cwd?: string;
|
|
6
|
+
/** Extra env vars merged over the inherited environment. */
|
|
7
|
+
env?: Record<string, string>;
|
|
8
|
+
/** Initial column count; the renderer can resize later. */
|
|
9
|
+
cols: number;
|
|
10
|
+
/** Initial row count; the renderer can resize later. */
|
|
11
|
+
rows: number;
|
|
12
|
+
}
|
|
13
|
+
export type TerminalHostEvent = {
|
|
14
|
+
sessionId: string;
|
|
15
|
+
kind: "data";
|
|
16
|
+
chunk: Uint8Array;
|
|
17
|
+
} | {
|
|
18
|
+
sessionId: string;
|
|
19
|
+
kind: "exit";
|
|
20
|
+
code: number | null;
|
|
21
|
+
signal: string | null;
|
|
22
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ITheme } from '@xterm/xterm';
|
|
2
|
+
/**
|
|
3
|
+
* xterm theme presets aligned with the workbench `bg.inverted` / `fg.inverted`
|
|
4
|
+
* pairings so the terminal blends with the surrounding chrome without the
|
|
5
|
+
* consuming extension touching xterm directly. Consumers can still pass any
|
|
6
|
+
* `ITheme` they like via the `theme` prop.
|
|
7
|
+
*/
|
|
8
|
+
export type TerminalThemeName = "light" | "dark";
|
|
9
|
+
export declare const lightTerminalTheme: ITheme;
|
|
10
|
+
export declare const darkTerminalTheme: ITheme;
|
|
11
|
+
export declare const terminalThemes: Record<TerminalThemeName, ITheme>;
|
|
12
|
+
export declare const resolveTerminalTheme: (theme: TerminalThemeName | ITheme | undefined) => ITheme;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ITheme, Terminal as Xterm } from '@xterm/xterm';
|
|
2
|
+
import { TerminalSink } from './bind-session';
|
|
3
|
+
import { TerminalThemeName } from './terminal-theme';
|
|
4
|
+
import { TerminalBridge, TerminalSessionAdapter, TerminalSessionRequest } from './types';
|
|
5
|
+
export declare const createInitialTerminalSessionRequest: (request?: Partial<TerminalSessionRequest>) => TerminalSessionRequest;
|
|
6
|
+
export declare const resizeSessionToTerminalGeometry: (terminal: Pick<Xterm, "cols" | "rows">, session: Pick<TerminalSessionAdapter, "resize">) => void;
|
|
7
|
+
export declare const bindTerminalSession: (terminal: Pick<Xterm, "cols" | "rows">, sink: TerminalSink, session: TerminalSessionAdapter, options: Pick<TerminalProps, "onSessionOpen" | "onSessionExit">) => () => void;
|
|
8
|
+
export interface TerminalSessionCallbackRefs {
|
|
9
|
+
onSessionOpen: React.RefObject<TerminalProps["onSessionOpen"]>;
|
|
10
|
+
onSessionExit: React.RefObject<TerminalProps["onSessionExit"]>;
|
|
11
|
+
}
|
|
12
|
+
export declare const bindTerminalSessionWithCallbackRefs: (terminal: Pick<Xterm, "cols" | "rows">, sink: TerminalSink, session: TerminalSessionAdapter, callbackRefs: TerminalSessionCallbackRefs) => () => void;
|
|
13
|
+
export interface TerminalProps {
|
|
14
|
+
/** Bridge adapter the component opens its session through. */
|
|
15
|
+
bridge: TerminalBridge;
|
|
16
|
+
/**
|
|
17
|
+
* Optional initial session request overrides. `cols`/`rows` default to
|
|
18
|
+
* 80x24; container resizes are forwarded after the session opens.
|
|
19
|
+
*/
|
|
20
|
+
request?: Partial<TerminalSessionRequest>;
|
|
21
|
+
/** Theme preset name or full xterm theme. */
|
|
22
|
+
theme?: TerminalThemeName | ITheme;
|
|
23
|
+
/** Monospace font family. */
|
|
24
|
+
fontFamily?: string;
|
|
25
|
+
fontSize?: number;
|
|
26
|
+
/** Whether to kill the session when the component unmounts. Defaults to true. */
|
|
27
|
+
killOnUnmount?: boolean;
|
|
28
|
+
/** Forwarded to the container element. */
|
|
29
|
+
className?: string;
|
|
30
|
+
style?: React.CSSProperties;
|
|
31
|
+
/** Called once the session is open; useful for imperative refs. */
|
|
32
|
+
onSessionOpen?: (sessionId: string) => void;
|
|
33
|
+
/** Called once the session exits. */
|
|
34
|
+
onSessionExit?: (exit: {
|
|
35
|
+
code: number | null;
|
|
36
|
+
signal: string | null;
|
|
37
|
+
}) => void;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* High-level terminal component. Mounts xterm.js inside a `<div>` and binds it
|
|
41
|
+
* to the session opened from `bridge.openSession(...)`. Resize is driven by
|
|
42
|
+
* `ResizeObserver` so the terminal fills its container and the host PTY
|
|
43
|
+
* geometry stays in sync.
|
|
44
|
+
*/
|
|
45
|
+
export declare const Terminal: (props: TerminalProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { TerminalHostEvent, TerminalSessionRequest } from './terminal-contract';
|
|
2
|
+
export type { TerminalSessionRequest } from './terminal-contract';
|
|
3
|
+
/**
|
|
4
|
+
* Renderer-side projection of a single terminal session over the
|
|
5
|
+
* `terminal.session` bridge.
|
|
6
|
+
*
|
|
7
|
+
* The host-side `TerminalSessionHandle` exposes a single-consumer async
|
|
8
|
+
* iterable; that contract is impractical inside React, so the renderer side
|
|
9
|
+
* uses observable subscriptions instead. Implementations (real bridge,
|
|
10
|
+
* scripted stub, etc.) are responsible for translating their own transport
|
|
11
|
+
* into these callbacks.
|
|
12
|
+
*/
|
|
13
|
+
export interface TerminalSessionAdapter {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
write(data: string | Uint8Array): void;
|
|
16
|
+
resize(cols: number, rows: number): void;
|
|
17
|
+
kill(signal?: string): Promise<void> | void;
|
|
18
|
+
onData(handler: (chunk: Uint8Array) => void): () => void;
|
|
19
|
+
onExit(handler: (exit: TerminalSessionExit) => void): () => void;
|
|
20
|
+
onError(handler: (error: TerminalSessionError) => void): () => void;
|
|
21
|
+
}
|
|
22
|
+
export type TerminalSessionExit = Omit<Extract<TerminalHostEvent, {
|
|
23
|
+
kind: "exit";
|
|
24
|
+
}>, "kind" | "sessionId">;
|
|
25
|
+
export interface TerminalSessionError {
|
|
26
|
+
message: string;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Renderer-side projection of the `terminal.session` capability. A bridge
|
|
30
|
+
* adapter typically wraps the webview transport, but stubs that drive
|
|
31
|
+
* scripted output (storybook, tests) implement the same shape.
|
|
32
|
+
*/
|
|
33
|
+
export interface TerminalBridge {
|
|
34
|
+
openSession(request: TerminalSessionRequest): Promise<TerminalSessionAdapter>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TerminalBridge, TerminalSessionAdapter, TerminalSessionError, TerminalSessionExit, TerminalSessionRequest } from './types';
|
|
2
|
+
export type TerminalSessionStatus = "idle" | "opening" | "open" | "exited" | "error";
|
|
3
|
+
export interface UseTerminalSessionResult {
|
|
4
|
+
session: TerminalSessionAdapter | null;
|
|
5
|
+
status: TerminalSessionStatus;
|
|
6
|
+
exit: TerminalSessionExit | null;
|
|
7
|
+
error: TerminalSessionError | null;
|
|
8
|
+
}
|
|
9
|
+
export interface UseTerminalSessionOptions {
|
|
10
|
+
bridge: TerminalBridge | null;
|
|
11
|
+
request: TerminalSessionRequest;
|
|
12
|
+
/** Set to false to keep the session alive when the hook unmounts. */
|
|
13
|
+
killOnUnmount?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const createTerminalSessionRequestKey: (request: TerminalSessionRequest) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Opens a terminal session via the provided bridge and surfaces its lifecycle
|
|
18
|
+
* for the renderer. The session is killed on unmount unless explicitly opted
|
|
19
|
+
* out; switching bridges or request contents triggers a fresh open.
|
|
20
|
+
*/
|
|
21
|
+
export declare const useTerminalSession: ({ bridge, request, killOnUnmount }: UseTerminalSessionOptions) => UseTerminalSessionResult;
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { TreeListSection } from './tree-list.types';
|
|
2
2
|
export declare const applyTreeListOrder: (sections: TreeListSection[], sectionOrder: string[], nodeOrderBySection: Record<string, string[]>) => TreeListSection[];
|
|
3
|
-
export declare const reorderNodesById: (nodes: TreeListNode[], order: string[]) => TreeListNode[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { ResourceContextAction } from '../resource-context-menu';
|
|
2
|
+
import { ResourceContextAction } from '../overlays/resource-context-menu';
|
|
3
3
|
import { TreeListNode, TreeListSection } from './tree-list.types';
|
|
4
4
|
import { VisibilityOverride } from './tree-list-visibility.store';
|
|
5
5
|
export declare const resolveVisibility: (override: VisibilityOverride | undefined, hiddenByDefault: boolean | undefined) => VisibilityOverride;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { StackProps } from '@chakra-ui/react';
|
|
2
2
|
import { MouseEvent as ReactMouseEvent, RefObject } from 'react';
|
|
3
|
-
import { ResourceContextAction } from '../resource-context-menu';
|
|
3
|
+
import { ResourceContextAction } from '../overlays/resource-context-menu';
|
|
4
4
|
import { TreeListLinkComponent, TreeListNavigateEvent, TreeListSection } from './tree-list.types';
|
|
5
5
|
export { buildVirtualRows } from './tree-list-model';
|
|
6
6
|
type TreeListRowVariant = "compact" | "tree";
|