@flowdrop/flowdrop 2.11.0 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (455) hide show
  1. package/CHANGELOG.md +233 -0
  2. package/dist/adapters/agentspec/autoLayout.d.ts +18 -36
  3. package/dist/adapters/agentspec/autoLayout.js +75 -93
  4. package/dist/chat/activity.d.ts +49 -0
  5. package/dist/chat/activity.js +65 -0
  6. package/dist/chat/commandClassifier.js +2 -1
  7. package/dist/commands/executor.js +186 -27
  8. package/dist/commands/index.d.ts +2 -1
  9. package/dist/commands/index.js +2 -0
  10. package/dist/commands/parser.js +43 -3
  11. package/dist/commands/session.d.ts +60 -0
  12. package/dist/commands/session.js +332 -0
  13. package/dist/commands/storeIntegration.svelte.js +18 -1
  14. package/dist/commands/types.d.ts +77 -4
  15. package/dist/components/App.svelte +976 -226
  16. package/dist/components/App.svelte.d.ts +34 -2
  17. package/dist/components/BindablePortListbox.svelte +68 -369
  18. package/dist/components/Button.svelte +17 -14
  19. package/dist/components/Button.svelte.d.ts +2 -2
  20. package/dist/components/CanvasContextMenu.svelte +31 -10
  21. package/dist/components/CanvasController.svelte +146 -3
  22. package/dist/components/CanvasController.svelte.d.ts +25 -33
  23. package/dist/components/CanvasIconButton.svelte +6 -6
  24. package/dist/components/CanvasToolbar.svelte +103 -0
  25. package/dist/components/CanvasToolbar.svelte.d.ts +23 -0
  26. package/dist/components/CanvasZoomControls.svelte +122 -0
  27. package/dist/components/CanvasZoomControls.svelte.d.ts +15 -0
  28. package/dist/components/ConfigForm.svelte +159 -121
  29. package/dist/components/ConfigModal.svelte +11 -54
  30. package/dist/components/ConfigPanel.svelte +98 -228
  31. package/dist/components/ConfigPanel.svelte.d.ts +2 -2
  32. package/dist/components/ConnectPortPicker.svelte +153 -0
  33. package/dist/components/ConnectPortPicker.svelte.d.ts +22 -0
  34. package/dist/components/DoctorMenu.svelte +422 -0
  35. package/dist/components/DoctorMenu.svelte.d.ts +7 -0
  36. package/dist/components/ExternalLinkRow.svelte +82 -0
  37. package/dist/components/ExternalLinkRow.svelte.d.ts +14 -0
  38. package/dist/components/FlowDropEdge.svelte +52 -2
  39. package/dist/components/FlowDropEdge.svelte.d.ts +5 -1
  40. package/dist/components/InterfaceNameInput.svelte +103 -0
  41. package/dist/components/InterfaceNameInput.svelte.d.ts +13 -0
  42. package/dist/components/InterfaceTag.svelte +215 -0
  43. package/dist/components/InterfaceTag.svelte.d.ts +20 -0
  44. package/dist/components/InterfaceTagAnchor.svelte +103 -0
  45. package/dist/components/InterfaceTagAnchor.svelte.d.ts +12 -0
  46. package/dist/components/InterfaceTagLayer.svelte +314 -0
  47. package/dist/components/InterfaceTagLayer.svelte.d.ts +28 -0
  48. package/dist/components/LogsSidebar.svelte +43 -43
  49. package/dist/components/LoopbackLanes.svelte +54 -0
  50. package/dist/components/LoopbackLanes.svelte.d.ts +8 -0
  51. package/dist/components/Navbar.svelte +539 -169
  52. package/dist/components/Navbar.svelte.d.ts +20 -1
  53. package/dist/components/NodeInspector.svelte +153 -0
  54. package/dist/components/NodeInspector.svelte.d.ts +19 -0
  55. package/dist/components/NodeLastRun.svelte +212 -0
  56. package/dist/components/NodeLastRun.svelte.d.ts +13 -0
  57. package/dist/components/NodeSidebar.svelte +279 -23
  58. package/dist/components/NodeSidebar.svelte.d.ts +11 -0
  59. package/dist/components/NodeStatusOverlay.svelte +144 -353
  60. package/dist/components/NodeStatusOverlay.svelte.d.ts +4 -1
  61. package/dist/components/PortMappingRow.svelte +28 -44
  62. package/dist/components/PortPickerListbox.svelte +475 -0
  63. package/dist/components/PortPickerListbox.svelte.d.ts +73 -0
  64. package/dist/components/ReadOnlyDetails.svelte +52 -89
  65. package/dist/components/RunBar.svelte +222 -0
  66. package/dist/components/RunBar.svelte.d.ts +20 -0
  67. package/dist/components/RunsMenu.svelte +649 -0
  68. package/dist/components/RunsMenu.svelte.d.ts +14 -0
  69. package/dist/components/SettingsModal.svelte +27 -59
  70. package/dist/components/SettingsPanel.svelte +515 -241
  71. package/dist/components/StraightGuides.svelte +46 -0
  72. package/dist/components/StraightGuides.svelte.d.ts +7 -0
  73. package/dist/components/ThemeToggle.svelte +14 -4
  74. package/dist/components/UniversalNode.svelte +152 -51
  75. package/dist/components/WebMCPBridgeMenu.svelte +336 -0
  76. package/dist/components/WebMCPBridgeMenu.svelte.d.ts +3 -0
  77. package/dist/components/WorkflowEditor.svelte +789 -136
  78. package/dist/components/WorkflowEditor.svelte.d.ts +43 -1
  79. package/dist/components/WorkflowInterfaceEditor.svelte +63 -92
  80. package/dist/components/WorkflowInterfaceEntryCard.svelte +478 -549
  81. package/dist/components/WorkflowInterfaceEntryComposer.svelte +23 -67
  82. package/dist/components/WorkflowPlaygroundSettings.svelte +48 -85
  83. package/dist/components/WorkflowSettingsPanel.svelte +311 -0
  84. package/dist/components/WorkflowSettingsPanel.svelte.d.ts +20 -0
  85. package/dist/components/ZoomTier.svelte +56 -0
  86. package/dist/components/ZoomTier.svelte.d.ts +4 -0
  87. package/dist/components/chat/AIChatPanel.svelte +463 -312
  88. package/dist/components/chat/ActivityList.svelte +130 -0
  89. package/dist/components/chat/ActivityList.svelte.d.ts +11 -0
  90. package/dist/components/chat/ActivityRow.svelte +179 -0
  91. package/dist/components/chat/ActivityRow.svelte.d.ts +16 -0
  92. package/dist/components/chat/CommandPreview.svelte +42 -64
  93. package/dist/components/console/CommandConsole.svelte +106 -41
  94. package/dist/components/console/CommandConsole.svelte.d.ts +2 -0
  95. package/dist/components/console/ConsoleAutocomplete.svelte +14 -13
  96. package/dist/components/console/ConsoleInput.svelte +60 -27
  97. package/dist/components/console/ConsoleOutput.svelte +86 -24
  98. package/dist/components/console/ConsoleStrip.svelte +80 -0
  99. package/dist/components/console/ConsoleStrip.svelte.d.ts +13 -0
  100. package/dist/components/form/FieldFactory.svelte +30 -4
  101. package/dist/components/form/FormArray.svelte +306 -339
  102. package/dist/components/form/FormArray.svelte.d.ts +10 -0
  103. package/dist/components/form/FormArrayRows.svelte +443 -0
  104. package/dist/components/form/FormArrayRows.svelte.d.ts +18 -0
  105. package/dist/components/form/FormAutocomplete.svelte +2 -2
  106. package/dist/components/form/FormCheckboxGroup.svelte +10 -85
  107. package/dist/components/form/FormCodeEditor.svelte +3 -3
  108. package/dist/components/form/FormFieldWrapper.svelte +98 -18
  109. package/dist/components/form/FormFieldWrapper.svelte.d.ts +10 -0
  110. package/dist/components/form/FormFieldset.svelte +44 -28
  111. package/dist/components/form/FormMarkdownEditor.svelte +6 -6
  112. package/dist/components/form/FormPorts.svelte +437 -141
  113. package/dist/components/form/FormSelect.svelte +1 -1
  114. package/dist/components/form/FormTemplateEditor.svelte +22 -26
  115. package/dist/components/form/FormToggle.svelte +15 -106
  116. package/dist/components/form/FormToggle.svelte.d.ts +3 -2
  117. package/dist/components/form/FormUISchemaRenderer.svelte +38 -3
  118. package/dist/components/form/humanizeKey.d.ts +7 -0
  119. package/dist/components/form/humanizeKey.js +21 -0
  120. package/dist/components/form/types.d.ts +6 -0
  121. package/dist/components/icons/MenuOpenIcon.svelte +8 -1
  122. package/dist/components/interrupt/ChoicePrompt.svelte +51 -152
  123. package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +0 -2
  124. package/dist/components/interrupt/ConfirmationPrompt.svelte +18 -201
  125. package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +0 -4
  126. package/dist/components/interrupt/FormPrompt.svelte +22 -147
  127. package/dist/components/interrupt/FormPrompt.svelte.d.ts +0 -4
  128. package/dist/components/interrupt/InterruptBubble.svelte +198 -355
  129. package/dist/components/interrupt/InterruptBubble.svelte.d.ts +0 -2
  130. package/dist/components/interrupt/ReviewPrompt.svelte +0 -10
  131. package/dist/components/interrupt/TextInputPrompt.svelte +23 -120
  132. package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +0 -2
  133. package/dist/components/layouts/MainLayout.svelte +110 -75
  134. package/dist/components/layouts/MainLayout.svelte.d.ts +17 -0
  135. package/dist/components/nodes/CaptionNode.svelte +7 -0
  136. package/dist/components/nodes/GatewayNode.svelte +66 -431
  137. package/dist/components/nodes/IdeaNode.svelte +6 -5
  138. package/dist/components/nodes/NodeCard.svelte +1051 -0
  139. package/dist/components/nodes/NodeCard.svelte.d.ts +30 -0
  140. package/dist/components/nodes/NodeConfigButton.svelte +28 -9
  141. package/dist/components/nodes/NodeProblemMark.svelte +113 -0
  142. package/dist/components/nodes/NodeProblemMark.svelte.d.ts +8 -0
  143. package/dist/components/nodes/NodeTip.svelte +104 -0
  144. package/dist/components/nodes/NodeTip.svelte.d.ts +15 -0
  145. package/dist/components/nodes/NotesNode.svelte +183 -150
  146. package/dist/components/nodes/SimpleNode.svelte +176 -44
  147. package/dist/components/nodes/SquareNode.svelte +127 -34
  148. package/dist/components/nodes/TerminalNode.svelte +232 -88
  149. package/dist/components/nodes/ToolNode.svelte +49 -381
  150. package/dist/components/nodes/WorkflowNode.svelte +40 -399
  151. package/dist/components/playground/ChatBubble.svelte +248 -62
  152. package/dist/components/playground/ChatInput.svelte +134 -297
  153. package/dist/components/playground/ChatInput.svelte.d.ts +17 -0
  154. package/dist/components/playground/ControlPanel.svelte +290 -190
  155. package/dist/components/playground/ControlPanel.svelte.d.ts +10 -2
  156. package/dist/components/playground/DockedPlayground.svelte +82 -0
  157. package/dist/components/playground/DockedPlayground.svelte.d.ts +30 -0
  158. package/dist/components/playground/ExecutionConsole.svelte +54 -36
  159. package/dist/components/playground/ExecutionConsole.svelte.d.ts +12 -0
  160. package/dist/components/playground/ExecutionLogs.svelte +4 -0
  161. package/dist/components/playground/HeaderMenu.svelte +170 -0
  162. package/dist/components/playground/HeaderMenu.svelte.d.ts +22 -0
  163. package/dist/components/playground/InputCollector.svelte +8 -32
  164. package/dist/components/playground/InputFields.svelte +246 -0
  165. package/dist/components/playground/InputFields.svelte.d.ts +16 -0
  166. package/dist/components/playground/InterfaceInputForm.svelte +285 -30
  167. package/dist/components/playground/InterfaceInputForm.svelte.d.ts +20 -0
  168. package/dist/components/playground/InterfaceJsonInput.svelte +92 -0
  169. package/dist/components/playground/InterfaceJsonInput.svelte.d.ts +10 -0
  170. package/dist/components/playground/LogRow.svelte +12 -12
  171. package/dist/components/playground/MessageMarkdown.svelte +11 -11
  172. package/dist/components/playground/MessageStream.svelte +154 -182
  173. package/dist/components/playground/Playground.svelte +17 -1139
  174. package/dist/components/playground/PlaygroundApp.svelte +12 -2
  175. package/dist/components/playground/PlaygroundApp.svelte.d.ts +2 -1
  176. package/dist/components/playground/PlaygroundHeader.svelte +309 -0
  177. package/dist/components/playground/PlaygroundHeader.svelte.d.ts +22 -0
  178. package/dist/components/playground/PlaygroundModal.svelte +6 -0
  179. package/dist/components/playground/PlaygroundStudio.svelte +30 -32
  180. package/dist/components/playground/PlaygroundSurface.svelte +648 -0
  181. package/dist/components/playground/PlaygroundSurface.svelte.d.ts +79 -0
  182. package/dist/components/playground/StepsSummary.svelte +312 -0
  183. package/dist/components/playground/StepsSummary.svelte.d.ts +11 -0
  184. package/dist/components/playground/messageDisplay.d.ts +9 -0
  185. package/dist/components/playground/messageDisplay.js +24 -2
  186. package/dist/components/playground/stepSummary.d.ts +71 -0
  187. package/dist/components/playground/stepSummary.js +152 -0
  188. package/dist/components/ports/PortTypeBadge.svelte +13 -1
  189. package/dist/components/primitives/Button.svelte +226 -0
  190. package/dist/components/primitives/Button.svelte.d.ts +31 -0
  191. package/dist/components/primitives/Card.svelte +110 -0
  192. package/dist/components/primitives/Card.svelte.d.ts +20 -0
  193. package/dist/components/primitives/Checkbox.svelte +126 -0
  194. package/dist/components/primitives/Checkbox.svelte.d.ts +15 -0
  195. package/dist/components/primitives/Chip.svelte +143 -0
  196. package/dist/components/primitives/Chip.svelte.d.ts +22 -0
  197. package/dist/components/primitives/Combobox.svelte +444 -0
  198. package/dist/components/primitives/Combobox.svelte.d.ts +22 -0
  199. package/dist/components/primitives/Composer.svelte +293 -0
  200. package/dist/components/primitives/Composer.svelte.d.ts +47 -0
  201. package/dist/components/primitives/EmptyState.svelte +113 -0
  202. package/dist/components/primitives/EmptyState.svelte.d.ts +18 -0
  203. package/dist/components/primitives/Field.svelte +178 -0
  204. package/dist/components/primitives/Field.svelte.d.ts +30 -0
  205. package/dist/components/primitives/IconButton.svelte +156 -0
  206. package/dist/components/primitives/IconButton.svelte.d.ts +27 -0
  207. package/dist/components/primitives/Menu.svelte +435 -0
  208. package/dist/components/primitives/Menu.svelte.d.ts +61 -0
  209. package/dist/components/primitives/Notice.svelte +161 -0
  210. package/dist/components/primitives/Notice.svelte.d.ts +22 -0
  211. package/dist/components/primitives/PanelHeader.svelte +134 -0
  212. package/dist/components/primitives/PanelHeader.svelte.d.ts +23 -0
  213. package/dist/components/primitives/Segmented.svelte +198 -0
  214. package/dist/components/primitives/Segmented.svelte.d.ts +32 -0
  215. package/dist/components/primitives/Select.svelte +130 -0
  216. package/dist/components/primitives/Select.svelte.d.ts +26 -0
  217. package/dist/components/primitives/StatusPill.svelte +218 -0
  218. package/dist/components/primitives/StatusPill.svelte.d.ts +24 -0
  219. package/dist/components/primitives/Switch.svelte +113 -0
  220. package/dist/components/primitives/Switch.svelte.d.ts +14 -0
  221. package/dist/components/primitives/Tabs.svelte +209 -0
  222. package/dist/components/primitives/Tabs.svelte.d.ts +32 -0
  223. package/dist/components/primitives/Toolbar.svelte +94 -0
  224. package/dist/components/primitives/Toolbar.svelte.d.ts +14 -0
  225. package/dist/components/primitives/ToolbarSeparator.svelte +40 -0
  226. package/dist/components/primitives/ToolbarSeparator.svelte.d.ts +7 -0
  227. package/dist/components/surfaces/SurfaceOverlay.svelte +10 -40
  228. package/dist/components/surfaces/TabbedSurface.svelte +49 -39
  229. package/dist/components/surfaces/TabbedSurface.svelte.d.ts +8 -0
  230. package/dist/components/toast/DismissibleToast.svelte +94 -32
  231. package/dist/components/toast/DismissibleToast.svelte.d.ts +17 -7
  232. package/dist/config/endpoints.d.ts +43 -1
  233. package/dist/config/endpoints.js +21 -3
  234. package/dist/core/index.d.ts +8 -5
  235. package/dist/core/index.js +1 -1
  236. package/dist/editor/connectCandidates.d.ts +56 -0
  237. package/dist/editor/connectCandidates.js +131 -0
  238. package/dist/editor/contextMenu.d.ts +31 -2
  239. package/dist/editor/contextMenu.js +96 -9
  240. package/dist/editor/index.d.ts +4 -1
  241. package/dist/editor/index.js +1 -0
  242. package/dist/editor/interfaceMenu.d.ts +35 -0
  243. package/dist/editor/interfaceMenu.js +47 -0
  244. package/dist/editor/portMenu.d.ts +23 -0
  245. package/dist/editor/portMenu.js +34 -0
  246. package/dist/editor/tidy.d.ts +30 -0
  247. package/dist/editor/tidy.js +66 -0
  248. package/dist/helpers/workflowEditorHelper.d.ts +3 -0
  249. package/dist/helpers/workflowEditorHelper.js +8 -3
  250. package/dist/layout/fromWorkflow.d.ts +42 -0
  251. package/dist/layout/fromWorkflow.js +135 -0
  252. package/dist/layout/geometry.d.ts +102 -0
  253. package/dist/layout/geometry.js +317 -0
  254. package/dist/layout/index.d.ts +21 -0
  255. package/dist/layout/index.js +14 -0
  256. package/dist/layout/inspect.d.ts +18 -0
  257. package/dist/layout/inspect.js +81 -0
  258. package/dist/layout/lanePath.d.ts +23 -0
  259. package/dist/layout/lanePath.js +47 -0
  260. package/dist/layout/measure.d.ts +141 -0
  261. package/dist/layout/measure.js +477 -0
  262. package/dist/layout/primitives.d.ts +124 -0
  263. package/dist/layout/primitives.js +461 -0
  264. package/dist/layout/sweep.d.ts +59 -0
  265. package/dist/layout/sweep.js +257 -0
  266. package/dist/layout/toWorkflow.d.ts +43 -0
  267. package/dist/layout/toWorkflow.js +131 -0
  268. package/dist/layout/types.d.ts +93 -0
  269. package/dist/layout/types.js +35 -0
  270. package/dist/messages/defaults.d.ts +641 -26
  271. package/dist/messages/defaults.js +578 -25
  272. package/dist/messages/types.d.ts +21 -1
  273. package/dist/openapi/v1/openapi.yaml +109 -0
  274. package/dist/playground/index.d.ts +28 -1
  275. package/dist/playground/index.js +29 -0
  276. package/dist/playground/mount.d.ts +28 -2
  277. package/dist/playground/mount.js +41 -15
  278. package/dist/playground/runAction.d.ts +29 -0
  279. package/dist/playground/runAction.js +38 -0
  280. package/dist/services/doctorService.d.ts +52 -0
  281. package/dist/services/doctorService.js +113 -0
  282. package/dist/services/globalSave.js +12 -29
  283. package/dist/services/nodeExecutionService.d.ts +12 -1
  284. package/dist/services/nodeExecutionService.js +58 -58
  285. package/dist/services/playgroundService.d.ts +17 -2
  286. package/dist/services/playgroundService.js +48 -5
  287. package/dist/services/runsService.d.ts +42 -0
  288. package/dist/services/runsService.js +87 -0
  289. package/dist/services/toastQueue.d.ts +33 -0
  290. package/dist/services/toastQueue.js +38 -0
  291. package/dist/services/toastService.d.ts +30 -9
  292. package/dist/services/toastService.js +81 -46
  293. package/dist/settings/index.d.ts +1 -0
  294. package/dist/skins/graphite.d.ts +26 -0
  295. package/dist/skins/graphite.js +473 -0
  296. package/dist/skins/index.d.ts +2 -1
  297. package/dist/skins/index.js +4 -2
  298. package/dist/skins/slate.js +4 -4
  299. package/dist/stores/attachedRunStore.svelte.d.ts +35 -0
  300. package/dist/stores/attachedRunStore.svelte.js +47 -0
  301. package/dist/stores/connectDragStore.svelte.d.ts +39 -0
  302. package/dist/stores/connectDragStore.svelte.js +42 -0
  303. package/dist/stores/doctorStore.svelte.d.ts +79 -0
  304. package/dist/stores/doctorStore.svelte.js +244 -0
  305. package/dist/stores/editedNodesStore.svelte.d.ts +42 -0
  306. package/dist/stores/editedNodesStore.svelte.js +84 -0
  307. package/dist/stores/editorModeStore.svelte.d.ts +34 -0
  308. package/dist/stores/editorModeStore.svelte.js +55 -0
  309. package/dist/stores/instanceContainer.svelte.d.ts +53 -0
  310. package/dist/stores/instanceContainer.svelte.js +38 -1
  311. package/dist/stores/loopbackLanesStore.svelte.d.ts +18 -0
  312. package/dist/stores/loopbackLanesStore.svelte.js +25 -0
  313. package/dist/stores/nodeHighlightStore.svelte.d.ts +34 -0
  314. package/dist/stores/nodeHighlightStore.svelte.js +56 -0
  315. package/dist/stores/playgroundStore.svelte.d.ts +66 -2
  316. package/dist/stores/playgroundStore.svelte.js +164 -2
  317. package/dist/stores/runController.svelte.d.ts +382 -0
  318. package/dist/stores/runController.svelte.js +1217 -0
  319. package/dist/stores/settingsStore.svelte.d.ts +80 -18
  320. package/dist/stores/settingsStore.svelte.js +180 -62
  321. package/dist/stores/workflowStore.svelte.d.ts +14 -0
  322. package/dist/stores/workflowStore.svelte.js +22 -1
  323. package/dist/styles/base.css +286 -25
  324. package/dist/styles/fonts/Inter-LICENSE.txt +93 -0
  325. package/dist/styles/fonts/inter-latin-wght-normal.woff2 +0 -0
  326. package/dist/styles/fonts/inter.css +19 -0
  327. package/dist/styles/toast.css +100 -20
  328. package/dist/styles/tokenAliases.js +118 -1
  329. package/dist/styles/tokens.css +586 -14
  330. package/dist/svelte-app.d.ts +47 -5
  331. package/dist/svelte-app.js +15 -3
  332. package/dist/themes/graphite.d.ts +2 -0
  333. package/dist/themes/graphite.js +15 -0
  334. package/dist/themes/index.d.ts +2 -1
  335. package/dist/themes/index.js +22 -3
  336. package/dist/themes/minimal.js +10 -0
  337. package/dist/themes/scopedSkinCss.d.ts +22 -5
  338. package/dist/themes/scopedSkinCss.js +136 -11
  339. package/dist/types/chat.d.ts +6 -0
  340. package/dist/types/doctor.d.ts +82 -0
  341. package/dist/types/doctor.js +11 -0
  342. package/dist/types/events.d.ts +35 -0
  343. package/dist/types/events.js +4 -1
  344. package/dist/types/index.d.ts +17 -2
  345. package/dist/types/navbar.d.ts +36 -0
  346. package/dist/types/playground.d.ts +75 -0
  347. package/dist/types/settings.d.ts +120 -7
  348. package/dist/types/settings.js +35 -3
  349. package/dist/types/skin.d.ts +21 -8
  350. package/dist/types/theme.d.ts +40 -2
  351. package/dist/utils/appearance.d.ts +19 -0
  352. package/dist/utils/appearance.js +13 -0
  353. package/dist/utils/canvasFit.d.ts +41 -0
  354. package/dist/utils/canvasFit.js +44 -0
  355. package/dist/utils/chipTitles.d.ts +9 -0
  356. package/dist/utils/chipTitles.js +19 -0
  357. package/dist/utils/connections.js +8 -0
  358. package/dist/utils/consoleHighlight.d.ts +28 -0
  359. package/dist/utils/consoleHighlight.js +269 -0
  360. package/dist/utils/deprecation.d.ts +17 -0
  361. package/dist/utils/deprecation.js +29 -0
  362. package/dist/utils/doctorOperations.d.ts +40 -0
  363. package/dist/utils/doctorOperations.js +237 -0
  364. package/dist/utils/duration.d.ts +13 -0
  365. package/dist/utils/duration.js +40 -0
  366. package/dist/utils/inspectorContext.d.ts +19 -0
  367. package/dist/utils/inspectorContext.js +12 -0
  368. package/dist/utils/inspectorSections.d.ts +20 -0
  369. package/dist/utils/inspectorSections.js +44 -0
  370. package/dist/utils/inspectorSurface.d.ts +46 -0
  371. package/dist/utils/inspectorSurface.js +51 -0
  372. package/dist/utils/interfaceTags.d.ts +102 -0
  373. package/dist/utils/interfaceTags.js +211 -0
  374. package/dist/utils/itemRef.d.ts +86 -0
  375. package/dist/utils/itemRef.js +106 -0
  376. package/dist/utils/lastRun.d.ts +35 -0
  377. package/dist/utils/lastRun.js +73 -0
  378. package/dist/utils/messageNodeLink.d.ts +17 -0
  379. package/dist/utils/messageNodeLink.js +16 -0
  380. package/dist/utils/minimapVisibility.d.ts +28 -0
  381. package/dist/utils/minimapVisibility.js +34 -0
  382. package/dist/utils/nodeAriaLabel.d.ts +12 -0
  383. package/dist/utils/nodeAriaLabel.js +17 -0
  384. package/dist/utils/nodeFingerprint.d.ts +27 -0
  385. package/dist/utils/nodeFingerprint.js +66 -0
  386. package/dist/utils/nodeFormSchema.d.ts +10 -0
  387. package/dist/utils/nodeFormSchema.js +2 -2
  388. package/dist/utils/nodeGeometry.d.ts +168 -0
  389. package/dist/utils/nodeGeometry.js +204 -0
  390. package/dist/utils/nodeProblem.d.ts +19 -0
  391. package/dist/utils/nodeProblem.js +9 -0
  392. package/dist/utils/nodeStatus.d.ts +38 -3
  393. package/dist/utils/nodeStatus.js +67 -39
  394. package/dist/utils/nodeSwap.js +9 -1
  395. package/dist/utils/nodeWrapper.d.ts +1 -0
  396. package/dist/utils/playgroundHistory.d.ts +48 -0
  397. package/dist/utils/playgroundHistory.js +38 -0
  398. package/dist/utils/playgroundInputRuns.d.ts +26 -0
  399. package/dist/utils/playgroundInputRuns.js +50 -0
  400. package/dist/utils/portExposure.d.ts +49 -0
  401. package/dist/utils/portExposure.js +122 -0
  402. package/dist/utils/portUtils.d.ts +16 -0
  403. package/dist/utils/portUtils.js +37 -0
  404. package/dist/utils/portal.d.ts +0 -19
  405. package/dist/utils/portal.js +8 -1
  406. package/dist/utils/reservedPorts.d.ts +59 -0
  407. package/dist/utils/reservedPorts.js +60 -0
  408. package/dist/utils/runEdges.d.ts +24 -0
  409. package/dist/utils/runEdges.js +35 -0
  410. package/dist/utils/runsList.d.ts +69 -0
  411. package/dist/utils/runsList.js +134 -0
  412. package/dist/utils/selectOptions.d.ts +62 -0
  413. package/dist/utils/selectOptions.js +137 -0
  414. package/dist/utils/sessionRuns.d.ts +62 -0
  415. package/dist/utils/sessionRuns.js +123 -0
  416. package/dist/utils/sheetWidths.d.ts +29 -0
  417. package/dist/utils/sheetWidths.js +41 -0
  418. package/dist/utils/sidebarWidths.d.ts +34 -0
  419. package/dist/utils/sidebarWidths.js +47 -0
  420. package/dist/utils/straightWires.d.ts +73 -0
  421. package/dist/utils/straightWires.js +99 -0
  422. package/dist/utils/themeScope.svelte.d.ts +10 -0
  423. package/dist/utils/themeScope.svelte.js +80 -0
  424. package/dist/utils/wiredHandles.d.ts +10 -0
  425. package/dist/utils/wiredHandles.js +14 -0
  426. package/dist/utils/workflowDraft.d.ts +9 -0
  427. package/dist/utils/workflowDraft.js +39 -0
  428. package/dist/utils/workflowInterface.d.ts +40 -7
  429. package/dist/utils/workflowInterface.js +66 -16
  430. package/dist/utils/zoomTier.d.ts +43 -0
  431. package/dist/utils/zoomTier.js +107 -0
  432. package/dist/utils/zoomTierRows.d.ts +41 -0
  433. package/dist/utils/zoomTierRows.js +103 -0
  434. package/dist/webmcp/WebMCPConfirm.svelte +1 -1
  435. package/dist/webmcp/bridge.d.ts +5 -0
  436. package/dist/webmcp/bridge.js +8 -0
  437. package/dist/webmcp/bridgeController.svelte.d.ts +84 -0
  438. package/dist/webmcp/bridgeController.svelte.js +224 -0
  439. package/dist/webmcp/descriptors.d.ts +1 -1
  440. package/dist/webmcp/descriptors.js +66 -5
  441. package/dist/webmcp/fakeWidget.d.ts +34 -0
  442. package/dist/webmcp/fakeWidget.js +75 -0
  443. package/dist/webmcp/gate.js +4 -0
  444. package/dist/webmcp/index.d.ts +2 -0
  445. package/dist/webmcp/index.js +1 -0
  446. package/dist/webmcp/runtime.js +4 -1
  447. package/dist/webmcp/types.d.ts +2 -0
  448. package/dist/webmcp/validate.js +5 -1
  449. package/package.json +8 -2
  450. package/dist/components/Select.svelte +0 -53
  451. package/dist/components/Select.svelte.d.ts +0 -15
  452. package/dist/components/icons/CommandLineIcon.svelte +0 -15
  453. package/dist/components/icons/CommandLineIcon.svelte.d.ts +0 -26
  454. package/dist/components/toast/WarningIcon.svelte +0 -28
  455. package/dist/components/toast/WarningIcon.svelte.d.ts +0 -26
