@flowdrop/flowdrop 2.13.0 → 2.15.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 +82 -0
- package/dist/commands/executor.js +58 -8
- package/dist/commands/parser.js +3 -3
- package/dist/commands/types.d.ts +8 -2
- package/dist/commands/uiActionTarget.d.ts +24 -0
- package/dist/commands/uiActionTarget.js +31 -0
- package/dist/commands/validate.d.ts +15 -0
- package/dist/commands/validate.js +115 -0
- package/dist/components/App.svelte +44 -2
- package/dist/components/App.svelte.d.ts +3 -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 +51 -18
- package/dist/components/ConfigForm.svelte.d.ts +20 -1
- 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/ExternalLinkRow.svelte +16 -1
- package/dist/components/ExternalLinkRow.svelte.d.ts +5 -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 +2 -2
- package/dist/core/index.js +1 -1
- package/dist/editor/index.d.ts +3 -3
- package/dist/index.d.ts +3 -2
- 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.d.ts +10 -0
- package/dist/stores/workflowStore.svelte.js +65 -20
- 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 +63 -2
- package/dist/svelte-app.js +144 -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/events.d.ts +18 -1
- package/dist/types/index.d.ts +10 -0
- package/dist/types/settings.d.ts +6 -2
- package/dist/types/theme.d.ts +6 -2
- package/dist/utils/externalEdit.svelte.d.ts +48 -0
- package/dist/utils/externalEdit.svelte.js +62 -0
- package/dist/utils/inspectorContext.d.ts +5 -0
- 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,6 +1,8 @@
|
|
|
1
1
|
import type { WorkflowNode } 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 (`branches`, `ports`, `instanceTitle`) and node type. Branches come from `config.branches`. */
|
|
4
6
|
data: WorkflowNode['data'] & {
|
|
5
7
|
onConfigOpen?: (node: {
|
|
6
8
|
id: string;
|
|
@@ -8,8 +10,27 @@ interface Props {
|
|
|
8
10
|
data: WorkflowNode['data'];
|
|
9
11
|
}) => void;
|
|
10
12
|
};
|
|
13
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
11
14
|
selected?: boolean;
|
|
12
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* A node that sends the run down one of several branches, drawn on the shared card.
|
|
18
|
+
*
|
|
19
|
+
* It has the same header as `WorkflowNode` (see `NodeCard`), the trigger as a header pin,
|
|
20
|
+
* input ports as rows on the left, and the branches as output rows on the right. After a
|
|
21
|
+
* run, the branches the run took are marked.
|
|
22
|
+
*
|
|
23
|
+
* Port rendering:
|
|
24
|
+
* - Input exposure (`data.config.ports`, falling back to each port's `exposedByDefault`)
|
|
25
|
+
* decides which input ports render, in effective order. Branches are authored paths
|
|
26
|
+
* and always render.
|
|
27
|
+
* - A branch is not a `NodePort`: each becomes a trigger output row whose port id is the
|
|
28
|
+
* branch name. Rows are keyed by index, so two branches with the same (or an empty)
|
|
29
|
+
* name draw two rows instead of crashing.
|
|
30
|
+
*
|
|
31
|
+
* **Use it for** a node type that declares `type: "gateway"`, such as If/else or Switch.
|
|
32
|
+
* **Not for** a node with a fixed set of outputs; use `WorkflowNode`.
|
|
33
|
+
*/
|
|
13
34
|
declare const GatewayNode: import("svelte").Component<Props, {}, "">;
|
|
14
35
|
type GatewayNode = ReturnType<typeof GatewayNode>;
|
|
15
36
|
export default GatewayNode;
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
A
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
@component
|
|
3
|
+
A planning card for a conceptual flow, with ports you switch on or off.
|
|
4
|
+
|
|
5
|
+
Users can chain ideas together without committing to node types. It has four connection
|
|
6
|
+
points (left, right, top, bottom), each one a checkbox in the config.
|
|
7
|
+
|
|
8
|
+
The editor draws it only for a node type that declares `type: "idea"`. Nothing in the
|
|
9
|
+
library creates one on its own.
|
|
10
|
+
|
|
11
|
+
**Use it for** sketching a flow before the real nodes exist.
|
|
12
|
+
**Not for** steps that run; use `WorkflowNode`.
|
|
7
13
|
-->
|
|
8
14
|
|
|
9
15
|
<script lang="ts">
|
|
@@ -12,6 +18,8 @@
|
|
|
12
18
|
import type { ConfigValues, NodeMetadata } from '../../types/index.js';
|
|
13
19
|
import Icon from '@iconify/svelte';
|
|
14
20
|
import NodeConfigButton from './NodeConfigButton.svelte';
|
|
21
|
+
import NodeProblemMark from './NodeProblemMark.svelte';
|
|
22
|
+
import { getNodeProblem } from '../../utils/nodeProblem.js';
|
|
15
23
|
import { getDataTypeColor } from '../../utils/colors.js';
|
|
16
24
|
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
17
25
|
|
|
@@ -20,7 +28,9 @@
|
|
|
20
28
|
* Displays a card-style node for conceptual flow diagrams
|
|
21
29
|
*/
|
|
22
30
|
interface Props {
|
|
31
|
+
/** The node's id on the canvas. */
|
|
23
32
|
id: string;
|
|
33
|
+
/** The node: label, config (`content`, `instanceTitle`) and node type. */
|
|
24
34
|
data: {
|
|
25
35
|
label: string;
|
|
26
36
|
config: ConfigValues;
|
|
@@ -31,13 +41,18 @@
|
|
|
31
41
|
data: { label: string; config: ConfigValues; metadata: NodeMetadata };
|
|
32
42
|
}) => void;
|
|
33
43
|
};
|
|
44
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
34
45
|
selected?: boolean;
|
|
46
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
35
47
|
isProcessing?: boolean;
|
|
48
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
36
49
|
isError?: boolean;
|
|
37
50
|
}
|
|
38
51
|
|
|
39
52
|
let props: Props = $props();
|
|
40
53
|
|
|
54
|
+
const problem = getNodeProblem();
|
|
55
|
+
|
|
41
56
|
const checker = getInstance().portCompatibility;
|
|
42
57
|
|
|
43
58
|
/**
|
|
@@ -165,11 +180,15 @@
|
|
|
165
180
|
<div class="flowdrop-idea-node__accent-bar"></div>
|
|
166
181
|
|
|
167
182
|
<!-- Header with icon and title -->
|
|
168
|
-
<div
|
|
183
|
+
<div
|
|
184
|
+
class="flowdrop-idea-node__header"
|
|
185
|
+
class:flowdrop-idea-node__header--problem={problem?.severity != null}
|
|
186
|
+
>
|
|
169
187
|
<div class="flowdrop-idea-node__icon-wrapper">
|
|
170
188
|
<Icon icon={ideaIcon} class="flowdrop-idea-node__icon" />
|
|
171
189
|
</div>
|
|
172
190
|
<h3 class="flowdrop-idea-node__title">{displayTitle}</h3>
|
|
191
|
+
<NodeProblemMark />
|
|
173
192
|
</div>
|
|
174
193
|
|
|
175
194
|
<!-- Description Body -->
|
|
@@ -435,4 +454,26 @@
|
|
|
435
454
|
font-size: var(--fd-text-xs);
|
|
436
455
|
}
|
|
437
456
|
}
|
|
457
|
+
|
|
458
|
+
/* The gear sits over the header's top-right: end the mark left of it, and keep
|
|
459
|
+
it there whether or not the gear is showing. After the narrow-width rule above. */
|
|
460
|
+
.flowdrop-idea-node__header--problem {
|
|
461
|
+
padding-right: var(--fd-node-config-btn-slot);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
/* Level with the gear, as on the default card: centred on its middle, not the row's
|
|
465
|
+
(the row starts below the 1px border, the 4px accent bar and the 8px padding). */
|
|
466
|
+
.flowdrop-idea-node__header--problem > :global(.fd-node-problem) {
|
|
467
|
+
align-self: flex-start;
|
|
468
|
+
margin-top: calc(
|
|
469
|
+
var(--fd-space-xs) + var(--fd-node-config-btn-size) / 2 - 13px - var(--fd-node-problem-size) /
|
|
470
|
+
2
|
|
471
|
+
);
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/* Title takes the spare room, so the mark stays put whatever the title's length. */
|
|
475
|
+
.flowdrop-idea-node__header--problem .flowdrop-idea-node__title {
|
|
476
|
+
flex: 1;
|
|
477
|
+
min-width: 0;
|
|
478
|
+
}
|
|
438
479
|
</style>
|
|
@@ -4,7 +4,9 @@ import type { ConfigValues, NodeMetadata } from '../../types/index.js';
|
|
|
4
4
|
* Displays a card-style node for conceptual flow diagrams
|
|
5
5
|
*/
|
|
6
6
|
interface Props {
|
|
7
|
+
/** The node's id on the canvas. */
|
|
7
8
|
id: string;
|
|
9
|
+
/** The node: label, config (`content`, `instanceTitle`) and node type. */
|
|
8
10
|
data: {
|
|
9
11
|
label: string;
|
|
10
12
|
config: ConfigValues;
|
|
@@ -19,10 +21,25 @@ 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 planning card for a conceptual flow, with ports you switch on or off.
|
|
33
|
+
*
|
|
34
|
+
* Users can chain ideas together without committing to node types. It has four connection
|
|
35
|
+
* points (left, right, top, bottom), each one a checkbox in the config.
|
|
36
|
+
*
|
|
37
|
+
* The editor draws it only for a node type that declares `type: "idea"`. Nothing in the
|
|
38
|
+
* library creates one on its own.
|
|
39
|
+
*
|
|
40
|
+
* **Use it for** sketching a flow before the real nodes exist.
|
|
41
|
+
* **Not for** steps that run; use `WorkflowNode`.
|
|
42
|
+
*/
|
|
26
43
|
declare const IdeaNode: import("svelte").Component<Props, {}, "">;
|
|
27
44
|
type IdeaNode = ReturnType<typeof IdeaNode>;
|
|
28
45
|
export default IdeaNode;
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
The card
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
or 320 and the border is drawn inside the
|
|
8
|
-
multiple of 20 and any output can meet any input in a
|
|
9
|
-
handle is placed from the geometry, never from layout.
|
|
10
|
-
|
|
11
|
-
The node component decides
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
2
|
+
@component
|
|
3
|
+
The card body shared by `WorkflowNode`, `GatewayNode` and `ToolNode`.
|
|
4
|
+
|
|
5
|
+
One fixed geometry from `utils/nodeGeometry.ts`. The header is always 60 px, the completion
|
|
6
|
+
`trigger` ports are pins in it (y = 40), every other port is a half-pill on a shared row
|
|
7
|
+
(first row y = 80, pitch 40), the width is 280 or 320, and the border is drawn inside the
|
|
8
|
+
box, so every handle centre is a multiple of 20 and any output can meet any input in a
|
|
9
|
+
straight wire. Every handle is placed from the geometry, never from layout.
|
|
10
|
+
|
|
11
|
+
The node component decides what is on the card (title, ports, branches); this component
|
|
12
|
+
draws it. Rows are keyed by index, so two ports with the same id (two unnamed gateway
|
|
13
|
+
branches) draw two rows instead of crashing.
|
|
14
|
+
|
|
15
|
+
The category glyph and the title carry `data-fd-glyph` and `data-fd-title`, so the zoom
|
|
16
|
+
tiers (outline, glyph, map) can target them. See the Zoom levels story.
|
|
17
|
+
|
|
18
|
+
**Use it for** a new node type that should look like the standard card.
|
|
19
|
+
**Not for** a node of another shape (note, caption, terminal). It is not used on its own;
|
|
20
|
+
see the Workflow node stories.
|
|
19
21
|
-->
|
|
20
22
|
|
|
21
23
|
<script lang="ts">
|
|
@@ -466,6 +468,9 @@
|
|
|
466
468
|
|
|
467
469
|
.flowdrop-workflow-node__header--problem {
|
|
468
470
|
grid-template-columns: var(--fd-node-tile-size) minmax(0, 1fr) auto;
|
|
471
|
+
/* The gear sits over the header's top-right: end the mark left of it, and
|
|
472
|
+
keep it there whether or not the gear is showing. */
|
|
473
|
+
padding-right: var(--fd-node-config-btn-slot);
|
|
469
474
|
}
|
|
470
475
|
|
|
471
476
|
/* The Doctor's glyph, after the title (first row). */
|
|
@@ -710,8 +715,11 @@
|
|
|
710
715
|
}
|
|
711
716
|
|
|
712
717
|
/* Handles: placed from the geometry (inline top), centred on the card edge.
|
|
713
|
-
Wired = filled with the type colour; open = outlined in it.
|
|
718
|
+
Wired = filled with the type colour; open = outlined in it. Above the
|
|
719
|
+
card's border ring (::after, z-index 1), so an open port's fill hides the
|
|
720
|
+
border it sits on instead of letting it run through the ring. */
|
|
714
721
|
:global(.svelte-flow .svelte-flow__handle.flowdrop-workflow-node__handle) {
|
|
722
|
+
z-index: 2;
|
|
715
723
|
--fd-handle-fill: var(--_c);
|
|
716
724
|
--fd-handle-border-color: var(--fd-handle-border);
|
|
717
725
|
}
|
|
@@ -25,6 +25,26 @@ interface Props {
|
|
|
25
25
|
configTitle?: string;
|
|
26
26
|
onconfig: () => void;
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* The card body shared by `WorkflowNode`, `GatewayNode` and `ToolNode`.
|
|
30
|
+
*
|
|
31
|
+
* One fixed geometry from `utils/nodeGeometry.ts`. The header is always 60 px, the completion
|
|
32
|
+
* `trigger` ports are pins in it (y = 40), every other port is a half-pill on a shared row
|
|
33
|
+
* (first row y = 80, pitch 40), the width is 280 or 320, and the border is drawn inside the
|
|
34
|
+
* box, so every handle centre is a multiple of 20 and any output can meet any input in a
|
|
35
|
+
* straight wire. Every handle is placed from the geometry, never from layout.
|
|
36
|
+
*
|
|
37
|
+
* The node component decides what is on the card (title, ports, branches); this component
|
|
38
|
+
* draws it. Rows are keyed by index, so two ports with the same id (two unnamed gateway
|
|
39
|
+
* branches) draw two rows instead of crashing.
|
|
40
|
+
*
|
|
41
|
+
* The category glyph and the title carry `data-fd-glyph` and `data-fd-title`, so the zoom
|
|
42
|
+
* tiers (outline, glyph, map) can target them. See the Zoom levels story.
|
|
43
|
+
*
|
|
44
|
+
* **Use it for** a new node type that should look like the standard card.
|
|
45
|
+
* **Not for** a node of another shape (note, caption, terminal). It is not used on its own;
|
|
46
|
+
* see the Workflow node stories.
|
|
47
|
+
*/
|
|
28
48
|
declare const NodeCard: import("svelte").Component<Props, {}, "">;
|
|
29
49
|
type NodeCard = ReturnType<typeof NodeCard>;
|
|
30
50
|
export default NodeCard;
|
|
@@ -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;
|