@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
|
+
import { FileDropValue } from '../param-editor.types';
|
|
2
|
+
interface AcceptClause {
|
|
3
|
+
kind: "extension" | "mime" | "wildcard";
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
/** Parse an accept string ("image/*,.png,image/jpeg") into normalized clauses. */
|
|
7
|
+
export declare const parseAccept: (accept?: string) => AcceptClause[];
|
|
8
|
+
export interface AcceptCandidate {
|
|
9
|
+
name: string;
|
|
10
|
+
mimeType?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Whether a file satisfies the accept string. An empty accept matches anything. */
|
|
13
|
+
export declare const acceptsFile: (candidate: AcceptCandidate, accept?: string) => boolean;
|
|
14
|
+
interface FileMetadataInput {
|
|
15
|
+
name: string;
|
|
16
|
+
type?: string;
|
|
17
|
+
size?: number;
|
|
18
|
+
dataUrl?: string;
|
|
19
|
+
}
|
|
20
|
+
/** Build the serializable metadata a file-drop control commits (never a live File). */
|
|
21
|
+
export declare const fileDropValueFromFile: (input: FileMetadataInput) => FileDropValue;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { FileDropValue } from '../param-editor.types';
|
|
2
|
+
interface FileDropInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
defaultValue: FileDropValue | null;
|
|
7
|
+
accept?: string;
|
|
8
|
+
assetKind?: "file" | "image";
|
|
9
|
+
onChange: (id: string, value: FileDropValue | null) => void;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const FileDropInput: (props: FileDropInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** Clamp `value` into the inclusive range, tolerating an inverted min/max. */
|
|
2
|
+
export declare const clampToRange: (value: number, min: number, max: number) => number;
|
|
3
|
+
/** Snap `value` to the nearest multiple of `step` measured from `origin`. */
|
|
4
|
+
export declare const snapToStep: (value: number, step: number, origin?: number) => number;
|
|
5
|
+
/** Format a number with an optional unit suffix, trimming float noise. */
|
|
6
|
+
export declare const formatUnitValue: (value: number, unit?: string) => string;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RangeValue } from '../param-editor.types';
|
|
2
|
+
interface RangeInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
defaultValue: RangeValue;
|
|
7
|
+
min: number;
|
|
8
|
+
max: number;
|
|
9
|
+
step?: number;
|
|
10
|
+
unit?: string;
|
|
11
|
+
markerCount?: number;
|
|
12
|
+
onChange: (id: string, value: RangeValue) => void;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const RangeInput: (props: RangeInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { RangeValue } from '../param-editor.types';
|
|
2
|
+
/** Order both handles and clamp (and optionally snap) them into `[min, max]`. */
|
|
3
|
+
export declare const normalizeRange: (value: RangeValue, min: number, max: number, step?: number) => RangeValue;
|
|
4
|
+
/** Replace a single handle, keeping the pair ordered. */
|
|
5
|
+
export declare const updateRangeHandle: (value: RangeValue, index: 0 | 1, next: number, min: number, max: number, step?: number) => RangeValue;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ResourceOption, ResourceRefValue } from '../param-editor.types';
|
|
2
|
+
interface ResourceChipProps {
|
|
3
|
+
option: ResourceOption;
|
|
4
|
+
onOpenResource?: (ref: ResourceRefValue) => void;
|
|
5
|
+
onRemove?: () => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const ResourceChip: (props: ResourceChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
interface ResourceChipListProps {
|
|
9
|
+
options: ResourceOption[];
|
|
10
|
+
onOpenResource?: (ref: ResourceRefValue) => void;
|
|
11
|
+
onRemove?: (optionId: string) => void;
|
|
12
|
+
emptyText?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const ResourceChipList: (props: ResourceChipListProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ResourceOption, ResourceRefValue } from '../param-editor.types';
|
|
2
|
+
interface ResourceInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
defaultValue: string | string[];
|
|
7
|
+
options: ResourceOption[];
|
|
8
|
+
onChange: (id: string, value: string | string[]) => void;
|
|
9
|
+
onOpenResource?: (ref: ResourceRefValue) => void;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
editable?: boolean;
|
|
12
|
+
multiSelect?: boolean;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
emptyText?: string;
|
|
15
|
+
fullWidth?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare const ResourceInput: (props: ResourceInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { SegmentedOption } from '../param-editor.types';
|
|
2
|
+
interface SegmentedInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
defaultValue: string;
|
|
7
|
+
options: SegmentedOption[];
|
|
8
|
+
variant?: "default" | "dots";
|
|
9
|
+
onChange: (id: string, value: string) => void;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
fullWidth?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const SegmentedInput: (props: SegmentedInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { VectorValue } from '../param-editor.types';
|
|
2
|
+
interface VectorInputProps {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
defaultValue: VectorValue;
|
|
7
|
+
xLabel?: string;
|
|
8
|
+
yLabel?: string;
|
|
9
|
+
min?: number;
|
|
10
|
+
max?: number;
|
|
11
|
+
step?: number;
|
|
12
|
+
onChange: (id: string, value: VectorValue) => void;
|
|
13
|
+
readOnly?: boolean;
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare const VectorInput: (props: VectorInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { VectorValue } from '../param-editor.types';
|
|
2
|
+
export interface VectorBounds {
|
|
3
|
+
min?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
}
|
|
6
|
+
/** Update a single axis without dropping the other, clamping into optional bounds. */
|
|
7
|
+
export declare const updateVectorAxis: (value: VectorValue, axis: "x" | "y", next: number, bounds?: VectorBounds) => VectorValue;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type ControlItemOrientation = "auto" | "inline" | "stacked";
|
|
3
|
+
interface ParamEditorControlItemProps {
|
|
4
|
+
name?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
hideLabel?: boolean;
|
|
7
|
+
fullWidth?: boolean;
|
|
8
|
+
/** `auto` renders inline when compact and stacked when full-width. */
|
|
9
|
+
orientation?: ControlItemOrientation;
|
|
10
|
+
/** Rendered on the label row, right-aligned (e.g. an editable value readout). */
|
|
11
|
+
labelTrailing?: ReactNode;
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
export declare const ParamEditorControlItem: (props: ParamEditorControlItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ParamEditorLabel as ParamEditorFieldLabel } from './param-editor-label';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Param, ParamValue, ParamValueMap, ResourceRefValue } from './param-editor.types';
|
|
2
|
+
interface ParamEditorFieldProps {
|
|
3
|
+
param: Param;
|
|
4
|
+
defaultValues: ParamValueMap;
|
|
5
|
+
onChange: (id: string, value: ParamValue) => void;
|
|
6
|
+
onOpenResource?: (ref: ResourceRefValue) => void;
|
|
7
|
+
readOnly?: boolean;
|
|
8
|
+
fullWidth?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const ParamEditorField: (props: ParamEditorFieldProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Param, ParamValue, ParamValueMap, ResourceRefValue } from './param-editor.types';
|
|
2
|
+
interface ParamEditorSectionProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
params: Param[];
|
|
6
|
+
defaultValues: ParamValueMap;
|
|
7
|
+
onChange: (id: string, value: ParamValue) => void;
|
|
8
|
+
onOpenResource?: (ref: ResourceRefValue) => void;
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
fullWidth?: boolean;
|
|
11
|
+
collapsible?: boolean;
|
|
12
|
+
defaultCollapsed?: boolean;
|
|
13
|
+
isFirst?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export declare const ParamEditorSection: (props: ParamEditorSectionProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { InputGroup, Param, ParamValue, ParamValueMap } from './param-editor.types';
|
|
1
|
+
import { InputGroup, Param, ParamValue, ParamValueMap, ResourceRefValue } from './param-editor.types';
|
|
2
2
|
export interface ParamEditorProps {
|
|
3
3
|
params?: Param[];
|
|
4
4
|
groups?: InputGroup[];
|
|
5
5
|
defaultValues?: ParamValueMap;
|
|
6
6
|
onChange?: (id: string, value: ParamValue) => void;
|
|
7
|
+
onOpenResource?: (ref: ResourceRefValue) => void;
|
|
7
8
|
readOnly?: boolean;
|
|
8
9
|
fullWidth?: boolean;
|
|
9
10
|
}
|
|
@@ -41,20 +41,109 @@ export interface PropertyParam extends BaseParam {
|
|
|
41
41
|
type: "property";
|
|
42
42
|
value: ReactNode;
|
|
43
43
|
}
|
|
44
|
-
|
|
45
|
-
export interface
|
|
46
|
-
type:
|
|
47
|
-
|
|
48
|
-
|
|
44
|
+
/** A reference the host can open (e.g. another resource tab). */
|
|
45
|
+
export interface ResourceRefValue {
|
|
46
|
+
type: string;
|
|
47
|
+
id: string;
|
|
48
|
+
label?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Serializable resource chip. Clicking it opens `href` externally, opens `ref` via
|
|
52
|
+
* `onOpenResource`, or copies `copyText` to the clipboard — whichever is set.
|
|
53
|
+
*/
|
|
54
|
+
export interface ResourceOption {
|
|
55
|
+
id: string;
|
|
56
|
+
name: string;
|
|
57
|
+
icon?: string;
|
|
58
|
+
color?: string;
|
|
59
|
+
description?: string;
|
|
60
|
+
href?: string;
|
|
61
|
+
ref?: ResourceRefValue;
|
|
62
|
+
copyText?: string;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Resource references rendered as tags/chips. View-only by default; set `editable`
|
|
66
|
+
* to pick from `options` via a dropdown. Value is the selected option id(s), mirroring
|
|
67
|
+
* {@link SelectionParam}, so it stays JSON-safe across the controls-command boundary.
|
|
68
|
+
*/
|
|
69
|
+
export interface ResourceParam extends BaseParam {
|
|
70
|
+
type: "resource";
|
|
71
|
+
defaultValue: string | string[];
|
|
72
|
+
options: ResourceOption[];
|
|
73
|
+
multiSelect?: boolean;
|
|
74
|
+
editable?: boolean;
|
|
75
|
+
placeholder?: string;
|
|
76
|
+
emptyText?: string;
|
|
49
77
|
}
|
|
50
|
-
export
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
78
|
+
export type RangeValue = [number, number];
|
|
79
|
+
/** Two-handle numeric range control. Values normalize to ordered `[start, end]`. */
|
|
80
|
+
export interface RangeParam extends BaseParam {
|
|
81
|
+
type: "range";
|
|
82
|
+
defaultValue: RangeValue;
|
|
83
|
+
min: number;
|
|
84
|
+
max: number;
|
|
85
|
+
step?: number;
|
|
86
|
+
unit?: string;
|
|
87
|
+
markerCount?: number;
|
|
54
88
|
}
|
|
89
|
+
export interface SegmentedOption {
|
|
90
|
+
id: string;
|
|
91
|
+
name: string;
|
|
92
|
+
icon?: string;
|
|
93
|
+
indicatorColor?: string;
|
|
94
|
+
}
|
|
95
|
+
/** Mutually-exclusive mode control rendered as a segmented button group. */
|
|
96
|
+
export interface SegmentedParam extends BaseParam {
|
|
97
|
+
type: "segmented";
|
|
98
|
+
defaultValue: string;
|
|
99
|
+
options: SegmentedOption[];
|
|
100
|
+
variant?: "default" | "dots";
|
|
101
|
+
}
|
|
102
|
+
export interface ActionOption {
|
|
103
|
+
id: string;
|
|
104
|
+
name: string;
|
|
105
|
+
icon?: string;
|
|
106
|
+
disabled?: boolean;
|
|
107
|
+
}
|
|
108
|
+
/** Compact command set rendered as an action button row. */
|
|
109
|
+
export interface ActionsParam extends BaseParam {
|
|
110
|
+
type: "actions";
|
|
111
|
+
defaultValue?: string;
|
|
112
|
+
options: ActionOption[];
|
|
113
|
+
}
|
|
114
|
+
export type AnchorGridValue = "top-left" | "top" | "top-right" | "left" | "center" | "right" | "bottom-left" | "bottom" | "bottom-right";
|
|
115
|
+
/** Nine-point alignment picker. */
|
|
116
|
+
export interface AnchorGridParam extends BaseParam {
|
|
117
|
+
type: "anchorGrid";
|
|
118
|
+
defaultValue: AnchorGridValue;
|
|
119
|
+
}
|
|
120
|
+
export interface VectorValue {
|
|
121
|
+
x: number;
|
|
122
|
+
y: number;
|
|
123
|
+
}
|
|
124
|
+
/** Paired x/y numeric control. */
|
|
55
125
|
export interface VectorParam extends BaseParam {
|
|
56
126
|
type: "vector";
|
|
57
|
-
defaultValue:
|
|
127
|
+
defaultValue: VectorValue;
|
|
128
|
+
coordinateMode?: "cartesian" | "screen";
|
|
129
|
+
xLabel?: string;
|
|
130
|
+
yLabel?: string;
|
|
131
|
+
min?: number;
|
|
132
|
+
max?: number;
|
|
133
|
+
step?: number;
|
|
134
|
+
}
|
|
135
|
+
/** File selection metadata. Not a live `File` object — hosts own persistence. */
|
|
136
|
+
export interface FileDropValue {
|
|
137
|
+
name: string;
|
|
138
|
+
mimeType?: string;
|
|
139
|
+
size?: number;
|
|
140
|
+
dataUrl?: string;
|
|
141
|
+
}
|
|
142
|
+
export interface FileDropParam extends BaseParam {
|
|
143
|
+
type: "fileDrop";
|
|
144
|
+
defaultValue: FileDropValue | null;
|
|
145
|
+
accept?: string;
|
|
146
|
+
assetKind?: "file" | "image";
|
|
58
147
|
}
|
|
59
148
|
export interface InputGroup {
|
|
60
149
|
id: string;
|
|
@@ -64,13 +153,6 @@ export interface InputGroup {
|
|
|
64
153
|
collapsible?: boolean;
|
|
65
154
|
defaultCollapsed?: boolean;
|
|
66
155
|
}
|
|
67
|
-
export type ParamValue = number | string | null |
|
|
68
|
-
export type Param = NumberParam | TextParam | SelectionParam | DateParam | ColorParam | PropertyParam |
|
|
156
|
+
export type ParamValue = number | string | null | string[] | RangeValue | VectorValue | FileDropValue;
|
|
157
|
+
export type Param = NumberParam | TextParam | SelectionParam | DateParam | ColorParam | PropertyParam | ResourceParam | RangeParam | SegmentedParam | ActionsParam | AnchorGridParam | VectorParam | FileDropParam;
|
|
69
158
|
export type ParamValueMap = Record<string, ParamValue>;
|
|
70
|
-
type WithOptionalDefault<T extends {
|
|
71
|
-
defaultValue: unknown;
|
|
72
|
-
}> = Omit<T, "defaultValue"> & {
|
|
73
|
-
defaultValue?: T["defaultValue"];
|
|
74
|
-
};
|
|
75
|
-
export type ParamConfig = WithOptionalDefault<NumberParam> | WithOptionalDefault<TextParam> | WithOptionalDefault<SelectionParam> | WithOptionalDefault<DateParam> | WithOptionalDefault<ColorParam> | WithOptionalDefault<ObjectParam> | WithOptionalDefault<ListParam> | WithOptionalDefault<VectorParam>;
|
|
76
|
-
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Breadcrumb as ChakraBreadcrumb, SystemStyleObject } from '@chakra-ui/react';
|
|
2
|
-
import { ResourceContextAction } from '
|
|
2
|
+
import { ResourceContextAction } from '../overlays/resource-context-menu';
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
export interface BreadcrumbItem {
|
|
5
5
|
title: React.ReactNode;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export type { AlertProps } from './alert';
|
|
2
|
+
export { AlertMessage } from './alert';
|
|
3
|
+
export type { BreadcrumbItem } from './breadcrumb';
|
|
4
|
+
export { Breadcrumb } from './breadcrumb';
|
|
5
|
+
export type { CheckboxProps } from './checkbox';
|
|
6
|
+
export { Checkbox } from './checkbox';
|
|
7
|
+
export { ContentPlaceholder, Label as ContentPlaceholderLabel } from './content-placeholder';
|
|
8
|
+
export type { EmptyStateProps } from './empty-state';
|
|
9
|
+
export { EmptyState } from './empty-state';
|
|
10
|
+
export { ErrorBoundary } from './error-boundary';
|
|
11
|
+
export type { IconColorPickerIconOption, IconColorPickerProps } from './icon-color-picker';
|
|
12
|
+
export { getIconComponent, IconColorPicker, optionColors, optionIcons } from './icon-color-picker';
|
|
13
|
+
export type { IntegrationCardProps } from './integration-card';
|
|
14
|
+
export { IntegrationCard } from './integration-card';
|
|
15
|
+
export type { RadioProps } from './radio';
|
|
16
|
+
export { Radio, RadioGroup } from './radio';
|
|
17
|
+
export { ResourceBadge } from './resource-badge';
|
|
18
|
+
export { ScrollArea } from './scroll-area';
|
|
19
|
+
export type { SessionCompletionStatus } from './session-indicator';
|
|
20
|
+
export { resolveSessionIndicatorColor, resolveSessionIndicatorIcon, SessionIndicator } from './session-indicator';
|
|
21
|
+
export type { SimpleCardBodyProps, SimpleCardProps } from './simple-card';
|
|
22
|
+
export { SimpleCard, SimpleCardBody } from './simple-card';
|
|
23
|
+
export type { SwitchProps } from './switch';
|
|
24
|
+
export { Switch } from './switch';
|
|
25
|
+
export { Toaster, toaster } from './toaster';
|
|
26
|
+
export { Tooltip } from './tooltip';
|
|
27
|
+
export type { WorkspaceBadgeProps } from './workspace-badge';
|
|
28
|
+
export { WorkspaceBadge } from './workspace-badge';
|
|
@@ -4,5 +4,3 @@ export interface NumberInputProps extends ChakraNumberInput.RootProps {
|
|
|
4
4
|
}
|
|
5
5
|
export declare const NumberInputRoot: React.ForwardRefExoticComponent<NumberInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
6
|
export declare const NumberInputField: React.ForwardRefExoticComponent<ChakraNumberInput.InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
7
|
-
export declare const NumberInputScrubber: React.ForwardRefExoticComponent<ChakraNumberInput.ScrubberProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export declare const NumberInputLabel: React.ForwardRefExoticComponent<ChakraNumberInput.LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Icon } from '@chakra-ui/react';
|
|
2
2
|
import { ComponentProps } from 'react';
|
|
3
|
-
export
|
|
3
|
+
export declare const sessionCompletionStatuses: readonly ["in_progress", "awaiting_input", "queued", "completed", "failed", "cancelled", "disconnected"];
|
|
4
|
+
export type SessionCompletionStatus = (typeof sessionCompletionStatuses)[number];
|
|
4
5
|
export declare const resolveSessionIndicatorIcon: (status: SessionCompletionStatus | undefined) => import('react').ForwardRefExoticComponent<Omit<import('lucide-react').LucideProps, "ref"> & import('react').RefAttributes<SVGSVGElement>>;
|
|
5
6
|
export declare const resolveSessionIndicatorColor: (status: SessionCompletionStatus | undefined) => "fg.muted" | "fg.error" | "fg.warning" | "fg.success" | "fg.info";
|
|
6
7
|
interface SessionIndicatorProps {
|
|
@@ -2,7 +2,6 @@ import { Tooltip as ChakraTooltip } from '@chakra-ui/react';
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
export interface TooltipProps extends ChakraTooltip.RootProps {
|
|
4
4
|
children?: React.ReactElement;
|
|
5
|
-
showArrow?: boolean;
|
|
6
5
|
portalled?: boolean;
|
|
7
6
|
portalRef?: React.RefObject<HTMLElement>;
|
|
8
7
|
content: React.ReactNode;
|
|
@@ -1,19 +1,2 @@
|
|
|
1
|
-
export declare const UPLOAD_FILE_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
2
|
-
export declare const OPEN_CONTEXT_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
3
|
-
export declare const RUN_PROMPT_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
4
|
-
export declare const UPDATE_FORMAT_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
5
|
-
export declare const UPDATE_BEHAVIOR_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
6
|
-
export declare const INSERT_PROMPT_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
7
|
-
export declare const RENAME_PROMPT_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
8
|
-
export declare const DUPLICATE_PROMPT_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
9
|
-
export declare const DELETE_PROMPT_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
10
|
-
export declare const DELETE_REFERENCES_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
11
|
-
export declare const RENAME_REFERENCES_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
12
1
|
export declare const INSERT_REFERENCE_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
13
2
|
export declare const INSERT_BLOCK_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
14
|
-
export declare const INSERT_NEW_FILE_PLACEHOLDER = "INSERT_NEW_FILE_PLACEHOLDER";
|
|
15
|
-
export declare const INSERT_NEW_TEXT_PLACEHOLDER = "INSERT_NEW_TEXT_PLACEHOLDER";
|
|
16
|
-
export declare const INSERT_PLACEHOLDER_REFERENCE = "INSERT_PLACEHOLDER_REFERENCE";
|
|
17
|
-
export declare const INSERT_NEW_FILE_PLACEHOLDER_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
18
|
-
export declare const INSERT_NEW_TEXT_PLACEHOLDER_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
19
|
-
export declare const INSERT_PLACEHOLDER_REFERENCE_COMMAND: import('lexical').LexicalCommand<unknown>;
|
|
@@ -1,15 +1,2 @@
|
|
|
1
|
-
export declare const FOCUS_EDITOR = "FOCUS_EDITOR";
|
|
2
|
-
export declare const UPLOAD_FILE = "UPLOAD_FILE";
|
|
3
|
-
export declare const OPEN_CONTEXT = "OPEN_CONTEXT";
|
|
4
|
-
export declare const DROP_EVENT = "DROP_EVENT";
|
|
5
|
-
export declare const RUN_PROMPT = "RUN_PROMPT";
|
|
6
|
-
export declare const UPDATE_FORMAT = "UPDATE_FORMAT";
|
|
7
|
-
export declare const UPDATE_BEHAVIOR = "UPDATE_BEHAVIOR";
|
|
8
|
-
export declare const INSERT_PROMPT = "INSERT_PROMPT";
|
|
9
|
-
export declare const RENAME_PROMPT = "RENAME_PROMPT";
|
|
10
|
-
export declare const DUPLICATE_PROMPT = "DUPLICATE_PROMPT";
|
|
11
|
-
export declare const DELETE_PROMPT = "DELETE_PROMPT";
|
|
12
|
-
export declare const DELETE_REFERENCES = "DELETE_REFERENCES";
|
|
13
|
-
export declare const RENAME_REFERENCES = "RENAME_REFERENCES";
|
|
14
1
|
export declare const INSERT_REFERENCE = "INSERT_REFERENCE";
|
|
15
2
|
export declare const INSERT_BLOCK = "INSERT_BLOCK";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DOMConversionMap, DOMExportOutput, EditorConfig, ElementNode, LexicalEditor,
|
|
1
|
+
import { DOMConversionMap, DOMExportOutput, EditorConfig, ElementNode, LexicalEditor, ParagraphNode, RangeSelection, SerializedElementNode } from 'lexical';
|
|
2
2
|
export type SerializedCommentNode = SerializedElementNode;
|
|
3
3
|
export declare class CommentNode extends ElementNode {
|
|
4
4
|
static getType(): string;
|
|
@@ -14,4 +14,3 @@ export declare class CommentNode extends ElementNode {
|
|
|
14
14
|
collapseAtStart(): true;
|
|
15
15
|
}
|
|
16
16
|
export declare function $createCommentNode(): CommentNode;
|
|
17
|
-
export declare function $isCommentNode(node: LexicalNode | null | undefined): node is CommentNode;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor,
|
|
1
|
+
import { DOMConversionMap, DOMExportOutput, EditorConfig, LexicalEditor, NodeKey, SerializedTextNode, Spread, TextNode } from 'lexical';
|
|
2
2
|
type SerializedReferenceNode = Spread<{
|
|
3
3
|
referenceId: string;
|
|
4
4
|
name: string;
|
|
@@ -22,5 +22,4 @@ export declare class ReferenceNode extends TextNode {
|
|
|
22
22
|
getTextContent(): string;
|
|
23
23
|
}
|
|
24
24
|
export declare function $createReferenceNode(referenceId: string, name: string): ReferenceNode;
|
|
25
|
-
export declare function $isReferenceNode(node: LexicalNode | null | undefined): node is ReferenceNode;
|
|
26
25
|
export {};
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare function $getAllNodesOfType<T extends LexicalNode>(nodeType: Klass<T>): T[];
|
|
1
|
+
import { RootNode } from 'lexical';
|
|
3
2
|
export declare const $getTextContent: (root: RootNode) => string;
|
|
4
3
|
export declare const getTextFromSerializedEditorState: (state: string) => string;
|
|
5
4
|
export declare const emptyEditorState: {
|
|
@@ -19,5 +19,4 @@ export declare class MermaidNode extends DecoratorNode<ReactNode> {
|
|
|
19
19
|
setCode(code: string): void;
|
|
20
20
|
decorate(): import("react/jsx-runtime").JSX.Element;
|
|
21
21
|
}
|
|
22
|
-
export declare function $createMermaidNode(code?: string): MermaidNode;
|
|
23
22
|
export declare function $isMermaidNode(node: LexicalNode | null | undefined): node is MermaidNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function inferResourceTypeFromMediaType(mediaType: string): "text" | "table" | "image" | "json" | "
|
|
1
|
+
export declare function inferResourceTypeFromMediaType(mediaType: string): "text" | "table" | "image" | "json" | "pdf" | "markdown";
|
|
@@ -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 { TreeListLinkComponent, TreeListNavigateEvent, TreeListSection } from '../tree-list/tree-list.types';
|
|
4
4
|
export interface SidebarProps {
|
|
5
5
|
storageKey: string;
|
|
@@ -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 { VisibilityOverride } from '../tree-list/tree-list-visibility.store';
|
|
4
4
|
export interface TabVisibilityPlacement {
|
|
5
5
|
closable?: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconColorPickerIconOption } from '../icon-color-picker';
|
|
1
|
+
import { IconColorPickerIconOption } from '../primitives/icon-color-picker';
|
|
2
2
|
import { TagEditorAction, TagEditorValue } from './tag-editor.types';
|
|
3
3
|
interface TagEditorRowProps {
|
|
4
4
|
actionOptions?: TagEditorAction[];
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { TerminalSessionAdapter } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Minimal subset of xterm.js that the binding needs. Tests substitute a fake
|
|
4
|
+
* sink so the wire-up logic can be exercised without a DOM.
|
|
5
|
+
*/
|
|
6
|
+
export interface TerminalSink {
|
|
7
|
+
write(data: string | Uint8Array): void;
|
|
8
|
+
onInput(handler: (data: string) => void): () => void;
|
|
9
|
+
onResize(handler: (size: {
|
|
10
|
+
cols: number;
|
|
11
|
+
rows: number;
|
|
12
|
+
}) => void): () => void;
|
|
13
|
+
}
|
|
14
|
+
export interface BindSessionOptions {
|
|
15
|
+
/** Forwarded to the session when the user types in the sink. */
|
|
16
|
+
onInput?: (data: string) => void;
|
|
17
|
+
/** Called once the session exits; useful for surfacing status. */
|
|
18
|
+
onExit?: (exit: {
|
|
19
|
+
code: number | null;
|
|
20
|
+
signal: string | null;
|
|
21
|
+
}) => void;
|
|
22
|
+
/** Called on transport errors. */
|
|
23
|
+
onError?: (error: {
|
|
24
|
+
message: string;
|
|
25
|
+
}) => void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Wires a {@link TerminalSink} (typically xterm.js) to a
|
|
29
|
+
* {@link TerminalSessionAdapter}. Returns a disposer that detaches every
|
|
30
|
+
* subscription it created. The session itself is *not* killed — owning the
|
|
31
|
+
* session lifecycle is the caller's responsibility.
|
|
32
|
+
*/
|
|
33
|
+
export declare const bindSessionToSink: (sink: TerminalSink, session: TerminalSessionAdapter, options?: BindSessionOptions) => () => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { type BindSessionOptions, bindSessionToSink, type TerminalSink } from './bind-session';
|
|
2
|
+
export { createScriptedTerminalBridge, type ScriptedBridgeOptions, type ScriptedTerminalStep, } from './scripted-bridge';
|
|
3
|
+
export { Terminal, type TerminalProps } from './terminal';
|
|
4
|
+
export { darkTerminalTheme, lightTerminalTheme, resolveTerminalTheme, type TerminalThemeName, terminalThemes, } from './terminal-theme';
|
|
5
|
+
export type { TerminalBridge, TerminalSessionAdapter, TerminalSessionError, TerminalSessionExit, TerminalSessionRequest, } from './types';
|
|
6
|
+
export { type TerminalSessionStatus, type UseTerminalSessionOptions, type UseTerminalSessionResult, useTerminalSession, } from './use-terminal-session';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { TerminalBridge } from './types';
|
|
2
|
+
export interface ScriptedTerminalStep {
|
|
3
|
+
/** Bytes the host pushes back to the renderer (utf-8 string is encoded for you). */
|
|
4
|
+
data?: string | Uint8Array;
|
|
5
|
+
/** Milliseconds to wait before delivering this step. */
|
|
6
|
+
delayMs?: number;
|
|
7
|
+
/** Marks the session as exited after this step. */
|
|
8
|
+
exit?: {
|
|
9
|
+
code: number | null;
|
|
10
|
+
signal?: string | null;
|
|
11
|
+
};
|
|
12
|
+
/** Delivers a transport error after this step. */
|
|
13
|
+
error?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ScriptedBridgeOptions {
|
|
16
|
+
/** Initial script delivered after the first data subscriber attaches. */
|
|
17
|
+
initial?: ScriptedTerminalStep[];
|
|
18
|
+
/**
|
|
19
|
+
* Responds to user input. Return additional steps to play, or `undefined`
|
|
20
|
+
* to ignore. Defaults to echoing the input followed by a newline.
|
|
21
|
+
*/
|
|
22
|
+
onInput?: (input: string) => ScriptedTerminalStep[] | undefined;
|
|
23
|
+
/** Called whenever the renderer requests a resize. */
|
|
24
|
+
onResize?: (size: {
|
|
25
|
+
cols: number;
|
|
26
|
+
rows: number;
|
|
27
|
+
}) => void;
|
|
28
|
+
/** Called once when the renderer kills the session. */
|
|
29
|
+
onKill?: (signal?: string) => void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Deterministic in-memory bridge. Used by stories and tests to exercise the
|
|
33
|
+
* terminal UI without a real PTY supervisor.
|
|
34
|
+
*/
|
|
35
|
+
export declare const createScriptedTerminalBridge: (options?: ScriptedBridgeOptions) => TerminalBridge;
|