@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,11 +1,9 @@
1
1
  <!--
2
- FormTextarea Component
3
- Multiline text input field for longer string values
4
-
5
- Features:
6
- - Resizable textarea with minimum height
7
- - Focus and hover states
8
- - Proper ARIA attributes for accessibility
2
+ @component
3
+ A multi-line text box that can be resized, with a minimum height.
4
+
5
+ **Use it for** longer plain text such as a system prompt. The factory picks it for `format: "multiline"`.
6
+ **Not for** text with `{{ variables }}` (use `FormTemplateEditor`) or Markdown (use `FormMarkdownEditor`).
9
7
  -->
10
8
 
11
9
  <script lang="ts">
@@ -16,6 +16,12 @@ interface Props {
16
16
  /** Callback when value changes */
17
17
  onChange: (value: string) => void;
18
18
  }
19
+ /**
20
+ * A multi-line text box that can be resized, with a minimum height.
21
+ *
22
+ * **Use it for** longer plain text such as a system prompt. The factory picks it for `format: "multiline"`.
23
+ * **Not for** text with `{{ variables }}` (use `FormTemplateEditor`) or Markdown (use `FormMarkdownEditor`).
24
+ */
19
25
  declare const FormTextarea: import("svelte").Component<Props, {}, "">;
20
26
  type FormTextarea = ReturnType<typeof FormTextarea>;
21
27
  export default FormTextarea;
@@ -1,12 +1,10 @@
1
1
  <!--
2
- FormToggle Component
3
- Toggle switch for boolean values
4
-
5
- Features:
6
- - Smooth toggle animation
7
- - No state word on screen; the state is the track colour. On/Off labels
8
- stay as the switch's accessible name
9
- - Focus-visible states for keyboard navigation
2
+ @component
3
+ A switch for a true or false value. It shows no state word; the track colour is the state.
4
+ The on and off labels are only its accessible name.
5
+
6
+ **Use it for** on or off options. The factory picks it for `type: "boolean"`.
7
+ **Not for** choosing several items from a list (use `FormCheckboxGroup`).
10
8
  -->
11
9
 
12
10
  <script lang="ts">
@@ -26,6 +26,13 @@ interface Props {
26
26
  /** Callback when value changes */
27
27
  onChange: (value: boolean) => void;
28
28
  }
29
+ /**
30
+ * A switch for a true or false value. It shows no state word; the track colour is the state.
31
+ * The on and off labels are only its accessible name.
32
+ *
33
+ * **Use it for** on or off options. The factory picks it for `type: "boolean"`.
34
+ * **Not for** choosing several items from a list (use `FormCheckboxGroup`).
35
+ */
29
36
  declare const FormToggle: import("svelte").Component<Props, {}, "">;
30
37
  type FormToggle = ReturnType<typeof FormToggle>;
31
38
  export default FormToggle;
@@ -1,14 +1,10 @@
1
1
  <!--
2
- FormUISchemaRenderer Component
3
- Recursively renders UISchema elements: VerticalLayout, Group, and Control.
2
+ @component
3
+ Draws a node's UI schema tree: a `VerticalLayout` stacks its children, a `Group` wraps them in a `FormFieldset`,
4
+ and a `Control` draws one field through `FormField`.
4
5
 
5
- This component bridges the UISchema tree and the existing FormField components.
6
- It resolves Control scopes to property keys and delegates field rendering to FormField.
7
-
8
- Rendering logic:
9
- - Control -> resolve scope to key, render FormField
10
- - VerticalLayout -> vertical flex container with recursive children
11
- - Group -> FormFieldset wrapping recursive children
6
+ **Use it for** nothing directly. `ConfigForm` and `SchemaForm` use it when a schema has a `uiSchema`.
7
+ **Not for** flat forms (those are drawn in schema order without it).
12
8
  -->
13
9
 
14
10
  <script lang="ts">
@@ -27,6 +27,13 @@ interface Props {
27
27
  /** Auth provider (optional, passed through to FormField) */
28
28
  authProvider?: AuthProvider;
29
29
  }
