@flowdrop/flowdrop 2.13.0 → 2.15.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 (308) hide show
  1. package/CHANGELOG.md +82 -0
  2. package/dist/commands/executor.js +58 -8
  3. package/dist/commands/parser.js +3 -3
  4. package/dist/commands/types.d.ts +8 -2
  5. package/dist/commands/uiActionTarget.d.ts +24 -0
  6. package/dist/commands/uiActionTarget.js +31 -0
  7. package/dist/commands/validate.d.ts +15 -0
  8. package/dist/commands/validate.js +115 -0
  9. package/dist/components/App.svelte +44 -2
  10. package/dist/components/App.svelte.d.ts +3 -1
  11. package/dist/components/Button.svelte +7 -7
  12. package/dist/components/Button.svelte.d.ts +10 -0
  13. package/dist/components/CanvasBanner.svelte +19 -6
  14. package/dist/components/CanvasBanner.svelte.d.ts +15 -3
  15. package/dist/components/CanvasContextMenu.svelte +9 -9
  16. package/dist/components/CanvasContextMenu.svelte.d.ts +10 -0
  17. package/dist/components/CanvasToolbar.svelte +8 -7
  18. package/dist/components/CanvasToolbar.svelte.d.ts +10 -0
  19. package/dist/components/CanvasZoomControls.svelte +10 -9
  20. package/dist/components/CanvasZoomControls.svelte.d.ts +13 -0
  21. package/dist/components/ConfigForm.svelte +51 -18
  22. package/dist/components/ConfigForm.svelte.d.ts +20 -1
  23. package/dist/components/ConfigPanel.svelte +9 -5
  24. package/dist/components/ConfigPanel.svelte.d.ts +10 -0
  25. package/dist/components/EditorStatusBar.svelte +6 -5
  26. package/dist/components/EditorStatusBar.svelte.d.ts +7 -0
  27. package/dist/components/ExternalLinkRow.svelte +16 -1
  28. package/dist/components/ExternalLinkRow.svelte.d.ts +5 -0
  29. package/dist/components/FlowDropEdge.svelte +15 -12
  30. package/dist/components/FlowDropEdge.svelte.d.ts +16 -0
  31. package/dist/components/InterfaceTag.svelte +13 -15
  32. package/dist/components/InterfaceTag.svelte.d.ts +19 -0
  33. package/dist/components/LoadingSpinner.svelte +8 -2
  34. package/dist/components/LoadingSpinner.svelte.d.ts +9 -0
  35. package/dist/components/Logo.svelte +11 -0
  36. package/dist/components/Logo.svelte.d.ts +9 -0
  37. package/dist/components/LogoWordmark.svelte +8 -3
  38. package/dist/components/LogoWordmark.svelte.d.ts +9 -0
  39. package/dist/components/LoopbackLanes.svelte +12 -6
  40. package/dist/components/LoopbackLanes.svelte.d.ts +13 -0
  41. package/dist/components/MarkdownDisplay.svelte +10 -3
  42. package/dist/components/MarkdownDisplay.svelte.d.ts +11 -0
  43. package/dist/components/Navbar.svelte +13 -5
  44. package/dist/components/Navbar.svelte.d.ts +14 -0
  45. package/dist/components/NodeInspector.svelte +7 -8
  46. package/dist/components/NodeInspector.svelte.d.ts +10 -0
  47. package/dist/components/NodeSidebar.svelte +9 -3
  48. package/dist/components/NodeSidebar.svelte.d.ts +10 -0
  49. package/dist/components/NodeStatusOverlay.svelte +30 -19
  50. package/dist/components/NodeStatusOverlay.svelte.d.ts +19 -0
  51. package/dist/components/NodeSwapPicker.svelte +1 -1
  52. package/dist/components/RunBar.svelte +10 -13
  53. package/dist/components/RunBar.svelte.d.ts +15 -0
  54. package/dist/components/RunsMenu.svelte +14 -13
  55. package/dist/components/RunsMenu.svelte.d.ts +15 -0
  56. package/dist/components/SchemaForm.svelte +10 -13
  57. package/dist/components/SchemaForm.svelte.d.ts +51 -0
  58. package/dist/components/SettingsPanel.svelte +5 -5
  59. package/dist/components/StatusIcon.svelte +14 -3
  60. package/dist/components/StatusIcon.svelte.d.ts +15 -0
  61. package/dist/components/StatusLabel.svelte +10 -2
  62. package/dist/components/StatusLabel.svelte.d.ts +11 -0
  63. package/dist/components/ThemeToggle.svelte +8 -5
  64. package/dist/components/ThemeToggle.svelte.d.ts +10 -0
  65. package/dist/components/UniversalNode.svelte +13 -5
  66. package/dist/components/UniversalNode.svelte.d.ts +15 -0
  67. package/dist/components/WorkflowInterfaceEntryCard.svelte +1 -1
  68. package/dist/components/WorkflowInterfaceEntryComposer.svelte +1 -2
  69. package/dist/components/ZoomTier.svelte +13 -10
  70. package/dist/components/ZoomTier.svelte.d.ts +14 -0
  71. package/dist/components/console/CommandConsole.svelte +9 -3
  72. package/dist/components/console/CommandConsole.svelte.d.ts +10 -0
  73. package/dist/components/console/ConsoleAutocomplete.svelte +4 -4
  74. package/dist/components/console/ConsoleAutocomplete.svelte.d.ts +5 -0
  75. package/dist/components/console/ConsoleInput.svelte +6 -4
  76. package/dist/components/console/ConsoleInput.svelte.d.ts +7 -0
  77. package/dist/components/console/ConsoleOutput.svelte +5 -3
  78. package/dist/components/console/ConsoleOutput.svelte.d.ts +6 -0
  79. package/dist/components/console/ConsoleStrip.svelte +9 -5
  80. package/dist/components/console/ConsoleStrip.svelte.d.ts +10 -0
  81. package/dist/components/form/FieldFactory.svelte +6 -2
  82. package/dist/components/form/FieldFactory.svelte.d.ts +46 -0
  83. package/dist/components/form/FormArray.svelte +9 -16
  84. package/dist/components/form/FormArray.svelte.d.ts +10 -0
  85. package/dist/components/form/FormArrayRows.svelte +8 -8
  86. package/dist/components/form/FormArrayRows.svelte.d.ts +11 -0
  87. package/dist/components/form/FormAutocomplete.svelte +6 -3
  88. package/dist/components/form/FormAutocomplete.svelte.d.ts +23 -0
  89. package/dist/components/form/FormCheckboxGroup.svelte +5 -5
  90. package/dist/components/form/FormCheckboxGroup.svelte.d.ts +6 -0
  91. package/dist/components/form/FormCodeEditor.svelte +8 -13
  92. package/dist/components/form/FormCodeEditor.svelte.d.ts +9 -0
  93. package/dist/components/form/FormField.svelte +7 -8
  94. package/dist/components/form/FormField.svelte.d.ts +10 -0
  95. package/dist/components/form/FormFieldLight.svelte +6 -5
  96. package/dist/components/form/FormFieldLight.svelte.d.ts +8 -0
  97. package/dist/components/form/FormFieldWrapper.svelte +8 -8
  98. package/dist/components/form/FormFieldWrapper.svelte.d.ts +9 -0
  99. package/dist/components/form/FormFieldset.svelte +6 -12
  100. package/dist/components/form/FormFieldset.svelte.d.ts +7 -0
  101. package/dist/components/form/FormMarkdownEditor.svelte +8 -15
  102. package/dist/components/form/FormMarkdownEditor.svelte.d.ts +9 -0
  103. package/dist/components/form/FormNumberField.svelte +5 -7
  104. package/dist/components/form/FormNumberField.svelte.d.ts +6 -0
  105. package/dist/components/form/FormPorts.svelte +133 -27
  106. package/dist/components/form/FormPorts.svelte.d.ts +19 -0
  107. package/dist/components/form/FormRangeField.svelte +5 -9
  108. package/dist/components/form/FormRangeField.svelte.d.ts +6 -0
  109. package/dist/components/form/FormSelect.svelte +5 -7
  110. package/dist/components/form/FormSelect.svelte.d.ts +6 -0
  111. package/dist/components/form/FormTemplateEditor.svelte +8 -16
  112. package/dist/components/form/FormTemplateEditor.svelte.d.ts +9 -0
  113. package/dist/components/form/FormTextField.svelte +5 -7
  114. package/dist/components/form/FormTextField.svelte.d.ts +6 -0
  115. package/dist/components/form/FormTextarea.svelte +5 -7
  116. package/dist/components/form/FormTextarea.svelte.d.ts +6 -0
  117. package/dist/components/form/FormToggle.svelte +6 -8
  118. package/dist/components/form/FormToggle.svelte.d.ts +7 -0
  119. package/dist/components/form/FormUISchemaRenderer.svelte +5 -9
  120. package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +7 -0
  121. package/dist/components/interrupt/ChoicePrompt.svelte +6 -6
  122. package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +7 -0
  123. package/dist/components/interrupt/ConfirmationPrompt.svelte +6 -5
  124. package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +7 -0
  125. package/dist/components/interrupt/FormPrompt.svelte +6 -6
  126. package/dist/components/interrupt/FormPrompt.svelte.d.ts +7 -0
  127. package/dist/components/interrupt/InterruptBubble.svelte +10 -9
  128. package/dist/components/interrupt/InterruptBubble.svelte.d.ts +11 -0
  129. package/dist/components/interrupt/ReviewPrompt.svelte +5 -6
  130. package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +7 -0
  131. package/dist/components/interrupt/TextInputPrompt.svelte +6 -6
  132. package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +7 -0
  133. package/dist/components/nodes/AtomNode.svelte +31 -6
  134. package/dist/components/nodes/AtomNode.svelte.d.ts +15 -0
  135. package/dist/components/nodes/CaptionNode.svelte +50 -7
  136. package/dist/components/nodes/CaptionNode.svelte.d.ts +13 -0
  137. package/dist/components/nodes/GatewayNode.svelte +18 -11
  138. package/dist/components/nodes/GatewayNode.svelte.d.ts +21 -0
  139. package/dist/components/nodes/IdeaNode.svelte +47 -6
  140. package/dist/components/nodes/IdeaNode.svelte.d.ts +17 -0
  141. package/dist/components/nodes/NodeCard.svelte +26 -18
  142. package/dist/components/nodes/NodeCard.svelte.d.ts +20 -0
  143. package/dist/components/nodes/NodeConfigButton.svelte +15 -2
  144. package/dist/components/nodes/NodeConfigButton.svelte.d.ts +11 -0
  145. package/dist/components/nodes/NodeProblemMark.svelte +15 -10
  146. package/dist/components/nodes/NodeProblemMark.svelte.d.ts +16 -0
  147. package/dist/components/nodes/NodeTip.svelte +10 -7
  148. package/dist/components/nodes/NodeTip.svelte.d.ts +13 -0
  149. package/dist/components/nodes/NotesNode.svelte +30 -0
  150. package/dist/components/nodes/NotesNode.svelte.d.ts +14 -0
  151. package/dist/components/nodes/SimpleNode.svelte +35 -8
  152. package/dist/components/nodes/SimpleNode.svelte.d.ts +17 -0
  153. package/dist/components/nodes/SquareNode.svelte +38 -8
  154. package/dist/components/nodes/SquareNode.svelte.d.ts +17 -0
  155. package/dist/components/nodes/TerminalNode.svelte +24 -10
  156. package/dist/components/nodes/TerminalNode.svelte.d.ts +17 -0
  157. package/dist/components/nodes/ToolNode.svelte +14 -5
  158. package/dist/components/nodes/ToolNode.svelte.d.ts +15 -0
  159. package/dist/components/nodes/WorkflowNode.svelte +18 -15
  160. package/dist/components/nodes/WorkflowNode.svelte.d.ts +21 -0
  161. package/dist/components/playground/ChatBubble.svelte +4 -3
  162. package/dist/components/playground/ChatBubble.svelte.d.ts +5 -0
  163. package/dist/components/playground/ChatInput.svelte +11 -6
  164. package/dist/components/playground/ChatInput.svelte.d.ts +14 -0
  165. package/dist/components/playground/ChatPanel.svelte +15 -7
  166. package/dist/components/playground/ChatPanel.svelte.d.ts +17 -0
  167. package/dist/components/playground/ControlPanel.svelte +26 -9
  168. package/dist/components/playground/ControlPanel.svelte.d.ts +29 -0
  169. package/dist/components/playground/DockedPlayground.svelte +7 -10
  170. package/dist/components/playground/DockedPlayground.svelte.d.ts +10 -0
  171. package/dist/components/playground/ExecutionConsole.svelte +10 -5
  172. package/dist/components/playground/ExecutionConsole.svelte.d.ts +12 -0
  173. package/dist/components/playground/ExecutionList.svelte +13 -0
  174. package/dist/components/playground/ExecutionList.svelte.d.ts +11 -0
  175. package/dist/components/playground/ExecutionLogs.svelte +6 -9
  176. package/dist/components/playground/ExecutionLogs.svelte.d.ts +7 -0
  177. package/dist/components/playground/HeaderMenu.svelte +6 -8
  178. package/dist/components/playground/HeaderMenu.svelte.d.ts +9 -0
  179. package/dist/components/playground/HierarchyTrail.svelte +6 -6
  180. package/dist/components/playground/HierarchyTrail.svelte.d.ts +8 -0
  181. package/dist/components/playground/InputCollector.svelte +6 -5
  182. package/dist/components/playground/InputCollector.svelte.d.ts +7 -0
  183. package/dist/components/playground/InputFields.svelte +8 -12
  184. package/dist/components/playground/InputFields.svelte.d.ts +9 -0
  185. package/dist/components/playground/InterfaceInputForm.svelte +6 -13
  186. package/dist/components/playground/InterfaceInputForm.svelte.d.ts +9 -0
  187. package/dist/components/playground/InterfaceJsonInput.svelte +6 -5
  188. package/dist/components/playground/InterfaceJsonInput.svelte.d.ts +8 -0
  189. package/dist/components/playground/LogRow.svelte +4 -5
  190. package/dist/components/playground/LogRow.svelte.d.ts +6 -0
  191. package/dist/components/playground/MessageBubble.svelte +13 -7
  192. package/dist/components/playground/MessageBubble.svelte.d.ts +15 -0
  193. package/dist/components/playground/MessageCard.svelte +5 -2
  194. package/dist/components/playground/MessageCard.svelte.d.ts +6 -0
  195. package/dist/components/playground/MessageMarkdown.svelte +8 -9
  196. package/dist/components/playground/MessageMarkdown.svelte.d.ts +11 -0
  197. package/dist/components/playground/MessageNotice.svelte +7 -0
  198. package/dist/components/playground/MessageNotice.svelte.d.ts +5 -0
  199. package/dist/components/playground/MessageStream.svelte +8 -6
  200. package/dist/components/playground/MessageStream.svelte.d.ts +11 -0
  201. package/dist/components/playground/MessageTagChip.svelte +7 -7
  202. package/dist/components/playground/MessageTagChip.svelte.d.ts +10 -0
  203. package/dist/components/playground/MessageTagStrip.svelte +6 -3
  204. package/dist/components/playground/MessageTagStrip.svelte.d.ts +8 -0
  205. package/dist/components/playground/OriginBadge.svelte +7 -4
  206. package/dist/components/playground/OriginBadge.svelte.d.ts +8 -0
  207. package/dist/components/playground/PipelineKanbanView.svelte +14 -0
  208. package/dist/components/playground/PipelineKanbanView.svelte.d.ts +12 -0
  209. package/dist/components/playground/PipelinePanel.svelte +14 -0
  210. package/dist/components/playground/PipelinePanel.svelte.d.ts +12 -0
  211. package/dist/components/playground/PipelineTableView.svelte +14 -0
  212. package/dist/components/playground/PipelineTableView.svelte.d.ts +12 -0
  213. package/dist/components/playground/Playground.svelte +17 -11
  214. package/dist/components/playground/Playground.svelte.d.ts +20 -0
  215. package/dist/components/playground/PlaygroundApp.svelte +24 -10
  216. package/dist/components/playground/PlaygroundApp.svelte.d.ts +26 -0
  217. package/dist/components/playground/PlaygroundHeader.svelte +8 -12
  218. package/dist/components/playground/PlaygroundHeader.svelte.d.ts +11 -0
  219. package/dist/components/playground/PlaygroundModal.svelte +6 -8
  220. package/dist/components/playground/PlaygroundModal.svelte.d.ts +7 -0
  221. package/dist/components/playground/PlaygroundStudio.svelte +9 -0
  222. package/dist/components/playground/PlaygroundStudio.svelte.d.ts +7 -0
  223. package/dist/components/playground/PlaygroundSurface.svelte +19 -14
  224. package/dist/components/playground/PlaygroundSurface.svelte.d.ts +20 -0
  225. package/dist/components/playground/SessionManager.svelte +6 -5
  226. package/dist/components/playground/SessionManager.svelte.d.ts +7 -0
  227. package/dist/components/playground/StepsSummary.svelte +8 -9
  228. package/dist/components/playground/StepsSummary.svelte.d.ts +10 -0
  229. package/dist/components/primitives/Button.svelte +15 -7
  230. package/dist/components/primitives/Button.svelte.d.ts +18 -1
  231. package/dist/components/primitives/Card.svelte +8 -6
  232. package/dist/components/primitives/Card.svelte.d.ts +11 -0
  233. package/dist/components/primitives/Checkbox.svelte +8 -5
  234. package/dist/components/primitives/Checkbox.svelte.d.ts +11 -0
  235. package/dist/components/primitives/Chip.svelte +8 -4
  236. package/dist/components/primitives/Chip.svelte.d.ts +11 -0
  237. package/dist/components/primitives/Combobox.svelte +27 -18
  238. package/dist/components/primitives/Combobox.svelte.d.ts +33 -0
  239. package/dist/components/primitives/Composer.svelte +15 -16
  240. package/dist/components/primitives/Composer.svelte.d.ts +20 -0
  241. package/dist/components/primitives/EmptyState.svelte +9 -3
  242. package/dist/components/primitives/EmptyState.svelte.d.ts +11 -0
  243. package/dist/components/primitives/Field.svelte +12 -9
  244. package/dist/components/primitives/Field.svelte.d.ts +16 -0
  245. package/dist/components/primitives/IconButton.svelte +10 -5
  246. package/dist/components/primitives/IconButton.svelte.d.ts +13 -0
  247. package/dist/components/primitives/Menu.svelte +15 -14
  248. package/dist/components/primitives/Menu.svelte.d.ts +20 -0
  249. package/dist/components/primitives/Notice.svelte +11 -8
  250. package/dist/components/primitives/Notice.svelte.d.ts +14 -0
  251. package/dist/components/primitives/PanelHeader.svelte +10 -7
  252. package/dist/components/primitives/PanelHeader.svelte.d.ts +13 -0
  253. package/dist/components/primitives/Segmented.svelte +11 -4
  254. package/dist/components/primitives/Segmented.svelte.d.ts +14 -0
  255. package/dist/components/primitives/Select.svelte +13 -16
  256. package/dist/components/primitives/Select.svelte.d.ts +18 -0
  257. package/dist/components/primitives/StatusPill.svelte +11 -8
  258. package/dist/components/primitives/StatusPill.svelte.d.ts +15 -0
  259. package/dist/components/primitives/Switch.svelte +9 -6
  260. package/dist/components/primitives/Switch.svelte.d.ts +12 -0
  261. package/dist/components/primitives/Tabs.svelte +16 -15
  262. package/dist/components/primitives/Tabs.svelte.d.ts +22 -0
  263. package/dist/components/primitives/Toolbar.svelte +14 -13
  264. package/dist/components/primitives/Toolbar.svelte.d.ts +18 -0
  265. package/dist/components/primitives/ToolbarSeparator.svelte +5 -4
  266. package/dist/components/primitives/ToolbarSeparator.svelte.d.ts +7 -0
  267. package/dist/core/index.d.ts +2 -2
  268. package/dist/core/index.js +1 -1
  269. package/dist/editor/index.d.ts +3 -3
  270. package/dist/index.d.ts +3 -2
  271. package/dist/layout/index.d.ts +1 -1
  272. package/dist/layout/index.js +1 -1
  273. package/dist/layout/toWorkflow.d.ts +8 -7
  274. package/dist/layout/toWorkflow.js +20 -40
  275. package/dist/messages/defaults.d.ts +24 -0
  276. package/dist/messages/defaults.js +15 -0
  277. package/dist/skins/graphite.d.ts +1 -1
  278. package/dist/skins/graphite.js +1 -1
  279. package/dist/stores/settingsStore.svelte.js +3 -0
  280. package/dist/stores/workflowStore.svelte.d.ts +10 -0
  281. package/dist/stores/workflowStore.svelte.js +65 -20
  282. package/dist/styles/base.css +2 -126
  283. package/dist/styles/tokenAliases.js +1 -0
  284. package/dist/styles/tokens.css +9 -5
  285. package/dist/svelte-app.d.ts +63 -2
  286. package/dist/svelte-app.js +144 -1
  287. package/dist/themes/classic.d.ts +9 -0
  288. package/dist/themes/classic.js +16 -0
  289. package/dist/themes/index.d.ts +7 -2
  290. package/dist/themes/index.js +20 -10
  291. package/dist/types/events.d.ts +18 -1
  292. package/dist/types/index.d.ts +10 -0
  293. package/dist/types/settings.d.ts +6 -2
  294. package/dist/types/theme.d.ts +6 -2
  295. package/dist/utils/externalEdit.svelte.d.ts +48 -0
  296. package/dist/utils/externalEdit.svelte.js +62 -0
  297. package/dist/utils/inspectorContext.d.ts +5 -0
  298. package/dist/utils/playgroundChat.d.ts +10 -0
  299. package/dist/utils/playgroundChat.js +25 -0
  300. package/dist/utils/portExposure.d.ts +24 -1
  301. package/dist/utils/portExposure.js +46 -13
  302. package/dist/utils/portUtils.d.ts +5 -1
  303. package/dist/utils/portUtils.js +15 -4
  304. package/package.json +2 -1
  305. package/dist/components/IconButton.svelte +0 -80
  306. package/dist/components/IconButton.svelte.d.ts +0 -30
  307. package/dist/themes/default.d.ts +0 -2
  308. package/dist/themes/default.js +0 -9
