@pstdio/ui 0.17.0 → 0.19.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.
Files changed (132) hide show
  1. package/dist/{MermaidComponent-BCMQqPqu.js → MermaidComponent-BPiVFNYK.js} +2 -2
  2. package/dist/{MermaidComponent-BCMQqPqu.js.map → MermaidComponent-BPiVFNYK.js.map} +1 -1
  3. package/dist/chat-ui.js +941 -899
  4. package/dist/chat-ui.js.map +1 -1
  5. package/dist/components/chat-ui/components/chat-message-list-items.d.ts +17 -0
  6. package/dist/components/chat-ui/components/message-types.d.ts +1 -0
  7. package/dist/components/chat-ui/components/timeline.d.ts +2 -0
  8. package/dist/components/chat-ui/tool-rendering/default-renderers.d.ts +1 -0
  9. package/dist/components/chat-ui/tool-rendering/shared.d.ts +3 -2
  10. package/dist/components/chat-ui/tool-rendering/standard-renderers.d.ts +1 -0
  11. package/dist/components/data-table/data-table-column-menu.d.ts +4 -1
  12. package/dist/components/data-table/data-table-header.d.ts +0 -8
  13. package/dist/components/data-table/data-table-skeleton.d.ts +13 -0
  14. package/dist/components/data-table/editable-cells-story.d.ts +9 -0
  15. package/dist/components/data-table/index.d.ts +2 -0
  16. package/dist/components/diff-viewer/code-editor.d.ts +2 -0
  17. package/dist/components/diff-viewer/index.d.ts +1 -1
  18. package/dist/components/diff-viewer/monaco-browser.d.ts +1 -0
  19. package/dist/components/overlays/dialog-accept-shortcut.d.ts +12 -0
  20. package/dist/components/overlays/index.d.ts +1 -0
  21. package/dist/components/overlays/searchable-menu-input.d.ts +9 -0
  22. package/dist/components/param-editor/index.d.ts +7 -2
  23. package/dist/components/param-editor/inputs/action-input.d.ts +1 -0
  24. package/dist/components/param-editor/inputs/boolean-input.d.ts +13 -0
  25. package/dist/components/param-editor/inputs/color-input.d.ts +1 -0
  26. package/dist/components/param-editor/inputs/date-input.d.ts +1 -0
  27. package/dist/components/param-editor/inputs/file-upload-input.d.ts +15 -0
  28. package/dist/components/param-editor/inputs/file-upload-value.d.ts +7 -0
  29. package/dist/components/param-editor/inputs/horizontal-text-input.d.ts +1 -0
  30. package/dist/components/param-editor/inputs/markdown-input.d.ts +13 -0
  31. package/dist/components/param-editor/inputs/number-input.d.ts +1 -0
  32. package/dist/components/param-editor/inputs/range-input.d.ts +1 -0
  33. package/dist/components/param-editor/inputs/resource-input.d.ts +2 -0
  34. package/dist/components/param-editor/inputs/segmented-input.d.ts +1 -0
  35. package/dist/components/param-editor/inputs/selection-input.d.ts +6 -0
  36. package/dist/components/param-editor/inputs/selection-menu.d.ts +10 -0
  37. package/dist/components/param-editor/inputs/text-input.d.ts +1 -0
  38. package/dist/components/param-editor/param-editor-advanced-field.d.ts +14 -0
  39. package/dist/components/param-editor/param-editor-control-fixtures.d.ts +24 -0
  40. package/dist/components/param-editor/param-editor-field.d.ts +2 -0
  41. package/dist/components/param-editor/param-editor-horizontal.d.ts +2 -2
  42. package/dist/components/param-editor/param-editor-label.d.ts +1 -0
  43. package/dist/components/param-editor/param-editor-presentation.d.ts +3 -0
  44. package/dist/components/param-editor/param-editor-row.d.ts +17 -0
  45. package/dist/components/param-editor/param-editor.types.d.ts +43 -13
  46. package/dist/components/param-editor/resolve-param-value.d.ts +2 -0
  47. package/dist/components/primitives/chip.d.ts +4 -0
  48. package/dist/components/primitives/glyph-icon.d.ts +16 -0
  49. package/dist/components/primitives/icon-color-picker.d.ts +3 -13
  50. package/dist/components/primitives/icon-options.d.ts +301 -0
  51. package/dist/components/primitives/index.d.ts +12 -3
  52. package/dist/components/primitives/resource-badge.d.ts +12 -10
  53. package/dist/components/primitives/segmented-control.d.ts +20 -0
  54. package/dist/components/primitives/tag-swatch.d.ts +10 -0
  55. package/dist/components/rich-text/index.d.ts +1 -0
  56. package/dist/components/rich-text/lazy-markdown-editor.d.ts +2 -0
  57. package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -1
  58. package/dist/components/tag-editor/index.d.ts +4 -0
  59. package/dist/components/tag-editor/tag-editor-heading.d.ts +11 -0
  60. package/dist/components/tag-editor/tag-editor-row.d.ts +1 -1
  61. package/dist/components/tag-editor/tag-editor-save-bar.d.ts +13 -0
  62. package/dist/components/tag-editor/tag-editor.types.d.ts +11 -11
  63. package/dist/components/tag-editor/tag-settings-panel.d.ts +3 -1
  64. package/dist/data-table.js +1018 -926
  65. package/dist/data-table.js.map +1 -1
  66. package/dist/dialog-accept-shortcut-DAEBsoWW.js +7 -0
  67. package/dist/dialog-accept-shortcut-DAEBsoWW.js.map +1 -0
  68. package/dist/diff.js +370 -366
  69. package/dist/diff.js.map +1 -1
  70. package/dist/font/css/prompt-studio-icons.css +720 -0
  71. package/dist/font/prompt-studio-icons.eot +0 -0
  72. package/dist/font/prompt-studio-icons.svg +1 -0
  73. package/dist/font/prompt-studio-icons.ttf +0 -0
  74. package/dist/font/prompt-studio-icons.woff +0 -0
  75. package/dist/font/prompt-studio-icons.woff2 +0 -0
  76. package/dist/index.d.ts +2 -2
  77. package/dist/index.js +1958 -1744
  78. package/dist/index.js.map +1 -1
  79. package/dist/{kanban-renderer-toolbar-B9ro-9z1.js → kanban-renderer-toolbar-Bcj_N1qr.js} +66 -66
  80. package/dist/kanban-renderer-toolbar-Bcj_N1qr.js.map +1 -0
  81. package/dist/kanban-renderer.js +834 -817
  82. package/dist/kanban-renderer.js.map +1 -1
  83. package/dist/lazy-markdown-editor-DwhqQ-NN.js +26 -0
  84. package/dist/lazy-markdown-editor-DwhqQ-NN.js.map +1 -0
  85. package/dist/list-row-BtoVJpFs.js +821 -0
  86. package/dist/list-row-BtoVJpFs.js.map +1 -0
  87. package/dist/markdown-DDd2ESoH.js +743 -0
  88. package/dist/markdown-DDd2ESoH.js.map +1 -0
  89. package/dist/markdown-editor-CYVkzt8t.js +741 -0
  90. package/dist/markdown-editor-CYVkzt8t.js.map +1 -0
  91. package/dist/monaco-browser-CO0NxK_Z.js +19 -0
  92. package/dist/monaco-browser-CO0NxK_Z.js.map +1 -0
  93. package/dist/param-editor-XRjSu6MT.js +161 -0
  94. package/dist/param-editor-XRjSu6MT.js.map +1 -0
  95. package/dist/param-editor-field-B9lEPq8c.js +3028 -0
  96. package/dist/param-editor-field-B9lEPq8c.js.map +1 -0
  97. package/dist/resource-badge-CuItchgL.js +98 -0
  98. package/dist/resource-badge-CuItchgL.js.map +1 -0
  99. package/dist/rich-message--eRzjWYK.js +730 -0
  100. package/dist/rich-message--eRzjWYK.js.map +1 -0
  101. package/dist/rich-text.js +114 -827
  102. package/dist/rich-text.js.map +1 -1
  103. package/dist/style.css +1 -1
  104. package/dist/theme/primitives/fonts.d.ts +3 -0
  105. package/dist/theme/primitives/sizes.d.ts +59 -0
  106. package/dist/theme/recipes/badge.d.ts +8 -0
  107. package/dist/theme/recipes/color-picker.d.ts +18 -1
  108. package/dist/theme/recipes/segmented-control.d.ts +22 -0
  109. package/dist/theme/recipes/switch.d.ts +18 -0
  110. package/dist/theme/recipes/tabs.d.ts +11 -0
  111. package/dist/{theme-CNhnbvcE.js → theme-7PDdD9OD.js} +403 -195
  112. package/dist/theme-7PDdD9OD.js.map +1 -0
  113. package/dist/theme.js +1 -1
  114. package/dist/{tree-list-CZHLAURU.js → tree-list-B2L0cTj2.js} +2 -2
  115. package/dist/{tree-list-CZHLAURU.js.map → tree-list-B2L0cTj2.js.map} +1 -1
  116. package/package.json +3 -2
  117. package/dist/components/param-editor/inputs/file-accept.d.ts +0 -22
  118. package/dist/components/param-editor/inputs/file-drop-input.d.ts +0 -14
  119. package/dist/kanban-renderer-toolbar-B9ro-9z1.js.map +0 -1
  120. package/dist/list-row-YRUxEcy3.js +0 -808
  121. package/dist/list-row-YRUxEcy3.js.map +0 -1
  122. package/dist/param-editor-CYZJbmKu.js +0 -933
  123. package/dist/param-editor-CYZJbmKu.js.map +0 -1
  124. package/dist/param-editor-read-only-field-DgtLqcFa.js +0 -925
  125. package/dist/param-editor-read-only-field-DgtLqcFa.js.map +0 -1
  126. package/dist/prism-BXb57lxL.js +0 -125
  127. package/dist/prism-BXb57lxL.js.map +0 -1
  128. package/dist/resource-badge-qCWHP-wQ.js +0 -99
  129. package/dist/resource-badge-qCWHP-wQ.js.map +0 -1
  130. package/dist/rich-message-DBf_5YlW.js +0 -1450
  131. package/dist/rich-message-DBf_5YlW.js.map +0 -1
  132. package/dist/theme-CNhnbvcE.js.map +0 -1
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from 'react';
2
+ import { SessionMessage } from './message-types';
3
+ interface ChatMessageListResponseProps {
4
+ message: SessionMessage;
5
+ streaming: boolean;
6
+ hideQuestionForms?: boolean;
7
+ animate?: boolean;
8
+ showAssistantActions: boolean;
9
+ }
10
+ export declare const ChatMessageListResponse: (props: ChatMessageListResponseProps) => import("react/jsx-runtime").JSX.Element;
11
+ interface StickyMessageToggleProps {
12
+ label: string;
13
+ onClick: () => void;
14
+ actionPanel?: ReactNode;
15
+ }
16
+ export declare const StickyMessageToggle: (props: StickyMessageToggleProps) => import("react/jsx-runtime").JSX.Element;
17
+ export {};
@@ -109,6 +109,7 @@ export interface MessageGroup {
109
109
  userMessage: SessionMessage;
110
110
  responses: SessionMessage[];
111
111
  }