30
+ /**
31
+ * Draws a node's UI schema tree: a `VerticalLayout` stacks its children, a `Group` wraps them in a `FormFieldset`,
32
+ * and a `Control` draws one field through `FormField`.
33
+ *
34
+ * **Use it for** nothing directly. `ConfigForm` and `SchemaForm` use it when a schema has a `uiSchema`.
35
+ * **Not for** flat forms (those are drawn in schema order without it).
36
+ */
30
37
  declare const FormUISchemaRenderer: import("svelte").Component<Props, {}, "">;
31
38
  type FormUISchemaRenderer = ReturnType<typeof FormUISchemaRenderer>;
32
39
  export default FormUISchemaRenderer;
@@ -1,10 +1,10 @@
1
1
  <!--
2
- ChoicePrompt Component
3
-
4
- Renders a selection prompt for choice-type interrupts.
5
- Supports single selection (radio buttons) and multiple selection (checkboxes).
6
- Shows the selected options when resolved.
7
- Styled with BEM syntax.
2
+ @component
3
+ The options of a choice question: radio buttons for one answer, check boxes when several are allowed
4
+ (with optional minimum and maximum).
5
+
6
+ **Use it for** the body of an `InterruptBubble` of type `choice`.
7
+ **Not for** a yes or no question (use `ConfirmationPrompt`) or free text (use `TextInputPrompt`).
8
8
  -->
9
9
 
10
10
  <script lang="ts">
@@ -16,6 +16,13 @@ interface Props {
16
16
  /** Callback when user submits selection */
17
17
  onSubmit: (value: string | string[]) => void;
18
18
  }
19
+ /**
20
+ * The options of a choice question: radio buttons for one answer, check boxes when several are allowed
21
+ * (with optional minimum and maximum).
22
+ *
23
+ * **Use it for** the body of an `InterruptBubble` of type `choice`.
24
+ * **Not for** a yes or no question (use `ConfirmationPrompt`) or free text (use `TextInputPrompt`).
25
+ */
19
26
  declare const ChoicePrompt: import("svelte").Component<Props, {}, "">;
20
27
  type ChoicePrompt = ReturnType<typeof ChoicePrompt>;
21
28
  export default ChoicePrompt;
@@ -1,9 +1,10 @@
1
1
  <!--
2
- ConfirmationPrompt Component
3
-
4
- Renders a Yes/No confirmation prompt for confirmation-type interrupts.
5
- Two action buttons with customizable labels, secondary then primary. The question
6
- itself is the card's title (InterruptBubble); an answered card folds to one line there.
2
+ @component
3
+ Two buttons for a yes or no question, with labels the step can set: the second action first, then the primary one.
4
+ The question itself is the card title, drawn by `InterruptBubble`.
5
+
6
+ **Use it for** the body of an `InterruptBubble` of type `confirmation`.
7
+ **Not for** more than two answers (use `ChoicePrompt`).
7
8
  -->
8
9
 
9
10
  <script lang="ts">
@@ -16,6 +16,13 @@ interface Props {
16
16
  /** Callback when user declines (No) */
17
17
  onDecline: () => void;
18
18
  }
19
+ /**
20
+ * Two buttons for a yes or no question, with labels the step can set: the second action first, then the primary one.
21
+ * The question itself is the card title, drawn by `InterruptBubble`.
22
+ *
23
+ * **Use it for** the body of an `InterruptBubble` of type `confirmation`.
24
+ * **Not for** more than two answers (use `ChoicePrompt`).
25
+ */
19
26
  declare const ConfirmationPrompt: import("svelte").Component<Props, {}, "">;
20
27
  type ConfirmationPrompt = ReturnType<typeof ConfirmationPrompt>;
21
28
  export default ConfirmationPrompt;
@@ -1,10 +1,10 @@
1
1
  <!--
2
- FormPrompt Component
3
-
4
- Renders a JSON Schema-based form for form-type interrupts.
5
- Wraps the existing SchemaForm component for consistent form handling. The form
6
- sits straight on the interrupt card (no card of its own); the question is the
7
- card's title and an answered card folds to one line (InterruptBubble).
2
+ @component
3
+ A form built from a JSON Schema, placed straight on the interrupt card. It wraps `SchemaForm`, so the fields look
4
+ the same as in other forms.
5
+
6
+ **Use it for** the body of an `InterruptBubble` of type `form`.
7
+ **Not for** editing a node (that is `ConfigForm`).
8
8
  -->