@@ -531,6 +531,11 @@ export interface ExternalEditLink {
531
531
  * Optional tooltip/description for the link
532
532
  */
533
533
  description?: string;
534
+ /**
535
+ * Display name of the thing the link opens (e.g. the sub-workflow a node runs).
536
+ * When set the inspector shows "Runs <targetName> ↗" instead of the label.
537
+ */
538
+ targetName?: string;
534
539
  /**
535
540
  * Callback URL parameter name for FlowDrop to receive updates
536
541
  * If set, the external form should redirect back with config updates
@@ -1261,7 +1266,13 @@ export interface WorkflowNode extends Node {
1261
1266
  isProcessing?: boolean;
1262
1267
  /** Error message if the node execution failed */
1263
1268
  error?: string;
1264
- /** Node execution tracking information */
1269
+ /**
1270
+ * Node execution tracking information.
1271
+ *
1272
+ * @deprecated Run status lives in the instance's `fd.playground.nodeStatuses`
1273
+ * (keyed by node id), which the node overlay reads first. Still read as a
1274
+ * fallback, but never saved, exported or kept across edits. Removed in 3.0.
1275
+ */
1265
1276
  executionInfo?: NodeExecutionInfo;
1266
1277
  /**
1267
1278
  * Per-instance extension properties for 3rd party integrations
@@ -1605,6 +1616,10 @@ export interface NodeJobExecution {
1605
1616
  executionTimeUs?: number;
1606
1617
  /** Error message if the job failed */
1607
1618
  error?: string;
1619
+ /** What the job was given (the pipeline payload's `input_data`), when the backend sends it */
1620
+ input?: unknown;
1621
+ /** What the job produced (`output_data`), when the backend sends it */
1622
+ output?: unknown;
1608
1623
  }