@@ -1,15 +1,18 @@
1
1
  <!--
2
- StatusPill — compact run-status chip: icon + label (+ optional count).
2
+ @component
3
+ StatusPill: a compact run-status chip with an icon, a label and an optional count.
3
4
 
4
- Colours come from the --fd-status-* tokens. Not a live region on purpose: a
5
- canvas can carry dozens of pills and each status change would be announced;
6
- the pill is plain text with an accessible name instead. Screen readers reach
7
- the status through the node it belongs to.
5
+ Colours come from the `--fd-status-*` tokens. It is not a live region on purpose: a canvas
6
+ can carry dozens of pills, and each change would be announced. Screen readers reach the
7
+ status through the node it belongs to.
8
8
 
9
- With `screenSize`, the pill counter-scales against the canvas zoom so it stays
10
- readable when zoomed out (it is meant to sit centred on a node's top edge).
9
+ With `screenSize`, the pill scales against the canvas zoom so it stays readable when the
10
+ canvas is zoomed out. It is meant to sit centred on a node's top edge.
11
11
 
12
- @internal Not exported from any package entry; the API may still change.
12
+ **Use it for** the run status of a node or a run on the canvas.
13
+ **Not for** a free-form tag; use `Chip`.
14
+
15
+ Not exported from the package; the API may still change.
13
16
  -->
14
17
 
15
18
  <script module lang="ts">
@@ -19,6 +19,21 @@ interface Props {
19
19
  /** Extra classes on the root. */
20
20
  class?: string;
21
21
  }
22
+ /**
23
+ * StatusPill: a compact run-status chip with an icon, a label and an optional count.
24
+ *
25
+ * Colours come from the `--fd-status-*` tokens. It is not a live region on purpose: a canvas
26
+ * can carry dozens of pills, and each change would be announced. Screen readers reach the
27
+ * status through the node it belongs to.
28
+ *
29
+ * With `screenSize`, the pill scales against the canvas zoom so it stays readable when the
30
+ * canvas is zoomed out. It is meant to sit centred on a node's top edge.
31
+ *
32
+ * **Use it for** the run status of a node or a run on the canvas.
33
+ * **Not for** a free-form tag; use `Chip`.
34
+ *
35
+ * Not exported from the package; the API may still change.
36
+ */
22
37
  declare const StatusPill: import("svelte").Component<Props, {}, "">;
23
38
  type StatusPill = ReturnType<typeof StatusPill>;
24
39
  export default StatusPill;
@@ -1,12 +1,15 @@
1
1
  <!--
2
- Switch — an on/off control (28×16 track, round thumb).
2
+ @component
3
+ Switch: an on/off control with a 28x16 track and a round thumb.
3
4
 
4
- A real checkbox with `role="switch"`, so keyboard, form and screen-reader
5
- behaviour come from the browser. No state word: the on state is the track
6
- colour and `aria-checked`. Name it with `label` (visually hidden) or by
7
- putting it inside / next to a <label for={id}>.
5
+ A real checkbox with `role="switch"`, so keyboard, form and screen-reader behaviour come
6
+ from the browser. There is no state word: the track colour and `aria-checked` show the
7
+ state. Name it with `label` (hidden visually) or put it next to a `<label for={id}>`.
8
8
 
9
- @internal Not exported from any package entry; the API may still change.
9
+ **Use it for** a setting that takes effect right away.
10
+ **Not for** an option that is saved later with a form; use `Checkbox`.
11
+
12
+ Not exported from the package; the API may still change.
10
13
  -->
11
14
 
12
15
  <script lang="ts">
@@ -9,6 +9,18 @@ interface Props extends Omit<HTMLInputAttributes, 'type' | 'checked' | 'onchange
9
9
  /** Extra classes on the root. */
10
10
  class?: string;
11
11
  }
