@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
package/dist/svelte-app.d.ts
CHANGED
|
@@ -9,15 +9,16 @@
|
|
|
9
9
|
import type { Workflow, NodeMetadata, PortConfig, CategoryDefinition } from './types/index.js';
|
|
10
10
|
import type { EndpointConfig } from './config/endpoints.js';
|
|
11
11
|
import type { AuthProvider } from './types/auth.js';
|
|
12
|
+
import type { EditorPlaygroundConfig } from './types/playground.js';
|
|
12
13
|
import type { FlowDropEventHandlers, FlowDropFeatures } from './types/events.js';
|
|
13
14
|
import type { FlowDropTheme, FlowDropThemeName } from './types/theme.js';
|
|
14
15
|
import type { WorkflowFormatAdapter } from './registry/workflowFormatRegistry.js';
|
|
15
16
|
import { type FlowDropInstance } from './stores/instanceContainer.svelte.js';
|
|
16
17
|
import { type DraftStorageOption } from './services/draftStorage.js';
|
|
17
|
-
import type { PartialSettings, SettingsCategory, SurfacePlacement } from './types/settings.js';
|
|
18
|
-
import type { NavbarAction } from './types/navbar.js';
|
|
18
|
+
import type { ColorSchemeOption, PartialSettings, SettingsCategory, SurfacePlacement } from './types/settings.js';
|
|
19
|
+
import type { NavbarAction, NavbarBranding } from './types/navbar.js';
|
|
19
20
|
import type { HostHooks, WebMCPHandle, WebMCPMountOptions } from './webmcp/types.js';
|
|
20
|
-
export type { NavbarAction };
|
|
21
|
+
export type { NavbarAction, NavbarBranding };
|
|
21
22
|
import type { ContextMenuOptions } from './editor/contextMenu.js';
|
|
22
23
|
export type { HostHooks, WebMCPHandle, WebMCPMountOptions };
|
|
23
24
|
export type { ContextMenuActions, ContextMenuContext, ContextMenuEntry, ContextMenuOptions, ContextMenuTarget } from './editor/contextMenu.js';
|
|
@@ -49,8 +50,10 @@ export interface FlowDropMountOptions {
|
|
|
49
50
|
*/
|
|
50
51
|
configPlacement?: SurfacePlacement;
|
|
51
52
|
/**
|
|
52
|
-
* Default host for the
|
|
53
|
-
* `
|
|
53
|
+
* Default host for the Command Console: `below` (default), `sidebar`, or
|
|
54
|
+
* `modal`. The AI Assistant is not placed by this: it is a tab beside Nodes
|
|
55
|
+
* in Edit mode's left slot (it stays with the Console only when the sidebar
|
|
56
|
+
* is disabled). Seeds the user setting on first load; a later user
|
|
54
57
|
* change wins.
|
|
55
58
|
*/
|
|
56
59
|
consolePlacement?: SurfacePlacement;
|
|
@@ -63,12 +66,42 @@ export interface FlowDropMountOptions {
|
|
|
63
66
|
* @default 'edit'
|
|
64
67
|
*/
|
|
65
68
|
mode?: 'edit' | 'readonly' | 'locked';
|
|
69
|
+
/**
|
|
70
|
+
* Start in Test mode (`'test'`): the Playground docked beside the canvas,
|
|
71
|
+
* the inspector always open. Edit | Test is a second axis beside `mode`: it
|
|
72
|
+
* only takes effect on an editable canvas with a saved workflow and no
|
|
73
|
+
* `pipelineId`, and `features.testMode` not off.
|
|
74
|
+
*
|
|
75
|
+
* Seeds `app.instance.editorMode`, the store that holds the mode from then
|
|
76
|
+
* on; change it later with `app.instance.editorMode.set('edit' | 'test')`.
|
|
77
|
+
* @default 'edit'
|
|
78
|
+
*/
|
|
79
|
+
editorMode?: 'edit' | 'test';
|
|
80
|
+
/**
|
|
81
|
+
* Called when the Edit | Test mode changes after mount, so a host can keep
|
|
82
|
+
* its URL in step. Not called for the initial value.
|
|
83
|
+
*/
|
|
84
|
+
onEditorModeChange?: (mode: 'edit' | 'test') => void;
|
|
85
|
+
/**
|
|
86
|
+
* How Test mode's Playground follows a run: `pollingInterval` (ms, default
|
|
87
|
+
* 1500) and `shouldStopPolling` (default: stop on `idle` only, on purpose,
|
|
88
|
+
* since an async server may still emit messages). A backend that leaves a
|
|
89
|
+
* session `completed` or `failed` after a turn passes its own
|
|
90
|
+
* `shouldStopPolling` here. Unset, nothing changes.
|
|
91
|
+
*/
|
|
92
|
+
playground?: EditorPlaygroundConfig;
|
|
66
93
|
/** Pipeline ID for status display */
|
|
67
94
|
pipelineId?: string;
|
|
68
95
|
/** Custom navbar title */
|
|
69
96
|
navbarTitle?: string;
|
|
70
97
|
/** Custom navbar actions */
|
|
71
98
|
navbarActions?: NavbarAction[];
|
|
99
|
+
/**
|
|
100
|
+
* White-label logo for the navbar. Replaces the FlowDrop wordmark; `logo` is an
|
|
101
|
+
* image URL or a Svelte component, `name` replaces the product name in the page title and the
|
|
102
|
+
* logo's accessible name, `logoAlt` overrides the logo's accessible name, `href` an optional link around it.
|
|
103
|
+
*/
|
|
104
|
+
branding?: NavbarBranding;
|
|
72
105
|
/** Show settings gear icon in navbar */
|
|
73
106
|
showSettings?: boolean;
|
|
74
107
|
/** Show the "Connected" status indicator in the navbar (default: true) */
|
|
@@ -81,6 +114,15 @@ export interface FlowDropMountOptions {
|
|
|
81
114
|
features?: FlowDropFeatures;
|
|
82
115
|
/** Initial settings overrides (theme, behavior, editor, ui, api) */
|
|
83
116
|
settings?: PartialSettings;
|
|
117
|
+
/**
|
|
118
|
+
* Lets the embedding page supply a fourth colour-scheme choice, "follow the
|
|
119
|
+
* host". Generic: FlowDrop shows `host.label` verbatim and resolves
|
|
120
|
+
* `host.value` (`'auto'` = the operating system). With it, `'host'` is the
|
|
121
|
+
* default preference; a saved preference the user never chose moves to it, an
|
|
122
|
+
* explicit Light or Dark is kept. `host.subscribe` re-resolves on live changes.
|
|
123
|
+
* Without it: Auto / Light / Dark only. See {@link ColorSchemeOption}.
|
|
124
|
+
*/
|
|
125
|
+
colorScheme?: ColorSchemeOption;
|
|
84
126
|
/** Custom storage key for workflow drafts */
|
|
85
127
|
draftStorageKey?: string;
|
|
86
128
|
/**
|
package/dist/svelte-app.js
CHANGED
|
@@ -15,7 +15,7 @@ import { fetchCategories } from './services/categoriesApi.js';
|
|
|
15
15
|
import { createFlowDropInstance, definedHostHooks, getDefaultInstance, DEFAULT_DRAFT_PREFIX } from './stores/instanceContainer.svelte.js';
|
|
16
16
|
import { DraftAutoSaveManager, getDraftStorageKey, migrateLegacyDraftKey, setDraftStorage, resolveDraftStorage, clearAllDrafts as clearAllDraftsFromStorage } from './services/draftStorage.js';
|
|
17
17
|
import { mergeFeatures } from './types/events.js';
|
|
18
|
-
import { initializeSettings, getBehaviorSettings, onSettingsChange } from './stores/settingsStore.svelte.js';
|
|
18
|
+
import { initializeSettings, getHostColorSchemeRegistration, releaseHostColorScheme, getBehaviorSettings, onSettingsChange } from './stores/settingsStore.svelte.js';
|
|
19
19
|
import { logger } from './utils/logger.js';
|
|
20
20
|
import { globalSaveWorkflow, globalExportWorkflow } from './services/globalSave.js';
|
|
21
21
|
import { whenWorkflowLoaded } from './utils/whenWorkflowLoaded.svelte.js';
|
|
@@ -50,6 +50,8 @@ function releaseInstance(fd, isDefault) {
|
|
|
50
50
|
if (isDefault) {
|
|
51
51
|
fd.workflow.setOnDirtyStateChange(null);
|
|
52
52
|
fd.workflow.setOnWorkflowChange(null);
|
|
53
|
+
// A host run's status poll must not outlive the mount.
|
|
54
|
+
fd.runs.stopHostPolling();
|
|
53
55
|
defaultInstanceClaimed = false;
|
|
54
56
|
}
|
|
55
57
|
else {
|
|
@@ -157,7 +159,7 @@ function attachWebMCPToMount(fd, options, isDestroyed) {
|
|
|
157
159
|
* ```
|
|
158
160
|
*/
|
|
159
161
|
export async function mountFlowDropApp(container, options = {}) {
|
|
160
|
-
const { workflow, nodes, endpointConfig, portConfig, categories, height = '100vh', width = '100%', showNavbar = false, disableSidebar, configPlacement, consolePlacement, mode, pipelineId, navbarTitle, navbarActions, showSettings, showStatus, authProvider, eventHandlers, features: userFeatures, settings: initialSettings, draftStorageKey: customDraftKey, draftStorage, formatAdapters, workflowFormats, theme, settingsCategories, showSettingsSyncButton, showSettingsResetButton, instanceId, webmcp, host, contextMenu } = options;
|
|
162
|
+
const { workflow, nodes, endpointConfig, portConfig, categories, height = '100vh', width = '100%', showNavbar = false, disableSidebar, configPlacement, consolePlacement, mode, editorMode, onEditorModeChange, playground, pipelineId, navbarTitle, navbarActions, branding, showSettings, showStatus, authProvider, eventHandlers, features: userFeatures, settings: initialSettings, colorScheme, draftStorageKey: customDraftKey, draftStorage, formatAdapters, workflowFormats, theme, settingsCategories, showSettingsSyncButton, showSettingsResetButton, instanceId, webmcp, host, contextMenu } = options;
|
|
161
163
|
// Per-instance state container — this is what allows multiple FlowDrop
|
|
162
164
|
// editors to coexist on one page without sharing workflow/history state.
|
|
163
165
|
const { fd, isDefault } = acquireInstance(instanceId);
|
|
@@ -178,8 +180,11 @@ export async function mountFlowDropApp(container, options = {}) {
|
|
|
178
180
|
setDraftStorage(draftStorageAdapter);
|
|
179
181
|
// Apply initial settings overrides and initialize theme
|
|
180
182
|
await initializeSettings({
|
|
181
|
-
defaults: initialSettings
|
|
183
|
+
defaults: initialSettings,
|
|
184
|
+
colorScheme
|
|
182
185
|
});
|
|
186
|
+
// The registration this mount made, if any, released again on destroy.
|
|
187
|
+
const hostColorSchemeRegistration = colorScheme?.host ? getHostColorSchemeRegistration() : null;
|
|
183
188
|
// Resolve and apply endpoint config, port config and categories to this
|
|
184
189
|
// instance (see configureInstance).
|
|
185
190
|
const config = await configureInstance(fd, {
|
|
@@ -214,9 +219,13 @@ export async function mountFlowDropApp(container, options = {}) {
|
|
|
214
219
|
configPlacement,
|
|
215
220
|
consolePlacement,
|
|
216
221
|
mode,
|
|
222
|
+
editorMode,
|
|
223
|
+
onEditorModeChange,
|
|
224
|
+
playground,
|
|
217
225
|
pipelineId,
|
|
218
226
|
navbarTitle,
|
|
219
227
|
navbarActions,
|
|
228
|
+
branding,
|
|
220
229
|
showSettings,
|
|
221
230
|
showStatus,
|
|
222
231
|
endpointConfig: config,
|
|
@@ -316,6 +325,9 @@ export async function mountFlowDropApp(container, options = {}) {
|
|
|
316
325
|
state.unsubscribeDraftSettings();
|
|
317
326
|
state.unsubscribeDraftSettings = null;
|
|
318
327
|
}
|
|
328
|
+
if (hostColorSchemeRegistration !== null) {
|
|
329
|
+
releaseHostColorScheme(hostColorSchemeRegistration);
|
|
330
|
+
}
|
|
319
331
|
// Release this mount's instance: clears its callbacks (and, for
|
|
320
332
|
// non-default instances, all subscriptions/effect roots) without
|
|
321
333
|
// touching sibling instances on the same page.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { graphiteSkin } from '../skins/graphite.js';
|
|
2
|
+
export const graphiteTheme = {
|
|
3
|
+
name: 'graphite',
|
|
4
|
+
skin: graphiteSkin,
|
|
5
|
+
config: {
|
|
6
|
+
display: {
|
|
7
|
+
sidebarList: 'rows',
|
|
8
|
+
messages: 'document'
|
|
9
|
+
},
|
|
10
|
+
sidebar: {
|
|
11
|
+
defaultOpen: true,
|
|
12
|
+
categoriesDefaultOpen: false
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
};
|
package/dist/themes/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { FlowDropTheme, FlowDropThemeName } from '../types/theme.js';
|
|
|
2
2
|
import { defaultTheme } from './default.js';
|
|
3
3
|
import { minimalTheme } from './minimal.js';
|
|
4
4
|
import { drafterTheme } from './drafter.js';
|
|
5
|
+
import { graphiteTheme } from './graphite.js';
|
|
5
6
|
/**
|
|
6
7
|
* Resolve a theme prop to a complete FlowDropTheme object.
|
|
7
8
|
*
|
|
@@ -11,4 +12,4 @@ import { drafterTheme } from './drafter.js';
|
|
|
11
12
|
* → minimal theme + { skin.tokens.primary: '#e11d48' }
|
|
12
13
|
*/
|
|
13
14
|
export declare function resolveTheme(theme: FlowDropTheme | FlowDropThemeName | undefined): FlowDropTheme;
|
|
14
|
-
export { defaultTheme, minimalTheme, drafterTheme };
|
|
15
|
+
export { defaultTheme, minimalTheme, drafterTheme, graphiteTheme };
|
package/dist/themes/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { defaultTheme } from './default.js';
|
|
2
2
|
import { minimalTheme } from './minimal.js';
|
|
3
3
|
import { drafterTheme } from './drafter.js';
|
|
4
|
+
import { graphiteTheme } from './graphite.js';
|
|
4
5
|
const builtinThemes = {
|
|
5
6
|
default: defaultTheme,
|
|
6
7
|
minimal: minimalTheme,
|
|
7
|
-
drafter: drafterTheme
|
|
8
|
+
drafter: drafterTheme,
|
|
9
|
+
graphite: graphiteTheme
|
|
8
10
|
};
|
|
9
11
|
/**
|
|
10
12
|
* Resolve a theme prop to a complete FlowDropTheme object.
|
|
@@ -27,13 +29,30 @@ export function resolveTheme(theme) {
|
|
|
27
29
|
name: baseName,
|
|
28
30
|
skin: theme.skin
|
|
29
31
|
? {
|
|
32
|
+
...(base.skin?.font || theme.skin.font
|
|
33
|
+
? { font: theme.skin.font ?? base.skin?.font }
|
|
34
|
+
: {}),
|
|
30
35
|
tokens: {
|
|
31
36
|
...(base.skin?.tokens ?? {}),
|
|
32
37
|
...(theme.skin.tokens ?? {})
|
|
33
|
-
}
|
|
38
|
+
},
|
|
39
|
+
// The base's dark palette must survive an inline skin that only
|
|
40
|
+
// sets light tokens; inline dark tokens win over it.
|
|
41
|
+
...(base.skin?.darkTokens || theme.skin.darkTokens
|
|
42
|
+
? {
|
|
43
|
+
darkTokens: {
|
|
44
|
+
...(base.skin?.darkTokens ?? {}),
|
|
45
|
+
...(theme.skin.darkTokens ?? {})
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
: {})
|
|
34
49
|
}
|
|
35
50
|
: base.skin,
|
|
36
51
|
config: {
|
|
52
|
+
display: {
|
|
53
|
+
...base.config?.display,
|
|
54
|
+
...theme.config?.display
|
|
55
|
+
},
|
|
37
56
|
sidebar: {
|
|
38
57
|
...base.config?.sidebar,
|
|
39
58
|
...theme.config?.sidebar
|
|
@@ -47,4 +66,4 @@ export function resolveTheme(theme) {
|
|
|
47
66
|
}
|
|
48
67
|
return theme;
|
|
49
68
|
}
|
|
50
|
-
export { defaultTheme, minimalTheme, drafterTheme };
|
|
69
|
+
export { defaultTheme, minimalTheme, drafterTheme, graphiteTheme };
|
package/dist/themes/minimal.js
CHANGED
|
@@ -3,6 +3,16 @@ export const minimalTheme = {
|
|
|
3
3
|
name: 'minimal',
|
|
4
4
|
skin: slateSkin,
|
|
5
5
|
config: {
|
|
6
|
+
display: {
|
|
7
|
+
// Node icon: circle dot instead of the squircle
|
|
8
|
+
nodeIcon: 'dot',
|
|
9
|
+
// Sidebar: flat dot-name list, no search, no header
|
|
10
|
+
sidebarList: 'flat',
|
|
11
|
+
sidebarSearch: false,
|
|
12
|
+
sidebarHeader: false,
|
|
13
|
+
// Navbar: split buttons instead of a dropdown
|
|
14
|
+
navbarActions: 'split'
|
|
15
|
+
},
|
|
6
16
|
sidebar: {
|
|
7
17
|
defaultOpen: true,
|
|
8
18
|
categoriesDefaultOpen: true
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { FlowDropSkin } from '../types/skin.js';
|
|
1
|
+
import type { FlowDropSkin, FlowDropSkinTokens } from '../types/skin.js';
|
|
2
|
+
import type { FlowDropDisplayConfig } from '../types/theme.js';
|
|
2
3
|
import { SCOPE_ATTR } from '../utils/portal.js';
|
|
3
4
|
export { SCOPE_ATTR };
|
|
4
5
|
/**
|
|
@@ -10,6 +11,18 @@ export { SCOPE_ATTR };
|
|
|
10
11
|
* redeclares every such alias next to the skin's own tokens.
|
|
11
12
|
*/
|
|
12
13
|
export declare function aliasClosure(seeds: Iterable<string>, aliases: Readonly<Record<string, string>>, exclude?: ReadonlySet<string>): Record<string, string>;
|
|
14
|
+
/**
|
|
15
|
+
* The `--fd-*-display` tokens a theme's `config.display` stands for.
|
|
16
|
+
*
|
|
17
|
+
* Structure used to be switched by skin tokens; it now lives in the theme
|
|
18
|
+
* config. The components still read the tokens, so the config is translated
|
|
19
|
+
* here, and written *after* the skin's own tokens: config wins, a token set by
|
|
20
|
+
* the skin (or by the host's CSS, when the config sets nothing) is the
|
|
21
|
+
* deprecated fallback until 3.0, and neither falls through to tokens.css.
|
|
22
|
+
*/
|
|
23
|
+
export declare function displayTokens(display: FlowDropDisplayConfig | undefined): FlowDropSkinTokens;
|
|
24
|
+
/** A skin's light tokens with its font and the theme's display switches folded in. */
|
|
25
|
+
export declare function effectiveSkinTokens(skin: Pick<FlowDropSkin, 'tokens' | 'font'> | undefined, display?: FlowDropDisplayConfig): FlowDropSkinTokens;
|
|
13
26
|
/**
|
|
14
27
|
* The scope id as written everywhere: the `data-fd-scope` attribute, the skin
|
|
15
28
|
* rule and `FlowDropInstance.skinScope`. Clean once at the source so every
|
|
@@ -22,9 +35,13 @@ export declare function scopeSelector(scopeId: string): string;
|
|
|
22
35
|
* CSS for one editor instance's skin, confined to its scope element.
|
|
23
36
|
*
|
|
24
37
|
* tokens → [data-fd-scope="id"] (light / base)
|
|
25
|
-
* darkTokens → [data-
|
|
38
|
+
* darkTokens → [data-fd-scope="id"][data-theme='dark'] (dark)
|
|
26
39
|
*
|
|
27
|
-
* data-theme
|
|
28
|
-
*
|
|
40
|
+
* data-theme is normally on the scope element itself (use:themeScope), where
|
|
41
|
+
* tokens.css's own `[data-theme='dark']` block applies to the same element. Both
|
|
42
|
+
* skin rules therefore carry one extra attribute selector, so a skin's tokens
|
|
43
|
+
* outrank that block instead of tying with it.
|
|
44
|
+
* `display` (the theme config's layout switches) is merged into the light tokens.
|
|
45
|
+
* Returns '' when the skin and display set nothing.
|
|
29
46
|
*/
|
|
30
|
-
export declare function buildScopedSkinCss(scopeId: string, skin: Pick<FlowDropSkin, 'tokens' | 'darkTokens'> | undefined): string;
|
|
47
|
+
export declare function buildScopedSkinCss(scopeId: string, skin: Pick<FlowDropSkin, 'tokens' | 'darkTokens' | 'font'> | undefined, display?: FlowDropDisplayConfig): string;
|
|
@@ -31,12 +31,132 @@ export function aliasClosure(seeds, aliases, exclude = new Set()) {
|
|
|
31
31
|
}
|
|
32
32
|
return result;
|
|
33
33
|
}
|
|
34
|
-
function rule(selector, declarations) {
|
|
35
|
-
const body =
|
|
36
|
-
.map(([k, v]) => ` --fd-${k}: ${v};`)
|
|
37
|
-
.
|
|
34
|
+
function rule(selector, declarations, rawDeclarations = []) {
|
|
35
|
+
const body = [
|
|
36
|
+
...Object.entries(declarations).map(([k, v]) => ` --fd-${k}: ${v};`),
|
|
37
|
+
...rawDeclarations.map((d) => ` ${d};`)
|
|
38
|
+
].join('\n');
|
|
38
39
|
return `${selector} {\n${body}\n}\n`;
|
|
39
40
|
}
|
|
41
|
+
/**
|
|
42
|
+
* `messages: 'document'` as tokens. The message components read each of these
|
|
43
|
+
* with the look they had before as the fallback, so a theme that does not ask
|
|
44
|
+
* for the document anatomy keeps its bubbles. Colours (the dark user bubble)
|
|
45
|
+
* belong to the skin; this is shape and structure.
|
|
46
|
+
*/
|
|
47
|
+
const DOCUMENT_MESSAGE_TOKENS = {
|
|
48
|
+
'msg-avatar-display': 'none',
|
|
49
|
+
'msg-header-display': 'none',
|
|
50
|
+
'msg-meta-display': 'flex',
|
|
51
|
+
'msg-meta-time-display': 'inline',
|
|
52
|
+
'msg-footer-extras-display': 'none',
|
|
53
|
+
'msg-footer-border-width': '0',
|
|
54
|
+
'msg-stream-pad': 'var(--fd-space-md)',
|
|
55
|
+
'msg-gutter': '0',
|
|
56
|
+
'msg-gap': 'var(--fd-space-xl)',
|
|
57
|
+
'msg-footer-gap': 'var(--fd-space-2xs)',
|
|
58
|
+
'msg-footer-top': 'var(--fd-space-2xs)',
|
|
59
|
+
'msg-footer-pad-top': '0',
|
|
60
|
+
'msg-link-color': 'var(--fd-muted-foreground)',
|
|
61
|
+
'msg-link-decoration': 'none',
|
|
62
|
+
'msg-typing-pad': 'var(--fd-space-xs) 0',
|
|
63
|
+
'interrupt-card-pad': 'var(--fd-space-md)',
|
|
64
|
+
'interrupt-card-radius': 'var(--fd-radius-surface)',
|
|
65
|
+
'interrupt-card-bg': 'color-mix(in srgb, var(--fd-warning-muted) 50%, var(--fd-background))',
|
|
66
|
+
'interrupt-card-border': 'color-mix(in srgb, var(--fd-warning) 40%, transparent)',
|
|
67
|
+
'interrupt-card-shadow': 'none',
|
|
68
|
+
'composer-radius': 'var(--fd-radius-bubble)',
|
|
69
|
+
'composer-border': 'var(--fd-border-strong)',
|
|
70
|
+
'composer-pad': '6px 6px 6px 12px',
|
|
71
|
+
'composer-field-height': 'var(--fd-control-md)',
|
|
72
|
+
'composer-input-pad-x': '0',
|
|
73
|
+
'composer-focus-ring': '0 0 0 3px var(--fd-accent-muted)',
|
|
74
|
+
'composer-send-idle-bg': 'var(--fd-subtle)',
|
|
75
|
+
'composer-send-idle-fg': 'var(--fd-muted-foreground)',
|
|
76
|
+
'composer-send-idle-opacity': '1',
|
|
77
|
+
'msg-user-max': '85%',
|
|
78
|
+
'msg-user-pad': 'var(--fd-space-xs) var(--fd-space-md)',
|
|
79
|
+
'msg-user-radius': 'var(--fd-radius-bubble)',
|
|
80
|
+
'msg-tail-radius': 'var(--fd-radius-sm)',
|
|
81
|
+
'msg-reply-tail-radius': '0',
|
|
82
|
+
'msg-reply-max': '100%',
|
|
83
|
+
'msg-reply-pad': '0',
|
|
84
|
+
'msg-reply-bg': 'transparent',
|
|
85
|
+
'msg-reply-border-width': '0',
|
|
86
|
+
'msg-reply-shadow': 'none',
|
|
87
|
+
'msg-reply-radius': '0',
|
|
88
|
+
'msg-text-size': 'var(--fd-text-body)',
|
|
89
|
+
'msg-text-leading': '1.55',
|
|
90
|
+
'msg-p-gap': 'var(--fd-space-xs)',
|
|
91
|
+
'msg-code-bg': 'var(--fd-subtle)',
|
|
92
|
+
'msg-pre-bg': 'var(--fd-subtle)',
|
|
93
|
+
'msg-pre-fg': 'var(--fd-foreground)',
|
|
94
|
+
'msg-pre-radius': 'var(--fd-control-radius)',
|
|
95
|
+
'msg-pre-size': 'var(--fd-text-meta)',
|
|
96
|
+
'msg-pre-border-width': '0',
|
|
97
|
+
'msg-quote-style': 'normal',
|
|
98
|
+
'msg-h1-size': 'var(--fd-text-md)',
|
|
99
|
+
'msg-h2-size': 'var(--fd-text-md)',
|
|
100
|
+
'msg-h3-size': 'var(--fd-text-body)'
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* The `--fd-*-display` tokens a theme's `config.display` stands for.
|
|
104
|
+
*
|
|
105
|
+
* Structure used to be switched by skin tokens; it now lives in the theme
|
|
106
|
+
* config. The components still read the tokens, so the config is translated
|
|
107
|
+
* here, and written *after* the skin's own tokens: config wins, a token set by
|
|
108
|
+
* the skin (or by the host's CSS, when the config sets nothing) is the
|
|
109
|
+
* deprecated fallback until 3.0, and neither falls through to tokens.css.
|
|
110
|
+
*/
|
|
111
|
+
export function displayTokens(display) {
|
|
112
|
+
const out = {};
|
|
113
|
+
if (!display)
|
|
114
|
+
return out;
|
|
115
|
+
if (display.nodeIcon) {
|
|
116
|
+
const dot = display.nodeIcon === 'dot';
|
|
117
|
+
out['node-icon-display'] = dot ? 'none' : 'flex';
|
|
118
|
+
out['node-circle-display'] = dot ? 'flex' : 'none';
|
|
119
|
+
}
|
|
120
|
+
if (display.sidebarList) {
|
|
121
|
+
const flat = display.sidebarList === 'flat';
|
|
122
|
+
out['sidebar-card-display'] = flat ? 'none' : 'block'; // 'rows' is a card list drawn flat
|
|
123
|
+
out['sidebar-flat-display'] = flat ? 'block' : 'none';
|
|
124
|
+
}
|
|
125
|
+
if (display.sidebarSearch !== undefined) {
|
|
126
|
+
out['sidebar-search-display'] = display.sidebarSearch ? 'flex' : 'none';
|
|
127
|
+
}
|
|
128
|
+
if (display.sidebarHeader !== undefined) {
|
|
129
|
+
out['sidebar-header-display'] = display.sidebarHeader ? 'flex' : 'none';
|
|
130
|
+
}
|
|
131
|
+
if (display.nodeDetails) {
|
|
132
|
+
const compact = display.nodeDetails === 'compact';
|
|
133
|
+
out['node-desc-display'] = compact ? 'none' : '-webkit-box';
|
|
134
|
+
out['node-desc-block-display'] = compact ? 'none' : 'block';
|
|
135
|
+
if (compact) {
|
|
136
|
+
// Without the description row (row gap + one line) the header is 2 gaps +
|
|
137
|
+
// the title: 60px, still on the 20px grid the port handles snap to.
|
|
138
|
+
out['node-header-min-height'] =
|
|
139
|
+
'calc(var(--fd-node-header-gap) * 2 + var(--fd-node-header-title-height) - var(--fd-node-border-width))';
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (display.navbarActions) {
|
|
143
|
+
const split = display.navbarActions === 'split';
|
|
144
|
+
out['navbar-split-display'] = split ? 'flex' : 'none';
|
|
145
|
+
out['navbar-dropdown-display'] = split ? 'none' : 'flex';
|
|
146
|
+
}
|
|
147
|
+
if (display.messages === 'document') {
|
|
148
|
+
Object.assign(out, DOCUMENT_MESSAGE_TOKENS);
|
|
149
|
+
}
|
|
150
|
+
return out;
|
|
151
|
+
}
|
|
152
|
+
/** A skin's light tokens with its font and the theme's display switches folded in. */
|
|
153
|
+
export function effectiveSkinTokens(skin, display) {
|
|
154
|
+
return {
|
|
155
|
+
...(skin?.tokens ?? {}),
|
|
156
|
+
...(skin?.font ? { 'font-sans': skin.font } : {}),
|
|
157
|
+
...displayTokens(display)
|
|
158
|
+
};
|
|
159
|
+
}
|
|
40
160
|
/** Dark-mode alias values: the light ones with the dark block's overrides applied. */
|
|
41
161
|
function effectiveDarkAliases() {
|
|
42
162
|
return { ...LIGHT_ALIASES, ...DARK_ALIASES };
|
|
@@ -57,13 +177,17 @@ export function scopeSelector(scopeId) {
|
|
|
57
177
|
* CSS for one editor instance's skin, confined to its scope element.
|
|
58
178
|
*
|
|
59
179
|
* tokens → [data-fd-scope="id"] (light / base)
|
|
60
|
-
* darkTokens → [data-
|
|
180
|
+
* darkTokens → [data-fd-scope="id"][data-theme='dark'] (dark)
|
|
61
181
|
*
|
|
62
|
-
* data-theme
|
|
63
|
-
*
|
|
182
|
+
* data-theme is normally on the scope element itself (use:themeScope), where
|
|
183
|
+
* tokens.css's own `[data-theme='dark']` block applies to the same element. Both
|
|
184
|
+
* skin rules therefore carry one extra attribute selector, so a skin's tokens
|
|
185
|
+
* outrank that block instead of tying with it.
|
|
186
|
+
* `display` (the theme config's layout switches) is merged into the light tokens.
|
|
187
|
+
* Returns '' when the skin and display set nothing.
|
|
64
188
|
*/
|
|
65
|
-
export function buildScopedSkinCss(scopeId, skin) {
|
|
66
|
-
const tokens = skin
|
|
189
|
+
export function buildScopedSkinCss(scopeId, skin, display) {
|
|
190
|
+
const tokens = effectiveSkinTokens(skin, display);
|
|
67
191
|
const darkTokens = skin?.darkTokens ?? {};
|
|
68
192
|
const lightKeys = Object.keys(tokens);
|
|
69
193
|
const darkKeys = Object.keys(darkTokens);
|
|
@@ -76,7 +200,8 @@ export function buildScopedSkinCss(scopeId, skin) {
|
|
|
76
200
|
let css = '';
|
|
77
201
|
const lightAliases = aliasClosure(lightKeys, LIGHT_ALIASES, skinSet);
|
|
78
202
|
if (lightKeys.length > 0) {
|
|
79
|
-
|
|
203
|
+
// A named font also has to take effect: the editor otherwise inherits the host's.
|
|
204
|
+
css += rule(`${scope}${scope}`, { ...lightAliases, ...tokens }, skin?.font ? ['font-family: var(--fd-font-sans)'] : []);
|
|
80
205
|
}
|
|
81
206
|
// Every alias the light rule redeclares shadows the :root dark value, so the
|
|
82
207
|
// dark rule restores it — including dark values that are literals, which the
|
|
@@ -89,7 +214,7 @@ export function buildScopedSkinCss(scopeId, skin) {
|
|
|
89
214
|
darkAliases[name] = DARK_ALIASES[name];
|
|
90
215
|
}
|
|
91
216
|
if (darkKeys.length > 0 || Object.keys(darkAliases).length > 0) {
|
|
92
|
-
css += rule(
|
|
217
|
+
css += rule(`${scope}[data-theme='dark']`, { ...darkAliases, ...darkTokens });
|
|
93
218
|
}
|
|
94
219
|
return css;
|
|
95
220
|
}
|
package/dist/types/chat.d.ts
CHANGED
|
@@ -27,6 +27,12 @@ export interface ChatRequest {
|
|
|
27
27
|
workflowState: unknown;
|
|
28
28
|
/** Optional conversation history for context */
|
|
29
29
|
history?: ChatHistoryMessage[];
|
|
30
|
+
/**
|
|
31
|
+
* The run the person attached (a pipeline id, digits only). Sent on
|
|
32
|
+
* tool-calling turns only, where a server with run tools reads it; a server
|
|
33
|
+
* that does not know the field ignores it.
|
|
34
|
+
*/
|
|
35
|
+
attachedRunId?: string;
|
|
30
36
|
}
|
|
31
37
|
/**
|
|
32
38
|
* Response payload from the chat endpoint
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doctor types: the problems a backend finds in the editor's draft and the
|
|
3
|
+
* remedies it offers for them.
|
|
4
|
+
*
|
|
5
|
+
* `code` is an opaque string. The editor badges by `severity`, shows `message`
|
|
6
|
+
* verbatim and offers exactly the `remedies` it is given; it hard-codes no
|
|
7
|
+
* diagnostic.
|
|
8
|
+
*
|
|
9
|
+
* @module types/doctor
|
|
10
|
+
*/
|
|
11
|
+
import type { Workflow, WorkflowEdge, WorkflowNode } from './index.js';
|
|
12
|
+
export type DoctorSeverity = 'error' | 'warning' | 'info';
|
|
13
|
+
/** One fix the server offers for a problem. */
|
|
14
|
+
export interface DoctorRemedy {
|
|
15
|
+
id: string;
|
|
16
|
+
label: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
/** The fix removes something: the editor asks first. */
|
|
19
|
+
destructive: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* What the remedy needs from the person. Today `choices` (value => label)
|
|
22
|
+
* for a remedy that must be told which one (`replace_node_type`); the chosen
|
|
23
|
+
* value goes back as `params[<name>]`.
|
|
24
|
+
*/
|
|
25
|
+
params?: {
|
|
26
|
+
choices?: Record<string, string>;
|
|
27
|
+
} & Record<string, unknown>;
|
|
28
|
+
}
|
|
29
|
+
/** One finding on the draft. */
|
|
30
|
+
export interface DoctorProblem {
|
|
31
|
+
/** Stable for the same finding on the same draft; the `target` of a remedy. */
|
|
32
|
+
id: string;
|
|
33
|
+
code: string;
|
|
34
|
+
severity: DoctorSeverity;
|
|
35
|
+
message: string;
|
|
36
|
+
/** The node, port (of that node) and edge the problem is about, when it is about one. */
|
|
37
|
+
node?: string;
|
|
38
|
+
port?: string;
|
|
39
|
+
edge?: string;
|
|
40
|
+
remedies: DoctorRemedy[];
|
|
41
|
+
}
|
|
42
|
+
/** The operation vocabulary a remedy answers with. Applied in order. */
|
|
43
|
+
export type DoctorOperation = {
|
|
44
|
+
op: 'removeEdge';
|
|
45
|
+
edgeId: string;
|
|
46
|
+
} | {
|
|
47
|
+
op: 'removeNode';
|
|
48
|
+
nodeId: string;
|
|
49
|
+
} | {
|
|
50
|
+
op: 'addNode';
|
|
51
|
+
node: WorkflowNode;
|
|
52
|
+
} | {
|
|
53
|
+
op: 'updateNodeConfig';
|
|
54
|
+
nodeId: string;
|
|
55
|
+
patch: Record<string, unknown>;
|
|
56
|
+
unset: string[];
|
|
57
|
+
} | {
|
|
58
|
+
op: 'updateNodeData';
|
|
59
|
+
nodeId: string;
|
|
60
|
+
patch: Record<string, unknown>;
|
|
61
|
+
unset: string[];
|
|
62
|
+
} | {
|
|
63
|
+
op: 'updateNode';
|
|
64
|
+
nodeId: string;
|
|
65
|
+
patch: Record<string, unknown>;
|
|
66
|
+
unset: string[];
|
|
67
|
+
} | {
|
|
68
|
+
op: 'updateEdge';
|
|
69
|
+
edgeId: string;
|
|
70
|
+
patch: Record<string, unknown>;
|
|
71
|
+
unset: string[];
|
|
72
|
+
} | {
|
|
73
|
+
op: 'addEdge';
|
|
74
|
+
edge: WorkflowEdge;
|
|
75
|
+
} | {
|
|
76
|
+
op: 'setInterface';
|
|
77
|
+
interface: NonNullable<Workflow['interface']>;
|
|
78
|
+
} | {
|
|
79
|
+
op: 'setWorkflowPayload';
|
|
80
|
+
key: string;
|
|
81
|
+
value: unknown;
|
|
82
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Doctor types: the problems a backend finds in the editor's draft and the
|
|
3
|
+
* remedies it offers for them.
|
|
4
|
+
*
|
|
5
|
+
* `code` is an opaque string. The editor badges by `severity`, shows `message`
|
|
6
|
+
* verbatim and offers exactly the `remedies` it is given; it hard-codes no
|
|
7
|
+
* diagnostic.
|
|
8
|
+
*
|
|
9
|
+
* @module types/doctor
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
package/dist/types/events.d.ts
CHANGED
|
@@ -244,6 +244,41 @@ export interface FlowDropFeatures {
|
|
|
244
244
|
* @default true
|
|
245
245
|
*/
|
|
246
246
|
assistant?: boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Offer Test mode: the Edit | Test switch in the canvas toolbar. Test mode docks the
|
|
249
|
+
* Playground beside the canvas and keeps the inspector open, for testing a
|
|
250
|
+
* workflow while you edit it.
|
|
251
|
+
*
|
|
252
|
+
* The switch is only shown for a saved workflow on an editable canvas
|
|
253
|
+
* (`mode: 'edit'`, no `pipelineId`). A host that wants to drive the mode
|
|
254
|
+
* itself uses `instance.editorMode` (and the
|
|
255
|
+
* `editorMode` option to start in Test). Turn this off for a backend that
|
|
256
|
+
* has no Playground endpoints.
|
|
257
|
+
*
|
|
258
|
+
* @default true
|
|
259
|
+
*/
|
|
260
|
+
testMode?: boolean;
|
|
261
|
+
/**
|
|
262
|
+
* Offer the Runs list in Test mode: a "Runs" control in the canvas toolbar
|
|
263
|
+
* listing the workflow's past runs (from `endpoints.pipelines.list`), where
|
|
264
|
+
* opening one shows its node statuses on the canvas. Turn this off for a
|
|
265
|
+
* backend that has no pipelines list.
|
|
266
|
+
*
|
|
267
|
+
* @default true
|
|
268
|
+
*/
|
|
269
|
+
runsList?: boolean;
|
|
270
|
+
/**
|
|
271
|
+
* Where the host's admin pages for runs live, as URL templates (`{workflowId}`
|
|
272
|
+
* and `{pipelineId}` are filled in). `runs` is the Runs list's "Open in admin"
|
|
273
|
+
* link, `run` the link on each row. A link without a template is not drawn:
|
|
274
|
+
* FlowDrop hard-codes no host paths.
|
|
275
|
+
*
|
|
276
|
+
* @example { runs: '/admin/flowdrop/pipelines?workflow={workflowId}' }
|
|
277
|
+
*/
|
|
278
|
+
adminLinks?: {
|
|
279
|
+
runs?: string;
|
|
280
|
+
run?: string;
|
|
281
|
+
};
|
|
247
282
|
}
|
|
248
283
|
/**
|
|
249
284
|
* Default feature values
|
package/dist/types/events.js
CHANGED
|
@@ -18,7 +18,10 @@ export const DEFAULT_FEATURES = {
|
|
|
18
18
|
enableNodeSwap: true,
|
|
19
19
|
builtinEditors: true,
|
|
20
20
|
console: true,
|
|
21
|
-
assistant: true
|
|
21
|
+
assistant: true,
|
|
22
|
+
testMode: true,
|
|
23
|
+
runsList: true,
|
|
24
|
+
adminLinks: {}
|
|
22
25
|
};
|
|
23
26
|
/**
|
|
24
27
|
* Merge user-provided features with defaults
|