@flowdrop/flowdrop 1.0.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/LICENSE +21 -0
- package/README.md +252 -0
- package/dist/adapters/WorkflowAdapter.d.ts +167 -0
- package/dist/adapters/WorkflowAdapter.js +368 -0
- package/dist/adapters/agentspec/AgentSpecAdapter.d.ts +96 -0
- package/dist/adapters/agentspec/AgentSpecAdapter.js +626 -0
- package/dist/adapters/agentspec/agentAdapter.d.ts +59 -0
- package/dist/adapters/agentspec/agentAdapter.js +91 -0
- package/dist/adapters/agentspec/autoLayout.d.ts +34 -0
- package/dist/adapters/agentspec/autoLayout.js +127 -0
- package/dist/adapters/agentspec/componentTypeDefaults.d.ts +73 -0
- package/dist/adapters/agentspec/componentTypeDefaults.js +238 -0
- package/dist/adapters/agentspec/defaultNodeTypes.d.ts +53 -0
- package/dist/adapters/agentspec/defaultNodeTypes.js +561 -0
- package/dist/adapters/agentspec/index.d.ts +37 -0
- package/dist/adapters/agentspec/index.js +39 -0
- package/dist/adapters/agentspec/validator.d.ts +34 -0
- package/dist/adapters/agentspec/validator.js +169 -0
- package/dist/api/enhanced-client.d.ts +183 -0
- package/dist/api/enhanced-client.js +430 -0
- package/dist/components/App.svelte +981 -0
- package/dist/components/App.svelte.d.ts +54 -0
- package/dist/components/CanvasBanner.stories.svelte +29 -0
- package/dist/components/CanvasBanner.stories.svelte.d.ts +27 -0
- package/dist/components/CanvasBanner.svelte +57 -0
- package/dist/components/CanvasBanner.svelte.d.ts +8 -0
- package/dist/components/ConfigForm.svelte +1138 -0
- package/dist/components/ConfigForm.svelte.d.ts +44 -0
- package/dist/components/ConfigModal.svelte +188 -0
- package/dist/components/ConfigModal.svelte.d.ts +13 -0
- package/dist/components/ConfigPanel.stories.svelte +47 -0
- package/dist/components/ConfigPanel.stories.svelte.d.ts +27 -0
- package/dist/components/ConfigPanel.svelte +182 -0
- package/dist/components/ConfigPanel.svelte.d.ts +32 -0
- package/dist/components/ConnectionLine.svelte +32 -0
- package/dist/components/ConnectionLine.svelte.d.ts +3 -0
- package/dist/components/EdgeRefresher.svelte +41 -0
- package/dist/components/EdgeRefresher.svelte.d.ts +9 -0
- package/dist/components/FlowDropZone.svelte +83 -0
- package/dist/components/FlowDropZone.svelte.d.ts +13 -0
- package/dist/components/LoadingSpinner.stories.svelte +30 -0
- package/dist/components/LoadingSpinner.stories.svelte.d.ts +27 -0
- package/dist/components/LoadingSpinner.svelte +36 -0
- package/dist/components/LoadingSpinner.svelte.d.ts +8 -0
- package/dist/components/Logo.stories.svelte +22 -0
- package/dist/components/Logo.stories.svelte.d.ts +27 -0
- package/dist/components/Logo.svelte +102 -0
- package/dist/components/Logo.svelte.d.ts +26 -0
- package/dist/components/LogsSidebar.svelte +563 -0
- package/dist/components/LogsSidebar.svelte.d.ts +17 -0
- package/dist/components/MarkdownDisplay.stories.svelte +36 -0
- package/dist/components/MarkdownDisplay.stories.svelte.d.ts +27 -0
- package/dist/components/MarkdownDisplay.svelte +29 -0
- package/dist/components/MarkdownDisplay.svelte.d.ts +7 -0
- package/dist/components/Navbar.stories.svelte +53 -0
- package/dist/components/Navbar.stories.svelte.d.ts +27 -0
- package/dist/components/Navbar.svelte +726 -0
- package/dist/components/Navbar.svelte.d.ts +29 -0
- package/dist/components/NodeSidebar.svelte +762 -0
- package/dist/components/NodeSidebar.svelte.d.ts +9 -0
- package/dist/components/NodeStatusOverlay.stories.svelte +85 -0
- package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +27 -0
- package/dist/components/NodeStatusOverlay.svelte +327 -0
- package/dist/components/NodeStatusOverlay.svelte.d.ts +11 -0
- package/dist/components/PipelineStatus.svelte +314 -0
- package/dist/components/PipelineStatus.svelte.d.ts +20 -0
- package/dist/components/PortCoordinateTracker.svelte +58 -0
- package/dist/components/PortCoordinateTracker.svelte.d.ts +12 -0
- package/dist/components/ReadOnlyDetails.svelte +170 -0
- package/dist/components/ReadOnlyDetails.svelte.d.ts +25 -0
- package/dist/components/SchemaForm.stories.svelte +116 -0
- package/dist/components/SchemaForm.stories.svelte.d.ts +27 -0
- package/dist/components/SchemaForm.svelte +536 -0
- package/dist/components/SchemaForm.svelte.d.ts +83 -0
- package/dist/components/SettingsModal.svelte +279 -0
- package/dist/components/SettingsModal.svelte.d.ts +23 -0
- package/dist/components/SettingsPanel.svelte +638 -0
- package/dist/components/SettingsPanel.svelte.d.ts +21 -0
- package/dist/components/StatusIcon.stories.svelte +60 -0
- package/dist/components/StatusIcon.stories.svelte.d.ts +27 -0
- package/dist/components/StatusIcon.svelte +119 -0
- package/dist/components/StatusIcon.svelte.d.ts +10 -0
- package/dist/components/StatusLabel.stories.svelte +17 -0
- package/dist/components/StatusLabel.stories.svelte.d.ts +27 -0
- package/dist/components/StatusLabel.svelte +33 -0
- package/dist/components/StatusLabel.svelte.d.ts +7 -0
- package/dist/components/ThemeToggle.stories.svelte +25 -0
- package/dist/components/ThemeToggle.stories.svelte.d.ts +27 -0
- package/dist/components/ThemeToggle.svelte +185 -0
- package/dist/components/ThemeToggle.svelte.d.ts +14 -0
- package/dist/components/UniversalNode.svelte +155 -0
- package/dist/components/UniversalNode.svelte.d.ts +15 -0
- package/dist/components/WorkflowEditor.svelte +1035 -0
- package/dist/components/WorkflowEditor.svelte.d.ts +23 -0
- package/dist/components/form/FormArray.svelte +1049 -0
- package/dist/components/form/FormArray.svelte.d.ts +22 -0
- package/dist/components/form/FormAutocomplete.svelte +1009 -0
- package/dist/components/form/FormAutocomplete.svelte.d.ts +25 -0
- package/dist/components/form/FormCheckboxGroup.stories.svelte +28 -0
- package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormCheckboxGroup.svelte +155 -0
- package/dist/components/form/FormCheckboxGroup.svelte.d.ts +17 -0
- package/dist/components/form/FormCodeEditor.svelte +458 -0
- package/dist/components/form/FormCodeEditor.svelte.d.ts +25 -0
- package/dist/components/form/FormField.svelte +417 -0
- package/dist/components/form/FormField.svelte.d.ts +29 -0
- package/dist/components/form/FormFieldLight.svelte +425 -0
- package/dist/components/form/FormFieldLight.svelte.d.ts +18 -0
- package/dist/components/form/FormFieldWrapper.stories.svelte +53 -0
- package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormFieldWrapper.svelte +125 -0
- package/dist/components/form/FormFieldWrapper.svelte.d.ts +18 -0
- package/dist/components/form/FormFieldset.svelte +142 -0
- package/dist/components/form/FormFieldset.svelte.d.ts +11 -0
- package/dist/components/form/FormMarkdownEditor.svelte +752 -0
- package/dist/components/form/FormMarkdownEditor.svelte.d.ts +33 -0
- package/dist/components/form/FormNumberField.stories.svelte +36 -0
- package/dist/components/form/FormNumberField.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormNumberField.svelte +112 -0
- package/dist/components/form/FormNumberField.svelte.d.ts +25 -0
- package/dist/components/form/FormRangeField.stories.svelte +31 -0
- package/dist/components/form/FormRangeField.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormRangeField.svelte +246 -0
- package/dist/components/form/FormRangeField.svelte.d.ts +23 -0
- package/dist/components/form/FormSelect.stories.svelte +50 -0
- package/dist/components/form/FormSelect.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormSelect.svelte +129 -0
- package/dist/components/form/FormSelect.svelte.d.ts +20 -0
- package/dist/components/form/FormTemplateEditor.svelte +825 -0
- package/dist/components/form/FormTemplateEditor.svelte.d.ts +41 -0
- package/dist/components/form/FormTextField.stories.svelte +30 -0
- package/dist/components/form/FormTextField.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormTextField.svelte +91 -0
- package/dist/components/form/FormTextField.svelte.d.ts +19 -0
- package/dist/components/form/FormTextarea.stories.svelte +34 -0
- package/dist/components/form/FormTextarea.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormTextarea.svelte +97 -0
- package/dist/components/form/FormTextarea.svelte.d.ts +21 -0
- package/dist/components/form/FormToggle.stories.svelte +30 -0
- package/dist/components/form/FormToggle.stories.svelte.d.ts +27 -0
- package/dist/components/form/FormToggle.svelte +126 -0
- package/dist/components/form/FormToggle.svelte.d.ts +19 -0
- package/dist/components/form/FormUISchemaRenderer.svelte +136 -0
- package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +32 -0
- package/dist/components/form/index.d.ts +50 -0
- package/dist/components/form/index.js +54 -0
- package/dist/components/form/templateAutocomplete.d.ts +29 -0
- package/dist/components/form/templateAutocomplete.js +254 -0
- package/dist/components/form/types.d.ts +485 -0
- package/dist/components/form/types.js +73 -0
- package/dist/components/interrupt/ChoicePrompt.stories.svelte +52 -0
- package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +401 -0
- package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +23 -0
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +71 -0
- package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/ConfirmationPrompt.svelte +292 -0
- package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +25 -0
- package/dist/components/interrupt/FormPrompt.svelte +236 -0
- package/dist/components/interrupt/FormPrompt.svelte.d.ts +23 -0
- package/dist/components/interrupt/InterruptBubble.svelte +601 -0
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +16 -0
- package/dist/components/interrupt/ReviewPrompt.stories.svelte +67 -0
- package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/ReviewPrompt.svelte +861 -0
- package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +23 -0
- package/dist/components/interrupt/TextInputPrompt.stories.svelte +47 -0
- package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +27 -0
- package/dist/components/interrupt/TextInputPrompt.svelte +346 -0
- package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +23 -0
- package/dist/components/interrupt/index.d.ts +13 -0
- package/dist/components/interrupt/index.js +15 -0
- package/dist/components/layouts/MainLayout.svelte +718 -0
- package/dist/components/layouts/MainLayout.svelte.d.ts +62 -0
- package/dist/components/nodes/GatewayNode.stories.svelte +108 -0
- package/dist/components/nodes/GatewayNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/GatewayNode.svelte +591 -0
- package/dist/components/nodes/GatewayNode.svelte.d.ts +15 -0
- package/dist/components/nodes/IdeaNode.stories.svelte +52 -0
- package/dist/components/nodes/IdeaNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/IdeaNode.svelte +455 -0
- package/dist/components/nodes/IdeaNode.svelte.d.ts +24 -0
- package/dist/components/nodes/NotesNode.stories.svelte +76 -0
- package/dist/components/nodes/NotesNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/NotesNode.svelte +378 -0
- package/dist/components/nodes/NotesNode.svelte.d.ts +24 -0
- package/dist/components/nodes/SimpleNode.stories.svelte +159 -0
- package/dist/components/nodes/SimpleNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/SimpleNode.svelte +451 -0
- package/dist/components/nodes/SimpleNode.svelte.d.ts +25 -0
- package/dist/components/nodes/SquareNode.stories.svelte +82 -0
- package/dist/components/nodes/SquareNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/SquareNode.svelte +407 -0
- package/dist/components/nodes/SquareNode.svelte.d.ts +25 -0
- package/dist/components/nodes/TerminalNode.stories.svelte +25 -0
- package/dist/components/nodes/TerminalNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/TerminalNode.svelte +690 -0
- package/dist/components/nodes/TerminalNode.svelte.d.ts +25 -0
- package/dist/components/nodes/ToolNode.stories.svelte +189 -0
- package/dist/components/nodes/ToolNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/ToolNode.svelte +471 -0
- package/dist/components/nodes/ToolNode.svelte.d.ts +36 -0
- package/dist/components/nodes/WorkflowNode.stories.svelte +55 -0
- package/dist/components/nodes/WorkflowNode.stories.svelte.d.ts +26 -0
- package/dist/components/nodes/WorkflowNode.svelte +571 -0
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +15 -0
- package/dist/components/playground/ChatPanel.svelte +905 -0
- package/dist/components/playground/ChatPanel.svelte.d.ts +46 -0
- package/dist/components/playground/ExecutionLogs.svelte +488 -0
- package/dist/components/playground/ExecutionLogs.svelte.d.ts +14 -0
- package/dist/components/playground/InputCollector.svelte +444 -0
- package/dist/components/playground/InputCollector.svelte.d.ts +16 -0
- package/dist/components/playground/MessageBubble.stories.svelte +62 -0
- package/dist/components/playground/MessageBubble.stories.svelte.d.ts +27 -0
- package/dist/components/playground/MessageBubble.svelte +633 -0
- package/dist/components/playground/MessageBubble.svelte.d.ts +24 -0
- package/dist/components/playground/Playground.svelte +1075 -0
- package/dist/components/playground/Playground.svelte.d.ts +25 -0
- package/dist/components/playground/PlaygroundModal.svelte +220 -0
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +25 -0
- package/dist/components/playground/SessionManager.svelte +538 -0
- package/dist/components/playground/SessionManager.svelte.d.ts +20 -0
- package/dist/config/agentSpecEndpoints.d.ts +70 -0
- package/dist/config/agentSpecEndpoints.js +65 -0
- package/dist/config/constants.d.ts +43 -0
- package/dist/config/constants.js +31 -0
- package/dist/config/defaultCategories.d.ts +7 -0
- package/dist/config/defaultCategories.js +126 -0
- package/dist/config/defaultPortConfig.d.ts +6 -0
- package/dist/config/defaultPortConfig.js +201 -0
- package/dist/config/endpoints.d.ts +160 -0
- package/dist/config/endpoints.js +146 -0
- package/dist/config/runtimeConfig.d.ts +47 -0
- package/dist/config/runtimeConfig.js +80 -0
- package/dist/core/index.d.ts +75 -0
- package/dist/core/index.js +92 -0
- package/dist/display/index.d.ts +29 -0
- package/dist/display/index.js +36 -0
- package/dist/editor/index.d.ts +95 -0
- package/dist/editor/index.js +138 -0
- package/dist/form/code.d.ts +101 -0
- package/dist/form/code.js +168 -0
- package/dist/form/fieldRegistry.d.ts +169 -0
- package/dist/form/fieldRegistry.js +152 -0
- package/dist/form/full.d.ts +56 -0
- package/dist/form/full.js +80 -0
- package/dist/form/index.d.ts +77 -0
- package/dist/form/index.js +91 -0
- package/dist/form/markdown.d.ts +69 -0
- package/dist/form/markdown.js +103 -0
- package/dist/helpers/nodeLayoutHelper.d.ts +14 -0
- package/dist/helpers/nodeLayoutHelper.js +19 -0
- package/dist/helpers/proximityConnect.d.ts +94 -0
- package/dist/helpers/proximityConnect.js +314 -0
- package/dist/helpers/workflowEditorHelper.d.ts +183 -0
- package/dist/helpers/workflowEditorHelper.js +595 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +64 -0
- package/dist/mocks/app-environment.d.ts +8 -0
- package/dist/mocks/app-environment.js +16 -0
- package/dist/mocks/app-forms.d.ts +2 -0
- package/dist/mocks/app-forms.js +22 -0
- package/dist/mocks/app-navigation.d.ts +5 -0
- package/dist/mocks/app-navigation.js +36 -0
- package/dist/mocks/app-stores.d.ts +14 -0
- package/dist/mocks/app-stores.js +26 -0
- package/dist/playground/index.d.ts +131 -0
- package/dist/playground/index.js +172 -0
- package/dist/playground/mount.d.ts +203 -0
- package/dist/playground/mount.js +235 -0
- package/dist/registry/BaseRegistry.d.ts +92 -0
- package/dist/registry/BaseRegistry.js +124 -0
- package/dist/registry/builtinFormats.d.ts +23 -0
- package/dist/registry/builtinFormats.js +70 -0
- package/dist/registry/builtinNodes.d.ts +77 -0
- package/dist/registry/builtinNodes.js +211 -0
- package/dist/registry/index.d.ts +8 -0
- package/dist/registry/index.js +12 -0
- package/dist/registry/nodeComponentRegistry.d.ts +276 -0
- package/dist/registry/nodeComponentRegistry.js +262 -0
- package/dist/registry/plugin.d.ts +215 -0
- package/dist/registry/plugin.js +249 -0
- package/dist/registry/workflowFormatRegistry.d.ts +122 -0
- package/dist/registry/workflowFormatRegistry.js +96 -0
- package/dist/schema/index.d.ts +23 -0
- package/dist/schema/index.js +23 -0
- package/dist/schemas/v1/workflow.schema.json +1078 -0
- package/dist/services/agentSpecExecutionService.d.ts +106 -0
- package/dist/services/agentSpecExecutionService.js +334 -0
- package/dist/services/api.d.ts +115 -0
- package/dist/services/api.js +214 -0
- package/dist/services/apiVariableService.d.ts +114 -0
- package/dist/services/apiVariableService.js +338 -0
- package/dist/services/autoSaveService.d.ts +112 -0
- package/dist/services/autoSaveService.js +227 -0
- package/dist/services/categoriesApi.d.ts +14 -0
- package/dist/services/categoriesApi.js +49 -0
- package/dist/services/draftStorage.d.ts +171 -0
- package/dist/services/draftStorage.js +299 -0
- package/dist/services/dynamicSchemaService.d.ts +108 -0
- package/dist/services/dynamicSchemaService.js +444 -0
- package/dist/services/globalSave.d.ts +69 -0
- package/dist/services/globalSave.js +248 -0
- package/dist/services/historyService.d.ts +208 -0
- package/dist/services/historyService.js +321 -0
- package/dist/services/interruptService.d.ts +133 -0
- package/dist/services/interruptService.js +280 -0
- package/dist/services/nodeExecutionService.d.ts +63 -0
- package/dist/services/nodeExecutionService.js +266 -0
- package/dist/services/playgroundService.d.ts +130 -0
- package/dist/services/playgroundService.js +321 -0
- package/dist/services/portConfigApi.d.ts +14 -0
- package/dist/services/portConfigApi.js +54 -0
- package/dist/services/settingsService.d.ts +92 -0
- package/dist/services/settingsService.js +196 -0
- package/dist/services/toastService.d.ts +156 -0
- package/dist/services/toastService.js +265 -0
- package/dist/services/variableService.d.ts +141 -0
- package/dist/services/variableService.js +463 -0
- package/dist/services/workflowStorage.d.ts +37 -0
- package/dist/services/workflowStorage.js +116 -0
- package/dist/settings/index.d.ts +25 -0
- package/dist/settings/index.js +33 -0
- package/dist/stores/categoriesStore.svelte.d.ts +32 -0
- package/dist/stores/categoriesStore.svelte.js +77 -0
- package/dist/stores/editorStateMachine.svelte.d.ts +42 -0
- package/dist/stores/editorStateMachine.svelte.js +132 -0
- package/dist/stores/historyStore.svelte.d.ts +136 -0
- package/dist/stores/historyStore.svelte.js +207 -0
- package/dist/stores/interruptStore.svelte.d.ts +179 -0
- package/dist/stores/interruptStore.svelte.js +346 -0
- package/dist/stores/playgroundStore.svelte.d.ts +230 -0
- package/dist/stores/playgroundStore.svelte.js +515 -0
- package/dist/stores/portCoordinateStore.svelte.d.ts +66 -0
- package/dist/stores/portCoordinateStore.svelte.js +186 -0
- package/dist/stores/settingsStore.svelte.d.ts +158 -0
- package/dist/stores/settingsStore.svelte.js +544 -0
- package/dist/stores/workflowStore.svelte.d.ts +260 -0
- package/dist/stores/workflowStore.svelte.js +649 -0
- package/dist/stories/CanvasDecorator.svelte +49 -0
- package/dist/stories/CanvasDecorator.svelte.d.ts +8 -0
- package/dist/stories/NodeDecorator.svelte +73 -0
- package/dist/stories/NodeDecorator.svelte.d.ts +8 -0
- package/dist/stories/utils.d.ts +93 -0
- package/dist/stories/utils.js +122 -0
- package/dist/styles/base.css +1300 -0
- package/dist/styles/toast.css +35 -0
- package/dist/styles/tokens.css +475 -0
- package/dist/svelte-app.d.ts +150 -0
- package/dist/svelte-app.js +295 -0
- package/dist/types/agentspec.d.ts +318 -0
- package/dist/types/agentspec.js +48 -0
- package/dist/types/auth.d.ts +263 -0
- package/dist/types/auth.js +229 -0
- package/dist/types/config.d.ts +151 -0
- package/dist/types/config.js +7 -0
- package/dist/types/events.d.ts +190 -0
- package/dist/types/events.js +30 -0
- package/dist/types/index.d.ts +1234 -0
- package/dist/types/index.js +27 -0
- package/dist/types/interrupt.d.ts +390 -0
- package/dist/types/interrupt.js +145 -0
- package/dist/types/interruptState.d.ts +211 -0
- package/dist/types/interruptState.js +308 -0
- package/dist/types/playground.d.ts +351 -0
- package/dist/types/playground.js +95 -0
- package/dist/types/settings.d.ts +189 -0
- package/dist/types/settings.js +97 -0
- package/dist/types/uischema.d.ts +144 -0
- package/dist/types/uischema.js +51 -0
- package/dist/utils/colors.d.ts +288 -0
- package/dist/utils/colors.js +548 -0
- package/dist/utils/config.d.ts +37 -0
- package/dist/utils/config.js +226 -0
- package/dist/utils/connections.d.ts +125 -0
- package/dist/utils/connections.js +414 -0
- package/dist/utils/errors.d.ts +28 -0
- package/dist/utils/errors.js +44 -0
- package/dist/utils/fetchWithAuth.d.ts +25 -0
- package/dist/utils/fetchWithAuth.js +34 -0
- package/dist/utils/handleIds.d.ts +35 -0
- package/dist/utils/handleIds.js +58 -0
- package/dist/utils/handlePositioning.d.ts +31 -0
- package/dist/utils/handlePositioning.js +35 -0
- package/dist/utils/icons.d.ts +106 -0
- package/dist/utils/icons.js +157 -0
- package/dist/utils/logger.d.ts +47 -0
- package/dist/utils/logger.js +72 -0
- package/dist/utils/nodeStatus.d.ts +53 -0
- package/dist/utils/nodeStatus.js +183 -0
- package/dist/utils/nodeTypes.d.ts +117 -0
- package/dist/utils/nodeTypes.js +244 -0
- package/dist/utils/nodeWrapper.d.ts +39 -0
- package/dist/utils/nodeWrapper.js +62 -0
- package/dist/utils/performanceUtils.d.ts +30 -0
- package/dist/utils/performanceUtils.js +108 -0
- package/dist/utils/sanitize.d.ts +19 -0
- package/dist/utils/sanitize.js +31 -0
- package/dist/utils/uischema.d.ts +52 -0
- package/dist/utils/uischema.js +88 -0
- package/dist/utils/validation.d.ts +29 -0
- package/dist/utils/validation.js +39 -0
- package/package.json +292 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import type { ConfigSchema, WorkflowNode, WorkflowEdge, NodeUIExtensions, AuthProvider } from '../types/index.js';
|
|
2
|
+
import type { UISchemaElement } from '../types/uischema.js';
|
|
3
|
+
interface Props {
|
|
4
|
+
/** Optional workflow node (if provided, schema and values are derived from it) */
|
|
5
|
+
node?: WorkflowNode;
|
|
6
|
+
/** Direct config schema (used when node is not provided) */
|
|
7
|
+
schema?: ConfigSchema;
|
|
8
|
+
/**
|
|
9
|
+
* Optional UI Schema that controls field layout and grouping.
|
|
10
|
+
* When provided, fields render according to the UISchema tree structure.
|
|
11
|
+
* When absent, falls back to node.data.metadata.uiSchema, then flat rendering.
|
|
12
|
+
* @see https://jsonforms.io/docs/uischema
|
|
13
|
+
*/
|
|
14
|
+
uiSchema?: UISchemaElement;
|
|
15
|
+
/** Direct config values (used when node is not provided) */
|
|
16
|
+
values?: Record<string, unknown>;
|
|
17
|
+
/** Whether to show UI extension settings section */
|
|
18
|
+
showUIExtensions?: boolean;
|
|
19
|
+
/** Optional workflow ID for context in external links */
|
|
20
|
+
workflowId?: string;
|
|
21
|
+
/** Whether to also save the workflow when saving config */
|
|
22
|
+
saveWorkflowWhenSavingConfig?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* All workflow nodes (used for deriving template variables from connected nodes).
|
|
25
|
+
* When provided along with workflowEdges, enables autocomplete for template fields.
|
|
26
|
+
*/
|
|
27
|
+
workflowNodes?: WorkflowNode[];
|
|
28
|
+
/**
|
|
29
|
+
* All workflow edges (used for finding connections to derive template variables).
|
|
30
|
+
* When provided along with workflowNodes, enables autocomplete for template fields.
|
|
31
|
+
*/
|
|
32
|
+
workflowEdges?: WorkflowEdge[];
|
|
33
|
+
/** Auth provider for API requests (used for template variable API mode) */
|
|
34
|
+
authProvider?: AuthProvider;
|
|
35
|
+
/** Callback when any field value changes (fired on blur for immediate sync) */
|
|
36
|
+
onChange?: (config: Record<string, unknown>, uiExtensions?: NodeUIExtensions) => void;
|
|
37
|
+
/** Callback when form is saved (includes both config and extensions if enabled) */
|
|
38
|
+
onSave?: (config: Record<string, unknown>, uiExtensions?: NodeUIExtensions) => void;
|
|
39
|
+
/** Callback when form is cancelled */
|
|
40
|
+
onCancel?: () => void;
|
|
41
|
+
}
|
|
42
|
+
declare const ConfigForm: import("svelte").Component<Props, {}, "">;
|
|
43
|
+
type ConfigForm = ReturnType<typeof ConfigForm>;
|
|
44
|
+
export default ConfigForm;
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { ConfigSchema, ConfigValues } from '../types';
|
|
3
|
+
import ConfigForm from './ConfigForm.svelte';
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
nodeLabel: string;
|
|
8
|
+
configSchema: ConfigSchema;
|
|
9
|
+
configValues: ConfigValues;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
onSave?: (values: ConfigValues) => void;
|
|
12
|
+
onCancel?: () => void;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let { onClose, onSave, onCancel, ...props }: Props = $props();
|
|
16
|
+
let localConfigValues = $derived.by(() => ({ ...props.configValues }));
|
|
17
|
+
|
|
18
|
+
function handleCancel() {
|
|
19
|
+
onCancel?.();
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function handleClose() {
|
|
23
|
+
onClose?.();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// Close modal on escape key
|
|
27
|
+
function handleKeydown(event: KeyboardEvent) {
|
|
28
|
+
if (event.key === 'Escape') {
|
|
29
|
+
handleClose();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Close modal when clicking outside
|
|
34
|
+
function handleBackdropClick(event: MouseEvent) {
|
|
35
|
+
if (event.target === event.currentTarget) {
|
|
36
|
+
handleClose();
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
{#if props.isOpen}
|
|
42
|
+
<!-- Modal Backdrop -->
|
|
43
|
+
<div
|
|
44
|
+
class="config-modal-backdrop"
|
|
45
|
+
onclick={handleBackdropClick}
|
|
46
|
+
onkeydown={handleKeydown}
|
|
47
|
+
role="dialog"
|
|
48
|
+
aria-modal="true"
|
|
49
|
+
aria-labelledby="config-modal-title"
|
|
50
|
+
tabindex="-1"
|
|
51
|
+
>
|
|
52
|
+
<!-- Modal Container -->
|
|
53
|
+
<div class="config-modal">
|
|
54
|
+
<!-- Modal Header -->
|
|
55
|
+
<div class="config-modal__header">
|
|
56
|
+
<h2 id="config-modal-title" class="config-modal__title">
|
|
57
|
+
Configure: {props.nodeLabel}
|
|
58
|
+
</h2>
|
|
59
|
+
<button
|
|
60
|
+
type="button"
|
|
61
|
+
class="config-modal__close-btn"
|
|
62
|
+
onclick={handleClose}
|
|
63
|
+
aria-label="Close configuration modal"
|
|
64
|
+
>
|
|
65
|
+
<span aria-hidden="true">×</span>
|
|
66
|
+
</button>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<!-- Modal Content -->
|
|
70
|
+
<div class="config-modal__content">
|
|
71
|
+
<ConfigForm
|
|
72
|
+
schema={props.configSchema}
|
|
73
|
+
values={localConfigValues}
|
|
74
|
+
showUIExtensions={false}
|
|
75
|
+
onSave={(config) => {
|
|
76
|
+
onSave?.(config);
|
|
77
|
+
}}
|
|
78
|
+
onCancel={handleCancel}
|
|
79
|
+
/>
|
|
80
|
+
</div>
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
{/if}
|
|
84
|
+
|
|
85
|
+
<style>
|
|
86
|
+
.config-modal-backdrop {
|
|
87
|
+
position: fixed;
|
|
88
|
+
top: 0;
|
|
89
|
+
left: 0;
|
|
90
|
+
right: 0;
|
|
91
|
+
bottom: 0;
|
|
92
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
z-index: 1000;
|
|
97
|
+
padding: 1rem;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.config-modal {
|
|
101
|
+
background: white;
|
|
102
|
+
border-radius: 0.75rem;
|
|
103
|
+
box-shadow:
|
|
104
|
+
0 20px 25px -5px rgba(0, 0, 0, 0.1),
|
|
105
|
+
0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
|
106
|
+
width: 100%;
|
|
107
|
+
max-width: 80vw;
|
|
108
|
+
min-width: 40rem;
|
|
109
|
+
max-height: 90vh;
|
|
110
|
+
display: flex;
|
|
111
|
+
flex-direction: column;
|
|
112
|
+
overflow: hidden;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.config-modal__header {
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
justify-content: space-between;
|
|
119
|
+
padding: 1.5rem 1.5rem 1rem 1.5rem;
|
|
120
|
+
border-bottom: 1px solid #e5e7eb;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.config-modal__title {
|
|
124
|
+
margin: 0;
|
|
125
|
+
font-size: 1.125rem;
|
|
126
|
+
font-weight: 600;
|
|
127
|
+
color: #111827;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.config-modal__close-btn {
|
|
131
|
+
width: 2rem;
|
|
132
|
+
height: 2rem;
|
|
133
|
+
border: none;
|
|
134
|
+
background: transparent;
|
|
135
|
+
border-radius: 0.375rem;
|
|
136
|
+
color: #6b7280;
|
|
137
|
+
font-size: 1.5rem;
|
|
138
|
+
font-weight: 400;
|
|
139
|
+
cursor: pointer;
|
|
140
|
+
display: flex;
|
|
141
|
+
align-items: center;
|
|
142
|
+
justify-content: center;
|
|
143
|
+
transition: all 0.2s;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.config-modal__close-btn:hover {
|
|
147
|
+
background-color: #f3f4f6;
|
|
148
|
+
color: #374151;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.config-modal__content {
|
|
152
|
+
padding: 1.5rem;
|
|
153
|
+
overflow-y: auto;
|
|
154
|
+
flex: 1;
|
|
155
|
+
min-height: 0;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
/* Responsive adjustments */
|
|
159
|
+
@media (max-width: 1024px) {
|
|
160
|
+
.config-modal {
|
|
161
|
+
max-width: 90vw;
|
|
162
|
+
min-width: 32rem;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@media (max-width: 768px) {
|
|
167
|
+
.config-modal {
|
|
168
|
+
max-width: 95vw;
|
|
169
|
+
min-width: 24rem;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.config-modal__header {
|
|
173
|
+
padding: 1rem 1rem 0.75rem 1rem;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.config-modal__content {
|
|
177
|
+
padding: 1rem;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
@media (max-width: 640px) {
|
|
182
|
+
.config-modal {
|
|
183
|
+
max-width: 100%;
|
|
184
|
+
min-width: auto;
|
|
185
|
+
margin: 0.5rem;
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ConfigSchema, ConfigValues } from '../types';
|
|
2
|
+
interface Props {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
nodeLabel: string;
|
|
5
|
+
configSchema: ConfigSchema;
|
|
6
|
+
configValues: ConfigValues;
|
|
7
|
+
onClose?: () => void;
|
|
8
|
+
onSave?: (values: ConfigValues) => void;
|
|
9
|
+
onCancel?: () => void;
|
|
10
|
+
}
|
|
11
|
+
declare const ConfigModal: import("svelte").Component<Props, {}, "">;
|
|
12
|
+
type ConfigModal = ReturnType<typeof ConfigModal>;
|
|
13
|
+
export default ConfigModal;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import ConfigPanel from './ConfigPanel.svelte';
|
|
4
|
+
import { fn } from 'storybook/test';
|
|
5
|
+
|
|
6
|
+
const { Story } = defineMeta({
|
|
7
|
+
title: 'Editor/ConfigPanel',
|
|
8
|
+
component: ConfigPanel,
|
|
9
|
+
tags: ['autodocs'],
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'padded'
|
|
12
|
+
},
|
|
13
|
+
args: {
|
|
14
|
+
onClose: fn()
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<Story
|
|
20
|
+
name="Default"
|
|
21
|
+
args={{
|
|
22
|
+
title: 'HTTP Request',
|
|
23
|
+
id: 'node-abc-123',
|
|
24
|
+
description: 'Send HTTP requests to external APIs',
|
|
25
|
+
configTitle: 'Configuration'
|
|
26
|
+
}}
|
|
27
|
+
/>
|
|
28
|
+
|
|
29
|
+
<Story
|
|
30
|
+
name="With Details"
|
|
31
|
+
args={{
|
|
32
|
+
title: 'OpenAI Chat',
|
|
33
|
+
id: 'node-def-456',
|
|
34
|
+
description: 'Chat completion using OpenAI models',
|
|
35
|
+
details: [
|
|
36
|
+
{ label: 'Category', value: 'AI' },
|
|
37
|
+
{ label: 'Version', value: '1.2.0' }
|
|
38
|
+
]
|
|
39
|
+
}}
|
|
40
|
+
/>
|
|
41
|
+
|
|
42
|
+
<Story
|
|
43
|
+
name="Minimal"
|
|
44
|
+
args={{
|
|
45
|
+
title: 'Start Node'
|
|
46
|
+
}}
|
|
47
|
+
/>
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default ConfigPanel;
|
|
2
|
+
type ConfigPanel = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const ConfigPanel: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
import ConfigPanel from './ConfigPanel.svelte';
|
|
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
|
+
new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
|
|
17
|
+
$$bindings?: Bindings;
|
|
18
|
+
} & Exports;
|
|
19
|
+
(internal: unknown, props: {
|
|
20
|
+
$$events?: Events;
|
|
21
|
+
$$slots?: Slots;
|
|
22
|
+
}): Exports & {
|
|
23
|
+
$set?: any;
|
|
24
|
+
$on?: any;
|
|
25
|
+
};
|
|
26
|
+
z_$$bindings?: Bindings;
|
|
27
|
+
}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
ConfigPanel Component
|
|
3
|
+
A generic panel for displaying details and configuration
|
|
4
|
+
Can be used for node config, workflow settings, or any entity with an ID
|
|
5
|
+
Accepts a slot for custom form content
|
|
6
|
+
Styled with BEM syntax
|
|
7
|
+
-->
|
|
8
|
+
|
|
9
|
+
<script lang="ts">
|
|
10
|
+
import type { Snippet } from 'svelte';
|
|
11
|
+
import ReadOnlyDetails from './ReadOnlyDetails.svelte';
|
|
12
|
+
import { getUiSettings } from '../stores/settingsStore.svelte.js';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A single detail item with label and value
|
|
16
|
+
*/
|
|
17
|
+
interface DetailItem {
|
|
18
|
+
/** The label to display */
|
|
19
|
+
label: string;
|
|
20
|
+
/** The value to display */
|
|
21
|
+
value: string;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Props interface for ConfigPanel component
|
|
26
|
+
*/
|
|
27
|
+
interface Props {
|
|
28
|
+
/** Panel title displayed in the header */
|
|
29
|
+
title: string;
|
|
30
|
+
/** Unique identifier to display with copy button */
|
|
31
|
+
id?: string;
|
|
32
|
+
/** Optional description text */
|
|
33
|
+
description?: string;
|
|
34
|
+
/** Array of label-value pairs to display */
|
|
35
|
+
details?: DetailItem[];
|
|
36
|
+
/** Title for the configuration section */
|
|
37
|
+
configTitle?: string;
|
|
38
|
+
/** Callback function when the panel is closed */
|
|
39
|
+
onClose: () => void;
|
|
40
|
+
/** Slot content for the configuration form */
|
|
41
|
+
children?: Snippet;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
const {
|
|
45
|
+
title,
|
|
46
|
+
id,
|
|
47
|
+
description,
|
|
48
|
+
details = [],
|
|
49
|
+
configTitle = 'Configuration',
|
|
50
|
+
onClose,
|
|
51
|
+
children
|
|
52
|
+
}: Props = $props();
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Check if details section should be shown
|
|
56
|
+
*/
|
|
57
|
+
const hasDetails = $derived(id !== undefined || details.length > 0 || description !== undefined);
|
|
58
|
+
</script>
|
|
59
|
+
|
|
60
|
+
<div class="config-panel" class:config-panel--compact={getUiSettings().compactMode}>
|
|
61
|
+
<!-- Header -->
|
|
62
|
+
<div class="config-panel__header">
|
|
63
|
+
<h2 class="config-panel__title">{title}</h2>
|
|
64
|
+
<button class="config-panel__close" onclick={onClose} aria-label="Close panel"> × </button>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<!-- Details Section (between header and content) -->
|
|
68
|
+
{#if hasDetails && id}
|
|
69
|
+
<div class="config-panel__details">
|
|
70
|
+
<ReadOnlyDetails {id} {description} {details} />
|
|
71
|
+
</div>
|
|
72
|
+
{/if}
|
|
73
|
+
|
|
74
|
+
<!-- Content -->
|
|
75
|
+
<div class="config-panel__content">
|
|
76
|
+
{#if children}
|
|
77
|
+
<div class="config-panel__section">
|
|
78
|
+
<h3 class="config-panel__section-title">{configTitle}</h3>
|
|
79
|
+
{@render children()}
|
|
80
|
+
</div>
|
|
81
|
+
{/if}
|
|
82
|
+
</div>
|
|
83
|
+
</div>
|
|
84
|
+
|
|
85
|
+
<style>
|
|
86
|
+
.config-panel {
|
|
87
|
+
height: 100%;
|
|
88
|
+
display: flex;
|
|
89
|
+
flex-direction: column;
|
|
90
|
+
background-color: var(--fd-background);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.config-panel__header {
|
|
94
|
+
display: flex;
|
|
95
|
+
justify-content: space-between;
|
|
96
|
+
align-items: center;
|
|
97
|
+
padding: 0.875rem 1rem;
|
|
98
|
+
border-bottom: 1px solid var(--fd-border);
|
|
99
|
+
background-color: var(--fd-muted);
|
|
100
|
+
flex-shrink: 0;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.config-panel__title {
|
|
104
|
+
margin: 0;
|
|
105
|
+
font-size: 1rem;
|
|
106
|
+
font-weight: 600;
|
|
107
|
+
color: var(--fd-foreground);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.config-panel__close {
|
|
111
|
+
background: none;
|
|
112
|
+
border: none;
|
|
113
|
+
font-size: 1.25rem;
|
|
114
|
+
line-height: 1;
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
color: var(--fd-muted-foreground);
|
|
117
|
+
padding: 0.25rem;
|
|
118
|
+
border-radius: var(--fd-radius-sm);
|
|
119
|
+
transition:
|
|
120
|
+
color var(--fd-transition-fast),
|
|
121
|
+
background-color var(--fd-transition-fast);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.config-panel__close:hover {
|
|
125
|
+
color: var(--fd-foreground);
|
|
126
|
+
background-color: var(--fd-subtle);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.config-panel__details {
|
|
130
|
+
padding: 0.75rem 1rem;
|
|
131
|
+
border-bottom: 1px solid var(--fd-border-muted);
|
|
132
|
+
background-color: var(--fd-muted);
|
|
133
|
+
flex-shrink: 0;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.config-panel__content {
|
|
137
|
+
flex: 1;
|
|
138
|
+
overflow-y: auto;
|
|
139
|
+
padding: 1rem;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.config-panel__section {
|
|
143
|
+
display: flex;
|
|
144
|
+
flex-direction: column;
|
|
145
|
+
gap: 0.75rem;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.config-panel__section-title {
|
|
149
|
+
margin: 0;
|
|
150
|
+
font-size: var(--fd-text-xs);
|
|
151
|
+
font-weight: 600;
|
|
152
|
+
color: var(--fd-muted-foreground);
|
|
153
|
+
text-transform: uppercase;
|
|
154
|
+
letter-spacing: 0.05em;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
/* Compact Mode Styles */
|
|
158
|
+
.config-panel--compact .config-panel__header {
|
|
159
|
+
padding: 0.5rem 0.75rem;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.config-panel--compact .config-panel__title {
|
|
163
|
+
font-size: 0.875rem;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.config-panel--compact .config-panel__close {
|
|
167
|
+
font-size: 1rem;
|
|
168
|
+
padding: 0.125rem;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.config-panel--compact .config-panel__details {
|
|
172
|
+
padding: 0.5rem 0.75rem;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.config-panel--compact .config-panel__content {
|
|
176
|
+
padding: 0.75rem;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.config-panel--compact .config-panel__section {
|
|
180
|
+
gap: 0.5rem;
|
|
181
|
+
}
|
|
182
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
/**
|
|
3
|
+
* A single detail item with label and value
|
|
4
|
+
*/
|
|
5
|
+
interface DetailItem {
|
|
6
|
+
/** The label to display */
|
|
7
|
+
label: string;
|
|
8
|
+
/** The value to display */
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Props interface for ConfigPanel component
|
|
13
|
+
*/
|
|
14
|
+
interface Props {
|
|
15
|
+
/** Panel title displayed in the header */
|
|
16
|
+
title: string;
|
|
17
|
+
/** Unique identifier to display with copy button */
|
|
18
|
+
id?: string;
|
|
19
|
+
/** Optional description text */
|
|
20
|
+
description?: string;
|
|
21
|
+
/** Array of label-value pairs to display */
|
|
22
|
+
details?: DetailItem[];
|
|
23
|
+
/** Title for the configuration section */
|
|
24
|
+
configTitle?: string;
|
|
25
|
+
/** Callback function when the panel is closed */
|
|
26
|
+
onClose: () => void;
|
|
27
|
+
/** Slot content for the configuration form */
|
|
28
|
+
children?: Snippet;
|
|
29
|
+
}
|
|
30
|
+
declare const ConfigPanel: import("svelte").Component<Props, {}, "">;
|
|
31
|
+
type ConfigPanel = ReturnType<typeof ConfigPanel>;
|
|
32
|
+
export default ConfigPanel;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { getDataTypeColor } from '../utils/colors';
|
|
3
|
+
import { useConnection } from '@xyflow/svelte';
|
|
4
|
+
|
|
5
|
+
const connection = useConnection();
|
|
6
|
+
|
|
7
|
+
let path: string | null = $derived.by(() => {
|
|
8
|
+
if (connection.current.inProgress) {
|
|
9
|
+
const { from, to } = connection.current;
|
|
10
|
+
return `M${from.x},${from.y} C ${from.x} ${to.y} ${from.x} ${to.y} ${to.x},${to.y}`;
|
|
11
|
+
}
|
|
12
|
+
return null;
|
|
13
|
+
});
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
{#if connection.current.inProgress}
|
|
17
|
+
<path
|
|
18
|
+
fill="none"
|
|
19
|
+
stroke-width={1.5}
|
|
20
|
+
class="animated"
|
|
21
|
+
stroke={getDataTypeColor(connection.current.fromHandle.id ?? '')}
|
|
22
|
+
d={path}
|
|
23
|
+
/>
|
|
24
|
+
<circle
|
|
25
|
+
cx={connection.current.to.x}
|
|
26
|
+
cy={connection.current.to.y}
|
|
27
|
+
fill="#fff"
|
|
28
|
+
r={3}
|
|
29
|
+
stroke={getDataTypeColor(connection.current.fromHandle.id ?? '')}
|
|
30
|
+
stroke-width={1.5}
|
|
31
|
+
/>
|
|
32
|
+
{/if}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
EdgeRefresher Component
|
|
3
|
+
Helper component that uses useUpdateNodeInternals to force edge recalculation
|
|
4
|
+
Must be rendered inside SvelteFlowProvider context
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
<script lang="ts">
|
|
8
|
+
import { useUpdateNodeInternals } from '@xyflow/svelte';
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
/** Node ID to refresh - when this changes, edges are recalculated */
|
|
12
|
+
nodeIdToRefresh: string | null;
|
|
13
|
+
/** Callback when refresh is complete */
|
|
14
|
+
onRefreshComplete?: () => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let { nodeIdToRefresh, onRefreshComplete }: Props = $props();
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Get the updateNodeInternals function from Svelte Flow context
|
|
21
|
+
* This recalculates handle positions and forces edge path updates
|
|
22
|
+
*/
|
|
23
|
+
const updateNodeInternals = useUpdateNodeInternals();
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Watch for nodeIdToRefresh changes and trigger edge recalculation
|
|
27
|
+
*/
|
|
28
|
+
$effect(() => {
|
|
29
|
+
if (nodeIdToRefresh) {
|
|
30
|
+
// Tell Svelte Flow to recalculate node internals (handle positions)
|
|
31
|
+
updateNodeInternals(nodeIdToRefresh);
|
|
32
|
+
|
|
33
|
+
// Notify parent that refresh is complete
|
|
34
|
+
if (onRefreshComplete) {
|
|
35
|
+
onRefreshComplete();
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<!-- This component renders nothing - it's just for the hook logic -->
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/** Node ID to refresh - when this changes, edges are recalculated */
|
|
3
|
+
nodeIdToRefresh: string | null;
|
|
4
|
+
/** Callback when refresh is complete */
|
|
5
|
+
onRefreshComplete?: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const EdgeRefresher: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type EdgeRefresher = ReturnType<typeof EdgeRefresher>;
|
|
9
|
+
export default EdgeRefresher;
|