@flowdrop/flowdrop 1.5.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 +46 -47
- package/dist/adapters/WorkflowAdapter.d.ts +1 -1
- package/dist/adapters/WorkflowAdapter.js +26 -26
- package/dist/adapters/agentspec/AgentSpecAdapter.d.ts +2 -2
- package/dist/adapters/agentspec/AgentSpecAdapter.js +122 -133
- package/dist/adapters/agentspec/agentAdapter.d.ts +2 -2
- package/dist/adapters/agentspec/agentAdapter.js +10 -10
- package/dist/adapters/agentspec/autoLayout.d.ts +1 -1
- package/dist/adapters/agentspec/autoLayout.js +7 -9
- package/dist/adapters/agentspec/componentTypeDefaults.d.ts +1 -1
- package/dist/adapters/agentspec/componentTypeDefaults.js +120 -120
- package/dist/adapters/agentspec/defaultNodeTypes.d.ts +2 -2
- package/dist/adapters/agentspec/defaultNodeTypes.js +307 -307
- package/dist/adapters/agentspec/index.d.ts +10 -10
- package/dist/adapters/agentspec/index.js +6 -6
- package/dist/adapters/agentspec/validator.d.ts +2 -2
- package/dist/adapters/agentspec/validator.js +20 -22
- package/dist/api/enhanced-client.d.ts +3 -3
- package/dist/api/enhanced-client.js +72 -73
- package/dist/chat/commandClassifier.js +6 -6
- package/dist/chat/index.d.ts +5 -5
- package/dist/chat/index.js +4 -4
- package/dist/chat/responseParser.d.ts +6 -6
- package/dist/chat/responseParser.js +28 -24
- package/dist/commands/batch.d.ts +1 -1
- package/dist/commands/batch.js +5 -7
- package/dist/commands/executor.d.ts +2 -2
- package/dist/commands/executor.js +320 -231
- package/dist/commands/index.d.ts +6 -6
- package/dist/commands/index.js +5 -5
- package/dist/commands/parser.d.ts +1 -1
- package/dist/commands/parser.js +91 -74
- package/dist/commands/positioner.d.ts +2 -2
- package/dist/commands/positioner.js +1 -1
- package/dist/commands/storeIntegration.svelte.d.ts +2 -2
- package/dist/commands/storeIntegration.svelte.js +5 -5
- package/dist/commands/types.d.ts +42 -42
- package/dist/commands/types.js +2 -2
- package/dist/components/App.svelte +240 -294
- package/dist/components/App.svelte.d.ts +9 -9
- package/dist/components/CanvasBanner.stories.svelte +10 -16
- package/dist/components/CanvasBanner.stories.svelte.d.ts +1 -1
- package/dist/components/CanvasBanner.svelte +2 -2
- package/dist/components/CanvasBanner.svelte.d.ts +1 -1
- package/dist/components/CanvasController.svelte +3 -4
- package/dist/components/ConfigForm.svelte +118 -256
- package/dist/components/ConfigForm.svelte.d.ts +2 -2
- package/dist/components/ConfigMappingRow.svelte +7 -9
- package/dist/components/ConfigMappingRow.svelte.d.ts +1 -1
- package/dist/components/ConfigModal.svelte +3 -3
- package/dist/components/ConfigModal.svelte.d.ts +1 -1
- package/dist/components/ConfigPanel.stories.svelte +19 -19
- package/dist/components/ConfigPanel.stories.svelte.d.ts +1 -1
- package/dist/components/ConfigPanel.svelte +9 -20
- package/dist/components/ConfigPanel.svelte.d.ts +1 -1
- package/dist/components/ConnectionLine.svelte +4 -4
- package/dist/components/EdgeRefresher.svelte +1 -1
- package/dist/components/FlowDropEdge.stories.svelte +110 -110
- package/dist/components/FlowDropEdge.svelte +9 -9
- package/dist/components/FlowDropEdge.svelte.d.ts +1 -1
- package/dist/components/FlowDropZone.svelte +6 -9
- package/dist/components/FlowDropZone.svelte.d.ts +1 -1
- package/dist/components/LoadingSpinner.stories.svelte +13 -13
- package/dist/components/LoadingSpinner.stories.svelte.d.ts +1 -1
- package/dist/components/LoadingSpinner.svelte +3 -3
- package/dist/components/LoadingSpinner.svelte.d.ts +1 -1
- package/dist/components/Logo.stories.svelte +4 -4
- package/dist/components/Logo.stories.svelte.d.ts +1 -1
- package/dist/components/Logo.svelte +3 -9
- package/dist/components/LogsSidebar.svelte +41 -48
- package/dist/components/LogsSidebar.svelte.d.ts +1 -1
- package/dist/components/MarkdownDisplay.stories.svelte +10 -14
- package/dist/components/MarkdownDisplay.stories.svelte.d.ts +1 -1
- package/dist/components/MarkdownDisplay.svelte +4 -6
- package/dist/components/Navbar.stories.svelte +19 -19
- package/dist/components/Navbar.stories.svelte.d.ts +1 -1
- package/dist/components/Navbar.svelte +28 -49
- package/dist/components/Navbar.svelte.d.ts +2 -2
- package/dist/components/NodeSidebar.svelte +42 -88
- package/dist/components/NodeSidebar.svelte.d.ts +1 -1
- package/dist/components/NodeStatusOverlay.stories.svelte +19 -31
- package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +1 -1
- package/dist/components/NodeStatusOverlay.svelte +40 -55
- package/dist/components/NodeStatusOverlay.svelte.d.ts +3 -3
- package/dist/components/NodeSwapPicker.svelte +20 -64
- package/dist/components/NodeSwapPicker.svelte.d.ts +1 -1
- package/dist/components/PipelineStatus.svelte +63 -89
- package/dist/components/PipelineStatus.svelte.d.ts +4 -4
- package/dist/components/PortCoordinateTracker.svelte +5 -7
- package/dist/components/PortCoordinateTracker.svelte.d.ts +1 -1
- package/dist/components/PortMappingRow.svelte +20 -24
- package/dist/components/PortMappingRow.svelte.d.ts +2 -2
- package/dist/components/ReadOnlyDetails.svelte +1 -1
- package/dist/components/SchemaForm.stories.svelte +53 -53
- package/dist/components/SchemaForm.stories.svelte.d.ts +1 -1
- package/dist/components/SchemaForm.svelte +24 -51
- package/dist/components/SchemaForm.svelte.d.ts +2 -2
- package/dist/components/SettingsModal.svelte +6 -9
- package/dist/components/SettingsModal.svelte.d.ts +1 -1
- package/dist/components/SettingsPanel.svelte +138 -158
- package/dist/components/SettingsPanel.svelte.d.ts +1 -1
- package/dist/components/StatusIcon.stories.svelte +16 -29
- package/dist/components/StatusIcon.stories.svelte.d.ts +1 -1
- package/dist/components/StatusIcon.svelte +19 -19
- package/dist/components/StatusIcon.svelte.d.ts +2 -2
- package/dist/components/StatusLabel.stories.svelte +8 -8
- package/dist/components/StatusLabel.stories.svelte.d.ts +1 -1
- package/dist/components/SwapMappingEditor.svelte +35 -56
- package/dist/components/SwapMappingEditor.svelte.d.ts +2 -2
- package/dist/components/ThemeToggle.stories.svelte +10 -10
- package/dist/components/ThemeToggle.stories.svelte.d.ts +1 -1
- package/dist/components/ThemeToggle.svelte +22 -33
- package/dist/components/ThemeToggle.svelte.d.ts +1 -1
- package/dist/components/UniversalNode.svelte +29 -41
- package/dist/components/UniversalNode.svelte.d.ts +3 -3
- package/dist/components/WorkflowEditor.svelte +113 -168
- package/dist/components/WorkflowEditor.svelte.d.ts +4 -4
- package/dist/components/chat/AIChatPanel.svelte +272 -133
- package/dist/components/chat/AIChatPanel.svelte.d.ts +3 -3
- package/dist/components/chat/CommandPreview.svelte +74 -24
- package/dist/components/chat/CommandPreview.svelte.d.ts +1 -1
- package/dist/components/console/CommandConsole.stories.svelte +71 -53
- package/dist/components/console/CommandConsole.stories.svelte.d.ts +1 -1
- package/dist/components/console/CommandConsole.svelte +39 -35
- package/dist/components/console/CommandConsole.svelte.d.ts +2 -2
- package/dist/components/console/ConsoleAutocomplete.svelte +6 -3
- package/dist/components/console/ConsoleInput.svelte +148 -89
- package/dist/components/console/ConsoleInput.svelte.d.ts +1 -1
- package/dist/components/console/ConsoleOutput.svelte +5 -10
- package/dist/components/console/ConsoleOutput.svelte.d.ts +1 -1
- package/dist/components/console/formatters.d.ts +1 -1
- package/dist/components/console/formatters.js +27 -29
- package/dist/components/form/FormArray.svelte +75 -132
- package/dist/components/form/FormArray.svelte.d.ts +1 -1
- package/dist/components/form/FormAutocomplete.svelte +65 -108
- package/dist/components/form/FormAutocomplete.svelte.d.ts +1 -1
- package/dist/components/form/FormCheckboxGroup.stories.svelte +13 -16
- package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +1 -1
- package/dist/components/form/FormCheckboxGroup.svelte +2 -2
- package/dist/components/form/FormCodeEditor.svelte +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 -6
- package/dist/components/interrupt/index.js +6 -6
- package/dist/components/layouts/MainLayout.svelte +46 -84
- package/dist/components/layouts/MainLayout.svelte.d.ts +6 -6
- package/dist/components/nodes/GatewayNode.stories.svelte +64 -65
- package/dist/components/nodes/GatewayNode.svelte +37 -70
- package/dist/components/nodes/GatewayNode.svelte.d.ts +3 -3
- package/dist/components/nodes/IdeaNode.stories.svelte +25 -26
- package/dist/components/nodes/IdeaNode.svelte +22 -36
- package/dist/components/nodes/IdeaNode.svelte.d.ts +1 -1
- package/dist/components/nodes/NotesNode.stories.svelte +37 -38
- package/dist/components/nodes/NotesNode.svelte +28 -39
- package/dist/components/nodes/NotesNode.svelte.d.ts +1 -1
- package/dist/components/nodes/SimpleNode.stories.svelte +137 -138
- package/dist/components/nodes/SimpleNode.svelte +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 +4 -4
- package/dist/config/endpoints.js +68 -68
- package/dist/config/runtimeConfig.d.ts +2 -2
- package/dist/config/runtimeConfig.js +8 -8
- package/dist/core/index.d.ts +68 -68
- package/dist/core/index.js +38 -38
- package/dist/display/index.d.ts +2 -2
- package/dist/display/index.js +2 -2
- package/dist/editor/index.d.ts +64 -64
- package/dist/editor/index.js +54 -54
- package/dist/form/code.d.ts +5 -5
- package/dist/form/code.js +14 -14
- package/dist/form/fieldRegistry.d.ts +3 -3
- package/dist/form/fieldRegistry.js +9 -11
- package/dist/form/full.d.ts +8 -8
- package/dist/form/full.js +9 -9
- package/dist/form/index.d.ts +18 -18
- package/dist/form/index.js +16 -16
- package/dist/form/markdown.d.ts +4 -4
- package/dist/form/markdown.js +8 -8
- package/dist/helpers/proximityConnect.d.ts +3 -3
- package/dist/helpers/proximityConnect.js +32 -34
- package/dist/helpers/workflowEditorHelper.d.ts +6 -6
- package/dist/helpers/workflowEditorHelper.js +64 -68
- package/dist/index.d.ts +6 -6
- package/dist/index.js +6 -6
- package/dist/mocks/app-environment.js +2 -2
- package/dist/mocks/app-forms.js +1 -1
- package/dist/mocks/app-navigation.js +2 -2
- package/dist/mocks/app-stores.js +3 -3
- package/dist/playground/index.d.ts +19 -19
- package/dist/playground/index.js +16 -16
- package/dist/playground/mount.d.ts +3 -3
- package/dist/playground/mount.js +24 -24
- package/dist/registry/builtinFormats.js +13 -13
- package/dist/registry/builtinNodes.d.ts +2 -2
- package/dist/registry/builtinNodes.js +77 -77
- package/dist/registry/index.d.ts +4 -4
- package/dist/registry/index.js +4 -4
- package/dist/registry/nodeComponentRegistry.d.ts +8 -8
- package/dist/registry/nodeComponentRegistry.js +9 -11
- package/dist/registry/plugin.d.ts +2 -2
- package/dist/registry/plugin.js +11 -11
- package/dist/registry/workflowFormatRegistry.d.ts +3 -3
- package/dist/registry/workflowFormatRegistry.js +2 -2
- package/dist/schema/index.d.ts +1 -1
- package/dist/schema/index.js +2 -2
- package/dist/services/agentSpecExecutionService.d.ts +3 -3
- package/dist/services/agentSpecExecutionService.js +55 -56
- package/dist/services/api.d.ts +2 -2
- package/dist/services/api.js +37 -37
- package/dist/services/apiVariableService.d.ts +1 -1
- package/dist/services/apiVariableService.js +34 -41
- package/dist/services/autoSaveService.js +8 -8
- package/dist/services/categoriesApi.d.ts +2 -2
- package/dist/services/categoriesApi.js +8 -8
- package/dist/services/chatService.d.ts +1 -1
- package/dist/services/chatService.js +18 -18
- package/dist/services/draftStorage.d.ts +1 -1
- package/dist/services/draftStorage.js +11 -11
- package/dist/services/dynamicSchemaService.d.ts +1 -1
- package/dist/services/dynamicSchemaService.js +39 -41
- package/dist/services/globalSave.d.ts +2 -2
- package/dist/services/globalSave.js +38 -41
- package/dist/services/historyService.d.ts +1 -1
- package/dist/services/historyService.js +10 -10
- package/dist/services/interruptService.d.ts +1 -1
- package/dist/services/interruptService.js +29 -35
- package/dist/services/nodeExecutionService.d.ts +1 -1
- package/dist/services/nodeExecutionService.js +44 -45
- package/dist/services/playgroundService.d.ts +1 -1
- package/dist/services/playgroundService.js +29 -29
- package/dist/services/portConfigApi.d.ts +2 -2
- package/dist/services/portConfigApi.js +8 -8
- package/dist/services/settingsService.d.ts +2 -2
- package/dist/services/settingsService.js +19 -25
- package/dist/services/toastService.d.ts +4 -4
- package/dist/services/toastService.js +33 -33
- package/dist/services/variableService.d.ts +1 -1
- package/dist/services/variableService.js +36 -36
- package/dist/services/workflowStorage.d.ts +2 -2
- package/dist/services/workflowStorage.js +13 -13
- package/dist/settings/index.d.ts +7 -7
- package/dist/settings/index.js +6 -6
- package/dist/skins/default.d.ts +1 -1
- package/dist/skins/default.js +1 -1
- package/dist/skins/index.d.ts +3 -3
- package/dist/skins/index.js +7 -7
- package/dist/skins/slate.d.ts +1 -1
- package/dist/skins/slate.js +69 -69
- package/dist/stores/categoriesStore.svelte.d.ts +1 -1
- package/dist/stores/categoriesStore.svelte.js +5 -5
- package/dist/stores/editorStateMachine.svelte.d.ts +2 -2
- package/dist/stores/editorStateMachine.svelte.js +34 -34
- package/dist/stores/historyStore.svelte.d.ts +4 -4
- package/dist/stores/historyStore.svelte.js +4 -4
- package/dist/stores/interruptStore.svelte.d.ts +3 -3
- package/dist/stores/interruptStore.svelte.js +21 -21
- package/dist/stores/playgroundStore.svelte.d.ts +2 -2
- package/dist/stores/playgroundStore.svelte.js +18 -21
- package/dist/stores/portCoordinateStore.svelte.d.ts +2 -2
- package/dist/stores/portCoordinateStore.svelte.js +10 -13
- package/dist/stores/settingsStore.svelte.d.ts +2 -2
- package/dist/stores/settingsStore.svelte.js +57 -62
- package/dist/stores/workflowStore.svelte.d.ts +3 -3
- package/dist/stores/workflowStore.svelte.js +46 -47
- package/dist/stories/CanvasDecorator.svelte +7 -10
- package/dist/stories/CanvasDecorator.svelte.d.ts +2 -2
- package/dist/stories/EdgeDecorator.svelte +28 -31
- package/dist/stories/EdgeDecorator.svelte.d.ts +1 -1
- package/dist/stories/NodeDecorator.svelte +14 -20
- package/dist/stories/NodeDecorator.svelte.d.ts +1 -1
- package/dist/stories/utils.d.ts +2 -2
- package/dist/stories/utils.js +89 -93
- package/dist/styles/base.css +16 -50
- package/dist/styles/tokens.css +10 -28
- package/dist/svelte-app.d.ts +10 -10
- package/dist/svelte-app.js +39 -39
- package/dist/themes/default.d.ts +1 -1
- package/dist/themes/default.js +4 -4
- package/dist/themes/index.d.ts +3 -3
- package/dist/themes/index.js +11 -11
- package/dist/themes/minimal.d.ts +1 -1
- package/dist/themes/minimal.js +5 -5
- package/dist/types/agentspec.d.ts +18 -18
- package/dist/types/agentspec.js +2 -2
- package/dist/types/auth.d.ts +1 -1
- package/dist/types/auth.js +6 -6
- package/dist/types/chat.d.ts +2 -2
- package/dist/types/config.d.ts +6 -6
- package/dist/types/events.d.ts +3 -3
- package/dist/types/events.js +2 -2
- package/dist/types/index.d.ts +32 -32
- package/dist/types/index.js +6 -6
- package/dist/types/interrupt.d.ts +6 -6
- package/dist/types/interrupt.js +21 -21
- package/dist/types/interruptState.d.ts +12 -12
- package/dist/types/interruptState.js +66 -66
- package/dist/types/playground.d.ts +7 -7
- package/dist/types/playground.js +14 -14
- package/dist/types/settings.d.ts +7 -5
- package/dist/types/settings.js +19 -24
- package/dist/types/skin.d.ts +1 -1
- package/dist/types/theme.d.ts +2 -2
- package/dist/types/uischema.d.ts +4 -4
- package/dist/types/uischema.js +3 -3
- package/dist/utils/colors.d.ts +1 -1
- package/dist/utils/colors.js +95 -97
- package/dist/utils/config.d.ts +2 -2
- package/dist/utils/config.js +48 -48
- package/dist/utils/connections.d.ts +2 -2
- package/dist/utils/connections.js +15 -15
- package/dist/utils/edgeStyling.d.ts +2 -2
- package/dist/utils/edgeStyling.js +36 -39
- package/dist/utils/errors.js +3 -3
- package/dist/utils/fetchWithAuth.d.ts +1 -1
- package/dist/utils/fetchWithAuth.js +2 -2
- package/dist/utils/handleIds.d.ts +2 -2
- package/dist/utils/handleIds.js +8 -8
- package/dist/utils/handlePositioning.d.ts +1 -1
- package/dist/utils/handlePositioning.js +2 -2
- package/dist/utils/icons.d.ts +1 -1
- package/dist/utils/icons.js +74 -74
- package/dist/utils/logger.d.ts +1 -1
- package/dist/utils/logger.js +7 -7
- package/dist/utils/nodeIds.d.ts +1 -1
- package/dist/utils/nodeIds.js +1 -1
- package/dist/utils/nodeStatus.d.ts +1 -1
- package/dist/utils/nodeStatus.js +48 -48
- package/dist/utils/nodeSwap.d.ts +9 -9
- package/dist/utils/nodeSwap.js +52 -58
- package/dist/utils/nodeTypes.d.ts +1 -1
- package/dist/utils/nodeTypes.js +20 -21
- package/dist/utils/nodeWrapper.d.ts +7 -7
- package/dist/utils/nodeWrapper.js +19 -21
- package/dist/utils/performanceUtils.d.ts +1 -1
- package/dist/utils/performanceUtils.js +1 -2
- package/dist/utils/portUtils.d.ts +2 -2
- package/dist/utils/portUtils.js +1 -1
- package/dist/utils/sanitize.js +1 -1
- package/dist/utils/uischema.d.ts +2 -2
- package/dist/utils/uischema.js +8 -8
- package/dist/utils/validation.js +8 -8
- package/package.json +7 -11
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<script lang="ts">
|
|
11
|
-
import Icon from
|
|
12
|
-
import ConfirmationPrompt from
|
|
13
|
-
import ChoicePrompt from
|
|
14
|
-
import TextInputPrompt from
|
|
15
|
-
import FormPrompt from
|
|
16
|
-
import ReviewPrompt from
|
|
11
|
+
import Icon from '@iconify/svelte';
|
|
12
|
+
import ConfirmationPrompt from './ConfirmationPrompt.svelte';
|
|
13
|
+
import ChoicePrompt from './ChoicePrompt.svelte';
|
|
14
|
+
import TextInputPrompt from './TextInputPrompt.svelte';
|
|
15
|
+
import FormPrompt from './FormPrompt.svelte';
|
|
16
|
+
import ReviewPrompt from './ReviewPrompt.svelte';
|
|
17
17
|
import type {
|
|
18
18
|
Interrupt,
|
|
19
19
|
InterruptType,
|
|
@@ -22,21 +22,21 @@
|
|
|
22
22
|
TextConfig,
|
|
23
23
|
FormConfig,
|
|
24
24
|
ReviewConfig,
|
|
25
|
-
ReviewResolution
|
|
26
|
-
} from
|
|
25
|
+
ReviewResolution
|
|
26
|
+
} from '../../types/interrupt.js';
|
|
27
27
|
import {
|
|
28
28
|
isTerminalState,
|
|
29
29
|
isSubmitting as checkIsSubmitting,
|
|
30
30
|
getErrorMessage,
|
|
31
|
-
getResolvedValue
|
|
32
|
-
} from
|
|
31
|
+
getResolvedValue
|
|
32
|
+
} from '../../types/interruptState.js';
|
|
33
33
|
import {
|
|
34
34
|
getInterruptsMap,
|
|
35
35
|
interruptActions,
|
|
36
|
-
type InterruptWithState
|
|
37
|
-
} from
|
|
38
|
-
import { interruptService } from
|
|
39
|
-
import { logger } from
|
|
36
|
+
type InterruptWithState
|
|
37
|
+
} from '../../stores/interruptStore.svelte.js';
|
|
38
|
+
import { interruptService } from '../../services/interruptService.js';
|
|
39
|
+
import { logger } from '../../utils/logger.js';
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Component props
|
|
@@ -50,33 +50,26 @@
|
|
|
50
50
|
onResolved?: () => void;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
let {
|
|
54
|
-
interrupt: initialInterrupt,
|
|
55
|
-
showTimestamp = true,
|
|
56
|
-
onResolved,
|
|
57
|
-
}: Props = $props();
|
|
53
|
+
let { interrupt: initialInterrupt, showTimestamp = true, onResolved }: Props = $props();
|
|
58
54
|
|
|
59
55
|
/**
|
|
60
56
|
* Get the current interrupt state from the store.
|
|
61
57
|
* This ensures we react to store updates (like status changes).
|
|
62
58
|
*/
|
|
63
59
|
const currentInterrupt = $derived(
|
|
64
|
-
getInterruptsMap().get(initialInterrupt.id) ??
|
|
65
|
-
addMachineState(initialInterrupt),
|
|
60
|
+
getInterruptsMap().get(initialInterrupt.id) ?? addMachineState(initialInterrupt)
|
|
66
61
|
);
|
|
67
62
|
|
|
68
63
|
/**
|
|
69
64
|
* Helper to ensure interrupt has machine state
|
|
70
65
|
*/
|
|
71
|
-
function addMachineState(
|
|
72
|
-
|
|
73
|
-
): InterruptWithState {
|
|
74
|
-
if ("machineState" in interrupt) {
|
|
66
|
+
function addMachineState(interrupt: Interrupt | InterruptWithState): InterruptWithState {
|
|
67
|
+
if ('machineState' in interrupt) {
|
|
75
68
|
return interrupt;
|
|
76
69
|
}
|
|
77
70
|
return {
|
|
78
71
|
...interrupt,
|
|
79
|
-
machineState: { status:
|
|
72
|
+
machineState: { status: 'idle' }
|
|
80
73
|
};
|
|
81
74
|
}
|
|
82
75
|
|
|
@@ -84,35 +77,31 @@
|
|
|
84
77
|
const isResolved = $derived(isTerminalState(currentInterrupt.machineState));
|
|
85
78
|
|
|
86
79
|
/** Whether this interrupt is currently submitting */
|
|
87
|
-
const isSubmitting = $derived(
|
|
88
|
-
checkIsSubmitting(currentInterrupt.machineState),
|
|
89
|
-
);
|
|
80
|
+
const isSubmitting = $derived(checkIsSubmitting(currentInterrupt.machineState));
|
|
90
81
|
|
|
91
82
|
/** Error message for this interrupt */
|
|
92
83
|
const error = $derived(getErrorMessage(currentInterrupt.machineState));
|
|
93
84
|
|
|
94
85
|
/** Resolved value for display */
|
|
95
|
-
const resolvedValue = $derived(
|
|
96
|
-
getResolvedValue(currentInterrupt.machineState),
|
|
97
|
-
);
|
|
86
|
+
const resolvedValue = $derived(getResolvedValue(currentInterrupt.machineState));
|
|
98
87
|
|
|
99
88
|
/**
|
|
100
89
|
* Get the icon for the interrupt type
|
|
101
90
|
*/
|
|
102
91
|
function getTypeIcon(type: InterruptType): string {
|
|
103
92
|
switch (type) {
|
|
104
|
-
case
|
|
105
|
-
return
|
|
106
|
-
case
|
|
107
|
-
return
|
|
108
|
-
case
|
|
109
|
-
return
|
|
110
|
-
case
|
|
111
|
-
return
|
|
112
|
-
case
|
|
113
|
-
return
|
|
93
|
+
case 'confirmation':
|
|
94
|
+
return 'mdi:help-circle';
|
|
95
|
+
case 'choice':
|
|
96
|
+
return 'mdi:format-list-bulleted';
|
|
97
|
+
case 'text':
|
|
98
|
+
return 'mdi:text-box';
|
|
99
|
+
case 'form':
|
|
100
|
+
return 'mdi:form-select';
|
|
101
|
+
case 'review':
|
|
102
|
+
return 'mdi:file-compare';
|
|
114
103
|
default:
|
|
115
|
-
return
|
|
104
|
+
return 'mdi:bell';
|
|
116
105
|
}
|
|
117
106
|
}
|
|
118
107
|
|
|
@@ -121,36 +110,36 @@
|
|
|
121
110
|
*/
|
|
122
111
|
function getTypeLabel(type: InterruptType): string {
|
|
123
112
|
switch (type) {
|
|
124
|
-
case
|
|
125
|
-
return
|
|
126
|
-
case
|
|
127
|
-
return
|
|
128
|
-
case
|
|
129
|
-
return
|
|
130
|
-
case
|
|
131
|
-
return
|
|
132
|
-
case
|
|
133
|
-
return
|
|
113
|
+
case 'confirmation':
|
|
114
|
+
return 'Confirmation Required';
|
|
115
|
+
case 'choice':
|
|
116
|
+
return 'Selection Required';
|
|
117
|
+
case 'text':
|
|
118
|
+
return 'Input Required';
|
|
119
|
+
case 'form':
|
|
120
|
+
return 'Form Required';
|
|
121
|
+
case 'review':
|
|
122
|
+
return 'Review Required';
|
|
134
123
|
default:
|
|
135
|
-
return
|
|
124
|
+
return 'Action Required';
|
|
136
125
|
}
|
|
137
126
|
}
|
|
138
127
|
|
|
139
128
|
/** Get resolved label for the header when resolved */
|
|
140
129
|
function getResolvedLabel(type: InterruptType): string {
|
|
141
130
|
switch (type) {
|
|
142
|
-
case
|
|
143
|
-
return
|
|
144
|
-
case
|
|
145
|
-
return
|
|
146
|
-
case
|
|
147
|
-
return
|
|
148
|
-
case
|
|
149
|
-
return
|
|
150
|
-
case
|
|
151
|
-
return
|
|
131
|
+
case 'confirmation':
|
|
132
|
+
return 'Confirmation Submitted';
|
|
133
|
+
case 'choice':
|
|
134
|
+
return 'Selection Made';
|
|
135
|
+
case 'text':
|
|
136
|
+
return 'Input Submitted';
|
|
137
|
+
case 'form':
|
|
138
|
+
return 'Form Submitted';
|
|
139
|
+
case 'review':
|
|
140
|
+
return 'Review Submitted';
|
|
152
141
|
default:
|
|
153
|
-
return
|
|
142
|
+
return 'Response Submitted';
|
|
154
143
|
}
|
|
155
144
|
}
|
|
156
145
|
|
|
@@ -159,11 +148,11 @@
|
|
|
159
148
|
*/
|
|
160
149
|
function formatTimestamp(timestamp: string): string {
|
|
161
150
|
const date = new Date(timestamp);
|
|
162
|
-
return date.toLocaleTimeString(
|
|
151
|
+
return date.toLocaleTimeString('en-US', {
|
|
163
152
|
hour12: false,
|
|
164
|
-
hour:
|
|
165
|
-
minute:
|
|
166
|
-
second:
|
|
153
|
+
hour: '2-digit',
|
|
154
|
+
minute: '2-digit',
|
|
155
|
+
second: '2-digit'
|
|
167
156
|
});
|
|
168
157
|
}
|
|
169
158
|
|
|
@@ -172,12 +161,9 @@
|
|
|
172
161
|
*/
|
|
173
162
|
async function handleResolve(value: unknown): Promise<void> {
|
|
174
163
|
// Start the submission - state machine validates this transition
|
|
175
|
-
const startResult = interruptActions.startSubmit(
|
|
176
|
-
currentInterrupt.id,
|
|
177
|
-
value,
|
|
178
|
-
);
|
|
164
|
+
const startResult = interruptActions.startSubmit(currentInterrupt.id, value);
|
|
179
165
|
if (!startResult.valid) {
|
|
180
|
-
logger.warn(
|
|
166
|
+
logger.warn('[InterruptBubble] Cannot submit:', startResult.error);
|
|
181
167
|
return;
|
|
182
168
|
}
|
|
183
169
|
|
|
@@ -194,10 +180,9 @@
|
|
|
194
180
|
onResolved?.();
|
|
195
181
|
} catch (err) {
|
|
196
182
|
// Mark as failed - transitions to error state (can retry)
|
|
197
|
-
const errorMessage =
|
|
198
|
-
err instanceof Error ? err.message : "Failed to submit response";
|
|
183
|
+
const errorMessage = err instanceof Error ? err.message : 'Failed to submit response';
|
|
199
184
|
interruptActions.submitFailure(currentInterrupt.id, errorMessage);
|
|
200
|
-
logger.error(
|
|
185
|
+
logger.error('[InterruptBubble] Resolve error:', err);
|
|
201
186
|
}
|
|
202
187
|
}
|
|
203
188
|
|
|
@@ -208,7 +193,7 @@
|
|
|
208
193
|
// Start the cancel - state machine validates this transition
|
|
209
194
|
const startResult = interruptActions.startCancel(currentInterrupt.id);
|
|
210
195
|
if (!startResult.valid) {
|
|
211
|
-
logger.warn(
|
|
196
|
+
logger.warn('[InterruptBubble] Cannot cancel:', startResult.error);
|
|
212
197
|
return;
|
|
213
198
|
}
|
|
214
199
|
|
|
@@ -225,10 +210,9 @@
|
|
|
225
210
|
onResolved?.();
|
|
226
211
|
} catch (err) {
|
|
227
212
|
// Mark as failed - transitions to error state (can retry)
|
|
228
|
-
const errorMessage =
|
|
229
|
-
err instanceof Error ? err.message : "Failed to cancel";
|
|
213
|
+
const errorMessage = err instanceof Error ? err.message : 'Failed to cancel';
|
|
230
214
|
interruptActions.submitFailure(currentInterrupt.id, errorMessage);
|
|
231
|
-
logger.error(
|
|
215
|
+
logger.error('[InterruptBubble] Cancel error:', err);
|
|
232
216
|
}
|
|
233
217
|
}
|
|
234
218
|
|
|
@@ -240,49 +224,42 @@
|
|
|
240
224
|
}
|
|
241
225
|
|
|
242
226
|
// Typed config getters for each prompt type
|
|
243
|
-
const confirmationConfig = $derived(
|
|
244
|
-
currentInterrupt.config as ConfirmationConfig,
|
|
245
|
-
);
|
|
227
|
+
const confirmationConfig = $derived(currentInterrupt.config as ConfirmationConfig);
|
|
246
228
|
const choiceConfig = $derived(currentInterrupt.config as ChoiceConfig);
|
|
247
229
|
const textConfig = $derived(currentInterrupt.config as TextConfig);
|
|
248
230
|
const formConfig = $derived(currentInterrupt.config as FormConfig);
|
|
249
231
|
const reviewConfig = $derived(currentInterrupt.config as ReviewConfig);
|
|
250
232
|
|
|
251
233
|
// Determine the actual resolved value to pass to prompt components
|
|
252
|
-
const displayResolvedValue = $derived(
|
|
253
|
-
resolvedValue ?? currentInterrupt.responseValue,
|
|
254
|
-
);
|
|
234
|
+
const displayResolvedValue = $derived(resolvedValue ?? currentInterrupt.responseValue);
|
|
255
235
|
|
|
256
236
|
/**
|
|
257
237
|
* Extract the username of who resolved the interrupt from metadata.
|
|
258
238
|
* This is provided by the backend when the interrupt is resolved.
|
|
259
239
|
*/
|
|
260
240
|
const resolvedByUserName = $derived(
|
|
261
|
-
typeof currentInterrupt.metadata?.resolvedByUserName ===
|
|
241
|
+
typeof currentInterrupt.metadata?.resolvedByUserName === 'string'
|
|
262
242
|
? currentInterrupt.metadata.resolvedByUserName
|
|
263
|
-
: undefined
|
|
243
|
+
: undefined
|
|
264
244
|
);
|
|
265
245
|
</script>
|
|
266
246
|
|
|
267
247
|
<div
|
|
268
248
|
class="interrupt-bubble"
|
|
269
|
-
class:interrupt-bubble--completed={currentInterrupt.machineState.status ===
|
|
270
|
-
|
|
271
|
-
class:interrupt-bubble--cancelled={currentInterrupt.machineState.status ===
|
|
272
|
-
"cancelled"}
|
|
249
|
+
class:interrupt-bubble--completed={currentInterrupt.machineState.status === 'resolved'}
|
|
250
|
+
class:interrupt-bubble--cancelled={currentInterrupt.machineState.status === 'cancelled'}
|
|
273
251
|
class:interrupt-bubble--submitting={isSubmitting}
|
|
274
|
-
class:interrupt-bubble--error={currentInterrupt.machineState.status ===
|
|
275
|
-
"error"}
|
|
252
|
+
class:interrupt-bubble--error={currentInterrupt.machineState.status === 'error'}
|
|
276
253
|
>
|
|
277
254
|
<!-- Header -->
|
|
278
255
|
<div class="interrupt-bubble__header">
|
|
279
256
|
<span class="interrupt-bubble__type">
|
|
280
257
|
<Icon icon={getTypeIcon(currentInterrupt.type)} />
|
|
281
258
|
{#if isResolved}
|
|
282
|
-
{currentInterrupt.machineState.status ===
|
|
283
|
-
?
|
|
259
|
+
{currentInterrupt.machineState.status === 'cancelled'
|
|
260
|
+
? 'Cancelled'
|
|
284
261
|
: getResolvedLabel(currentInterrupt.type)}
|
|
285
|
-
{:else if currentInterrupt.machineState.status ===
|
|
262
|
+
{:else if currentInterrupt.machineState.status === 'error'}
|
|
286
263
|
Error - Click to Retry
|
|
287
264
|
{:else}
|
|
288
265
|
{getTypeLabel(currentInterrupt.type)}
|
|
@@ -290,23 +267,17 @@
|
|
|
290
267
|
</span>
|
|
291
268
|
{#if showTimestamp}
|
|
292
269
|
<span class="interrupt-bubble__timestamp">
|
|
293
|
-
{formatTimestamp(
|
|
294
|
-
currentInterrupt.resolvedAt ?? currentInterrupt.createdAt,
|
|
295
|
-
)}
|
|
270
|
+
{formatTimestamp(currentInterrupt.resolvedAt ?? currentInterrupt.createdAt)}
|
|
296
271
|
</span>
|
|
297
272
|
{/if}
|
|
298
273
|
</div>
|
|
299
274
|
|
|
300
275
|
<!-- Error message with retry button -->
|
|
301
|
-
{#if currentInterrupt.machineState.status ===
|
|
276
|
+
{#if currentInterrupt.machineState.status === 'error'}
|
|
302
277
|
<div class="interrupt-bubble__error">
|
|
303
278
|
<Icon icon="mdi:alert-circle" />
|
|
304
279
|
<span>{error}</span>
|
|
305
|
-
<button
|
|
306
|
-
type="button"
|
|
307
|
-
class="interrupt-bubble__retry-btn"
|
|
308
|
-
onclick={handleRetry}
|
|
309
|
-
>
|
|
280
|
+
<button type="button" class="interrupt-bubble__retry-btn" onclick={handleRetry}>
|
|
310
281
|
<Icon icon="mdi:refresh" />
|
|
311
282
|
Retry
|
|
312
283
|
</button>
|
|
@@ -315,7 +286,7 @@
|
|
|
315
286
|
|
|
316
287
|
<!-- Prompt content based on type -->
|
|
317
288
|
<div class="interrupt-bubble__body">
|
|
318
|
-
{#if currentInterrupt.type ===
|
|
289
|
+
{#if currentInterrupt.type === 'confirmation'}
|
|
319
290
|
<ConfirmationPrompt
|
|
320
291
|
config={confirmationConfig}
|
|
321
292
|
{isResolved}
|
|
@@ -326,7 +297,7 @@
|
|
|
326
297
|
onConfirm={() => handleResolve(true)}
|
|
327
298
|
onDecline={() => handleResolve(false)}
|
|
328
299
|
/>
|
|
329
|
-
{:else if currentInterrupt.type ===
|
|
300
|
+
{:else if currentInterrupt.type === 'choice'}
|
|
330
301
|
<ChoicePrompt
|
|
331
302
|
config={choiceConfig}
|
|
332
303
|
{isResolved}
|
|
@@ -336,7 +307,7 @@
|
|
|
336
307
|
{resolvedByUserName}
|
|
337
308
|
onSubmit={(value) => handleResolve(value)}
|
|
338
309
|
/>
|
|
339
|
-
{:else if currentInterrupt.type ===
|
|
310
|
+
{:else if currentInterrupt.type === 'text'}
|
|
340
311
|
<TextInputPrompt
|
|
341
312
|
config={textConfig}
|
|
342
313
|
{isResolved}
|
|
@@ -346,19 +317,17 @@
|
|
|
346
317
|
{resolvedByUserName}
|
|
347
318
|
onSubmit={(value) => handleResolve(value)}
|
|
348
319
|
/>
|
|
349
|
-
{:else if currentInterrupt.type ===
|
|
320
|
+
{:else if currentInterrupt.type === 'form'}
|
|
350
321
|
<FormPrompt
|
|
351
322
|
config={formConfig}
|
|
352
323
|
{isResolved}
|
|
353
|
-
resolvedValue={displayResolvedValue as
|
|
354
|
-
| Record<string, unknown>
|
|
355
|
-
| undefined}
|
|
324
|
+
resolvedValue={displayResolvedValue as Record<string, unknown> | undefined}
|
|
356
325
|
{isSubmitting}
|
|
357
326
|
{error}
|
|
358
327
|
{resolvedByUserName}
|
|
359
328
|
onSubmit={(value) => handleResolve(value)}
|
|
360
329
|
/>
|
|
361
|
-
{:else if currentInterrupt.type ===
|
|
330
|
+
{:else if currentInterrupt.type === 'review'}
|
|
362
331
|
<ReviewPrompt
|
|
363
332
|
config={reviewConfig}
|
|
364
333
|
{isResolved}
|
|
@@ -372,18 +341,15 @@
|
|
|
372
341
|
</div>
|
|
373
342
|
|
|
374
343
|
<!-- Footer -->
|
|
375
|
-
{#if currentInterrupt.nodeId || (currentInterrupt.allowCancel && !isResolved && currentInterrupt.type !==
|
|
344
|
+
{#if currentInterrupt.nodeId || (currentInterrupt.allowCancel && !isResolved && currentInterrupt.type !== 'confirmation')}
|
|
376
345
|
<div class="interrupt-bubble__footer">
|
|
377
346
|
{#if currentInterrupt.nodeId}
|
|
378
|
-
<span
|
|
379
|
-
class="interrupt-bubble__node"
|
|
380
|
-
title="Node ID: {currentInterrupt.nodeId}"
|
|
381
|
-
>
|
|
347
|
+
<span class="interrupt-bubble__node" title="Node ID: {currentInterrupt.nodeId}">
|
|
382
348
|
<Icon icon="mdi:graph" />
|
|
383
349
|
<span>From workflow node</span>
|
|
384
350
|
</span>
|
|
385
351
|
{/if}
|
|
386
|
-
{#if currentInterrupt.allowCancel && !isResolved && currentInterrupt.type !==
|
|
352
|
+
{#if currentInterrupt.allowCancel && !isResolved && currentInterrupt.type !== 'confirmation'}
|
|
387
353
|
<button
|
|
388
354
|
type="button"
|
|
389
355
|
class="interrupt-bubble__cancel-btn"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Interrupt } from
|
|
2
|
-
import { type InterruptWithState } from
|
|
1
|
+
import type { Interrupt } from '../../types/interrupt.js';
|
|
2
|
+
import { type InterruptWithState } from '../../stores/interruptStore.svelte.js';
|
|
3
3
|
/**
|
|
4
4
|
* Component props
|
|
5
5
|
*/
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<script module>
|
|
2
|
-
import { defineMeta } from
|
|
3
|
-
import ReviewPrompt from
|
|
4
|
-
import { fn } from
|
|
5
|
-
import { createReviewConfig } from
|
|
2
|
+
import { defineMeta } from '@storybook/addon-svelte-csf';
|
|
3
|
+
import ReviewPrompt from './ReviewPrompt.svelte';
|
|
4
|
+
import { fn } from 'storybook/test';
|
|
5
|
+
import { createReviewConfig } from '../../stories/utils.js';
|
|
6
6
|
|
|
7
7
|
const { Story } = defineMeta({
|
|
8
|
-
title:
|
|
8
|
+
title: 'Interrupt/ReviewPrompt',
|
|
9
9
|
component: ReviewPrompt,
|
|
10
|
-
tags: [
|
|
10
|
+
tags: ['autodocs'],
|
|
11
11
|
args: {
|
|
12
12
|
config: createReviewConfig(),
|
|
13
13
|
isResolved: false,
|
|
14
14
|
isSubmitting: false,
|
|
15
|
-
onSubmit: fn()
|
|
16
|
-
}
|
|
15
|
+
onSubmit: fn()
|
|
16
|
+
}
|
|
17
17
|
});
|
|
18
18
|
</script>
|
|
19
19
|
|
|
@@ -23,40 +23,40 @@
|
|
|
23
23
|
name="Many Changes"
|
|
24
24
|
args={{
|
|
25
25
|
config: createReviewConfig({
|
|
26
|
-
message:
|
|
26
|
+
message: 'Review the content updates:',
|
|
27
27
|
changes: [
|
|
28
28
|
{
|
|
29
|
-
field:
|
|
30
|
-
label:
|
|
31
|
-
original:
|
|
32
|
-
proposed:
|
|
29
|
+
field: 'title',
|
|
30
|
+
label: 'Title',
|
|
31
|
+
original: 'Getting Started',
|
|
32
|
+
proposed: 'Quick Start Guide'
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
|
-
field:
|
|
36
|
-
label:
|
|
37
|
-
original:
|
|
38
|
-
proposed:
|
|
35
|
+
field: 'slug',
|
|
36
|
+
label: 'URL Slug',
|
|
37
|
+
original: '/getting-started',
|
|
38
|
+
proposed: '/quick-start-guide'
|
|
39
39
|
},
|
|
40
40
|
{
|
|
41
|
-
field:
|
|
42
|
-
label:
|
|
43
|
-
original:
|
|
44
|
-
proposed:
|
|
41
|
+
field: 'description',
|
|
42
|
+
label: 'Meta Description',
|
|
43
|
+
original: 'Learn how to get started',
|
|
44
|
+
proposed: 'A quick start guide for new users'
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
|
-
field:
|
|
48
|
-
label:
|
|
49
|
-
original:
|
|
50
|
-
proposed:
|
|
47
|
+
field: 'author',
|
|
48
|
+
label: 'Author',
|
|
49
|
+
original: 'admin',
|
|
50
|
+
proposed: 'editor'
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
|
-
field:
|
|
54
|
-
label:
|
|
55
|
-
original:
|
|
56
|
-
proposed:
|
|
57
|
-
}
|
|
58
|
-
]
|
|
59
|
-
})
|
|
53
|
+
field: 'status',
|
|
54
|
+
label: 'Status',
|
|
55
|
+
original: 'draft',
|
|
56
|
+
proposed: 'published'
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
})
|
|
60
60
|
}}
|
|
61
61
|
/>
|
|
62
62
|
|
|
@@ -66,12 +66,12 @@
|
|
|
66
66
|
isResolved: true,
|
|
67
67
|
resolvedValue: {
|
|
68
68
|
decisions: {
|
|
69
|
-
title: { accepted: true, value:
|
|
70
|
-
description: { accepted: false, value:
|
|
71
|
-
status: { accepted: true, value:
|
|
69
|
+
title: { accepted: true, value: 'New Title' },
|
|
70
|
+
description: { accepted: false, value: 'Old description text' },
|
|
71
|
+
status: { accepted: true, value: 'published' }
|
|
72
72
|
},
|
|
73
|
-
summary: { accepted: 2, rejected: 1, total: 3 }
|
|
73
|
+
summary: { accepted: 2, rejected: 1, total: 3 }
|
|
74
74
|
},
|
|
75
|
-
resolvedByUserName:
|
|
75
|
+
resolvedByUserName: 'Diana'
|
|
76
76
|
}}
|
|
77
77
|
/>
|
|
@@ -11,7 +11,7 @@ declare const ReviewPrompt: $$__sveltets_2_IsomorphicComponent<{
|
|
|
11
11
|
}, {
|
|
12
12
|
[evt: string]: CustomEvent<any>;
|
|
13
13
|
}, {}, {}, string>;
|
|
14
|
-
import ReviewPrompt from
|
|
14
|
+
import ReviewPrompt from './ReviewPrompt.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;
|