free-layout-specs.ts 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. /**
  2. * Copyright (c) 2025 Bytedance Ltd. and/or its affiliates
  3. * SPDX-License-Identifier: MIT
  4. */
  5. import { WorkflowJSON } from "@flowgram.ai/free-layout-core";
  6. export const freeLayout1: WorkflowJSON = {
  7. "nodes": [
  8. {
  9. "id": "start_0",
  10. "type": "start",
  11. "meta": {
  12. "position": {
  13. "x": -264,
  14. "y": -79
  15. }
  16. },
  17. "data": {}
  18. },
  19. {
  20. "id": "end_0",
  21. "type": "end",
  22. "meta": {
  23. "position": {
  24. "x": 1515,
  25. "y": -191
  26. }
  27. },
  28. "data": {}
  29. },
  30. {
  31. "id": "base_1",
  32. "type": "base",
  33. "meta": {
  34. "position": {
  35. "x": 103.5,
  36. "y": -122.5
  37. }
  38. }
  39. },
  40. {
  41. "id": "base_2",
  42. "type": "base",
  43. "meta": {
  44. "position": {
  45. "x": 525.5,
  46. "y": -250.5
  47. }
  48. }
  49. },
  50. {
  51. "id": "loop_1",
  52. "type": "loop",
  53. "meta": {
  54. "position": {
  55. "x": 541.5,
  56. "y": 42.5
  57. },
  58. "canvasPosition": {
  59. "x": 1154.5,
  60. "y": 206.5
  61. }
  62. },
  63. "data": {
  64. "target": {
  65. "meta": {
  66. "name": "循环输出_"
  67. },
  68. "type": "Boolean"
  69. }
  70. },
  71. "blocks": [
  72. {
  73. "id": "base_in_loop_1",
  74. "type": "base",
  75. "meta": {
  76. "position": {
  77. "x": 40,
  78. "y": 100
  79. }
  80. }
  81. },
  82. {
  83. "id": "base_in_loop_2",
  84. "type": "base",
  85. "meta": {
  86. "position": {
  87. "x": 62,
  88. "y": 299
  89. }
  90. }
  91. },
  92. {
  93. "id": "base_in_loop_3",
  94. "type": "base",
  95. "meta": {
  96. "position": {
  97. "x": 457,
  98. "y": 188
  99. }
  100. }
  101. }
  102. ],
  103. "edges": [
  104. {
  105. "sourceNodeID": "base_in_loop_1",
  106. "targetNodeID": "base_in_loop_3"
  107. },
  108. {
  109. "sourceNodeID": "base_in_loop_2",
  110. "targetNodeID": "base_in_loop_3"
  111. }
  112. ]
  113. },
  114. {
  115. "id": "base_3",
  116. "type": "base",
  117. "meta": {
  118. "position": {
  119. "x": 1063.5,
  120. "y": -52.987060546875
  121. }
  122. }
  123. }
  124. ],
  125. "edges": [
  126. {
  127. "sourceNodeID": "base_2",
  128. "targetNodeID": "end_0"
  129. },
  130. {
  131. "sourceNodeID": "base_3",
  132. "targetNodeID": "end_0"
  133. },
  134. {
  135. "sourceNodeID": "start_0",
  136. "targetNodeID": "base_1"
  137. },
  138. {
  139. "sourceNodeID": "base_1",
  140. "targetNodeID": "base_2"
  141. },
  142. {
  143. "sourceNodeID": "base_1",
  144. "targetNodeID": "loop_1"
  145. },
  146. {
  147. "sourceNodeID": "loop_1",
  148. "targetNodeID": "base_3",
  149. "sourcePortID": "loop-output"
  150. }
  151. ]
  152. }