@foresthubai/workflow-builder 0.3.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 (496) hide show
  1. package/LICENSE +661 -0
  2. package/NOTICE +16 -0
  3. package/README.md +93 -0
  4. package/dist/BuilderLayout.d.ts +34 -0
  5. package/dist/BuilderLayout.d.ts.map +1 -0
  6. package/dist/BuilderLayout.js +172 -0
  7. package/dist/BuilderLayout.js.map +1 -0
  8. package/dist/Canvas.d.ts +23 -0
  9. package/dist/Canvas.d.ts.map +1 -0
  10. package/dist/Canvas.js +141 -0
  11. package/dist/Canvas.js.map +1 -0
  12. package/dist/CanvasEditor.d.ts +46 -0
  13. package/dist/CanvasEditor.d.ts.map +1 -0
  14. package/dist/CanvasEditor.js +57 -0
  15. package/dist/CanvasEditor.js.map +1 -0
  16. package/dist/CanvasTabsToolbar.d.ts +11 -0
  17. package/dist/CanvasTabsToolbar.d.ts.map +1 -0
  18. package/dist/CanvasTabsToolbar.js +101 -0
  19. package/dist/CanvasTabsToolbar.js.map +1 -0
  20. package/dist/RightConfigPanel.d.ts +27 -0
  21. package/dist/RightConfigPanel.d.ts.map +1 -0
  22. package/dist/RightConfigPanel.js +102 -0
  23. package/dist/RightConfigPanel.js.map +1 -0
  24. package/dist/WorkflowBuilder.d.ts +62 -0
  25. package/dist/WorkflowBuilder.d.ts.map +1 -0
  26. package/dist/WorkflowBuilder.js +275 -0
  27. package/dist/WorkflowBuilder.js.map +1 -0
  28. package/dist/cn.d.ts +3 -0
  29. package/dist/cn.d.ts.map +1 -0
  30. package/dist/cn.js +6 -0
  31. package/dist/cn.js.map +1 -0
  32. package/dist/components/ui/add-button.d.ts +16 -0
  33. package/dist/components/ui/add-button.d.ts.map +1 -0
  34. package/dist/components/ui/add-button.js +21 -0
  35. package/dist/components/ui/add-button.js.map +1 -0
  36. package/dist/components/ui/alert-dialog.d.ts +21 -0
  37. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  38. package/dist/components/ui/alert-dialog.js +30 -0
  39. package/dist/components/ui/alert-dialog.js.map +1 -0
  40. package/dist/components/ui/alert.d.ts +9 -0
  41. package/dist/components/ui/alert.d.ts.map +1 -0
  42. package/dist/components/ui/alert.js +23 -0
  43. package/dist/components/ui/alert.js.map +1 -0
  44. package/dist/components/ui/badge.d.ts +10 -0
  45. package/dist/components/ui/badge.d.ts.map +1 -0
  46. package/dist/components/ui/badge.js +21 -0
  47. package/dist/components/ui/badge.js.map +1 -0
  48. package/dist/components/ui/button.d.ts +13 -0
  49. package/dist/components/ui/button.d.ts.map +1 -0
  50. package/dist/components/ui/button.js +40 -0
  51. package/dist/components/ui/button.js.map +1 -0
  52. package/dist/components/ui/card.d.ts +9 -0
  53. package/dist/components/ui/card.d.ts.map +1 -0
  54. package/dist/components/ui/card.js +17 -0
  55. package/dist/components/ui/card.js.map +1 -0
  56. package/dist/components/ui/checkbox.d.ts +5 -0
  57. package/dist/components/ui/checkbox.d.ts.map +1 -0
  58. package/dist/components/ui/checkbox.js +9 -0
  59. package/dist/components/ui/checkbox.js.map +1 -0
  60. package/dist/components/ui/collapsible.d.ts +6 -0
  61. package/dist/components/ui/collapsible.d.ts.map +1 -0
  62. package/dist/components/ui/collapsible.js +6 -0
  63. package/dist/components/ui/collapsible.js.map +1 -0
  64. package/dist/components/ui/command.d.ts +82 -0
  65. package/dist/components/ui/command.d.ts.map +1 -0
  66. package/dist/components/ui/command.js +29 -0
  67. package/dist/components/ui/command.js.map +1 -0
  68. package/dist/components/ui/delete-button.d.ts +11 -0
  69. package/dist/components/ui/delete-button.d.ts.map +1 -0
  70. package/dist/components/ui/delete-button.js +14 -0
  71. package/dist/components/ui/delete-button.js.map +1 -0
  72. package/dist/components/ui/dialog.d.ts +22 -0
  73. package/dist/components/ui/dialog.d.ts.map +1 -0
  74. package/dist/components/ui/dialog.js +27 -0
  75. package/dist/components/ui/dialog.js.map +1 -0
  76. package/dist/components/ui/dropdown-menu.d.ts +28 -0
  77. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  78. package/dist/components/ui/dropdown-menu.js +36 -0
  79. package/dist/components/ui/dropdown-menu.js.map +1 -0
  80. package/dist/components/ui/input.d.ts +13 -0
  81. package/dist/components/ui/input.d.ts.map +1 -0
  82. package/dist/components/ui/input.js +34 -0
  83. package/dist/components/ui/input.js.map +1 -0
  84. package/dist/components/ui/label.d.ts +6 -0
  85. package/dist/components/ui/label.d.ts.map +1 -0
  86. package/dist/components/ui/label.js +10 -0
  87. package/dist/components/ui/label.js.map +1 -0
  88. package/dist/components/ui/readonly-banner.d.ts +7 -0
  89. package/dist/components/ui/readonly-banner.d.ts.map +1 -0
  90. package/dist/components/ui/readonly-banner.js +12 -0
  91. package/dist/components/ui/readonly-banner.js.map +1 -0
  92. package/dist/components/ui/resizable.d.ts +24 -0
  93. package/dist/components/ui/resizable.d.ts.map +1 -0
  94. package/dist/components/ui/resizable.js +9 -0
  95. package/dist/components/ui/resizable.js.map +1 -0
  96. package/dist/components/ui/scroll-area.d.ts +45 -0
  97. package/dist/components/ui/scroll-area.d.ts.map +1 -0
  98. package/dist/components/ui/scroll-area.js +27 -0
  99. package/dist/components/ui/scroll-area.js.map +1 -0
  100. package/dist/components/ui/select.d.ts +14 -0
  101. package/dist/components/ui/select.d.ts.map +1 -0
  102. package/dist/components/ui/select.js +30 -0
  103. package/dist/components/ui/select.js.map +1 -0
  104. package/dist/components/ui/separator.d.ts +5 -0
  105. package/dist/components/ui/separator.d.ts.map +1 -0
  106. package/dist/components/ui/separator.js +8 -0
  107. package/dist/components/ui/separator.js.map +1 -0
  108. package/dist/components/ui/switch.d.ts +5 -0
  109. package/dist/components/ui/switch.d.ts.map +1 -0
  110. package/dist/components/ui/switch.js +8 -0
  111. package/dist/components/ui/switch.js.map +1 -0
  112. package/dist/components/ui/textarea.d.ts +12 -0
  113. package/dist/components/ui/textarea.d.ts.map +1 -0
  114. package/dist/components/ui/textarea.js +34 -0
  115. package/dist/components/ui/textarea.js.map +1 -0
  116. package/dist/components/ui/toast.d.ts +16 -0
  117. package/dist/components/ui/toast.d.ts.map +1 -0
  118. package/dist/components/ui/toast.js +34 -0
  119. package/dist/components/ui/toast.js.map +1 -0
  120. package/dist/components/ui/toaster.d.ts +2 -0
  121. package/dist/components/ui/toaster.d.ts.map +1 -0
  122. package/dist/components/ui/toaster.js +10 -0
  123. package/dist/components/ui/toaster.js.map +1 -0
  124. package/dist/components/ui/toggle-group.d.ts +13 -0
  125. package/dist/components/ui/toggle-group.d.ts.map +1 -0
  126. package/dist/components/ui/toggle-group.js +21 -0
  127. package/dist/components/ui/toggle-group.js.map +1 -0
  128. package/dist/components/ui/toggle.d.ts +13 -0
  129. package/dist/components/ui/toggle.d.ts.map +1 -0
  130. package/dist/components/ui/toggle.js +26 -0
  131. package/dist/components/ui/toggle.js.map +1 -0
  132. package/dist/components/ui/tooltip.d.ts +8 -0
  133. package/dist/components/ui/tooltip.d.ts.map +1 -0
  134. package/dist/components/ui/tooltip.js +14 -0
  135. package/dist/components/ui/tooltip.js.map +1 -0
  136. package/dist/dialogs/NodePickerDialog.d.ts +10 -0
  137. package/dist/dialogs/NodePickerDialog.d.ts.map +1 -0
  138. package/dist/dialogs/NodePickerDialog.js +39 -0
  139. package/dist/dialogs/NodePickerDialog.js.map +1 -0
  140. package/dist/dialogs/ValidationDialog.d.ts +17 -0
  141. package/dist/dialogs/ValidationDialog.d.ts.map +1 -0
  142. package/dist/dialogs/ValidationDialog.js +29 -0
  143. package/dist/dialogs/ValidationDialog.js.map +1 -0
  144. package/dist/graph/BaseNode.d.ts +9 -0
  145. package/dist/graph/BaseNode.d.ts.map +1 -0
  146. package/dist/graph/BaseNode.js +318 -0
  147. package/dist/graph/BaseNode.js.map +1 -0
  148. package/dist/graph/CustomEdge.d.ts +14 -0
  149. package/dist/graph/CustomEdge.d.ts.map +1 -0
  150. package/dist/graph/CustomEdge.js +107 -0
  151. package/dist/graph/CustomEdge.js.map +1 -0
  152. package/dist/graph/CustomNode.d.ts +3 -0
  153. package/dist/graph/CustomNode.d.ts.map +1 -0
  154. package/dist/graph/CustomNode.js +15 -0
  155. package/dist/graph/CustomNode.js.map +1 -0
  156. package/dist/graph/FunctionCallNode.d.ts +3 -0
  157. package/dist/graph/FunctionCallNode.d.ts.map +1 -0
  158. package/dist/graph/FunctionCallNode.js +25 -0
  159. package/dist/graph/FunctionCallNode.js.map +1 -0
  160. package/dist/graph/PortHandle.d.ts +21 -0
  161. package/dist/graph/PortHandle.d.ts.map +1 -0
  162. package/dist/graph/PortHandle.js +113 -0
  163. package/dist/graph/PortHandle.js.map +1 -0
  164. package/dist/graph/reactFlowRegistry.d.ts +65 -0
  165. package/dist/graph/reactFlowRegistry.d.ts.map +1 -0
  166. package/dist/graph/reactFlowRegistry.js +24 -0
  167. package/dist/graph/reactFlowRegistry.js.map +1 -0
  168. package/dist/hooks/use-toast.d.ts +47 -0
  169. package/dist/hooks/use-toast.d.ts.map +1 -0
  170. package/dist/hooks/use-toast.js +95 -0
  171. package/dist/hooks/use-toast.js.map +1 -0
  172. package/dist/hooks/useAvailableVariables.d.ts +12 -0
  173. package/dist/hooks/useAvailableVariables.d.ts.map +1 -0
  174. package/dist/hooks/useAvailableVariables.js +16 -0
  175. package/dist/hooks/useAvailableVariables.js.map +1 -0
  176. package/dist/hooks/useCanvasHistory.d.ts +14 -0
  177. package/dist/hooks/useCanvasHistory.d.ts.map +1 -0
  178. package/dist/hooks/useCanvasHistory.js +20 -0
  179. package/dist/hooks/useCanvasHistory.js.map +1 -0
  180. package/dist/hooks/useCanvasTabs.d.ts +23 -0
  181. package/dist/hooks/useCanvasTabs.d.ts.map +1 -0
  182. package/dist/hooks/useCanvasTabs.js +136 -0
  183. package/dist/hooks/useCanvasTabs.js.map +1 -0
  184. package/dist/hooks/useFunctionDiagnosticsSync.d.ts +14 -0
  185. package/dist/hooks/useFunctionDiagnosticsSync.d.ts.map +1 -0
  186. package/dist/hooks/useFunctionDiagnosticsSync.js +38 -0
  187. package/dist/hooks/useFunctionDiagnosticsSync.js.map +1 -0
  188. package/dist/hooks/useFunctionRegistry.d.ts +15 -0
  189. package/dist/hooks/useFunctionRegistry.d.ts.map +1 -0
  190. package/dist/hooks/useFunctionRegistry.js +22 -0
  191. package/dist/hooks/useFunctionRegistry.js.map +1 -0
  192. package/dist/hooks/useFunctions.d.ts +15 -0
  193. package/dist/hooks/useFunctions.d.ts.map +1 -0
  194. package/dist/hooks/useFunctions.js +34 -0
  195. package/dist/hooks/useFunctions.js.map +1 -0
  196. package/dist/hooks/useGraph.d.ts +40 -0
  197. package/dist/hooks/useGraph.d.ts.map +1 -0
  198. package/dist/hooks/useGraph.js +102 -0
  199. package/dist/hooks/useGraph.js.map +1 -0
  200. package/dist/hooks/useNodeDefinitions.d.ts +17 -0
  201. package/dist/hooks/useNodeDefinitions.d.ts.map +1 -0
  202. package/dist/hooks/useNodeDefinitions.js +65 -0
  203. package/dist/hooks/useNodeDefinitions.js.map +1 -0
  204. package/dist/hooks/useParamErrors.d.ts +12 -0
  205. package/dist/hooks/useParamErrors.d.ts.map +1 -0
  206. package/dist/hooks/useParamErrors.js +28 -0
  207. package/dist/hooks/useParamErrors.js.map +1 -0
  208. package/dist/hooks/useResolvedTheme.d.ts +10 -0
  209. package/dist/hooks/useResolvedTheme.d.ts.map +1 -0
  210. package/dist/hooks/useResolvedTheme.js +29 -0
  211. package/dist/hooks/useResolvedTheme.js.map +1 -0
  212. package/dist/hooks/useResourceDiagnosticsSync.d.ts +40 -0
  213. package/dist/hooks/useResourceDiagnosticsSync.d.ts.map +1 -0
  214. package/dist/hooks/useResourceDiagnosticsSync.js +39 -0
  215. package/dist/hooks/useResourceDiagnosticsSync.js.map +1 -0
  216. package/dist/hooks/useSuppressThemeTransition.d.ts +32 -0
  217. package/dist/hooks/useSuppressThemeTransition.d.ts.map +1 -0
  218. package/dist/hooks/useSuppressThemeTransition.js +75 -0
  219. package/dist/hooks/useSuppressThemeTransition.js.map +1 -0
  220. package/dist/hooks/useWorkflowSerialization.d.ts +24 -0
  221. package/dist/hooks/useWorkflowSerialization.d.ts.map +1 -0
  222. package/dist/hooks/useWorkflowSerialization.js +113 -0
  223. package/dist/hooks/useWorkflowSerialization.js.map +1 -0
  224. package/dist/i18n/index.d.ts +4 -0
  225. package/dist/i18n/index.d.ts.map +1 -0
  226. package/dist/i18n/index.js +46 -0
  227. package/dist/i18n/index.js.map +1 -0
  228. package/dist/i18n/locales/de.json +501 -0
  229. package/dist/i18n/locales/en.json +557 -0
  230. package/dist/index.d.ts +9 -0
  231. package/dist/index.d.ts.map +1 -0
  232. package/dist/index.js +12 -0
  233. package/dist/index.js.map +1 -0
  234. package/dist/inputs/ExpressionInput.d.ts +12 -0
  235. package/dist/inputs/ExpressionInput.d.ts.map +1 -0
  236. package/dist/inputs/ExpressionInput.js +203 -0
  237. package/dist/inputs/ExpressionInput.js.map +1 -0
  238. package/dist/inputs/ParameterEditor.d.ts +13 -0
  239. package/dist/inputs/ParameterEditor.d.ts.map +1 -0
  240. package/dist/inputs/ParameterEditor.js +204 -0
  241. package/dist/inputs/ParameterEditor.js.map +1 -0
  242. package/dist/inputs/PortSection.d.ts +31 -0
  243. package/dist/inputs/PortSection.d.ts.map +1 -0
  244. package/dist/inputs/PortSection.js +26 -0
  245. package/dist/inputs/PortSection.js.map +1 -0
  246. package/dist/panels/BuilderSidebar.d.ts +24 -0
  247. package/dist/panels/BuilderSidebar.d.ts.map +1 -0
  248. package/dist/panels/BuilderSidebar.js +202 -0
  249. package/dist/panels/BuilderSidebar.js.map +1 -0
  250. package/dist/panels/ChannelConfigPanel.d.ts +8 -0
  251. package/dist/panels/ChannelConfigPanel.d.ts.map +1 -0
  252. package/dist/panels/ChannelConfigPanel.js +26 -0
  253. package/dist/panels/ChannelConfigPanel.js.map +1 -0
  254. package/dist/panels/ChannelsPanel.d.ts +2 -0
  255. package/dist/panels/ChannelsPanel.d.ts.map +1 -0
  256. package/dist/panels/ChannelsPanel.js +16 -0
  257. package/dist/panels/ChannelsPanel.js.map +1 -0
  258. package/dist/panels/DebugConsolePanel.d.ts +2 -0
  259. package/dist/panels/DebugConsolePanel.d.ts.map +1 -0
  260. package/dist/panels/DebugConsolePanel.js +32 -0
  261. package/dist/panels/DebugConsolePanel.js.map +1 -0
  262. package/dist/panels/DebugContextPanel.d.ts +2 -0
  263. package/dist/panels/DebugContextPanel.d.ts.map +1 -0
  264. package/dist/panels/DebugContextPanel.js +32 -0
  265. package/dist/panels/DebugContextPanel.js.map +1 -0
  266. package/dist/panels/DebugExternalIOPanel.d.ts +9 -0
  267. package/dist/panels/DebugExternalIOPanel.d.ts.map +1 -0
  268. package/dist/panels/DebugExternalIOPanel.js +66 -0
  269. package/dist/panels/DebugExternalIOPanel.js.map +1 -0
  270. package/dist/panels/DiagnosticsPanel.d.ts +8 -0
  271. package/dist/panels/DiagnosticsPanel.d.ts.map +1 -0
  272. package/dist/panels/DiagnosticsPanel.js +86 -0
  273. package/dist/panels/DiagnosticsPanel.js.map +1 -0
  274. package/dist/panels/EdgeConfigPanel.d.ts +14 -0
  275. package/dist/panels/EdgeConfigPanel.d.ts.map +1 -0
  276. package/dist/panels/EdgeConfigPanel.js +34 -0
  277. package/dist/panels/EdgeConfigPanel.js.map +1 -0
  278. package/dist/panels/FunctionConfigPanel.d.ts +16 -0
  279. package/dist/panels/FunctionConfigPanel.d.ts.map +1 -0
  280. package/dist/panels/FunctionConfigPanel.js +62 -0
  281. package/dist/panels/FunctionConfigPanel.js.map +1 -0
  282. package/dist/panels/FunctionListPanel.d.ts +14 -0
  283. package/dist/panels/FunctionListPanel.d.ts.map +1 -0
  284. package/dist/panels/FunctionListPanel.js +25 -0
  285. package/dist/panels/FunctionListPanel.js.map +1 -0
  286. package/dist/panels/MemoryConfigPanel.d.ts +8 -0
  287. package/dist/panels/MemoryConfigPanel.d.ts.map +1 -0
  288. package/dist/panels/MemoryConfigPanel.js +22 -0
  289. package/dist/panels/MemoryConfigPanel.js.map +1 -0
  290. package/dist/panels/MemoryPanel.d.ts +2 -0
  291. package/dist/panels/MemoryPanel.d.ts.map +1 -0
  292. package/dist/panels/MemoryPanel.js +25 -0
  293. package/dist/panels/MemoryPanel.js.map +1 -0
  294. package/dist/panels/ModelConfigPanel.d.ts +8 -0
  295. package/dist/panels/ModelConfigPanel.d.ts.map +1 -0
  296. package/dist/panels/ModelConfigPanel.js +14 -0
  297. package/dist/panels/ModelConfigPanel.js.map +1 -0
  298. package/dist/panels/ModelsPanel.d.ts +8 -0
  299. package/dist/panels/ModelsPanel.d.ts.map +1 -0
  300. package/dist/panels/ModelsPanel.js +24 -0
  301. package/dist/panels/ModelsPanel.js.map +1 -0
  302. package/dist/panels/NodeConfigPanel.d.ts +16 -0
  303. package/dist/panels/NodeConfigPanel.d.ts.map +1 -0
  304. package/dist/panels/NodeConfigPanel.js +248 -0
  305. package/dist/panels/NodeConfigPanel.js.map +1 -0
  306. package/dist/panels/NodeLibrary.d.ts +16 -0
  307. package/dist/panels/NodeLibrary.d.ts.map +1 -0
  308. package/dist/panels/NodeLibrary.js +125 -0
  309. package/dist/panels/NodeLibrary.js.map +1 -0
  310. package/dist/panels/ResourceConfigPanel.d.ts +37 -0
  311. package/dist/panels/ResourceConfigPanel.d.ts.map +1 -0
  312. package/dist/panels/ResourceConfigPanel.js +35 -0
  313. package/dist/panels/ResourceConfigPanel.js.map +1 -0
  314. package/dist/panels/ResourceListPanel.d.ts +35 -0
  315. package/dist/panels/ResourceListPanel.d.ts.map +1 -0
  316. package/dist/panels/ResourceListPanel.js +35 -0
  317. package/dist/panels/ResourceListPanel.js.map +1 -0
  318. package/dist/panels/VariableConfigPanel.d.ts +9 -0
  319. package/dist/panels/VariableConfigPanel.d.ts.map +1 -0
  320. package/dist/panels/VariableConfigPanel.js +50 -0
  321. package/dist/panels/VariableConfigPanel.js.map +1 -0
  322. package/dist/panels/VariablesPanel.d.ts +7 -0
  323. package/dist/panels/VariablesPanel.d.ts.map +1 -0
  324. package/dist/panels/VariablesPanel.js +56 -0
  325. package/dist/panels/VariablesPanel.js.map +1 -0
  326. package/dist/stores/canvasStore.d.ts +41 -0
  327. package/dist/stores/canvasStore.d.ts.map +1 -0
  328. package/dist/stores/canvasStore.js +187 -0
  329. package/dist/stores/canvasStore.js.map +1 -0
  330. package/dist/stores/debugStore.d.ts +42 -0
  331. package/dist/stores/debugStore.d.ts.map +1 -0
  332. package/dist/stores/debugStore.js +22 -0
  333. package/dist/stores/debugStore.js.map +1 -0
  334. package/dist/stores/diagnosticsStore.d.ts +41 -0
  335. package/dist/stores/diagnosticsStore.d.ts.map +1 -0
  336. package/dist/stores/diagnosticsStore.js +67 -0
  337. package/dist/stores/diagnosticsStore.js.map +1 -0
  338. package/dist/stores/editorStore.d.ts +76 -0
  339. package/dist/stores/editorStore.d.ts.map +1 -0
  340. package/dist/stores/editorStore.js +116 -0
  341. package/dist/stores/editorStore.js.map +1 -0
  342. package/dist/utils/categoryConstants.d.ts +4 -0
  343. package/dist/utils/categoryConstants.d.ts.map +1 -0
  344. package/dist/utils/categoryConstants.js +24 -0
  345. package/dist/utils/categoryConstants.js.map +1 -0
  346. package/dist/utils/channelOperations.d.ts +21 -0
  347. package/dist/utils/channelOperations.d.ts.map +1 -0
  348. package/dist/utils/channelOperations.js +84 -0
  349. package/dist/utils/channelOperations.js.map +1 -0
  350. package/dist/utils/connectionRules.d.ts +15 -0
  351. package/dist/utils/connectionRules.d.ts.map +1 -0
  352. package/dist/utils/connectionRules.js +113 -0
  353. package/dist/utils/connectionRules.js.map +1 -0
  354. package/dist/utils/functionOperations.d.ts +27 -0
  355. package/dist/utils/functionOperations.d.ts.map +1 -0
  356. package/dist/utils/functionOperations.js +140 -0
  357. package/dist/utils/functionOperations.js.map +1 -0
  358. package/dist/utils/graphOperations.d.ts +54 -0
  359. package/dist/utils/graphOperations.d.ts.map +1 -0
  360. package/dist/utils/graphOperations.js +461 -0
  361. package/dist/utils/graphOperations.js.map +1 -0
  362. package/dist/utils/history.d.ts +76 -0
  363. package/dist/utils/history.d.ts.map +1 -0
  364. package/dist/utils/history.js +93 -0
  365. package/dist/utils/history.js.map +1 -0
  366. package/dist/utils/memoryOperations.d.ts +14 -0
  367. package/dist/utils/memoryOperations.d.ts.map +1 -0
  368. package/dist/utils/memoryOperations.js +55 -0
  369. package/dist/utils/memoryOperations.js.map +1 -0
  370. package/dist/utils/migrateFunctionNodes.d.ts +9 -0
  371. package/dist/utils/migrateFunctionNodes.d.ts.map +1 -0
  372. package/dist/utils/migrateFunctionNodes.js +89 -0
  373. package/dist/utils/migrateFunctionNodes.js.map +1 -0
  374. package/dist/utils/modelOperations.d.ts +13 -0
  375. package/dist/utils/modelOperations.d.ts.map +1 -0
  376. package/dist/utils/modelOperations.js +53 -0
  377. package/dist/utils/modelOperations.js.map +1 -0
  378. package/dist/utils/paramDisplay.d.ts +12 -0
  379. package/dist/utils/paramDisplay.d.ts.map +1 -0
  380. package/dist/utils/paramDisplay.js +56 -0
  381. package/dist/utils/paramDisplay.js.map +1 -0
  382. package/dist/utils/resourceHelpers.d.ts +17 -0
  383. package/dist/utils/resourceHelpers.d.ts.map +1 -0
  384. package/dist/utils/resourceHelpers.js +32 -0
  385. package/dist/utils/resourceHelpers.js.map +1 -0
  386. package/dist/utils/translation.d.ts +20 -0
  387. package/dist/utils/translation.d.ts.map +1 -0
  388. package/dist/utils/translation.js +23 -0
  389. package/dist/utils/translation.js.map +1 -0
  390. package/dist/utils/variableOperations.d.ts +15 -0
  391. package/dist/utils/variableOperations.d.ts.map +1 -0
  392. package/dist/utils/variableOperations.js +71 -0
  393. package/dist/utils/variableOperations.js.map +1 -0
  394. package/package.json +79 -0
  395. package/src/BuilderLayout.tsx +345 -0
  396. package/src/Canvas.tsx +261 -0
  397. package/src/CanvasEditor.tsx +142 -0
  398. package/src/CanvasTabsToolbar.tsx +176 -0
  399. package/src/RightConfigPanel.tsx +266 -0
  400. package/src/WorkflowBuilder.tsx +412 -0
  401. package/src/cn.ts +6 -0
  402. package/src/components/ui/add-button.tsx +39 -0
  403. package/src/components/ui/alert-dialog.tsx +141 -0
  404. package/src/components/ui/alert.tsx +59 -0
  405. package/src/components/ui/badge.tsx +36 -0
  406. package/src/components/ui/button.tsx +85 -0
  407. package/src/components/ui/card.tsx +79 -0
  408. package/src/components/ui/checkbox.tsx +28 -0
  409. package/src/components/ui/collapsible.tsx +9 -0
  410. package/src/components/ui/command.tsx +153 -0
  411. package/src/components/ui/delete-button.tsx +23 -0
  412. package/src/components/ui/dialog.tsx +125 -0
  413. package/src/components/ui/dropdown-menu.tsx +198 -0
  414. package/src/components/ui/input.tsx +55 -0
  415. package/src/components/ui/label.tsx +24 -0
  416. package/src/components/ui/readonly-banner.tsx +15 -0
  417. package/src/components/ui/resizable.tsx +43 -0
  418. package/src/components/ui/scroll-area.tsx +102 -0
  419. package/src/components/ui/select.tsx +160 -0
  420. package/src/components/ui/separator.tsx +29 -0
  421. package/src/components/ui/switch.tsx +27 -0
  422. package/src/components/ui/textarea.tsx +51 -0
  423. package/src/components/ui/toast.tsx +127 -0
  424. package/src/components/ui/toaster.tsx +33 -0
  425. package/src/components/ui/toggle-group.tsx +59 -0
  426. package/src/components/ui/toggle.tsx +43 -0
  427. package/src/components/ui/tooltip.tsx +32 -0
  428. package/src/dialogs/NodePickerDialog.tsx +84 -0
  429. package/src/dialogs/ValidationDialog.tsx +184 -0
  430. package/src/graph/BaseNode.tsx +557 -0
  431. package/src/graph/CustomEdge.tsx +185 -0
  432. package/src/graph/CustomNode.tsx +16 -0
  433. package/src/graph/FunctionCallNode.tsx +30 -0
  434. package/src/graph/PortHandle.tsx +189 -0
  435. package/src/graph/reactFlowRegistry.ts +26 -0
  436. package/src/hooks/use-toast.ts +125 -0
  437. package/src/hooks/useAvailableVariables.ts +20 -0
  438. package/src/hooks/useCanvasHistory.ts +22 -0
  439. package/src/hooks/useCanvasTabs.ts +168 -0
  440. package/src/hooks/useFunctionDiagnosticsSync.ts +40 -0
  441. package/src/hooks/useFunctionRegistry.ts +26 -0
  442. package/src/hooks/useFunctions.ts +44 -0
  443. package/src/hooks/useGraph.ts +161 -0
  444. package/src/hooks/useNodeDefinitions.ts +82 -0
  445. package/src/hooks/useParamErrors.ts +26 -0
  446. package/src/hooks/useResolvedTheme.ts +30 -0
  447. package/src/hooks/useResourceDiagnosticsSync.ts +58 -0
  448. package/src/hooks/useSuppressThemeTransition.ts +79 -0
  449. package/src/hooks/useWorkflowSerialization.ts +127 -0
  450. package/src/i18n/index.ts +53 -0
  451. package/src/i18n/locales/de.json +501 -0
  452. package/src/i18n/locales/en.json +557 -0
  453. package/src/index.ts +27 -0
  454. package/src/inputs/ExpressionInput.tsx +297 -0
  455. package/src/inputs/ParameterEditor.tsx +515 -0
  456. package/src/inputs/PortSection.tsx +144 -0
  457. package/src/panels/BuilderSidebar.tsx +301 -0
  458. package/src/panels/ChannelConfigPanel.tsx +49 -0
  459. package/src/panels/ChannelsPanel.tsx +28 -0
  460. package/src/panels/DebugConsolePanel.tsx +73 -0
  461. package/src/panels/DebugContextPanel.tsx +77 -0
  462. package/src/panels/DebugExternalIOPanel.tsx +180 -0
  463. package/src/panels/DiagnosticsPanel.tsx +170 -0
  464. package/src/panels/EdgeConfigPanel.tsx +104 -0
  465. package/src/panels/FunctionConfigPanel.tsx +179 -0
  466. package/src/panels/FunctionListPanel.tsx +45 -0
  467. package/src/panels/MemoryConfigPanel.tsx +55 -0
  468. package/src/panels/MemoryPanel.tsx +40 -0
  469. package/src/panels/ModelConfigPanel.tsx +41 -0
  470. package/src/panels/ModelsPanel.tsx +36 -0
  471. package/src/panels/NodeConfigPanel.tsx +630 -0
  472. package/src/panels/NodeLibrary.tsx +288 -0
  473. package/src/panels/ResourceConfigPanel.tsx +132 -0
  474. package/src/panels/ResourceListPanel.tsx +113 -0
  475. package/src/panels/VariableConfigPanel.tsx +161 -0
  476. package/src/panels/VariablesPanel.tsx +145 -0
  477. package/src/stores/canvasStore.test.ts +44 -0
  478. package/src/stores/canvasStore.ts +245 -0
  479. package/src/stores/debugStore.ts +74 -0
  480. package/src/stores/diagnosticsStore.ts +130 -0
  481. package/src/stores/editorStore.ts +202 -0
  482. package/src/styles/index.css +526 -0
  483. package/src/utils/categoryConstants.ts +26 -0
  484. package/src/utils/channelOperations.ts +86 -0
  485. package/src/utils/connectionRules.ts +137 -0
  486. package/src/utils/functionOperations.ts +179 -0
  487. package/src/utils/graphOperations.ts +550 -0
  488. package/src/utils/history.ts +207 -0
  489. package/src/utils/memoryOperations.ts +57 -0
  490. package/src/utils/migrateFunctionNodes.ts +107 -0
  491. package/src/utils/modelOperations.ts +55 -0
  492. package/src/utils/paramDisplay.ts +71 -0
  493. package/src/utils/resourceHelpers.ts +32 -0
  494. package/src/utils/translation.ts +28 -0
  495. package/src/utils/variableOperations.ts +75 -0
  496. package/tailwind-preset.ts +166 -0
