@mindlogic-ai/logician-ui 3.1.0 → 3.2.0-alpha.1

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 (509) hide show
  1. package/dist/components/Icon/_constants/iconList.d.ts +1 -1
  2. package/dist/components/Icon/_constants/iconList.d.ts.map +1 -1
  3. package/dist/components/Icon/_constants/iconList.js +18 -0
  4. package/dist/components/Icon/_constants/iconList.js.map +1 -1
  5. package/dist/components/Icon/_constants/iconList.mjs +20 -2
  6. package/dist/components/Icon/_constants/iconList.mjs.map +1 -1
  7. package/dist/components/Icon/index.d.ts +2 -1
  8. package/dist/components/Icon/index.d.ts.map +1 -1
  9. package/dist/components/Icon/index.js +20 -1
  10. package/dist/components/Icon/index.js.map +1 -1
  11. package/dist/components/Icon/index.mjs +4 -2
  12. package/dist/components/Icon/index.mjs.map +1 -1
  13. package/dist/components/Tree/Tree.d.ts +20 -0
  14. package/dist/components/Tree/Tree.d.ts.map +1 -0
  15. package/dist/components/Tree/Tree.js +43 -0
  16. package/dist/components/Tree/Tree.js.map +1 -0
  17. package/dist/components/Tree/Tree.mjs +41 -0
  18. package/dist/components/Tree/Tree.mjs.map +1 -0
  19. package/dist/components/Tree/Tree.types.d.ts +21 -0
  20. package/dist/components/Tree/Tree.types.d.ts.map +1 -0
  21. package/dist/components/Tree/TreeBranch.d.ts +3 -0
  22. package/dist/components/Tree/TreeBranch.d.ts.map +1 -0
  23. package/dist/components/Tree/TreeBranch.js +14 -0
  24. package/dist/components/Tree/TreeBranch.js.map +1 -0
  25. package/dist/components/Tree/TreeBranch.mjs +12 -0
  26. package/dist/components/Tree/TreeBranch.mjs.map +1 -0
  27. package/dist/components/Tree/TreeBranchContent.d.ts +3 -0
  28. package/dist/components/Tree/TreeBranchContent.d.ts.map +1 -0
  29. package/dist/components/Tree/TreeBranchContent.js +14 -0
  30. package/dist/components/Tree/TreeBranchContent.js.map +1 -0
  31. package/dist/components/Tree/TreeBranchContent.mjs +12 -0
  32. package/dist/components/Tree/TreeBranchContent.mjs.map +1 -0
  33. package/dist/components/Tree/TreeBranchControl.d.ts +3 -0
  34. package/dist/components/Tree/TreeBranchControl.d.ts.map +1 -0
  35. package/dist/components/Tree/TreeBranchControl.js +19 -0
  36. package/dist/components/Tree/TreeBranchControl.js.map +1 -0
  37. package/dist/components/Tree/TreeBranchControl.mjs +17 -0
  38. package/dist/components/Tree/TreeBranchControl.mjs.map +1 -0
  39. package/dist/components/Tree/TreeBranchIndentGuide.d.ts +3 -0
  40. package/dist/components/Tree/TreeBranchIndentGuide.d.ts.map +1 -0
  41. package/dist/components/Tree/TreeBranchIndentGuide.js +20 -0
  42. package/dist/components/Tree/TreeBranchIndentGuide.js.map +1 -0
  43. package/dist/components/Tree/TreeBranchIndentGuide.mjs +18 -0
  44. package/dist/components/Tree/TreeBranchIndentGuide.mjs.map +1 -0
  45. package/dist/components/Tree/TreeBranchIndicator.d.ts +3 -0
  46. package/dist/components/Tree/TreeBranchIndicator.d.ts.map +1 -0
  47. package/dist/components/Tree/TreeBranchIndicator.js +15 -0
  48. package/dist/components/Tree/TreeBranchIndicator.js.map +1 -0
  49. package/dist/components/Tree/TreeBranchIndicator.mjs +13 -0
  50. package/dist/components/Tree/TreeBranchIndicator.mjs.map +1 -0
  51. package/dist/components/Tree/TreeBranchText.d.ts +3 -0
  52. package/dist/components/Tree/TreeBranchText.d.ts.map +1 -0
  53. package/dist/components/Tree/TreeBranchText.js +14 -0
  54. package/dist/components/Tree/TreeBranchText.js.map +1 -0
  55. package/dist/components/Tree/TreeBranchText.mjs +12 -0
  56. package/dist/components/Tree/TreeBranchText.mjs.map +1 -0
  57. package/dist/components/Tree/TreeBranchTrigger.d.ts +3 -0
  58. package/dist/components/Tree/TreeBranchTrigger.d.ts.map +1 -0
  59. package/dist/components/Tree/TreeBranchTrigger.js +15 -0
  60. package/dist/components/Tree/TreeBranchTrigger.js.map +1 -0
  61. package/dist/components/Tree/TreeBranchTrigger.mjs +13 -0
  62. package/dist/components/Tree/TreeBranchTrigger.mjs.map +1 -0
  63. package/dist/components/Tree/TreeItem.d.ts +3 -0
  64. package/dist/components/Tree/TreeItem.d.ts.map +1 -0
  65. package/dist/components/Tree/TreeItem.js +25 -0
  66. package/dist/components/Tree/TreeItem.js.map +1 -0
  67. package/dist/components/Tree/TreeItem.mjs +23 -0
  68. package/dist/components/Tree/TreeItem.mjs.map +1 -0
  69. package/dist/components/Tree/TreeItemIndicator.d.ts +3 -0
  70. package/dist/components/Tree/TreeItemIndicator.d.ts.map +1 -0
  71. package/dist/components/Tree/TreeItemIndicator.js +14 -0
  72. package/dist/components/Tree/TreeItemIndicator.js.map +1 -0
  73. package/dist/components/Tree/TreeItemIndicator.mjs +12 -0
  74. package/dist/components/Tree/TreeItemIndicator.mjs.map +1 -0
  75. package/dist/components/Tree/TreeItemText.d.ts +3 -0
  76. package/dist/components/Tree/TreeItemText.d.ts.map +1 -0
  77. package/dist/components/Tree/TreeItemText.js +14 -0
  78. package/dist/components/Tree/TreeItemText.js.map +1 -0
  79. package/dist/components/Tree/TreeItemText.mjs +12 -0
  80. package/dist/components/Tree/TreeItemText.mjs.map +1 -0
  81. package/dist/components/Tree/TreeLabel.d.ts +3 -0
  82. package/dist/components/Tree/TreeLabel.d.ts.map +1 -0
  83. package/dist/components/Tree/TreeLabel.js +14 -0
  84. package/dist/components/Tree/TreeLabel.js.map +1 -0
  85. package/dist/components/Tree/TreeLabel.mjs +12 -0
  86. package/dist/components/Tree/TreeLabel.mjs.map +1 -0
  87. package/dist/components/Tree/TreeNode.d.ts +5 -0
  88. package/dist/components/Tree/TreeNode.d.ts.map +1 -0
  89. package/dist/components/Tree/TreeNode.js +9 -0
  90. package/dist/components/Tree/TreeNode.js.map +1 -0
  91. package/dist/components/Tree/TreeNode.mjs +7 -0
  92. package/dist/components/Tree/TreeNode.mjs.map +1 -0
  93. package/dist/components/Tree/TreeNodeCheckbox.d.ts +3 -0
  94. package/dist/components/Tree/TreeNodeCheckbox.d.ts.map +1 -0
  95. package/dist/components/Tree/TreeNodeCheckbox.js +14 -0
  96. package/dist/components/Tree/TreeNodeCheckbox.js.map +1 -0
  97. package/dist/components/Tree/TreeNodeCheckbox.mjs +12 -0
  98. package/dist/components/Tree/TreeNodeCheckbox.mjs.map +1 -0
  99. package/dist/components/Tree/TreeNodeContext.d.ts +2 -0
  100. package/dist/components/Tree/TreeNodeContext.d.ts.map +1 -0
  101. package/dist/components/Tree/TreeNodeContext.js +9 -0
  102. package/dist/components/Tree/TreeNodeContext.js.map +1 -0
  103. package/dist/components/Tree/TreeNodeContext.mjs +7 -0
  104. package/dist/components/Tree/TreeNodeContext.mjs.map +1 -0
  105. package/dist/components/Tree/TreeNodeProvider.d.ts +5 -0
  106. package/dist/components/Tree/TreeNodeProvider.d.ts.map +1 -0
  107. package/dist/components/Tree/TreeNodeProvider.js +9 -0
  108. package/dist/components/Tree/TreeNodeProvider.js.map +1 -0
  109. package/dist/components/Tree/TreeNodeProvider.mjs +7 -0
  110. package/dist/components/Tree/TreeNodeProvider.mjs.map +1 -0
  111. package/dist/components/Tree/TreeRoot.d.ts +3 -0
  112. package/dist/components/Tree/TreeRoot.d.ts.map +1 -0
  113. package/dist/components/Tree/TreeRoot.js +14 -0
  114. package/dist/components/Tree/TreeRoot.js.map +1 -0
  115. package/dist/components/Tree/TreeRoot.mjs +12 -0
  116. package/dist/components/Tree/TreeRoot.mjs.map +1 -0
  117. package/dist/components/Tree/TreeTree.d.ts +3 -0
  118. package/dist/components/Tree/TreeTree.d.ts.map +1 -0
  119. package/dist/components/Tree/TreeTree.js +14 -0
  120. package/dist/components/Tree/TreeTree.js.map +1 -0
  121. package/dist/components/Tree/TreeTree.mjs +12 -0
  122. package/dist/components/Tree/TreeTree.mjs.map +1 -0
  123. package/dist/components/Tree/index.d.ts +23 -0
  124. package/dist/components/Tree/index.d.ts.map +1 -0
  125. package/dist/components/Workflow/Workflow.d.ts +3 -0
  126. package/dist/components/Workflow/Workflow.d.ts.map +1 -0
  127. package/dist/components/Workflow/Workflow.js +109 -0
  128. package/dist/components/Workflow/Workflow.js.map +1 -0
  129. package/dist/components/Workflow/Workflow.mjs +107 -0
  130. package/dist/components/Workflow/Workflow.mjs.map +1 -0
  131. package/dist/components/Workflow/Workflow.translations.json.js +164 -0
  132. package/dist/components/Workflow/Workflow.translations.json.js.map +1 -0
  133. package/dist/components/Workflow/Workflow.translations.json.mjs +138 -0
  134. package/dist/components/Workflow/Workflow.translations.json.mjs.map +1 -0
  135. package/dist/components/Workflow/Workflow.types.d.ts +435 -0
  136. package/dist/components/Workflow/Workflow.types.d.ts.map +1 -0
  137. package/dist/components/Workflow/Workflow.types.js +19 -0
  138. package/dist/components/Workflow/Workflow.types.js.map +1 -0
  139. package/dist/components/Workflow/Workflow.types.mjs +16 -0
  140. package/dist/components/Workflow/Workflow.types.mjs.map +1 -0
  141. package/dist/components/Workflow/WorkflowContext/WorkflowContext.d.ts +10 -0
  142. package/dist/components/Workflow/WorkflowContext/WorkflowContext.d.ts.map +1 -0
  143. package/dist/components/Workflow/WorkflowContext/WorkflowContext.js +163 -0
  144. package/dist/components/Workflow/WorkflowContext/WorkflowContext.js.map +1 -0
  145. package/dist/components/Workflow/WorkflowContext/WorkflowContext.mjs +159 -0
  146. package/dist/components/Workflow/WorkflowContext/WorkflowContext.mjs.map +1 -0
  147. package/dist/components/Workflow/WorkflowContext/WorkflowContext.types.d.ts +117 -0
  148. package/dist/components/Workflow/WorkflowContext/WorkflowContext.types.d.ts.map +1 -0
  149. package/dist/components/Workflow/WorkflowContext/index.d.ts +3 -0
  150. package/dist/components/Workflow/WorkflowContext/index.d.ts.map +1 -0
  151. package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.d.ts +19 -0
  152. package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.d.ts.map +1 -0
  153. package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.js +44 -0
  154. package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.js.map +1 -0
  155. package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.mjs +42 -0
  156. package/dist/components/Workflow/canvas/Canvas/BranchLabelBadge.mjs.map +1 -0
  157. package/dist/components/Workflow/canvas/Canvas/Canvas.d.ts +10 -0
  158. package/dist/components/Workflow/canvas/Canvas/Canvas.d.ts.map +1 -0
  159. package/dist/components/Workflow/canvas/Canvas/Canvas.js +531 -0
  160. package/dist/components/Workflow/canvas/Canvas/Canvas.js.map +1 -0
  161. package/dist/components/Workflow/canvas/Canvas/Canvas.mjs +529 -0
  162. package/dist/components/Workflow/canvas/Canvas/Canvas.mjs.map +1 -0
  163. package/dist/components/Workflow/canvas/Canvas/Canvas.styles.d.ts +53 -0
  164. package/dist/components/Workflow/canvas/Canvas/Canvas.styles.d.ts.map +1 -0
  165. package/dist/components/Workflow/canvas/Canvas/Canvas.styles.js +96 -0
  166. package/dist/components/Workflow/canvas/Canvas/Canvas.styles.js.map +1 -0
  167. package/dist/components/Workflow/canvas/Canvas/Canvas.styles.mjs +93 -0
  168. package/dist/components/Workflow/canvas/Canvas/Canvas.styles.mjs.map +1 -0
  169. package/dist/components/Workflow/canvas/Canvas/CanvasControls.d.ts +27 -0
  170. package/dist/components/Workflow/canvas/Canvas/CanvasControls.d.ts.map +1 -0
  171. package/dist/components/Workflow/canvas/Canvas/CanvasControls.js +70 -0
  172. package/dist/components/Workflow/canvas/Canvas/CanvasControls.js.map +1 -0
  173. package/dist/components/Workflow/canvas/Canvas/CanvasControls.mjs +68 -0
  174. package/dist/components/Workflow/canvas/Canvas/CanvasControls.mjs.map +1 -0
  175. package/dist/components/Workflow/canvas/Canvas/LabeledEdge.d.ts +10 -0
  176. package/dist/components/Workflow/canvas/Canvas/LabeledEdge.d.ts.map +1 -0
  177. package/dist/components/Workflow/canvas/Canvas/LabeledEdge.js +106 -0
  178. package/dist/components/Workflow/canvas/Canvas/LabeledEdge.js.map +1 -0
  179. package/dist/components/Workflow/canvas/Canvas/LabeledEdge.mjs +104 -0
  180. package/dist/components/Workflow/canvas/Canvas/LabeledEdge.mjs.map +1 -0
  181. package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.d.ts +13 -0
  182. package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.d.ts.map +1 -0
  183. package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.js +18 -0
  184. package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.js.map +1 -0
  185. package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.mjs +16 -0
  186. package/dist/components/Workflow/canvas/Canvas/edgeLabelVariant.mjs.map +1 -0
  187. package/dist/components/Workflow/canvas/Canvas/index.d.ts +2 -0
  188. package/dist/components/Workflow/canvas/Canvas/index.d.ts.map +1 -0
  189. package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.d.ts +30 -0
  190. package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.d.ts.map +1 -0
  191. package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.js +34 -0
  192. package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.js.map +1 -0
  193. package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.mjs +32 -0
  194. package/dist/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.mjs.map +1 -0
  195. package/dist/components/Workflow/canvas/CollapsibleSection/index.d.ts +2 -0
  196. package/dist/components/Workflow/canvas/CollapsibleSection/index.d.ts.map +1 -0
  197. package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.d.ts +37 -0
  198. package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.d.ts.map +1 -0
  199. package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.js +33 -0
  200. package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.js.map +1 -0
  201. package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.mjs +31 -0
  202. package/dist/components/Workflow/canvas/DrawerShell/DrawerHeader.mjs.map +1 -0
  203. package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.d.ts +16 -0
  204. package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.d.ts.map +1 -0
  205. package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.js +54 -0
  206. package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.js.map +1 -0
  207. package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.mjs +52 -0
  208. package/dist/components/Workflow/canvas/DrawerShell/DrawerIssues.mjs.map +1 -0
  209. package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.d.ts +27 -0
  210. package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.d.ts.map +1 -0
  211. package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.js +178 -0
  212. package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.js.map +1 -0
  213. package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.mjs +176 -0
  214. package/dist/components/Workflow/canvas/DrawerShell/DrawerShell.mjs.map +1 -0
  215. package/dist/components/Workflow/canvas/DrawerShell/index.d.ts +3 -0
  216. package/dist/components/Workflow/canvas/DrawerShell/index.d.ts.map +1 -0
  217. package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.d.ts +12 -0
  218. package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.d.ts.map +1 -0
  219. package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.js +68 -0
  220. package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.js.map +1 -0
  221. package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.mjs +66 -0
  222. package/dist/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.mjs.map +1 -0
  223. package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.d.ts +19 -0
  224. package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.d.ts.map +1 -0
  225. package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.js +35 -0
  226. package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.js.map +1 -0
  227. package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.mjs +32 -0
  228. package/dist/components/Workflow/canvas/EdgeInspector/endpointTitle.mjs.map +1 -0
  229. package/dist/components/Workflow/canvas/EdgeInspector/index.d.ts +3 -0
  230. package/dist/components/Workflow/canvas/EdgeInspector/index.d.ts.map +1 -0
  231. package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.d.ts +54 -0
  232. package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.d.ts.map +1 -0
  233. package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.js +56 -0
  234. package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.js.map +1 -0
  235. package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.mjs +54 -0
  236. package/dist/components/Workflow/canvas/FieldWrapper/FieldWrapper.mjs.map +1 -0
  237. package/dist/components/Workflow/canvas/FieldWrapper/index.d.ts +3 -0
  238. package/dist/components/Workflow/canvas/FieldWrapper/index.d.ts.map +1 -0
  239. package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.d.ts +16 -0
  240. package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.d.ts.map +1 -0
  241. package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.js +25 -0
  242. package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.js.map +1 -0
  243. package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.mjs +22 -0
  244. package/dist/components/Workflow/canvas/FloatingCard/FloatingCard.mjs.map +1 -0
  245. package/dist/components/Workflow/canvas/FloatingCard/index.d.ts +2 -0
  246. package/dist/components/Workflow/canvas/FloatingCard/index.d.ts.map +1 -0
  247. package/dist/components/Workflow/canvas/GenericNode/GenericNode.d.ts +14 -0
  248. package/dist/components/Workflow/canvas/GenericNode/GenericNode.d.ts.map +1 -0
  249. package/dist/components/Workflow/canvas/GenericNode/GenericNode.js +61 -0
  250. package/dist/components/Workflow/canvas/GenericNode/GenericNode.js.map +1 -0
  251. package/dist/components/Workflow/canvas/GenericNode/GenericNode.mjs +59 -0
  252. package/dist/components/Workflow/canvas/GenericNode/GenericNode.mjs.map +1 -0
  253. package/dist/components/Workflow/canvas/GenericNode/GenericNode.types.d.ts +11 -0
  254. package/dist/components/Workflow/canvas/GenericNode/GenericNode.types.d.ts.map +1 -0
  255. package/dist/components/Workflow/canvas/GenericNode/index.d.ts +3 -0
  256. package/dist/components/Workflow/canvas/GenericNode/index.d.ts.map +1 -0
  257. package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.d.ts +15 -0
  258. package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.d.ts.map +1 -0
  259. package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.js +145 -0
  260. package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.js.map +1 -0
  261. package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.mjs +143 -0
  262. package/dist/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.mjs.map +1 -0
  263. package/dist/components/Workflow/canvas/GraphErrorBanner/index.d.ts +2 -0
  264. package/dist/components/Workflow/canvas/GraphErrorBanner/index.d.ts.map +1 -0
  265. package/dist/components/Workflow/canvas/IconTile/IconTile.d.ts +10 -0
  266. package/dist/components/Workflow/canvas/IconTile/IconTile.d.ts.map +1 -0
  267. package/dist/components/Workflow/canvas/IconTile/IconTile.js +21 -0
  268. package/dist/components/Workflow/canvas/IconTile/IconTile.js.map +1 -0
  269. package/dist/components/Workflow/canvas/IconTile/IconTile.mjs +19 -0
  270. package/dist/components/Workflow/canvas/IconTile/IconTile.mjs.map +1 -0
  271. package/dist/components/Workflow/canvas/IconTile/IconTile.styles.d.ts +18 -0
  272. package/dist/components/Workflow/canvas/IconTile/IconTile.styles.d.ts.map +1 -0
  273. package/dist/components/Workflow/canvas/IconTile/IconTile.styles.js +40 -0
  274. package/dist/components/Workflow/canvas/IconTile/IconTile.styles.js.map +1 -0
  275. package/dist/components/Workflow/canvas/IconTile/IconTile.styles.mjs +37 -0
  276. package/dist/components/Workflow/canvas/IconTile/IconTile.styles.mjs.map +1 -0
  277. package/dist/components/Workflow/canvas/IconTile/IconTile.types.d.ts +15 -0
  278. package/dist/components/Workflow/canvas/IconTile/IconTile.types.d.ts.map +1 -0
  279. package/dist/components/Workflow/canvas/IconTile/index.d.ts +4 -0
  280. package/dist/components/Workflow/canvas/IconTile/index.d.ts.map +1 -0
  281. package/dist/components/Workflow/canvas/IssueList/IssueList.d.ts +24 -0
  282. package/dist/components/Workflow/canvas/IssueList/IssueList.d.ts.map +1 -0
  283. package/dist/components/Workflow/canvas/IssueList/IssueList.js +34 -0
  284. package/dist/components/Workflow/canvas/IssueList/IssueList.js.map +1 -0
  285. package/dist/components/Workflow/canvas/IssueList/IssueList.mjs +32 -0
  286. package/dist/components/Workflow/canvas/IssueList/IssueList.mjs.map +1 -0
  287. package/dist/components/Workflow/canvas/IssueList/index.d.ts +2 -0
  288. package/dist/components/Workflow/canvas/IssueList/index.d.ts.map +1 -0
  289. package/dist/components/Workflow/canvas/NodePalette/NodePalette.d.ts +9 -0
  290. package/dist/components/Workflow/canvas/NodePalette/NodePalette.d.ts.map +1 -0
  291. package/dist/components/Workflow/canvas/NodePalette/NodePalette.js +94 -0
  292. package/dist/components/Workflow/canvas/NodePalette/NodePalette.js.map +1 -0
  293. package/dist/components/Workflow/canvas/NodePalette/NodePalette.mjs +92 -0
  294. package/dist/components/Workflow/canvas/NodePalette/NodePalette.mjs.map +1 -0
  295. package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.d.ts +7 -0
  296. package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.d.ts.map +1 -0
  297. package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.js +13 -0
  298. package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.js.map +1 -0
  299. package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.mjs +10 -0
  300. package/dist/components/Workflow/canvas/NodePalette/NodePalette.styles.mjs.map +1 -0
  301. package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.d.ts +10 -0
  302. package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.d.ts.map +1 -0
  303. package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.js +28 -0
  304. package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.js.map +1 -0
  305. package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.mjs +26 -0
  306. package/dist/components/Workflow/canvas/NodePalette/NodePaletteToggle.mjs.map +1 -0
  307. package/dist/components/Workflow/canvas/NodePalette/index.d.ts +4 -0
  308. package/dist/components/Workflow/canvas/NodePalette/index.d.ts.map +1 -0
  309. package/dist/components/Workflow/canvas/NodeShell/NodeShell.d.ts +3 -0
  310. package/dist/components/Workflow/canvas/NodeShell/NodeShell.d.ts.map +1 -0
  311. package/dist/components/Workflow/canvas/NodeShell/NodeShell.js +137 -0
  312. package/dist/components/Workflow/canvas/NodeShell/NodeShell.js.map +1 -0
  313. package/dist/components/Workflow/canvas/NodeShell/NodeShell.mjs +135 -0
  314. package/dist/components/Workflow/canvas/NodeShell/NodeShell.mjs.map +1 -0
  315. package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.d.ts +66 -0
  316. package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.d.ts.map +1 -0
  317. package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.js +87 -0
  318. package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.js.map +1 -0
  319. package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.mjs +77 -0
  320. package/dist/components/Workflow/canvas/NodeShell/NodeShell.styles.mjs.map +1 -0
  321. package/dist/components/Workflow/canvas/NodeShell/NodeShell.types.d.ts +35 -0
  322. package/dist/components/Workflow/canvas/NodeShell/NodeShell.types.d.ts.map +1 -0
  323. package/dist/components/Workflow/canvas/NodeShell/index.d.ts +4 -0
  324. package/dist/components/Workflow/canvas/NodeShell/index.d.ts.map +1 -0
  325. package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.d.ts +15 -0
  326. package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.d.ts.map +1 -0
  327. package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.js +14 -0
  328. package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.js.map +1 -0
  329. package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.mjs +12 -0
  330. package/dist/components/Workflow/canvas/SeverityDot/SeverityDot.mjs.map +1 -0
  331. package/dist/components/Workflow/canvas/SeverityDot/index.d.ts +2 -0
  332. package/dist/components/Workflow/canvas/SeverityDot/index.d.ts.map +1 -0
  333. package/dist/components/Workflow/canvas/issueSeverity.d.ts +23 -0
  334. package/dist/components/Workflow/canvas/issueSeverity.d.ts.map +1 -0
  335. package/dist/components/Workflow/canvas/issueSeverity.js +51 -0
  336. package/dist/components/Workflow/canvas/issueSeverity.js.map +1 -0
  337. package/dist/components/Workflow/canvas/issueSeverity.mjs +47 -0
  338. package/dist/components/Workflow/canvas/issueSeverity.mjs.map +1 -0
  339. package/dist/components/Workflow/canvas/useFieldFocusRequest.d.ts +14 -0
  340. package/dist/components/Workflow/canvas/useFieldFocusRequest.d.ts.map +1 -0
  341. package/dist/components/Workflow/canvas/useFieldFocusRequest.js +48 -0
  342. package/dist/components/Workflow/canvas/useFieldFocusRequest.js.map +1 -0
  343. package/dist/components/Workflow/canvas/useFieldFocusRequest.mjs +46 -0
  344. package/dist/components/Workflow/canvas/useFieldFocusRequest.mjs.map +1 -0
  345. package/dist/components/Workflow/canvas/workflowLabelProps.d.ts +12 -0
  346. package/dist/components/Workflow/canvas/workflowLabelProps.d.ts.map +1 -0
  347. package/dist/components/Workflow/canvas/workflowLabelProps.js +17 -0
  348. package/dist/components/Workflow/canvas/workflowLabelProps.js.map +1 -0
  349. package/dist/components/Workflow/canvas/workflowLabelProps.mjs +15 -0
  350. package/dist/components/Workflow/canvas/workflowLabelProps.mjs.map +1 -0
  351. package/dist/components/Workflow/connectionRules.d.ts +59 -0
  352. package/dist/components/Workflow/connectionRules.d.ts.map +1 -0
  353. package/dist/components/Workflow/connectionRules.js +150 -0
  354. package/dist/components/Workflow/connectionRules.js.map +1 -0
  355. package/dist/components/Workflow/connectionRules.mjs +145 -0
  356. package/dist/components/Workflow/connectionRules.mjs.map +1 -0
  357. package/dist/components/Workflow/createNode.d.ts +27 -0
  358. package/dist/components/Workflow/createNode.d.ts.map +1 -0
  359. package/dist/components/Workflow/createNode.js +66 -0
  360. package/dist/components/Workflow/createNode.js.map +1 -0
  361. package/dist/components/Workflow/createNode.mjs +62 -0
  362. package/dist/components/Workflow/createNode.mjs.map +1 -0
  363. package/dist/components/Workflow/graphHistory.d.ts +23 -0
  364. package/dist/components/Workflow/graphHistory.d.ts.map +1 -0
  365. package/dist/components/Workflow/graphHistory.js +73 -0
  366. package/dist/components/Workflow/graphHistory.js.map +1 -0
  367. package/dist/components/Workflow/graphHistory.mjs +70 -0
  368. package/dist/components/Workflow/graphHistory.mjs.map +1 -0
  369. package/dist/components/Workflow/graphObserver.d.ts +13 -0
  370. package/dist/components/Workflow/graphObserver.d.ts.map +1 -0
  371. package/dist/components/Workflow/graphObserver.js +11 -0
  372. package/dist/components/Workflow/graphObserver.js.map +1 -0
  373. package/dist/components/Workflow/graphObserver.mjs +8 -0
  374. package/dist/components/Workflow/graphObserver.mjs.map +1 -0
  375. package/dist/components/Workflow/graphReducer.d.ts +75 -0
  376. package/dist/components/Workflow/graphReducer.d.ts.map +1 -0
  377. package/dist/components/Workflow/graphReducer.js +122 -0
  378. package/dist/components/Workflow/graphReducer.js.map +1 -0
  379. package/dist/components/Workflow/graphReducer.mjs +119 -0
  380. package/dist/components/Workflow/graphReducer.mjs.map +1 -0
  381. package/dist/components/Workflow/index.d.ts +22 -0
  382. package/dist/components/Workflow/index.d.ts.map +1 -0
  383. package/dist/components/Workflow/layout/autoLayout.d.ts +49 -0
  384. package/dist/components/Workflow/layout/autoLayout.d.ts.map +1 -0
  385. package/dist/components/Workflow/layout/autoLayout.js +149 -0
  386. package/dist/components/Workflow/layout/autoLayout.js.map +1 -0
  387. package/dist/components/Workflow/layout/autoLayout.mjs +146 -0
  388. package/dist/components/Workflow/layout/autoLayout.mjs.map +1 -0
  389. package/dist/components/Workflow/stories/toyNodeTypes.d.ts +40 -0
  390. package/dist/components/Workflow/stories/toyNodeTypes.d.ts.map +1 -0
  391. package/dist/components/Workflow/useWorkflowIssueMessage.d.ts +15 -0
  392. package/dist/components/Workflow/useWorkflowIssueMessage.d.ts.map +1 -0
  393. package/dist/components/Workflow/useWorkflowIssueMessage.js +45 -0
  394. package/dist/components/Workflow/useWorkflowIssueMessage.js.map +1 -0
  395. package/dist/components/Workflow/useWorkflowIssueMessage.mjs +43 -0
  396. package/dist/components/Workflow/useWorkflowIssueMessage.mjs.map +1 -0
  397. package/dist/components/Workflow/useWorkflowKeyboard.d.ts +10 -0
  398. package/dist/components/Workflow/useWorkflowKeyboard.d.ts.map +1 -0
  399. package/dist/components/Workflow/useWorkflowKeyboard.js +116 -0
  400. package/dist/components/Workflow/useWorkflowKeyboard.js.map +1 -0
  401. package/dist/components/Workflow/useWorkflowKeyboard.mjs +114 -0
  402. package/dist/components/Workflow/useWorkflowKeyboard.mjs.map +1 -0
  403. package/dist/icons.js +17 -0
  404. package/dist/icons.js.map +1 -1
  405. package/dist/icons.mjs +1 -1
  406. package/dist/index.d.ts +2 -0
  407. package/dist/index.d.ts.map +1 -1
  408. package/dist/index.js +78 -0
  409. package/dist/index.js.map +1 -1
  410. package/dist/index.mjs +33 -1
  411. package/dist/index.mjs.map +1 -1
  412. package/dist/test-support/setup.d.ts +5 -0
  413. package/dist/test-support/setup.d.ts.map +1 -0
  414. package/package.json +10 -2
  415. package/src/components/Icon/_constants/iconList.ts +35 -0
  416. package/src/components/Icon/index.tsx +20 -0
  417. package/src/components/Tree/Tree.stories.tsx +564 -0
  418. package/src/components/Tree/Tree.tsx +37 -0
  419. package/src/components/Tree/Tree.types.ts +51 -0
  420. package/src/components/Tree/TreeBranch.tsx +11 -0
  421. package/src/components/Tree/TreeBranchContent.tsx +21 -0
  422. package/src/components/Tree/TreeBranchControl.tsx +28 -0
  423. package/src/components/Tree/TreeBranchIndentGuide.tsx +20 -0
  424. package/src/components/Tree/TreeBranchIndicator.tsx +27 -0
  425. package/src/components/Tree/TreeBranchText.tsx +19 -0
  426. package/src/components/Tree/TreeBranchTrigger.tsx +25 -0
  427. package/src/components/Tree/TreeItem.tsx +33 -0
  428. package/src/components/Tree/TreeItemIndicator.tsx +20 -0
  429. package/src/components/Tree/TreeItemText.tsx +19 -0
  430. package/src/components/Tree/TreeLabel.tsx +19 -0
  431. package/src/components/Tree/TreeNode.tsx +6 -0
  432. package/src/components/Tree/TreeNodeCheckbox.tsx +12 -0
  433. package/src/components/Tree/TreeNodeContext.tsx +3 -0
  434. package/src/components/Tree/TreeNodeProvider.tsx +6 -0
  435. package/src/components/Tree/TreeRoot.tsx +11 -0
  436. package/src/components/Tree/TreeTree.tsx +11 -0
  437. package/src/components/Tree/index.ts +42 -0
  438. package/src/components/Workflow/README.md +362 -0
  439. package/src/components/Workflow/Workflow.translations.json +112 -0
  440. package/src/components/Workflow/Workflow.tsx +189 -0
  441. package/src/components/Workflow/Workflow.types.ts +496 -0
  442. package/src/components/Workflow/WorkflowContext/WorkflowContext.tsx +215 -0
  443. package/src/components/Workflow/WorkflowContext/WorkflowContext.types.ts +122 -0
  444. package/src/components/Workflow/WorkflowContext/index.ts +10 -0
  445. package/src/components/Workflow/WorkflowContext/workflowSelection.test.tsx +93 -0
  446. package/src/components/Workflow/canvas/Canvas/BranchLabelBadge.tsx +69 -0
  447. package/src/components/Workflow/canvas/Canvas/Canvas.styles.ts +91 -0
  448. package/src/components/Workflow/canvas/Canvas/Canvas.tsx +773 -0
  449. package/src/components/Workflow/canvas/Canvas/CanvasControls.tsx +178 -0
  450. package/src/components/Workflow/canvas/Canvas/LabeledEdge.tsx +198 -0
  451. package/src/components/Workflow/canvas/Canvas/edgeLabelVariant.test.ts +26 -0
  452. package/src/components/Workflow/canvas/Canvas/edgeLabelVariant.ts +23 -0
  453. package/src/components/Workflow/canvas/Canvas/index.ts +1 -0
  454. package/src/components/Workflow/canvas/CollapsibleSection/CollapsibleSection.tsx +96 -0
  455. package/src/components/Workflow/canvas/CollapsibleSection/index.ts +4 -0
  456. package/src/components/Workflow/canvas/DrawerShell/DrawerHeader.tsx +104 -0
  457. package/src/components/Workflow/canvas/DrawerShell/DrawerIssues.tsx +115 -0
  458. package/src/components/Workflow/canvas/DrawerShell/DrawerShell.tsx +408 -0
  459. package/src/components/Workflow/canvas/DrawerShell/index.ts +2 -0
  460. package/src/components/Workflow/canvas/EdgeInspector/BuiltInEdgeInspector.tsx +135 -0
  461. package/src/components/Workflow/canvas/EdgeInspector/endpointTitle.ts +38 -0
  462. package/src/components/Workflow/canvas/EdgeInspector/index.ts +2 -0
  463. package/src/components/Workflow/canvas/FieldWrapper/FieldWrapper.tsx +118 -0
  464. package/src/components/Workflow/canvas/FieldWrapper/index.ts +6 -0
  465. package/src/components/Workflow/canvas/FloatingCard/FloatingCard.tsx +37 -0
  466. package/src/components/Workflow/canvas/FloatingCard/index.ts +1 -0
  467. package/src/components/Workflow/canvas/GenericNode/GenericNode.tsx +114 -0
  468. package/src/components/Workflow/canvas/GenericNode/GenericNode.types.ts +10 -0
  469. package/src/components/Workflow/canvas/GenericNode/index.ts +5 -0
  470. package/src/components/Workflow/canvas/GraphErrorBanner/GraphErrorBanner.tsx +284 -0
  471. package/src/components/Workflow/canvas/GraphErrorBanner/index.ts +1 -0
  472. package/src/components/Workflow/canvas/IconTile/IconTile.styles.ts +40 -0
  473. package/src/components/Workflow/canvas/IconTile/IconTile.tsx +36 -0
  474. package/src/components/Workflow/canvas/IconTile/IconTile.types.ts +13 -0
  475. package/src/components/Workflow/canvas/IconTile/index.ts +7 -0
  476. package/src/components/Workflow/canvas/IssueList/IssueList.tsx +84 -0
  477. package/src/components/Workflow/canvas/IssueList/index.ts +1 -0
  478. package/src/components/Workflow/canvas/NodePalette/NodePalette.styles.ts +7 -0
  479. package/src/components/Workflow/canvas/NodePalette/NodePalette.tsx +180 -0
  480. package/src/components/Workflow/canvas/NodePalette/NodePaletteToggle.tsx +39 -0
  481. package/src/components/Workflow/canvas/NodePalette/index.ts +3 -0
  482. package/src/components/Workflow/canvas/NodeShell/NodeShell.styles.ts +84 -0
  483. package/src/components/Workflow/canvas/NodeShell/NodeShell.tsx +321 -0
  484. package/src/components/Workflow/canvas/NodeShell/NodeShell.types.ts +45 -0
  485. package/src/components/Workflow/canvas/NodeShell/index.ts +8 -0
  486. package/src/components/Workflow/canvas/SeverityDot/SeverityDot.tsx +33 -0
  487. package/src/components/Workflow/canvas/SeverityDot/index.ts +1 -0
  488. package/src/components/Workflow/canvas/issueSeverity.ts +48 -0
  489. package/src/components/Workflow/canvas/useFieldFocusRequest.ts +54 -0
  490. package/src/components/Workflow/canvas/workflowLabelProps.ts +11 -0
  491. package/src/components/Workflow/connectionRules.test.ts +326 -0
  492. package/src/components/Workflow/connectionRules.ts +190 -0
  493. package/src/components/Workflow/createNode.test.ts +61 -0
  494. package/src/components/Workflow/createNode.ts +67 -0
  495. package/src/components/Workflow/graphHistory.test.ts +178 -0
  496. package/src/components/Workflow/graphHistory.ts +91 -0
  497. package/src/components/Workflow/graphObserver.ts +21 -0
  498. package/src/components/Workflow/graphReducer.test.ts +314 -0
  499. package/src/components/Workflow/graphReducer.ts +196 -0
  500. package/src/components/Workflow/index.ts +74 -0
  501. package/src/components/Workflow/layout/autoLayout.test.ts +170 -0
  502. package/src/components/Workflow/layout/autoLayout.ts +200 -0
  503. package/src/components/Workflow/stories/Workflow.stories.tsx +111 -0
  504. package/src/components/Workflow/stories/toyNodeTypes.tsx +146 -0
  505. package/src/components/Workflow/useWorkflowIssueMessage.test.ts +101 -0
  506. package/src/components/Workflow/useWorkflowIssueMessage.ts +49 -0
  507. package/src/components/Workflow/useWorkflowKeyboard.ts +126 -0
  508. package/src/index.ts +2 -0
  509. package/src/test-support/setup.ts +11 -0
