@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,27 @@
|
|
|
1
|
+
export default StatusIcon;
|
|
2
|
+
type StatusIcon = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const StatusIcon: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
import StatusIcon from './StatusIcon.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,119 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Status Icon Component
|
|
3
|
+
Reusable status icon that can be used anywhere in the application
|
|
4
|
+
Displays status with appropriate icon, color, and styling
|
|
5
|
+
-->
|
|
6
|
+
|
|
7
|
+
<script lang="ts">
|
|
8
|
+
import type { NodeExecutionStatus } from '../types/index.js';
|
|
9
|
+
import Icon from '@iconify/svelte';
|
|
10
|
+
import { getStatusColor, getStatusIcon } from '../utils/nodeStatus.js';
|
|
11
|
+
|
|
12
|
+
interface Props {
|
|
13
|
+
status: NodeExecutionStatus;
|
|
14
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
15
|
+
showBackground?: boolean;
|
|
16
|
+
class?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let props: Props = $props();
|
|
20
|
+
|
|
21
|
+
// Size configurations
|
|
22
|
+
const sizeConfig = {
|
|
23
|
+
sm: {
|
|
24
|
+
iconSize: '12px',
|
|
25
|
+
backgroundSize: '20px',
|
|
26
|
+
backgroundRadius: '0.25rem'
|
|
27
|
+
},
|
|
28
|
+
md: {
|
|
29
|
+
iconSize: '16px',
|
|
30
|
+
backgroundSize: '24px',
|
|
31
|
+
backgroundRadius: '0.375rem'
|
|
32
|
+
},
|
|
33
|
+
lg: {
|
|
34
|
+
iconSize: '24px',
|
|
35
|
+
backgroundSize: '48px',
|
|
36
|
+
backgroundRadius: '0.5rem'
|
|
37
|
+
},
|
|
38
|
+
xl: {
|
|
39
|
+
iconSize: '28px',
|
|
40
|
+
backgroundSize: '56px',
|
|
41
|
+
backgroundRadius: '0.75rem'
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const config = $derived(sizeConfig[props.size || 'md']);
|
|
46
|
+
const statusColor = $derived(getStatusColor(props.status));
|
|
47
|
+
const statusIcon = $derived(getStatusIcon(props.status));
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
{#if props.showBackground}
|
|
51
|
+
<div
|
|
52
|
+
class="status-icon status-icon--with-background {props.class || ''}"
|
|
53
|
+
style="
|
|
54
|
+
--icon-size: {config.iconSize};
|
|
55
|
+
--background-size: {config.backgroundSize};
|
|
56
|
+
--background-radius: {config.backgroundRadius};
|
|
57
|
+
--status-color: {statusColor};
|
|
58
|
+
"
|
|
59
|
+
title={props.status}
|
|
60
|
+
>
|
|
61
|
+
<Icon icon={statusIcon} class="status-icon__icon" />
|
|
62
|
+
</div>
|
|
63
|
+
{:else}
|
|
64
|
+
<Icon
|
|
65
|
+
icon={statusIcon}
|
|
66
|
+
class="status-icon status-icon--icon-only {props.class || ''}"
|
|
67
|
+
style="
|
|
68
|
+
--icon-size: {config.iconSize};
|
|
69
|
+
--status-color: {statusColor};
|
|
70
|
+
"
|
|
71
|
+
/>
|
|
72
|
+
{/if}
|
|
73
|
+
|
|
74
|
+
<style>
|
|
75
|
+
.status-icon {
|
|
76
|
+
display: inline-flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
color: var(--status-color);
|
|
80
|
+
transition: all 0.2s ease-in-out;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.status-icon--with-background {
|
|
84
|
+
width: var(--background-size);
|
|
85
|
+
height: var(--background-size);
|
|
86
|
+
background-color: var(--status-color);
|
|
87
|
+
color: #fff;
|
|
88
|
+
border-radius: var(--background-radius);
|
|
89
|
+
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
90
|
+
position: relative;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.status-icon--with-background :global(.status-icon__icon) {
|
|
94
|
+
width: var(--icon-size);
|
|
95
|
+
height: var(--icon-size);
|
|
96
|
+
font-size: var(--icon-size);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.status-icon--icon-only {
|
|
100
|
+
width: var(--icon-size);
|
|
101
|
+
height: var(--icon-size);
|
|
102
|
+
font-size: var(--icon-size);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Animation for running status */
|
|
106
|
+
.status-icon--with-background[title='running'] {
|
|
107
|
+
animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@keyframes pulse {
|
|
111
|
+
0%,
|
|
112
|
+
100% {
|
|
113
|
+
opacity: 1;
|
|
114
|
+
}
|
|
115
|
+
50% {
|
|
116
|
+
opacity: 0.7;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
</style>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { NodeExecutionStatus } from '../types/index.js';
|
|
2
|
+
interface Props {
|
|
3
|
+
status: NodeExecutionStatus;
|
|
4
|
+
size?: 'sm' | 'md' | 'lg' | 'xl';
|
|
5
|
+
showBackground?: boolean;
|
|
6
|
+
class?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const StatusIcon: import("svelte").Component<Props, {}, "">;
|
|
9
|
+
type StatusIcon = ReturnType<typeof StatusIcon>;
|
|
10
|
+
export default StatusIcon;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import StatusLabel from './StatusLabel.svelte';
|
|
4
|
+
|
|
5
|
+
const { Story } = defineMeta({
|
|
6
|
+
title: 'Display/StatusLabel',
|
|
7
|
+
component: StatusLabel,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
argTypes: {
|
|
10
|
+
label: { control: 'text' }
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<Story name="Default" args={{ label: 'Ready' }} />
|
|
16
|
+
|
|
17
|
+
<Story name="Long Text" args={{ label: 'Processing workflow execution...' }} />
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default StatusLabel;
|
|
2
|
+
type StatusLabel = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const StatusLabel: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
import StatusLabel from './StatusLabel.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,33 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Status Label Component
|
|
3
|
+
Dedicated component for displaying status labels with consistent styling
|
|
4
|
+
-->
|
|
5
|
+
|
|
6
|
+
<script lang="ts">
|
|
7
|
+
interface Props {
|
|
8
|
+
label: string;
|
|
9
|
+
class?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
let props: Props = $props();
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<span class="status-label {props.class || ''}">
|
|
16
|
+
{props.label}
|
|
17
|
+
</span>
|
|
18
|
+
|
|
19
|
+
<style>
|
|
20
|
+
.status-label {
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
color: #000000;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
line-height: 1.2;
|
|
26
|
+
overflow: hidden;
|
|
27
|
+
text-overflow: ellipsis;
|
|
28
|
+
text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
|
|
29
|
+
letter-spacing: 0.025em;
|
|
30
|
+
display: flex;
|
|
31
|
+
align-items: center;
|
|
32
|
+
}
|
|
33
|
+
</style>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
<script module>
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import ThemeToggle from './ThemeToggle.svelte';
|
|
4
|
+
|
|
5
|
+
const { Story } = defineMeta({
|
|
6
|
+
title: 'Display/ThemeToggle',
|
|
7
|
+
component: ThemeToggle,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
argTypes: {
|
|
10
|
+
size: {
|
|
11
|
+
control: { type: 'select' },
|
|
12
|
+
options: ['sm', 'md', 'lg']
|
|
13
|
+
},
|
|
14
|
+
showLabel: { control: 'boolean' }
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<Story name="Default" />
|
|
20
|
+
|
|
21
|
+
<Story name="Small" args={{ size: 'sm' }} />
|
|
22
|
+
|
|
23
|
+
<Story name="Large" args={{ size: 'lg' }} />
|
|
24
|
+
|
|
25
|
+
<Story name="With Label" args={{ showLabel: true }} />
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export default ThemeToggle;
|
|
2
|
+
type ThemeToggle = SvelteComponent<{
|
|
3
|
+
[x: string]: never;
|
|
4
|
+
}, {
|
|
5
|
+
[evt: string]: CustomEvent<any>;
|
|
6
|
+
}, {}> & {
|
|
7
|
+
$$bindings?: string | undefined;
|
|
8
|
+
};
|
|
9
|
+
declare const ThemeToggle: $$__sveltets_2_IsomorphicComponent<{
|
|
10
|
+
[x: string]: never;
|
|
11
|
+
}, {
|
|
12
|
+
[evt: string]: CustomEvent<any>;
|
|
13
|
+
}, {}, {}, string>;
|
|
14
|
+
import ThemeToggle from './ThemeToggle.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,185 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Theme Toggle Component
|
|
3
|
+
A button that cycles through light, dark, and auto theme modes
|
|
4
|
+
Displays appropriate icon for current theme state
|
|
5
|
+
Styled with BEM syntax
|
|
6
|
+
-->
|
|
7
|
+
|
|
8
|
+
<script lang="ts">
|
|
9
|
+
import Icon from '@iconify/svelte';
|
|
10
|
+
import { getTheme, getResolvedTheme, cycleTheme } from '../stores/settingsStore.svelte.js';
|
|
11
|
+
import type { ThemePreference } from '../types/settings.js';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Props interface for ThemeToggle component
|
|
15
|
+
*/
|
|
16
|
+
interface Props {
|
|
17
|
+
/** Size variant of the toggle button */
|
|
18
|
+
size?: 'sm' | 'md' | 'lg';
|
|
19
|
+
/** Whether to show the theme label text */
|
|
20
|
+
showLabel?: boolean;
|
|
21
|
+
/** Custom class name for styling */
|
|
22
|
+
class?: string;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const { size = 'md', showLabel = false, class: className = '' }: Props = $props();
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Get the icon for the current theme
|
|
29
|
+
* - light: sun icon
|
|
30
|
+
* - dark: moon icon
|
|
31
|
+
* - auto: computer/system icon
|
|
32
|
+
*/
|
|
33
|
+
const themeIcon = $derived(getThemeIcon(getTheme()));
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* Get icon name based on theme preference
|
|
37
|
+
*/
|
|
38
|
+
function getThemeIcon(currentTheme: ThemePreference): string {
|
|
39
|
+
switch (currentTheme) {
|
|
40
|
+
case 'light':
|
|
41
|
+
return 'mdi:white-balance-sunny';
|
|
42
|
+
case 'dark':
|
|
43
|
+
return 'mdi:moon-waning-crescent';
|
|
44
|
+
case 'auto':
|
|
45
|
+
return 'mdi:desktop-mac';
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Get accessible label for the current theme
|
|
51
|
+
*/
|
|
52
|
+
const themeLabel = $derived(getThemeLabel(getTheme()));
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Get label text based on theme preference
|
|
56
|
+
*/
|
|
57
|
+
function getThemeLabel(currentTheme: ThemePreference): string {
|
|
58
|
+
switch (currentTheme) {
|
|
59
|
+
case 'light':
|
|
60
|
+
return 'Light';
|
|
61
|
+
case 'dark':
|
|
62
|
+
return 'Dark';
|
|
63
|
+
case 'auto':
|
|
64
|
+
return 'Auto';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Get tooltip text describing current state and next action
|
|
70
|
+
*/
|
|
71
|
+
const tooltipText = $derived(getTooltipText(getTheme(), getResolvedTheme()));
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Get tooltip text based on theme preference
|
|
75
|
+
*/
|
|
76
|
+
function getTooltipText(currentTheme: ThemePreference, resolved: 'light' | 'dark'): string {
|
|
77
|
+
if (currentTheme === 'auto') {
|
|
78
|
+
return `Theme: Auto (${resolved}). Click to switch to Light`;
|
|
79
|
+
}
|
|
80
|
+
const next = currentTheme === 'light' ? 'Dark' : 'Auto';
|
|
81
|
+
return `Theme: ${currentTheme === 'light' ? 'Light' : 'Dark'}. Click to switch to ${next}`;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Handle click to cycle theme
|
|
86
|
+
*/
|
|
87
|
+
function handleClick(): void {
|
|
88
|
+
cycleTheme();
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Handle keyboard events for accessibility
|
|
93
|
+
*/
|
|
94
|
+
function handleKeydown(event: KeyboardEvent): void {
|
|
95
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
96
|
+
event.preventDefault();
|
|
97
|
+
cycleTheme();
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
</script>
|
|
101
|
+
|
|
102
|
+
<button
|
|
103
|
+
class="flowdrop-theme-toggle flowdrop-theme-toggle--{size} {className}"
|
|
104
|
+
onclick={handleClick}
|
|
105
|
+
onkeydown={handleKeydown}
|
|
106
|
+
title={tooltipText}
|
|
107
|
+
aria-label={tooltipText}
|
|
108
|
+
type="button"
|
|
109
|
+
>
|
|
110
|
+
<span class="flowdrop-theme-toggle__icon">
|
|
111
|
+
<Icon icon={themeIcon} />
|
|
112
|
+
</span>
|
|
113
|
+
{#if showLabel}
|
|
114
|
+
<span class="flowdrop-theme-toggle__label">{themeLabel}</span>
|
|
115
|
+
{/if}
|
|
116
|
+
</button>
|
|
117
|
+
|
|
118
|
+
<style>
|
|
119
|
+
.flowdrop-theme-toggle {
|
|
120
|
+
display: inline-flex;
|
|
121
|
+
align-items: center;
|
|
122
|
+
justify-content: center;
|
|
123
|
+
gap: var(--fd-space-xs);
|
|
124
|
+
border: 1px solid var(--fd-border);
|
|
125
|
+
border-radius: var(--fd-radius-md);
|
|
126
|
+
background-color: var(--fd-background);
|
|
127
|
+
color: var(--fd-foreground);
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
transition: all var(--fd-transition-normal);
|
|
130
|
+
font-family: inherit;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.flowdrop-theme-toggle:hover {
|
|
134
|
+
background-color: var(--fd-muted);
|
|
135
|
+
border-color: var(--fd-border-strong);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
.flowdrop-theme-toggle:focus {
|
|
139
|
+
outline: none;
|
|
140
|
+
box-shadow: 0 0 0 2px var(--fd-ring);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.flowdrop-theme-toggle:active {
|
|
144
|
+
transform: scale(0.98);
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* Size variants */
|
|
148
|
+
.flowdrop-theme-toggle--sm {
|
|
149
|
+
padding: var(--fd-space-3xs) var(--fd-space-xs);
|
|
150
|
+
font-size: var(--fd-text-xs);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.flowdrop-theme-toggle--sm .flowdrop-theme-toggle__icon {
|
|
154
|
+
font-size: var(--fd-text-sm);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.flowdrop-theme-toggle--md {
|
|
158
|
+
padding: var(--fd-space-xs) var(--fd-space-md);
|
|
159
|
+
font-size: var(--fd-text-sm);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.flowdrop-theme-toggle--md .flowdrop-theme-toggle__icon {
|
|
163
|
+
font-size: var(--fd-text-base);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.flowdrop-theme-toggle--lg {
|
|
167
|
+
padding: var(--fd-space-md) var(--fd-space-xl);
|
|
168
|
+
font-size: var(--fd-text-base);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
.flowdrop-theme-toggle--lg .flowdrop-theme-toggle__icon {
|
|
172
|
+
font-size: var(--fd-text-lg);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.flowdrop-theme-toggle__icon {
|
|
176
|
+
display: flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
justify-content: center;
|
|
179
|
+
line-height: 1;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.flowdrop-theme-toggle__label {
|
|
183
|
+
font-weight: 500;
|
|
184
|
+
}
|
|
185
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props interface for ThemeToggle component
|
|
3
|
+
*/
|
|
4
|
+
interface Props {
|
|
5
|
+
/** Size variant of the toggle button */
|
|
6
|
+
size?: 'sm' | 'md' | 'lg';
|
|
7
|
+
/** Whether to show the theme label text */
|
|
8
|
+
showLabel?: boolean;
|
|
9
|
+
/** Custom class name for styling */
|
|
10
|
+
class?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const ThemeToggle: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type ThemeToggle = ReturnType<typeof ThemeToggle>;
|
|
14
|
+
export default ThemeToggle;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
Universal Node Component
|
|
3
|
+
Renders any node type with automatic status overlay injection.
|
|
4
|
+
This component can replace individual node components in SvelteFlow.
|
|
5
|
+
|
|
6
|
+
Uses the node component registry to resolve which component to render,
|
|
7
|
+
enabling custom node types to be registered and used dynamically.
|
|
8
|
+
-->
|
|
9
|
+
|
|
10
|
+
<script lang="ts">
|
|
11
|
+
import type { WorkflowNode } from '../types/index.js';
|
|
12
|
+
import { nodeComponentRegistry } from '../registry/nodeComponentRegistry.js';
|
|
13
|
+
import { resolveBuiltinAlias } from '../registry/builtinNodes.js';
|
|
14
|
+
import NodeStatusOverlay from './NodeStatusOverlay.svelte';
|
|
15
|
+
import { shouldShowNodeStatus } from '../utils/nodeWrapper.js';
|
|
16
|
+
import { resolveComponentName } from '../utils/nodeTypes.js';
|
|
17
|
+
|
|
18
|
+
let {
|
|
19
|
+
data,
|
|
20
|
+
selected = false
|
|
21
|
+
}: {
|
|
22
|
+
data: WorkflowNode['data'] & {
|
|
23
|
+
nodeId?: string;
|
|
24
|
+
onConfigOpen?: (node: { id: string; type: string; data: WorkflowNode['data'] }) => void;
|
|
25
|
+
};
|
|
26
|
+
selected?: boolean;
|
|
27
|
+
} = $props();
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Determine which node component to render based on node type.
|
|
31
|
+
* Priority: config.nodeType > metadata.type
|
|
32
|
+
* Explicitly track config.nodeType to ensure reactivity.
|
|
33
|
+
*/
|
|
34
|
+
let configNodeType = $derived(data.config?.nodeType as string | undefined);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Resolve the component name from metadata and config.
|
|
38
|
+
* This handles the logic of choosing between config.nodeType and metadata.type.
|
|
39
|
+
*/
|
|
40
|
+
let resolvedComponentName = $derived(
|
|
41
|
+
data.metadata ? resolveComponentName(data.metadata, configNodeType) : 'workflowNode'
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Get the node component from the registry.
|
|
46
|
+
*/
|
|
47
|
+
let nodeComponent = $derived(getNodeComponent(resolvedComponentName));
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Get execution info for status overlay
|
|
51
|
+
*/
|
|
52
|
+
let executionInfo = $derived(data.executionInfo);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Determine if status overlay should be shown.
|
|
56
|
+
* Hide for note nodes as they have their own styling.
|
|
57
|
+
*/
|
|
58
|
+
let shouldShowStatus = $derived(
|
|
59
|
+
shouldShowNodeStatus(executionInfo) && resolvedComponentName !== 'note'
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Get the node component for the given type from the registry.
|
|
64
|
+
*
|
|
65
|
+
* @param nodeType - The node type identifier
|
|
66
|
+
* @returns The Svelte component to render
|
|
67
|
+
*/
|
|
68
|
+
function getNodeComponent(nodeType: string) {
|
|
69
|
+
// Resolve any aliases (e.g., "default" -> "workflowNode")
|
|
70
|
+
const resolvedType = resolveBuiltinAlias(nodeType);
|
|
71
|
+
|
|
72
|
+
// Get component from registry (defaults to workflowNode if not found)
|
|
73
|
+
const component = nodeComponentRegistry.getComponent(resolvedType);
|
|
74
|
+
if (component) {
|
|
75
|
+
return component;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// Return the default component from registry
|
|
79
|
+
return nodeComponentRegistry.getComponent('workflowNode');
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Get optimal status position for this node type.
|
|
84
|
+
* Uses registry if available, otherwise falls back to defaults.
|
|
85
|
+
*/
|
|
86
|
+
function getStatusPosition(): 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' {
|
|
87
|
+
// Try registry first
|
|
88
|
+
const position = nodeComponentRegistry.getStatusPosition(resolvedComponentName);
|
|
89
|
+
if (position) {
|
|
90
|
+
return position;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
// Fallback based on node type
|
|
94
|
+
switch (resolvedComponentName) {
|
|
95
|
+
case 'tool':
|
|
96
|
+
return 'top-left';
|
|
97
|
+
case 'note':
|
|
98
|
+
return 'bottom-right';
|
|
99
|
+
case 'simple':
|
|
100
|
+
case 'square':
|
|
101
|
+
default:
|
|
102
|
+
return 'top-right';
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Get optimal status size for this node type.
|
|
108
|
+
* Uses registry if available, otherwise falls back to defaults.
|
|
109
|
+
*/
|
|
110
|
+
function getStatusSize(): 'sm' | 'md' | 'lg' {
|
|
111
|
+
// Try registry first
|
|
112
|
+
const size = nodeComponentRegistry.getStatusSize(resolvedComponentName);
|
|
113
|
+
if (size) {
|
|
114
|
+
return size;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Fallback based on node type
|
|
118
|
+
switch (resolvedComponentName) {
|
|
119
|
+
case 'tool':
|
|
120
|
+
case 'note':
|
|
121
|
+
case 'square':
|
|
122
|
+
return 'sm';
|
|
123
|
+
case 'simple':
|
|
124
|
+
default:
|
|
125
|
+
return 'md';
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
</script>
|
|
129
|
+
|
|
130
|
+
<div class="universal-node">
|
|
131
|
+
<!-- Render the node component dynamically (Svelte 5 dynamic component syntax) -->
|
|
132
|
+
{#if nodeComponent}
|
|
133
|
+
<!-- svelte-ignore binding_property_non_reactive — Svelte 5 dynamic component limitation; reactivity maintained via $derived -->
|
|
134
|
+
{@const NodeComponent = nodeComponent}
|
|
135
|
+
<NodeComponent {data} {selected} />
|
|
136
|
+
{/if}
|
|
137
|
+
|
|
138
|
+
<!-- Status overlay - only show if there's meaningful status information -->
|
|
139
|
+
{#if shouldShowStatus}
|
|
140
|
+
<NodeStatusOverlay
|
|
141
|
+
nodeId={data.nodeId ?? 'unknown'}
|
|
142
|
+
{executionInfo}
|
|
143
|
+
position={getStatusPosition()}
|
|
144
|
+
size={getStatusSize()}
|
|
145
|
+
showDetails={true}
|
|
146
|
+
/>
|
|
147
|
+
{/if}
|
|
148
|
+
</div>
|
|
149
|
+
|
|
150
|
+
<style>
|
|
151
|
+
.universal-node {
|
|
152
|
+
position: relative;
|
|
153
|
+
display: inline-block;
|
|
154
|
+
}
|
|
155
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { WorkflowNode } from '../types/index.js';
|
|
2
|
+
type $$ComponentProps = {
|
|
3
|
+
data: WorkflowNode['data'] & {
|
|
4
|
+
nodeId?: string;
|
|
5
|
+
onConfigOpen?: (node: {
|
|
6
|
+
id: string;
|
|
7
|
+
type: string;
|
|
8
|
+
data: WorkflowNode['data'];
|
|
9
|
+
}) => void;
|
|
10
|
+
};
|
|
11
|
+
selected?: boolean;
|
|
12
|
+
};
|
|
13
|
+
declare const UniversalNode: import("svelte").Component<$$ComponentProps, {}, "">;
|
|
14
|
+
type UniversalNode = ReturnType<typeof UniversalNode>;
|
|
15
|
+
export default UniversalNode;
|