@antv/layout 0.3.12 → 1.0.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 (555) hide show
  1. package/README.md +45 -32
  2. package/dist/3a54d760230d1933f953.worker.js +2 -0
  3. package/dist/3a54d760230d1933f953.worker.js.map +1 -0
  4. package/dist/index.min.js +2 -0
  5. package/dist/index.min.js.map +1 -0
  6. package/lib/Circular.d.ts +40 -0
  7. package/lib/Supervisor.d.ts +65 -0
  8. package/lib/index.d.ts +4 -3
  9. package/lib/registry.d.ts +3 -0
  10. package/lib/types.d.ts +128 -0
  11. package/lib/util/gpu.d.ts +22 -22
  12. package/lib/util/index.d.ts +6 -6
  13. package/lib/util/math.d.ts +3 -3
  14. package/lib/worker.d.ts +3 -0
  15. package/package.json +21 -95
  16. package/dist/layout.min.js +0 -3
  17. package/dist/layout.min.js.LICENSE.txt +0 -1
  18. package/dist/layout.min.js.map +0 -1
  19. package/es/index.d.ts +0 -3
  20. package/es/index.js +0 -6
  21. package/es/index.js.map +0 -1
  22. package/es/layout/base.d.ts +0 -22
  23. package/es/layout/base.js +0 -51
  24. package/es/layout/base.js.map +0 -1
  25. package/es/layout/circular.d.ts +0 -80
  26. package/es/layout/circular.js +0 -314
  27. package/es/layout/circular.js.map +0 -1
  28. package/es/layout/comboCombined.d.ts +0 -54
  29. package/es/layout/comboCombined.js +0 -354
  30. package/es/layout/comboCombined.js.map +0 -1
  31. package/es/layout/comboForce.d.ts +0 -134
  32. package/es/layout/comboForce.js +0 -801
  33. package/es/layout/comboForce.js.map +0 -1
  34. package/es/layout/concentric.d.ts +0 -67
  35. package/es/layout/concentric.js +0 -219
  36. package/es/layout/concentric.js.map +0 -1
  37. package/es/layout/constants.d.ts +0 -12
  38. package/es/layout/constants.js +0 -22
  39. package/es/layout/constants.js.map +0 -1
  40. package/es/layout/dagre/graph.d.ts +0 -91
  41. package/es/layout/dagre/graph.js +0 -4
  42. package/es/layout/dagre/graph.js.map +0 -1
  43. package/es/layout/dagre/index.d.ts +0 -8
  44. package/es/layout/dagre/index.js +0 -31
  45. package/es/layout/dagre/index.js.map +0 -1
  46. package/es/layout/dagre/src/acyclic.d.ts +0 -6
  47. package/es/layout/dagre/src/acyclic.js +0 -52
  48. package/es/layout/dagre/src/acyclic.js.map +0 -1
  49. package/es/layout/dagre/src/add-border-segments.d.ts +0 -3
  50. package/es/layout/dagre/src/add-border-segments.js +0 -32
  51. package/es/layout/dagre/src/add-border-segments.js.map +0 -1
  52. package/es/layout/dagre/src/coordinate-system.d.ts +0 -6
  53. package/es/layout/dagre/src/coordinate-system.js +0 -69
  54. package/es/layout/dagre/src/coordinate-system.js.map +0 -1
  55. package/es/layout/dagre/src/data/list.d.ts +0 -12
  56. package/es/layout/dagre/src/data/list.js +0 -48
  57. package/es/layout/dagre/src/data/list.js.map +0 -1
  58. package/es/layout/dagre/src/debug.d.ts +0 -3
  59. package/es/layout/dagre/src/debug.js +0 -24
  60. package/es/layout/dagre/src/debug.js.map +0 -1
  61. package/es/layout/dagre/src/greedy-fas.d.ts +0 -3
  62. package/es/layout/dagre/src/greedy-fas.js +0 -114
  63. package/es/layout/dagre/src/greedy-fas.js.map +0 -1
  64. package/es/layout/dagre/src/layout.d.ts +0 -3
  65. package/es/layout/dagre/src/layout.js +0 -518
  66. package/es/layout/dagre/src/layout.js.map +0 -1
  67. package/es/layout/dagre/src/nesting-graph.d.ts +0 -6
  68. package/es/layout/dagre/src/nesting-graph.js +0 -117
  69. package/es/layout/dagre/src/nesting-graph.js.map +0 -1
  70. package/es/layout/dagre/src/normalize.d.ts +0 -6
  71. package/es/layout/dagre/src/normalize.js +0 -89
  72. package/es/layout/dagre/src/normalize.js.map +0 -1
  73. package/es/layout/dagre/src/order/add-subgraph-constraints.d.ts +0 -3
  74. package/es/layout/dagre/src/order/add-subgraph-constraints.js +0 -27
  75. package/es/layout/dagre/src/order/add-subgraph-constraints.js.map +0 -1
  76. package/es/layout/dagre/src/order/barycenter.d.ts +0 -11
  77. package/es/layout/dagre/src/order/barycenter.js +0 -24
  78. package/es/layout/dagre/src/order/barycenter.js.map +0 -1
  79. package/es/layout/dagre/src/order/build-layer-graph.d.ts +0 -3
  80. package/es/layout/dagre/src/order/build-layer-graph.js +0 -71
  81. package/es/layout/dagre/src/order/build-layer-graph.js.map +0 -1
  82. package/es/layout/dagre/src/order/cross-count.d.ts +0 -3
  83. package/es/layout/dagre/src/order/cross-count.js +0 -65
  84. package/es/layout/dagre/src/order/cross-count.js.map +0 -1
  85. package/es/layout/dagre/src/order/index.d.ts +0 -3
  86. package/es/layout/dagre/src/order/index.js +0 -91
  87. package/es/layout/dagre/src/order/index.js.map +0 -1
  88. package/es/layout/dagre/src/order/init-data-order.d.ts +0 -6
  89. package/es/layout/dagre/src/order/init-data-order.js +0 -25
  90. package/es/layout/dagre/src/order/init-data-order.js.map +0 -1
  91. package/es/layout/dagre/src/order/init-order.d.ts +0 -3
  92. package/es/layout/dagre/src/order/init-order.js +0 -52
  93. package/es/layout/dagre/src/order/init-order.js.map +0 -1
  94. package/es/layout/dagre/src/order/resolve-conflicts.d.ts +0 -19
  95. package/es/layout/dagre/src/order/resolve-conflicts.js +0 -93
  96. package/es/layout/dagre/src/order/resolve-conflicts.js.map +0 -1
  97. package/es/layout/dagre/src/order/sort-subgraph.d.ts +0 -7
  98. package/es/layout/dagre/src/order/sort-subgraph.js +0 -85
  99. package/es/layout/dagre/src/order/sort-subgraph.js.map +0 -1
  100. package/es/layout/dagre/src/order/sort.d.ts +0 -7
  101. package/es/layout/dagre/src/order/sort.js +0 -68
  102. package/es/layout/dagre/src/order/sort.js.map +0 -1
  103. package/es/layout/dagre/src/parent-dummy-chains.d.ts +0 -3
  104. package/es/layout/dagre/src/parent-dummy-chains.js +0 -81
  105. package/es/layout/dagre/src/parent-dummy-chains.js.map +0 -1
  106. package/es/layout/dagre/src/position/bk.d.ts +0 -23
  107. package/es/layout/dagre/src/position/bk.js +0 -370
  108. package/es/layout/dagre/src/position/bk.js.map +0 -1
  109. package/es/layout/dagre/src/position/index.d.ts +0 -3
  110. package/es/layout/dagre/src/position/index.js +0 -51
  111. package/es/layout/dagre/src/position/index.js.map +0 -1
  112. package/es/layout/dagre/src/rank/feasible-tree.d.ts +0 -9
  113. package/es/layout/dagre/src/rank/feasible-tree.js +0 -148
  114. package/es/layout/dagre/src/rank/feasible-tree.js.map +0 -1
  115. package/es/layout/dagre/src/rank/index.d.ts +0 -3
  116. package/es/layout/dagre/src/rank/index.js +0 -53
  117. package/es/layout/dagre/src/rank/index.js.map +0 -1
  118. package/es/layout/dagre/src/rank/network-simplex.d.ts +0 -9
  119. package/es/layout/dagre/src/rank/network-simplex.js +0 -195
  120. package/es/layout/dagre/src/rank/network-simplex.js.map +0 -1
  121. package/es/layout/dagre/src/rank/util.d.ts +0 -11
  122. package/es/layout/dagre/src/rank/util.js +0 -141
  123. package/es/layout/dagre/src/rank/util.js.map +0 -1
  124. package/es/layout/dagre/src/util.d.ts +0 -31
  125. package/es/layout/dagre/src/util.js +0 -261
  126. package/es/layout/dagre/src/util.js.map +0 -1
  127. package/es/layout/dagre.d.ts +0 -71
  128. package/es/layout/dagre.js +0 -433
  129. package/es/layout/dagre.js.map +0 -1
  130. package/es/layout/dagreCompound.d.ts +0 -121
  131. package/es/layout/dagreCompound.js +0 -391
  132. package/es/layout/dagreCompound.js.map +0 -1
  133. package/es/layout/er/core.d.ts +0 -1
  134. package/es/layout/er/core.js +0 -107
  135. package/es/layout/er/core.js.map +0 -1
  136. package/es/layout/er/forceGrid.d.ts +0 -8
  137. package/es/layout/er/forceGrid.js +0 -88
  138. package/es/layout/er/forceGrid.js.map +0 -1
  139. package/es/layout/er/grid.d.ts +0 -26
  140. package/es/layout/er/grid.js +0 -162
  141. package/es/layout/er/grid.js.map +0 -1
  142. package/es/layout/er/index.d.ts +0 -29
  143. package/es/layout/er/index.js +0 -54
  144. package/es/layout/er/index.js.map +0 -1
  145. package/es/layout/er/mysqlWorkbench.d.ts +0 -6
  146. package/es/layout/er/mysqlWorkbench.js +0 -324
  147. package/es/layout/er/mysqlWorkbench.js.map +0 -1
  148. package/es/layout/er/type.d.ts +0 -35
  149. package/es/layout/er/type.js +0 -2
  150. package/es/layout/er/type.js.map +0 -1
  151. package/es/layout/force/force-in-a-box.d.ts +0 -28
  152. package/es/layout/force/force-in-a-box.js +0 -330
  153. package/es/layout/force/force-in-a-box.js.map +0 -1
  154. package/es/layout/force/force.d.ts +0 -100
  155. package/es/layout/force/force.js +0 -340
  156. package/es/layout/force/force.js.map +0 -1
  157. package/es/layout/force/index.d.ts +0 -1
  158. package/es/layout/force/index.js +0 -2
  159. package/es/layout/force/index.js.map +0 -1
  160. package/es/layout/force2/ForceNBody.d.ts +0 -7
  161. package/es/layout/force2/ForceNBody.js +0 -94
  162. package/es/layout/force2/ForceNBody.js.map +0 -1
  163. package/es/layout/force2/index.d.ts +0 -119
  164. package/es/layout/force2/index.js +0 -608
  165. package/es/layout/force2/index.js.map +0 -1
  166. package/es/layout/forceAtlas2/body.d.ts +0 -33
  167. package/es/layout/forceAtlas2/body.js +0 -89
  168. package/es/layout/forceAtlas2/body.js.map +0 -1
  169. package/es/layout/forceAtlas2/index.d.ts +0 -115
  170. package/es/layout/forceAtlas2/index.js +0 -484
  171. package/es/layout/forceAtlas2/index.js.map +0 -1
  172. package/es/layout/forceAtlas2/quad.d.ts +0 -27
  173. package/es/layout/forceAtlas2/quad.js +0 -96
  174. package/es/layout/forceAtlas2/quad.js.map +0 -1
  175. package/es/layout/forceAtlas2/quadTree.d.ts +0 -20
  176. package/es/layout/forceAtlas2/quadTree.js +0 -103
  177. package/es/layout/forceAtlas2/quadTree.js.map +0 -1
  178. package/es/layout/fruchterman.d.ts +0 -73
  179. package/es/layout/fruchterman.js +0 -296
  180. package/es/layout/fruchterman.js.map +0 -1
  181. package/es/layout/gForce.d.ts +0 -96
  182. package/es/layout/gForce.js +0 -399
  183. package/es/layout/gForce.js.map +0 -1
  184. package/es/layout/gpu/fruchterman.d.ts +0 -57
  185. package/es/layout/gpu/fruchterman.js +0 -267
  186. package/es/layout/gpu/fruchterman.js.map +0 -1
  187. package/es/layout/gpu/fruchtermanShader.d.ts +0 -4
  188. package/es/layout/gpu/fruchtermanShader.js +0 -201
  189. package/es/layout/gpu/fruchtermanShader.js.map +0 -1
  190. package/es/layout/gpu/gForce.d.ts +0 -68
  191. package/es/layout/gpu/gForce.js +0 -330
  192. package/es/layout/gpu/gForce.js.map +0 -1
  193. package/es/layout/gpu/gForceShader.d.ts +0 -4
  194. package/es/layout/gpu/gForceShader.js +0 -218
  195. package/es/layout/gpu/gForceShader.js.map +0 -1
  196. package/es/layout/grid.d.ts +0 -83
  197. package/es/layout/grid.js +0 -317
  198. package/es/layout/grid.js.map +0 -1
  199. package/es/layout/index.d.ts +0 -22
  200. package/es/layout/index.js +0 -25
  201. package/es/layout/index.js.map +0 -1
  202. package/es/layout/layout.d.ts +0 -26
  203. package/es/layout/layout.js +0 -97
  204. package/es/layout/layout.js.map +0 -1
  205. package/es/layout/mds.d.ts +0 -39
  206. package/es/layout/mds.js +0 -122
  207. package/es/layout/mds.js.map +0 -1
  208. package/es/layout/radial/index.d.ts +0 -1
  209. package/es/layout/radial/index.js +0 -2
  210. package/es/layout/radial/index.js.map +0 -1
  211. package/es/layout/radial/mds.d.ts +0 -15
  212. package/es/layout/radial/mds.js +0 -38
  213. package/es/layout/radial/mds.js.map +0 -1
  214. package/es/layout/radial/radial.d.ts +0 -74
  215. package/es/layout/radial/radial.js +0 -420
  216. package/es/layout/radial/radial.js.map +0 -1
  217. package/es/layout/radial/radialNonoverlapForce.d.ts +0 -50
  218. package/es/layout/radial/radialNonoverlapForce.js +0 -123
  219. package/es/layout/radial/radialNonoverlapForce.js.map +0 -1
  220. package/es/layout/random.d.ts +0 -35
  221. package/es/layout/random.js +0 -62
  222. package/es/layout/random.js.map +0 -1
  223. package/es/layout/types.d.ts +0 -432
  224. package/es/layout/types.js +0 -2
  225. package/es/layout/types.js.map +0 -1
  226. package/es/registy/index.d.ts +0 -3
  227. package/es/registy/index.js +0 -41
  228. package/es/registy/index.js.map +0 -1
  229. package/es/util/array.d.ts +0 -1
  230. package/es/util/array.js +0 -2
  231. package/es/util/array.js.map +0 -1
  232. package/es/util/function.d.ts +0 -6
  233. package/es/util/function.js +0 -56
  234. package/es/util/function.js.map +0 -1
  235. package/es/util/gpu.d.ts +0 -52
  236. package/es/util/gpu.js +0 -239
  237. package/es/util/gpu.js.map +0 -1
  238. package/es/util/index.d.ts +0 -6
  239. package/es/util/index.js +0 -7
  240. package/es/util/index.js.map +0 -1
  241. package/es/util/math.d.ts +0 -48
  242. package/es/util/math.js +0 -276
  243. package/es/util/math.js.map +0 -1
  244. package/es/util/number.d.ts +0 -3
  245. package/es/util/number.js +0 -7
  246. package/es/util/number.js.map +0 -1
  247. package/es/util/object.d.ts +0 -2
  248. package/es/util/object.js +0 -25
  249. package/es/util/object.js.map +0 -1
  250. package/es/util/string.d.ts +0 -2
  251. package/es/util/string.js +0 -16
  252. package/es/util/string.js.map +0 -1
  253. package/lib/index.js +0 -24
  254. package/lib/index.js.map +0 -1
  255. package/lib/layout/base.d.ts +0 -22
  256. package/lib/layout/base.js +0 -56
  257. package/lib/layout/base.js.map +0 -1
  258. package/lib/layout/circular.d.ts +0 -80
  259. package/lib/layout/circular.js +0 -337
  260. package/lib/layout/circular.js.map +0 -1
  261. package/lib/layout/comboCombined.d.ts +0 -54
  262. package/lib/layout/comboCombined.js +0 -390
  263. package/lib/layout/comboCombined.js.map +0 -1
  264. package/lib/layout/comboForce.d.ts +0 -134
  265. package/lib/layout/comboForce.js +0 -826
  266. package/lib/layout/comboForce.js.map +0 -1
  267. package/lib/layout/concentric.d.ts +0 -67
  268. package/lib/layout/concentric.js +0 -243
  269. package/lib/layout/concentric.js.map +0 -1
  270. package/lib/layout/constants.d.ts +0 -12
  271. package/lib/layout/constants.js +0 -25
  272. package/lib/layout/constants.js.map +0 -1
  273. package/lib/layout/dagre/graph.d.ts +0 -91
  274. package/lib/layout/dagre/graph.js +0 -28
  275. package/lib/layout/dagre/graph.js.map +0 -1
  276. package/lib/layout/dagre/index.d.ts +0 -8
  277. package/lib/layout/dagre/index.js +0 -36
  278. package/lib/layout/dagre/index.js.map +0 -1
  279. package/lib/layout/dagre/src/acyclic.d.ts +0 -6
  280. package/lib/layout/dagre/src/acyclic.js +0 -57
  281. package/lib/layout/dagre/src/acyclic.js.map +0 -1
  282. package/lib/layout/dagre/src/add-border-segments.d.ts +0 -3
  283. package/lib/layout/dagre/src/add-border-segments.js +0 -34
  284. package/lib/layout/dagre/src/add-border-segments.js.map +0 -1
  285. package/lib/layout/dagre/src/coordinate-system.d.ts +0 -6
  286. package/lib/layout/dagre/src/coordinate-system.js +0 -71
  287. package/lib/layout/dagre/src/coordinate-system.js.map +0 -1
  288. package/lib/layout/dagre/src/data/list.d.ts +0 -12
  289. package/lib/layout/dagre/src/data/list.js +0 -52
  290. package/lib/layout/dagre/src/data/list.js.map +0 -1
  291. package/lib/layout/dagre/src/debug.d.ts +0 -3
  292. package/lib/layout/dagre/src/debug.js +0 -26
  293. package/lib/layout/dagre/src/debug.js.map +0 -1
  294. package/lib/layout/dagre/src/greedy-fas.d.ts +0 -3
  295. package/lib/layout/dagre/src/greedy-fas.js +0 -144
  296. package/lib/layout/dagre/src/greedy-fas.js.map +0 -1
  297. package/lib/layout/dagre/src/layout.d.ts +0 -3
  298. package/lib/layout/dagre/src/layout.js +0 -535
  299. package/lib/layout/dagre/src/layout.js.map +0 -1
  300. package/lib/layout/dagre/src/nesting-graph.d.ts +0 -6
  301. package/lib/layout/dagre/src/nesting-graph.js +0 -119
  302. package/lib/layout/dagre/src/nesting-graph.js.map +0 -1
  303. package/lib/layout/dagre/src/normalize.d.ts +0 -6
  304. package/lib/layout/dagre/src/normalize.js +0 -91
  305. package/lib/layout/dagre/src/normalize.js.map +0 -1
  306. package/lib/layout/dagre/src/order/add-subgraph-constraints.d.ts +0 -3
  307. package/lib/layout/dagre/src/order/add-subgraph-constraints.js +0 -29
  308. package/lib/layout/dagre/src/order/add-subgraph-constraints.js.map +0 -1
  309. package/lib/layout/dagre/src/order/barycenter.d.ts +0 -11
  310. package/lib/layout/dagre/src/order/barycenter.js +0 -26
  311. package/lib/layout/dagre/src/order/barycenter.js.map +0 -1
  312. package/lib/layout/dagre/src/order/build-layer-graph.d.ts +0 -3
  313. package/lib/layout/dagre/src/order/build-layer-graph.js +0 -73
  314. package/lib/layout/dagre/src/order/build-layer-graph.js.map +0 -1
  315. package/lib/layout/dagre/src/order/cross-count.d.ts +0 -3
  316. package/lib/layout/dagre/src/order/cross-count.js +0 -67
  317. package/lib/layout/dagre/src/order/cross-count.js.map +0 -1
  318. package/lib/layout/dagre/src/order/index.d.ts +0 -3
  319. package/lib/layout/dagre/src/order/index.js +0 -96
  320. package/lib/layout/dagre/src/order/index.js.map +0 -1
  321. package/lib/layout/dagre/src/order/init-data-order.d.ts +0 -6
  322. package/lib/layout/dagre/src/order/init-data-order.js +0 -27
  323. package/lib/layout/dagre/src/order/init-data-order.js.map +0 -1
  324. package/lib/layout/dagre/src/order/init-order.d.ts +0 -3
  325. package/lib/layout/dagre/src/order/init-order.js +0 -54
  326. package/lib/layout/dagre/src/order/init-order.js.map +0 -1
  327. package/lib/layout/dagre/src/order/resolve-conflicts.d.ts +0 -19
  328. package/lib/layout/dagre/src/order/resolve-conflicts.js +0 -98
  329. package/lib/layout/dagre/src/order/resolve-conflicts.js.map +0 -1
  330. package/lib/layout/dagre/src/order/sort-subgraph.d.ts +0 -7
  331. package/lib/layout/dagre/src/order/sort-subgraph.js +0 -90
  332. package/lib/layout/dagre/src/order/sort-subgraph.js.map +0 -1
  333. package/lib/layout/dagre/src/order/sort.d.ts +0 -7
  334. package/lib/layout/dagre/src/order/sort.js +0 -70
  335. package/lib/layout/dagre/src/order/sort.js.map +0 -1
  336. package/lib/layout/dagre/src/parent-dummy-chains.d.ts +0 -3
  337. package/lib/layout/dagre/src/parent-dummy-chains.js +0 -83
  338. package/lib/layout/dagre/src/parent-dummy-chains.js.map +0 -1
  339. package/lib/layout/dagre/src/position/bk.d.ts +0 -23
  340. package/lib/layout/dagre/src/position/bk.js +0 -409
  341. package/lib/layout/dagre/src/position/bk.js.map +0 -1
  342. package/lib/layout/dagre/src/position/index.d.ts +0 -3
  343. package/lib/layout/dagre/src/position/index.js +0 -64
  344. package/lib/layout/dagre/src/position/index.js.map +0 -1
  345. package/lib/layout/dagre/src/rank/feasible-tree.d.ts +0 -9
  346. package/lib/layout/dagre/src/rank/feasible-tree.js +0 -152
  347. package/lib/layout/dagre/src/rank/feasible-tree.js.map +0 -1
  348. package/lib/layout/dagre/src/rank/index.d.ts +0 -3
  349. package/lib/layout/dagre/src/rank/index.js +0 -58
  350. package/lib/layout/dagre/src/rank/index.js.map +0 -1
  351. package/lib/layout/dagre/src/rank/network-simplex.d.ts +0 -9
  352. package/lib/layout/dagre/src/rank/network-simplex.js +0 -205
  353. package/lib/layout/dagre/src/rank/network-simplex.js.map +0 -1
  354. package/lib/layout/dagre/src/rank/util.d.ts +0 -11
  355. package/lib/layout/dagre/src/rank/util.js +0 -146
  356. package/lib/layout/dagre/src/rank/util.js.map +0 -1
  357. package/lib/layout/dagre/src/util.d.ts +0 -31
  358. package/lib/layout/dagre/src/util.js +0 -280
  359. package/lib/layout/dagre/src/util.js.map +0 -1
  360. package/lib/layout/dagre.d.ts +0 -71
  361. package/lib/layout/dagre.js +0 -462
  362. package/lib/layout/dagre.js.map +0 -1
  363. package/lib/layout/dagreCompound.d.ts +0 -121
  364. package/lib/layout/dagreCompound.js +0 -429
  365. package/lib/layout/dagreCompound.js.map +0 -1
  366. package/lib/layout/er/core.d.ts +0 -1
  367. package/lib/layout/er/core.js +0 -147
  368. package/lib/layout/er/core.js.map +0 -1
  369. package/lib/layout/er/forceGrid.d.ts +0 -8
  370. package/lib/layout/er/forceGrid.js +0 -97
  371. package/lib/layout/er/forceGrid.js.map +0 -1
  372. package/lib/layout/er/grid.d.ts +0 -26
  373. package/lib/layout/er/grid.js +0 -177
  374. package/lib/layout/er/grid.js.map +0 -1
  375. package/lib/layout/er/index.d.ts +0 -29
  376. package/lib/layout/er/index.js +0 -80
  377. package/lib/layout/er/index.js.map +0 -1
  378. package/lib/layout/er/mysqlWorkbench.d.ts +0 -6
  379. package/lib/layout/er/mysqlWorkbench.js +0 -326
  380. package/lib/layout/er/mysqlWorkbench.js.map +0 -1
  381. package/lib/layout/er/type.d.ts +0 -35
  382. package/lib/layout/er/type.js +0 -3
  383. package/lib/layout/er/type.js.map +0 -1
  384. package/lib/layout/force/force-in-a-box.d.ts +0 -28
  385. package/lib/layout/force/force-in-a-box.js +0 -357
  386. package/lib/layout/force/force-in-a-box.js.map +0 -1
  387. package/lib/layout/force/force.d.ts +0 -100
  388. package/lib/layout/force/force.js +0 -388
  389. package/lib/layout/force/force.js.map +0 -1
  390. package/lib/layout/force/index.d.ts +0 -1
  391. package/lib/layout/force/index.js +0 -18
  392. package/lib/layout/force/index.js.map +0 -1
  393. package/lib/layout/force2/ForceNBody.d.ts +0 -7
  394. package/lib/layout/force2/ForceNBody.js +0 -98
  395. package/lib/layout/force2/ForceNBody.js.map +0 -1
  396. package/lib/layout/force2/index.d.ts +0 -119
  397. package/lib/layout/force2/index.js +0 -643
  398. package/lib/layout/force2/index.js.map +0 -1
  399. package/lib/layout/forceAtlas2/body.d.ts +0 -33
  400. package/lib/layout/forceAtlas2/body.js +0 -93
  401. package/lib/layout/forceAtlas2/body.js.map +0 -1
  402. package/lib/layout/forceAtlas2/index.d.ts +0 -115
  403. package/lib/layout/forceAtlas2/index.js +0 -509
  404. package/lib/layout/forceAtlas2/index.js.map +0 -1
  405. package/lib/layout/forceAtlas2/quad.d.ts +0 -27
  406. package/lib/layout/forceAtlas2/quad.js +0 -100
  407. package/lib/layout/forceAtlas2/quad.js.map +0 -1
  408. package/lib/layout/forceAtlas2/quadTree.d.ts +0 -20
  409. package/lib/layout/forceAtlas2/quadTree.js +0 -107
  410. package/lib/layout/forceAtlas2/quadTree.js.map +0 -1
  411. package/lib/layout/fruchterman.d.ts +0 -73
  412. package/lib/layout/fruchterman.js +0 -320
  413. package/lib/layout/fruchterman.js.map +0 -1
  414. package/lib/layout/gForce.d.ts +0 -96
  415. package/lib/layout/gForce.js +0 -421
  416. package/lib/layout/gForce.js.map +0 -1
  417. package/lib/layout/gpu/fruchterman.d.ts +0 -57
  418. package/lib/layout/gpu/fruchterman.js +0 -361
  419. package/lib/layout/gpu/fruchterman.js.map +0 -1
  420. package/lib/layout/gpu/fruchtermanShader.d.ts +0 -4
  421. package/lib/layout/gpu/fruchtermanShader.js +0 -8
  422. package/lib/layout/gpu/fruchtermanShader.js.map +0 -1
  423. package/lib/layout/gpu/gForce.d.ts +0 -68
  424. package/lib/layout/gpu/gForce.js +0 -415
  425. package/lib/layout/gpu/gForce.js.map +0 -1
  426. package/lib/layout/gpu/gForceShader.d.ts +0 -4
  427. package/lib/layout/gpu/gForceShader.js +0 -8
  428. package/lib/layout/gpu/gForceShader.js.map +0 -1
  429. package/lib/layout/grid.d.ts +0 -83
  430. package/lib/layout/grid.js +0 -339
  431. package/lib/layout/grid.js.map +0 -1
  432. package/lib/layout/index.d.ts +0 -22
  433. package/lib/layout/index.js +0 -59
  434. package/lib/layout/index.js.map +0 -1
  435. package/lib/layout/layout.d.ts +0 -26
  436. package/lib/layout/layout.js +0 -102
  437. package/lib/layout/layout.js.map +0 -1
  438. package/lib/layout/mds.d.ts +0 -39
  439. package/lib/layout/mds.js +0 -144
  440. package/lib/layout/mds.js.map +0 -1
  441. package/lib/layout/radial/index.d.ts +0 -1
  442. package/lib/layout/radial/index.js +0 -18
  443. package/lib/layout/radial/index.js.map +0 -1
  444. package/lib/layout/radial/mds.d.ts +0 -15
  445. package/lib/layout/radial/mds.js +0 -42
  446. package/lib/layout/radial/mds.js.map +0 -1
  447. package/lib/layout/radial/radial.d.ts +0 -74
  448. package/lib/layout/radial/radial.js +0 -445
  449. package/lib/layout/radial/radial.js.map +0 -1
  450. package/lib/layout/radial/radialNonoverlapForce.d.ts +0 -50
  451. package/lib/layout/radial/radialNonoverlapForce.js +0 -127
  452. package/lib/layout/radial/radialNonoverlapForce.js.map +0 -1
  453. package/lib/layout/random.d.ts +0 -35
  454. package/lib/layout/random.js +0 -84
  455. package/lib/layout/random.js.map +0 -1
  456. package/lib/layout/types.d.ts +0 -432
  457. package/lib/layout/types.js +0 -3
  458. package/lib/layout/types.js.map +0 -1
  459. package/lib/registy/index.d.ts +0 -3
  460. package/lib/registy/index.js +0 -65
  461. package/lib/registy/index.js.map +0 -1
  462. package/lib/util/array.js +0 -5
  463. package/lib/util/array.js.map +0 -1
  464. package/lib/util/function.js +0 -65
  465. package/lib/util/function.js.map +0 -1
  466. package/lib/util/gpu.js +0 -250
  467. package/lib/util/gpu.js.map +0 -1
  468. package/lib/util/index.js +0 -23
  469. package/lib/util/index.js.map +0 -1
  470. package/lib/util/math.js +0 -289
  471. package/lib/util/math.js.map +0 -1
  472. package/lib/util/number.js +0 -13
  473. package/lib/util/number.js.map +0 -1
  474. package/lib/util/object.js +0 -43
  475. package/lib/util/object.js.map +0 -1
  476. package/lib/util/string.js +0 -20
  477. package/lib/util/string.js.map +0 -1
  478. package/src/index.ts +0 -7
  479. package/src/layout/base.ts +0 -57
  480. package/src/layout/circular.ts +0 -370
  481. package/src/layout/comboCombined.ts +0 -397
  482. package/src/layout/comboForce.ts +0 -873
  483. package/src/layout/concentric.ts +0 -289
  484. package/src/layout/constants.ts +0 -22
  485. package/src/layout/dagre/graph.ts +0 -104
  486. package/src/layout/dagre/index.ts +0 -31
  487. package/src/layout/dagre/src/acyclic.ts +0 -58
  488. package/src/layout/dagre/src/add-border-segments.ts +0 -47
  489. package/src/layout/dagre/src/coordinate-system.ts +0 -77
  490. package/src/layout/dagre/src/data/list.ts +0 -60
  491. package/src/layout/dagre/src/debug.ts +0 -30
  492. package/src/layout/dagre/src/greedy-fas.ts +0 -144
  493. package/src/layout/dagre/src/layout.ts +0 -579
  494. package/src/layout/dagre/src/nesting-graph.ts +0 -143
  495. package/src/layout/dagre/src/normalize.ts +0 -96
  496. package/src/layout/dagre/src/order/add-subgraph-constraints.ts +0 -29
  497. package/src/layout/dagre/src/order/barycenter.ts +0 -26
  498. package/src/layout/dagre/src/order/build-layer-graph.ts +0 -82
  499. package/src/layout/dagre/src/order/cross-count.ts +0 -77
  500. package/src/layout/dagre/src/order/index.ts +0 -105
  501. package/src/layout/dagre/src/order/init-data-order.ts +0 -27
  502. package/src/layout/dagre/src/order/init-order.ts +0 -56
  503. package/src/layout/dagre/src/order/resolve-conflicts.ts +0 -152
  504. package/src/layout/dagre/src/order/sort-subgraph.ts +0 -105
  505. package/src/layout/dagre/src/order/sort.ts +0 -76
  506. package/src/layout/dagre/src/parent-dummy-chains.ts +0 -102
  507. package/src/layout/dagre/src/position/bk.ts +0 -493
  508. package/src/layout/dagre/src/position/index.ts +0 -82
  509. package/src/layout/dagre/src/rank/feasible-tree.ts +0 -165
  510. package/src/layout/dagre/src/rank/index.ts +0 -54
  511. package/src/layout/dagre/src/rank/network-simplex.ts +0 -225
  512. package/src/layout/dagre/src/rank/util.ts +0 -166
  513. package/src/layout/dagre/src/util.ts +0 -309
  514. package/src/layout/dagre.ts +0 -460
  515. package/src/layout/dagreCompound.ts +0 -518
  516. package/src/layout/er/core.ts +0 -117
  517. package/src/layout/er/forceGrid.ts +0 -95
  518. package/src/layout/er/grid.ts +0 -185
  519. package/src/layout/er/index.ts +0 -68
  520. package/src/layout/er/mysqlWorkbench.ts +0 -345
  521. package/src/layout/er/type.ts +0 -39
  522. package/src/layout/force/force-in-a-box.ts +0 -400
  523. package/src/layout/force/force.ts +0 -391
  524. package/src/layout/force/index.ts +0 -1
  525. package/src/layout/force2/ForceNBody.ts +0 -128
  526. package/src/layout/force2/index.ts +0 -741
  527. package/src/layout/forceAtlas2/body.ts +0 -115
  528. package/src/layout/forceAtlas2/index.ts +0 -556
  529. package/src/layout/forceAtlas2/quad.ts +0 -115
  530. package/src/layout/forceAtlas2/quadTree.ts +0 -107
  531. package/src/layout/fruchterman.ts +0 -361
  532. package/src/layout/gForce.ts +0 -488
  533. package/src/layout/gpu/fruchterman.ts +0 -314
  534. package/src/layout/gpu/fruchtermanShader.ts +0 -203
  535. package/src/layout/gpu/gForce.ts +0 -407
  536. package/src/layout/gpu/gForceShader.ts +0 -220
  537. package/src/layout/grid.ts +0 -404
  538. package/src/layout/index.ts +0 -47
  539. package/src/layout/layout.ts +0 -110
  540. package/src/layout/mds.ts +0 -140
  541. package/src/layout/radial/index.ts +0 -1
  542. package/src/layout/radial/mds.ts +0 -51
  543. package/src/layout/radial/radial.ts +0 -500
  544. package/src/layout/radial/radialNonoverlapForce.ts +0 -189
  545. package/src/layout/random.ts +0 -75
  546. package/src/layout/types.ts +0 -496
  547. package/src/registy/index.ts +0 -43
  548. package/src/util/array.ts +0 -1
  549. package/src/util/function.ts +0 -64
  550. package/src/util/gpu.ts +0 -256
  551. package/src/util/index.ts +0 -6
  552. package/src/util/math.ts +0 -294
  553. package/src/util/number.ts +0 -8
  554. package/src/util/object.ts +0 -28
  555. package/src/util/string.ts +0 -18
