@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,3 +1,16 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
The gear that opens a node's config.
|
|
4
|
+
|
|
5
|
+
It is out of the Tab order (`tabindex="-1"`): the node itself is keyboard-focusable and
|
|
6
|
+
opens its config on Enter or Space, so Tab moves from node to node. The gear stays
|
|
7
|
+
clickable. It shows on node hover (through `--fd-config-btn-opacity`, which the node
|
|
8
|
+
sets), on a selected or focused node, and on touch.
|
|
9
|
+
|
|
10
|
+
**Use it for** a node component that opens the config sidebar.
|
|
11
|
+
**Not for** other buttons; use `IconButton`.
|
|
12
|
+
-->
|
|
13
|
+
|
|
1
14
|
<script lang="ts">
|
|
2
15
|
import CogIcon from '../icons/CogIcon.svelte';
|
|
3
16
|
|
|
@@ -39,8 +52,8 @@
|
|
|
39
52
|
position: absolute;
|
|
40
53
|
top: var(--fd-space-xs);
|
|
41
54
|
right: var(--fd-space-xs);
|
|
42
|
-
width:
|
|
43
|
-
height:
|
|
55
|
+
width: var(--fd-node-config-btn-size);
|
|
56
|
+
height: var(--fd-node-config-btn-size);
|
|
44
57
|
background-color: var(--fd-node-config-btn-bg);
|
|
45
58
|
border: 1px solid var(--fd-node-config-btn-border);
|
|
46
59
|
border-radius: var(--fd-node-config-btn-radius);
|
|
@@ -10,6 +10,17 @@ interface Props {
|
|
|
10
10
|
*/
|
|
11
11
|
placement?: 'corner' | 'top-center';
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* The gear that opens a node's config.
|
|
15
|
+
*
|
|
16
|
+
* It is out of the Tab order (`tabindex="-1"`): the node itself is keyboard-focusable and
|
|
17
|
+
* opens its config on Enter or Space, so Tab moves from node to node. The gear stays
|
|
18
|
+
* clickable. It shows on node hover (through `--fd-config-btn-opacity`, which the node
|
|
19
|
+
* sets), on a selected or focused node, and on touch.
|
|
20
|
+
*
|
|
21
|
+
* **Use it for** a node component that opens the config sidebar.
|
|
22
|
+
* **Not for** other buttons; use `IconButton`.
|
|
23
|
+
*/
|
|
13
24
|
declare const NodeConfigButton: import("svelte").Component<Props, {}, "">;
|
|
14
25
|
type NodeConfigButton = ReturnType<typeof NodeConfigButton>;
|
|
15
26
|
export default NodeConfigButton;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
The Doctor's finding on a node,
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
@component
|
|
3
|
+
The Doctor's finding on a node, as a status glyph after the title. Each node component
|
|
4
|
+
places it level with the config gear: in the header just left of it, in the corner of a
|
|
5
|
+
note left of it, or centred below it at the top of a square or terminal node. A pill or
|
|
6
|
+
caption, which has no gear, takes it inline after the text.
|
|
7
|
+
|
|
8
|
+
The tooltip lists the problems; the count is in the accessible name. In the glyph and map
|
|
9
|
+
zoom tiers the header is gone, so the mark moves to the card's top-right corner and is
|
|
10
|
+
scaled up (to 2.2x) to stay visible.
|
|
11
|
+
|
|
12
|
+
It reads the node's problems from the `UniversalNode` context (or `problem`) and claims
|
|
13
|
+
them, so `UniversalNode` does not draw its own corner mark.
|
|
14
|
+
|
|
15
|
+
**Use it for** a node component that draws its own header.
|
|
16
|
+
**Not for** run status; use `NodeStatusOverlay`.
|
|
12
17
|
-->
|
|
13
18
|
|
|
14
19
|
<script lang="ts">
|
|
@@ -3,6 +3,22 @@ interface Props {
|
|
|
3
3
|
/** Overrides the context (UniversalNode's fallback mark). */
|
|
4
4
|
problem?: NodeProblem;
|
|
5
5
|
}
|
|
6
|
+
/**
|
|
7
|
+
* The Doctor's finding on a node, as a status glyph after the title. Each node component
|
|
8
|
+
* places it level with the config gear: in the header just left of it, in the corner of a
|
|
9
|
+
* note left of it, or centred below it at the top of a square or terminal node. A pill or
|
|
10
|
+
* caption, which has no gear, takes it inline after the text.
|
|
11
|
+
*
|
|
12
|
+
* The tooltip lists the problems; the count is in the accessible name. In the glyph and map
|
|
13
|
+
* zoom tiers the header is gone, so the mark moves to the card's top-right corner and is
|
|
14
|
+
* scaled up (to 2.2x) to stay visible.
|
|
15
|
+
*
|
|
16
|
+
* It reads the node's problems from the `UniversalNode` context (or `problem`) and claims
|
|
17
|
+
* them, so `UniversalNode` does not draw its own corner mark.
|
|
18
|
+
*
|
|
19
|
+
* **Use it for** a node component that draws its own header.
|
|
20
|
+
* **Not for** run status; use `NodeStatusOverlay`.
|
|
21
|
+
*/
|
|
6
22
|
declare const NodeProblemMark: import("svelte").Component<Props, {}, "">;
|
|
7
23
|
type NodeProblemMark = ReturnType<typeof NodeProblemMark>;
|
|
8
24
|
export default NodeProblemMark;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
The tooltip and popover of a node card: a port's name, type and help, or the full title and
|
|
4
|
+
description of the node.
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
from the anchor's screen rectangle, so it keeps its size at any canvas zoom
|
|
7
|
-
and is never clipped by the node or the canvas transform.
|
|
6
|
+
It is portalled to `<body>` and placed from the anchor's screen rectangle, so it keeps its
|
|
7
|
+
size at any canvas zoom and is never clipped by the node or the canvas transform.
|
|
8
8
|
|
|
9
|
-
`tip`
|
|
10
|
-
|
|
9
|
+
`tip` is an inverted chip for short port help. `pop` is a surface with a rule, for the node
|
|
10
|
+
description.
|
|
11
|
+
|
|
12
|
+
**Use it for** help that must stay readable while the canvas is scaled.
|
|
13
|
+
**Not for** ordinary controls; use the primitives' own tooltips.
|
|
11
14
|
-->
|
|
12
15
|
|
|
13
16
|
<script lang="ts">
|
|
@@ -10,6 +10,19 @@ interface Props {
|
|
|
10
10
|
body?: string;
|
|
11
11
|
note?: string;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* The tooltip and popover of a node card: a port's name, type and help, or the full title and
|
|
15
|
+
* description of the node.
|
|
16
|
+
*
|
|
17
|
+
* It is portalled to `<body>` and placed from the anchor's screen rectangle, so it keeps its
|
|
18
|
+
* size at any canvas zoom and is never clipped by the node or the canvas transform.
|
|
19
|
+
*
|
|
20
|
+
* `tip` is an inverted chip for short port help. `pop` is a surface with a rule, for the node
|
|
21
|
+
* description.
|
|
22
|
+
*
|
|
23
|
+
* **Use it for** help that must stay readable while the canvas is scaled.
|
|
24
|
+
* **Not for** ordinary controls; use the primitives' own tooltips.
|
|
25
|
+
*/
|
|
13
26
|
declare const NodeTip: import("svelte").Component<Props, {}, "">;
|
|
14
27
|
type NodeTip = ReturnType<typeof NodeTip>;
|
|
15
28
|
export default NodeTip;
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
@component
|
|
3
|
+
A sticky note on the canvas: markdown text with a tone (info, note, warning, success, error).
|
|
4
|
+
|
|
5
|
+
A note has no ports and does not run. It grows with its text, in steps of the 20 px grid,
|
|
6
|
+
and has no status overlay. Double-click it to edit.
|
|
7
|
+
|
|
8
|
+
**Use it for** documentation that sits next to the nodes it explains.
|
|
9
|
+
**Not for** a one-line label; use `CaptionNode`.
|
|
10
|
+
-->
|
|
11
|
+
|
|
1
12
|
<script lang="ts">
|
|
2
13
|
import type { ConfigValues, NodeMetadata } from '../../types/index.js';
|
|
3
14
|
import Icon from '@iconify/svelte';
|
|
4
15
|
import { onMount } from 'svelte';
|
|
5
16
|
import NodeConfigButton from './NodeConfigButton.svelte';
|
|
17
|
+
import NodeProblemMark from './NodeProblemMark.svelte';
|
|
6
18
|
import MarkdownDisplay from '../MarkdownDisplay.svelte';
|
|
7
19
|
import { m } from '../../messages/index.js';
|
|
8
20
|
|
|
@@ -11,7 +23,9 @@
|
|
|
11
23
|
* Displays a styled note with markdown content
|
|
12
24
|
*/
|
|
13
25
|
interface Props {
|
|
26
|
+
/** The node's id on the canvas. */
|
|
14
27
|
id: string;
|
|
28
|
+
/** The note: `config.content` is the markdown, `config.noteType` the tone (default `info`). */
|
|
15
29
|
data: {
|
|
16
30
|
label: string;
|
|
17
31
|
config: ConfigValues;
|
|
@@ -22,8 +36,11 @@
|
|
|
22
36
|
data: { label: string; config: ConfigValues; metadata: NodeMetadata };
|
|
23
37
|
}) => void;
|
|
24
38
|
};
|
|
39
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
25
40
|
selected?: boolean;
|
|
41
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
26
42
|
isProcessing?: boolean;
|
|
43
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
27
44
|
isError?: boolean;
|
|
28
45
|
}
|
|
29
46
|
|
|
@@ -178,6 +195,9 @@
|
|
|
178
195
|
{/if}
|
|
179
196
|
</div>
|
|
180
197
|
|
|
198
|
+
<!-- The Doctor's mark: no header here, so it sits in the corner, left of the gear. -->
|
|
199
|
+
<NodeProblemMark />
|
|
200
|
+
|
|
181
201
|
<!-- Config button -->
|
|
182
202
|
<NodeConfigButton onclick={openConfigSidebar} title={notes.configure} />
|
|
183
203
|
</div>
|
|
@@ -207,6 +227,16 @@
|
|
|
207
227
|
z-index: 5;
|
|
208
228
|
}
|
|
209
229
|
|
|
230
|
+
/* Level with the gear: centred on its middle. */
|
|
231
|
+
.flowdrop-notes-node :global(.fd-node-problem) {
|
|
232
|
+
position: absolute;
|
|
233
|
+
top: calc(
|
|
234
|
+
var(--fd-space-xs) + (var(--fd-node-config-btn-size) - var(--fd-node-problem-size)) / 2
|
|
235
|
+
);
|
|
236
|
+
right: var(--fd-node-config-btn-slot);
|
|
237
|
+
z-index: 2;
|
|
238
|
+
}
|
|
239
|
+
|
|
210
240
|
/* Variants: the tint is the type (accent mixed into the paper for the edge). */
|
|
211
241
|
.flowdrop-notes-node--info {
|
|
212
242
|
--_note-bg: var(--fd-note-info-bg);
|
|
@@ -4,7 +4,9 @@ import type { ConfigValues, NodeMetadata } from '../../types/index.js';
|
|
|
4
4
|
* Displays a styled note with markdown content
|
|
5
5
|
*/
|
|
6
6
|
interface Props {
|
|
7
|
+
/** The node's id on the canvas. */
|
|
7
8
|
id: string;
|
|
9
|
+
/** The note: `config.content` is the markdown, `config.noteType` the tone (default `info`). */
|
|
8
10
|
data: {
|
|
9
11
|
label: string;
|
|
10
12
|
config: ConfigValues;
|
|
@@ -19,10 +21,22 @@ interface Props {
|
|
|
19
21
|
};
|
|
20
22
|
}) => void;
|
|
21
23
|
};
|
|
24
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
22
25
|
selected?: boolean;
|
|
26
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
23
27
|
isProcessing?: boolean;
|
|
28
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
24
29
|
isError?: boolean;
|
|
25
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* A sticky note on the canvas: markdown text with a tone (info, note, warning, success, error).
|
|
33
|
+
*
|
|
34
|
+
* A note has no ports and does not run. It grows with its text, in steps of the 20 px grid,
|
|
35
|
+
* and has no status overlay. Double-click it to edit.
|
|
36
|
+
*
|
|
37
|
+
* **Use it for** documentation that sits next to the nodes it explains.
|
|
38
|
+
* **Not for** a one-line label; use `CaptionNode`.
|
|
39
|
+
*/
|
|
26
40
|
declare const NotesNode: import("svelte").Component<Props, {}, "">;
|
|
27
41
|
type NotesNode = ReturnType<typeof NotesNode>;
|
|
28
42
|
export default NotesNode;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
A
|
|
4
|
-
Styled with BEM syntax
|
|
2
|
+
@component
|
|
3
|
+
A compact node: a header with an icon and a description, and the ports on its edges.
|
|
5
4
|
|
|
6
5
|
Port rendering:
|
|
7
|
-
- Exposure (data.config.ports
|
|
8
|
-
|
|
9
|
-
- Order: data.config.ports
|
|
10
|
-
|
|
6
|
+
- Exposure (`data.config.ports`, falling back to each port's `exposedByDefault`) decides
|
|
7
|
+
which ports render. A port that is not exposed is hidden.
|
|
8
|
+
- Order: `data.config.ports` overrides the metadata default (`displayOrder`); ports it does
|
|
9
|
+
not list follow in the default order.
|
|
10
|
+
|
|
11
|
+
**Use it for** a node type that declares `type: "simple"`.
|
|
12
|
+
**Not for** the node the editor draws by default; that is `WorkflowNode`.
|
|
11
13
|
-->
|
|
12
14
|
|
|
13
15
|
<script lang="ts">
|
|
@@ -31,11 +33,14 @@
|
|
|
31
33
|
import { interfaceBoundTooltip } from '../../utils/workflowInterface.js';
|
|
32
34
|
import NodeConfigButton from './NodeConfigButton.svelte';
|
|
33
35
|
import NodeProblemMark from './NodeProblemMark.svelte';
|
|
36
|
+
import { getNodeProblem } from '../../utils/nodeProblem.js';
|
|
34
37
|
import { wiredHandleIds } from '../../utils/wiredHandles.js';
|
|
35
38
|
import AlertCircleIcon from '../icons/AlertCircleIcon.svelte';
|
|
36
39
|
|
|
37
40
|
interface Props {
|
|
41
|
+
/** The node's id on the canvas. */
|
|
38
42
|
id: string;
|
|
43
|
+
/** The node: label, config (`ports`, dynamic ports) and node type. */
|
|
39
44
|
data: {
|
|
40
45
|
label: string;
|
|
41
46
|
config: ConfigValues;
|
|
@@ -47,14 +52,18 @@
|
|
|
47
52
|
data: { label: string; config: ConfigValues; metadata: NodeMetadata };
|
|
48
53
|
}) => void;
|
|
49
54
|
};
|
|
55
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
50
56
|
selected?: boolean;
|
|
57
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
51
58
|
isProcessing?: boolean;
|
|
59
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
52
60
|
isError?: boolean;
|
|
53
61
|
}
|
|
54
62
|
|
|
55
63
|
let props: Props = $props();
|
|
56
64
|
|
|
57
65
|
const fd = getInstance();
|
|
66
|
+
const problem = getNodeProblem();
|
|
58
67
|
const checker = fd.portCompatibility;
|
|
59
68
|
|
|
60
69
|
/** Handle ids bound to a `workflow.interface` entry — see workflowStore. */
|
|
@@ -189,7 +198,10 @@
|
|
|
189
198
|
ondblclick={handleDoubleClick}
|
|
190
199
|
>
|
|
191
200
|
<div class="flowdrop-simple-node__header">
|
|
192
|
-
<div
|
|
201
|
+
<div
|
|
202
|
+
class="flowdrop-simple-node__header-content"
|
|
203
|
+
class:flowdrop-simple-node__header-content--problem={problem?.severity != null}
|
|
204
|
+
>
|
|
193
205
|
<!-- Node Icon (squircle) — visibility controlled by --fd-node-icon-display -->
|
|
194
206
|
<div
|
|
195
207
|
class="flowdrop-simple-node__icon-wrapper"
|
|
@@ -328,6 +340,21 @@
|
|
|
328
340
|
gap: var(--fd-space-md);
|
|
329
341
|
}
|
|
330
342
|
|
|
343
|
+
/* The gear sits over the header's top-right: end the mark left of it, and keep
|
|
344
|
+
it there whether or not the gear is showing. (The header already pads 20px.) */
|
|
345
|
+
.flowdrop-simple-node__header-content--problem {
|
|
346
|
+
padding-right: calc(var(--fd-node-config-btn-slot) - 20px);
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/* Level with the gear, as on the default card: centred on its middle, not the row's. */
|
|
350
|
+
.flowdrop-simple-node__header-content--problem > :global(.fd-node-problem) {
|
|
351
|
+
align-self: flex-start;
|
|
352
|
+
margin-top: calc(
|
|
353
|
+
var(--fd-space-xs) + var(--fd-node-config-btn-size) / 2 - 10px - var(--fd-node-problem-size) /
|
|
354
|
+
2
|
|
355
|
+
);
|
|
356
|
+
}
|
|
357
|
+
|
|
331
358
|
/* Squircle icon wrapper - Apple-style rounded square background */
|
|
332
359
|
.flowdrop-simple-node__icon-wrapper {
|
|
333
360
|
display: var(--fd-node-icon-display, flex);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ConfigValues, NodeMetadata, NodeExtensions } from '../../types/index.js';
|
|
2
2
|
interface Props {
|
|
3
|
+
/** The node's id on the canvas. */
|
|
3
4
|
id: string;
|
|
5
|
+
/** The node: label, config (`ports`, dynamic ports) and node type. */
|
|
4
6
|
data: {
|
|
5
7
|
label: string;
|
|
6
8
|
config: ConfigValues;
|
|
@@ -16,10 +18,25 @@ interface Props {
|
|
|
16
18
|
};
|
|
17
19
|
}) => void;
|
|
18
20
|
};
|
|
21
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
19
22
|
selected?: boolean;
|
|
23
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
20
24
|
isProcessing?: boolean;
|
|
25
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
21
26
|
isError?: boolean;
|
|
22
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* A compact node: a header with an icon and a description, and the ports on its edges.
|
|
30
|
+
*
|
|
31
|
+
* Port rendering:
|
|
32
|
+
* - Exposure (`data.config.ports`, falling back to each port's `exposedByDefault`) decides
|
|
33
|
+
* which ports render. A port that is not exposed is hidden.
|
|
34
|
+
* - Order: `data.config.ports` overrides the metadata default (`displayOrder`); ports it does
|
|
35
|
+
* not list follow in the default order.
|
|
36
|
+
*
|
|
37
|
+
* **Use it for** a node type that declares `type: "simple"`.
|
|
38
|
+
* **Not for** the node the editor draws by default; that is `WorkflowNode`.
|
|
39
|
+
*/
|
|
23
40
|
declare const SimpleNode: import("svelte").Component<Props, {}, "">;
|
|
24
41
|
type SimpleNode = ReturnType<typeof SimpleNode>;
|
|
25
42
|
export default SimpleNode;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
A
|
|
4
|
-
Styled with BEM syntax
|
|
2
|
+
@component
|
|
3
|
+
A square node that shows only its icon, with the ports on its edges.
|
|
5
4
|
|
|
6
5
|
Port rendering:
|
|
7
|
-
- Exposure (data.config.ports
|
|
8
|
-
|
|
9
|
-
- Order: data.config.ports
|
|
10
|
-
|
|
6
|
+
- Exposure (`data.config.ports`, falling back to each port's `exposedByDefault`) decides
|
|
7
|
+
which ports render. A port that is not exposed is hidden.
|
|
8
|
+
- Order: `data.config.ports` overrides the metadata default (`displayOrder`); ports it does
|
|
9
|
+
not list follow in the default order.
|
|
10
|
+
|
|
11
|
+
**Use it for** a node type that declares `type: "square"`, where the icon says enough.
|
|
12
|
+
**Not for** a node that needs a title or a description; use `WorkflowNode`.
|
|
11
13
|
-->
|
|
12
14
|
|
|
13
15
|
<script lang="ts">
|
|
@@ -36,7 +38,9 @@
|
|
|
36
38
|
import AlertCircleIcon from '../icons/AlertCircleIcon.svelte';
|
|
37
39
|
|
|
38
40
|
interface Props {
|
|
41
|
+
/** The node's id on the canvas. */
|
|
39
42
|
id: string;
|
|
43
|
+
/** The node: label, config (`ports`, dynamic ports) and node type. */
|
|
40
44
|
data: {
|
|
41
45
|
label: string;
|
|
42
46
|
config: ConfigValues;
|
|
@@ -48,8 +52,11 @@
|
|
|
48
52
|
data: { label: string; config: ConfigValues; metadata: NodeMetadata };
|
|
49
53
|
}) => void;
|
|
50
54
|
};
|
|
55
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
51
56
|
selected?: boolean;
|
|
57
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
52
58
|
isProcessing?: boolean;
|
|
59
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
53
60
|
isError?: boolean;
|
|
54
61
|
}
|
|
55
62
|
|
|
@@ -207,6 +214,7 @@
|
|
|
207
214
|
></span>
|
|
208
215
|
</div>
|
|
209
216
|
|
|
217
|
+
<!-- The Doctor's mark: a badge on the tile's bottom-right, clear of the ports, the gear and the top edge. -->
|
|
210
218
|
<NodeProblemMark />
|
|
211
219
|
|
|
212
220
|
<!-- Processing indicator -->
|
|
@@ -224,7 +232,12 @@
|
|
|
224
232
|
{/if}
|
|
225
233
|
|
|
226
234
|
<!-- Config button -->
|
|
227
|
-
|
|
235
|
+
<!-- Above the square, as on TerminalNode: the corners carry the ports. -->
|
|
236
|
+
<NodeConfigButton
|
|
237
|
+
onclick={openConfigSidebar}
|
|
238
|
+
title={m().nodes.configure}
|
|
239
|
+
placement="top-center"
|
|
240
|
+
/>
|
|
228
241
|
</div>
|
|
229
242
|
</div>
|
|
230
243
|
|
|
@@ -322,6 +335,23 @@
|
|
|
322
335
|
background-color: var(--fd-error-muted) !important;
|
|
323
336
|
}
|
|
324
337
|
|
|
338
|
+
/* The Doctor's mark, centred at the top of the square just below the gear that
|
|
339
|
+
floats above it (as on TerminalNode): in the middle of the band between the
|
|
340
|
+
square's edge and the 48px icon tile. A disc in the card colour keeps it
|
|
341
|
+
legible where it meets the border. */
|
|
342
|
+
.flowdrop-square-node__square :global(.fd-node-problem) {
|
|
343
|
+
position: absolute;
|
|
344
|
+
top: calc((16px - var(--fd-node-problem-size)) / 2);
|
|
345
|
+
left: 50%;
|
|
346
|
+
right: auto;
|
|
347
|
+
translate: -50% 0;
|
|
348
|
+
transform-origin: top center;
|
|
349
|
+
z-index: 2;
|
|
350
|
+
border-radius: var(--fd-radius-full);
|
|
351
|
+
background: var(--fd-node-bg);
|
|
352
|
+
outline: 1px solid var(--fd-node-bg);
|
|
353
|
+
}
|
|
354
|
+
|
|
325
355
|
/* Compact layout styles */
|
|
326
356
|
.flowdrop-square-node__compact-content {
|
|
327
357
|
display: flex;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ConfigValues, NodeMetadata, NodeExtensions } from '../../types/index.js';
|
|
2
2
|
interface Props {
|
|
3
|
+
/** The node's id on the canvas. */
|
|
3
4
|
id: string;
|
|
5
|
+
/** The node: label, config (`ports`, dynamic ports) and node type. */
|
|
4
6
|
data: {
|
|
5
7
|
label: string;
|
|
6
8
|
config: ConfigValues;
|
|
@@ -16,10 +18,25 @@ interface Props {
|
|
|
16
18
|
};
|
|
17
19
|
}) => void;
|
|
18
20
|
};
|
|
21
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
19
22
|
selected?: boolean;
|
|
23
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
20
24
|
isProcessing?: boolean;
|
|
25
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
21
26
|
isError?: boolean;
|
|
22
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* A square node that shows only its icon, with the ports on its edges.
|
|
30
|
+
*
|
|
31
|
+
* Port rendering:
|
|
32
|
+
* - Exposure (`data.config.ports`, falling back to each port's `exposedByDefault`) decides
|
|
33
|
+
* which ports render. A port that is not exposed is hidden.
|
|
34
|
+
* - Order: `data.config.ports` overrides the metadata default (`displayOrder`); ports it does
|
|
35
|
+
* not list follow in the default order.
|
|
36
|
+
*
|
|
37
|
+
* **Use it for** a node type that declares `type: "square"`, where the icon says enough.
|
|
38
|
+
* **Not for** a node that needs a title or a description; use `WorkflowNode`.
|
|
39
|
+
*/
|
|
23
40
|
declare const SquareNode: import("svelte").Component<Props, {}, "">;
|
|
24
41
|
type SquareNode = ReturnType<typeof SquareNode>;
|
|
25
42
|
export default SquareNode;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
A
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
2
|
+
@component
|
|
3
|
+
A circle for a workflow's start, end or exit.
|
|
4
|
+
|
|
5
|
+
The variant comes from `config.variant`, then from the node type's tags, then from its
|
|
6
|
+
id or name:
|
|
7
|
+
- start: green with a play icon, output only.
|
|
8
|
+
- end: grey with a stop icon, input only.
|
|
9
|
+
- exit: red with a cross, input only. For an early stop, for example on an error.
|
|
10
|
+
|
|
11
|
+
**Use it for** a node type that declares `type: "terminal"`.
|
|
12
|
+
**Not for** a step in the middle of a flow; use `WorkflowNode`.
|
|
9
13
|
-->
|
|
10
14
|
|
|
11
15
|
<script lang="ts">
|
|
@@ -79,7 +83,9 @@
|
|
|
79
83
|
};
|
|
80
84
|
|
|
81
85
|
interface Props {
|
|
86
|
+
/** The node's id on the canvas. */
|
|
82
87
|
id: string;
|
|
88
|
+
/** The node: label, config (`variant`) and node type. */
|
|
83
89
|
data: {
|
|
84
90
|
label: string;
|
|
85
91
|
config: ConfigValues;
|
|
@@ -91,8 +97,11 @@
|
|
|
91
97
|
data: { label: string; config: ConfigValues; metadata: NodeMetadata };
|
|
92
98
|
}) => void;
|
|
93
99
|
};
|
|
100
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
94
101
|
selected?: boolean;
|
|
102
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
95
103
|
isProcessing?: boolean;
|
|
104
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
96
105
|
isError?: boolean;
|
|
97
106
|
}
|
|
98
107
|
|
|
@@ -594,15 +603,20 @@
|
|
|
594
603
|
color: var(--fd-node-terminal-icon-color, var(--fd-node-icon));
|
|
595
604
|
}
|
|
596
605
|
|
|
597
|
-
/* The Doctor's glyph, at the
|
|
606
|
+
/* The Doctor's glyph, centred at the top of the circle, just below the gear that
|
|
607
|
+
floats above it: in the middle of the band between the circle's edge and the
|
|
608
|
+
44px icon tile. */
|
|
598
609
|
.flowdrop-terminal-node__circle-wrapper {
|
|
599
|
-
--_pm-inset: calc(var(--_d)
|
|
610
|
+
--_pm-inset: calc(((var(--_d) - 44px) / 2 - var(--fd-node-problem-size)) / 2);
|
|
600
611
|
}
|
|
601
612
|
|
|
602
613
|
.flowdrop-terminal-node__circle-wrapper > :global(.fd-node-problem) {
|
|
603
614
|
position: absolute;
|
|
604
615
|
top: var(--_pm-inset);
|
|
605
|
-
|
|
616
|
+
left: 50%;
|
|
617
|
+
right: auto;
|
|
618
|
+
translate: -50% 0;
|
|
619
|
+
transform-origin: top center;
|
|
606
620
|
z-index: 31;
|
|
607
621
|
}
|
|
608
622
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ConfigValues, NodeMetadata, NodeExtensions } from '../../types/index.js';
|
|
2
2
|
interface Props {
|
|
3
|
+
/** The node's id on the canvas. */
|
|
3
4
|
id: string;
|
|
5
|
+
/** The node: label, config (`variant`) and node type. */
|
|
4
6
|
data: {
|
|
5
7
|
label: string;
|
|
6
8
|
config: ConfigValues;
|
|
@@ -16,10 +18,25 @@ interface Props {
|
|
|
16
18
|
};
|
|
17
19
|
}) => void;
|
|
18
20
|
};
|
|
21
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
19
22
|
selected?: boolean;
|
|
23
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
20
24
|
isProcessing?: boolean;
|
|
25
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
21
26
|
isError?: boolean;
|
|
22
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* A circle for a workflow's start, end or exit.
|
|
30
|
+
*
|
|
31
|
+
* The variant comes from `config.variant`, then from the node type's tags, then from its
|
|
32
|
+
* id or name:
|
|
33
|
+
* - start: green with a play icon, output only.
|
|
34
|
+
* - end: grey with a stop icon, input only.
|
|
35
|
+
* - exit: red with a cross, input only. For an early stop, for example on an error.
|
|
36
|
+
*
|
|
37
|
+
* **Use it for** a node type that declares `type: "terminal"`.
|
|
38
|
+
* **Not for** a step in the middle of a flow; use `WorkflowNode`.
|
|
39
|
+
*/
|
|
23
40
|
declare const TerminalNode: import("svelte").Component<Props, {}, "">;
|
|
24
41
|
type TerminalNode = ReturnType<typeof TerminalNode>;
|
|
25
42
|
export default TerminalNode;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
A
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
tool colour
|
|
2
|
+
@component
|
|
3
|
+
A node an agent can call, drawn on the shared card.
|
|
4
|
+
|
|
5
|
+
It has the same header as `WorkflowNode` (see `NodeCard`), with the tool's badge and
|
|
6
|
+
version on the kind line and a wash in the tool colour. Its tool ports (those of
|
|
7
|
+
`metadata.portDataType`, default `tool`) are one row.
|
|
8
|
+
|
|
9
|
+
**Use it for** a node type that declares `type: "tool"`.
|
|
10
|
+
**Not for** a node that only has ordinary data ports; use `WorkflowNode`.
|
|
7
11
|
-->
|
|
8
12
|
|
|
9
13
|
<script lang="ts">
|
|
@@ -20,7 +24,9 @@
|
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
interface Props {
|
|
27
|
+
/** The node's id on the canvas. */
|
|
23
28
|
id: string;
|
|
29
|
+
/** The node: label, config (tool name, description, version, parameters) and node type. */
|
|
24
30
|
data: {
|
|
25
31
|
label: string;
|
|
26
32
|
config: ConfigValues & {
|
|
@@ -42,8 +48,11 @@
|
|
|
42
48
|
};
|
|
43
49
|
}) => void;
|
|
44
50
|
};
|
|
51
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
45
52
|
selected?: boolean;
|
|
53
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
46
54
|
isProcessing?: boolean;
|
|
55
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
47
56
|
isError?: boolean;
|
|
48
57
|
}
|
|
49
58
|
|