1609
1624
  /**
1610
1625
  * Node execution tracking information
@@ -1696,7 +1711,7 @@ export interface WorkflowEvents {
1696
1711
  }
1697
1712
  export type { AuthProvider, StaticAuthConfig, CallbackAuthConfig } from './auth.js';
1698
1713
  export { StaticAuthProvider, CallbackAuthProvider, NoAuthProvider } from './auth.js';
1699
- export type { FlowDropSettings, ThemeSettings, EditorSettings, UISettings, BehaviorSettings, ApiSettings, ThemePreference, ResolvedTheme, SettingsCategory, PartialSettings, SyncStatus, SettingsStoreState, SettingsChangeEvent, SettingsChangeCallback } from './settings.js';
1714
+ export type { FlowDropSettings, ThemeSettings, EditorSettings, UISettings, BehaviorSettings, ApiSettings, ThemePreference, ResolvedTheme, ColorSchemeOption, HostColorSchemeValue, SettingsCategory, PartialSettings, SyncStatus, SettingsStoreState, SettingsChangeEvent, SettingsChangeCallback } from './settings.js';
1700
1715
  export { DEFAULT_SETTINGS, DEFAULT_THEME_SETTINGS, DEFAULT_EDITOR_SETTINGS, DEFAULT_UI_SETTINGS, DEFAULT_BEHAVIOR_SETTINGS, DEFAULT_API_SETTINGS, SETTINGS_CATEGORIES, SETTINGS_CATEGORY_LABELS, SETTINGS_CATEGORY_ICONS, SETTINGS_STORAGE_KEY } from './settings.js';
1701
1716
  export type { UISchemaElementType, UISchemaElementBase, UISchemaControl, UISchemaVerticalLayout, UISchemaGroup, UISchemaElement } from './uischema.js';
1702
1717
  export { isUISchemaControl, isUISchemaVerticalLayout, isUISchemaGroup } from './uischema.js';
@@ -1,3 +1,4 @@
1
+ import type { Component } from 'svelte';
1
2
  /**
2
3
  * Navbar action button configuration.
3
4
  *
@@ -18,4 +19,39 @@ export interface NavbarAction {
18
19
  * navbar is in split mode (the inline row of buttons).
19
20
  */