@@ -1,93 +0,0 @@
1
- const resolveConflicts = (entries, cg) => {
2
- var _a, _b, _c;
3
- const mappedEntries = {};
4
- entries === null || entries === void 0 ? void 0 : entries.forEach((entry, i) => {
5
- mappedEntries[entry.v] = {
6
- i,
7
- indegree: 0,
8
- in: [],
9
- out: [],
10
- vs: [entry.v],
11
- };
12
- const tmp = mappedEntries[entry.v];
13
- if (entry.barycenter !== undefined) {
14
- tmp.barycenter = entry.barycenter;
15
- tmp.weight = entry.weight;
16
- }
17
- });
18
- (_a = cg.edges()) === null || _a === void 0 ? void 0 : _a.forEach((e) => {
19
- const entryV = mappedEntries[e.v];
20
- const entryW = mappedEntries[e.w];
21
- if (entryV !== undefined && entryW !== undefined) {
22
- entryW.indegree++;
23
- entryV.out.push(mappedEntries[e.w]);
24
- }
25
- });
26
- const sourceSet = (_c = (_b = Object.values(mappedEntries)).filter) === null || _c === void 0 ? void 0 : _c.call(_b, (entry) => !entry.indegree);
27
- return doResolveConflicts(sourceSet);
28
- };
29
- const doResolveConflicts = (sourceSet) => {
30
- var _a, _b;
31
- const entries = [];
32
- const handleIn = (vEntry) => {
33
- return (uEntry) => {
34
- if (uEntry.merged)
35
- return;
36
- if (uEntry.barycenter === undefined ||
37
- vEntry.barycenter === undefined ||
38
- uEntry.barycenter >= vEntry.barycenter) {
39
- mergeEntries(vEntry, uEntry);
40
- }
41
- };
42
- };
43
- const handleOut = (vEntry) => {
44
- return (wEntry) => {
45
- wEntry["in"].push(vEntry);
46
- if (--wEntry.indegree === 0) {
47
- sourceSet.push(wEntry);
48
- }
49
- };
50
- };
51
- while (sourceSet === null || sourceSet === void 0 ? void 0 : sourceSet.length) {
52
- const entry = sourceSet.pop();
53
- entries.push(entry);
54
- (_a = entry["in"].reverse()) === null || _a === void 0 ? void 0 : _a.forEach((e) => handleIn(entry)(e));
55
- (_b = entry.out) === null || _b === void 0 ? void 0 : _b.forEach((e) => handleOut(entry)(e));
56
- }
57
- const filtered = entries.filter((entry) => !entry.merged);
58
- const keys = [
59
- "vs",
60
- "i",
61
- "barycenter",
62
- "weight",
63
- ];
64
- return filtered.map((entry) => {
65
- const picked = {};
66
- keys === null || keys === void 0 ? void 0 : keys.forEach((key) => {
67
- if (entry[key] === undefined)
68
- return;
69
- picked[key] = entry[key];
70
- });
71
- return picked;
72
- });
73
- };
74
- const mergeEntries = (target, source) => {
75
- var _a;
76
- let sum = 0;
77
- let weight = 0;
78
- if (target.weight) {
79
- sum += target.barycenter * target.weight;
80
- weight += target.weight;
81
- }
82
- if (source.weight) {
83
- sum += source.barycenter * source.weight;
84
- weight += source.weight;
85
- }
86
- target.vs = (_a = source.vs) === null || _a === void 0 ? void 0 : _a.concat(target.vs);
87
- target.barycenter = sum / weight;
88
- target.weight = weight;
89
- target.i = Math.min(source.i, target.i);
90
- source.merged = true;
91
- };
92
- export default resolveConflicts;
93
- //# sourceMappingURL=resolve-conflicts.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resolve-conflicts.js","sourceRoot":"","sources":["../../../../../src/layout/dagre/src/order/resolve-conflicts.ts"],"names":[],"mappings":"AAyCA,MAAM,gBAAgB,GAAG,CACvB,OAIG,EACH,EAAS,EACT,EAAE;;IACF,MAAM,aAAa,GAAkC,EAAE,CAAC;IACxD,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAC,CAAC,KAAK,EAAE,CAAS,EAAE,EAAE;QACpC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG;YACvB,CAAC;YACD,QAAQ,EAAE,CAAC;YACX,EAAE,EAAE,EAAE;YACN,GAAG,EAAE,EAAE;YACP,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;SACd,CAAC;QACF,MAAM,GAAG,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACnC,IAAI,KAAK,CAAC,UAAU,KAAK,SAAS,EAAE;YAClC,GAAG,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;YAClC,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;SAC3B;IACH,CAAC,CAAC,CAAC;IAEH,MAAA,EAAE,CAAC,KAAK,EAAE,0CAAE,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE;QACxB,MAAM,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,MAAM,MAAM,GAAG,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,KAAK,SAAS,EAAE;YAChD,MAAM,CAAC,QAAS,EAAE,CAAC;YACnB,MAAM,CAAC,GAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;SACtC;IACH,CAAC,CAAC,CAAC;IAEH,MA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;KACzB;IAED,MAAM,CAAC,EAAE,GAAG,MAAA,MAAM,CAAC,EAAE,0CAAE,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACzC,MAAM,CAAC,UAAU,GAAG,GAAG,GAAG,MAAM,CAAC;IACjC,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC;IACxC,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;AACvB,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
@@ -1,7 +0,0 @@
1
- import { Graph } from "../../graph";
2
- declare const sortSubgraph: (g: Graph, v: string, cg: Graph, biasRight?: boolean, usePrev?: boolean) => {
3
- vs: string[];
4
- barycenter?: number | undefined;
5
- weight?: number | undefined;
6
- };
7
- export default sortSubgraph;
@@ -1,85 +0,0 @@
1
- import barycenter from "./barycenter";
2
- import resolveConflicts from "./resolve-conflicts";
3
- import sort from "./sort";
4
- const sortSubgraph = (g, v, cg, biasRight, usePrev) => {
5
- var _a, _b, _c, _d;
6
- let movable = g.children(v);
7
- // fixorder的点不参与排序(这个方案不合适,只排了新增节点,和原来的分离)
8
- const node = g.node(v);
9
- const bl = node ? node.borderLeft : undefined;
10
- const br = node ? node.borderRight : undefined;
11
- const subgraphs = {};
12
- if (bl) {
13
- movable = movable === null || movable === void 0 ? void 0 : movable.filter((w) => {
14
- return w !== bl && w !== br;
15
- });
16
- }
17
- const barycenters = barycenter(g, movable || []);
18
- barycenters === null || barycenters === void 0 ? void 0 : barycenters.forEach((entry) => {
19
- var _a;
20
- if ((_a = g.children(entry.v)) === null || _a === void 0 ? void 0 : _a.length) {
21
- const subgraphResult = sortSubgraph(g, entry.v, cg, biasRight);
22
- subgraphs[entry.v] = subgraphResult;
23
- if (subgraphResult.hasOwnProperty("barycenter")) {
24
- mergeBarycenters(entry, subgraphResult);
25
- }
26
- }
27
- });
28
- const entries = resolveConflicts(barycenters, cg);
29
- expandSubgraphs(entries, subgraphs);
30
- // 添加fixorder信息到entries里边
31
- // TODO: 不考虑复合情况,只用第一个点的fixorder信息,后续考虑更完备的实现
32
- (_a = entries
33
- .filter((e) => e.vs.length > 0)) === null || _a === void 0 ? void 0 : _a.forEach((e) => {
34
- const node = g.node(e.vs[0]);
35
- if (node) {
36
- e.fixorder = node.fixorder;
37
- e.order = node.order;
38
- }
39
- });
40
- const result = sort(entries, biasRight, usePrev);
41
- if (bl) {
42
- result.vs = [bl, result.vs, br].flat();
43
- if ((_b = g.predecessors(bl)) === null || _b === void 0 ? void 0 : _b.length) {
44
- const blPred = g.node(((_c = g.predecessors(bl)) === null || _c === void 0 ? void 0 : _c[0]) || "");
45
- const brPred = g.node(((_d = g.predecessors(br)) === null || _d === void 0 ? void 0 : _d[0]) || "");
46
- if (!result.hasOwnProperty("barycenter")) {
47
- result.barycenter = 0;
48
- result.weight = 0;
49
- }
50
- result.barycenter =
51
- (result.barycenter * result.weight +
52
- blPred.order +
53
- brPred.order) /
54
- (result.weight + 2);
55
- result.weight += 2;
56
- }
57
- }
58
- return result;
59
- };
60
- const expandSubgraphs = (entries, subgraphs) => {
61
- entries === null || entries === void 0 ? void 0 : entries.forEach((entry) => {
62
- var _a;
63
- const vss = (_a = entry.vs) === null || _a === void 0 ? void 0 : _a.map((v) => {
64
- if (subgraphs[v]) {
65
- return subgraphs[v].vs;
66
- }
67
- return v;
68
- });
69
- entry.vs = vss.flat();
70
- });
71
- };
72
- const mergeBarycenters = (target, other) => {
73
- if (target.barycenter !== undefined) {
74
- target.barycenter =
75
- (target.barycenter * target.weight + other.barycenter * other.weight) /
76
- (target.weight + other.weight);
77
- target.weight += other.weight;
78
- }
79
- else {
80
- target.barycenter = other.barycenter;
81
- target.weight = other.weight;
82
- }
83
- };
84
- export default sortSubgraph;
85
- //# sourceMappingURL=sort-subgraph.js.map
@@ -1 +0,0 @@
1
- {"version":3,"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AW,GAAG,KAAK,CAAC,MAAO,CAAC;gBACxE,CAAC,MAAM,CAAC,MAAO,GAAG,KAAK,CAAC,MAAO,CAAC,CAAC;QACnC,MAAM,CAAC,MAAO,IAAI,KAAK,CAAC,MAAO,CAAC;KACjC;SAAM;QACL,MAAM,CAAC,UAAU,GAAG,KAAK,CAAC,UAAU,CAAC;QACrC,MAAM,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;KAC9B;AACH,CAAC,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -1,7 +0,0 @@
1
- import { ConflictEntry } from "./resolve-conflicts";
2
- declare const sort: (entries: ConflictEntry[], biasRight?: boolean, usePrev?: boolean) => {
3
- vs: string[];
4
- barycenter?: number | undefined;
5
- weight?: number | undefined;
6
- };
7
- export default sort;
@@ -1,68 +0,0 @@
1
- import { partition } from "../util";
2
- const sort = (entries, biasRight, usePrev) => {
3
- const parts = partition(entries, (entry) => {
4
- // NOTE: 有fixorder的也可以排
5
- return (entry.hasOwnProperty("fixorder") && !isNaN(entry.fixorder)) || entry.hasOwnProperty("barycenter");
6
- });
7
- const sortable = parts.lhs;
8
- const unsortable = parts.rhs.sort((a, b) => -a.i - (-b.i));
9
- const vs = [];
10
- let sum = 0;
11
- let weight = 0;
12
- let vsIndex = 0;
13
- sortable === null || sortable === void 0 ? void 0 : sortable.sort(compareWithBias(!!biasRight, !!usePrev));
14
- vsIndex = consumeUnsortable(vs, unsortable, vsIndex);
15
- sortable === null || sortable === void 0 ? void 0 : sortable.forEach((entry) => {
16
- var _a;
17
- vsIndex += (_a = entry.vs) === null || _a === void 0 ? void 0 : _a.length;
18
- vs.push(entry.vs);
19
- sum += entry.barycenter * entry.weight;
20
- weight += entry.weight;
21
- vsIndex = consumeUnsortable(vs, unsortable, vsIndex);
22
- });
23
- const result = { vs: vs.flat() };
24
- if (weight) {
25
- result.barycenter = sum / weight;
26
- result.weight = weight;
27
- }
28
- return result;
29
- };
30
- const consumeUnsortable = (vs, unsortable, index) => {
31
- let iindex = index;
32
- let last;
33
- while (unsortable.length && (last = unsortable[unsortable.length - 1]).i <= iindex) {
34
- unsortable.pop();
35
- vs === null || vs === void 0 ? void 0 : vs.push(last.vs);
36
- iindex++;
37
- }
38
- return iindex;
39
- };
40
- /**
41
- * 配置是否考虑使用之前的布局结果
42
- */
43
- const compareWithBias = (bias, usePrev) => {
44
- return (entryV, entryW) => {
45
- // 排序的时候先判断fixorder,不行再判断重心
46
- if (entryV.fixorder !== undefined && entryW.fixorder !== undefined) {
47
- return entryV.fixorder - entryW.fixorder;
48
- }
49
- if (entryV.barycenter < entryW.barycenter) {
50
- return -1;
51
- }
52
- if (entryV.barycenter > entryW.barycenter) {
53
- return 1;
54
- }
55
- // 重心相同,考虑之前排好的顺序
56
- if (usePrev && entryV.order !== undefined && entryW.order !== undefined) {
57
- if (entryV.order < entryW.order) {
58
- return -1;
59
- }
60
- if (entryV.order > entryW.order) {
61
- return 1;
62
- }
63
- }
64
- return !bias ? entryV.i - entryW.i : entryW.i - entryV.i;
65
- };
66
- };
67
- export default sort;
68
- //# sourceMappingURL=sort.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sort.js","sourceRoot":"","sources":["../../../../../src/layout/dagre/src/order/sort.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGpC,MAAM,IAAI,GAAG,CAAC,OAAwB,EAAE,SAAmB,EAAE,OAAiB,EAAE,EAAE;IAChF,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;QACzC,uBAAuB;QACvB,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAS,CAAC,CAAC,IAAI,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;IAC7G,CAAC,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC;IAC3B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,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;IAC3D,CAAC,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Graph } from "../graph";
2
- declare const parentDummyChains: (g: Graph) => void;
3
- export default parentDummyChains;
@@ -1,81 +0,0 @@
1
- // deep first search with both order low for pre, lim for post
2
- const dfsBothOrder = (g) => {
3
- var _a;
4
- const result = {};
5
- let lim = 0;
6
- const dfs = (v) => {
7
- var _a;
8
- const low = lim;
9
- (_a = g.children(v)) === null || _a === void 0 ? void 0 : _a.forEach(dfs);
10
- result[v] = { low, lim: lim++ };
11
- };
12
- (_a = g.children()) === null || _a === void 0 ? void 0 : _a.forEach(dfs);
13
- return result;
14
- };
15
- // Find a path from v to w through the lowest common ancestor (LCA). Return the
16
- // full path and the LCA.
17
- const findPath = (g, postorderNums, v, w) => {
18
- const vPath = [];
19
- const wPath = [];
20
- const low = Math.min(postorderNums[v].low, postorderNums[w].low);
21
- const lim = Math.max(postorderNums[v].lim, postorderNums[w].lim);
22
- let parent;
23
- let lca;
24
- // Traverse up from v to find the LCA
25
- parent = v;
26
- do {
27
- parent = g.parent(parent);
28
- vPath.push(parent);
29
- } while (parent &&
30
- (postorderNums[parent].low > low || lim > postorderNums[parent].lim));
31
- lca = parent;
32
- // Traverse from w to LCA
33
- parent = w;
34
- while (parent && parent !== lca) {
35
- wPath.push(parent);
36
- parent = g.parent(parent);
37
- }
38
- return { lca, path: vPath.concat(wPath.reverse()) };
39
- };
40
- const parentDummyChains = (g) => {
41
- var _a;
42
- const postorderNums = dfsBothOrder(g);
43
- (_a = g.graph().dummyChains) === null || _a === void 0 ? void 0 : _a.forEach((startV) => {
44
- var _a, _b;
45
- let v = startV;
46
- let node = g.node(v);
47
- const edgeObj = node.edgeObj;
48
- if (!edgeObj)
49
- return;
50
- const pathData = findPath(g, postorderNums, edgeObj.v, edgeObj.w);
51
- const path = pathData.path;
52
- const lca = pathData.lca;
53
- let pathIdx = 0;
54
- let pathV = path[pathIdx];
55
- let ascending = true;
56
- while (v !== edgeObj.w) {
57
- node = g.node(v);
58
- if (ascending) {
59
- while (pathV !== lca && ((_a = g.node(pathV)) === null || _a === void 0 ? void 0 : _a.maxRank) < node.rank) {
60
- pathIdx++;
61
- pathV = path[pathIdx];
62
- }
63
- if (pathV === lca) {
64
- ascending = false;
65
- }
66
- }
67
- if (!ascending) {
68
- while (pathIdx < path.length - 1 &&
69
- ((_b = g.node(path[pathIdx + 1])) === null || _b === void 0 ? void 0 : _b.minRank) <=
70
- node.rank) {
71
- pathIdx++;
72
- }
73
- pathV = path[pathIdx];
74
- }
75
- g.setParent(v, pathV);
76
- v = g.successors(v)[0];
77
- }
78
- });
79
- };
80
- export default parentDummyChains;
81
- //# sourceMappingURL=parent-dummy-chains.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parent-dummy-chains.js","sourceRoot":"","sources":["../../../../src/layout/dagre/src/parent-dummy-chains.ts"],"names":[],"mappings":"AAIA,8DAA8D;AAC9D,MAAM,YAAY,GAAG,CAAC,CAAQ,EAAE,EAAE;;IAChC,MAAM,MAAM,GAA8B,EAAE,CAAC;IAC7C,IAAI,GAAG,GAAG,CAAC,CAAC;IAEZ,MAAM,GAAG,GAAG,CAAC,CAAS,EAAE,EAAE;;QACxB,MAAM,GAAG,GAAG,GAAG,CAAC;QAChB,MAAA,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,0CAAE,OAAO,CAAC,GAAG,CAAC,CAAC;QAC5B,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAE,CAAC;IAClC,CAAC,CAAC;IACF,MAAA,CAAC,CAAC,QAAQ,EAAE,0CAAE,OAAO,CAAC,GAAG,CAAC,CAAC;IAE3B,OAAO,MAAM,CAAC;AACh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AAI,CAAC,IAAI,CAAC,OAAO,GAAG,CAAC,CAAE,CAAC,0CAAE,OAAkB;wBAC5C,IAAI,CAAC,IAAe,EACvB;oBACA,OAAO,EAAE,CAAC;iBACX;gBACD,KAAK,GAAG,IAAI,CAAC,OAAO,CAAE,CAAC;aACxB;YAED,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;YACtB,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,CAAC;SACzB;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
@@ -1,23 +0,0 @@
1
- import { Graph as RawGraph } from "@antv/graphlib";
2
- import { Graph } from "../../graph";
3
- declare class BlockGraph extends RawGraph<string, string, number> {
4
- }
5
- type Conflicts = Record<string, Record<string, boolean>>;
6
- export declare const findType1Conflicts: (g: Graph, layering?: string[][]) => {};
7
- export declare const findType2Conflicts: (g: Graph, layering?: string[][]) => {};
8
- export declare const findOtherInnerSegmentNode: (g: Graph, v: string) => string | undefined;
9
- export declare const addConflict: (conflicts: Conflicts, v: string, w: string) => void;
10
- export declare const hasConflict: (conflicts: Conflicts, v: string, w: string) => boolean;
11
- export declare const verticalAlignment: (g: Graph, layering: string[][], conflicts: Conflicts, neighborFn: (v: string) => string[]) => {
12
- root: Record<string, string>;
13
- align: Record<string, string>;
14
- };
15
- export declare const horizontalCompaction: (g: Graph, layering: string[][], root: Record<string, string>, align: Record<string, string>, reverseSep?: boolean) => Record<string, number>;
16
- export declare const buildBlockGraph: (g: Graph, layering: string[][], root: Record<string, string>, reverseSep?: boolean) => BlockGraph;
17
- export declare const findSmallestWidthAlignment: (g: Graph, xss: Record<string, Record<string, number>>) => Record<string, number>;
18
- export declare function alignCoordinates(xss: Record<string, Record<string, number>>, alignTo: Record<string, number>): void;
19
- export declare const balance: (xss: Record<string, Record<string, number>>, align?: string) => Record<string, number>;
20
- export declare const positionX: (g: Graph) => Record<string, number>;
21
- export declare const sep: (nodeSep: number, edgeSep: number, reverseSep: boolean) => (g: Graph, v: string, w: string) => number;
22
- export declare const width: (g: Graph, v: string) => number;
23
- export {};