@flowdrop/flowdrop 2.12.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +54 -0
- package/dist/commands/executor.js +58 -8
- package/dist/commands/parser.js +3 -3
- package/dist/commands/types.d.ts +2 -0
- package/dist/components/App.svelte +11 -1
- package/dist/components/App.svelte.d.ts +9 -1
- package/dist/components/Button.svelte +7 -7
- package/dist/components/Button.svelte.d.ts +10 -0
- package/dist/components/CanvasBanner.svelte +19 -6
- package/dist/components/CanvasBanner.svelte.d.ts +15 -3
- package/dist/components/CanvasContextMenu.svelte +9 -9
- package/dist/components/CanvasContextMenu.svelte.d.ts +10 -0
- package/dist/components/CanvasToolbar.svelte +8 -7
- package/dist/components/CanvasToolbar.svelte.d.ts +10 -0
- package/dist/components/CanvasZoomControls.svelte +10 -9
- package/dist/components/CanvasZoomControls.svelte.d.ts +13 -0
- package/dist/components/ConfigForm.svelte +9 -17
- package/dist/components/ConfigForm.svelte.d.ts +10 -0
- package/dist/components/ConfigPanel.svelte +9 -5
- package/dist/components/ConfigPanel.svelte.d.ts +10 -0
- package/dist/components/EditorStatusBar.svelte +6 -5
- package/dist/components/EditorStatusBar.svelte.d.ts +7 -0
- package/dist/components/FlowDropEdge.svelte +15 -12
- package/dist/components/FlowDropEdge.svelte.d.ts +16 -0
- package/dist/components/InterfaceTag.svelte +13 -15
- package/dist/components/InterfaceTag.svelte.d.ts +19 -0
- package/dist/components/LoadingSpinner.svelte +8 -2
- package/dist/components/LoadingSpinner.svelte.d.ts +9 -0
- package/dist/components/Logo.svelte +11 -0
- package/dist/components/Logo.svelte.d.ts +9 -0
- package/dist/components/LogoWordmark.svelte +8 -3
- package/dist/components/LogoWordmark.svelte.d.ts +9 -0
- package/dist/components/LoopbackLanes.svelte +12 -6
- package/dist/components/LoopbackLanes.svelte.d.ts +13 -0
- package/dist/components/MarkdownDisplay.svelte +10 -3
- package/dist/components/MarkdownDisplay.svelte.d.ts +11 -0
- package/dist/components/Navbar.svelte +13 -5
- package/dist/components/Navbar.svelte.d.ts +14 -0
- package/dist/components/NodeInspector.svelte +7 -8
- package/dist/components/NodeInspector.svelte.d.ts +10 -0
- package/dist/components/NodeSidebar.svelte +9 -3
- package/dist/components/NodeSidebar.svelte.d.ts +10 -0
- package/dist/components/NodeStatusOverlay.svelte +30 -19
- package/dist/components/NodeStatusOverlay.svelte.d.ts +19 -0
- package/dist/components/NodeSwapPicker.svelte +1 -1
- package/dist/components/RunBar.svelte +10 -13
- package/dist/components/RunBar.svelte.d.ts +15 -0
- package/dist/components/RunsMenu.svelte +14 -13
- package/dist/components/RunsMenu.svelte.d.ts +15 -0
- package/dist/components/SchemaForm.svelte +10 -13
- package/dist/components/SchemaForm.svelte.d.ts +51 -0
- package/dist/components/SettingsPanel.svelte +5 -5
- package/dist/components/StatusIcon.svelte +14 -3
- package/dist/components/StatusIcon.svelte.d.ts +15 -0
- package/dist/components/StatusLabel.svelte +10 -2
- package/dist/components/StatusLabel.svelte.d.ts +11 -0
- package/dist/components/ThemeToggle.svelte +8 -5
- package/dist/components/ThemeToggle.svelte.d.ts +10 -0
- package/dist/components/UniversalNode.svelte +13 -5
- package/dist/components/UniversalNode.svelte.d.ts +15 -0
- package/dist/components/WorkflowInterfaceEntryCard.svelte +1 -1
- package/dist/components/WorkflowInterfaceEntryComposer.svelte +1 -2
- package/dist/components/ZoomTier.svelte +13 -10
- package/dist/components/ZoomTier.svelte.d.ts +14 -0
- package/dist/components/console/CommandConsole.svelte +9 -3
- package/dist/components/console/CommandConsole.svelte.d.ts +10 -0
- package/dist/components/console/ConsoleAutocomplete.svelte +4 -4
- package/dist/components/console/ConsoleAutocomplete.svelte.d.ts +5 -0
- package/dist/components/console/ConsoleInput.svelte +6 -4
- package/dist/components/console/ConsoleInput.svelte.d.ts +7 -0
- package/dist/components/console/ConsoleOutput.svelte +5 -3
- package/dist/components/console/ConsoleOutput.svelte.d.ts +6 -0
- package/dist/components/console/ConsoleStrip.svelte +9 -5
- package/dist/components/console/ConsoleStrip.svelte.d.ts +10 -0
- package/dist/components/form/FieldFactory.svelte +6 -2
- package/dist/components/form/FieldFactory.svelte.d.ts +46 -0
- package/dist/components/form/FormArray.svelte +9 -16
- package/dist/components/form/FormArray.svelte.d.ts +10 -0
- package/dist/components/form/FormArrayRows.svelte +8 -8
- package/dist/components/form/FormArrayRows.svelte.d.ts +11 -0
- package/dist/components/form/FormAutocomplete.svelte +6 -3
- package/dist/components/form/FormAutocomplete.svelte.d.ts +23 -0
- package/dist/components/form/FormCheckboxGroup.svelte +5 -5
- package/dist/components/form/FormCheckboxGroup.svelte.d.ts +6 -0
- package/dist/components/form/FormCodeEditor.svelte +8 -13
- package/dist/components/form/FormCodeEditor.svelte.d.ts +9 -0
- package/dist/components/form/FormField.svelte +7 -8
- package/dist/components/form/FormField.svelte.d.ts +10 -0
- package/dist/components/form/FormFieldLight.svelte +6 -5
- package/dist/components/form/FormFieldLight.svelte.d.ts +8 -0
- package/dist/components/form/FormFieldWrapper.svelte +8 -8
- package/dist/components/form/FormFieldWrapper.svelte.d.ts +9 -0
- package/dist/components/form/FormFieldset.svelte +6 -12
- package/dist/components/form/FormFieldset.svelte.d.ts +7 -0
- package/dist/components/form/FormMarkdownEditor.svelte +8 -15
- package/dist/components/form/FormMarkdownEditor.svelte.d.ts +9 -0
- package/dist/components/form/FormNumberField.svelte +5 -7
- package/dist/components/form/FormNumberField.svelte.d.ts +6 -0
- package/dist/components/form/FormPorts.svelte +133 -27
- package/dist/components/form/FormPorts.svelte.d.ts +19 -0
- package/dist/components/form/FormRangeField.svelte +5 -9
- package/dist/components/form/FormRangeField.svelte.d.ts +6 -0
- package/dist/components/form/FormSelect.svelte +5 -7
- package/dist/components/form/FormSelect.svelte.d.ts +6 -0
- package/dist/components/form/FormTemplateEditor.svelte +8 -16
- package/dist/components/form/FormTemplateEditor.svelte.d.ts +9 -0
- package/dist/components/form/FormTextField.svelte +5 -7
- package/dist/components/form/FormTextField.svelte.d.ts +6 -0
- package/dist/components/form/FormTextarea.svelte +5 -7
- package/dist/components/form/FormTextarea.svelte.d.ts +6 -0
- package/dist/components/form/FormToggle.svelte +6 -8
- package/dist/components/form/FormToggle.svelte.d.ts +7 -0
- package/dist/components/form/FormUISchemaRenderer.svelte +5 -9
- package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +7 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +6 -6
- package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/ConfirmationPrompt.svelte +6 -5
- package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/FormPrompt.svelte +6 -6
- package/dist/components/interrupt/FormPrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/InterruptBubble.svelte +10 -9
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +11 -0
- package/dist/components/interrupt/ReviewPrompt.svelte +5 -6
- package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/TextInputPrompt.svelte +6 -6
- package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +7 -0
- package/dist/components/nodes/AtomNode.svelte +31 -6
- package/dist/components/nodes/AtomNode.svelte.d.ts +15 -0
- package/dist/components/nodes/CaptionNode.svelte +50 -7
- package/dist/components/nodes/CaptionNode.svelte.d.ts +13 -0
- package/dist/components/nodes/GatewayNode.svelte +18 -11
- package/dist/components/nodes/GatewayNode.svelte.d.ts +21 -0
- package/dist/components/nodes/IdeaNode.svelte +47 -6
- package/dist/components/nodes/IdeaNode.svelte.d.ts +17 -0
- package/dist/components/nodes/NodeCard.svelte +26 -18
- package/dist/components/nodes/NodeCard.svelte.d.ts +20 -0
- package/dist/components/nodes/NodeConfigButton.svelte +15 -2
- package/dist/components/nodes/NodeConfigButton.svelte.d.ts +11 -0
- package/dist/components/nodes/NodeProblemMark.svelte +15 -10
- package/dist/components/nodes/NodeProblemMark.svelte.d.ts +16 -0
- package/dist/components/nodes/NodeTip.svelte +10 -7
- package/dist/components/nodes/NodeTip.svelte.d.ts +13 -0
- package/dist/components/nodes/NotesNode.svelte +30 -0
- package/dist/components/nodes/NotesNode.svelte.d.ts +14 -0
- package/dist/components/nodes/SimpleNode.svelte +35 -8
- package/dist/components/nodes/SimpleNode.svelte.d.ts +17 -0
- package/dist/components/nodes/SquareNode.svelte +38 -8
- package/dist/components/nodes/SquareNode.svelte.d.ts +17 -0
- package/dist/components/nodes/TerminalNode.svelte +24 -10
- package/dist/components/nodes/TerminalNode.svelte.d.ts +17 -0
- package/dist/components/nodes/ToolNode.svelte +14 -5
- package/dist/components/nodes/ToolNode.svelte.d.ts +15 -0
- package/dist/components/nodes/WorkflowNode.svelte +18 -15
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +21 -0
- package/dist/components/playground/ChatBubble.svelte +4 -3
- package/dist/components/playground/ChatBubble.svelte.d.ts +5 -0
- package/dist/components/playground/ChatInput.svelte +11 -6
- package/dist/components/playground/ChatInput.svelte.d.ts +14 -0
- package/dist/components/playground/ChatPanel.svelte +15 -7
- package/dist/components/playground/ChatPanel.svelte.d.ts +17 -0
- package/dist/components/playground/ControlPanel.svelte +26 -9
- package/dist/components/playground/ControlPanel.svelte.d.ts +29 -0
- package/dist/components/playground/DockedPlayground.svelte +15 -11
- package/dist/components/playground/DockedPlayground.svelte.d.ts +16 -0
- package/dist/components/playground/ExecutionConsole.svelte +10 -5
- package/dist/components/playground/ExecutionConsole.svelte.d.ts +12 -0
- package/dist/components/playground/ExecutionList.svelte +13 -0
- package/dist/components/playground/ExecutionList.svelte.d.ts +11 -0
- package/dist/components/playground/ExecutionLogs.svelte +6 -9
- package/dist/components/playground/ExecutionLogs.svelte.d.ts +7 -0
- package/dist/components/playground/HeaderMenu.svelte +6 -8
- package/dist/components/playground/HeaderMenu.svelte.d.ts +9 -0
- package/dist/components/playground/HierarchyTrail.svelte +6 -6
- package/dist/components/playground/HierarchyTrail.svelte.d.ts +8 -0
- package/dist/components/playground/InputCollector.svelte +6 -5
- package/dist/components/playground/InputCollector.svelte.d.ts +7 -0
- package/dist/components/playground/InputFields.svelte +8 -12
- package/dist/components/playground/InputFields.svelte.d.ts +9 -0
- package/dist/components/playground/InterfaceInputForm.svelte +6 -13
- package/dist/components/playground/InterfaceInputForm.svelte.d.ts +9 -0
- package/dist/components/playground/InterfaceJsonInput.svelte +6 -5
- package/dist/components/playground/InterfaceJsonInput.svelte.d.ts +8 -0
- package/dist/components/playground/LogRow.svelte +4 -5
- package/dist/components/playground/LogRow.svelte.d.ts +6 -0
- package/dist/components/playground/MessageBubble.svelte +13 -7
- package/dist/components/playground/MessageBubble.svelte.d.ts +15 -0
- package/dist/components/playground/MessageCard.svelte +5 -2
- package/dist/components/playground/MessageCard.svelte.d.ts +6 -0
- package/dist/components/playground/MessageMarkdown.svelte +8 -9
- package/dist/components/playground/MessageMarkdown.svelte.d.ts +11 -0
- package/dist/components/playground/MessageNotice.svelte +7 -0
- package/dist/components/playground/MessageNotice.svelte.d.ts +5 -0
- package/dist/components/playground/MessageStream.svelte +8 -6
- package/dist/components/playground/MessageStream.svelte.d.ts +11 -0
- package/dist/components/playground/MessageTagChip.svelte +7 -7
- package/dist/components/playground/MessageTagChip.svelte.d.ts +10 -0
- package/dist/components/playground/MessageTagStrip.svelte +6 -3
- package/dist/components/playground/MessageTagStrip.svelte.d.ts +8 -0
- package/dist/components/playground/OriginBadge.svelte +7 -4
- package/dist/components/playground/OriginBadge.svelte.d.ts +8 -0
- package/dist/components/playground/PipelineKanbanView.svelte +14 -0
- package/dist/components/playground/PipelineKanbanView.svelte.d.ts +12 -0
- package/dist/components/playground/PipelinePanel.svelte +14 -0
- package/dist/components/playground/PipelinePanel.svelte.d.ts +12 -0
- package/dist/components/playground/PipelineTableView.svelte +14 -0
- package/dist/components/playground/PipelineTableView.svelte.d.ts +12 -0
- package/dist/components/playground/Playground.svelte +17 -11
- package/dist/components/playground/Playground.svelte.d.ts +20 -0
- package/dist/components/playground/PlaygroundApp.svelte +24 -10
- package/dist/components/playground/PlaygroundApp.svelte.d.ts +26 -0
- package/dist/components/playground/PlaygroundHeader.svelte +8 -12
- package/dist/components/playground/PlaygroundHeader.svelte.d.ts +11 -0
- package/dist/components/playground/PlaygroundModal.svelte +6 -8
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +7 -0
- package/dist/components/playground/PlaygroundStudio.svelte +9 -0
- package/dist/components/playground/PlaygroundStudio.svelte.d.ts +7 -0
- package/dist/components/playground/PlaygroundSurface.svelte +19 -14
- package/dist/components/playground/PlaygroundSurface.svelte.d.ts +20 -0
- package/dist/components/playground/SessionManager.svelte +6 -5
- package/dist/components/playground/SessionManager.svelte.d.ts +7 -0
- package/dist/components/playground/StepsSummary.svelte +8 -9
- package/dist/components/playground/StepsSummary.svelte.d.ts +10 -0
- package/dist/components/primitives/Button.svelte +15 -7
- package/dist/components/primitives/Button.svelte.d.ts +18 -1
- package/dist/components/primitives/Card.svelte +8 -6
- package/dist/components/primitives/Card.svelte.d.ts +11 -0
- package/dist/components/primitives/Checkbox.svelte +8 -5
- package/dist/components/primitives/Checkbox.svelte.d.ts +11 -0
- package/dist/components/primitives/Chip.svelte +8 -4
- package/dist/components/primitives/Chip.svelte.d.ts +11 -0
- package/dist/components/primitives/Combobox.svelte +27 -18
- package/dist/components/primitives/Combobox.svelte.d.ts +33 -0
- package/dist/components/primitives/Composer.svelte +15 -16
- package/dist/components/primitives/Composer.svelte.d.ts +20 -0
- package/dist/components/primitives/EmptyState.svelte +9 -3
- package/dist/components/primitives/EmptyState.svelte.d.ts +11 -0
- package/dist/components/primitives/Field.svelte +12 -9
- package/dist/components/primitives/Field.svelte.d.ts +16 -0
- package/dist/components/primitives/IconButton.svelte +10 -5
- package/dist/components/primitives/IconButton.svelte.d.ts +13 -0
- package/dist/components/primitives/Menu.svelte +15 -14
- package/dist/components/primitives/Menu.svelte.d.ts +20 -0
- package/dist/components/primitives/Notice.svelte +11 -8
- package/dist/components/primitives/Notice.svelte.d.ts +14 -0
- package/dist/components/primitives/PanelHeader.svelte +10 -7
- package/dist/components/primitives/PanelHeader.svelte.d.ts +13 -0
- package/dist/components/primitives/Segmented.svelte +11 -4
- package/dist/components/primitives/Segmented.svelte.d.ts +14 -0
- package/dist/components/primitives/Select.svelte +13 -16
- package/dist/components/primitives/Select.svelte.d.ts +18 -0
- package/dist/components/primitives/StatusPill.svelte +11 -8
- package/dist/components/primitives/StatusPill.svelte.d.ts +15 -0
- package/dist/components/primitives/Switch.svelte +9 -6
- package/dist/components/primitives/Switch.svelte.d.ts +12 -0
- package/dist/components/primitives/Tabs.svelte +16 -15
- package/dist/components/primitives/Tabs.svelte.d.ts +22 -0
- package/dist/components/primitives/Toolbar.svelte +14 -13
- package/dist/components/primitives/Toolbar.svelte.d.ts +18 -0
- package/dist/components/primitives/ToolbarSeparator.svelte +5 -4
- package/dist/components/primitives/ToolbarSeparator.svelte.d.ts +7 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/editor/index.d.ts +1 -0
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +1 -1
- package/dist/layout/toWorkflow.d.ts +8 -7
- package/dist/layout/toWorkflow.js +20 -40
- package/dist/messages/defaults.d.ts +24 -0
- package/dist/messages/defaults.js +15 -0
- package/dist/playground/index.d.ts +1 -1
- package/dist/skins/graphite.d.ts +1 -1
- package/dist/skins/graphite.js +1 -1
- package/dist/stores/settingsStore.svelte.js +3 -0
- package/dist/stores/workflowStore.svelte.js +24 -7
- package/dist/styles/base.css +2 -126
- package/dist/styles/tokenAliases.js +1 -0
- package/dist/styles/tokens.css +9 -5
- package/dist/svelte-app.d.ts +10 -1
- package/dist/svelte-app.js +2 -1
- package/dist/themes/classic.d.ts +9 -0
- package/dist/themes/classic.js +16 -0
- package/dist/themes/index.d.ts +7 -2
- package/dist/themes/index.js +20 -10
- package/dist/types/index.d.ts +7 -0
- package/dist/types/playground.d.ts +9 -0
- package/dist/types/settings.d.ts +6 -2
- package/dist/types/theme.d.ts +6 -2
- package/dist/utils/playgroundChat.d.ts +10 -0
- package/dist/utils/playgroundChat.js +25 -0
- package/dist/utils/portExposure.d.ts +24 -1
- package/dist/utils/portExposure.js +46 -13
- package/dist/utils/portUtils.d.ts +5 -1
- package/dist/utils/portUtils.js +15 -4
- package/package.json +2 -1
- package/dist/components/IconButton.svelte +0 -80
- package/dist/components/IconButton.svelte.d.ts +0 -30
- package/dist/themes/default.d.ts +0 -2
- package/dist/themes/default.js +0 -9
|
@@ -20,6 +20,17 @@ interface Props {
|
|
|
20
20
|
*/
|
|
21
21
|
tags?: MessageTag[];
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* The card that holds a question from a paused run, inline in the chat. It picks the prompt for the
|
|
25
|
+
* interrupt's type (confirmation, choice, text, form or review) and sends the answer.
|
|
26
|
+
*
|
|
27
|
+
* The card has a title line (the question), the prompt and its actions. A failed send shows the error with a
|
|
28
|
+
* Retry button. Once answered it folds to one muted line, such as "Confirmed · Yes". Optional hierarchy and
|
|
29
|
+
* tags show in a footer.
|
|
30
|
+
*
|
|
31
|
+
* **Use it for** any question a run asks a person. The Playground and the AI Assistant both use it.
|
|
32
|
+
* **Not for** a prompt without the card (use the prompt component itself, for example `ChoicePrompt`).
|
|
33
|
+
*/
|
|
23
34
|
declare const InterruptBubble: import("svelte").Component<Props, {}, "">;
|
|
24
35
|
type InterruptBubble = ReturnType<typeof InterruptBubble>;
|
|
25
36
|
export default InterruptBubble;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
A list of changes a run proposes. Each one shows the old and new value with a word-level diff, and the person
|
|
4
|
+
accepts or rejects it. Accept all and Reject all act on the whole list. Answered, it shows the decisions.
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
Supports bulk "Accept All" / "Reject All" actions.
|
|
7
|
-
Shows the review decisions when resolved.
|
|
8
|
-
Styled with BEM syntax.
|
|
6
|
+
**Use it for** the body of an `InterruptBubble` of type `review`.
|
|
7
|
+
**Not for** a single yes or no (use `ConfirmationPrompt`).
|
|
9
8
|
-->
|
|
10
9
|
|
|
11
10
|
<script lang="ts">
|
|
@@ -18,6 +18,13 @@ interface Props {
|
|
|
18
18
|
/** Callback when user submits review */
|
|
19
19
|
onSubmit: (value: ReviewResolution) => void;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* A list of changes a run proposes. Each one shows the old and new value with a word-level diff, and the person
|
|
23
|
+
* accepts or rejects it. Accept all and Reject all act on the whole list. Answered, it shows the decisions.
|
|
24
|
+
*
|
|
25
|
+
* **Use it for** the body of an `InterruptBubble` of type `review`.
|
|
26
|
+
* **Not for** a single yes or no (use `ConfirmationPrompt`).
|
|
27
|
+
*/
|
|
21
28
|
declare const ReviewPrompt: import("svelte").Component<Props, {}, "">;
|
|
22
29
|
type ReviewPrompt = ReturnType<typeof ReviewPrompt>;
|
|
23
30
|
export default ReviewPrompt;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
@component
|
|
3
|
+
A text field (or text area) for a question that needs a written answer, with optional placeholder,
|
|
4
|
+
default value and length limits.
|
|
5
|
+
|
|
6
|
+
**Use it for** the body of an `InterruptBubble` of type `text`.
|
|
7
|
+
**Not for** several fields at once (use `FormPrompt`).
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<script lang="ts">
|
|
@@ -16,6 +16,13 @@ interface Props {
|
|
|
16
16
|
/** Callback when user submits text */
|
|
17
17
|
onSubmit: (value: string) => void;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* A text field (or text area) for a question that needs a written answer, with optional placeholder,
|
|
21
|
+
* default value and length limits.
|
|
22
|
+
*
|
|
23
|
+
* **Use it for** the body of an `InterruptBubble` of type `text`.
|
|
24
|
+
* **Not for** several fields at once (use `FormPrompt`).
|
|
25
|
+
*/
|
|
19
26
|
declare const TextInputPrompt: import("svelte").Component<Props, {}, "">;
|
|
20
27
|
type TextInputPrompt = ReturnType<typeof TextInputPrompt>;
|
|
21
28
|
export default TextInputPrompt;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Renders as a pill that hugs its content with handles driven by the node's ports.
|
|
2
|
+
@component
|
|
3
|
+
A value as a small pill: a constant or an inline transform. The text is the whole node.
|
|
5
4
|
|
|
6
|
-
The
|
|
7
|
-
`extensions.ui.atom` (see AtomUIConfig).
|
|
8
|
-
|
|
5
|
+
The text comes from `config[valueKey]` (or the label) and the look from
|
|
6
|
+
`extensions.ui.atom` (see `AtomUIConfig`). The component holds no domain meaning; the
|
|
7
|
+
node type supplies it. The pill is 40 px tall, and its handles follow the node's ports.
|
|
8
|
+
|
|
9
|
+
**Use it for** a node type that declares `type: "atom"`, such as a constant or a cast.
|
|
10
|
+
**Not for** a node that needs a title, a description or several ports; use `WorkflowNode`.
|
|
9
11
|
-->
|
|
10
12
|
|
|
11
13
|
<script lang="ts">
|
|
@@ -21,6 +23,7 @@
|
|
|
21
23
|
WorkflowNode as WorkflowNodeType
|
|
22
24
|
} from '../../types/index.js';
|
|
23
25
|
import { getPortColorToken } from '../../utils/colors.js';
|
|
26
|
+
import NodeProblemMark from './NodeProblemMark.svelte';
|
|
24
27
|
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
25
28
|
import { orderPortsFor, isPortVisible } from '../../utils/portUtils.js';
|
|
26
29
|
import { ProximityConnectHelper } from '../../helpers/proximityConnect.js';
|
|
@@ -38,10 +41,15 @@
|
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
interface Props {
|
|
44
|
+
/** The node's id on the canvas. */
|
|
41
45
|
id: string;
|
|
46
|
+
/** The node: its label, config and node type. The body text and look come from `metadata.extensions.ui.atom`. */
|
|
42
47
|
data: AtomNodeData;
|
|
48
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
43
49
|
selected?: boolean;
|
|
50
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
44
51
|
isProcessing?: boolean;
|
|
52
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
45
53
|
isError?: boolean;
|
|
46
54
|
}
|
|
47
55
|
|
|
@@ -158,6 +166,8 @@
|
|
|
158
166
|
<span class="flowdrop-atom-node__prefix" aria-hidden="true">{atomCfg.prefix}</span>
|
|
159
167
|
{/if}
|
|
160
168
|
<span class="flowdrop-atom-node__body" title={display.text}>{display.text}</span>
|
|
169
|
+
<!-- Outside the truncated body, so a long value never hides it. -->
|
|
170
|
+
<NodeProblemMark />
|
|
161
171
|
</div>
|
|
162
172
|
</div>
|
|
163
173
|
|
|
@@ -253,6 +263,21 @@
|
|
|
253
263
|
line-height: 20px;
|
|
254
264
|
}
|
|
255
265
|
|
|
266
|
+
.flowdrop-atom-node__pill :global(.fd-node-problem) {
|
|
267
|
+
margin-left: 4px;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
/* Zoom tiers scale the mark up. The pill is only 40px tall, so the glyph and map
|
|
271
|
+
tiers keep the mark inline at the outline size (no corner mark over the text),
|
|
272
|
+
and every tier grows it into the pill's padding, not over the text. */
|
|
273
|
+
:global([data-fd-zoom='outline']) .flowdrop-atom-node__pill :global(.fd-node-problem),
|
|
274
|
+
:global([data-fd-zoom='glyph']) .flowdrop-atom-node__pill :global(.fd-node-problem),
|
|
275
|
+
:global([data-fd-zoom='map']) .flowdrop-atom-node__pill :global(.fd-node-problem) {
|
|
276
|
+
position: static;
|
|
277
|
+
scale: var(--fd-node-zoom-mark-scale-outline);
|
|
278
|
+
transform-origin: left center;
|
|
279
|
+
}
|
|
280
|
+
|
|
256
281
|
.flowdrop-atom-node__body {
|
|
257
282
|
/* min-width:0 lets the body ellipsize as a flex sibling of the prefix */
|
|
258
283
|
min-width: 0;
|
|
@@ -15,12 +15,27 @@ interface AtomNodeData {
|
|
|
15
15
|
}) => void;
|
|
16
16
|
}
|
|
17
17
|
interface Props {
|
|
18
|
+
/** The node's id on the canvas. */
|
|
18
19
|
id: string;
|
|
20
|
+
/** The node: its label, config and node type. The body text and look come from `metadata.extensions.ui.atom`. */
|
|
19
21
|
data: AtomNodeData;
|
|
22
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
20
23
|
selected?: boolean;
|
|
24
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
21
25
|
isProcessing?: boolean;
|
|
26
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
22
27
|
isError?: boolean;
|
|
23
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* A value as a small pill: a constant or an inline transform. The text is the whole node.
|
|
31
|
+
*
|
|
32
|
+
* The text comes from `config[valueKey]` (or the label) and the look from
|
|
33
|
+
* `extensions.ui.atom` (see `AtomUIConfig`). The component holds no domain meaning; the
|
|
34
|
+
* node type supplies it. The pill is 40 px tall, and its handles follow the node's ports.
|
|
35
|
+
*
|
|
36
|
+
* **Use it for** a node type that declares `type: "atom"`, such as a constant or a cast.
|
|
37
|
+
* **Not for** a node that needs a title, a description or several ports; use `WorkflowNode`.
|
|
38
|
+
*/
|
|
24
39
|
declare const AtomNode: import("svelte").Component<Props, {}, "">;
|
|
25
40
|
type AtomNode = ReturnType<typeof AtomNode>;
|
|
26
41
|
export default AtomNode;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
A short, high-contrast line of text that names or marks nearby nodes.
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
and
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
The text is `data.label`. A caption has no ports, no config panel and no status
|
|
6
|
+
overlay. It is edited in place (double-click, Enter on the focused node, or the context
|
|
7
|
+
menu) and the editor owns the write through `data.onInlineCommit`.
|
|
8
|
+
|
|
9
|
+
**Use it for** section labels and short reminders on the canvas.
|
|
10
|
+
**Not for** longer text or markdown; use `NotesNode`.
|
|
9
11
|
-->
|
|
10
12
|
|
|
11
13
|
<script lang="ts">
|
|
@@ -15,11 +17,15 @@
|
|
|
15
17
|
import { m } from '../../messages/index.js';
|
|
16
18
|
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
17
19
|
import { getEditorSettings } from '../../stores/settingsStore.svelte.js';
|
|
20
|
+
import NodeProblemMark from './NodeProblemMark.svelte';
|
|
21
|
+
import { getNodeProblem } from '../../utils/nodeProblem.js';
|
|
18
22
|
import { snapCaptionWidth } from '../../utils/captionText.js';
|
|
19
23
|
import { focusWhenVisible } from '../../utils/focus.js';
|
|
20
24
|
|
|
21
25
|
interface Props {
|
|
26
|
+
/** The node's id on the canvas. */
|
|
22
27
|
id: string;
|
|
28
|
+
/** The caption: the text is `label`. */
|
|
23
29
|
data: {
|
|
24
30
|
label: string;
|
|
25
31
|
/**
|
|
@@ -29,16 +35,20 @@
|
|
|
29
35
|
*/
|
|
30
36
|
onInlineCommit?: (id: string, text: string | null) => void;
|
|
31
37
|
};
|
|
38
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
32
39
|
selected?: boolean;
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
let props: Props = $props();
|
|
36
43
|
|
|
37
44
|
const fd = getInstance();
|
|
45
|
+
const problem = getNodeProblem();
|
|
38
46
|
const caption = $derived(m().nodes.caption);
|
|
39
47
|
|
|
40
48
|
/** Horizontal padding on each side, mirrors the CSS. */
|
|
41
49
|
const PADDING_X = 10;
|
|
50
|
+
/** The Doctor's mark after the text: its 16px plus a 6px gap, mirrors the CSS. */
|
|
51
|
+
const MARK_W = 22;
|
|
42
52
|
|
|
43
53
|
let rootEl: HTMLDivElement | undefined = $state();
|
|
44
54
|
let editorEl: HTMLDivElement | undefined = $state();
|
|
@@ -61,6 +71,8 @@
|
|
|
61
71
|
const shownText = $derived(editing ? draft : label);
|
|
62
72
|
const showPlaceholder = $derived(editing && draft === '');
|
|
63
73
|
|
|
74
|
+
const hasMark = $derived(problem?.severity != null);
|
|
75
|
+
|
|
64
76
|
/**
|
|
65
77
|
* Width in px, snapped to the grid; undefined until the text has been
|
|
66
78
|
* measured, so the CSS minimum applies. While editing, the node is never
|
|
@@ -71,7 +83,7 @@
|
|
|
71
83
|
textW === 0 && !editing
|
|
72
84
|
? undefined
|
|
73
85
|
: snapCaptionWidth(
|
|
74
|
-
Math.max(textW, editing ? placeholderW : 0) + 2 * PADDING_X,
|
|
86
|
+
Math.max(textW, editing ? placeholderW : 0) + 2 * PADDING_X + (hasMark ? MARK_W : 0),
|
|
75
87
|
getEditorSettings().gridSize
|
|
76
88
|
)
|
|
77
89
|
);
|
|
@@ -211,6 +223,7 @@
|
|
|
211
223
|
class="flowdrop-caption-node"
|
|
212
224
|
class:flowdrop-caption-node--selected={props.selected}
|
|
213
225
|
class:flowdrop-caption-node--editing={editing}
|
|
226
|
+
class:flowdrop-caption-node--problem={hasMark}
|
|
214
227
|
bind:this={rootEl}
|
|
215
228
|
style:width={width === undefined ? undefined : `${width}px`}
|
|
216
229
|
ondblclick={requestEdit}
|
|
@@ -246,6 +259,9 @@
|
|
|
246
259
|
{label}
|
|
247
260
|
</div>
|
|
248
261
|
{/if}
|
|
262
|
+
|
|
263
|
+
<!-- The Doctor's mark, inline after the text. -->
|
|
264
|
+
<NodeProblemMark />
|
|
249
265
|
</div>
|
|
250
266
|
|
|
251
267
|
<style>
|
|
@@ -265,6 +281,33 @@
|
|
|
265
281
|
line-height: 20px;
|
|
266
282
|
}
|
|
267
283
|
|
|
284
|
+
/* The text takes the room the mark leaves; the mark sits on the first line. */
|
|
285
|
+
.flowdrop-caption-node--problem {
|
|
286
|
+
display: flex;
|
|
287
|
+
align-items: flex-start;
|
|
288
|
+
gap: 6px;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.flowdrop-caption-node--problem .flowdrop-caption-node__text {
|
|
292
|
+
flex: 1;
|
|
293
|
+
min-width: 0;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
.flowdrop-caption-node--problem :global(.fd-node-problem) {
|
|
297
|
+
margin-top: 2px;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
/* Zoom tiers scale the mark up. The caption is one or two lines tall, so every tier
|
|
301
|
+
keeps the mark inline at the outline size (no corner mark over the text) and grows
|
|
302
|
+
it into the padding, not over the text. */
|
|
303
|
+
:global([data-fd-zoom='outline']) .flowdrop-caption-node--problem :global(.fd-node-problem),
|
|
304
|
+
:global([data-fd-zoom='glyph']) .flowdrop-caption-node--problem :global(.fd-node-problem),
|
|
305
|
+
:global([data-fd-zoom='map']) .flowdrop-caption-node--problem :global(.fd-node-problem) {
|
|
306
|
+
position: static;
|
|
307
|
+
scale: var(--fd-node-zoom-mark-scale-outline);
|
|
308
|
+
transform-origin: left center;
|
|
309
|
+
}
|
|
310
|
+
|
|
268
311
|
.flowdrop-caption-node--selected {
|
|
269
312
|
outline: 2px solid var(--fd-ring, currentColor);
|
|
270
313
|
outline-offset: 2px;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
interface Props {
|
|
2
|
+
/** The node's id on the canvas. */
|
|
2
3
|
id: string;
|
|
4
|
+
/** The caption: the text is `label`. */
|
|
3
5
|
data: {
|
|
4
6
|
label: string;
|
|
5
7
|
/**
|
|
@@ -9,8 +11,19 @@ interface Props {
|
|
|
9
11
|
*/
|
|
10
12
|
onInlineCommit?: (id: string, text: string | null) => void;
|
|
11
13
|
};
|
|
14
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
12
15
|
selected?: boolean;
|
|
13
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* A short, high-contrast line of text that names or marks nearby nodes.
|
|
19
|
+
*
|
|
20
|
+
* The text is `data.label`. A caption has no ports, no config panel and no status
|
|
21
|
+
* overlay. It is edited in place (double-click, Enter on the focused node, or the context
|
|
22
|
+
* menu) and the editor owns the write through `data.onInlineCommit`.
|
|
23
|
+
*
|
|
24
|
+
* **Use it for** section labels and short reminders on the canvas.
|
|
25
|
+
* **Not for** longer text or markdown; use `NotesNode`.
|
|
26
|
+
*/
|
|
14
27
|
declare const CaptionNode: import("svelte").Component<Props, {}, "">;
|
|
15
28
|
type CaptionNode = ReturnType<typeof CaptionNode>;
|
|
16
29
|
export default CaptionNode;
|
|
@@ -1,17 +1,21 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
@component
|
|
3
|
+
A node that sends the run down one of several branches, drawn on the shared card.
|
|
4
|
+
|
|
5
|
+
It has the same header as `WorkflowNode` (see `NodeCard`), the trigger as a header pin,
|
|
6
|
+
input ports as rows on the left, and the branches as output rows on the right. After a
|
|
7
|
+
run, the branches the run took are marked.
|
|
7
8
|
|
|
8
9
|
Port rendering:
|
|
9
|
-
- Input
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
- Input exposure (`data.config.ports`, falling back to each port's `exposedByDefault`)
|
|
11
|
+
decides which input ports render, in effective order. Branches are authored paths
|
|
12
|
+
and always render.
|
|
13
|
+
- A branch is not a `NodePort`: each becomes a trigger output row whose port id is the
|
|
14
|
+
branch name. Rows are keyed by index, so two branches with the same (or an empty)
|
|
15
|
+
name draw two rows instead of crashing.
|
|
16
|
+
|
|
17
|
+
**Use it for** a node type that declares `type: "gateway"`, such as If/else or Switch.
|
|
18
|
+
**Not for** a node with a fixed set of outputs; use `WorkflowNode`.
|
|
15
19
|
-->
|
|
16
20
|
|
|
17
21
|
<script lang="ts">
|
|
@@ -25,10 +29,13 @@
|
|
|
25
29
|
import { orderPortsFor, isPortVisible } from '../../utils/portUtils.js';
|
|
26
30
|
|
|
27
31
|
interface Props {
|
|
32
|
+
/** The node's id on the canvas. */
|
|
28
33
|
id: string;
|
|
34
|
+
/** The node: label, config (`branches`, `ports`, `instanceTitle`) and node type. Branches come from `config.branches`. */
|
|
29
35
|
data: WorkflowNode['data'] & {
|
|
30
36
|
onConfigOpen?: (node: { id: string; type: string; data: WorkflowNode['data'] }) => void;
|
|
31
37
|
};
|
|
38
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
32
39
|
selected?: boolean;
|
|
33
40
|
}
|
|
34
41
|
|
|
@@ -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;
|