@flowdrop/flowdrop 2.10.1 → 2.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (571) hide show
  1. package/CHANGELOG.md +385 -0
  2. package/dist/adapters/agentspec/autoLayout.d.ts +18 -36
  3. package/dist/adapters/agentspec/autoLayout.js +75 -93
  4. package/dist/chat/activity.d.ts +49 -0
  5. package/dist/chat/activity.js +65 -0
  6. package/dist/chat/commandClassifier.js +2 -1
  7. package/dist/commands/executor.js +186 -27
  8. package/dist/commands/index.d.ts +2 -1
  9. package/dist/commands/index.js +2 -0
  10. package/dist/commands/parser.js +43 -3
  11. package/dist/commands/session.d.ts +60 -0
  12. package/dist/commands/session.js +332 -0
  13. package/dist/commands/storeIntegration.svelte.js +18 -1
  14. package/dist/commands/types.d.ts +77 -4
  15. package/dist/components/App.svelte +1030 -207
  16. package/dist/components/App.svelte.d.ts +26 -2
  17. package/dist/components/BindablePortListbox.svelte +68 -369
  18. package/dist/components/Button.svelte +17 -14
  19. package/dist/components/Button.svelte.d.ts +2 -2
  20. package/dist/components/CanvasContextMenu.svelte +31 -10
  21. package/dist/components/CanvasController.svelte +146 -3
  22. package/dist/components/CanvasController.svelte.d.ts +25 -33
  23. package/dist/components/CanvasIconButton.svelte +6 -6
  24. package/dist/components/CanvasToolbar.svelte +103 -0
  25. package/dist/components/CanvasToolbar.svelte.d.ts +23 -0
  26. package/dist/components/CanvasZoomControls.svelte +122 -0
  27. package/dist/components/CanvasZoomControls.svelte.d.ts +15 -0
  28. package/dist/components/ConfigForm.svelte +163 -125
  29. package/dist/components/ConfigModal.svelte +13 -56
  30. package/dist/components/ConfigModal.svelte.d.ts +1 -1
  31. package/dist/components/ConfigPanel.svelte +98 -228
  32. package/dist/components/ConfigPanel.svelte.d.ts +2 -2
  33. package/dist/components/ConnectPortPicker.svelte +153 -0
  34. package/dist/components/ConnectPortPicker.svelte.d.ts +22 -0
  35. package/dist/components/ConnectionLine.svelte +1 -1
  36. package/dist/components/DoctorMenu.svelte +422 -0
  37. package/dist/components/DoctorMenu.svelte.d.ts +7 -0
  38. package/dist/components/ExternalLinkRow.svelte +82 -0
  39. package/dist/components/ExternalLinkRow.svelte.d.ts +14 -0
  40. package/dist/components/FlowDropEdge.svelte +52 -2
  41. package/dist/components/FlowDropEdge.svelte.d.ts +5 -1
  42. package/dist/components/InterfaceNameInput.svelte +103 -0
  43. package/dist/components/InterfaceNameInput.svelte.d.ts +13 -0
  44. package/dist/components/InterfaceTag.svelte +215 -0
  45. package/dist/components/InterfaceTag.svelte.d.ts +20 -0
  46. package/dist/components/InterfaceTagAnchor.svelte +103 -0
  47. package/dist/components/InterfaceTagAnchor.svelte.d.ts +12 -0
  48. package/dist/components/InterfaceTagLayer.svelte +314 -0
  49. package/dist/components/InterfaceTagLayer.svelte.d.ts +28 -0
  50. package/dist/components/LogsSidebar.svelte +58 -55
  51. package/dist/components/LoopbackLanes.svelte +54 -0
  52. package/dist/components/LoopbackLanes.svelte.d.ts +8 -0
  53. package/dist/components/MarkdownDisplay.svelte +1 -1
  54. package/dist/components/Navbar.svelte +539 -169
  55. package/dist/components/Navbar.svelte.d.ts +20 -1
  56. package/dist/components/NodeInspector.svelte +153 -0
  57. package/dist/components/NodeInspector.svelte.d.ts +19 -0
  58. package/dist/components/NodeLastRun.svelte +212 -0
  59. package/dist/components/NodeLastRun.svelte.d.ts +13 -0
  60. package/dist/components/NodeSidebar.svelte +279 -23
  61. package/dist/components/NodeSidebar.svelte.d.ts +11 -0
  62. package/dist/components/NodeStatusOverlay.svelte +144 -353
  63. package/dist/components/NodeStatusOverlay.svelte.d.ts +4 -1
  64. package/dist/components/PipelineStatus.svelte +5 -18
  65. package/dist/components/PortMappingRow.svelte +28 -44
  66. package/dist/components/PortPickerListbox.svelte +475 -0
  67. package/dist/components/PortPickerListbox.svelte.d.ts +73 -0
  68. package/dist/components/ReadOnlyDetails.svelte +52 -89
  69. package/dist/components/RunBar.svelte +222 -0
  70. package/dist/components/RunBar.svelte.d.ts +20 -0
  71. package/dist/components/RunsMenu.svelte +649 -0
  72. package/dist/components/RunsMenu.svelte.d.ts +14 -0
  73. package/dist/components/SchemaForm.svelte +1 -1
  74. package/dist/components/SettingsModal.svelte +28 -60
  75. package/dist/components/SettingsPanel.svelte +516 -242
  76. package/dist/components/StraightGuides.svelte +46 -0
  77. package/dist/components/StraightGuides.svelte.d.ts +7 -0
  78. package/dist/components/ThemeToggle.svelte +14 -4
  79. package/dist/components/UniversalNode.svelte +152 -51
  80. package/dist/components/WebMCPBridgeMenu.svelte +336 -0
  81. package/dist/components/WebMCPBridgeMenu.svelte.d.ts +3 -0
  82. package/dist/components/WorkflowEditor.svelte +821 -142
  83. package/dist/components/WorkflowEditor.svelte.d.ts +43 -1
  84. package/dist/components/WorkflowInterfaceEditor.svelte +106 -100
  85. package/dist/components/WorkflowInterfaceEditor.svelte.d.ts +12 -1
  86. package/dist/components/WorkflowInterfaceEntryCard.svelte +496 -494
  87. package/dist/components/WorkflowInterfaceEntryCard.svelte.d.ts +14 -1
  88. package/dist/components/WorkflowInterfaceEntryComposer.svelte +23 -67
  89. package/dist/components/WorkflowPlaygroundSettings.svelte +514 -0
  90. package/dist/components/WorkflowPlaygroundSettings.svelte.d.ts +20 -0
  91. package/dist/components/WorkflowSettingsPanel.svelte +311 -0
  92. package/dist/components/WorkflowSettingsPanel.svelte.d.ts +20 -0
  93. package/dist/components/ZoomTier.svelte +56 -0
  94. package/dist/components/ZoomTier.svelte.d.ts +4 -0
  95. package/dist/components/chat/AIChatPanel.svelte +464 -313
  96. package/dist/components/chat/ActivityList.svelte +130 -0
  97. package/dist/components/chat/ActivityList.svelte.d.ts +11 -0
  98. package/dist/components/chat/ActivityRow.svelte +179 -0
  99. package/dist/components/chat/ActivityRow.svelte.d.ts +16 -0
  100. package/dist/components/chat/CommandPreview.svelte +42 -64
  101. package/dist/components/console/CommandConsole.svelte +106 -41
  102. package/dist/components/console/CommandConsole.svelte.d.ts +2 -0
  103. package/dist/components/console/ConsoleAutocomplete.svelte +14 -13
  104. package/dist/components/console/ConsoleInput.svelte +60 -27
  105. package/dist/components/console/ConsoleOutput.svelte +86 -24
  106. package/dist/components/console/ConsoleStrip.svelte +80 -0
  107. package/dist/components/console/ConsoleStrip.svelte.d.ts +13 -0
  108. package/dist/components/form/FieldFactory.svelte +30 -4
  109. package/dist/components/form/FormArray.svelte +306 -339
  110. package/dist/components/form/FormArray.svelte.d.ts +10 -0
  111. package/dist/components/form/FormArrayRows.svelte +443 -0
  112. package/dist/components/form/FormArrayRows.svelte.d.ts +18 -0
  113. package/dist/components/form/FormAutocomplete.svelte +2 -2
  114. package/dist/components/form/FormCheckboxGroup.svelte +10 -85
  115. package/dist/components/form/FormCodeEditor.svelte +3 -3
  116. package/dist/components/form/FormFieldWrapper.svelte +98 -18
  117. package/dist/components/form/FormFieldWrapper.svelte.d.ts +10 -0
  118. package/dist/components/form/FormFieldset.svelte +44 -28
  119. package/dist/components/form/FormMarkdownEditor.svelte +6 -6
  120. package/dist/components/form/FormPorts.svelte +437 -141
  121. package/dist/components/form/FormSelect.svelte +1 -1
  122. package/dist/components/form/FormTemplateEditor.svelte +22 -26
  123. package/dist/components/form/FormToggle.svelte +15 -106
  124. package/dist/components/form/FormToggle.svelte.d.ts +3 -2
  125. package/dist/components/form/FormUISchemaRenderer.svelte +38 -3
  126. package/dist/components/form/humanizeKey.d.ts +7 -0
  127. package/dist/components/form/humanizeKey.js +21 -0
  128. package/dist/components/form/index.d.ts +2 -2
  129. package/dist/components/form/index.js +2 -2
  130. package/dist/components/form/types.d.ts +6 -0
  131. package/dist/components/icons/MenuOpenIcon.svelte +8 -1
  132. package/dist/components/interrupt/ChoicePrompt.svelte +51 -152
  133. package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +0 -2
  134. package/dist/components/interrupt/ConfirmationPrompt.svelte +18 -201
  135. package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +0 -4
  136. package/dist/components/interrupt/FormPrompt.svelte +22 -147
  137. package/dist/components/interrupt/FormPrompt.svelte.d.ts +0 -4
  138. package/dist/components/interrupt/InterruptBubble.svelte +198 -355
  139. package/dist/components/interrupt/InterruptBubble.svelte.d.ts +0 -2
  140. package/dist/components/interrupt/ReviewPrompt.svelte +0 -10
  141. package/dist/components/interrupt/TextInputPrompt.svelte +23 -120
  142. package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +0 -2
  143. package/dist/components/layouts/MainLayout.svelte +110 -75
  144. package/dist/components/layouts/MainLayout.svelte.d.ts +17 -0
  145. package/dist/components/nodes/CaptionNode.svelte +7 -0
  146. package/dist/components/nodes/GatewayNode.svelte +66 -431
  147. package/dist/components/nodes/IdeaNode.svelte +6 -5
  148. package/dist/components/nodes/NodeCard.svelte +1051 -0
  149. package/dist/components/nodes/NodeCard.svelte.d.ts +30 -0
  150. package/dist/components/nodes/NodeConfigButton.svelte +28 -9
  151. package/dist/components/nodes/NodeProblemMark.svelte +113 -0
  152. package/dist/components/nodes/NodeProblemMark.svelte.d.ts +8 -0
  153. package/dist/components/nodes/NodeTip.svelte +104 -0
  154. package/dist/components/nodes/NodeTip.svelte.d.ts +15 -0
  155. package/dist/components/nodes/NotesNode.svelte +183 -150
  156. package/dist/components/nodes/SimpleNode.svelte +176 -44
  157. package/dist/components/nodes/SquareNode.svelte +127 -34
  158. package/dist/components/nodes/TerminalNode.svelte +232 -88
  159. package/dist/components/nodes/ToolNode.svelte +49 -381
  160. package/dist/components/nodes/WorkflowNode.svelte +40 -399
  161. package/dist/components/playground/ChatBubble.svelte +248 -62
  162. package/dist/components/playground/ChatInput.svelte +134 -297
  163. package/dist/components/playground/ChatInput.svelte.d.ts +17 -0
  164. package/dist/components/playground/ControlPanel.svelte +318 -188
  165. package/dist/components/playground/ControlPanel.svelte.d.ts +13 -0
  166. package/dist/components/playground/DockedPlayground.svelte +75 -0
  167. package/dist/components/playground/DockedPlayground.svelte.d.ts +24 -0
  168. package/dist/components/playground/ExecutionConsole.svelte +54 -36
  169. package/dist/components/playground/ExecutionConsole.svelte.d.ts +12 -0
  170. package/dist/components/playground/ExecutionLogs.svelte +4 -0
  171. package/dist/components/playground/HeaderMenu.svelte +170 -0
  172. package/dist/components/playground/HeaderMenu.svelte.d.ts +22 -0
  173. package/dist/components/playground/InputCollector.svelte +8 -32
  174. package/dist/components/playground/InputFields.svelte +246 -0
  175. package/dist/components/playground/InputFields.svelte.d.ts +16 -0
  176. package/dist/components/playground/InterfaceInputForm.svelte +285 -30
  177. package/dist/components/playground/InterfaceInputForm.svelte.d.ts +20 -0
  178. package/dist/components/playground/InterfaceJsonInput.svelte +92 -0
  179. package/dist/components/playground/InterfaceJsonInput.svelte.d.ts +10 -0
  180. package/dist/components/playground/LogRow.svelte +12 -12
  181. package/dist/components/playground/MessageMarkdown.svelte +11 -11
  182. package/dist/components/playground/MessageStream.svelte +154 -182
  183. package/dist/components/playground/Playground.svelte +17 -1087
  184. package/dist/components/playground/PlaygroundApp.svelte +12 -2
  185. package/dist/components/playground/PlaygroundApp.svelte.d.ts +2 -1
  186. package/dist/components/playground/PlaygroundHeader.svelte +309 -0
  187. package/dist/components/playground/PlaygroundHeader.svelte.d.ts +22 -0
  188. package/dist/components/playground/PlaygroundModal.svelte +7 -1
  189. package/dist/components/playground/PlaygroundStudio.svelte +31 -33
  190. package/dist/components/playground/PlaygroundSurface.svelte +648 -0
  191. package/dist/components/playground/PlaygroundSurface.svelte.d.ts +79 -0
  192. package/dist/components/playground/StepsSummary.svelte +312 -0
  193. package/dist/components/playground/StepsSummary.svelte.d.ts +11 -0
  194. package/dist/components/playground/messageDisplay.d.ts +9 -0
  195. package/dist/components/playground/messageDisplay.js +24 -2
  196. package/dist/components/playground/stepSummary.d.ts +71 -0
  197. package/dist/components/playground/stepSummary.js +152 -0
  198. package/dist/components/ports/PortTypeBadge.svelte +13 -1
  199. package/dist/components/primitives/Button.svelte +226 -0
  200. package/dist/components/primitives/Button.svelte.d.ts +31 -0
  201. package/dist/components/primitives/Card.svelte +110 -0
  202. package/dist/components/primitives/Card.svelte.d.ts +20 -0
  203. package/dist/components/primitives/Checkbox.svelte +126 -0
  204. package/dist/components/primitives/Checkbox.svelte.d.ts +15 -0
  205. package/dist/components/primitives/Chip.svelte +143 -0
  206. package/dist/components/primitives/Chip.svelte.d.ts +22 -0
  207. package/dist/components/primitives/Combobox.svelte +444 -0
  208. package/dist/components/primitives/Combobox.svelte.d.ts +22 -0
  209. package/dist/components/primitives/Composer.svelte +293 -0
  210. package/dist/components/primitives/Composer.svelte.d.ts +47 -0
  211. package/dist/components/primitives/EmptyState.svelte +113 -0
  212. package/dist/components/primitives/EmptyState.svelte.d.ts +18 -0
  213. package/dist/components/primitives/Field.svelte +178 -0
  214. package/dist/components/primitives/Field.svelte.d.ts +30 -0
  215. package/dist/components/primitives/IconButton.svelte +156 -0
  216. package/dist/components/primitives/IconButton.svelte.d.ts +27 -0
  217. package/dist/components/primitives/Menu.svelte +435 -0
  218. package/dist/components/primitives/Menu.svelte.d.ts +61 -0
  219. package/dist/components/primitives/Notice.svelte +161 -0
  220. package/dist/components/primitives/Notice.svelte.d.ts +22 -0
  221. package/dist/components/primitives/PanelHeader.svelte +134 -0
  222. package/dist/components/primitives/PanelHeader.svelte.d.ts +23 -0
  223. package/dist/components/primitives/Segmented.svelte +198 -0
  224. package/dist/components/primitives/Segmented.svelte.d.ts +32 -0
  225. package/dist/components/primitives/Select.svelte +130 -0
  226. package/dist/components/primitives/Select.svelte.d.ts +26 -0
  227. package/dist/components/primitives/StatusPill.svelte +218 -0
  228. package/dist/components/primitives/StatusPill.svelte.d.ts +24 -0
  229. package/dist/components/primitives/Switch.svelte +113 -0
  230. package/dist/components/primitives/Switch.svelte.d.ts +14 -0
  231. package/dist/components/primitives/Tabs.svelte +209 -0
  232. package/dist/components/primitives/Tabs.svelte.d.ts +32 -0
  233. package/dist/components/primitives/Toolbar.svelte +94 -0
  234. package/dist/components/primitives/Toolbar.svelte.d.ts +14 -0
  235. package/dist/components/primitives/ToolbarSeparator.svelte +40 -0
  236. package/dist/components/primitives/ToolbarSeparator.svelte.d.ts +7 -0
  237. package/dist/components/surfaces/SurfaceOverlay.svelte +10 -40
  238. package/dist/components/surfaces/TabbedSurface.svelte +49 -39
  239. package/dist/components/surfaces/TabbedSurface.svelte.d.ts +8 -0
  240. package/dist/components/toast/DismissibleToast.svelte +94 -32
  241. package/dist/components/toast/DismissibleToast.svelte.d.ts +17 -7
  242. package/dist/config/endpoints.d.ts +43 -1
  243. package/dist/config/endpoints.js +21 -3
  244. package/dist/core/index.d.ts +9 -6
  245. package/dist/core/index.js +1 -1
  246. package/dist/editor/connectCandidates.d.ts +56 -0
  247. package/dist/editor/connectCandidates.js +131 -0
  248. package/dist/editor/contextMenu.d.ts +31 -2
  249. package/dist/editor/contextMenu.js +96 -9
  250. package/dist/editor/index.d.ts +3 -1
  251. package/dist/editor/index.js +1 -0
  252. package/dist/editor/interfaceMenu.d.ts +35 -0
  253. package/dist/editor/interfaceMenu.js +47 -0
  254. package/dist/editor/portMenu.d.ts +23 -0
  255. package/dist/editor/portMenu.js +34 -0
  256. package/dist/editor/tidy.d.ts +30 -0
  257. package/dist/editor/tidy.js +66 -0
  258. package/dist/helpers/workflowEditorHelper.d.ts +15 -0
  259. package/dist/helpers/workflowEditorHelper.js +39 -3
  260. package/dist/layout/fromWorkflow.d.ts +42 -0
  261. package/dist/layout/fromWorkflow.js +135 -0
  262. package/dist/layout/geometry.d.ts +102 -0
  263. package/dist/layout/geometry.js +317 -0
  264. package/dist/layout/index.d.ts +21 -0
  265. package/dist/layout/index.js +14 -0
  266. package/dist/layout/inspect.d.ts +18 -0
  267. package/dist/layout/inspect.js +81 -0
  268. package/dist/layout/lanePath.d.ts +23 -0
  269. package/dist/layout/lanePath.js +47 -0
  270. package/dist/layout/measure.d.ts +141 -0
  271. package/dist/layout/measure.js +477 -0
  272. package/dist/layout/primitives.d.ts +124 -0
  273. package/dist/layout/primitives.js +461 -0
  274. package/dist/layout/sweep.d.ts +59 -0
  275. package/dist/layout/sweep.js +257 -0
  276. package/dist/layout/toWorkflow.d.ts +43 -0
  277. package/dist/layout/toWorkflow.js +131 -0
  278. package/dist/layout/types.d.ts +93 -0
  279. package/dist/layout/types.js +35 -0
  280. package/dist/messages/defaults.d.ts +694 -26
  281. package/dist/messages/defaults.js +626 -27
  282. package/dist/messages/types.d.ts +21 -1
  283. package/dist/openapi/v1/openapi.yaml +222 -5
  284. package/dist/playground/index.d.ts +31 -2
  285. package/dist/playground/index.js +31 -1
  286. package/dist/playground/mount.d.ts +34 -12
  287. package/dist/playground/mount.js +80 -35
  288. package/dist/playground/runAction.d.ts +29 -0
  289. package/dist/playground/runAction.js +38 -0
  290. package/dist/schemas/index.js +1 -1
  291. package/dist/schemas/v1/workflow.schema.json +140 -2
  292. package/dist/services/doctorService.d.ts +52 -0
  293. package/dist/services/doctorService.js +113 -0
  294. package/dist/services/globalSave.js +17 -24
  295. package/dist/services/nodeExecutionService.d.ts +12 -1
  296. package/dist/services/nodeExecutionService.js +58 -58
  297. package/dist/services/playgroundService.d.ts +23 -3
  298. package/dist/services/playgroundService.js +53 -5
  299. package/dist/services/runsService.d.ts +42 -0
  300. package/dist/services/runsService.js +87 -0
  301. package/dist/services/toastQueue.d.ts +33 -0
  302. package/dist/services/toastQueue.js +38 -0
  303. package/dist/services/toastService.d.ts +30 -9
  304. package/dist/services/toastService.js +81 -46
  305. package/dist/settings/index.d.ts +1 -0
  306. package/dist/skins/default.d.ts +1 -1
  307. package/dist/skins/drafter.d.ts +1 -1
  308. package/dist/skins/graphite.d.ts +26 -0
  309. package/dist/skins/graphite.js +473 -0
  310. package/dist/skins/index.d.ts +6 -5
  311. package/dist/skins/index.js +7 -5
  312. package/dist/skins/slate.d.ts +1 -1
  313. package/dist/skins/slate.js +4 -4
  314. package/dist/stores/attachedRunStore.svelte.d.ts +35 -0
  315. package/dist/stores/attachedRunStore.svelte.js +47 -0
  316. package/dist/stores/connectDragStore.svelte.d.ts +39 -0
  317. package/dist/stores/connectDragStore.svelte.js +42 -0
  318. package/dist/stores/doctorStore.svelte.d.ts +79 -0
  319. package/dist/stores/doctorStore.svelte.js +244 -0
  320. package/dist/stores/editedNodesStore.svelte.d.ts +42 -0
  321. package/dist/stores/editedNodesStore.svelte.js +84 -0
  322. package/dist/stores/editorModeStore.svelte.d.ts +34 -0
  323. package/dist/stores/editorModeStore.svelte.js +55 -0
  324. package/dist/stores/instanceContainer.svelte.d.ts +68 -0
  325. package/dist/stores/instanceContainer.svelte.js +49 -2
  326. package/dist/stores/loopbackLanesStore.svelte.d.ts +18 -0
  327. package/dist/stores/loopbackLanesStore.svelte.js +25 -0
  328. package/dist/stores/nodeHighlightStore.svelte.d.ts +34 -0
  329. package/dist/stores/nodeHighlightStore.svelte.js +56 -0
  330. package/dist/stores/playgroundStore.svelte.d.ts +74 -2
  331. package/dist/stores/playgroundStore.svelte.js +182 -6
  332. package/dist/stores/runController.svelte.d.ts +382 -0
  333. package/dist/stores/runController.svelte.js +1217 -0
  334. package/dist/stores/settingsStore.svelte.d.ts +80 -18
  335. package/dist/stores/settingsStore.svelte.js +180 -62
  336. package/dist/stores/workflowStore.svelte.d.ts +18 -1
  337. package/dist/stores/workflowStore.svelte.js +29 -1
  338. package/dist/styles/base.css +300 -28
  339. package/dist/styles/fonts/Inter-LICENSE.txt +93 -0
  340. package/dist/styles/fonts/inter-latin-wght-normal.woff2 +0 -0
  341. package/dist/styles/fonts/inter.css +19 -0
  342. package/dist/styles/toast.css +100 -20
  343. package/dist/styles/tokenAliases.d.ts +13 -0
  344. package/dist/styles/tokenAliases.js +206 -0
  345. package/dist/styles/tokens.css +586 -14
  346. package/dist/svelte-app.d.ts +38 -5
  347. package/dist/svelte-app.js +14 -3
  348. package/dist/themes/graphite.d.ts +2 -0
  349. package/dist/themes/graphite.js +15 -0
  350. package/dist/themes/index.d.ts +2 -1
  351. package/dist/themes/index.js +22 -3
  352. package/dist/themes/minimal.js +10 -0
  353. package/dist/themes/scopedSkinCss.d.ts +47 -0
  354. package/dist/themes/scopedSkinCss.js +220 -0
  355. package/dist/types/chat.d.ts +6 -0
  356. package/dist/types/doctor.d.ts +82 -0
  357. package/dist/types/doctor.js +11 -0
  358. package/dist/types/events.d.ts +35 -0
  359. package/dist/types/events.js +4 -1
  360. package/dist/types/index.d.ts +103 -6
  361. package/dist/types/index.js +15 -3
  362. package/dist/types/navbar.d.ts +36 -0
  363. package/dist/types/playground.d.ts +66 -0
  364. package/dist/types/settings.d.ts +120 -7
  365. package/dist/types/settings.js +35 -3
  366. package/dist/types/skin.d.ts +23 -10
  367. package/dist/types/theme.d.ts +40 -2
  368. package/dist/utils/appearance.d.ts +19 -0
  369. package/dist/utils/appearance.js +13 -0
  370. package/dist/utils/canvasFit.d.ts +41 -0
  371. package/dist/utils/canvasFit.js +44 -0
  372. package/dist/utils/chipTitles.d.ts +9 -0
  373. package/dist/utils/chipTitles.js +19 -0
  374. package/dist/utils/connections.js +8 -0
  375. package/dist/utils/consoleHighlight.d.ts +28 -0
  376. package/dist/utils/consoleHighlight.js +269 -0
  377. package/dist/utils/deprecation.d.ts +17 -0
  378. package/dist/utils/deprecation.js +29 -0
  379. package/dist/utils/doctorOperations.d.ts +40 -0
  380. package/dist/utils/doctorOperations.js +237 -0
  381. package/dist/utils/duration.d.ts +13 -0
  382. package/dist/utils/duration.js +40 -0
  383. package/dist/utils/inspectorContext.d.ts +19 -0
  384. package/dist/utils/inspectorContext.js +12 -0
  385. package/dist/utils/inspectorSections.d.ts +20 -0
  386. package/dist/utils/inspectorSections.js +44 -0
  387. package/dist/utils/inspectorSurface.d.ts +46 -0
  388. package/dist/utils/inspectorSurface.js +51 -0
  389. package/dist/utils/interfaceTags.d.ts +102 -0
  390. package/dist/utils/interfaceTags.js +211 -0
  391. package/dist/utils/itemRef.d.ts +86 -0
  392. package/dist/utils/itemRef.js +106 -0
  393. package/dist/utils/lastRun.d.ts +35 -0
  394. package/dist/utils/lastRun.js +73 -0
  395. package/dist/utils/messageNodeLink.d.ts +17 -0
  396. package/dist/utils/messageNodeLink.js +16 -0
  397. package/dist/utils/minimapVisibility.d.ts +28 -0
  398. package/dist/utils/minimapVisibility.js +34 -0
  399. package/dist/utils/nodeAriaLabel.d.ts +12 -0
  400. package/dist/utils/nodeAriaLabel.js +17 -0
  401. package/dist/utils/nodeFingerprint.d.ts +27 -0
  402. package/dist/utils/nodeFingerprint.js +66 -0
  403. package/dist/utils/nodeFormSchema.d.ts +10 -0
  404. package/dist/utils/nodeFormSchema.js +2 -2
  405. package/dist/utils/nodeGeometry.d.ts +168 -0
  406. package/dist/utils/nodeGeometry.js +204 -0
  407. package/dist/utils/nodeProblem.d.ts +19 -0
  408. package/dist/utils/nodeProblem.js +9 -0
  409. package/dist/utils/nodeStatus.d.ts +38 -3
  410. package/dist/utils/nodeStatus.js +67 -39
  411. package/dist/utils/nodeSwap.js +9 -1
  412. package/dist/utils/nodeWrapper.d.ts +1 -0
  413. package/dist/utils/playgroundChat.d.ts +121 -0
  414. package/dist/utils/playgroundChat.js +275 -0
  415. package/dist/utils/playgroundHistory.d.ts +48 -0
  416. package/dist/utils/playgroundHistory.js +38 -0
  417. package/dist/utils/playgroundInputRuns.d.ts +26 -0
  418. package/dist/utils/playgroundInputRuns.js +50 -0
  419. package/dist/utils/portExposure.d.ts +49 -0
  420. package/dist/utils/portExposure.js +122 -0
  421. package/dist/utils/portUtils.d.ts +16 -0
  422. package/dist/utils/portUtils.js +37 -0
  423. package/dist/utils/portal.d.ts +3 -14
  424. package/dist/utils/portal.js +22 -0
  425. package/dist/utils/reservedPorts.d.ts +59 -0
  426. package/dist/utils/reservedPorts.js +60 -0
  427. package/dist/utils/runEdges.d.ts +24 -0
  428. package/dist/utils/runEdges.js +35 -0
  429. package/dist/utils/runsList.d.ts +69 -0
  430. package/dist/utils/runsList.js +134 -0
  431. package/dist/utils/selectOptions.d.ts +62 -0
  432. package/dist/utils/selectOptions.js +137 -0
  433. package/dist/utils/sessionRuns.d.ts +62 -0
  434. package/dist/utils/sessionRuns.js +123 -0
  435. package/dist/utils/sheetWidths.d.ts +29 -0
  436. package/dist/utils/sheetWidths.js +41 -0
  437. package/dist/utils/sidebarWidths.d.ts +34 -0
  438. package/dist/utils/sidebarWidths.js +47 -0
  439. package/dist/utils/straightWires.d.ts +73 -0
  440. package/dist/utils/straightWires.js +99 -0
  441. package/dist/utils/themeScope.svelte.d.ts +10 -0
  442. package/dist/utils/themeScope.svelte.js +80 -0
  443. package/dist/utils/wiredHandles.d.ts +10 -0
  444. package/dist/utils/wiredHandles.js +14 -0
  445. package/dist/utils/workflowDraft.d.ts +9 -0
  446. package/dist/utils/workflowDraft.js +39 -0
  447. package/dist/utils/workflowInterface.d.ts +128 -27
  448. package/dist/utils/workflowInterface.js +244 -33
  449. package/dist/utils/zoomTier.d.ts +43 -0
  450. package/dist/utils/zoomTier.js +107 -0
  451. package/dist/utils/zoomTierRows.d.ts +41 -0
  452. package/dist/utils/zoomTierRows.js +103 -0
  453. package/dist/webmcp/WebMCPConfirm.svelte +68 -18
  454. package/dist/webmcp/bridge.d.ts +5 -0
  455. package/dist/webmcp/bridge.js +8 -0
  456. package/dist/webmcp/bridgeController.svelte.d.ts +84 -0
  457. package/dist/webmcp/bridgeController.svelte.js +224 -0
  458. package/dist/webmcp/descriptors.d.ts +1 -1
  459. package/dist/webmcp/descriptors.js +66 -5
  460. package/dist/webmcp/fakeWidget.d.ts +34 -0
  461. package/dist/webmcp/fakeWidget.js +75 -0
  462. package/dist/webmcp/gate.d.ts +6 -0
  463. package/dist/webmcp/gate.js +8 -0
  464. package/dist/webmcp/index.d.ts +2 -0
  465. package/dist/webmcp/index.js +1 -0
  466. package/dist/webmcp/runtime.js +6 -2
  467. package/dist/webmcp/types.d.ts +2 -0
  468. package/dist/webmcp/validate.js +5 -1
  469. package/package.json +14 -7
  470. package/dist/components/Button.stories.svelte +0 -65
  471. package/dist/components/Button.stories.svelte.d.ts +0 -19
  472. package/dist/components/CanvasBanner.stories.svelte +0 -30
  473. package/dist/components/CanvasBanner.stories.svelte.d.ts +0 -27
  474. package/dist/components/CanvasContextMenu.stories.svelte +0 -63
  475. package/dist/components/CanvasContextMenu.stories.svelte.d.ts +0 -19
  476. package/dist/components/ConfigPanel.stories.svelte +0 -47
  477. package/dist/components/ConfigPanel.stories.svelte.d.ts +0 -27
  478. package/dist/components/EditorStatusBar.stories.svelte +0 -44
  479. package/dist/components/EditorStatusBar.stories.svelte.d.ts +0 -27
  480. package/dist/components/FlowDropEdge.stories.svelte +0 -197
  481. package/dist/components/FlowDropEdge.stories.svelte.d.ts +0 -26
  482. package/dist/components/LoadingSpinner.stories.svelte +0 -30
  483. package/dist/components/LoadingSpinner.stories.svelte.d.ts +0 -27
  484. package/dist/components/Logo.stories.svelte +0 -22
  485. package/dist/components/Logo.stories.svelte.d.ts +0 -27
  486. package/dist/components/MarkdownDisplay.stories.svelte +0 -38
  487. package/dist/components/MarkdownDisplay.stories.svelte.d.ts +0 -27
  488. package/dist/components/Navbar.stories.svelte +0 -58
  489. package/dist/components/Navbar.stories.svelte.d.ts +0 -27
  490. package/dist/components/NodeStatusOverlay.stories.svelte +0 -85
  491. package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +0 -27
  492. package/dist/components/SchemaForm.stories.svelte +0 -122
  493. package/dist/components/SchemaForm.stories.svelte.d.ts +0 -27
  494. package/dist/components/Select.svelte +0 -53
  495. package/dist/components/Select.svelte.d.ts +0 -15
  496. package/dist/components/StatusIcon.stories.svelte +0 -60
  497. package/dist/components/StatusIcon.stories.svelte.d.ts +0 -27
  498. package/dist/components/StatusLabel.stories.svelte +0 -17
  499. package/dist/components/StatusLabel.stories.svelte.d.ts +0 -27
  500. package/dist/components/ThemeToggle.stories.svelte +0 -25
  501. package/dist/components/ThemeToggle.stories.svelte.d.ts +0 -27
  502. package/dist/components/console/CommandConsole.stories.svelte +0 -111
  503. package/dist/components/console/CommandConsole.stories.svelte.d.ts +0 -27
  504. package/dist/components/form/FormCheckboxGroup.stories.svelte +0 -28
  505. package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +0 -27
  506. package/dist/components/form/FormFieldWrapper.stories.svelte +0 -53
  507. package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +0 -27
  508. package/dist/components/form/FormNumberField.stories.svelte +0 -36
  509. package/dist/components/form/FormNumberField.stories.svelte.d.ts +0 -27
  510. package/dist/components/form/FormRangeField.stories.svelte +0 -31
  511. package/dist/components/form/FormRangeField.stories.svelte.d.ts +0 -27
  512. package/dist/components/form/FormSelect.stories.svelte +0 -50
  513. package/dist/components/form/FormSelect.stories.svelte.d.ts +0 -27
  514. package/dist/components/form/FormTextField.stories.svelte +0 -30
  515. package/dist/components/form/FormTextField.stories.svelte.d.ts +0 -27
  516. package/dist/components/form/FormTextarea.stories.svelte +0 -34
  517. package/dist/components/form/FormTextarea.stories.svelte.d.ts +0 -27
  518. package/dist/components/form/FormToggle.stories.svelte +0 -30
  519. package/dist/components/form/FormToggle.stories.svelte.d.ts +0 -27
  520. package/dist/components/icons/CommandLineIcon.svelte +0 -15
  521. package/dist/components/icons/CommandLineIcon.svelte.d.ts +0 -26
  522. package/dist/components/interrupt/ChoicePrompt.stories.svelte +0 -68
  523. package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +0 -27
  524. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +0 -71
  525. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +0 -27
  526. package/dist/components/interrupt/ReviewPrompt.stories.svelte +0 -77
  527. package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +0 -27
  528. package/dist/components/interrupt/TextInputPrompt.stories.svelte +0 -51
  529. package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +0 -27
  530. package/dist/components/nodes/CaptionNode.stories.svelte +0 -65
  531. package/dist/components/nodes/CaptionNode.stories.svelte.d.ts +0 -18
  532. package/dist/components/nodes/GatewayNode.stories.svelte +0 -108
  533. package/dist/components/nodes/GatewayNode.stories.svelte.d.ts +0 -26
  534. package/dist/components/nodes/IdeaNode.stories.svelte +0 -52
  535. package/dist/components/nodes/IdeaNode.stories.svelte.d.ts +0 -26
  536. package/dist/components/nodes/NotesNode.stories.svelte +0 -76
  537. package/dist/components/nodes/NotesNode.stories.svelte.d.ts +0 -26
  538. package/dist/components/nodes/SimpleNode.stories.svelte +0 -223
  539. package/dist/components/nodes/SimpleNode.stories.svelte.d.ts +0 -26
  540. package/dist/components/nodes/SquareNode.stories.svelte +0 -127
  541. package/dist/components/nodes/SquareNode.stories.svelte.d.ts +0 -26
  542. package/dist/components/nodes/TerminalNode.stories.svelte +0 -25
  543. package/dist/components/nodes/TerminalNode.stories.svelte.d.ts +0 -26
  544. package/dist/components/nodes/ToolNode.stories.svelte +0 -189
  545. package/dist/components/nodes/ToolNode.stories.svelte.d.ts +0 -26
  546. package/dist/components/nodes/WorkflowNode.stories.svelte +0 -188
  547. package/dist/components/nodes/WorkflowNode.stories.svelte.d.ts +0 -26
  548. package/dist/components/playground/MessageBubble.stories.svelte +0 -151
  549. package/dist/components/playground/MessageBubble.stories.svelte.d.ts +0 -27
  550. package/dist/components/toast/WarningIcon.svelte +0 -28
  551. package/dist/components/toast/WarningIcon.svelte.d.ts +0 -26
  552. package/dist/mocks/app-environment.d.ts +0 -8
  553. package/dist/mocks/app-environment.js +0 -16
  554. package/dist/mocks/app-forms.d.ts +0 -6
  555. package/dist/mocks/app-forms.js +0 -29
  556. package/dist/mocks/app-navigation.d.ts +0 -5
  557. package/dist/mocks/app-navigation.js +0 -36
  558. package/dist/mocks/app-stores.d.ts +0 -14
  559. package/dist/mocks/app-stores.js +0 -26
  560. package/dist/stories/CanvasDecorator.svelte +0 -49
  561. package/dist/stories/CanvasDecorator.svelte.d.ts +0 -8
  562. package/dist/stories/EdgeDecorator.svelte +0 -125
  563. package/dist/stories/EdgeDecorator.svelte.d.ts +0 -17
  564. package/dist/stories/NodeDecorator.svelte +0 -75
  565. package/dist/stories/NodeDecorator.svelte.d.ts +0 -8
  566. package/dist/stories/WebMCPFakeAgent.svelte +0 -229
  567. package/dist/stories/WebMCPFakeAgent.svelte.d.ts +0 -10
  568. package/dist/stories/utils.d.ts +0 -93
  569. package/dist/stories/utils.js +0 -156
  570. package/dist/webmcp/WebMCP.stories.svelte +0 -101
  571. package/dist/webmcp/WebMCP.stories.svelte.d.ts +0 -18
