@pstdio/ui 0.17.0 → 0.18.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-BCMQqPqu.js → MermaidComponent-BPiVFNYK.js} +2 -2
- package/dist/{MermaidComponent-BCMQqPqu.js.map → MermaidComponent-BPiVFNYK.js.map} +1 -1
- package/dist/chat-ui.js +2 -2
- package/dist/components/data-table/data-table-column-menu.d.ts +4 -1
- package/dist/components/data-table/data-table-header.d.ts +0 -8
- package/dist/components/data-table/editable-cells-story.d.ts +9 -0
- package/dist/components/diff-viewer/code-editor.d.ts +2 -0
- package/dist/components/diff-viewer/index.d.ts +1 -1
- package/dist/components/diff-viewer/monaco-browser.d.ts +1 -0
- package/dist/components/overlays/searchable-menu-input.d.ts +9 -0
- package/dist/components/param-editor/index.d.ts +5 -2
- package/dist/components/param-editor/inputs/action-input.d.ts +1 -0
- package/dist/components/param-editor/inputs/boolean-input.d.ts +13 -0
- package/dist/components/param-editor/inputs/color-input.d.ts +1 -0
- package/dist/components/param-editor/inputs/date-input.d.ts +1 -0
- package/dist/components/param-editor/inputs/file-upload-input.d.ts +15 -0
- package/dist/components/param-editor/inputs/file-upload-value.d.ts +7 -0
- package/dist/components/param-editor/inputs/horizontal-text-input.d.ts +1 -0
- package/dist/components/param-editor/inputs/markdown-input.d.ts +13 -0
- package/dist/components/param-editor/inputs/number-input.d.ts +1 -0
- package/dist/components/param-editor/inputs/range-input.d.ts +1 -0
- package/dist/components/param-editor/inputs/resource-input.d.ts +2 -0
- package/dist/components/param-editor/inputs/segmented-input.d.ts +1 -0
- package/dist/components/param-editor/inputs/selection-input.d.ts +1 -0
- package/dist/components/param-editor/inputs/selection-menu.d.ts +4 -0
- package/dist/components/param-editor/inputs/text-input.d.ts +1 -0
- package/dist/components/param-editor/param-editor-advanced-field.d.ts +14 -0
- package/dist/components/param-editor/param-editor-control-fixtures.d.ts +24 -0
- package/dist/components/param-editor/param-editor-field.d.ts +2 -0
- package/dist/components/param-editor/param-editor-horizontal.d.ts +2 -2
- package/dist/components/param-editor/param-editor-label.d.ts +1 -0
- package/dist/components/param-editor/param-editor-presentation.d.ts +3 -0
- package/dist/components/param-editor/param-editor.types.d.ts +25 -13
- package/dist/components/param-editor/resolve-param-value.d.ts +2 -0
- package/dist/components/primitives/chip.d.ts +4 -0
- package/dist/components/primitives/index.d.ts +2 -0
- package/dist/components/primitives/resource-badge.d.ts +12 -10
- package/dist/components/rich-text/index.d.ts +1 -0
- package/dist/components/rich-text/lazy-markdown-editor.d.ts +2 -0
- package/dist/components/rich-text/utils/inferResourceType.d.ts +1 -1
- package/dist/data-table.js +960 -910
- package/dist/data-table.js.map +1 -1
- package/dist/diff.js +370 -366
- package/dist/diff.js.map +1 -1
- package/dist/font/css/prompt-studio-icons.css +690 -0
- package/dist/font/prompt-studio-icons.eot +0 -0
- package/dist/font/prompt-studio-icons.svg +1 -0
- package/dist/font/prompt-studio-icons.ttf +0 -0
- package/dist/font/prompt-studio-icons.woff +0 -0
- package/dist/font/prompt-studio-icons.woff2 +0 -0
- package/dist/index.js +895 -947
- package/dist/index.js.map +1 -1
- package/dist/{kanban-renderer-toolbar-B9ro-9z1.js → kanban-renderer-toolbar-Db1mIWWd.js} +3 -3
- package/dist/{kanban-renderer-toolbar-B9ro-9z1.js.map → kanban-renderer-toolbar-Db1mIWWd.js.map} +1 -1
- package/dist/kanban-renderer.js +831 -817
- package/dist/kanban-renderer.js.map +1 -1
- package/dist/lazy-markdown-editor-DwhqQ-NN.js +26 -0
- package/dist/lazy-markdown-editor-DwhqQ-NN.js.map +1 -0
- package/dist/{list-row-YRUxEcy3.js → list-row-BYWwcbGK.js} +286 -271
- package/dist/list-row-BYWwcbGK.js.map +1 -0
- package/dist/markdown-DDd2ESoH.js +743 -0
- package/dist/markdown-DDd2ESoH.js.map +1 -0
- package/dist/markdown-editor-CYVkzt8t.js +741 -0
- package/dist/markdown-editor-CYVkzt8t.js.map +1 -0
- package/dist/monaco-browser-CO0NxK_Z.js +19 -0
- package/dist/monaco-browser-CO0NxK_Z.js.map +1 -0
- package/dist/param-editor-BCZOw5Gt.js +140 -0
- package/dist/param-editor-BCZOw5Gt.js.map +1 -0
- package/dist/param-editor-field-ZzZwgjZ_.js +2094 -0
- package/dist/param-editor-field-ZzZwgjZ_.js.map +1 -0
- package/dist/resource-badge-CuItchgL.js +98 -0
- package/dist/resource-badge-CuItchgL.js.map +1 -0
- package/dist/rich-message--eRzjWYK.js +730 -0
- package/dist/rich-message--eRzjWYK.js.map +1 -0
- package/dist/rich-text.js +114 -827
- package/dist/rich-text.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/primitives/fonts.d.ts +3 -0
- package/dist/theme/recipes/badge.d.ts +8 -0
- package/dist/theme/recipes/color-picker.d.ts +18 -1
- package/dist/theme/recipes/switch.d.ts +17 -0
- package/dist/{theme-CNhnbvcE.js → theme-poQlUgt0.js} +284 -156
- package/dist/theme-poQlUgt0.js.map +1 -0
- package/dist/theme.js +1 -1
- package/dist/{tree-list-CZHLAURU.js → tree-list-BAja2eXU.js} +2 -2
- package/dist/{tree-list-CZHLAURU.js.map → tree-list-BAja2eXU.js.map} +1 -1
- package/package.json +2 -1
- package/dist/components/param-editor/inputs/file-accept.d.ts +0 -22
- package/dist/components/param-editor/inputs/file-drop-input.d.ts +0 -14
- package/dist/list-row-YRUxEcy3.js.map +0 -1
- package/dist/param-editor-CYZJbmKu.js +0 -933
- package/dist/param-editor-CYZJbmKu.js.map +0 -1
- package/dist/param-editor-read-only-field-DgtLqcFa.js +0 -925
- package/dist/param-editor-read-only-field-DgtLqcFa.js.map +0 -1
- package/dist/prism-BXb57lxL.js +0 -125
- package/dist/prism-BXb57lxL.js.map +0 -1
- package/dist/resource-badge-qCWHP-wQ.js +0 -99
- package/dist/resource-badge-qCWHP-wQ.js.map +0 -1
- package/dist/rich-message-DBf_5YlW.js +0 -1450
- package/dist/rich-message-DBf_5YlW.js.map +0 -1
- package/dist/theme-CNhnbvcE.js.map +0 -1
|
@@ -6,7 +6,7 @@ import { useLexicalEditable as L } from "@lexical/react/useLexicalEditable";
|
|
|
6
6
|
import { $getNodeByKey as N } from "lexical";
|
|
7
7
|
import { useState as z, useEffect as P } from "react";
|
|
8
8
|
import { M as _ } from "./mermaid-renderer-DZo3qj6D.js";
|
|
9
|
-
import { $ as q } from "./
|
|
9
|
+
import { $ as q } from "./markdown-DDd2ESoH.js";
|
|
10
10
|
function O(B) {
|
|
11
11
|
const e = S(28), {
|
|
12
12
|
code: i,
|
|
@@ -57,4 +57,4 @@ function O(B) {
|
|
|
57
57
|
export {
|
|
58
58
|
O as default
|
|
59
59
|
};
|
|
60
|
-
//# sourceMappingURL=MermaidComponent-
|
|
60
|
+
//# sourceMappingURL=MermaidComponent-BPiVFNYK.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MermaidComponent-
|
|
1
|
+
{"version":3,"file":"MermaidComponent-BPiVFNYK.js","sources":["../src/components/rich-text/shared/plugins/MermaidPlugin/MermaidComponent.tsx"],"sourcesContent":["import { Box, Button, Flex, Textarea } from \"@chakra-ui/react\";\nimport { useLexicalComposerContext } from \"@lexical/react/LexicalComposerContext\";\nimport { useLexicalEditable } from \"@lexical/react/useLexicalEditable\";\nimport { $getNodeByKey } from \"lexical\";\nimport { useEffect, useState } from \"react\";\nimport { MermaidRenderer } from \"@/components/mermaid-renderer\";\nimport { $isMermaidNode } from \"./MermaidNode\";\n\ninterface MermaidComponentProps {\n code: string;\n nodeKey: string;\n}\n\nexport default function MermaidComponent(props: MermaidComponentProps) {\n const { code, nodeKey } = props;\n const [editor] = useLexicalComposerContext();\n const isEditable = useLexicalEditable();\n const [isEditing, setIsEditing] = useState(false);\n const [draftCode, setDraftCode] = useState(code);\n const [previewCode, setPreviewCode] = useState(code);\n\n useEffect(() => {\n setDraftCode(code);\n setPreviewCode(code);\n }, [code]);\n\n const commitCodeChanges = () => {\n editor.update(() => {\n const node = $getNodeByKey(nodeKey);\n if ($isMermaidNode(node)) {\n node.setCode(draftCode);\n }\n });\n\n setPreviewCode(draftCode);\n setIsEditing(false);\n };\n\n const cancelEditing = () => {\n setDraftCode(previewCode);\n setIsEditing(false);\n };\n\n if (!isEditing) {\n return (\n <MermaidRenderer\n key={previewCode}\n code={previewCode}\n isEditable={isEditable}\n onRequestEdit={isEditable ? () => setIsEditing(true) : undefined}\n />\n );\n }\n\n return (\n <Box borderWidth=\"1px\" borderColor=\"border.subtle\" borderRadius=\"md\" overflow=\"hidden\" width=\"100%\">\n <Flex justifyContent=\"flex-end\" alignItems=\"center\" gap=\"xs\" paddingX=\"sm\" paddingY=\"xs\" bg=\"bg.muted\">\n <Button size=\"xs\" variant=\"subtle\" onClick={cancelEditing}>\n Cancel\n </Button>\n <Button size=\"xs\" onClick={commitCodeChanges}>\n Preview\n </Button>\n </Flex>\n <Box padding=\"sm\" bg=\"bg.muted\">\n <Textarea\n value={draftCode}\n onChange={(event) => setDraftCode(event.target.value)}\n minHeight=\"180px\"\n resize=\"vertical\"\n fontFamily=\"mono\"\n fontSize=\"sm\"\n spellCheck={false}\n />\n </Box>\n </Box>\n );\n}\n"],"names":["MermaidComponent","props","$","_c","code","nodeKey","editor","useLexicalComposerContext","isEditable","useLexicalEditable","isEditing","setIsEditing","useState","draftCode","setDraftCode","previewCode","setPreviewCode","t0","t1","useEffect","t2","update","node","$getNodeByKey","$isMermaidNode","setCode","commitCodeChanges","t3","cancelEditing","t4","undefined","t5","MermaidRenderer","Button","t6","jsxs","Flex","t7","Symbol","for","event","target","value","t8","jsx","Box","Textarea","t9"],"mappings":";;;;;;;;;AAaA,SAAeA,EAAAC,GAAA;AAAA,QAAAC,IAAAC,EAAA,EAAA,GACb;AAAA,IAAAC,MAAAA;AAAAA,IAAAC,SAAAA;AAAAA,EAAAA,IAA0BJ,GAC1B,CAAAK,CAAA,IAAiBC,EAAAA,GACjBC,IAAmBC,EAAAA,GACnB,CAAAC,GAAAC,CAAA,IA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QACF,UAAA,MACG,gBAAK,EAAA,CAErB,GAAMnC,QAAAW,GAAAX,QAAAyC,KAAAA,IAAAzC,EAAA,EAAA;AAAA,MAAA6C;AAAA,SAAA7C,EAAA,EAAA,MAAAgC,KAAAhC,UAAAyC,KAnBRI,IAAA,gBAAAZ,EAACU,GAAA,EAAgB,aAAA,OAAkB,aAAA,iBAA6B,cAAA,MAAc,UAAA,UAAe,OAAA,QAC3FX,UAAAA;AAAAA,IAAAA;AAAAA,IAQAS;AAAAA,EAAAA,GAWF,GAAMzC,QAAAgC,GAAAhC,QAAAyC,GAAAzC,QAAA6C,KAAAA,IAAA7C,EAAA,EAAA,GApBN6C;AAoBM;"}
|
package/dist/chat-ui.js
CHANGED
|
@@ -5,8 +5,8 @@ import { ArrowDownIcon as Cs, ShieldX as ks, ShieldCheck as As, Check as Pn, Pau
|
|
|
5
5
|
import { useStickToBottomContext as It, StickToBottom as js } from "use-stick-to-bottom";
|
|
6
6
|
import { S as _t, T as Fn } from "./scroll-area-BMbg1WcD.js";
|
|
7
7
|
import { Fragment as Us, useRef as Te, useEffect as le, useState as W } from "react";
|
|
8
|
-
import { R as sn } from "./resource-badge-
|
|
9
|
-
import {
|
|
8
|
+
import { R as sn } from "./resource-badge-CuItchgL.js";
|
|
9
|
+
import { a as Vt, P as Ks, g as Gs, R as Ln } from "./rich-message--eRzjWYK.js";
|
|
10
10
|
import { C as $n } from "./checkbox-B2zYVemL.js";
|
|
11
11
|
import { R as Xs, a as Ys, A as fn } from "./radio-cLMEBBZk.js";
|
|
12
12
|
import { E as Js } from "./empty-state-Bo4HVrgr.js";
|
|
@@ -5,8 +5,11 @@ interface DataTableColumnMenuColumn {
|
|
|
5
5
|
interface DataTableColumnMenuProps {
|
|
6
6
|
columns: DataTableColumnMenuColumn[];
|
|
7
7
|
visibleColumnIds: Set<string>;
|
|
8
|
-
|
|
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,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,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,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 {
|
|
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,14 @@ 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,
|
|
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, 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';
|
|
26
29
|
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 {};
|
|
@@ -16,6 +16,7 @@ interface SelectionInputProps {
|
|
|
16
16
|
clearable?: boolean;
|
|
17
17
|
/** Inert, but still rendered as a control. */
|
|
18
18
|
disabled?: boolean;
|
|
19
|
+
size?: "xs" | "sm";
|
|
19
20
|
}
|
|
20
21
|
export declare const SelectionInput: (props: SelectionInputProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
export {};
|
|
@@ -6,6 +6,7 @@ export interface SelectionMenuOption {
|
|
|
6
6
|
/** Palette key (e.g. "blue") applied to the option's icon. */
|
|
7
7
|
color?: string;
|
|
8
8
|
description?: string;
|
|
9
|
+
disabled?: boolean;
|
|
9
10
|
}
|
|
10
11
|
export interface SelectionMenuProps {
|
|
11
12
|
triggerLabel: ReactNode;
|
|
@@ -14,6 +15,9 @@ export interface SelectionMenuProps {
|
|
|
14
15
|
multiSelect: boolean;
|
|
15
16
|
disabled?: boolean;
|
|
16
17
|
fullWidth?: boolean;
|
|
18
|
+
triggerVariant?: "button" | "icon";
|
|
19
|
+
triggerAriaLabel?: string;
|
|
20
|
+
size?: "xs" | "sm";
|
|
17
21
|
onToggle: (optionId: string) => void;
|
|
18
22
|
}
|
|
19
23
|
export declare const selectionIndicator: (multiSelect: boolean, selected: boolean) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -13,11 +13,20 @@ 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;
|
|
@@ -161,18 +170,21 @@ export interface VectorParam extends BaseParam {
|
|
|
161
170
|
max?: number;
|
|
162
171
|
step?: number;
|
|
163
172
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
173
|
+
export type FileUploadStatus = "queued" | "uploading" | "complete" | "error";
|
|
174
|
+
/** A selected file and the host-controlled state of its upload. */
|
|
175
|
+
export interface FileUploadValue {
|
|
176
|
+
id: string;
|
|
177
|
+
file: File;
|
|
178
|
+
status: FileUploadStatus;
|
|
179
|
+
progress?: number;
|
|
180
|
+
error?: string;
|
|
181
|
+
}
|
|
182
|
+
export interface FileUploadParam extends BaseParam {
|
|
183
|
+
type: "fileUpload";
|
|
184
|
+
defaultValue: FileUploadValue[];
|
|
174
185
|
accept?: string;
|
|
175
|
-
|
|
186
|
+
multiple?: boolean;
|
|
187
|
+
uploadLabel?: string;
|
|
176
188
|
}
|
|
177
189
|
export interface InputGroup {
|
|
178
190
|
id: string;
|
|
@@ -182,6 +194,6 @@ export interface InputGroup {
|
|
|
182
194
|
collapsible?: boolean;
|
|
183
195
|
defaultCollapsed?: boolean;
|
|
184
196
|
}
|
|
185
|
-
export type ParamValue = number | string | null | string[] | RangeValue | VectorValue |
|
|
186
|
-
export type Param = NumberParam | TextParam | SelectionParam | DateParam | ColorParam | PropertyParam | ReadOnlyParam | ResourceParam | RangeParam | SegmentedParam | ActionsParam | AnchorGridParam | VectorParam |
|
|
197
|
+
export type ParamValue = number | string | boolean | null | string[] | RangeValue | VectorValue | FileUploadValue[];
|
|
198
|
+
export type Param = NumberParam | BooleanParam | TextParam | MarkdownParam | SelectionParam | DateParam | ColorParam | PropertyParam | ReadOnlyParam | ResourceParam | RangeParam | SegmentedParam | ActionsParam | AnchorGridParam | VectorParam | FileUploadParam;
|
|
187
199
|
export type ParamValueMap = Record<string, ParamValue>;
|
|
@@ -4,6 +4,8 @@ export type { BreadcrumbItem } from './breadcrumb';
|
|
|
4
4
|
export { Breadcrumb } from './breadcrumb';
|
|
5
5
|
export type { CheckboxProps } from './checkbox';
|
|
6
6
|
export { Checkbox } from './checkbox';
|
|
7
|
+
export type { ChipProps } from './chip';
|
|
8
|
+
export { Chip } from './chip';
|
|
7
9
|
export { ContentPlaceholder, Label as ContentPlaceholderLabel } from './content-placeholder';
|
|
8
10
|
export type { EmptyStateProps } from './empty-state';
|
|
9
11
|
export { EmptyState } from './empty-state';
|
|
@@ -3,38 +3,40 @@ import { ReactNode } from 'react';
|
|
|
3
3
|
declare const SIZE_STYLES: {
|
|
4
4
|
readonly sm: {
|
|
5
5
|
readonly container: {
|
|
6
|
-
readonly height: "
|
|
6
|
+
readonly height: "5";
|
|
7
7
|
readonly lineHeight: {
|
|
8
|
-
readonly base: "
|
|
8
|
+
readonly base: "5";
|
|
9
9
|
};
|
|
10
|
-
readonly px: "
|
|
10
|
+
readonly px: "xs";
|
|
11
11
|
};
|
|
12
12
|
readonly iconSize: 12;
|
|
13
|
-
readonly textStyle: "
|
|
13
|
+
readonly textStyle: "label/XS";
|
|
14
14
|
};
|
|
15
15
|
readonly md: {
|
|
16
16
|
readonly container: {
|
|
17
|
-
readonly height: "
|
|
17
|
+
readonly height: "6";
|
|
18
18
|
readonly lineHeight: {
|
|
19
|
-
readonly base: "
|
|
19
|
+
readonly base: "6";
|
|
20
20
|
};
|
|
21
21
|
readonly px: "xs";
|
|
22
22
|
};
|
|
23
23
|
readonly iconSize: 14;
|
|
24
|
-
readonly textStyle: "
|
|
24
|
+
readonly textStyle: "label/S/regular";
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
27
|
declare const TONE_STYLES: {
|
|
28
28
|
readonly neutral: {
|
|
29
|
-
readonly color: "
|
|
30
|
-
readonly bg: "bg.
|
|
29
|
+
readonly color: "fg";
|
|
30
|
+
readonly bg: "bg.subtle";
|
|
31
|
+
readonly borderColor: "border";
|
|
31
32
|
readonly _hover: {
|
|
32
|
-
readonly bg: "bg.
|
|
33
|
+
readonly bg: "bg.hover";
|
|
33
34
|
};
|
|
34
35
|
};
|
|
35
36
|
readonly accent: {
|
|
36
37
|
readonly color: "var(--schub-foreground-accent)";
|
|
37
38
|
readonly bg: "var(--schub-accent-subtle)";
|
|
39
|
+
readonly borderColor: "var(--schub-accent-subtle)";
|
|
38
40
|
readonly _hover: {
|
|
39
41
|
readonly bg: "var(--schub-accent-subtle)";
|
|
40
42
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export type { CollaborativeMarkdownEditorProps } from './collaborative-markdown-editor/collaborative-markdown-editor';
|
|
2
2
|
export { CollaborativeMarkdownEditor } from './collaborative-markdown-editor/collaborative-markdown-editor';
|
|
3
|
+
export { LazyMarkdownEditor } from './lazy-markdown-editor';
|
|
3
4
|
export type { MarkdownEditorProps } from './markdown-editor/markdown-editor';
|
|
4
5
|
export { MarkdownEditor } from './markdown-editor/markdown-editor';
|
|
5
6
|
export type { PromptEditorProps, PromptEditorRef, ReferenceItem } from './prompt-input/prompt-input';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function inferResourceTypeFromMediaType(mediaType: string): "text" | "table" | "image" | "
|
|
1
|
+
export declare function inferResourceTypeFromMediaType(mediaType: string): "text" | "table" | "image" | "markdown" | "json" | "pdf";
|