@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
|
@@ -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;
|
|
@@ -0,0 +1,529 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
SwapMappingEditor Component
|
|
3
|
+
Interactive mapping editor for node swap with connections and config sections.
|
|
4
|
+
Replaces the read-only SwapPreview component.
|
|
5
|
+
Styled with BEM syntax.
|
|
6
|
+
-->
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
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
|
+
|
|
18
|
+
interface Props {
|
|
19
|
+
interactiveState: InteractiveSwapState;
|
|
20
|
+
checker: PortCompatibilityChecker | null;
|
|
21
|
+
onConfirm: (state: InteractiveSwapState) => void;
|
|
22
|
+
onCancel: () => void;
|
|
23
|
+
onBack: () => void;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const { interactiveState, checker, onConfirm, onCancel, onBack }: Props = $props();
|
|
27
|
+
|
|
28
|
+
// Local mutable copy of the interactive state
|
|
29
|
+
// JSON round-trip is intentional: structuredClone fails on Svelte 5 proxies
|
|
30
|
+
let localState = $state<InteractiveSwapState>(
|
|
31
|
+
untrack(() => JSON.parse(JSON.stringify(interactiveState)))
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
// Reinit when interactiveState changes
|
|
35
|
+
$effect(() => {
|
|
36
|
+
localState = JSON.parse(JSON.stringify(interactiveState));
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// Derived counts
|
|
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);
|
|
43
|
+
let connectionCount = $derived(localState.portMappings.length);
|
|
44
|
+
let hasDataLoss = $derived(droppedCount > 0);
|
|
45
|
+
|
|
46
|
+
// Used port IDs per direction
|
|
47
|
+
let usedInputPortIds = $derived.by(() => {
|
|
48
|
+
const set = new Set<string>();
|
|
49
|
+
for (const m of localState.portMappings) {
|
|
50
|
+
if (m.direction === 'input' && m.selectedNewPortId) {
|
|
51
|
+
set.add(m.selectedNewPortId);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
return set;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
let usedOutputPortIds = $derived.by(() => {
|
|
58
|
+
const set = new Set<string>();
|
|
59
|
+
for (const m of localState.portMappings) {
|
|
60
|
+
if (m.direction === 'output' && m.selectedNewPortId) {
|
|
61
|
+
set.add(m.selectedNewPortId);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return set;
|
|
65
|
+
});
|
|
66
|
+
|
|
67
|
+
// Trivial swap: no connections and no config
|
|
68
|
+
let isTrivial = $derived(connectionCount === 0 && localState.configMappings.length === 0);
|
|
69
|
+
|
|
70
|
+
function handlePortUpdate(index: number, newPortId: string | null): void {
|
|
71
|
+
const mapping = localState.portMappings[index];
|
|
72
|
+
if (!mapping) return;
|
|
73
|
+
|
|
74
|
+
// For input ports: if this port is already used by another mapping, unmap the other
|
|
75
|
+
if (newPortId && mapping.direction === 'input') {
|
|
76
|
+
for (let i = 0; i < localState.portMappings.length; i++) {
|
|
77
|
+
if (i === index) continue;
|
|
78
|
+
const other = localState.portMappings[i];
|
|
79
|
+
if (other.direction === 'input' && other.selectedNewPortId === newPortId) {
|
|
80
|
+
localState.portMappings[i] = {
|
|
81
|
+
...other,
|
|
82
|
+
selectedNewPortId: null,
|
|
83
|
+
matchQuality: 'unmapped',
|
|
84
|
+
isOverridden: true
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
localState.portMappings[index] = {
|
|
91
|
+
...mapping,
|
|
92
|
+
selectedNewPortId: newPortId,
|
|
93
|
+
matchQuality: newPortId ? 'manual' : 'unmapped',
|
|
94
|
+
isOverridden: true
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function handlePortReset(index: number): void {
|
|
99
|
+
const mapping = localState.portMappings[index];
|
|
100
|
+
if (!mapping) return;
|
|
101
|
+
|
|
102
|
+
localState.portMappings[index] = {
|
|
103
|
+
...mapping,
|
|
104
|
+
selectedNewPortId: mapping.autoSuggestedPortId,
|
|
105
|
+
matchQuality: mapping.autoSuggestedPortId
|
|
106
|
+
? (interactiveState.portMappings[index]?.matchQuality ?? 'type')
|
|
107
|
+
: 'unmapped',
|
|
108
|
+
isOverridden: false
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function handleConfigToggle(key: string): void {
|
|
113
|
+
const idx = localState.configMappings.findIndex((m) => m.key === key);
|
|
114
|
+
if (idx < 0) return;
|
|
115
|
+
const mapping = localState.configMappings[idx];
|
|
116
|
+
if (!mapping.isFlat) return;
|
|
117
|
+
|
|
118
|
+
localState.configMappings[idx] = {
|
|
119
|
+
...mapping,
|
|
120
|
+
carryOver: !mapping.carryOver
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function handleConfirm(): void {
|
|
125
|
+
onConfirm(localState);
|
|
126
|
+
}
|
|
127
|
+
</script>
|
|
128
|
+
|
|
129
|
+
<div class="swap-editor">
|
|
130
|
+
<!-- Header -->
|
|
131
|
+
<div class="swap-editor__header">
|
|
132
|
+
<button class="swap-editor__back" onclick={onBack} aria-label="Back to node selection">
|
|
133
|
+
<Icon icon="heroicons:arrow-left" />
|
|
134
|
+
</button>
|
|
135
|
+
<h2 class="swap-editor__title">Swap Mapping</h2>
|
|
136
|
+
</div>
|
|
137
|
+
|
|
138
|
+
<!-- Summary bar -->
|
|
139
|
+
<div class="swap-editor__summary">
|
|
140
|
+
<div class="swap-editor__node-info">
|
|
141
|
+
<span class="swap-editor__label">From</span>
|
|
142
|
+
<span class="swap-editor__node-name">{localState.oldNode.data.label}</span>
|
|
143
|
+
</div>
|
|
144
|
+
<Icon icon="heroicons:arrow-right" />
|
|
145
|
+
<div class="swap-editor__node-info">
|
|
146
|
+
<span class="swap-editor__label">To</span>
|
|
147
|
+
<div class="swap-editor__node-target">
|
|
148
|
+
<span
|
|
149
|
+
class="swap-editor__node-icon"
|
|
150
|
+
style="--_icon-color: {getCategoryColorToken(localState.newMetadata.category)}"
|
|
151
|
+
>
|
|
152
|
+
<Icon icon={getNodeIcon(localState.newMetadata.icon, localState.newMetadata.category)} />
|
|
153
|
+
</span>
|
|
154
|
+
<span class="swap-editor__node-name">{localState.newMetadata.name}</span>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
|
|
159
|
+
{#if isTrivial}
|
|
160
|
+
<div class="swap-editor__trivial">
|
|
161
|
+
<p>No connections or config to map.</p>
|
|
162
|
+
</div>
|
|
163
|
+
{:else}
|
|
164
|
+
<div class="swap-editor__content">
|
|
165
|
+
<!-- Connections section -->
|
|
166
|
+
{#if connectionCount > 0}
|
|
167
|
+
<div class="swap-editor__section-heading">
|
|
168
|
+
<Icon icon="heroicons:arrows-right-left" />
|
|
169
|
+
Connections
|
|
170
|
+
</div>
|
|
171
|
+
|
|
172
|
+
{#if inputMappings.length > 0}
|
|
173
|
+
<div class="swap-editor__section-label">Inputs</div>
|
|
174
|
+
{#each inputMappings as mapping, i (mapping.edge.id)}
|
|
175
|
+
{@const globalIndex = localState.portMappings.indexOf(mapping)}
|
|
176
|
+
<PortMappingRow
|
|
177
|
+
{mapping}
|
|
178
|
+
availablePorts={localState.availableNewInputs}
|
|
179
|
+
usedPortIds={usedInputPortIds}
|
|
180
|
+
onUpdate={(newPortId) => handlePortUpdate(globalIndex, newPortId)}
|
|
181
|
+
onReset={() => handlePortReset(globalIndex)}
|
|
182
|
+
/>
|
|
183
|
+
{/each}
|
|
184
|
+
{/if}
|
|
185
|
+
|
|
186
|
+
{#if outputMappings.length > 0}
|
|
187
|
+
<div class="swap-editor__section-label">Outputs</div>
|
|
188
|
+
{#each outputMappings as mapping, i (mapping.edge.id)}
|
|
189
|
+
{@const globalIndex = localState.portMappings.indexOf(mapping)}
|
|
190
|
+
<PortMappingRow
|
|
191
|
+
{mapping}
|
|
192
|
+
availablePorts={localState.availableNewOutputs}
|
|
193
|
+
usedPortIds={usedOutputPortIds}
|
|
194
|
+
onUpdate={(newPortId) => handlePortUpdate(globalIndex, newPortId)}
|
|
195
|
+
onReset={() => handlePortReset(globalIndex)}
|
|
196
|
+
/>
|
|
197
|
+
{/each}
|
|
198
|
+
{/if}
|
|
199
|
+
{/if}
|
|
200
|
+
|
|
201
|
+
<!-- Config section -->
|
|
202
|
+
{#if localState.configMappings.length > 0}
|
|
203
|
+
<div
|
|
204
|
+
class="swap-editor__section-heading"
|
|
205
|
+
class:swap-editor__section-heading--spaced={connectionCount > 0}
|
|
206
|
+
>
|
|
207
|
+
<Icon icon="heroicons:cog-6-tooth" />
|
|
208
|
+
Configuration
|
|
209
|
+
</div>
|
|
210
|
+
<p class="swap-editor__help">
|
|
211
|
+
<strong>Carry over</strong> keeps the value from your current node.
|
|
212
|
+
<strong>Use default</strong> resets to the new node's default value.
|
|
213
|
+
</p>
|
|
214
|
+
|
|
215
|
+
{#each localState.configMappings as mapping (mapping.key)}
|
|
216
|
+
<ConfigMappingRow {mapping} onToggle={handleConfigToggle} />
|
|
217
|
+
{/each}
|
|
218
|
+
|
|
219
|
+
{#if localState.configMappings.some((m) => !m.isFlat)}
|
|
220
|
+
<div class="swap-editor__info-row">Dynamic port config will not be carried over.</div>
|
|
221
|
+
{/if}
|
|
222
|
+
{/if}
|
|
223
|
+
</div>
|
|
224
|
+
{/if}
|
|
225
|
+
|
|
226
|
+
<!-- Warning banner -->
|
|
227
|
+
{#if hasDataLoss}
|
|
228
|
+
<div class="swap-editor__warning" role="alert">
|
|
229
|
+
<Icon icon="heroicons:exclamation-triangle" />
|
|
230
|
+
<span>{droppedCount} connection{droppedCount !== 1 ? 's' : ''} will be lost</span>
|
|
231
|
+
</div>
|
|
232
|
+
{/if}
|
|
233
|
+
|
|
234
|
+
<!-- Actions -->
|
|
235
|
+
<div class="swap-editor__actions">
|
|
236
|
+
<button class="swap-editor__btn swap-editor__btn--cancel" onclick={onCancel} type="button">
|
|
237
|
+
Cancel
|
|
238
|
+
</button>
|
|
239
|
+
<button
|
|
240
|
+
class="swap-editor__btn swap-editor__btn--confirm"
|
|
241
|
+
class:swap-editor__btn--danger={hasDataLoss}
|
|
242
|
+
onclick={handleConfirm}
|
|
243
|
+
type="button"
|
|
244
|
+
aria-label={hasDataLoss
|
|
245
|
+
? `Swap anyway — ${droppedCount} connections will be lost`
|
|
246
|
+
: 'Confirm swap'}
|
|
247
|
+
>
|
|
248
|
+
{hasDataLoss ? 'Swap Anyway' : 'Confirm Swap'}
|
|
249
|
+
</button>
|
|
250
|
+
</div>
|
|
251
|
+
</div>
|
|
252
|
+
|
|
253
|
+
<style>
|
|
254
|
+
.swap-editor {
|
|
255
|
+
height: 100%;
|
|
256
|
+
display: flex;
|
|
257
|
+
flex-direction: column;
|
|
258
|
+
background-color: var(--fd-background);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
.swap-editor__header {
|
|
262
|
+
display: flex;
|
|
263
|
+
align-items: center;
|
|
264
|
+
gap: 0.5rem;
|
|
265
|
+
padding: 0.875rem 1rem;
|
|
266
|
+
border-bottom: 1px solid var(--fd-border);
|
|
267
|
+
background-color: var(--fd-muted);
|
|
268
|
+
flex-shrink: 0;
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
.swap-editor__back {
|
|
272
|
+
background: none;
|
|
273
|
+
border: none;
|
|
274
|
+
cursor: pointer;
|
|
275
|
+
color: var(--fd-muted-foreground);
|
|
276
|
+
padding: 0.25rem;
|
|
277
|
+
border-radius: var(--fd-radius-sm);
|
|
278
|
+
display: flex;
|
|
279
|
+
align-items: center;
|
|
280
|
+
transition:
|
|
281
|
+
color var(--fd-transition-fast),
|
|
282
|
+
background-color var(--fd-transition-fast);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
.swap-editor__back:hover {
|
|
286
|
+
color: var(--fd-foreground);
|
|
287
|
+
background-color: var(--fd-subtle);
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.swap-editor__title {
|
|
291
|
+
margin: 0;
|
|
292
|
+
font-size: 1rem;
|
|
293
|
+
font-weight: 600;
|
|
294
|
+
color: var(--fd-foreground);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.swap-editor__summary {
|
|
298
|
+
display: flex;
|
|
299
|
+
align-items: center;
|
|
300
|
+
gap: 0.75rem;
|
|
301
|
+
padding: 0.75rem 1rem;
|
|
302
|
+
border-bottom: 1px solid var(--fd-border);
|
|
303
|
+
background-color: var(--fd-muted);
|
|
304
|
+
flex-shrink: 0;
|
|
305
|
+
color: var(--fd-muted-foreground);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.swap-editor__node-info {
|
|
309
|
+
flex: 1;
|
|
310
|
+
display: flex;
|
|
311
|
+
flex-direction: column;
|
|
312
|
+
gap: 0.125rem;
|
|
313
|
+
min-width: 0;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.swap-editor__label {
|
|
317
|
+
font-size: var(--fd-text-xs);
|
|
318
|
+
color: var(--fd-muted-foreground);
|
|
319
|
+
text-transform: uppercase;
|
|
320
|
+
letter-spacing: 0.05em;
|
|
321
|
+
font-weight: 600;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.swap-editor__node-name {
|
|
325
|
+
font-size: var(--fd-text-sm);
|
|
326
|
+
font-weight: 500;
|
|
327
|
+
color: var(--fd-foreground);
|
|
328
|
+
overflow: hidden;
|
|
329
|
+
text-overflow: ellipsis;
|
|
330
|
+
white-space: nowrap;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.swap-editor__node-target {
|
|
334
|
+
display: flex;
|
|
335
|
+
align-items: center;
|
|
336
|
+
gap: 0.375rem;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.swap-editor__node-icon {
|
|
340
|
+
width: 1.25rem;
|
|
341
|
+
height: 1.25rem;
|
|
342
|
+
border-radius: 0.25rem;
|
|
343
|
+
background: color-mix(
|
|
344
|
+
in srgb,
|
|
345
|
+
var(--_icon-color) var(--fd-node-icon-bg-opacity, 15%),
|
|
346
|
+
transparent
|
|
347
|
+
);
|
|
348
|
+
color: var(--fd-node-icon);
|
|
349
|
+
font-size: 0.5rem;
|
|
350
|
+
display: flex;
|
|
351
|
+
align-items: center;
|
|
352
|
+
justify-content: center;
|
|
353
|
+
flex-shrink: 0;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
.swap-editor__content {
|
|
357
|
+
flex: 1;
|
|
358
|
+
overflow-y: auto;
|
|
359
|
+
padding: var(--fd-space-md);
|
|
360
|
+
scrollbar-width: thin;
|
|
361
|
+
scrollbar-color: var(--fd-scrollbar-thumb) var(--fd-scrollbar-track);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.swap-editor__section-heading {
|
|
365
|
+
display: flex;
|
|
366
|
+
align-items: center;
|
|
367
|
+
gap: var(--fd-space-xs);
|
|
368
|
+
font-size: 0.8125rem;
|
|
369
|
+
font-weight: 600;
|
|
370
|
+
color: var(--fd-foreground);
|
|
371
|
+
padding: var(--fd-space-xs) 0;
|
|
372
|
+
border-bottom: 1px solid var(--fd-border);
|
|
373
|
+
margin-bottom: var(--fd-space-xs);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.swap-editor__section-heading :global(svg) {
|
|
377
|
+
width: 1rem;
|
|
378
|
+
height: 1rem;
|
|
379
|
+
color: var(--fd-muted-foreground);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.swap-editor__section-heading--spaced {
|
|
383
|
+
margin-top: var(--fd-space-md);
|
|
384
|
+
padding-top: var(--fd-space-md);
|
|
385
|
+
border-top: 1px solid var(--fd-border-muted);
|
|
386
|
+
}
|
|
387
|
+
|
|
388
|
+
.swap-editor__help {
|
|
389
|
+
margin: 0 0 var(--fd-space-xs);
|
|
390
|
+
font-size: var(--fd-text-xs);
|
|
391
|
+
line-height: 1.5;
|
|
392
|
+
color: var(--fd-muted-foreground);
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
.swap-editor__help strong {
|
|
396
|
+
color: var(--fd-foreground);
|
|
397
|
+
font-weight: 600;
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
.swap-editor__section-label {
|
|
401
|
+
font-size: var(--fd-text-xs);
|
|
402
|
+
font-weight: 600;
|
|
403
|
+
color: var(--fd-muted-foreground);
|
|
404
|
+
text-transform: uppercase;
|
|
405
|
+
letter-spacing: 0.05em;
|
|
406
|
+
padding: var(--fd-space-xs) 0 var(--fd-space-3xs);
|
|
407
|
+
margin-bottom: var(--fd-space-3xs);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
.swap-editor__section-label:first-child {
|
|
411
|
+
padding-top: 0;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.swap-editor__info-row {
|
|
415
|
+
font-size: var(--fd-text-xs);
|
|
416
|
+
color: var(--fd-muted-foreground);
|
|
417
|
+
font-style: italic;
|
|
418
|
+
padding: var(--fd-space-xs) 0;
|
|
419
|
+
border-top: 1px solid var(--fd-border-muted);
|
|
420
|
+
margin-top: var(--fd-space-xs);
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
.swap-editor__trivial {
|
|
424
|
+
flex: 1;
|
|
425
|
+
display: flex;
|
|
426
|
+
flex-direction: column;
|
|
427
|
+
align-items: center;
|
|
428
|
+
justify-content: center;
|
|
429
|
+
gap: var(--fd-space-3xs);
|
|
430
|
+
color: var(--fd-muted-foreground);
|
|
431
|
+
font-size: var(--fd-text-sm);
|
|
432
|
+
padding: var(--fd-space-2xl);
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
.swap-editor__trivial p {
|
|
436
|
+
margin: 0;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.swap-editor__warning {
|
|
440
|
+
display: flex;
|
|
441
|
+
align-items: center;
|
|
442
|
+
gap: var(--fd-space-xs);
|
|
443
|
+
padding: var(--fd-space-xs) var(--fd-space-md);
|
|
444
|
+
background-color: color-mix(in srgb, var(--fd-warning) 8%, transparent);
|
|
445
|
+
border-top: 1px solid color-mix(in srgb, var(--fd-warning) 25%, transparent);
|
|
446
|
+
color: var(--fd-warning);
|
|
447
|
+
font-size: var(--fd-text-xs);
|
|
448
|
+
font-weight: 500;
|
|
449
|
+
flex-shrink: 0;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
.swap-editor__actions {
|
|
453
|
+
display: flex;
|
|
454
|
+
gap: var(--fd-space-xs);
|
|
455
|
+
padding: var(--fd-space-md);
|
|
456
|
+
border-top: 1px solid var(--fd-border-muted);
|
|
457
|
+
flex-shrink: 0;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
.swap-editor__btn {
|
|
461
|
+
flex: 1;
|
|
462
|
+
display: inline-flex;
|
|
463
|
+
align-items: center;
|
|
464
|
+
justify-content: center;
|
|
465
|
+
padding: 0.625rem var(--fd-space-md);
|
|
466
|
+
border-radius: var(--fd-radius-lg);
|
|
467
|
+
font-size: var(--fd-text-sm);
|
|
468
|
+
font-weight: 600;
|
|
469
|
+
font-family: inherit;
|
|
470
|
+
cursor: pointer;
|
|
471
|
+
border: 1px solid transparent;
|
|
472
|
+
transition: all var(--fd-transition-normal);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.swap-editor__btn--cancel {
|
|
476
|
+
background-color: var(--fd-background);
|
|
477
|
+
border-color: var(--fd-border);
|
|
478
|
+
color: var(--fd-foreground);
|
|
479
|
+
box-shadow: var(--fd-shadow-sm);
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.swap-editor__btn--cancel:hover {
|
|
483
|
+
background-color: var(--fd-muted);
|
|
484
|
+
border-color: var(--fd-border-strong);
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.swap-editor__btn--confirm {
|
|
488
|
+
background: linear-gradient(135deg, var(--fd-primary) 0%, var(--fd-primary-hover) 100%);
|
|
489
|
+
color: var(--fd-primary-foreground);
|
|
490
|
+
box-shadow:
|
|
491
|
+
0 2px 8px rgba(59, 130, 246, 0.25),
|
|
492
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.1);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.swap-editor__btn--confirm:hover {
|
|
496
|
+
background: linear-gradient(135deg, var(--fd-primary-hover) 0%, var(--fd-primary) 100%);
|
|
497
|
+
box-shadow:
|
|
498
|
+
0 4px 12px rgba(59, 130, 246, 0.35),
|
|
499
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.15);
|
|
500
|
+
transform: translateY(-1px);
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
.swap-editor__btn--confirm:active {
|
|
504
|
+
transform: translateY(0);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
.swap-editor__btn--danger {
|
|
508
|
+
background: linear-gradient(
|
|
509
|
+
135deg,
|
|
510
|
+
var(--fd-error) 0%,
|
|
511
|
+
var(--fd-error-hover, var(--fd-error)) 100%
|
|
512
|
+
);
|
|
513
|
+
color: var(--fd-error-foreground);
|
|
514
|
+
box-shadow:
|
|
515
|
+
0 2px 8px color-mix(in srgb, var(--fd-error) 30%, transparent),
|
|
516
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.1);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.swap-editor__btn--danger:hover {
|
|
520
|
+
box-shadow:
|
|
521
|
+
0 4px 12px color-mix(in srgb, var(--fd-error) 40%, transparent),
|
|
522
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.15);
|
|
523
|
+
transform: translateY(-1px);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
.swap-editor__btn--danger:active {
|
|
527
|
+
transform: translateY(0);
|
|
528
|
+
}
|
|
529
|
+
</style>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { InteractiveSwapState } from '../utils/nodeSwap.js';
|
|
2
|
+
import type { PortCompatibilityChecker } from '../utils/connections.js';
|
|
3
|
+
interface Props {
|
|
4
|
+
interactiveState: InteractiveSwapState;
|
|
5
|
+
checker: PortCompatibilityChecker | null;
|
|
6
|
+
onConfirm: (state: InteractiveSwapState) => void;
|
|
7
|
+
onCancel: () => void;
|
|
8
|
+
onBack: () => void;
|
|
9
|
+
}
|
|
10
|
+
declare const SwapMappingEditor: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type SwapMappingEditor = ReturnType<typeof SwapMappingEditor>;
|
|
12
|
+
export default SwapMappingEditor;
|
|
@@ -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;
|