@@ -0,0 +1,526 @@
1
+ /* ReactFlow's required CSS — without this, nodes can't be dragged/selected and
2
+ the canvas chrome (controls, minimap, viewport transforms) renders unstyled. */
3
+ @import "@xyflow/react/dist/style.css";
4
+
5
+ @tailwind base;
6
+ @tailwind components;
7
+ @tailwind utilities;
8
+
9
+ /* Color-mode switch must snap, not fade. useSuppressThemeTransition adds
10
+ `theme-changing` while the embedder flips the `light` class on <html> and
11
+ removes it once React has committed the new colorMode, killing every
12
+ color/background/border transition in between (canvas tabs, the builder
13
+ sidebar, ReactFlow's controls and node chrome) so they change in lockstep
14
+ with the rest of the UI instead of animating to the new tokens. */
15
+ .theme-changing,
16
+ .theme-changing *,
17
+ .theme-changing *::before,
18
+ .theme-changing *::after {
19
+ transition: none !important;
20
+ }
21
+
22
+ /* Definition of the design system. All colors, gradients, fonts, etc should be defined here.
23
+ All colors MUST be HSL.
24
+ */
25
+
26
+ @layer base {
27
+ /*
28
+ * Token system: two layers
29
+ *
30
+ * 1. SURFACES (independent per mode) — background, card, popover, border, etc.
31
+ * These are *materials*: white card vs dark card aren't the same hue shifted,
32
+ * they're different identities. Defined separately in :root and .light.
33
+ *
34
+ * 2. SIGNALS (canonical hue, per-mode lightness) — node categories, channel
35
+ * types, badge severity. These are *identity markers*:
36
+ * "logic" should be recognizably the same green in both modes. Hue/sat
37
+ * stay fixed; only --signal-l changes per mode.
38
+ *
39
+ * Consumers using opacity (hsl(var(--node-X) / 0.3)) automatically tint
40
+ * toward the surface behind them, so the same canonical color reads well
41
+ * on both dark and light surfaces.
42
+ */
43
+ :root {
44
+ /* ════════════════════════════════════════════════════════════
45
+ * GENERAL UI — surfaces, text, controls. (DARK MODE = default)
46
+ *
47
+ * These are the colors an embedding app SHARES with the builder:
48
+ * buttons, panels, inputs, menus, status. A host that reuses this
49
+ * preset reuses everything in this block. Hue 40, saturation ~2%:
50
+ * a faint warm gray, premium and nearly neutral.
51
+ * (.light overrides these values further down.)
52
+ * ════════════════════════════════════════════════════════════ */
53
+
54
+ /* App shell / page background, and the default text drawn on it. */
55
+ --background: 40 2% 8%;
56
+ --foreground: 0 0% 95%;
57
+
58
+ /* Card surface — builder panels, list rows, AND node bodies. Matches
59
+ --sidebar-background and --panel-background so all chrome shares one
60
+ panel color. --card-foreground is text drawn on a card. */
61
+ --card: 40 2% 18%;
62
+ --card-foreground: 0 0% 95%;
63
+
64
+ /* Popover / dropdown / menu surface (lifted slightly above cards). */
65
+ --popover: 40 2% 22%;
66
+ --popover-foreground: 0 0% 95%;
67
+
68
+ /* PRIMARY = the vibrant brand green. Active text/icons (text-primary),
69
+ primary buttons, the focus ring. --primary-foreground is text ON it. */
70
+ --primary: 158 53% 42%;
71
+ --primary-foreground: 0 0% 100%;
72
+ --primary-glow: 158 53% 52%;
73
+
74
+ /* Secondary neutral surface — secondary buttons. */
75
+ --secondary: 40 2% 24%;
76
+ --secondary-foreground: 0 0% 95%;
77
+
78
+ /* MUTED = subtle neutral fill (hover backgrounds, bg-muted/50). Its
79
+ --muted-foreground is the canonical SUBTEXT color: port labels,
80
+ descriptions, "<arg>:" hints, and any secondary text. */
81
+ --muted: 40 2% 22%;
82
+ --muted-foreground: 0 0% 65%;
83
+
84
+ /* ACCENT = the muted/selection green. Fills selected list rows and
85
+ focused menu/command/select items (bg-accent). The calm "this is
86
+ selected" wash; vibrant interactions use --primary instead. */
87
+ --accent: 158 16% 22%;
88
+ --accent-foreground: 0 0% 95%;
89
+
90
+ /* DESTRUCTIVE = error red — delete buttons, error text/badges/borders. */
91
+ --destructive: 0 78% 58%;
92
+ --destructive-foreground: 0 0% 100%;
93
+
94
+ /* BORDER = every DOM border: panels, cards, separators, AND form-field
95
+ borders (the preset aliases border-input to this — one border color). */
96
+ --border: 40 2% 26%;
97
+ /* RING = focus highlight around inputs/buttons. */
98
+ --ring: 158 53% 42%;
99
+ /* OVERLAY = dialog/backdrop scrim. */
100
+ --overlay: 0 0% 0% / 0.8;
101
+
102
+ /* FIELD = form-input fill, darker than --card so inputs read as recessed
103
+ (--border draws their outline). */
104
+ --field: 40 2% 14%;
105
+
106
+ --radius: 0.5rem;
107
+
108
+ /* Status accents (semantic, full-saturation). */
109
+ --success: 158 53% 42%;
110
+ --success-foreground: 0 0% 100%;
111
+ --warning: 38 92% 50%;
112
+ --warning-foreground: 0 0% 100%;
113
+
114
+ /* Sidebar — app-shell chrome, shared with the host's AppSidebar. */
115
+ --sidebar-background: 40 2% 18%;
116
+ --sidebar-foreground: 0 0% 95%;
117
+ --sidebar-primary: 158 53% 42%;
118
+ --sidebar-primary-foreground: 0 0% 100%;
119
+ --sidebar-accent: 40 2% 24%;
120
+ --sidebar-accent-foreground: 0 0% 95%;
121
+ --sidebar-border: 40 2% 26%;
122
+ --sidebar-ring: 158 53% 42%;
123
+
124
+ /* Gradients — page background and glass components. */
125
+ --gradient-subtle: linear-gradient(135deg, hsl(40 2% 8%), hsl(40 2% 18%));
126
+ --gradient-glass: linear-gradient(135deg, var(--glass-bg-light), var(--glass-bg-medium));
127
+
128
+ /* Shadows — black at moderate alpha; in dark mode the eye can't see much
129
+ against near-black surfaces, so elevated states lean on the glow tokens. */
130
+ --shadow-sm: 0 2px 4px 0 hsl(0 0% 0% / 0.4);
131
+ --shadow-md: 0 4px 12px -2px hsl(0 0% 0% / 0.5);
132
+ --shadow-lg: 0 12px 24px -4px hsl(0 0% 0% / 0.6);
133
+ --shadow-glow: 0 0 20px hsl(158 53% 42% / 0.4);
134
+
135
+ /* ════════════════════════════════════════════════════════════
136
+ * BUILDER / GRAPH ONLY — canvas, edges, ports, node categories.
137
+ *
138
+ * Embedding apps do NOT use these; they're specific to the React
139
+ * Flow editing surface and are mostly consumed INLINE by the graph
140
+ * layer (CustomEdge / PortHandle / BaseNode), not via Tailwind classes.
141
+ * ════════════════════════════════════════════════════════════ */
142
+
143
+ /* Canvas = editing surface behind nodes (sits between --background and
144
+ --card for a subtle elevation). */
145
+ --canvas-background: 40 2% 14%;
146
+
147
+ /* Edge/connection color — ALSO the node OUTLINE color, so edges and node
148
+ borders share one graph-line color. */
149
+ --edge-default: 40 5% 58%;
150
+
151
+ /* Builder panel chrome (inspectors/sidebars inside the editor). */
152
+ --panel-background: 40 2% 18%;
153
+ --panel-border: 40 2% 26%;
154
+
155
+ /* Selection glow — uniform halo around selected nodes/edges, independent
156
+ of category color so multi-selection stays calm. */
157
+ --selection-glow: 0 0% 100%;
158
+
159
+ /* Drop shadow cast under nodes. */
160
+ --node-shadow: 40 2% 5%;
161
+
162
+ /* SIGNAL TUNING — node category hues are fixed; only saturation and
163
+ lightness shift per mode (see .light). */
164
+ --signal-s: 70%; /* signal saturation */
165
+ --signal-l: 58%; /* signal lightness (dark mode) */
166
+
167
+ /* NODE CATEGORY SIGNALS — one identity color per node type. */
168
+ --node-agent: 273 var(--signal-s) var(--signal-l);
169
+ --node-input: 195 var(--signal-s) var(--signal-l);
170
+ --node-output: 142 var(--signal-s) var(--signal-l);
171
+ --node-trigger: 32 88% var(--signal-l);
172
+ --node-logic: 175 var(--signal-s) var(--signal-l);
173
+ --node-data: 42 85% var(--signal-l);
174
+ --node-tool: 200 80% var(--signal-l);
175
+ --node-function: 320 var(--signal-s) var(--signal-l);
176
+ }
177
+
178
+ .light {
179
+ /* ═══ GENERAL UI (light overrides — a different material, not a shift) ═══ */
180
+ --background: 220 14% 96%;
181
+ --foreground: 220 15% 15%;
182
+ --card: 0 0% 100%;
183
+ --card-foreground: 220 15% 15%;
184
+ --popover: 0 0% 100%;
185
+ --popover-foreground: 220 15% 15%;
186
+ --primary: 158 53% 38%;
187
+ --primary-foreground: 0 0% 100%;
188
+ --primary-glow: 158 53% 48%;
189
+ --secondary: 220 12% 92%;
190
+ --secondary-foreground: 220 15% 15%;
191
+ --muted: 220 12% 94%;
192
+ --muted-foreground: 220 8% 46%;
193
+ --accent: 158 40% 93%;
194
+ --accent-foreground: 220 15% 15%;
195
+ --destructive: 0 72% 45%;
196
+ --destructive-foreground: 0 0% 100%;
197
+ --border: 220 13% 88%;
198
+ --ring: 158 53% 42%;
199
+ --overlay: 0 0% 0% / 0.5;
200
+ /* Field fill — clearly darker than the white card so inputs read recessed. */
201
+ --field: 220 14% 92%;
202
+ --success: 158 53% 38%;
203
+ --success-foreground: 0 0% 100%;
204
+ --warning: 32 92% 42%;
205
+ --warning-foreground: 0 0% 100%;
206
+ --sidebar-background: 220 14% 98%;
207
+ --sidebar-foreground: 220 15% 15%;
208
+ --sidebar-primary: 158 53% 38%;
209
+ --sidebar-primary-foreground: 0 0% 100%;
210
+ --sidebar-accent: 220 12% 94%;
211
+ --sidebar-accent-foreground: 220 15% 15%;
212
+ --sidebar-border: 220 13% 88%;
213
+ --sidebar-ring: 158 53% 38%;
214
+ /* Shadows — dark ink on light surfaces. Alpha kept high enough that cards
215
+ read with clear elevation (matching dark mode's 0.4-alpha prominence),
216
+ while staying soft so they don't smudge on white. */
217
+ --shadow-sm: 0 1px 3px 0 hsl(220 15% 25% / 0.16), 0 2px 6px -1px hsl(220 15% 25% / 0.12);
218
+ --shadow-md: 0 4px 8px -1px hsl(220 15% 25% / 0.18), 0 8px 16px -2px hsl(220 15% 25% / 0.14);
219
+ --shadow-lg: 0 4px 8px -2px hsl(220 15% 25% / 0.12), 0 12px 24px -4px hsl(220 15% 25% / 0.18);
220
+ --shadow-glow: 0 0 24px hsl(158 53% 42% / 0.25);
221
+
222
+ /* ═══ BUILDER / GRAPH ONLY (light overrides) ═══ */
223
+ /* Canvas sits deeper than the app shell so the editing surface is
224
+ clearly distinct from chrome. */
225
+ --canvas-background: 220 14% 92%;
226
+ --edge-default: 220 8% 45%;
227
+ --panel-background: 0 0% 100%;
228
+ --panel-border: 220 13% 88%;
229
+ /* Selection glow — dark in light mode for high contrast on white. */
230
+ --selection-glow: 220 15% 15%;
231
+ /* Same node hues as dark; only saturation/lightness drop for legibility. */
232
+ --signal-s: 68%;
233
+ --signal-l: 42%;
234
+ }
235
+ }
236
+
237
+ @layer base {
238
+ * {
239
+ @apply border-border;
240
+ }
241
+
242
+ /* Base look is scoped to the builder's own root — NOT <body>. The host owns
243
+ page chrome (background, page font, overscroll); the builder only dresses
244
+ itself. font-sans (Poppins) is inherited from the .fh-builder root;
245
+ headings get the Inter display face, scoped so it can't restyle host pages. */
246
+ .fh-builder :is(h1, h2, h3, h4, h5, h6) {
247
+ font-family: Inter, system-ui, sans-serif;
248
+ }
249
+ }
250
+
251
+ /* Glass Forest Design System */
252
+ @layer components {
253
+ /* Core Glass Components - Verstärkte Glass-Effekte */
254
+ .glass-forest-card {
255
+ @apply bg-card/60 backdrop-blur-xl border border-white/10 rounded-2xl shadow-lg transition-all duration-300;
256
+ }
257
+
258
+ .glass-forest-card:hover {
259
+ @apply bg-card/70 shadow-xl scale-[1.02] border-primary/20;
260
+ }
261
+
262
+ .glass-forest-panel {
263
+ @apply bg-card/70 backdrop-blur-2xl border border-white/10 shadow-xl;
264
+ }
265
+
266
+ .glass-forest-button {
267
+ @apply bg-card/40 backdrop-blur-md border border-border rounded-full transition-all duration-300;
268
+ }
269
+
270
+ .glass-forest-button:hover {
271
+ @apply bg-card/60 border-primary/30 shadow-lg -translate-y-0.5;
272
+ }
273
+
274
+ .glass-forest-button-primary {
275
+ @apply bg-primary text-primary-foreground rounded-full shadow-sm border-0;
276
+ }
277
+
278
+ .glass-forest-button-primary:hover {
279
+ @apply shadow-xl scale-[1.02] -translate-y-0.5;
280
+ }
281
+
282
+ .glass-forest-input {
283
+ @apply bg-card/40 backdrop-blur-lg border border-border rounded-2xl transition-all duration-300;
284
+ }
285
+
286
+ .glass-forest-input:focus {
287
+ @apply bg-card/60 border-primary outline-none ring-2 ring-primary/20;
288
+ }
289
+
290
+ /* Organic Hover Effects */
291
+ .hover-glow {
292
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
293
+ }
294
+
295
+ .hover-glow:hover {
296
+ box-shadow: var(--glow-green);
297
+ transform: translateY(-2px);
298
+ }
299
+
300
+ .hover-lift {
301
+ transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
302
+ }
303
+
304
+ .hover-lift:hover {
305
+ transform: translateY(-4px) scale(1.02);
306
+ }
307
+
308
+ /* Workflow Builder Glass Styles - Mehr Transparenz */
309
+ .workflow-builder-panel {
310
+ @apply bg-card/70 backdrop-blur-2xl border border-white/10 shadow-xl;
311
+ }
312
+
313
+ .block-card {
314
+ @apply bg-card/60 backdrop-blur-xl border border-white/10 rounded-2xl shadow-lg cursor-pointer transition-all duration-300;
315
+ }
316
+
317
+ .block-card:hover {
318
+ @apply bg-card/70 shadow-xl scale-[1.02];
319
+ }
320
+
321
+ .block-node-glass {
322
+ @apply bg-card/70 backdrop-blur-xl rounded-2xl border border-white/10 shadow-xl transition-all duration-300;
323
+ }
324
+
325
+ .block-node-glass:hover {
326
+ @apply shadow-2xl scale-[1.02] bg-card/80;
327
+ }
328
+
329
+ /* Loading & Status */
330
+ .loading-organic {
331
+ @apply animate-pulse-organic rounded-full bg-primary/20;
332
+ }
333
+
334
+ .status-dot {
335
+ @apply w-2 h-2 rounded-full animate-pulse-organic;
336
+ }
337
+
338
+ .status-success .status-dot {
339
+ @apply bg-success;
340
+ box-shadow: var(--glow-green);
341
+ }
342
+
343
+ .status-warning .status-dot {
344
+ @apply bg-warning;
345
+ }
346
+ }
347
+
348
+ @layer utilities {
349
+ /* Organic Animations */
350
+ @keyframes pulse-organic {
351
+ 0%,
352
+ 100% {
353
+ opacity: 1;
354
+ transform: scale(1);
355
+ }
356
+ 50% {
357
+ opacity: 0.8;
358
+ transform: scale(1.05);
359
+ }
360
+ }
361
+
362
+ @keyframes ripple-expand {
363
+ 0% {
364
+ transform: scale(0.8);
365
+ opacity: 0;
366
+ }
367
+ 50% {
368
+ opacity: 0.6;
369
+ }
370
+ 100% {
371
+ transform: scale(2);
372
+ opacity: 0;
373
+ }
374
+ }
375
+
376
+ @keyframes light-trail {
377
+ 0% {
378
+ opacity: 0;
379
+ transform: translateY(0);
380
+ }
381
+ 50% {
382
+ opacity: 1;
383
+ }
384
+ 100% {
385
+ opacity: 0;
386
+ transform: translateY(-20px);
387
+ }
388
+ }
389
+
390
+ @keyframes fade-in {
391
+ from {
392
+ opacity: 0;
393
+ transform: translateY(10px);
394
+ }
395
+ to {
396
+ opacity: 1;
397
+ transform: translateY(0);
398
+ }
399
+ }
400
+
401
+ @keyframes glow-pulse {
402
+ 0%,
403
+ 100% {
404
+ box-shadow: var(--glow-green);
405
+ }
406
+ 50% {
407
+ box-shadow: var(--glow-combined);
408
+ }
409
+ }
410
+
411
+ /* Animation Classes */
412
+ .animate-pulse-organic {
413
+ animation: pulse-organic 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
414
+ }
415
+
416
+ .animate-ripple {
417
+ animation: ripple-expand 1.5s ease-out;
418
+ }
419
+
420
+ .animate-glow-pulse {
421
+ animation: glow-pulse 2s ease-in-out infinite;
422
+ }
423
+
424
+ .animate-fade-in {
425
+ animation: fade-in 0.3s ease-out;
426
+ }
427
+
428
+ /* Line clamp utilities */
429
+ .line-clamp-1 {
430
+ overflow: hidden;
431
+ display: -webkit-box;
432
+ -webkit-box-orient: vertical;
433
+ -webkit-line-clamp: 1;
434
+ }
435
+
436
+ .line-clamp-2 {
437
+ overflow: hidden;
438
+ display: -webkit-box;
439
+ -webkit-box-orient: vertical;
440
+ -webkit-line-clamp: 2;
441
+ }
442
+
443
+ .line-clamp-3 {
444
+ overflow: hidden;
445
+ display: -webkit-box;
446
+ -webkit-box-orient: vertical;
447
+ -webkit-line-clamp: 3;
448
+ }
449
+ }
450
+
451
+ /* ════════════════════════════════════════════════════════════
452
+ * Themed thin scrollbars — uniform across every scrollable region
453
+ * inside the builder (sidebar, right panel, tabs toolbar, dropdowns,
454
+ * dialogs, debug console).
455
+ *
456
+ * Two scopes, both opt-in:
457
+ * - `.fh-builder` covers everything rendered inside the
458
+ * builder DOM subtree.
459
+ * - `.fh-builder-portal` covers Radix Content nodes that portal to
460
+ * <body> (DropdownMenu, Dialog, AlertDialog, Select, Tooltip), so
461
+ * they don't drop back to the host's native scrollbar just because
462
+ * they live outside the builder root in the DOM. Same marker used
463
+ * to pin `font-sans` on those nodes.
464
+ *
465
+ * Host pages are never touched: every rule is anchored on one of these
466
+ * two classes; no `body`/`html`/universal selector escapes them. Thumb
467
+ * uses --muted-foreground at low opacity so it reads as a faint hint of
468
+ * the subtext color on both card and popover surfaces, in both modes.
469
+ *
470
+ * Width 6px: thin enough that the 6px reflow when it appears is barely
471
+ * perceptible, while still big enough to grab. We deliberately don't
472
+ * use `scrollbar-gutter: stable` (which would reserve the gutter even
473
+ * when nothing overflows) — most panels never need a scrollbar, and
474
+ * the permanent gap looks worse than the rare reflow.
475
+ * ════════════════════════════════════════════════════════════ */
476
+ .fh-builder,
477
+ .fh-builder *,
478
+ .fh-builder-portal,
479
+ .fh-builder-portal * {
480
+ scrollbar-width: thin;
481
+ scrollbar-color: hsl(var(--muted-foreground) / 0.35) transparent;
482
+ }
483
+ .fh-builder ::-webkit-scrollbar,
484
+ .fh-builder-portal::-webkit-scrollbar,
485
+ .fh-builder-portal ::-webkit-scrollbar {
486
+ width: 6px;
487
+ height: 6px;
488
+ }
489
+ .fh-builder ::-webkit-scrollbar-track,
490
+ .fh-builder-portal::-webkit-scrollbar-track,
491
+ .fh-builder-portal ::-webkit-scrollbar-track {
492
+ background: transparent;
493
+ }
494
+ .fh-builder ::-webkit-scrollbar-thumb,
495
+ .fh-builder-portal::-webkit-scrollbar-thumb,
496
+ .fh-builder-portal ::-webkit-scrollbar-thumb {
497
+ background-color: hsl(var(--muted-foreground) / 0.3);
498
+ border-radius: 9999px;
499
+ }
500
+ .fh-builder ::-webkit-scrollbar-thumb:hover,
501
+ .fh-builder-portal::-webkit-scrollbar-thumb:hover,
502
+ .fh-builder-portal ::-webkit-scrollbar-thumb:hover {
503
+ background-color: hsl(var(--muted-foreground) / 0.55);
504
+ }
505
+ .fh-builder ::-webkit-scrollbar-corner,
506
+ .fh-builder-portal::-webkit-scrollbar-corner,
507
+ .fh-builder-portal ::-webkit-scrollbar-corner {
508
+ background: transparent;
509
+ }
510
+
511
+ /* Suppress ReactFlow's built-in selection outline — we use custom glow via editorStore */
512
+ .react-flow__node.selected,
513
+ .react-flow__edge.selected {
514
+ outline: none !important;
515
+ }
516
+
517
+ /* Debug cursor pulse animation for node highlighting */
518
+ @keyframes debug-cursor-pulse {
519
+ 0%,
520
+ 100% {
521
+ opacity: 1;
522
+ }
523
+ 50% {
524
+ opacity: 0.6;
525
+ }
526
+ }
@@ -0,0 +1,26 @@
1
+ // Shared category icons and colors for node categories in the workflow builder.
2
+
3
+ import { NodeCategory } from "@foresthubai/workflow-core/node";
4
+ import { Bot, Box, Brain, Inbox, Send, Variable, Wrench, Zap, type LucideIcon } from "lucide-react";
5
+
6
+ export const categoryIcons: Record<string, LucideIcon> = {
7
+ [NodeCategory.Input]: Inbox,
8
+ [NodeCategory.Logic]: Brain,
9
+ [NodeCategory.Data]: Variable,
10
+ [NodeCategory.Output]: Send,
11
+ [NodeCategory.AI]: Bot,
12
+ [NodeCategory.Trigger]: Zap,
13
+ [NodeCategory.Tool]: Wrench,
14
+ [NodeCategory.Function]: Box,
15
+ };
16
+
17
+ export const categoryColors: Record<string, string> = {
18
+ [NodeCategory.Input]: "bg-node-input/10 text-node-input border-node-input/20",
19
+ [NodeCategory.Logic]: "bg-node-logic/10 text-node-logic border-node-logic/20",
20
+ [NodeCategory.Data]: "bg-node-data/10 text-node-data border-node-data/20",
21
+ [NodeCategory.Output]: "bg-node-output/10 text-node-output border-node-output/20",
22
+ [NodeCategory.AI]: "bg-node-agent/10 text-node-agent border-node-agent/20",
23
+ [NodeCategory.Trigger]: "bg-node-trigger/10 text-node-trigger border-node-trigger/20",
24
+ [NodeCategory.Tool]: "bg-node-tool/10 text-node-tool border-node-tool/20",
25
+ [NodeCategory.Function]: "bg-node-function/10 text-node-function border-node-function/20",
26
+ };
@@ -0,0 +1,86 @@
1
+ import { CHANNEL_DEFINITION, type ChannelType, type Channel } from "@foresthubai/workflow-core/channel";
2
+ import { isParameterActive } from "@foresthubai/workflow-core/parameter";
3
+ import { useEditorStore } from "../stores/editorStore";
4
+ import { generateId } from "@foresthubai/workflow-core/id";
5
+ import { uniqueName } from "./resourceHelpers";
6
+
7
+ /**
8
+ * Build the initial `arguments` record for a new channel: each parameter
9
+ * that's active for the chosen `type` and has a `default` gets seeded.
10
+ */
11
+ function defaultArguments(type: ChannelType): Record<string, unknown> {
12
+ const seed: Record<string, unknown> = { type };
13
+ const args: Record<string, unknown> = {};
14
+ for (const param of CHANNEL_DEFINITION.parameters) {
15
+ if (param.id === "type") continue;
16
+ if (param.activationRules?.length && !isParameterActive(param, seed, false)) continue;
17
+ if ("default" in param && param.default !== undefined) {
18
+ args[param.id] = param.default;
19
+ }
20
+ }
21
+ return args;
22
+ }
23
+
24
+ /**
25
+ * Create a new channel in the editor store. Returns the new instance.
26
+ */
27
+ export function addChannel(type: ChannelType = "GPIOIN"): Channel {
28
+ const id = generateId();
29
+ const existing = Object.values(useEditorStore.getState().channels).map((v) => v.label);
30
+ const instance: Channel = {
31
+ id,
32
+ label: uniqueName("channel", existing),
33
+ type,
34
+ arguments: defaultArguments(type),
35
+ };
36
+ useEditorStore.getState().setChannels((vars) => ({ ...vars, [id]: instance }));
37
+ return instance;
38
+ }
39
+
40
+ /**
41
+ * Apply a partial patch to a channel. Inactive arguments are intentionally
42
+ * retained in the store: the domain store is the superset and stripping happens
43
+ * only at the api boundary (`serialize`), so switching `type` away and back
44
+ * restores previously-entered values rather than resetting them. On a type
45
+ * change we still seed defaults for params that are newly active and unset, so
46
+ * the config panel shows sensible initial values. Top-level fields (label/type)
47
+ * are merged separately from arguments.
48
+ */
49
+ export function updateChannel(id: string, patch: { label?: string; type?: ChannelType; arguments?: Record<string, unknown> }): void {
50
+ const key = id;
51
+ useEditorStore.getState().setChannels((vars) => {
52
+ const existing = vars[key];
53
+ if (!existing) return vars;
54
+
55
+ const nextType = patch.type ?? existing.type;
56
+ const mergedArgs = { ...existing.arguments, ...(patch.arguments ?? {}) };
57
+
58
+ if (patch.type && patch.type !== existing.type) {
59
+ for (const [k, v] of Object.entries(defaultArguments(nextType))) {
60
+ if (mergedArgs[k] === undefined) mergedArgs[k] = v;
61
+ }
62
+ }
63
+
64
+ return {
65
+ ...vars,
66
+ [key]: {
67
+ ...existing,
68
+ ...(patch.label !== undefined ? { label: patch.label } : {}),
69
+ type: nextType,
70
+ arguments: mergedArgs,
71
+ },
72
+ };
73
+ });
74
+ }
75
+
76
+ export function deleteChannel(id: string): void {
77
+ const key = id;
78
+ useEditorStore.getState().setChannels((vars) => {
79
+ const { [key]: _drop, ...rest } = vars;
80
+ return rest;
81
+ });
82
+ const sel = useEditorStore.getState().selection;
83
+ if (sel.kind === "channel" && sel.id === id) {
84
+ useEditorStore.getState().clearSelection();
85
+ }
86
+ }