@@ -23,10 +23,12 @@
23
23
  import Button from './Button.svelte';
24
24
  import IconButton from './IconButton.svelte';
25
25
  import Input from './Input.svelte';
26
- import Select from './Select.svelte';
26
+ import Select from './primitives/Select.svelte';
27
+ import Checkbox from './primitives/Checkbox.svelte';
28
+ import Menu, { type MenuEntry } from './primitives/Menu.svelte';
27
29
  import BindablePortListbox from './BindablePortListbox.svelte';
28
- import PortShapeSymbol from './ports/PortShapeSymbol.svelte';
29
- import PortLaneChip from './ports/PortLaneChip.svelte';
30
+ import { getDataTypeColorToken, getPortColorToken } from '../utils/colors.js';
31
+ import InterfaceTag from './InterfaceTag.svelte';
30
32
  import { m } from '../messages/index.js';
31
33
  import {
32
34
  DEFAULT_HISTORY_TURN_LIMIT,
@@ -64,8 +66,21 @@
64
66
  alreadyConnected?: boolean;
65
67
  /** Label of the node feeding that competing edge, when there is one. */
66
68
  conflictingSource?: string;
67
- /** Input side only: the id of another input that already has this entry's turn. */
69
+ /** Input side only: the id of another input that already has this entry's (deprecated) turn. */
68
70
  turnTakenBy?: string;
71
+ /**
72
+ * Opens the workflow's Playground settings, where the chat is set up now.
73
+ * Linked from the deprecated `turn` notice; omit when the host has no
74
+ * Playground settings (the notice then says where without a link).
75
+ */
76
+ onOpenPlaygroundSettings?: () => void;
77
+ /**
78
+ * Offer the deprecated Chat turn selector (and the history limit).
79
+ * Only for a workflow without Playground settings (a server before
80
+ * FlowDrop 2.7.0), where `turn` is still the only way to set the chat
81
+ * up. With settings, a stored `turn` shows as a deprecated chip instead.
82
+ */
83
+ turnSelector?: boolean;
69
84
  isFirst: boolean;
70
85
  isLast: boolean;
71
86
  onPatch: (patch: Partial<WorkflowInterfaceEntry>) => void;
@@ -84,6 +99,8 @@
84
99
  alreadyConnected = false,
85
100
  conflictingSource,
86
101
  turnTakenBy,
102
+ onOpenPlaygroundSettings,
103
+ turnSelector = false,
87
104
  isFirst,
88
105
  isLast,
89
106
  onPatch,
@@ -92,8 +109,9 @@
92
109
  }: Props = $props();