20
21
  group?: string;
22
+ /**
23
+ * The action goes somewhere else in the app (a dashboard, the workflow list)
24
+ * instead of doing something to this workflow. Navigation actions are listed in
25
+ * the menu of the wordmark, not in the Save menu. Ignored in split mode, and
26
+ * when `branding.href` already makes the wordmark a link.
27
+ */
28
+ navigation?: boolean;
29
+ }
30
+ /**
31
+ * White-label branding for the navbar's start slot.
32
+ *
33
+ * When set, it replaces the built-in FlowDrop wordmark. Only the logo and its
34
+ * name are brandable; the rest of the chrome is not.
35
+ */
36
+ export interface NavbarBranding {
37
+ /**
38
+ * Product name shown in the chrome in place of "FlowDrop": the page `<title>`
39
+ * (`{name} - {tagline}`), the default wordmark's accessible name and title, and
40
+ * the default for `logoAlt`. Precedence: `logoAlt` > `name` > the
41
+ * `navigation.appName` message.
42
+ */
43
+ name?: string;
44
+ /**
45
+ * The logo. A string is an image URL, rendered as an `<img>` scaled to fit the
46
+ * 48 px navbar (max height 24 px, width auto, clamped to the start column).
47
+ * A Svelte component is rendered in place and must size itself to the same box.
48
+ */
49
+ logo?: string | Component;
50
+ /**
51
+ * Accessible name for the logo (the `<img>` alt text, or the label of a
52
+ * component logo). Defaults to `name`, then the `navigation.appName` message.
53
+ */
54
+ logoAlt?: string;
55
+ /** Wraps the logo in a link to this URL. The built-in wordmark is not linked. */
56
+ href?: string;
21
57
  }
