@uipath/apollo-react 4.0.0 → 4.1.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 (247) hide show
  1. package/dist/canvas/components/AddNodePanel/AddNodePreview.cjs +4 -4
  2. package/dist/canvas/components/AddNodePanel/AddNodePreview.js +4 -4
  3. package/dist/canvas/components/AgentCanvas/AgentFlow.cjs +4 -4
  4. package/dist/canvas/components/AgentCanvas/AgentFlow.js +4 -4
  5. package/dist/canvas/components/AgentCanvas/components/PaneContextMenu.cjs +3 -3
  6. package/dist/canvas/components/AgentCanvas/components/PaneContextMenu.js +3 -3
  7. package/dist/canvas/components/AgentCanvas/components/SuggestionGroupPanel.cjs +6 -6
  8. package/dist/canvas/components/AgentCanvas/components/SuggestionGroupPanel.d.ts.map +1 -1
  9. package/dist/canvas/components/AgentCanvas/components/SuggestionGroupPanel.js +6 -6
  10. package/dist/canvas/components/AgentCanvas/components/TimelinePlayer.cjs +14 -14
  11. package/dist/canvas/components/AgentCanvas/components/TimelinePlayer.js +14 -14
  12. package/dist/canvas/components/AgentCanvas/edges/StaticEdge.cjs +8 -8
  13. package/dist/canvas/components/AgentCanvas/edges/StaticEdge.js +8 -8
  14. package/dist/canvas/components/AgentCanvas/nodes/AgentNode.cjs +12 -12
  15. package/dist/canvas/components/AgentCanvas/nodes/AgentNode.js +12 -12
  16. package/dist/canvas/components/AgentCanvas/nodes/AgentNode.styles.cjs +18 -18
  17. package/dist/canvas/components/AgentCanvas/nodes/AgentNode.styles.js +18 -18
  18. package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.cjs +12 -12
  19. package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.d.ts.map +1 -1
  20. package/dist/canvas/components/AgentCanvas/nodes/ResourceNode.js +12 -12
  21. package/dist/canvas/components/BaseCanvas/BaseCanvas.constants.cjs +2 -2
  22. package/dist/canvas/components/BaseCanvas/BaseCanvas.constants.d.ts +2 -2
  23. package/dist/canvas/components/BaseCanvas/BaseCanvas.constants.js +2 -2
  24. package/dist/canvas/components/BaseCanvas/PanShortcutTeachingUI.cjs +2 -2
  25. package/dist/canvas/components/BaseCanvas/PanShortcutTeachingUI.js +2 -2
  26. package/dist/canvas/components/BaseNode/BaseNode.cjs +2 -2
  27. package/dist/canvas/components/BaseNode/BaseNode.js +2 -2
  28. package/dist/canvas/components/BaseNode/BaseNode.styles.cjs +24 -24
  29. package/dist/canvas/components/BaseNode/BaseNode.styles.d.ts.map +1 -1
  30. package/dist/canvas/components/BaseNode/BaseNode.styles.js +24 -24
  31. package/dist/canvas/components/BlankCanvasNode/BlankCanvasNode.cjs +1 -1
  32. package/dist/canvas/components/BlankCanvasNode/BlankCanvasNode.js +1 -1
  33. package/dist/canvas/components/BlankCanvasNode/BlankCanvasNode.styles.cjs +6 -6
  34. package/dist/canvas/components/BlankCanvasNode/BlankCanvasNode.styles.js +6 -6
  35. package/dist/canvas/components/ButtonHandle/ButtonHandle.cjs +1 -1
  36. package/dist/canvas/components/ButtonHandle/ButtonHandle.js +1 -1
  37. package/dist/canvas/components/ButtonHandle/ButtonHandle.styles.cjs +11 -11
  38. package/dist/canvas/components/ButtonHandle/ButtonHandle.styles.js +11 -11
  39. package/dist/canvas/components/ButtonHandle/SmartHandle.cjs +1 -1
  40. package/dist/canvas/components/ButtonHandle/SmartHandle.d.ts.map +1 -1
  41. package/dist/canvas/components/ButtonHandle/SmartHandle.js +1 -1
  42. package/dist/canvas/components/CodedAgent/CodedAgentFlow.cjs +6 -6
  43. package/dist/canvas/components/CodedAgent/CodedAgentFlow.d.ts.map +1 -1
  44. package/dist/canvas/components/CodedAgent/CodedAgentFlow.js +6 -6
  45. package/dist/canvas/components/Edges/EdgeUtils.cjs +14 -14
  46. package/dist/canvas/components/Edges/EdgeUtils.js +14 -14
  47. package/dist/canvas/components/Edges/SequenceEdge.cjs +11 -11
  48. package/dist/canvas/components/Edges/SequenceEdge.js +11 -11
  49. package/dist/canvas/components/FloatingCanvasPanel/FloatingCanvasPanel.cjs +4 -4
  50. package/dist/canvas/components/FloatingCanvasPanel/FloatingCanvasPanel.d.ts.map +1 -1
  51. package/dist/canvas/components/FloatingCanvasPanel/FloatingCanvasPanel.js +4 -4
  52. package/dist/canvas/components/FloatingCanvasPanel/PanelChrome.cjs +5 -5
  53. package/dist/canvas/components/FloatingCanvasPanel/PanelChrome.js +5 -5
  54. package/dist/canvas/components/GroupNode/GroupNode.styles.cjs +19 -19
  55. package/dist/canvas/components/GroupNode/GroupNode.styles.js +19 -19
  56. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.cjs +2 -2
  57. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.js +2 -2
  58. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvasWithControls.cjs +3 -3
  59. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvasWithControls.js +3 -3
  60. package/dist/canvas/components/MiniCanvasNavigator/MiniCanvasNavigator.cjs +2 -2
  61. package/dist/canvas/components/MiniCanvasNavigator/MiniCanvasNavigator.js +2 -2
  62. package/dist/canvas/components/NodeInspector.cjs +4 -4
  63. package/dist/canvas/components/NodeInspector.js +4 -4
  64. package/dist/canvas/components/NodePropertiesPanel/NodePropertiesPanel.styles.cjs +30 -30
  65. package/dist/canvas/components/NodePropertiesPanel/NodePropertiesPanel.styles.js +30 -30
  66. package/dist/canvas/components/StageNode/StageConnectionEdge.cjs +1 -1
  67. package/dist/canvas/components/StageNode/StageConnectionEdge.js +1 -1
  68. package/dist/canvas/components/StageNode/StageEdge.cjs +7 -7
  69. package/dist/canvas/components/StageNode/StageEdge.js +7 -7
  70. package/dist/canvas/components/StageNode/StageNode.styles.cjs +34 -34
  71. package/dist/canvas/components/StageNode/StageNode.styles.js +34 -34
  72. package/dist/canvas/components/StageNode/TaskContent.cjs +1 -1
  73. package/dist/canvas/components/StageNode/TaskContent.js +1 -1
  74. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.styles.cjs +20 -20
  75. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.styles.d.ts.map +1 -1
  76. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.styles.js +20 -20
  77. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.types.cjs +1 -1
  78. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.types.d.ts +1 -1
  79. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.types.js +1 -1
  80. package/dist/canvas/components/TaskIcon/TaskIcon.styles.cjs +1 -1
  81. package/dist/canvas/components/TaskIcon/TaskIcon.styles.js +1 -1
  82. package/dist/canvas/components/Toolbar/EdgeToolbar/EdgeToolbar.styles.cjs +2 -2
  83. package/dist/canvas/components/Toolbar/EdgeToolbar/EdgeToolbar.styles.js +2 -2
  84. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.styles.cjs +9 -9
  85. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.styles.js +9 -9
  86. package/dist/canvas/components/Toolbar/shared/ToolbarButton.styles.cjs +3 -3
  87. package/dist/canvas/components/Toolbar/shared/ToolbarButton.styles.js +3 -3
  88. package/dist/canvas/components/Toolbox/ListView.cjs +3 -3
  89. package/dist/canvas/components/Toolbox/ListView.js +3 -3
  90. package/dist/canvas/components/Toolbox/ListView.styles.cjs +7 -7
  91. package/dist/canvas/components/Toolbox/ListView.styles.js +7 -7
  92. package/dist/canvas/components/Toolbox/SearchBox.styles.cjs +8 -8
  93. package/dist/canvas/components/Toolbox/SearchBox.styles.js +8 -8
  94. package/dist/canvas/components/Toolbox/Toolbox.styles.cjs +2 -2
  95. package/dist/canvas/components/Toolbox/Toolbox.styles.js +2 -2
  96. package/dist/canvas/components/TriggerNode/TriggerNode.styles.cjs +15 -15
  97. package/dist/canvas/components/TriggerNode/TriggerNode.styles.js +15 -15
  98. package/dist/canvas/styles/execution-status.cjs +10 -10
  99. package/dist/canvas/styles/execution-status.js +10 -10
  100. package/dist/canvas/styles/tailwind.canvas.css +1 -1
  101. package/dist/canvas/styles/variables.css +67 -32
  102. package/dist/canvas/utils/adornment-resolver.cjs +2 -2
  103. package/dist/canvas/utils/adornment-resolver.js +2 -2
  104. package/dist/canvas/utils/coded-agents/mermaid-parser.cjs +1 -1
  105. package/dist/canvas/utils/coded-agents/mermaid-parser.js +1 -1
  106. package/dist/canvas/utils/createPreviewNode.cjs +1 -1
  107. package/dist/canvas/utils/createPreviewNode.js +1 -1
  108. package/dist/canvas/utils/export-canvas.cjs +1 -1
  109. package/dist/canvas/utils/export-canvas.d.ts.map +1 -1
  110. package/dist/canvas/utils/export-canvas.js +1 -1
  111. package/package.json +2 -2
  112. package/dist/canvas/components/AddNodePanel/AddNodePanel.stories.cjs +0 -429
  113. package/dist/canvas/components/AddNodePanel/AddNodePanel.stories.d.ts +0 -11
  114. package/dist/canvas/components/AddNodePanel/AddNodePanel.stories.d.ts.map +0 -1
  115. package/dist/canvas/components/AddNodePanel/AddNodePanel.stories.js +0 -380
  116. package/dist/canvas/components/AgentCanvas/AgentFlow.stories.cjs +0 -2209
  117. package/dist/canvas/components/AgentCanvas/AgentFlow.stories.d.ts +0 -11
  118. package/dist/canvas/components/AgentCanvas/AgentFlow.stories.d.ts.map +0 -1
  119. package/dist/canvas/components/AgentCanvas/AgentFlow.stories.js +0 -2160
  120. package/dist/canvas/components/AgentCanvas/components/TimelinePlayer.stories.cjs +0 -246
  121. package/dist/canvas/components/AgentCanvas/components/TimelinePlayer.stories.d.ts +0 -10
  122. package/dist/canvas/components/AgentCanvas/components/TimelinePlayer.stories.d.ts.map +0 -1
  123. package/dist/canvas/components/AgentCanvas/components/TimelinePlayer.stories.js +0 -200
  124. package/dist/canvas/components/BaseCanvas/BaseCanvas.stories.cjs +0 -981
  125. package/dist/canvas/components/BaseCanvas/BaseCanvas.stories.d.ts +0 -12
  126. package/dist/canvas/components/BaseCanvas/BaseCanvas.stories.d.ts.map +0 -1
  127. package/dist/canvas/components/BaseCanvas/BaseCanvas.stories.js +0 -929
  128. package/dist/canvas/components/BaseNode/BaseNode.stories.cjs +0 -1150
  129. package/dist/canvas/components/BaseNode/BaseNode.stories.d.ts +0 -11
  130. package/dist/canvas/components/BaseNode/BaseNode.stories.d.ts.map +0 -1
  131. package/dist/canvas/components/BaseNode/BaseNode.stories.js +0 -1101
  132. package/dist/canvas/components/ButtonHandle/ButtonHandle.stories.cjs +0 -969
  133. package/dist/canvas/components/ButtonHandle/ButtonHandle.stories.d.ts +0 -9
  134. package/dist/canvas/components/ButtonHandle/ButtonHandle.stories.d.ts.map +0 -1
  135. package/dist/canvas/components/ButtonHandle/ButtonHandle.stories.js +0 -926
  136. package/dist/canvas/components/ButtonHandle/SmartHandle.stories.cjs +0 -608
  137. package/dist/canvas/components/ButtonHandle/SmartHandle.stories.d.ts +0 -8
  138. package/dist/canvas/components/ButtonHandle/SmartHandle.stories.d.ts.map +0 -1
  139. package/dist/canvas/components/ButtonHandle/SmartHandle.stories.js +0 -568
  140. package/dist/canvas/components/CanvasPerformance.stories.cjs +0 -349
  141. package/dist/canvas/components/CanvasPerformance.stories.d.ts +0 -6
  142. package/dist/canvas/components/CanvasPerformance.stories.d.ts.map +0 -1
  143. package/dist/canvas/components/CanvasPerformance.stories.js +0 -312
  144. package/dist/canvas/components/CodedAgent/CodedAgentFlow.stories.cjs +0 -119
  145. package/dist/canvas/components/CodedAgent/CodedAgentFlow.stories.d.ts +0 -10
  146. package/dist/canvas/components/CodedAgent/CodedAgentFlow.stories.d.ts.map +0 -1
  147. package/dist/canvas/components/CodedAgent/CodedAgentFlow.stories.js +0 -73
  148. package/dist/canvas/components/CollapseConfig/CollapseConfig.stories.cjs +0 -518
  149. package/dist/canvas/components/CollapseConfig/CollapseConfig.stories.d.ts +0 -6
  150. package/dist/canvas/components/CollapseConfig/CollapseConfig.stories.d.ts.map +0 -1
  151. package/dist/canvas/components/CollapseConfig/CollapseConfig.stories.js +0 -481
  152. package/dist/canvas/components/Edges/SequenceEdge.stories.cjs +0 -1073
  153. package/dist/canvas/components/Edges/SequenceEdge.stories.d.ts +0 -10
  154. package/dist/canvas/components/Edges/SequenceEdge.stories.d.ts.map +0 -1
  155. package/dist/canvas/components/Edges/SequenceEdge.stories.js +0 -1024
  156. package/dist/canvas/components/Edges/XyFlowEdgeComparison.stories.cjs +0 -796
  157. package/dist/canvas/components/Edges/XyFlowEdgeComparison.stories.d.ts +0 -7
  158. package/dist/canvas/components/Edges/XyFlowEdgeComparison.stories.d.ts.map +0 -1
  159. package/dist/canvas/components/Edges/XyFlowEdgeComparison.stories.js +0 -756
  160. package/dist/canvas/components/ExecutionStatusIcon/ExecutionStatusIcon.stories.cjs +0 -245
  161. package/dist/canvas/components/ExecutionStatusIcon/ExecutionStatusIcon.stories.d.ts +0 -30
  162. package/dist/canvas/components/ExecutionStatusIcon/ExecutionStatusIcon.stories.d.ts.map +0 -1
  163. package/dist/canvas/components/ExecutionStatusIcon/ExecutionStatusIcon.stories.js +0 -208
  164. package/dist/canvas/components/Flow.stories.cjs +0 -778
  165. package/dist/canvas/components/Flow.stories.d.ts +0 -11
  166. package/dist/canvas/components/Flow.stories.d.ts.map +0 -1
  167. package/dist/canvas/components/Flow.stories.js +0 -725
  168. package/dist/canvas/components/GroupNode/GroupNode.stories.cjs +0 -837
  169. package/dist/canvas/components/GroupNode/GroupNode.stories.d.ts +0 -12
  170. package/dist/canvas/components/GroupNode/GroupNode.stories.d.ts.map +0 -1
  171. package/dist/canvas/components/GroupNode/GroupNode.stories.js +0 -782
  172. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.stories.cjs +0 -88
  173. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.stories.d.ts +0 -7
  174. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.stories.d.ts.map +0 -1
  175. package/dist/canvas/components/HierarchicalCanvas/HierarchicalCanvas.stories.js +0 -51
  176. package/dist/canvas/components/NodeInspector.stories.cjs +0 -229
  177. package/dist/canvas/components/NodeInspector.stories.d.ts +0 -20
  178. package/dist/canvas/components/NodeInspector.stories.d.ts.map +0 -1
  179. package/dist/canvas/components/NodeInspector.stories.js +0 -192
  180. package/dist/canvas/components/NodePropertiesPanel/NodePropertiesPanel.stories.cjs +0 -122
  181. package/dist/canvas/components/NodePropertiesPanel/NodePropertiesPanel.stories.d.ts +0 -7
  182. package/dist/canvas/components/NodePropertiesPanel/NodePropertiesPanel.stories.d.ts.map +0 -1
  183. package/dist/canvas/components/NodePropertiesPanel/NodePropertiesPanel.stories.js +0 -85
  184. package/dist/canvas/components/StageNode/StageNode.stories.cjs +0 -2690
  185. package/dist/canvas/components/StageNode/StageNode.stories.d.ts +0 -17
  186. package/dist/canvas/components/StageNode/StageNode.stories.d.ts.map +0 -1
  187. package/dist/canvas/components/StageNode/StageNode.stories.js +0 -2623
  188. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.stories.cjs +0 -552
  189. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.stories.d.ts +0 -8
  190. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.stories.d.ts.map +0 -1
  191. package/dist/canvas/components/StickyNoteNode/StickyNoteNode.stories.js +0 -509
  192. package/dist/canvas/components/TaskIcon/TaskIcon.stories.cjs +0 -109
  193. package/dist/canvas/components/TaskIcon/TaskIcon.stories.d.ts +0 -10
  194. package/dist/canvas/components/TaskIcon/TaskIcon.stories.d.ts.map +0 -1
  195. package/dist/canvas/components/TaskIcon/TaskIcon.stories.js +0 -72
  196. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.stories.cjs +0 -283
  197. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.stories.d.ts +0 -7
  198. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.stories.d.ts.map +0 -1
  199. package/dist/canvas/components/Toolbar/NodeToolbar/NodeToolbar.stories.js +0 -243
  200. package/dist/canvas/components/TriggerNode/TriggerNode.stories.cjs +0 -270
  201. package/dist/canvas/components/TriggerNode/TriggerNode.stories.d.ts +0 -16
  202. package/dist/canvas/components/TriggerNode/TriggerNode.stories.d.ts.map +0 -1
  203. package/dist/canvas/components/TriggerNode/TriggerNode.stories.js +0 -233
  204. package/dist/canvas/controls/Breadcrumb/Breadcrumb.stories.cjs +0 -76
  205. package/dist/canvas/controls/Breadcrumb/Breadcrumb.stories.d.ts +0 -7
  206. package/dist/canvas/controls/Breadcrumb/Breadcrumb.stories.d.ts.map +0 -1
  207. package/dist/canvas/controls/Breadcrumb/Breadcrumb.stories.js +0 -39
  208. package/dist/canvas/icons/Icons.stories.cjs +0 -207
  209. package/dist/canvas/icons/Icons.stories.d.ts +0 -6
  210. package/dist/canvas/icons/Icons.stories.d.ts.map +0 -1
  211. package/dist/canvas/icons/Icons.stories.js +0 -167
  212. package/dist/canvas/layouts/Column.stories.cjs +0 -716
  213. package/dist/canvas/layouts/Column.stories.d.ts +0 -14
  214. package/dist/canvas/layouts/Column.stories.d.ts.map +0 -1
  215. package/dist/canvas/layouts/Column.stories.js +0 -658
  216. package/dist/canvas/layouts/Grid.stories.cjs +0 -1033
  217. package/dist/canvas/layouts/Grid.stories.d.ts +0 -19
  218. package/dist/canvas/layouts/Grid.stories.d.ts.map +0 -1
  219. package/dist/canvas/layouts/Grid.stories.js +0 -960
  220. package/dist/canvas/layouts/Row.stories.cjs +0 -687
  221. package/dist/canvas/layouts/Row.stories.d.ts +0 -14
  222. package/dist/canvas/layouts/Row.stories.d.ts.map +0 -1
  223. package/dist/canvas/layouts/Row.stories.js +0 -629
  224. package/dist/canvas/storybook-utils/components/StoryInfoPanel.cjs +0 -100
  225. package/dist/canvas/storybook-utils/components/StoryInfoPanel.js +0 -66
  226. package/dist/canvas/storybook-utils/components/index.cjs +0 -58
  227. package/dist/canvas/storybook-utils/components/index.js +0 -1
  228. package/dist/canvas/storybook-utils/decorators.cjs +0 -101
  229. package/dist/canvas/storybook-utils/decorators.js +0 -64
  230. package/dist/canvas/storybook-utils/hooks/index.cjs +0 -58
  231. package/dist/canvas/storybook-utils/hooks/index.js +0 -1
  232. package/dist/canvas/storybook-utils/hooks/useCanvasStory.cjs +0 -118
  233. package/dist/canvas/storybook-utils/hooks/useCanvasStory.js +0 -81
  234. package/dist/canvas/storybook-utils/index.cjs +0 -86
  235. package/dist/canvas/storybook-utils/index.js +0 -5
  236. package/dist/canvas/storybook-utils/manifests/category-definitions.cjs +0 -220
  237. package/dist/canvas/storybook-utils/manifests/category-definitions.js +0 -186
  238. package/dist/canvas/storybook-utils/manifests/index.cjs +0 -82
  239. package/dist/canvas/storybook-utils/manifests/index.js +0 -10
  240. package/dist/canvas/storybook-utils/manifests/node-definitions.cjs +0 -1133
  241. package/dist/canvas/storybook-utils/manifests/node-definitions.js +0 -1099
  242. package/dist/canvas/storybook-utils/mocks/index.cjs +0 -65
  243. package/dist/canvas/storybook-utils/mocks/index.js +0 -2
  244. package/dist/canvas/storybook-utils/mocks/nodes.cjs +0 -237
  245. package/dist/canvas/storybook-utils/mocks/nodes.js +0 -191
  246. package/dist/canvas/storybook-utils/mocks/resources.cjs +0 -296
  247. package/dist/canvas/storybook-utils/mocks/resources.js +0 -238
