@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
|
@@ -7,24 +7,41 @@
|
|
|
7
7
|
<script lang="ts">
|
|
8
8
|
import type { ContextMenuOptions } from '../editor/contextMenu.js';
|
|
9
9
|
import { onMount, tick, untrack } from 'svelte';
|
|
10
|
+
import { MediaQuery } from 'svelte/reactivity';
|
|
11
|
+
import { on } from 'svelte/events';
|
|
10
12
|
import MainLayout from './layouts/MainLayout.svelte';
|
|
11
13
|
import WorkflowEditor from './WorkflowEditor.svelte';
|
|
12
14
|
import NodeSidebar from './NodeSidebar.svelte';
|
|
15
|
+
import DockedPlayground from './playground/DockedPlayground.svelte';
|
|
13
16
|
import CanvasIconButton from './CanvasIconButton.svelte';
|
|
17
|
+
import IconButton from './primitives/IconButton.svelte';
|
|
14
18
|
import EditorStatusBar from './EditorStatusBar.svelte';
|
|
15
19
|
import MenuIcon from './icons/MenuIcon.svelte';
|
|
16
20
|
import MenuOpenIcon from './icons/MenuOpenIcon.svelte';
|
|
17
21
|
import ConfigForm from './ConfigForm.svelte';
|
|
22
|
+
import NodeInspector from './NodeInspector.svelte';
|
|
23
|
+
import WorkflowSettingsPanel from './WorkflowSettingsPanel.svelte';
|
|
18
24
|
import ConfigPanel from './ConfigPanel.svelte';
|
|
19
25
|
import WorkflowInterfaceEditor from './WorkflowInterfaceEditor.svelte';
|
|
20
26
|
import WorkflowPlaygroundSettings from './WorkflowPlaygroundSettings.svelte';
|
|
21
|
-
import {
|
|
22
|
-
followInterfaceInputEdit,
|
|
23
|
-
withPlaygroundChat,
|
|
24
|
-
withoutInterfaceTurns
|
|
25
|
-
} from '../utils/playgroundChat.js';
|
|
27
|
+
import { withPlaygroundChat, withoutInterfaceTurns } from '../utils/playgroundChat.js';
|
|
26
28
|
import ReadOnlyDetails from './ReadOnlyDetails.svelte';
|
|
27
29
|
import CommandConsole from './console/CommandConsole.svelte';
|
|
30
|
+
import ConsoleStrip from './console/ConsoleStrip.svelte';
|
|
31
|
+
import {
|
|
32
|
+
resolveSidebarWidths,
|
|
33
|
+
SIDEBAR_MIN_WIDTH,
|
|
34
|
+
SIDEBAR_MAX_WIDTH,
|
|
35
|
+
SIDEBAR_MAX_RATIO,
|
|
36
|
+
clampSidebarWidth
|
|
37
|
+
} from '../utils/sidebarWidths.js';
|
|
38
|
+
import {
|
|
39
|
+
resolveWorkflowSheetWidth,
|
|
40
|
+
clampSheetWidth,
|
|
41
|
+
sheetMaxWidth,
|
|
42
|
+
SHEET_MIN_WIDTH,
|
|
43
|
+
SHEET_KEY_STEP
|
|
44
|
+
} from '../utils/sheetWidths.js';
|
|
28
45
|
import AIChatPanel from './chat/AIChatPanel.svelte';
|
|
29
46
|
import TabbedSurface from './surfaces/TabbedSurface.svelte';
|
|
30
47
|
import type { Snippet } from 'svelte';
|
|
@@ -34,7 +51,8 @@
|
|
|
34
51
|
import NodeSwapPicker from './NodeSwapPicker.svelte';
|
|
35
52
|
import SwapMappingEditor from './SwapMappingEditor.svelte';
|
|
36
53
|
import Navbar from './Navbar.svelte';
|
|
37
|
-
import
|
|
54
|
+
import DoctorMenu from './DoctorMenu.svelte';
|
|
55
|
+
import type { NavbarAction, NavbarBranding } from '../types/navbar.js';
|
|
38
56
|
import type { NodeMetadata, Workflow, WorkflowNode, ConfigSchema } from '../types/index.js';
|
|
39
57
|
import type { InteractiveSwapState, SwapEventContext } from '../utils/nodeSwap.js';
|
|
40
58
|
import {
|
|
@@ -65,9 +83,17 @@
|
|
|
65
83
|
initializeTheme
|
|
66
84
|
} from '../stores/settingsStore.svelte.js';
|
|
67
85
|
import { logger } from '../utils/logger.js';
|
|
86
|
+
import { themeScope } from '../utils/themeScope.svelte.js';
|
|
87
|
+
import {
|
|
88
|
+
resolveInspectorSurface,
|
|
89
|
+
closeTarget,
|
|
90
|
+
openingNodeTab,
|
|
91
|
+
type NodeInspectorTab
|
|
92
|
+
} from '../utils/inspectorSurface.js';
|
|
68
93
|
import { validateWorkflowData } from '../utils/validation.js';
|
|
69
94
|
import type { SettingsCategory, SurfacePlacement } from '../types/settings.js';
|
|
70
|
-
import {
|
|
95
|
+
import type { EditorMode } from '../stores/editorModeStore.svelte.js';
|
|
96
|
+
import { defaultMessages, mergeMessages, setMessages, m } from '../messages/index.js';
|
|
71
97
|
import type { MessagesOverride } from '../messages/index.js';
|
|
72
98
|
|
|
73
99
|
/**
|
|
@@ -94,7 +120,7 @@
|
|
|
94
120
|
*/
|
|
95
121
|
configPlacement?: SurfacePlacement;
|
|
96
122
|
/**
|
|
97
|
-
* Default host for the
|
|
123
|
+
* Default host for the Command Console (the AI Assistant is a tab beside Nodes in the left slot). Seeds the user setting
|
|
98
124
|
* on first load — a value the user later changes wins.
|
|
99
125
|
* @default 'below'
|
|
100
126
|
*/
|
|
@@ -122,6 +148,27 @@
|
|
|
122
148
|
* @default 'edit'
|
|
123
149
|
*/
|
|
124
150
|
mode?: 'edit' | 'readonly' | 'locked';
|
|
151
|
+
/**
|
|
152
|
+
* Start in, or switch to, Test mode: the Playground docked beside the
|
|
153
|
+
* canvas, which keeps the rest of the width (a node opens its inspector as a
|
|
154
|
+
* sheet over it). A second axis beside `mode`: it
|
|
155
|
+
* only takes effect on an editable canvas (`mode: 'edit'`) with a saved
|
|
156
|
+
* workflow and no `pipelineId`, and `features.testMode` not off.
|
|
157
|
+
*
|
|
158
|
+
* Seeds `instance.editorMode`, the per-instance store that is the source
|
|
159
|
+
* of truth afterwards (the canvas toolbar's Edit | Test switch writes it, and so
|
|
160
|
+
* can a host: `instance.editorMode.set('test')`). A later change of this
|
|
161
|
+
* prop sets the store again.
|
|
162
|
+
*
|
|
163
|
+
* @default 'edit'
|
|
164
|
+
*/
|
|
165
|
+
editorMode?: EditorMode;
|
|
166
|
+
/**
|
|
167
|
+
* Called when the Edit | Test mode changes after mount (the canvas toolbar switch,
|
|
168
|
+
* the T shortcut, the run pill's "Open", `instance.editorMode.set`). Not called for the
|
|
169
|
+
* initial value. A host uses it to keep its URL in step.
|
|
170
|
+
*/
|
|
171
|
+
onEditorModeChange?: (mode: EditorMode) => void;
|
|
125
172
|
/** Pipeline ID for fetching node execution info */
|
|
126
173
|
pipelineId?: string;
|
|
127
174
|
/** Increments to force a refresh of pipeline node status from the server */
|
|
@@ -130,6 +177,8 @@
|
|
|
130
177
|
navbarTitle?: string;
|
|
131
178
|
/** Custom navbar actions */
|
|
132
179
|
navbarActions?: NavbarAction[];
|
|
180
|
+
/** White-label logo for the navbar (replaces the FlowDrop wordmark) */
|
|
181
|
+
branding?: NavbarBranding;
|
|
133
182
|
/** Show settings gear icon in navbar */
|
|
134
183
|
showSettings?: boolean;
|
|
135
184
|
/** Show the "Connected" status indicator in the navbar (default: true) */
|
|
@@ -209,10 +258,13 @@
|
|
|
209
258
|
configPlacement: configPlacementProp,
|
|
210
259
|
consolePlacement: consolePlacementProp,
|
|
211
260
|
mode = 'edit',
|
|
261
|
+
editorMode: editorModeProp,
|
|
262
|
+
onEditorModeChange,
|
|
212
263
|
pipelineId,
|
|
213
264
|
refreshTrigger = 0,
|
|
214
265
|
navbarTitle,
|
|
215
266
|
navbarActions = [],
|
|
267
|
+
branding,
|
|
216
268
|
showSettings = true,
|
|
217
269
|
showStatus = true,
|
|
218
270
|
apiBaseUrl,
|
|
@@ -248,11 +300,127 @@
|
|
|
248
300
|
// svelte-ignore state_referenced_locally
|
|
249
301
|
const features = mergeFeatures(propFeatures);
|
|
250
302
|
|
|
303
|
+
// Test mode: the `editorMode` prop seeds the instance's store (the source of
|
|
304
|
+
// truth from then on); a later change of the prop sets it again. Setting the
|
|
305
|
+
// value it already holds changes nothing, so the first run is harmless.
|
|
306
|
+
// svelte-ignore state_referenced_locally
|
|
307
|
+
if (editorModeProp) fd.editorMode.set(editorModeProp);
|
|
308
|
+
$effect.pre(() => {
|
|
309
|
+
const requested = editorModeProp;
|
|
310
|
+
if (requested) untrack(() => fd.editorMode.set(requested));
|
|
311
|
+
});
|
|
312
|
+
|
|
313
|
+
// Tell the host when the mode moves. The listener is added after the seed,
|
|
314
|
+
// so the value the editor started with is never reported; the callback is
|
|
315
|
+
// read when it fires, so a changed callback prop is the one used.
|
|
316
|
+
onMount(() => fd.editorMode.onChange((mode) => onEditorModeChange?.(mode)));
|
|
317
|
+
|
|
251
318
|
// `mode` is the public API; internally the canvas only cares whether editing
|
|
252
319
|
// is disabled. 'readonly' and 'locked' both disable the same interactions
|
|
253
320
|
// (see the `mode` prop JSDoc for the full matrix).
|
|
254
321
|
const canvasEditable = $derived(mode === 'edit');
|
|
255
322
|
|
|
323
|
+
/**
|
|
324
|
+
* Test mode can be entered: it is offered, the canvas is editable, this is
|
|
325
|
+
* not a pipeline view, and the workflow is saved (the Playground runs the
|
|
326
|
+
* saved workflow's id).
|
|
327
|
+
*/
|
|
328
|
+
const testModeAvailable = $derived(
|
|
329
|
+
features.testMode && canvasEditable && !pipelineId && !!fd.workflow.current?.id
|
|
330
|
+
);
|
|
331
|
+
/** Test mode is in effect: requested, and available. */
|
|
332
|
+
const testMode = $derived(testModeAvailable && fd.editorMode.isTest);
|
|
333
|
+
const effectiveEditorMode = $derived<EditorMode>(testMode ? 'test' : 'edit');
|
|
334
|
+
|
|
335
|
+
/** Narrow screens: the Playground is a drawer over the canvas, not a column. */
|
|
336
|
+
const narrowQuery = new MediaQuery('(max-width: 1199px)');
|
|
337
|
+
const narrow = $derived(narrowQuery.current);
|
|
338
|
+
/** Entering Test mode opens the Playground drawer; the person can still close it. */
|
|
339
|
+
let drawerOpen = $derived(testMode);
|
|
340
|
+
|
|
341
|
+
/** The node library popover of Test mode (N). */
|
|
342
|
+
let libraryOpen = $state(false);
|
|
343
|
+
let libraryEl = $state<HTMLElement | null>(null);
|
|
344
|
+
$effect(() => {
|
|
345
|
+
if (!testMode) libraryOpen = false;
|
|
346
|
+
});
|
|
347
|
+
$effect(() => {
|
|
348
|
+
if (!libraryOpen) return;
|
|
349
|
+
const closeOnOutside = (event: PointerEvent) => {
|
|
350
|
+
if (libraryEl && !libraryEl.contains(event.target as Node)) libraryOpen = false;
|
|
351
|
+
};
|
|
352
|
+
return on(window, 'pointerdown', closeOnOutside, { capture: true });
|
|
353
|
+
});
|
|
354
|
+
function toggleLibrary(): void {
|
|
355
|
+
libraryOpen = !libraryOpen;
|
|
356
|
+
if (libraryOpen) {
|
|
357
|
+
void tick().then(() =>
|
|
358
|
+
libraryEl?.querySelector<HTMLInputElement>('.flowdrop-sidebar__search input')?.focus()
|
|
359
|
+
);
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
// Badges follow a run while it is watched, and this effect is the one owner
|
|
364
|
+
// of loading them (through the coalesced fd.runs.requestNodeStatuses): in
|
|
365
|
+
// Test mode always (the shown run, live or finished), in Edit mode while a
|
|
366
|
+
// run exists (live, or ended and still on the run bar, whose fade drops it).
|
|
367
|
+
// They are dropped when neither holds, so Edit mode at rest has none.
|
|
368
|
+
const followRun = $derived(
|
|
369
|
+
!pipelineId && (testMode || fd.runs.activeRun !== null || fd.runs.isLive)
|
|
370
|
+
);
|
|
371
|
+
const EDIT_STATUS_REFRESH_MS = 1500;
|
|
372
|
+
/**
|
|
373
|
+
* Changes whenever the shown run's node statuses may have moved; null when no
|
|
374
|
+
* run is followed. Built from the shown run, its status (a host run changes
|
|
375
|
+
* nothing else) and every batch of new messages.
|
|
376
|
+
*/
|
|
377
|
+
const runStatusKey = $derived(
|
|
378
|
+
followRun
|
|
379
|
+
? [
|
|
380
|
+
fd.playground.activeExecutionId,
|
|
381
|
+
fd.playground.sessionStatus,
|
|
382
|
+
fd.playground.pipelineRefreshTrigger,
|
|
383
|
+
fd.runs.activeRun?.runId,
|
|
384
|
+
fd.runs.activeRun?.status
|
|
385
|
+
].join('|')
|
|
386
|
+
: null
|
|
387
|
+
);
|
|
388
|
+
$effect(() => {
|
|
389
|
+
if (runStatusKey === null) return;
|
|
390
|
+
untrack(() => fd.runs.requestNodeStatuses());
|
|
391
|
+
});
|
|
392
|
+
// Edit mode has no Playground poll to ride on (and a host run has none at
|
|
393
|
+
// all), so while a run is live the badges are also asked for on a timer.
|
|
394
|
+
$effect(() => {
|
|
395
|
+
if (!followRun || testMode || !fd.runs.isLive) return;
|
|
396
|
+
const timer = setInterval(() => fd.runs.requestNodeStatuses(), EDIT_STATUS_REFRESH_MS);
|
|
397
|
+
return () => clearInterval(timer);
|
|
398
|
+
});
|
|
399
|
+
$effect(() => {
|
|
400
|
+
if (!followRun) return;
|
|
401
|
+
return () => fd.runs.clearNodeStatuses();
|
|
402
|
+
});
|
|
403
|
+
// `edited` marks: shown in Test mode only. The baseline is taken when a run
|
|
404
|
+
// is first seen (live or opened), before any statuses load, so edits made
|
|
405
|
+
// while its statuses are still loading count.
|
|
406
|
+
$effect(() => {
|
|
407
|
+
fd.editedNodes.setVisible(testMode);
|
|
408
|
+
});
|
|
409
|
+
$effect(() => {
|
|
410
|
+
void fd.workflow.current?.id;
|
|
411
|
+
const runId = fd.runs.activeRun?.runId ?? fd.playground.activeExecutionId ?? null;
|
|
412
|
+
untrack(() => fd.editedNodes.track(pipelineId ? null : runId));
|
|
413
|
+
});
|
|
414
|
+
// Crossing between Edit and Test drops a run that has already ended, so the
|
|
415
|
+
// bar does not come back stale. A live run keeps its state.
|
|
416
|
+
$effect(() => {
|
|
417
|
+
void testMode;
|
|
418
|
+
untrack(() => {
|
|
419
|
+
const run = fd.runs.activeRun;
|
|
420
|
+
if (run && run.endedAt !== null) fd.runs.dismissRun();
|
|
421
|
+
});
|
|
422
|
+
});
|
|
423
|
+
|
|
256
424
|
// Messages: merge consumer overrides over defaults; expose via context as a
|
|
257
425
|
// getter so consumer-side reactivity (e.g. paraglide-js locale switches)
|
|
258
426
|
// propagates into every child without a subscription. Accepts either a
|
|
@@ -275,7 +443,7 @@
|
|
|
275
443
|
{
|
|
276
444
|
label: mergedMessages.navigation.save,
|
|
277
445
|
href: '#save',
|
|
278
|
-
icon: '
|
|
446
|
+
icon: 'mdi:file-download-outline',
|
|
279
447
|
variant: 'primary' as const,
|
|
280
448
|
onclick: (e: Event) => {
|
|
281
449
|
e.preventDefault();
|
|
@@ -285,7 +453,7 @@
|
|
|
285
453
|
{
|
|
286
454
|
label: mergedMessages.navigation.export,
|
|
287
455
|
href: '#export',
|
|
288
|
-
icon: '
|
|
456
|
+
icon: 'mdi:download',
|
|
289
457
|
variant: 'outline' as const,
|
|
290
458
|
onclick: (e: Event) => {
|
|
291
459
|
e.preventDefault();
|
|
@@ -295,22 +463,12 @@
|
|
|
295
463
|
{
|
|
296
464
|
label: mergedMessages.navigation.import,
|
|
297
465
|
href: '#import',
|
|
298
|
-
icon: '
|
|
466
|
+
icon: 'mdi:upload',
|
|
299
467
|
variant: 'outline' as const,
|
|
300
468
|
onclick: (e: Event) => {
|
|
301
469
|
e.preventDefault();
|
|
302
470
|
fileInputRef?.click();
|
|
303
471
|
}
|
|
304
|
-
},
|
|
305
|
-
{
|
|
306
|
-
label: mergedMessages.navigation.workflowSettings,
|
|
307
|
-
href: '#settings',
|
|
308
|
-
icon: 'heroicons:cog-6-tooth',
|
|
309
|
-
variant: 'outline' as const,
|
|
310
|
-
onclick: (e: Event) => {
|
|
311
|
-
e.preventDefault();
|
|
312
|
-
toggleWorkflowSettings();
|
|
313
|
-
}
|
|
314
472
|
}
|
|
315
473
|
]);
|
|
316
474
|
|
|
@@ -322,7 +480,8 @@
|
|
|
322
480
|
// Skin tokens are scoped to this instance (data-fd-scope on .flowdrop-root,
|
|
323
481
|
// copied onto portalled overlays), so two editors with different skins do
|
|
324
482
|
// not overwrite each other and the host page gets no --fd-* variables.
|
|
325
|
-
// See themes/scopedSkinCss.ts. data-theme
|
|
483
|
+
// See themes/scopedSkinCss.ts. The colour scheme is `data-theme` on this scope element (use:themeScope),
|
|
484
|
+
// not on <html>.
|
|
326
485
|
// One cleaned value for the attribute, the skin rule and fd.skinScope.
|
|
327
486
|
const rawScopeId = $props.id();
|
|
328
487
|
const scopeId = toScopeId(rawScopeId);
|
|
@@ -338,7 +497,11 @@
|
|
|
338
497
|
|
|
339
498
|
$effect(() => {
|
|
340
499
|
if (typeof document === 'undefined') return;
|
|
341
|
-
|
|
500
|
+
// The user's Compact Mode hides node descriptions in every theme.
|
|
501
|
+
const display = getUiSettings().compactMode
|
|
502
|
+
? { ...themeConfig?.display, nodeDetails: 'compact' as const }
|
|
503
|
+
: themeConfig?.display;
|
|
504
|
+
const css = buildScopedSkinCss(scopeId, resolvedTheme.skin, display);
|
|
342
505
|
if (!css) return;
|
|
343
506
|
|
|
344
507
|
const style = document.createElement('style');
|
|
@@ -403,6 +566,23 @@
|
|
|
403
566
|
// focuses it wherever it lives (sidebar/modal/below).
|
|
404
567
|
let activeSurface = $state<string>(getUiSettings().bottomPanelTab);
|
|
405
568
|
|
|
569
|
+
// Entering Test mode, or loading into it with `?mode=test`, starts with no
|
|
570
|
+
// inspector: the canvas has the room, and a node opens its sheet. Whatever
|
|
571
|
+
// surface was last focused (the persisted Console tab, say) is reset to the
|
|
572
|
+
// config, and Edit mode's workflow tabs do not carry over. Later picks of
|
|
573
|
+
// the Console stick.
|
|
574
|
+
$effect.pre(() => {
|
|
575
|
+
if (testMode)
|
|
576
|
+
untrack(() => {
|
|
577
|
+
activeSurface = 'config';
|
|
578
|
+
isWorkflowSettingsOpen = false;
|
|
579
|
+
});
|
|
580
|
+
});
|
|
581
|
+
|
|
582
|
+
// Edit mode's left slot: Nodes | Assistant. Both stay mounted, so the
|
|
583
|
+
// conversation survives tab switches and a trip through Test mode.
|
|
584
|
+
let leftTab = $state<'nodes' | 'assistant'>('nodes');
|
|
585
|
+
|
|
406
586
|
// Node swap state
|
|
407
587
|
let swapMode = $state<'idle' | 'picking' | 'mapping'>('idle');
|
|
408
588
|
let swapInteractiveState = $state<InteractiveSwapState | null>(null);
|
|
@@ -449,13 +629,11 @@
|
|
|
449
629
|
name: {
|
|
450
630
|
type: 'string',
|
|
451
631
|
title: 'Workflow Name',
|
|
452
|
-
description: 'The name of the workflow',
|
|
453
632
|
default: ''
|
|
454
633
|
},
|
|
455
634
|
description: {
|
|
456
635
|
type: 'string',
|
|
457
636
|
title: 'Description',
|
|
458
|
-
description: 'A description of the workflow',
|
|
459
637
|
format: 'multiline',
|
|
460
638
|
default: ''
|
|
461
639
|
},
|
|
@@ -652,12 +830,29 @@
|
|
|
652
830
|
}
|
|
653
831
|
selectedNodeId = node.id;
|
|
654
832
|
isConfigSidebarOpen = true;
|
|
833
|
+
isWorkflowSettingsOpen = false;
|
|
655
834
|
activeSurface = 'config';
|
|
656
835
|
// Reset swap state when switching nodes
|
|
657
836
|
swapMode = 'idle';
|
|
658
837
|
swapInteractiveState = null;
|
|
659
838
|
}
|
|
660
839
|
|
|
840
|
+
/**
|
|
841
|
+
* Test mode: a node was clicked (or double-clicked). Its sheet opens on Last
|
|
842
|
+
* run, or, if another node's sheet is open, switches to this node. Unlike
|
|
843
|
+
* `openConfigSidebar` it never toggles, so the double-click that follows a
|
|
844
|
+
* click does not close what the click opened.
|
|
845
|
+
*/
|
|
846
|
+
function showNodeSheet(node: Pick<WorkflowNode, 'id'>): void {
|
|
847
|
+
if (isConfigSidebarOpen && selectedNodeId === node.id) return;
|
|
848
|
+
selectedNodeId = node.id;
|
|
849
|
+
isConfigSidebarOpen = true;
|
|
850
|
+
isWorkflowSettingsOpen = false;
|
|
851
|
+
activeSurface = 'config';
|
|
852
|
+
swapMode = 'idle';
|
|
853
|
+
swapInteractiveState = null;
|
|
854
|
+
}
|
|
855
|
+
|
|
661
856
|
function closeConfigSidebar(): void {
|
|
662
857
|
isConfigSidebarOpen = false;
|
|
663
858
|
selectedNodeId = null;
|
|
@@ -666,6 +861,71 @@
|
|
|
666
861
|
swapInteractiveState = null;
|
|
667
862
|
}
|
|
668
863
|
|
|
864
|
+
// Which tab the open node shows. Picked when the node opens (Last run in Test
|
|
865
|
+
// mode, else Config) and kept until another node opens, so a node that starts
|
|
866
|
+
// running under the cursor does not change the tab by itself: the only
|
|
867
|
+
// dependency is the selected node, the mode is read untracked. The person's pick is a plain assignment. Edit
|
|
868
|
+
// mode always resolves to Config (`NodeInspector`).
|
|
869
|
+
let nodeInspectorTab = $derived<NodeInspectorTab>(
|
|
870
|
+
selectedNodeId ? untrack(() => openingNodeTab(effectiveEditorMode)) : 'config'
|
|
871
|
+
);
|
|
872
|
+
|
|
873
|
+
// Messages and canvas nodes light each other up through fd.highlight; the
|
|
874
|
+
// open node is the "selected" one.
|
|
875
|
+
$effect(() => {
|
|
876
|
+
fd.highlight.setSelected(selectedNodeForConfig?.id ?? null);
|
|
877
|
+
return () => fd.highlight.setSelected(null);
|
|
878
|
+
});
|
|
879
|
+
|
|
880
|
+
/**
|
|
881
|
+
* A message's node link was clicked: select the node, open its Last run and
|
|
882
|
+
* bring it into view. Only on request (this is the one place the view moves
|
|
883
|
+
* for a run). False when this is not Test mode or the node is gone.
|
|
884
|
+
*/
|
|
885
|
+
function revealNodeLastRun(nodeId: string): boolean {
|
|
886
|
+
const node = fd.workflow.current?.nodes.find((n) => n.id === nodeId);
|
|
887
|
+
if (!testMode || !node) return false;
|
|
888
|
+
// Select first: assigning the node afterwards would recompute the tab.
|
|
889
|
+
selectedNodeId = nodeId;
|
|
890
|
+
nodeInspectorTab = 'lastRun';
|
|
891
|
+
isConfigSidebarOpen = true;
|
|
892
|
+
isWorkflowSettingsOpen = false;
|
|
893
|
+
activeSurface = 'config';
|
|
894
|
+
swapMode = 'idle';
|
|
895
|
+
swapInteractiveState = null;
|
|
896
|
+
workflowEditorRef?.canvasFocusNode(nodeId);
|
|
897
|
+
return true;
|
|
898
|
+
}
|
|
899
|
+
$effect(() => fd.highlight.setRevealHandler(revealNodeLastRun));
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* A problem's node name was clicked: select the node (its inspector opens)
|
|
903
|
+
* and bring it into view. Unlike a toggle, repeating it keeps it open.
|
|
904
|
+
*/
|
|
905
|
+
function focusProblemNode(nodeId: string): boolean {
|
|
906
|
+
const node = fd.workflow.current?.nodes.find((n) => n.id === nodeId);
|
|
907
|
+
if (!node) return false;
|
|
908
|
+
selectedNodeId = nodeId;
|
|
909
|
+
isConfigSidebarOpen = true;
|
|
910
|
+
isWorkflowSettingsOpen = false;
|
|
911
|
+
activeSurface = 'config';
|
|
912
|
+
swapMode = 'idle';
|
|
913
|
+
swapInteractiveState = null;
|
|
914
|
+
workflowEditorRef?.canvasFocusNode(nodeId);
|
|
915
|
+
return true;
|
|
916
|
+
}
|
|
917
|
+
$effect(() => fd.doctor.setFocusHandler(focusProblemNode));
|
|
918
|
+
|
|
919
|
+
// The Doctor diagnoses the draft a moment after each edit, and on load (and
|
|
920
|
+
// once the workflow has an id). Reading the version and the id is the trigger.
|
|
921
|
+
$effect(() => {
|
|
922
|
+
void fd.workflow.editVersion;
|
|
923
|
+
void fd.workflow.id;
|
|
924
|
+
// The endpoints are configured after mount; their arrival is a trigger too.
|
|
925
|
+
void endpointConfig;
|
|
926
|
+
untrack(() => fd.doctor.schedule());
|
|
927
|
+
});
|
|
928
|
+
|
|
669
929
|
/**
|
|
670
930
|
* Toggle workflow settings sidebar
|
|
671
931
|
*/
|
|
@@ -678,6 +938,19 @@
|
|
|
678
938
|
}
|
|
679
939
|
}
|
|
680
940
|
|
|
941
|
+
/**
|
|
942
|
+
* Show the workflow's Playground settings: the workflow tabs with the
|
|
943
|
+
* Playground tab selected, as the workflow-settings surface (in Test mode,
|
|
944
|
+
* the inspector sheet). The docked Playground links here.
|
|
945
|
+
*/
|
|
946
|
+
function openPlaygroundSettings(): void {
|
|
947
|
+
if (fd.workflow.current?.playground === undefined) return;
|
|
948
|
+
workflowSettingsTab = 'playground';
|
|
949
|
+
closeConfigSidebar();
|
|
950
|
+
isWorkflowSettingsOpen = true;
|
|
951
|
+
activeSurface = 'config';
|
|
952
|
+
}
|
|
953
|
+
|
|
681
954
|
/**
|
|
682
955
|
* Start swap mode — transitions the right sidebar to the node picker
|
|
683
956
|
*/
|
|
@@ -686,6 +959,14 @@
|
|
|
686
959
|
swapInteractiveState = null;
|
|
687
960
|
}
|
|
688
961
|
|
|
962
|
+
/** Swap from the canvas context menu: open the node's panel in the picker. */
|
|
963
|
+
function swapFromCanvas(nodeId: string): void {
|
|
964
|
+
selectedNodeId = nodeId;
|
|
965
|
+
isConfigSidebarOpen = true;
|
|
966
|
+
activeSurface = 'config';
|
|
967
|
+
startSwap();
|
|
968
|
+
}
|
|
969
|
+
|
|
689
970
|
/**
|
|
690
971
|
* Handle selection of a target node type for swap
|
|
691
972
|
*/
|
|
@@ -838,11 +1119,11 @@
|
|
|
838
1119
|
}
|
|
839
1120
|
});
|
|
840
1121
|
|
|
841
|
-
async function saveWorkflow(): Promise<
|
|
1122
|
+
async function saveWorkflow(): Promise<boolean> {
|
|
842
1123
|
// Commit any in-flight config edit so the save and its history are
|
|
843
1124
|
// consistent (the value itself is already live in the store).
|
|
844
1125
|
flushNodeConfigEdit();
|
|
845
|
-
|
|
1126
|
+
return globalSaveWorkflow({
|
|
846
1127
|
eventHandlers: { onBeforeSave, onAfterSave, onSaveError, onApiError },
|
|
847
1128
|
features,
|
|
848
1129
|
instance: fd,
|
|
@@ -924,7 +1205,15 @@
|
|
|
924
1205
|
function handleCanvasClick(event: MouseEvent): void {
|
|
925
1206
|
// Check if the click is outside the right sidebar
|
|
926
1207
|
const rightSidebar = document.querySelector('.flowdrop-main-layout__sidebar--right');
|
|
927
|
-
|
|
1208
|
+
// Test mode's inspector sheet sits inside the canvas region: a click in it is not a pane click.
|
|
1209
|
+
if ((event.target as Element).closest?.('.inspector-sheet')) return;
|
|
1210
|
+
// In Test mode only a click on empty canvas closes the sheet (not a node, not a control).
|
|
1211
|
+
const target = event.target as Element;
|
|
1212
|
+
if (
|
|
1213
|
+
testMode
|
|
1214
|
+
? !!target.closest?.('.svelte-flow__pane') && !target.closest('.svelte-flow__node')
|
|
1215
|
+
: rightSidebar && !rightSidebar.contains(event.target as Node)
|
|
1216
|
+
) {
|
|
928
1217
|
// Close sidebar when clicking outside of it
|
|
929
1218
|
if (isConfigSidebarOpen) {
|
|
930
1219
|
closeConfigSidebar();
|
|
@@ -1021,26 +1310,109 @@
|
|
|
1021
1310
|
// Surface placement — where the config panel and console/chat are hosted.
|
|
1022
1311
|
// =========================================================================
|
|
1023
1312
|
|
|
1024
|
-
|
|
1025
|
-
|
|
1313
|
+
// Test mode shows the inspector as a sheet over the canvas, whatever
|
|
1314
|
+
// placement the person chose for Edit mode: no column, so the canvas keeps
|
|
1315
|
+
// the width. Workflow settings are a sheet in both modes: the person's
|
|
1316
|
+
// placement is for node settings.
|
|
1317
|
+
const configPlacement = $derived<SurfacePlacement | 'sheet'>(
|
|
1318
|
+
testMode || (!selectedNodeForConfig && isWorkflowSettingsOpen)
|
|
1319
|
+
? 'sheet'
|
|
1320
|
+
: getUiSettings().configPlacement
|
|
1321
|
+
);
|
|
1322
|
+
|
|
1323
|
+
/** The canvas region's width, for clamping the workflow sheet. */
|
|
1324
|
+
let regionWidth = $state(0);
|
|
1325
|
+
/** The canvas region, to measure how much of it a sheet covers. */
|
|
1326
|
+
let editorMainEl = $state<HTMLElement | null>(null);
|
|
1327
|
+
/** Width while the workflow sheet's left edge is being dragged; `null` otherwise. */
|
|
1328
|
+
let liveSheetWidth = $state<number | null>(null);
|
|
1329
|
+
const workflowSheetWidth = $derived(
|
|
1330
|
+
liveSheetWidth ?? resolveWorkflowSheetWidth(getUiSettings(), regionWidth)
|
|
1331
|
+
);
|
|
1332
|
+
const workflowSheetMax = $derived(sheetMaxWidth(regionWidth));
|
|
1333
|
+
let sheetDrag: { startX: number; startWidth: number } | null = null;
|
|
1334
|
+
|
|
1335
|
+
function saveWorkflowSheetWidth(width: number): void {
|
|
1336
|
+
updateSettings({ ui: { sheetWidths: { workflow: clampSheetWidth(width, regionWidth) } } });
|
|
1337
|
+
}
|
|
1338
|
+
function onSheetResizeDown(event: PointerEvent): void {
|
|
1339
|
+
if (event.button !== 0) return;
|
|
1340
|
+
sheetDrag = { startX: event.clientX, startWidth: workflowSheetWidth };
|
|
1341
|
+
(event.currentTarget as HTMLElement).setPointerCapture(event.pointerId);
|
|
1342
|
+
event.preventDefault();
|
|
1343
|
+
}
|
|
1344
|
+
function onSheetResizeMove(event: PointerEvent): void {
|
|
1345
|
+
if (!sheetDrag) return;
|
|
1346
|
+
// The handle is on the left edge: dragging left makes the sheet wider.
|
|
1347
|
+
liveSheetWidth = clampSheetWidth(
|
|
1348
|
+
sheetDrag.startWidth + (sheetDrag.startX - event.clientX),
|
|
1349
|
+
regionWidth
|
|
1350
|
+
);
|
|
1351
|
+
}
|
|
1352
|
+
function onSheetResizeUp(): void {
|
|
1353
|
+
if (!sheetDrag) return;
|
|
1354
|
+
sheetDrag = null;
|
|
1355
|
+
if (liveSheetWidth !== null) saveWorkflowSheetWidth(liveSheetWidth);
|
|
1356
|
+
liveSheetWidth = null;
|
|
1357
|
+
}
|
|
1358
|
+
function onSheetResizeKey(event: KeyboardEvent): void {
|
|
1359
|
+
const step = event.shiftKey ? SHEET_KEY_STEP * 3 : SHEET_KEY_STEP;
|
|
1360
|
+
let next: number | null = null;
|
|
1361
|
+
// Arrow left moves the left edge left, so the sheet grows.
|
|
1362
|
+
if (event.key === 'ArrowLeft') next = workflowSheetWidth + step;
|
|
1363
|
+
else if (event.key === 'ArrowRight') next = workflowSheetWidth - step;
|
|
1364
|
+
else if (event.key === 'Home') next = SHEET_MIN_WIDTH;
|
|
1365
|
+
else if (event.key === 'End') next = workflowSheetMax;
|
|
1366
|
+
if (next === null) return;
|
|
1367
|
+
event.preventDefault();
|
|
1368
|
+
event.stopPropagation();
|
|
1369
|
+
saveWorkflowSheetWidth(next);
|
|
1370
|
+
}
|
|
1371
|
+
|
|
1372
|
+
/** How much of the canvas's right side an open sheet covers, for fit view. */
|
|
1373
|
+
function fitInset(): number {
|
|
1374
|
+
const sheet = editorMainEl?.querySelector('.inspector-sheet');
|
|
1375
|
+
if (!editorMainEl || !sheet) return 0;
|
|
1376
|
+
return Math.max(
|
|
1377
|
+
0,
|
|
1378
|
+
editorMainEl.getBoundingClientRect().right - sheet.getBoundingClientRect().left
|
|
1379
|
+
);
|
|
1380
|
+
}
|
|
1381
|
+
// Test mode has no right column, so a Console placed in the sidebar uses the
|
|
1382
|
+
// bottom panel there; Edit mode keeps the person's placement.
|
|
1383
|
+
const consolePlacement = $derived<SurfacePlacement>(
|
|
1384
|
+
testMode && getUiSettings().consolePlacement === 'sidebar'
|
|
1385
|
+
? 'below'
|
|
1386
|
+
: getUiSettings().consolePlacement
|
|
1387
|
+
);
|
|
1026
1388
|
|
|
1027
1389
|
/** Config surface has something to show (node config or workflow settings). */
|
|
1028
1390
|
const configActive = $derived(isWorkflowSettingsOpen || !!selectedNodeForConfig);
|
|
1029
1391
|
/** The Command Console tab is offered by this mount. */
|
|
1030
1392
|
const consoleTabOffered = features.console;
|
|
1031
|
-
/** The AI Assistant
|
|
1393
|
+
/** The AI Assistant is offered: switched on, and a chat backend exists. */
|
|
1032
1394
|
const chatTabOffered = $derived(
|
|
1033
1395
|
features.assistant && endpointConfig?.endpoints?.chat !== undefined
|
|
1034
1396
|
);
|
|
1035
|
-
/**
|
|
1036
|
-
|
|
1037
|
-
|
|
1397
|
+
/**
|
|
1398
|
+
* The Assistant lives in the left slot, as a tab beside Nodes (Edit mode).
|
|
1399
|
+
* A host that disabled the sidebar has no left slot, so the Assistant keeps
|
|
1400
|
+
* its old place in the console group for it (until 3.0). Test mode has no
|
|
1401
|
+
* Assistant at all: it is the Edit-mode helper.
|
|
1402
|
+
*/
|
|
1403
|
+
const chatInConsoleGroup = $derived(chatTabOffered && disableSidebar && !testMode);
|
|
1404
|
+
/** The Assistant is a tab beside Nodes in the left slot. */
|
|
1405
|
+
const chatInLeftSlot = $derived(chatTabOffered && !chatInConsoleGroup);
|
|
1406
|
+
/** At least one surface of the console group is offered. */
|
|
1407
|
+
const consoleGroupOffered = $derived(consoleTabOffered || chatInConsoleGroup);
|
|
1408
|
+
/** Console group is available (offered, editable canvas, console toggled open). */
|
|
1038
1409
|
const consoleActive = $derived(
|
|
1039
1410
|
consoleGroupOffered && getUiSettings().consoleOpen && canvasEditable
|
|
1040
1411
|
);
|
|
1041
1412
|
|
|
1042
1413
|
/**
|
|
1043
|
-
* The console-group tabs this mount offers, for whichever host renders them
|
|
1414
|
+
* The console-group tabs this mount offers, for whichever host renders them:
|
|
1415
|
+
* the Console, plus the Assistant only where there is no left slot for it.
|
|
1044
1416
|
* Snippets are passed in because they are declared in the template.
|
|
1045
1417
|
*/
|
|
1046
1418
|
function consoleGroupTabs(consoleBody: Snippet, chatBody: Snippet): SurfaceTab[] {
|
|
@@ -1055,11 +1427,15 @@
|
|
|
1055
1427
|
}
|
|
1056
1428
|
]
|
|
1057
1429
|
: []),
|
|
1058
|
-
...(
|
|
1430
|
+
...(chatInConsoleGroup
|
|
1059
1431
|
? [{ id: 'chat', label: mergedMessages.navigation.bottomPanel.chat, content: chatBody }]
|
|
1060
1432
|
: [])
|
|
1061
1433
|
];
|
|
1062
1434
|
}
|
|
1435
|
+
/** The Console's toggle strip is drawn: a console group is offered and the canvas is editable. */
|
|
1436
|
+
const consoleStripShown = $derived(consoleGroupOffered && canvasEditable);
|
|
1437
|
+
/** Id of the Console panel, for the strip's `aria-controls`. */
|
|
1438
|
+
const consolePanelId = `${scopeId}-console-panel`;
|
|
1063
1439
|
/** Node-swap sub-flow occupies the right sidebar regardless of placement. */
|
|
1064
1440
|
const swapActive = $derived(swapMode !== 'idle');
|
|
1065
1441
|
|
|
@@ -1073,8 +1449,17 @@
|
|
|
1073
1449
|
* Metadata for the active config surface, independent of its host. The form
|
|
1074
1450
|
* itself is rendered by the host via the `configBody` snippet.
|
|
1075
1451
|
*/
|
|
1452
|
+
const inspectorSurface = $derived(
|
|
1453
|
+
resolveInspectorSurface({
|
|
1454
|
+
hasNode: !!selectedNodeForConfig,
|
|
1455
|
+
workflowOpen: isWorkflowSettingsOpen
|
|
1456
|
+
})
|
|
1457
|
+
);
|
|
1458
|
+
/** The inspector can be closed. */
|
|
1459
|
+
const configClosable = $derived(closeTarget(inspectorSurface) !== null);
|
|
1460
|
+
|
|
1076
1461
|
const activeConfig = $derived.by(() => {
|
|
1077
|
-
if (
|
|
1462
|
+
if (inspectorSurface === 'workflow') {
|
|
1078
1463
|
return {
|
|
1079
1464
|
kind: 'workflow' as const,
|
|
1080
1465
|
title: mergedMessages.navigation.workflowSettingsPanelTitle,
|
|
@@ -1087,18 +1472,21 @@
|
|
|
1087
1472
|
configTitle: mergedMessages.navigation.workflowSettingsPanelSubtitle
|
|
1088
1473
|
};
|
|
1089
1474
|
}
|
|
1090
|
-
const node = selectedNodeForConfig;
|
|
1475
|
+
const node = inspectorSurface === 'node' ? selectedNodeForConfig : null;
|
|
1091
1476
|
if (node) {
|
|
1092
1477
|
return {
|
|
1093
1478
|
kind: 'node' as const,
|
|
1094
1479
|
node,
|
|
1095
1480
|
title: node.data.label,
|
|
1096
1481
|
id: node.id,
|
|
1097
|
-
description:
|
|
1098
|
-
|
|
1482
|
+
// No filler when the node type has no description: the meta line says enough.
|
|
1483
|
+
description: node.data.metadata?.description ?? '',
|
|
1099
1484
|
details: [
|
|
1100
1485
|
{ label: 'Type', value: node.data.metadata?.type || node.type },
|
|
1101
|
-
{
|
|
1486
|
+
{
|
|
1487
|
+
label: 'Category',
|
|
1488
|
+
value: fd.categories.getLabel(node.data.metadata?.category || 'general')
|
|
1489
|
+
}
|
|
1102
1490
|
],
|
|
1103
1491
|
configTitle: undefined as string | undefined
|
|
1104
1492
|
};
|
|
@@ -1108,10 +1496,13 @@
|
|
|
1108
1496
|
|
|
1109
1497
|
/** Close whichever config surface is currently open. */
|
|
1110
1498
|
function closeActiveConfig(): void {
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1499
|
+
// A node closes first; the inspector then falls back to the workflow tabs
|
|
1500
|
+
// if they are open. Closing the workflow tabs closes the surface.
|
|
1501
|
+
const target = closeTarget(inspectorSurface);
|
|
1502
|
+
if (target === 'node') {
|
|
1114
1503
|
closeConfigSidebar();
|
|
1504
|
+
} else if (target === 'workflow') {
|
|
1505
|
+
isWorkflowSettingsOpen = false;
|
|
1115
1506
|
}
|
|
1116
1507
|
}
|
|
1117
1508
|
|
|
@@ -1124,17 +1515,49 @@
|
|
|
1124
1515
|
}
|
|
1125
1516
|
|
|
1126
1517
|
const showRightPanel = $derived(
|
|
1127
|
-
!disableSidebar && (swapActive || configHere('sidebar') || consoleHere('sidebar'))
|
|
1518
|
+
(!disableSidebar || testMode) && (swapActive || configHere('sidebar') || consoleHere('sidebar'))
|
|
1128
1519
|
);
|
|
1129
1520
|
|
|
1521
|
+
/** Test mode's docked Playground column; resizable, and a drawer when narrow. */
|
|
1522
|
+
const TEST_DOCK_WIDTH = 360;
|
|
1523
|
+
const dockedInColumn = $derived(testMode && !narrow);
|
|
1524
|
+
|
|
1525
|
+
/** Edit mode's left column keeps a width per tab (Nodes | Assistant). */
|
|
1526
|
+
const sidebarWidths = $derived(resolveSidebarWidths(getUiSettings()));
|
|
1527
|
+
|
|
1130
1528
|
/**
|
|
1131
1529
|
* Calculate left sidebar width based on collapsed state
|
|
1132
|
-
* When collapsed, use 0; otherwise use user-configured width
|
|
1530
|
+
* When collapsed, use 0; otherwise use user-configured width.
|
|
1531
|
+
* In Test mode the left slot holds the Playground: its own width, never collapsed.
|
|
1133
1532
|
*/
|
|
1134
1533
|
const leftSidebarWidth = $derived(
|
|
1135
|
-
|
|
1534
|
+
testMode
|
|
1535
|
+
? dockedInColumn
|
|
1536
|
+
? TEST_DOCK_WIDTH
|
|
1537
|
+
: 0
|
|
1538
|
+
: getUiSettings().sidebarCollapsed
|
|
1539
|
+
? 0
|
|
1540
|
+
: sidebarWidths[leftTab]
|
|
1136
1541
|
);
|
|
1137
1542
|
|
|
1543
|
+
/** The left column can be resized: the Test dock, or Edit mode's column while it is open. */
|
|
1544
|
+
const leftResizable = $derived(
|
|
1545
|
+
testMode ? dockedInColumn : !disableSidebar && !getUiSettings().sidebarCollapsed
|
|
1546
|
+
);
|
|
1547
|
+
|
|
1548
|
+
/** A drag or arrow-key resize of the left column ended: remember it for the active tab. */
|
|
1549
|
+
function saveLeftWidth(width: number): void {
|
|
1550
|
+
if (testMode) return;
|
|
1551
|
+
updateSettings({
|
|
1552
|
+
ui: { sidebarWidths: { ...sidebarWidths, [leftTab]: clampSidebarWidth(width) } }
|
|
1553
|
+
});
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
/** A resize of the bottom panel ended: remember its height. */
|
|
1557
|
+
function saveConsoleHeight(height: number): void {
|
|
1558
|
+
updateSettings({ ui: { consoleHeight: Math.round(height) } });
|
|
1559
|
+
}
|
|
1560
|
+
|
|
1138
1561
|
/** Whether the sidebar is collapsed */
|
|
1139
1562
|
const isSidebarCollapsed = $derived(getUiSettings().sidebarCollapsed);
|
|
1140
1563
|
|
|
@@ -1156,14 +1579,49 @@
|
|
|
1156
1579
|
// Dead key on international keyboards — do not intercept
|
|
1157
1580
|
if (event.key === 'Dead') return;
|
|
1158
1581
|
|
|
1159
|
-
|
|
1582
|
+
// N opens the node library in Test mode, where the sidebar is the Playground.
|
|
1583
|
+
const isLibraryKey = testMode && (event.key === 'n' || event.key === 'N');
|
|
1584
|
+
// T toggles Edit | Test where Test mode is offered.
|
|
1585
|
+
const isModeKey = testModeAvailable && (event.key === 't' || event.key === 'T');
|
|
1586
|
+
// / focuses the node library's search in Edit mode.
|
|
1587
|
+
const isSearchKey = !testMode && !disableSidebar && event.key === '/';
|
|
1588
|
+
if (event.key !== '`' && !isLibraryKey && !isModeKey && !isSearchKey) return;
|
|
1589
|
+
if (
|
|
1590
|
+
(isLibraryKey || isModeKey || isSearchKey) &&
|
|
1591
|
+
(event.metaKey || event.ctrlKey || event.altKey || event.shiftKey || event.repeat)
|
|
1592
|
+
) {
|
|
1593
|
+
return;
|
|
1594
|
+
}
|
|
1160
1595
|
|
|
1161
|
-
// Don't intercept when user is typing in an input, textarea,
|
|
1596
|
+
// Don't intercept when user is typing in an input, textarea, contenteditable
|
|
1597
|
+
// or code editor (CodeMirror's content is contenteditable, the closest() is a backstop)
|
|
1162
1598
|
const target = event.target as HTMLElement;
|
|
1163
1599
|
const isInputElement =
|
|
1164
|
-
target.tagName === 'INPUT' ||
|
|
1600
|
+
target.tagName === 'INPUT' ||
|
|
1601
|
+
target.tagName === 'TEXTAREA' ||
|
|
1602
|
+
target.isContentEditable ||
|
|
1603
|
+
!!target.closest?.('.cm-editor');
|
|
1165
1604
|
|
|
1166
1605
|
if (isInputElement) return;
|
|
1606
|
+
if (isSearchKey) {
|
|
1607
|
+
event.preventDefault();
|
|
1608
|
+
if (isSidebarCollapsed) toggleSidebar();
|
|
1609
|
+
leftTab = 'nodes';
|
|
1610
|
+
void tick().then(() =>
|
|
1611
|
+
document.querySelector<HTMLInputElement>('input[data-fd-library-search]')?.focus()
|
|
1612
|
+
);
|
|
1613
|
+
return;
|
|
1614
|
+
}
|
|
1615
|
+
if (isModeKey) {
|
|
1616
|
+
event.preventDefault();
|
|
1617
|
+
fd.editorMode.set(testMode ? 'edit' : 'test');
|
|
1618
|
+
return;
|
|
1619
|
+
}
|
|
1620
|
+
if (isLibraryKey) {
|
|
1621
|
+
event.preventDefault();
|
|
1622
|
+
toggleLibrary();
|
|
1623
|
+
return;
|
|
1624
|
+
}
|
|
1167
1625
|
if (!consoleGroupOffered) return;
|
|
1168
1626
|
|
|
1169
1627
|
event.preventDefault();
|
|
@@ -1193,6 +1651,30 @@
|
|
|
1193
1651
|
}
|
|
1194
1652
|
}
|
|
1195
1653
|
|
|
1654
|
+
/** Show the Assistant: its tab beside Nodes, or the console group where there is no left slot. */
|
|
1655
|
+
function openAssistant(): void {
|
|
1656
|
+
if (chatInConsoleGroup) {
|
|
1657
|
+
activeSurface = 'chat';
|
|
1658
|
+
updateSettings({ ui: { consoleOpen: true } });
|
|
1659
|
+
return;
|
|
1660
|
+
}
|
|
1661
|
+
leftTab = 'assistant';
|
|
1662
|
+
if (getUiSettings().sidebarCollapsed) updateSettings({ ui: { sidebarCollapsed: false } });
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
/**
|
|
1666
|
+
* "Ask the Assistant about this run": the Assistant is an Edit-mode helper,
|
|
1667
|
+
* so the editor goes back to Edit mode, opens the Assistant beside Nodes and
|
|
1668
|
+
* attaches the run.
|
|
1669
|
+
*/
|
|
1670
|
+
function askAssistantAboutRun(runId: string): void {
|
|
1671
|
+
if (!chatTabOffered || !fd.attachedRun.attach(runId, { status: 'failed' })) return;
|
|
1672
|
+
fd.editorMode.set('edit');
|
|
1673
|
+
openAssistant();
|
|
1674
|
+
}
|
|
1675
|
+
/** The ask-the-Assistant actions are offered when there is an Assistant to ask. */
|
|
1676
|
+
const askAssistant = $derived(chatTabOffered ? askAssistantAboutRun : undefined);
|
|
1677
|
+
|
|
1196
1678
|
function toggleConsole(): void {
|
|
1197
1679
|
const currentOpen = getUiSettings().consoleOpen;
|
|
1198
1680
|
updateSettings({ ui: { consoleOpen: !currentOpen } });
|
|
@@ -1221,7 +1703,7 @@
|
|
|
1221
1703
|
<svelte:window onkeydown={handleGlobalKeydown} />
|
|
1222
1704
|
|
|
1223
1705
|
<svelte:head>
|
|
1224
|
-
<title>
|
|
1706
|
+
<title>{branding?.name ?? m().navigation.appName} - {m().navigation.tagline}</title>
|
|
1225
1707
|
<meta name="description" content="A modern drag-and-drop workflow editor for LLM applications" />
|
|
1226
1708
|
</svelte:head>
|
|
1227
1709
|
|
|
@@ -1269,6 +1751,40 @@
|
|
|
1269
1751
|
/>
|
|
1270
1752
|
{/snippet}
|
|
1271
1753
|
|
|
1754
|
+
<!-- Last run of a failed node: take the run to the Assistant -->
|
|
1755
|
+
{#snippet askAboutRunAction()}
|
|
1756
|
+
{@const runId = fd.playground.nodeStatusScope?.pipelineId}
|
|
1757
|
+
{#if runId}
|
|
1758
|
+
<button
|
|
1759
|
+
type="button"
|
|
1760
|
+
class="ask-about-run"
|
|
1761
|
+
data-testid="last-run-ask-assistant"
|
|
1762
|
+
onclick={() => askAssistant?.(runId)}
|
|
1763
|
+
>
|
|
1764
|
+
{mergedMessages.nodeInspector.askAssistant}
|
|
1765
|
+
</button>
|
|
1766
|
+
{/if}
|
|
1767
|
+
{/snippet}
|
|
1768
|
+
|
|
1769
|
+
{#snippet nodeInspectorEl(node: WorkflowNode)}
|
|
1770
|
+
<NodeInspector
|
|
1771
|
+
editorMode={effectiveEditorMode}
|
|
1772
|
+
tab={nodeInspectorTab}
|
|
1773
|
+
onTabChange={(tab) => (nodeInspectorTab = tab)}
|
|
1774
|
+
info={fd.playground.nodeStatusFor(node.id)}
|
|
1775
|
+
runShown={fd.playground.nodeStatusScope !== null}
|
|
1776
|
+
lastRunActions={askAssistant &&
|
|
1777
|
+
fd.playground.nodeStatusFor(node.id)?.status === 'failed' &&
|
|
1778
|
+
fd.playground.nodeStatusScope?.pipelineId
|
|
1779
|
+
? askAboutRunAction
|
|
1780
|
+
: undefined}
|
|
1781
|
+
>
|
|
1782
|
+
{#snippet config()}
|
|
1783
|
+
{@render nodeConfigFormEl(node)}
|
|
1784
|
+
{/snippet}
|
|
1785
|
+
</NodeInspector>
|
|
1786
|
+
{/snippet}
|
|
1787
|
+
|
|
1272
1788
|
{#snippet workflowConfigFormEl()}
|
|
1273
1789
|
<ConfigForm
|
|
1274
1790
|
{authProvider}
|
|
@@ -1327,20 +1843,7 @@
|
|
|
1327
1843
|
workflow={fd.workflow.current}
|
|
1328
1844
|
dataTypes={fd.portCompatibility.getEnabledDataTypes()}
|
|
1329
1845
|
checker={fd.portCompatibility}
|
|
1330
|
-
onChange={(next, edit) =>
|
|
1331
|
-
// A renamed or removed input is followed in the chat binding, in the
|
|
1332
|
-
// same update (one undo step), so the binding never names an input
|
|
1333
|
-
// the interface no longer has.
|
|
1334
|
-
const playground = fd.workflow.current?.playground;
|
|
1335
|
-
const followed = edit ? followInterfaceInputEdit(playground, edit) : playground;
|
|
1336
|
-
// Settings that no longer bind anything must not fall back to `turn`
|
|
1337
|
-
// marks left on the interface: they go in the same update.
|
|
1338
|
-
const cleared = followed !== playground && followed?.chat === null;
|
|
1339
|
-
fd.workflow.batchUpdate({
|
|
1340
|
-
interface: cleared ? withoutInterfaceTurns(next) : next,
|
|
1341
|
-
...(followed !== playground && { playground: followed })
|
|
1342
|
-
});
|
|
1343
|
-
}}
|
|
1846
|
+
onChange={(next, edit) => fd.workflow.editInterface(next, edit)}
|
|
1344
1847
|
onOpenPlaygroundSettings={fd.workflow.current.playground !== undefined
|
|
1345
1848
|
? () => (workflowSettingsTab = 'playground')
|
|
1346
1849
|
: undefined}
|
|
@@ -1372,67 +1875,22 @@
|
|
|
1372
1875
|
{/snippet}
|
|
1373
1876
|
|
|
1374
1877
|
<!--
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1878
|
+
The workflow-settings surface: General | Interface | Playground as tabs in
|
|
1879
|
+
the panel header. A tab, not a field in the settings form — see Phase 3's
|
|
1880
|
+
rationale (`ConfigForm` cannot express a bindings list).
|
|
1378
1881
|
-->
|
|
1379
|
-
{#snippet workflowSettingsTabs()}
|
|
1380
|
-
<
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
</button>
|
|
1392
|
-
<button
|
|
1393
|
-
type="button"
|
|
1394
|
-
role="tab"
|
|
1395
|
-
aria-selected={activeWorkflowSettingsTab === 'interface'}
|
|
1396
|
-
class="workflow-settings-tabs__tab"
|
|
1397
|
-
class:workflow-settings-tabs__tab--active={activeWorkflowSettingsTab === 'interface'}
|
|
1398
|
-
onclick={() => (workflowSettingsTab = 'interface')}
|
|
1399
|
-
>
|
|
1400
|
-
{mergedMessages.navigation.workflowSettingsInterfaceTab}
|
|
1401
|
-
</button>
|
|
1402
|
-
{#if fd.workflow.current?.playground !== undefined}
|
|
1403
|
-
<button
|
|
1404
|
-
type="button"
|
|
1405
|
-
role="tab"
|
|
1406
|
-
aria-selected={activeWorkflowSettingsTab === 'playground'}
|
|
1407
|
-
class="workflow-settings-tabs__tab"
|
|
1408
|
-
class:workflow-settings-tabs__tab--active={activeWorkflowSettingsTab === 'playground'}
|
|
1409
|
-
onclick={() => (workflowSettingsTab = 'playground')}
|
|
1410
|
-
>
|
|
1411
|
-
{mergedMessages.navigation.workflowSettingsPlaygroundTab}
|
|
1412
|
-
</button>
|
|
1413
|
-
{/if}
|
|
1414
|
-
</div>
|
|
1415
|
-
<div
|
|
1416
|
-
class="workflow-settings-tabs__panel"
|
|
1417
|
-
style:display={activeWorkflowSettingsTab === 'settings' ? 'block' : 'none'}
|
|
1418
|
-
>
|
|
1419
|
-
{@render workflowConfigFormEl()}
|
|
1420
|
-
</div>
|
|
1421
|
-
<div
|
|
1422
|
-
class="workflow-settings-tabs__panel"
|
|
1423
|
-
style:display={activeWorkflowSettingsTab === 'interface' ? 'block' : 'none'}
|
|
1424
|
-
>
|
|
1425
|
-
{@render workflowInterfaceEl()}
|
|
1426
|
-
</div>
|
|
1427
|
-
{#if fd.workflow.current?.playground !== undefined}
|
|
1428
|
-
<div
|
|
1429
|
-
class="workflow-settings-tabs__panel"
|
|
1430
|
-
style:display={activeWorkflowSettingsTab === 'playground' ? 'block' : 'none'}
|
|
1431
|
-
>
|
|
1432
|
-
{@render workflowPlaygroundEl()}
|
|
1433
|
-
</div>
|
|
1434
|
-
{/if}
|
|
1435
|
-
</div>
|
|
1882
|
+
{#snippet workflowSettingsTabs(onClose?: () => void)}
|
|
1883
|
+
<WorkflowSettingsPanel
|
|
1884
|
+
tab={activeWorkflowSettingsTab}
|
|
1885
|
+
onTabChange={(t) => (workflowSettingsTab = t)}
|
|
1886
|
+
workflowId={fd.workflow.current?.id}
|
|
1887
|
+
nodeCount={fd.workflow.current?.nodes?.length ?? 0}
|
|
1888
|
+
connectionCount={fd.workflow.current?.edges?.length ?? 0}
|
|
1889
|
+
{onClose}
|
|
1890
|
+
general={workflowConfigFormEl}
|
|
1891
|
+
interfaceBody={workflowInterfaceEl}
|
|
1892
|
+
playground={fd.workflow.current?.playground !== undefined ? workflowPlaygroundEl : undefined}
|
|
1893
|
+
/>
|
|
1436
1894
|
{/snippet}
|
|
1437
1895
|
|
|
1438
1896
|
<!--
|
|
@@ -1443,19 +1901,21 @@
|
|
|
1443
1901
|
{#snippet configBody(showHeader: boolean)}
|
|
1444
1902
|
{#if activeConfig}
|
|
1445
1903
|
<div class="config-surface">
|
|
1446
|
-
{#if showHeader}
|
|
1904
|
+
{#if showHeader && activeConfig.kind === 'node'}
|
|
1447
1905
|
<div class="config-surface__header">
|
|
1448
1906
|
<h2 class="config-surface__title">{activeConfig.title}</h2>
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1907
|
+
{#if configClosable}
|
|
1908
|
+
<button
|
|
1909
|
+
class="config-surface__close"
|
|
1910
|
+
onclick={closeActiveConfig}
|
|
1911
|
+
aria-label={mergedMessages.layout.closeConfigPanel}
|
|
1912
|
+
>
|
|
1913
|
+
×
|
|
1914
|
+
</button>
|
|
1915
|
+
{/if}
|
|
1456
1916
|
</div>
|
|
1457
1917
|
{/if}
|
|
1458
|
-
{#if activeConfig.id}
|
|
1918
|
+
{#if activeConfig.id && activeConfig.kind === 'node'}
|
|
1459
1919
|
<div class="config-surface__details">
|
|
1460
1920
|
<ReadOnlyDetails
|
|
1461
1921
|
id={activeConfig.id}
|
|
@@ -1464,16 +1924,21 @@
|
|
|
1464
1924
|
/>
|
|
1465
1925
|
</div>
|
|
1466
1926
|
{/if}
|
|
1467
|
-
<div
|
|
1927
|
+
<div
|
|
1928
|
+
class="config-surface__content"
|
|
1929
|
+
class:config-surface__content--bare={activeConfig.kind === 'workflow'}
|
|
1930
|
+
>
|
|
1468
1931
|
{#if activeConfig.kind === 'node'}
|
|
1469
1932
|
<div class="config-surface__section">
|
|
1470
|
-
|
|
1471
|
-
{activeConfig.configTitle
|
|
1472
|
-
|
|
1473
|
-
{@render
|
|
1933
|
+
{#if activeConfig.configTitle}
|
|
1934
|
+
<h3 class="config-surface__section-title">{activeConfig.configTitle}</h3>
|
|
1935
|
+
{/if}
|
|
1936
|
+
{@render nodeInspectorEl(activeConfig.node)}
|
|
1474
1937
|
</div>
|
|
1475
1938
|
{:else}
|
|
1476
|
-
{@render workflowSettingsTabs(
|
|
1939
|
+
{@render workflowSettingsTabs(
|
|
1940
|
+
showHeader && configClosable ? closeActiveConfig : undefined
|
|
1941
|
+
)}
|
|
1477
1942
|
{/if}
|
|
1478
1943
|
</div>
|
|
1479
1944
|
</div>
|
|
@@ -1489,7 +1954,29 @@
|
|
|
1489
1954
|
{/snippet}
|
|
1490
1955
|
|
|
1491
1956
|
{#snippet consoleSurfaceBody()}
|
|
1492
|
-
<CommandConsole nodeTypes={nodes} onUIAction={handleConsoleUIAction} />
|
|
1957
|
+
<CommandConsole nodeTypes={nodes} onUIAction={handleConsoleUIAction} id={consolePanelId} />
|
|
1958
|
+
{/snippet}
|
|
1959
|
+
|
|
1960
|
+
<!-- The Console's toggle: a slim strip on the canvas's bottom edge; the panel's header once open -->
|
|
1961
|
+
{#snippet consoleStrip()}
|
|
1962
|
+
<ConsoleStrip
|
|
1963
|
+
open={consoleActive}
|
|
1964
|
+
controls={consolePanelId}
|
|
1965
|
+
label={consoleTabOffered ? undefined : mergedMessages.navigation.bottomPanel.chat}
|
|
1966
|
+
onToggle={toggleConsole}
|
|
1967
|
+
/>
|
|
1968
|
+
{/snippet}
|
|
1969
|
+
|
|
1970
|
+
{#snippet nodesTabContent()}
|
|
1971
|
+
{#if !testMode}
|
|
1972
|
+
<NodeSidebar
|
|
1973
|
+
{nodes}
|
|
1974
|
+
loading={nodeTypesLoading}
|
|
1975
|
+
activeFormat={fd.workflow.format}
|
|
1976
|
+
categoriesDefaultOpen={themeConfig?.sidebar?.categoriesDefaultOpen ?? false}
|
|
1977
|
+
listStyle={themeConfig?.display?.sidebarList}
|
|
1978
|
+
/>
|
|
1979
|
+
{/if}
|
|
1493
1980
|
{/snippet}
|
|
1494
1981
|
|
|
1495
1982
|
{#snippet chatSurfaceBody()}
|
|
@@ -1515,70 +2002,134 @@
|
|
|
1515
2002
|
so the default experience is unchanged.
|
|
1516
2003
|
-->
|
|
1517
2004
|
{#snippet configPanelSidebar()}
|
|
1518
|
-
{#if activeConfig}
|
|
2005
|
+
{#if activeConfig?.kind === 'workflow'}
|
|
2006
|
+
{@render workflowSettingsTabs(configClosable ? closeActiveConfig : undefined)}
|
|
2007
|
+
{:else if activeConfig}
|
|
1519
2008
|
<ConfigPanel
|
|
1520
2009
|
title={activeConfig.title}
|
|
1521
2010
|
id={activeConfig.id}
|
|
1522
2011
|
description={activeConfig.description}
|
|
1523
2012
|
details={activeConfig.details}
|
|
1524
|
-
configTitle={activeConfig.configTitle
|
|
1525
|
-
onClose={closeActiveConfig}
|
|
1526
|
-
onSwap={activeConfig.kind === 'node' && canvasEditable && features.enableNodeSwap
|
|
2013
|
+
configTitle={activeConfig.configTitle}
|
|
2014
|
+
onClose={configClosable ? closeActiveConfig : undefined}
|
|
2015
|
+
onSwap={activeConfig.kind === 'node' && canvasEditable && !testMode && features.enableNodeSwap
|
|
1527
2016
|
? startSwap
|
|
1528
2017
|
: undefined}
|
|
1529
2018
|
>
|
|
1530
|
-
{
|
|
1531
|
-
{@render nodeConfigFormEl(activeConfig.node)}
|
|
1532
|
-
{:else}
|
|
1533
|
-
{@render workflowSettingsTabs()}
|
|
1534
|
-
{/if}
|
|
2019
|
+
{@render nodeInspectorEl(activeConfig.node)}
|
|
1535
2020
|
</ConfigPanel>
|
|
1536
2021
|
{/if}
|
|
1537
2022
|
{/snippet}
|
|
1538
2023
|
|
|
2024
|
+
<!-- Test mode's Playground, in the left slot or, on a narrow screen, a drawer -->
|
|
2025
|
+
{#snippet dockedPlayground()}
|
|
2026
|
+
{#if fd.workflow.current}
|
|
2027
|
+
<DockedPlayground
|
|
2028
|
+
workflow={fd.workflow.current}
|
|
2029
|
+
onSave={saveWorkflow}
|
|
2030
|
+
onOpenSettings={fd.workflow.current.playground !== undefined
|
|
2031
|
+
? openPlaygroundSettings
|
|
2032
|
+
: undefined}
|
|
2033
|
+
/>
|
|
2034
|
+
{/if}
|
|
2035
|
+
{/snippet}
|
|
2036
|
+
|
|
1539
2037
|
<!-- MainLayout wrapper for workflow editor -->
|
|
1540
|
-
<div class="flowdrop-root" data-fd-scope={scopeId}>
|
|
2038
|
+
<div class="flowdrop-root" data-fd-scope={scopeId} use:themeScope={{ mirror: true }}>
|
|
1541
2039
|
<MainLayout
|
|
1542
2040
|
{height}
|
|
1543
2041
|
{width}
|
|
1544
2042
|
showHeader={showNavbar}
|
|
1545
|
-
showLeftSidebar={!disableSidebar}
|
|
2043
|
+
showLeftSidebar={testMode ? dockedInColumn : !disableSidebar}
|
|
1546
2044
|
showRightSidebar={showRightPanel}
|
|
1547
2045
|
showBottomPanel={anyHere('below')}
|
|
1548
2046
|
bottomPanelHeight={getUiSettings().consoleHeight}
|
|
1549
2047
|
showFooter={false}
|
|
1550
|
-
headerHeight={
|
|
2048
|
+
headerHeight={48}
|
|
1551
2049
|
{leftSidebarWidth}
|
|
1552
2050
|
rightSidebarWidth={400}
|
|
1553
|
-
leftSidebarMinWidth={getUiSettings().sidebarCollapsed ? 0 :
|
|
1554
|
-
leftSidebarMaxWidth={getUiSettings().sidebarCollapsed ? 0 :
|
|
2051
|
+
leftSidebarMinWidth={testMode ? 300 : getUiSettings().sidebarCollapsed ? 0 : SIDEBAR_MIN_WIDTH}
|
|
2052
|
+
leftSidebarMaxWidth={testMode ? 560 : getUiSettings().sidebarCollapsed ? 0 : SIDEBAR_MAX_WIDTH}
|
|
2053
|
+
leftSidebarMaxRatio={testMode ? undefined : SIDEBAR_MAX_RATIO}
|
|
2054
|
+
onLeftSidebarResize={saveLeftWidth}
|
|
2055
|
+
onBottomPanelResize={saveConsoleHeight}
|
|
2056
|
+
bottomStrip={consoleStripShown ? consoleStrip : undefined}
|
|
2057
|
+
bottomStripIsHeader={consoleHere('below')}
|
|
1555
2058
|
rightSidebarMinWidth={320}
|
|
1556
2059
|
rightSidebarMaxWidth={550}
|
|
1557
|
-
enableLeftSplitPane={
|
|
2060
|
+
enableLeftSplitPane={leftResizable}
|
|
1558
2061
|
enableRightSplitPane={true}
|
|
1559
2062
|
class="flowdrop-app-layout"
|
|
1560
2063
|
>
|
|
1561
2064
|
<!-- Header: Navbar -->
|
|
1562
2065
|
{#snippet header()}
|
|
2066
|
+
{#snippet doctorStatus()}
|
|
2067
|
+
<DoctorMenu canApply={canvasEditable} />
|
|
2068
|
+
{/snippet}
|
|
1563
2069
|
<Navbar
|
|
1564
2070
|
title={breadcrumbTitle}
|
|
1565
2071
|
primaryActions={navbarActions.length > 0 ? navbarActions : defaultPrimaryActions}
|
|
1566
2072
|
{showStatus}
|
|
1567
2073
|
{showSettings}
|
|
2074
|
+
{branding}
|
|
2075
|
+
saveShortcut
|
|
2076
|
+
onWorkflowSettings={toggleWorkflowSettings}
|
|
2077
|
+
status={doctorStatus}
|
|
2078
|
+
workflowSettingsOpen={isWorkflowSettingsOpen}
|
|
1568
2079
|
{settingsCategories}
|
|
1569
2080
|
{showSettingsSyncButton}
|
|
1570
2081
|
{showSettingsResetButton}
|
|
1571
2082
|
/>
|
|
1572
2083
|
{/snippet}
|
|
1573
2084
|
|
|
1574
|
-
<!-- Left Sidebar: Node Components -->
|
|
2085
|
+
<!-- Left Sidebar: Node Components; in Test mode, the Playground -->
|
|
1575
2086
|
{#snippet leftSidebar()}
|
|
1576
|
-
|
|
1577
|
-
{
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
2087
|
+
{#if testMode}
|
|
2088
|
+
{@render dockedPlayground()}
|
|
2089
|
+
{/if}
|
|
2090
|
+
{#if chatInLeftSlot || !testMode}
|
|
2091
|
+
<!-- Kept mounted (hidden) in Test mode, so the conversation survives the trip -->
|
|
2092
|
+
<div
|
|
2093
|
+
class="left-slot"
|
|
2094
|
+
data-testid="left-slot"
|
|
2095
|
+
style:display={testMode || isSidebarCollapsed ? 'none' : null}
|
|
2096
|
+
>
|
|
2097
|
+
<TabbedSurface
|
|
2098
|
+
tabs={[
|
|
2099
|
+
{
|
|
2100
|
+
id: 'nodes',
|
|
2101
|
+
label: mergedMessages.layout.nodesTab,
|
|
2102
|
+
content: nodesTabContent
|
|
2103
|
+
},
|
|
2104
|
+
...(chatInLeftSlot
|
|
2105
|
+
? [
|
|
2106
|
+
{
|
|
2107
|
+
id: 'assistant',
|
|
2108
|
+
label: mergedMessages.navigation.bottomPanel.chat,
|
|
2109
|
+
content: chatSurfaceBody
|
|
2110
|
+
}
|
|
2111
|
+
]
|
|
2112
|
+
: [])
|
|
2113
|
+
]}
|
|
2114
|
+
activeId={leftTab}
|
|
2115
|
+
onSelect={(id) => (leftTab = id === 'assistant' ? 'assistant' : 'nodes')}
|
|
2116
|
+
ariaLabel={mergedMessages.layout.componentsSidebar}
|
|
2117
|
+
>
|
|
2118
|
+
{#snippet headerActions()}
|
|
2119
|
+
{#if !disableSidebar}
|
|
2120
|
+
<IconButton
|
|
2121
|
+
size="md"
|
|
2122
|
+
ariaLabel={mergedMessages.layout.collapseSidebar}
|
|
2123
|
+
title={mergedMessages.layout.collapseSidebar}
|
|
2124
|
+
onclick={toggleSidebar}
|
|
2125
|
+
>
|
|
2126
|
+
<MenuOpenIcon />
|
|
2127
|
+
</IconButton>
|
|
2128
|
+
{/if}
|
|
2129
|
+
{/snippet}
|
|
2130
|
+
</TabbedSurface>
|
|
2131
|
+
</div>
|
|
2132
|
+
{/if}
|
|
1582
2133
|
{/snippet}
|
|
1583
2134
|
|
|
1584
2135
|
<!--
|
|
@@ -1667,25 +2218,59 @@
|
|
|
1667
2218
|
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
|
1668
2219
|
<div
|
|
1669
2220
|
class="flowdrop-editor-main"
|
|
2221
|
+
bind:this={editorMainEl}
|
|
2222
|
+
bind:clientWidth={regionWidth}
|
|
1670
2223
|
class:pipeline-view={!!pipelineId}
|
|
1671
|
-
style="--fd-canvas-left-offset: {!disableSidebar
|
|
2224
|
+
style="--fd-canvas-left-offset: {testMode || !disableSidebar
|
|
2225
|
+
? leftSidebarWidth + 'px'
|
|
2226
|
+
: '0px'}; --fd-canvas-toolbar-inset: {testMode && narrow && drawerOpen
|
|
2227
|
+
? 'var(--fd-test-drawer-width)'
|
|
2228
|
+
: !testMode && !disableSidebar && isSidebarCollapsed
|
|
2229
|
+
? 'calc(var(--fd-canvas-control) + var(--fd-space-xs))'
|
|
2230
|
+
: '0px'}"
|
|
1672
2231
|
onclick={handleCanvasClick}
|
|
1673
|
-
onkeydown={(e) =>
|
|
2232
|
+
onkeydown={(e) => {
|
|
2233
|
+
if (e.key !== 'Escape') return;
|
|
2234
|
+
// The topmost transient surface first (the node library), then the selection.
|
|
2235
|
+
if (libraryOpen) libraryOpen = false;
|
|
2236
|
+
else if (configPlacement === 'sheet') {
|
|
2237
|
+
// The inspector sheet is inside this region: Esc in one of its fields is the field's.
|
|
2238
|
+
const target = e.target as HTMLElement;
|
|
2239
|
+
if (
|
|
2240
|
+
target.tagName === 'INPUT' ||
|
|
2241
|
+
target.tagName === 'TEXTAREA' ||
|
|
2242
|
+
target.isContentEditable
|
|
2243
|
+
)
|
|
2244
|
+
return;
|
|
2245
|
+
closeActiveConfig();
|
|
2246
|
+
} else closeConfigSidebar();
|
|
2247
|
+
}}
|
|
1674
2248
|
role="region"
|
|
1675
2249
|
aria-label={mergedMessages.layout.workflowCanvas}
|
|
1676
2250
|
>
|
|
1677
|
-
<!--
|
|
1678
|
-
|
|
2251
|
+
<!--
|
|
2252
|
+
Floating sidebar toggle — always visible on the canvas top-left. In
|
|
2253
|
+
Test mode the sidebar is the Playground: a column that needs no
|
|
2254
|
+
toggle, or on a narrow screen a drawer that this button opens.
|
|
2255
|
+
-->
|
|
2256
|
+
{#if testMode ? narrow : !disableSidebar && isSidebarCollapsed}
|
|
1679
2257
|
<CanvasIconButton
|
|
1680
|
-
class="flowdrop-sidebar-fab
|
|
1681
|
-
|
|
1682
|
-
?
|
|
1683
|
-
:
|
|
1684
|
-
|
|
1685
|
-
|
|
2258
|
+
class="flowdrop-sidebar-fab {testMode ? '' : 'flowdrop-sidebar-fab--edit'} {testMode &&
|
|
2259
|
+
drawerOpen
|
|
2260
|
+
? 'flowdrop-sidebar-fab--beside-drawer'
|
|
2261
|
+
: ''}"
|
|
2262
|
+
label={testMode
|
|
2263
|
+
? drawerOpen
|
|
2264
|
+
? mergedMessages.layout.hidePlayground
|
|
2265
|
+
: mergedMessages.layout.showPlayground
|
|
2266
|
+
: isSidebarCollapsed
|
|
2267
|
+
? mergedMessages.layout.expandSidebar
|
|
2268
|
+
: mergedMessages.layout.collapseSidebar}
|
|
2269
|
+
active={testMode ? drawerOpen : !isSidebarCollapsed}
|
|
2270
|
+
onclick={testMode ? () => (drawerOpen = !drawerOpen) : toggleSidebar}
|
|
1686
2271
|
>
|
|
1687
2272
|
{#snippet icon()}
|
|
1688
|
-
{#if isSidebarCollapsed}
|
|
2273
|
+
{#if testMode ? !drawerOpen : isSidebarCollapsed}
|
|
1689
2274
|
<MenuIcon />
|
|
1690
2275
|
{:else}
|
|
1691
2276
|
<MenuOpenIcon />
|
|
@@ -1694,22 +2279,96 @@
|
|
|
1694
2279
|
</CanvasIconButton>
|
|
1695
2280
|
{/if}
|
|
1696
2281
|
|
|
2282
|
+
<!-- Test mode, narrow screen: the Playground as a drawer over the canvas -->
|
|
2283
|
+
{#if testMode && narrow}
|
|
2284
|
+
<div class="test-drawer" data-testid="test-drawer" hidden={!drawerOpen}>
|
|
2285
|
+
{@render dockedPlayground()}
|
|
2286
|
+
</div>
|
|
2287
|
+
{/if}
|
|
2288
|
+
|
|
2289
|
+
<!--
|
|
2290
|
+
The open node (Test mode) or the workflow tabs (both modes) as a sheet over the
|
|
2291
|
+
canvas's right edge. The workflow sheet is wider and resizable from its left edge.
|
|
2292
|
+
-->
|
|
2293
|
+
{#if configPlacement === 'sheet' && activeConfig}
|
|
2294
|
+
<aside
|
|
2295
|
+
class="inspector-sheet"
|
|
2296
|
+
class:inspector-sheet--workflow={activeConfig.kind === 'workflow'}
|
|
2297
|
+
data-testid="inspector-sheet"
|
|
2298
|
+
data-kind={activeConfig.kind}
|
|
2299
|
+
aria-label={activeConfig.title}
|
|
2300
|
+
style={activeConfig.kind === 'workflow'
|
|
2301
|
+
? `width: min(${workflowSheetWidth}px, 100%)`
|
|
2302
|
+
: undefined}
|
|
2303
|
+
>
|
|
2304
|
+
{#if activeConfig.kind === 'workflow'}
|
|
2305
|
+
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
|
|
2306
|
+
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
|
2307
|
+
<div
|
|
2308
|
+
class="inspector-sheet__resizer"
|
|
2309
|
+
class:inspector-sheet__resizer--active={liveSheetWidth !== null}
|
|
2310
|
+
data-testid="inspector-sheet-resizer"
|
|
2311
|
+
role="separator"
|
|
2312
|
+
aria-orientation="vertical"
|
|
2313
|
+
aria-label={mergedMessages.layout.resizeWorkflowSheet}
|
|
2314
|
+
aria-valuenow={workflowSheetWidth}
|
|
2315
|
+
aria-valuemin={SHEET_MIN_WIDTH}
|
|
2316
|
+
aria-valuemax={workflowSheetMax}
|
|
2317
|
+
tabindex="0"
|
|
2318
|
+
onpointerdown={onSheetResizeDown}
|
|
2319
|
+
onpointermove={onSheetResizeMove}
|
|
2320
|
+
onpointerup={onSheetResizeUp}
|
|
2321
|
+
onpointercancel={onSheetResizeUp}
|
|
2322
|
+
onkeydown={onSheetResizeKey}
|
|
2323
|
+
></div>
|
|
2324
|
+
{/if}
|
|
2325
|
+
{@render configPanelSidebar()}
|
|
2326
|
+
</aside>
|
|
2327
|
+
{/if}
|
|
2328
|
+
|
|
2329
|
+
<!-- Test mode: the node library as a popover (N) -->
|
|
2330
|
+
{#if testMode && libraryOpen}
|
|
2331
|
+
<div
|
|
2332
|
+
class="node-library-popover"
|
|
2333
|
+
class:node-library-popover--beside-drawer={narrow && drawerOpen}
|
|
2334
|
+
data-testid="node-library-popover"
|
|
2335
|
+
role="dialog"
|
|
2336
|
+
aria-label={mergedMessages.layout.nodeLibrary}
|
|
2337
|
+
bind:this={libraryEl}
|
|
2338
|
+
>
|
|
2339
|
+
<NodeSidebar
|
|
2340
|
+
popover={true}
|
|
2341
|
+
{nodes}
|
|
2342
|
+
loading={nodeTypesLoading}
|
|
2343
|
+
activeFormat={fd.workflow.format}
|
|
2344
|
+
categoriesDefaultOpen={themeConfig?.sidebar?.categoriesDefaultOpen ?? false}
|
|
2345
|
+
listStyle={themeConfig?.display?.sidebarList}
|
|
2346
|
+
/>
|
|
2347
|
+
</div>
|
|
2348
|
+
{/if}
|
|
2349
|
+
|
|
1697
2350
|
<WorkflowEditor
|
|
1698
2351
|
bind:this={workflowEditorRef}
|
|
1699
2352
|
endpointConfig={endpointConfig ?? undefined}
|
|
1700
2353
|
{authProvider}
|
|
1701
|
-
{openConfigSidebar}
|
|
2354
|
+
openConfigSidebar={testMode ? showNodeSheet : openConfigSidebar}
|
|
2355
|
+
onSwapNode={canvasEditable && !testMode && features.enableNodeSwap
|
|
2356
|
+
? swapFromCanvas
|
|
2357
|
+
: undefined}
|
|
2358
|
+
onNodeClick={testMode ? showNodeSheet : undefined}
|
|
1702
2359
|
{mode}
|
|
1703
2360
|
{pipelineId}
|
|
1704
2361
|
{refreshTrigger}
|
|
1705
2362
|
builtinEditors={features.builtinEditors}
|
|
1706
2363
|
{contextMenu}
|
|
1707
2364
|
gridVariant={themeConfig?.canvas?.grid ?? 'dots'}
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
2365
|
+
editorMode={effectiveEditorMode}
|
|
2366
|
+
onEditorModeChange={testModeAvailable ? (next) => fd.editorMode.set(next) : undefined}
|
|
2367
|
+
onOpenTest={testModeAvailable ? () => fd.editorMode.set('test') : undefined}
|
|
2368
|
+
onAskAssistant={askAssistant}
|
|
2369
|
+
showRuns={testMode && features.runsList}
|
|
2370
|
+
adminLinks={features.adminLinks}
|
|
2371
|
+
{fitInset}
|
|
1713
2372
|
/>
|
|
1714
2373
|
</div>
|
|
1715
2374
|
</MainLayout>
|
|
@@ -1745,7 +2404,7 @@
|
|
|
1745
2404
|
</SurfaceOverlay>
|
|
1746
2405
|
{:else if consoleHere('modal')}
|
|
1747
2406
|
<SurfaceOverlay
|
|
1748
|
-
title={activeSurface === 'chat' || !consoleTabOffered
|
|
2407
|
+
title={(activeSurface === 'chat' && chatInConsoleGroup) || !consoleTabOffered
|
|
1749
2408
|
? mergedMessages.navigation.bottomPanel.chat
|
|
1750
2409
|
: mergedMessages.navigation.bottomPanel.console}
|
|
1751
2410
|
closeLabel={mergedMessages.layout.closeConfigPanel}
|
|
@@ -1760,15 +2419,134 @@
|
|
|
1760
2419
|
display: contents;
|
|
1761
2420
|
}
|
|
1762
2421
|
|
|
2422
|
+
/* Edit mode's left slot: the Nodes | Assistant tab strip fills it. */
|
|
2423
|
+
.left-slot {
|
|
2424
|
+
display: flex;
|
|
2425
|
+
flex-direction: column;
|
|
2426
|
+
flex: 1;
|
|
2427
|
+
min-height: 0;
|
|
2428
|
+
height: 100%;
|
|
2429
|
+
min-width: 0;
|
|
2430
|
+
}
|
|
2431
|
+
|
|
2432
|
+
.left-slot :global(.tabbed-surface__panel) {
|
|
2433
|
+
min-width: 0;
|
|
2434
|
+
}
|
|
2435
|
+
|
|
2436
|
+
.ask-about-run {
|
|
2437
|
+
align-self: flex-start;
|
|
2438
|
+
padding: var(--fd-space-xs) var(--fd-space-md);
|
|
2439
|
+
border: 1px solid var(--fd-border);
|
|
2440
|
+
border-radius: var(--fd-radius-md, 0.5rem);
|
|
2441
|
+
background: var(--fd-background);
|
|
2442
|
+
color: var(--fd-primary);
|
|
2443
|
+
font: inherit;
|
|
2444
|
+
font-weight: 500;
|
|
2445
|
+
cursor: pointer;
|
|
2446
|
+
}
|
|
2447
|
+
|
|
2448
|
+
.ask-about-run:hover {
|
|
2449
|
+
background: var(--fd-muted);
|
|
2450
|
+
}
|
|
2451
|
+
|
|
1763
2452
|
/* Floating sidebar toggle button — placement only; visuals live in CanvasIconButton */
|
|
1764
2453
|
:global(.flowdrop-sidebar-fab) {
|
|
1765
|
-
top
|
|
1766
|
-
|
|
2454
|
+
/* Below the canvas toolbar, which holds the top-left corner (Test mode, narrow). */
|
|
2455
|
+
top: calc(2 * var(--fd-canvas-inset) + var(--fd-canvas-control));
|
|
2456
|
+
left: var(--fd-canvas-inset);
|
|
1767
2457
|
z-index: 50;
|
|
1768
2458
|
}
|
|
1769
2459
|
|
|
2460
|
+
/* Test mode on a narrow screen: the Playground over the canvas's left edge. */
|
|
2461
|
+
.test-drawer {
|
|
2462
|
+
position: absolute;
|
|
2463
|
+
top: 0;
|
|
2464
|
+
bottom: 0;
|
|
2465
|
+
left: 0;
|
|
2466
|
+
z-index: 55;
|
|
2467
|
+
width: var(--fd-test-drawer-width);
|
|
2468
|
+
background: var(--fd-background);
|
|
2469
|
+
border-right: 1px solid var(--fd-border);
|
|
2470
|
+
box-shadow: var(--fd-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.18));
|
|
2471
|
+
}
|
|
2472
|
+
|
|
2473
|
+
/* Edit mode, sidebar collapsed: the expand control takes the toolbar row's start;
|
|
2474
|
+
the toolbar is inset by control + gap (App sets --fd-canvas-toolbar-inset). */
|
|
2475
|
+
:global(.flowdrop-sidebar-fab--edit) {
|
|
2476
|
+
top: var(--fd-canvas-inset);
|
|
2477
|
+
}
|
|
2478
|
+
|
|
2479
|
+
:global(.flowdrop-sidebar-fab--beside-drawer) {
|
|
2480
|
+
left: calc(var(--fd-test-drawer-width) + var(--fd-canvas-inset)) !important;
|
|
2481
|
+
}
|
|
2482
|
+
|
|
2483
|
+
/* Test mode's inspector: a sheet over the canvas's right edge; the canvas does not reflow. */
|
|
2484
|
+
.inspector-sheet {
|
|
2485
|
+
position: absolute;
|
|
2486
|
+
top: var(--fd-sheet-inset);
|
|
2487
|
+
right: var(--fd-sheet-inset);
|
|
2488
|
+
bottom: var(--fd-sheet-inset);
|
|
2489
|
+
z-index: 56;
|
|
2490
|
+
width: min(360px, 100%);
|
|
2491
|
+
overflow: hidden;
|
|
2492
|
+
background: var(--fd-panel-bg, var(--fd-background));
|
|
2493
|
+
border-style: solid;
|
|
2494
|
+
border-width: var(--fd-sheet-border-width);
|
|
2495
|
+
border-color: var(--fd-sheet-border);
|
|
2496
|
+
border-radius: var(--fd-sheet-radius);
|
|
2497
|
+
box-shadow: var(--fd-shadow-lg);
|
|
2498
|
+
}
|
|
2499
|
+
|
|
2500
|
+
/* The workflow sheet's left edge: an 8px hit area inside the sheet, a ring line on hover/focus/drag. */
|
|
2501
|
+
.inspector-sheet__resizer {
|
|
2502
|
+
position: absolute;
|
|
2503
|
+
inset: 0 auto 0 0;
|
|
2504
|
+
z-index: 1;
|
|
2505
|
+
width: var(--fd-space-sm);
|
|
2506
|
+
cursor: col-resize;
|
|
2507
|
+
touch-action: none;
|
|
2508
|
+
outline: none;
|
|
2509
|
+
}
|
|
2510
|
+
.inspector-sheet__resizer::after {
|
|
2511
|
+
content: '';
|
|
2512
|
+
position: absolute;
|
|
2513
|
+
inset: 0 auto 0 0;
|
|
2514
|
+
width: 2px;
|
|
2515
|
+
background: var(--fd-ring);
|
|
2516
|
+
opacity: 0;
|
|
2517
|
+
transition: opacity var(--fd-transition-fast);
|
|
2518
|
+
}
|
|
2519
|
+
.inspector-sheet__resizer:hover::after,
|
|
2520
|
+
.inspector-sheet__resizer:focus-visible::after,
|
|
2521
|
+
.inspector-sheet__resizer--active::after {
|
|
2522
|
+
opacity: 1;
|
|
2523
|
+
}
|
|
2524
|
+
|
|
2525
|
+
/* Test mode's node library, over the canvas's top-left corner, below the canvas toolbar. */
|
|
2526
|
+
.node-library-popover {
|
|
2527
|
+
position: absolute;
|
|
2528
|
+
top: 56px;
|
|
2529
|
+
left: 12px;
|
|
2530
|
+
z-index: 60;
|
|
2531
|
+
width: 280px;
|
|
2532
|
+
max-height: calc(100% - 68px);
|
|
2533
|
+
display: flex;
|
|
2534
|
+
flex-direction: column;
|
|
2535
|
+
overflow: hidden;
|
|
2536
|
+
background: var(--fd-panel-bg, var(--fd-background));
|
|
2537
|
+
border: 1px solid var(--fd-border);
|
|
2538
|
+
border-radius: var(--fd-radius-lg, 8px);
|
|
2539
|
+
box-shadow: var(--fd-shadow-lg, 0 8px 24px rgba(0, 0, 0, 0.18));
|
|
2540
|
+
}
|
|
2541
|
+
|
|
2542
|
+
.node-library-popover--beside-drawer {
|
|
2543
|
+
left: calc(var(--fd-test-drawer-width) + 60px);
|
|
2544
|
+
}
|
|
2545
|
+
|
|
1770
2546
|
/* Main editor area */
|
|
1771
2547
|
.flowdrop-editor-main {
|
|
2548
|
+
/* Test mode's drawer width. */
|
|
2549
|
+
--fd-test-drawer-width: min(380px, 92%);
|
|
1772
2550
|
flex: 1;
|
|
1773
2551
|
position: relative;
|
|
1774
2552
|
min-width: 0;
|
|
@@ -1827,9 +2605,7 @@
|
|
|
1827
2605
|
}
|
|
1828
2606
|
|
|
1829
2607
|
.config-surface__details {
|
|
1830
|
-
padding: 0.75rem 1rem;
|
|
1831
|
-
border-bottom: 1px solid var(--fd-border-muted);
|
|
1832
|
-
background-color: var(--fd-card);
|
|
2608
|
+
padding: 0.75rem 1rem 0;
|
|
1833
2609
|
flex-shrink: 0;
|
|
1834
2610
|
}
|
|
1835
2611
|
|
|
@@ -1851,47 +2627,11 @@
|
|
|
1851
2627
|
font-size: var(--fd-text-xs);
|
|
1852
2628
|
font-weight: 600;
|
|
1853
2629
|
color: var(--fd-muted-foreground);
|
|
1854
|
-
text-transform: uppercase;
|
|
1855
|
-
letter-spacing: 0.05em;
|
|
1856
|
-
}
|
|
1857
|
-
|
|
1858
|
-
/*
|
|
1859
|
-
Inner tab strip for the workflow-settings surface — Settings vs. Interface
|
|
1860
|
-
(Phase 3 of `.claude/plans/workflow-interface.md`). Deliberately not the
|
|
1861
|
-
`TabbedSurface` component: that one governs which *host* a surface lives in
|
|
1862
|
-
(sidebar/modal/below); this is a surface's own internal navigation, sitting
|
|
1863
|
-
inside whichever host already scrolls it.
|
|
1864
|
-
*/
|
|
1865
|
-
.workflow-settings-tabs {
|
|
1866
|
-
display: flex;
|
|
1867
|
-
flex-direction: column;
|
|
1868
|
-
gap: var(--fd-space-xs, 0.5rem);
|
|
1869
|
-
}
|
|
1870
|
-
|
|
1871
|
-
.workflow-settings-tabs__bar {
|
|
1872
|
-
display: flex;
|
|
1873
|
-
gap: 0;
|
|
1874
|
-
border-bottom: 1px solid var(--fd-border);
|
|
1875
|
-
}
|
|
1876
|
-
|
|
1877
|
-
.workflow-settings-tabs__tab {
|
|
1878
|
-
padding: 0.375rem 0.75rem;
|
|
1879
|
-
font-size: var(--fd-text-xs);
|
|
1880
|
-
font-weight: 500;
|
|
1881
|
-
cursor: pointer;
|
|
1882
|
-
border: none;
|
|
1883
|
-
border-bottom: 2px solid transparent;
|
|
1884
|
-
background: transparent;
|
|
1885
|
-
color: var(--fd-muted-foreground);
|
|
1886
|
-
transition: all var(--fd-transition-fast);
|
|
1887
|
-
}
|
|
1888
|
-
|
|
1889
|
-
.workflow-settings-tabs__tab:hover {
|
|
1890
|
-
color: var(--fd-foreground);
|
|
1891
2630
|
}
|
|
1892
2631
|
|
|
1893
|
-
|
|
1894
|
-
|
|
1895
|
-
|
|
2632
|
+
/* The workflow settings panel owns its own scroll and padding. */
|
|
2633
|
+
.config-surface__content--bare {
|
|
2634
|
+
padding: 0;
|
|
2635
|
+
overflow: hidden;
|
|
1896
2636
|
}
|
|
1897
2637
|
</style>
|