9
9
 
10
10
  <script lang="ts">
@@ -14,6 +14,13 @@ interface Props {
14
14
  /** Callback when user submits form */
15
15
  onSubmit: (value: Record<string, unknown>) => void;
16
16
  }
17
+ /**
18
+ * A form built from a JSON Schema, placed straight on the interrupt card. It wraps `SchemaForm`, so the fields look
19
+ * the same as in other forms.
20
+ *
21
+ * **Use it for** the body of an `InterruptBubble` of type `form`.
22
+ * **Not for** editing a node (that is `ConfigForm`).
23
+ */
17
24
  declare const FormPrompt: import("svelte").Component<Props, {}, "">;
18
25
  type FormPrompt = ReturnType<typeof FormPrompt>;
19
26
  export default FormPrompt;
@@ -1,13 +1,14 @@
1
1
  <!--
2
- InterruptBubble Component
3
-
4
- Container component for rendering interrupt prompts inline in the chat flow.
5
- Displays the appropriate prompt component based on interrupt type.
6
- Handles resolve/cancel actions using state machine for safe transitions.
7
-
8
- One card: a title line (warning icon and the prompt), the prompt's content and its
9
- actions. No header band, no footer band, no timestamp. Once answered it folds to
10
- one muted line ("Confirmed · Yes"). Used by the Playground and the AI Assistant.
2
+ @component
3
+ The card that holds a question from a paused run, inline in the chat. It picks the prompt for the
4
+ interrupt's type (confirmation, choice, text, form or review) and sends the answer.
5
+
6
+ The card has a title line (the question), the prompt and its actions. A failed send shows the error with a
7
+ Retry button. Once answered it folds to one muted line, such as "Confirmed · Yes". Optional hierarchy and
8
+ tags show in a footer.
9
+
10
+ **Use it for** any question a run asks a person. The Playground and the AI Assistant both use it.
11
+ **Not for** a prompt without the card (use the prompt component itself, for example `ChoicePrompt`).
11
12
  -->
12
13
 
13
14
  <script lang="ts">
@@ -20,6 +20,17 @@ interface Props {
20
20
  */
21
21
  tags?: MessageTag[];
22
22
  }
23
+ /**
24
+ * The card that holds a question from a paused run, inline in the chat. It picks the prompt for the
25
+ * interrupt's type (confirmation, choice, text, form or review) and sends the answer.
26
+ *
27
+ * The card has a title line (the question), the prompt and its actions. A failed send shows the error with a
28
+ * Retry button. Once answered it folds to one muted line, such as "Confirmed · Yes". Optional hierarchy and
29
+ * tags show in a footer.
30
+ *
31
+ * **Use it for** any question a run asks a person. The Playground and the AI Assistant both use it.
32
+ * **Not for** a prompt without the card (use the prompt component itself, for example `ChoicePrompt`).
33
+ */
23
34
  declare const InterruptBubble: import("svelte").Component<Props, {}, "">;
24
35
  type InterruptBubble = ReturnType<typeof InterruptBubble>;
25
36
  export default InterruptBubble;
@@ -1,11 +1,10 @@
1
1
  <!--
2
- ReviewPrompt Component
2
+ @component
3
+ A list of changes a run proposes. Each one shows the old and new value with a word-level diff, and the person
4
+ accepts or rejects it. Accept all and Reject all act on the whole list. Answered, it shows the decisions.
3
5
 
4
- Renders a review prompt for review-type interrupts.
5
- Displays proposed field changes with accept/reject toggles per field.
6
- Supports bulk "Accept All" / "Reject All" actions.
7
- Shows the review decisions when resolved.
8
- Styled with BEM syntax.
6
+ **Use it for** the body of an `InterruptBubble` of type `review`.
7
+ **Not for** a single yes or no (use `ConfirmationPrompt`).
9
8
  -->
10
9
 
11
10
  <script lang="ts">
