@flowdrop/flowdrop 1.4.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 +94 -51
- package/dist/adapters/WorkflowAdapter.d.ts +1 -1
- package/dist/adapters/WorkflowAdapter.js +27 -47
- 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 +52 -6
- package/dist/adapters/agentspec/autoLayout.js +118 -23
- 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.d.ts +19 -0
- package/dist/chat/commandClassifier.js +30 -0
- package/dist/chat/index.d.ts +27 -0
- package/dist/chat/index.js +32 -0
- package/dist/chat/responseParser.d.ts +21 -0
- package/dist/chat/responseParser.js +91 -0
- package/dist/commands/batch.d.ts +18 -0
- package/dist/commands/batch.js +54 -0
- package/dist/commands/executor.d.ts +37 -0
- package/dist/commands/executor.js +1133 -0
- package/dist/commands/index.d.ts +14 -0
- package/dist/commands/index.js +17 -0
- package/dist/commands/parser.d.ts +16 -0
- package/dist/commands/parser.js +295 -0
- package/dist/commands/positioner.d.ts +19 -0
- package/dist/commands/positioner.js +33 -0
- package/dist/commands/storeIntegration.svelte.d.ts +16 -0
- package/dist/commands/storeIntegration.svelte.js +67 -0
- package/dist/commands/types.d.ts +343 -0
- package/dist/commands/types.js +45 -0
- package/dist/components/App.svelte +522 -237
- package/dist/components/App.svelte.d.ts +11 -8
- 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 +37 -0
- package/dist/components/CanvasController.svelte.d.ts +32 -0
- package/dist/components/ConfigForm.svelte +118 -256
- package/dist/components/ConfigForm.svelte.d.ts +2 -2
- package/dist/components/ConfigMappingRow.svelte +128 -0
- package/dist/components/ConfigMappingRow.svelte.d.ts +8 -0
- 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 +57 -19
- package/dist/components/ConfigPanel.svelte.d.ts +3 -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 +11 -19
- 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 +46 -53
- 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 +55 -135
- 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 +493 -0
- package/dist/components/NodeSwapPicker.svelte.d.ts +16 -0
- 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 +205 -0
- package/dist/components/PortMappingRow.svelte.d.ts +12 -0
- 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 +529 -0
- package/dist/components/SwapMappingEditor.svelte.d.ts +12 -0
- 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 +210 -170
- package/dist/components/WorkflowEditor.svelte.d.ts +12 -4
- package/dist/components/chat/AIChatPanel.svelte +797 -0
- package/dist/components/chat/AIChatPanel.svelte.d.ts +13 -0
- package/dist/components/chat/CommandPreview.svelte +234 -0
- package/dist/components/chat/CommandPreview.svelte.d.ts +9 -0
- package/dist/components/console/CommandConsole.stories.svelte +111 -0
- package/dist/components/console/CommandConsole.stories.svelte.d.ts +27 -0
- package/dist/components/console/CommandConsole.svelte +263 -0
- package/dist/components/console/CommandConsole.svelte.d.ts +11 -0
- package/dist/components/console/ConsoleAutocomplete.svelte +142 -0
- package/dist/components/console/ConsoleAutocomplete.svelte.d.ts +21 -0
- package/dist/components/console/ConsoleInput.svelte +771 -0
- package/dist/components/console/ConsoleInput.svelte.d.ts +16 -0
- package/dist/components/console/ConsoleOutput.svelte +116 -0
- package/dist/components/console/ConsoleOutput.svelte.d.ts +11 -0
- package/dist/components/console/formatters.d.ts +26 -0
- package/dist/components/console/formatters.js +116 -0
- 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 -5
- package/dist/components/interrupt/index.js +6 -5
- 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 +12 -4
- package/dist/config/endpoints.js +70 -65
- package/dist/config/runtimeConfig.d.ts +2 -2
- package/dist/config/runtimeConfig.js +8 -8
- package/dist/core/index.d.ts +68 -63
- package/dist/core/index.js +44 -35
- package/dist/display/index.d.ts +2 -2
- package/dist/display/index.js +2 -2
- package/dist/editor/index.d.ts +64 -62
- package/dist/editor/index.js +57 -55
- 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 +40 -35
- package/dist/helpers/workflowEditorHelper.d.ts +8 -58
- package/dist/helpers/workflowEditorHelper.js +73 -292
- 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 +107 -22
- 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 +65 -0
- package/dist/services/chatService.js +131 -0
- 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 +7 -5
- package/dist/services/historyService.js +29 -14
- 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 +27 -22
- package/dist/stores/playgroundStore.svelte.d.ts +3 -3
- package/dist/stores/playgroundStore.svelte.js +29 -23
- package/dist/stores/portCoordinateStore.svelte.d.ts +6 -2
- package/dist/stores/portCoordinateStore.svelte.js +30 -39
- package/dist/stores/settingsStore.svelte.d.ts +2 -2
- package/dist/stores/settingsStore.svelte.js +57 -62
- package/dist/stores/workflowStore.svelte.d.ts +34 -5
- package/dist/stores/workflowStore.svelte.js +127 -108
- 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 +63 -0
- package/dist/types/chat.js +9 -0
- package/dist/types/config.d.ts +6 -6
- package/dist/types/events.d.ts +28 -2
- package/dist/types/events.js +2 -1
- package/dist/types/index.d.ts +40 -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 +12 -4
- package/dist/types/settings.js +21 -23
- 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 +42 -0
- package/dist/utils/edgeStyling.js +173 -0
- 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 +31 -0
- package/dist/utils/nodeIds.js +42 -0
- package/dist/utils/nodeStatus.d.ts +1 -1
- package/dist/utils/nodeStatus.js +48 -48
- package/dist/utils/nodeSwap.d.ts +221 -0
- package/dist/utils/nodeSwap.js +680 -0
- 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 +12 -11
- package/dist/helpers/nodeLayoutHelper.d.ts +0 -14
- package/dist/helpers/nodeLayoutHelper.js +0 -19
|
@@ -5,18 +5,14 @@
|
|
|
5
5
|
-->
|
|
6
6
|
|
|
7
7
|
<script lang="ts">
|
|
8
|
-
import type {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} from
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
import { getCategoryColorToken } from "../utils/colors.js";
|
|
17
|
-
import { getCategoryLabel } from "../stores/categoriesStore.svelte.js";
|
|
18
|
-
import { SvelteSet } from "svelte/reactivity";
|
|
19
|
-
import { getUiSettings } from "../stores/settingsStore.svelte.js";
|
|
8
|
+
import type { NodeMetadata, NodeCategory, WorkflowFormat } from '../types/index.js';
|
|
9
|
+
import LoadingSpinner from './LoadingSpinner.svelte';
|
|
10
|
+
import Icon from '@iconify/svelte';
|
|
11
|
+
import { getNodeIcon, getCategoryIcon } from '../utils/icons.js';
|
|
12
|
+
import { getCategoryColorToken } from '../utils/colors.js';
|
|
13
|
+
import { getCategoryLabel } from '../stores/categoriesStore.svelte.js';
|
|
14
|
+
import { getUiSettings } from '../stores/settingsStore.svelte.js';
|
|
15
|
+
import { extractConfigDefaults } from '../utils/nodeIds.js';
|
|
20
16
|
|
|
21
17
|
interface Props {
|
|
22
18
|
nodes: NodeMetadata[];
|
|
@@ -29,9 +25,9 @@
|
|
|
29
25
|
}
|
|
30
26
|
|
|
31
27
|
let props: Props = $props();
|
|
32
|
-
let searchInput = $state(
|
|
28
|
+
let searchInput = $state('');
|
|
33
29
|
// svelte-ignore state_referenced_locally — initial default, user selects interactively
|
|
34
|
-
let selectedCategory = $state(props.selectedCategory ||
|
|
30
|
+
let selectedCategory = $state(props.selectedCategory || 'all');
|
|
35
31
|
|
|
36
32
|
/**
|
|
37
33
|
* Check if a node is compatible with the active workflow format.
|
|
@@ -47,13 +43,25 @@
|
|
|
47
43
|
let isCollapsed = $derived(getUiSettings().sidebarCollapsed);
|
|
48
44
|
|
|
49
45
|
/** Nodes filtered by format compatibility */
|
|
50
|
-
let formatCompatibleNodes = $derived(
|
|
51
|
-
(props.nodes || []).filter(isNodeCompatibleWithFormat),
|
|
52
|
-
);
|
|
46
|
+
let formatCompatibleNodes = $derived((props.nodes || []).filter(isNodeCompatibleWithFormat));
|
|
53
47
|
|
|
54
48
|
let filteredNodes = $derived(getFilteredNodes());
|
|
55
49
|
let categories = $derived(getCategories());
|
|
56
50
|
|
|
51
|
+
/** Group already-filtered results by category in a single pass */
|
|
52
|
+
let filteredNodesByCategory = $derived.by(() => {
|
|
53
|
+
const map = new Map<string, NodeMetadata[]>();
|
|
54
|
+
for (const node of filteredNodes) {
|
|
55
|
+
let list = map.get(node.category);
|
|
56
|
+
if (!list) {
|
|
57
|
+
list = [];
|
|
58
|
+
map.set(node.category, list);
|
|
59
|
+
}
|
|
60
|
+
list.push(node);
|
|
61
|
+
}
|
|
62
|
+
return map;
|
|
63
|
+
});
|
|
64
|
+
|
|
57
65
|
/**
|
|
58
66
|
* Get all unique categories from node types, preserving API order
|
|
59
67
|
* Categories appear in the order their first node appears in the API response
|
|
@@ -61,7 +69,7 @@
|
|
|
61
69
|
function getCategories(): NodeCategory[] {
|
|
62
70
|
if (formatCompatibleNodes.length === 0) return [];
|
|
63
71
|
// Use a Set to track uniqueness while preserving insertion order
|
|
64
|
-
const seen = new
|
|
72
|
+
const seen = new Set<NodeCategory>();
|
|
65
73
|
const orderedCategories: NodeCategory[] = [];
|
|
66
74
|
for (const node of formatCompatibleNodes) {
|
|
67
75
|
if (!seen.has(node.category)) {
|
|
@@ -81,7 +89,7 @@
|
|
|
81
89
|
let filtered = formatCompatibleNodes;
|
|
82
90
|
|
|
83
91
|
// Filter by category
|
|
84
|
-
if (selectedCategory !==
|
|
92
|
+
if (selectedCategory !== 'all') {
|
|
85
93
|
filtered = filtered.filter((node) => node.category === selectedCategory);
|
|
86
94
|
}
|
|
87
95
|
|
|
@@ -92,7 +100,7 @@
|
|
|
92
100
|
(node) =>
|
|
93
101
|
node.name.toLowerCase().includes(query) ||
|
|
94
102
|
node.description.toLowerCase().includes(query) ||
|
|
95
|
-
node.tags?.some((tag) => tag.toLowerCase().includes(query))
|
|
103
|
+
node.tags?.some((tag) => tag.toLowerCase().includes(query))
|
|
96
104
|
);
|
|
97
105
|
}
|
|
98
106
|
|
|
@@ -106,50 +114,28 @@
|
|
|
106
114
|
function handleNodeDragStart(event: DragEvent, nodeType: NodeMetadata): void {
|
|
107
115
|
if (!event.dataTransfer) return;
|
|
108
116
|
|
|
109
|
-
// Extract initial config from configSchema with proper null checks
|
|
110
|
-
let initialConfig: Record<string, unknown> = {};
|
|
111
|
-
if (
|
|
112
|
-
nodeType.configSchema &&
|
|
113
|
-
typeof nodeType.configSchema === "object" &&
|
|
114
|
-
nodeType.configSchema.properties &&
|
|
115
|
-
typeof nodeType.configSchema.properties === "object"
|
|
116
|
-
) {
|
|
117
|
-
// JSON Schema format - extract defaults
|
|
118
|
-
Object.entries(nodeType.configSchema.properties).forEach(
|
|
119
|
-
([key, prop]) => {
|
|
120
|
-
if (prop && typeof prop === "object" && "default" in prop) {
|
|
121
|
-
initialConfig[key] = prop.default;
|
|
122
|
-
}
|
|
123
|
-
},
|
|
124
|
-
);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
117
|
// Create a new node instance from the node type
|
|
128
118
|
const newNodeData = {
|
|
129
|
-
type:
|
|
119
|
+
type: 'node',
|
|
130
120
|
nodeType: nodeType.id,
|
|
131
121
|
nodeData: {
|
|
132
122
|
label: nodeType.name,
|
|
133
|
-
config:
|
|
134
|
-
metadata: nodeType
|
|
135
|
-
}
|
|
123
|
+
config: extractConfigDefaults(nodeType.configSchema),
|
|
124
|
+
metadata: nodeType
|
|
125
|
+
}
|
|
136
126
|
};
|
|
137
127
|
|
|
138
128
|
const jsonData = JSON.stringify(newNodeData);
|
|
139
129
|
|
|
140
130
|
// Set the data that SvelteFlow will receive
|
|
141
|
-
event.dataTransfer.setData(
|
|
142
|
-
event.dataTransfer.setData(
|
|
143
|
-
event.dataTransfer.effectAllowed =
|
|
131
|
+
event.dataTransfer.setData('application/json', jsonData);
|
|
132
|
+
event.dataTransfer.setData('text/plain', nodeType.name);
|
|
133
|
+
event.dataTransfer.effectAllowed = 'copy';
|
|
144
134
|
|
|
145
135
|
// Set drag image
|
|
146
136
|
if (event.target) {
|
|
147
137
|
const rect = (event.target as HTMLElement).getBoundingClientRect();
|
|
148
|
-
event.dataTransfer.setDragImage(
|
|
149
|
-
event.target as HTMLElement,
|
|
150
|
-
rect.width / 2,
|
|
151
|
-
rect.height / 2,
|
|
152
|
-
);
|
|
138
|
+
event.dataTransfer.setDragImage(event.target as HTMLElement, rect.width / 2, rect.height / 2);
|
|
153
139
|
}
|
|
154
140
|
}
|
|
155
141
|
|
|
@@ -174,34 +160,6 @@
|
|
|
174
160
|
function getCategoryDisplayName(category: NodeCategory): string {
|
|
175
161
|
return getCategoryLabel(category);
|
|
176
162
|
}
|
|
177
|
-
|
|
178
|
-
/**
|
|
179
|
-
* Get node types for category
|
|
180
|
-
* Preserves the API order - no client-side sorting applied
|
|
181
|
-
*/
|
|
182
|
-
function getNodesForCategory(category: NodeCategory): NodeMetadata[] {
|
|
183
|
-
return formatCompatibleNodes.filter((node) => node.category === category);
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
/**
|
|
187
|
-
* Get filtered nodes for category
|
|
188
|
-
*/
|
|
189
|
-
function getFilteredNodesForCategory(category: NodeCategory): NodeMetadata[] {
|
|
190
|
-
let nodes = getNodesForCategory(category);
|
|
191
|
-
|
|
192
|
-
// Filter by search query
|
|
193
|
-
if (searchInput.trim()) {
|
|
194
|
-
const query = searchInput.toLowerCase();
|
|
195
|
-
nodes = nodes.filter(
|
|
196
|
-
(node) =>
|
|
197
|
-
node.name.toLowerCase().includes(query) ||
|
|
198
|
-
node.description.toLowerCase().includes(query) ||
|
|
199
|
-
node.tags?.some((tag) => tag.toLowerCase().includes(query)),
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
return nodes;
|
|
204
|
-
}
|
|
205
163
|
</script>
|
|
206
164
|
|
|
207
165
|
<!-- Components Sidebar -->
|
|
@@ -224,10 +182,7 @@
|
|
|
224
182
|
oninput={handleSearchChange}
|
|
225
183
|
/>
|
|
226
184
|
</div>
|
|
227
|
-
<button
|
|
228
|
-
class="flowdrop-btn flowdrop-join__item"
|
|
229
|
-
aria-label="Search components"
|
|
230
|
-
>
|
|
185
|
+
<button class="flowdrop-btn flowdrop-join__item" aria-label="Search components">
|
|
231
186
|
<Icon icon="mdi:magnify" class="flowdrop-icon" />
|
|
232
187
|
</button>
|
|
233
188
|
</div>
|
|
@@ -264,9 +219,7 @@
|
|
|
264
219
|
</svg>
|
|
265
220
|
</div>
|
|
266
221
|
<h3 class="flowdrop-hero__title">No node types available</h3>
|
|
267
|
-
<p class="flowdrop-hero__description">
|
|
268
|
-
Node type definitions will appear here
|
|
269
|
-
</p>
|
|
222
|
+
<p class="flowdrop-hero__description">Node type definitions will appear here</p>
|
|
270
223
|
{/if}
|
|
271
224
|
</div>
|
|
272
225
|
</div>
|
|
@@ -296,9 +249,7 @@
|
|
|
296
249
|
</svg>
|
|
297
250
|
</div>
|
|
298
251
|
<h3 class="flowdrop-hero__title">No components found</h3>
|
|
299
|
-
<p class="flowdrop-hero__description">
|
|
300
|
-
Try adjusting your search
|
|
301
|
-
</p>
|
|
252
|
+
<p class="flowdrop-hero__description">Try adjusting your search</p>
|
|
302
253
|
{#if props.loading}
|
|
303
254
|
<div class="flowdrop-mb--4">
|
|
304
255
|
<LoadingSpinner size="sm" text="Loading components..." />
|
|
@@ -317,19 +268,13 @@
|
|
|
317
268
|
tabindex="0"
|
|
318
269
|
>
|
|
319
270
|
<div class="flowdrop-card__body flowdrop-p--1 flowdrop-py--1">
|
|
320
|
-
<div
|
|
321
|
-
class="flowdrop-flex flowdrop-gap--2 flowdrop-items--center"
|
|
322
|
-
>
|
|
271
|
+
<div class="flowdrop-flex flowdrop-gap--2 flowdrop-items--center">
|
|
323
272
|
<!-- Node Type Icon with Squircle Background -->
|
|
324
273
|
<span
|
|
325
274
|
class="flowdrop-node-icon"
|
|
326
|
-
style="--_icon-color: {getCategoryColorToken(
|
|
327
|
-
nodeType.category,
|
|
328
|
-
)}"
|
|
275
|
+
style="--_icon-color: {getCategoryColorToken(nodeType.category)}"
|
|
329
276
|
>
|
|
330
|
-
<Icon
|
|
331
|
-
icon={getNodeIcon(nodeType.icon, nodeType.category)}
|
|
332
|
-
/>
|
|
277
|
+
<Icon icon={getNodeIcon(nodeType.icon, nodeType.category)} />
|
|
333
278
|
</span>
|
|
334
279
|
|
|
335
280
|
<!-- Node Type Info - Icon and Title only -->
|
|
@@ -356,7 +301,7 @@
|
|
|
356
301
|
<!-- Category-specific details -->
|
|
357
302
|
<div class="flowdrop-category-list">
|
|
358
303
|
{#each categories as category (category)}
|
|
359
|
-
{@const categoryNodes =
|
|
304
|
+
{@const categoryNodes = filteredNodesByCategory.get(category) ?? []}
|
|
360
305
|
{#if categoryNodes.length > 0}
|
|
361
306
|
<!-- Flat style: label + dot+name rows (shown/hidden via CSS token) -->
|
|
362
307
|
<div class="fd-sidebar-flat-section">
|
|
@@ -373,7 +318,7 @@
|
|
|
373
318
|
role="button"
|
|
374
319
|
tabindex="0"
|
|
375
320
|
onkeydown={(e) => {
|
|
376
|
-
if (e.key ===
|
|
321
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
377
322
|
e.preventDefault();
|
|
378
323
|
handleNodeClick(nodeType);
|
|
379
324
|
}
|
|
@@ -381,9 +326,7 @@
|
|
|
381
326
|
>
|
|
382
327
|
<span
|
|
383
328
|
class="fd-sidebar-flat-dot"
|
|
384
|
-
style="background: {getCategoryColorToken(
|
|
385
|
-
nodeType.category,
|
|
386
|
-
)}"
|
|
329
|
+
style="background: {getCategoryColorToken(nodeType.category)}"
|
|
387
330
|
></span>
|
|
388
331
|
<span class="fd-sidebar-flat-name">{nodeType.name}</span>
|
|
389
332
|
</div>
|
|
@@ -396,9 +339,7 @@
|
|
|
396
339
|
open={props.categoriesDefaultOpen || undefined}
|
|
397
340
|
>
|
|
398
341
|
<summary class="flowdrop-details__summary">
|
|
399
|
-
<div
|
|
400
|
-
class="flowdrop-flex flowdrop-gap--2 flowdrop-items--center"
|
|
401
|
-
>
|
|
342
|
+
<div class="flowdrop-flex flowdrop-gap--2 flowdrop-items--center">
|
|
402
343
|
<span
|
|
403
344
|
class="flowdrop-node-icon"
|
|
404
345
|
style="--_icon-color: {getCategoryColorToken(category)}"
|
|
@@ -422,31 +363,20 @@
|
|
|
422
363
|
role="button"
|
|
423
364
|
tabindex="0"
|
|
424
365
|
onkeydown={(e) => {
|
|
425
|
-
if (e.key ===
|
|
366
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
426
367
|
e.preventDefault();
|
|
427
368
|
handleNodeClick(nodeType);
|
|
428
369
|
}
|
|
429
370
|
}}
|
|
430
371
|
>
|
|
431
|
-
<div
|
|
432
|
-
class="flowdrop-
|
|
433
|
-
>
|
|
434
|
-
<div
|
|
435
|
-
class="flowdrop-flex flowdrop-gap--2 flowdrop-items--center"
|
|
436
|
-
>
|
|
372
|
+
<div class="flowdrop-card__body flowdrop-p--1 flowdrop-py--1">
|
|
373
|
+
<div class="flowdrop-flex flowdrop-gap--2 flowdrop-items--center">
|
|
437
374
|
<!-- Node Type Icon with Squircle Background -->
|
|
438
375
|
<span
|
|
439
376
|
class="flowdrop-node-icon"
|
|
440
|
-
style="--_icon-color: {getCategoryColorToken(
|
|
441
|
-
nodeType.category,
|
|
442
|
-
)}"
|
|
377
|
+
style="--_icon-color: {getCategoryColorToken(nodeType.category)}"
|
|
443
378
|
>
|
|
444
|
-
<Icon
|
|
445
|
-
icon={getNodeIcon(
|
|
446
|
-
nodeType.icon,
|
|
447
|
-
nodeType.category,
|
|
448
|
-
)}
|
|
449
|
-
/>
|
|
379
|
+
<Icon icon={getNodeIcon(nodeType.icon, nodeType.category)} />
|
|
450
380
|
</span>
|
|
451
381
|
|
|
452
382
|
<!-- Node Type Info - Icon and Title only -->
|
|
@@ -479,16 +409,12 @@
|
|
|
479
409
|
<div class="flowdrop-flex flowdrop-gap--4">
|
|
480
410
|
<div class="flowdrop-flex flowdrop-gap--4">
|
|
481
411
|
{#if props.loading && props.nodes?.length === 0}
|
|
482
|
-
<span class="flowdrop-text--xs flowdrop-text--gray"
|
|
483
|
-
>Loading components...</span
|
|
484
|
-
>
|
|
412
|
+
<span class="flowdrop-text--xs flowdrop-text--gray">Loading components...</span>
|
|
485
413
|
{:else}
|
|
486
414
|
<span class="flowdrop-text--xs flowdrop-text--gray"
|
|
487
415
|
>Total: {props.nodes?.length || 0} components</span
|
|
488
416
|
>
|
|
489
|
-
<span class="flowdrop-text--xs flowdrop-text--gray"
|
|
490
|
-
>Showing: {filteredNodes.length}</span
|
|
491
|
-
>
|
|
417
|
+
<span class="flowdrop-text--xs flowdrop-text--gray">Showing: {filteredNodes.length}</span>
|
|
492
418
|
{/if}
|
|
493
419
|
</div>
|
|
494
420
|
</div>
|
|
@@ -498,9 +424,7 @@
|
|
|
498
424
|
<style>
|
|
499
425
|
/* Components Sidebar - Always Visible */
|
|
500
426
|
.flowdrop-sidebar {
|
|
501
|
-
height: calc(
|
|
502
|
-
100vh - var(--fd-navbar-height)
|
|
503
|
-
); /* Account for navbar height */
|
|
427
|
+
height: calc(100vh - var(--fd-navbar-height)); /* Account for navbar height */
|
|
504
428
|
background-color: var(--fd-background);
|
|
505
429
|
border-right: 1px solid var(--fd-border);
|
|
506
430
|
display: flex;
|
|
@@ -631,11 +555,7 @@
|
|
|
631
555
|
width: 2rem;
|
|
632
556
|
height: 2rem;
|
|
633
557
|
border-radius: 0.5rem;
|
|
634
|
-
background: color-mix(
|
|
635
|
-
in srgb,
|
|
636
|
-
var(--_icon-color) var(--fd-node-icon-bg-opacity),
|
|
637
|
-
transparent
|
|
638
|
-
);
|
|
558
|
+
background: color-mix(in srgb, var(--_icon-color) var(--fd-node-icon-bg-opacity), transparent);
|
|
639
559
|
color: var(--fd-node-icon);
|
|
640
560
|
font-size: var(--fd-text-sm);
|
|
641
561
|
display: flex;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { NodeMetadata, NodeCategory, WorkflowFormat } from
|
|
1
|
+
import type { NodeMetadata, NodeCategory, WorkflowFormat } from '../types/index.js';
|
|
2
2
|
interface Props {
|
|
3
3
|
nodes: NodeMetadata[];
|
|
4
4
|
/** Whether node types are still being fetched. Default: false */
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import NodeStatusOverlay from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import NodeStatusOverlay from './NodeStatusOverlay.svelte';
|
|
4
4
|
|
|
5
5
|
const { Story } = defineMeta({
|
|
6
|
-
title:
|
|
7
|
-
tags: [
|
|
6
|
+
title: 'Editor/NodeStatusOverlay',
|
|
7
|
+
tags: ['autodocs'],
|
|
8
8
|
parameters: {
|
|
9
|
-
layout:
|
|
10
|
-
}
|
|
9
|
+
layout: 'centered'
|
|
10
|
+
}
|
|
11
11
|
});
|
|
12
12
|
</script>
|
|
13
13
|
|
|
@@ -17,16 +17,14 @@
|
|
|
17
17
|
>
|
|
18
18
|
<NodeStatusOverlay
|
|
19
19
|
executionInfo={{
|
|
20
|
-
status:
|
|
20
|
+
status: 'idle',
|
|
21
21
|
executionCount: 3,
|
|
22
22
|
isExecuting: false,
|
|
23
|
-
lastExecuted: new Date().toISOString()
|
|
23
|
+
lastExecuted: new Date().toISOString()
|
|
24
24
|
}}
|
|
25
25
|
showDetails
|
|
26
26
|
/>
|
|
27
|
-
<div
|
|
28
|
-
style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);"
|
|
29
|
-
>
|
|
27
|
+
<div style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);">
|
|
30
28
|
Node Content
|
|
31
29
|
</div>
|
|
32
30
|
</div>
|
|
@@ -38,14 +36,12 @@
|
|
|
38
36
|
>
|
|
39
37
|
<NodeStatusOverlay
|
|
40
38
|
executionInfo={{
|
|
41
|
-
status:
|
|
39
|
+
status: 'running',
|
|
42
40
|
executionCount: 1,
|
|
43
|
-
isExecuting: true
|
|
41
|
+
isExecuting: true
|
|
44
42
|
}}
|
|
45
43
|
/>
|
|
46
|
-
<div
|
|
47
|
-
style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);"
|
|
48
|
-
>
|
|
44
|
+
<div style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);">
|
|
49
45
|
Processing...
|
|
50
46
|
</div>
|
|
51
47
|
</div>
|
|
@@ -57,19 +53,15 @@
|
|
|
57
53
|
>
|
|
58
54
|
<NodeStatusOverlay
|
|
59
55
|
executionInfo={{
|
|
60
|
-
status:
|
|
56
|
+
status: 'completed',
|
|
61
57
|
executionCount: 5,
|
|
62
58
|
isExecuting: false,
|
|
63
59
|
lastExecuted: new Date().toISOString(),
|
|
64
|
-
lastExecutionDuration: 1250
|
|
60
|
+
lastExecutionDuration: 1250
|
|
65
61
|
}}
|
|
66
62
|
showDetails
|
|
67
63
|
/>
|
|
68
|
-
<div
|
|
69
|
-
style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);"
|
|
70
|
-
>
|
|
71
|
-
Done!
|
|
72
|
-
</div>
|
|
64
|
+
<div style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);">Done!</div>
|
|
73
65
|
</div>
|
|
74
66
|
</Story>
|
|
75
67
|
|
|
@@ -79,19 +71,15 @@
|
|
|
79
71
|
>
|
|
80
72
|
<NodeStatusOverlay
|
|
81
73
|
executionInfo={{
|
|
82
|
-
status:
|
|
74
|
+
status: 'failed',
|
|
83
75
|
executionCount: 2,
|
|
84
76
|
isExecuting: false,
|
|
85
|
-
lastError:
|
|
77
|
+
lastError: 'Connection timeout',
|
|
86
78
|
lastExecuted: new Date().toISOString(),
|
|
87
|
-
lastExecutionDuration: 30000
|
|
79
|
+
lastExecutionDuration: 30000
|
|
88
80
|
}}
|
|
89
81
|
showDetails
|
|
90
82
|
/>
|
|
91
|
-
<div
|
|
92
|
-
style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);"
|
|
93
|
-
>
|
|
94
|
-
Error
|
|
95
|
-
</div>
|
|
83
|
+
<div style="padding: 1rem; text-align: center; color: var(--fd-text, #374151);">Error</div>
|
|
96
84
|
</div>
|
|
97
85
|
</Story>
|
|
@@ -11,7 +11,7 @@ declare const NodeStatusOverlay: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import NodeStatusOverlay from
|
|
14
|
+
import NodeStatusOverlay from './NodeStatusOverlay.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,80 +6,78 @@
|
|
|
6
6
|
-->
|
|
7
7
|
|
|
8
8
|
<script lang="ts">
|
|
9
|
-
import type { NodeExecutionInfo } from
|
|
10
|
-
import Icon from
|
|
11
|
-
import StatusLabel from
|
|
9
|
+
import type { NodeExecutionInfo } from '../types/index.js';
|
|
10
|
+
import Icon from '@iconify/svelte';
|
|
11
|
+
import StatusLabel from './StatusLabel.svelte';
|
|
12
12
|
import {
|
|
13
13
|
getStatusColor,
|
|
14
14
|
getStatusIcon,
|
|
15
15
|
getStatusLabel,
|
|
16
16
|
getStatusBackgroundColor,
|
|
17
17
|
formatExecutionDuration,
|
|
18
|
-
formatLastExecuted
|
|
19
|
-
} from
|
|
18
|
+
formatLastExecuted
|
|
19
|
+
} from '../utils/nodeStatus.js';
|
|
20
20
|
|
|
21
21
|
interface Props {
|
|
22
22
|
nodeId?: string;
|
|
23
23
|
executionInfo?: NodeExecutionInfo;
|
|
24
|
-
position?:
|
|
25
|
-
size?:
|
|
24
|
+
position?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
25
|
+
size?: 'sm' | 'md' | 'lg';
|
|
26
26
|
showDetails?: boolean;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
let props: Props = $props();
|
|
30
30
|
|
|
31
31
|
// Default values
|
|
32
|
-
let position = $derived(props.position ||
|
|
33
|
-
let size = $derived(props.size ||
|
|
32
|
+
let position = $derived(props.position || 'top-right');
|
|
33
|
+
let size = $derived(props.size || 'md');
|
|
34
34
|
let showDetails = $derived(props.showDetails || false);
|
|
35
35
|
let isHovered = $state(false);
|
|
36
36
|
|
|
37
37
|
// Size configurations - optimized for larger, centered overlay
|
|
38
38
|
const sizeConfig = {
|
|
39
39
|
sm: {
|
|
40
|
-
statusSize:
|
|
41
|
-
iconSize:
|
|
42
|
-
labelSize:
|
|
43
|
-
padding:
|
|
40
|
+
statusSize: '18px',
|
|
41
|
+
iconSize: '10px',
|
|
42
|
+
labelSize: '0.75rem',
|
|
43
|
+
padding: '6px 12px'
|
|
44
44
|
},
|
|
45
45
|
md: {
|
|
46
|
-
statusSize:
|
|
47
|
-
iconSize:
|
|
48
|
-
labelSize:
|
|
49
|
-
padding:
|
|
46
|
+
statusSize: '24px',
|
|
47
|
+
iconSize: '14px',
|
|
48
|
+
labelSize: '0.875rem',
|
|
49
|
+
padding: '8px 16px'
|
|
50
50
|
},
|
|
51
51
|
lg: {
|
|
52
|
-
statusSize:
|
|
53
|
-
iconSize:
|
|
54
|
-
labelSize:
|
|
55
|
-
padding:
|
|
56
|
-
}
|
|
52
|
+
statusSize: '28px',
|
|
53
|
+
iconSize: '16px',
|
|
54
|
+
labelSize: '1rem',
|
|
55
|
+
padding: '10px 20px'
|
|
56
|
+
}
|
|
57
57
|
};
|
|
58
58
|
|
|
59
59
|
const config = $derived(sizeConfig[size]);
|
|
60
60
|
|
|
61
61
|
// Position styles - horizontal center aligned with top edge of node
|
|
62
62
|
const positionStyles = {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
'top-left': 'top: -24px; left: 50%; transform: translateX(-50%);',
|
|
64
|
+
'top-right': 'top: -24px; left: 50%; transform: translateX(-50%);',
|
|
65
|
+
'bottom-left': 'top: -24px; left: 50%; transform: translateX(-50%);',
|
|
66
|
+
'bottom-right': 'top: -24px; left: 50%; transform: translateX(-50%);'
|
|
67
67
|
};
|
|
68
68
|
|
|
69
69
|
// Get execution info or default
|
|
70
70
|
let executionInfo = $derived(
|
|
71
71
|
props.executionInfo || {
|
|
72
|
-
status:
|
|
72
|
+
status: 'idle' as const,
|
|
73
73
|
executionCount: 0,
|
|
74
|
-
isExecuting: false
|
|
75
|
-
}
|
|
74
|
+
isExecuting: false
|
|
75
|
+
}
|
|
76
76
|
);
|
|
77
77
|
|
|
78
78
|
// Show overlay if there's meaningful status information
|
|
79
79
|
let shouldShow = $derived(
|
|
80
|
-
executionInfo.status !==
|
|
81
|
-
executionInfo.executionCount > 0 ||
|
|
82
|
-
executionInfo.isExecuting,
|
|
80
|
+
executionInfo.status !== 'idle' || executionInfo.executionCount > 0 || executionInfo.isExecuting
|
|
83
81
|
);
|
|
84
82
|
</script>
|
|
85
83
|
|
|
@@ -88,9 +86,9 @@
|
|
|
88
86
|
class="node-status-overlay"
|
|
89
87
|
class:node-status-overlay--hovered={isHovered}
|
|
90
88
|
class:node-status-overlay--top-left={true}
|
|
91
|
-
class:node-status-overlay--sm={size ===
|
|
92
|
-
class:node-status-overlay--md={size ===
|
|
93
|
-
class:node-status-overlay--lg={size ===
|
|
89
|
+
class:node-status-overlay--sm={size === 'sm'}
|
|
90
|
+
class:node-status-overlay--md={size === 'md'}
|
|
91
|
+
class:node-status-overlay--lg={size === 'lg'}
|
|
94
92
|
style="
|
|
95
93
|
{positionStyles[position]}
|
|
96
94
|
--status-size: {config.statusSize};
|
|
@@ -100,9 +98,7 @@
|
|
|
100
98
|
"
|
|
101
99
|
onmouseenter={() => (isHovered = true)}
|
|
102
100
|
onmouseleave={() => (isHovered = false)}
|
|
103
|
-
title="{getStatusLabel(
|
|
104
|
-
executionInfo.status,
|
|
105
|
-
)} - Executed {executionInfo.executionCount} times"
|
|
101
|
+
title="{getStatusLabel(executionInfo.status)} - Executed {executionInfo.executionCount} times"
|
|
106
102
|
role="status"
|
|
107
103
|
aria-label="Node execution status: {getStatusLabel(executionInfo.status)}"
|
|
108
104
|
>
|
|
@@ -115,10 +111,7 @@
|
|
|
115
111
|
class="node-status-overlay__status-icon"
|
|
116
112
|
style="background-color: {getStatusColor(executionInfo.status)}"
|
|
117
113
|
>
|
|
118
|
-
<Icon
|
|
119
|
-
icon={getStatusIcon(executionInfo.status)}
|
|
120
|
-
class="node-status-overlay__icon"
|
|
121
|
-
/>
|
|
114
|
+
<Icon icon={getStatusIcon(executionInfo.status)} class="node-status-overlay__icon" />
|
|
122
115
|
</div>
|
|
123
116
|
<StatusLabel
|
|
124
117
|
label={getStatusLabel(executionInfo.status)}
|
|
@@ -144,9 +137,7 @@
|
|
|
144
137
|
</div>
|
|
145
138
|
<div class="node-status-overlay__detail-item">
|
|
146
139
|
<span class="node-status-overlay__detail-label">Executions:</span>
|
|
147
|
-
<span class="node-status-overlay__detail-value"
|
|
148
|
-
>{executionInfo.executionCount}</span
|
|
149
|
-
>
|
|
140
|
+
<span class="node-status-overlay__detail-value">{executionInfo.executionCount}</span>
|
|
150
141
|
</div>
|
|
151
142
|
{#if executionInfo.lastExecuted}
|
|
152
143
|
<div class="node-status-overlay__detail-item">
|
|
@@ -160,20 +151,14 @@
|
|
|
160
151
|
<div class="node-status-overlay__detail-item">
|
|
161
152
|
<span class="node-status-overlay__detail-label">Duration:</span>
|
|
162
153
|
<span class="node-status-overlay__detail-value"
|
|
163
|
-
>{formatExecutionDuration(
|
|
164
|
-
executionInfo.lastExecutionDuration,
|
|
165
|
-
)}</span
|
|
154
|
+
>{formatExecutionDuration(executionInfo.lastExecutionDuration)}</span
|
|
166
155
|
>
|
|
167
156
|
</div>
|
|
168
157
|
{/if}
|
|
169
158
|
{#if executionInfo.lastError}
|
|
170
|
-
<div
|
|
171
|
-
class="node-status-overlay__detail-item node-status-overlay__detail-item--error"
|
|
172
|
-
>
|
|
159
|
+
<div class="node-status-overlay__detail-item node-status-overlay__detail-item--error">
|
|
173
160
|
<span class="node-status-overlay__detail-label">Error:</span>
|
|
174
|
-
<span class="node-status-overlay__detail-value"
|
|
175
|
-
>{executionInfo.lastError}</span
|
|
176
|
-
>
|
|
161
|
+
<span class="node-status-overlay__detail-value">{executionInfo.lastError}</span>
|
|
177
162
|
</div>
|
|
178
163
|
{/if}
|
|
179
164
|
</div>
|
|
@@ -326,7 +311,7 @@
|
|
|
326
311
|
}
|
|
327
312
|
|
|
328
313
|
/* Animation for running status */
|
|
329
|
-
.node-status-overlay__status-icon[style*=
|
|
314
|
+
.node-status-overlay__status-icon[style*='running'] {
|
|
330
315
|
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
331
316
|
}
|
|
332
317
|
|