12
+ /**
13
+ * Switch: an on/off control with a 28x16 track and a round thumb.
14
+ *
15
+ * A real checkbox with `role="switch"`, so keyboard, form and screen-reader behaviour come
16
+ * from the browser. There is no state word: the track colour and `aria-checked` show the
17
+ * state. Name it with `label` (hidden visually) or put it next to a `<label for={id}>`.
18
+ *
19
+ * **Use it for** a setting that takes effect right away.
20
+ * **Not for** an option that is saved later with a form; use `Checkbox`.
21
+ *
22
+ * Not exported from the package; the API may still change.
23
+ */
12
24
  declare const Switch: import("svelte").Component<Props, {}, "">;
13
25
  type Switch = ReturnType<typeof Switch>;
14
26
  export default Switch;
@@ -1,24 +1,24 @@
1
1
  <!--
2
- Tabs — underline tabs for switching a VIEW (role="tablist" / "tab") with a
3
- roving tabindex. A MODE switch (Edit | Test) is a Segmented control instead:
4
- these are the two selected-tab styles of the editor chrome.
2
+ @component
3
+ Tabs: underline tabs for switching a VIEW (`role="tablist"` / `"tab"`).
5
4
 
6
- Tab stop is the selected tab; Left/Right (Up/Down) move focus AND select
7
- (automatic activation), Home/End jump. The selected tab is
8
- drawn in ink with a 2px underline; the others are muted, with no fill.
5
+ **Tabs, Segmented or Toolbar?** Use Tabs for views of the same content (Form | JSON | Steps).
6
+ Use `Segmented` to switch a MODE (Edit | Test). Use `Toolbar` to group different controls
7
+ for arrow-key navigation.
9
8
 