93
110
 
94
111
  /**
95
- * Whether the secondary fields are disclosed: seeded once from whether the
96
- * entry wants attention, then the author's. Deriving it from `status` would
112
+ * Whether the secondary fields are shown under the row: seeded once from
113
+ * whether the entry wants attention, then the author's (the row's "More
114
+ * options" menu item). Deriving it from `status` would
97
115
  * shut the fields on every edit and drop the focused input's keystrokes.
98
116
  */
99
117
  // The seed is meant to be read once.
@@ -118,10 +136,20 @@
118
136
  return options;
119
137
  }
120
138
 
139
+ /** The entry's deprecated `turn`, as a label. */
140
+ const turnLabel = $derived(
141
+ entry.turn === undefined
142
+ ? undefined
143
+ : isKnownTurn(entry.turn)
144
+ ? m().workflowInterface.turns[entry.turn]
145
+ : entry.turn
146
+ );
147
+
121
148
  /**
122
- * Chat turn options for this direction. A stored value outside them — one
123
- * from a newer server, or a value of the other direction — is listed too,
124
- * so the select shows what is stored and never silently rewrites it.
149
+ * Chat turn options for this direction (the selector, `turnSelector` only).
150
+ * A stored value outside them — one from a newer server, or a value of the
151
+ * other direction — is listed too, so the select shows what is stored and
152
+ * never silently rewrites it.
125
153
  */