@@ -18,6 +18,13 @@ interface Props {
18
18
  /** Callback when user submits review */
19
19
  onSubmit: (value: ReviewResolution) => void;
20
20
  }
21
+ /**
22
+ * A list of changes a run proposes. Each one shows the old and new value with a word-level diff, and the person
23
+ * accepts or rejects it. Accept all and Reject all act on the whole list. Answered, it shows the decisions.
24
+ *
25
+ * **Use it for** the body of an `InterruptBubble` of type `review`.
26
+ * **Not for** a single yes or no (use `ConfirmationPrompt`).
27
+ */
21
28
  declare const ReviewPrompt: import("svelte").Component<Props, {}, "">;
22
29
  type ReviewPrompt = ReturnType<typeof ReviewPrompt>;
23
30
  export default ReviewPrompt;
@@ -1,10 +1,10 @@
1
1
  <!--
2
- TextInputPrompt Component
3
-
4
- Renders a text input prompt for text-type interrupts.
5
- Supports single-line input and multiline textarea.
6
- Shows the entered text when resolved.
7
- Styled with BEM syntax.
2
+ @component
3
+ A text field (or text area) for a question that needs a written answer, with optional placeholder,
4
+ default value and length limits.
5
+
6
+ **Use it for** the body of an `InterruptBubble` of type `text`.
7
+ **Not for** several fields at once (use `FormPrompt`).
8
8
  -->
9
9
 
10
10
  <script lang="ts">
@@ -16,6 +16,13 @@ interface Props {
16
16
  /** Callback when user submits text */
17
17
  onSubmit: (value: string) => void;
18
18
  }
19
+ /**
20
+ * A text field (or text area) for a question that needs a written answer, with optional placeholder,
21
+ * default value and length limits.
22
+ *
23
+ * **Use it for** the body of an `InterruptBubble` of type `text`.
24
+ * **Not for** several fields at once (use `FormPrompt`).
25
+ */
19
26
  declare const TextInputPrompt: import("svelte").Component<Props, {}, "">;
20
27
  type TextInputPrompt = ReturnType<typeof TextInputPrompt>;
21
28
  export default TextInputPrompt;
@@ -1,11 +1,13 @@
1
1
  <!--
2
- Atom Node Component
3
- Minimalist, label-only node for "supplies a value" atoms (Constant now, Cast later).
4
- Renders as a pill that hugs its content with handles driven by the node's ports.
2
+ @component
3
+ A value as a small pill: a constant or an inline transform. The text is the whole node.
5
4
 
6
- The body text and the output port's dataType are both driven by config via
7
- `extensions.ui.atom` (see AtomUIConfig). This component owns no domain semantics —
8
- meaning comes entirely from the node's NodeMetadata.
5
+ The text comes from `config[valueKey]` (or the label) and the look from
6
+ `extensions.ui.atom` (see `AtomUIConfig`). The component holds no domain meaning; the
7
+ node type supplies it. The pill is 40 px tall, and its handles follow the node's ports.
8
+
9
+ **Use it for** a node type that declares `type: "atom"`, such as a constant or a cast.
10
+ **Not for** a node that needs a title, a description or several ports; use `WorkflowNode`.
9
11
  -->
10
12
 
11
13
  <script lang="ts">
@@ -21,6 +23,7 @@
21
23
  WorkflowNode as WorkflowNodeType
22
24
  } from '../../types/index.js';
23
25
  import { getPortColorToken } from '../../utils/colors.js';
26
+ import NodeProblemMark from './NodeProblemMark.svelte';
24
27
  import { getInstance } from '../../stores/getInstance.svelte.js';
25
28
  import { orderPortsFor, isPortVisible } from '../../utils/portUtils.js';
26
29
  import { ProximityConnectHelper } from '../../helpers/proximityConnect.js';
@@ -38,10 +41,15 @@
38
41
  }
39
42
 