112
+ export declare const getAssistantMessageActionTargetId: (messages: SessionMessage[]) => string | null;
112
113
  export declare const groupMessagesByTurn: (messages: SessionMessage[]) => {
113
114
  groups: MessageGroup[];
114
115
  leadingResponses: SessionMessage[];
@@ -27,6 +27,8 @@ export type TitleSegment = {
27
27
  text: string;
28
28
  bold?: boolean;
29
29
  muted?: boolean;
30
+ truncate?: boolean;
31
+ monospace?: boolean;
30
32
  } | {
31
33
  kind: "avatar";
32
34
  src: string;
@@ -6,6 +6,7 @@ export declare const createDefaultToolRenderers: () => {
6
6
  grep: import('./types').ToolRenderer;
7
7
  question: import('./types').ToolRenderer;
8
8
  read: import('./types').ToolRenderer;
9
+ shell: import('./types').ToolRenderer;
9
10
  skill: import('./types').ToolRenderer;
10
11
  todo_write: import('./types').ToolRenderer;
11
12
  todowrite: import('./types').ToolRenderer;
@@ -17,13 +17,14 @@ export declare const buildIndicator: (invocation: ToolPart) => {
17
17
  readonly type: "icon";
18
18
  readonly icon: "search" | "dot" | "danger" | "file" | "terminal" | "shell" | "ls" | "read_file" | "write_file" | "delete_file" | "patch" | "upload_files" | "download_file" | "move_file" | "browser" | "question" | "todo";
19
19
  };
20
- export declare const buildBaseTitle: (invocation: ToolPart, detail?: string, labelOverride?: string) => TitleSegment[];
20
+ export declare const buildBaseTitle: (invocation: ToolPart, detail?: string, labelOverride?: string, detailStyle?: "monospace") => TitleSegment[];
21
21
  export declare const getInputObject: (invocation: ToolPart) => Record<string, unknown> | null;
22
22
  export declare const getOutputObject: (invocation: ToolPart) => Record<string, unknown> | null;
23
23
  export declare const getStringValue: (value: unknown) => string | null;
24
24
  export declare const getObjectValue: (value: unknown) => Record<string, unknown> | null;
25
25
  export declare const getStateObject: (invocation: ToolPart, key: string) => Record<string, unknown> | null;
26
26
  export declare const getApplyPatchMetadataFiles: (invocation: ToolPart) => ApplyPatchMetadataFile[];
27
+ export declare const getApplyPatchInputFilePaths: (invocation: ToolPart) => string[];
27
28
  export declare const getApplyPatchDiffText: (invocation: ToolPart) => string | null;
28
29
  export declare const buildApplyPatchMetadataTitleSegments: (files: ApplyPatchMetadataFile[]) => TitleSegment[];
29
30
  export declare const getApplyPatchMetadataReferences: (files: ApplyPatchMetadataFile[]) => string[];
@@ -33,7 +34,7 @@ export declare const parseSkillContentBlock: (value: string) => {
33
34
  content: string;
34
35
  } | null;
35
36
  export declare const getSkillName: (invocation: ToolPart) => string | undefined;
36
- export declare const buildFileLinkSegment: (filePath: string) => TitleSegment;
37
+ export declare const buildFileLinkSegment: (filePath: string, variant?: "default" | "bubble") => TitleSegment;
37
38
  export declare const prependErrorBlock: (invocation: ToolPart, blocks: Block[]) => Block[];
38
39
  export declare const getDiffBlocks: (diffText?: string | null) => {
39
40
  type: "diff";
@@ -1,6 +1,7 @@
1
1
  import { ToolRenderer } from './types';
2
2
  export declare const renderRead: ToolRenderer;
3
3
  export declare const renderBash: ToolRenderer;
4
+ export declare const renderShell: ToolRenderer;
4
5
  export declare const renderGrep: ToolRenderer;
5
6
  export declare const renderGlob: ToolRenderer;
6
7
  export declare const renderSkill: ToolRenderer;
@@ -5,8 +5,11 @@ interface DataTableColumnMenuColumn {
5
5
  interface DataTableColumnMenuProps {
6
6
  columns: DataTableColumnMenuColumn[];
7
7
  visibleColumnIds: Set<string>;
8
- onColumnToggle: (columnId: string) => void;
8
+ showStats: boolean;
9
+ statsAvailable: boolean;
10
+ onColumnVisibilityChange: (columnId: string, visible: boolean) => void;
9
11
  onColumnReorder: (activeColumnId: string, overColumnId: string) => void;
12
+ onStatsVisibilityChange: (showStats: boolean) => void;
10
13
  }
11
14
  export declare const DataTableColumnMenu: (props: DataTableColumnMenuProps) => import("react/jsx-runtime").JSX.Element;
12
15
  export {};
@@ -1,18 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { AttributeDescriptor, KanbanRendererRow } from '../kanban-renderer/types';
3
- import { DataTableSelectionAction, RowData } from './types';
4
3
  interface DataTableHeaderProps {
5
4
  rows: KanbanRendererRow[];
6
5
  attributes: AttributeDescriptor[];
7
6
  storageKey: string;
8
- selectedCount: number;
9
- totalCount: number;
10
- visibleCount: number;
11
- actions: DataTableSelectionAction[];
12
- selectedRows: RowData[];
13
7
  columnControl: ReactNode;
14
- onClearSelection: () => void;
15
- onSelectAll: () => void;
16
8
  }
17
9
  export declare const DataTableHeader: (props: DataTableHeaderProps) => import("react/jsx-runtime").JSX.Element;
18
10
  export {};
@@ -0,0 +1,13 @@
1
+ export interface DataTableSkeletonColumn {
2
+ id: string;
3
+ label: string;
4
+ }
5
+ interface DataTableSkeletonProps {
6
+ /** Real column headers when the caller already knows them. */
7
+ columns?: DataTableSkeletonColumn[];
8
+ /** Placeholder column count when the headers are still unknown. */
9
+ columnCount?: number;
10
+ rowCount?: number;
11
+ }
12
+ export declare const DataTableSkeleton: (props: DataTableSkeletonProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -0,0 +1,9 @@
1
+ import { DataTableProps } from '.';
2
+ interface EditableCellsStoryProps {
3
+ args: DataTableProps;
4
+ height?: string;
5
+ marginX?: string;
6
+ maxWidth?: string;
7
+ }
8
+ export declare const EditableCellsStory: (props: EditableCellsStoryProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -1,4 +1,6 @@
1
1
  export { DataTable } from './data-table';
2
+ export type { DataTableSkeletonColumn } from './data-table-skeleton';
3
+ export { DataTableSkeleton } from './data-table-skeleton';
2
4
  export type { FriendlyJsonDisplayProps } from './friendly-json-display';
3
5
  export { FriendlyJsonDisplay } from './friendly-json-display';
4
6
  export { formatDisplayValue, getIcon } from './helpers';
@@ -1,3 +1,5 @@
1
+ export declare const createCodeEditorPreloader: (initialize: () => Promise<unknown>) => () => Promise<unknown>;
2
+ export declare const preloadCodeEditor: () => Promise<unknown>;
1
3
  export declare const customTheme: {
2
4
  base: "vs-dark";
3
5
  inherit: true;
@@ -1,4 +1,4 @@
1
- export { CodeDiffEditor, CodeEditor } from './code-editor';
1
+ export { CodeDiffEditor, CodeEditor, preloadCodeEditor } from './code-editor';
2
2
  export { DiffBubble } from './diff-bubble';
3
3
  export type { Diff } from './diff-card';
4
4
  export { DiffDrawer } from './diff-drawer';
@@ -0,0 +1 @@
1
+ export declare const initializeMonaco: () => Promise<undefined>;
@@ -0,0 +1,12 @@
1
+ interface DialogAcceptShortcutEvent {
2
+ key: string;
3
+ ctrlKey: boolean;
4
+ metaKey: boolean;
5
+ shiftKey: boolean;
6
+ altKey: boolean;
7
+ defaultPrevented: boolean;
8
+ preventDefault: () => void;
9
+ stopPropagation: () => void;
10
+ }
11
+ export declare const handleDialogAcceptShortcut: (event: DialogAcceptShortcutEvent, accept: () => void, enabled?: boolean) => void;
12
+ export {};
@@ -6,6 +6,7 @@ export { AttachmentChip } from './attachment-chip';
6
6
  export { BubbleButton } from './bubble-button';
7
7
  export { BubblePanel } from './bubble-panel';
8
8
  export { DeleteConfirmationModal } from './delete-confirmation-modal';
9
+ export { handleDialogAcceptShortcut } from './dialog-accept-shortcut';
9
10
  export type { RepoPickerDialogEntry, RepoPickerDialogProps } from './repo-picker-dialog';
10
11
  export { RepoPickerDialog } from './repo-picker-dialog';
11
12
  export type { ResourceActionMenuProps, ResourceContextAction } from './resource-context-menu';
@@ -0,0 +1,9 @@
1
+ import { Ref } from 'react';
2
+ interface SearchableMenuInputProps {
3
+ inputRef?: Ref<HTMLInputElement>;
4
+ value: string;
5
+ placeholder: string;
6
+ onValueChange: (value: string) => void;
7
+ }
8
+ export declare const SearchableMenuInput: (props: SearchableMenuInputProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
@@ -1,10 +1,12 @@
1
1
  export { ActionInput } from './inputs/action-input';
2
2
  export { ANCHOR_GRID_VALUES, isAnchorGridValue } from './inputs/anchor-grid';
3
3
  export { AnchorGridInput } from './inputs/anchor-grid-input';
4
+ export { BooleanInput } from './inputs/boolean-input';
4
5
  export { ColorInput } from './inputs/color-input';
5
6
  export { DateInput } from './inputs/date-input';
6
- export { FileDropInput } from './inputs/file-drop-input';
7
+ export { FileUploadInput } from './inputs/file-upload-input';
7
8
  export { HorizontalTextInput } from './inputs/horizontal-text-input';
9
+ export { MarkdownInput } from './inputs/markdown-input';
8
10
  export { NumberInput } from './inputs/number-input';
9
11
  export { RangeInput } from './inputs/range-input';
10
12
  export { ResourceInput } from './inputs/resource-input';
@@ -14,13 +16,16 @@ export { TextInput } from './inputs/text-input';
14
16
  export { VectorInput } from './inputs/vector-input';
15
17
  export type { ParamEditorProps } from './param-editor';
16
18
  export { ParamEditor } from './param-editor';
17
- export type { ActionOption, ActionsParam, AnchorGridParam, AnchorGridValue, BaseParam, ColorParam, DateParam, FileDropParam, FileDropValue, InputGroup, NumberParam, Param, ParamEditorReadOnlyContent, ParamEditorReadOnlyImage, ParamValue, ParamValueMap, PropertyParam, RangeParam, RangeValue, ReadOnlyParam, ResourceOption, ResourceParam, ResourceRefValue, SegmentedOption, SegmentedParam, SelectionParam, TextParam, VectorParam, VectorValue, } from './param-editor.types';
19
+ export type { ActionOption, ActionsParam, AnchorGridParam, AnchorGridValue, BaseParam, BooleanParam, ColorParam, DateParam, FileUploadParam, FileUploadStatus, FileUploadValue, InputGroup, MarkdownParam, NumberParam, Param, ParamEditorReadOnlyContent, ParamEditorReadOnlyImage, ParamValue, ParamValueMap, PropertyParam, RangeParam, RangeValue, ReadOnlyParam, ResourceOption, ResourceParam, ResourceRefValue, SegmentedOption, SegmentedParam, SelectionGroup, SelectionOption, SelectionParam, TextParam, VectorParam, VectorValue, } from './param-editor.types';
18
20
  export { ParamEditorControlItem } from './param-editor-control-item';
19
21
  export { ParamEditorControlList } from './param-editor-control-list';
20
22
  export { ParamEditorField } from './param-editor-field';
21
23
  export { ParamEditorFieldLabel } from './param-editor-field-label';
22
24
  export { ParamEditorInlineGroup } from './param-editor-inline-group';
23
25
  export { ParamEditorLabel } from './param-editor-label';
26
+ export { isParamEditorRichControl } from './param-editor-presentation';
24
27
  export { ParamEditorReadOnlyField } from './param-editor-read-only-field';
25
28
  export { ParamEditorReadOnlyValue } from './param-editor-read-only-value';
29
+ export type { ParamEditorRowProps } from './param-editor-row';
30
+ export { ParamEditorRow } from './param-editor-row';
26
31
  export { ParamEditorSection } from './param-editor-section';
@@ -8,6 +8,7 @@ interface ActionInputProps {
8
8
  onChange: (id: string, value: string) => void;
9
9
  readOnly?: boolean;
10
10
  fullWidth?: boolean;
11
+ presentation?: "stacked" | "horizontal";
11
12
  }
12
13
  export declare const ActionInput: (props: ActionInputProps) => import("react/jsx-runtime").JSX.Element;
13
14
  export {};
@@ -0,0 +1,13 @@
1
+ interface BooleanInputProps {
2
+ id: string;
3
+ name: string;
4
+ description?: string;
5
+ defaultValue: boolean;
6
+ onChange: (id: string, value: boolean) => void;
7
+ readOnly?: boolean;
8
+ hideLabel?: boolean;
9
+ fullWidth?: boolean;
10
+ size?: "xs" | "sm";
11
+ }
12
+ export declare const BooleanInput: (props: BooleanInputProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -8,6 +8,7 @@ interface ColorInputProps {
8
8
  hideLabel?: boolean;
9
9
  tooltipPlacement?: "top" | "right" | "bottom" | "left";
10
10
  fullWidth?: boolean;
11
+ size?: "xs" | "sm";
11
12
  }
12
13
  export declare const ColorInput: (props: ColorInputProps) => import("react/jsx-runtime").JSX.Element;
13
14
  export {};
@@ -10,6 +10,7 @@ interface DateInputProps {
10
10
  hideLabel?: boolean;
11
11
  tooltipPlacement?: "top" | "right" | "bottom" | "left";
12
12
  fullWidth?: boolean;
13
+ size?: "xs" | "sm";
13
14
  }
14
15
  export declare const DateInput: (props: DateInputProps) => import("react/jsx-runtime").JSX.Element;
15
16
  export {};
@@ -0,0 +1,15 @@
1
+ import { FileUploadValue } from '../param-editor.types';
2
+ interface FileUploadInputProps {
3
+ id: string;
4
+ name: string;
5
+ description?: string;
6
+ defaultValue: FileUploadValue[];
7
+ accept?: string;
8
+ multiple?: boolean;
9
+ uploadLabel?: string;
10
+ onChange: (id: string, value: FileUploadValue[]) => void;
11
+ readOnly?: boolean;
12
+ presentation?: "stacked" | "horizontal";
13
+ }
14
+ export declare const FileUploadInput: (props: FileUploadInputProps) => import("react/jsx-runtime").JSX.Element;
15
+ export {};
@@ -0,0 +1,7 @@
1
+ import { FileUploadValue } from '../param-editor.types';
2
+ export type FileUploadSummaryState = "empty" | "queued" | "uploading" | "complete" | "error";
3
+ export declare const createFileUploadValues: (files: File[], existing: FileUploadValue[], multiple: boolean) => FileUploadValue[];
4
+ export declare const getFileUploadSummary: (values: FileUploadValue[]) => {
5
+ state: FileUploadSummaryState;
6
+ count: number;
7
+ };
@@ -7,6 +7,7 @@ interface HorizontalTextInputProps {
7
7
  readOnly?: boolean;
8
8
  hideLabel?: boolean;
9
9
  tooltipPlacement?: "top" | "right" | "bottom" | "left";
10
+ size?: "xs" | "sm";
10
11
  }
11
12
  export declare const HorizontalTextInput: (props: HorizontalTextInputProps) => import("react/jsx-runtime").JSX.Element;
12
13
  export {};
@@ -0,0 +1,13 @@
1
+ interface MarkdownInputProps {
2
+ id: string;
3
+ name: string;
4
+ description?: string;
5
+ defaultValue: string;
6
+ placeholder?: string;
7
+ onChange: (id: string, value: string) => void;
8
+ readOnly?: boolean;
9
+ presentation?: "stacked" | "horizontal";
10
+ size?: "xs" | "sm";
11
+ }
12
+ export declare const MarkdownInput: (props: MarkdownInputProps) => import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -12,6 +12,7 @@ interface NumberInputProps {
12
12
  hideSlider?: boolean;
13
13
  tooltipPlacement?: "top" | "right" | "bottom" | "left";
14
14
  fullWidth?: boolean;
15
+ size?: "xs" | "sm";
15
16
  }
16
17
  export declare const NumberInput: (props: NumberInputProps) => import("react/jsx-runtime").JSX.Element;
17
18
  export {};
@@ -12,6 +12,7 @@ interface RangeInputProps {
12
12
  onChange: (id: string, value: RangeValue) => void;
13
13
  readOnly?: boolean;
14
14
  fullWidth?: boolean;
15
+ presentation?: "stacked" | "horizontal";
15
16
  }
16
17
  export declare const RangeInput: (props: RangeInputProps) => import("react/jsx-runtime").JSX.Element;
17
18
  export {};
@@ -13,6 +13,8 @@ interface ResourceInputProps {
13
13
  placeholder?: string;
14
14
  emptyText?: string;
15
15
  fullWidth?: boolean;
16
+ presentation?: "stacked" | "horizontal";
17
+ size?: "xs" | "sm";
16
18
  }
17
19
  export declare const ResourceInput: (props: ResourceInputProps) => import("react/jsx-runtime").JSX.Element;
18
20
  export {};
@@ -9,6 +9,7 @@ interface SegmentedInputProps {
9
9
  onChange: (id: string, value: string) => void;
10
10
  readOnly?: boolean;
11
11
  fullWidth?: boolean;
12
+ presentation?: "stacked" | "horizontal";
12
13
  }
13
14
  export declare const SegmentedInput: (props: SegmentedInputProps) => import("react/jsx-runtime").JSX.Element;
14
15
  export {};
@@ -1,3 +1,4 @@
1
+ import { SelectionGroup } from '../param-editor.types';
1
2
  import { SelectionMenuOption } from './selection-menu';
2
3
  interface SelectionInputProps {
3
4
  id: string;
@@ -16,6 +17,11 @@ interface SelectionInputProps {
16
17
  clearable?: boolean;
17
18
  /** Inert, but still rendered as a control. */
18
19
  disabled?: boolean;
20
+ searchable?: boolean;
21
+ searchPlaceholder?: string;
22
+ emptyText?: string;
23
+ group?: SelectionGroup;
24
+ size?: "xs" | "sm";
19
25
  }
20
26
  export declare const SelectionInput: (props: SelectionInputProps) => import("react/jsx-runtime").JSX.Element;
21
27
  export {};
@@ -1,4 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
+ import { SelectionGroup } from '../param-editor.types';
2
3
  export interface SelectionMenuOption {
3
4
  id: string;
4
5
  name: string;
@@ -6,6 +7,7 @@ export interface SelectionMenuOption {
6
7
  /** Palette key (e.g. "blue") applied to the option's icon. */
7
8
  color?: string;
8
9
  description?: string;
10
+ disabled?: boolean;
9
11
  }
10
12
  export interface SelectionMenuProps {
11
13
  triggerLabel: ReactNode;
@@ -13,8 +15,16 @@ export interface SelectionMenuProps {
13
15
  selectedIds: string[];
14
16
  multiSelect: boolean;
15
17
  disabled?: boolean;
18
+ searchable?: boolean;
19
+ searchPlaceholder?: string;
20
+ emptyText?: string;
21
+ group?: SelectionGroup;
16
22
  fullWidth?: boolean;
23
+ triggerVariant?: "button" | "icon";
24
+ triggerAriaLabel?: string;
25
+ size?: "xs" | "sm";
17
26
  onToggle: (optionId: string) => void;
27
+ onGroupChange?: (optionId: string) => void;
18
28
  }
19
29
  export declare const selectionIndicator: (multiSelect: boolean, selected: boolean) => import("react/jsx-runtime").JSX.Element | null;
20
30
  export declare const selectionOptionIcon: (option: SelectionMenuOption | undefined, boxSize: string) => import("react/jsx-runtime").JSX.Element | null;
@@ -8,6 +8,7 @@ interface TextInputProps {
8
8
  singleLine?: boolean;
9
9
  hideLabel?: boolean;
10
10
  fullWidth?: boolean;
11
+ size?: "xs" | "sm";
11
12
  }
12
13
  export declare const TextInput: (props: TextInputProps) => import("react/jsx-runtime").JSX.Element;
13
14
  export {};
@@ -0,0 +1,14 @@
1
+ import { Param, ParamValue, ParamValueMap } from './param-editor.types';
2
+ type AdvancedParam = Extract<Param, {
3
+ type: "range" | "segmented" | "actions" | "anchorGrid" | "vector" | "fileUpload";
4
+ }>;
5
+ interface ParamEditorAdvancedFieldProps {
6
+ param: AdvancedParam;
7
+ defaultValues: ParamValueMap;
8
+ onChange: (id: string, value: ParamValue) => void;
9
+ readOnly?: boolean;
10
+ fullWidth?: boolean;
11
+ presentation: "stacked" | "horizontal";
12
+ }
13
+ export declare const ParamEditorAdvancedField: (props: ParamEditorAdvancedFieldProps) => import("react/jsx-runtime").JSX.Element | null;
14
+ export {};
@@ -0,0 +1,24 @@
1
+ import { Param, ParamValueMap } from './param-editor.types';
2
+ export interface ParamEditorInputFixture {
3
+ param: Param;
4
+ defaultValues: ParamValueMap;
5
+ }
6
+ export declare const paramEditorInputFixtures: {
7
+ boolean: ParamEditorInputFixture;
8
+ number: ParamEditorInputFixture;
9
+ text: ParamEditorInputFixture;
10
+ markdown: ParamEditorInputFixture;
11
+ selection: ParamEditorInputFixture;
12
+ date: ParamEditorInputFixture;
13
+ color: ParamEditorInputFixture;
14
+ property: ParamEditorInputFixture;
15
+ readOnly: ParamEditorInputFixture;
16
+ resource: ParamEditorInputFixture;
17
+ reference: ParamEditorInputFixture;
18
+ range: ParamEditorInputFixture;
19
+ segmented: ParamEditorInputFixture;
20
+ actions: ParamEditorInputFixture;
21
+ anchorGrid: ParamEditorInputFixture;
22
+ vector: ParamEditorInputFixture;
23
+ fileUpload: ParamEditorInputFixture;
24
+ };
@@ -6,6 +6,8 @@ interface ParamEditorFieldProps {
6
6
  onOpenResource?: (ref: ResourceRefValue) => void;
7
7
  readOnly?: boolean;
8
8
  fullWidth?: boolean;
9
+ presentation?: "stacked" | "horizontal";
10
+ size?: "xs" | "sm";
9
11
  }
10
12
  export declare const ParamEditorField: (props: ParamEditorFieldProps) => import("react/jsx-runtime").JSX.Element | null;
11
13
  export {};
@@ -1,11 +1,11 @@
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 ParamEditorHorizontalProps {
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
- fullWidth?: boolean;
9
9
  variant?: "default" | "small";
10
10
  }
11
11
  export declare const ParamEditorHorizontal: (props: ParamEditorHorizontalProps) => import("react/jsx-runtime").JSX.Element;
@@ -1,6 +1,7 @@
1
1
  interface ParamEditorLabelProps {
2
2
  name: string;
3
3
  description?: string;
4
+ compact?: boolean;
4
5
  }
5
6
  export declare const ParamEditorLabel: (props: ParamEditorLabelProps) => import("react/jsx-runtime").JSX.Element;
6
7
  export {};
@@ -0,0 +1,3 @@
1
+ import { Param } from './param-editor.types';
2
+ export declare const isParamEditorRichControl: (param: Param) => param is import('./param-editor.types').FileUploadParam;
3
+ export declare const isParamEditorHorizontalControl: (param: Param) => param is import('./param-editor.types').NumberParam | import('./param-editor.types').BooleanParam | import('./param-editor.types').TextParam | import('./param-editor.types').MarkdownParam | import('./param-editor.types').SelectionParam | import('./param-editor.types').DateParam | import('./param-editor.types').ColorParam | import('./param-editor.types').PropertyParam | import('./param-editor.types').ReadOnlyParam | import('./param-editor.types').ResourceParam | import('./param-editor.types').RangeParam | import('./param-editor.types').SegmentedParam | import('./param-editor.types').ActionsParam | import('./param-editor.types').VectorParam | import('./param-editor.types').FileUploadParam;
@@ -0,0 +1,17 @@
1
+ import { Param, ParamValue, ParamValueMap, ResourceRefValue } from './param-editor.types';
2
+ export interface ParamEditorRowProps {
3
+ param: Param;
4
+ values?: ParamValueMap;
5
+ onChange?: (id: string, value: ParamValue) => void;
6
+ onOpenResource?: (ref: ResourceRefValue) => void;
7
+ readOnly?: boolean;
8
+ fullWidth?: boolean;
9
+ variant?: "default" | "small";
10
+ }
11
+ /**
12
+ * The padded field row every param surface is built from. Surfaces that compose
13
+ * their own list of fields — a command dialog mixing built-in and host-supplied
14
+ * controls — stack these instead of nesting one editor per field, so the whole
15
+ * form keeps a single rhythm.
16
+ */
17
+ export declare const ParamEditorRow: (props: ParamEditorRowProps) => import("react/jsx-runtime").JSX.Element;
@@ -13,17 +13,40 @@ export interface NumberParam extends BaseParam {
13
13
  max?: number;
14
14
  step?: number;
15
15
  }
16
+ export interface BooleanParam extends BaseParam {
17
+ type: "boolean";
18
+ defaultValue: boolean;
19
+ }
16
20
  export interface TextParam extends BaseParam {
17
21
  type: "text";
18
22
  defaultValue: string;
19
23
  singleLine?: boolean;
20
24
  }
25
+ export interface MarkdownParam extends BaseParam {
26
+ type: "markdown";
27
+ defaultValue: string;
28
+ placeholder?: string;
29
+ }
21
30
  export interface SelectionOption {
22
31
  id: string;
23
32
  name: string;
24
33
  icon?: string;
25
34
  /** Palette key (e.g. "blue") applied to the option's icon. */
26
35
  color?: string;
36
+ description?: string;
37
+ disabled?: boolean;
38
+ }
39
+ /** Parent selector used to swap the option set of a grouped selection. */
40
+ export interface SelectionGroup {
41
+ id: string;
42
+ name: string;
43
+ defaultValue: string;
44
+ options: SelectionOption[];
45
+ placeholder?: string;
46
+ searchable?: boolean;
47
+ searchPlaceholder?: string;
48
+ emptyText?: string;
49
+ disabled?: boolean;
27
50
  }
28
51
  export interface SelectionParam extends BaseParam {
29
52
  type: "selection";
@@ -31,6 +54,10 @@ export interface SelectionParam extends BaseParam {
31
54
  options: SelectionOption[];
32
55
  multiSelect?: boolean;
33
56
  placeholder?: string;
57
+ searchable?: boolean;
58
+ searchPlaceholder?: string;
59
+ emptyText?: string;
60
+ group?: SelectionGroup;
34
61
  /** Adds a "clear" row so a single-select can be returned to unset. */
35
62
  clearable?: boolean;
36
63
  /**
@@ -161,18 +188,21 @@ export interface VectorParam extends BaseParam {
161
188
  max?: number;
162
189
  step?: number;
163
190
  }
164
- /** File selection metadata. Not a live `File` object hosts own persistence. */
165
- export interface FileDropValue {
166
- name: string;
167
- mimeType?: string;
168
- size?: number;
169
- dataUrl?: string;
170
- }
171
- export interface FileDropParam extends BaseParam {
172
- type: "fileDrop";
173
- defaultValue: FileDropValue | null;
191
+ export type FileUploadStatus = "queued" | "uploading" | "complete" | "error";
192
+ /** A selected file and the host-controlled state of its upload. */
193
+ export interface FileUploadValue {
194
+ id: string;
195
+ file: File;
196
+ status: FileUploadStatus;
197
+ progress?: number;
198
+ error?: string;
199
+ }
200
+ export interface FileUploadParam extends BaseParam {
201
+ type: "fileUpload";
202
+ defaultValue: FileUploadValue[];
174
203
  accept?: string;
175
- assetKind?: "file" | "image";
204
+ multiple?: boolean;
205
+ uploadLabel?: string;
176
206
  }
177
207
  export interface InputGroup {
178
208
  id: string;
@@ -182,6 +212,6 @@ export interface InputGroup {
182
212
  collapsible?: boolean;
183
213
  defaultCollapsed?: boolean;
184
214
  }
185
- export type ParamValue = number | string | null | string[] | RangeValue | VectorValue | FileDropValue;
186
- export type Param = NumberParam | TextParam | SelectionParam | DateParam | ColorParam | PropertyParam | ReadOnlyParam | ResourceParam | RangeParam | SegmentedParam | ActionsParam | AnchorGridParam | VectorParam | FileDropParam;
215
+ export type ParamValue = number | string | boolean | null | string[] | RangeValue | VectorValue | FileUploadValue[];
216
+ export type Param = NumberParam | BooleanParam | TextParam | MarkdownParam | SelectionParam | DateParam | ColorParam | PropertyParam | ReadOnlyParam | ResourceParam | RangeParam | SegmentedParam | ActionsParam | AnchorGridParam | VectorParam | FileUploadParam;
187
217
  export type ParamValueMap = Record<string, ParamValue>;
@@ -0,0 +1,2 @@
1
+ import { ParamValueMap } from './param-editor.types';
2
+ export declare const resolveParamValue: <T>(defaultValues: ParamValueMap, paramId: string, fallback: T) => T;
@@ -0,0 +1,4 @@
1
+ import { BadgeProps } from '@chakra-ui/react';
2
+ export interface ChipProps extends Omit<BadgeProps, "size" | "variant"> {
3
+ }
4
+ export declare const Chip: (props: ChipProps) => import("react/jsx-runtime").JSX.Element;