@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
|
@@ -10,6 +10,10 @@
|
|
|
10
10
|
parseCommand,
|
|
11
11
|
executeCommand,
|
|
12
12
|
executeBatch,
|
|
13
|
+
parseSessionCommand,
|
|
14
|
+
executeSessionCommand,
|
|
15
|
+
isSessionLine,
|
|
16
|
+
SESSION_HELP,
|
|
13
17
|
type UIAction,
|
|
14
18
|
type CommandContext,
|
|
15
19
|
type CommandResultOk,
|
|
@@ -24,6 +28,7 @@
|
|
|
24
28
|
import { createStoreCommandContext } from '../../commands/storeIntegration.svelte.js';
|
|
25
29
|
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
26
30
|
import { updateSettings, getUiSettings } from '../../stores/settingsStore.svelte.js';
|
|
31
|
+
import Button from '../primitives/Button.svelte';
|
|
27
32
|
import ConsoleInput from './ConsoleInput.svelte';
|
|
28
33
|
import ConsoleOutput, { type ConsoleEntry } from './ConsoleOutput.svelte';
|
|
29
34
|
import { m } from '../../messages/index.js';
|
|
@@ -37,14 +42,24 @@
|
|
|
37
42
|
formatHelp
|
|
38
43
|
} from './formatters.js';
|
|
39
44
|
|
|
45
|
+
const SESSION_HEADING = 'Session (editor Console only):';
|
|
46
|
+
|
|
40
47
|
interface Props {
|
|
41
48
|
/** Available node types for command execution */
|
|
42
49
|
nodeTypes: NodeMetadata[];
|
|
43
50
|
/** Callback for UI actions (open config, select node) */
|
|
44
51
|
onUIAction?: (action: UIAction) => void;
|
|
52
|
+
/** Id of the panel element, so the toggle strip can point `aria-controls` at it */
|
|
53
|
+
id?: string;
|
|
45
54
|
}
|
|
46
55
|
|
|
47
|
-
let { nodeTypes, onUIAction }: Props = $props();
|
|
56
|
+
let { nodeTypes, onUIAction, id }: Props = $props();
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Commands the empty state offers. Read-only on purpose: a click runs them,
|
|
60
|
+
* and none of them can change the workflow.
|
|
61
|
+
*/
|
|
62
|
+
const EXAMPLE_COMMANDS = ['list nodes', 'list types', 'help'] as const;
|
|
48
63
|
|
|
49
64
|
const fd = getInstance();
|
|
50
65
|
|
|
@@ -86,6 +101,23 @@
|
|
|
86
101
|
updateSettings({ ui: { consoleOpen: false } });
|
|
87
102
|
}
|
|
88
103
|
|
|
104
|
+
/**
|
|
105
|
+
* Run a `session …` line. These are asynchronous and talk to the backend, so
|
|
106
|
+
* they have their own lane: the input stays usable while one is in flight and
|
|
107
|
+
* its result is added when it lands.
|
|
108
|
+
*/
|
|
109
|
+
async function handleSessionSubmit(line: string) {
|
|
110
|
+
const parsed = parseSessionCommand(line);
|
|
111
|
+
if (!parsed.ok) {
|
|
112
|
+
outputEntries.push({ type: 'error', text: parsed.error });
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
const result = await executeSessionCommand(parsed.command, fd.runs);
|
|
116
|
+
outputEntries.push(
|
|
117
|
+
result.ok ? { type: 'success', text: result.message } : { type: 'error', text: result.error }
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
|
|
89
121
|
function handleCommandSubmit(value: string) {
|
|
90
122
|
const trimmed = value.trim();
|
|
91
123
|
if (!trimmed) return;
|
|
@@ -99,6 +131,18 @@
|
|
|
99
131
|
return;
|
|
100
132
|
}
|
|
101
133
|
|
|
134
|
+
// `help session` is answered here: the editing DSL does not know the verb.
|
|
135
|
+
if (/^help\s+session$/i.test(trimmed)) {
|
|
136
|
+
outputEntries.push({ type: 'formatted', text: formatHelp({ commands: SESSION_HELP }) });
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Session commands run in their own, asynchronous lane.
|
|
141
|
+
if (isSessionLine(trimmed)) {
|
|
142
|
+
void handleSessionSubmit(trimmed);
|
|
143
|
+
return;
|
|
144
|
+
}
|
|
145
|
+
|
|
102
146
|
// Parse the command
|
|
103
147
|
const parseResult = parseCommand(trimmed);
|
|
104
148
|
if (!parseResult.ok) {
|
|
@@ -121,12 +165,30 @@
|
|
|
121
165
|
} else {
|
|
122
166
|
outputEntries.push({ type: 'success', text: result.message });
|
|
123
167
|
}
|
|
168
|
+
// The Console also knows the session commands; `help` lists them too.
|
|
169
|
+
if (parseResult.command.type === 'help' && !parseResult.command.command) {
|
|
170
|
+
outputEntries.push({
|
|
171
|
+
type: 'formatted',
|
|
172
|
+
text: `${SESSION_HEADING}\n${formatHelp({ commands: SESSION_HELP })}`
|
|
173
|
+
});
|
|
174
|
+
}
|
|
124
175
|
} else {
|
|
125
176
|
outputEntries.push({ type: 'error', text: result.error });
|
|
126
177
|
}
|
|
127
178
|
}
|
|
128
179
|
|
|
129
180
|
function handleBatchSubmit(lines: string[]) {
|
|
181
|
+
// A batch is all-or-nothing and synchronous; a run is neither. Refuse
|
|
182
|
+
// before anything executes.
|
|
183
|
+
if (lines.some(isSessionLine)) {
|
|
184
|
+
for (const line of lines) outputEntries.push({ type: 'input', text: line });
|
|
185
|
+
outputEntries.push({
|
|
186
|
+
type: 'error',
|
|
187
|
+
text: 'session commands cannot be part of a batch. Nothing was run; send them one at a time.'
|
|
188
|
+
});
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
|
|
130
192
|
if (!commandContext) {
|
|
131
193
|
outputEntries.push({ type: 'error', text: 'No workflow loaded' });
|
|
132
194
|
return;
|
|
@@ -197,19 +259,24 @@
|
|
|
197
259
|
}
|
|
198
260
|
</script>
|
|
199
261
|
|
|
200
|
-
<div class="command-console" role="region" aria-label={m().layout.commandConsole}>
|
|
201
|
-
<div class="command-console__header">
|
|
202
|
-
<h2 class="command-console__title">{m().navigation.bottomPanel.console}</h2>
|
|
203
|
-
<button
|
|
204
|
-
class="command-console__close"
|
|
205
|
-
onclick={closeConsole}
|
|
206
|
-
aria-label={m().layout.closeConsole}
|
|
207
|
-
type="button"
|
|
208
|
-
>
|
|
209
|
-
×
|
|
210
|
-
</button>
|
|
211
|
-
</div>
|
|
262
|
+
<div class="command-console" {id} role="region" aria-label={m().layout.commandConsole}>
|
|
212
263
|
<div class="command-console__content">
|
|
264
|
+
{#if outputEntries.length === 0}
|
|
265
|
+
<div class="command-console__examples" data-testid="console-examples">
|
|
266
|
+
<span class="command-console__examples-label">{m().layout.consoleExamplesLabel}</span>
|
|
267
|
+
{#each EXAMPLE_COMMANDS as example (example)}
|
|
268
|
+
<Button
|
|
269
|
+
variant="ghost"
|
|
270
|
+
size="sm"
|
|
271
|
+
class="command-console__example"
|
|
272
|
+
onclick={() => handleCommandSubmit(example)}
|
|
273
|
+
>
|
|
274
|
+
<span aria-hidden="true">›</span>
|
|
275
|
+
{example}
|
|
276
|
+
</Button>
|
|
277
|
+
{/each}
|
|
278
|
+
</div>
|
|
279
|
+
{/if}
|
|
213
280
|
<ConsoleOutput entries={outputEntries} />
|
|
214
281
|
</div>
|
|
215
282
|
<ConsoleInput
|
|
@@ -226,43 +293,41 @@
|
|
|
226
293
|
height: 100%;
|
|
227
294
|
display: flex;
|
|
228
295
|
flex-direction: column;
|
|
229
|
-
|
|
296
|
+
/* Terminal surface: ink in every app theme and colour scheme. The strip above stays chrome. */
|
|
297
|
+
background-color: var(--fd-console-bg);
|
|
298
|
+
color: var(--fd-console-fg);
|
|
299
|
+
color-scheme: dark;
|
|
300
|
+
font-family: var(--fd-font-mono);
|
|
230
301
|
}
|
|
231
302
|
|
|
232
|
-
.command-
|
|
303
|
+
.command-console__examples {
|
|
233
304
|
display: flex;
|
|
234
|
-
|
|
235
|
-
align-items:
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
305
|
+
flex-direction: column;
|
|
306
|
+
align-items: flex-start;
|
|
307
|
+
gap: var(--fd-space-3xs);
|
|
308
|
+
padding: var(--fd-space-xs) var(--fd-space-md) 0;
|
|
309
|
+
font-family: var(--fd-font-mono);
|
|
310
|
+
font-size: var(--fd-text-sm);
|
|
311
|
+
color: var(--fd-console-muted);
|
|
240
312
|
}
|
|
241
313
|
|
|
242
|
-
.command-
|
|
243
|
-
|
|
244
|
-
font-size:
|
|
245
|
-
font-weight: 600;
|
|
246
|
-
color: var(--fd-foreground);
|
|
314
|
+
.command-console__examples-label {
|
|
315
|
+
font-family: var(--fd-font-sans);
|
|
316
|
+
font-size: var(--fd-text-meta);
|
|
247
317
|
}
|
|
248
318
|
|
|
249
|
-
.command-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
font-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
color: var(--fd-
|
|
256
|
-
padding: 0.25rem;
|
|
257
|
-
border-radius: var(--fd-radius-sm);
|
|
258
|
-
transition:
|
|
259
|
-
color var(--fd-transition-fast),
|
|
260
|
-
background-color var(--fd-transition-fast);
|
|
319
|
+
.command-console__examples :global(.command-console__example) {
|
|
320
|
+
height: auto;
|
|
321
|
+
padding: 0 var(--fd-space-3xs);
|
|
322
|
+
font-family: inherit;
|
|
323
|
+
font-size: inherit;
|
|
324
|
+
font-weight: normal;
|
|
325
|
+
color: var(--fd-console-arg);
|
|
261
326
|
}
|
|
262
327
|
|
|
263
|
-
.command-
|
|
264
|
-
color: var(--fd-
|
|
265
|
-
|
|
328
|
+
.command-console__examples :global(.command-console__example:hover) {
|
|
329
|
+
background-color: var(--fd-console-hover);
|
|
330
|
+
color: var(--fd-console-verb);
|
|
266
331
|
}
|
|
267
332
|
|
|
268
333
|
.command-console__content {
|
|
@@ -5,6 +5,8 @@ interface Props {
|
|
|
5
5
|
nodeTypes: NodeMetadata[];
|
|
6
6
|
/** Callback for UI actions (open config, select node) */
|
|
7
7
|
onUIAction?: (action: UIAction) => void;
|
|
8
|
+
/** Id of the panel element, so the toggle strip can point `aria-controls` at it */
|
|
9
|
+
id?: string;
|
|
8
10
|
}
|
|
9
11
|
declare const CommandConsole: import("svelte").Component<Props, {}, "">;
|
|
10
12
|
type CommandConsole = ReturnType<typeof CommandConsole>;
|
|
@@ -78,14 +78,14 @@
|
|
|
78
78
|
right: 0;
|
|
79
79
|
max-height: calc(8 * 2rem);
|
|
80
80
|
overflow-y: auto;
|
|
81
|
-
background-color: var(--fd-
|
|
82
|
-
border: 1px solid var(--fd-
|
|
81
|
+
background-color: var(--fd-console-raised);
|
|
82
|
+
border: 1px solid var(--fd-console-line);
|
|
83
83
|
border-bottom: none;
|
|
84
84
|
border-radius: var(--fd-radius-sm) var(--fd-radius-sm) 0 0;
|
|
85
85
|
z-index: 10;
|
|
86
86
|
|
|
87
87
|
scrollbar-width: thin;
|
|
88
|
-
scrollbar-color: var(--fd-
|
|
88
|
+
scrollbar-color: var(--fd-console-scroll-thumb) transparent;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
91
|
.console-autocomplete::-webkit-scrollbar {
|
|
@@ -93,11 +93,11 @@
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
.console-autocomplete::-webkit-scrollbar-track {
|
|
96
|
-
background:
|
|
96
|
+
background: transparent;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
.console-autocomplete::-webkit-scrollbar-thumb {
|
|
100
|
-
background: var(--fd-
|
|
100
|
+
background: var(--fd-console-scroll-thumb);
|
|
101
101
|
border-radius: var(--fd-scrollbar-radius);
|
|
102
102
|
}
|
|
103
103
|
|
|
@@ -108,21 +108,22 @@
|
|
|
108
108
|
padding: 0.25rem 1rem;
|
|
109
109
|
height: 2rem;
|
|
110
110
|
cursor: pointer;
|
|
111
|
-
font-family:
|
|
112
|
-
font-size:
|
|
113
|
-
color: var(--fd-
|
|
111
|
+
font-family: var(--fd-font-mono);
|
|
112
|
+
font-size: var(--fd-text-sm);
|
|
113
|
+
color: var(--fd-console-arg);
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
.console-autocomplete__item:hover {
|
|
117
|
-
background-color: var(--fd-
|
|
117
|
+
background-color: var(--fd-console-hover);
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
.console-autocomplete__item--selected {
|
|
121
|
-
background-color: var(--fd-
|
|
121
|
+
background-color: var(--fd-console-selected);
|
|
122
|
+
color: var(--fd-console-verb);
|
|
122
123
|
}
|
|
123
124
|
|
|
124
125
|
.console-autocomplete__item--selected:hover {
|
|
125
|
-
background-color: var(--fd-
|
|
126
|
+
background-color: var(--fd-console-selected);
|
|
126
127
|
}
|
|
127
128
|
|
|
128
129
|
.console-autocomplete__label {
|
|
@@ -132,8 +133,8 @@
|
|
|
132
133
|
}
|
|
133
134
|
|
|
134
135
|
.console-autocomplete__detail {
|
|
135
|
-
color: var(--fd-muted
|
|
136
|
-
font-size:
|
|
136
|
+
color: var(--fd-console-muted);
|
|
137
|
+
font-size: var(--fd-text-xs);
|
|
137
138
|
margin-left: 1rem;
|
|
138
139
|
white-space: nowrap;
|
|
139
140
|
flex-shrink: 0;
|
|
@@ -74,7 +74,8 @@
|
|
|
74
74
|
'swap',
|
|
75
75
|
'move',
|
|
76
76
|
'layout',
|
|
77
|
-
'canvas'
|
|
77
|
+
'canvas',
|
|
78
|
+
'session'
|
|
78
79
|
];
|
|
79
80
|
|
|
80
81
|
/** Verbs that take a nodeId as their first argument */
|
|
@@ -288,13 +289,20 @@
|
|
|
288
289
|
const SUBCOMMAND_MAP: Record<string, Array<{ value: string; detail?: string }>> = {
|
|
289
290
|
layout: [
|
|
290
291
|
{ value: 'auto', detail: 'Re-arrange all nodes from scratch' },
|
|
291
|
-
{ value: 'beautify', detail: '
|
|
292
|
+
{ value: 'beautify', detail: 'Tidy: columns, no overlaps, straight wires' }
|
|
292
293
|
],
|
|
293
294
|
list: [
|
|
294
295
|
{ value: 'nodes', detail: 'List all workflow nodes' },
|
|
295
296
|
{ value: 'edges', detail: 'List all connections' },
|
|
296
297
|
{ value: 'types', detail: 'List available node types' }
|
|
297
298
|
],
|
|
299
|
+
session: [
|
|
300
|
+
{ value: 'send', detail: 'Send a chat turn to the test session' },
|
|
301
|
+
{ value: 'run', detail: 'Run the workflow (session run key=value …)' },
|
|
302
|
+
{ value: 'stop', detail: 'Stop the running test session' },
|
|
303
|
+
{ value: 'new', detail: 'Start a fresh test session' },
|
|
304
|
+
{ value: 'status', detail: 'Show the session, its status and latest reply' }
|
|
305
|
+
],
|
|
298
306
|
canvas: [
|
|
299
307
|
{ value: 'fitview', detail: 'Fit all nodes into the viewport' },
|
|
300
308
|
{ value: 'zoom in', detail: 'Zoom in on the canvas' },
|
|
@@ -517,7 +525,7 @@
|
|
|
517
525
|
if (!text || !text.includes('\n')) return;
|
|
518
526
|
|
|
519
527
|
// If already typing a set command, treat multiline paste as the value
|
|
520
|
-
const setMatch = inputValue.match(/^(set\s+\S+?:\S+)\s*(.*)$/i);
|
|
528
|
+
const setMatch = inputValue.match(/^(set\s+\S+?:\S+|session\s+send\b)\s*(.*)$/i);
|
|
521
529
|
if (setMatch) {
|
|
522
530
|
event.preventDefault();
|
|
523
531
|
enterMultilineMode(setMatch[1], (setMatch[2] ? setMatch[2] + '\n' : '') + text);
|
|
@@ -587,7 +595,7 @@
|
|
|
587
595
|
|
|
588
596
|
if (event.key === 'Enter' && event.shiftKey) {
|
|
589
597
|
// Shift+Enter on a set command → expand to multiline textarea
|
|
590
|
-
const setMatch = inputValue.match(/^(set\s+\S+?:\S+)\s*(.*)$/i);
|
|
598
|
+
const setMatch = inputValue.match(/^(set\s+\S+?:\S+|session\s+send\b)\s*(.*)$/i);
|
|
591
599
|
if (setMatch) {
|
|
592
600
|
event.preventDefault();
|
|
593
601
|
enterMultilineMode(setMatch[1], setMatch[2]);
|
|
@@ -691,25 +699,40 @@
|
|
|
691
699
|
</div>
|
|
692
700
|
|
|
693
701
|
<style>
|
|
702
|
+
/*
|
|
703
|
+
Same frame as primitives/Composer (40px row, border, large radius, focus
|
|
704
|
+
ring). The console keeps its own input rather than hosting Composer: it is
|
|
705
|
+
a command line (history on Up/Down, Tab-accepted autocomplete, a multiline
|
|
706
|
+
mode behind Shift+Enter, paste handling) and has no send button.
|
|
707
|
+
*/
|
|
694
708
|
.console-input {
|
|
695
709
|
display: flex;
|
|
696
710
|
align-items: center;
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
711
|
+
box-sizing: border-box;
|
|
712
|
+
margin: var(--fd-space-xs) var(--fd-space-sm) var(--fd-space-sm);
|
|
713
|
+
padding: calc(var(--fd-space-3xs) - 1px) var(--fd-space-sm);
|
|
714
|
+
border: 1px solid var(--fd-console-line);
|
|
715
|
+
border-radius: var(--fd-radius-lg);
|
|
716
|
+
background-color: transparent;
|
|
700
717
|
flex-shrink: 0;
|
|
701
718
|
}
|
|
702
719
|
|
|
720
|
+
.console-input:focus-within {
|
|
721
|
+
border-color: var(--fd-console-focus);
|
|
722
|
+
}
|
|
723
|
+
|
|
703
724
|
.console-input__prompt {
|
|
704
|
-
font-family:
|
|
705
|
-
font-size:
|
|
706
|
-
color: var(--fd-
|
|
707
|
-
margin-right:
|
|
725
|
+
font-family: var(--fd-font-mono);
|
|
726
|
+
font-size: var(--fd-text-sm);
|
|
727
|
+
color: var(--fd-console-prompt);
|
|
728
|
+
margin-right: var(--fd-space-xs);
|
|
708
729
|
user-select: none;
|
|
709
730
|
}
|
|
710
731
|
|
|
711
732
|
.console-input__wrapper {
|
|
712
733
|
flex: 1;
|
|
734
|
+
/* A flex child will not shrink below its content: let a long placeholder clip. */
|
|
735
|
+
min-width: 0;
|
|
713
736
|
position: relative;
|
|
714
737
|
}
|
|
715
738
|
|
|
@@ -718,16 +741,20 @@
|
|
|
718
741
|
background: none;
|
|
719
742
|
border: none;
|
|
720
743
|
outline: none;
|
|
721
|
-
font-family:
|
|
722
|
-
font-size:
|
|
723
|
-
color: var(--fd-
|
|
744
|
+
font-family: var(--fd-font-mono);
|
|
745
|
+
font-size: var(--fd-text-sm);
|
|
746
|
+
color: var(--fd-console-verb);
|
|
747
|
+
caret-color: var(--fd-console-caret);
|
|
724
748
|
padding: 0;
|
|
725
749
|
line-height: 1.5;
|
|
750
|
+
min-width: 0;
|
|
751
|
+
min-height: var(--fd-control-lg);
|
|
752
|
+
text-overflow: ellipsis;
|
|
726
753
|
}
|
|
727
754
|
|
|
728
755
|
.console-input__field::placeholder {
|
|
729
|
-
color: var(--fd-muted
|
|
730
|
-
opacity: 0.
|
|
756
|
+
color: var(--fd-console-muted);
|
|
757
|
+
opacity: 0.8;
|
|
731
758
|
}
|
|
732
759
|
|
|
733
760
|
.console-input--multiline {
|
|
@@ -746,28 +773,29 @@
|
|
|
746
773
|
}
|
|
747
774
|
|
|
748
775
|
.console-input__multiline-label {
|
|
749
|
-
font-family:
|
|
750
|
-
font-size:
|
|
751
|
-
color: var(--fd-
|
|
776
|
+
font-family: var(--fd-font-mono);
|
|
777
|
+
font-size: var(--fd-text-sm);
|
|
778
|
+
color: var(--fd-console-arg);
|
|
752
779
|
font-weight: 500;
|
|
753
780
|
}
|
|
754
781
|
|
|
755
782
|
.console-input__multiline-hint {
|
|
756
|
-
font-family:
|
|
757
|
-
font-size:
|
|
758
|
-
color: var(--fd-muted
|
|
783
|
+
font-family: var(--fd-font-mono);
|
|
784
|
+
font-size: var(--fd-text-xs);
|
|
785
|
+
color: var(--fd-console-muted);
|
|
759
786
|
opacity: 0.7;
|
|
760
787
|
}
|
|
761
788
|
|
|
762
789
|
.console-input__textarea {
|
|
763
790
|
width: 100%;
|
|
764
791
|
background: none;
|
|
765
|
-
border: 1px solid var(--fd-
|
|
792
|
+
border: 1px solid var(--fd-console-line);
|
|
766
793
|
border-radius: var(--fd-radius-sm);
|
|
767
794
|
outline: none;
|
|
768
|
-
font-family:
|
|
769
|
-
font-size:
|
|
770
|
-
color: var(--fd-
|
|
795
|
+
font-family: var(--fd-font-mono);
|
|
796
|
+
font-size: var(--fd-text-sm);
|
|
797
|
+
color: var(--fd-console-verb);
|
|
798
|
+
caret-color: var(--fd-console-caret);
|
|
771
799
|
padding: 0.375rem 0.5rem;
|
|
772
800
|
line-height: 1.5;
|
|
773
801
|
resize: vertical;
|
|
@@ -775,6 +803,11 @@
|
|
|
775
803
|
}
|
|
776
804
|
|
|
777
805
|
.console-input__textarea:focus {
|
|
778
|
-
border-color: var(--fd-
|
|
806
|
+
border-color: var(--fd-console-focus);
|
|
807
|
+
}
|
|
808
|
+
|
|
809
|
+
.console-input ::selection {
|
|
810
|
+
background: var(--fd-console-selection);
|
|
811
|
+
color: inherit;
|
|
779
812
|
}
|
|
780
813
|
</style>
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
<script lang="ts">
|
|
8
8
|
import { tick } from 'svelte';
|
|
9
|
+
import { highlightConsoleEntry } from '../../utils/consoleHighlight.js';
|
|
9
10
|
|
|
10
11
|
export interface ConsoleEntry {
|
|
11
12
|
type: 'input' | 'success' | 'error' | 'formatted';
|
|
@@ -34,32 +35,40 @@
|
|
|
34
35
|
|
|
35
36
|
<div class="console-output" bind:this={outputElement} role="log" aria-live="polite">
|
|
36
37
|
<!-- Append-only log without stable IDs — index is the identity -->
|
|
38
|
+
<!-- Segments are presentation only: their text joins back to the entry text exactly. -->
|
|
37
39
|
{#each entries as entry, i (i)}
|
|
38
40
|
<div class="console-output__entry console-output__entry--{entry.type}">
|
|
39
41
|
{#if entry.type === 'input'}
|
|
40
|
-
<span class="console-output__prefix">></span>
|
|
41
|
-
<span class="console-output__text">{entry
|
|
42
|
+
<span class="console-output__prefix console-output__tok--prompt">></span>
|
|
43
|
+
<span class="console-output__text">{@render tokens(entry)}</span>
|
|
42
44
|
{:else if entry.type === 'formatted'}
|
|
43
|
-
<pre class="console-output__pre">{entry
|
|
45
|
+
<pre class="console-output__pre">{@render tokens(entry)}</pre>
|
|
44
46
|
{:else}
|
|
45
|
-
<span class="console-output__text">{entry
|
|
47
|
+
<span class="console-output__text">{@render tokens(entry)}</span>
|
|
46
48
|
{/if}
|
|
47
49
|
</div>
|
|
48
50
|
{/each}
|
|
49
51
|
</div>
|
|
50
52
|
|
|
53
|
+
{#snippet tokens(
|
|
54
|
+
entry: ConsoleEntry
|
|
55
|
+
)}{#each highlightConsoleEntry(entry) as seg, j (j)}{#if seg.role}<span
|
|
56
|
+
class="console-output__tok--{seg.role}">{seg.text}</span
|
|
57
|
+
>{:else}{seg.text}{/if}{/each}{/snippet}
|
|
58
|
+
|
|
51
59
|
<style>
|
|
60
|
+
/* The terminal surface: monospace on the ink panel, colours from --fd-console-* tokens. */
|
|
52
61
|
.console-output {
|
|
53
62
|
flex: 1;
|
|
54
63
|
overflow-y: auto;
|
|
55
|
-
padding:
|
|
56
|
-
font-family:
|
|
57
|
-
font-size:
|
|
64
|
+
padding: var(--fd-space-xs) var(--fd-space-md);
|
|
65
|
+
font-family: var(--fd-font-mono);
|
|
66
|
+
font-size: var(--fd-text-sm);
|
|
58
67
|
line-height: 1.6;
|
|
68
|
+
color: var(--fd-console-fg);
|
|
59
69
|
|
|
60
|
-
/* Custom scrollbar styling matching MainLayout pattern */
|
|
61
70
|
scrollbar-width: thin;
|
|
62
|
-
scrollbar-color: var(--fd-
|
|
71
|
+
scrollbar-color: var(--fd-console-scroll-thumb) transparent;
|
|
63
72
|
}
|
|
64
73
|
|
|
65
74
|
.console-output::-webkit-scrollbar {
|
|
@@ -67,17 +76,21 @@
|
|
|
67
76
|
}
|
|
68
77
|
|
|
69
78
|
.console-output::-webkit-scrollbar-track {
|
|
70
|
-
background:
|
|
71
|
-
border-radius: var(--fd-scrollbar-radius);
|
|
79
|
+
background: transparent;
|
|
72
80
|
}
|
|
73
81
|
|
|
74
82
|
.console-output::-webkit-scrollbar-thumb {
|
|
75
|
-
background: var(--fd-
|
|
83
|
+
background: var(--fd-console-scroll-thumb);
|
|
76
84
|
border-radius: var(--fd-scrollbar-radius);
|
|
77
85
|
}
|
|
78
86
|
|
|
79
87
|
.console-output::-webkit-scrollbar-thumb:hover {
|
|
80
|
-
background: var(--fd-
|
|
88
|
+
background: var(--fd-console-scroll-thumb-hover);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.console-output ::selection {
|
|
92
|
+
background: var(--fd-console-selection);
|
|
93
|
+
color: inherit;
|
|
81
94
|
}
|
|
82
95
|
|
|
83
96
|
.console-output__entry {
|
|
@@ -85,20 +98,13 @@
|
|
|
85
98
|
word-break: break-word;
|
|
86
99
|
}
|
|
87
100
|
|
|
88
|
-
.
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
.console-output__entry--success {
|
|
93
|
-
color: var(--fd-success);
|
|
101
|
+
/* A command starts a new exchange: a little air before it, except at the top. */
|
|
102
|
+
.console-output__entry--input:not(:first-child) {
|
|
103
|
+
margin-top: var(--fd-console-entry-gap);
|
|
94
104
|
}
|
|
95
105
|
|
|
96
106
|
.console-output__entry--error {
|
|
97
|
-
color: var(--fd-error);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.console-output__entry--formatted {
|
|
101
|
-
color: var(--fd-foreground);
|
|
107
|
+
color: var(--fd-console-error);
|
|
102
108
|
}
|
|
103
109
|
|
|
104
110
|
.console-output__pre {
|
|
@@ -108,10 +114,66 @@
|
|
|
108
114
|
line-height: inherit;
|
|
109
115
|
white-space: pre;
|
|
110
116
|
overflow-x: auto;
|
|
117
|
+
scrollbar-width: thin;
|
|
118
|
+
scrollbar-color: var(--fd-console-scroll-thumb) transparent;
|
|
111
119
|
}
|
|
112
120
|
|
|
113
121
|
.console-output__prefix {
|
|
114
122
|
margin-right: 0.5rem;
|
|
115
123
|
user-select: none;
|
|
116
124
|
}
|
|
125
|
+
|
|
126
|
+
/* Roles. Colour only (plus the verb's weight): no role changes layout or text. */
|
|
127
|
+
.console-output__tok--prompt {
|
|
128
|
+
color: var(--fd-console-prompt);
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.console-output__tok--verb {
|
|
132
|
+
color: var(--fd-console-verb);
|
|
133
|
+
font-weight: 600;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.console-output__tok--arg {
|
|
137
|
+
color: var(--fd-console-arg);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.console-output__tok--id {
|
|
141
|
+
color: var(--fd-console-id);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.console-output__tok--header {
|
|
145
|
+
color: var(--fd-console-header);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.console-output__tok--rule {
|
|
149
|
+
color: var(--fd-console-rule);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.console-output__tok--key {
|
|
153
|
+
color: var(--fd-console-key);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.console-output__tok--eq {
|
|
157
|
+
color: var(--fd-console-eq);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.console-output__tok--string {
|
|
161
|
+
color: var(--fd-console-string);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.console-output__tok--number {
|
|
165
|
+
color: var(--fd-console-number);
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
.console-output__tok--punct {
|
|
169
|
+
color: var(--fd-console-punct);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
.console-output__tok--error {
|
|
173
|
+
color: var(--fd-console-error);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.console-output__tok--muted {
|
|
177
|
+
color: var(--fd-console-muted);
|
|
178
|
+
}
|
|
117
179
|
</style>
|