10
- Panels are the caller's job. Wire them with the exported helpers, using the
11
- same `idBase` you pass here:
9
+ The tab stop is the selected tab. Left/Right (or Up/Down) move focus and select at once;
10
+ Home/End jump. The selected tab is drawn in ink with a 2px underline; the others are muted.
12
11
 
13
- <Tabs idBase="pg" tabs={tabs} bind:value ariaLabel="Views" />
14
- <div role="tabpanel" id={tabPanelId('pg', value)}
15
- aria-labelledby={tabId('pg', value)} tabindex="0">...</div>
12
+ Panels are yours. Wire them with the exported helpers, using the same `idBase` you pass here:
16
13
 
17
- Each tab carries `id={tabId(idBase, value)}` and
18
- `aria-controls={tabPanelId(idBase, value)}`. Without `idBase` an id is
19
- generated, which the caller cannot know: pass `idBase` whenever panels exist.
14
+ <Tabs idBase="pg" tabs={tabs} bind:value ariaLabel="Views" />
15
+ <div role="tabpanel" id={tabPanelId('pg', value)}
16
+ aria-labelledby={tabId('pg', value)} tabindex="0">...</div>
20
17
 
21
- @internal Not exported from any package entry; the API may still change.
18
+ Each tab has `id={tabId(idBase, value)}` and `aria-controls={tabPanelId(idBase, value)}`.
19
+ Without `idBase` an id is generated that you cannot know, so pass `idBase` whenever panels exist.
20
+
21
+ Not exported from the package; the API may still change.
22
22
  -->
