@flowdrop/flowdrop 2.11.0 → 2.12.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/CHANGELOG.md +223 -0
- package/dist/adapters/agentspec/autoLayout.d.ts +18 -36
- package/dist/adapters/agentspec/autoLayout.js +75 -93
- package/dist/chat/activity.d.ts +49 -0
- package/dist/chat/activity.js +65 -0
- package/dist/chat/commandClassifier.js +2 -1
- package/dist/commands/executor.js +186 -27
- package/dist/commands/index.d.ts +2 -1
- package/dist/commands/index.js +2 -0
- package/dist/commands/parser.js +43 -3
- package/dist/commands/session.d.ts +60 -0
- package/dist/commands/session.js +332 -0
- package/dist/commands/storeIntegration.svelte.js +18 -1
- package/dist/commands/types.d.ts +77 -4
- package/dist/components/App.svelte +966 -226
- package/dist/components/App.svelte.d.ts +26 -2
- package/dist/components/BindablePortListbox.svelte +68 -369
- package/dist/components/Button.svelte +17 -14
- package/dist/components/Button.svelte.d.ts +2 -2
- package/dist/components/CanvasContextMenu.svelte +31 -10
- package/dist/components/CanvasController.svelte +146 -3
- package/dist/components/CanvasController.svelte.d.ts +25 -33
- package/dist/components/CanvasIconButton.svelte +6 -6
- package/dist/components/CanvasToolbar.svelte +103 -0
- package/dist/components/CanvasToolbar.svelte.d.ts +23 -0
- package/dist/components/CanvasZoomControls.svelte +122 -0
- package/dist/components/CanvasZoomControls.svelte.d.ts +15 -0
- package/dist/components/ConfigForm.svelte +159 -121
- package/dist/components/ConfigModal.svelte +11 -54
- package/dist/components/ConfigPanel.svelte +98 -228
- package/dist/components/ConfigPanel.svelte.d.ts +2 -2
- package/dist/components/ConnectPortPicker.svelte +153 -0
- package/dist/components/ConnectPortPicker.svelte.d.ts +22 -0
- package/dist/components/DoctorMenu.svelte +422 -0
- package/dist/components/DoctorMenu.svelte.d.ts +7 -0
- package/dist/components/ExternalLinkRow.svelte +82 -0
- package/dist/components/ExternalLinkRow.svelte.d.ts +14 -0
- package/dist/components/FlowDropEdge.svelte +52 -2
- package/dist/components/FlowDropEdge.svelte.d.ts +5 -1
- package/dist/components/InterfaceNameInput.svelte +103 -0
- package/dist/components/InterfaceNameInput.svelte.d.ts +13 -0
- package/dist/components/InterfaceTag.svelte +215 -0
- package/dist/components/InterfaceTag.svelte.d.ts +20 -0
- package/dist/components/InterfaceTagAnchor.svelte +103 -0
- package/dist/components/InterfaceTagAnchor.svelte.d.ts +12 -0
- package/dist/components/InterfaceTagLayer.svelte +314 -0
- package/dist/components/InterfaceTagLayer.svelte.d.ts +28 -0
- package/dist/components/LogsSidebar.svelte +43 -43
- package/dist/components/LoopbackLanes.svelte +54 -0
- package/dist/components/LoopbackLanes.svelte.d.ts +8 -0
- package/dist/components/Navbar.svelte +539 -169
- package/dist/components/Navbar.svelte.d.ts +20 -1
- package/dist/components/NodeInspector.svelte +153 -0
- package/dist/components/NodeInspector.svelte.d.ts +19 -0
- package/dist/components/NodeLastRun.svelte +212 -0
- package/dist/components/NodeLastRun.svelte.d.ts +13 -0
- package/dist/components/NodeSidebar.svelte +279 -23
- package/dist/components/NodeSidebar.svelte.d.ts +11 -0
- package/dist/components/NodeStatusOverlay.svelte +144 -353
- package/dist/components/NodeStatusOverlay.svelte.d.ts +4 -1
- package/dist/components/PortMappingRow.svelte +28 -44
- package/dist/components/PortPickerListbox.svelte +475 -0
- package/dist/components/PortPickerListbox.svelte.d.ts +73 -0
- package/dist/components/ReadOnlyDetails.svelte +52 -89
- package/dist/components/RunBar.svelte +222 -0
- package/dist/components/RunBar.svelte.d.ts +20 -0
- package/dist/components/RunsMenu.svelte +649 -0
- package/dist/components/RunsMenu.svelte.d.ts +14 -0
- package/dist/components/SettingsModal.svelte +27 -59
- package/dist/components/SettingsPanel.svelte +515 -241
- package/dist/components/StraightGuides.svelte +46 -0
- package/dist/components/StraightGuides.svelte.d.ts +7 -0
- package/dist/components/ThemeToggle.svelte +14 -4
- package/dist/components/UniversalNode.svelte +152 -51
- package/dist/components/WebMCPBridgeMenu.svelte +336 -0
- package/dist/components/WebMCPBridgeMenu.svelte.d.ts +3 -0
- package/dist/components/WorkflowEditor.svelte +789 -136
- package/dist/components/WorkflowEditor.svelte.d.ts +43 -1
- package/dist/components/WorkflowInterfaceEditor.svelte +63 -92
- package/dist/components/WorkflowInterfaceEntryCard.svelte +478 -549
- package/dist/components/WorkflowInterfaceEntryComposer.svelte +23 -67
- package/dist/components/WorkflowPlaygroundSettings.svelte +48 -85
- package/dist/components/WorkflowSettingsPanel.svelte +311 -0
- package/dist/components/WorkflowSettingsPanel.svelte.d.ts +20 -0
- package/dist/components/ZoomTier.svelte +56 -0
- package/dist/components/ZoomTier.svelte.d.ts +4 -0
- package/dist/components/chat/AIChatPanel.svelte +463 -312
- package/dist/components/chat/ActivityList.svelte +130 -0
- package/dist/components/chat/ActivityList.svelte.d.ts +11 -0
- package/dist/components/chat/ActivityRow.svelte +179 -0
- package/dist/components/chat/ActivityRow.svelte.d.ts +16 -0
- package/dist/components/chat/CommandPreview.svelte +42 -64
- package/dist/components/console/CommandConsole.svelte +106 -41
- package/dist/components/console/CommandConsole.svelte.d.ts +2 -0
- package/dist/components/console/ConsoleAutocomplete.svelte +14 -13
- package/dist/components/console/ConsoleInput.svelte +60 -27
- package/dist/components/console/ConsoleOutput.svelte +86 -24
- package/dist/components/console/ConsoleStrip.svelte +80 -0
- package/dist/components/console/ConsoleStrip.svelte.d.ts +13 -0
- package/dist/components/form/FieldFactory.svelte +30 -4
- package/dist/components/form/FormArray.svelte +306 -339
- package/dist/components/form/FormArray.svelte.d.ts +10 -0
- package/dist/components/form/FormArrayRows.svelte +443 -0
- package/dist/components/form/FormArrayRows.svelte.d.ts +18 -0
- package/dist/components/form/FormAutocomplete.svelte +2 -2
- package/dist/components/form/FormCheckboxGroup.svelte +10 -85
- package/dist/components/form/FormCodeEditor.svelte +3 -3
- package/dist/components/form/FormFieldWrapper.svelte +98 -18
- package/dist/components/form/FormFieldWrapper.svelte.d.ts +10 -0
- package/dist/components/form/FormFieldset.svelte +44 -28
- package/dist/components/form/FormMarkdownEditor.svelte +6 -6
- package/dist/components/form/FormPorts.svelte +437 -141
- package/dist/components/form/FormSelect.svelte +1 -1
- package/dist/components/form/FormTemplateEditor.svelte +22 -26
- package/dist/components/form/FormToggle.svelte +15 -106
- package/dist/components/form/FormToggle.svelte.d.ts +3 -2
- package/dist/components/form/FormUISchemaRenderer.svelte +38 -3
- package/dist/components/form/humanizeKey.d.ts +7 -0
- package/dist/components/form/humanizeKey.js +21 -0
- package/dist/components/form/types.d.ts +6 -0
- package/dist/components/icons/MenuOpenIcon.svelte +8 -1
- package/dist/components/interrupt/ChoicePrompt.svelte +51 -152
- package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +0 -2
- package/dist/components/interrupt/ConfirmationPrompt.svelte +18 -201
- package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +0 -4
- package/dist/components/interrupt/FormPrompt.svelte +22 -147
- package/dist/components/interrupt/FormPrompt.svelte.d.ts +0 -4
- package/dist/components/interrupt/InterruptBubble.svelte +198 -355
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +0 -2
- package/dist/components/interrupt/ReviewPrompt.svelte +0 -10
- package/dist/components/interrupt/TextInputPrompt.svelte +23 -120
- package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +0 -2
- package/dist/components/layouts/MainLayout.svelte +110 -75
- package/dist/components/layouts/MainLayout.svelte.d.ts +17 -0
- package/dist/components/nodes/CaptionNode.svelte +7 -0
- package/dist/components/nodes/GatewayNode.svelte +66 -431
- package/dist/components/nodes/IdeaNode.svelte +6 -5
- package/dist/components/nodes/NodeCard.svelte +1051 -0
- package/dist/components/nodes/NodeCard.svelte.d.ts +30 -0
- package/dist/components/nodes/NodeConfigButton.svelte +28 -9
- package/dist/components/nodes/NodeProblemMark.svelte +113 -0
- package/dist/components/nodes/NodeProblemMark.svelte.d.ts +8 -0
- package/dist/components/nodes/NodeTip.svelte +104 -0
- package/dist/components/nodes/NodeTip.svelte.d.ts +15 -0
- package/dist/components/nodes/NotesNode.svelte +183 -150
- package/dist/components/nodes/SimpleNode.svelte +176 -44
- package/dist/components/nodes/SquareNode.svelte +127 -34
- package/dist/components/nodes/TerminalNode.svelte +232 -88
- package/dist/components/nodes/ToolNode.svelte +49 -381
- package/dist/components/nodes/WorkflowNode.svelte +40 -399
- package/dist/components/playground/ChatBubble.svelte +248 -62
- package/dist/components/playground/ChatInput.svelte +134 -297
- package/dist/components/playground/ChatInput.svelte.d.ts +17 -0
- package/dist/components/playground/ControlPanel.svelte +290 -190
- package/dist/components/playground/ControlPanel.svelte.d.ts +10 -2
- package/dist/components/playground/DockedPlayground.svelte +75 -0
- package/dist/components/playground/DockedPlayground.svelte.d.ts +24 -0
- package/dist/components/playground/ExecutionConsole.svelte +54 -36
- package/dist/components/playground/ExecutionConsole.svelte.d.ts +12 -0
- package/dist/components/playground/ExecutionLogs.svelte +4 -0
- package/dist/components/playground/HeaderMenu.svelte +170 -0
- package/dist/components/playground/HeaderMenu.svelte.d.ts +22 -0
- package/dist/components/playground/InputCollector.svelte +8 -32
- package/dist/components/playground/InputFields.svelte +246 -0
- package/dist/components/playground/InputFields.svelte.d.ts +16 -0
- package/dist/components/playground/InterfaceInputForm.svelte +285 -30
- package/dist/components/playground/InterfaceInputForm.svelte.d.ts +20 -0
- package/dist/components/playground/InterfaceJsonInput.svelte +92 -0
- package/dist/components/playground/InterfaceJsonInput.svelte.d.ts +10 -0
- package/dist/components/playground/LogRow.svelte +12 -12
- package/dist/components/playground/MessageMarkdown.svelte +11 -11
- package/dist/components/playground/MessageStream.svelte +154 -182
- package/dist/components/playground/Playground.svelte +17 -1139
- package/dist/components/playground/PlaygroundApp.svelte +12 -2
- package/dist/components/playground/PlaygroundApp.svelte.d.ts +2 -1
- package/dist/components/playground/PlaygroundHeader.svelte +309 -0
- package/dist/components/playground/PlaygroundHeader.svelte.d.ts +22 -0
- package/dist/components/playground/PlaygroundModal.svelte +6 -0
- package/dist/components/playground/PlaygroundStudio.svelte +30 -32
- package/dist/components/playground/PlaygroundSurface.svelte +648 -0
- package/dist/components/playground/PlaygroundSurface.svelte.d.ts +79 -0
- package/dist/components/playground/StepsSummary.svelte +312 -0
- package/dist/components/playground/StepsSummary.svelte.d.ts +11 -0
- package/dist/components/playground/messageDisplay.d.ts +9 -0
- package/dist/components/playground/messageDisplay.js +24 -2
- package/dist/components/playground/stepSummary.d.ts +71 -0
- package/dist/components/playground/stepSummary.js +152 -0
- package/dist/components/ports/PortTypeBadge.svelte +13 -1
- package/dist/components/primitives/Button.svelte +226 -0
- package/dist/components/primitives/Button.svelte.d.ts +31 -0
- package/dist/components/primitives/Card.svelte +110 -0
- package/dist/components/primitives/Card.svelte.d.ts +20 -0
- package/dist/components/primitives/Checkbox.svelte +126 -0
- package/dist/components/primitives/Checkbox.svelte.d.ts +15 -0
- package/dist/components/primitives/Chip.svelte +143 -0
- package/dist/components/primitives/Chip.svelte.d.ts +22 -0
- package/dist/components/primitives/Combobox.svelte +444 -0
- package/dist/components/primitives/Combobox.svelte.d.ts +22 -0
- package/dist/components/primitives/Composer.svelte +293 -0
- package/dist/components/primitives/Composer.svelte.d.ts +47 -0
- package/dist/components/primitives/EmptyState.svelte +113 -0
- package/dist/components/primitives/EmptyState.svelte.d.ts +18 -0
- package/dist/components/primitives/Field.svelte +178 -0
- package/dist/components/primitives/Field.svelte.d.ts +30 -0
- package/dist/components/primitives/IconButton.svelte +156 -0
- package/dist/components/primitives/IconButton.svelte.d.ts +27 -0
- package/dist/components/primitives/Menu.svelte +435 -0
- package/dist/components/primitives/Menu.svelte.d.ts +61 -0
- package/dist/components/primitives/Notice.svelte +161 -0
- package/dist/components/primitives/Notice.svelte.d.ts +22 -0
- package/dist/components/primitives/PanelHeader.svelte +134 -0
- package/dist/components/primitives/PanelHeader.svelte.d.ts +23 -0
- package/dist/components/primitives/Segmented.svelte +198 -0
- package/dist/components/primitives/Segmented.svelte.d.ts +32 -0
- package/dist/components/primitives/Select.svelte +130 -0
- package/dist/components/primitives/Select.svelte.d.ts +26 -0
- package/dist/components/primitives/StatusPill.svelte +218 -0
- package/dist/components/primitives/StatusPill.svelte.d.ts +24 -0
- package/dist/components/primitives/Switch.svelte +113 -0
- package/dist/components/primitives/Switch.svelte.d.ts +14 -0
- package/dist/components/primitives/Tabs.svelte +209 -0
- package/dist/components/primitives/Tabs.svelte.d.ts +32 -0
- package/dist/components/primitives/Toolbar.svelte +94 -0
- package/dist/components/primitives/Toolbar.svelte.d.ts +14 -0
- package/dist/components/primitives/ToolbarSeparator.svelte +40 -0
- package/dist/components/primitives/ToolbarSeparator.svelte.d.ts +7 -0
- package/dist/components/surfaces/SurfaceOverlay.svelte +10 -40
- package/dist/components/surfaces/TabbedSurface.svelte +49 -39
- package/dist/components/surfaces/TabbedSurface.svelte.d.ts +8 -0
- package/dist/components/toast/DismissibleToast.svelte +94 -32
- package/dist/components/toast/DismissibleToast.svelte.d.ts +17 -7
- package/dist/config/endpoints.d.ts +43 -1
- package/dist/config/endpoints.js +21 -3
- package/dist/core/index.d.ts +8 -5
- package/dist/core/index.js +1 -1
- package/dist/editor/connectCandidates.d.ts +56 -0
- package/dist/editor/connectCandidates.js +131 -0
- package/dist/editor/contextMenu.d.ts +31 -2
- package/dist/editor/contextMenu.js +96 -9
- package/dist/editor/index.d.ts +3 -1
- package/dist/editor/index.js +1 -0
- package/dist/editor/interfaceMenu.d.ts +35 -0
- package/dist/editor/interfaceMenu.js +47 -0
- package/dist/editor/portMenu.d.ts +23 -0
- package/dist/editor/portMenu.js +34 -0
- package/dist/editor/tidy.d.ts +30 -0
- package/dist/editor/tidy.js +66 -0
- package/dist/helpers/workflowEditorHelper.d.ts +3 -0
- package/dist/helpers/workflowEditorHelper.js +8 -3
- package/dist/layout/fromWorkflow.d.ts +42 -0
- package/dist/layout/fromWorkflow.js +135 -0
- package/dist/layout/geometry.d.ts +102 -0
- package/dist/layout/geometry.js +317 -0
- package/dist/layout/index.d.ts +21 -0
- package/dist/layout/index.js +14 -0
- package/dist/layout/inspect.d.ts +18 -0
- package/dist/layout/inspect.js +81 -0
- package/dist/layout/lanePath.d.ts +23 -0
- package/dist/layout/lanePath.js +47 -0
- package/dist/layout/measure.d.ts +141 -0
- package/dist/layout/measure.js +477 -0
- package/dist/layout/primitives.d.ts +124 -0
- package/dist/layout/primitives.js +461 -0
- package/dist/layout/sweep.d.ts +59 -0
- package/dist/layout/sweep.js +257 -0
- package/dist/layout/toWorkflow.d.ts +43 -0
- package/dist/layout/toWorkflow.js +131 -0
- package/dist/layout/types.d.ts +93 -0
- package/dist/layout/types.js +35 -0
- package/dist/messages/defaults.d.ts +641 -26
- package/dist/messages/defaults.js +578 -25
- package/dist/messages/types.d.ts +21 -1
- package/dist/openapi/v1/openapi.yaml +109 -0
- package/dist/playground/index.d.ts +28 -1
- package/dist/playground/index.js +29 -0
- package/dist/playground/mount.d.ts +28 -2
- package/dist/playground/mount.js +41 -15
- package/dist/playground/runAction.d.ts +29 -0
- package/dist/playground/runAction.js +38 -0
- package/dist/services/doctorService.d.ts +52 -0
- package/dist/services/doctorService.js +113 -0
- package/dist/services/globalSave.js +12 -29
- package/dist/services/nodeExecutionService.d.ts +12 -1
- package/dist/services/nodeExecutionService.js +58 -58
- package/dist/services/playgroundService.d.ts +17 -2
- package/dist/services/playgroundService.js +48 -5
- package/dist/services/runsService.d.ts +42 -0
- package/dist/services/runsService.js +87 -0
- package/dist/services/toastQueue.d.ts +33 -0
- package/dist/services/toastQueue.js +38 -0
- package/dist/services/toastService.d.ts +30 -9
- package/dist/services/toastService.js +81 -46
- package/dist/settings/index.d.ts +1 -0
- package/dist/skins/graphite.d.ts +26 -0
- package/dist/skins/graphite.js +473 -0
- package/dist/skins/index.d.ts +2 -1
- package/dist/skins/index.js +4 -2
- package/dist/skins/slate.js +4 -4
- package/dist/stores/attachedRunStore.svelte.d.ts +35 -0
- package/dist/stores/attachedRunStore.svelte.js +47 -0
- package/dist/stores/connectDragStore.svelte.d.ts +39 -0
- package/dist/stores/connectDragStore.svelte.js +42 -0
- package/dist/stores/doctorStore.svelte.d.ts +79 -0
- package/dist/stores/doctorStore.svelte.js +244 -0
- package/dist/stores/editedNodesStore.svelte.d.ts +42 -0
- package/dist/stores/editedNodesStore.svelte.js +84 -0
- package/dist/stores/editorModeStore.svelte.d.ts +34 -0
- package/dist/stores/editorModeStore.svelte.js +55 -0
- package/dist/stores/instanceContainer.svelte.d.ts +53 -0
- package/dist/stores/instanceContainer.svelte.js +38 -1
- package/dist/stores/loopbackLanesStore.svelte.d.ts +18 -0
- package/dist/stores/loopbackLanesStore.svelte.js +25 -0
- package/dist/stores/nodeHighlightStore.svelte.d.ts +34 -0
- package/dist/stores/nodeHighlightStore.svelte.js +56 -0
- package/dist/stores/playgroundStore.svelte.d.ts +66 -2
- package/dist/stores/playgroundStore.svelte.js +164 -2
- package/dist/stores/runController.svelte.d.ts +382 -0
- package/dist/stores/runController.svelte.js +1217 -0
- package/dist/stores/settingsStore.svelte.d.ts +80 -18
- package/dist/stores/settingsStore.svelte.js +180 -62
- package/dist/stores/workflowStore.svelte.d.ts +14 -0
- package/dist/stores/workflowStore.svelte.js +22 -1
- package/dist/styles/base.css +286 -25
- package/dist/styles/fonts/Inter-LICENSE.txt +93 -0
- package/dist/styles/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/dist/styles/fonts/inter.css +19 -0
- package/dist/styles/toast.css +100 -20
- package/dist/styles/tokenAliases.js +118 -1
- package/dist/styles/tokens.css +586 -14
- package/dist/svelte-app.d.ts +38 -5
- package/dist/svelte-app.js +14 -3
- package/dist/themes/graphite.d.ts +2 -0
- package/dist/themes/graphite.js +15 -0
- package/dist/themes/index.d.ts +2 -1
- package/dist/themes/index.js +22 -3
- package/dist/themes/minimal.js +10 -0
- package/dist/themes/scopedSkinCss.d.ts +22 -5
- package/dist/themes/scopedSkinCss.js +136 -11
- package/dist/types/chat.d.ts +6 -0
- package/dist/types/doctor.d.ts +82 -0
- package/dist/types/doctor.js +11 -0
- package/dist/types/events.d.ts +35 -0
- package/dist/types/events.js +4 -1
- package/dist/types/index.d.ts +17 -2
- package/dist/types/navbar.d.ts +36 -0
- package/dist/types/playground.d.ts +66 -0
- package/dist/types/settings.d.ts +120 -7
- package/dist/types/settings.js +35 -3
- package/dist/types/skin.d.ts +21 -8
- package/dist/types/theme.d.ts +40 -2
- package/dist/utils/appearance.d.ts +19 -0
- package/dist/utils/appearance.js +13 -0
- package/dist/utils/canvasFit.d.ts +41 -0
- package/dist/utils/canvasFit.js +44 -0
- package/dist/utils/chipTitles.d.ts +9 -0
- package/dist/utils/chipTitles.js +19 -0
- package/dist/utils/connections.js +8 -0
- package/dist/utils/consoleHighlight.d.ts +28 -0
- package/dist/utils/consoleHighlight.js +269 -0
- package/dist/utils/deprecation.d.ts +17 -0
- package/dist/utils/deprecation.js +29 -0
- package/dist/utils/doctorOperations.d.ts +40 -0
- package/dist/utils/doctorOperations.js +237 -0
- package/dist/utils/duration.d.ts +13 -0
- package/dist/utils/duration.js +40 -0
- package/dist/utils/inspectorContext.d.ts +19 -0
- package/dist/utils/inspectorContext.js +12 -0
- package/dist/utils/inspectorSections.d.ts +20 -0
- package/dist/utils/inspectorSections.js +44 -0
- package/dist/utils/inspectorSurface.d.ts +46 -0
- package/dist/utils/inspectorSurface.js +51 -0
- package/dist/utils/interfaceTags.d.ts +102 -0
- package/dist/utils/interfaceTags.js +211 -0
- package/dist/utils/itemRef.d.ts +86 -0
- package/dist/utils/itemRef.js +106 -0
- package/dist/utils/lastRun.d.ts +35 -0
- package/dist/utils/lastRun.js +73 -0
- package/dist/utils/messageNodeLink.d.ts +17 -0
- package/dist/utils/messageNodeLink.js +16 -0
- package/dist/utils/minimapVisibility.d.ts +28 -0
- package/dist/utils/minimapVisibility.js +34 -0
- package/dist/utils/nodeAriaLabel.d.ts +12 -0
- package/dist/utils/nodeAriaLabel.js +17 -0
- package/dist/utils/nodeFingerprint.d.ts +27 -0
- package/dist/utils/nodeFingerprint.js +66 -0
- package/dist/utils/nodeFormSchema.d.ts +10 -0
- package/dist/utils/nodeFormSchema.js +2 -2
- package/dist/utils/nodeGeometry.d.ts +168 -0
- package/dist/utils/nodeGeometry.js +204 -0
- package/dist/utils/nodeProblem.d.ts +19 -0
- package/dist/utils/nodeProblem.js +9 -0
- package/dist/utils/nodeStatus.d.ts +38 -3
- package/dist/utils/nodeStatus.js +67 -39
- package/dist/utils/nodeSwap.js +9 -1
- package/dist/utils/nodeWrapper.d.ts +1 -0
- package/dist/utils/playgroundHistory.d.ts +48 -0
- package/dist/utils/playgroundHistory.js +38 -0
- package/dist/utils/playgroundInputRuns.d.ts +26 -0
- package/dist/utils/playgroundInputRuns.js +50 -0
- package/dist/utils/portExposure.d.ts +49 -0
- package/dist/utils/portExposure.js +122 -0
- package/dist/utils/portUtils.d.ts +16 -0
- package/dist/utils/portUtils.js +37 -0
- package/dist/utils/portal.d.ts +0 -19
- package/dist/utils/portal.js +8 -1
- package/dist/utils/reservedPorts.d.ts +59 -0
- package/dist/utils/reservedPorts.js +60 -0
- package/dist/utils/runEdges.d.ts +24 -0
- package/dist/utils/runEdges.js +35 -0
- package/dist/utils/runsList.d.ts +69 -0
- package/dist/utils/runsList.js +134 -0
- package/dist/utils/selectOptions.d.ts +62 -0
- package/dist/utils/selectOptions.js +137 -0
- package/dist/utils/sessionRuns.d.ts +62 -0
- package/dist/utils/sessionRuns.js +123 -0
- package/dist/utils/sheetWidths.d.ts +29 -0
- package/dist/utils/sheetWidths.js +41 -0
- package/dist/utils/sidebarWidths.d.ts +34 -0
- package/dist/utils/sidebarWidths.js +47 -0
- package/dist/utils/straightWires.d.ts +73 -0
- package/dist/utils/straightWires.js +99 -0
- package/dist/utils/themeScope.svelte.d.ts +10 -0
- package/dist/utils/themeScope.svelte.js +80 -0
- package/dist/utils/wiredHandles.d.ts +10 -0
- package/dist/utils/wiredHandles.js +14 -0
- package/dist/utils/workflowDraft.d.ts +9 -0
- package/dist/utils/workflowDraft.js +39 -0
- package/dist/utils/workflowInterface.d.ts +40 -7
- package/dist/utils/workflowInterface.js +66 -16
- package/dist/utils/zoomTier.d.ts +43 -0
- package/dist/utils/zoomTier.js +107 -0
- package/dist/utils/zoomTierRows.d.ts +41 -0
- package/dist/utils/zoomTierRows.js +103 -0
- package/dist/webmcp/WebMCPConfirm.svelte +1 -1
- package/dist/webmcp/bridge.d.ts +5 -0
- package/dist/webmcp/bridge.js +8 -0
- package/dist/webmcp/bridgeController.svelte.d.ts +84 -0
- package/dist/webmcp/bridgeController.svelte.js +224 -0
- package/dist/webmcp/descriptors.d.ts +1 -1
- package/dist/webmcp/descriptors.js +66 -5
- package/dist/webmcp/fakeWidget.d.ts +34 -0
- package/dist/webmcp/fakeWidget.js +75 -0
- package/dist/webmcp/gate.js +4 -0
- package/dist/webmcp/index.d.ts +2 -0
- package/dist/webmcp/index.js +1 -0
- package/dist/webmcp/runtime.js +4 -1
- package/dist/webmcp/types.d.ts +2 -0
- package/dist/webmcp/validate.js +5 -1
- package/package.json +8 -2
- package/dist/components/Select.svelte +0 -53
- package/dist/components/Select.svelte.d.ts +0 -15
- package/dist/components/icons/CommandLineIcon.svelte +0 -15
- package/dist/components/icons/CommandLineIcon.svelte.d.ts +0 -26
- package/dist/components/toast/WarningIcon.svelte +0 -28
- package/dist/components/toast/WarningIcon.svelte.d.ts +0 -26
|
@@ -0,0 +1,649 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
RunsMenu — the Runs list of Test mode: a "Runs" control in the canvas toolbar
|
|
3
|
+
that opens a popover listing the workflow's past runs (newest first, paged).
|
|
4
|
+
|
|
5
|
+
Read-only apart from two actions: Re-run (a finished run) and Cancel (one
|
|
6
|
+
that has not finished). Opening a run shows it on the canvas: its node
|
|
7
|
+
statuses become the badges (`fd.runs.openRun`). Everything else (delete,
|
|
8
|
+
generate or clear jobs, filters) lives in the host's admin; the footer link
|
|
9
|
+
and the per-row link are drawn only when the host gave a URL template
|
|
10
|
+
(`features.adminLinks`), so no host path is hard-coded here.
|
|
11
|
+
|
|
12
|
+
The list is a plain `<ul>`; each row is a button that opens the run, with its
|
|
13
|
+
actions beside it (shown on hover and focus, always on touch). Escape closes
|
|
14
|
+
the popover and returns focus to its trigger.
|
|
15
|
+
-->
|
|
16
|
+
|
|
17
|
+
<script lang="ts">
|
|
18
|
+
import { tick, untrack } from 'svelte';
|
|
19
|
+
import Icon from '@iconify/svelte';
|
|
20
|
+
import { getInstance } from '../stores/getInstance.svelte.js';
|
|
21
|
+
import { getMessages } from '../messages/context.js';
|
|
22
|
+
import { cancelRun, listRuns, rerunRun, runsSupport } from '../services/runsService.js';
|
|
23
|
+
import {
|
|
24
|
+
RUNS_MAX_LIMIT,
|
|
25
|
+
RUNS_PAGE_SIZE,
|
|
26
|
+
appendRuns,
|
|
27
|
+
canCancelRun,
|
|
28
|
+
canRerunRun,
|
|
29
|
+
expandAdminUrl,
|
|
30
|
+
formatRunDuration,
|
|
31
|
+
formatRunTime,
|
|
32
|
+
hasMoreRuns,
|
|
33
|
+
isTerminalRun,
|
|
34
|
+
runDurationMs,
|
|
35
|
+
runPillStatus,
|
|
36
|
+
type RunSummary
|
|
37
|
+
} from '../utils/runsList.js';
|
|
38
|
+
import { on } from 'svelte/events';
|
|
39
|
+
import Button from './primitives/Button.svelte';
|
|
40
|
+
import IconButton from './primitives/IconButton.svelte';
|
|
41
|
+
import EmptyState from './primitives/EmptyState.svelte';
|
|
42
|
+
|
|
43
|
+
interface Props {
|
|
44
|
+
/**
|
|
45
|
+
* Host URL templates for the admin pages. `{workflowId}` and `{pipelineId}`
|
|
46
|
+
* are filled in. `runs` is the footer link ("Open in admin"), `run` the
|
|
47
|
+
* link on each row. A link whose template is not given is not drawn.
|
|
48
|
+
*/
|
|
49
|
+
adminLinks?: { runs?: string; run?: string };
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
let { adminLinks }: Props = $props();
|
|
53
|
+
|
|
54
|
+
const fd = getInstance();
|
|
55
|
+
const getMsgs = getMessages();
|
|
56
|
+
const msgs = $derived(getMsgs().runsList);
|
|
57
|
+
|
|
58
|
+
/** How often the open list re-reads while a run on it has not finished. */
|
|
59
|
+
const REFRESH_MS = 4000;
|
|
60
|
+
|
|
61
|
+
const config = $derived(fd.api.config);
|
|
62
|
+
const support = $derived(runsSupport(config));
|
|
63
|
+
const workflowId = $derived(fd.workflow.current?.id);
|
|
64
|
+
const currentRunId = $derived(fd.runs.activeRun?.runId ?? null);
|
|
65
|
+
|
|
66
|
+
let open = $state(false);
|
|
67
|
+
/** What the trigger says of the run opened from the list. */
|
|
68
|
+
let shown = $state<{ id: string; createdAt: string | null } | null>(null);
|
|
69
|
+
const shownRun = $derived(
|
|
70
|
+
shown && fd.runs.openedRunId === shown.id
|
|
71
|
+
? { ...shown, status: fd.runs.activeRun?.status }
|
|
72
|
+
: null
|
|
73
|
+
);
|
|
74
|
+
let runs = $state<RunSummary[]>([]);
|
|
75
|
+
let loading = $state(false);
|
|
76
|
+
let loadingMore = $state(false);
|
|
77
|
+
let failed = $state(false);
|
|
78
|
+
let more = $state(false);
|
|
79
|
+
let busyId = $state<string | null>(null);
|
|
80
|
+
let actionError = $state<string | null>(null);
|
|
81
|
+
let rootEl = $state<HTMLElement | null>(null);
|
|
82
|
+
let listEl = $state<HTMLElement | null>(null);
|
|
83
|
+
/** Bumped by each read; a slower, older read is dropped. */
|
|
84
|
+
let readToken = 0;
|
|
85
|
+
|
|
86
|
+
const listId = `fd-runs-${Math.random().toString(36).slice(2, 8)}`;
|
|
87
|
+
const adminRuns = $derived(expandAdminUrl(adminLinks?.runs, { workflowId }));
|
|
88
|
+
|
|
89
|
+
async function load(): Promise<void> {
|
|
90
|
+
if (!config || !workflowId) return;
|
|
91
|
+
const token = ++readToken;
|
|
92
|
+
// A refresh re-reads as many as are showing, so the list does not shrink.
|
|
93
|
+
const limit = Math.min(RUNS_MAX_LIMIT, Math.max(RUNS_PAGE_SIZE, runs.length));
|
|
94
|
+
try {
|
|
95
|
+
const page = await listRuns(config, workflowId, { offset: 0, limit }, fd.api.authProvider);
|
|
96
|
+
if (token !== readToken) return;
|
|
97
|
+
runs = page;
|
|
98
|
+
more = hasMoreRuns(page.length, limit);
|
|
99
|
+
failed = false;
|
|
100
|
+
} catch {
|
|
101
|
+
if (token !== readToken) return;
|
|
102
|
+
failed = runs.length === 0;
|
|
103
|
+
} finally {
|
|
104
|
+
if (token === readToken) loading = false;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
async function loadMore(): Promise<void> {
|
|
109
|
+
if (!config || !workflowId || loadingMore) return;
|
|
110
|
+
loadingMore = true;
|
|
111
|
+
const token = ++readToken;
|
|
112
|
+
try {
|
|
113
|
+
const page = await listRuns(
|
|
114
|
+
config,
|
|
115
|
+
workflowId,
|
|
116
|
+
{ offset: runs.length, limit: RUNS_PAGE_SIZE },
|
|
117
|
+
fd.api.authProvider
|
|
118
|
+
);
|
|
119
|
+
if (token !== readToken) return;
|
|
120
|
+
runs = appendRuns(runs, page);
|
|
121
|
+
more = hasMoreRuns(page.length, RUNS_PAGE_SIZE);
|
|
122
|
+
} catch {
|
|
123
|
+
actionError = msgs.loadError;
|
|
124
|
+
} finally {
|
|
125
|
+
loadingMore = false;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
function show(): void {
|
|
130
|
+
open = true;
|
|
131
|
+
actionError = null;
|
|
132
|
+
loading = runs.length === 0;
|
|
133
|
+
failed = false;
|
|
134
|
+
void load();
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function close(returnFocus = true): void {
|
|
138
|
+
if (!open) return;
|
|
139
|
+
open = false;
|
|
140
|
+
readToken++;
|
|
141
|
+
if (returnFocus) rootEl?.querySelector<HTMLElement>('.fd-runs__trigger')?.focus();
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// Outside pointer closes; the list refreshes while a run on it is going.
|
|
145
|
+
$effect(() => {
|
|
146
|
+
if (!open) return;
|
|
147
|
+
return on(
|
|
148
|
+
document,
|
|
149
|
+
'pointerdown',
|
|
150
|
+
(event) => {
|
|
151
|
+
if (rootEl && !rootEl.contains(event.target as Node)) close(false);
|
|
152
|
+
},
|
|
153
|
+
{ capture: true }
|
|
154
|
+
);
|
|
155
|
+
});
|
|
156
|
+
const anyLive = $derived(runs.some((r) => !isTerminalRun(r.status)));
|
|
157
|
+
$effect(() => {
|
|
158
|
+
if (!open || !anyLive) return;
|
|
159
|
+
const timer = setInterval(() => void load(), REFRESH_MS);
|
|
160
|
+
return () => clearInterval(timer);
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
// A different workflow is a different list.
|
|
164
|
+
$effect(() => {
|
|
165
|
+
void workflowId;
|
|
166
|
+
untrack(() => {
|
|
167
|
+
runs = [];
|
|
168
|
+
more = false;
|
|
169
|
+
close(false);
|
|
170
|
+
});
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
function onKeydown(event: KeyboardEvent): void {
|
|
174
|
+
// The toolbar around this control roves on the arrow keys: keep them here.
|
|
175
|
+
if (['ArrowLeft', 'ArrowRight', 'ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) {
|
|
176
|
+
event.stopPropagation();
|
|
177
|
+
}
|
|
178
|
+
if (event.key === 'Escape') {
|
|
179
|
+
event.preventDefault();
|
|
180
|
+
event.stopPropagation();
|
|
181
|
+
close();
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
if (!['ArrowUp', 'ArrowDown', 'Home', 'End'].includes(event.key)) return;
|
|
185
|
+
const rows = Array.from(listEl?.querySelectorAll<HTMLElement>('.fd-runs__open') ?? []);
|
|
186
|
+
if (rows.length === 0) return;
|
|
187
|
+
const at = rows.indexOf(document.activeElement as HTMLElement);
|
|
188
|
+
if (at === -1) return;
|
|
189
|
+
event.preventDefault();
|
|
190
|
+
const next =
|
|
191
|
+
event.key === 'Home'
|
|
192
|
+
? 0
|
|
193
|
+
: event.key === 'End'
|
|
194
|
+
? rows.length - 1
|
|
195
|
+
: Math.min(rows.length - 1, Math.max(0, at + (event.key === 'ArrowDown' ? 1 : -1)));
|
|
196
|
+
rows[next]?.focus();
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function openRun(run: RunSummary): void {
|
|
200
|
+
fd.runs.openRun(run.id, run.status);
|
|
201
|
+
shown = { id: run.id, createdAt: run.createdAt };
|
|
202
|
+
close();
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
async function rerun(run: RunSummary): Promise<void> {
|
|
206
|
+
if (!config || busyId) return;
|
|
207
|
+
busyId = run.id;
|
|
208
|
+
actionError = null;
|
|
209
|
+
const result = await rerunRun(config, run.id, fd.api.authProvider);
|
|
210
|
+
busyId = null;
|
|
211
|
+
if (!result.ok) {
|
|
212
|
+
actionError = result.message || msgs.actionFailed;
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
if (result.pipelineId) {
|
|
216
|
+
fd.runs.openRun(result.pipelineId, result.status ?? 'running');
|
|
217
|
+
shown = { id: result.pipelineId, createdAt: new Date().toISOString() };
|
|
218
|
+
}
|
|
219
|
+
close();
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
async function cancel(run: RunSummary): Promise<void> {
|
|
223
|
+
if (!config || busyId) return;
|
|
224
|
+
busyId = run.id;
|
|
225
|
+
actionError = null;
|
|
226
|
+
const result = await cancelRun(config, run.id, fd.api.authProvider);
|
|
227
|
+
busyId = null;
|
|
228
|
+
if (!result.ok) actionError = result.message || msgs.actionFailed;
|
|
229
|
+
// Either way the run's truth is on the server now.
|
|
230
|
+
await load();
|
|
231
|
+
await tick();
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function clearShown(): void {
|
|
235
|
+
shown = null;
|
|
236
|
+
fd.runs.dismissRun();
|
|
237
|
+
rootEl?.querySelector<HTMLElement>('.fd-runs__trigger')?.focus();
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function statusLabel(status: string): string {
|
|
241
|
+
return (msgs.status as Record<string, string>)[status] ?? status;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function timeOf(run: { createdAt: string | null }): string {
|
|
245
|
+
return formatRunTime(run.createdAt, new Date(), {
|
|
246
|
+
today: msgs.today,
|
|
247
|
+
yesterday: msgs.yesterday
|
|
248
|
+
});
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
function adminRun(run: RunSummary): string | null {
|
|
252
|
+
return expandAdminUrl(adminLinks?.run, { workflowId, pipelineId: run.id });
|
|
253
|
+
}
|
|
254
|
+
</script>
|
|
255
|
+
|
|
256
|
+
{#if support.list && workflowId}
|
|
257
|
+
<div class="fd-runs" bind:this={rootEl} onkeydown={onKeydown} role="presentation">
|
|
258
|
+
<Button
|
|
259
|
+
variant="ghost"
|
|
260
|
+
class="fd-runs__trigger {open ? 'fd-runs__trigger--open' : ''}"
|
|
261
|
+
aria-expanded={open}
|
|
262
|
+
aria-controls={open ? listId : undefined}
|
|
263
|
+
title={shownRun ? msgs.shownTitle : msgs.triggerTitle}
|
|
264
|
+
data-testid="runs-trigger"
|
|
265
|
+
onclick={() => (open ? close(false) : show())}
|
|
266
|
+
>
|
|
267
|
+
{#if shownRun}
|
|
268
|
+
<span class="fd-runs__trigger-text" data-testid="runs-shown">
|
|
269
|
+
{msgs.shown({
|
|
270
|
+
status: shownRun.status ? getMsgs().runBar[shownRun.status] : '',
|
|
271
|
+
time: timeOf({ createdAt: shownRun.createdAt })
|
|
272
|
+
})}
|
|
273
|
+
</span>
|
|
274
|
+
{:else}
|
|
275
|
+
<span>{msgs.trigger}</span>
|
|
276
|
+
{/if}
|
|
277
|
+
<Icon icon="mdi:chevron-down" aria-hidden="true" />
|
|
278
|
+
</Button>
|
|
279
|
+
{#if shownRun}
|
|
280
|
+
<IconButton
|
|
281
|
+
variant="ghost"
|
|
282
|
+
size="sm"
|
|
283
|
+
class="fd-runs__clear"
|
|
284
|
+
ariaLabel={msgs.clearShown}
|
|
285
|
+
title={msgs.clearShown}
|
|
286
|
+
data-testid="runs-clear"
|
|
287
|
+
onclick={clearShown}
|
|
288
|
+
>
|
|
289
|
+
<Icon icon="mdi:close" aria-hidden="true" />
|
|
290
|
+
</IconButton>
|
|
291
|
+
{/if}
|
|
292
|
+
|
|
293
|
+
{#if open}
|
|
294
|
+
<div
|
|
295
|
+
class="fd-runs__popover"
|
|
296
|
+
id={listId}
|
|
297
|
+
role="region"
|
|
298
|
+
aria-label={msgs.title}
|
|
299
|
+
data-testid="runs-popover"
|
|
300
|
+
>
|
|
301
|
+
{#if loading}
|
|
302
|
+
<p class="fd-runs__note" role="status">{msgs.loading}</p>
|
|
303
|
+
{:else if failed}
|
|
304
|
+
<div class="fd-runs__note" role="alert">
|
|
305
|
+
<span>{msgs.loadError}</span>
|
|
306
|
+
<Button variant="ghost" size="sm" onclick={() => void load()}>{msgs.retry}</Button>
|
|
307
|
+
</div>
|
|
308
|
+
{:else if runs.length === 0}
|
|
309
|
+
<EmptyState size="sm" title={msgs.empty} description={msgs.emptyHint} />
|
|
310
|
+
{:else}
|
|
311
|
+
<ul class="fd-runs__list" aria-label={msgs.listLabel} bind:this={listEl}>
|
|
312
|
+
{#each runs as run (run.id)}
|
|
313
|
+
{@const duration = formatRunDuration(runDurationMs(run))}
|
|
314
|
+
{@const time = timeOf(run)}
|
|
315
|
+
{@const adminHref = adminRun(run)}
|
|
316
|
+
<li class="fd-runs__row" class:fd-runs__row--current={run.id === currentRunId}>
|
|
317
|
+
<Button
|
|
318
|
+
variant="ghost"
|
|
319
|
+
class="fd-runs__open"
|
|
320
|
+
aria-current={run.id === currentRunId ? 'true' : undefined}
|
|
321
|
+
aria-label={msgs.openRun({ id: run.id, status: statusLabel(run.status), time })}
|
|
322
|
+
data-testid="run-row"
|
|
323
|
+
data-run-id={run.id}
|
|
324
|
+
data-status={run.status}
|
|
325
|
+
onclick={() => openRun(run)}
|
|
326
|
+
>
|
|
327
|
+
<span class="fd-runs__line">
|
|
328
|
+
<span
|
|
329
|
+
class="fd-runs__status fd-runs__status--{runPillStatus(run.status)}"
|
|
330
|
+
data-testid="run-status"
|
|
331
|
+
>
|
|
332
|
+
<span class="fd-runs__dot" aria-hidden="true"></span>
|
|
333
|
+
{statusLabel(run.status)}
|
|
334
|
+
</span>
|
|
335
|
+
<span class="fd-runs__time">
|
|
336
|
+
{time}
|
|
337
|
+
{#if run.jobSummary && run.jobSummary.failed > 0 && run.status !== 'failed'}
|
|
338
|
+
<span class="fd-runs__jobs"
|
|
339
|
+
>· {msgs.jobsFailed({ n: run.jobSummary.failed })}</span
|
|
340
|
+
>
|
|
341
|
+
{/if}
|
|
342
|
+
</span>
|
|
343
|
+
<span class="fd-runs__duration">{duration}</span>
|
|
344
|
+
</span>
|
|
345
|
+
</Button>
|
|
346
|
+
<span class="fd-runs__actions">
|
|
347
|
+
{#if support.cancel && canCancelRun(run.status)}
|
|
348
|
+
<Button
|
|
349
|
+
variant="ghost"
|
|
350
|
+
size="sm"
|
|
351
|
+
ariaLabel={msgs.cancelLabel({ id: run.id })}
|
|
352
|
+
loading={busyId === run.id}
|
|
353
|
+
disabled={busyId !== null && busyId !== run.id}
|
|
354
|
+
data-testid="run-cancel"
|
|
355
|
+
onclick={() => void cancel(run)}
|
|
356
|
+
>
|
|
357
|
+
{msgs.cancel}
|
|
358
|
+
</Button>
|
|
359
|
+
{/if}
|
|
360
|
+
{#if support.rerun && canRerunRun(run.status)}
|
|
361
|
+
<Button
|
|
362
|
+
variant="ghost"
|
|
363
|
+
size="sm"
|
|
364
|
+
ariaLabel={msgs.rerunLabel({ id: run.id })}
|
|
365
|
+
loading={busyId === run.id}
|
|
366
|
+
disabled={busyId !== null && busyId !== run.id}
|
|
367
|
+
data-testid="run-rerun"
|
|
368
|
+
onclick={() => void rerun(run)}
|
|
369
|
+
>
|
|
370
|
+
{msgs.rerun}
|
|
371
|
+
</Button>
|
|
372
|
+
{/if}
|
|
373
|
+
{#if adminHref}
|
|
374
|
+
<a
|
|
375
|
+
class="fd-runs__admin-row"
|
|
376
|
+
href={adminHref}
|
|
377
|
+
target="_blank"
|
|
378
|
+
rel="noopener noreferrer"
|
|
379
|
+
aria-label={msgs.openAdminRun}
|
|
380
|
+
title={msgs.openAdminRun}
|
|
381
|
+
data-testid="run-admin-link"
|
|
382
|
+
>
|
|
383
|
+
<Icon icon="mdi:arrow-top-right" aria-hidden="true" />
|
|
384
|
+
</a>
|
|
385
|
+
{/if}
|
|
386
|
+
</span>
|
|
387
|
+
</li>
|
|
388
|
+
{/each}
|
|
389
|
+
</ul>
|
|
390
|
+
{#if more}
|
|
391
|
+
<div class="fd-runs__more">
|
|
392
|
+
<Button
|
|
393
|
+
variant="ghost"
|
|
394
|
+
size="sm"
|
|
395
|
+
loading={loadingMore}
|
|
396
|
+
data-testid="runs-load-more"
|
|
397
|
+
onclick={() => void loadMore()}
|
|
398
|
+
>
|
|
399
|
+
{loadingMore ? msgs.loadingMore : msgs.loadMore}
|
|
400
|
+
</Button>
|
|
401
|
+
</div>
|
|
402
|
+
{/if}
|
|
403
|
+
{/if}
|
|
404
|
+
|
|
405
|
+
{#if actionError}
|
|
406
|
+
<p class="fd-runs__error" role="alert" data-testid="runs-error">{actionError}</p>
|
|
407
|
+
{/if}
|
|
408
|
+
|
|
409
|
+
{#if adminRuns}
|
|
410
|
+
<a
|
|
411
|
+
class="fd-runs__admin"
|
|
412
|
+
href={adminRuns}
|
|
413
|
+
target="_blank"
|
|
414
|
+
rel="noopener noreferrer"
|
|
415
|
+
data-testid="runs-admin-link"
|
|
416
|
+
>
|
|
417
|
+
<span>{msgs.openAdmin}</span>
|
|
418
|
+
<Icon icon="mdi:arrow-top-right" aria-hidden="true" />
|
|
419
|
+
</a>
|
|
420
|
+
{/if}
|
|
421
|
+
</div>
|
|
422
|
+
{/if}
|
|
423
|
+
</div>
|
|
424
|
+
{/if}
|
|
425
|
+
|
|
426
|
+
<style>
|
|
427
|
+
.fd-runs {
|
|
428
|
+
position: relative;
|
|
429
|
+
display: inline-flex;
|
|
430
|
+
align-items: center;
|
|
431
|
+
gap: var(--fd-space-3xs);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.fd-runs__trigger-text {
|
|
435
|
+
max-width: 16rem;
|
|
436
|
+
overflow: hidden;
|
|
437
|
+
text-overflow: ellipsis;
|
|
438
|
+
white-space: nowrap;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
/* A floating control of its own, like the Edit | Test switch beside it. */
|
|
442
|
+
.fd-runs :global(.fd-runs__trigger) {
|
|
443
|
+
display: inline-flex;
|
|
444
|
+
align-items: center;
|
|
445
|
+
gap: var(--fd-space-3xs);
|
|
446
|
+
box-sizing: border-box;
|
|
447
|
+
height: var(--fd-canvas-control);
|
|
448
|
+
padding: 0 var(--fd-space-sm) 0 var(--fd-space-md);
|
|
449
|
+
background-color: var(--fd-toolbar-segmented-bg);
|
|
450
|
+
border: 1px solid var(--fd-toolbar-segmented-border);
|
|
451
|
+
border-radius: var(--fd-toolbar-segmented-radius);
|
|
452
|
+
box-shadow: var(--fd-elevation-float);
|
|
453
|
+
color: var(--fd-muted-foreground);
|
|
454
|
+
font: inherit;
|
|
455
|
+
font-size: var(--fd-text-sm);
|
|
456
|
+
font-weight: 500;
|
|
457
|
+
cursor: pointer;
|
|
458
|
+
}
|
|
459
|
+
.fd-runs :global(.fd-runs__trigger:hover),
|
|
460
|
+
.fd-runs :global(.fd-runs__trigger--open) {
|
|
461
|
+
color: var(--fd-foreground);
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.fd-runs__popover {
|
|
465
|
+
position: absolute;
|
|
466
|
+
top: calc(100% + var(--fd-space-xs));
|
|
467
|
+
left: 0;
|
|
468
|
+
z-index: 50;
|
|
469
|
+
box-sizing: border-box;
|
|
470
|
+
width: 340px;
|
|
471
|
+
max-width: calc(100vw - 32px);
|
|
472
|
+
max-height: min(60vh, 440px);
|
|
473
|
+
overflow-y: auto;
|
|
474
|
+
padding: var(--fd-space-xs);
|
|
475
|
+
background-color: var(--fd-background);
|
|
476
|
+
border: 1px solid var(--fd-border);
|
|
477
|
+
border-radius: var(--fd-menu-radius);
|
|
478
|
+
box-shadow: var(--fd-menu-shadow);
|
|
479
|
+
font-family: var(--fd-font-sans);
|
|
480
|
+
font-size: var(--fd-text-sm);
|
|
481
|
+
color: var(--fd-foreground);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
.fd-runs__list {
|
|
485
|
+
margin: 0;
|
|
486
|
+
padding: 0;
|
|
487
|
+
list-style: none;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
.fd-runs__row {
|
|
491
|
+
position: relative;
|
|
492
|
+
border-radius: var(--fd-menu-item-radius);
|
|
493
|
+
}
|
|
494
|
+
.fd-runs__row:hover,
|
|
495
|
+
.fd-runs__row:focus-within {
|
|
496
|
+
background-color: var(--fd-muted);
|
|
497
|
+
}
|
|
498
|
+
.fd-runs__row--current {
|
|
499
|
+
background-color: var(--fd-muted);
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.fd-runs__row :global(.fd-runs__open) {
|
|
503
|
+
height: auto;
|
|
504
|
+
font-weight: 400;
|
|
505
|
+
display: flex;
|
|
506
|
+
justify-content: stretch;
|
|
507
|
+
width: 100%;
|
|
508
|
+
min-height: var(--fd-menu-item-height);
|
|
509
|
+
padding: var(--fd-space-xs) var(--fd-space-sm);
|
|
510
|
+
border: none;
|
|
511
|
+
border-radius: inherit;
|
|
512
|
+
background: transparent;
|
|
513
|
+
color: inherit;
|
|
514
|
+
font: inherit;
|
|
515
|
+
text-align: left;
|
|
516
|
+
cursor: pointer;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.fd-runs__row :global(.fd-runs__open .flowdrop-ui-button__label) {
|
|
520
|
+
flex: 1;
|
|
521
|
+
min-width: 0;
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
.fd-runs__line {
|
|
525
|
+
display: grid;
|
|
526
|
+
grid-template-columns: 5.5rem minmax(0, 1fr) auto;
|
|
527
|
+
align-items: center;
|
|
528
|
+
gap: var(--fd-space-sm);
|
|
529
|
+
width: 100%;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
.fd-runs__status {
|
|
533
|
+
--_c: var(--fd-status-skipped);
|
|
534
|
+
display: inline-flex;
|
|
535
|
+
align-items: center;
|
|
536
|
+
gap: var(--fd-space-xs);
|
|
537
|
+
font-weight: 500;
|
|
538
|
+
}
|
|
539
|
+
.fd-runs__status--running {
|
|
540
|
+
--_c: var(--fd-status-running);
|
|
541
|
+
}
|
|
542
|
+
.fd-runs__status--completed {
|
|
543
|
+
--_c: var(--fd-status-completed);
|
|
544
|
+
}
|
|
545
|
+
.fd-runs__status--waiting {
|
|
546
|
+
--_c: var(--fd-status-waiting);
|
|
547
|
+
}
|
|
548
|
+
.fd-runs__status--failed {
|
|
549
|
+
--_c: var(--fd-status-failed);
|
|
550
|
+
}
|
|
551
|
+
.fd-runs__dot {
|
|
552
|
+
flex: none;
|
|
553
|
+
width: 8px;
|
|
554
|
+
height: 8px;
|
|
555
|
+
border-radius: var(--fd-radius-full);
|
|
556
|
+
background-color: var(--_c);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
.fd-runs__time {
|
|
560
|
+
min-width: 0;
|
|
561
|
+
overflow: hidden;
|
|
562
|
+
text-overflow: ellipsis;
|
|
563
|
+
white-space: nowrap;
|
|
564
|
+
color: var(--fd-muted-foreground);
|
|
565
|
+
}
|
|
566
|
+
.fd-runs__jobs {
|
|
567
|
+
color: var(--fd-status-failed);
|
|
568
|
+
}
|
|
569
|
+
.fd-runs__duration {
|
|
570
|
+
font-family: var(--fd-font-mono);
|
|
571
|
+
font-size: var(--fd-text-xs);
|
|
572
|
+
color: var(--fd-muted-foreground);
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
/* Actions take the duration's place while the row is hovered or holds focus. */
|
|
576
|
+
.fd-runs__actions {
|
|
577
|
+
position: absolute;
|
|
578
|
+
top: 0;
|
|
579
|
+
right: var(--fd-space-2xs);
|
|
580
|
+
bottom: 0;
|
|
581
|
+
display: inline-flex;
|
|
582
|
+
align-items: center;
|
|
583
|
+
gap: var(--fd-space-3xs);
|
|
584
|
+
padding-left: var(--fd-space-sm);
|
|
585
|
+
background-color: var(--fd-muted);
|
|
586
|
+
border-radius: var(--fd-menu-item-radius);
|
|
587
|
+
opacity: 0;
|
|
588
|
+
pointer-events: none;
|
|
589
|
+
}
|
|
590
|
+
.fd-runs__row:hover .fd-runs__actions,
|
|
591
|
+
.fd-runs__row:focus-within .fd-runs__actions {
|
|
592
|
+
opacity: 1;
|
|
593
|
+
pointer-events: auto;
|
|
594
|
+
}
|
|
595
|
+
@media (hover: none) {
|
|
596
|
+
.fd-runs__actions {
|
|
597
|
+
opacity: 1;
|
|
598
|
+
pointer-events: auto;
|
|
599
|
+
}
|
|
600
|
+
.fd-runs__duration {
|
|
601
|
+
display: none;
|
|
602
|
+
}
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
.fd-runs__admin-row {
|
|
606
|
+
display: inline-flex;
|
|
607
|
+
align-items: center;
|
|
608
|
+
padding: var(--fd-space-2xs);
|
|
609
|
+
color: var(--fd-muted-foreground);
|
|
610
|
+
}
|
|
611
|
+
.fd-runs__admin-row:hover {
|
|
612
|
+
color: var(--fd-foreground);
|
|
613
|
+
}
|
|
614
|
+
|
|
615
|
+
.fd-runs__more {
|
|
616
|
+
display: flex;
|
|
617
|
+
justify-content: center;
|
|
618
|
+
padding-top: var(--fd-space-xs);
|
|
619
|
+
}
|
|
620
|
+
|
|
621
|
+
.fd-runs__note {
|
|
622
|
+
display: flex;
|
|
623
|
+
align-items: center;
|
|
624
|
+
justify-content: space-between;
|
|
625
|
+
gap: var(--fd-space-sm);
|
|
626
|
+
margin: 0;
|
|
627
|
+
padding: var(--fd-space-md) var(--fd-space-sm);
|
|
628
|
+
color: var(--fd-muted-foreground);
|
|
629
|
+
}
|
|
630
|
+
|
|
631
|
+
.fd-runs__error {
|
|
632
|
+
margin: var(--fd-space-xs) var(--fd-space-sm) 0;
|
|
633
|
+
color: var(--fd-status-failed);
|
|
634
|
+
font-size: var(--fd-text-xs);
|
|
635
|
+
}
|
|
636
|
+
|
|
637
|
+
.fd-runs__admin {
|
|
638
|
+
display: inline-flex;
|
|
639
|
+
align-items: center;
|
|
640
|
+
gap: var(--fd-space-3xs);
|
|
641
|
+
margin: var(--fd-space-xs) var(--fd-space-sm) var(--fd-space-2xs);
|
|
642
|
+
color: var(--fd-inspector-link-color);
|
|
643
|
+
font-weight: 500;
|
|
644
|
+
text-decoration: none;
|
|
645
|
+
}
|
|
646
|
+
.fd-runs__admin:hover {
|
|
647
|
+
text-decoration: underline;
|
|
648
|
+
}
|
|
649
|
+
</style>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
/**
|
|
3
|
+
* Host URL templates for the admin pages. `{workflowId}` and `{pipelineId}`
|
|
4
|
+
* are filled in. `runs` is the footer link ("Open in admin"), `run` the
|
|
5
|
+
* link on each row. A link whose template is not given is not drawn.
|
|
6
|
+
*/
|
|
7
|
+
adminLinks?: {
|
|
8
|
+
runs?: string;
|
|
9
|
+
run?: string;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
declare const RunsMenu: import("svelte").Component<Props, {}, "">;
|
|
13
|
+
type RunsMenu = ReturnType<typeof RunsMenu>;
|
|
14
|
+
export default RunsMenu;
|