@flowdrop/flowdrop 2.12.0 → 2.14.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/CHANGELOG.md +54 -0
- package/dist/commands/executor.js +58 -8
- package/dist/commands/parser.js +3 -3
- package/dist/commands/types.d.ts +2 -0
- package/dist/components/App.svelte +11 -1
- package/dist/components/App.svelte.d.ts +9 -1
- package/dist/components/Button.svelte +7 -7
- package/dist/components/Button.svelte.d.ts +10 -0
- package/dist/components/CanvasBanner.svelte +19 -6
- package/dist/components/CanvasBanner.svelte.d.ts +15 -3
- package/dist/components/CanvasContextMenu.svelte +9 -9
- package/dist/components/CanvasContextMenu.svelte.d.ts +10 -0
- package/dist/components/CanvasToolbar.svelte +8 -7
- package/dist/components/CanvasToolbar.svelte.d.ts +10 -0
- package/dist/components/CanvasZoomControls.svelte +10 -9
- package/dist/components/CanvasZoomControls.svelte.d.ts +13 -0
- package/dist/components/ConfigForm.svelte +9 -17
- package/dist/components/ConfigForm.svelte.d.ts +10 -0
- package/dist/components/ConfigPanel.svelte +9 -5
- package/dist/components/ConfigPanel.svelte.d.ts +10 -0
- package/dist/components/EditorStatusBar.svelte +6 -5
- package/dist/components/EditorStatusBar.svelte.d.ts +7 -0
- package/dist/components/FlowDropEdge.svelte +15 -12
- package/dist/components/FlowDropEdge.svelte.d.ts +16 -0
- package/dist/components/InterfaceTag.svelte +13 -15
- package/dist/components/InterfaceTag.svelte.d.ts +19 -0
- package/dist/components/LoadingSpinner.svelte +8 -2
- package/dist/components/LoadingSpinner.svelte.d.ts +9 -0
- package/dist/components/Logo.svelte +11 -0
- package/dist/components/Logo.svelte.d.ts +9 -0
- package/dist/components/LogoWordmark.svelte +8 -3
- package/dist/components/LogoWordmark.svelte.d.ts +9 -0
- package/dist/components/LoopbackLanes.svelte +12 -6
- package/dist/components/LoopbackLanes.svelte.d.ts +13 -0
- package/dist/components/MarkdownDisplay.svelte +10 -3
- package/dist/components/MarkdownDisplay.svelte.d.ts +11 -0
- package/dist/components/Navbar.svelte +13 -5
- package/dist/components/Navbar.svelte.d.ts +14 -0
- package/dist/components/NodeInspector.svelte +7 -8
- package/dist/components/NodeInspector.svelte.d.ts +10 -0
- package/dist/components/NodeSidebar.svelte +9 -3
- package/dist/components/NodeSidebar.svelte.d.ts +10 -0
- package/dist/components/NodeStatusOverlay.svelte +30 -19
- package/dist/components/NodeStatusOverlay.svelte.d.ts +19 -0
- package/dist/components/NodeSwapPicker.svelte +1 -1
- package/dist/components/RunBar.svelte +10 -13
- package/dist/components/RunBar.svelte.d.ts +15 -0
- package/dist/components/RunsMenu.svelte +14 -13
- package/dist/components/RunsMenu.svelte.d.ts +15 -0
- package/dist/components/SchemaForm.svelte +10 -13
- package/dist/components/SchemaForm.svelte.d.ts +51 -0
- package/dist/components/SettingsPanel.svelte +5 -5
- package/dist/components/StatusIcon.svelte +14 -3
- package/dist/components/StatusIcon.svelte.d.ts +15 -0
- package/dist/components/StatusLabel.svelte +10 -2
- package/dist/components/StatusLabel.svelte.d.ts +11 -0
- package/dist/components/ThemeToggle.svelte +8 -5
- package/dist/components/ThemeToggle.svelte.d.ts +10 -0
- package/dist/components/UniversalNode.svelte +13 -5
- package/dist/components/UniversalNode.svelte.d.ts +15 -0
- package/dist/components/WorkflowInterfaceEntryCard.svelte +1 -1
- package/dist/components/WorkflowInterfaceEntryComposer.svelte +1 -2
- package/dist/components/ZoomTier.svelte +13 -10
- package/dist/components/ZoomTier.svelte.d.ts +14 -0
- package/dist/components/console/CommandConsole.svelte +9 -3
- package/dist/components/console/CommandConsole.svelte.d.ts +10 -0
- package/dist/components/console/ConsoleAutocomplete.svelte +4 -4
- package/dist/components/console/ConsoleAutocomplete.svelte.d.ts +5 -0
- package/dist/components/console/ConsoleInput.svelte +6 -4
- package/dist/components/console/ConsoleInput.svelte.d.ts +7 -0
- package/dist/components/console/ConsoleOutput.svelte +5 -3
- package/dist/components/console/ConsoleOutput.svelte.d.ts +6 -0
- package/dist/components/console/ConsoleStrip.svelte +9 -5
- package/dist/components/console/ConsoleStrip.svelte.d.ts +10 -0
- package/dist/components/form/FieldFactory.svelte +6 -2
- package/dist/components/form/FieldFactory.svelte.d.ts +46 -0
- package/dist/components/form/FormArray.svelte +9 -16
- package/dist/components/form/FormArray.svelte.d.ts +10 -0
- package/dist/components/form/FormArrayRows.svelte +8 -8
- package/dist/components/form/FormArrayRows.svelte.d.ts +11 -0
- package/dist/components/form/FormAutocomplete.svelte +6 -3
- package/dist/components/form/FormAutocomplete.svelte.d.ts +23 -0
- package/dist/components/form/FormCheckboxGroup.svelte +5 -5
- package/dist/components/form/FormCheckboxGroup.svelte.d.ts +6 -0
- package/dist/components/form/FormCodeEditor.svelte +8 -13
- package/dist/components/form/FormCodeEditor.svelte.d.ts +9 -0
- package/dist/components/form/FormField.svelte +7 -8
- package/dist/components/form/FormField.svelte.d.ts +10 -0
- package/dist/components/form/FormFieldLight.svelte +6 -5
- package/dist/components/form/FormFieldLight.svelte.d.ts +8 -0
- package/dist/components/form/FormFieldWrapper.svelte +8 -8
- package/dist/components/form/FormFieldWrapper.svelte.d.ts +9 -0
- package/dist/components/form/FormFieldset.svelte +6 -12
- package/dist/components/form/FormFieldset.svelte.d.ts +7 -0
- package/dist/components/form/FormMarkdownEditor.svelte +8 -15
- package/dist/components/form/FormMarkdownEditor.svelte.d.ts +9 -0
- package/dist/components/form/FormNumberField.svelte +5 -7
- package/dist/components/form/FormNumberField.svelte.d.ts +6 -0
- package/dist/components/form/FormPorts.svelte +133 -27
- package/dist/components/form/FormPorts.svelte.d.ts +19 -0
- package/dist/components/form/FormRangeField.svelte +5 -9
- package/dist/components/form/FormRangeField.svelte.d.ts +6 -0
- package/dist/components/form/FormSelect.svelte +5 -7
- package/dist/components/form/FormSelect.svelte.d.ts +6 -0
- package/dist/components/form/FormTemplateEditor.svelte +8 -16
- package/dist/components/form/FormTemplateEditor.svelte.d.ts +9 -0
- package/dist/components/form/FormTextField.svelte +5 -7
- package/dist/components/form/FormTextField.svelte.d.ts +6 -0
- package/dist/components/form/FormTextarea.svelte +5 -7
- package/dist/components/form/FormTextarea.svelte.d.ts +6 -0
- package/dist/components/form/FormToggle.svelte +6 -8
- package/dist/components/form/FormToggle.svelte.d.ts +7 -0
- package/dist/components/form/FormUISchemaRenderer.svelte +5 -9
- package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +7 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +6 -6
- package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/ConfirmationPrompt.svelte +6 -5
- package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/FormPrompt.svelte +6 -6
- package/dist/components/interrupt/FormPrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/InterruptBubble.svelte +10 -9
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +11 -0
- package/dist/components/interrupt/ReviewPrompt.svelte +5 -6
- package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/TextInputPrompt.svelte +6 -6
- package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +7 -0
- package/dist/components/nodes/AtomNode.svelte +31 -6
- package/dist/components/nodes/AtomNode.svelte.d.ts +15 -0
- package/dist/components/nodes/CaptionNode.svelte +50 -7
- package/dist/components/nodes/CaptionNode.svelte.d.ts +13 -0
- package/dist/components/nodes/GatewayNode.svelte +18 -11
- package/dist/components/nodes/GatewayNode.svelte.d.ts +21 -0
- package/dist/components/nodes/IdeaNode.svelte +47 -6
- package/dist/components/nodes/IdeaNode.svelte.d.ts +17 -0
- package/dist/components/nodes/NodeCard.svelte +26 -18
- package/dist/components/nodes/NodeCard.svelte.d.ts +20 -0
- package/dist/components/nodes/NodeConfigButton.svelte +15 -2
- package/dist/components/nodes/NodeConfigButton.svelte.d.ts +11 -0
- package/dist/components/nodes/NodeProblemMark.svelte +15 -10
- package/dist/components/nodes/NodeProblemMark.svelte.d.ts +16 -0
- package/dist/components/nodes/NodeTip.svelte +10 -7
- package/dist/components/nodes/NodeTip.svelte.d.ts +13 -0
- package/dist/components/nodes/NotesNode.svelte +30 -0
- package/dist/components/nodes/NotesNode.svelte.d.ts +14 -0
- package/dist/components/nodes/SimpleNode.svelte +35 -8
- package/dist/components/nodes/SimpleNode.svelte.d.ts +17 -0
- package/dist/components/nodes/SquareNode.svelte +38 -8
- package/dist/components/nodes/SquareNode.svelte.d.ts +17 -0
- package/dist/components/nodes/TerminalNode.svelte +24 -10
- package/dist/components/nodes/TerminalNode.svelte.d.ts +17 -0
- package/dist/components/nodes/ToolNode.svelte +14 -5
- package/dist/components/nodes/ToolNode.svelte.d.ts +15 -0
- package/dist/components/nodes/WorkflowNode.svelte +18 -15
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +21 -0
- package/dist/components/playground/ChatBubble.svelte +4 -3
- package/dist/components/playground/ChatBubble.svelte.d.ts +5 -0
- package/dist/components/playground/ChatInput.svelte +11 -6
- package/dist/components/playground/ChatInput.svelte.d.ts +14 -0
- package/dist/components/playground/ChatPanel.svelte +15 -7
- package/dist/components/playground/ChatPanel.svelte.d.ts +17 -0
- package/dist/components/playground/ControlPanel.svelte +26 -9
- package/dist/components/playground/ControlPanel.svelte.d.ts +29 -0
- package/dist/components/playground/DockedPlayground.svelte +15 -11
- package/dist/components/playground/DockedPlayground.svelte.d.ts +16 -0
- package/dist/components/playground/ExecutionConsole.svelte +10 -5
- package/dist/components/playground/ExecutionConsole.svelte.d.ts +12 -0
- package/dist/components/playground/ExecutionList.svelte +13 -0
- package/dist/components/playground/ExecutionList.svelte.d.ts +11 -0
- package/dist/components/playground/ExecutionLogs.svelte +6 -9
- package/dist/components/playground/ExecutionLogs.svelte.d.ts +7 -0
- package/dist/components/playground/HeaderMenu.svelte +6 -8
- package/dist/components/playground/HeaderMenu.svelte.d.ts +9 -0
- package/dist/components/playground/HierarchyTrail.svelte +6 -6
- package/dist/components/playground/HierarchyTrail.svelte.d.ts +8 -0
- package/dist/components/playground/InputCollector.svelte +6 -5
- package/dist/components/playground/InputCollector.svelte.d.ts +7 -0
- package/dist/components/playground/InputFields.svelte +8 -12
- package/dist/components/playground/InputFields.svelte.d.ts +9 -0
- package/dist/components/playground/InterfaceInputForm.svelte +6 -13
- package/dist/components/playground/InterfaceInputForm.svelte.d.ts +9 -0
- package/dist/components/playground/InterfaceJsonInput.svelte +6 -5
- package/dist/components/playground/InterfaceJsonInput.svelte.d.ts +8 -0
- package/dist/components/playground/LogRow.svelte +4 -5
- package/dist/components/playground/LogRow.svelte.d.ts +6 -0
- package/dist/components/playground/MessageBubble.svelte +13 -7
- package/dist/components/playground/MessageBubble.svelte.d.ts +15 -0
- package/dist/components/playground/MessageCard.svelte +5 -2
- package/dist/components/playground/MessageCard.svelte.d.ts +6 -0
- package/dist/components/playground/MessageMarkdown.svelte +8 -9
- package/dist/components/playground/MessageMarkdown.svelte.d.ts +11 -0
- package/dist/components/playground/MessageNotice.svelte +7 -0
- package/dist/components/playground/MessageNotice.svelte.d.ts +5 -0
- package/dist/components/playground/MessageStream.svelte +8 -6
- package/dist/components/playground/MessageStream.svelte.d.ts +11 -0
- package/dist/components/playground/MessageTagChip.svelte +7 -7
- package/dist/components/playground/MessageTagChip.svelte.d.ts +10 -0
- package/dist/components/playground/MessageTagStrip.svelte +6 -3
- package/dist/components/playground/MessageTagStrip.svelte.d.ts +8 -0
- package/dist/components/playground/OriginBadge.svelte +7 -4
- package/dist/components/playground/OriginBadge.svelte.d.ts +8 -0
- package/dist/components/playground/PipelineKanbanView.svelte +14 -0
- package/dist/components/playground/PipelineKanbanView.svelte.d.ts +12 -0
- package/dist/components/playground/PipelinePanel.svelte +14 -0
- package/dist/components/playground/PipelinePanel.svelte.d.ts +12 -0
- package/dist/components/playground/PipelineTableView.svelte +14 -0
- package/dist/components/playground/PipelineTableView.svelte.d.ts +12 -0
- package/dist/components/playground/Playground.svelte +17 -11
- package/dist/components/playground/Playground.svelte.d.ts +20 -0
- package/dist/components/playground/PlaygroundApp.svelte +24 -10
- package/dist/components/playground/PlaygroundApp.svelte.d.ts +26 -0
- package/dist/components/playground/PlaygroundHeader.svelte +8 -12
- package/dist/components/playground/PlaygroundHeader.svelte.d.ts +11 -0
- package/dist/components/playground/PlaygroundModal.svelte +6 -8
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +7 -0
- package/dist/components/playground/PlaygroundStudio.svelte +9 -0
- package/dist/components/playground/PlaygroundStudio.svelte.d.ts +7 -0
- package/dist/components/playground/PlaygroundSurface.svelte +19 -14
- package/dist/components/playground/PlaygroundSurface.svelte.d.ts +20 -0
- package/dist/components/playground/SessionManager.svelte +6 -5
- package/dist/components/playground/SessionManager.svelte.d.ts +7 -0
- package/dist/components/playground/StepsSummary.svelte +8 -9
- package/dist/components/playground/StepsSummary.svelte.d.ts +10 -0
- package/dist/components/primitives/Button.svelte +15 -7
- package/dist/components/primitives/Button.svelte.d.ts +18 -1
- package/dist/components/primitives/Card.svelte +8 -6
- package/dist/components/primitives/Card.svelte.d.ts +11 -0
- package/dist/components/primitives/Checkbox.svelte +8 -5
- package/dist/components/primitives/Checkbox.svelte.d.ts +11 -0
- package/dist/components/primitives/Chip.svelte +8 -4
- package/dist/components/primitives/Chip.svelte.d.ts +11 -0
- package/dist/components/primitives/Combobox.svelte +27 -18
- package/dist/components/primitives/Combobox.svelte.d.ts +33 -0
- package/dist/components/primitives/Composer.svelte +15 -16
- package/dist/components/primitives/Composer.svelte.d.ts +20 -0
- package/dist/components/primitives/EmptyState.svelte +9 -3
- package/dist/components/primitives/EmptyState.svelte.d.ts +11 -0
- package/dist/components/primitives/Field.svelte +12 -9
- package/dist/components/primitives/Field.svelte.d.ts +16 -0
- package/dist/components/primitives/IconButton.svelte +10 -5
- package/dist/components/primitives/IconButton.svelte.d.ts +13 -0
- package/dist/components/primitives/Menu.svelte +15 -14
- package/dist/components/primitives/Menu.svelte.d.ts +20 -0
- package/dist/components/primitives/Notice.svelte +11 -8
- package/dist/components/primitives/Notice.svelte.d.ts +14 -0
- package/dist/components/primitives/PanelHeader.svelte +10 -7
- package/dist/components/primitives/PanelHeader.svelte.d.ts +13 -0
- package/dist/components/primitives/Segmented.svelte +11 -4
- package/dist/components/primitives/Segmented.svelte.d.ts +14 -0
- package/dist/components/primitives/Select.svelte +13 -16
- package/dist/components/primitives/Select.svelte.d.ts +18 -0
- package/dist/components/primitives/StatusPill.svelte +11 -8
- package/dist/components/primitives/StatusPill.svelte.d.ts +15 -0
- package/dist/components/primitives/Switch.svelte +9 -6
- package/dist/components/primitives/Switch.svelte.d.ts +12 -0
- package/dist/components/primitives/Tabs.svelte +16 -15
- package/dist/components/primitives/Tabs.svelte.d.ts +22 -0
- package/dist/components/primitives/Toolbar.svelte +14 -13
- package/dist/components/primitives/Toolbar.svelte.d.ts +18 -0
- package/dist/components/primitives/ToolbarSeparator.svelte +5 -4
- package/dist/components/primitives/ToolbarSeparator.svelte.d.ts +7 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/editor/index.d.ts +1 -0
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +1 -1
- package/dist/layout/toWorkflow.d.ts +8 -7
- package/dist/layout/toWorkflow.js +20 -40
- package/dist/messages/defaults.d.ts +24 -0
- package/dist/messages/defaults.js +15 -0
- package/dist/playground/index.d.ts +1 -1
- package/dist/skins/graphite.d.ts +1 -1
- package/dist/skins/graphite.js +1 -1
- package/dist/stores/settingsStore.svelte.js +3 -0
- package/dist/stores/workflowStore.svelte.js +24 -7
- package/dist/styles/base.css +2 -126
- package/dist/styles/tokenAliases.js +1 -0
- package/dist/styles/tokens.css +9 -5
- package/dist/svelte-app.d.ts +10 -1
- package/dist/svelte-app.js +2 -1
- package/dist/themes/classic.d.ts +9 -0
- package/dist/themes/classic.js +16 -0
- package/dist/themes/index.d.ts +7 -2
- package/dist/themes/index.js +20 -10
- package/dist/types/index.d.ts +7 -0
- package/dist/types/playground.d.ts +9 -0
- package/dist/types/settings.d.ts +6 -2
- package/dist/types/theme.d.ts +6 -2
- package/dist/utils/playgroundChat.d.ts +10 -0
- package/dist/utils/playgroundChat.js +25 -0
- package/dist/utils/portExposure.d.ts +24 -1
- package/dist/utils/portExposure.js +46 -13
- package/dist/utils/portUtils.d.ts +5 -1
- package/dist/utils/portUtils.js +15 -4
- package/package.json +2 -1
- package/dist/components/IconButton.svelte +0 -80
- package/dist/components/IconButton.svelte.d.ts +0 -30
- package/dist/themes/default.d.ts +0 -2
- package/dist/themes/default.js +0 -9
|
@@ -1,18 +1,12 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
The
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- the standalone Playground (`Playground.svelte`, used by PlaygroundStudio,
|
|
11
|
-
PlaygroundModal and the /workflow/[id]/playground/[sessionId] route),
|
|
12
|
-
which is deprecated in favour of Test mode and removed in 3.0;
|
|
13
|
-
- the docked Playground of the editor's Test mode (`DockedPlayground.svelte`),
|
|
14
|
-
which must keep working when the standalone one goes. Everything both
|
|
15
|
-
need lives here.
|
|
2
|
+
@component
|
|
3
|
+
The Playground's conversation surface, shared by the editor and the standalone page.
|
|
4
|
+
The user sees `ExecutionConsole` (the flow's messages) and `ControlPanel` (typing, Run, sessions), with the session and run handling around them. For a form-first workflow the inputs are on top. It has no layout of its own: no pipeline panel and no minimum width.
|
|
5
|
+
|
|
6
|
+
Two callers use it. The docked Playground of the editor's Test mode (`DockedPlayground`) must keep working when the standalone one goes. The standalone `Playground` is deprecated and removed in 3.0. Everything both need lives here.
|
|
7
|
+
|
|
8
|
+
**Use it for** the Playground conversation inside a container you lay out yourself.
|
|
9
|
+
**Not for** the Test mode panel with its header; use `DockedPlayground` instead.
|
|
16
10
|
-->
|
|
17
11
|
|
|
18
12
|
<script lang="ts">
|
|
@@ -37,18 +31,29 @@
|
|
|
37
31
|
import { isPlaygroundChatHalfSet, isPlaygroundChatSet } from '../../utils/playgroundChat.js';
|
|
38
32
|
|
|
39
33
|
interface Props {
|
|
34
|
+
/** Id of the workflow to test. */
|
|
40
35
|
workflowId: string;
|
|
36
|
+
/** A pre-loaded workflow. Default: fetched by id. */
|
|
41
37
|
workflow?: Workflow;
|
|
38
|
+
/** Display mode. Default: standalone. */
|
|
42
39
|
mode?: PlaygroundMode;
|
|
40
|
+
/** Session to open on mount. Default: none. */
|
|
43
41
|
initialSessionId?: string;
|
|
42
|
+
/** API endpoints. Default: the page default. */
|
|
44
43
|
endpointConfig?: EndpointConfig;
|
|
45
44
|
/** Auth provider applied to this instance's API requests. */
|
|
46
45
|
authProvider?: AuthProvider;
|
|
46
|
+
/** Playground options. Default: none. */
|
|
47
47
|
config?: PlaygroundConfig;
|
|
48
|
+
/** Called when the user closes the Playground. */
|
|
48
49
|
onClose?: () => void;
|
|
50
|
+
/** Called when the user presses the Pipeline button. */
|
|
49
51
|
onTogglePanel?: () => void;
|
|
52
|
+
/** Whether the pipeline panel is open. Default: false. */
|
|
50
53
|
isPipelinePanelOpen?: boolean;
|
|
54
|
+
/** Called with the session id after a switch, so a host can update its URL. */
|
|
51
55
|
onSessionNavigate?: (sessionId: string) => void;
|
|
56
|
+
/** FlowDrop instance to use. Default: from context or the page default. */
|
|
52
57
|
instance?: FlowDropInstance;
|
|
53
58
|
/**
|
|
54
59
|
* Keep the instance's session, messages and polling when this surface goes
|
|
@@ -5,18 +5,29 @@ import type { AuthProvider } from '../../types/auth.js';
|
|
|
5
5
|
import type { PlaygroundMode, PlaygroundConfig } from '../../types/playground.js';
|
|
6
6
|
import type { FlowDropInstance } from '../../stores/instanceContainer.svelte.js';
|
|
7
7
|
interface Props {
|
|
8
|
+
/** Id of the workflow to test. */
|
|
8
9
|
workflowId: string;
|
|
10
|
+
/** A pre-loaded workflow. Default: fetched by id. */
|
|
9
11
|
workflow?: Workflow;
|
|
12
|
+
/** Display mode. Default: standalone. */
|
|
10
13
|
mode?: PlaygroundMode;
|
|
14
|
+
/** Session to open on mount. Default: none. */
|
|
11
15
|
initialSessionId?: string;
|
|
16
|
+
/** API endpoints. Default: the page default. */
|
|
12
17
|
endpointConfig?: EndpointConfig;
|
|
13
18
|
/** Auth provider applied to this instance's API requests. */
|
|
14
19
|
authProvider?: AuthProvider;
|
|
20
|
+
/** Playground options. Default: none. */
|
|
15
21
|
config?: PlaygroundConfig;
|
|
22
|
+
/** Called when the user closes the Playground. */
|
|
16
23
|
onClose?: () => void;
|
|
24
|
+
/** Called when the user presses the Pipeline button. */
|
|
17
25
|
onTogglePanel?: () => void;
|
|
26
|
+
/** Whether the pipeline panel is open. Default: false. */
|
|
18
27
|
isPipelinePanelOpen?: boolean;
|
|
28
|
+
/** Called with the session id after a switch, so a host can update its URL. */
|
|
19
29
|
onSessionNavigate?: (sessionId: string) => void;
|
|
30
|
+
/** FlowDrop instance to use. Default: from context or the page default. */
|
|
20
31
|
instance?: FlowDropInstance;
|
|
21
32
|
/**
|
|
22
33
|
* Keep the instance's session, messages and polling when this surface goes
|
|
@@ -74,6 +85,15 @@ interface Props {
|
|
|
74
85
|
close: () => void;
|
|
75
86
|
}]>;
|
|
76
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* The Playground's conversation surface, shared by the editor and the standalone page.
|
|
90
|
+
* The user sees `ExecutionConsole` (the flow's messages) and `ControlPanel` (typing, Run, sessions), with the session and run handling around them. For a form-first workflow the inputs are on top. It has no layout of its own: no pipeline panel and no minimum width.
|
|
91
|
+
*
|
|
92
|
+
* Two callers use it. The docked Playground of the editor's Test mode (`DockedPlayground`) must keep working when the standalone one goes. The standalone `Playground` is deprecated and removed in 3.0. Everything both need lives here.
|
|
93
|
+
*
|
|
94
|
+
* **Use it for** the Playground conversation inside a container you lay out yourself.
|
|
95
|
+
* **Not for** the Test mode panel with its header; use `DockedPlayground` instead.
|
|
96
|
+
*/
|
|
77
97
|
declare const PlaygroundSurface: import("svelte").Component<Props, {}, "">;
|
|
78
98
|
type PlaygroundSurface = ReturnType<typeof PlaygroundSurface>;
|
|
79
99
|
export default PlaygroundSurface;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
@component
|
|
3
|
+
**Exported for host apps; the editor does not render it.** A list of Playground sessions; no surface renders it any more. `ControlPanel` and the history menu in `PlaygroundHeader` replaced it.
|
|
4
|
+
It lists sessions with a relative time, lets the user create, switch and delete (delete asks to press again within 3 seconds), and works as a sidebar or a dropdown.
|
|
5
|
+
|
|
6
|
+
**Use it for** a host app's own sessions sidebar.
|
|
7
|
+
**Not for** the editor; use `ControlPanel` or `PlaygroundHeader` instead.
|
|
7
8
|
-->
|
|
8
9
|
|
|
9
10
|
<script lang="ts">
|
|
@@ -15,6 +15,13 @@ interface Props {
|
|
|
15
15
|
/** Display mode: sidebar or dropdown */
|
|
16
16
|
mode?: 'sidebar' | 'dropdown';
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* **Exported for host apps; the editor does not render it.** A list of Playground sessions; no surface renders it any more. `ControlPanel` and the history menu in `PlaygroundHeader` replaced it.
|
|
20
|
+
* It lists sessions with a relative time, lets the user create, switch and delete (delete asks to press again within 3 seconds), and works as a sidebar or a dropdown.
|
|
21
|
+
*
|
|
22
|
+
* **Use it for** a host app's own sessions sidebar.
|
|
23
|
+
* **Not for** the editor; use `ControlPanel` or `PlaygroundHeader` instead.
|
|
24
|
+
*/
|
|
18
25
|
declare const SessionManager: import("svelte").Component<Props, {}, "isExpanded">;
|
|
19
26
|
type SessionManager = ReturnType<typeof SessionManager>;
|
|
20
27
|
export default SessionManager;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
One row that sums up the steps of a turn.
|
|
4
|
+
The user sees it in the conversation, such as "4 steps - 46 ms - 1 waiting". Opening it shows a compact list (status dot, node, runs, time). A failed step's error stays visible under the row, open or closed. Steps from sub-workflows are indented, and their full path is the cell's title.
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
because that is what people look for. Nested (sub-workflow) steps are indented
|
|
7
|
-
in the node column; their full path is the cell's title. The origin chip and
|
|
8
|
-
the per-node breadcrumb rows of the old log rows are gone: the Playground is
|
|
9
|
-
where the reader already is, and the table says which node it was.
|
|
10
|
-
|
|
11
|
-
@internal Used by MessageStream.
|
|
6
|
+
**Use it for** showing what a run did, in place of one log line per step.
|
|
7
|
+
**Not for** a full run view; use `PipelinePanel` instead.
|
|
12
8
|
-->
|
|
13
9
|
|
|
14
10
|
<script lang="ts">
|
|
@@ -19,8 +15,11 @@
|
|
|
19
15
|
import type { StepsSummary } from './stepSummary.js';
|
|
20
16
|
|
|
21
17
|
interface Props {
|
|
18
|
+
/** The steps of the turn to sum up. */
|
|
22
19
|
summary: StepsSummary;
|
|
20
|
+
/** Whether the step list is open. */
|
|
23
21
|
expanded: boolean;
|
|
22
|
+
/** Called when the user opens or closes the list. */
|
|
24
23
|
onToggle: () => void;
|
|
25
24
|
/** Used to tie the toggle to the table it opens. */
|
|
26
25
|
id: string;
|
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import type { StepsSummary } from './stepSummary.js';
|
|
2
2
|
interface Props {
|
|
3
|
+
/** The steps of the turn to sum up. */
|
|
3
4
|
summary: StepsSummary;
|
|
5
|
+
/** Whether the step list is open. */
|
|
4
6
|
expanded: boolean;
|
|
7
|
+
/** Called when the user opens or closes the list. */
|
|
5
8
|
onToggle: () => void;
|
|
6
9
|
/** Used to tie the toggle to the table it opens. */
|
|
7
10
|
id: string;
|
|
8
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* One row that sums up the steps of a turn.
|
|
14
|
+
* The user sees it in the conversation, such as "4 steps - 46 ms - 1 waiting". Opening it shows a compact list (status dot, node, runs, time). A failed step's error stays visible under the row, open or closed. Steps from sub-workflows are indented, and their full path is the cell's title.
|
|
15
|
+
*
|
|
16
|
+
* **Use it for** showing what a run did, in place of one log line per step.
|
|
17
|
+
* **Not for** a full run view; use `PipelinePanel` instead.
|
|
18
|
+
*/
|
|
9
19
|
declare const StepsSummary: import("svelte").Component<Props, {}, "">;
|
|
10
20
|
type StepsSummary = ReturnType<typeof StepsSummary>;
|
|
11
21
|
export default StepsSummary;
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
Button: the editor's text button, with a variant, a size and optional icons.
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
base.css
|
|
7
|
-
wrapper over this component.
|
|
5
|
+
Sizes are the control heights: `sm` is 24px, `md` is 28px, `lg` is 32px. The editor
|
|
6
|
+
uses `sm` almost everywhere. `loading` shows a spinner and blocks clicks but keeps focus.
|
|
7
|
+
The focus ring comes from base.css, never from this file.
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Use it for** any labelled action: Save, Run, Retry, Cancel.
|
|
10
|
+
**Not for** icon-only actions; use `IconButton`. For a list of actions behind one
|
|
11
|
+
trigger use `Menu`.
|
|
12
|
+
|
|
13
|
+
Not exported from the package; internal to the editor. The wrapper `components/Button.svelte`
|
|
14
|
+
is the old API on top of this.
|
|
10
15
|
-->
|
|
11
16
|
|
|
12
17
|
<script lang="ts">
|
|
@@ -14,7 +19,10 @@
|
|
|
14
19
|
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
15
20
|
|
|
16
21
|
interface Props extends Omit<HTMLButtonAttributes, 'children' | 'class' | 'type' | 'title'> {
|
|
17
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Visual style. `danger` follows the theme. `destructive` is always the red fill (a final
|
|
24
|
+
* confirm). `danger-ghost` is red text with no fill, for a quiet delete.
|
|
25
|
+
*/
|
|
18
26
|
variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'destructive' | 'danger-ghost';
|
|
19
27
|
/** Height: `sm` = --fd-control-sm (24), `md` = --fd-control-md (28), `lg` = --fd-control-lg (32) */
|
|
20
28
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import type { HTMLButtonAttributes } from 'svelte/elements';
|
|
3
3
|
interface Props extends Omit<HTMLButtonAttributes, 'children' | 'class' | 'type' | 'title'> {
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Visual style. `danger` follows the theme. `destructive` is always the red fill (a final
|
|
6
|
+
* confirm). `danger-ghost` is red text with no fill, for a quiet delete.
|
|
7
|
+
*/
|
|
5
8
|
variant?: 'primary' | 'secondary' | 'ghost' | 'danger' | 'destructive' | 'danger-ghost';
|
|
6
9
|
/** Height: `sm` = --fd-control-sm (24), `md` = --fd-control-md (28), `lg` = --fd-control-lg (32) */
|
|
7
10
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -26,6 +29,20 @@ interface Props extends Omit<HTMLButtonAttributes, 'children' | 'class' | 'type'
|
|
|
26
29
|
/** Button label */
|
|
27
30
|
children?: Snippet;
|
|
28
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Button: the editor's text button, with a variant, a size and optional icons.
|
|
34
|
+
*
|
|
35
|
+
* Sizes are the control heights: `sm` is 24px, `md` is 28px, `lg` is 32px. The editor
|
|
36
|
+
* uses `sm` almost everywhere. `loading` shows a spinner and blocks clicks but keeps focus.
|
|
37
|
+
* The focus ring comes from base.css, never from this file.
|
|
38
|
+
*
|
|
39
|
+
* **Use it for** any labelled action: Save, Run, Retry, Cancel.
|
|
40
|
+
* **Not for** icon-only actions; use `IconButton`. For a list of actions behind one
|
|
41
|
+
* trigger use `Menu`.
|
|
42
|
+
*
|
|
43
|
+
* Not exported from the package; internal to the editor. The wrapper `components/Button.svelte`
|
|
44
|
+
* is the old API on top of this.
|
|
45
|
+
*/
|
|
29
46
|
declare const Button: import("svelte").Component<Props, {}, "">;
|
|
30
47
|
type Button = ReturnType<typeof Button>;
|
|
31
48
|
export default Button;
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
Card: a surface with an optional header row and footer row.
|
|
3
4
|
|
|
4
|
-
`variant="attention"` is the amber "needs you" frame
|
|
5
|
-
|
|
6
|
-
(named by `ariaLabel`, which makes it a landmark-ish region) or a `<div>`
|
|
7
|
-
when no label is given.
|
|
5
|
+
`variant="attention"` is the amber "needs you" frame. It is a plain `<section>` named by
|
|
6
|
+
`ariaLabel`, or a `<div>` when no label is given.
|
|
8
7
|
|
|
9
|
-
|
|
8
|
+
**Use it for** a bordered group of content, such as an input form or a prompt that waits for an answer.
|
|
9
|
+
**Not for** a whole panel; use `PanelHeader` for the top strip of a panel.
|
|
10
|
+
|
|
11
|
+
Not exported from the package; the API may still change.
|
|
10
12
|
-->
|
|
11
13
|
|
|
12
14
|
<script lang="ts">
|
|
@@ -15,6 +15,17 @@ interface Props {
|
|
|
15
15
|
/** Content. */
|
|
16
16
|
children?: Snippet;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Card: a surface with an optional header row and footer row.
|
|
20
|
+
*
|
|
21
|
+
* `variant="attention"` is the amber "needs you" frame. It is a plain `<section>` named by
|
|
22
|
+
* `ariaLabel`, or a `<div>` when no label is given.
|
|
23
|
+
*
|
|
24
|
+
* **Use it for** a bordered group of content, such as an input form or a prompt that waits for an answer.
|
|
25
|
+
* **Not for** a whole panel; use `PanelHeader` for the top strip of a panel.
|
|
26
|
+
*
|
|
27
|
+
* Not exported from the package; the API may still change.
|
|
28
|
+
*/
|
|
18
29
|
declare const Card: import("svelte").Component<Props, {}, "">;
|
|
19
30
|
type Card = ReturnType<typeof Card>;
|
|
20
31
|
export default Card;
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
Checkbox: a 16px box with a check mark, in place of the native control.
|
|
3
4
|
|
|
4
|
-
A real checkbox underneath
|
|
5
|
-
|
|
6
|
-
already names it.
|
|
5
|
+
A real checkbox sits underneath, so keyboard, forms and screen readers work as usual.
|
|
6
|
+
Pass `label` for visible text, or `aria-label` when the row around it already names it.
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
**Use it for** a yes/no option in a form or a list of choices.
|
|
9
|
+
**Not for** an instant on/off setting; use `Switch`.
|
|
10
|
+
|
|
11
|
+
Not exported from the package; the API may still change.
|
|
9
12
|
-->
|
|
10
13
|
|
|
11
14
|
<script lang="ts">
|
|
@@ -10,6 +10,17 @@ interface Props extends Omit<HTMLInputAttributes, 'type' | 'checked' | 'onchange
|
|
|
10
10
|
/** Extra classes on the root. */
|
|
11
11
|
class?: string;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Checkbox: a 16px box with a check mark, in place of the native control.
|
|
15
|
+
*
|
|
16
|
+
* A real checkbox sits underneath, so keyboard, forms and screen readers work as usual.
|
|
17
|
+
* Pass `label` for visible text, or `aria-label` when the row around it already names it.
|
|
18
|
+
*
|
|
19
|
+
* **Use it for** a yes/no option in a form or a list of choices.
|
|
20
|
+
* **Not for** an instant on/off setting; use `Switch`.
|
|
21
|
+
*
|
|
22
|
+
* Not exported from the package; the API may still change.
|
|
23
|
+
*/
|
|
13
24
|
declare const Checkbox: import("svelte").Component<Props, {}, "">;
|
|
14
25
|
type Checkbox = ReturnType<typeof Checkbox>;
|
|
15
26
|
export default Checkbox;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
Chip: a small, rounded label. Not interactive unless you give it `onremove`.
|
|
3
4
|
|
|
4
|
-
Tones map to the
|
|
5
|
-
|
|
5
|
+
Tones map to the muted/solid colour pairs. `onremove` adds a trailing x button with an
|
|
6
|
+
accessible label.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
**Use it for** tags and short status words next to a title.
|
|
9
|
+
**Not for** run status; use `StatusPill`. Not used in the editor yet.
|
|
10
|
+
|
|
11
|
+
Not exported from the package; not public API yet.
|
|
8
12
|
-->
|
|
9
13
|
|
|
10
14
|
<script lang="ts">
|
|
@@ -17,6 +17,17 @@ interface Props {
|
|
|
17
17
|
/** Chip text */
|
|
18
18
|
children: Snippet;
|
|
19
19
|
}
|
|
20
|
+
/**
|
|
21
|
+
* Chip: a small, rounded label. Not interactive unless you give it `onremove`.
|
|
22
|
+
*
|
|
23
|
+
* Tones map to the muted/solid colour pairs. `onremove` adds a trailing x button with an
|
|
24
|
+
* accessible label.
|
|
25
|
+
*
|
|
26
|
+
* **Use it for** tags and short status words next to a title.
|
|
27
|
+
* **Not for** run status; use `StatusPill`. Not used in the editor yet.
|
|
28
|
+
*
|
|
29
|
+
* Not exported from the package; not public API yet.
|
|
30
|
+
*/
|
|
20
31
|
declare const Chip: import("svelte").Component<Props, {}, "">;
|
|
21
32
|
type Chip = ReturnType<typeof Chip>;
|
|
22
33
|
export default Chip;
|
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
Combobox: the searchable rendering of `Select`.
|
|
3
4
|
|
|
4
|
-
An ARIA 1.2 editable combobox with a listbox popup
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"n of m"; options with a `group` are listed under their title.
|
|
5
|
+
An ARIA 1.2 editable combobox with a listbox popup. The input keeps focus the whole time and
|
|
6
|
+
the highlighted option is named by `aria-activedescendant`. Typing filters by label,
|
|
7
|
+
description and group (every word has to match) and bolds what matched. A status line
|
|
8
|
+
says "n of m". Options with a `group` are listed under their title.
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
the editor clears the selection on Escape), Tab closes without choosing.
|
|
14
|
-
A click outside closes it.
|
|
10
|
+
Keys: ArrowDown/ArrowUp open the list and move the highlight (disabled options are
|
|
11
|
+
skipped), Home/End jump to the ends, Enter chooses, Escape closes and drops the query, Tab
|
|
12
|
+
closes without choosing. A click outside closes it.
|
|
15
13
|
|
|
16
|
-
Closed, the field shows the chosen
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
clips it (the same as `Menu`).
|
|
14
|
+
Closed, the field shows the chosen label. Open, it is the search box and the label moves
|
|
15
|
+
to the placeholder. The popup sits under the field and is as wide as it. It is not
|
|
16
|
+
portalled, so a host that clips overflow clips it too (same as `Menu`).
|
|
20
17
|
|
|
21
|
-
Use it through `Select
|
|
22
|
-
|
|
18
|
+
**Use it** through `Select`, which picks this rendering for long, grouped or described lists.
|
|
19
|
+
**Not for** a short flat list; use `Select`, which then renders the browser's own `<select>`.
|
|
23
20
|
|
|
24
|
-
|
|
21
|
+
Not exported from the package; the API may still change.
|
|
25
22
|
-->
|
|
26
23
|
|
|
27
24
|
<script lang="ts">
|
|
@@ -37,21 +34,33 @@
|
|
|
37
34
|
} from '../../utils/selectOptions.js';
|
|
38
35
|
|
|
39
36
|
interface Props {
|
|
37
|
+
/** The options, optionally with a `description` and a `group`. */
|
|
40
38
|
options: SelectOption[];
|
|
41
39
|
/** The chosen option's value; '' (or any unknown value) is "nothing chosen". */
|
|
42
40
|
value?: string;
|
|
41
|
+
/** Runs with the new value when the user chooses an option. */
|
|
43
42
|
onValueChange?: (value: string) => void;
|
|
43
|
+
/** Id of the input, for a `<label for>`. */
|
|
44
44
|
id?: string;
|
|
45
|
+
/** Form field name. */
|
|
45
46
|
name?: string;
|
|
47
|
+
/** Disables the field. */
|
|
46
48
|
disabled?: boolean;
|
|
49
|
+
/** Shows the error border. */
|
|
47
50
|
invalid?: boolean;
|
|
51
|
+
/** Field height, matching Button: `sm` 24, `md` 28, `lg` 32. */
|
|
48
52
|
size?: 'sm' | 'md' | 'lg';
|
|
49
53
|
/** Shown when nothing is chosen. */
|
|
50
54
|
placeholder?: string;
|
|
55
|
+
/** Extra classes on the input. */
|
|
51
56
|
class?: string;
|
|
57
|
+
/** Accessible name when there is no visible label. */
|
|
52
58
|
'aria-label'?: string;
|
|
59
|
+
/** Id of the element that names the field. */
|
|
53
60
|
'aria-labelledby'?: string;
|
|
61
|
+
/** Id(s) of help or error text for the field. */
|
|
54
62
|
'aria-describedby'?: string;
|
|
63
|
+
/** Marks the field as required for screen readers. */
|
|
55
64
|
'aria-required'?: boolean | 'true' | 'false';
|
|
56
65
|
}
|
|
57
66
|
|
|
@@ -1,22 +1,55 @@
|
|
|
1
1
|
import { type SelectOption } from '../../utils/selectOptions.js';
|
|
2
2
|
interface Props {
|
|
3
|
+
/** The options, optionally with a `description` and a `group`. */
|
|
3
4
|
options: SelectOption[];
|
|
4
5
|
/** The chosen option's value; '' (or any unknown value) is "nothing chosen". */
|
|
5
6
|
value?: string;
|
|
7
|
+
/** Runs with the new value when the user chooses an option. */
|
|
6
8
|
onValueChange?: (value: string) => void;
|
|
9
|
+
/** Id of the input, for a `<label for>`. */
|
|
7
10
|
id?: string;
|
|
11
|
+
/** Form field name. */
|
|
8
12
|
name?: string;
|
|
13
|
+
/** Disables the field. */
|
|
9
14
|
disabled?: boolean;
|
|
15
|
+
/** Shows the error border. */
|
|
10
16
|
invalid?: boolean;
|
|
17
|
+
/** Field height, matching Button: `sm` 24, `md` 28, `lg` 32. */
|
|
11
18
|
size?: 'sm' | 'md' | 'lg';
|
|
12
19
|
/** Shown when nothing is chosen. */
|
|
13
20
|
placeholder?: string;
|
|
21
|
+
/** Extra classes on the input. */
|
|
14
22
|
class?: string;
|
|
23
|
+
/** Accessible name when there is no visible label. */
|
|
15
24
|
'aria-label'?: string;
|
|
25
|
+
/** Id of the element that names the field. */
|
|
16
26
|
'aria-labelledby'?: string;
|
|
27
|
+
/** Id(s) of help or error text for the field. */
|
|
17
28
|
'aria-describedby'?: string;
|
|
29
|
+
/** Marks the field as required for screen readers. */
|
|
18
30
|
'aria-required'?: boolean | 'true' | 'false';
|
|
19
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* Combobox: the searchable rendering of `Select`.
|
|
34
|
+
*
|
|
35
|
+
* An ARIA 1.2 editable combobox with a listbox popup. The input keeps focus the whole time and
|
|
36
|
+
* the highlighted option is named by `aria-activedescendant`. Typing filters by label,
|
|
37
|
+
* description and group (every word has to match) and bolds what matched. A status line
|
|
38
|
+
* says "n of m". Options with a `group` are listed under their title.
|
|
39
|
+
*
|
|
40
|
+
* Keys: ArrowDown/ArrowUp open the list and move the highlight (disabled options are
|
|
41
|
+
* skipped), Home/End jump to the ends, Enter chooses, Escape closes and drops the query, Tab
|
|
42
|
+
* closes without choosing. A click outside closes it.
|
|
43
|
+
*
|
|
44
|
+
* Closed, the field shows the chosen label. Open, it is the search box and the label moves
|
|
45
|
+
* to the placeholder. The popup sits under the field and is as wide as it. It is not
|
|
46
|
+
* portalled, so a host that clips overflow clips it too (same as `Menu`).
|
|
47
|
+
*
|
|
48
|
+
* **Use it** through `Select`, which picks this rendering for long, grouped or described lists.
|
|
49
|
+
* **Not for** a short flat list; use `Select`, which then renders the browser's own `<select>`.
|
|
50
|
+
*
|
|
51
|
+
* Not exported from the package; the API may still change.
|
|
52
|
+
*/
|
|
20
53
|
declare const Combobox: import("svelte").Component<Props, {}, "">;
|
|
21
54
|
type Combobox = ReturnType<typeof Combobox>;
|
|
22
55
|
export default Combobox;
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
Composer: an auto-growing message box with a send (or stop) button.
|
|
3
4
|
|
|
4
|
-
The textarea grows from one
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
clear `value` after sending; the caller decides (clear it in `onsubmit`).
|
|
5
|
+
The textarea grows from one row up to `maxRows`, then scrolls. Enter sends, Shift+Enter adds
|
|
6
|
+
a newline, and Enter during IME composition never sends. The component does not clear
|
|
7
|
+
`value` after sending; clear it in `onsubmit`.
|
|
8
8
|
|
|
9
|
-
`busy` turns
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
`busy` turns send into stop (`onstop`) and blocks sending. The stop button stays enabled
|
|
10
|
+
even when `disabled` is set, so a run in flight can always be stopped. `sendDisabled` blocks
|
|
11
|
+
send on top of the built-in checks, and `sendLabel` renames the button.
|
|
12
12
|
|
|
13
|
-
A host can
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
a command palette). `sendDisabled` blocks the send button on top of the
|
|
17
|
-
built-in blank/busy/disabled checks, and `sendLabel` renames it ("Save & send").
|
|
18
|
-
The stop button is never greyed out by `disabled`: a run in flight must stay
|
|
19
|
-
stoppable while the field is locked.
|
|
13
|
+
A host can listen to keys (`onkeydown` runs first; `preventDefault()` keeps the composer's
|
|
14
|
+
own Enter handling out), `oninput` and `onblur`, and set extra textarea attributes with
|
|
15
|
+
`inputProps` (for example combobox ARIA for a command palette).
|
|
20
16
|
|
|
21
|
-
|
|
17
|
+
**Use it for** the Playground chat, the AI assistant and the Console prompt.
|
|
18
|
+
**Not for** a short single-line field; use a plain input inside `Field`.
|
|
19
|
+
|
|
20
|
+
Not exported from the package; the API may still change.
|
|
22
21
|
-->
|
|
23
22
|
|
|
24
23
|
<script lang="ts">
|
|
@@ -42,6 +42,26 @@ interface Props {
|
|
|
42
42
|
/** Extra classes on the root. */
|
|
43
43
|
class?: string;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Composer: an auto-growing message box with a send (or stop) button.
|
|
47
|
+
*
|
|
48
|
+
* The textarea grows from one row up to `maxRows`, then scrolls. Enter sends, Shift+Enter adds
|
|
49
|
+
* a newline, and Enter during IME composition never sends. The component does not clear
|
|
50
|
+
* `value` after sending; clear it in `onsubmit`.
|
|
51
|
+
*
|
|
52
|
+
* `busy` turns send into stop (`onstop`) and blocks sending. The stop button stays enabled
|
|
53
|
+
* even when `disabled` is set, so a run in flight can always be stopped. `sendDisabled` blocks
|
|
54
|
+
* send on top of the built-in checks, and `sendLabel` renames the button.
|
|
55
|
+
*
|
|
56
|
+
* A host can listen to keys (`onkeydown` runs first; `preventDefault()` keeps the composer's
|
|
57
|
+
* own Enter handling out), `oninput` and `onblur`, and set extra textarea attributes with
|
|
58
|
+
* `inputProps` (for example combobox ARIA for a command palette).
|
|
59
|
+
*
|
|
60
|
+
* **Use it for** the Playground chat, the AI assistant and the Console prompt.
|
|
61
|
+
* **Not for** a short single-line field; use a plain input inside `Field`.
|
|
62
|
+
*
|
|
63
|
+
* Not exported from the package; the API may still change.
|
|
64
|
+
*/
|
|
45
65
|
declare const Composer: import("svelte").Component<Props, {}, "value" | "element">;
|
|
46
66
|
type Composer = ReturnType<typeof Composer>;
|
|
47
67
|
export default Composer;
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
@component
|
|
3
|
+
EmptyState: a quiet, centred "nothing here yet" block with an optional icon, title,
|
|
4
|
+
description and actions row.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
+
`size="sm"` is for lists and small panels (the runs list uses it); `md` is for a whole pane.
|
|
7
|
+
|
|
8
|
+
**Use it for** an empty list or panel, and say what the user can do next.
|
|
9
|
+
**Not for** an error or a warning; use `Notice`.
|
|
10
|
+
|
|
11
|
+
Not exported from the package; the API may still change.
|
|
6
12
|
-->
|
|
7
13
|
|
|
8
14
|
<script lang="ts">
|
|
@@ -13,6 +13,17 @@ interface Props {
|
|
|
13
13
|
/** Extra classes on the root. */
|
|
14
14
|
class?: string;
|
|
15
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* EmptyState: a quiet, centred "nothing here yet" block with an optional icon, title,
|
|
18
|
+
* description and actions row.
|
|
19
|
+
*
|
|
20
|
+
* `size="sm"` is for lists and small panels (the runs list uses it); `md` is for a whole pane.
|
|
21
|
+
*
|
|
22
|
+
* **Use it for** an empty list or panel, and say what the user can do next.
|
|
23
|
+
* **Not for** an error or a warning; use `Notice`.
|
|
24
|
+
*
|
|
25
|
+
* Not exported from the package; the API may still change.
|
|
26
|
+
*/
|
|
16
27
|
declare const EmptyState: import("svelte").Component<Props, {}, "">;
|
|
17
28
|
type EmptyState = ReturnType<typeof EmptyState>;
|
|
18
29
|
export default EmptyState;
|