@flowdrop/flowdrop 2.13.0 → 2.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +44 -0
- package/dist/commands/executor.js +58 -8
- package/dist/commands/parser.js +3 -3
- package/dist/commands/types.d.ts +2 -0
- package/dist/components/App.svelte +1 -1
- package/dist/components/App.svelte.d.ts +1 -1
- package/dist/components/Button.svelte +7 -7
- package/dist/components/Button.svelte.d.ts +10 -0
- package/dist/components/CanvasBanner.svelte +19 -6
- package/dist/components/CanvasBanner.svelte.d.ts +15 -3
- package/dist/components/CanvasContextMenu.svelte +9 -9
- package/dist/components/CanvasContextMenu.svelte.d.ts +10 -0
- package/dist/components/CanvasToolbar.svelte +8 -7
- package/dist/components/CanvasToolbar.svelte.d.ts +10 -0
- package/dist/components/CanvasZoomControls.svelte +10 -9
- package/dist/components/CanvasZoomControls.svelte.d.ts +13 -0
- package/dist/components/ConfigForm.svelte +9 -17
- package/dist/components/ConfigForm.svelte.d.ts +10 -0
- package/dist/components/ConfigPanel.svelte +9 -5
- package/dist/components/ConfigPanel.svelte.d.ts +10 -0
- package/dist/components/EditorStatusBar.svelte +6 -5
- package/dist/components/EditorStatusBar.svelte.d.ts +7 -0
- package/dist/components/FlowDropEdge.svelte +15 -12
- package/dist/components/FlowDropEdge.svelte.d.ts +16 -0
- package/dist/components/InterfaceTag.svelte +13 -15
- package/dist/components/InterfaceTag.svelte.d.ts +19 -0
- package/dist/components/LoadingSpinner.svelte +8 -2
- package/dist/components/LoadingSpinner.svelte.d.ts +9 -0
- package/dist/components/Logo.svelte +11 -0
- package/dist/components/Logo.svelte.d.ts +9 -0
- package/dist/components/LogoWordmark.svelte +8 -3
- package/dist/components/LogoWordmark.svelte.d.ts +9 -0
- package/dist/components/LoopbackLanes.svelte +12 -6
- package/dist/components/LoopbackLanes.svelte.d.ts +13 -0
- package/dist/components/MarkdownDisplay.svelte +10 -3
- package/dist/components/MarkdownDisplay.svelte.d.ts +11 -0
- package/dist/components/Navbar.svelte +13 -5
- package/dist/components/Navbar.svelte.d.ts +14 -0
- package/dist/components/NodeInspector.svelte +7 -8
- package/dist/components/NodeInspector.svelte.d.ts +10 -0
- package/dist/components/NodeSidebar.svelte +9 -3
- package/dist/components/NodeSidebar.svelte.d.ts +10 -0
- package/dist/components/NodeStatusOverlay.svelte +30 -19
- package/dist/components/NodeStatusOverlay.svelte.d.ts +19 -0
- package/dist/components/NodeSwapPicker.svelte +1 -1
- package/dist/components/RunBar.svelte +10 -13
- package/dist/components/RunBar.svelte.d.ts +15 -0
- package/dist/components/RunsMenu.svelte +14 -13
- package/dist/components/RunsMenu.svelte.d.ts +15 -0
- package/dist/components/SchemaForm.svelte +10 -13
- package/dist/components/SchemaForm.svelte.d.ts +51 -0
- package/dist/components/SettingsPanel.svelte +5 -5
- package/dist/components/StatusIcon.svelte +14 -3
- package/dist/components/StatusIcon.svelte.d.ts +15 -0
- package/dist/components/StatusLabel.svelte +10 -2
- package/dist/components/StatusLabel.svelte.d.ts +11 -0
- package/dist/components/ThemeToggle.svelte +8 -5
- package/dist/components/ThemeToggle.svelte.d.ts +10 -0
- package/dist/components/UniversalNode.svelte +13 -5
- package/dist/components/UniversalNode.svelte.d.ts +15 -0
- package/dist/components/WorkflowInterfaceEntryCard.svelte +1 -1
- package/dist/components/WorkflowInterfaceEntryComposer.svelte +1 -2
- package/dist/components/ZoomTier.svelte +13 -10
- package/dist/components/ZoomTier.svelte.d.ts +14 -0
- package/dist/components/console/CommandConsole.svelte +9 -3
- package/dist/components/console/CommandConsole.svelte.d.ts +10 -0
- package/dist/components/console/ConsoleAutocomplete.svelte +4 -4
- package/dist/components/console/ConsoleAutocomplete.svelte.d.ts +5 -0
- package/dist/components/console/ConsoleInput.svelte +6 -4
- package/dist/components/console/ConsoleInput.svelte.d.ts +7 -0
- package/dist/components/console/ConsoleOutput.svelte +5 -3
- package/dist/components/console/ConsoleOutput.svelte.d.ts +6 -0
- package/dist/components/console/ConsoleStrip.svelte +9 -5
- package/dist/components/console/ConsoleStrip.svelte.d.ts +10 -0
- package/dist/components/form/FieldFactory.svelte +6 -2
- package/dist/components/form/FieldFactory.svelte.d.ts +46 -0
- package/dist/components/form/FormArray.svelte +9 -16
- package/dist/components/form/FormArray.svelte.d.ts +10 -0
- package/dist/components/form/FormArrayRows.svelte +8 -8
- package/dist/components/form/FormArrayRows.svelte.d.ts +11 -0
- package/dist/components/form/FormAutocomplete.svelte +6 -3
- package/dist/components/form/FormAutocomplete.svelte.d.ts +23 -0
- package/dist/components/form/FormCheckboxGroup.svelte +5 -5
- package/dist/components/form/FormCheckboxGroup.svelte.d.ts +6 -0
- package/dist/components/form/FormCodeEditor.svelte +8 -13
- package/dist/components/form/FormCodeEditor.svelte.d.ts +9 -0
- package/dist/components/form/FormField.svelte +7 -8
- package/dist/components/form/FormField.svelte.d.ts +10 -0
- package/dist/components/form/FormFieldLight.svelte +6 -5
- package/dist/components/form/FormFieldLight.svelte.d.ts +8 -0
- package/dist/components/form/FormFieldWrapper.svelte +8 -8
- package/dist/components/form/FormFieldWrapper.svelte.d.ts +9 -0
- package/dist/components/form/FormFieldset.svelte +6 -12
- package/dist/components/form/FormFieldset.svelte.d.ts +7 -0
- package/dist/components/form/FormMarkdownEditor.svelte +8 -15
- package/dist/components/form/FormMarkdownEditor.svelte.d.ts +9 -0
- package/dist/components/form/FormNumberField.svelte +5 -7
- package/dist/components/form/FormNumberField.svelte.d.ts +6 -0
- package/dist/components/form/FormPorts.svelte +133 -27
- package/dist/components/form/FormPorts.svelte.d.ts +19 -0
- package/dist/components/form/FormRangeField.svelte +5 -9
- package/dist/components/form/FormRangeField.svelte.d.ts +6 -0
- package/dist/components/form/FormSelect.svelte +5 -7
- package/dist/components/form/FormSelect.svelte.d.ts +6 -0
- package/dist/components/form/FormTemplateEditor.svelte +8 -16
- package/dist/components/form/FormTemplateEditor.svelte.d.ts +9 -0
- package/dist/components/form/FormTextField.svelte +5 -7
- package/dist/components/form/FormTextField.svelte.d.ts +6 -0
- package/dist/components/form/FormTextarea.svelte +5 -7
- package/dist/components/form/FormTextarea.svelte.d.ts +6 -0
- package/dist/components/form/FormToggle.svelte +6 -8
- package/dist/components/form/FormToggle.svelte.d.ts +7 -0
- package/dist/components/form/FormUISchemaRenderer.svelte +5 -9
- package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +7 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +6 -6
- package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/ConfirmationPrompt.svelte +6 -5
- package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/FormPrompt.svelte +6 -6
- package/dist/components/interrupt/FormPrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/InterruptBubble.svelte +10 -9
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +11 -0
- package/dist/components/interrupt/ReviewPrompt.svelte +5 -6
- package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/TextInputPrompt.svelte +6 -6
- package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +7 -0
- package/dist/components/nodes/AtomNode.svelte +31 -6
- package/dist/components/nodes/AtomNode.svelte.d.ts +15 -0
- package/dist/components/nodes/CaptionNode.svelte +50 -7
- package/dist/components/nodes/CaptionNode.svelte.d.ts +13 -0
- package/dist/components/nodes/GatewayNode.svelte +18 -11
- package/dist/components/nodes/GatewayNode.svelte.d.ts +21 -0
- package/dist/components/nodes/IdeaNode.svelte +47 -6
- package/dist/components/nodes/IdeaNode.svelte.d.ts +17 -0
- package/dist/components/nodes/NodeCard.svelte +26 -18
- package/dist/components/nodes/NodeCard.svelte.d.ts +20 -0
- package/dist/components/nodes/NodeConfigButton.svelte +15 -2
- package/dist/components/nodes/NodeConfigButton.svelte.d.ts +11 -0
- package/dist/components/nodes/NodeProblemMark.svelte +15 -10
- package/dist/components/nodes/NodeProblemMark.svelte.d.ts +16 -0
- package/dist/components/nodes/NodeTip.svelte +10 -7
- package/dist/components/nodes/NodeTip.svelte.d.ts +13 -0
- package/dist/components/nodes/NotesNode.svelte +30 -0
- package/dist/components/nodes/NotesNode.svelte.d.ts +14 -0
- package/dist/components/nodes/SimpleNode.svelte +35 -8
- package/dist/components/nodes/SimpleNode.svelte.d.ts +17 -0
- package/dist/components/nodes/SquareNode.svelte +38 -8
- package/dist/components/nodes/SquareNode.svelte.d.ts +17 -0
- package/dist/components/nodes/TerminalNode.svelte +24 -10
- package/dist/components/nodes/TerminalNode.svelte.d.ts +17 -0
- package/dist/components/nodes/ToolNode.svelte +14 -5
- package/dist/components/nodes/ToolNode.svelte.d.ts +15 -0
- package/dist/components/nodes/WorkflowNode.svelte +18 -15
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +21 -0
- package/dist/components/playground/ChatBubble.svelte +4 -3
- package/dist/components/playground/ChatBubble.svelte.d.ts +5 -0
- package/dist/components/playground/ChatInput.svelte +11 -6
- package/dist/components/playground/ChatInput.svelte.d.ts +14 -0
- package/dist/components/playground/ChatPanel.svelte +15 -7
- package/dist/components/playground/ChatPanel.svelte.d.ts +17 -0
- package/dist/components/playground/ControlPanel.svelte +26 -9
- package/dist/components/playground/ControlPanel.svelte.d.ts +29 -0
- package/dist/components/playground/DockedPlayground.svelte +7 -10
- package/dist/components/playground/DockedPlayground.svelte.d.ts +10 -0
- package/dist/components/playground/ExecutionConsole.svelte +10 -5
- package/dist/components/playground/ExecutionConsole.svelte.d.ts +12 -0
- package/dist/components/playground/ExecutionList.svelte +13 -0
- package/dist/components/playground/ExecutionList.svelte.d.ts +11 -0
- package/dist/components/playground/ExecutionLogs.svelte +6 -9
- package/dist/components/playground/ExecutionLogs.svelte.d.ts +7 -0
- package/dist/components/playground/HeaderMenu.svelte +6 -8
- package/dist/components/playground/HeaderMenu.svelte.d.ts +9 -0
- package/dist/components/playground/HierarchyTrail.svelte +6 -6
- package/dist/components/playground/HierarchyTrail.svelte.d.ts +8 -0
- package/dist/components/playground/InputCollector.svelte +6 -5
- package/dist/components/playground/InputCollector.svelte.d.ts +7 -0
- package/dist/components/playground/InputFields.svelte +8 -12
- package/dist/components/playground/InputFields.svelte.d.ts +9 -0
- package/dist/components/playground/InterfaceInputForm.svelte +6 -13
- package/dist/components/playground/InterfaceInputForm.svelte.d.ts +9 -0
- package/dist/components/playground/InterfaceJsonInput.svelte +6 -5
- package/dist/components/playground/InterfaceJsonInput.svelte.d.ts +8 -0
- package/dist/components/playground/LogRow.svelte +4 -5
- package/dist/components/playground/LogRow.svelte.d.ts +6 -0
- package/dist/components/playground/MessageBubble.svelte +13 -7
- package/dist/components/playground/MessageBubble.svelte.d.ts +15 -0
- package/dist/components/playground/MessageCard.svelte +5 -2
- package/dist/components/playground/MessageCard.svelte.d.ts +6 -0
- package/dist/components/playground/MessageMarkdown.svelte +8 -9
- package/dist/components/playground/MessageMarkdown.svelte.d.ts +11 -0
- package/dist/components/playground/MessageNotice.svelte +7 -0
- package/dist/components/playground/MessageNotice.svelte.d.ts +5 -0
- package/dist/components/playground/MessageStream.svelte +8 -6
- package/dist/components/playground/MessageStream.svelte.d.ts +11 -0
- package/dist/components/playground/MessageTagChip.svelte +7 -7
- package/dist/components/playground/MessageTagChip.svelte.d.ts +10 -0
- package/dist/components/playground/MessageTagStrip.svelte +6 -3
- package/dist/components/playground/MessageTagStrip.svelte.d.ts +8 -0
- package/dist/components/playground/OriginBadge.svelte +7 -4
- package/dist/components/playground/OriginBadge.svelte.d.ts +8 -0
- package/dist/components/playground/PipelineKanbanView.svelte +14 -0
- package/dist/components/playground/PipelineKanbanView.svelte.d.ts +12 -0
- package/dist/components/playground/PipelinePanel.svelte +14 -0
- package/dist/components/playground/PipelinePanel.svelte.d.ts +12 -0
- package/dist/components/playground/PipelineTableView.svelte +14 -0
- package/dist/components/playground/PipelineTableView.svelte.d.ts +12 -0
- package/dist/components/playground/Playground.svelte +17 -11
- package/dist/components/playground/Playground.svelte.d.ts +20 -0
- package/dist/components/playground/PlaygroundApp.svelte +24 -10
- package/dist/components/playground/PlaygroundApp.svelte.d.ts +26 -0
- package/dist/components/playground/PlaygroundHeader.svelte +8 -12
- package/dist/components/playground/PlaygroundHeader.svelte.d.ts +11 -0
- package/dist/components/playground/PlaygroundModal.svelte +6 -8
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +7 -0
- package/dist/components/playground/PlaygroundStudio.svelte +9 -0
- package/dist/components/playground/PlaygroundStudio.svelte.d.ts +7 -0
- package/dist/components/playground/PlaygroundSurface.svelte +19 -14
- package/dist/components/playground/PlaygroundSurface.svelte.d.ts +20 -0
- package/dist/components/playground/SessionManager.svelte +6 -5
- package/dist/components/playground/SessionManager.svelte.d.ts +7 -0
- package/dist/components/playground/StepsSummary.svelte +8 -9
- package/dist/components/playground/StepsSummary.svelte.d.ts +10 -0
- package/dist/components/primitives/Button.svelte +15 -7
- package/dist/components/primitives/Button.svelte.d.ts +18 -1
- package/dist/components/primitives/Card.svelte +8 -6
- package/dist/components/primitives/Card.svelte.d.ts +11 -0
- package/dist/components/primitives/Checkbox.svelte +8 -5
- package/dist/components/primitives/Checkbox.svelte.d.ts +11 -0
- package/dist/components/primitives/Chip.svelte +8 -4
- package/dist/components/primitives/Chip.svelte.d.ts +11 -0
- package/dist/components/primitives/Combobox.svelte +27 -18
- package/dist/components/primitives/Combobox.svelte.d.ts +33 -0
- package/dist/components/primitives/Composer.svelte +15 -16
- package/dist/components/primitives/Composer.svelte.d.ts +20 -0
- package/dist/components/primitives/EmptyState.svelte +9 -3
- package/dist/components/primitives/EmptyState.svelte.d.ts +11 -0
- package/dist/components/primitives/Field.svelte +12 -9
- package/dist/components/primitives/Field.svelte.d.ts +16 -0
- package/dist/components/primitives/IconButton.svelte +10 -5
- package/dist/components/primitives/IconButton.svelte.d.ts +13 -0
- package/dist/components/primitives/Menu.svelte +15 -14
- package/dist/components/primitives/Menu.svelte.d.ts +20 -0
- package/dist/components/primitives/Notice.svelte +11 -8
- package/dist/components/primitives/Notice.svelte.d.ts +14 -0
- package/dist/components/primitives/PanelHeader.svelte +10 -7
- package/dist/components/primitives/PanelHeader.svelte.d.ts +13 -0
- package/dist/components/primitives/Segmented.svelte +11 -4
- package/dist/components/primitives/Segmented.svelte.d.ts +14 -0
- package/dist/components/primitives/Select.svelte +13 -16
- package/dist/components/primitives/Select.svelte.d.ts +18 -0
- package/dist/components/primitives/StatusPill.svelte +11 -8
- package/dist/components/primitives/StatusPill.svelte.d.ts +15 -0
- package/dist/components/primitives/Switch.svelte +9 -6
- package/dist/components/primitives/Switch.svelte.d.ts +12 -0
- package/dist/components/primitives/Tabs.svelte +16 -15
- package/dist/components/primitives/Tabs.svelte.d.ts +22 -0
- package/dist/components/primitives/Toolbar.svelte +14 -13
- package/dist/components/primitives/Toolbar.svelte.d.ts +18 -0
- package/dist/components/primitives/ToolbarSeparator.svelte +5 -4
- package/dist/components/primitives/ToolbarSeparator.svelte.d.ts +7 -0
- package/dist/core/index.d.ts +1 -1
- package/dist/core/index.js +1 -1
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +1 -1
- package/dist/layout/toWorkflow.d.ts +8 -7
- package/dist/layout/toWorkflow.js +20 -40
- package/dist/messages/defaults.d.ts +24 -0
- package/dist/messages/defaults.js +15 -0
- package/dist/skins/graphite.d.ts +1 -1
- package/dist/skins/graphite.js +1 -1
- package/dist/stores/settingsStore.svelte.js +3 -0
- package/dist/stores/workflowStore.svelte.js +24 -7
- package/dist/styles/base.css +2 -126
- package/dist/styles/tokenAliases.js +1 -0
- package/dist/styles/tokens.css +9 -5
- package/dist/svelte-app.d.ts +1 -1
- package/dist/themes/classic.d.ts +9 -0
- package/dist/themes/classic.js +16 -0
- package/dist/themes/index.d.ts +7 -2
- package/dist/themes/index.js +20 -10
- package/dist/types/index.d.ts +7 -0
- package/dist/types/settings.d.ts +6 -2
- package/dist/types/theme.d.ts +6 -2
- package/dist/utils/playgroundChat.d.ts +10 -0
- package/dist/utils/playgroundChat.js +25 -0
- package/dist/utils/portExposure.d.ts +24 -1
- package/dist/utils/portExposure.js +46 -13
- package/dist/utils/portUtils.d.ts +5 -1
- package/dist/utils/portUtils.js +15 -4
- package/package.json +2 -1
- package/dist/components/IconButton.svelte +0 -80
- package/dist/components/IconButton.svelte.d.ts +0 -30
- package/dist/themes/default.d.ts +0 -2
- package/dist/themes/default.js +0 -9
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
- Accessible form controls with ARIA attributes
|
|
13
|
-
|
|
2
|
+
@component
|
|
3
|
+
A form built from a JSON Schema, with two-way values, optional Save and Cancel, and no tie to a workflow.
|
|
4
|
+
|
|
5
|
+
Node configuration does not use it: that is `ConfigForm`, which knows about nodes, ports and the inspector.
|
|
6
|
+
`SchemaForm` is for the places that only have a schema and some values: the interrupt `FormPrompt`
|
|
7
|
+
and the public form entry that hosts mount on their own pages.
|
|
8
|
+
|
|
9
|
+
**Use it for** a standalone form from a schema.
|
|
10
|
+
**Not for** editing a node (use `ConfigForm`).
|
|
11
|
+
|
|
14
12
|
@example
|
|
15
13
|
```svelte
|
|
16
14
|
<script lang="ts">
|
|
@@ -52,7 +50,6 @@
|
|
|
52
50
|
/>
|
|
53
51
|
```
|
|
54
52
|
-->
|
|
55
|
-
|
|
56
53
|
<script lang="ts">
|
|
57
54
|
import { setContext } from 'svelte';
|
|
58
55
|
import Icon from '@iconify/svelte';
|
|
@@ -68,6 +68,57 @@ interface Props {
|
|
|
68
68
|
*/
|
|
69
69
|
baseUrl?: string;
|
|
70
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* A form built from a JSON Schema, with two-way values, optional Save and Cancel, and no tie to a workflow.
|
|
73
|
+
*
|
|
74
|
+
* Node configuration does not use it: that is `ConfigForm`, which knows about nodes, ports and the inspector.
|
|
75
|
+
* `SchemaForm` is for the places that only have a schema and some values: the interrupt `FormPrompt`
|
|
76
|
+
* and the public form entry that hosts mount on their own pages.
|
|
77
|
+
*
|
|
78
|
+
* **Use it for** a standalone form from a schema.
|
|
79
|
+
* **Not for** editing a node (use `ConfigForm`).
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```svelte
|
|
83
|
+
* <script lang="ts">
|
|
84
|
+
* import { SchemaForm } from "flowdrop";
|
|
85
|
+
* import type { ConfigSchema } from "flowdrop";
|
|
86
|
+
*
|
|
87
|
+
* const schema: ConfigSchema = {
|
|
88
|
+
* type: "object",
|
|
89
|
+
* properties: {
|
|
90
|
+
* name: { type: "string", title: "Name", description: "Enter your name" },
|
|
91
|
+
* age: { type: "number", title: "Age", minimum: 0, maximum: 120 },
|
|
92
|
+
* active: { type: "boolean", title: "Active", default: true }
|
|
93
|
+
* },
|
|
94
|
+
* required: ["name"]
|
|
95
|
+
* };
|
|
96
|
+
*
|
|
97
|
+
* let values = $state({ name: "", age: 25, active: true });
|
|
98
|
+
*
|
|
99
|
+
* function handleChange(newValues: Record<string, unknown>) {
|
|
100
|
+
* values = newValues;
|
|
101
|
+
* }
|
|
102
|
+
*
|
|
103
|
+
* function handleSave(finalValues: Record<string, unknown>) {
|
|
104
|
+
* // Process saved form values
|
|
105
|
+
* }
|
|
106
|
+
*
|
|
107
|
+
* function handleCancel() {
|
|
108
|
+
* // Handle form cancellation
|
|
109
|
+
* }
|
|
110
|
+
* </script>
|
|
111
|
+
*
|
|
112
|
+
* <SchemaForm
|
|
113
|
+
* {schema}
|
|
114
|
+
* {values}
|
|
115
|
+
* onChange={handleChange}
|
|
116
|
+
* showActions={true}
|
|
117
|
+
* onSave={handleSave}
|
|
118
|
+
* onCancel={handleCancel}
|
|
119
|
+
* />
|
|
120
|
+
* ```
|
|
121
|
+
*/
|
|
71
122
|
declare const SchemaForm: import("svelte").Component<Props, {}, "">;
|
|
72
123
|
type SchemaForm = ReturnType<typeof SchemaForm>;
|
|
73
124
|
export default SchemaForm;
|
|
@@ -231,12 +231,12 @@
|
|
|
231
231
|
title: 'Theme',
|
|
232
232
|
description: 'Visual style and layout of the editor',
|
|
233
233
|
oneOf: [
|
|
234
|
-
{ const: '
|
|
234
|
+
{ const: 'graphite', title: 'Graphite' },
|
|
235
|
+
{ const: 'classic', title: 'Classic' },
|
|
235
236
|
{ const: 'minimal', title: 'Minimal' },
|
|
236
|
-
{ const: 'drafter', title: 'Drafter' }
|
|
237
|
-
{ const: 'graphite', title: 'Graphite' }
|
|
237
|
+
{ const: 'drafter', title: 'Drafter' }
|
|
238
238
|
],
|
|
239
|
-
default: '
|
|
239
|
+
default: 'graphite'
|
|
240
240
|
},
|
|
241
241
|
configPlacement: {
|
|
242
242
|
type: 'string',
|
|
@@ -479,7 +479,7 @@
|
|
|
479
479
|
|
|
480
480
|
/**
|
|
481
481
|
* Swatch colours of a registered theme, from its own skin for the scheme in
|
|
482
|
-
* use. Themes without a skin (
|
|
482
|
+
* use. Themes without a skin (Classic) fall back to the stock palette.
|
|
483
483
|
*/
|
|
484
484
|
const STOCK_SWATCH = {
|
|
485
485
|
light: { background: '#ffffff', primary: '#3b82f6', accent: '#8b5cf6' },
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
@component
|
|
3
|
+
StatusIcon: an icon for a node execution status, in the status colour.
|
|
4
|
+
|
|
5
|
+
Exported for host apps; the editor uses `StatusPill` and the node status overlay instead.
|
|
6
|
+
It knows all nine statuses (`idle`, `pending`, `running`, `completed`, `failed`,
|
|
7
|
+
`cancelled`, `skipped`, `paused`, `interrupted`). `showBackground` puts the icon on a
|
|
8
|
+
tinted square.
|
|
9
|
+
|
|
10
|
+
**Use it for** a status icon in your own list or table.
|
|
11
|
+
**Not for** a status with a word next to it; use `StatusPill`.
|
|
5
12
|
-->
|
|
6
13
|
|
|
7
14
|
<script lang="ts">
|
|
@@ -10,9 +17,13 @@
|
|
|
10
17
|
import { getStatusColor, getStatusIcon } from '../utils/nodeStatus.js';
|
|
11
18
|
|
|
12
19
|
interface Props {
|
|
20
|
+
/** The status; selects the icon and colour. */
|
|
13
21
|
status: NodeExecutionStatus;
|
|
22
|
+
/** Icon size: 12, 16, 24 or 28px. */
|
|
14
23
|
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
24
|
+
/** Puts the icon on a tinted square. */
|
|
15
25
|
showBackground?: boolean;
|
|
26
|
+
/** Extra classes on the root. */
|
|
16
27
|
class?: string;
|
|
17
28
|
}
|
|
18
29
|
|
|
@@ -1,10 +1,25 @@
|
|
|
1
1
|
import type { NodeExecutionStatus } from '../types/index.js';
|
|
2
2
|
interface Props {
|
|
3
|
+
/** The status; selects the icon and colour. */
|
|
3
4
|
status: NodeExecutionStatus;
|
|
5
|
+
/** Icon size: 12, 16, 24 or 28px. */
|
|
4
6
|
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
7
|
+
/** Puts the icon on a tinted square. */
|
|
5
8
|
showBackground?: boolean;
|
|
9
|
+
/** Extra classes on the root. */
|
|
6
10
|
class?: string;
|
|
7
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* StatusIcon: an icon for a node execution status, in the status colour.
|
|
14
|
+
*
|
|
15
|
+
* Exported for host apps; the editor uses `StatusPill` and the node status overlay instead.
|
|
16
|
+
* It knows all nine statuses (`idle`, `pending`, `running`, `completed`, `failed`,
|
|
17
|
+
* `cancelled`, `skipped`, `paused`, `interrupted`). `showBackground` puts the icon on a
|
|
18
|
+
* tinted square.
|
|
19
|
+
*
|
|
20
|
+
* **Use it for** a status icon in your own list or table.
|
|
21
|
+
* **Not for** a status with a word next to it; use `StatusPill`.
|
|
22
|
+
*/
|
|
8
23
|
declare const StatusIcon: import("svelte").Component<Props, {}, "">;
|
|
9
24
|
type StatusIcon = ReturnType<typeof StatusIcon>;
|
|
10
25
|
export default StatusIcon;
|
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
@component
|
|
3
|
+
StatusLabel: a small text label for a status.
|
|
4
|
+
|
|
5
|
+
Exported for host apps; the editor uses `StatusPill` instead. It only styles the text you
|
|
6
|
+
pass, so get the word from your own status mapping.
|
|
7
|
+
|
|
8
|
+
**Use it for** a plain status word in your own list.
|
|
9
|
+
**Not for** a status with an icon or colour; use `StatusPill`.
|
|
4
10
|
-->
|
|
5
11
|
|
|
6
12
|
<script lang="ts">
|
|
7
13
|
interface Props {
|
|
14
|
+
/** The text to show. */
|
|
8
15
|
label: string;
|
|
16
|
+
/** Extra classes on the root. */
|
|
9
17
|
class?: string;
|
|
10
18
|
}
|
|
11
19
|
|
|
@@ -1,7 +1,18 @@
|
|
|
1
1
|
interface Props {
|
|
2
|
+
/** The text to show. */
|
|
2
3
|
label: string;
|
|
4
|
+
/** Extra classes on the root. */
|
|
3
5
|
class?: string;
|
|
4
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* StatusLabel: a small text label for a status.
|
|
9
|
+
*
|
|
10
|
+
* Exported for host apps; the editor uses `StatusPill` instead. It only styles the text you
|
|
11
|
+
* pass, so get the word from your own status mapping.
|
|
12
|
+
*
|
|
13
|
+
* **Use it for** a plain status word in your own list.
|
|
14
|
+
* **Not for** a status with an icon or colour; use `StatusPill`.
|
|
15
|
+
*/
|
|
5
16
|
declare const StatusLabel: import("svelte").Component<Props, {}, "">;
|
|
6
17
|
type StatusLabel = ReturnType<typeof StatusLabel>;
|
|
7
18
|
export default StatusLabel;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
@component
|
|
3
|
+
ThemeToggle: a button that cycles the theme: light, dark, auto (and host, when the host app
|
|
4
|
+
sets a colour scheme). The icon shows the current choice and the tooltip says what a click does.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
Exported for host apps; the editor sets the theme in its settings panel instead. It is built on the primitive
|
|
7
|
+
Button, so height and focus ring match other controls. The choice is stored in the settings store.
|
|
8
|
+
|
|
9
|
+
**Use it for** a theme switch in your own toolbar.
|
|
10
|
+
**Not for** the editor's own settings; those have their own theme picker.
|
|
8
11
|
-->
|
|
9
12
|
|
|
10
13
|
<script lang="ts">
|
|
@@ -9,6 +9,16 @@ interface Props {
|
|
|
9
9
|
/** Custom class name for styling */
|
|
10
10
|
class?: string;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* ThemeToggle: a button that cycles the theme: light, dark, auto (and host, when the host app
|
|
14
|
+
* sets a colour scheme). The icon shows the current choice and the tooltip says what a click does.
|
|
15
|
+
*
|
|
16
|
+
* Exported for host apps; the editor sets the theme in its settings panel instead. It is built on the primitive
|
|
17
|
+
* Button, so height and focus ring match other controls. The choice is stored in the settings store.
|
|
18
|
+
*
|
|
19
|
+
* **Use it for** a theme switch in your own toolbar.
|
|
20
|
+
* **Not for** the editor's own settings; those have their own theme picker.
|
|
21
|
+
*/
|
|
12
22
|
declare const ThemeToggle: import("svelte").Component<Props, {}, "">;
|
|
13
23
|
type ThemeToggle = ReturnType<typeof ThemeToggle>;
|
|
14
24
|
export default ThemeToggle;
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
@component
|
|
3
|
+
The one node type the canvas registers. It picks the card for a node and adds what every
|
|
4
|
+
card shares.
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
It resolves the card from the node type registry: `config.nodeType` first, then
|
|
7
|
+
`metadata.type`, then the standard card. It then adds the run status (pill, and in Test mode
|
|
8
|
+
the status border, a dim for nodes the run did not reach, and the `edited` mark), the
|
|
9
|
+
Doctor's finding, and Enter/Space to open the config.
|
|
10
|
+
|
|
11
|
+
The status comes from the instance's playground store (`nodeStatusFor`), keyed by node id.
|
|
12
|
+
`data.executionInfo` is a deprecated fallback.
|
|
13
|
+
|
|
14
|
+
**Use it for** `nodeTypes.universalNode` in a canvas.
|
|
15
|
+
**Not for** a card of your own; register it with the node type registry instead.
|
|
8
16
|
-->
|
|
9
17
|
|
|
10
18
|
<script lang="ts">
|
|
@@ -10,6 +10,21 @@ type $$ComponentProps = {
|
|
|
10
10
|
};
|
|
11
11
|
selected?: boolean;
|
|
12
12
|
};
|
|
13
|
+
/**
|
|
14
|
+
* The one node type the canvas registers. It picks the card for a node and adds what every
|
|
15
|
+
* card shares.
|
|
16
|
+
*
|
|
17
|
+
* It resolves the card from the node type registry: `config.nodeType` first, then
|
|
18
|
+
* `metadata.type`, then the standard card. It then adds the run status (pill, and in Test mode
|
|
19
|
+
* the status border, a dim for nodes the run did not reach, and the `edited` mark), the
|
|
20
|
+
* Doctor's finding, and Enter/Space to open the config.
|
|
21
|
+
*
|
|
22
|
+
* The status comes from the instance's playground store (`nodeStatusFor`), keyed by node id.
|
|
23
|
+
* `data.executionInfo` is a deprecated fallback.
|
|
24
|
+
*
|
|
25
|
+
* **Use it for** `nodeTypes.universalNode` in a canvas.
|
|
26
|
+
* **Not for** a card of your own; register it with the node type registry instead.
|
|
27
|
+
*/
|
|
13
28
|
declare const UniversalNode: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
14
29
|
type UniversalNode = ReturnType<typeof UniversalNode>;
|
|
15
30
|
export default UniversalNode;
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
<script lang="ts">
|
|
22
22
|
import Icon from '@iconify/svelte';
|
|
23
23
|
import Button from './Button.svelte';
|
|
24
|
-
import IconButton from './IconButton.svelte';
|
|
24
|
+
import IconButton from './primitives/IconButton.svelte';
|
|
25
25
|
import Input from './Input.svelte';
|
|
26
26
|
import Select from './primitives/Select.svelte';
|
|
27
27
|
import Checkbox from './primitives/Checkbox.svelte';
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
<script lang="ts">
|
|
19
19
|
import Icon from '@iconify/svelte';
|
|
20
20
|
import Button from './Button.svelte';
|
|
21
|
-
import IconButton from './IconButton.svelte';
|
|
21
|
+
import IconButton from './primitives/IconButton.svelte';
|
|
22
22
|
import { m } from '../messages/index.js';
|
|
23
23
|
import type { RankedBindablePort } from '../utils/workflowInterface.js';
|
|
24
24
|
import BindablePortListbox from './BindablePortListbox.svelte';
|
|
@@ -83,7 +83,6 @@
|
|
|
83
83
|
</div>
|
|
84
84
|
</div>
|
|
85
85
|
<IconButton
|
|
86
|
-
size="sm"
|
|
87
86
|
class="wf-composer__close"
|
|
88
87
|
ariaLabel={m().workflowInterface.composerClose}
|
|
89
88
|
onclick={onCancel}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
the
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
@component
|
|
3
|
+
Publishes the canvas zoom tier as `data-fd-zoom` (`full`, `outline`, `glyph` or `map`) on the
|
|
4
|
+
editor root, so nodes, status overlays and interface tags restyle themselves in CSS.
|
|
5
|
+
|
|
6
|
+
Where each tier starts comes from the `editor.zoomTiers` setting; the tier is recomputed when
|
|
7
|
+
the setting changes. The root is `.flowdrop-root`, or the canvas itself when the editor is
|
|
8
|
+
mounted without one. Only the tier is published, never the zoom: every drawing is in fixed
|
|
9
|
+
flow px and Svelte Flow scales the canvas.
|
|
10
|
+
|
|
11
|
+
Renders nothing. Render it inside `<SvelteFlow>`.
|
|
12
|
+
|
|
13
|
+
**Use it for** a canvas that should draw less detail as it zooms out.
|
|
14
|
+
**Not for** the zoom buttons; those are `CanvasZoomControls`.
|
|
12
15
|
-->
|
|
13
16
|
|
|
14
17
|
<script lang="ts">
|
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
import { type ZoomTier } from '../utils/zoomTier.js';
|
|
2
|
+
/**
|
|
3
|
+
* Publishes the canvas zoom tier as `data-fd-zoom` (`full`, `outline`, `glyph` or `map`) on the
|
|
4
|
+
* editor root, so nodes, status overlays and interface tags restyle themselves in CSS.
|
|
5
|
+
*
|
|
6
|
+
* Where each tier starts comes from the `editor.zoomTiers` setting; the tier is recomputed when
|
|
7
|
+
* the setting changes. The root is `.flowdrop-root`, or the canvas itself when the editor is
|
|
8
|
+
* mounted without one. Only the tier is published, never the zoom: every drawing is in fixed
|
|
9
|
+
* flow px and Svelte Flow scales the canvas.
|
|
10
|
+
*
|
|
11
|
+
* Renders nothing. Render it inside `<SvelteFlow>`.
|
|
12
|
+
*
|
|
13
|
+
* **Use it for** a canvas that should draw less detail as it zooms out.
|
|
14
|
+
* **Not for** the zoom buttons; those are `CanvasZoomControls`.
|
|
15
|
+
*/
|
|
2
16
|
declare const ZoomTier: import("svelte").Component<Record<string, never>, {}, "">;
|
|
3
17
|
type ZoomTier = ReturnType<typeof ZoomTier>;
|
|
4
18
|
export default ZoomTier;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
@component
|
|
3
|
+
The editor's Console: a terminal-style panel for the FlowDrop command language (`list nodes`, `add ...`,
|
|
4
|
+
`help`) and for `session` commands that drive runs.
|
|
5
|
+
|
|
6
|
+
Commands act on the workflow open in the instance (`getInstance()`). With no workflow loaded they answer
|
|
7
|
+
"No workflow loaded". An empty Console offers a few read-only example commands to click.
|
|
8
|
+
|
|
9
|
+
**Use it for** inspecting and editing the workflow by typing, and for scripted batches.
|
|
10
|
+
**Not for** the open/close toggle (that is `ConsoleStrip`).
|
|
5
11
|
-->
|
|
6
12
|
|
|
7
13
|
<script lang="ts">
|
|
@@ -8,6 +8,16 @@ interface Props {
|
|
|
8
8
|
/** Id of the panel element, so the toggle strip can point `aria-controls` at it */
|
|
9
9
|
id?: string;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* The editor's Console: a terminal-style panel for the FlowDrop command language (`list nodes`, `add ...`,
|
|
13
|
+
* `help`) and for `session` commands that drive runs.
|
|
14
|
+
*
|
|
15
|
+
* Commands act on the workflow open in the instance (`getInstance()`). With no workflow loaded they answer
|
|
16
|
+
* "No workflow loaded". An empty Console offers a few read-only example commands to click.
|
|
17
|
+
*
|
|
18
|
+
* **Use it for** inspecting and editing the workflow by typing, and for scripted batches.
|
|
19
|
+
* **Not for** the open/close toggle (that is `ConsoleStrip`).
|
|
20
|
+
*/
|
|
11
21
|
declare const CommandConsole: import("svelte").Component<Props, {}, "">;
|
|
12
22
|
type CommandConsole = ReturnType<typeof CommandConsole>;
|
|
13
23
|
export default CommandConsole;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
@component
|
|
3
|
+
The suggestion list above the Console input: command verbs and node type ids, at most eight rows visible, scrollable.
|
|
4
|
+
|
|
5
|
+
**Use it for** completing a command while typing in `ConsoleInput`.
|
|
6
6
|
-->
|
|
7
7
|
|
|
8
8
|
<script lang="ts">
|
|
@@ -22,6 +22,11 @@ interface Props {
|
|
|
22
22
|
*/
|
|
23
23
|
listboxId: string;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* The suggestion list above the Console input: command verbs and node type ids, at most eight rows visible, scrollable.
|
|
27
|
+
*
|
|
28
|
+
* **Use it for** completing a command while typing in `ConsoleInput`.
|
|
29
|
+
*/
|
|
25
30
|
declare const ConsoleAutocomplete: import("svelte").Component<Props, {}, "">;
|
|
26
31
|
type ConsoleAutocomplete = ReturnType<typeof ConsoleAutocomplete>;
|
|
27
32
|
export default ConsoleAutocomplete;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
@component
|
|
3
|
+
The one-line command input of the Console: a prompt, Enter to run, Escape to close, history, multi-line paste
|
|
4
|
+
as a batch, and autocomplete for command verbs and node type ids.
|
|
5
|
+
|
|
6
|
+
**Use it for** typing a command inside `CommandConsole`.
|
|
7
|
+
**Not for** general text entry (use the `Input` primitive).
|
|
6
8
|
-->
|
|
7
9
|
|
|
8
10
|
<script lang="ts">
|
|
@@ -11,6 +11,13 @@ interface Props {
|
|
|
11
11
|
/** Called when user presses Escape to close the console */
|
|
12
12
|
onClose: () => void;
|
|
13
13
|
}
|
|
14
|
+
/**
|
|
15
|
+
* The one-line command input of the Console: a prompt, Enter to run, Escape to close, history, multi-line paste
|
|
16
|
+
* as a batch, and autocomplete for command verbs and node type ids.
|
|
17
|
+
*
|
|
18
|
+
* **Use it for** typing a command inside `CommandConsole`.
|
|
19
|
+
* **Not for** general text entry (use the `Input` primitive).
|
|
20
|
+
*/
|
|
14
21
|
declare const ConsoleInput: import("svelte").Component<Props, {}, "">;
|
|
15
22
|
type ConsoleInput = ReturnType<typeof ConsoleInput>;
|
|
16
23
|
export default ConsoleInput;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
@component
|
|
3
|
+
The scrolling output area of the Console. It draws the lines you typed, results, errors and formatted tables,
|
|
4
|
+
with the command language highlighted, and stays scrolled to the newest line.
|
|
5
|
+
|
|
6
|
+
**Use it for** showing command results inside `CommandConsole`.
|
|
5
7
|
-->
|
|
6
8
|
|
|
7
9
|
<script lang="ts">
|
|
@@ -6,6 +6,12 @@ interface Props {
|
|
|
6
6
|
/** Output entries to display */
|
|
7
7
|
entries: ConsoleEntry[];
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* The scrolling output area of the Console. It draws the lines you typed, results, errors and formatted tables,
|
|
11
|
+
* with the command language highlighted, and stays scrolled to the newest line.
|
|
12
|
+
*
|
|
13
|
+
* **Use it for** showing command results inside `CommandConsole`.
|
|
14
|
+
*/
|
|
9
15
|
declare const ConsoleOutput: import("svelte").Component<Props, {}, "">;
|
|
10
16
|
type ConsoleOutput = ReturnType<typeof ConsoleOutput>;
|
|
11
17
|
export default ConsoleOutput;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
2
|
+
@component
|
|
3
|
+
The slim bar along the canvas's bottom edge that opens the Command Console.
|
|
4
|
+
|
|
5
|
+
Closed, it is the whole control ("›_ Console"; its tooltip shows the backquote shortcut). Open, it becomes the panel's
|
|
6
|
+
header, so the panel needs no close button of its own. It is one button: `aria-expanded` says which state it is
|
|
7
|
+
in and `aria-controls` names the panel.
|
|
8
|
+
|
|
9
|
+
**Use it for** opening and closing the Console.
|
|
10
|
+
**Not for** the Console itself (that is `CommandConsole`).
|
|
7
11
|
-->
|
|
8
12
|
|
|
9
13
|
<script lang="ts">
|
|
@@ -8,6 +8,16 @@ interface Props {
|
|
|
8
8
|
/** Toggle the panel. */
|
|
9
9
|
onToggle: () => void;
|
|
10
10
|
}
|
|
11
|
+
/**
|
|
12
|
+
* The slim bar along the canvas's bottom edge that opens the Command Console.
|
|
13
|
+
*
|
|
14
|
+
* Closed, it is the whole control ("›_ Console"; its tooltip shows the backquote shortcut). Open, it becomes the panel's
|
|
15
|
+
* header, so the panel needs no close button of its own. It is one button: `aria-expanded` says which state it is
|
|
16
|
+
* in and `aria-controls` names the panel.
|
|
17
|
+
*
|
|
18
|
+
* **Use it for** opening and closing the Console.
|
|
19
|
+
* **Not for** the Console itself (that is `CommandConsole`).
|
|
20
|
+
*/
|
|
11
21
|
declare const ConsoleStrip: import("svelte").Component<Props, {}, "">;
|
|
12
22
|
type ConsoleStrip = ReturnType<typeof ConsoleStrip>;
|
|
13
23
|
export default ConsoleStrip;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
@component
|
|
3
|
+
The one field factory: it looks at a field's schema and draws the matching control inside a `FormFieldWrapper`.
|
|
4
|
+
Not exported; `FormField` and `FormFieldLight` are its public wrappers.
|
|
5
|
+
|
|
6
|
+
**Use it for** nothing directly. Use `FormField` or `FormFieldLight`.
|
|
7
|
+
**Not for** a whole form (use `SchemaForm` or `ConfigForm`).
|
|
4
8
|
|
|
5
9
|
The one field factory. The public components are thin wrappers around it:
|
|
6
10
|
- FormFieldLight (exported as `FormField` from "@flowdrop/flowdrop/form")
|
|
@@ -9,6 +9,52 @@ interface Props extends FormFieldFactoryProps {
|
|
|
9
9
|
*/
|
|
10
10
|
editors?: Partial<Record<HeavyEditorKind, FieldComponent>>;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* The one field factory: it looks at a field's schema and draws the matching control inside a `FormFieldWrapper`.
|
|
14
|
+
* Not exported; `FormField` and `FormFieldLight` are its public wrappers.
|
|
15
|
+
*
|
|
16
|
+
* **Use it for** nothing directly. Use `FormField` or `FormFieldLight`.
|
|
17
|
+
* **Not for** a whole form (use `SchemaForm` or `ConfigForm`).
|
|
18
|
+
*
|
|
19
|
+
* The one field factory. The public components are thin wrappers around it:
|
|
20
|
+
* - FormFieldLight (exported as `FormField` from "@flowdrop/flowdrop/form")
|
|
21
|
+
* passes no editors, so CodeMirror stays out of the light entry
|
|
22
|
+
* - FormField (exported as `FormFieldFull` from "@flowdrop/flowdrop/form/full")
|
|
23
|
+
* passes the statically imported code, markdown and template editors
|
|
24
|
+
*
|
|
25
|
+
* Heavy editors (code, markdown, template) are not imported here; they come
|
|
26
|
+
* from, in order:
|
|
27
|
+
* - the instance's field registry — `registerCodeEditorField()` from
|
|
28
|
+
* "@flowdrop/flowdrop/form/code", `registerMarkdownEditorField()` from
|
|
29
|
+
* "@flowdrop/flowdrop/form/markdown", or any host override
|
|
30
|
+
* - the `editors` prop, which only the two wrappers above set
|
|
31
|
+
* - otherwise a plain textarea with a hint naming the registration call
|
|
32
|
+
*
|
|
33
|
+
* Features:
|
|
34
|
+
* - Automatically selects the correct field component based on schema
|
|
35
|
+
* - Wraps fields with FormFieldWrapper for consistent layout
|
|
36
|
+
* - Supports all basic field types (string, number, boolean, checkbox group, range)
|
|
37
|
+
* - Uses standard JSON Schema patterns (enum, oneOf) for select fields
|
|
38
|
+
* - schema.readOnly disables every input, built-in or registered
|
|
39
|
+
*
|
|
40
|
+
* Type Resolution Order:
|
|
41
|
+
* 1. Check field registry for custom/heavy components (highest priority)
|
|
42
|
+
* 2. format: 'hidden' -> skip rendering (return nothing)
|
|
43
|
+
* 3. format: 'autocomplete' with autocomplete.url -> FormAutocomplete
|
|
44
|
+
* 4. format: 'json' | 'code' | 'markdown' | 'template', or type: 'object' with
|
|
45
|
+
* no format of its own -> `editors` prop, else the textarea fallback
|
|
46
|
+
* 5. format: 'ports' -> FormPorts
|
|
47
|
+
* 6. enum with multiple: true -> FormCheckboxGroup
|
|
48
|
+
* 7. enum -> FormSelect (simple values without labels)
|
|
49
|
+
* 8. oneOf with const/title (labeled options) -> FormSelect
|
|
50
|
+
* 9. format: 'multiline' -> FormTextarea
|
|
51
|
+
* 10. format: 'range' (number/integer) -> FormRangeField
|
|
52
|
+
* 11. type: 'string' -> FormTextField
|
|
53
|
+
* 12. type: 'number' or 'integer' -> FormNumberField
|
|
54
|
+
* 13. type: 'boolean' -> FormToggle
|
|
55
|
+
* 14. type: 'array' -> FormArray
|
|
56
|
+
* 15. fallback -> FormTextField
|
|
57
|
+
*/
|
|
12
58
|
declare const FieldFactory: import("svelte").Component<Props, {}, "">;
|
|
13
59
|
type FieldFactory = ReturnType<typeof FieldFactory>;
|
|
14
60
|
export default FieldFactory;
|