40
43
  interface Props {
44
+ /** The node's id on the canvas. */
41
45
  id: string;
46
+ /** The node: its label, config and node type. The body text and look come from `metadata.extensions.ui.atom`. */
42
47
  data: AtomNodeData;
48
+ /** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
43
49
  selected?: boolean;
50
+ /** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
44
51
  isProcessing?: boolean;
52
+ /** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
45
53
  isError?: boolean;
46
54
  }
47
55
 
@@ -158,6 +166,8 @@
158
166
  <span class="flowdrop-atom-node__prefix" aria-hidden="true">{atomCfg.prefix}</span>
159
167
  {/if}
160
168
  <span class="flowdrop-atom-node__body" title={display.text}>{display.text}</span>
169
+ <!-- Outside the truncated body, so a long value never hides it. -->
170
+ <NodeProblemMark />
161
171
  </div>
162
172
  </div>
163
173
 
@@ -253,6 +263,21 @@
253
263
  line-height: 20px;
254
264
  }
255
265
 
266
+ .flowdrop-atom-node__pill :global(.fd-node-problem) {
267
+ margin-left: 4px;
268
+ }
269
+
270
+ /* Zoom tiers scale the mark up. The pill is only 40px tall, so the glyph and map
271
+ tiers keep the mark inline at the outline size (no corner mark over the text),
272
+ and every tier grows it into the pill's padding, not over the text. */
273
+ :global([data-fd-zoom='outline']) .flowdrop-atom-node__pill :global(.fd-node-problem),
274
+ :global([data-fd-zoom='glyph']) .flowdrop-atom-node__pill :global(.fd-node-problem),
275
+ :global([data-fd-zoom='map']) .flowdrop-atom-node__pill :global(.fd-node-problem) {
276
+ position: static;
277
+ scale: var(--fd-node-zoom-mark-scale-outline);
278
+ transform-origin: left center;
279
+ }
280
+
256
281
  .flowdrop-atom-node__body {
257
282
  /* min-width:0 lets the body ellipsize as a flex sibling of the prefix */
258
283
  min-width: 0;
@@ -15,12 +15,27 @@ interface AtomNodeData {
15
15
  }) => void;
16
16
  }