23
23
 
24
24
  <script lang="ts" module>
@@ -47,6 +47,7 @@
47
47
  }
48
48
 
49
49
  interface Props {
50
+ /** The tabs, in order. */
50
51
  tabs: TabItem[];
51
52
  /** Selected tab value (bindable) */
52
53
  value?: string;
@@ -13,6 +13,7 @@ interface TabItem {
13
13
  count?: number;
14
14
  }
15
15
  interface Props {
16
+ /** The tabs, in order. */
16
17
  tabs: TabItem[];
17
18
  /** Selected tab value (bindable) */
18
19
  value?: string;
@@ -27,6 +28,27 @@ interface Props {
27
28
  /** Extra classes on the root */
28
29
  class?: string;
29
30
  }
31
+ /**
32
+ * Tabs: underline tabs for switching a VIEW (`role="tablist"` / `"tab"`).
33
+ *
34
+ * **Tabs, Segmented or Toolbar?** Use Tabs for views of the same content (Form | JSON | Steps).
35
+ * Use `Segmented` to switch a MODE (Edit | Test). Use `Toolbar` to group different controls
36
+ * for arrow-key navigation.
37
+ *
38
+ * The tab stop is the selected tab. Left/Right (or Up/Down) move focus and select at once;
39
+ * Home/End jump. The selected tab is drawn in ink with a 2px underline; the others are muted.
40
+ *
41
+ * Panels are yours. Wire them with the exported helpers, using the same `idBase` you pass here:
42
+ *
43
+ * <Tabs idBase="pg" tabs={tabs} bind:value ariaLabel="Views" />
44
+ * <div role="tabpanel" id={tabPanelId('pg', value)}
45
+ * aria-labelledby={tabId('pg', value)} tabindex="0">...</div>
46
+ *
47
+ * Each tab has `id={tabId(idBase, value)}` and `aria-controls={tabPanelId(idBase, value)}`.
48
+ * Without `idBase` an id is generated that you cannot know, so pass `idBase` whenever panels exist.
49
+ *
50
+ * Not exported from the package; the API may still change.
51
+ */
30
52
  declare const Tabs: import("svelte").Component<Props, {}, "value">;
31
53
  type Tabs = ReturnType<typeof Tabs>;
32
54
  export default Tabs;
@@ -1,20 +1,21 @@
1
1
  <!--
2
- Toolbar primitive — a bare row (or column) that groups canvas controls for
3
- keyboard navigation. It draws nothing itself: each control inside floats on its
4
- own (Segmented `float`, a FloatingControl, the run pill).
2
+ @component
3
+ Toolbar: a bare row (or column) that groups controls so arrow keys move between them.
5
4
 
6
- role="toolbar" with arrow-key navigation: arrow keys (Left/Right for
7
- horizontal, Up/Down for vertical), Home and End move between the focusable
8
- children. It is not a roving tabindex: every control keeps its own place in
9
- the Tab order (the children own their tabindex, and Segmented already roves
10
- its radios), so the arrows are a shortcut on top of Tab, not a replacement. Compose with Segmented, IconButton, Chip, and
11
- ToolbarSeparator. Native focusable elements only (buttons, links, inputs,
12
- elements with a non-negative tabindex).
5
+ It draws nothing itself; each control inside floats on its own. `role="toolbar"`: the arrow
6
+ keys (Left/Right when horizontal, Up/Down when vertical), Home and End move focus between
7
+ the focusable children. This is a shortcut on top of Tab, not a replacement: every control
8
+ keeps its place in the Tab order. A `Segmented` inside keeps its own arrow keys; the
9
+ toolbar skips events a child already handled.
13
10
 
14
- Note: a Segmented inside the toolbar keeps its own arrow-key handling; the
15
- toolbar skips events that a child already handled (defaultPrevented).
11
+ **Toolbar, Segmented or Tabs?** Toolbar groups several different controls. `Segmented` picks
12
+ a mode. `Tabs` picks a view.
16
13
 
17
- @internal Not exported from any package entry; not public API yet.
14
+ **Use it for** a group of buttons and switches. The real canvas toolbar is `CanvasToolbar`
15
+ (Editor/Canvas).
16
+ **Not for** drawing a bar; it has no surface of its own.
17
+
18
+ Not exported from the package; not public API yet.
18
19
  -->
19
20
 
20
21
  <script lang="ts">
@@ -9,6 +9,24 @@ interface Props {
9
9
  /** Toolbar content */
10
10
  children: Snippet;
11
11
  }
12
+ /**
13
+ * Toolbar: a bare row (or column) that groups controls so arrow keys move between them.
14
+ *
15
+ * It draws nothing itself; each control inside floats on its own. `role="toolbar"`: the arrow
16
+ * keys (Left/Right when horizontal, Up/Down when vertical), Home and End move focus between
17
+ * the focusable children. This is a shortcut on top of Tab, not a replacement: every control
18
+ * keeps its place in the Tab order. A `Segmented` inside keeps its own arrow keys; the
19
+ * toolbar skips events a child already handled.
20
+ *
21
+ * **Toolbar, Segmented or Tabs?** Toolbar groups several different controls. `Segmented` picks
22
+ * a mode. `Tabs` picks a view.
23
+ *
24
+ * **Use it for** a group of buttons and switches. The real canvas toolbar is `CanvasToolbar`
25
+ * (Editor/Canvas).
26
+ * **Not for** drawing a bar; it has no surface of its own.
27
+ *
28
+ * Not exported from the package; not public API yet.
29
+ */
12
30
  declare const Toolbar: import("svelte").Component<Props, {}, "">;
13
31
  type Toolbar = ReturnType<typeof Toolbar>;
14
32
  export default Toolbar;
@@ -1,9 +1,10 @@
1
1
  <!--
2
- ToolbarSeparator — a thin divider between Toolbar groups. Orientation is
3
- inherited from the surrounding Toolbar via CSS (`aria-orientation` is the
4
- perpendicular axis of the toolbar, so it is set explicitly here).
2
+ @component
3
+ ToolbarSeparator: a thin divider between groups inside a `Toolbar`.
5
4
 
6
- @internal Not exported from any package entry; not public API yet.
5
+ Pass the same `orientation` as the toolbar. The line is drawn across that axis.
6
+
7
+ Not exported from the package; not public API yet.
7
8
  -->
8
9
 
9
10
  <script lang="ts">
@@ -2,6 +2,13 @@ interface Props {
2
2
  /** Axis of the toolbar this sits in; the line is drawn across it */
3
3
  orientation?: 'horizontal' | 'vertical';
4
4
  }
5
+ /**
6
+ * ToolbarSeparator: a thin divider between groups inside a `Toolbar`.
7
+ *
8
+ * Pass the same `orientation` as the toolbar. The line is drawn across that axis.
9
+ *
10
+ * Not exported from the package; not public API yet.
11
+ */
5
12
  declare const ToolbarSeparator: import("svelte").Component<Props, {}, "">;
6
13
  type ToolbarSeparator = ReturnType<typeof ToolbarSeparator>;
7
14
  export default ToolbarSeparator;
@@ -38,7 +38,7 @@ export type { NodeStatusScope } from '../stores/playgroundStore.svelte.js';
38
38
  export type { RunController, RunControllerOptions } from '../stores/runController.svelte.js';
39
39
  export type { EditorMode, EditorModeStore } from '../stores/editorModeStore.svelte.js';
40
40
  export type { EndpointConfig } from '../config/endpoints.js';
41
- export type { FlowDropMountOptions, MountedFlowDropApp, NavbarAction, NavbarBranding } from '../svelte-app.js';
41
+ export type { FlowDropMountOptions, MountedFlowDropApp, RunCommandOptions, NavbarAction, NavbarBranding } from '../svelte-app.js';
42
42
  export { StaticAuthProvider, CallbackAuthProvider, NoAuthProvider } from '../types/auth.js';
43
43
  export { DEFAULT_FEATURES, mergeFeatures } from '../types/events.js';
44
44
  export { getStatusColor, getStatusIcon, getStatusLabel, getStatusBackgroundColor, getStatusTextColor, createDefaultExecutionInfo, updateExecutionStart, updateExecutionComplete, updateExecutionFailed, resetExecutionInfo, stripExecutionInfo, formatExecutionDuration, formatLastExecuted } from '../utils/nodeStatus.js';
@@ -78,7 +78,7 @@ export { AgentSpecExecutionService } from '../services/agentSpecExecutionService
78
78
  export type { AgentSpecExecutionHandle } from '../services/agentSpecExecutionService.js';
79
79
  export { workflowSchema, WORKFLOW_SCHEMA_VERSION } from '../schemas/index.js';
80
80
  export type { FlowDropTheme, FlowDropThemeName, FlowDropThemeConfig, FlowDropDisplayConfig } from '../types/theme.js';
81
- export { defaultTheme, minimalTheme, resolveTheme } from '../themes/index.js';
81
+ export { classicTheme, defaultTheme, minimalTheme, normalizeThemeName, resolveTheme } from '../themes/index.js';
82
82
  export type { FlowDropSkin, FlowDropSkinName, FlowDropSkinTokens } from '../types/skin.js';
83
83
  export { slateSkin, defaultSkin } from '../skins/index.js';
84
84
  export type { ThemePreference, ResolvedTheme, ColorSchemeOption, HostColorSchemeValue } from '../stores/settingsStore.svelte.js';
@@ -87,7 +87,7 @@ export { AgentSpecExecutionService } from '../services/agentSpecExecutionService
87
87
  // Workflow JSON Schema
88
88
  // ============================================================================
89
89
  export { workflowSchema, WORKFLOW_SCHEMA_VERSION } from '../schemas/index.js';
90
- export { defaultTheme, minimalTheme, resolveTheme } from '../themes/index.js';
90
+ export { classicTheme, defaultTheme, minimalTheme, normalizeThemeName, resolveTheme } from '../themes/index.js';
91
91
  export { slateSkin, defaultSkin } from '../skins/index.js';
92
92
  export { getTheme as theme, getResolvedTheme as resolvedTheme, setTheme, toggleTheme, cycleTheme, initializeTheme, isThemeInitialized } from '../stores/settingsStore.svelte.js';
93
93
  // ============================================================================
@@ -92,13 +92,13 @@ export type { PortShape } from '../utils/portShape.js';
92
92
  export { default as PortTypeBadge } from '../components/ports/PortTypeBadge.svelte';
93
93
  export { fetchRuntimeConfig, getRuntimeConfig, clearRuntimeConfigCache, initRuntimeConfig } from '../config/runtimeConfig.js';
94
94
  export type { RuntimeConfig } from '../config/runtimeConfig.js';
95
- export type { Workflow, WorkflowNode, WorkflowEdge, NodeMetadata, NodePort, DynamicPort, Branch, ExecutionStatus, ExecutionResult, FlowDropConfig, PortConfig, ConfigSchema, ConfigProperty, ConfigEditOptions } from '../types/index.js';
95
+ export type { Workflow, WorkflowNode, WorkflowEdge, NodeMetadata, NodePort, DynamicPort, Branch, ExecutionStatus, ExecutionResult, FlowDropConfig, PortConfig, ConfigSchema, ConfigProperty, ConfigEditOptions, ConfigValues, ExternalEditLink } from '../types/index.js';
96
96
  export type { WorkflowEditorConfig, EditorFeatures, UIConfig, APIConfig } from '../types/config.js';
97
97
  export type { AuthProvider, StaticAuthConfig, CallbackAuthConfig } from '../types/auth.js';
98
98
  export type { FlowDropEventHandlers, FlowDropFeatures, WorkflowChangeType } from '../types/events.js';
99
99
  export type { EndpointConfig } from '../config/endpoints.js';
100
- export type { UIAction } from '../commands/types.js';
100
+ export type { UIAction, Command, CommandResult, CommandErrorCode } from '../commands/types.js';
101
101
  export type { EditorPlaygroundConfig } from '../types/playground.js';
102
- export type { FlowDropMountOptions, MountedFlowDropApp, NavbarAction, NavbarBranding } from '../svelte-app.js';
102
+ export type { FlowDropMountOptions, MountedFlowDropApp, RunCommandOptions, NavbarAction, NavbarBranding } from '../svelte-app.js';
103
103
  export type { ContextMenuActions, ContextMenuContext, ContextMenuEntry, ContextMenuOptions, ContextMenuTarget } from './contextMenu.js';
104
104
  export type { NodeComponentProps, NodeComponentRegistration, FlowDropPluginConfig, PluginNodeDefinition } from '../registry/index.js';
package/dist/index.d.ts CHANGED
@@ -32,10 +32,11 @@ export { createFlowDropInstance } from './stores/instanceContainer.svelte.js';
32
32
  export { getInstance, provideInstance } from './stores/getInstance.svelte.js';
33
33
  export { createEndpointConfig, defaultEndpointConfig, sessionsEndpoints } from './config/endpoints.js';
34
34
  export { NoAuthProvider, StaticAuthProvider, CallbackAuthProvider } from './types/auth.js';
35
- export type { Workflow, WorkflowNode, WorkflowEdge, NodeMetadata, ConfigSchema } from './types/index.js';
35
+ export type { Workflow, WorkflowNode, WorkflowEdge, NodeMetadata, ConfigSchema, ConfigValues, ExternalEditLink } from './types/index.js';
36
+ export type { Command, CommandResult, CommandErrorCode } from './commands/types.js';
36
37
  export type { EndpointConfig } from './config/endpoints.js';
37
38
  export type { AuthProvider } from './types/auth.js';
38
39
  export type { FlowDropInstance } from './stores/instanceContainer.svelte.js';
39
- export type { FlowDropMountOptions, MountedFlowDropApp } from './svelte-app.js';
40
+ export type { FlowDropMountOptions, MountedFlowDropApp, RunCommandOptions } from './svelte-app.js';
40
41
  export type { FlowDropEventHandlers } from './types/events.js';
41
42
  export type { Messages, MessagesOverride } from './messages/index.js';
@@ -13,7 +13,7 @@ export type { LayoutPrimitive, LayoutStrategy, LayoutProposal, LayoutChanges, Be
13
13
  export { inspect } from './inspect.js';
14
14
  export { sweep, formatSweep } from './sweep.js';
15
15
  export type { SweepPhase, SweepResult } from './sweep.js';
16
- export { applyProposalToNodes, applySweepToNodes, buildPortsConfig } from './toWorkflow.js';
16
+ export { applyProposalToNodes, applySweepToNodes, portsConfigForOrder } from './toWorkflow.js';
17
17
  export type { NodeLayoutUpdate } from './toWorkflow.js';
18
18
  export { loopbackLanes } from './geometry.js';
19
19
  export type { LoopbackLane } from './geometry.js';
@@ -9,6 +9,6 @@ export { fromWorkflow } from './fromWorkflow.js';
9
9
  export { propose, beautify, columnRanks, columnGrid, formatProposal, formatBeautify, STRATEGY_ORDER } from './primitives.js';
10
10
  export { inspect } from './inspect.js';
11
11
  export { sweep, formatSweep } from './sweep.js';
12
- export { applyProposalToNodes, applySweepToNodes, buildPortsConfig } from './toWorkflow.js';
12
+ export { applyProposalToNodes, applySweepToNodes, portsConfigForOrder } from './toWorkflow.js';
13
13
  export { loopbackLanes } from './geometry.js';
14
14
  export { lanePath } from './lanePath.js';
@@ -3,10 +3,10 @@
3
3
  *
4
4
  * The executor dispatches the result: a new `position`, and for a port reorder the node's whole
5
5
  * next `data.config` with `ports` rebuilt so the stored order matches the new handle order (D6).
6
- * Ports that are hidden, and ports the card does not show, keep their entries exactly; only the
7
- * visible ports trade places, among the slots the visible ports already held. Like the Ports tab,
8
- * a direction that ends up in default order with no exposure override stores nothing. Reserved
9
- * ports are always written last.
6
+ * Hidden ports, and entries for ports the node does not have, keep their places; only the visible
7
+ * ports trade places, among the slots the visible ports already held. The write itself is the
8
+ * Ports tab's (`buildPortsConfig`), so a direction that ends up in default order with no exposure
9
+ * override stores nothing. Reserved ports are always written last.
10
10
  *
11
11
  * @module layout/toWorkflow
12
12
  */
@@ -25,10 +25,11 @@ export interface NodeLayoutUpdate {
25
25
  }
26
26
  type Direction = 'inputs' | 'outputs';
27
27
  /**
28
- * The `ports` config after the visible ports of one direction take the order `to`. Entries are
29
- * kept as stored (exposure included); `undefined` when nothing needs storing.
28
+ * The `ports` config after the visible ports of one direction take the order `to`. The visible
29
+ * ports trade places among the slots they already held; hidden ports keep theirs. Written by
30
+ * `buildPortsConfig`, like every other `ports` edit; `undefined` when nothing needs storing.
30
31
  */
31
- export declare function buildPortsConfig(node: WorkflowNode, direction: Direction, to: readonly string[]): PortsConfig | undefined;
32
+ export declare function portsConfigForOrder(node: WorkflowNode, direction: Direction, to: readonly string[]): PortsConfig | undefined;
32
33
  /**
33
34
  * The updates for the accepted proposals, one per node touched, in node order of first use.
34
35
  * Refused proposals are skipped. Several proposals for one node apply in sequence.
@@ -3,15 +3,15 @@
3
3
  *
4
4
  * The executor dispatches the result: a new `position`, and for a port reorder the node's whole
5
5
  * next `data.config` with `ports` rebuilt so the stored order matches the new handle order (D6).
6
- * Ports that are hidden, and ports the card does not show, keep their entries exactly; only the
7
- * visible ports trade places, among the slots the visible ports already held. Like the Ports tab,
8
- * a direction that ends up in default order with no exposure override stores nothing. Reserved
9
- * ports are always written last.
6
+ * Hidden ports, and entries for ports the node does not have, keep their places; only the visible
7
+ * ports trade places, among the slots the visible ports already held. The write itself is the
8
+ * Ports tab's (`buildPortsConfig`), so a direction that ends up in default order with no exposure
9
+ * override stores nothing. Reserved ports are always written last.
10
10
  *
11
11
  * @module layout/toWorkflow
12
12
  */
13
13
  import { dynamicPortToNodePort } from '../types/index.js';
14
- import { byDefaultOrder, isReservedPort, orderPortsFor } from '../utils/portUtils.js';
14
+ import { buildPortsConfig, isPortExposed, isReservedPort, orderPortsFor } from '../utils/portUtils.js';
15
15
  /** Every port of a direction the node has (hidden ones too), as the card builds them. */
16
16
  function allPorts(node, direction) {
17
17
  const metadata = node.data?.metadata;
@@ -24,48 +24,28 @@ function allPorts(node, direction) {
24
24
  ];
25
25
  }
26
26
  /**
27
- * The `ports` config after the visible ports of one direction take the order `to`. Entries are
28
- * kept as stored (exposure included); `undefined` when nothing needs storing.
27
+ * The `ports` config after the visible ports of one direction take the order `to`. The visible
28
+ * ports trade places among the slots they already held; hidden ports keep theirs. Written by
29
+ * `buildPortsConfig`, like every other `ports` edit; `undefined` when nothing needs storing.
29
30
  */
30
- export function buildPortsConfig(node, direction, to) {
31
- const stored = node.data?.config?.ports ?? {};
32
- const entries = stored[direction];
31
+ export function portsConfigForOrder(node, direction, to) {
32
+ const stored = node.data?.config?.ports;
33
+ const entries = stored?.[direction];
33
34
  const ports = allPorts(node, direction);
34
- const known = new Set(ports.map((p) => p.id));
35
- const current = orderPortsFor(ports, entries).map((p) => p.id);
35
+ const current = orderPortsFor(ports, entries);
36
36
  // The visible ports hold slots in the current order; `to` refills them. Hidden ports stay put.
37
+ const byId = new Map(ports.map((p) => [p.id, p]));
37
38
  const wanted = new Set(to);
38
- const slots = current.flatMap((id, i) => (wanted.has(id) ? [i] : []));
39
- const refill = to.filter((id) => known.has(id));
40
- const order = [...current];
41
- slots.forEach((slot, i) => {
42
- order[slot] = refill[i];
43
- });
39
+ const refill = to.flatMap((id) => byId.get(id) ?? []);
40
+ let next = 0;
41
+ const order = current.map((p) => (wanted.has(p.id) ? (refill[next++] ?? p) : p));
44
42
  // Reserved ports (trigger, tool, error, loop_back) are written last, the way the card shows
45
43
  // them, whatever slot an older stored order gave them (Q3).
46
- const reserved = new Set(ports.filter(isReservedPort).map((p) => p.id));
47
44
  const tidy = [
48
- ...order.filter((id) => !reserved.has(id)),
49
- ...order.filter((id) => reserved.has(id))
45
+ ...order.filter((p) => !isReservedPort(p)),
46
+ ...order.filter((p) => isReservedPort(p))
50
47
  ];
51
- const byId = new Map((entries ?? []).map((e) => [e.id, e]));
52
- const next = tidy.map((id) => ({ ...(byId.get(id) ?? { id }) }));
53
- // Entries for ports the node no longer has stay as they were.
54
- for (const entry of entries ?? [])
55
- if (!known.has(entry.id))
56
- next.push({ ...entry });
57
- const defaultOrder = byDefaultOrder(ports).map((p) => p.id);
58
- const keep = next.some((e, i) => e.id !== defaultOrder[i]) || next.some((e) => e.exposed !== undefined);
59
- const result = { ...stored };
60
- if (keep)
61
- result[direction] = next;
62
- else
63
- delete result[direction];
64
- for (const key of ['inputs', 'outputs']) {
65
- if (result[key]?.length === 0)
66
- delete result[key];
67
- }
68
- return Object.keys(result).length === 0 ? undefined : result;
48
+ return buildPortsConfig(stored, direction, tidy, ports, (p) => isPortExposed(p, entries));
69
49
  }
70
50
  /**
71
51
  * The updates for the accepted proposals, one per node touched, in node order of first use.
@@ -92,7 +72,7 @@ export function applyProposalToNodes(nodes, proposals) {
92
72
  const change = proposal.changes.ports?.[direction];
93
73
  if (!change)
94
74
  continue;
95
- const ports = buildPortsConfig(next, direction, change.to);
75
+ const ports = portsConfigForOrder(next, direction, change.to);
96
76
  const config = { ...(next.data?.config ?? {}) };
97
77
  if (ports)
98
78
  config.ports = ports;
@@ -28,6 +28,30 @@ export declare const defaultMessages: {
28
28
  readonly no: "No";
29
29
  };
30
30
  readonly form: {
31
+ readonly ports: {
32
+ readonly hide: ({ port }: {
33
+ port: string;
34
+ }) => string;
35
+ readonly show: ({ port }: {
36
+ port: string;
37
+ }) => string;
38
+ readonly shown: "Shown on the canvas";
39
+ readonly hidden: "Hidden from the canvas";
40
+ readonly locked: ({ port }: {
41
+ port: string;
42
+ }) => string;
43
+ readonly lockedHint: "Always shown. The node type decides this port.";
44
+ readonly wired: ({ port }: {
45
+ port: string;
46
+ }) => string;
47
+ readonly wiredHint: ({ n }: {
48
+ n: number;
49
+ }) => string;
50
+ readonly published: ({ port }: {
51
+ port: string;
52
+ }) => string;
53
+ readonly publishedHint: "On the workflow interface. Remove it from the interface to hide it.";
54
+ };
31
55
  readonly array: {
32
56
  readonly itemLabel: ({ n }: {
33
57
  n: number;
@@ -28,6 +28,21 @@ export const defaultMessages = {
28
28
  no: 'No'
29
29
  },
30
30
  form: {
31
+ // The Ports tab: Show/Hide per port.
32
+ ports: {
33
+ hide: ({ port }) => `Hide port ${port}`,
34
+ show: ({ port }) => `Show port ${port}`,
35
+ shown: 'Shown on the canvas',
36
+ hidden: 'Hidden from the canvas',
37
+ locked: ({ port }) => `${port} is always shown`,
38
+ lockedHint: 'Always shown. The node type decides this port.',
39
+ wired: ({ port }) => `${port} is connected and can't be hidden`,
40
+ wiredHint: ({ n }) => n === 1
41
+ ? 'Connected (1). Remove its connection on the canvas to hide it.'
42
+ : `Connected (${n}). Remove its connections on the canvas to hide it.`,
43
+ published: ({ port }) => `${port} is on the workflow interface and can't be hidden`,
44
+ publishedHint: 'On the workflow interface. Remove it from the interface to hide it.'
45
+ },
31
46
  array: {
32
47
  // Item-level controls — `n` is the 1-based item position the user sees.
33
48
  itemLabel: ({ n }) => `Item ${n}`,
@@ -12,7 +12,7 @@ import type { FlowDropSkin } from '../types/skin.js';
12
12
  *
13
13
  * This is not the flowdrop.io or Factorial brand kit. Every token a colour
14
14
  * role needs is set here in both modes, so nothing falls back to the blue
15
- * of the default theme.
15
+ * of the Classic theme.
16
16
  *
17
17
  * The font is named, not loaded: import `@flowdrop/flowdrop/styles/fonts/inter.css`
18
18
  * (or serve the same @font-face) to get Inter; without it the stack falls
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * This is not the flowdrop.io or Factorial brand kit. Every token a colour
13
13
  * role needs is set here in both modes, so nothing falls back to the blue
14
- * of the default theme.
14
+ * of the Classic theme.
15
15
  *
16
16
  * The font is named, not loaded: import `@flowdrop/flowdrop/styles/fonts/inter.css`
17
17
  * (or serve the same @font-face) to get Inter; without it the stack falls
@@ -13,6 +13,7 @@ import { untrack } from 'svelte';
13
13
  import { DEFAULT_SETTINGS, SETTINGS_STORAGE_KEY, normalizeGridSize, normalizeLayoutGap } from '../types/settings.js';
14
14
  import { DEFAULT_LAYOUT_GAP_X, DEFAULT_LAYOUT_GAP_Y } from '../layout/types.js';
15
15
  import { logger } from '../utils/logger.js';
16
+ import { normalizeThemeName } from '../themes/index.js';
16
17
  // =========================================================================
17
18
  // Internal State
18
19
  // =========================================================================
@@ -114,6 +115,8 @@ function deepMergeSettings(target, source) {
114
115
  result.ui.sheetWidths = { ...target.ui.sheetWidths, ...source.ui.sheetWidths };
115
116
  }
116
117
  }
118
+ // A theme saved under its old name ('default', until 2.14) loads as 'classic'.
119
+ result.ui.theme = normalizeThemeName(result.ui.theme);
117
120
  // Merge behavior settings
118
121
  if (source.behavior) {
119
122
  result.behavior = { ...result.behavior, ...source.behavior };
@@ -194,6 +194,16 @@ export declare class WorkflowStore {
194
194
  revision?: Workflow['revision'];
195
195
  can?: Workflow['can'];
196
196
  }): void;
197
+ /**
198
+ * Stop calling the dirty-state and workflow-change callbacks until the
199
+ * returned release is called, e.g. while a change is made and then taken as
200
+ * the workflow's new clean state, which the host should not hear about.
201
+ *
202
+ * On release the host hears only what is still true: the dirty state when it
203
+ * differs from the one at muting, and one `'metadata'` change when the
204
+ * workflow is dirty and was replaced meanwhile. Release is idempotent.
205
+ */
206
+ muteCallbacks(): () => void;
197
207
  /**
198
208
  * Set the restoring from history flag.
199
209
  *