@flowdrop/flowdrop 2.13.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 +44 -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 +1 -1
- package/dist/components/App.svelte.d.ts +1 -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 +7 -10
- package/dist/components/playground/DockedPlayground.svelte.d.ts +10 -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/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/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 +1 -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/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,24 +1,17 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
not-exposed port is hidden on the canvas, not wireable, and not
|
|
16
|
-
runtime-overridable.
|
|
17
|
-
|
|
18
|
-
The stored value is materialized as the FULL ordered list on the first edit
|
|
19
|
-
(so order + exposure stay independent inside one positional array), and reset
|
|
20
|
-
to `undefined` when it lands back on the metadata default order with no
|
|
21
|
-
exposure override.
|
|
2
|
+
@component
|
|
3
|
+
The ports list of a node's inspector: one row per port with a drag grip, the lane dot, the name, the lane name,
|
|
4
|
+
an interface menu and an eye button that shows or hides the port. Rows reorder by drag or Alt+Up and Alt+Down.
|
|
5
|
+
A gateway's branches are listed too, read-only.
|
|
6
|
+
|
|
7
|
+
Order is only cosmetic. Hiding a port removes it from the canvas, so it cannot be wired or overridden at run time.
|
|
8
|
+
The stored value is the full ordered list after the first edit, and is cleared again when it returns to the default.
|
|
9
|
+
|
|
10
|
+
A port that can't be hidden (locked by the node type, wired, or on the workflow interface) keeps its "on" eye
|
|
11
|
+
with a badge; activating it shows the reason instead of changing anything.
|
|
12
|
+
|
|
13
|
+
**Use it for** the Ports tab of the inspector (schema `format: "ports"`).
|
|
14
|
+
**Not for** adding or removing ports (the node type decides which exist).
|
|
22
15
|
-->
|
|
23
16
|
|
|
24
17
|
<script lang="ts">
|
|
@@ -33,7 +26,7 @@
|
|
|
33
26
|
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
34
27
|
import { buildPortsConfig, isPortExposed, orderPortsFor } from '../../utils/portUtils.js';
|
|
35
28
|
import { buildHandleId } from '../../utils/handleIds.js';
|
|
36
|
-
import {
|
|
29
|
+
import { countPortWires, hideBlock, isExposureLocked } from '../../utils/portExposure.js';
|
|
37
30
|
import {
|
|
38
31
|
entryAtPort,
|
|
39
32
|
exposableCandidate,
|
|
@@ -58,10 +51,15 @@
|
|
|
58
51
|
import { tick } from 'svelte';
|
|
59
52
|
|
|
60
53
|
interface Props {
|
|
54
|
+
/** Field identifier */
|
|
61
55
|
id: string;
|
|
56
|
+
/** The stored ports config (a per-direction ordered list of `{ id, exposed? }`); empty means the node type's default. */
|
|
62
57
|
value: unknown;
|
|
58
|
+
/** ARIA description ID */
|
|
63
59
|
ariaDescribedBy?: string;
|
|
60
|
+
/** Whether the field is disabled (read-only) */
|
|
64
61
|
disabled?: boolean;
|
|
62
|
+
/** Callback when the order or exposure changes */
|
|
65
63
|
onChange: (value: unknown) => void;
|
|
66
64
|
/** The node being configured, source of the port list + metadata defaults. */
|
|
67
65
|
node?: WorkflowNode;
|
|
@@ -223,6 +221,27 @@
|
|
|
223
221
|
onChange(buildPortsConfig(portsConfig, direction, ordered, portsFor(direction), exposureOf));
|
|
224
222
|
}
|
|
225
223
|
|
|
224
|
+
/** Edges on each of this node's ports, counted once per edge change. */
|
|
225
|
+
const wires = $derived(
|
|
226
|
+
node && fd.workflow.current
|
|
227
|
+
? countPortWires(node, fd.workflow.current)
|
|
228
|
+
: new Map<string, number>()
|
|
229
|
+
);
|
|
230
|
+
|
|
231
|
+
/** The row whose refusal reason is open. Tied to a node, so it can't outlive it. */
|
|
232
|
+
let reasonOpen = $state<{ nodeId: string; direction: Direction; portId: string } | null>(null);
|
|
233
|
+
|
|
234
|
+
const isReasonOpen = (direction: Direction, portId: string): boolean =>
|
|
235
|
+
reasonOpen !== null &&
|
|
236
|
+
reasonOpen.nodeId === node?.id &&
|
|
237
|
+
reasonOpen.direction === direction &&
|
|
238
|
+
reasonOpen.portId === portId;
|
|
239
|
+
|
|
240
|
+
function toggleReason(direction: Direction, portId: string): void {
|
|
241
|
+
if (!node) return;
|
|
242
|
+
reasonOpen = isReasonOpen(direction, portId) ? null : { nodeId: node.id, direction, portId };
|
|
243
|
+
}
|
|
244
|
+
|
|
226
245
|
function setExposed(direction: Direction, portId: string, exposed: boolean): void {
|
|
227
246
|
commit(direction, orderedPorts(direction), (port) =>
|
|
228
247
|
port.id === portId ? exposed : isPortExposed(port, portsConfig[direction])
|
|
@@ -326,6 +345,13 @@
|
|
|
326
345
|
: undefined}
|
|
327
346
|
{@const ifaceItems = interfaceMenu(direction, port)}
|
|
328
347
|
{@const laneName = checker.getDataTypeConfig(port.dataType)?.name ?? port.dataType}
|
|
348
|
+
{@const workflow = fd.workflow.current}
|
|
349
|
+
{@const block =
|
|
350
|
+
node && workflow && (exposed || isExposureLocked(node, direction, port))
|
|
351
|
+
? hideBlock(node, workflow, direction, port, wires)
|
|
352
|
+
: null}
|
|
353
|
+
{@const reasonId = `${id}-${direction}-${port.id}-reason`}
|
|
354
|
+
{@const reasonShown = block !== null && isReasonOpen(direction, port.id)}
|
|
329
355
|
<!-- svelte-ignore a11y_no_noninteractive_tabindex, a11y_no_noninteractive_element_interactions -->
|
|
330
356
|
<li
|
|
331
357
|
class="fd-ports__item"
|
|
@@ -395,21 +421,60 @@
|
|
|
395
421
|
/>
|
|
396
422
|
{/if}
|
|
397
423
|
</span>
|
|
398
|
-
<!-- A
|
|
399
|
-
|
|
424
|
+
<!-- A port whose exposure can't change (locked by the node type,
|
|
425
|
+
wired, or on the workflow interface) shows why instead of toggling. -->
|
|
426
|
+
{#if block}
|
|
427
|
+
<IconButton
|
|
428
|
+
size="sm"
|
|
429
|
+
class="fd-ports__eye fd-ports__eye-blocked"
|
|
430
|
+
aria-expanded={reasonShown}
|
|
431
|
+
aria-describedby={reasonShown ? reasonId : undefined}
|
|
432
|
+
ariaLabel={block.kind === 'locked'
|
|
433
|
+
? messages().form.ports.locked({ port: port.name })
|
|
434
|
+
: block.kind === 'wired'
|
|
435
|
+
? messages().form.ports.wired({ port: port.name })
|
|
436
|
+
: messages().form.ports.published({ port: port.name })}
|
|
437
|
+
data-testid={`port-${block.kind}-${direction}-${port.id}`}
|
|
438
|
+
onclick={() => toggleReason(direction, port.id)}
|
|
439
|
+
onkeydown={(e) => {
|
|
440
|
+
if (e.key !== 'Escape' || !reasonShown) return;
|
|
441
|
+
e.stopPropagation();
|
|
442
|
+
reasonOpen = null;
|
|
443
|
+
}}
|
|
444
|
+
>
|
|
445
|
+
<Icon icon="heroicons:eye" />
|
|
446
|
+
<Icon
|
|
447
|
+
class="fd-ports__badge"
|
|
448
|
+
icon={block.kind === 'locked'
|
|
449
|
+
? 'heroicons:lock-closed-solid'
|
|
450
|
+
: block.kind === 'wired'
|
|
451
|
+
? 'heroicons:link-solid'
|
|
452
|
+
: 'heroicons:tag-solid'}
|
|
453
|
+
/>
|
|
454
|
+
</IconButton>
|
|
455
|
+
{#if reasonShown}
|
|
456
|
+
<span class="fd-ports__reason" id={reasonId}>
|
|
457
|
+
{block.kind === 'locked'
|
|
458
|
+
? messages().form.ports.lockedHint
|
|
459
|
+
: block.kind === 'wired'
|
|
460
|
+
? messages().form.ports.wiredHint({ n: block.count })
|
|
461
|
+
: messages().form.ports.publishedHint}
|
|
462
|
+
</span>
|
|
463
|
+
{/if}
|
|
464
|
+
{:else}
|
|
400
465
|
<IconButton
|
|
401
466
|
size="sm"
|
|
402
467
|
class="fd-ports__eye"
|
|
403
468
|
id={`${id}-${direction}-${port.id}`}
|
|
404
|
-
ariaLabel={exposed
|
|
405
|
-
|
|
469
|
+
ariaLabel={exposed
|
|
470
|
+
? messages().form.ports.hide({ port: port.name })
|
|
471
|
+
: messages().form.ports.show({ port: port.name })}
|
|
472
|
+
title={exposed ? messages().form.ports.shown : messages().form.ports.hidden}
|
|
406
473
|
{disabled}
|
|
407
474
|
onclick={() => setExposed(direction, port.id, !exposed)}
|
|
408
475
|
>
|
|
409
476
|
<Icon icon={exposed ? 'heroicons:eye' : 'heroicons:eye-slash'} />
|
|
410
477
|
</IconButton>
|
|
411
|
-
{:else}
|
|
412
|
-
<span class="fd-ports__eye-slot" aria-hidden="true"></span>
|
|
413
478
|
{/if}
|
|
414
479
|
</li>
|
|
415
480
|
{/each}
|
|
@@ -505,6 +570,47 @@
|
|
|
505
570
|
width: var(--fd-control-sm);
|
|
506
571
|
}
|
|
507
572
|
|
|
573
|
+
/* A blocked port: the "on" eye with a badge; a button that explains, not toggles. */
|
|
574
|
+
.fd-ports__item :global(.fd-ports__eye-blocked) {
|
|
575
|
+
position: relative;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.fd-ports__item :global(.fd-ports__eye-blocked:focus-visible) {
|
|
579
|
+
outline: 2px solid var(--fd-primary);
|
|
580
|
+
outline-offset: 1px;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.fd-ports__item :global(.fd-ports__eye-blocked svg) {
|
|
584
|
+
width: 1rem;
|
|
585
|
+
height: 1rem;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/* The badge sits on the eye's lower right, inside the cell (the eye column
|
|
589
|
+
is the panel's last, so anything past it is clipped). */
|
|
590
|
+
.fd-ports__item :global(.fd-ports__eye-blocked .fd-ports__badge) {
|
|
591
|
+
position: absolute;
|
|
592
|
+
right: 0.15rem;
|
|
593
|
+
bottom: 0.2rem;
|
|
594
|
+
width: 0.65rem;
|
|
595
|
+
height: 0.65rem;
|
|
596
|
+
padding: 1px;
|
|
597
|
+
box-sizing: content-box;
|
|
598
|
+
color: var(--fd-foreground);
|
|
599
|
+
background: var(--fd-background);
|
|
600
|
+
border-radius: var(--fd-radius-full);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
/* Why a port can't be hidden, on its own line under the row. */
|
|
604
|
+
.fd-ports__reason {
|
|
605
|
+
grid-column: 1 / -1;
|
|
606
|
+
grid-row: 2;
|
|
607
|
+
min-width: 0;
|
|
608
|
+
padding: 0 var(--fd-space-xs) var(--fd-space-xs) 0;
|
|
609
|
+
text-align: right;
|
|
610
|
+
font-size: var(--fd-text-xs);
|
|
611
|
+
color: var(--fd-muted-foreground);
|
|
612
|
+
}
|
|
613
|
+
|
|
508
614
|
/* Room for the hint or error under the tag being typed. */
|
|
509
615
|
.fd-ports__item--naming {
|
|
510
616
|
margin-bottom: var(--fd-space-xl);
|
|
@@ -1,13 +1,32 @@
|
|
|
1
1
|
import type { WorkflowNode } from '../../types/index.js';
|
|
2
2
|
interface Props {
|
|
3
|
+
/** Field identifier */
|
|
3
4
|
id: string;
|
|
5
|
+
/** The stored ports config (a per-direction ordered list of `{ id, exposed? }`); empty means the node type's default. */
|
|
4
6
|
value: unknown;
|
|
7
|
+
/** ARIA description ID */
|
|
5
8
|
ariaDescribedBy?: string;
|
|
9
|
+
/** Whether the field is disabled (read-only) */
|
|
6
10
|
disabled?: boolean;
|
|
11
|
+
/** Callback when the order or exposure changes */
|
|
7
12
|
onChange: (value: unknown) => void;
|
|
8
13
|
/** The node being configured, source of the port list + metadata defaults. */
|
|
9
14
|
node?: WorkflowNode;
|
|
10
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* The ports list of a node's inspector: one row per port with a drag grip, the lane dot, the name, the lane name,
|
|
18
|
+
* an interface menu and an eye button that shows or hides the port. Rows reorder by drag or Alt+Up and Alt+Down.
|
|
19
|
+
* A gateway's branches are listed too, read-only.
|
|
20
|
+
*
|
|
21
|
+
* Order is only cosmetic. Hiding a port removes it from the canvas, so it cannot be wired or overridden at run time.
|
|
22
|
+
* The stored value is the full ordered list after the first edit, and is cleared again when it returns to the default.
|
|
23
|
+
*
|
|
24
|
+
* A port that can't be hidden (locked by the node type, wired, or on the workflow interface) keeps its "on" eye
|
|
25
|
+
* with a badge; activating it shows the reason instead of changing anything.
|
|
26
|
+
*
|
|
27
|
+
* **Use it for** the Ports tab of the inspector (schema `format: "ports"`).
|
|
28
|
+
* **Not for** adding or removing ports (the node type decides which exist).
|
|
29
|
+
*/
|
|
11
30
|
declare const FormPorts: import("svelte").Component<Props, {}, "">;
|
|
12
31
|
type FormPorts = ReturnType<typeof FormPorts>;
|
|
13
32
|
export default FormPorts;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Min/max/step support for value constraints
|
|
8
|
-
- Real-time value display with tabular numeric font
|
|
9
|
-
- Proper ARIA attributes for accessibility
|
|
10
|
-
- Visual feedback for current value position
|
|
2
|
+
@component
|
|
3
|
+
A slider for a number inside a range, with the current value shown beside it. Set `min`, `max` and `step`.
|
|
4
|
+
|
|
5
|
+
**Use it for** values with a natural scale such as temperature. The factory picks it for numbers with `format: "range"`.
|
|
6
|
+
**Not for** exact entry of large numbers (use `FormNumberField`).
|
|
11
7
|
-->
|
|
12
8
|
|
|
13
9
|
<script lang="ts">
|
|
@@ -18,6 +18,12 @@ interface Props {
|
|
|
18
18
|
/** Callback when value changes */
|
|
19
19
|
onChange: (value: number) => void;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* A slider for a number inside a range, with the current value shown beside it. Set `min`, `max` and `step`.
|
|
23
|
+
*
|
|
24
|
+
* **Use it for** values with a natural scale such as temperature. The factory picks it for numbers with `format: "range"`.
|
|
25
|
+
* **Not for** exact entry of large numbers (use `FormNumberField`).
|
|
26
|
+
*/
|
|
21
27
|
declare const FormRangeField: import("svelte").Component<Props, {}, "">;
|
|
22
28
|
type FormRangeField = ReturnType<typeof FormRangeField>;
|
|
23
29
|
export default FormRangeField;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Supports both string[] and FieldOption[] for options
|
|
8
|
-
- Proper ARIA attributes for accessibility
|
|
2
|
+
@component
|
|
3
|
+
A dropdown for choosing one value from a list. Options are plain strings or `{ value, label }` pairs.
|
|
4
|
+
|
|
5
|
+
**Use it for** a fixed list of choices. The factory picks it for `enum` and for `oneOf` with `const` and `title`.
|
|
6
|
+
**Not for** several choices at once (use `FormCheckboxGroup`) or choices fetched from a server (use `FormAutocomplete`).
|
|
9
7
|
-->
|
|
10
8
|
|
|
11
9
|
<script lang="ts">
|
|
@@ -15,6 +15,12 @@ interface Props {
|
|
|
15
15
|
/** Callback when value changes */
|
|
16
16
|
onChange: (value: string) => void;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* A dropdown for choosing one value from a list. Options are plain strings or `{ value, label }` pairs.
|
|
20
|
+
*
|
|
21
|
+
* **Use it for** a fixed list of choices. The factory picks it for `enum` and for `oneOf` with `const` and `title`.
|
|
22
|
+
* **Not for** several choices at once (use `FormCheckboxGroup`) or choices fetched from a server (use `FormAutocomplete`).
|
|
23
|
+
*/
|
|
18
24
|
declare const FormSelect: import("svelte").Component<Props, {}, "">;
|
|
19
25
|
type FormSelect = ReturnType<typeof FormSelect>;
|
|
20
26
|
export default FormSelect;
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- Dark/light theme support
|
|
11
|
-
- Consistent styling with other form components
|
|
12
|
-
- Line wrapping for better template readability
|
|
13
|
-
- Optional variable hints display (clickable buttons)
|
|
14
|
-
- Proper ARIA attributes for accessibility
|
|
15
|
-
|
|
16
|
-
Usage:
|
|
17
|
-
Use with schema format: "template" to render this editor
|
|
2
|
+
@component
|
|
3
|
+
An editor for text with `{{ variable }}` placeholders, built on CodeMirror 6. Placeholders are coloured, typing `{{` or `.`
|
|
4
|
+
offers the variables from connected nodes, and nested values (`user.address.city`, `items[0].name`) can be drilled into.
|
|
5
|
+
|
|
6
|
+
Schema fields with `format: "template"` draw this. It is bundled only in `form/full` or when registered on the instance.
|
|
7
|
+
|
|
8
|
+
**Use it for** prompts and messages that take values from earlier nodes.
|
|
9
|
+
**Not for** plain text with no variables (use `FormTextarea`).
|
|
18
10
|
-->
|
|
19
11
|
|
|
20
12
|
<script lang="ts">
|
|
@@ -36,6 +36,15 @@ interface Props {
|
|
|
36
36
|
/** Auth provider for API requests */
|
|
37
37
|
authProvider?: AuthProvider;
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* An editor for text with `{{ variable }}` placeholders, built on CodeMirror 6. Placeholders are coloured, typing `{{` or `.`
|
|
41
|
+
* offers the variables from connected nodes, and nested values (`user.address.city`, `items[0].name`) can be drilled into.
|
|
42
|
+
*
|
|
43
|
+
* Schema fields with `format: "template"` draw this. It is bundled only in `form/full` or when registered on the instance.
|
|
44
|
+
*
|
|
45
|
+
* **Use it for** prompts and messages that take values from earlier nodes.
|
|
46
|
+
* **Not for** plain text with no variables (use `FormTextarea`).
|
|
47
|
+
*/
|
|
39
48
|
declare const FormTemplateEditor: import("svelte").Component<Props, {}, "">;
|
|
40
49
|
type FormTemplateEditor = ReturnType<typeof FormTemplateEditor>;
|
|
41
50
|
export default FormTemplateEditor;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Proper ARIA attributes for accessibility
|
|
8
|
-
- Placeholder support
|
|
2
|
+
@component
|
|
3
|
+
A one-line text input for string values.
|
|
4
|
+
|
|
5
|
+
**Use it for** short text in a config form. The factory picks it for `type: "string"`.
|
|
6
|
+
**Not for** long text (use `FormTextarea`) or a fixed list of values (use `FormSelect`).
|
|
9
7
|
-->
|
|
10
8
|
|
|
11
9
|
<script lang="ts">
|
|
@@ -14,6 +14,12 @@ interface Props {
|
|
|
14
14
|
/** Callback when value changes */
|
|
15
15
|
onChange: (value: string) => void;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* A one-line text input for string values.
|
|
19
|
+
*
|
|
20
|
+
* **Use it for** short text in a config form. The factory picks it for `type: "string"`.
|
|
21
|
+
* **Not for** long text (use `FormTextarea`) or a fixed list of values (use `FormSelect`).
|
|
22
|
+
*/
|
|
17
23
|
declare const FormTextField: import("svelte").Component<Props, {}, "">;
|
|
18
24
|
type FormTextField = ReturnType<typeof FormTextField>;
|
|
19
25
|
export default FormTextField;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Focus and hover states
|
|
8
|
-
- Proper ARIA attributes for accessibility
|
|
2
|
+
@component
|
|
3
|
+
A multi-line text box that can be resized, with a minimum height.
|
|
4
|
+
|
|
5
|
+
**Use it for** longer plain text such as a system prompt. The factory picks it for `format: "multiline"`.
|
|
6
|
+
**Not for** text with `{{ variables }}` (use `FormTemplateEditor`) or Markdown (use `FormMarkdownEditor`).
|
|
9
7
|
-->
|
|
10
8
|
|
|
11
9
|
<script lang="ts">
|
|
@@ -16,6 +16,12 @@ interface Props {
|
|
|
16
16
|
/** Callback when value changes */
|
|
17
17
|
onChange: (value: string) => void;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* A multi-line text box that can be resized, with a minimum height.
|
|
21
|
+
*
|
|
22
|
+
* **Use it for** longer plain text such as a system prompt. The factory picks it for `format: "multiline"`.
|
|
23
|
+
* **Not for** text with `{{ variables }}` (use `FormTemplateEditor`) or Markdown (use `FormMarkdownEditor`).
|
|
24
|
+
*/
|
|
19
25
|
declare const FormTextarea: import("svelte").Component<Props, {}, "">;
|
|
20
26
|
type FormTextarea = ReturnType<typeof FormTextarea>;
|
|
21
27
|
export default FormTextarea;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
stay as the switch's accessible name
|
|
9
|
-
- Focus-visible states for keyboard navigation
|
|
2
|
+
@component
|
|
3
|
+
A switch for a true or false value. It shows no state word; the track colour is the state.
|
|
4
|
+
The on and off labels are only its accessible name.
|
|
5
|
+
|
|
6
|
+
**Use it for** on or off options. The factory picks it for `type: "boolean"`.
|
|
7
|
+
**Not for** choosing several items from a list (use `FormCheckboxGroup`).
|
|
10
8
|
-->
|
|
11
9
|
|
|
12
10
|
<script lang="ts">
|
|
@@ -26,6 +26,13 @@ interface Props {
|
|
|
26
26
|
/** Callback when value changes */
|
|
27
27
|
onChange: (value: boolean) => void;
|
|
28
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* A switch for a true or false value. It shows no state word; the track colour is the state.
|
|
31
|
+
* The on and off labels are only its accessible name.
|
|
32
|
+
*
|
|
33
|
+
* **Use it for** on or off options. The factory picks it for `type: "boolean"`.
|
|
34
|
+
* **Not for** choosing several items from a list (use `FormCheckboxGroup`).
|
|
35
|
+
*/
|
|
29
36
|
declare const FormToggle: import("svelte").Component<Props, {}, "">;
|
|
30
37
|
type FormToggle = ReturnType<typeof FormToggle>;
|
|
31
38
|
export default FormToggle;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
@component
|
|
3
|
+
Draws a node's UI schema tree: a `VerticalLayout` stacks its children, a `Group` wraps them in a `FormFieldset`,
|
|
4
|
+
and a `Control` draws one field through `FormField`.
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Rendering logic:
|
|
9
|
-
- Control -> resolve scope to key, render FormField
|
|
10
|
-
- VerticalLayout -> vertical flex container with recursive children
|
|
11
|
-
- Group -> FormFieldset wrapping recursive children
|
|
6
|
+
**Use it for** nothing directly. `ConfigForm` and `SchemaForm` use it when a schema has a `uiSchema`.
|
|
7
|
+
**Not for** flat forms (those are drawn in schema order without it).
|
|
12
8
|
-->
|
|
13
9
|
|
|
14
10
|
<script lang="ts">
|
|
@@ -27,6 +27,13 @@ interface Props {
|
|
|
27
27
|
/** Auth provider (optional, passed through to FormField) */
|
|
28
28
|
authProvider?: AuthProvider;
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Draws a node's UI schema tree: a `VerticalLayout` stacks its children, a `Group` wraps them in a `FormFieldset`,
|
|
32
|
+
* and a `Control` draws one field through `FormField`.
|
|
33
|
+
*
|
|
34
|
+
* **Use it for** nothing directly. `ConfigForm` and `SchemaForm` use it when a schema has a `uiSchema`.
|
|
35
|
+
* **Not for** flat forms (those are drawn in schema order without it).
|
|
36
|
+
*/
|
|
30
37
|
declare const FormUISchemaRenderer: import("svelte").Component<Props, {}, "">;
|
|
31
38
|
type FormUISchemaRenderer = ReturnType<typeof FormUISchemaRenderer>;
|
|
32
39
|
export default FormUISchemaRenderer;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
@component
|
|
3
|
+
The options of a choice question: radio buttons for one answer, check boxes when several are allowed
|
|
4
|
+
(with optional minimum and maximum).
|
|
5
|
+
|
|
6
|
+
**Use it for** the body of an `InterruptBubble` of type `choice`.
|
|
7
|
+
**Not for** a yes or no question (use `ConfirmationPrompt`) or free text (use `TextInputPrompt`).
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<script lang="ts">
|
|
@@ -16,6 +16,13 @@ interface Props {
|
|
|
16
16
|
/** Callback when user submits selection */
|
|
17
17
|
onSubmit: (value: string | string[]) => void;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* The options of a choice question: radio buttons for one answer, check boxes when several are allowed
|
|
21
|
+
* (with optional minimum and maximum).
|
|
22
|
+
*
|
|
23
|
+
* **Use it for** the body of an `InterruptBubble` of type `choice`.
|
|
24
|
+
* **Not for** a yes or no question (use `ConfirmationPrompt`) or free text (use `TextInputPrompt`).
|
|
25
|
+
*/
|
|
19
26
|
declare const ChoicePrompt: import("svelte").Component<Props, {}, "">;
|
|
20
27
|
type ChoicePrompt = ReturnType<typeof ChoicePrompt>;
|
|
21
28
|
export default ChoicePrompt;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
@component
|
|
3
|
+
Two buttons for a yes or no question, with labels the step can set: the second action first, then the primary one.
|
|
4
|
+
The question itself is the card title, drawn by `InterruptBubble`.
|
|
5
|
+
|
|
6
|
+
**Use it for** the body of an `InterruptBubble` of type `confirmation`.
|
|
7
|
+
**Not for** more than two answers (use `ChoicePrompt`).
|
|
7
8
|
-->
|
|
8
9
|
|
|
9
10
|
<script lang="ts">
|
|
@@ -16,6 +16,13 @@ interface Props {
|
|
|
16
16
|
/** Callback when user declines (No) */
|
|
17
17
|
onDecline: () => void;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Two buttons for a yes or no question, with labels the step can set: the second action first, then the primary one.
|
|
21
|
+
* The question itself is the card title, drawn by `InterruptBubble`.
|
|
22
|
+
*
|
|
23
|
+
* **Use it for** the body of an `InterruptBubble` of type `confirmation`.
|
|
24
|
+
* **Not for** more than two answers (use `ChoicePrompt`).
|
|
25
|
+
*/
|
|
19
26
|
declare const ConfirmationPrompt: import("svelte").Component<Props, {}, "">;
|
|
20
27
|
type ConfirmationPrompt = ReturnType<typeof ConfirmationPrompt>;
|
|
21
28
|
export default ConfirmationPrompt;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
@component
|
|
3
|
+
A form built from a JSON Schema, placed straight on the interrupt card. It wraps `SchemaForm`, so the fields look
|
|
4
|
+
the same as in other forms.
|
|
5
|
+
|
|
6
|
+
**Use it for** the body of an `InterruptBubble` of type `form`.
|
|
7
|
+
**Not for** editing a node (that is `ConfigForm`).
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<script lang="ts">
|
|
@@ -14,6 +14,13 @@ interface Props {
|
|
|
14
14
|
/** Callback when user submits form */
|
|
15
15
|
onSubmit: (value: Record<string, unknown>) => void;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* A form built from a JSON Schema, placed straight on the interrupt card. It wraps `SchemaForm`, so the fields look
|
|
19
|
+
* the same as in other forms.
|
|
20
|
+
*
|
|
21
|
+
* **Use it for** the body of an `InterruptBubble` of type `form`.
|
|
22
|
+
* **Not for** editing a node (that is `ConfigForm`).
|
|
23
|
+
*/
|
|
17
24
|
declare const FormPrompt: import("svelte").Component<Props, {}, "">;
|
|
18
25
|
type FormPrompt = ReturnType<typeof FormPrompt>;
|
|
19
26
|
export default FormPrompt;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
2
|
+
@component
|
|
3
|
+
The card that holds a question from a paused run, inline in the chat. It picks the prompt for the
|
|
4
|
+
interrupt's type (confirmation, choice, text, form or review) and sends the answer.
|
|
5
|
+
|
|
6
|
+
The card has a title line (the question), the prompt and its actions. A failed send shows the error with a
|
|
7
|
+
Retry button. Once answered it folds to one muted line, such as "Confirmed · Yes". Optional hierarchy and
|
|
8
|
+
tags show in a footer.
|
|
9
|
+
|
|
10
|
+
**Use it for** any question a run asks a person. The Playground and the AI Assistant both use it.
|
|
11
|
+
**Not for** a prompt without the card (use the prompt component itself, for example `ChoicePrompt`).
|
|
11
12
|
-->
|
|
12
13
|
|
|
13
14
|
<script lang="ts">
|