@flowdrop/flowdrop 1.5.0 → 1.6.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 +240 -294
- package/dist/components/App.svelte.d.ts +9 -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 +42 -56
- 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 +44 -74
- 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/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 +3 -3
- package/dist/stores/workflowStore.svelte.js +46 -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 +32 -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 +2 -2
- package/dist/utils/connections.js +15 -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
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module services/settingsService
|
|
9
9
|
*/
|
|
10
|
-
import { buildEndpointUrl, getEndpointHeaders } from
|
|
10
|
+
import { buildEndpointUrl, getEndpointHeaders } from '../config/endpoints.js';
|
|
11
11
|
// =========================================================================
|
|
12
12
|
// Configuration
|
|
13
13
|
// =========================================================================
|
|
@@ -44,17 +44,17 @@ export function getSettingsEndpointConfig() {
|
|
|
44
44
|
*/
|
|
45
45
|
async function settingsRequest(endpointKey, endpointPath, options = {}) {
|
|
46
46
|
if (!endpointConfig) {
|
|
47
|
-
throw new Error(
|
|
47
|
+
throw new Error('Endpoint configuration not set. Call setSettingsEndpointConfig() first.');
|
|
48
48
|
}
|
|
49
49
|
const url = buildEndpointUrl(endpointConfig, endpointPath);
|
|
50
50
|
const headers = getEndpointHeaders(endpointConfig, endpointKey);
|
|
51
51
|
const response = await fetch(url, {
|
|
52
52
|
headers,
|
|
53
|
-
...options
|
|
53
|
+
...options
|
|
54
54
|
});
|
|
55
55
|
// Check if response is JSON
|
|
56
|
-
const contentType = response.headers.get(
|
|
57
|
-
const isJson = contentType?.includes(
|
|
56
|
+
const contentType = response.headers.get('content-type');
|
|
57
|
+
const isJson = contentType?.includes('application/json');
|
|
58
58
|
if (!response.ok) {
|
|
59
59
|
let errorMessage = `HTTP ${response.status}: ${response.statusText}`;
|
|
60
60
|
if (isJson) {
|
|
@@ -86,13 +86,11 @@ export const settingsApi = {
|
|
|
86
86
|
*/
|
|
87
87
|
async getPreferences() {
|
|
88
88
|
if (!endpointConfig) {
|
|
89
|
-
throw new Error(
|
|
89
|
+
throw new Error('Endpoint configuration not set');
|
|
90
90
|
}
|
|
91
|
-
const response = await settingsRequest(
|
|
91
|
+
const response = await settingsRequest('users.preferences', endpointConfig.endpoints.users.preferences, { method: 'GET' });
|
|
92
92
|
if (!response.success || !response.data) {
|
|
93
|
-
throw new Error(typeof response.error ===
|
|
94
|
-
? response.error
|
|
95
|
-
: "Failed to fetch user preferences");
|
|
93
|
+
throw new Error(typeof response.error === 'string' ? response.error : 'Failed to fetch user preferences');
|
|
96
94
|
}
|
|
97
95
|
return response.data;
|
|
98
96
|
},
|
|
@@ -103,16 +101,14 @@ export const settingsApi = {
|
|
|
103
101
|
*/
|
|
104
102
|
async savePreferences(settings) {
|
|
105
103
|
if (!endpointConfig) {
|
|
106
|
-
throw new Error(
|
|
104
|
+
throw new Error('Endpoint configuration not set');
|
|
107
105
|
}
|
|
108
|
-
const response = await settingsRequest(
|
|
109
|
-
method:
|
|
110
|
-
body: JSON.stringify(settings)
|
|
106
|
+
const response = await settingsRequest('users.preferences', endpointConfig.endpoints.users.preferences, {
|
|
107
|
+
method: 'PUT',
|
|
108
|
+
body: JSON.stringify(settings)
|
|
111
109
|
});
|
|
112
110
|
if (!response.success) {
|
|
113
|
-
throw new Error(typeof response.error ===
|
|
114
|
-
? response.error
|
|
115
|
-
: "Failed to save user preferences");
|
|
111
|
+
throw new Error(typeof response.error === 'string' ? response.error : 'Failed to save user preferences');
|
|
116
112
|
}
|
|
117
113
|
},
|
|
118
114
|
/**
|
|
@@ -122,19 +118,17 @@ export const settingsApi = {
|
|
|
122
118
|
*/
|
|
123
119
|
async patchPreferences(partial) {
|
|
124
120
|
if (!endpointConfig) {
|
|
125
|
-
throw new Error(
|
|
121
|
+
throw new Error('Endpoint configuration not set');
|
|
126
122
|
}
|
|
127
|
-
const response = await settingsRequest(
|
|
128
|
-
method:
|
|
129
|
-
body: JSON.stringify(partial)
|
|
123
|
+
const response = await settingsRequest('users.preferences', endpointConfig.endpoints.users.preferences, {
|
|
124
|
+
method: 'PATCH',
|
|
125
|
+
body: JSON.stringify(partial)
|
|
130
126
|
});
|
|
131
127
|
if (!response.success || !response.data) {
|
|
132
|
-
throw new Error(typeof response.error ===
|
|
133
|
-
? response.error
|
|
134
|
-
: "Failed to update user preferences");
|
|
128
|
+
throw new Error(typeof response.error === 'string' ? response.error : 'Failed to update user preferences');
|
|
135
129
|
}
|
|
136
130
|
return response.data;
|
|
137
|
-
}
|
|
131
|
+
}
|
|
138
132
|
};
|
|
139
133
|
// =========================================================================
|
|
140
134
|
// Settings Service Class (for settingsStore integration)
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Centralized toast notification service using svelte-french-toast
|
|
4
4
|
* Provides consistent toast notifications across the FlowDrop application
|
|
5
5
|
*/
|
|
6
|
-
import { type DefaultToastOptions } from
|
|
6
|
+
import { type DefaultToastOptions } from 'svelte-5-french-toast';
|
|
7
7
|
/**
|
|
8
8
|
* Default toast options themed with FlowDrop design tokens.
|
|
9
9
|
* Use with <Toaster toastOptions={flowdropToastOptions} containerClassName="flowdrop-toaster" />
|
|
@@ -15,13 +15,13 @@ export declare const FLOWDROP_TOASTER_CLASS = "flowdrop-toaster";
|
|
|
15
15
|
/**
|
|
16
16
|
* Toast notification types
|
|
17
17
|
*/
|
|
18
|
-
export type ToastType =
|
|
18
|
+
export type ToastType = 'success' | 'error' | 'warning' | 'info' | 'loading';
|
|
19
19
|
/**
|
|
20
20
|
* Toast configuration options
|
|
21
21
|
*/
|
|
22
22
|
export interface ToastOptions {
|
|
23
23
|
duration?: number;
|
|
24
|
-
position?:
|
|
24
|
+
position?: 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* Show a success toast notification
|
|
@@ -54,7 +54,7 @@ export declare function dismissAllToasts(): void;
|
|
|
54
54
|
/**
|
|
55
55
|
* Show a promise-based toast (loading -> success/error)
|
|
56
56
|
*/
|
|
57
|
-
export declare function showPromise<T>(promise: Promise<T>, { loading, success, error, options
|
|
57
|
+
export declare function showPromise<T>(promise: Promise<T>, { loading, success, error, options }: {
|
|
58
58
|
loading: string;
|
|
59
59
|
success: string | ((data: T) => string);
|
|
60
60
|
error: string | ((error: unknown) => string);
|
|
@@ -3,44 +3,44 @@
|
|
|
3
3
|
* Centralized toast notification service using svelte-french-toast
|
|
4
4
|
* Provides consistent toast notifications across the FlowDrop application
|
|
5
5
|
*/
|
|
6
|
-
import { toast } from
|
|
7
|
-
import { TOAST_DURATION } from
|
|
6
|
+
import { toast } from 'svelte-5-french-toast';
|
|
7
|
+
import { TOAST_DURATION } from '../config/constants.js';
|
|
8
8
|
/**
|
|
9
9
|
* Default toast options themed with FlowDrop design tokens.
|
|
10
10
|
* Use with <Toaster toastOptions={flowdropToastOptions} containerClassName="flowdrop-toaster" />
|
|
11
11
|
* and import '@flowdrop/flowdrop/styles/toast.css' (or app toast.css) so toast bar styles apply.
|
|
12
12
|
*/
|
|
13
13
|
export const flowdropToastOptions = {
|
|
14
|
-
className:
|
|
15
|
-
style:
|
|
14
|
+
className: 'flowdrop-toast-bar',
|
|
15
|
+
style: '',
|
|
16
16
|
success: {
|
|
17
17
|
iconTheme: {
|
|
18
|
-
primary:
|
|
19
|
-
secondary:
|
|
20
|
-
}
|
|
18
|
+
primary: 'var(--fd-success)',
|
|
19
|
+
secondary: 'var(--fd-success-foreground)'
|
|
20
|
+
}
|
|
21
21
|
},
|
|
22
22
|
error: {
|
|
23
23
|
iconTheme: {
|
|
24
|
-
primary:
|
|
25
|
-
secondary:
|
|
26
|
-
}
|
|
24
|
+
primary: 'var(--fd-error)',
|
|
25
|
+
secondary: 'var(--fd-error-foreground)'
|
|
26
|
+
}
|
|
27
27
|
},
|
|
28
28
|
loading: {
|
|
29
29
|
iconTheme: {
|
|
30
|
-
primary:
|
|
31
|
-
secondary:
|
|
32
|
-
}
|
|
33
|
-
}
|
|
30
|
+
primary: 'var(--fd-primary)',
|
|
31
|
+
secondary: 'var(--fd-primary-muted)'
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
34
|
};
|
|
35
35
|
/** Container class for FlowDrop-themed Toaster (used with toast.css). */
|
|
36
|
-
export const FLOWDROP_TOASTER_CLASS =
|
|
36
|
+
export const FLOWDROP_TOASTER_CLASS = 'flowdrop-toaster';
|
|
37
37
|
/**
|
|
38
38
|
* Show a success toast notification
|
|
39
39
|
*/
|
|
40
40
|
export function showSuccess(message, options) {
|
|
41
41
|
return toast.success(message, {
|
|
42
42
|
duration: options?.duration || TOAST_DURATION.SUCCESS,
|
|
43
|
-
position: options?.position ||
|
|
43
|
+
position: options?.position || 'bottom-center'
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
@@ -49,7 +49,7 @@ export function showSuccess(message, options) {
|
|
|
49
49
|
export function showError(message, options) {
|
|
50
50
|
return toast.error(message, {
|
|
51
51
|
duration: options?.duration || TOAST_DURATION.ERROR,
|
|
52
|
-
position: options?.position ||
|
|
52
|
+
position: options?.position || 'bottom-center'
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
@@ -58,7 +58,7 @@ export function showError(message, options) {
|
|
|
58
58
|
export function showWarning(message, options) {
|
|
59
59
|
return toast.error(message, {
|
|
60
60
|
duration: options?.duration || TOAST_DURATION.WARNING,
|
|
61
|
-
position: options?.position ||
|
|
61
|
+
position: options?.position || 'bottom-center'
|
|
62
62
|
});
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
@@ -67,7 +67,7 @@ export function showWarning(message, options) {
|
|
|
67
67
|
export function showInfo(message, options) {
|
|
68
68
|
return toast.success(message, {
|
|
69
69
|
duration: options?.duration || TOAST_DURATION.INFO,
|
|
70
|
-
position: options?.position ||
|
|
70
|
+
position: options?.position || 'bottom-center'
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
@@ -76,7 +76,7 @@ export function showInfo(message, options) {
|
|
|
76
76
|
export function showLoading(message, options) {
|
|
77
77
|
return toast.loading(message, {
|
|
78
78
|
duration: options?.duration || Infinity,
|
|
79
|
-
position: options?.position ||
|
|
79
|
+
position: options?.position || 'bottom-center'
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
/**
|
|
@@ -94,12 +94,12 @@ export function dismissAllToasts() {
|
|
|
94
94
|
/**
|
|
95
95
|
* Show a promise-based toast (loading -> success/error)
|
|
96
96
|
*/
|
|
97
|
-
export function showPromise(promise, { loading, success, error, options
|
|
97
|
+
export function showPromise(promise, { loading, success, error, options }) {
|
|
98
98
|
return toast.promise(promise, {
|
|
99
99
|
loading,
|
|
100
100
|
success,
|
|
101
101
|
error,
|
|
102
|
-
...options
|
|
102
|
+
...options
|
|
103
103
|
});
|
|
104
104
|
}
|
|
105
105
|
/**
|
|
@@ -108,7 +108,7 @@ export function showPromise(promise, { loading, success, error, options, }) {
|
|
|
108
108
|
export function showConfirmation(message, options) {
|
|
109
109
|
return toast(message, {
|
|
110
110
|
duration: options?.duration || TOAST_DURATION.CONFIRMATION,
|
|
111
|
-
position: options?.position ||
|
|
111
|
+
position: options?.position || 'bottom-center'
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
114
|
/**
|
|
@@ -142,9 +142,9 @@ export const apiToasts = {
|
|
|
142
142
|
return showPromise(promise, {
|
|
143
143
|
loading: `${operation}...`,
|
|
144
144
|
success: options?.successMessage || `${operation} completed successfully`,
|
|
145
|
-
error: options?.errorMessage || `${operation} failed
|
|
145
|
+
error: options?.errorMessage || `${operation} failed`
|
|
146
146
|
});
|
|
147
|
-
}
|
|
147
|
+
}
|
|
148
148
|
};
|
|
149
149
|
/**
|
|
150
150
|
* Workflow-specific toast helpers
|
|
@@ -156,7 +156,7 @@ export const workflowToasts = {
|
|
|
156
156
|
saved: (workflowName) => {
|
|
157
157
|
const message = workflowName
|
|
158
158
|
? `Workflow "${workflowName}" saved successfully`
|
|
159
|
-
:
|
|
159
|
+
: 'Workflow saved successfully';
|
|
160
160
|
return showSuccess(message);
|
|
161
161
|
},
|
|
162
162
|
/**
|
|
@@ -172,7 +172,7 @@ export const workflowToasts = {
|
|
|
172
172
|
deleted: (workflowName) => {
|
|
173
173
|
const message = workflowName
|
|
174
174
|
? `Workflow "${workflowName}" deleted successfully`
|
|
175
|
-
:
|
|
175
|
+
: 'Workflow deleted successfully';
|
|
176
176
|
return showSuccess(message);
|
|
177
177
|
},
|
|
178
178
|
/**
|
|
@@ -188,7 +188,7 @@ export const workflowToasts = {
|
|
|
188
188
|
executionStarted: (workflowName) => {
|
|
189
189
|
const message = workflowName
|
|
190
190
|
? `Workflow "${workflowName}" execution started`
|
|
191
|
-
:
|
|
191
|
+
: 'Workflow execution started';
|
|
192
192
|
return showInfo(message);
|
|
193
193
|
},
|
|
194
194
|
/**
|
|
@@ -197,7 +197,7 @@ export const workflowToasts = {
|
|
|
197
197
|
executionCompleted: (workflowName) => {
|
|
198
198
|
const message = workflowName
|
|
199
199
|
? `Workflow "${workflowName}" execution completed`
|
|
200
|
-
:
|
|
200
|
+
: 'Workflow execution completed';
|
|
201
201
|
return showSuccess(message);
|
|
202
202
|
},
|
|
203
203
|
/**
|
|
@@ -206,7 +206,7 @@ export const workflowToasts = {
|
|
|
206
206
|
exported: (workflowName) => {
|
|
207
207
|
const message = workflowName
|
|
208
208
|
? `Workflow "${workflowName}" exported successfully`
|
|
209
|
-
:
|
|
209
|
+
: 'Workflow exported successfully';
|
|
210
210
|
return showSuccess(message);
|
|
211
211
|
},
|
|
212
212
|
/**
|
|
@@ -215,7 +215,7 @@ export const workflowToasts = {
|
|
|
215
215
|
executionError: (error) => {
|
|
216
216
|
const errorMessage = error instanceof Error ? error.message : error;
|
|
217
217
|
return showError(`Workflow execution failed: ${errorMessage}`);
|
|
218
|
-
}
|
|
218
|
+
}
|
|
219
219
|
};
|
|
220
220
|
/**
|
|
221
221
|
* Pipeline-specific toast helpers
|
|
@@ -227,7 +227,7 @@ export const pipelineToasts = {
|
|
|
227
227
|
created: (pipelineName) => {
|
|
228
228
|
const message = pipelineName
|
|
229
229
|
? `Pipeline "${pipelineName}" created successfully`
|
|
230
|
-
:
|
|
230
|
+
: 'Pipeline created successfully';
|
|
231
231
|
return showSuccess(message);
|
|
232
232
|
},
|
|
233
233
|
/**
|
|
@@ -261,5 +261,5 @@ export const pipelineToasts = {
|
|
|
261
261
|
*/
|
|
262
262
|
statusUpdate: (pipelineId, status) => {
|
|
263
263
|
return showInfo(`Pipeline ${pipelineId} status: ${status}`);
|
|
264
|
-
}
|
|
264
|
+
}
|
|
265
265
|
};
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module services/variableService
|
|
7
7
|
*/
|
|
8
|
-
import type { WorkflowNode, WorkflowEdge, VariableSchema, TemplateVariable, TemplateVariablesConfig, AuthProvider } from
|
|
8
|
+
import type { WorkflowNode, WorkflowEdge, VariableSchema, TemplateVariable, TemplateVariablesConfig, AuthProvider } from '../types/index.js';
|
|
9
9
|
/**
|
|
10
10
|
* Options for deriving available variables.
|
|
11
11
|
*/
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module services/variableService
|
|
7
7
|
*/
|
|
8
|
-
import { logger } from
|
|
8
|
+
import { logger } from '../utils/logger.js';
|
|
9
9
|
/**
|
|
10
10
|
* Converts a JSON Schema property type to a TemplateVariableType.
|
|
11
11
|
*
|
|
@@ -14,22 +14,22 @@ import { logger } from "../utils/logger.js";
|
|
|
14
14
|
*/
|
|
15
15
|
function toTemplateVariableType(schemaType) {
|
|
16
16
|
switch (schemaType) {
|
|
17
|
-
case
|
|
18
|
-
return
|
|
19
|
-
case
|
|
20
|
-
return
|
|
21
|
-
case
|
|
22
|
-
return
|
|
23
|
-
case
|
|
24
|
-
return
|
|
25
|
-
case
|
|
26
|
-
return
|
|
27
|
-
case
|
|
28
|
-
return
|
|
29
|
-
case
|
|
30
|
-
return
|
|
17
|
+
case 'string':
|
|
18
|
+
return 'string';
|
|
19
|
+
case 'number':
|
|
20
|
+
return 'number';
|
|
21
|
+
case 'integer':
|
|
22
|
+
return 'integer';
|
|
23
|
+
case 'boolean':
|
|
24
|
+
return 'boolean';
|
|
25
|
+
case 'array':
|
|
26
|
+
return 'array';
|
|
27
|
+
case 'object':
|
|
28
|
+
return 'object';
|
|
29
|
+
case 'float':
|
|
30
|
+
return 'float';
|
|
31
31
|
default:
|
|
32
|
-
return
|
|
32
|
+
return 'mixed';
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
/**
|
|
@@ -49,18 +49,18 @@ function propertyToTemplateVariable(name, property, sourcePort, sourceNode) {
|
|
|
49
49
|
description: property.description,
|
|
50
50
|
type: toTemplateVariableType(property.type),
|
|
51
51
|
sourcePort,
|
|
52
|
-
sourceNode
|
|
52
|
+
sourceNode
|
|
53
53
|
};
|
|
54
54
|
// Handle nested object properties
|
|
55
|
-
if (property.type ===
|
|
55
|
+
if (property.type === 'object' && property.properties) {
|
|
56
56
|
variable.properties = {};
|
|
57
57
|
for (const [propName, propValue] of Object.entries(property.properties)) {
|
|
58
58
|
variable.properties[propName] = propertyToTemplateVariable(propName, propValue, sourcePort, sourceNode);
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
// Handle array items
|
|
62
|
-
if (property.type ===
|
|
63
|
-
variable.items = propertyToTemplateVariable(
|
|
62
|
+
if (property.type === 'array' && property.items) {
|
|
63
|
+
variable.items = propertyToTemplateVariable('item', property.items, sourcePort, sourceNode);
|
|
64
64
|
}
|
|
65
65
|
return variable;
|
|
66
66
|
}
|
|
@@ -79,10 +79,10 @@ function portToTemplateVariable(port, sourceNode) {
|
|
|
79
79
|
name: port.id,
|
|
80
80
|
label: port.name,
|
|
81
81
|
description: port.description,
|
|
82
|
-
type:
|
|
82
|
+
type: 'object',
|
|
83
83
|
sourcePort: port.id,
|
|
84
84
|
sourceNode,
|
|
85
|
-
properties: {}
|
|
85
|
+
properties: {}
|
|
86
86
|
};
|
|
87
87
|
for (const [propName, propValue] of Object.entries(port.schema.properties)) {
|
|
88
88
|
variable.properties[propName] = propertyToTemplateVariable(propName, propValue, port.id, sourceNode);
|
|
@@ -96,7 +96,7 @@ function portToTemplateVariable(port, sourceNode) {
|
|
|
96
96
|
description: port.description,
|
|
97
97
|
type: toTemplateVariableType(port.dataType),
|
|
98
98
|
sourcePort: port.id,
|
|
99
|
-
sourceNode
|
|
99
|
+
sourceNode
|
|
100
100
|
};
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
@@ -152,7 +152,7 @@ function findUpstreamConnections(node, nodes, edges) {
|
|
|
152
152
|
edge,
|
|
153
153
|
sourceNode,
|
|
154
154
|
sourcePort,
|
|
155
|
-
targetPort
|
|
155
|
+
targetPort
|
|
156
156
|
});
|
|
157
157
|
}
|
|
158
158
|
return connections;
|
|
@@ -187,12 +187,12 @@ export function getAvailableVariables(node, nodes, edges, options) {
|
|
|
187
187
|
for (const connection of connections) {
|
|
188
188
|
const { sourceNode, sourcePort, targetPort } = connection;
|
|
189
189
|
// Skip trigger ports - they don't carry data
|
|
190
|
-
if (sourcePort?.dataType ===
|
|
190
|
+
if (sourcePort?.dataType === 'trigger')
|
|
191
191
|
continue;
|
|
192
|
-
if (targetPort?.dataType ===
|
|
192
|
+
if (targetPort?.dataType === 'trigger')
|
|
193
193
|
continue;
|
|
194
194
|
// Get the target port ID for filtering
|
|
195
|
-
const targetPortId = targetPort?.id ?? sourcePort?.id ??
|
|
195
|
+
const targetPortId = targetPort?.id ?? sourcePort?.id ?? 'data';
|
|
196
196
|
// Filter by target port IDs if specified
|
|
197
197
|
if (targetPortIds !== undefined) {
|
|
198
198
|
if (!targetPortIds.includes(targetPortId))
|
|
@@ -245,7 +245,7 @@ export function getAvailableVariables(node, nodes, edges, options) {
|
|
|
245
245
|
* ```
|
|
246
246
|
*/
|
|
247
247
|
export function getChildVariables(schema, path) {
|
|
248
|
-
const parts = path.split(
|
|
248
|
+
const parts = path.split('.');
|
|
249
249
|
let current;
|
|
250
250
|
// Navigate to the target variable
|
|
251
251
|
for (let i = 0; i < parts.length; i++) {
|
|
@@ -296,7 +296,7 @@ export function getArrayIndexSuggestions(maxIndex = 2) {
|
|
|
296
296
|
suggestions.push(`${i}]`);
|
|
297
297
|
}
|
|
298
298
|
// Add wildcard for "all items"
|
|
299
|
-
suggestions.push(
|
|
299
|
+
suggestions.push('*]');
|
|
300
300
|
return suggestions;
|
|
301
301
|
}
|
|
302
302
|
/**
|
|
@@ -307,7 +307,7 @@ export function getArrayIndexSuggestions(maxIndex = 2) {
|
|
|
307
307
|
* @returns True if the variable is an array type
|
|
308
308
|
*/
|
|
309
309
|
export function isArrayVariable(schema, path) {
|
|
310
|
-
const parts = path.split(
|
|
310
|
+
const parts = path.split('.');
|
|
311
311
|
let current;
|
|
312
312
|
for (let i = 0; i < parts.length; i++) {
|
|
313
313
|
const part = parts[i];
|
|
@@ -336,7 +336,7 @@ export function isArrayVariable(schema, path) {
|
|
|
336
336
|
return false;
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
return current?.type ===
|
|
339
|
+
return current?.type === 'array';
|
|
340
340
|
}
|
|
341
341
|
/**
|
|
342
342
|
* Checks if a variable at the given path has child properties.
|
|
@@ -411,7 +411,7 @@ export async function getVariableSchema(node, nodes, edges, config, workflowId,
|
|
|
411
411
|
if (config.api) {
|
|
412
412
|
try {
|
|
413
413
|
// Import API variable service dynamically to avoid circular dependencies
|
|
414
|
-
const { fetchVariableSchema } = await import(
|
|
414
|
+
const { fetchVariableSchema } = await import('./apiVariableService.js');
|
|
415
415
|
const apiResult = await fetchVariableSchema(workflowId, node.id, config.api, authProvider);
|
|
416
416
|
if (apiResult.success && apiResult.schema) {
|
|
417
417
|
resultSchema = apiResult.schema;
|
|
@@ -423,7 +423,7 @@ export async function getVariableSchema(node, nodes, edges, config, workflowId,
|
|
|
423
423
|
if (config.api.mergeWithPorts) {
|
|
424
424
|
const portSchema = getAvailableVariables(node, nodes, edges, {
|
|
425
425
|
targetPortIds: config.ports,
|
|
426
|
-
includePortName: config.includePortName
|
|
426
|
+
includePortName: config.includePortName
|
|
427
427
|
});
|
|
428
428
|
resultSchema = mergeVariableSchemas(resultSchema, portSchema);
|
|
429
429
|
}
|
|
@@ -431,13 +431,13 @@ export async function getVariableSchema(node, nodes, edges, config, workflowId,
|
|
|
431
431
|
}
|
|
432
432
|
else if (!config.api.fallbackOnError) {
|
|
433
433
|
// API failed and fallback is disabled - return empty schema
|
|
434
|
-
logger.error(
|
|
434
|
+
logger.error('Failed to fetch variables from API:', apiResult.error);
|
|
435
435
|
return { variables: {} };
|
|
436
436
|
}
|
|
437
437
|
// If fallback is enabled (default), continue to schema-based mode below
|
|
438
438
|
}
|
|
439
439
|
catch (error) {
|
|
440
|
-
logger.error(
|
|
440
|
+
logger.error('Error fetching variables from API:', error);
|
|
441
441
|
// If fallback is disabled, return empty schema
|
|
442
442
|
if (config.api.fallbackOnError === false) {
|
|
443
443
|
return { variables: {} };
|
|
@@ -451,7 +451,7 @@ export async function getVariableSchema(node, nodes, edges, config, workflowId,
|
|
|
451
451
|
if (config.ports !== undefined || !config.api) {
|
|
452
452
|
const portSchema = getAvailableVariables(node, nodes, edges, {
|
|
453
453
|
targetPortIds: config.ports,
|
|
454
|
-
includePortName: config.includePortName
|
|
454
|
+
includePortName: config.includePortName
|
|
455
455
|
});
|
|
456
456
|
resultSchema = portSchema;
|
|
457
457
|
}
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* In-memory workflow storage service
|
|
3
3
|
* This can be replaced with a database implementation later
|
|
4
4
|
*/
|
|
5
|
-
import type { Workflow } from
|
|
5
|
+
import type { Workflow } from '../types/index.js';
|
|
6
6
|
/**
|
|
7
7
|
* Save a workflow
|
|
8
8
|
*/
|
|
9
|
-
export declare function saveWorkflow(workflow: Omit<Workflow,
|
|
9
|
+
export declare function saveWorkflow(workflow: Omit<Workflow, 'id'>): Promise<Workflow>;
|
|
10
10
|
/**
|
|
11
11
|
* Update an existing workflow
|
|
12
12
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* In-memory workflow storage service
|
|
3
3
|
* This can be replaced with a database implementation later
|
|
4
4
|
*/
|
|
5
|
-
import { v4 as uuidv4 } from
|
|
5
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
6
6
|
// In-memory storage
|
|
7
7
|
const workflows = new Map();
|
|
8
8
|
/**
|
|
@@ -20,11 +20,11 @@ export async function saveWorkflow(workflow) {
|
|
|
20
20
|
...workflow,
|
|
21
21
|
id,
|
|
22
22
|
metadata: {
|
|
23
|
-
version:
|
|
23
|
+
version: '1.0.0',
|
|
24
24
|
createdAt: new Date().toISOString(),
|
|
25
25
|
updatedAt: new Date().toISOString(),
|
|
26
|
-
...workflow.metadata
|
|
27
|
-
}
|
|
26
|
+
...workflow.metadata
|
|
27
|
+
}
|
|
28
28
|
};
|
|
29
29
|
workflows.set(id, newWorkflow);
|
|
30
30
|
return newWorkflow;
|
|
@@ -42,12 +42,12 @@ export async function updateWorkflow(id, workflow) {
|
|
|
42
42
|
...workflow,
|
|
43
43
|
id, // Ensure ID doesn't change
|
|
44
44
|
metadata: {
|
|
45
|
-
version: existing.metadata?.version ||
|
|
45
|
+
version: existing.metadata?.version || '1.0.0',
|
|
46
46
|
createdAt: existing.metadata?.createdAt || new Date().toISOString(),
|
|
47
47
|
updatedAt: new Date().toISOString(),
|
|
48
48
|
author: workflow.metadata?.author || existing.metadata?.author,
|
|
49
|
-
tags: workflow.metadata?.tags || existing.metadata?.tags
|
|
50
|
-
}
|
|
49
|
+
tags: workflow.metadata?.tags || existing.metadata?.tags
|
|
50
|
+
}
|
|
51
51
|
};
|
|
52
52
|
workflows.set(id, updatedWorkflow);
|
|
53
53
|
return updatedWorkflow;
|
|
@@ -100,17 +100,17 @@ export async function initializeSampleWorkflows() {
|
|
|
100
100
|
}
|
|
101
101
|
// Add a sample workflow
|
|
102
102
|
const sampleWorkflow = {
|
|
103
|
-
name:
|
|
104
|
-
description:
|
|
103
|
+
name: 'Sample Chat Workflow',
|
|
104
|
+
description: 'A simple workflow demonstrating chat completion',
|
|
105
105
|
nodes: [],
|
|
106
106
|
edges: [],
|
|
107
107
|
metadata: {
|
|
108
|
-
version:
|
|
108
|
+
version: '1.0.0',
|
|
109
109
|
createdAt: new Date().toISOString(),
|
|
110
110
|
updatedAt: new Date().toISOString(),
|
|
111
|
-
author:
|
|
112
|
-
tags: [
|
|
113
|
-
}
|
|
111
|
+
author: 'System',
|
|
112
|
+
tags: ['sample', 'chat']
|
|
113
|
+
}
|
|
114
114
|
};
|
|
115
115
|
await saveWorkflow(sampleWorkflow);
|
|
116
116
|
}
|
package/dist/settings/index.d.ts
CHANGED
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
* import { theme, setTheme } from "@flowdrop/flowdrop/core";
|
|
17
17
|
* ```
|
|
18
18
|
*/
|
|
19
|
-
export { default as ThemeToggle } from
|
|
20
|
-
export { default as SettingsPanel } from
|
|
21
|
-
export { default as SettingsModal } from
|
|
22
|
-
export type { ThemeSettings, EditorSettings, UISettings, BehaviorSettings, ApiSettings, FlowDropSettings, SettingsCategory, PartialSettings, DeepPartial, SettingsChangeEvent, SettingsChangeCallback, SyncStatus, SettingsStoreState
|
|
23
|
-
export { SETTINGS_CATEGORIES, SETTINGS_CATEGORY_LABELS, SETTINGS_CATEGORY_ICONS, DEFAULT_THEME_SETTINGS, DEFAULT_EDITOR_SETTINGS, DEFAULT_UI_SETTINGS, DEFAULT_BEHAVIOR_SETTINGS, DEFAULT_API_SETTINGS, DEFAULT_SETTINGS, SETTINGS_STORAGE_KEY
|
|
24
|
-
export { getSettings as settingsStore, getThemeSettings as themeSettings, getEditorSettings as editorSettings, getUiSettings as uiSettings, getBehaviorSettings as behaviorSettings, getApiSettings as apiSettings, getSyncStatus as syncStatusStore, updateSettings, resetSettings, getSettings, initializeSettings, setSettingsService, syncSettingsToApi, loadSettingsFromApi, onSettingsChange
|
|
25
|
-
export { settingsApi, SettingsService, createSettingsService, setSettingsEndpointConfig, getSettingsEndpointConfig
|
|
19
|
+
export { default as ThemeToggle } from '../components/ThemeToggle.svelte';
|
|
20
|
+
export { default as SettingsPanel } from '../components/SettingsPanel.svelte';
|
|
21
|
+
export { default as SettingsModal } from '../components/SettingsModal.svelte';
|
|
22
|
+
export type { ThemeSettings, EditorSettings, UISettings, BehaviorSettings, ApiSettings, FlowDropSettings, SettingsCategory, PartialSettings, DeepPartial, SettingsChangeEvent, SettingsChangeCallback, SyncStatus, SettingsStoreState } from '../types/settings.js';
|
|
23
|
+
export { SETTINGS_CATEGORIES, SETTINGS_CATEGORY_LABELS, SETTINGS_CATEGORY_ICONS, DEFAULT_THEME_SETTINGS, DEFAULT_EDITOR_SETTINGS, DEFAULT_UI_SETTINGS, DEFAULT_BEHAVIOR_SETTINGS, DEFAULT_API_SETTINGS, DEFAULT_SETTINGS, SETTINGS_STORAGE_KEY } from '../types/settings.js';
|
|
24
|
+
export { getSettings as settingsStore, getThemeSettings as themeSettings, getEditorSettings as editorSettings, getUiSettings as uiSettings, getBehaviorSettings as behaviorSettings, getApiSettings as apiSettings, getSyncStatus as syncStatusStore, updateSettings, resetSettings, getSettings, initializeSettings, setSettingsService, syncSettingsToApi, loadSettingsFromApi, onSettingsChange } from '../stores/settingsStore.svelte.js';
|
|
25
|
+
export { settingsApi, SettingsService, createSettingsService, setSettingsEndpointConfig, getSettingsEndpointConfig } from '../services/settingsService.js';
|
package/dist/settings/index.js
CHANGED
|
@@ -19,15 +19,15 @@
|
|
|
19
19
|
// ============================================================================
|
|
20
20
|
// Components
|
|
21
21
|
// ============================================================================
|
|
22
|
-
export { default as ThemeToggle } from
|
|
23
|
-
export { default as SettingsPanel } from
|
|
24
|
-
export { default as SettingsModal } from
|
|
25
|
-
export { SETTINGS_CATEGORIES, SETTINGS_CATEGORY_LABELS, SETTINGS_CATEGORY_ICONS, DEFAULT_THEME_SETTINGS, DEFAULT_EDITOR_SETTINGS, DEFAULT_UI_SETTINGS, DEFAULT_BEHAVIOR_SETTINGS, DEFAULT_API_SETTINGS, DEFAULT_SETTINGS, SETTINGS_STORAGE_KEY
|
|
22
|
+
export { default as ThemeToggle } from '../components/ThemeToggle.svelte';
|
|
23
|
+
export { default as SettingsPanel } from '../components/SettingsPanel.svelte';
|
|
24
|
+
export { default as SettingsModal } from '../components/SettingsModal.svelte';
|
|
25
|
+
export { SETTINGS_CATEGORIES, SETTINGS_CATEGORY_LABELS, SETTINGS_CATEGORY_ICONS, DEFAULT_THEME_SETTINGS, DEFAULT_EDITOR_SETTINGS, DEFAULT_UI_SETTINGS, DEFAULT_BEHAVIOR_SETTINGS, DEFAULT_API_SETTINGS, DEFAULT_SETTINGS, SETTINGS_STORAGE_KEY } from '../types/settings.js';
|
|
26
26
|
// ============================================================================
|
|
27
27
|
// Settings Stores
|
|
28
28
|
// ============================================================================
|
|
29
|
-
export { getSettings as settingsStore, getThemeSettings as themeSettings, getEditorSettings as editorSettings, getUiSettings as uiSettings, getBehaviorSettings as behaviorSettings, getApiSettings as apiSettings, getSyncStatus as syncStatusStore, updateSettings, resetSettings, getSettings, initializeSettings, setSettingsService, syncSettingsToApi, loadSettingsFromApi, onSettingsChange
|
|
29
|
+
export { getSettings as settingsStore, getThemeSettings as themeSettings, getEditorSettings as editorSettings, getUiSettings as uiSettings, getBehaviorSettings as behaviorSettings, getApiSettings as apiSettings, getSyncStatus as syncStatusStore, updateSettings, resetSettings, getSettings, initializeSettings, setSettingsService, syncSettingsToApi, loadSettingsFromApi, onSettingsChange } from '../stores/settingsStore.svelte.js';
|
|
30
30
|
// ============================================================================
|
|
31
31
|
// Settings Service
|
|
32
32
|
// ============================================================================
|
|
33
|
-
export { settingsApi, SettingsService, createSettingsService, setSettingsEndpointConfig, getSettingsEndpointConfig
|
|
33
|
+
export { settingsApi, SettingsService, createSettingsService, setSettingsEndpointConfig, getSettingsEndpointConfig } from '../services/settingsService.js';
|