@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
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
|
|
7
7
|
<script lang="ts">
|
|
8
8
|
import type { NodePort } from '../types/index.js';
|
|
9
|
+
import Select from './primitives/Select.svelte';
|
|
10
|
+
import type { SelectOption } from '../utils/selectOptions.js';
|
|
9
11
|
import type { EditablePortMapping, MatchQuality } from '../utils/nodeSwap.js';
|
|
10
12
|
|
|
11
13
|
interface Props {
|
|
@@ -34,11 +36,19 @@
|
|
|
34
36
|
unmapped: 'port-mapping-row__badge--unmapped'
|
|
35
37
|
};
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
39
|
+
const DROP = '__drop__';
|
|
40
|
+
|
|
41
|
+
const options = $derived<SelectOption[]>([
|
|
42
|
+
{ value: DROP, label: '(Drop connection)' },
|
|
43
|
+
...availablePorts.map((port) => {
|
|
44
|
+
const inUse = usedPortIds.has(port.id) && port.id !== mapping.selectedNewPortId;
|
|
45
|
+
return {
|
|
46
|
+
value: port.id,
|
|
47
|
+
label: `${port.name} (${port.dataType})${inUse ? ' (in use)' : ''}`,
|
|
48
|
+
disabled: inUse
|
|
49
|
+
};
|
|
50
|
+
})
|
|
51
|
+
]);
|
|
42
52
|
</script>
|
|
43
53
|
|
|
44
54
|
<div class="port-mapping-row">
|
|
@@ -49,26 +59,17 @@
|
|
|
49
59
|
|
|
50
60
|
<div class="port-mapping-row__arrow">→</div>
|
|
51
61
|
|
|
52
|
-
<div
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
{
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
disabled={usedPortIds.has(port.id) && port.id !== mapping.selectedNewPortId}
|
|
64
|
-
>
|
|
65
|
-
{port.name} ({port.dataType}){usedPortIds.has(port.id) &&
|
|
66
|
-
port.id !== mapping.selectedNewPortId
|
|
67
|
-
? ' (in use)'
|
|
68
|
-
: ''}
|
|
69
|
-
</option>
|
|
70
|
-
{/each}
|
|
71
|
-
</select>
|
|
62
|
+
<div
|
|
63
|
+
class="port-mapping-row__select-wrapper"
|
|
64
|
+
class:port-mapping-row__select-wrapper--dropped={!mapping.selectedNewPortId}
|
|
65
|
+
>
|
|
66
|
+
<Select
|
|
67
|
+
size="sm"
|
|
68
|
+
aria-label={`New port for ${mapping.oldPort.name}`}
|
|
69
|
+
{options}
|
|
70
|
+
value={mapping.selectedNewPortId ?? DROP}
|
|
71
|
+
onValueChange={(value) => onUpdate(value === DROP ? null : value)}
|
|
72
|
+
/>
|
|
72
73
|
</div>
|
|
73
74
|
|
|
74
75
|
<div class="port-mapping-row__meta">
|
|
@@ -121,25 +122,8 @@
|
|
|
121
122
|
min-width: 0;
|
|
122
123
|
}
|
|
123
124
|
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
padding: 0.25rem 0.375rem;
|
|
127
|
-
border: 1px solid var(--fd-border);
|
|
128
|
-
border-radius: var(--fd-radius-sm);
|
|
129
|
-
background-color: var(--fd-background);
|
|
130
|
-
color: var(--fd-foreground);
|
|
131
|
-
font-size: var(--fd-text-xs);
|
|
132
|
-
cursor: pointer;
|
|
133
|
-
transition:
|
|
134
|
-
border-color var(--fd-transition-normal),
|
|
135
|
-
box-shadow var(--fd-transition-normal);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.port-mapping-row__select:focus {
|
|
139
|
-
border-color: var(--fd-ring);
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.port-mapping-row__select--dropped {
|
|
125
|
+
/* An unmapped port reads as a warning: the field takes the warning colour. */
|
|
126
|
+
.port-mapping-row__select-wrapper--dropped :global(.flowdrop-input) {
|
|
143
127
|
border-color: var(--fd-warning);
|
|
144
128
|
color: var(--fd-warning);
|
|
145
129
|
}
|
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
<!--
|
|
2
|
+
PortPickerListbox — a searchable, grouped listbox of ports.
|
|
3
|
+
|
|
4
|
+
The shared body of the port pickers: the workflow interface's
|
|
5
|
+
`BindablePortListbox` and the "Connect to…" popover. The caller supplies the
|
|
6
|
+
groups and what each row says; this owns the search query, the highlight and
|
|
7
|
+
the keyboard handling (arrows, Home/End, Enter to confirm, Escape to cancel,
|
|
8
|
+
as a roving `aria-activedescendant`, so the options carry no key handlers).
|
|
9
|
+
|
|
10
|
+
Each row wears the same two chips a port row wears on the canvas — the shape
|
|
11
|
+
symbol in the lane's colour and the outlined lane-name chip — so a candidate
|
|
12
|
+
is recognisable as the port it points at, and the fixed-width symbol keeps
|
|
13
|
+
the rows aligned whatever the type name's length.
|
|
14
|
+
|
|
15
|
+
What a confirmed pick means belongs to the caller.
|
|
16
|
+
-->
|
|
17
|
+
|
|
18
|
+
<script lang="ts" module>
|
|
19
|
+
import type { NodePort } from '../types/index.js';
|
|
20
|
+
|
|
21
|
+
/** A chip on a row. */
|
|
22
|
+
export interface PortPickerBadge {
|
|
23
|
+
label: string;
|
|
24
|
+
tone: 'primary' | 'warning' | 'secondary' | 'outline';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/** One pickable port. */
|
|
28
|
+
export interface PortPickerOption<T = unknown> {
|
|
29
|
+
/** Unique across the whole list. */
|
|
30
|
+
key: string;
|
|
31
|
+
nodeId: string;
|
|
32
|
+
nodeLabel: string;
|
|
33
|
+
port: NodePort;
|
|
34
|
+
badges?: PortPickerBadge[];
|
|
35
|
+
/** Drawn quieter; still pickable. */
|
|
36
|
+
dimmed?: boolean;
|
|
37
|
+
/** The row the caller is already on; kept at full strength. */
|
|
38
|
+
current?: boolean;
|
|
39
|
+
/** What the caller wants back on confirm. */
|
|
40
|
+
value: T;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** A titled run of options. */
|
|
44
|
+
export interface PortPickerGroup<T = unknown> {
|
|
45
|
+
title: string;
|
|
46
|
+
options: PortPickerOption<T>[];
|
|
47
|
+
}
|
|
48
|
+
</script>
|
|
49
|
+
|
|
50
|
+
<script lang="ts" generics="T">
|
|
51
|
+
import Icon from '@iconify/svelte';
|
|
52
|
+
import Input from './Input.svelte';
|
|
53
|
+
import PortShapeSymbol from './ports/PortShapeSymbol.svelte';
|
|
54
|
+
import PortLaneChip from './ports/PortLaneChip.svelte';
|
|
55
|
+
import type { PortCompatibilityChecker } from '../utils/connections.js';
|
|
56
|
+
import { focusOnMount } from '../utils/focus.js';
|
|
57
|
+
import { m } from '../messages/index.js';
|
|
58
|
+
|
|
59
|
+
interface Props {
|
|
60
|
+
/** The rows, in display order; empty groups are not drawn. */
|
|
61
|
+
groups: PortPickerGroup<T>[];
|
|
62
|
+
/** The instance's checker — source of each row's shape symbol and lane colour. */
|
|
63
|
+
checker: PortCompatibilityChecker;
|
|
64
|
+
/** Unique per listbox on the page; option ids are derived from it. */
|
|
65
|
+
idPrefix: string;
|
|
66
|
+
searchLabel: string;
|
|
67
|
+
searchPlaceholder: string;
|
|
68
|
+
/** aria-label of the listbox. */
|
|
69
|
+
listLabel: string;
|
|
70
|
+
/** Shown when there are no options at all. */
|
|
71
|
+
emptyText: string;
|
|
72
|
+
/** Shown when the search leaves nothing. */
|
|
73
|
+
noMatchesText: string;
|
|
74
|
+
/** A single click confirms (select-like) instead of only highlighting. */
|
|
75
|
+
confirmOnClick?: boolean;
|
|
76
|
+
/** Take keyboard focus when rendered — the list is a modal moment. */
|
|
77
|
+
autofocus?: boolean;
|
|
78
|
+
onHighlight?: (option: PortPickerOption<T> | undefined) => void;
|
|
79
|
+
onConfirm: (option: PortPickerOption<T>) => void;
|
|
80
|
+
onCancel?: () => void;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const {
|
|
84
|
+
groups,
|
|
85
|
+
checker,
|
|
86
|
+
idPrefix,
|
|
87
|
+
searchLabel,
|
|
88
|
+
searchPlaceholder,
|
|
89
|
+
listLabel,
|
|
90
|
+
emptyText,
|
|
91
|
+
noMatchesText,
|
|
92
|
+
confirmOnClick = false,
|
|
93
|
+
autofocus = false,
|
|
94
|
+
onHighlight,
|
|
95
|
+
onConfirm,
|
|
96
|
+
onCancel
|
|
97
|
+
}: Props = $props();
|
|
98
|
+
|
|
99
|
+
const msgs = $derived(m().connectTo);
|
|
100
|
+
|
|
101
|
+
let query = $state('');
|
|
102
|
+
let listEl = $state<HTMLElement>();
|
|
103
|
+
let highlightedKey = $state<string | null>(null);
|
|
104
|
+
|
|
105
|
+
const total = $derived(groups.reduce((sum, group) => sum + group.options.length, 0));
|
|
106
|
+
|
|
107
|
+
const filteredGroups = $derived.by(() => {
|
|
108
|
+
const q = query.trim().toLowerCase();
|
|
109
|
+
if (!q) return groups.filter((group) => group.options.length > 0);
|
|
110
|
+
return groups
|
|
111
|
+
.map((group) => ({
|
|
112
|
+
...group,
|
|
113
|
+
options: group.options.filter((option) =>
|
|
114
|
+
[
|
|
115
|
+
option.nodeLabel,
|
|
116
|
+
option.port.name,
|
|
117
|
+
option.port.id,
|
|
118
|
+
option.port.dataType,
|
|
119
|
+
option.port.description ?? ''
|
|
120
|
+
].some((text) => text.toLowerCase().includes(q))
|
|
121
|
+
)
|
|
122
|
+
}))
|
|
123
|
+
.filter((group) => group.options.length > 0);
|
|
124
|
+
});
|
|
125
|
+
|
|
126
|
+
/** Every visible option, in display order (what the arrow keys walk). */
|
|
127
|
+
const filtered = $derived(filteredGroups.flatMap((group) => group.options));
|
|
128
|
+
|
|
129
|
+
const highlighted = $derived(
|
|
130
|
+
highlightedKey === null
|
|
131
|
+
? undefined
|
|
132
|
+
: groups.flatMap((g) => g.options).find((o) => o.key === highlightedKey)
|
|
133
|
+
);
|
|
134
|
+
|
|
135
|
+
function highlight(option: PortPickerOption<T> | undefined): void {
|
|
136
|
+
highlightedKey = option ? option.key : null;
|
|
137
|
+
onHighlight?.(option);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* A DOM id for an option. Node and port ids can hold any character, so each
|
|
142
|
+
* one outside `[A-Za-z0-9-]` — the underscore included — is written as `_`
|
|
143
|
+
* plus its hex code point. Reversible, so `a.b` and `a_b` cannot collide.
|
|
144
|
+
*/
|
|
145
|
+
function optionId(option: PortPickerOption<T>): string {
|
|
146
|
+
const raw = `${option.nodeId}-${option.port.id}`;
|
|
147
|
+
const safe = raw.replace(/[^A-Za-z0-9-]/g, (c) => `_${c.codePointAt(0)!.toString(16)}`);
|
|
148
|
+
return `${idPrefix}-${safe}`;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
function pick(option: PortPickerOption<T>): void {
|
|
152
|
+
highlight(option);
|
|
153
|
+
if (confirmOnClick) onConfirm(option);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
// Keep the highlighted row in view as the keys walk a long list.
|
|
157
|
+
$effect(() => {
|
|
158
|
+
if (!highlighted || !listEl) return;
|
|
159
|
+
listEl.querySelector<HTMLElement>(`#${CSS.escape(optionId(highlighted))}`)?.scrollIntoView?.({
|
|
160
|
+
block: 'nearest'
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
function handleKeydown(event: KeyboardEvent): void {
|
|
165
|
+
// In the search field Home/End keep moving the caret once there is text.
|
|
166
|
+
if ((event.key === 'Home' || event.key === 'End') && event.target !== event.currentTarget) {
|
|
167
|
+
if (query !== '') return;
|
|
168
|
+
}
|
|
169
|
+
if (event.key === 'Escape') {
|
|
170
|
+
event.preventDefault();
|
|
171
|
+
onCancel?.();
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
if (filtered.length === 0) return;
|
|
175
|
+
const index = highlighted ? filtered.findIndex((o) => o.key === highlighted.key) : -1;
|
|
176
|
+
if (event.key === 'ArrowDown') {
|
|
177
|
+
event.preventDefault();
|
|
178
|
+
highlight(filtered[Math.min(index + 1, filtered.length - 1)]);
|
|
179
|
+
} else if (event.key === 'ArrowUp') {
|
|
180
|
+
event.preventDefault();
|
|
181
|
+
highlight(filtered[Math.max(index - 1, 0)]);
|
|
182
|
+
} else if (event.key === 'Home') {
|
|
183
|
+
event.preventDefault();
|
|
184
|
+
highlight(filtered[0]);
|
|
185
|
+
} else if (event.key === 'End') {
|
|
186
|
+
event.preventDefault();
|
|
187
|
+
highlight(filtered[filtered.length - 1]);
|
|
188
|
+
} else if (event.key === 'Enter') {
|
|
189
|
+
event.preventDefault();
|
|
190
|
+
if (highlighted) onConfirm(highlighted);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
</script>
|
|
194
|
+
|
|
195
|
+
<div class="wf-portlist">
|
|
196
|
+
{#if total > 0}
|
|
197
|
+
<Input
|
|
198
|
+
size="sm"
|
|
199
|
+
type="search"
|
|
200
|
+
value={query}
|
|
201
|
+
placeholder={searchPlaceholder}
|
|
202
|
+
aria-label={searchLabel}
|
|
203
|
+
aria-controls="{idPrefix}-list"
|
|
204
|
+
aria-activedescendant={highlighted ? optionId(highlighted) : undefined}
|
|
205
|
+
onkeydown={handleKeydown}
|
|
206
|
+
oninput={(e) => (query = e.currentTarget.value)}
|
|
207
|
+
>
|
|
208
|
+
{#snippet leading()}
|
|
209
|
+
<Icon icon="heroicons:magnifying-glass" />
|
|
210
|
+
{/snippet}
|
|
211
|
+
</Input>
|
|
212
|
+
{/if}
|
|
213
|
+
|
|
214
|
+
<!-- With no rows the box is a status message, not a listbox (a listbox may only
|
|
215
|
+
own options and groups); it stays focusable so Escape still cancels. -->
|
|
216
|
+
<!-- svelte-ignore a11y_no_noninteractive_tabindex -->
|
|
217
|
+
<div
|
|
218
|
+
id="{idPrefix}-list"
|
|
219
|
+
class="wf-portlist__list"
|
|
220
|
+
role={filtered.length > 0 ? 'listbox' : 'status'}
|
|
221
|
+
tabindex="0"
|
|
222
|
+
bind:this={listEl}
|
|
223
|
+
{@attach focusOnMount(autofocus)}
|
|
224
|
+
aria-label={filtered.length > 0 ? listLabel : undefined}
|
|
225
|
+
aria-activedescendant={filtered.length > 0 && highlighted ? optionId(highlighted) : undefined}
|
|
226
|
+
onkeydown={handleKeydown}
|
|
227
|
+
>
|
|
228
|
+
{#if total === 0}
|
|
229
|
+
<p class="wf-portlist__empty">{emptyText}</p>
|
|
230
|
+
{:else if filtered.length === 0}
|
|
231
|
+
<p class="wf-portlist__empty">{noMatchesText}</p>
|
|
232
|
+
{:else}
|
|
233
|
+
{#snippet row(option: PortPickerOption<T>)}
|
|
234
|
+
{@const isHighlighted = highlighted !== undefined && highlighted.key === option.key}
|
|
235
|
+
<!-- Keyboard handling lives on the listbox (roving aria-activedescendant),
|
|
236
|
+
so the option itself needs no key handler. -->
|
|
237
|
+
<!-- svelte-ignore a11y_click_events_have_key_events -->
|
|
238
|
+
<div
|
|
239
|
+
id={optionId(option)}
|
|
240
|
+
class="wf-portlist__option"
|
|
241
|
+
class:wf-portlist__option--highlighted={isHighlighted}
|
|
242
|
+
class:wf-portlist__option--current={option.current}
|
|
243
|
+
class:wf-portlist__option--taken={option.dimmed}
|
|
244
|
+
role="option"
|
|
245
|
+
tabindex="-1"
|
|
246
|
+
aria-selected={isHighlighted}
|
|
247
|
+
onclick={() => pick(option)}
|
|
248
|
+
ondblclick={() => onConfirm(option)}
|
|
249
|
+
>
|
|
250
|
+
<PortShapeSymbol {checker} port={option.port} />
|
|
251
|
+
<span class="wf-portlist__option-body">
|
|
252
|
+
<span class="wf-portlist__option-path">
|
|
253
|
+
<span class="wf-portlist__option-node">{option.nodeLabel}</span>
|
|
254
|
+
<Icon icon="heroicons:chevron-right" />
|
|
255
|
+
<span class="wf-portlist__option-port">{option.port.name}</span>
|
|
256
|
+
<PortLaneChip {checker} port={option.port} />
|
|
257
|
+
{#if option.current}
|
|
258
|
+
<span class="wf-portlist__sr">, {msgs.optionCurrent}</span>
|
|
259
|
+
{/if}
|
|
260
|
+
{#if option.dimmed}
|
|
261
|
+
<span class="wf-portlist__sr">, {msgs.optionTaken}</span>
|
|
262
|
+
{/if}
|
|
263
|
+
</span>
|
|
264
|
+
{#if option.port.description}
|
|
265
|
+
<span class="wf-portlist__option-desc">{option.port.description}</span>
|
|
266
|
+
{/if}
|
|
267
|
+
{#if option.badges && option.badges.length > 0}
|
|
268
|
+
<span class="wf-portlist__option-flags">
|
|
269
|
+
{#each option.badges as badge (badge.label)}
|
|
270
|
+
<span class="flowdrop-badge flowdrop-badge--sm flowdrop-badge--{badge.tone}">
|
|
271
|
+
{badge.label}
|
|
272
|
+
</span>
|
|
273
|
+
{/each}
|
|
274
|
+
</span>
|
|
275
|
+
{/if}
|
|
276
|
+
</span>
|
|
277
|
+
<span class="wf-portlist__option-check" aria-hidden="true">
|
|
278
|
+
<Icon icon="heroicons:check" />
|
|
279
|
+
</span>
|
|
280
|
+
</div>
|
|
281
|
+
{/snippet}
|
|
282
|
+
|
|
283
|
+
{#each filteredGroups as group, groupIndex (group.title)}
|
|
284
|
+
<div
|
|
285
|
+
class="wf-portlist__group"
|
|
286
|
+
role="group"
|
|
287
|
+
aria-labelledby="{idPrefix}-group-{groupIndex}"
|
|
288
|
+
>
|
|
289
|
+
<span class="wf-portlist__group-title" id="{idPrefix}-group-{groupIndex}"
|
|
290
|
+
>{group.title}</span
|
|
291
|
+
>
|
|
292
|
+
{#each group.options as option (option.key)}
|
|
293
|
+
{@render row(option)}
|
|
294
|
+
{/each}
|
|
295
|
+
</div>
|
|
296
|
+
{/each}
|
|
297
|
+
{/if}
|
|
298
|
+
</div>
|
|
299
|
+
</div>
|
|
300
|
+
|
|
301
|
+
<style>
|
|
302
|
+
.wf-portlist {
|
|
303
|
+
display: flex;
|
|
304
|
+
flex-direction: column;
|
|
305
|
+
gap: var(--fd-space-xs);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
.wf-portlist__list {
|
|
309
|
+
display: flex;
|
|
310
|
+
flex-direction: column;
|
|
311
|
+
gap: var(--fd-space-xs);
|
|
312
|
+
max-height: 18rem;
|
|
313
|
+
overflow-y: auto;
|
|
314
|
+
padding: var(--fd-space-2xs);
|
|
315
|
+
border: 1px solid var(--fd-border);
|
|
316
|
+
border-radius: var(--fd-radius-md);
|
|
317
|
+
background-color: var(--fd-card);
|
|
318
|
+
scrollbar-width: thin;
|
|
319
|
+
scrollbar-color: var(--fd-scrollbar-thumb) var(--fd-scrollbar-track);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.wf-portlist__list:focus-visible {
|
|
323
|
+
outline: none;
|
|
324
|
+
border-color: var(--fd-primary);
|
|
325
|
+
box-shadow: 0 0 0 var(--fd-ring-width) var(--fd-primary-muted);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.wf-portlist__sr {
|
|
329
|
+
position: absolute;
|
|
330
|
+
width: 1px;
|
|
331
|
+
height: 1px;
|
|
332
|
+
overflow: hidden;
|
|
333
|
+
clip-path: inset(50%);
|
|
334
|
+
white-space: nowrap;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
.wf-portlist__empty {
|
|
338
|
+
margin: 0;
|
|
339
|
+
padding: var(--fd-space-md) var(--fd-space-sm);
|
|
340
|
+
font-size: var(--fd-text-xs);
|
|
341
|
+
line-height: 1.5;
|
|
342
|
+
text-align: center;
|
|
343
|
+
color: var(--fd-muted-foreground);
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
.wf-portlist__group {
|
|
347
|
+
display: flex;
|
|
348
|
+
flex-direction: column;
|
|
349
|
+
gap: 0.125rem;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
.wf-portlist__group-title {
|
|
353
|
+
padding: var(--fd-space-2xs) var(--fd-space-xs);
|
|
354
|
+
font-size: var(--fd-text-2xs);
|
|
355
|
+
font-weight: 600;
|
|
356
|
+
color: var(--fd-muted-foreground);
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
.wf-portlist__option {
|
|
360
|
+
display: flex;
|
|
361
|
+
align-items: flex-start;
|
|
362
|
+
gap: var(--fd-space-xs);
|
|
363
|
+
padding: var(--fd-space-xs);
|
|
364
|
+
border: 1px solid transparent;
|
|
365
|
+
border-radius: var(--fd-radius-md);
|
|
366
|
+
cursor: pointer;
|
|
367
|
+
transition:
|
|
368
|
+
background-color var(--fd-transition-fast),
|
|
369
|
+
border-color var(--fd-transition-fast);
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.wf-portlist__option:hover {
|
|
373
|
+
background-color: var(--fd-muted);
|
|
374
|
+
}
|
|
375
|
+
|
|
376
|
+
.wf-portlist__option--highlighted,
|
|
377
|
+
.wf-portlist__option--highlighted:hover {
|
|
378
|
+
border-color: var(--fd-primary);
|
|
379
|
+
background-color: var(--fd-primary-muted);
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.wf-portlist__option--taken .wf-portlist__option-node,
|
|
383
|
+
.wf-portlist__option--taken .wf-portlist__option-port {
|
|
384
|
+
color: var(--fd-muted-foreground);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
.wf-portlist__option--taken :global(.flowdrop-port-symbol),
|
|
388
|
+
.wf-portlist__option--taken :global(.flowdrop-badge--outline) {
|
|
389
|
+
opacity: 0.7;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
/* The entry's own port is "taken" by itself; do not grey it out. */
|
|
393
|
+
.wf-portlist__option--current .wf-portlist__option-node,
|
|
394
|
+
.wf-portlist__option--current .wf-portlist__option-port {
|
|
395
|
+
color: var(--fd-foreground);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.wf-portlist__option--current :global(.flowdrop-port-symbol),
|
|
399
|
+
.wf-portlist__option--current :global(.flowdrop-badge--outline) {
|
|
400
|
+
opacity: 1;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
/* The lane chip is quiet on purpose; keep it from stretching a wrapped path. */
|
|
404
|
+
.wf-portlist__option-path :global(.flowdrop-badge--outline) {
|
|
405
|
+
flex: none;
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
.wf-portlist__option-body {
|
|
409
|
+
display: flex;
|
|
410
|
+
flex-direction: column;
|
|
411
|
+
gap: 0.125rem;
|
|
412
|
+
flex: 1;
|
|
413
|
+
min-width: 0;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
.wf-portlist__option-path {
|
|
417
|
+
display: inline-flex;
|
|
418
|
+
align-items: center;
|
|
419
|
+
flex-wrap: wrap;
|
|
420
|
+
gap: 0.125rem;
|
|
421
|
+
font-size: var(--fd-text-xs);
|
|
422
|
+
line-height: 1.4;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
.wf-portlist__option-path :global(svg) {
|
|
426
|
+
flex-shrink: 0;
|
|
427
|
+
color: var(--fd-muted-foreground);
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
.wf-portlist__option-node {
|
|
431
|
+
color: var(--fd-muted-foreground);
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.wf-portlist__option-port {
|
|
435
|
+
font-weight: 600;
|
|
436
|
+
color: var(--fd-foreground);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
.wf-portlist__option-desc {
|
|
440
|
+
font-size: var(--fd-text-2xs);
|
|
441
|
+
line-height: 1.45;
|
|
442
|
+
color: var(--fd-muted-foreground);
|
|
443
|
+
display: -webkit-box;
|
|
444
|
+
-webkit-line-clamp: 2;
|
|
445
|
+
line-clamp: 2;
|
|
446
|
+
-webkit-box-orient: vertical;
|
|
447
|
+
overflow: hidden;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
.wf-portlist__option-flags {
|
|
451
|
+
display: flex;
|
|
452
|
+
flex-wrap: wrap;
|
|
453
|
+
gap: var(--fd-space-2xs);
|
|
454
|
+
margin-top: 0.125rem;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.wf-portlist__option-flags :global(.flowdrop-badge) {
|
|
458
|
+
font-size: var(--fd-text-2xs);
|
|
459
|
+
line-height: 1.2;
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
.wf-portlist__option-check {
|
|
463
|
+
flex-shrink: 0;
|
|
464
|
+
display: inline-flex;
|
|
465
|
+
width: 1rem;
|
|
466
|
+
margin-top: 0.125rem;
|
|
467
|
+
color: var(--fd-primary);
|
|
468
|
+
opacity: 0;
|
|
469
|
+
transition: opacity var(--fd-transition-fast);
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
.wf-portlist__option--highlighted .wf-portlist__option-check {
|
|
473
|
+
opacity: 1;
|
|
474
|
+
}
|
|
475
|
+
</style>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { NodePort } from '../types/index.js';
|
|
2
|
+
/** A chip on a row. */
|
|
3
|
+
export interface PortPickerBadge {
|
|
4
|
+
label: string;
|
|
5
|
+
tone: 'primary' | 'warning' | 'secondary' | 'outline';
|
|
6
|
+
}
|
|
7
|
+
/** One pickable port. */
|
|
8
|
+
export interface PortPickerOption<T = unknown> {
|
|
9
|
+
/** Unique across the whole list. */
|
|
10
|
+
key: string;
|
|
11
|
+
nodeId: string;
|
|
12
|
+
nodeLabel: string;
|
|
13
|
+
port: NodePort;
|
|
14
|
+
badges?: PortPickerBadge[];
|
|
15
|
+
/** Drawn quieter; still pickable. */
|
|
16
|
+
dimmed?: boolean;
|
|
17
|
+
/** The row the caller is already on; kept at full strength. */
|
|
18
|
+
current?: boolean;
|
|
19
|
+
/** What the caller wants back on confirm. */
|
|
20
|
+
value: T;
|
|
21
|
+
}
|
|
22
|
+
/** A titled run of options. */
|
|
23
|
+
export interface PortPickerGroup<T = unknown> {
|
|
24
|
+
title: string;
|
|
25
|
+
options: PortPickerOption<T>[];
|
|
26
|
+
}
|
|
27
|
+
import type { PortCompatibilityChecker } from '../utils/connections.js';
|
|
28
|
+
declare function $$render<T>(): {
|
|
29
|
+
props: {
|
|
30
|
+
/** The rows, in display order; empty groups are not drawn. */
|
|
31
|
+
groups: PortPickerGroup<T>[];
|
|
32
|
+
/** The instance's checker — source of each row's shape symbol and lane colour. */
|
|
33
|
+
checker: PortCompatibilityChecker;
|
|
34
|
+
/** Unique per listbox on the page; option ids are derived from it. */
|
|
35
|
+
idPrefix: string;
|
|
36
|
+
searchLabel: string;
|
|
37
|
+
searchPlaceholder: string;
|
|
38
|
+
/** aria-label of the listbox. */
|
|
39
|
+
listLabel: string;
|
|
40
|
+
/** Shown when there are no options at all. */
|
|
41
|
+
emptyText: string;
|
|
42
|
+
/** Shown when the search leaves nothing. */
|
|
43
|
+
noMatchesText: string;
|
|
44
|
+
/** A single click confirms (select-like) instead of only highlighting. */
|
|
45
|
+
confirmOnClick?: boolean;
|
|
46
|
+
/** Take keyboard focus when rendered — the list is a modal moment. */
|
|
47
|
+
autofocus?: boolean;
|
|
48
|
+
onHighlight?: (option: PortPickerOption<T> | undefined) => void;
|
|
49
|
+
onConfirm: (option: PortPickerOption<T>) => void;
|
|
50
|
+
onCancel?: () => void;
|
|
51
|
+
};
|
|
52
|
+
exports: {};
|
|
53
|
+
bindings: "";
|
|
54
|
+
slots: {};
|
|
55
|
+
events: {};
|
|
56
|
+
};
|
|
57
|
+
declare class __sveltets_Render<T> {
|
|
58
|
+
props(): ReturnType<typeof $$render<T>>['props'];
|
|
59
|
+
events(): ReturnType<typeof $$render<T>>['events'];
|
|
60
|
+
slots(): ReturnType<typeof $$render<T>>['slots'];
|
|
61
|
+
bindings(): "";
|
|
62
|
+
exports(): {};
|
|
63
|
+
}
|
|
64
|
+
interface $$IsomorphicComponent {
|
|
65
|
+
new <T>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<T>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<T>['props']>, ReturnType<__sveltets_Render<T>['events']>, ReturnType<__sveltets_Render<T>['slots']>> & {
|
|
66
|
+
$$bindings?: ReturnType<__sveltets_Render<T>['bindings']>;
|
|
67
|
+
} & ReturnType<__sveltets_Render<T>['exports']>;
|
|
68
|
+
<T>(internal: unknown, props: ReturnType<__sveltets_Render<T>['props']> & {}): ReturnType<__sveltets_Render<T>['exports']>;
|
|
69
|
+
z_$$bindings?: ReturnType<__sveltets_Render<any>['bindings']>;
|
|
70
|
+
}
|
|
71
|
+
declare const PortPickerListbox: $$IsomorphicComponent;
|
|
72
|
+
type PortPickerListbox<T> = InstanceType<typeof PortPickerListbox<T>>;
|
|
73
|
+
export default PortPickerListbox;
|