@flowdrop/flowdrop 1.5.0 → 1.7.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/README.md +46 -47
- package/dist/adapters/WorkflowAdapter.d.ts +1 -1
- package/dist/adapters/WorkflowAdapter.js +26 -26
- package/dist/adapters/agentspec/AgentSpecAdapter.d.ts +2 -2
- package/dist/adapters/agentspec/AgentSpecAdapter.js +122 -133
- package/dist/adapters/agentspec/agentAdapter.d.ts +2 -2
- package/dist/adapters/agentspec/agentAdapter.js +10 -10
- package/dist/adapters/agentspec/autoLayout.d.ts +1 -1
- package/dist/adapters/agentspec/autoLayout.js +7 -9
- package/dist/adapters/agentspec/componentTypeDefaults.d.ts +1 -1
- package/dist/adapters/agentspec/componentTypeDefaults.js +120 -120
- package/dist/adapters/agentspec/defaultNodeTypes.d.ts +2 -2
- package/dist/adapters/agentspec/defaultNodeTypes.js +307 -307
- package/dist/adapters/agentspec/index.d.ts +10 -10
- package/dist/adapters/agentspec/index.js +6 -6
- package/dist/adapters/agentspec/validator.d.ts +2 -2
- package/dist/adapters/agentspec/validator.js +20 -22
- package/dist/api/enhanced-client.d.ts +3 -3
- package/dist/api/enhanced-client.js +72 -73
- package/dist/chat/commandClassifier.js +6 -6
- package/dist/chat/index.d.ts +5 -5
- package/dist/chat/index.js +4 -4
- package/dist/chat/responseParser.d.ts +6 -6
- package/dist/chat/responseParser.js +28 -24
- package/dist/commands/batch.d.ts +1 -1
- package/dist/commands/batch.js +5 -7
- package/dist/commands/executor.d.ts +2 -2
- package/dist/commands/executor.js +320 -231
- package/dist/commands/index.d.ts +6 -6
- package/dist/commands/index.js +5 -5
- package/dist/commands/parser.d.ts +1 -1
- package/dist/commands/parser.js +91 -74
- package/dist/commands/positioner.d.ts +2 -2
- package/dist/commands/positioner.js +1 -1
- package/dist/commands/storeIntegration.svelte.d.ts +2 -2
- package/dist/commands/storeIntegration.svelte.js +5 -5
- package/dist/commands/types.d.ts +42 -42
- package/dist/commands/types.js +2 -2
- package/dist/components/App.svelte +280 -303
- package/dist/components/App.svelte.d.ts +11 -9
- package/dist/components/CanvasBanner.stories.svelte +10 -16
- package/dist/components/CanvasBanner.stories.svelte.d.ts +1 -1
- package/dist/components/CanvasBanner.svelte +2 -2
- package/dist/components/CanvasBanner.svelte.d.ts +1 -1
- package/dist/components/CanvasController.svelte +3 -4
- package/dist/components/ConfigForm.svelte +118 -256
- package/dist/components/ConfigForm.svelte.d.ts +2 -2
- package/dist/components/ConfigMappingRow.svelte +7 -9
- package/dist/components/ConfigMappingRow.svelte.d.ts +1 -1
- package/dist/components/ConfigModal.svelte +3 -3
- package/dist/components/ConfigModal.svelte.d.ts +1 -1
- package/dist/components/ConfigPanel.stories.svelte +19 -19
- package/dist/components/ConfigPanel.stories.svelte.d.ts +1 -1
- package/dist/components/ConfigPanel.svelte +9 -20
- package/dist/components/ConfigPanel.svelte.d.ts +1 -1
- package/dist/components/ConnectionLine.svelte +4 -4
- package/dist/components/EdgeRefresher.svelte +1 -1
- package/dist/components/FlowDropEdge.stories.svelte +110 -110
- package/dist/components/FlowDropEdge.svelte +9 -9
- package/dist/components/FlowDropEdge.svelte.d.ts +1 -1
- package/dist/components/FlowDropZone.svelte +6 -9
- package/dist/components/FlowDropZone.svelte.d.ts +1 -1
- package/dist/components/LoadingSpinner.stories.svelte +13 -13
- package/dist/components/LoadingSpinner.stories.svelte.d.ts +1 -1
- package/dist/components/LoadingSpinner.svelte +3 -3
- package/dist/components/LoadingSpinner.svelte.d.ts +1 -1
- package/dist/components/Logo.stories.svelte +4 -4
- package/dist/components/Logo.stories.svelte.d.ts +1 -1
- package/dist/components/Logo.svelte +3 -9
- package/dist/components/LogsSidebar.svelte +41 -48
- package/dist/components/LogsSidebar.svelte.d.ts +1 -1
- package/dist/components/MarkdownDisplay.stories.svelte +10 -14
- package/dist/components/MarkdownDisplay.stories.svelte.d.ts +1 -1
- package/dist/components/MarkdownDisplay.svelte +4 -6
- package/dist/components/Navbar.stories.svelte +19 -19
- package/dist/components/Navbar.stories.svelte.d.ts +1 -1
- package/dist/components/Navbar.svelte +28 -49
- package/dist/components/Navbar.svelte.d.ts +2 -2
- package/dist/components/NodeSidebar.svelte +42 -88
- package/dist/components/NodeSidebar.svelte.d.ts +1 -1
- package/dist/components/NodeStatusOverlay.stories.svelte +19 -31
- package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +1 -1
- package/dist/components/NodeStatusOverlay.svelte +40 -55
- package/dist/components/NodeStatusOverlay.svelte.d.ts +3 -3
- package/dist/components/NodeSwapPicker.svelte +20 -64
- package/dist/components/NodeSwapPicker.svelte.d.ts +1 -1
- package/dist/components/PipelineStatus.svelte +63 -89
- package/dist/components/PipelineStatus.svelte.d.ts +4 -4
- package/dist/components/PortCoordinateTracker.svelte +5 -7
- package/dist/components/PortCoordinateTracker.svelte.d.ts +1 -1
- package/dist/components/PortMappingRow.svelte +20 -24
- package/dist/components/PortMappingRow.svelte.d.ts +2 -2
- package/dist/components/ReadOnlyDetails.svelte +1 -1
- package/dist/components/SchemaForm.stories.svelte +53 -53
- package/dist/components/SchemaForm.stories.svelte.d.ts +1 -1
- package/dist/components/SchemaForm.svelte +24 -51
- package/dist/components/SchemaForm.svelte.d.ts +2 -2
- package/dist/components/SettingsModal.svelte +6 -9
- package/dist/components/SettingsModal.svelte.d.ts +1 -1
- package/dist/components/SettingsPanel.svelte +138 -158
- package/dist/components/SettingsPanel.svelte.d.ts +1 -1
- package/dist/components/StatusIcon.stories.svelte +16 -29
- package/dist/components/StatusIcon.stories.svelte.d.ts +1 -1
- package/dist/components/StatusIcon.svelte +19 -19
- package/dist/components/StatusIcon.svelte.d.ts +2 -2
- package/dist/components/StatusLabel.stories.svelte +8 -8
- package/dist/components/StatusLabel.stories.svelte.d.ts +1 -1
- package/dist/components/SwapMappingEditor.svelte +35 -56
- package/dist/components/SwapMappingEditor.svelte.d.ts +2 -2
- package/dist/components/ThemeToggle.stories.svelte +10 -10
- package/dist/components/ThemeToggle.stories.svelte.d.ts +1 -1
- package/dist/components/ThemeToggle.svelte +22 -33
- package/dist/components/ThemeToggle.svelte.d.ts +1 -1
- package/dist/components/UniversalNode.svelte +29 -41
- package/dist/components/UniversalNode.svelte.d.ts +3 -3
- package/dist/components/WorkflowEditor.svelte +113 -168
- package/dist/components/WorkflowEditor.svelte.d.ts +4 -4
- package/dist/components/chat/AIChatPanel.svelte +272 -133
- package/dist/components/chat/AIChatPanel.svelte.d.ts +3 -3
- package/dist/components/chat/CommandPreview.svelte +74 -24
- package/dist/components/chat/CommandPreview.svelte.d.ts +1 -1
- package/dist/components/console/CommandConsole.stories.svelte +71 -53
- package/dist/components/console/CommandConsole.stories.svelte.d.ts +1 -1
- package/dist/components/console/CommandConsole.svelte +39 -35
- package/dist/components/console/CommandConsole.svelte.d.ts +2 -2
- package/dist/components/console/ConsoleAutocomplete.svelte +6 -3
- package/dist/components/console/ConsoleInput.svelte +148 -89
- package/dist/components/console/ConsoleInput.svelte.d.ts +1 -1
- package/dist/components/console/ConsoleOutput.svelte +5 -10
- package/dist/components/console/ConsoleOutput.svelte.d.ts +1 -1
- package/dist/components/console/formatters.d.ts +1 -1
- package/dist/components/console/formatters.js +27 -29
- package/dist/components/form/FormArray.svelte +75 -132
- package/dist/components/form/FormArray.svelte.d.ts +1 -1
- package/dist/components/form/FormAutocomplete.svelte +65 -108
- package/dist/components/form/FormAutocomplete.svelte.d.ts +1 -1
- package/dist/components/form/FormCheckboxGroup.stories.svelte +13 -16
- package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormCheckboxGroup.svelte +2 -2
- package/dist/components/form/FormCodeEditor.svelte +46 -59
- package/dist/components/form/FormField.svelte +79 -90
- package/dist/components/form/FormField.svelte.d.ts +2 -2
- package/dist/components/form/FormFieldLight.svelte +72 -88
- package/dist/components/form/FormFieldLight.svelte.d.ts +1 -1
- package/dist/components/form/FormFieldWrapper.stories.svelte +14 -14
- package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormFieldWrapper.svelte +2 -9
- package/dist/components/form/FormFieldWrapper.svelte.d.ts +1 -1
- package/dist/components/form/FormFieldset.svelte +3 -3
- package/dist/components/form/FormFieldset.svelte.d.ts +2 -2
- package/dist/components/form/FormMarkdownEditor.svelte +123 -156
- package/dist/components/form/FormNumberField.stories.svelte +18 -18
- package/dist/components/form/FormNumberField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormNumberField.svelte +6 -6
- package/dist/components/form/FormRangeField.stories.svelte +13 -13
- package/dist/components/form/FormRangeField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormRangeField.svelte +4 -12
- package/dist/components/form/FormSelect.stories.svelte +21 -21
- package/dist/components/form/FormSelect.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormSelect.svelte +5 -5
- package/dist/components/form/FormSelect.svelte.d.ts +1 -1
- package/dist/components/form/FormTemplateEditor.svelte +126 -175
- package/dist/components/form/FormTemplateEditor.svelte.d.ts +1 -1
- package/dist/components/form/FormTextField.stories.svelte +17 -23
- package/dist/components/form/FormTextField.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormTextField.svelte +4 -4
- package/dist/components/form/FormTextarea.stories.svelte +18 -21
- package/dist/components/form/FormTextarea.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormTextarea.svelte +4 -4
- package/dist/components/form/FormToggle.stories.svelte +13 -16
- package/dist/components/form/FormToggle.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormToggle.svelte +3 -3
- package/dist/components/form/FormUISchemaRenderer.svelte +12 -19
- package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +3 -3
- package/dist/components/form/index.d.ts +19 -19
- package/dist/components/form/index.js +18 -18
- package/dist/components/form/templateAutocomplete.d.ts +2 -2
- package/dist/components/form/templateAutocomplete.js +55 -64
- package/dist/components/form/types.d.ts +6 -6
- package/dist/components/form/types.js +4 -9
- package/dist/components/icons/AlertCircleIcon.svelte +1 -6
- package/dist/components/icons/CogIcon.svelte +1 -6
- package/dist/components/interrupt/ChoicePrompt.stories.svelte +27 -27
- package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ChoicePrompt.svelte +17 -41
- package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +17 -17
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ConfirmationPrompt.svelte +10 -16
- package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/FormPrompt.svelte +10 -15
- package/dist/components/interrupt/FormPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/InterruptBubble.svelte +87 -121
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +2 -2
- package/dist/components/interrupt/ReviewPrompt.stories.svelte +37 -37
- package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/ReviewPrompt.svelte +55 -75
- package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/TextInputPrompt.stories.svelte +16 -17
- package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +1 -1
- package/dist/components/interrupt/TextInputPrompt.svelte +13 -18
- package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +1 -1
- package/dist/components/interrupt/index.d.ts +6 -6
- package/dist/components/interrupt/index.js +6 -6
- package/dist/components/layouts/MainLayout.svelte +46 -84
- package/dist/components/layouts/MainLayout.svelte.d.ts +6 -6
- package/dist/components/nodes/GatewayNode.stories.svelte +64 -65
- package/dist/components/nodes/GatewayNode.svelte +37 -70
- package/dist/components/nodes/GatewayNode.svelte.d.ts +3 -3
- package/dist/components/nodes/IdeaNode.stories.svelte +25 -26
- package/dist/components/nodes/IdeaNode.svelte +22 -36
- package/dist/components/nodes/IdeaNode.svelte.d.ts +1 -1
- package/dist/components/nodes/NotesNode.stories.svelte +37 -38
- package/dist/components/nodes/NotesNode.svelte +28 -39
- package/dist/components/nodes/NotesNode.svelte.d.ts +1 -1
- package/dist/components/nodes/SimpleNode.stories.svelte +137 -138
- package/dist/components/nodes/SimpleNode.svelte +51 -81
- package/dist/components/nodes/SimpleNode.svelte.d.ts +1 -1
- package/dist/components/nodes/SquareNode.stories.svelte +75 -75
- package/dist/components/nodes/SquareNode.svelte +42 -68
- package/dist/components/nodes/SquareNode.svelte.d.ts +1 -1
- package/dist/components/nodes/TerminalNode.stories.svelte +10 -10
- package/dist/components/nodes/TerminalNode.svelte +74 -112
- package/dist/components/nodes/TerminalNode.svelte.d.ts +1 -1
- package/dist/components/nodes/ToolNode.stories.svelte +115 -116
- package/dist/components/nodes/ToolNode.svelte +31 -64
- package/dist/components/nodes/ToolNode.svelte.d.ts +1 -1
- package/dist/components/nodes/WorkflowNode.stories.svelte +84 -89
- package/dist/components/nodes/WorkflowNode.svelte +50 -103
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +3 -3
- package/dist/components/playground/ChatPanel.svelte +47 -103
- package/dist/components/playground/ExecutionLogs.svelte +45 -68
- package/dist/components/playground/InputCollector.svelte +32 -51
- package/dist/components/playground/MessageBubble.stories.svelte +25 -25
- package/dist/components/playground/MessageBubble.stories.svelte.d.ts +1 -1
- package/dist/components/playground/MessageBubble.svelte +54 -70
- package/dist/components/playground/MessageBubble.svelte.d.ts +1 -1
- package/dist/components/playground/Playground.svelte +60 -91
- package/dist/components/playground/Playground.svelte.d.ts +3 -3
- package/dist/components/playground/PlaygroundModal.svelte +8 -12
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +3 -3
- package/dist/components/playground/SessionManager.svelte +34 -40
- package/dist/components/playground/SessionManager.svelte.d.ts +1 -1
- package/dist/config/agentSpecEndpoints.d.ts +1 -1
- package/dist/config/agentSpecEndpoints.js +20 -20
- package/dist/config/constants.js +2 -2
- package/dist/config/defaultCategories.d.ts +1 -1
- package/dist/config/defaultCategories.js +86 -86
- package/dist/config/defaultPortConfig.d.ts +1 -1
- package/dist/config/defaultPortConfig.js +144 -144
- package/dist/config/endpoints.d.ts +4 -4
- package/dist/config/endpoints.js +68 -68
- package/dist/config/runtimeConfig.d.ts +2 -2
- package/dist/config/runtimeConfig.js +8 -8
- package/dist/core/index.d.ts +68 -68
- package/dist/core/index.js +38 -38
- package/dist/display/index.d.ts +2 -2
- package/dist/display/index.js +2 -2
- package/dist/editor/index.d.ts +64 -64
- package/dist/editor/index.js +54 -54
- package/dist/form/code.d.ts +5 -5
- package/dist/form/code.js +14 -14
- package/dist/form/fieldRegistry.d.ts +3 -3
- package/dist/form/fieldRegistry.js +9 -11
- package/dist/form/full.d.ts +8 -8
- package/dist/form/full.js +9 -9
- package/dist/form/index.d.ts +18 -18
- package/dist/form/index.js +16 -16
- package/dist/form/markdown.d.ts +4 -4
- package/dist/form/markdown.js +8 -8
- package/dist/helpers/proximityConnect.d.ts +3 -3
- package/dist/helpers/proximityConnect.js +32 -34
- package/dist/helpers/workflowEditorHelper.d.ts +6 -6
- package/dist/helpers/workflowEditorHelper.js +64 -68
- package/dist/index.d.ts +6 -6
- package/dist/index.js +6 -6
- package/dist/mocks/app-environment.js +2 -2
- package/dist/mocks/app-forms.js +1 -1
- package/dist/mocks/app-navigation.js +2 -2
- package/dist/mocks/app-stores.js +3 -3
- package/dist/playground/index.d.ts +19 -19
- package/dist/playground/index.js +16 -16
- package/dist/playground/mount.d.ts +3 -3
- package/dist/playground/mount.js +24 -24
- package/dist/registry/builtinFormats.js +13 -13
- package/dist/registry/builtinNodes.d.ts +2 -2
- package/dist/registry/builtinNodes.js +77 -77
- package/dist/registry/index.d.ts +4 -4
- package/dist/registry/index.js +4 -4
- package/dist/registry/nodeComponentRegistry.d.ts +8 -8
- package/dist/registry/nodeComponentRegistry.js +9 -11
- package/dist/registry/plugin.d.ts +2 -2
- package/dist/registry/plugin.js +11 -11
- package/dist/registry/workflowFormatRegistry.d.ts +3 -3
- package/dist/registry/workflowFormatRegistry.js +2 -2
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.js +2 -2
- package/dist/schemas/v1/workflow.schema.json +5 -0
- package/dist/services/agentSpecExecutionService.d.ts +3 -3
- package/dist/services/agentSpecExecutionService.js +55 -56
- package/dist/services/api.d.ts +2 -2
- package/dist/services/api.js +37 -37
- package/dist/services/apiVariableService.d.ts +1 -1
- package/dist/services/apiVariableService.js +34 -41
- package/dist/services/autoSaveService.js +8 -8
- package/dist/services/categoriesApi.d.ts +2 -2
- package/dist/services/categoriesApi.js +8 -8
- package/dist/services/chatService.d.ts +1 -1
- package/dist/services/chatService.js +18 -18
- package/dist/services/draftStorage.d.ts +1 -1
- package/dist/services/draftStorage.js +11 -11
- package/dist/services/dynamicSchemaService.d.ts +1 -1
- package/dist/services/dynamicSchemaService.js +39 -41
- package/dist/services/globalSave.d.ts +2 -2
- package/dist/services/globalSave.js +38 -41
- package/dist/services/historyService.d.ts +1 -1
- package/dist/services/historyService.js +10 -10
- package/dist/services/interruptService.d.ts +1 -1
- package/dist/services/interruptService.js +29 -35
- package/dist/services/nodeExecutionService.d.ts +1 -1
- package/dist/services/nodeExecutionService.js +44 -45
- package/dist/services/playgroundService.d.ts +1 -1
- package/dist/services/playgroundService.js +29 -29
- package/dist/services/portConfigApi.d.ts +2 -2
- package/dist/services/portConfigApi.js +8 -8
- package/dist/services/settingsService.d.ts +2 -2
- package/dist/services/settingsService.js +19 -25
- package/dist/services/toastService.d.ts +4 -4
- package/dist/services/toastService.js +33 -33
- package/dist/services/variableService.d.ts +1 -1
- package/dist/services/variableService.js +36 -36
- package/dist/services/workflowStorage.d.ts +2 -2
- package/dist/services/workflowStorage.js +13 -13
- package/dist/settings/index.d.ts +7 -7
- package/dist/settings/index.js +6 -6
- package/dist/skins/default.d.ts +1 -1
- package/dist/skins/default.js +1 -1
- package/dist/skins/index.d.ts +3 -3
- package/dist/skins/index.js +7 -7
- package/dist/skins/slate.d.ts +1 -1
- package/dist/skins/slate.js +69 -69
- package/dist/stores/categoriesStore.svelte.d.ts +1 -1
- package/dist/stores/categoriesStore.svelte.js +5 -5
- package/dist/stores/editorStateMachine.svelte.d.ts +2 -2
- package/dist/stores/editorStateMachine.svelte.js +34 -34
- package/dist/stores/historyStore.svelte.d.ts +4 -4
- package/dist/stores/historyStore.svelte.js +4 -4
- package/dist/stores/interruptStore.svelte.d.ts +3 -3
- package/dist/stores/interruptStore.svelte.js +21 -21
- package/dist/stores/playgroundStore.svelte.d.ts +2 -2
- package/dist/stores/playgroundStore.svelte.js +18 -21
- package/dist/stores/portCoordinateStore.svelte.d.ts +2 -2
- package/dist/stores/portCoordinateStore.svelte.js +10 -13
- package/dist/stores/settingsStore.svelte.d.ts +2 -2
- package/dist/stores/settingsStore.svelte.js +57 -62
- package/dist/stores/workflowStore.svelte.d.ts +4 -3
- package/dist/stores/workflowStore.svelte.js +47 -47
- package/dist/stories/CanvasDecorator.svelte +7 -10
- package/dist/stories/CanvasDecorator.svelte.d.ts +2 -2
- package/dist/stories/EdgeDecorator.svelte +28 -31
- package/dist/stories/EdgeDecorator.svelte.d.ts +1 -1
- package/dist/stories/NodeDecorator.svelte +14 -20
- package/dist/stories/NodeDecorator.svelte.d.ts +1 -1
- package/dist/stories/utils.d.ts +2 -2
- package/dist/stories/utils.js +89 -93
- package/dist/styles/base.css +16 -50
- package/dist/styles/tokens.css +10 -28
- package/dist/svelte-app.d.ts +10 -10
- package/dist/svelte-app.js +39 -39
- package/dist/themes/default.d.ts +1 -1
- package/dist/themes/default.js +4 -4
- package/dist/themes/index.d.ts +3 -3
- package/dist/themes/index.js +11 -11
- package/dist/themes/minimal.d.ts +1 -1
- package/dist/themes/minimal.js +5 -5
- package/dist/types/agentspec.d.ts +18 -18
- package/dist/types/agentspec.js +2 -2
- package/dist/types/auth.d.ts +1 -1
- package/dist/types/auth.js +6 -6
- package/dist/types/chat.d.ts +2 -2
- package/dist/types/config.d.ts +6 -6
- package/dist/types/events.d.ts +3 -3
- package/dist/types/events.js +2 -2
- package/dist/types/index.d.ts +34 -32
- package/dist/types/index.js +6 -6
- package/dist/types/interrupt.d.ts +6 -6
- package/dist/types/interrupt.js +21 -21
- package/dist/types/interruptState.d.ts +12 -12
- package/dist/types/interruptState.js +66 -66
- package/dist/types/playground.d.ts +7 -7
- package/dist/types/playground.js +14 -14
- package/dist/types/settings.d.ts +7 -5
- package/dist/types/settings.js +19 -24
- package/dist/types/skin.d.ts +1 -1
- package/dist/types/theme.d.ts +2 -2
- package/dist/types/uischema.d.ts +4 -4
- package/dist/types/uischema.js +3 -3
- package/dist/utils/colors.d.ts +1 -1
- package/dist/utils/colors.js +95 -97
- package/dist/utils/config.d.ts +2 -2
- package/dist/utils/config.js +48 -48
- package/dist/utils/connections.d.ts +6 -2
- package/dist/utils/connections.js +21 -15
- package/dist/utils/edgeStyling.d.ts +2 -2
- package/dist/utils/edgeStyling.js +36 -39
- package/dist/utils/errors.js +3 -3
- package/dist/utils/fetchWithAuth.d.ts +1 -1
- package/dist/utils/fetchWithAuth.js +2 -2
- package/dist/utils/handleIds.d.ts +2 -2
- package/dist/utils/handleIds.js +8 -8
- package/dist/utils/handlePositioning.d.ts +1 -1
- package/dist/utils/handlePositioning.js +2 -2
- package/dist/utils/icons.d.ts +1 -1
- package/dist/utils/icons.js +74 -74
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils/logger.js +7 -7
- package/dist/utils/nodeIds.d.ts +1 -1
- package/dist/utils/nodeIds.js +1 -1
- package/dist/utils/nodeStatus.d.ts +1 -1
- package/dist/utils/nodeStatus.js +48 -48
- package/dist/utils/nodeSwap.d.ts +9 -9
- package/dist/utils/nodeSwap.js +52 -58
- package/dist/utils/nodeTypes.d.ts +1 -1
- package/dist/utils/nodeTypes.js +20 -21
- package/dist/utils/nodeWrapper.d.ts +7 -7
- package/dist/utils/nodeWrapper.js +19 -21
- package/dist/utils/performanceUtils.d.ts +1 -1
- package/dist/utils/performanceUtils.js +1 -2
- package/dist/utils/portUtils.d.ts +2 -2
- package/dist/utils/portUtils.js +1 -1
- package/dist/utils/sanitize.js +1 -1
- package/dist/utils/uischema.d.ts +2 -2
- package/dist/utils/uischema.js +8 -8
- package/dist/utils/validation.js +8 -8
- package/package.json +7 -11
|
@@ -15,25 +15,22 @@
|
|
|
15
15
|
-->
|
|
16
16
|
|
|
17
17
|
<script lang="ts">
|
|
18
|
-
import { onMount, onDestroy } from
|
|
18
|
+
import { onMount, onDestroy } from 'svelte';
|
|
19
19
|
import {
|
|
20
20
|
EditorView,
|
|
21
21
|
lineNumbers,
|
|
22
22
|
highlightActiveLineGutter,
|
|
23
|
-
drawSelection
|
|
24
|
-
} from
|
|
25
|
-
import { EditorState } from
|
|
26
|
-
import { history, historyKeymap } from
|
|
27
|
-
import { highlightSpecialChars, highlightActiveLine } from
|
|
28
|
-
import {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
} from
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import { json, jsonParseLinter } from "@codemirror/lang-json";
|
|
35
|
-
import { oneDark } from "@codemirror/theme-one-dark";
|
|
36
|
-
import { linter } from "@codemirror/lint";
|
|
23
|
+
drawSelection
|
|
24
|
+
} from '@codemirror/view';
|
|
25
|
+
import { EditorState } from '@codemirror/state';
|
|
26
|
+
import { history, historyKeymap } from '@codemirror/commands';
|
|
27
|
+
import { highlightSpecialChars, highlightActiveLine } from '@codemirror/view';
|
|
28
|
+
import { syntaxHighlighting, defaultHighlightStyle } from '@codemirror/language';
|
|
29
|
+
import { keymap } from '@codemirror/view';
|
|
30
|
+
import { defaultKeymap, indentWithTab } from '@codemirror/commands';
|
|
31
|
+
import { json, jsonParseLinter } from '@codemirror/lang-json';
|
|
32
|
+
import { oneDark } from '@codemirror/theme-one-dark';
|
|
33
|
+
import { linter } from '@codemirror/lint';
|
|
37
34
|
|
|
38
35
|
interface Props {
|
|
39
36
|
/** Field identifier */
|
|
@@ -60,15 +57,15 @@
|
|
|
60
57
|
|
|
61
58
|
let {
|
|
62
59
|
id,
|
|
63
|
-
value =
|
|
64
|
-
placeholder =
|
|
60
|
+
value = '',
|
|
61
|
+
placeholder = '{}',
|
|
65
62
|
required = false,
|
|
66
63
|
darkTheme = false,
|
|
67
|
-
height =
|
|
64
|
+
height = '200px',
|
|
68
65
|
autoFormat = true,
|
|
69
66
|
disabled = false,
|
|
70
67
|
ariaDescribedBy,
|
|
71
|
-
onChange
|
|
68
|
+
onChange
|
|
72
69
|
}: Props = $props();
|
|
73
70
|
|
|
74
71
|
/** Reference to the container element */
|
|
@@ -91,16 +88,17 @@
|
|
|
91
88
|
*/
|
|
92
89
|
function valueToString(val: unknown): string {
|
|
93
90
|
if (val === undefined || val === null) {
|
|
94
|
-
return
|
|
91
|
+
return '';
|
|
95
92
|
}
|
|
96
|
-
if (typeof val ===
|
|
97
|
-
//
|
|
93
|
+
if (typeof val === 'string') {
|
|
94
|
+
// If the string is already a valid JSON representation (e.g. '{"a":1}' or '"foo"'),
|
|
95
|
+
// use it as-is to avoid double-encoding
|
|
98
96
|
try {
|
|
99
97
|
JSON.parse(val);
|
|
100
98
|
return val;
|
|
101
99
|
} catch {
|
|
102
|
-
//
|
|
103
|
-
return val;
|
|
100
|
+
// Plain JS string value — serialize it as a JSON string literal (adds quotes)
|
|
101
|
+
return JSON.stringify(val);
|
|
104
102
|
}
|
|
105
103
|
}
|
|
106
104
|
// Convert object to formatted JSON string
|
|
@@ -123,7 +121,7 @@
|
|
|
123
121
|
const parsed = JSON.parse(content);
|
|
124
122
|
return { valid: true, value: parsed };
|
|
125
123
|
} catch (e) {
|
|
126
|
-
const error = e instanceof Error ? e.message :
|
|
124
|
+
const error = e instanceof Error ? e.message : 'Invalid JSON';
|
|
127
125
|
return { valid: false, error };
|
|
128
126
|
}
|
|
129
127
|
}
|
|
@@ -131,10 +129,7 @@
|
|
|
131
129
|
/**
|
|
132
130
|
* Handle editor content changes
|
|
133
131
|
*/
|
|
134
|
-
function handleUpdate(update: {
|
|
135
|
-
docChanged: boolean;
|
|
136
|
-
state: EditorState;
|
|
137
|
-
}): void {
|
|
132
|
+
function handleUpdate(update: { docChanged: boolean; state: EditorState }): void {
|
|
138
133
|
if (!update.docChanged || isInternalUpdate) {
|
|
139
134
|
return;
|
|
140
135
|
}
|
|
@@ -173,8 +168,8 @@
|
|
|
173
168
|
changes: {
|
|
174
169
|
from: 0,
|
|
175
170
|
to: editorView.state.doc.length,
|
|
176
|
-
insert: formatted
|
|
177
|
-
}
|
|
171
|
+
insert: formatted
|
|
172
|
+
}
|
|
178
173
|
});
|
|
179
174
|
isInternalUpdate = false;
|
|
180
175
|
}
|
|
@@ -198,20 +193,13 @@
|
|
|
198
193
|
// Editing features (skip when read-only)
|
|
199
194
|
...(disabled
|
|
200
195
|
? []
|
|
201
|
-
: [
|
|
202
|
-
history(),
|
|
203
|
-
keymap.of([...defaultKeymap, ...historyKeymap, indentWithTab]),
|
|
204
|
-
]),
|
|
196
|
+
: [history(), keymap.of([...defaultKeymap, ...historyKeymap, indentWithTab])]),
|
|
205
197
|
|
|
206
198
|
// Read-only: prevent document changes and mark content as non-editable
|
|
207
|
-
...(disabled
|
|
208
|
-
? [EditorState.readOnly.of(true), EditorView.editable.of(false)]
|
|
209
|
-
: []),
|
|
199
|
+
...(disabled ? [EditorState.readOnly.of(true), EditorView.editable.of(false)] : []),
|
|
210
200
|
|
|
211
201
|
// Syntax highlighting - use default for light mode, oneDark handles dark mode
|
|
212
|
-
...(darkTheme
|
|
213
|
-
? [oneDark]
|
|
214
|
-
: [syntaxHighlighting(defaultHighlightStyle, { fallback: true })]),
|
|
202
|
+
...(darkTheme ? [oneDark] : [syntaxHighlighting(defaultHighlightStyle, { fallback: true })]),
|
|
215
203
|
|
|
216
204
|
// JSON-specific features
|
|
217
205
|
json(),
|
|
@@ -222,23 +210,22 @@
|
|
|
222
210
|
|
|
223
211
|
// Custom theme
|
|
224
212
|
EditorView.theme({
|
|
225
|
-
|
|
213
|
+
'&': {
|
|
226
214
|
height: height,
|
|
227
|
-
fontSize:
|
|
228
|
-
fontFamily:
|
|
229
|
-
"'JetBrains Mono', 'Fira Code', 'Monaco', 'Menlo', monospace",
|
|
215
|
+
fontSize: '0.8125rem',
|
|
216
|
+
fontFamily: "'JetBrains Mono', 'Fira Code', 'Monaco', 'Menlo', monospace"
|
|
230
217
|
},
|
|
231
|
-
|
|
232
|
-
overflow:
|
|
218
|
+
'.cm-scroller': {
|
|
219
|
+
overflow: 'auto'
|
|
233
220
|
},
|
|
234
|
-
|
|
235
|
-
minHeight:
|
|
236
|
-
},
|
|
237
|
-
"&.cm-focused": {
|
|
238
|
-
outline: "none",
|
|
221
|
+
'.cm-content': {
|
|
222
|
+
minHeight: '100px'
|
|
239
223
|
},
|
|
224
|
+
'&.cm-focused': {
|
|
225
|
+
outline: 'none'
|
|
226
|
+
}
|
|
240
227
|
}),
|
|
241
|
-
EditorView.lineWrapping
|
|
228
|
+
EditorView.lineWrapping
|
|
242
229
|
];
|
|
243
230
|
|
|
244
231
|
return extensions;
|
|
@@ -257,9 +244,9 @@
|
|
|
257
244
|
editorView = new EditorView({
|
|
258
245
|
state: EditorState.create({
|
|
259
246
|
doc: initialContent,
|
|
260
|
-
extensions: createExtensions()
|
|
247
|
+
extensions: createExtensions()
|
|
261
248
|
}),
|
|
262
|
-
parent: containerRef
|
|
249
|
+
parent: containerRef
|
|
263
250
|
});
|
|
264
251
|
|
|
265
252
|
// Validate initial content
|
|
@@ -305,8 +292,8 @@
|
|
|
305
292
|
changes: {
|
|
306
293
|
from: 0,
|
|
307
294
|
to: editorView.state.doc.length,
|
|
308
|
-
insert: newContent
|
|
309
|
-
}
|
|
295
|
+
insert: newContent
|
|
296
|
+
}
|
|
310
297
|
});
|
|
311
298
|
isInternalUpdate = false;
|
|
312
299
|
|
|
@@ -323,7 +310,7 @@
|
|
|
323
310
|
type="hidden"
|
|
324
311
|
{id}
|
|
325
312
|
name={id}
|
|
326
|
-
value={typeof value ===
|
|
313
|
+
value={typeof value === 'string' ? value : JSON.stringify(value)}
|
|
327
314
|
aria-describedby={ariaDescribedBy}
|
|
328
315
|
aria-required={required}
|
|
329
316
|
/>
|
|
@@ -469,7 +456,7 @@
|
|
|
469
456
|
padding: 0.125rem 0.375rem;
|
|
470
457
|
background-color: var(--fd-subtle);
|
|
471
458
|
border-radius: var(--fd-radius-sm);
|
|
472
|
-
font-family:
|
|
459
|
+
font-family: 'JetBrains Mono', 'Fira Code', 'Monaco', 'Menlo', monospace;
|
|
473
460
|
font-size: 0.6875rem;
|
|
474
461
|
font-style: normal;
|
|
475
462
|
}
|
|
@@ -28,27 +28,23 @@
|
|
|
28
28
|
-->
|
|
29
29
|
|
|
30
30
|
<script lang="ts">
|
|
31
|
-
import FormFieldWrapper from
|
|
32
|
-
import FormTextField from
|
|
33
|
-
import FormTextarea from
|
|
34
|
-
import FormNumberField from
|
|
35
|
-
import FormRangeField from
|
|
36
|
-
import FormToggle from
|
|
37
|
-
import FormSelect from
|
|
38
|
-
import FormCheckboxGroup from
|
|
39
|
-
import FormArray from
|
|
40
|
-
import FormCodeEditor from
|
|
41
|
-
import FormMarkdownEditor from
|
|
42
|
-
import FormTemplateEditor from
|
|
43
|
-
import FormAutocomplete from
|
|
44
|
-
import type { FieldSchema } from
|
|
45
|
-
import { getSchemaOptions } from
|
|
46
|
-
import type {
|
|
47
|
-
|
|
48
|
-
WorkflowEdge,
|
|
49
|
-
AuthProvider,
|
|
50
|
-
} from "../../types/index.js";
|
|
51
|
-
import { getResolvedTheme } from "../../stores/settingsStore.svelte.js";
|
|
31
|
+
import FormFieldWrapper from './FormFieldWrapper.svelte';
|
|
32
|
+
import FormTextField from './FormTextField.svelte';
|
|
33
|
+
import FormTextarea from './FormTextarea.svelte';
|
|
34
|
+
import FormNumberField from './FormNumberField.svelte';
|
|
35
|
+
import FormRangeField from './FormRangeField.svelte';
|
|
36
|
+
import FormToggle from './FormToggle.svelte';
|
|
37
|
+
import FormSelect from './FormSelect.svelte';
|
|
38
|
+
import FormCheckboxGroup from './FormCheckboxGroup.svelte';
|
|
39
|
+
import FormArray from './FormArray.svelte';
|
|
40
|
+
import FormCodeEditor from './FormCodeEditor.svelte';
|
|
41
|
+
import FormMarkdownEditor from './FormMarkdownEditor.svelte';
|
|
42
|
+
import FormTemplateEditor from './FormTemplateEditor.svelte';
|
|
43
|
+
import FormAutocomplete from './FormAutocomplete.svelte';
|
|
44
|
+
import type { FieldSchema } from './types.js';
|
|
45
|
+
import { getSchemaOptions } from './types.js';
|
|
46
|
+
import type { WorkflowNode, WorkflowEdge, AuthProvider } from '../../types/index.js';
|
|
47
|
+
import { getResolvedTheme } from '../../stores/settingsStore.svelte.js';
|
|
52
48
|
|
|
53
49
|
interface Props {
|
|
54
50
|
/** Unique key/id for the field */
|
|
@@ -86,7 +82,7 @@
|
|
|
86
82
|
nodes,
|
|
87
83
|
edges,
|
|
88
84
|
workflowId,
|
|
89
|
-
authProvider
|
|
85
|
+
authProvider
|
|
90
86
|
}: Props = $props();
|
|
91
87
|
|
|
92
88
|
/**
|
|
@@ -98,7 +94,7 @@
|
|
|
98
94
|
* Computed description ID for ARIA association
|
|
99
95
|
*/
|
|
100
96
|
const descriptionId = $derived(
|
|
101
|
-
schema.description && schema.title ? `${fieldKey}-description` : undefined
|
|
97
|
+
schema.description && schema.title ? `${fieldKey}-description` : undefined
|
|
102
98
|
);
|
|
103
99
|
|
|
104
100
|
/**
|
|
@@ -109,95 +105,90 @@
|
|
|
109
105
|
/**
|
|
110
106
|
* Field label - prefer title, fall back to description, then key
|
|
111
107
|
*/
|
|
112
|
-
const fieldLabel = $derived(
|
|
113
|
-
String(schema.title ?? schema.description ?? fieldKey),
|
|
114
|
-
);
|
|
108
|
+
const fieldLabel = $derived(String(schema.title ?? schema.description ?? fieldKey));
|
|
115
109
|
|
|
116
110
|
/**
|
|
117
111
|
* Determine the field type to render
|
|
118
112
|
*/
|
|
119
113
|
const fieldType = $derived.by(() => {
|
|
120
114
|
// Hidden fields should not be rendered
|
|
121
|
-
if (schema.format ===
|
|
122
|
-
return
|
|
115
|
+
if (schema.format === 'hidden') {
|
|
116
|
+
return 'hidden';
|
|
123
117
|
}
|
|
124
118
|
|
|
125
119
|
// Autocomplete field for format: "autocomplete" with autocomplete.url
|
|
126
|
-
if (schema.format ===
|
|
127
|
-
return
|
|
120
|
+
if (schema.format === 'autocomplete' && schema.autocomplete?.url) {
|
|
121
|
+
return 'autocomplete';
|
|
128
122
|
}
|
|
129
123
|
|
|
130
124
|
// JSON/code editor for format: "json" or "code"
|
|
131
|
-
if (schema.format ===
|
|
132
|
-
return
|
|
125
|
+
if (schema.format === 'json' || schema.format === 'code') {
|
|
126
|
+
return 'code-editor';
|
|
133
127
|
}
|
|
134
128
|
|
|
135
129
|
// Markdown editor for format: "markdown"
|
|
136
|
-
if (schema.format ===
|
|
137
|
-
return
|
|
130
|
+
if (schema.format === 'markdown') {
|
|
131
|
+
return 'markdown-editor';
|
|
138
132
|
}
|
|
139
133
|
|
|
140
134
|
// Template editor for format: "template" (Twig/Liquid syntax)
|
|
141
|
-
if (schema.format ===
|
|
142
|
-
return
|
|
135
|
+
if (schema.format === 'template') {
|
|
136
|
+
return 'template-editor';
|
|
143
137
|
}
|
|
144
138
|
|
|
145
139
|
// Enum with multiple selection -> checkbox group
|
|
146
140
|
if (schema.enum && schema.multiple) {
|
|
147
|
-
return
|
|
141
|
+
return 'checkbox-group';
|
|
148
142
|
}
|
|
149
143
|
|
|
150
144
|
// Enum with single selection -> select
|
|
151
145
|
if (schema.enum) {
|
|
152
|
-
return
|
|
146
|
+
return 'select-enum';
|
|
153
147
|
}
|
|
154
148
|
|
|
155
149
|
// oneOf with labeled options (standard JSON Schema) -> select
|
|
156
150
|
// Must be checked before basic type checks since oneOf schemas often have type: 'string'
|
|
157
151
|
if (schema.oneOf && schema.oneOf.length > 0) {
|
|
158
|
-
return
|
|
152
|
+
return 'select-options';
|
|
159
153
|
}
|
|
160
154
|
|
|
161
155
|
// Multiline string -> textarea
|
|
162
|
-
if (schema.type ===
|
|
163
|
-
return
|
|
156
|
+
if (schema.type === 'string' && schema.format === 'multiline') {
|
|
157
|
+
return 'textarea';
|
|
164
158
|
}
|
|
165
159
|
|
|
166
160
|
// Range slider for number/integer with format: "range"
|
|
167
|
-
if (
|
|
168
|
-
|
|
169
|
-
schema.format === "range"
|
|
170
|
-
) {
|
|
171
|
-
return "range";
|
|
161
|
+
if ((schema.type === 'number' || schema.type === 'integer') && schema.format === 'range') {
|
|
162
|
+
return 'range';
|
|
172
163
|
}
|
|
173
164
|
|
|
174
165
|
// String -> text field
|
|
175
|
-
if (schema.type ===
|
|
176
|
-
return
|
|
166
|
+
if (schema.type === 'string') {
|
|
167
|
+
return 'text';
|
|
177
168
|
}
|
|
178
169
|
|
|
179
170
|
// Number or integer -> number field
|
|
180
|
-
if (schema.type ===
|
|
181
|
-
return
|
|
171
|
+
if (schema.type === 'number' || schema.type === 'integer') {
|
|
172
|
+
return 'number';
|
|
182
173
|
}
|
|
183
174
|
|
|
184
175
|
// Boolean -> toggle
|
|
185
|
-
if (schema.type ===
|
|
186
|
-
return
|
|
176
|
+
if (schema.type === 'boolean') {
|
|
177
|
+
return 'toggle';
|
|
187
178
|
}
|
|
188
179
|
|
|
189
180
|
// Future: Array type support
|
|
190
|
-
if (schema.type ===
|
|
191
|
-
return
|
|
181
|
+
if (schema.type === 'array') {
|
|
182
|
+
return 'array';
|
|
192
183
|
}
|
|
193
184
|
|
|
194
185
|
// Object type without specific format -> CodeMirror JSON editor
|
|
195
|
-
if (schema.type ===
|
|
196
|
-
return
|
|
186
|
+
if (schema.type === 'object') {
|
|
187
|
+
return 'code-editor';
|
|
197
188
|
}
|
|
198
189
|
|
|
199
190
|
// Fallback to text
|
|
200
|
-
return
|
|
191
|
+
return 'text';
|
|
201
192
|
});
|
|
202
193
|
|
|
203
194
|
/**
|
|
@@ -217,7 +208,7 @@
|
|
|
217
208
|
/**
|
|
218
209
|
* Get current value as the appropriate type
|
|
219
210
|
*/
|
|
220
|
-
const stringValue = $derived(String(value ??
|
|
211
|
+
const stringValue = $derived(String(value ?? ''));
|
|
221
212
|
const numberValue = $derived(value as number | string);
|
|
222
213
|
const booleanValue = $derived(Boolean(value ?? schema.default ?? false));
|
|
223
214
|
const arrayValue = $derived.by((): string[] => {
|
|
@@ -243,11 +234,11 @@
|
|
|
243
234
|
}
|
|
244
235
|
return value ? [String(value)] : [];
|
|
245
236
|
}
|
|
246
|
-
return String(value ??
|
|
237
|
+
return String(value ?? '');
|
|
247
238
|
});
|
|
248
239
|
</script>
|
|
249
240
|
|
|
250
|
-
{#if fieldType !==
|
|
241
|
+
{#if fieldType !== 'hidden'}
|
|
251
242
|
<FormFieldWrapper
|
|
252
243
|
id={fieldKey}
|
|
253
244
|
label={fieldLabel}
|
|
@@ -255,7 +246,7 @@
|
|
|
255
246
|
description={schema.title ? schema.description : undefined}
|
|
256
247
|
{animationDelay}
|
|
257
248
|
>
|
|
258
|
-
{#if fieldType ===
|
|
249
|
+
{#if fieldType === 'checkbox-group'}
|
|
259
250
|
<FormCheckboxGroup
|
|
260
251
|
id={fieldKey}
|
|
261
252
|
value={arrayValue}
|
|
@@ -264,7 +255,7 @@
|
|
|
264
255
|
disabled={isReadOnly}
|
|
265
256
|
onChange={(val) => onChange(val)}
|
|
266
257
|
/>
|
|
267
|
-
{:else if fieldType ===
|
|
258
|
+
{:else if fieldType === 'select-enum'}
|
|
268
259
|
<FormSelect
|
|
269
260
|
id={fieldKey}
|
|
270
261
|
value={stringValue}
|
|
@@ -274,31 +265,31 @@
|
|
|
274
265
|
disabled={isReadOnly}
|
|
275
266
|
onChange={(val) => onChange(val)}
|
|
276
267
|
/>
|
|
277
|
-
{:else if fieldType ===
|
|
268
|
+
{:else if fieldType === 'textarea'}
|
|
278
269
|
<FormTextarea
|
|
279
270
|
id={fieldKey}
|
|
280
271
|
value={stringValue}
|
|
281
|
-
placeholder={schema.placeholder ??
|
|
272
|
+
placeholder={schema.placeholder ?? ''}
|
|
282
273
|
{required}
|
|
283
274
|
ariaDescribedBy={descriptionId}
|
|
284
275
|
disabled={isReadOnly}
|
|
285
276
|
onChange={(val) => onChange(val)}
|
|
286
277
|
/>
|
|
287
|
-
{:else if fieldType ===
|
|
278
|
+
{:else if fieldType === 'text'}
|
|
288
279
|
<FormTextField
|
|
289
280
|
id={fieldKey}
|
|
290
281
|
value={stringValue}
|
|
291
|
-
placeholder={schema.placeholder ??
|
|
282
|
+
placeholder={schema.placeholder ?? ''}
|
|
292
283
|
{required}
|
|
293
284
|
ariaDescribedBy={descriptionId}
|
|
294
285
|
disabled={isReadOnly}
|
|
295
286
|
onChange={(val) => onChange(val)}
|
|
296
287
|
/>
|
|
297
|
-
{:else if fieldType ===
|
|
288
|
+
{:else if fieldType === 'number'}
|
|
298
289
|
<FormNumberField
|
|
299
290
|
id={fieldKey}
|
|
300
291
|
value={numberValue}
|
|
301
|
-
placeholder={schema.placeholder ??
|
|
292
|
+
placeholder={schema.placeholder ?? ''}
|
|
302
293
|
min={schema.minimum}
|
|
303
294
|
max={schema.maximum}
|
|
304
295
|
step={schema.step}
|
|
@@ -307,7 +298,7 @@
|
|
|
307
298
|
disabled={isReadOnly}
|
|
308
299
|
onChange={(val) => onChange(val)}
|
|
309
300
|
/>
|
|
310
|
-
{:else if fieldType ===
|
|
301
|
+
{:else if fieldType === 'range'}
|
|
311
302
|
<FormRangeField
|
|
312
303
|
id={fieldKey}
|
|
313
304
|
value={numberValue}
|
|
@@ -319,7 +310,7 @@
|
|
|
319
310
|
disabled={isReadOnly}
|
|
320
311
|
onChange={(val) => onChange(val)}
|
|
321
312
|
/>
|
|
322
|
-
{:else if fieldType ===
|
|
313
|
+
{:else if fieldType === 'toggle'}
|
|
323
314
|
<FormToggle
|
|
324
315
|
id={fieldKey}
|
|
325
316
|
value={booleanValue}
|
|
@@ -327,7 +318,7 @@
|
|
|
327
318
|
disabled={isReadOnly}
|
|
328
319
|
onChange={(val) => onChange(val)}
|
|
329
320
|
/>
|
|
330
|
-
{:else if fieldType ===
|
|
321
|
+
{:else if fieldType === 'select-options'}
|
|
331
322
|
<FormSelect
|
|
332
323
|
id={fieldKey}
|
|
333
324
|
value={stringValue}
|
|
@@ -337,38 +328,37 @@
|
|
|
337
328
|
disabled={isReadOnly}
|
|
338
329
|
onChange={(val) => onChange(val)}
|
|
339
330
|
/>
|
|
340
|
-
{:else if fieldType ===
|
|
331
|
+
{:else if fieldType === 'array' && schema.items}
|
|
341
332
|
<FormArray
|
|
342
333
|
id={fieldKey}
|
|
343
334
|
value={arrayItems}
|
|
344
335
|
itemSchema={schema.items}
|
|
345
336
|
minItems={schema.minItems}
|
|
346
337
|
maxItems={schema.maxItems}
|
|
347
|
-
addLabel={`Add ${schema.items.title ??
|
|
338
|
+
addLabel={`Add ${schema.items.title ?? 'Item'}`}
|
|
348
339
|
disabled={isReadOnly}
|
|
349
340
|
onChange={(val) => onChange(val)}
|
|
350
341
|
/>
|
|
351
|
-
{:else if fieldType ===
|
|
342
|
+
{:else if fieldType === 'code-editor'}
|
|
352
343
|
<FormCodeEditor
|
|
353
344
|
id={fieldKey}
|
|
354
345
|
{value}
|
|
355
|
-
placeholder={schema.placeholder ??
|
|
346
|
+
placeholder={schema.placeholder ?? '{}'}
|
|
356
347
|
{required}
|
|
357
|
-
height={(schema.height as string | undefined) ??
|
|
358
|
-
darkTheme={(schema.darkTheme as boolean | undefined) ??
|
|
359
|
-
getResolvedTheme() === "dark"}
|
|
348
|
+
height={(schema.height as string | undefined) ?? '200px'}
|
|
349
|
+
darkTheme={(schema.darkTheme as boolean | undefined) ?? getResolvedTheme() === 'dark'}
|
|
360
350
|
autoFormat={(schema.autoFormat as boolean | undefined) ?? true}
|
|
361
351
|
ariaDescribedBy={descriptionId}
|
|
362
352
|
disabled={isReadOnly}
|
|
363
353
|
onChange={(val) => onChange(val)}
|
|
364
354
|
/>
|
|
365
|
-
{:else if fieldType ===
|
|
355
|
+
{:else if fieldType === 'markdown-editor'}
|
|
366
356
|
<FormMarkdownEditor
|
|
367
357
|
id={fieldKey}
|
|
368
358
|
value={stringValue}
|
|
369
|
-
placeholder={schema.placeholder ??
|
|
359
|
+
placeholder={schema.placeholder ?? 'Write your markdown here...'}
|
|
370
360
|
{required}
|
|
371
|
-
height={(schema.height as string | undefined) ??
|
|
361
|
+
height={(schema.height as string | undefined) ?? '300px'}
|
|
372
362
|
showToolbar={(schema.showToolbar as boolean | undefined) ?? true}
|
|
373
363
|
showStatusBar={(schema.showStatusBar as boolean | undefined) ?? true}
|
|
374
364
|
spellChecker={(schema.spellChecker as boolean | undefined) ?? false}
|
|
@@ -376,19 +366,18 @@
|
|
|
376
366
|
disabled={isReadOnly}
|
|
377
367
|
onChange={(val) => onChange(val)}
|
|
378
368
|
/>
|
|
379
|
-
{:else if fieldType ===
|
|
369
|
+
{:else if fieldType === 'template-editor'}
|
|
380
370
|
<FormTemplateEditor
|
|
381
371
|
id={fieldKey}
|
|
382
372
|
value={stringValue}
|
|
383
373
|
placeholder={schema.placeholder ??
|
|
384
|
-
|
|
374
|
+
'Enter your template here...\nUse {{ variable }} for dynamic values.'}
|
|
385
375
|
{required}
|
|
386
|
-
height={(schema.height as string | undefined) ??
|
|
387
|
-
darkTheme={(schema.darkTheme as boolean | undefined) ??
|
|
388
|
-
getResolvedTheme() === "dark"}
|
|
376
|
+
height={(schema.height as string | undefined) ?? '250px'}
|
|
377
|
+
darkTheme={(schema.darkTheme as boolean | undefined) ?? getResolvedTheme() === 'dark'}
|
|
389
378
|
variables={schema.variables}
|
|
390
379
|
placeholderExample={(schema.placeholderExample as string | undefined) ??
|
|
391
|
-
|
|
380
|
+
'Hello {{ name }}, your order #{{ order_id }} is ready!'}
|
|
392
381
|
ariaDescribedBy={descriptionId}
|
|
393
382
|
disabled={isReadOnly}
|
|
394
383
|
{node}
|
|
@@ -398,12 +387,12 @@
|
|
|
398
387
|
{authProvider}
|
|
399
388
|
onChange={(val) => onChange(val)}
|
|
400
389
|
/>
|
|
401
|
-
{:else if fieldType ===
|
|
390
|
+
{:else if fieldType === 'autocomplete' && schema.autocomplete}
|
|
402
391
|
<FormAutocomplete
|
|
403
392
|
id={fieldKey}
|
|
404
393
|
value={autocompleteValue}
|
|
405
394
|
autocomplete={schema.autocomplete}
|
|
406
|
-
placeholder={schema.placeholder ??
|
|
395
|
+
placeholder={schema.placeholder ?? ''}
|
|
407
396
|
{required}
|
|
408
397
|
ariaDescribedBy={descriptionId}
|
|
409
398
|
disabled={isReadOnly}
|
|
@@ -414,7 +403,7 @@
|
|
|
414
403
|
<FormTextField
|
|
415
404
|
id={fieldKey}
|
|
416
405
|
value={stringValue}
|
|
417
|
-
placeholder={schema.placeholder ??
|
|
406
|
+
placeholder={schema.placeholder ?? ''}
|
|
418
407
|
ariaDescribedBy={descriptionId}
|
|
419
408
|
disabled={isReadOnly}
|
|
420
409
|
onChange={(val) => onChange(val)}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { FieldSchema } from
|
|
2
|
-
import type { WorkflowNode, WorkflowEdge, AuthProvider } from
|
|
1
|
+
import type { FieldSchema } from './types.js';
|
|
2
|
+
import type { WorkflowNode, WorkflowEdge, AuthProvider } from '../../types/index.js';
|
|
3
3
|
interface Props {
|
|
4
4
|
/** Unique key/id for the field */
|
|
5
5
|
fieldKey: string;
|