@@ -1,1024 +0,0 @@
1
- import { jsx } from "react/jsx-runtime";
2
- import { Panel, Position } from "../../xyflow/react.js";
3
- import { useMemo } from "react";
4
- import { useCanvasStory, withCanvasProviders } from "../../storybook-utils/index.js";
5
- import { DefaultCanvasTranslations } from "../../types.js";
6
- import { BaseCanvas } from "../BaseCanvas/index.js";
7
- import { CanvasPositionControls } from "../CanvasPositionControls.js";
8
- import { StickyNoteNode } from "../StickyNoteNode/index.js";
9
- import { SequenceEdge } from "./SequenceEdge.js";
10
- const meta = {
11
- title: 'Canvas/Edges/SequenceEdge',
12
- parameters: {
13
- layout: 'fullscreen'
14
- },
15
- decorators: [
16
- withCanvasProviders()
17
- ]
18
- };
19
- const SequenceEdge_stories = meta;
20
- const edgeTypes = {
21
- default: SequenceEdge
22
- };
23
- const nodeTypes = {
24
- stickyNote: StickyNoteNode
25
- };
26
- function createNode(config) {
27
- const { id, label, x, y, sourcePositions = [], targetPositions = [] } = config;
28
- const handleConfigurations = [
29
- ...sourcePositions.map((position)=>({
30
- position,
31
- handles: [
32
- {
33
- id: `out-${position}`,
34
- type: 'source',
35
- handleType: 'output'
36
- }
37
- ]
38
- })),
39
- ...targetPositions.map((position)=>({
40
- position,
41
- handles: [
42
- {
43
- id: `in-${position}`,
44
- type: 'target',
45
- handleType: 'input'
46
- }
47
- ]
48
- }))
49
- ];
50
- return {
51
- id,
52
- type: 'uipath.blank-node',
53
- position: {
54
- x,
55
- y
56
- },
57
- data: {
58
- display: {
59
- label
60
- },
61
- handleConfigurations
62
- },
63
- zIndex: 0
64
- };
65
- }
66
- function createLoopNode(config) {
67
- const { id, label, x, y } = config;
68
- return {
69
- id,
70
- type: 'uipath.control-flow.while',
71
- position: {
72
- x,
73
- y
74
- },
75
- data: {
76
- display: {
77
- label
78
- }
79
- },
80
- zIndex: 0
81
- };
82
- }
83
- function createStickyNote(id, color, content, position, size) {
84
- return {
85
- id,
86
- type: 'stickyNote',
87
- position,
88
- data: {
89
- color,
90
- content
91
- },
92
- width: size.width,
93
- height: size.height,
94
- zIndex: -10
95
- };
96
- }
97
- function DefaultStory() {
98
- const initialNodes = useMemo(()=>[
99
- createStickyNote('sticky-directions', 'yellow', '**All Directions**\nArrows point into center node', {
100
- x: 100,
101
- y: 80
102
- }, {
103
- width: 550,
104
- height: 590
105
- }),
106
- createNode({
107
- id: 'center',
108
- label: 'Center',
109
- x: 300,
110
- y: 300,
111
- targetPositions: [
112
- Position.Top,
113
- Position.Bottom,
114
- Position.Left,
115
- Position.Right
116
- ]
117
- }),
118
- createNode({
119
- id: 'top',
120
- label: 'Top',
121
- x: 300,
122
- y: 130,
123
- sourcePositions: [
124
- Position.Bottom
125
- ]
126
- }),
127
- createNode({
128
- id: 'bottom',
129
- label: 'Bottom',
130
- x: 300,
131
- y: 470,
132
- sourcePositions: [
133
- Position.Top
134
- ]
135
- }),
136
- createNode({
137
- id: 'left',
138
- label: 'Left',
139
- x: 130,
140
- y: 300,
141
- sourcePositions: [
142
- Position.Right
143
- ]
144
- }),
145
- createNode({
146
- id: 'right',
147
- label: 'Right',
148
- x: 470,
149
- y: 300,
150
- sourcePositions: [
151
- Position.Left
152
- ]
153
- }),
154
- createStickyNote('sticky-preview', 'blue', '**Preview**\nDashed primary color', {
155
- x: 760,
156
- y: 80
157
- }, {
158
- width: 420,
159
- height: 200
160
- }),
161
- createNode({
162
- id: 'preview-source',
163
- label: 'Preview',
164
- x: 800,
165
- y: 150,
166
- sourcePositions: [
167
- Position.Right
168
- ]
169
- }),
170
- createNode({
171
- id: 'preview-target',
172
- label: 'Target',
173
- x: 1020,
174
- y: 150,
175
- targetPositions: [
176
- Position.Left
177
- ]
178
- }),
179
- createStickyNote('sticky-diff', 'white', '**Diff States**\nFor version comparison', {
180
- x: 760,
181
- y: 330
182
- }, {
183
- width: 420,
184
- height: 340
185
- }),
186
- createNode({
187
- id: 'added-source',
188
- label: 'Added',
189
- x: 800,
190
- y: 410,
191
- sourcePositions: [
192
- Position.Right
193
- ]
194
- }),
195
- createNode({
196
- id: 'added-target',
197
- label: 'Target',
198
- x: 1020,
199
- y: 410,
200
- targetPositions: [
201
- Position.Left
202
- ]
203
- }),
204
- createNode({
205
- id: 'removed-source',
206
- label: 'Removed',
207
- x: 800,
208
- y: 530,
209
- sourcePositions: [
210
- Position.Right
211
- ]
212
- }),
213
- createNode({
214
- id: 'removed-target',
215
- label: 'Target',
216
- x: 1020,
217
- y: 530,
218
- targetPositions: [
219
- Position.Left
220
- ]
221
- }),
222
- createStickyNote('sticky-info', 'pink', '## SequenceEdge\n\nSmooth step edge with directional arrows.\n\n**States:**\n- Default (gray)\n- Hover (primary hover)\n- Selected (primary + outline)\n- Preview (dashed primary)\n- Diff Added (green)\n- Diff Removed (red dashed)', {
223
- x: 100,
224
- y: 720
225
- }, {
226
- width: 350,
227
- height: 280
228
- })
229
- ], []);
230
- const initialEdges = useMemo(()=>[
231
- {
232
- id: 'e-top-to-center',
233
- source: 'top',
234
- target: 'center',
235
- sourceHandle: `out-${Position.Bottom}`,
236
- targetHandle: `in-${Position.Top}`,
237
- type: 'sequence'
238
- },
239
- {
240
- id: 'e-bottom-to-center',
241
- source: 'bottom',
242
- target: 'center',
243
- sourceHandle: `out-${Position.Top}`,
244
- targetHandle: `in-${Position.Bottom}`,
245
- type: 'sequence'
246
- },
247
- {
248
- id: 'e-left-to-center',
249
- source: 'left',
250
- target: 'center',
251
- sourceHandle: `out-${Position.Right}`,
252
- targetHandle: `in-${Position.Left}`,
253
- type: 'sequence'
254
- },
255
- {
256
- id: 'e-right-to-center',
257
- source: 'right',
258
- target: 'center',
259
- sourceHandle: `out-${Position.Left}`,
260
- targetHandle: `in-${Position.Right}`,
261
- type: 'sequence'
262
- },
263
- {
264
- id: 'preview-edge-id',
265
- source: 'preview-source',
266
- target: 'preview-target',
267
- sourceHandle: `out-${Position.Right}`,
268
- targetHandle: `in-${Position.Left}`,
269
- type: 'sequence'
270
- },
271
- {
272
- id: 'e-added',
273
- source: 'added-source',
274
- target: 'added-target',
275
- sourceHandle: `out-${Position.Right}`,
276
- targetHandle: `in-${Position.Left}`,
277
- type: 'sequence',
278
- data: {
279
- isDiffAdded: true
280
- },
281
- style: {
282
- stroke: 'var(--palette-positive-base)'
283
- }
284
- },
285
- {
286
- id: 'e-removed',
287
- source: 'removed-source',
288
- target: 'removed-target',
289
- sourceHandle: `out-${Position.Right}`,
290
- targetHandle: `in-${Position.Left}`,
291
- type: 'sequence',
292
- data: {
293
- isDiffRemoved: true
294
- },
295
- style: {
296
- stroke: 'var(--palette-negative-base)',
297
- strokeDasharray: '5,5'
298
- }
299
- }
300
- ], []);
301
- const { canvasProps } = useCanvasStory({
302
- initialNodes,
303
- initialEdges,
304
- additionalNodeTypes: nodeTypes
305
- });
306
- return /*#__PURE__*/ jsx(BaseCanvas, {
307
- ...canvasProps,
308
- edgeTypes: edgeTypes,
309
- mode: "design",
310
- children: /*#__PURE__*/ jsx(Panel, {
311
- position: "bottom-right",
312
- children: /*#__PURE__*/ jsx(CanvasPositionControls, {
313
- translations: DefaultCanvasTranslations
314
- })
315
- })
316
- });
317
- }
318
- function EdgeLabelsStory() {
319
- const initialNodes = useMemo(()=>[
320
- createStickyNote('sticky-labels', 'green', '**Edge Labels**\nLabels rendered at edge midpoint via data.label', {
321
- x: 100,
322
- y: 80
323
- }, {
324
- width: 550,
325
- height: 590
326
- }),
327
- createNode({
328
- id: 'label-source-1',
329
- label: 'Source',
330
- x: 130,
331
- y: 160,
332
- sourcePositions: [
333
- Position.Right
334
- ]
335
- }),
336
- createNode({
337
- id: 'label-target-1',
338
- label: 'Target',
339
- x: 470,
340
- y: 160,
341
- targetPositions: [
342
- Position.Left
343
- ]
344
- }),
345
- createNode({
346
- id: 'label-source-2',
347
- label: 'Start',
348
- x: 300,
349
- y: 300,
350
- sourcePositions: [
351
- Position.Bottom
352
- ]
353
- }),
354
- createNode({
355
- id: 'label-target-2',
356
- label: 'End',
357
- x: 300,
358
- y: 480,
359
- targetPositions: [
360
- Position.Top
361
- ]
362
- }),
363
- createStickyNote('sticky-labels-diff', 'white', '**Labels + Diff States**\nEdge labels work alongside diff styling', {
364
- x: 760,
365
- y: 80
366
- }, {
367
- width: 420,
368
- height: 340
369
- }),
370
- createNode({
371
- id: 'label-added-source',
372
- label: 'Added',
373
- x: 800,
374
- y: 160,
375
- sourcePositions: [
376
- Position.Right
377
- ]
378
- }),
379
- createNode({
380
- id: 'label-added-target',
381
- label: 'Target',
382
- x: 1020,
383
- y: 160,
384
- targetPositions: [
385
- Position.Left
386
- ]
387
- }),
388
- createNode({
389
- id: 'label-removed-source',
390
- label: 'Removed',
391
- x: 800,
392
- y: 300,
393
- sourcePositions: [
394
- Position.Right
395
- ]
396
- }),
397
- createNode({
398
- id: 'label-removed-target',
399
- label: 'Target',
400
- x: 1020,
401
- y: 300,
402
- targetPositions: [
403
- Position.Left
404
- ]
405
- }),
406
- createStickyNote('sticky-info-labels', 'pink', '## Edge Labels\n\nSet `data.label` on an edge to display a label at the edge midpoint.\n\n**Features:**\n- Rendered via SVG foreignObject\n- Positioned at computed midpoint (labelX, labelY)\n- Styled consistently with StageEdge labels\n- Works with all edge states (diff, selected, etc.)', {
407
- x: 100,
408
- y: 720
409
- }, {
410
- width: 350,
411
- height: 280
412
- })
413
- ], []);
414
- const initialEdges = useMemo(()=>[
415
- {
416
- id: 'e-label-horizontal',
417
- source: 'label-source-1',
418
- target: 'label-target-1',
419
- sourceHandle: `out-${Position.Right}`,
420
- targetHandle: `in-${Position.Left}`,
421
- type: 'sequence',
422
- data: {
423
- label: 'Success'
424
- }
425
- },
426
- {
427
- id: 'e-label-vertical',
428
- source: 'label-source-2',
429
- target: 'label-target-2',
430
- sourceHandle: `out-${Position.Bottom}`,
431
- targetHandle: `in-${Position.Top}`,
432
- type: 'sequence',
433
- data: {
434
- label: 'Next Step'
435
- }
436
- },
437
- {
438
- id: 'e-label-added',
439
- source: 'label-added-source',
440
- target: 'label-added-target',
441
- sourceHandle: `out-${Position.Right}`,
442
- targetHandle: `in-${Position.Left}`,
443
- type: 'sequence',
444
- data: {
445
- isDiffAdded: true,
446
- label: 'New connection'
447
- },
448
- style: {
449
- stroke: 'var(--palette-positive-base)'
450
- }
451
- },
452
- {
453
- id: 'e-label-removed',
454
- source: 'label-removed-source',
455
- target: 'label-removed-target',
456
- sourceHandle: `out-${Position.Right}`,
457
- targetHandle: `in-${Position.Left}`,
458
- type: 'sequence',
459
- data: {
460
- isDiffRemoved: true,
461
- label: 'Deprecated'
462
- },
463
- style: {
464
- stroke: 'var(--palette-negative-base)',
465
- strokeDasharray: '5,5'
466
- }
467
- }
468
- ], []);
469
- const { canvasProps } = useCanvasStory({
470
- initialNodes,
471
- initialEdges,
472
- additionalNodeTypes: nodeTypes
473
- });
474
- return /*#__PURE__*/ jsx(BaseCanvas, {
475
- ...canvasProps,
476
- edgeTypes: edgeTypes,
477
- mode: "design",
478
- children: /*#__PURE__*/ jsx(Panel, {
479
- position: "bottom-right",
480
- children: /*#__PURE__*/ jsx(CanvasPositionControls, {
481
- translations: DefaultCanvasTranslations
482
- })
483
- })
484
- });
485
- }
486
- function ReadonlyStory() {
487
- const initialNodes = useMemo(()=>[
488
- createStickyNote('sticky-execution', 'green', '**Execution States**\nReadonly mode edge statuses', {
489
- x: 550,
490
- y: 80
491
- }, {
492
- width: 550,
493
- height: 825
494
- }),
495
- createNode({
496
- id: 'exec-start',
497
- label: 'Start',
498
- x: 580,
499
- y: 160,
500
- sourcePositions: [
501
- Position.Right
502
- ]
503
- }),
504
- createNode({
505
- id: 'exec-InProgress',
506
- label: 'In Progress',
507
- x: 770,
508
- y: 160,
509
- targetPositions: [
510
- Position.Left
511
- ],
512
- sourcePositions: [
513
- Position.Right
514
- ]
515
- }),
516
- createNode({
517
- id: 'exec-target-1',
518
- label: 'Target',
519
- x: 970,
520
- y: 160,
521
- targetPositions: [
522
- Position.Left
523
- ]
524
- }),
525
- createNode({
526
- id: 'exec-source-2',
527
- label: 'Source',
528
- x: 580,
529
- y: 310,
530
- sourcePositions: [
531
- Position.Right
532
- ]
533
- }),
534
- createNode({
535
- id: 'exec-Completed',
536
- label: 'Completed',
537
- x: 770,
538
- y: 310,
539
- targetPositions: [
540
- Position.Left
541
- ],
542
- sourcePositions: [
543
- Position.Right
544
- ]
545
- }),
546
- createNode({
547
- id: 'exec-target-2',
548
- label: 'Target',
549
- x: 970,
550
- y: 310,
551
- targetPositions: [
552
- Position.Left
553
- ]
554
- }),
555
- createNode({
556
- id: 'exec-source-3',
557
- label: 'Source',
558
- x: 580,
559
- y: 460,
560
- sourcePositions: [
561
- Position.Right
562
- ]
563
- }),
564
- createNode({
565
- id: 'exec-Failed',
566
- label: 'Failed',
567
- x: 770,
568
- y: 460,
569
- targetPositions: [
570
- Position.Left
571
- ],
572
- sourcePositions: [
573
- Position.Right
574
- ]
575
- }),
576
- createNode({
577
- id: 'exec-target-3',
578
- label: 'Target',
579
- x: 970,
580
- y: 460,
581
- targetPositions: [
582
- Position.Left
583
- ]
584
- }),
585
- createNode({
586
- id: 'exec-source-4',
587
- label: 'Source',
588
- x: 580,
589
- y: 610,
590
- sourcePositions: [
591
- Position.Right
592
- ]
593
- }),
594
- createNode({
595
- id: 'exec-Paused',
596
- label: 'Paused',
597
- x: 770,
598
- y: 610,
599
- targetPositions: [
600
- Position.Left
601
- ],
602
- sourcePositions: [
603
- Position.Right
604
- ]
605
- }),
606
- createNode({
607
- id: 'exec-target-4',
608
- label: 'Target',
609
- x: 970,
610
- y: 610,
611
- targetPositions: [
612
- Position.Left
613
- ]
614
- }),
615
- createNode({
616
- id: 'exec-source-5',
617
- label: 'Source',
618
- x: 580,
619
- y: 760,
620
- sourcePositions: [
621
- Position.Right
622
- ]
623
- }),
624
- createNode({
625
- id: 'exec-Cancelled',
626
- label: 'Cancelled',
627
- x: 770,
628
- y: 760,
629
- targetPositions: [
630
- Position.Left
631
- ],
632
- sourcePositions: [
633
- Position.Right
634
- ]
635
- }),
636
- createNode({
637
- id: 'exec-target-5',
638
- label: 'Target',
639
- x: 970,
640
- y: 760,
641
- targetPositions: [
642
- Position.Left
643
- ]
644
- }),
645
- createStickyNote('sticky-info', 'pink', '## Execution States\n\nThese states show in **readonly mode** when edges represent execution flow.\n\n**States:**\n- **InProgress**: Animated dot moving along edge\n- **Completed**: Green edge\n- **Failed**: Red edge\n- **Paused**: Orange edge\n- **Cancelled**: Red edge\n\nEdge colors are determined by target node execution status.', {
646
- x: 100,
647
- y: 80
648
- }, {
649
- width: 400,
650
- height: 320
651
- })
652
- ], []);
653
- const initialEdges = useMemo(()=>[
654
- {
655
- id: 'e-InProgress-1',
656
- source: 'exec-start',
657
- target: 'exec-InProgress',
658
- sourceHandle: `out-${Position.Right}`,
659
- targetHandle: `in-${Position.Left}`,
660
- type: 'sequence'
661
- },
662
- {
663
- id: 'e-InProgress-2',
664
- source: 'exec-InProgress',
665
- target: 'exec-target-1',
666
- sourceHandle: `out-${Position.Right}`,
667
- targetHandle: `in-${Position.Left}`,
668
- type: 'sequence'
669
- },
670
- {
671
- id: 'e-Completed-1',
672
- source: 'exec-source-2',
673
- target: 'exec-Completed',
674
- sourceHandle: `out-${Position.Right}`,
675
- targetHandle: `in-${Position.Left}`,
676
- type: 'sequence'
677
- },
678
- {
679
- id: 'e-Completed-2',
680
- source: 'exec-Completed',
681
- target: 'exec-target-2',
682
- sourceHandle: `out-${Position.Right}`,
683
- targetHandle: `in-${Position.Left}`,
684
- type: 'sequence'
685
- },
686
- {
687
- id: 'e-Failed-1',
688
- source: 'exec-source-3',
689
- target: 'exec-Failed',
690
- sourceHandle: `out-${Position.Right}`,
691
- targetHandle: `in-${Position.Left}`,
692
- type: 'sequence'
693
- },
694
- {
695
- id: 'e-Failed-2',
696
- source: 'exec-Failed',
697
- target: 'exec-target-3',
698
- sourceHandle: `out-${Position.Right}`,
699
- targetHandle: `in-${Position.Left}`,
700
- type: 'sequence'
701
- },
702
- {
703
- id: 'e-Paused-1',
704
- source: 'exec-source-4',
705
- target: 'exec-Paused',
706
- sourceHandle: `out-${Position.Right}`,
707
- targetHandle: `in-${Position.Left}`,
708
- type: 'sequence'
709
- },
710
- {
711
- id: 'e-Paused-2',
712
- source: 'exec-Paused',
713
- target: 'exec-target-4',
714
- sourceHandle: `out-${Position.Right}`,
715
- targetHandle: `in-${Position.Left}`,
716
- type: 'sequence'
717
- },
718
- {
719
- id: 'e-Cancelled-1',
720
- source: 'exec-source-5',
721
- target: 'exec-Cancelled',
722
- sourceHandle: `out-${Position.Right}`,
723
- targetHandle: `in-${Position.Left}`,
724
- type: 'sequence'
725
- },
726
- {
727
- id: 'e-Cancelled-2',
728
- source: 'exec-Cancelled',
729
- target: 'exec-target-5',
730
- sourceHandle: `out-${Position.Right}`,
731
- targetHandle: `in-${Position.Left}`,
732
- type: 'sequence'
733
- }
734
- ], []);
735
- const { canvasProps } = useCanvasStory({
736
- initialNodes,
737
- initialEdges,
738
- additionalNodeTypes: nodeTypes
739
- });
740
- return /*#__PURE__*/ jsx(BaseCanvas, {
741
- ...canvasProps,
742
- edgeTypes: edgeTypes,
743
- mode: "readonly",
744
- children: /*#__PURE__*/ jsx(Panel, {
745
- position: "bottom-right",
746
- children: /*#__PURE__*/ jsx(CanvasPositionControls, {
747
- translations: DefaultCanvasTranslations
748
- })
749
- })
750
- });
751
- }
752
- function DesignModeStory() {
753
- const initialNodes = useMemo(()=>[
754
- createStickyNote('sticky-validation', 'blue', '**Validation States**\nDesign mode edge validation', {
755
- x: 550,
756
- y: 80
757
- }, {
758
- width: 420,
759
- height: 675
760
- }),
761
- createNode({
762
- id: 'val-source-1-INFO',
763
- label: 'Source',
764
- x: 590,
765
- y: 160,
766
- sourcePositions: [
767
- Position.Right
768
- ]
769
- }),
770
- createNode({
771
- id: 'val-target-1-INFO',
772
- label: 'Info',
773
- x: 810,
774
- y: 160,
775
- targetPositions: [
776
- Position.Left
777
- ]
778
- }),
779
- createNode({
780
- id: 'val-source-2-WARNING',
781
- label: 'Source',
782
- x: 590,
783
- y: 310,
784
- sourcePositions: [
785
- Position.Right
786
- ]
787
- }),
788
- createNode({
789
- id: 'val-target-2-WARNING',
790
- label: 'Warning',
791
- x: 810,
792
- y: 310,
793
- targetPositions: [
794
- Position.Left
795
- ]
796
- }),
797
- createNode({
798
- id: 'val-source-3-ERROR',
799
- label: 'Source',
800
- x: 590,
801
- y: 460,
802
- sourcePositions: [
803
- Position.Right
804
- ]
805
- }),
806
- createNode({
807
- id: 'val-target-3-ERROR',
808
- label: 'Error',
809
- x: 810,
810
- y: 460,
811
- targetPositions: [
812
- Position.Left
813
- ]
814
- }),
815
- createNode({
816
- id: 'val-source-4-CRITICAL',
817
- label: 'Source',
818
- x: 590,
819
- y: 610,
820
- sourcePositions: [
821
- Position.Right
822
- ]
823
- }),
824
- createNode({
825
- id: 'val-target-4-CRITICAL',
826
- label: 'Critical',
827
- x: 810,
828
- y: 610,
829
- targetPositions: [
830
- Position.Left
831
- ]
832
- }),
833
- createStickyNote('sticky-info', 'pink', '## Validation States\n\nThese states show in **design mode** when edges have validation errors.\n\n**Severities:**\n- **INFO**: Blue edge\n- **WARNING**: Orange edge\n- **ERROR**: Red edge\n- **CRITICAL**: Red edge\n\nEdge colors indicate validation issues.', {
834
- x: 100,
835
- y: 80
836
- }, {
837
- width: 400,
838
- height: 300
839
- })
840
- ], []);
841
- const initialEdges = useMemo(()=>[
842
- {
843
- id: 'e-validation-INFO',
844
- source: 'val-source-1-INFO',
845
- target: 'val-target-1-INFO',
846
- sourceHandle: `out-${Position.Right}`,
847
- targetHandle: `in-${Position.Left}`,
848
- type: 'sequence'
849
- },
850
- {
851
- id: 'e-validation-WARNING',
852
- source: 'val-source-2-WARNING',
853
- target: 'val-target-2-WARNING',
854
- sourceHandle: `out-${Position.Right}`,
855
- targetHandle: `in-${Position.Left}`,
856
- type: 'sequence'
857
- },
858
- {
859
- id: 'e-validation-ERROR',
860
- source: 'val-source-3-ERROR',
861
- target: 'val-target-3-ERROR',
862
- sourceHandle: `out-${Position.Right}`,
863
- targetHandle: `in-${Position.Left}`,
864
- type: 'sequence'
865
- },
866
- {
867
- id: 'e-validation-CRITICAL',
868
- source: 'val-source-4-CRITICAL',
869
- target: 'val-target-4-CRITICAL',
870
- sourceHandle: `out-${Position.Right}`,
871
- targetHandle: `in-${Position.Left}`,
872
- type: 'sequence'
873
- }
874
- ], []);
875
- const { canvasProps } = useCanvasStory({
876
- initialNodes,
877
- initialEdges,
878
- additionalNodeTypes: nodeTypes
879
- });
880
- return /*#__PURE__*/ jsx(BaseCanvas, {
881
- ...canvasProps,
882
- edgeTypes: edgeTypes,
883
- mode: "design",
884
- children: /*#__PURE__*/ jsx(Panel, {
885
- position: "bottom-right",
886
- children: /*#__PURE__*/ jsx(CanvasPositionControls, {
887
- translations: DefaultCanvasTranslations
888
- })
889
- })
890
- });
891
- }
892
- function LoopEdgesStory() {
893
- const initialNodes = useMemo(()=>[
894
- createStickyNote('sticky-chain', 'pink', '**Loop Chain**\nMultiple loop nodes in sequence with both output and success handles', {
895
- x: 160,
896
- y: 400
897
- }, {
898
- width: 640,
899
- height: 320
900
- }),
901
- createNode({
902
- id: 'chain-start',
903
- label: 'Start',
904
- x: 176,
905
- y: 480,
906
- sourcePositions: [
907
- Position.Right
908
- ]
909
- }),
910
- createLoopNode({
911
- id: 'chain-loop-1',
912
- label: 'Loop 1',
913
- x: 336,
914
- y: 480
915
- }),
916
- createLoopNode({
917
- id: 'chain-loop-2',
918
- label: 'Loop 2',
919
- x: 544,
920
- y: 512
921
- }),
922
- createStickyNote('sticky-info', 'white', "## Loop Edges\n\nSequenceEdge automatically detects and renders loop edges with custom paths.\n\n**Detection:**\n- **Self-loops**: source === target\n- **LoopBack edges**: targetHandle === 'loopBack'\n\n**Visual Features:**\n- Path goes below the node with rounded corners\n- Grid-snapped to 16px for consistency\n- Success handle loops have larger height (96px vs 64px)\n- Edge toolbar works on loop paths", {
923
- x: 160,
924
- y: 48
925
- }, {
926
- width: 512,
927
- height: 336
928
- })
929
- ], []);
930
- const initialEdges = useMemo(()=>[
931
- {
932
- id: 'e-chain-start',
933
- source: 'chain-start',
934
- target: 'chain-loop-1',
935
- sourceHandle: `out-${Position.Right}`,
936
- targetHandle: 'input',
937
- type: 'sequence'
938
- },
939
- {
940
- id: 'e-chain-loop1-success',
941
- source: 'chain-loop-1',
942
- target: 'chain-loop-2',
943
- sourceHandle: 'body',
944
- targetHandle: 'input',
945
- type: 'sequence'
946
- },
947
- {
948
- id: 'e-chain-loop2-loopBack',
949
- source: 'chain-loop-2',
950
- target: 'chain-loop-2',
951
- sourceHandle: 'body',
952
- targetHandle: 'loopBack',
953
- type: 'sequence'
954
- },
955
- {
956
- id: 'e-chain-loop2-success',
957
- source: 'chain-loop-2',
958
- target: 'chain-loop-1',
959
- sourceHandle: 'success',
960
- targetHandle: 'loopBack',
961
- type: 'sequence'
962
- }
963
- ], []);
964
- const { canvasProps } = useCanvasStory({
965
- initialNodes,
966
- initialEdges,
967
- additionalNodeTypes: nodeTypes
968
- });
969
- return /*#__PURE__*/ jsx(BaseCanvas, {
970
- ...canvasProps,
971
- edgeTypes: edgeTypes,
972
- mode: "design",
973
- children: /*#__PURE__*/ jsx(Panel, {
974
- position: "bottom-right",
975
- children: /*#__PURE__*/ jsx(CanvasPositionControls, {
976
- translations: DefaultCanvasTranslations
977
- })
978
- })
979
- });
980
- }
981
- const Default = {
982
- render: ()=>/*#__PURE__*/ jsx(DefaultStory, {})
983
- };
984
- const EdgeLabels = {
985
- render: ()=>/*#__PURE__*/ jsx(EdgeLabelsStory, {}),
986
- parameters: {
987
- docs: {
988
- description: {
989
- story: 'Demonstrates edge labels rendered at the midpoint via data.label. Labels work alongside all edge states including diff styling.'
990
- }
991
- }
992
- }
993
- };
994
- const ExecutionStates = {
995
- render: ()=>/*#__PURE__*/ jsx(ReadonlyStory, {}),
996
- parameters: {
997
- docs: {
998
- description: {
999
- story: 'Demonstrates execution states visible in readonly mode. Edges show different colors based on target node execution status, with InProgress showing an animated dot.'
1000
- }
1001
- }
1002
- }
1003
- };
1004
- const ValidationStates = {
1005
- render: ()=>/*#__PURE__*/ jsx(DesignModeStory, {}),
1006
- parameters: {
1007
- docs: {
1008
- description: {
1009
- story: 'Demonstrates validation states visible in design mode. Edges show different colors based on validation severity.'
1010
- }
1011
- }
1012
- }
1013
- };
1014
- const LoopEdges = {
1015
- render: ()=>/*#__PURE__*/ jsx(LoopEdgesStory, {}),
1016
- parameters: {
1017
- docs: {
1018
- description: {
1019
- story: 'Demonstrates loop edges with custom paths. SequenceEdge automatically detects self-loops and loopBack edges, rendering them with paths that go below the node. Success handle loops have larger dimensions than output handle loops.'
1020
- }
1021
- }
1022
- }
1023
- };
1024
- export { Default, EdgeLabels, ExecutionStates, LoopEdges, ValidationStates, SequenceEdge_stories as default };