@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
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import StatusLabel from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import StatusLabel from './StatusLabel.svelte';
|
|
4
4
|
|
|
5
5
|
const { Story } = defineMeta({
|
|
6
|
-
title:
|
|
6
|
+
title: 'Display/StatusLabel',
|
|
7
7
|
component: StatusLabel,
|
|
8
|
-
tags: [
|
|
8
|
+
tags: ['autodocs'],
|
|
9
9
|
argTypes: {
|
|
10
|
-
label: { control:
|
|
11
|
-
}
|
|
10
|
+
label: { control: 'text' }
|
|
11
|
+
}
|
|
12
12
|
});
|
|
13
13
|
</script>
|
|
14
14
|
|
|
15
|
-
<Story name="Default" args={{ label:
|
|
15
|
+
<Story name="Default" args={{ label: 'Ready' }} />
|
|
16
16
|
|
|
17
|
-
<Story name="Long Text" args={{ label:
|
|
17
|
+
<Story name="Long Text" args={{ label: 'Processing workflow execution...' }} />
|
|
@@ -11,7 +11,7 @@ declare const StatusLabel: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import StatusLabel from
|
|
14
|
+
import StatusLabel from './StatusLabel.svelte';
|
|
15
15
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
16
|
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
17
|
$$bindings?: Bindings;
|
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
-->
|
|
7
7
|
|
|
8
8
|
<script lang="ts">
|
|
9
|
-
import { untrack } from
|
|
10
|
-
import type { InteractiveSwapState } from
|
|
11
|
-
import type { PortCompatibilityChecker } from
|
|
12
|
-
import Icon from
|
|
13
|
-
import { getNodeIcon } from
|
|
14
|
-
import { getCategoryColorToken } from
|
|
15
|
-
import PortMappingRow from
|
|
16
|
-
import ConfigMappingRow from
|
|
9
|
+
import { untrack } from 'svelte';
|
|
10
|
+
import type { InteractiveSwapState } from '../utils/nodeSwap.js';
|
|
11
|
+
import type { PortCompatibilityChecker } from '../utils/connections.js';
|
|
12
|
+
import Icon from '@iconify/svelte';
|
|
13
|
+
import { getNodeIcon } from '../utils/icons.js';
|
|
14
|
+
import { getCategoryColorToken } from '../utils/colors.js';
|
|
15
|
+
import PortMappingRow from './PortMappingRow.svelte';
|
|
16
|
+
import ConfigMappingRow from './ConfigMappingRow.svelte';
|
|
17
17
|
|
|
18
18
|
interface Props {
|
|
19
19
|
interactiveState: InteractiveSwapState;
|
|
@@ -23,13 +23,12 @@
|
|
|
23
23
|
onBack: () => void;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const { interactiveState, checker, onConfirm, onCancel, onBack }: Props =
|
|
27
|
-
$props();
|
|
26
|
+
const { interactiveState, checker, onConfirm, onCancel, onBack }: Props = $props();
|
|
28
27
|
|
|
29
28
|
// Local mutable copy of the interactive state
|
|
30
29
|
// JSON round-trip is intentional: structuredClone fails on Svelte 5 proxies
|
|
31
30
|
let localState = $state<InteractiveSwapState>(
|
|
32
|
-
untrack(() => JSON.parse(JSON.stringify(interactiveState)))
|
|
31
|
+
untrack(() => JSON.parse(JSON.stringify(interactiveState)))
|
|
33
32
|
);
|
|
34
33
|
|
|
35
34
|
// Reinit when interactiveState changes
|
|
@@ -38,15 +37,9 @@
|
|
|
38
37
|
});
|
|
39
38
|
|
|
40
39
|
// Derived counts
|
|
41
|
-
let inputMappings = $derived(
|
|
42
|
-
|
|
43
|
-
);
|
|
44
|
-
let outputMappings = $derived(
|
|
45
|
-
localState.portMappings.filter((m) => m.direction === "output"),
|
|
46
|
-
);
|
|
47
|
-
let droppedCount = $derived(
|
|
48
|
-
localState.portMappings.filter((m) => !m.selectedNewPortId).length,
|
|
49
|
-
);
|
|
40
|
+
let inputMappings = $derived(localState.portMappings.filter((m) => m.direction === 'input'));
|
|
41
|
+
let outputMappings = $derived(localState.portMappings.filter((m) => m.direction === 'output'));
|
|
42
|
+
let droppedCount = $derived(localState.portMappings.filter((m) => !m.selectedNewPortId).length);
|
|
50
43
|
let connectionCount = $derived(localState.portMappings.length);
|
|
51
44
|
let hasDataLoss = $derived(droppedCount > 0);
|
|
52
45
|
|
|
@@ -54,7 +47,7 @@
|
|
|
54
47
|
let usedInputPortIds = $derived.by(() => {
|
|
55
48
|
const set = new Set<string>();
|
|
56
49
|
for (const m of localState.portMappings) {
|
|
57
|
-
if (m.direction ===
|
|
50
|
+
if (m.direction === 'input' && m.selectedNewPortId) {
|
|
58
51
|
set.add(m.selectedNewPortId);
|
|
59
52
|
}
|
|
60
53
|
}
|
|
@@ -64,7 +57,7 @@
|
|
|
64
57
|
let usedOutputPortIds = $derived.by(() => {
|
|
65
58
|
const set = new Set<string>();
|
|
66
59
|
for (const m of localState.portMappings) {
|
|
67
|
-
if (m.direction ===
|
|
60
|
+
if (m.direction === 'output' && m.selectedNewPortId) {
|
|
68
61
|
set.add(m.selectedNewPortId);
|
|
69
62
|
}
|
|
70
63
|
}
|
|
@@ -72,25 +65,23 @@
|
|
|
72
65
|
});
|
|
73
66
|
|
|
74
67
|
// Trivial swap: no connections and no config
|
|
75
|
-
let isTrivial = $derived(
|
|
76
|
-
connectionCount === 0 && localState.configMappings.length === 0,
|
|
77
|
-
);
|
|
68
|
+
let isTrivial = $derived(connectionCount === 0 && localState.configMappings.length === 0);
|
|
78
69
|
|
|
79
70
|
function handlePortUpdate(index: number, newPortId: string | null): void {
|
|
80
71
|
const mapping = localState.portMappings[index];
|
|
81
72
|
if (!mapping) return;
|
|
82
73
|
|
|
83
74
|
// For input ports: if this port is already used by another mapping, unmap the other
|
|
84
|
-
if (newPortId && mapping.direction ===
|
|
75
|
+
if (newPortId && mapping.direction === 'input') {
|
|
85
76
|
for (let i = 0; i < localState.portMappings.length; i++) {
|
|
86
77
|
if (i === index) continue;
|
|
87
78
|
const other = localState.portMappings[i];
|
|
88
|
-
if (other.direction ===
|
|
79
|
+
if (other.direction === 'input' && other.selectedNewPortId === newPortId) {
|
|
89
80
|
localState.portMappings[i] = {
|
|
90
81
|
...other,
|
|
91
82
|
selectedNewPortId: null,
|
|
92
|
-
matchQuality:
|
|
93
|
-
isOverridden: true
|
|
83
|
+
matchQuality: 'unmapped',
|
|
84
|
+
isOverridden: true
|
|
94
85
|
};
|
|
95
86
|
}
|
|
96
87
|
}
|
|
@@ -99,8 +90,8 @@
|
|
|
99
90
|
localState.portMappings[index] = {
|
|
100
91
|
...mapping,
|
|
101
92
|
selectedNewPortId: newPortId,
|
|
102
|
-
matchQuality: newPortId ?
|
|
103
|
-
isOverridden: true
|
|
93
|
+
matchQuality: newPortId ? 'manual' : 'unmapped',
|
|
94
|
+
isOverridden: true
|
|
104
95
|
};
|
|
105
96
|
}
|
|
106
97
|
|
|
@@ -112,9 +103,9 @@
|
|
|
112
103
|
...mapping,
|
|
113
104
|
selectedNewPortId: mapping.autoSuggestedPortId,
|
|
114
105
|
matchQuality: mapping.autoSuggestedPortId
|
|
115
|
-
? (interactiveState.portMappings[index]?.matchQuality ??
|
|
116
|
-
:
|
|
117
|
-
isOverridden: false
|
|
106
|
+
? (interactiveState.portMappings[index]?.matchQuality ?? 'type')
|
|
107
|
+
: 'unmapped',
|
|
108
|
+
isOverridden: false
|
|
118
109
|
};
|
|
119
110
|
}
|
|
120
111
|
|
|
@@ -126,7 +117,7 @@
|
|
|
126
117
|
|
|
127
118
|
localState.configMappings[idx] = {
|
|
128
119
|
...mapping,
|
|
129
|
-
carryOver: !mapping.carryOver
|
|
120
|
+
carryOver: !mapping.carryOver
|
|
130
121
|
};
|
|
131
122
|
}
|
|
132
123
|
|
|
@@ -138,11 +129,7 @@
|
|
|
138
129
|
<div class="swap-editor">
|
|
139
130
|
<!-- Header -->
|
|
140
131
|
<div class="swap-editor__header">
|
|
141
|
-
<button
|
|
142
|
-
class="swap-editor__back"
|
|
143
|
-
onclick={onBack}
|
|
144
|
-
aria-label="Back to node selection"
|
|
145
|
-
>
|
|
132
|
+
<button class="swap-editor__back" onclick={onBack} aria-label="Back to node selection">
|
|
146
133
|
<Icon icon="heroicons:arrow-left" />
|
|
147
134
|
</button>
|
|
148
135
|
<h2 class="swap-editor__title">Swap Mapping</h2>
|
|
@@ -230,9 +217,7 @@
|
|
|
230
217
|
{/each}
|
|
231
218
|
|
|
232
219
|
{#if localState.configMappings.some((m) => !m.isFlat)}
|
|
233
|
-
<div class="swap-editor__info-row">
|
|
234
|
-
Dynamic port config will not be carried over.
|
|
235
|
-
</div>
|
|
220
|
+
<div class="swap-editor__info-row">Dynamic port config will not be carried over.</div>
|
|
236
221
|
{/if}
|
|
237
222
|
{/if}
|
|
238
223
|
</div>
|
|
@@ -242,7 +227,7 @@
|
|
|
242
227
|
{#if hasDataLoss}
|
|
243
228
|
<div class="swap-editor__warning" role="alert">
|
|
244
229
|
<Icon icon="heroicons:exclamation-triangle" />
|
|
245
|
-
<span>{droppedCount} connection{droppedCount !== 1 ?
|
|
230
|
+
<span>{droppedCount} connection{droppedCount !== 1 ? 's' : ''} will be lost</span>
|
|
246
231
|
</div>
|
|
247
232
|
{/if}
|
|
248
233
|
|
|
@@ -256,9 +241,11 @@
|
|
|
256
241
|
class:swap-editor__btn--danger={hasDataLoss}
|
|
257
242
|
onclick={handleConfirm}
|
|
258
243
|
type="button"
|
|
259
|
-
aria-label={hasDataLoss
|
|
244
|
+
aria-label={hasDataLoss
|
|
245
|
+
? `Swap anyway — ${droppedCount} connections will be lost`
|
|
246
|
+
: 'Confirm swap'}
|
|
260
247
|
>
|
|
261
|
-
{hasDataLoss ?
|
|
248
|
+
{hasDataLoss ? 'Swap Anyway' : 'Confirm Swap'}
|
|
262
249
|
</button>
|
|
263
250
|
</div>
|
|
264
251
|
</div>
|
|
@@ -498,11 +485,7 @@
|
|
|
498
485
|
}
|
|
499
486
|
|
|
500
487
|
.swap-editor__btn--confirm {
|
|
501
|
-
background: linear-gradient(
|
|
502
|
-
135deg,
|
|
503
|
-
var(--fd-primary) 0%,
|
|
504
|
-
var(--fd-primary-hover) 100%
|
|
505
|
-
);
|
|
488
|
+
background: linear-gradient(135deg, var(--fd-primary) 0%, var(--fd-primary-hover) 100%);
|
|
506
489
|
color: var(--fd-primary-foreground);
|
|
507
490
|
box-shadow:
|
|
508
491
|
0 2px 8px rgba(59, 130, 246, 0.25),
|
|
@@ -510,11 +493,7 @@
|
|
|
510
493
|
}
|
|
511
494
|
|
|
512
495
|
.swap-editor__btn--confirm:hover {
|
|
513
|
-
background: linear-gradient(
|
|
514
|
-
135deg,
|
|
515
|
-
var(--fd-primary-hover) 0%,
|
|
516
|
-
var(--fd-primary) 100%
|
|
517
|
-
);
|
|
496
|
+
background: linear-gradient(135deg, var(--fd-primary-hover) 0%, var(--fd-primary) 100%);
|
|
518
497
|
box-shadow:
|
|
519
498
|
0 4px 12px rgba(59, 130, 246, 0.35),
|
|
520
499
|
inset 0 1px 0 rgba(255, 255, 255, 0.15);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { InteractiveSwapState } from
|
|
2
|
-
import type { PortCompatibilityChecker } from
|
|
1
|
+
import type { InteractiveSwapState } from '../utils/nodeSwap.js';
|
|
2
|
+
import type { PortCompatibilityChecker } from '../utils/connections.js';
|
|
3
3
|
interface Props {
|
|
4
4
|
interactiveState: InteractiveSwapState;
|
|
5
5
|
checker: PortCompatibilityChecker | null;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import ThemeToggle from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import ThemeToggle from './ThemeToggle.svelte';
|
|
4
4
|
|
|
5
5
|
const { Story } = defineMeta({
|
|
6
|
-
title:
|
|
6
|
+
title: 'Display/ThemeToggle',
|
|
7
7
|
component: ThemeToggle,
|
|
8
|
-
tags: [
|
|
8
|
+
tags: ['autodocs'],
|
|
9
9
|
argTypes: {
|
|
10
10
|
size: {
|
|
11
|
-
control: { type:
|
|
12
|
-
options: [
|
|
11
|
+
control: { type: 'select' },
|
|
12
|
+
options: ['sm', 'md', 'lg']
|
|
13
13
|
},
|
|
14
|
-
showLabel: { control:
|
|
15
|
-
}
|
|
14
|
+
showLabel: { control: 'boolean' }
|
|
15
|
+
}
|
|
16
16
|
});
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
19
|
<Story name="Default" />
|
|
20
20
|
|
|
21
|
-
<Story name="Small" args={{ size:
|
|
21
|
+
<Story name="Small" args={{ size: 'sm' }} />
|
|
22
22
|
|
|
23
|
-
<Story name="Large" args={{ size:
|
|
23
|
+
<Story name="Large" args={{ size: 'lg' }} />
|
|
24
24
|
|
|
25
25
|
<Story name="With Label" args={{ showLabel: true }} />
|
|
@@ -11,7 +11,7 @@ declare const ThemeToggle: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import ThemeToggle from
|
|
14
|
+
import ThemeToggle from './ThemeToggle.svelte';
|
|
15
15
|
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
16
16
|
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
17
|
$$bindings?: Bindings;
|
|
@@ -6,31 +6,23 @@
|
|
|
6
6
|
-->
|
|
7
7
|
|
|
8
8
|
<script lang="ts">
|
|
9
|
-
import Icon from
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
getResolvedTheme,
|
|
13
|
-
cycleTheme,
|
|
14
|
-
} from "../stores/settingsStore.svelte.js";
|
|
15
|
-
import type { ThemePreference } from "../types/settings.js";
|
|
9
|
+
import Icon from '@iconify/svelte';
|
|
10
|
+
import { getTheme, getResolvedTheme, cycleTheme } from '../stores/settingsStore.svelte.js';
|
|
11
|
+
import type { ThemePreference } from '../types/settings.js';
|
|
16
12
|
|
|
17
13
|
/**
|
|
18
14
|
* Props interface for ThemeToggle component
|
|
19
15
|
*/
|
|
20
16
|
interface Props {
|
|
21
17
|
/** Size variant of the toggle button */
|
|
22
|
-
size?:
|
|
18
|
+
size?: 'sm' | 'md' | 'lg';
|
|
23
19
|
/** Whether to show the theme label text */
|
|
24
20
|
showLabel?: boolean;
|
|
25
21
|
/** Custom class name for styling */
|
|
26
22
|
class?: string;
|
|
27
23
|
}
|
|
28
24
|
|
|
29
|
-
const {
|
|
30
|
-
size = "md",
|
|
31
|
-
showLabel = false,
|
|
32
|
-
class: className = "",
|
|
33
|
-
}: Props = $props();
|
|
25
|
+
const { size = 'md', showLabel = false, class: className = '' }: Props = $props();
|
|
34
26
|
|
|
35
27
|
/**
|
|
36
28
|
* Get the icon for the current theme
|
|
@@ -45,12 +37,12 @@
|
|
|
45
37
|
*/
|
|
46
38
|
function getThemeIcon(currentTheme: ThemePreference): string {
|
|
47
39
|
switch (currentTheme) {
|
|
48
|
-
case
|
|
49
|
-
return
|
|
50
|
-
case
|
|
51
|
-
return
|
|
52
|
-
case
|
|
53
|
-
return
|
|
40
|
+
case 'light':
|
|
41
|
+
return 'mdi:white-balance-sunny';
|
|
42
|
+
case 'dark':
|
|
43
|
+
return 'mdi:moon-waning-crescent';
|
|
44
|
+
case 'auto':
|
|
45
|
+
return 'mdi:desktop-mac';
|
|
54
46
|
}
|
|
55
47
|
}
|
|
56
48
|
|
|
@@ -64,12 +56,12 @@
|
|
|
64
56
|
*/
|
|
65
57
|
function getThemeLabel(currentTheme: ThemePreference): string {
|
|
66
58
|
switch (currentTheme) {
|
|
67
|
-
case
|
|
68
|
-
return
|
|
69
|
-
case
|
|
70
|
-
return
|
|
71
|
-
case
|
|
72
|
-
return
|
|
59
|
+
case 'light':
|
|
60
|
+
return 'Light';
|
|
61
|
+
case 'dark':
|
|
62
|
+
return 'Dark';
|
|
63
|
+
case 'auto':
|
|
64
|
+
return 'Auto';
|
|
73
65
|
}
|
|
74
66
|
}
|
|
75
67
|
|
|
@@ -81,15 +73,12 @@
|
|
|
81
73
|
/**
|
|
82
74
|
* Get tooltip text based on theme preference
|
|
83
75
|
*/
|
|
84
|
-
function getTooltipText(
|
|
85
|
-
currentTheme
|
|
86
|
-
resolved: "light" | "dark",
|
|
87
|
-
): string {
|
|
88
|
-
if (currentTheme === "auto") {
|
|
76
|
+
function getTooltipText(currentTheme: ThemePreference, resolved: 'light' | 'dark'): string {
|
|
77
|
+
if (currentTheme === 'auto') {
|
|
89
78
|
return `Theme: Auto (${resolved}). Click to switch to Light`;
|
|
90
79
|
}
|
|
91
|
-
const next = currentTheme ===
|
|
92
|
-
return `Theme: ${currentTheme ===
|
|
80
|
+
const next = currentTheme === 'light' ? 'Dark' : 'Auto';
|
|
81
|
+
return `Theme: ${currentTheme === 'light' ? 'Light' : 'Dark'}. Click to switch to ${next}`;
|
|
93
82
|
}
|
|
94
83
|
|
|
95
84
|
/**
|
|
@@ -103,7 +92,7 @@
|
|
|
103
92
|
* Handle keyboard events for accessibility
|
|
104
93
|
*/
|
|
105
94
|
function handleKeydown(event: KeyboardEvent): void {
|
|
106
|
-
if (event.key ===
|
|
95
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
107
96
|
event.preventDefault();
|
|
108
97
|
cycleTheme();
|
|
109
98
|
}
|
|
@@ -8,24 +8,20 @@
|
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<script lang="ts">
|
|
11
|
-
import type { WorkflowNode } from
|
|
12
|
-
import { nodeComponentRegistry } from
|
|
13
|
-
import { resolveBuiltinAlias } from
|
|
14
|
-
import NodeStatusOverlay from
|
|
15
|
-
import { shouldShowNodeStatus } from
|
|
16
|
-
import { resolveComponentName } from
|
|
11
|
+
import type { WorkflowNode } from '../types/index.js';
|
|
12
|
+
import { nodeComponentRegistry } from '../registry/nodeComponentRegistry.js';
|
|
13
|
+
import { resolveBuiltinAlias } from '../registry/builtinNodes.js';
|
|
14
|
+
import NodeStatusOverlay from './NodeStatusOverlay.svelte';
|
|
15
|
+
import { shouldShowNodeStatus } from '../utils/nodeWrapper.js';
|
|
16
|
+
import { resolveComponentName } from '../utils/nodeTypes.js';
|
|
17
17
|
|
|
18
18
|
let {
|
|
19
19
|
data,
|
|
20
|
-
selected = false
|
|
20
|
+
selected = false
|
|
21
21
|
}: {
|
|
22
|
-
data: WorkflowNode[
|
|
22
|
+
data: WorkflowNode['data'] & {
|
|
23
23
|
nodeId?: string;
|
|
24
|
-
onConfigOpen?: (node: {
|
|
25
|
-
id: string;
|
|
26
|
-
type: string;
|
|
27
|
-
data: WorkflowNode["data"];
|
|
28
|
-
}) => void;
|
|
24
|
+
onConfigOpen?: (node: { id: string; type: string; data: WorkflowNode['data'] }) => void;
|
|
29
25
|
};
|
|
30
26
|
selected?: boolean;
|
|
31
27
|
} = $props();
|
|
@@ -42,9 +38,7 @@
|
|
|
42
38
|
* This handles the logic of choosing between config.nodeType and metadata.type.
|
|
43
39
|
*/
|
|
44
40
|
let resolvedComponentName = $derived(
|
|
45
|
-
data.metadata
|
|
46
|
-
? resolveComponentName(data.metadata, configNodeType)
|
|
47
|
-
: "workflowNode",
|
|
41
|
+
data.metadata ? resolveComponentName(data.metadata, configNodeType) : 'workflowNode'
|
|
48
42
|
);
|
|
49
43
|
|
|
50
44
|
/**
|
|
@@ -62,7 +56,7 @@
|
|
|
62
56
|
* Hide for note nodes as they have their own styling.
|
|
63
57
|
*/
|
|
64
58
|
let shouldShowStatus = $derived(
|
|
65
|
-
shouldShowNodeStatus(executionInfo) && resolvedComponentName !==
|
|
59
|
+
shouldShowNodeStatus(executionInfo) && resolvedComponentName !== 'note'
|
|
66
60
|
);
|
|
67
61
|
|
|
68
62
|
/**
|
|
@@ -82,36 +76,30 @@
|
|
|
82
76
|
}
|
|
83
77
|
|
|
84
78
|
// Return the default component from registry
|
|
85
|
-
return nodeComponentRegistry.getComponent(
|
|
79
|
+
return nodeComponentRegistry.getComponent('workflowNode');
|
|
86
80
|
}
|
|
87
81
|
|
|
88
82
|
/**
|
|
89
83
|
* Get optimal status position for this node type.
|
|
90
84
|
* Uses registry if available, otherwise falls back to defaults.
|
|
91
85
|
*/
|
|
92
|
-
function getStatusPosition():
|
|
93
|
-
| "top-left"
|
|
94
|
-
| "top-right"
|
|
95
|
-
| "bottom-left"
|
|
96
|
-
| "bottom-right" {
|
|
86
|
+
function getStatusPosition(): 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' {
|
|
97
87
|
// Try registry first
|
|
98
|
-
const position = nodeComponentRegistry.getStatusPosition(
|
|
99
|
-
resolvedComponentName,
|
|
100
|
-
);
|
|
88
|
+
const position = nodeComponentRegistry.getStatusPosition(resolvedComponentName);
|
|
101
89
|
if (position) {
|
|
102
90
|
return position;
|
|
103
91
|
}
|
|
104
92
|
|
|
105
93
|
// Fallback based on node type
|
|
106
94
|
switch (resolvedComponentName) {
|
|
107
|
-
case
|
|
108
|
-
return
|
|
109
|
-
case
|
|
110
|
-
return
|
|
111
|
-
case
|
|
112
|
-
case
|
|
95
|
+
case 'tool':
|
|
96
|
+
return 'top-left';
|
|
97
|
+
case 'note':
|
|
98
|
+
return 'bottom-right';
|
|
99
|
+
case 'simple':
|
|
100
|
+
case 'square':
|
|
113
101
|
default:
|
|
114
|
-
return
|
|
102
|
+
return 'top-right';
|
|
115
103
|
}
|
|
116
104
|
}
|
|
117
105
|
|
|
@@ -119,7 +107,7 @@
|
|
|
119
107
|
* Get optimal status size for this node type.
|
|
120
108
|
* Uses registry if available, otherwise falls back to defaults.
|
|
121
109
|
*/
|
|
122
|
-
function getStatusSize():
|
|
110
|
+
function getStatusSize(): 'sm' | 'md' | 'lg' {
|
|
123
111
|
// Try registry first
|
|
124
112
|
const size = nodeComponentRegistry.getStatusSize(resolvedComponentName);
|
|
125
113
|
if (size) {
|
|
@@ -128,13 +116,13 @@
|
|
|
128
116
|
|
|
129
117
|
// Fallback based on node type
|
|
130
118
|
switch (resolvedComponentName) {
|
|
131
|
-
case
|
|
132
|
-
case
|
|
133
|
-
case
|
|
134
|
-
return
|
|
135
|
-
case
|
|
119
|
+
case 'tool':
|
|
120
|
+
case 'note':
|
|
121
|
+
case 'square':
|
|
122
|
+
return 'sm';
|
|
123
|
+
case 'simple':
|
|
136
124
|
default:
|
|
137
|
-
return
|
|
125
|
+
return 'md';
|
|
138
126
|
}
|
|
139
127
|
}
|
|
140
128
|
</script>
|
|
@@ -150,7 +138,7 @@
|
|
|
150
138
|
<!-- Status overlay - only show if there's meaningful status information -->
|
|
151
139
|
{#if shouldShowStatus}
|
|
152
140
|
<NodeStatusOverlay
|
|
153
|
-
nodeId={data.nodeId ??
|
|
141
|
+
nodeId={data.nodeId ?? 'unknown'}
|
|
154
142
|
{executionInfo}
|
|
155
143
|
position={getStatusPosition()}
|
|
156
144
|
size={getStatusSize()}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import type { WorkflowNode } from
|
|
1
|
+
import type { WorkflowNode } from '../types/index.js';
|
|
2
2
|
type $$ComponentProps = {
|
|
3
|
-
data: WorkflowNode[
|
|
3
|
+
data: WorkflowNode['data'] & {
|
|
4
4
|
nodeId?: string;
|
|
5
5
|
onConfigOpen?: (node: {
|
|
6
6
|
id: string;
|
|
7
7
|
type: string;
|
|
8
|
-
data: WorkflowNode[
|
|
8
|
+
data: WorkflowNode['data'];
|
|
9
9
|
}) => void;
|
|
10
10
|
};
|
|
11
11
|
selected?: boolean;
|