126
154
  const turnOptions = $derived.by(() => {
127
155
  const options: Array<{ value: string; label: string }> = turnsFor(
@@ -152,6 +180,42 @@
152
180
  onPatch(turnPatch(entry, value));
153
181
  }
154
182
 
183
+ /**
184
+ * The row's overflow menu: reorder, the secondary fields, remove. Reorder and
185
+ * remove are never on screen at rest; the menu is the one way in, and it is a
186
+ * real menu (arrow keys, type-ahead, Escape), so the keyboard reaches all of it.
187
+ */
188
+ const rowMenu = $derived<MenuEntry[]>([
189
+ {
190
+ label: m().workflowInterface.menuMoveUp,
191
+ icon: 'heroicons:chevron-up',
192
+ disabled: isFirst,
193
+ testId: 'wf-entry-move-up',
194
+ onselect: () => onMove(-1)
195
+ },
196
+ {
197
+ label: m().workflowInterface.menuMoveDown,
198
+ icon: 'heroicons:chevron-down',
199
+ disabled: isLast,
200
+ testId: 'wf-entry-move-down',
201
+ onselect: () => onMove(1)
202
+ },
203
+ { type: 'separator' },
204
+ {
205
+ label: m().workflowInterface.moreOptions,
206
+ checked: fieldsOpen,
207
+ testId: 'wf-entry-more-options',
208
+ onselect: () => (fieldsOpen = !fieldsOpen)
209
+ },
210
+ { type: 'separator' },
211
+ {
212
+ label: m().workflowInterface.menuRemove,
213
+ icon: 'heroicons:trash',
214
+ testId: 'wf-entry-remove',
215
+ onselect: onRemove
216
+ }
217
+ ]);
218
+
155
219
  /** Whether the binding picker is unfolded under the "Bound port" control. */
156
220
  let pickerOpen = $state(false);
157
221
 
@@ -233,138 +297,130 @@
233
297
  status.status !== 'ok' &&
234
298
  status.status !== 'unbound'}
235
299
  >
236
- <div class="wf-interface__entry-side">
237
- <div class="wf-interface__reorder">
238
- <button
239
- type="button"
240
- disabled={isFirst}
241
- onclick={() => onMove(-1)}
242
- aria-label={m().workflowInterface.moveUp({ id: entry.id })}
243
- >
244
- <Icon icon="heroicons:chevron-up" />
245
- </button>
246
- <button
247
- type="button"
248
- disabled={isLast}
249
- onclick={() => onMove(1)}
250
- aria-label={m().workflowInterface.moveDown({ id: entry.id })}
300
+ <!-- One compact line: id → bound port, then the overflow menu. The id is a
301
+ field you type into in place; the binding opens the shared port listbox. -->
302
+ <div class="wf-interface__line">
303
+ <!-- The entry as its canvas tag: swatch, the id typed in place, and the tip
304
+ that points the way the canvas flows. -->
305
+ <InterfaceTag
306
+ id={entry.id}
307
+ class="wf-interface__tag"
308
+ color={getDataTypeColorToken(checker, entry.dataType)}
309
+ mismatch={status?.status === 'type-mismatch'}
310
+ >
311
+ <input
312
+ type="text"
313
+ class="wf-interface__id"
314
+ aria-label={m().workflowInterface.idLabel}
315
+ title={m().workflowInterface.idLabel}
316
+ spellcheck="false"
317
+ value={entry.id}
318
+ onchange={(e) => {
319
+ // An input needs an id: an emptied field goes back to the old one
320
+ // (else the chat binding would lose the input for good).
321
+ if (e.currentTarget.value.trim() === '') e.currentTarget.value = entry.id;
322
+ else onPatch({ id: e.currentTarget.value });
323
+ }}
324
+ />
325
+ </InterfaceTag>
326
+ <!-- The bound port, said back the way the canvas says it: node › port and
327
+ its type. -->
328
+ <button
329
+ type="button"
330
+ class="wf-interface__binding"
331
+ class:wf-interface__binding--open={pickerOpen}
332
+ class:wf-interface__binding--invalid={isInput && alreadyConnected}
333
+ class:wf-interface__binding--empty={!entry.bindings[0]}
334
+ aria-haspopup="listbox"
335
+ aria-expanded={pickerOpen}
336
+ title={m().workflowInterface.bindingChange}
337
+ onclick={() => (pickerOpen = !pickerOpen)}
338
+ >
339
+ <span class="wf-interface__sr">{m().workflowInterface.bindingLabel}:</span>
340
+ {#if boundTarget}
341
+ <span
342
+ class="wf-interface__binding-dot"
343
+ style="--wf-binding-dot: {getPortColorToken(checker, boundTarget.port)}"
344
+ aria-hidden="true"
345
+ ></span>
346
+ <span class="wf-interface__binding-path">
347
+ <span class="wf-interface__binding-node">
348
+ {boundTarget.node.data?.label ?? boundTarget.node.id}
349
+ </span>
350
+ <Icon icon="heroicons:chevron-right" />
351
+ <span class="wf-interface__binding-port">{boundTarget.port.name}</span>
352
+ </span>
353
+ <span class="wf-interface__binding-type" title={boundTarget.port.dataType}>
354
+ {checker.getDataTypeConfig(boundTarget.port.dataType)?.name ?? boundTarget.port.dataType}
355
+ </span>
356
+ {:else if entry.bindings[0]}
357
+ <span class="wf-interface__binding-path wf-interface__binding-path--dangling">
358
+ {m().workflowInterface.bindingDangling({
359
+ nodeId: entry.bindings[0].nodeId,
360
+ portId: entry.bindings[0].portId
361
+ })}
362
+ </span>
363
+ {:else}
364
+ <span class="wf-interface__binding-placeholder">
365
+ {m().workflowInterface.bindingUnbound}
366
+ </span>
367
+ {/if}
368
+ </button>
369
+ {#if turnLabel !== undefined}
370
+ <span
371
+ class="wf-interface__turn-chip"
372
+ class:wf-interface__turn-chip--deprecated={!turnSelector}
251
373
  >
252
- <Icon icon="heroicons:chevron-down" />
253
- </button>
254
- </div>
374
+ {turnLabel}
375
+ </span>
376
+ {/if}
377
+ <Menu
378
+ size="sm"
379
+ align="end"
380
+ class="wf-interface__menu"
381
+ label={m().workflowInterface.entryActions({ id: entry.id })}
382
+ testId="wf-entry-menu"
383
+ items={rowMenu}
384
+ />
255
385
  </div>
256
-
257
- <div class="wf-interface__fields">
258
- <div class="wf-interface__row wf-interface__row--identity">
259
- <label class="wf-interface__field wf-interface__field--id">
260
- <span class="wf-interface__label">{m().workflowInterface.idLabel}</span>
261
- <Input
262
- size="sm"
263
- type="text"
264
- value={entry.id}
265
- onchange={(e) => onPatch({ id: e.currentTarget.value })}
266
- />
267
- </label>
268
- <div class="wf-interface__field wf-interface__field--binding">
269
- <span class="wf-interface__label" id="wf-binding-label-{direction}-{entry.id}">
270
- {m().workflowInterface.bindingLabel}
271
- </span>
272
- <!-- The bound port, said back the way the canvas says it — shape symbol,
273
- node › port, lane chip — and the way in to change it. Looks like a
274
- select, opens the shared port listbox instead. -->
275
- <button
276
- type="button"
277
- class="wf-interface__binding"
278
- class:wf-interface__binding--open={pickerOpen}
279
- class:wf-interface__binding--invalid={isInput && alreadyConnected}
280
- class:wf-interface__binding--empty={!entry.bindings[0]}
281
- aria-haspopup="listbox"
282
- aria-expanded={pickerOpen}
283
- aria-labelledby="wf-binding-label-{direction}-{entry.id}"
284
- title={m().workflowInterface.bindingChange}
285
- onclick={() => (pickerOpen = !pickerOpen)}
286
- >
287
- {#if boundTarget}
288
- <PortShapeSymbol {checker} port={boundTarget.port} />
289
- <span class="wf-interface__binding-path">
290
- <span class="wf-interface__binding-node">
291
- {boundTarget.node.data?.label ?? boundTarget.node.id}
292
- </span>
293
- <Icon icon="heroicons:chevron-right" />
294
- <span class="wf-interface__binding-port">{boundTarget.port.name}</span>
295
- <PortLaneChip {checker} port={boundTarget.port} />
296
- </span>
297
- {:else if entry.bindings[0]}
298
- <span class="wf-interface__binding-path wf-interface__binding-path--dangling">
299
- {m().workflowInterface.bindingDangling({
300
- nodeId: entry.bindings[0].nodeId,
301
- portId: entry.bindings[0].portId
302
- })}
303
- </span>
304
- {:else}
305
- <span class="wf-interface__binding-placeholder">
306
- {m().workflowInterface.bindingUnbound}
307
- </span>
308
- {/if}
309
- <Icon icon="heroicons:chevron-up-down" class="wf-interface__binding-caret" />
310
- </button>
311
- {#if isInput && alreadyConnected}
312
- <span class="wf-interface__inline wf-interface__inline--error">
313
- {m().workflowInterface.alreadyConnectedInline({ source: conflictingSource ?? '' })}
314
- </span>
386
+ {#if isInput && alreadyConnected}
387
+ <span class="wf-interface__inline wf-interface__inline--error">
388
+ {m().workflowInterface.alreadyConnectedInline({ source: conflictingSource ?? '' })}
389
+ </span>
390
+ {/if}
391
+
392
+ {#if pickerOpen}
393
+ <div class="wf-interface__picker" role="group" aria-label={m().workflowInterface.bindingChoose}>
394
+ <BindablePortListbox
395
+ {direction}
396
+ candidates={ownCandidates}
397
+ {checker}
398
+ idPrefix="wf-binding-option-{direction}-{entry.id}"
399
+ {currentKey}
400
+ confirmOnClick
401
+ autofocus
402
+ onConfirm={bindTo}
403
+ onCancel={() => (pickerOpen = false)}
404
+ />
405
+ <div class="wf-interface__picker-actions">
406
+ {#if entry.bindings[0]}
407
+ <Button variant="ghost" size="sm" onclick={unbind}>
408
+ <Icon icon="heroicons:link-slash" />
409
+ {m().workflowInterface.bindingUnbind}
410
+ </Button>
315
411
  {/if}
412
+ <span class="wf-interface__picker-spacer"></span>
413
+ <Button variant="ghost" size="sm" onclick={() => (pickerOpen = false)}>
414
+ {m().workflowInterface.composerCancel}
415
+ </Button>
316
416
  </div>
317
417
  </div>
418
+ {/if}
318
419
 
319
- {#if pickerOpen}
320
- <div
321
- class="wf-interface__picker"
322
- role="group"
323
- aria-label={m().workflowInterface.bindingChoose}
324
- >
325
- <BindablePortListbox
326
- {direction}
327
- candidates={ownCandidates}
328
- {checker}
329
- idPrefix="wf-binding-option-{direction}-{entry.id}"
330
- {currentKey}
331
- confirmOnClick
332
- autofocus
333
- onConfirm={bindTo}
334
- onCancel={() => (pickerOpen = false)}
335
- />
336
- <div class="wf-interface__picker-actions">
337
- {#if entry.bindings[0]}
338
- <Button variant="ghost" size="sm" onclick={unbind}>
339
- <Icon icon="heroicons:link-slash" />
340
- {m().workflowInterface.bindingUnbind}
341
- </Button>
342
- {/if}
343
- <span class="wf-interface__picker-spacer"></span>
344
- <Button variant="ghost" size="sm" onclick={() => (pickerOpen = false)}>
345
- {m().workflowInterface.composerCancel}
346
- </Button>
347
- </div>
348
- </div>
349
- {/if}
350
-
351
- <!-- Two-way, and it settles: the setter writes what the DOM already
352
- reports, and assigning `open` a value it already holds fires no
353
- further `toggle`. Without that the pair would be an unbounded
354
- DOM/state cascade rather than a binding — and one Svelte's
355
- update-depth guard could not catch, since each turn is a fresh
356
- event task. -->
357
- <details class="wf-interface__more" bind:open={fieldsOpen}>
358
- <summary>
359
- <Icon icon="heroicons:chevron-right" />
360
- {m().workflowInterface.moreOptions}
361
- {#if entry.turn !== undefined}
362
- <span class="wf-interface__turn-chip">
363
- {isKnownTurn(entry.turn) ? m().workflowInterface.turns[entry.turn] : entry.turn}
364
- </span>
365
- {/if}
366
- </summary>
367
- <div class="wf-interface__more-body">
420
+ <!-- Always rendered, hidden while closed: what the author typed survives a close. -->
421
+ <div class="wf-interface__more" hidden={!fieldsOpen}>
422
+ <div class="wf-interface__more-body">
423
+ {#if turnSelector}
368
424
  <div class="wf-interface__row">
369
425
  <label class="wf-interface__field">
370
426
  <span class="wf-interface__label">{m().workflowInterface.turnLabel}</span>
@@ -404,322 +460,253 @@
404
460
  </label>
405
461
  {/if}
406
462
  </div>
407
-
408
- {#if boundTarget}
409
- <div class="wf-interface__pull-row">
410
- <Button
411
- variant="ghost"
412
- size="sm"
413
- class="wf-interface__pull"
414
- title={m().workflowInterface.pullFromPortTitle}
415
- onclick={() => onPatch(pullEntryFieldsFromPort(boundTarget.port))}
416
- >
417
- <Icon icon="heroicons:arrow-down-tray" />
418
- {m().workflowInterface.pullFromPort}
419
- </Button>
420
- </div>
421
- {/if}
422
- <div class="wf-interface__row">
423
- <label class="wf-interface__field">
424
- <span class="wf-interface__label">{m().workflowInterface.nameLabel}</span>
425
- <Input
426
- size="sm"
427
- type="text"
428
- value={entry.name ?? ''}
429
- placeholder={m().workflowInterface.namePlaceholder}
430
- onchange={(e) => onPatch({ name: e.currentTarget.value || undefined })}
431
- />
432
- </label>
433
- <label class="wf-interface__field">
434
- <span class="wf-interface__label">{m().workflowInterface.dataTypeLabel}</span>
435
- <Select
436
- size="sm"
437
- invalid={status?.status === 'type-mismatch'}
438
- value={entry.dataType}
439
- onchange={(e) => onPatch({ dataType: e.currentTarget.value })}
440
- >
441
- {#if !entry.dataType}
442
- <option value="" disabled selected>
443
- {m().workflowInterface.dataTypePlaceholder}
444
- </option>
445
- {/if}
446
- {#each dataTypeOptions(entry.dataType) as option (option.id)}
447
- <option value={option.id}>{option.name}</option>
448
- {/each}
449
- </Select>
450
- {#if status?.status === 'type-mismatch' && boundPortType}
451
- <span class="wf-interface__inline wf-interface__inline--warning">
452
- {m().workflowInterface.typeMismatchInline({ portType: boundPortType ?? '' })}
453
- <button
454
- type="button"
455
- class="wf-interface__quickfix"
456
- onclick={() => onPatch({ dataType: boundPortType ?? entry.dataType })}
457
- >
458
- {m().workflowInterface.useMatchPortType}
459
- </button>
460
- </span>
463
+ {:else if turnLabel !== undefined}
464
+ <div class="wf-interface__turn-deprecated" role="note">
465
+ <span>
466
+ {m().workflowInterface.turnDeprecated({
467
+ turn: turnLabel,
468
+ limit: entry.turn === 'history' ? historyLimitOf(entry) : undefined
469
+ })}
470
+ {#if turnTakenBy !== undefined}
471
+ {m().workflowInterface.turnTakenInline({ id: turnTakenBy })}
461
472
  {/if}
462
- </label>
473
+ </span>
474
+ {#if onOpenPlaygroundSettings}
475
+ <button type="button" class="wf-interface__quickfix" onclick={onOpenPlaygroundSettings}>
476
+ {m().workflowInterface.turnOpenPlayground}
477
+ </button>
478
+ {/if}
463
479
  </div>
464
-
465
- <div class="wf-interface__row">
466
- <label class="wf-interface__field wf-interface__field--wide">
467
- <span class="wf-interface__label">{m().workflowInterface.descriptionLabel}</span>
468
- <Input
469
- size="sm"
470
- type="text"
471
- value={entry.description ?? ''}
472
- onchange={(e) => onPatch({ description: e.currentTarget.value || undefined })}
473
- />
474
- </label>
480
+ {/if}
481
+
482
+ {#if boundTarget}
483
+ <div class="wf-interface__pull-row">
484
+ <Button
485
+ variant="ghost"
486
+ size="sm"
487
+ class="wf-interface__pull"
488
+ title={m().workflowInterface.pullFromPortTitle}
489
+ onclick={() => onPatch(pullEntryFieldsFromPort(boundTarget.port))}
490
+ >
491
+ <Icon icon="heroicons:arrow-down-tray" />
492
+ {m().workflowInterface.pullFromPort}
493
+ </Button>
475
494
  </div>
476
-
477
- <div class="wf-interface__row">
478
- <label class="wf-interface__field">
479
- <span class="wf-interface__label">{m().workflowInterface.defaultValueLabel}</span>
480
- <Input
481
- size="sm"
482
- type="text"
483
- value={formatDefaultValue(entry.defaultValue)}
484
- onchange={(e) => onPatch({ defaultValue: parseDefaultValue(e.currentTarget.value) })}
485
- />
486
- </label>
487
- {#if isInput}
488
- <label class="wf-interface__field wf-interface__field--checkbox">
489
- <input
490
- type="checkbox"
491
- checked={entry.required ?? false}
492
- onchange={(e) => onPatch({ required: e.currentTarget.checked || undefined })}
493
- />
494
- <span class="wf-interface__label">{m().workflowInterface.requiredLabel}</span>
495
- </label>
495
+ {/if}
496
+ <div class="wf-interface__row">
497
+ <label class="wf-interface__field">
498
+ <span class="wf-interface__label">{m().workflowInterface.nameLabel}</span>
499
+ <Input
500
+ size="sm"
501
+ type="text"
502
+ value={entry.name ?? ''}
503
+ placeholder={m().workflowInterface.namePlaceholder}
504
+ onchange={(e) => onPatch({ name: e.currentTarget.value || undefined })}
505
+ />
506
+ </label>
507
+ <label class="wf-interface__field">
508
+ <span class="wf-interface__label">{m().workflowInterface.dataTypeLabel}</span>
509
+ <Select
510
+ size="sm"
511
+ invalid={status?.status === 'type-mismatch'}
512
+ value={entry.dataType}
513
+ onchange={(e) => onPatch({ dataType: e.currentTarget.value })}
514
+ >
515
+ {#if !entry.dataType}
516
+ <option value="" disabled selected>
517
+ {m().workflowInterface.dataTypePlaceholder}
518
+ </option>
519
+ {/if}
520
+ {#each dataTypeOptions(entry.dataType) as option (option.id)}
521
+ <option value={option.id}>{option.name}</option>
522
+ {/each}
523
+ </Select>
524
+ {#if status?.status === 'type-mismatch' && boundPortType}
525
+ <span class="wf-interface__inline wf-interface__inline--warning">
526
+ {m().workflowInterface.typeMismatchInline({ portType: boundPortType ?? '' })}
527
+ <button
528
+ type="button"
529
+ class="wf-interface__quickfix"
530
+ onclick={() => onPatch({ dataType: boundPortType ?? entry.dataType })}
531
+ >
532
+ {m().workflowInterface.useMatchPortType}
533
+ </button>
534
+ </span>
496
535
  {/if}
497
- </div>
536
+ </label>
537
+ </div>
498
538
 
539
+ <div class="wf-interface__row">
540
+ <label class="wf-interface__field wf-interface__field--wide">
541
+ <span class="wf-interface__label">{m().workflowInterface.descriptionLabel}</span>
542
+ <Input
543
+ size="sm"
544
+ type="text"
545
+ value={entry.description ?? ''}
546
+ onchange={(e) => onPatch({ description: e.currentTarget.value || undefined })}
547
+ />
548
+ </label>
549
+ </div>
550
+
551
+ <div class="wf-interface__row">
552
+ <label class="wf-interface__field">
553
+ <span class="wf-interface__label">{m().workflowInterface.defaultValueLabel}</span>
554
+ <Input
555
+ size="sm"
556
+ type="text"
557
+ value={formatDefaultValue(entry.defaultValue)}
558
+ onchange={(e) => onPatch({ defaultValue: parseDefaultValue(e.currentTarget.value) })}
559
+ />
560
+ </label>
499
561
  {#if isInput}
500
- <div class="wf-interface__examples">
501
- <span class="wf-interface__label">
502
- {m().workflowInterface.examplesLabel}
503
- </span>
504
- {#each entry.examples ?? [] as example, exampleIndex (exampleIndex)}
505
- <div class="wf-interface__example-row">
506
- <Input
507
- size="sm"
508
- type="text"
509
- value={formatDefaultValue(example)}
510
- onchange={(e) => patchExample(exampleIndex, e.currentTarget.value)}
511
- />
512
- <IconButton
513
- size="sm"
514
- class="wf-interface__example-remove"
515
- onclick={() => removeExample(exampleIndex)}
516
- ariaLabel={m().workflowInterface.removeExample}
517
- >
518
- <Icon icon="heroicons:x-mark" />
519
- </IconButton>
520
- </div>
521
- {/each}
522
- <Button
523
- variant="ghost"
524
- size="sm"
525
- class="wf-interface__example-add"
526
- onclick={addExample}
527
- >
528
- <Icon icon="heroicons:plus" />
529
- {m().workflowInterface.addExample}
530
- </Button>
531
- </div>
562
+ <Checkbox
563
+ class="wf-interface__field wf-interface__field--checkbox"
564
+ checked={entry.required ?? false}
565
+ label={m().workflowInterface.requiredLabel}
566
+ onchange={(on) => onPatch({ required: on || undefined })}
567
+ />
532
568
  {/if}
533
569
  </div>
534
- </details>
535
570
 
536
- <!-- Every non-ok resolveInterface status renders in words somewhere in this
571
+ {#if isInput}
572
+ <div class="wf-interface__examples">
573
+ <span class="wf-interface__label">
574
+ {m().workflowInterface.examplesLabel}
575
+ </span>
576
+ {#each entry.examples ?? [] as example, exampleIndex (exampleIndex)}
577
+ <div class="wf-interface__example-row">
578
+ <Input
579
+ size="sm"
580
+ type="text"
581
+ value={formatDefaultValue(example)}
582
+ onchange={(e) => patchExample(exampleIndex, e.currentTarget.value)}
583
+ />
584
+ <IconButton
585
+ size="sm"
586
+ class="wf-interface__example-remove"
587
+ onclick={() => removeExample(exampleIndex)}
588
+ ariaLabel={m().workflowInterface.removeExample}
589
+ >
590
+ <Icon icon="heroicons:x-mark" />
591
+ </IconButton>
592
+ </div>
593
+ {/each}
594
+ <Button variant="ghost" size="sm" class="wf-interface__example-add" onclick={addExample}>
595
+ <Icon icon="heroicons:plus" />
596
+ {m().workflowInterface.addExample}
597
+ </Button>
598
+ </div>
599
+ {/if}
600
+ </div>
601
+ </div>
602
+
603
+ <!-- Every non-ok resolveInterface status renders in words somewhere in this
537
604
  card — the obligation that makes this surface canonical. `ok` says
538
- nothing: neutral is the good state, and the card's error border already
605
+ nothing: neutral is the good state, and the row's error colour already
539
606
  marks the bad ones. Type-mismatch and already-connected render inline
540
607
  next to their own field; the rest are explained here. -->
541
- {#if status && FOOTER_STATUSES.has(status.status)}
542
- <p class="wf-interface__status wf-interface__status--{status.status}">
543
- {describeInterfaceEntryStatus(status)}
544
- </p>
545
- {/if}
546
- {#each footerIssues as issue (issue.code)}
547
- <p class="wf-interface__status wf-interface__status--{issue.severity}">
548
- {issue.message}
549
- </p>
550
- {/each}
551
-
552
- {#if entry.meta && Object.keys(entry.meta).length > 0}
553
- <details class="wf-interface__meta">
554
- <summary>{m().workflowInterface.metaDisclosure}</summary>
555
- <pre>{JSON.stringify(entry.meta, null, 2)}</pre>
556
- </details>
557
- {/if}
558
- </div>
559
-
560
- <IconButton
561
- size="sm"
562
- class="wf-interface__remove"
563
- onclick={onRemove}
564
- ariaLabel={m().workflowInterface.removeEntry({ id: entry.id })}
565
- >
566
- <Icon icon="heroicons:trash" />
567
- </IconButton>
608
+ {#if status && FOOTER_STATUSES.has(status.status)}
609
+ <p class="wf-interface__status wf-interface__status--{status.status}">
610
+ {describeInterfaceEntryStatus(status)}
611
+ </p>
612
+ {/if}
613
+ {#each footerIssues as issue (issue.code)}
614
+ <p class="wf-interface__status wf-interface__status--{issue.severity}">
615
+ {issue.message}
616
+ </p>
617
+ {/each}
618
+
619
+ {#if entry.meta && Object.keys(entry.meta).length > 0}
620
+ <details class="wf-interface__meta">
621
+ <summary>{m().workflowInterface.metaDisclosure}</summary>
622
+ <pre>{JSON.stringify(entry.meta, null, 2)}</pre>
623
+ </details>
624
+ {/if}
568
625
  </li>
569
626
 
570
627
  <style>
571
628
  /*
572
- One interface entry, styled as a card in the same family as the settings
573
- form beside it: the shared `.flowdrop-input` controls (via Input/Select),
574
- the shared `.flowdrop-btn` buttons (via Button/IconButton), the settings
575
- form's label weight and size, and the panel's card surface. Nothing here
576
- declares a colour that isn't a design token.
629
+ One interface entry: a flat row. No card, no border, no shadow: rows are
630
+ separated by space, and a tint on hover/focus says which one you are on.
631
+ The secondary fields open underneath it, indented, still without a box.
632
+ Nothing here declares a colour that isn't a design token.
577
633
  */
578
634
  .wf-interface__entry {
579
- display: flex;
580
- align-items: flex-start;
581
- gap: var(--fd-space-sm);
582
- padding: var(--fd-space-sm) var(--fd-space-sm) var(--fd-space-sm) var(--fd-space-xs);
583
- background-color: var(--fd-card);
584
- border: 1px solid var(--fd-border);
585
- border-radius: var(--fd-radius-lg);
586
- box-shadow: var(--fd-shadow-sm);
587
- transition:
588
- border-color var(--fd-transition-fast),
589
- box-shadow var(--fd-transition-fast);
590
- }
591
-
592
- .wf-interface__entry:hover {
593
- border-color: var(--fd-border-strong);
594
- }
595
-
596
- .wf-interface__entry:focus-within {
597
- border-color: var(--fd-primary);
598
- box-shadow: 0 0 0 var(--fd-ring-width) var(--fd-primary-muted);
599
- }
600
-
601
- .wf-interface__entry--error {
602
- border-color: color-mix(in srgb, var(--fd-error) 45%, var(--fd-border));
603
- }
604
-
605
- /* The card's spine: health dot on top, reorder chevrons below. */
606
- .wf-interface__entry-side {
607
635
  display: flex;
608
636
  flex-direction: column;
609
- align-items: center;
610
637
  gap: var(--fd-space-2xs);
611
- flex-shrink: 0;
612
- padding-top: 0.375rem;
638
+ padding: var(--fd-space-3xs) 0;
613
639
  }
614
640
 
615
- .wf-interface__reorder {
616
- display: flex;
617
- flex-direction: column;
618
- }
619
-
620
- .wf-interface__reorder button {
641
+ .wf-interface__line {
621
642
  display: flex;
622
643
  align-items: center;
623
- justify-content: center;
624
- width: 1.25rem;
625
- height: 1rem;
626
- padding: 0;
627
- border: none;
628
- border-radius: var(--fd-radius-sm);
629
- background: none;
630
- color: var(--fd-muted-foreground);
631
- font-size: 0.875rem;
632
- cursor: pointer;
633
- transition:
634
- color var(--fd-transition-fast),
635
- background-color var(--fd-transition-fast);
636
- }
637
-
638
- .wf-interface__reorder button:hover:not(:disabled) {
639
- color: var(--fd-foreground);
640
- background-color: var(--fd-subtle);
641
- }
642
-
643
- .wf-interface__reorder button:disabled {
644
- opacity: 0.3;
645
- cursor: default;
646
- }
647
-
648
- .wf-interface__fields {
649
- flex: 1;
650
- min-width: 0;
651
- display: flex;
652
- flex-direction: column;
653
- gap: var(--fd-space-sm);
654
- }
655
-
656
- .wf-interface__row {
657
- display: flex;
658
- flex-wrap: wrap;
659
- gap: var(--fd-space-sm);
660
- }
661
-
662
- .wf-interface__field {
663
- display: flex;
664
- flex-direction: column;
665
644
  gap: var(--fd-space-2xs);
666
- flex: 1 1 8rem;
667
645
  min-width: 0;
646
+ min-height: var(--fd-control-md);
647
+ padding-right: var(--fd-space-3xs);
648
+ border-radius: var(--fd-control-radius);
649
+ transition: background-color var(--fd-transition-fast);
668
650
  }
669
651
 
670
- .wf-interface__field--id {
671
- flex: 1 1 7rem;
672
- }
673
-
674
- .wf-interface__field--binding {
675
- flex: 2 1 12rem;
676
- }
677
-
678
- .wf-interface__field--wide {
679
- flex: 1 1 100%;
652
+ .wf-interface__line:hover,
653
+ .wf-interface__line:focus-within {
654
+ background-color: var(--fd-muted);
680
655
  }
681
656
 
682
- .wf-interface__field--checkbox {
683
- flex-direction: row;
684
- align-items: center;
685
- gap: var(--fd-space-xs);
686
- flex: 0 0 auto;
687
- align-self: flex-end;
688
- min-height: 2rem;
657
+ /* The id: mono, typed into in place. Looks like text until you reach for it. */
658
+ /* Sized to the id (capped), so a short id leaves its room to the bound port. */
659
+ .wf-interface__line :global(.wf-interface__tag) {
660
+ --fd-iface-tag-height: var(--fd-control-md);
661
+ --fd-iface-tag-id-size: var(--fd-text-xs);
662
+ min-width: 0;
689
663
  }
690
664
 
691
- .wf-interface__field--checkbox input[type='checkbox'] {
692
- width: 1rem;
693
- height: 1rem;
694
- margin: 0;
695
- accent-color: var(--fd-primary);
696
- cursor: pointer;
665
+ .wf-interface__id {
666
+ flex: 0 1 auto;
667
+ field-sizing: content;
668
+ min-width: 4ch;
669
+ max-width: 7.5rem;
670
+ box-sizing: border-box;
671
+ height: 100%;
672
+ padding: 0;
673
+ border: 0;
674
+ background-color: transparent;
675
+ color: var(--fd-foreground);
676
+ font-family: var(--fd-font-mono);
677
+ font-size: var(--fd-text-xs);
678
+ font-weight: 500;
679
+ text-overflow: ellipsis;
697
680
  }
698
681
 
699
- /* Same voice as FormFieldWrapper's `.form-field__label`. */
700
- .wf-interface__label {
701
- font-size: 0.8125rem;
702
- font-weight: 600;
703
- line-height: 1.4;
704
- letter-spacing: -0.01em;
705
- color: var(--fd-foreground);
682
+ /* Screen readers get the "Bound port:" the row no longer shows. */
683
+ .wf-interface__sr {
684
+ position: absolute;
685
+ width: 1px;
686
+ height: 1px;
687
+ overflow: hidden;
688
+ clip-path: inset(50%);
689
+ white-space: nowrap;
706
690
  }
707
691
 
708
- .wf-interface__field--checkbox .wf-interface__label {
709
- font-weight: 500;
692
+ .wf-interface__line :global(.wf-interface__menu) {
693
+ flex: none;
694
+ margin-left: auto;
710
695
  }
711
696
 
712
- /* The bound port, said back the way the canvas says it, in a select's clothes. */
697
+ /* The bound port, said back the way the canvas says it: a flat button. */
713
698
  .wf-interface__binding {
699
+ position: relative;
714
700
  display: flex;
715
701
  align-items: center;
716
702
  gap: var(--fd-space-xs);
717
- width: 100%;
718
- min-height: 2rem;
719
- padding: var(--fd-space-2xs) var(--fd-space-xs);
720
- border: 1px solid var(--fd-border);
703
+ flex: 1;
704
+ min-width: 0;
705
+ height: var(--fd-control-md);
706
+ padding: 0 var(--fd-space-xs);
707
+ border: 1px solid transparent;
721
708
  border-radius: var(--fd-control-radius);
722
- background-color: var(--fd-card);
709
+ background-color: transparent;
723
710
  color: var(--fd-foreground);
724
711
  font: inherit;
725
712
  font-size: var(--fd-text-xs);
@@ -727,18 +714,18 @@
727
714
  cursor: pointer;
728
715
  transition:
729
716
  border-color var(--fd-transition-fast),
730
- box-shadow var(--fd-transition-fast);
717
+ background-color var(--fd-transition-fast);
731
718
  }
732
719
 
733
720
  .wf-interface__binding:hover {
734
- border-color: var(--fd-border-strong);
721
+ border-color: var(--fd-border);
735
722
  }
736
723
 
737
724
  .wf-interface__binding:focus-visible,
738
725
  .wf-interface__binding--open {
739
726
  outline: none;
740
- border-color: var(--fd-primary);
741
- box-shadow: 0 0 0 var(--fd-ring-width) var(--fd-primary-muted);
727
+ border-color: var(--fd-border-strong);
728
+ background-color: var(--fd-background);
742
729
  }
743
730
 
744
731
  .wf-interface__binding--invalid {
@@ -748,11 +735,11 @@
748
735
  .wf-interface__binding-path {
749
736
  display: inline-flex;
750
737
  align-items: center;
751
- flex-wrap: wrap;
752
- gap: 0.125rem;
738
+ gap: var(--fd-space-3xs);
753
739
  flex: 1;
754
740
  min-width: 0;
755
- line-height: 1.4;
741
+ overflow: hidden;
742
+ white-space: nowrap;
756
743
  }
757
744
 
758
745
  .wf-interface__binding-path :global(svg) {
@@ -760,11 +747,34 @@
760
747
  color: var(--fd-muted-foreground);
761
748
  }
762
749
 
763
- .wf-interface__binding-path :global(.flowdrop-badge--outline) {
750
+ .wf-interface__binding > :global(.flowdrop-badge--outline) {
764
751
  flex: none;
765
752
  }
766
753
 
754
+ /* Same row anatomy as the inspector's Ports tab: lane dot · node › port · mono lane name. */
755
+ .wf-interface__binding-dot {
756
+ flex: none;
757
+ width: 0.5rem;
758
+ height: 0.5rem;
759
+ border-radius: var(--fd-radius-full);
760
+ background-color: var(--wf-binding-dot);
761
+ }
762
+
763
+ .wf-interface__binding-type {
764
+ flex: none;
765
+ max-width: 12ch;
766
+ overflow: hidden;
767
+ text-overflow: ellipsis;
768
+ white-space: nowrap;
769
+ font-family: var(--fd-font-mono);
770
+ font-size: var(--fd-text-xs);
771
+ color: var(--fd-muted-foreground);
772
+ }
773
+
767
774
  .wf-interface__binding-node {
775
+ min-width: 3ch;
776
+ overflow: hidden;
777
+ text-overflow: ellipsis;
768
778
  color: var(--fd-muted-foreground);
769
779
  }
770
780
 
@@ -782,21 +792,12 @@
782
792
  color: var(--fd-muted-foreground);
783
793
  }
784
794
 
785
- .wf-interface__binding :global(.wf-interface__binding-caret) {
786
- flex-shrink: 0;
787
- margin-left: auto;
788
- color: var(--fd-muted-foreground);
789
- }
790
-
791
795
  /* The unfolded picker: the shared listbox plus its own unbind/cancel row. */
792
796
  .wf-interface__picker {
793
797
  display: flex;
794
798
  flex-direction: column;
795
799
  gap: var(--fd-space-xs);
796
- padding: var(--fd-space-xs);
797
- border: 1px solid color-mix(in srgb, var(--fd-primary) 45%, var(--fd-border));
798
- border-radius: var(--fd-radius-md);
799
- background-color: color-mix(in srgb, var(--fd-primary) 3%, var(--fd-card));
800
+ padding: var(--fd-space-xs) 0;
800
801
  }
801
802
 
802
803
  .wf-interface__picker-actions {
@@ -818,12 +819,46 @@
818
819
  color: var(--fd-primary);
819
820
  }
820
821
 
822
+ .wf-interface__row {
823
+ display: flex;
824
+ flex-wrap: wrap;
825
+ gap: var(--fd-space-sm);
826
+ }
827
+
828
+ .wf-interface__field {
829
+ display: flex;
830
+ flex-direction: column;
831
+ gap: var(--fd-space-3xs);
832
+ flex: 1 1 8rem;
833
+ min-width: 0;
834
+ }
835
+
836
+ .wf-interface__field--wide {
837
+ flex: 1 1 100%;
838
+ }
839
+
840
+ .wf-interface__more :global(.wf-interface__field--checkbox) {
841
+ flex: 0 0 auto;
842
+ align-self: flex-end;
843
+ min-height: var(--fd-control-md);
844
+ }
845
+
846
+ /* Same voice as the settings form's field labels. */
847
+ .wf-interface__label {
848
+ font-size: var(--fd-field-label-size);
849
+ font-weight: 600;
850
+ line-height: 1.4;
851
+ letter-spacing: -0.01em;
852
+ color: var(--fd-foreground);
853
+ }
854
+
821
855
  /* Field-anchored feedback: one short line under the field it belongs to. */
822
856
  .wf-interface__inline {
823
857
  display: inline-flex;
824
858
  flex-wrap: wrap;
825
859
  align-items: baseline;
826
860
  gap: var(--fd-space-xs);
861
+ padding-left: var(--fd-space-xs);
827
862
  font-size: var(--fd-text-xs);
828
863
  line-height: 1.4;
829
864
  }
@@ -834,19 +869,35 @@
834
869
  color: var(--fd-muted-foreground);
835
870
  }
836
871
 
837
- /* The entry's chat turn, said at rest on the disclosure's summary. */
872
+ /* The entry's chat turn, said at rest at the end of its row. */
838
873
  .wf-interface__turn-chip {
839
- margin-left: var(--fd-space-xs);
874
+ flex: none;
840
875
  padding: 0 var(--fd-space-xs);
841
876
  border: 1px solid var(--fd-border);
842
877
  border-radius: var(--fd-radius-full);
843
- background-color: var(--fd-muted);
844
- color: var(--fd-foreground);
878
+ color: var(--fd-muted-foreground);
845
879
  font-size: var(--fd-text-2xs);
846
880
  font-weight: 600;
847
881
  line-height: 1.5;
848
882
  }
849
883
 
884
+ /* A deprecated `turn` reads as a warning, not as a choice. */
885
+ .wf-interface__turn-chip--deprecated {
886
+ border-color: color-mix(in srgb, var(--fd-warning) 45%, var(--fd-border));
887
+ color: var(--fd-warning);
888
+ text-decoration: line-through;
889
+ }
890
+
891
+ .wf-interface__turn-deprecated {
892
+ display: flex;
893
+ flex-wrap: wrap;
894
+ align-items: baseline;
895
+ gap: var(--fd-space-xs);
896
+ font-size: var(--fd-text-xs);
897
+ line-height: 1.4;
898
+ color: var(--fd-warning);
899
+ }
900
+
850
901
  .wf-interface__inline--warning {
851
902
  color: var(--fd-warning);
852
903
  }
@@ -872,52 +923,19 @@
872
923
  background-color: color-mix(in srgb, currentColor 12%, transparent);
873
924
  }
874
925
 
875
- /* The secondary fields live behind a disclosure so a card's resting state
876
- is just identity + binding. Auto-opened when a field inside needs eyes. */
877
- .wf-interface__more {
878
- font-size: var(--fd-text-xs);
879
- }
880
-
881
- .wf-interface__more > summary {
882
- display: inline-flex;
883
- align-items: center;
884
- gap: 0.125rem;
885
- list-style: none;
886
- padding: 0.125rem var(--fd-space-xs) 0.125rem 0.125rem;
887
- border-radius: var(--fd-radius-sm);
888
- color: var(--fd-muted-foreground);
889
- font-weight: 500;
890
- cursor: pointer;
891
- user-select: none;
892
- transition:
893
- color var(--fd-transition-fast),
894
- background-color var(--fd-transition-fast);
895
- }
896
-
897
- .wf-interface__more > summary::-webkit-details-marker {
926
+ /* The secondary fields, under the row and indented to the id: space, not a box. */
927
+ .wf-interface__more[hidden] {
898
928
  display: none;
899
929
  }
900
930
 
901
- .wf-interface__more > summary:hover {
902
- color: var(--fd-foreground);
903
- background-color: var(--fd-subtle);
904
- }
905
-
906
- .wf-interface__more > summary :global(svg) {
907
- transition: transform var(--fd-transition-fast);
908
- }
909
-
910
- .wf-interface__more[open] > summary :global(svg) {
911
- transform: rotate(90deg);
931
+ .wf-interface__more {
932
+ padding: var(--fd-space-xs) var(--fd-space-xs) var(--fd-space-sm);
912
933
  }
913
934
 
914
935
  .wf-interface__more-body {
915
936
  display: flex;
916
937
  flex-direction: column;
917
- gap: var(--fd-space-sm);
918
- margin-top: var(--fd-space-sm);
919
- padding-top: var(--fd-space-sm);
920
- border-top: 1px dashed var(--fd-border-muted);
938
+ gap: var(--fd-space-md);
921
939
  }
922
940
 
923
941
  .wf-interface__examples {
@@ -937,8 +955,6 @@
937
955
  }
938
956
 
939
957
  .wf-interface__example-row :global(.wf-interface__example-remove) {
940
- width: 1.75rem;
941
- height: 1.75rem;
942
958
  flex-shrink: 0;
943
959
  }
944
960
 
@@ -948,7 +964,6 @@
948
964
 
949
965
  .wf-interface__examples :global(.wf-interface__example-add) {
950
966
  align-self: flex-start;
951
- min-height: 1.75rem;
952
967
  padding-inline: var(--fd-space-xs);
953
968
  color: var(--fd-muted-foreground);
954
969
  }
@@ -957,34 +972,34 @@
957
972
  color: var(--fd-foreground);
958
973
  }
959
974
 
960
- /* Status callouts: a tinted strip with a coloured edge, not bare coloured text. */
975
+ /* Status lines: one muted 12px line under the row, aligned with the id text,
976
+ cut off with an ellipsis (the full text is the tooltip). Only a real error
977
+ takes the error colour; a draft that is merely unfinished stays quiet. */
961
978
  .wf-interface__status {
962
979
  margin: 0;
963
- padding: var(--fd-space-2xs) var(--fd-space-xs);
964
- border-left: 3px solid var(--fd-muted-foreground);
965
- border-radius: 0 var(--fd-radius-sm) var(--fd-radius-sm) 0;
966
- background-color: var(--fd-muted);
980
+ padding-left: calc(var(--fd-space-xs) + 1px);
981
+ overflow: hidden;
982
+ text-overflow: ellipsis;
983
+ white-space: nowrap;
967
984
  font-size: var(--fd-text-xs);
968
985
  line-height: 1.5;
969
- color: var(--fd-foreground);
986
+ color: var(--fd-muted-foreground);
970
987
  }
971
988
 
972
989
  .wf-interface__status--error,
973
990
  .wf-interface__status--dangling,
974
991
  .wf-interface__status--hidden,
975
992
  .wf-interface__status--over-bound {
976
- border-left-color: var(--fd-error);
977
- background-color: var(--fd-error-muted);
993
+ color: var(--fd-error);
978
994
  }
979
995
 
980
996
  .wf-interface__status--warning,
981
- .wf-interface__status--unbound,
982
997
  .wf-interface__status--type-mismatch {
983
- border-left-color: var(--fd-warning);
984
- background-color: var(--fd-warning-muted);
998
+ color: var(--fd-warning);
985
999
  }
986
1000
 
987
1001
  .wf-interface__meta {
1002
+ padding-left: var(--fd-space-xs);
988
1003
  font-size: var(--fd-text-xs);
989
1004
  color: var(--fd-muted-foreground);
990
1005
  }
@@ -1001,7 +1016,6 @@
1001
1016
  .wf-interface__meta pre {
1002
1017
  margin: var(--fd-space-xs) 0 0;
1003
1018
  padding: var(--fd-space-xs);
1004
- border: 1px solid var(--fd-border-muted);
1005
1019
  border-radius: var(--fd-radius-sm);
1006
1020
  background-color: var(--fd-muted);
1007
1021
  color: var(--fd-foreground);
@@ -1010,16 +1024,4 @@
1010
1024
  line-height: 1.5;
1011
1025
  overflow-x: auto;
1012
1026
  }
1013
-
1014
- .wf-interface__entry :global(.wf-interface__remove) {
1015
- flex-shrink: 0;
1016
- width: 1.75rem;
1017
- height: 1.75rem;
1018
- margin-top: 0.125rem;
1019
- }
1020
-
1021
- .wf-interface__entry :global(.wf-interface__remove:hover) {
1022
- color: var(--fd-error);
1023
- background-color: var(--fd-error-muted);
1024
- }
1025
1027
  </style>