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