@@ -71,6 +71,65 @@ export interface PlaygroundExecution {
71
71
  */
72
72
  isSubflow?: boolean;
73
73
  }
74
+ /**
75
+ * One run a session started, as the session runs endpoint reports it.
76
+ *
77
+ * `workflowVersion` is an opaque string: equal means no node config, edge,
78
+ * interface port or third-party setting changed between two runs. `null`
79
+ * means unknown (older run, or a run the session did not start) and is never
80
+ * treated as stale.
81
+ */
82
+ export interface SessionRun {
83
+ /** Pipeline id (the execution id of the run's messages) */
84
+ id: string;
85
+ startedAt: string | null;
86
+ completedAt: string | null;
87
+ /** Pipeline status, or `unknown` when the pipeline is gone */
88
+ status: string;
89
+ workflowVersion: string | null;
90
+ /** The person's message that started the run (cut by the server) */
91
+ message: string | null;
92
+ /** The named inputs the turn started with, bounded by the server */
93
+ inputs: Record<string, unknown>;
94
+ /** Whether anything in `inputs` was cut */
95
+ inputsTruncated: boolean;
96
+ }
97
+ /** The session runs endpoint's `data`: the runs, oldest first, and the current version. */
98
+ export interface SessionRunsResult {
99
+ /** The session's workflow as it is now; `null` when the workflow is gone */
100
+ workflowVersion: string | null;
101
+ runs: SessionRun[];
102
+ }
103
+ /** Response of `GET /sessions/{id}/runs`. */
104
+ export type SessionRunsResponse = PlaygroundApiResponse<SessionRunsResult>;
105
+ /**
106
+ * Where a "Saved, new version" divider sits in the conversation feed.
107
+ * - `before-run`: above the first message of a run (reconstructed from the
108
+ * runs endpoint, where consecutive runs' versions differ);
109
+ * - `after-message`: below a message (added when the workflow is saved while
110
+ * a conversation is open);
111
+ * - `end`: below the last message (the workflow changed since the last run).
112
+ */
113
+ export type VersionDividerAnchor = {
114
+ kind: 'before-run';
115
+ runId: string;
116
+ } | {
117
+ kind: 'after-message';
118
+ messageId: string;
119
+ } | {
120
+ kind: 'end';
121
+ };
122
+ /** A divider in the conversation feed marking a new workflow version. */
123
+ export interface VersionDivider {
124
+ id: string;
125
+ anchor: VersionDividerAnchor;
126
+ }
127
+ /**
128
+ * Third-party settings on a session, keyed by the module that owns them: the
129
+ * wire shape of the server's session third-party settings. The Playground
130
+ * reads its own key (see {@link PLAYGROUND_SESSION_MARK}).
131
+ */
132
+ export type SessionThirdPartySettings = Record<string, Record<string, unknown>>;
74
133
  /**
75
134
  * Playground session representing a test conversation
76
135
  *
@@ -111,6 +170,13 @@ export interface PlaygroundSession {
111
170
  executions?: PlaygroundExecution[];
112
171
  /** Custom session metadata */
113
172
  metadata?: Record<string, unknown>;
173
+ /**
174
+ * Third-party settings the modules that created or used the session keep on
175
+ * it. A server that exposes them sends the key on every session (an empty
176
+ * map for a session nobody stamped); a server that does not leaves it out,
177
+ * which is how the client tells "unmarked" from "cannot tell".
178
+ */
179
+ thirdPartySettings?: SessionThirdPartySettings;
114
180
  }