17
17
  interface Props {
18
+ /** The node's id on the canvas. */
18
19
  id: string;
20
+ /** The node: its label, config and node type. The body text and look come from `metadata.extensions.ui.atom`. */
19
21
  data: AtomNodeData;
22
+ /** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
20
23
  selected?: boolean;
24
+ /** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
21
25
  isProcessing?: boolean;
26
+ /** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
22
27
  isError?: boolean;
23
28
  }
29
+ /**
30
+ * A value as a small pill: a constant or an inline transform. The text is the whole node.
31
+ *
32
+ * The text comes from `config[valueKey]` (or the label) and the look from
33
+ * `extensions.ui.atom` (see `AtomUIConfig`). The component holds no domain meaning; the
34
+ * node type supplies it. The pill is 40 px tall, and its handles follow the node's ports.
35
+ *
36
+ * **Use it for** a node type that declares `type: "atom"`, such as a constant or a cast.
37
+ * **Not for** a node that needs a title, a description or several ports; use `WorkflowNode`.
38
+ */
24
39
  declare const AtomNode: import("svelte").Component<Props, {}, "">;
25
40
  type AtomNode = ReturnType<typeof AtomNode>;
26
41
  export default AtomNode;
@@ -1,11 +1,13 @@
1
1
  <!--
2
- Caption Node Component
2
+ @component
3
+ A short, high-contrast line of text that names or marks nearby nodes.
3
4
 
4
- A short, high-contrast line of text (one or two lines) that names or marks
5
- nearby nodes. Text lives in `data.label`. It has no ports, no config panel
6
- and no status overlay; it is edited in place (double-click, Enter on the
7
- focused node, or the context menu) and the editor owns the write through
8
- `data.onInlineCommit`.
5
+ The text is `data.label`. A caption has no ports, no config panel and no status
6
+ overlay. It is edited in place (double-click, Enter on the focused node, or the context
7
+ menu) and the editor owns the write through `data.onInlineCommit`.
8
+
9
+ **Use it for** section labels and short reminders on the canvas.
10
+ **Not for** longer text or markdown; use `NotesNode`.
9
11
  -->
10
12
 
11
13
  <script lang="ts">
@@ -15,11 +17,15 @@
15
17
  import { m } from '../../messages/index.js';
16
18
  import { getInstance } from '../../stores/getInstance.svelte.js';
17
19
  import { getEditorSettings } from '../../stores/settingsStore.svelte.js';
20
+ import NodeProblemMark from './NodeProblemMark.svelte';
21
+ import { getNodeProblem } from '../../utils/nodeProblem.js';
18
22
  import { snapCaptionWidth } from '../../utils/captionText.js';
19
23
  import { focusWhenVisible } from '../../utils/focus.js';
20
24
 
21
25
  interface Props {
26
+ /** The node's id on the canvas. */
22
27
  id: string;
28
+ /** The caption: the text is `label`. */
23
29
  data: {
24
30
  label: string;
25
31
  /**
@@ -29,16 +35,20 @@
29
35
  */
30
36
  onInlineCommit?: (id: string, text: string | null) => void;
31
37
  };
38
+ /** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
32
39
  selected?: boolean;
33
40
  }
34
41
 
35
42
  let props: Props = $props();
36
43
 
37
44
  const fd = getInstance();
45
+ const problem = getNodeProblem();
38
46
  const caption = $derived(m().nodes.caption);
39
47
 
40
48
  /** Horizontal padding on each side, mirrors the CSS. */
41
49
  const PADDING_X = 10;
50
+ /** The Doctor's mark after the text: its 16px plus a 6px gap, mirrors the CSS. */
51
+ const MARK_W = 22;
42
52
 
43
53
  let rootEl: HTMLDivElement | undefined = $state();
44
54
  let editorEl: HTMLDivElement | undefined = $state();
@@ -61,6 +71,8 @@
61
71
  const shownText = $derived(editing ? draft : label);
62
72
  const showPlaceholder = $derived(editing && draft === '');
63
73
 
74
+ const hasMark = $derived(problem?.severity != null);
75
+
64
76
  /**
65
77
  * Width in px, snapped to the grid; undefined until the text has been
66
78
  * measured, so the CSS minimum applies. While editing, the node is never
@@ -71,7 +83,7 @@
71
83
  textW === 0 && !editing
72
84
  ? undefined
73
85
  : snapCaptionWidth(
74
- Math.max(textW, editing ? placeholderW : 0) + 2 * PADDING_X,
86
+ Math.max(textW, editing ? placeholderW : 0) + 2 * PADDING_X + (hasMark ? MARK_W : 0),
75
87
  getEditorSettings().gridSize
76
88
  )
77
89
  );
@@ -211,6 +223,7 @@
211
223
  class="flowdrop-caption-node"
212
224
  class:flowdrop-caption-node--selected={props.selected}
213
225
  class:flowdrop-caption-node--editing={editing}
226
+ class:flowdrop-caption-node--problem={hasMark}
214
227
  bind:this={rootEl}
215
228
  style:width={width === undefined ? undefined : `${width}px`}
216
229
  ondblclick={requestEdit}
@@ -246,6 +259,9 @@
246
259
  {label}
247
260
  </div>
248
261
  {/if}
262
+
263
+ <!-- The Doctor's mark, inline after the text. -->
264
+ <NodeProblemMark />
249
265
  </div>
250
266
 
251
267
  <style>
@@ -265,6 +281,33 @@
265
281
  line-height: 20px;
266
282
  }
267
283
 
284
+ /* The text takes the room the mark leaves; the mark sits on the first line. */
285
+ .flowdrop-caption-node--problem {
286
+ display: flex;
287
+ align-items: flex-start;
288
+ gap: 6px;
289
+ }
290
+
291
+ .flowdrop-caption-node--problem .flowdrop-caption-node__text {
292
+ flex: 1;
293
+ min-width: 0;
294
+ }
295
+
296
+ .flowdrop-caption-node--problem :global(.fd-node-problem) {
297
+ margin-top: 2px;
298
+ }
299
+
300
+ /* Zoom tiers scale the mark up. The caption is one or two lines tall, so every tier
301
+ keeps the mark inline at the outline size (no corner mark over the text) and grows
302
+ it into the padding, not over the text. */
303
+ :global([data-fd-zoom='outline']) .flowdrop-caption-node--problem :global(.fd-node-problem),
304
+ :global([data-fd-zoom='glyph']) .flowdrop-caption-node--problem :global(.fd-node-problem),
305
+ :global([data-fd-zoom='map']) .flowdrop-caption-node--problem :global(.fd-node-problem) {
306
+ position: static;
307
+ scale: var(--fd-node-zoom-mark-scale-outline);
308
+ transform-origin: left center;
309
+ }
310
+
268
311
  .flowdrop-caption-node--selected {
269
312
  outline: 2px solid var(--fd-ring, currentColor);
270
313
  outline-offset: 2px;
@@ -1,5 +1,7 @@
1
1
  interface Props {
2
+ /** The node's id on the canvas. */
2
3
  id: string;
4
+ /** The caption: the text is `label`. */
3
5
  data: {
4
6
  label: string;
5
7
  /**
@@ -9,8 +11,19 @@ interface Props {
9
11
  */
10
12
  onInlineCommit?: (id: string, text: string | null) => void;
11
13
  };
14
+ /** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
12
15
  selected?: boolean;
13
16
  }
17
+ /**
18
+ * A short, high-contrast line of text that names or marks nearby nodes.
19
+ *
20
+ * The text is `data.label`. A caption has no ports, no config panel and no status
21
+ * overlay. It is edited in place (double-click, Enter on the focused node, or the context
22
+ * menu) and the editor owns the write through `data.onInlineCommit`.
23
+ *
24
+ * **Use it for** section labels and short reminders on the canvas.
25
+ * **Not for** longer text or markdown; use `NotesNode`.
26
+ */
14
27
  declare const CaptionNode: import("svelte").Component<Props, {}, "">;
15
28
  type CaptionNode = ReturnType<typeof CaptionNode>;
16
29
  export default CaptionNode;
@@ -1,17 +1,21 @@
1
1
  <!--
2
- Gateway Node Component
3
- Branching control flow on the card v2 geometry (see NodeCard): the same
4
- header, the completion trigger as a header pin, input ports as rows on the
5
- left, and the branches as output rows on the right (their triggers stay rows).
6
- Shows active branches and execution paths.
2
+ @component
3
+ A node that sends the run down one of several branches, drawn on the shared card.
4
+
5
+ It has the same header as `WorkflowNode` (see `NodeCard`), the trigger as a header pin,
6
+ input ports as rows on the left, and the branches as output rows on the right. After a
7
+ run, the branches the run took are marked.
7
8
 
8
9
  Port rendering:
9
- - Input-port exposure (data.config.ports, falling back to each port's
10
- exposedByDefault) decides which input ports render, in effective order.
11
- Branches are authored output paths and always render.
12
- - Branches are not NodePorts: each becomes a trigger-lane output row whose
13
- port id is the branch name. Rows are keyed by index, so two branches with
14
- the same (or an empty) name draw two rows instead of crashing.
10
+ - Input exposure (`data.config.ports`, falling back to each port's `exposedByDefault`)
11
+ decides which input ports render, in effective order. Branches are authored paths
12
+ and always render.
13
+ - A branch is not a `NodePort`: each becomes a trigger output row whose port id is the
14
+ branch name. Rows are keyed by index, so two branches with the same (or an empty)
15
+ name draw two rows instead of crashing.
16
+
17
+ **Use it for** a node type that declares `type: "gateway"`, such as If/else or Switch.
18
+ **Not for** a node with a fixed set of outputs; use `WorkflowNode`.
15
19
  -->
16
20
 
17
21
  <script lang="ts">
@@ -25,10 +29,13 @@
25
29
  import { orderPortsFor, isPortVisible } from '../../utils/portUtils.js';
26
30
 
27
31
  interface Props {
32
+ /** The node's id on the canvas. */
28
33
  id: string;
34
+ /** The node: label, config (`branches`, `ports`, `instanceTitle`) and node type. Branches come from `config.branches`. */
29
35
  data: WorkflowNode['data'] & {
30
36
  onConfigOpen?: (node: { id: string; type: string; data: WorkflowNode['data'] }) => void;
31
37
  };
38
+ /** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
32
39
  selected?: boolean;
33
40
  }
34
41