@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,14 +1,13 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
The field factory with every editor built in. Give it a field schema and a value and it draws the right control
|
|
4
|
+
inside a `FormFieldWrapper`: text, number, switch, select, range, checkboxes, code, markdown or template.
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
resolution lives in FieldFactory; this file only hands it the editors. A component
|
|
7
|
-
registered on the instance's field registry still wins over these.
|
|
6
|
+
It is exported as `FormFieldFull` from `@flowdrop/flowdrop/form/full`. The editor itself uses the lighter `FormFieldLight`.
|
|
7
|
+
A component registered on the instance's field registry wins over the built-in ones.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
renders the light one, those bugs were the ones users saw.
|
|
9
|
+
**Use it for** rendering one field from a schema when you want code, markdown and template editors without registering anything.
|
|
10
|
+
**Not for** a whole form (use `SchemaForm` or `ConfigForm`).
|
|
12
11
|
-->
|
|
13
12
|
|
|
14
13
|
<script lang="ts">
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import type { FormFieldFactoryProps } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The field factory with every editor built in. Give it a field schema and a value and it draws the right control
|
|
4
|
+
* inside a `FormFieldWrapper`: text, number, switch, select, range, checkboxes, code, markdown or template.
|
|
5
|
+
*
|
|
6
|
+
* It is exported as `FormFieldFull` from `@flowdrop/flowdrop/form/full`. The editor itself uses the lighter `FormFieldLight`.
|
|
7
|
+
* A component registered on the instance's field registry wins over the built-in ones.
|
|
8
|
+
*
|
|
9
|
+
* **Use it for** rendering one field from a schema when you want code, markdown and template editors without registering anything.
|
|
10
|
+
* **Not for** a whole form (use `SchemaForm` or `ConfigForm`).
|
|
11
|
+
*/
|
|
2
12
|
declare const FormField: import("svelte").Component<FormFieldFactoryProps, {}, "">;
|
|
3
13
|
type FormField = ReturnType<typeof FormField>;
|
|
4
14
|
export default FormField;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
The field factory without the heavy editors. It is exported as `FormField` from `@flowdrop/flowdrop/form`, and the editor's
|
|
4
|
+
config form uses it. Code, markdown and template fields draw through the instance's field registry,
|
|
5
|
+
or as a plain textarea with a hint when nothing is registered.
|
|
3
6
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
hint naming the registration call. All field resolution lives in
|
|
7
|
-
FieldFactory; see its header for the order.
|
|
7
|
+
**Use it for** rendering one field from a schema while keeping CodeMirror out of your bundle.
|
|
8
|
+
**Not for** a whole form (use `SchemaForm` or `ConfigForm`).
|
|
8
9
|
-->
|
|
9
10
|
|
|
10
11
|
<script lang="ts">
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import type { FormFieldFactoryProps } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* The field factory without the heavy editors. It is exported as `FormField` from `@flowdrop/flowdrop/form`, and the editor's
|
|
4
|
+
* config form uses it. Code, markdown and template fields draw through the instance's field registry,
|
|
5
|
+
* or as a plain textarea with a hint when nothing is registered.
|
|
6
|
+
*
|
|
7
|
+
* **Use it for** rendering one field from a schema while keeping CodeMirror out of your bundle.
|
|
8
|
+
* **Not for** a whole form (use `SchemaForm` or `ConfigForm`).
|
|
9
|
+
*/
|
|
2
10
|
declare const FormFieldLight: import("svelte").Component<FormFieldFactoryProps, {}, "">;
|
|
3
11
|
type FormFieldLight = ReturnType<typeof FormFieldLight>;
|
|
4
12
|
export default FormFieldLight;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
@component
|
|
3
|
+
The frame around one form field: the label, a required mark, the help text under the field, and the field itself as children.
|
|
4
|
+
|
|
5
|
+
`inline` puts a switch on the label's row. `plain` is for section-style fields such as the ports list,
|
|
6
|
+
where the label is for screen readers only. `aside` adds a short muted note on the label row.
|
|
7
|
+
|
|
8
|
+
**Use it for** giving a custom field the same label and help text as the built-in ones.
|
|
9
|
+
**Not for** choosing which control to draw from a schema (that is `FormField`, which wraps its fields in this).
|
|
10
10
|
-->
|
|
11
11
|
|
|
12
12
|
<script lang="ts">
|
|
@@ -23,6 +23,15 @@ interface Props {
|
|
|
23
23
|
/** Slot content for the field input */
|
|
24
24
|
children: Snippet;
|
|
25
25
|
}
|
|
26
|
+
/**
|
|
27
|
+
* The frame around one form field: the label, a required mark, the help text under the field, and the field itself as children.
|
|
28
|
+
*
|
|
29
|
+
* `inline` puts a switch on the label's row. `plain` is for section-style fields such as the ports list,
|
|
30
|
+
* where the label is for screen readers only. `aside` adds a short muted note on the label row.
|
|
31
|
+
*
|
|
32
|
+
* **Use it for** giving a custom field the same label and help text as the built-in ones.
|
|
33
|
+
* **Not for** choosing which control to draw from a schema (that is `FormField`, which wraps its fields in this).
|
|
34
|
+
*/
|
|
26
35
|
declare const FormFieldWrapper: import("svelte").Component<Props, {}, "">;
|
|
27
36
|
type FormFieldWrapper = ReturnType<typeof FormFieldWrapper>;
|
|
28
37
|
export default FormFieldWrapper;
|
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Features:
|
|
10
|
-
- HTML5 <details> for native accessible collapse behavior
|
|
11
|
-
- Reuses existing .flowdrop-details CSS pattern from base.css
|
|
12
|
-
- Optional description text below the group title
|
|
13
|
-
- Chevron rotation animation on open/close
|
|
2
|
+
@component
|
|
3
|
+
A titled group of fields, drawn from a `Group` in a node's UI schema. By default it folds open and closed;
|
|
4
|
+
with `collapsible: false` it is a plain fieldset with a legend.
|
|
5
|
+
|
|
6
|
+
**Use it for** splitting a long config form into sections.
|
|
7
|
+
**Not for** the tabs of the inspector (those are `NodeInspector`).
|
|
14
8
|
-->
|
|
15
9
|
|
|
16
10
|
<script lang="ts">
|
|
@@ -6,6 +6,13 @@ interface Props {
|
|
|
6
6
|
/** Slot content for the group's child elements */
|
|
7
7
|
children: Snippet;
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* A titled group of fields, drawn from a `Group` in a node's UI schema. By default it folds open and closed;
|
|
11
|
+
* with `collapsible: false` it is a plain fieldset with a legend.
|
|
12
|
+
*
|
|
13
|
+
* **Use it for** splitting a long config form into sections.
|
|
14
|
+
* **Not for** the tabs of the inspector (those are `NodeInspector`).
|
|
15
|
+
*/
|
|
9
16
|
declare const FormFieldset: import("svelte").Component<Props, {}, "">;
|
|
10
17
|
type FormFieldset = ReturnType<typeof FormFieldset>;
|
|
11
18
|
export default FormFieldset;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
CodeMirror 6
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
- Status bar with word/line/character count
|
|
11
|
-
- Consistent styling with other form components
|
|
12
|
-
- Proper ARIA attributes for accessibility
|
|
13
|
-
- Dark/light theme support
|
|
14
|
-
|
|
15
|
-
Usage:
|
|
16
|
-
Use with schema format: "markdown" to render this editor
|
|
2
|
+
@component
|
|
3
|
+
A Markdown editor built on CodeMirror 6: syntax colours, a formatting toolbar with shortcuts, a status bar with word and line
|
|
4
|
+
counts, and optional autosave to the browser.
|
|
5
|
+
|
|
6
|
+
Schema fields with `format: "markdown"` draw this. It is bundled only in `form/full` or when registered with `registerMarkdownEditorField()`.
|
|
7
|
+
|
|
8
|
+
**Use it for** longer formatted text such as a note or an instruction.
|
|
9
|
+
**Not for** one-line text (use `FormTextField`).
|
|
17
10
|
-->
|
|
18
11
|
|
|
19
12
|
<script lang="ts">
|
|
@@ -28,6 +28,15 @@ interface Props {
|
|
|
28
28
|
/** Callback when value changes */
|
|
29
29
|
onChange: (value: string) => void;
|
|
30
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* A Markdown editor built on CodeMirror 6: syntax colours, a formatting toolbar with shortcuts, a status bar with word and line
|
|
33
|
+
* counts, and optional autosave to the browser.
|
|
34
|
+
*
|
|
35
|
+
* Schema fields with `format: "markdown"` draw this. It is bundled only in `form/full` or when registered with `registerMarkdownEditorField()`.
|
|
36
|
+
*
|
|
37
|
+
* **Use it for** longer formatted text such as a note or an instruction.
|
|
38
|
+
* **Not for** one-line text (use `FormTextField`).
|
|
39
|
+
*/
|
|
31
40
|
declare const FormMarkdownEditor: import("svelte").Component<Props, {}, "">;
|
|
32
41
|
type FormMarkdownEditor = ReturnType<typeof FormMarkdownEditor>;
|
|
33
42
|
export default FormMarkdownEditor;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Min/max/step support
|
|
8
|
-
- Proper ARIA attributes for accessibility
|
|
2
|
+
@component
|
|
3
|
+
A number input with optional `min`, `max` and `step`. The value is a number, or an empty string when the box is cleared.
|
|
4
|
+
|
|
5
|
+
**Use it for** counts, limits and timeouts. The factory picks it for `type: "number"` and `"integer"`.
|
|
6
|
+
**Not for** a value the person should drag within a range (use `FormRangeField`).
|
|
9
7
|
-->
|
|
10
8
|
|
|
11
9
|
<script lang="ts">
|
|
@@ -20,6 +20,12 @@ interface Props {
|
|
|
20
20
|
/** Callback when value changes */
|
|
21
21
|
onChange: (value: number | string) => void;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* A number input with optional `min`, `max` and `step`. The value is a number, or an empty string when the box is cleared.
|
|
25
|
+
*
|
|
26
|
+
* **Use it for** counts, limits and timeouts. The factory picks it for `type: "number"` and `"integer"`.
|
|
27
|
+
* **Not for** a value the person should drag within a range (use `FormRangeField`).
|
|
28
|
+
*/
|
|
23
29
|
declare const FormNumberField: import("svelte").Component<Props, {}, "">;
|
|
24
30
|
type FormNumberField = ReturnType<typeof FormNumberField>;
|
|
25
31
|
export default FormNumberField;
|
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
not-exposed port is hidden on the canvas, not wireable, and not
|
|
16
|
-
runtime-overridable.
|
|
17
|
-
|
|
18
|
-
The stored value is materialized as the FULL ordered list on the first edit
|
|
19
|
-
(so order + exposure stay independent inside one positional array), and reset
|
|
20
|
-
to `undefined` when it lands back on the metadata default order with no
|
|
21
|
-
exposure override.
|
|
2
|
+
@component
|
|
3
|
+
The ports list of a node's inspector: one row per port with a drag grip, the lane dot, the name, the lane name,
|
|
4
|
+
an interface menu and an eye button that shows or hides the port. Rows reorder by drag or Alt+Up and Alt+Down.
|
|
5
|
+
A gateway's branches are listed too, read-only.
|
|
6
|
+
|
|
7
|
+
Order is only cosmetic. Hiding a port removes it from the canvas, so it cannot be wired or overridden at run time.
|
|
8
|
+
The stored value is the full ordered list after the first edit, and is cleared again when it returns to the default.
|
|
9
|
+
|
|
10
|
+
A port that can't be hidden (locked by the node type, wired, or on the workflow interface) keeps its "on" eye
|
|
11
|
+
with a badge; activating it shows the reason instead of changing anything.
|
|
12
|
+
|
|
13
|
+
**Use it for** the Ports tab of the inspector (schema `format: "ports"`).
|
|
14
|
+
**Not for** adding or removing ports (the node type decides which exist).
|
|
22
15
|
-->
|
|
23
16
|
|
|
24
17
|
<script lang="ts">
|
|
@@ -33,7 +26,7 @@
|
|
|
33
26
|
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
34
27
|
import { buildPortsConfig, isPortExposed, orderPortsFor } from '../../utils/portUtils.js';
|
|
35
28
|
import { buildHandleId } from '../../utils/handleIds.js';
|
|
36
|
-
import {
|
|
29
|
+
import { countPortWires, hideBlock, isExposureLocked } from '../../utils/portExposure.js';
|
|
37
30
|
import {
|
|
38
31
|
entryAtPort,
|
|
39
32
|
exposableCandidate,
|
|
@@ -58,10 +51,15 @@
|
|
|
58
51
|
import { tick } from 'svelte';
|
|
59
52
|
|
|
60
53
|
interface Props {
|
|
54
|
+
/** Field identifier */
|
|
61
55
|
id: string;
|
|
56
|
+
/** The stored ports config (a per-direction ordered list of `{ id, exposed? }`); empty means the node type's default. */
|
|
62
57
|
value: unknown;
|
|
58
|
+
/** ARIA description ID */
|
|
63
59
|
ariaDescribedBy?: string;
|
|
60
|
+
/** Whether the field is disabled (read-only) */
|
|
64
61
|
disabled?: boolean;
|
|
62
|
+
/** Callback when the order or exposure changes */
|
|
65
63
|
onChange: (value: unknown) => void;
|
|
66
64
|
/** The node being configured, source of the port list + metadata defaults. */
|
|
67
65
|
node?: WorkflowNode;
|
|
@@ -223,6 +221,27 @@
|
|
|
223
221
|
onChange(buildPortsConfig(portsConfig, direction, ordered, portsFor(direction), exposureOf));
|
|
224
222
|
}
|
|
225
223
|
|
|
224
|
+
/** Edges on each of this node's ports, counted once per edge change. */
|
|
225
|
+
const wires = $derived(
|
|
226
|
+
node && fd.workflow.current
|
|
227
|
+
? countPortWires(node, fd.workflow.current)
|
|
228
|
+
: new Map<string, number>()
|
|
229
|
+
);
|
|
230
|
+
|
|
231
|
+
/** The row whose refusal reason is open. Tied to a node, so it can't outlive it. */
|
|
232
|
+
let reasonOpen = $state<{ nodeId: string; direction: Direction; portId: string } | null>(null);
|
|
233
|
+
|
|
234
|
+
const isReasonOpen = (direction: Direction, portId: string): boolean =>
|
|
235
|
+
reasonOpen !== null &&
|
|
236
|
+
reasonOpen.nodeId === node?.id &&
|
|
237
|
+
reasonOpen.direction === direction &&
|
|
238
|
+
reasonOpen.portId === portId;
|
|
239
|
+
|
|
240
|
+
function toggleReason(direction: Direction, portId: string): void {
|
|
241
|
+
if (!node) return;
|
|
242
|
+
reasonOpen = isReasonOpen(direction, portId) ? null : { nodeId: node.id, direction, portId };
|
|
243
|
+
}
|
|
244
|
+
|
|
226
245
|
function setExposed(direction: Direction, portId: string, exposed: boolean): void {
|
|
227
246
|
commit(direction, orderedPorts(direction), (port) =>
|
|
228
247
|
port.id === portId ? exposed : isPortExposed(port, portsConfig[direction])
|
|
@@ -326,6 +345,13 @@
|
|
|
326
345
|
: undefined}
|
|
327
346
|
{@const ifaceItems = interfaceMenu(direction, port)}
|
|
328
347
|
{@const laneName = checker.getDataTypeConfig(port.dataType)?.name ?? port.dataType}
|
|
348
|
+
{@const workflow = fd.workflow.current}
|
|
349
|
+
{@const block =
|
|
350
|
+
node && workflow && (exposed || isExposureLocked(node, direction, port))
|
|
351
|
+
? hideBlock(node, workflow, direction, port, wires)
|
|
352
|
+
: null}
|
|
353
|
+
{@const reasonId = `${id}-${direction}-${port.id}-reason`}
|
|
354
|
+
{@const reasonShown = block !== null && isReasonOpen(direction, port.id)}
|
|
329
355
|
<!-- svelte-ignore a11y_no_noninteractive_tabindex, a11y_no_noninteractive_element_interactions -->
|
|
330
356
|
<li
|
|
331
357
|
class="fd-ports__item"
|
|
@@ -395,21 +421,60 @@
|
|
|
395
421
|
/>
|
|
396
422
|
{/if}
|
|
397
423
|
</span>
|
|
398
|
-
<!-- A
|
|
399
|
-
|
|
424
|
+
<!-- A port whose exposure can't change (locked by the node type,
|
|
425
|
+
wired, or on the workflow interface) shows why instead of toggling. -->
|
|
426
|
+
{#if block}
|
|
427
|
+
<IconButton
|
|
428
|
+
size="sm"
|
|
429
|
+
class="fd-ports__eye fd-ports__eye-blocked"
|
|
430
|
+
aria-expanded={reasonShown}
|
|
431
|
+
aria-describedby={reasonShown ? reasonId : undefined}
|
|
432
|
+
ariaLabel={block.kind === 'locked'
|
|
433
|
+
? messages().form.ports.locked({ port: port.name })
|
|
434
|
+
: block.kind === 'wired'
|
|
435
|
+
? messages().form.ports.wired({ port: port.name })
|
|
436
|
+
: messages().form.ports.published({ port: port.name })}
|
|
437
|
+
data-testid={`port-${block.kind}-${direction}-${port.id}`}
|
|
438
|
+
onclick={() => toggleReason(direction, port.id)}
|
|
439
|
+
onkeydown={(e) => {
|
|
440
|
+
if (e.key !== 'Escape' || !reasonShown) return;
|
|
441
|
+
e.stopPropagation();
|
|
442
|
+
reasonOpen = null;
|
|
443
|
+
}}
|
|
444
|
+
>
|
|
445
|
+
<Icon icon="heroicons:eye" />
|
|
446
|
+
<Icon
|
|
447
|
+
class="fd-ports__badge"
|
|
448
|
+
icon={block.kind === 'locked'
|
|
449
|
+
? 'heroicons:lock-closed-solid'
|
|
450
|
+
: block.kind === 'wired'
|
|
451
|
+
? 'heroicons:link-solid'
|
|
452
|
+
: 'heroicons:tag-solid'}
|
|
453
|
+
/>
|
|
454
|
+
</IconButton>
|
|
455
|
+
{#if reasonShown}
|
|
456
|
+
<span class="fd-ports__reason" id={reasonId}>
|
|
457
|
+
{block.kind === 'locked'
|
|
458
|
+
? messages().form.ports.lockedHint
|
|
459
|
+
: block.kind === 'wired'
|
|
460
|
+
? messages().form.ports.wiredHint({ n: block.count })
|
|
461
|
+
: messages().form.ports.publishedHint}
|
|
462
|
+
</span>
|
|
463
|
+
{/if}
|
|
464
|
+
{:else}
|
|
400
465
|
<IconButton
|
|
401
466
|
size="sm"
|
|
402
467
|
class="fd-ports__eye"
|
|
403
468
|
id={`${id}-${direction}-${port.id}`}
|
|
404
|
-
ariaLabel={exposed
|
|
405
|
-
|
|
469
|
+
ariaLabel={exposed
|
|
470
|
+
? messages().form.ports.hide({ port: port.name })
|
|
471
|
+
: messages().form.ports.show({ port: port.name })}
|
|
472
|
+
title={exposed ? messages().form.ports.shown : messages().form.ports.hidden}
|
|
406
473
|
{disabled}
|
|
407
474
|
onclick={() => setExposed(direction, port.id, !exposed)}
|
|
408
475
|
>
|
|
409
476
|
<Icon icon={exposed ? 'heroicons:eye' : 'heroicons:eye-slash'} />
|
|
410
477
|
</IconButton>
|
|
411
|
-
{:else}
|
|
412
|
-
<span class="fd-ports__eye-slot" aria-hidden="true"></span>
|
|
413
478
|
{/if}
|
|
414
479
|
</li>
|
|
415
480
|
{/each}
|
|
@@ -505,6 +570,47 @@
|
|
|
505
570
|
width: var(--fd-control-sm);
|
|
506
571
|
}
|
|
507
572
|
|
|
573
|
+
/* A blocked port: the "on" eye with a badge; a button that explains, not toggles. */
|
|
574
|
+
.fd-ports__item :global(.fd-ports__eye-blocked) {
|
|
575
|
+
position: relative;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
.fd-ports__item :global(.fd-ports__eye-blocked:focus-visible) {
|
|
579
|
+
outline: 2px solid var(--fd-primary);
|
|
580
|
+
outline-offset: 1px;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
.fd-ports__item :global(.fd-ports__eye-blocked svg) {
|
|
584
|
+
width: 1rem;
|
|
585
|
+
height: 1rem;
|
|
586
|
+
}
|
|
587
|
+
|
|
588
|
+
/* The badge sits on the eye's lower right, inside the cell (the eye column
|
|
589
|
+
is the panel's last, so anything past it is clipped). */
|
|
590
|
+
.fd-ports__item :global(.fd-ports__eye-blocked .fd-ports__badge) {
|
|
591
|
+
position: absolute;
|
|
592
|
+
right: 0.15rem;
|
|
593
|
+
bottom: 0.2rem;
|
|
594
|
+
width: 0.65rem;
|
|
595
|
+
height: 0.65rem;
|
|
596
|
+
padding: 1px;
|
|
597
|
+
box-sizing: content-box;
|
|
598
|
+
color: var(--fd-foreground);
|
|
599
|
+
background: var(--fd-background);
|
|
600
|
+
border-radius: var(--fd-radius-full);
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
/* Why a port can't be hidden, on its own line under the row. */
|
|
604
|
+
.fd-ports__reason {
|
|
605
|
+
grid-column: 1 / -1;
|
|
606
|
+
grid-row: 2;
|
|
607
|
+
min-width: 0;
|
|
608
|
+
padding: 0 var(--fd-space-xs) var(--fd-space-xs) 0;
|
|
609
|
+
text-align: right;
|
|
610
|
+
font-size: var(--fd-text-xs);
|
|
611
|
+
color: var(--fd-muted-foreground);
|
|
612
|
+
}
|
|
613
|
+
|
|
508
614
|
/* Room for the hint or error under the tag being typed. */
|
|
509
615
|
.fd-ports__item--naming {
|
|
510
616
|
margin-bottom: var(--fd-space-xl);
|
|
@@ -1,13 +1,32 @@
|
|
|
1
1
|
import type { WorkflowNode } from '../../types/index.js';
|
|
2
2
|
interface Props {
|
|
3
|
+
/** Field identifier */
|
|
3
4
|
id: string;
|
|
5
|
+
/** The stored ports config (a per-direction ordered list of `{ id, exposed? }`); empty means the node type's default. */
|
|
4
6
|
value: unknown;
|
|
7
|
+
/** ARIA description ID */
|
|
5
8
|
ariaDescribedBy?: string;
|
|
9
|
+
/** Whether the field is disabled (read-only) */
|
|
6
10
|
disabled?: boolean;
|
|
11
|
+
/** Callback when the order or exposure changes */
|
|
7
12
|
onChange: (value: unknown) => void;
|
|
8
13
|
/** The node being configured, source of the port list + metadata defaults. */
|
|
9
14
|
node?: WorkflowNode;
|
|
10
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* The ports list of a node's inspector: one row per port with a drag grip, the lane dot, the name, the lane name,
|
|
18
|
+
* an interface menu and an eye button that shows or hides the port. Rows reorder by drag or Alt+Up and Alt+Down.
|
|
19
|
+
* A gateway's branches are listed too, read-only.
|
|
20
|
+
*
|
|
21
|
+
* Order is only cosmetic. Hiding a port removes it from the canvas, so it cannot be wired or overridden at run time.
|
|
22
|
+
* The stored value is the full ordered list after the first edit, and is cleared again when it returns to the default.
|
|
23
|
+
*
|
|
24
|
+
* A port that can't be hidden (locked by the node type, wired, or on the workflow interface) keeps its "on" eye
|
|
25
|
+
* with a badge; activating it shows the reason instead of changing anything.
|
|
26
|
+
*
|
|
27
|
+
* **Use it for** the Ports tab of the inspector (schema `format: "ports"`).
|
|
28
|
+
* **Not for** adding or removing ports (the node type decides which exist).
|
|
29
|
+
*/
|
|
11
30
|
declare const FormPorts: import("svelte").Component<Props, {}, "">;
|
|
12
31
|
type FormPorts = ReturnType<typeof FormPorts>;
|
|
13
32
|
export default FormPorts;
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Min/max/step support for value constraints
|
|
8
|
-
- Real-time value display with tabular numeric font
|
|
9
|
-
- Proper ARIA attributes for accessibility
|
|
10
|
-
- Visual feedback for current value position
|
|
2
|
+
@component
|
|
3
|
+
A slider for a number inside a range, with the current value shown beside it. Set `min`, `max` and `step`.
|
|
4
|
+
|
|
5
|
+
**Use it for** values with a natural scale such as temperature. The factory picks it for numbers with `format: "range"`.
|
|
6
|
+
**Not for** exact entry of large numbers (use `FormNumberField`).
|
|
11
7
|
-->
|
|
12
8
|
|
|
13
9
|
<script lang="ts">
|
|
@@ -18,6 +18,12 @@ interface Props {
|
|
|
18
18
|
/** Callback when value changes */
|
|
19
19
|
onChange: (value: number) => void;
|
|
20
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* A slider for a number inside a range, with the current value shown beside it. Set `min`, `max` and `step`.
|
|
23
|
+
*
|
|
24
|
+
* **Use it for** values with a natural scale such as temperature. The factory picks it for numbers with `format: "range"`.
|
|
25
|
+
* **Not for** exact entry of large numbers (use `FormNumberField`).
|
|
26
|
+
*/
|
|
21
27
|
declare const FormRangeField: import("svelte").Component<Props, {}, "">;
|
|
22
28
|
type FormRangeField = ReturnType<typeof FormRangeField>;
|
|
23
29
|
export default FormRangeField;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Supports both string[] and FieldOption[] for options
|
|
8
|
-
- Proper ARIA attributes for accessibility
|
|
2
|
+
@component
|
|
3
|
+
A dropdown for choosing one value from a list. Options are plain strings or `{ value, label }` pairs.
|
|
4
|
+
|
|
5
|
+
**Use it for** a fixed list of choices. The factory picks it for `enum` and for `oneOf` with `const` and `title`.
|
|
6
|
+
**Not for** several choices at once (use `FormCheckboxGroup`) or choices fetched from a server (use `FormAutocomplete`).
|
|
9
7
|
-->
|
|
10
8
|
|
|
11
9
|
<script lang="ts">
|
|
@@ -15,6 +15,12 @@ interface Props {
|
|
|
15
15
|
/** Callback when value changes */
|
|
16
16
|
onChange: (value: string) => void;
|
|
17
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* A dropdown for choosing one value from a list. Options are plain strings or `{ value, label }` pairs.
|
|
20
|
+
*
|
|
21
|
+
* **Use it for** a fixed list of choices. The factory picks it for `enum` and for `oneOf` with `const` and `title`.
|
|
22
|
+
* **Not for** several choices at once (use `FormCheckboxGroup`) or choices fetched from a server (use `FormAutocomplete`).
|
|
23
|
+
*/
|
|
18
24
|
declare const FormSelect: import("svelte").Component<Props, {}, "">;
|
|
19
25
|
type FormSelect = ReturnType<typeof FormSelect>;
|
|
20
26
|
export default FormSelect;
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
- Dark/light theme support
|
|
11
|
-
- Consistent styling with other form components
|
|
12
|
-
- Line wrapping for better template readability
|
|
13
|
-
- Optional variable hints display (clickable buttons)
|
|
14
|
-
- Proper ARIA attributes for accessibility
|
|
15
|
-
|
|
16
|
-
Usage:
|
|
17
|
-
Use with schema format: "template" to render this editor
|
|
2
|
+
@component
|
|
3
|
+
An editor for text with `{{ variable }}` placeholders, built on CodeMirror 6. Placeholders are coloured, typing `{{` or `.`
|
|
4
|
+
offers the variables from connected nodes, and nested values (`user.address.city`, `items[0].name`) can be drilled into.
|
|
5
|
+
|
|
6
|
+
Schema fields with `format: "template"` draw this. It is bundled only in `form/full` or when registered on the instance.
|
|
7
|
+
|
|
8
|
+
**Use it for** prompts and messages that take values from earlier nodes.
|
|
9
|
+
**Not for** plain text with no variables (use `FormTextarea`).
|
|
18
10
|
-->
|
|
19
11
|
|
|
20
12
|
<script lang="ts">
|
|
@@ -36,6 +36,15 @@ interface Props {
|
|
|
36
36
|
/** Auth provider for API requests */
|
|
37
37
|
authProvider?: AuthProvider;
|
|
38
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* An editor for text with `{{ variable }}` placeholders, built on CodeMirror 6. Placeholders are coloured, typing `{{` or `.`
|
|
41
|
+
* offers the variables from connected nodes, and nested values (`user.address.city`, `items[0].name`) can be drilled into.
|
|
42
|
+
*
|
|
43
|
+
* Schema fields with `format: "template"` draw this. It is bundled only in `form/full` or when registered on the instance.
|
|
44
|
+
*
|
|
45
|
+
* **Use it for** prompts and messages that take values from earlier nodes.
|
|
46
|
+
* **Not for** plain text with no variables (use `FormTextarea`).
|
|
47
|
+
*/
|
|
39
48
|
declare const FormTemplateEditor: import("svelte").Component<Props, {}, "">;
|
|
40
49
|
type FormTemplateEditor = ReturnType<typeof FormTemplateEditor>;
|
|
41
50
|
export default FormTemplateEditor;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Proper ARIA attributes for accessibility
|
|
8
|
-
- Placeholder support
|
|
2
|
+
@component
|
|
3
|
+
A one-line text input for string values.
|
|
4
|
+
|
|
5
|
+
**Use it for** short text in a config form. The factory picks it for `type: "string"`.
|
|
6
|
+
**Not for** long text (use `FormTextarea`) or a fixed list of values (use `FormSelect`).
|
|
9
7
|
-->
|
|
10
8
|
|
|
11
9
|
<script lang="ts">
|
|
@@ -14,6 +14,12 @@ interface Props {
|
|
|
14
14
|
/** Callback when value changes */
|
|
15
15
|
onChange: (value: string) => void;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* A one-line text input for string values.
|
|
19
|
+
*
|
|
20
|
+
* **Use it for** short text in a config form. The factory picks it for `type: "string"`.
|
|
21
|
+
* **Not for** long text (use `FormTextarea`) or a fixed list of values (use `FormSelect`).
|
|
22
|
+
*/
|
|
17
23
|
declare const FormTextField: import("svelte").Component<Props, {}, "">;
|
|
18
24
|
type FormTextField = ReturnType<typeof FormTextField>;
|
|
19
25
|
export default FormTextField;
|