115
181
  /**
116
182
  * Message metadata containing additional context
@@ -490,6 +556,15 @@ export interface PlaygroundConfig {
490
556
  */
491
557
  isTerminalStatus?: (status: PlaygroundSessionStatus) => boolean;
492
558
  }
559
+ /**
560
+ * The part of {@link PlaygroundConfig} that steers how the editor's Test mode
561
+ * follows a run: how often it polls and when it stops. Passed to the editor as
562
+ * the `playground` mount option. Not set, the defaults apply (poll every 1500 ms, stop on
563
+ * `idle` only).
564
+ *
565
+ * `isTerminalStatus` is not offered: nothing in the editor reads it.
566
+ */
567
+ export type EditorPlaygroundConfig = Pick<PlaygroundConfig, 'pollingInterval' | 'shouldStopPolling'>;
493
568
  /**
494
569
  * Metadata field to control Run button state from backend.
495
570
  * When a message contains this field set to true, the Run button becomes enabled.
@@ -6,13 +6,51 @@
6
6
  *
7
7
  * @module types/settings
8
8
  */
9
+ import { type ZoomTierConfig } from '../utils/zoomTier.js';
9
10
  /**
10
11
  * Theme preference options
11
12
  * - 'light': Force light theme
12
13
  * - 'dark': Force dark theme
13
14
  * - 'auto': Follow system preference
15
+ * - 'host': Follow the colour scheme the embedding page reports through the
16
+ * `colorScheme.host` mount option. Only exists when that option is given;
17
+ * without it a stored `'host'` behaves as `'auto'`.
14
18
  */
15
- export type ThemePreference = 'light' | 'dark' | 'auto';
19
+ export type ThemePreference = 'light' | 'dark' | 'auto' | 'host';
20
+ /**
21
+ * What an embedding page reports as its own colour scheme. `'auto'` means
22
+ * "follow the operating system" and is resolved by FlowDrop itself.
23
+ */
24
+ export type HostColorSchemeValue = 'light' | 'dark' | 'auto';
25
+ /**
26
+ * Mount option: lets the embedding page supply a fourth colour-scheme choice
27
+ * ("follow the host"). FlowDrop knows nothing about the host: it shows `label`
28
+ * verbatim and resolves `value`.
29
+ *
30
+ * ```ts
31
+ * colorScheme: {
32
+ * host: {
33
+ * value: 'dark', // what the host resolves to right now
34
+ * label: 'Match host', // shown verbatim in the Appearance menu / settings
35
+ * subscribe: (cb) => { ...; return () => {...}; } // optional, live changes
36
+ * }
37
+ * }
38
+ * ```
39
+ *
40
+ * When given, `'host'` becomes the default preference (a saved preference that
41
+ * the user never changed is migrated to it; an explicit Light or Dark is kept).
42
+ * Without it nothing changes: Auto / Light / Dark only.
43
+ */
44
+ export interface ColorSchemeOption {
45
+ host: {
46
+ /** The host's colour scheme right now. */
47
+ value: HostColorSchemeValue;
48
+ /** Name of the choice, shown verbatim (translate it in the host). */
49
+ label: string;
50
+ /** Optional live updates; returns the unsubscribe function. */
51
+ subscribe?: (callback: (value: HostColorSchemeValue) => void) => () => void;
52
+ };
53
+ }
16
54
  /**
17
55
  * Resolved theme (actual applied theme, never 'auto')
18
56
  */
@@ -23,6 +61,12 @@ export type ResolvedTheme = 'light' | 'dark';
23
61
  export interface ThemeSettings {
24
62
  /** User's theme preference */
25
63
  preference: ThemePreference;
64
+ /**
65
+ * Set once the user has picked a colour scheme (navbar menu or settings).
66
+ * Lets FlowDrop tell a saved `'auto'` that was only ever the default (migrated
67
+ * to `'host'` when a host scheme is given) from one the user chose.
68
+ */
69
+ explicit?: boolean;
26
70
  }
27
71
  /**
28
72
  * Editor canvas and interaction settings
@@ -34,6 +78,16 @@ export interface EditorSettings {
34
78
  snapToGrid: boolean;
35
79
  /** Grid cell size in pixels */
36
80
  gridSize: number;
81
+ /**
82
+ * Layout gap between cards side by side, in pixels (Tidy up and the `layout`
83
+ * commands). A multiple of the 20 px layout grid; default {@link DEFAULT_LAYOUT_GAP_X}.
84
+ */
85
+ layoutGapX: number;
86
+ /**
87
+ * Layout gap between stacked cards, in pixels (Tidy up and the `layout`
88
+ * commands). A multiple of the 20 px layout grid; default {@link DEFAULT_LAYOUT_GAP_Y}.
89
+ */
90
+ layoutGapY: number;
37
91
  /** Show minimap for navigation */
38
92
  showMinimap: boolean;
39
93
  /** Default zoom level (1 = 100%) */
@@ -44,6 +98,23 @@ export interface EditorSettings {
44
98
  proximityConnect: boolean;
45
99
  /** Distance threshold in pixels for proximity connect */
46
100
  proximityConnectDistance: number;
101
+ /**
102
+ * Show each node's description as a band under its header. Off by default:
103
+ * the description lives in the title popover and the inspector, and port help
104
+ * in the port tooltip. On, the band is 60px and reserved on every node, so
105
+ * ports keep their relative positions and wires stay straight.
106
+ */
107
+ showNodeDescriptions: boolean;
108
+ /**
109
+ * The zoom tiers of the canvas: for each tier that is on, the zoom at which it
110
+ * starts (1 = 100%). A tier left out is off. `full` is required and
111
+ * `{ full: 0 }` means no tiers, the whole card at every zoom. Values must
112
+ * decrease in the order full, outline, glyph, map; the lowest tier that is on
113
+ * extends down to any zoom. An invalid value falls back to the library
114
+ * default with one console warning. The setting is replaced as a whole, never
115
+ * merged key by key.
116
+ */
117
+ zoomTiers: ZoomTierConfig;
47
118
  }
48
119
  /**
49
120
  * Where an auxiliary surface (config panel, console/chat) is hosted.
@@ -61,23 +132,47 @@ export type SurfacePlacement = 'sidebar' | 'modal' | 'below';
61
132
  * UI layout and display settings
62
133
  */
63
134
  export interface UISettings {
64
- /** Width of the node sidebar in pixels */
135
+ /**
136
+ * Width of the node sidebar in pixels.
137
+ * @deprecated Superseded by `sidebarWidths.nodes`; still read as its fallback.
138
+ */
65
139
  sidebarWidth: number;
140
+ /**
141
+ * Width of the left column per tab, in pixels. Saved when a drag or an
142
+ * arrow-key resize ends. Read it through `resolveSidebarWidths`, which
143
+ * clamps and fills in a missing tab.
144
+ */
145
+ sidebarWidths: {
146
+ nodes: number;
147
+ assistant: number;
148
+ };
149
+ /**
150
+ * Width of the floating sheets, in pixels. Only the workflow-settings sheet
151
+ * is resizable; saved when a drag or an arrow-key resize ends. Read it
152
+ * through `resolveWorkflowSheetWidth`, which clamps it.
153
+ */
154
+ sheetWidths: {
155
+ workflow: number;
156
+ };
66
157
  /** Whether the sidebar is collapsed */
67
158
  sidebarCollapsed: boolean;
68
159
  /** Enable compact mode for denser UI */
69
160
  compactMode: boolean;
70
161
  /** Active theme name — overridden by the theme prop when explicitly provided */
71
- theme: 'default' | 'minimal' | 'drafter';
162
+ theme: 'default' | 'minimal' | 'drafter' | 'graphite';
72
163
  /** Whether the command console panel is open */
73
164
  consoleOpen: boolean;
74
- /** Height of the command console panel in pixels */
165
+ /** Height of the command console panel in pixels (opens at 220, saved on resize) */
75
166
  consoleHeight: number;
76
- /** Active tab in the bottom panel */
167
+ /**
168
+ * Active tab in the console group. `chat` is kept for stored settings: the
169
+ * Assistant is a tab beside Nodes in Edit mode's left slot now, and only
170
+ * stays in this group on a host that disabled the sidebar.
171
+ */
77
172
  bottomPanelTab: 'console' | 'chat';
78
173
  /** Where the node/workflow configuration panel is hosted. Default `sidebar`. */
79
174
  configPlacement: SurfacePlacement;
80
- /** Where the console / AI Assistant group is hosted. Default `below`. */
175
+ /** Where the Command Console is hosted. Default `below`. (The Assistant lives in the left slot.) */
81
176
  consolePlacement: SurfacePlacement;
82
177
  }