@@ -0,0 +1,47 @@
1
+ "use client";
2
+ import 'react/jsx-runtime';
3
+ import '@chakra-ui/react';
4
+ import { toastStyles } from '../../Toast/Toast.styles.mjs';
5
+ import '../../Icon/index.mjs';
6
+ import '../../Toast/Toaster.mjs';
7
+ import 'react';
8
+
9
+ const SEVERITY_PRECEDENCE = {
10
+ error: 2,
11
+ warning: 1,
12
+ };
13
+ /**
14
+ * The single issue a one-slot surface should represent: highest severity
15
+ * wins, first-listed breaks ties. Shared by every "tint by worst issue"
16
+ * consumer (field borders, the header title editor) so precedence can't
17
+ * drift between surfaces.
18
+ */
19
+ const pickPrimaryIssue = (issues) => {
20
+ if (issues.length === 0)
21
+ return null;
22
+ let primary = issues[0];
23
+ for (let i = 1; i < issues.length; i += 1) {
24
+ if (SEVERITY_PRECEDENCE[issues[i].severity] >
25
+ SEVERITY_PRECEDENCE[primary.severity]) {
26
+ primary = issues[i];
27
+ }
28
+ }
29
+ return primary;
30
+ };
31
+ /**
32
+ * Semantic color token for an issue severity — shared across issue list UIs.
33
+ * `tone` selects the shade: the default `'main'` for text/icons, or `'dark'`
34
+ * where `.main` is too light to read (e.g. the small list-bullet markers in
35
+ * drawer issue callouts, which need extra contrast against the tinted bg).
36
+ */
37
+ const severityColorToken = (severity, tone = 'main') => (severity === 'error' ? `danger.${tone}` : `warning.${tone}`);
38
+ /**
39
+ * Tinted callout styling (bg / border / text) for an issue severity. Reuses the
40
+ * `Toast` component's golden-ratio combo — the documented WCAG AA pairing — so
41
+ * the boxed inspector callouts stay in lockstep with it instead of restating
42
+ * the tokens. `IssueSeverity` is a subset of the toast statuses.
43
+ */
44
+ const severityCalloutStyle = (severity) => toastStyles[severity];
45
+
46
+ export { pickPrimaryIssue, severityCalloutStyle, severityColorToken };
47
+ //# sourceMappingURL=issueSeverity.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"issueSeverity.mjs","sources":["../../../../src/components/Workflow/canvas/issueSeverity.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;AAIA,MAAM,mBAAmB,GAAkC;AACzD,IAAA,KAAK,EAAE,CAAC;AACR,IAAA,OAAO,EAAE,CAAC;CACX;AAED;;;;;AAKG;AACI,MAAM,gBAAgB,GAAG,CAAC,MAAe,KAAkB;AAChE,IAAA,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;AAAE,QAAA,OAAO,IAAI;AACpC,IAAA,IAAI,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC;AACvB,IAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE;QACzC,IACE,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;AACvC,YAAA,mBAAmB,CAAC,OAAO,CAAC,QAAQ,CAAC,EACrC;AACA,YAAA,OAAO,GAAG,MAAM,CAAC,CAAC,CAAC;QACrB;IACF;AACA,IAAA,OAAO,OAAO;AAChB;AAEA;;;;;AAKG;AACI,MAAM,kBAAkB,GAAG,CAChC,QAAuB,EACvB,IAAA,GAAwB,MAAM,MAClB,QAAQ,KAAK,OAAO,GAAG,CAAA,OAAA,EAAU,IAAI,CAAA,CAAE,GAAG,CAAA,QAAA,EAAW,IAAI,CAAA,CAAE;AAEzE;;;;;AAKG;AACI,MAAM,oBAAoB,GAAG,CAAC,QAAuB,KAC1D,WAAW,CAAC,QAAQ;;;;"}
@@ -0,0 +1,14 @@
1
+ import { type RefObject } from 'react';
2
+ /**
3
+ * Wires a field surface into the `fieldFocusRequest` channel: when the canvas
4
+ * validation banner asks to jump to `(nodeId, fieldKey)`, the matching
5
+ * container scrolls into view and its first focusable element is focused,
6
+ * then the request is consumed so a re-render doesn't refocus repeatedly.
7
+ *
8
+ * Shared by `FieldWrapper` (body fields) and `NodeTitleEditable` (the header
9
+ * rename editor) so the jump protocol can't drift between them. The selector
10
+ * includes the editable's `[data-part="preview"]` — focusing it activates
11
+ * edit mode (activationMode "focus"); mid-edit its `input` matches first.
12
+ */
13
+ export declare function useFieldFocusRequest(nodeId: string, fieldKey: string, containerRef: RefObject<HTMLDivElement | null>): void;
14
+ //# sourceMappingURL=useFieldFocusRequest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFieldFocusRequest.d.ts","sourceRoot":"","sources":["../../../../src/components/Workflow/canvas/useFieldFocusRequest.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,OAAO,CAAC;AAIlD;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,GAC7C,IAAI,CAgCN"}
@@ -0,0 +1,48 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var React = require('react');
5
+ var WorkflowContext = require('../WorkflowContext/WorkflowContext.js');
6
+
7
+ /**
8
+ * Wires a field surface into the `fieldFocusRequest` channel: when the canvas
9
+ * validation banner asks to jump to `(nodeId, fieldKey)`, the matching
10
+ * container scrolls into view and its first focusable element is focused,
11
+ * then the request is consumed so a re-render doesn't refocus repeatedly.
12
+ *
13
+ * Shared by `FieldWrapper` (body fields) and `NodeTitleEditable` (the header
14
+ * rename editor) so the jump protocol can't drift between them. The selector
15
+ * includes the editable's `[data-part="preview"]` — focusing it activates
16
+ * edit mode (activationMode "focus"); mid-edit its `input` matches first.
17
+ */
18
+ function useFieldFocusRequest(nodeId, fieldKey, containerRef) {
19
+ const { fieldFocusRequest, consumeFieldFocusRequest } = WorkflowContext.useWorkflow();
20
+ React.useEffect(() => {
21
+ if (fieldFocusRequest?.nodeId !== nodeId ||
22
+ fieldFocusRequest.fieldKey !== fieldKey) {
23
+ return;
24
+ }
25
+ // Defer one frame so a freshly-mounted drawer has painted before we
26
+ // try to scroll/focus inside it.
27
+ const handle = requestAnimationFrame(() => {
28
+ const root = containerRef.current;
29
+ if (root) {
30
+ root.scrollIntoView({ block: 'center', behavior: 'smooth' });
31
+ root
32
+ .querySelector('input, textarea, [contenteditable="true"], select, button, [data-part="preview"]')
33
+ ?.focus();
34
+ }
35
+ consumeFieldFocusRequest();
36
+ });
37
+ return () => cancelAnimationFrame(handle);
38
+ }, [
39
+ fieldFocusRequest,
40
+ nodeId,
41
+ fieldKey,
42
+ containerRef,
43
+ consumeFieldFocusRequest,
44
+ ]);
45
+ }
46
+
47
+ exports.useFieldFocusRequest = useFieldFocusRequest;
48
+ //# sourceMappingURL=useFieldFocusRequest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFieldFocusRequest.js","sources":["../../../../src/components/Workflow/canvas/useFieldFocusRequest.ts"],"sourcesContent":[null],"names":["useWorkflow","useEffect"],"mappings":";;;;;;AAMA;;;;;;;;;;AAUG;SACa,oBAAoB,CAClC,MAAc,EACd,QAAgB,EAChB,YAA8C,EAAA;IAE9C,MAAM,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,GAAGA,2BAAW,EAAE;IAErEC,eAAS,CAAC,MAAK;AACb,QAAA,IACE,iBAAiB,EAAE,MAAM,KAAK,MAAM;AACpC,YAAA,iBAAiB,CAAC,QAAQ,KAAK,QAAQ,EACvC;YACA;QACF;;;AAGA,QAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,MAAK;AACxC,YAAA,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO;YACjC,IAAI,IAAI,EAAE;AACR,gBAAA,IAAI,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;gBAC5D;qBACG,aAAa,CACZ,kFAAkF;sBAElF,KAAK,EAAE;YACb;AACA,YAAA,wBAAwB,EAAE;AAC5B,QAAA,CAAC,CAAC;AACF,QAAA,OAAO,MAAM,oBAAoB,CAAC,MAAM,CAAC;AAC3C,IAAA,CAAC,EAAE;QACD,iBAAiB;QACjB,MAAM;QACN,QAAQ;QACR,YAAY;QACZ,wBAAwB;AACzB,KAAA,CAAC;AACJ;;;;"}
@@ -0,0 +1,46 @@
1
+ "use client";
2
+ import { useEffect } from 'react';
3
+ import { useWorkflow } from '../WorkflowContext/WorkflowContext.mjs';
4
+
5
+ /**
6
+ * Wires a field surface into the `fieldFocusRequest` channel: when the canvas
7
+ * validation banner asks to jump to `(nodeId, fieldKey)`, the matching
8
+ * container scrolls into view and its first focusable element is focused,
9
+ * then the request is consumed so a re-render doesn't refocus repeatedly.
10
+ *
11
+ * Shared by `FieldWrapper` (body fields) and `NodeTitleEditable` (the header
12
+ * rename editor) so the jump protocol can't drift between them. The selector
13
+ * includes the editable's `[data-part="preview"]` — focusing it activates
14
+ * edit mode (activationMode "focus"); mid-edit its `input` matches first.
15
+ */
16
+ function useFieldFocusRequest(nodeId, fieldKey, containerRef) {
17
+ const { fieldFocusRequest, consumeFieldFocusRequest } = useWorkflow();
18
+ useEffect(() => {
19
+ if (fieldFocusRequest?.nodeId !== nodeId ||
20
+ fieldFocusRequest.fieldKey !== fieldKey) {
21
+ return;
22
+ }
23
+ // Defer one frame so a freshly-mounted drawer has painted before we
24
+ // try to scroll/focus inside it.
25
+ const handle = requestAnimationFrame(() => {
26
+ const root = containerRef.current;
27
+ if (root) {
28
+ root.scrollIntoView({ block: 'center', behavior: 'smooth' });
29
+ root
30
+ .querySelector('input, textarea, [contenteditable="true"], select, button, [data-part="preview"]')
31
+ ?.focus();
32
+ }
33
+ consumeFieldFocusRequest();
34
+ });
35
+ return () => cancelAnimationFrame(handle);
36
+ }, [
37
+ fieldFocusRequest,
38
+ nodeId,
39
+ fieldKey,
40
+ containerRef,
41
+ consumeFieldFocusRequest,
42
+ ]);
43
+ }
44
+
45
+ export { useFieldFocusRequest };
46
+ //# sourceMappingURL=useFieldFocusRequest.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFieldFocusRequest.mjs","sources":["../../../../src/components/Workflow/canvas/useFieldFocusRequest.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;AAMA;;;;;;;;;;AAUG;SACa,oBAAoB,CAClC,MAAc,EACd,QAAgB,EAChB,YAA8C,EAAA;IAE9C,MAAM,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,GAAG,WAAW,EAAE;IAErE,SAAS,CAAC,MAAK;AACb,QAAA,IACE,iBAAiB,EAAE,MAAM,KAAK,MAAM;AACpC,YAAA,iBAAiB,CAAC,QAAQ,KAAK,QAAQ,EACvC;YACA;QACF;;;AAGA,QAAA,MAAM,MAAM,GAAG,qBAAqB,CAAC,MAAK;AACxC,YAAA,MAAM,IAAI,GAAG,YAAY,CAAC,OAAO;YACjC,IAAI,IAAI,EAAE;AACR,gBAAA,IAAI,CAAC,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAC;gBAC5D;qBACG,aAAa,CACZ,kFAAkF;sBAElF,KAAK,EAAE;YACb;AACA,YAAA,wBAAwB,EAAE;AAC5B,QAAA,CAAC,CAAC;AACF,QAAA,OAAO,MAAM,oBAAoB,CAAC,MAAM,CAAC;AAC3C,IAAA,CAAC,EAAE;QACD,iBAAiB;QACjB,MAAM;QACN,QAAQ;QACR,YAAY;QACZ,wBAAwB;AACzB,KAAA,CAAC;AACJ;;;;"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Shared label styling for inputs inside the workflow editor's drawer.
3
+ * Mirrors the outer ChatbotForm's `FieldLabel` heading tokens so the
4
+ * editor's inspector reads as the same form surface; the Workflow
5
+ * canvas can't import from the studio `app/` route, so this lives at
6
+ * the canvas layer instead.
7
+ */
8
+ export declare const workflowLabelProps: {
9
+ readonly fontWeight: "semibold";
10
+ readonly color: "slate.1300";
11
+ };
12
+ //# sourceMappingURL=workflowLabelProps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflowLabelProps.d.ts","sourceRoot":"","sources":["../../../../src/components/Workflow/canvas/workflowLabelProps.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;CAGrB,CAAC"}
@@ -0,0 +1,17 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ /**
5
+ * Shared label styling for inputs inside the workflow editor's drawer.
6
+ * Mirrors the outer ChatbotForm's `FieldLabel` heading tokens so the
7
+ * editor's inspector reads as the same form surface; the Workflow
8
+ * canvas can't import from the studio `app/` route, so this lives at
9
+ * the canvas layer instead.
10
+ */
11
+ const workflowLabelProps = {
12
+ fontWeight: 'semibold',
13
+ color: 'slate.1300',
14
+ };
15
+
16
+ exports.workflowLabelProps = workflowLabelProps;
17
+ //# sourceMappingURL=workflowLabelProps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflowLabelProps.js","sources":["../../../../src/components/Workflow/canvas/workflowLabelProps.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAAA;;;;;;AAMG;AACI,MAAM,kBAAkB,GAAG;AAChC,IAAA,UAAU,EAAE,UAAU;AACtB,IAAA,KAAK,EAAE,YAAY;;;;;"}
@@ -0,0 +1,15 @@
1
+ "use client";
2
+ /**
3
+ * Shared label styling for inputs inside the workflow editor's drawer.
4
+ * Mirrors the outer ChatbotForm's `FieldLabel` heading tokens so the
5
+ * editor's inspector reads as the same form surface; the Workflow
6
+ * canvas can't import from the studio `app/` route, so this lives at
7
+ * the canvas layer instead.
8
+ */
9
+ const workflowLabelProps = {
10
+ fontWeight: 'semibold',
11
+ color: 'slate.1300',
12
+ };
13
+
14
+ export { workflowLabelProps };
15
+ //# sourceMappingURL=workflowLabelProps.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflowLabelProps.mjs","sources":["../../../../src/components/Workflow/canvas/workflowLabelProps.ts"],"sourcesContent":[null],"names":[],"mappings":";AAAA;;;;;;AAMG;AACI,MAAM,kBAAkB,GAAG;AAChC,IAAA,UAAU,EAAE,UAAU;AACtB,IAAA,KAAK,EAAE,YAAY;;;;;"}
@@ -0,0 +1,59 @@
1
+ import type { Connection } from '@xyflow/react';
2
+ import type { Graph, GraphEdge, NodeTypeDef } from './Workflow.types';
3
+ /** Resolves a node-type definition by kind. */
4
+ type GetNodeType = (kind: string) => NodeTypeDef | undefined;
5
+ /** A prospective connection; mirrors React Flow's `Connection` (handles nullable). */
6
+ type ProposedConnection = Pick<Connection, 'source' | 'target' | 'sourceHandle' | 'targetHandle'>;
7
+ /**
8
+ * Validates a proposed connection against node-type handle declarations and the
9
+ * optional `canConnect` rules of both endpoints. Shared by the canvas
10
+ * `isValidConnection`, manual `onConnect`, edge reconnect, and palette
11
+ * auto-connect so every path enforces the same constraints:
12
+ * - no self-connections,
13
+ * - the source must expose an output handle (Start/Agent/etc., never End),
14
+ * - the target must expose an input handle (End/Agent/etc., never Start),
15
+ * - a named `sourceHandle`/`targetHandle` must be a declared handle id,
16
+ * - connections run exit→entry only: the `sourceHandle` must be an output of
17
+ * the source and the `targetHandle` an input of the target — never the
18
+ * reverse (no exit→exit / entry→entry wiring),
19
+ * - any node-type `canConnect` hook on either endpoint must return `true`.
20
+ */
21
+ export declare function isValidConnection(connection: ProposedConnection, graph: Graph, getNodeType: GetNodeType): boolean;
22
+ /**
23
+ * The existing outbound edge from a node's given handle, if any. Each exit
24
+ * point holds at most one edge: a single-output node is "taken" once it has any
25
+ * outbound edge; named handles (classify categories, if/else branches,
26
+ * guardrail pass/fail) are tracked individually by their `sourceHandle` id.
27
+ *
28
+ * Used by the canvas to decide whether a fresh drag from an exit should create
29
+ * a new edge or MOVE the one already there.
30
+ */
31
+ export declare function existingEdgeFromHandle(graph: Graph, getNodeType: GetNodeType, source: string, sourceHandle: string | undefined): GraphEdge | undefined;
32
+ /**
33
+ * The sole inbound edge to a node's given input handle, or `undefined` when the
34
+ * handle has zero or more than one. Unlike exits (one edge each), entries allow
35
+ * fan-in: several sources can converge on one input. So "grab the existing edge
36
+ * and re-route it" is only unambiguous when exactly one edge points at the
37
+ * handle — with two or more there's no single edge to grab, and the drag should
38
+ * fall back to adding another fan-in edge.
39
+ *
40
+ * Used by the canvas to decide whether a drag that *starts* from an occupied
41
+ * entry should move that edge's source endpoint instead of creating a new edge.
42
+ */
43
+ export declare function soleEdgeToHandle(graph: Graph, getNodeType: GetNodeType, target: string, targetHandle: string | undefined): GraphEdge | undefined;
44
+ /**
45
+ * Detects a single output-handle id rename between two configs of the same
46
+ * node, so the edge on that handle can move with it instead of being orphaned.
47
+ * Handle ids that derive from mutable config (Classify's `cat_<name>`) change
48
+ * when the author edits a name; diffing the declared outputs yields the rename.
49
+ *
50
+ * Returns the pair only for an unambiguous 1:1 rename — a pure add or remove
51
+ * (which the per-field drawer does one at a time) yields `undefined`, leaving
52
+ * edges to their normal add/prune behaviour.
53
+ */
54
+ export declare function renamedOutputHandle(handles: NodeTypeDef['handles'], oldConfig: unknown, newConfig: unknown): {
55
+ from: string;
56
+ to: string;
57
+ } | undefined;
58
+ export {};
59
+ //# sourceMappingURL=connectionRules.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectionRules.d.ts","sourceRoot":"","sources":["../../../src/components/Workflow/connectionRules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAEhD,OAAO,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEtE,+CAA+C;AAC/C,KAAK,WAAW,GAAG,CAAC,IAAI,EAAE,MAAM,KAAK,WAAW,GAAG,SAAS,CAAC;AAE7D,sFAAsF;AACtF,KAAK,kBAAkB,GAAG,IAAI,CAC5B,UAAU,EACV,QAAQ,GAAG,QAAQ,GAAG,cAAc,GAAG,cAAc,CACtD,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,kBAAkB,EAC9B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,GACvB,OAAO,CA6DT;AAiBD;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,GAAG,SAAS,GAC/B,SAAS,GAAG,SAAS,CAWvB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,GAAG,SAAS,GAC/B,SAAS,GAAG,SAAS,CAYvB;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,EAC/B,SAAS,EAAE,OAAO,EAClB,SAAS,EAAE,OAAO,GACjB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAS1C"}
@@ -0,0 +1,150 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ /**
5
+ * Validates a proposed connection against node-type handle declarations and the
6
+ * optional `canConnect` rules of both endpoints. Shared by the canvas
7
+ * `isValidConnection`, manual `onConnect`, edge reconnect, and palette
8
+ * auto-connect so every path enforces the same constraints:
9
+ * - no self-connections,
10
+ * - the source must expose an output handle (Start/Agent/etc., never End),
11
+ * - the target must expose an input handle (End/Agent/etc., never Start),
12
+ * - a named `sourceHandle`/`targetHandle` must be a declared handle id,
13
+ * - connections run exit→entry only: the `sourceHandle` must be an output of
14
+ * the source and the `targetHandle` an input of the target — never the
15
+ * reverse (no exit→exit / entry→entry wiring),
16
+ * - any node-type `canConnect` hook on either endpoint must return `true`.
17
+ */
18
+ function isValidConnection(connection, graph, getNodeType) {
19
+ if (!connection.source || !connection.target)
20
+ return false;
21
+ if (connection.source === connection.target)
22
+ return false;
23
+ const source = graph.nodes.find((n) => n.id === connection.source);
24
+ const target = graph.nodes.find((n) => n.id === connection.target);
25
+ if (!source || !target)
26
+ return false;
27
+ const sourceDef = getNodeType(source.kind);
28
+ const targetDef = getNodeType(target.kind);
29
+ if (!sourceDef || !targetDef)
30
+ return false;
31
+ const sourceHandles = sourceDef.handles(source.config);
32
+ const targetHandles = targetDef.handles(target.config);
33
+ const sourceOutputs = sourceHandles.outputs;
34
+ const targetInputs = targetHandles.inputs;
35
+ // Source must be able to emit and target must be able to receive.
36
+ if (sourceOutputs.length === 0)
37
+ return false;
38
+ if (targetInputs.length === 0)
39
+ return false;
40
+ // A requested named handle must actually exist on the node.
41
+ if (connection.sourceHandle &&
42
+ !sourceOutputs.some((h) => h.id === connection.sourceHandle)) {
43
+ return false;
44
+ }
45
+ if (connection.targetHandle &&
46
+ !targetInputs.some((h) => h.id === connection.targetHandle)) {
47
+ return false;
48
+ }
49
+ // Exit→entry only. React Flow's strict connection mode already blocks
50
+ // output↔output (exit→exit) and input↔input drags, but enforce it here too so
51
+ // every path — manual connect, reconnect, programmatic edges — agrees: reject
52
+ // a `sourceHandle` that is actually an input of the source, or a `targetHandle`
53
+ // that is actually an output of the target.
54
+ if (connection.sourceHandle &&
55
+ sourceHandles.inputs.some((h) => h.id === connection.sourceHandle)) {
56
+ return false;
57
+ }
58
+ if (connection.targetHandle &&
59
+ targetHandles.outputs.some((h) => h.id === connection.targetHandle)) {
60
+ return false;
61
+ }
62
+ const ctx = {
63
+ source,
64
+ sourceHandle: connection.sourceHandle ?? undefined,
65
+ target,
66
+ targetHandle: connection.targetHandle ?? undefined,
67
+ graph,
68
+ };
69
+ for (const def of [sourceDef, targetDef]) {
70
+ if (def.canConnect && def.canConnect(ctx) !== true)
71
+ return false;
72
+ }
73
+ return true;
74
+ }
75
+ /**
76
+ * Resolves a possibly-omitted handle id to the port it actually attaches to.
77
+ * Edges loaded from the backend / fixtures may omit the handle id for a node's
78
+ * default port, while the canvas renders every port with a concrete id (see
79
+ * `NodeShell`). React Flow attaches a handle-less edge to the node's first port
80
+ * of that type, so `undefined` and that first id denote the same port — collapse
81
+ * them before comparing or the lookup misses the edge (and we'd duplicate it).
82
+ */
83
+ function resolveHandle(handle, ports) {
84
+ return handle ?? ports[0]?.id;
85
+ }
86
+ /**
87
+ * The existing outbound edge from a node's given handle, if any. Each exit
88
+ * point holds at most one edge: a single-output node is "taken" once it has any
89
+ * outbound edge; named handles (classify categories, if/else branches,
90
+ * guardrail pass/fail) are tracked individually by their `sourceHandle` id.
91
+ *
92
+ * Used by the canvas to decide whether a fresh drag from an exit should create
93
+ * a new edge or MOVE the one already there.
94
+ */
95
+ function existingEdgeFromHandle(graph, getNodeType, source, sourceHandle) {
96
+ const node = graph.nodes.find((n) => n.id === source);
97
+ const outputs = node
98
+ ? (getNodeType(node.kind)?.handles(node.config).outputs ?? [])
99
+ : [];
100
+ const want = resolveHandle(sourceHandle, outputs);
101
+ return graph.edges.find((e) => e.source === source &&
102
+ resolveHandle(e.sourceHandle ?? undefined, outputs) === want);
103
+ }
104
+ /**
105
+ * The sole inbound edge to a node's given input handle, or `undefined` when the
106
+ * handle has zero or more than one. Unlike exits (one edge each), entries allow
107
+ * fan-in: several sources can converge on one input. So "grab the existing edge
108
+ * and re-route it" is only unambiguous when exactly one edge points at the
109
+ * handle — with two or more there's no single edge to grab, and the drag should
110
+ * fall back to adding another fan-in edge.
111
+ *
112
+ * Used by the canvas to decide whether a drag that *starts* from an occupied
113
+ * entry should move that edge's source endpoint instead of creating a new edge.
114
+ */
115
+ function soleEdgeToHandle(graph, getNodeType, target, targetHandle) {
116
+ const node = graph.nodes.find((n) => n.id === target);
117
+ const inputs = node
118
+ ? (getNodeType(node.kind)?.handles(node.config).inputs ?? [])
119
+ : [];
120
+ const want = resolveHandle(targetHandle, inputs);
121
+ const inbound = graph.edges.filter((e) => e.target === target &&
122
+ resolveHandle(e.targetHandle ?? undefined, inputs) === want);
123
+ return inbound.length === 1 ? inbound[0] : undefined;
124
+ }
125
+ /**
126
+ * Detects a single output-handle id rename between two configs of the same
127
+ * node, so the edge on that handle can move with it instead of being orphaned.
128
+ * Handle ids that derive from mutable config (Classify's `cat_<name>`) change
129
+ * when the author edits a name; diffing the declared outputs yields the rename.
130
+ *
131
+ * Returns the pair only for an unambiguous 1:1 rename — a pure add or remove
132
+ * (which the per-field drawer does one at a time) yields `undefined`, leaving
133
+ * edges to their normal add/prune behaviour.
134
+ */
135
+ function renamedOutputHandle(handles, oldConfig, newConfig) {
136
+ const oldIds = handles(oldConfig).outputs.map((h) => h.id);
137
+ const newIds = handles(newConfig).outputs.map((h) => h.id);
138
+ const removed = oldIds.filter((id) => !newIds.includes(id));
139
+ const added = newIds.filter((id) => !oldIds.includes(id));
140
+ if (removed.length === 1 && added.length === 1) {
141
+ return { from: removed[0], to: added[0] };
142
+ }
143
+ return undefined;
144
+ }
145
+
146
+ exports.existingEdgeFromHandle = existingEdgeFromHandle;
147
+ exports.isValidConnection = isValidConnection;
148
+ exports.renamedOutputHandle = renamedOutputHandle;
149
+ exports.soleEdgeToHandle = soleEdgeToHandle;
150
+ //# sourceMappingURL=connectionRules.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectionRules.js","sources":["../../../src/components/Workflow/connectionRules.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAaA;;;;;;;;;;;;;AAaG;SACa,iBAAiB,CAC/B,UAA8B,EAC9B,KAAY,EACZ,WAAwB,EAAA;IAExB,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM;AAAE,QAAA,OAAO,KAAK;AAC1D,IAAA,IAAI,UAAU,CAAC,MAAM,KAAK,UAAU,CAAC,MAAM;AAAE,QAAA,OAAO,KAAK;IAEzD,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,MAAM,CAAC;IAClE,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,C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,QAAQ,CAAC,EAAE,CAAC,CAAC;AAC3D,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;AACzD,IAAA,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;AAC9C,QAAA,OAAO,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE;IAC3C;AACA,IAAA,OAAO,SAAS;AAClB;;;;;;;"}
@@ -0,0 +1,145 @@
1
+ "use client";
2
+ /**
3
+ * Validates a proposed connection against node-type handle declarations and the
4
+ * optional `canConnect` rules of both endpoints. Shared by the canvas
5
+ * `isValidConnection`, manual `onConnect`, edge reconnect, and palette
6
+ * auto-connect so every path enforces the same constraints:
7
+ * - no self-connections,
8
+ * - the source must expose an output handle (Start/Agent/etc., never End),
9
+ * - the target must expose an input handle (End/Agent/etc., never Start),
10
+ * - a named `sourceHandle`/`targetHandle` must be a declared handle id,
11
+ * - connections run exit→entry only: the `sourceHandle` must be an output of
12
+ * the source and the `targetHandle` an input of the target — never the
13
+ * reverse (no exit→exit / entry→entry wiring),
14
+ * - any node-type `canConnect` hook on either endpoint must return `true`.
15
+ */
16
+ function isValidConnection(connection, graph, getNodeType) {
17
+ if (!connection.source || !connection.target)
18
+ return false;
19
+ if (connection.source === connection.target)
20
+ return false;
21
+ const source = graph.nodes.find((n) => n.id === connection.source);
22
+ const target = graph.nodes.find((n) => n.id === connection.target);
23
+ if (!source || !target)
24
+ return false;
25
+ const sourceDef = getNodeType(source.kind);
26
+ const targetDef = getNodeType(target.kind);
27
+ if (!sourceDef || !targetDef)
28
+ return false;
29
+ const sourceHandles = sourceDef.handles(source.config);
30
+ const targetHandles = targetDef.handles(target.config);
31
+ const sourceOutputs = sourceHandles.outputs;
32
+ const targetInputs = targetHandles.inputs;
33
+ // Source must be able to emit and target must be able to receive.
34
+ if (sourceOutputs.length === 0)
35
+ return false;
36
+ if (targetInputs.length === 0)
37
+ return false;
38
+ // A requested named handle must actually exist on the node.
39
+ if (connection.sourceHandle &&
40
+ !sourceOutputs.some((h) => h.id === connection.sourceHandle)) {
41
+ return false;
42
+ }
43
+ if (connection.targetHandle &&
44
+ !targetInputs.some((h) => h.id === connection.targetHandle)) {
45
+ return false;
46
+ }
47
+ // Exit→entry only. React Flow's strict connection mode already blocks
48
+ // output↔output (exit→exit) and input↔input drags, but enforce it here too so
49
+ // every path — manual connect, reconnect, programmatic edges — agrees: reject
50
+ // a `sourceHandle` that is actually an input of the source, or a `targetHandle`
51
+ // that is actually an output of the target.
52
+ if (connection.sourceHandle &&
53
+ sourceHandles.inputs.some((h) => h.id === connection.sourceHandle)) {
54
+ return false;
55
+ }
56
+ if (connection.targetHandle &&
57
+ targetHandles.outputs.some((h) => h.id === connection.targetHandle)) {
58
+ return false;
59
+ }
60
+ const ctx = {
61
+ source,
62
+ sourceHandle: connection.sourceHandle ?? undefined,
63
+ target,
64
+ targetHandle: connection.targetHandle ?? undefined,
65
+ graph,
66
+ };
67
+ for (const def of [sourceDef, targetDef]) {
68
+ if (def.canConnect && def.canConnect(ctx) !== true)
69
+ return false;
70
+ }
71
+ return true;
72
+ }
73
+ /**
74
+ * Resolves a possibly-omitted handle id to the port it actually attaches to.
75
+ * Edges loaded from the backend / fixtures may omit the handle id for a node's
76
+ * default port, while the canvas renders every port with a concrete id (see
77
+ * `NodeShell`). React Flow attaches a handle-less edge to the node's first port
78
+ * of that type, so `undefined` and that first id denote the same port — collapse
79
+ * them before comparing or the lookup misses the edge (and we'd duplicate it).
80
+ */
81
+ function resolveHandle(handle, ports) {
82
+ return handle ?? ports[0]?.id;
83
+ }
84
+ /**
85
+ * The existing outbound edge from a node's given handle, if any. Each exit
86
+ * point holds at most one edge: a single-output node is "taken" once it has any
87
+ * outbound edge; named handles (classify categories, if/else branches,
88
+ * guardrail pass/fail) are tracked individually by their `sourceHandle` id.
89
+ *
90
+ * Used by the canvas to decide whether a fresh drag from an exit should create
91
+ * a new edge or MOVE the one already there.
92
+ */
93
+ function existingEdgeFromHandle(graph, getNodeType, source, sourceHandle) {
94
+ const node = graph.nodes.find((n) => n.id === source);
95
+ const outputs = node
96
+ ? (getNodeType(node.kind)?.handles(node.config).outputs ?? [])
97
+ : [];
98
+ const want = resolveHandle(sourceHandle, outputs);
99
+ return graph.edges.find((e) => e.source === source &&
100
+ resolveHandle(e.sourceHandle ?? undefined, outputs) === want);
101
+ }
102
+ /**
103
+ * The sole inbound edge to a node's given input handle, or `undefined` when the
104
+ * handle has zero or more than one. Unlike exits (one edge each), entries allow
105
+ * fan-in: several sources can converge on one input. So "grab the existing edge
106
+ * and re-route it" is only unambiguous when exactly one edge points at the
107
+ * handle — with two or more there's no single edge to grab, and the drag should
108
+ * fall back to adding another fan-in edge.
109
+ *
110
+ * Used by the canvas to decide whether a drag that *starts* from an occupied
111
+ * entry should move that edge's source endpoint instead of creating a new edge.
112
+ */
113
+ function soleEdgeToHandle(graph, getNodeType, target, targetHandle) {
114
+ const node = graph.nodes.find((n) => n.id === target);
115
+ const inputs = node
116
+ ? (getNodeType(node.kind)?.handles(node.config).inputs ?? [])
117
+ : [];
118
+ const want = resolveHandle(targetHandle, inputs);
119
+ const inbound = graph.edges.filter((e) => e.target === target &&
120
+ resolveHandle(e.targetHandle ?? undefined, inputs) === want);
121
+ return inbound.length === 1 ? inbound[0] : undefined;
122
+ }
123
+ /**
124
+ * Detects a single output-handle id rename between two configs of the same
125
+ * node, so the edge on that handle can move with it instead of being orphaned.
126
+ * Handle ids that derive from mutable config (Classify's `cat_<name>`) change
127
+ * when the author edits a name; diffing the declared outputs yields the rename.
128
+ *
129
+ * Returns the pair only for an unambiguous 1:1 rename — a pure add or remove
130
+ * (which the per-field drawer does one at a time) yields `undefined`, leaving
131
+ * edges to their normal add/prune behaviour.
132
+ */
133
+ function renamedOutputHandle(handles, oldConfig, newConfig) {
134
+ const oldIds = handles(oldConfig).outputs.map((h) => h.id);
135
+ const newIds = handles(newConfig).outputs.map((h) => h.id);
136
+ const removed = oldIds.filter((id) => !newIds.includes(id));
137
+ const added = newIds.filter((id) => !oldIds.includes(id));
138
+ if (removed.length === 1 && added.length === 1) {
139
+ return { from: removed[0], to: added[0] };
140
+ }
141
+ return undefined;
142
+ }
143
+
144
+ export { existingEdgeFromHandle, isValidConnection, renamedOutputHandle, soleEdgeToHandle };
145
+ //# sourceMappingURL=connectionRules.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connectionRules.mjs","sources":["../../../src/components/Workflow/connectionRules.ts"],"sourcesContent":[null],"names":[],"mappings":";AAaA;;;;;;;;;;;;;AAaG;SACa,iBAAiB,CAC/B,UAA8B,EAC9B,KAAY,EACZ,WAAwB,EAAA;IAExB,IAAI,CAAC,UAAU,CAAC,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM;AAAE,QAAA,OAAO,KAAK;AAC1D,IAAA,IAAI,UAAU,CAAC,MAAM,KAAK,UAAU,CAAC,MAAM;AAAE,QAAA,OAAO,KAAK;IAEzD,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,MAAM,CAAC;IAClE,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,UAAU,CAAC,MAAM,CAAC;AAClE,IAAA,IAAI,CAAC,MAAM,IAAI,CAAC,MAAM;AAAE,QAAA,OAAO,KAAK;IAEpC,MAAM,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC;IAC1C,MAAM,SAAS,GAAG,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC;AAC1C,IAAA,IAAI,CAAC,SAAS,IAAI,CAAC,SAAS;AAAE,QAAA,OAAO,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AE,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE;IAC3C;AACA,IAAA,OAAO,SAAS;AAClB;;;;"}
@@ -0,0 +1,27 @@
1
+ import type { GraphNode } from './Workflow.types';
2
+ /**
3
+ * Unique id for edges and other internal graph elements that aren't referenced
4
+ * by name in user content. Node IDs use `nextNodeId` for memorable
5
+ * `{kind}_{N}` ids instead.
6
+ */
7
+ export declare function genId(prefix: string): string;
8
+ /**
9
+ * Next sequential id for a node of the given kind, given the current node
10
+ * list. Returns ids like `agent_1`, `classify_2`, `guardrail_1`, etc., so
11
+ * authors can type them verbatim into `{{...}}` references.
12
+ *
13
+ * Start is a singleton — always `start`. Existing seeded graphs use hand-named
14
+ * ids like `agent_main` / `guard_out`; those don't match the `kind_<digits>`
15
+ * pattern and are ignored when computing the next number, so a fresh `agent`
16
+ * dropped next to `agent_main` becomes `agent_1`, not `agent_2`.
17
+ */
18
+ export declare function nextNodeId(kind: string, nodes: ReadonlyArray<GraphNode>): string;
19
+ /**
20
+ * A copy of `node` with a fresh sequential id, a deep-cloned config, and a
21
+ * slight offset. Pass the current node list so the duplicate's id continues
22
+ * the per-kind counter. If two duplicates race within the same React batch
23
+ * the second collides and the reducer's existing `addNode` dedupe drops it
24
+ * — one missing duplicate, no corrupt state.
25
+ */
26
+ export declare function cloneNode(node: GraphNode, nodes: ReadonlyArray<GraphNode>): GraphNode;
27
+ //# sourceMappingURL=createNode.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createNode.d.ts","sourceRoot":"","sources":["../../../src/components/Workflow/createNode.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;GAIG;AACH,wBAAgB,KAAK,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAO5C;AAED;;;;;;;;;GASG;AACH,wBAAgB,UAAU,CACxB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,GAC9B,MAAM,CAYR;AAKD;;;;;;GAMG;AACH,wBAAgB,SAAS,CACvB,IAAI,EAAE,SAAS,EACf,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,GAC9B,SAAS,CAUX"}