83
178
  /**
@@ -126,7 +221,7 @@ export interface BehaviorSettings {
126
221
  chatAutoRetry: boolean;
127
222
  /**
128
223
  * Allow the AI assistant's commands to reposition nodes
129
- * (`layout auto`, `layout beautify`).
224
+ * (`layout auto`, `layout beautify`, `layout node beautify`).
130
225
  *
131
226
  * Turn off to protect a hand-crafted layout: those commands are then skipped
132
227
  * (not failed) when a batch is applied, so the rest of the change set still
@@ -184,6 +279,24 @@ export declare const SETTINGS_CATEGORY_ICONS: Record<SettingsCategory, string>;
184
279
  * Default theme settings
185
280
  */
186
281
  export declare const DEFAULT_THEME_SETTINGS: ThemeSettings;
282
+ /**
283
+ * The grid sizes the editor offers (px). Both divide 20, the unit every node
284
+ * card's handle offsets are a multiple of, so wires can always be made straight.
285
+ * @see Graphite G8, decision D3
286
+ */
287
+ export declare const GRID_SIZES: readonly [10, 20];
288
+ /**
289
+ * Any stored grid size that is not one of {@link GRID_SIZES} becomes 20.
290
+ * Applied wherever settings are merged (saved snapshot, host defaults, API).
291
+ */
292
+ export declare function normalizeGridSize(value: unknown): number;
293
+ /**
294
+ * A layout gap as the editor stores it: a number of at least 0, rounded to a
295
+ * multiple of the 20 px layout grid (layout always snaps to it, whatever the
296
+ * editor's grid size), the same rule the `--gap-x` / `--gap-y` flags enforce.
297
+ * Anything that is not a finite number becomes `fallback`.
298
+ */
299
+ export declare function normalizeLayoutGap(value: unknown, fallback: number): number;
187
300
  /**
188
301
  * Default editor settings
189
302
  */
@@ -6,6 +6,8 @@
6
6
  *
7
7
  * @module types/settings
8
8
  */
9
+ import { DEFAULT_ZOOM_TIERS } from '../utils/zoomTier.js';
10
+ import { DEFAULT_LAYOUT_GAP_X, DEFAULT_LAYOUT_GAP_Y, LAYOUT_GRID } from '../layout/types.js';
9
11
  /**
10
12
  * All available settings categories
11
13
  */
@@ -39,6 +41,30 @@ export const SETTINGS_CATEGORY_ICONS = {
39
41
  export const DEFAULT_THEME_SETTINGS = {
40
42
  preference: 'light'
41
43
  };
44
+ /**
45
+ * The grid sizes the editor offers (px). Both divide 20, the unit every node
46
+ * card's handle offsets are a multiple of, so wires can always be made straight.
47
+ * @see Graphite G8, decision D3
48
+ */
49
+ export const GRID_SIZES = [10, 20];
50
+ /**
51
+ * Any stored grid size that is not one of {@link GRID_SIZES} becomes 20.
52
+ * Applied wherever settings are merged (saved snapshot, host defaults, API).
53
+ */
54
+ export function normalizeGridSize(value) {
55
+ return GRID_SIZES.includes(value) ? value : 20;
56
+ }
57
+ /**
58
+ * A layout gap as the editor stores it: a number of at least 0, rounded to a
59
+ * multiple of the 20 px layout grid (layout always snaps to it, whatever the
60
+ * editor's grid size), the same rule the `--gap-x` / `--gap-y` flags enforce.
61
+ * Anything that is not a finite number becomes `fallback`.
62
+ */
63
+ export function normalizeLayoutGap(value, fallback) {
64
+ if (typeof value !== 'number' || !Number.isFinite(value))
65
+ return fallback;
66
+ return Math.max(0, Math.round(value / LAYOUT_GRID) * LAYOUT_GRID);
67
+ }
42
68
  /**
43
69
  * Default editor settings
44
70
  */
@@ -46,22 +72,28 @@ export const DEFAULT_EDITOR_SETTINGS = {
46
72
  showGrid: true,
47
73
  snapToGrid: true,
48
74
  gridSize: 20,
75
+ layoutGapX: DEFAULT_LAYOUT_GAP_X,
76
+ layoutGapY: DEFAULT_LAYOUT_GAP_Y,
49
77
  showMinimap: true,
50
78
  defaultZoom: 1,
51
79
  fitViewOnLoad: true,
52
80
  proximityConnect: false,
53
- proximityConnectDistance: 150
81
+ proximityConnectDistance: 150,
82
+ showNodeDescriptions: false,
83
+ zoomTiers: { ...DEFAULT_ZOOM_TIERS }
54
84
  };
55
85
  /**
56
86
  * Default UI settings
57
87
  */
58
88
  export const DEFAULT_UI_SETTINGS = {
59
89
  sidebarWidth: 280,
90
+ sidebarWidths: { nodes: 280, assistant: 380 },
91
+ sheetWidths: { workflow: 420 },
60
92
  sidebarCollapsed: false,
61
93
  compactMode: false,
62
- theme: 'default',
94
+ theme: 'graphite',
63
95
  consoleOpen: false,
64
- consoleHeight: 300,
96
+ consoleHeight: 220,
65
97
  bottomPanelTab: 'console',
66
98
  configPlacement: 'sidebar',
67
99
  consolePlacement: 'below'
@@ -2,13 +2,17 @@ export interface FlowDropSkinTokens {
2
2
  /** Keys are --fd-* token names without the prefix, values are CSS values.
3
3
  * e.g. { 'radius-md': '4px', 'primary': '#8b5cf6' }
4
4
  *
5
- * Display-control tokens (toggle visual variants via CSS):
6
- * 'node-icon-display' — 'flex' | 'none' (squircle icon wrapper)
7
- * 'node-circle-display' — 'flex' | 'none' (circle dot)
8
- * 'sidebar-search-display' — 'flex' | 'none'
9
- * 'sidebar-header-display' — 'flex' | 'none'
10
- * 'sidebar-card-display' — 'block' | 'none' (accordion card list)
11
- * 'sidebar-flat-display' — 'block' | 'none' (flat dot-name list)
5
+ * Display-control tokens (toggle visual variants via CSS).
6
+ * @deprecated Set `FlowDropThemeConfig.display` instead (typed, and kept out of
7
+ * the look). The tokens still work as a fallback until 3.0:
8
+ * 'node-icon-display' — 'flex' | 'none' (squircle icon wrapper) → display.nodeIcon
9
+ * 'node-circle-display' — 'flex' | 'none' (circle dot) → display.nodeIcon
10
+ * 'sidebar-search-display' — 'flex' | 'none' → display.sidebarSearch
11
+ * 'sidebar-header-display' — 'flex' | 'none' → display.sidebarHeader
12
+ * 'sidebar-card-display' — 'block' | 'none' (accordion card list) → display.sidebarList
13
+ * 'sidebar-flat-display' — 'block' | 'none' (flat dot-name list) → display.sidebarList
14
+ * 'navbar-split-display' — 'flex' | 'none' → display.navbarActions
15
+ * 'navbar-dropdown-display'— 'flex' | 'none' → display.navbarActions
12
16
  *
13
17
  * Port color token:
14
18
  * 'port-skin-color' — when set, overrides all port handle colors (e.g. 'var(--fd-muted-foreground)')
@@ -23,9 +27,18 @@ export interface FlowDropSkin {
23
27
  * <App skin={{ name: 'minimal', tokens: { primary: '#e11d48' } }} />
24
28
  */
25
29
  name?: FlowDropSkinName | (string & {});
30
+ /**
31
+ * Font family for the editor, as a CSS `font-family` value, e.g.
32
+ * `"'Inter Variable', system-ui, sans-serif"`. Sets `--fd-font-sans` on the
33
+ * editor's scope element and applies it to the editor subtree (including its
34
+ * portalled overlays). The skin only names the family: it does not load it,
35
+ * the host page (or the Drupal library) must provide the @font-face.
36
+ * Unset (default): the editor inherits the host page's font, as before.
37
+ */
38
+ font?: string;
26
39
  /** CSS token overrides injected on the editor's own scope element (not :root) — active in light mode (and as base) */
27
40
  tokens?: FlowDropSkinTokens;
28
41
  /** CSS token overrides injected under [data-theme='dark'] on the editor's scope element — active in dark mode only */
29
42
  darkTokens?: FlowDropSkinTokens;
30
43
  }
31
- export type FlowDropSkinName = 'default' | 'slate' | 'drafter';
44
+ export type FlowDropSkinName = 'default' | 'slate' | 'drafter' | 'graphite';
@@ -9,11 +9,49 @@ import type { FlowDropSkin } from './skin.js';
9
9
  * so any skin can recolor whichever variant a theme chooses.
10
10
  */
11
11
  export type FlowDropGridVariant = 'dots' | 'lines' | 'cross';
12
+ /**
13
+ * Structural layout switches: which variant of a piece of chrome the editor
14
+ * shows. They are structure, not colour, so they belong to the theme's
15
+ * config and not to a skin's tokens. Every field is optional; an unset field
16
+ * falls back to the deprecated `--fd-*-display` token (so CSS written for
17
+ * 2.x keeps working until 3.0) and then to the built-in default.
18
+ */
19
+ export interface FlowDropDisplayConfig {
20
+ /** Node icon: a rounded-square icon wrapper ('squircle', default) or a small colour dot ('dot'). */
21
+ nodeIcon?: 'squircle' | 'dot';
22
+ /**
23
+ * Sidebar node list: accordion cards per category ('cards', default), a flat
24
+ * dot-and-name list ('flat'), or quiet 32px category rows with the nodes
25
+ * indented under the open one ('rows').
26
+ */
27
+ sidebarList?: 'cards' | 'flat' | 'rows';
28
+ /** Show the sidebar search input. Defaults to true. */
29
+ sidebarSearch?: boolean;
30
+ /** Show the sidebar "Components" header. Defaults to true. */
31
+ sidebarHeader?: boolean;
32
+ /**
33
+ * Node detail on the canvas: 'full' (default) shows each node's description under its title;
34
+ * 'compact' hides it (it stays in the hover tooltip and the inspector) and shortens the header
35
+ * by one grid row. The user's "Compact Mode" setting turns it on for any theme.
36
+ */
37
+ nodeDetails?: 'full' | 'compact';
38
+ /** Navbar actions: a primary action plus a dropdown ('dropdown', default) or all actions as separate buttons ('split'). */
39
+ navbarActions?: 'dropdown' | 'split';
40
+ /**
41
+ * Message anatomy in the Playground and the AI Assistant: bubbles with avatars and
42
+ * role labels ('bubbles', default), or a document ('document'): your own messages
43
+ * as a right-aligned bubble, replies as plain full-width text with one meta line
44
+ * (origin node, time) under them, no avatars, no role labels.
45
+ */
46
+ messages?: 'bubbles' | 'document';
47
+ }
12
48
  /**
13
49
  * Behavioral configuration bundled with a theme.
14
50
  * These are initial-state flags, not CSS — they control runtime defaults.
15
51
  */
16
52
  export interface FlowDropThemeConfig {
53
+ /** Layout switches that used to be skin tokens (`--fd-node-icon-display` and friends). */
54
+ display?: FlowDropDisplayConfig;
17
55
  sidebar?: {
18
56
  /** Whether the sidebar starts open. Defaults to true. */
19
57
  defaultOpen?: boolean;
@@ -28,7 +66,7 @@ export interface FlowDropThemeConfig {
28
66
  /**
29
67
  * A FlowDrop theme bundles a visual skin (CSS tokens) with UI config (behavioral defaults).
30
68
  *
31
- * Built-in themes: 'default' | 'minimal' | 'drafter'
69
+ * Built-in themes: 'default' | 'minimal' | 'drafter' | 'graphite'
32
70
  *
33
71
  * @example
34
72
  * // Use a built-in theme by name
@@ -46,4 +84,4 @@ export interface FlowDropTheme {
46
84
  /** Behavioral configuration defaults */
47
85
  config?: FlowDropThemeConfig;
48
86
  }
49
- export type FlowDropThemeName = 'default' | 'minimal' | 'drafter';
87
+ export type FlowDropThemeName = 'default' | 'minimal' | 'drafter' | 'graphite';
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The colour-scheme choices FlowDrop offers, one list for the navbar gear menu
3
+ * and the settings dialog.
4
+ *
5
+ * With a host scheme (mount option `colorScheme.host`): the host's label,
6
+ * Light, Dark. Without: Light, Dark, System, as before the option existed.
7
+ */
8
+ import type { ThemePreference } from '../types/settings.js';
9
+ export interface AppearanceChoice {
10
+ value: ThemePreference;
11
+ label: string;
12
+ }
13
+ export declare function appearanceChoices(host: {
14
+ label: string;
15
+ } | null, labels: {
16
+ light: string;
17
+ dark: string;
18
+ system: string;
19
+ }): AppearanceChoice[];
@@ -0,0 +1,13 @@
1
+ export function appearanceChoices(host, labels) {
2
+ return host
3
+ ? [
4
+ { value: 'host', label: host.label },
5
+ { value: 'light', label: labels.light },
6
+ { value: 'dark', label: labels.dark }
7
+ ]
8
+ : [
9
+ { value: 'light', label: labels.light },
10
+ { value: 'dark', label: labels.dark },
11
+ { value: 'auto', label: labels.system }
12
+ ];
13
+ }
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Fit-view padding for the editor canvas.
3
+ *
4
+ * The canvas toolbar (Edit | Test, run pill) floats over the top-left and the
5
+ * zoom control over the bottom-left, so a plain fraction lets fit view tuck the
6
+ * first or last node underneath them. Pixels clear the overlays; the fraction
7
+ * keeps the sides breathing as before.
8
+ *
9
+ * @internal
10
+ */
11
+ import type { FitViewOptions } from '@xyflow/svelte';
12
+ export declare const CANVAS_FIT_PADDING: NonNullable<FitViewOptions['padding']>;
13
+ /** A box in flow coordinates. */
14
+ export interface FitBox {
15
+ x: number;
16
+ y: number;
17
+ width: number;
18
+ height: number;
19
+ }
20
+ /** Breathing room between the fitted graph and an open sheet, in px. */
21
+ export declare const FIT_SHEET_GAP = 16;
22
+ /**
23
+ * Bounds of the nodes plus the room their interface tags take beside them.
24
+ *
25
+ * A tag sits outside its node, to the left of an input and to the right of an
26
+ * output; `reserve` (`interfaceTagReserve`) says how far each node's tags
27
+ * reach. Without this a fit view clips the outermost tags at the viewport
28
+ * edge. Returns `null` when there are no boxes.
29
+ */
30
+ export declare function boundsWithTags(boxes: ReadonlyArray<FitBox & {
31
+ id: string;
32
+ }>, reserve?: ReadonlyMap<string, {
33
+ left: number;
34
+ right: number;
35
+ }>): FitBox | null;
36
+ /**
37
+ * Fit padding that also keeps clear of an open sheet on the right edge.
38
+ * `rightInset` is how much of the canvas's right side the sheet covers (px);
39
+ * with none the padding is the plain `CANVAS_FIT_PADDING`.
40
+ */
41
+ export declare function fitPadding(rightInset?: number): NonNullable<FitViewOptions['padding']>;