@antv/g6 5.0.0-beta.27 → 5.0.0-beta.28

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 (464) hide show
  1. package/LICENSE +21 -0
  2. package/dist/g6.min.js +2 -2
  3. package/esm/constant/shape.d.ts +1 -1
  4. package/esm/index.d.ts +4 -2
  5. package/esm/index.js +1 -1
  6. package/esm/index.js.map +1 -1
  7. package/esm/item/combo.js +3 -1
  8. package/esm/item/combo.js.map +1 -1
  9. package/esm/item/edge.js +7 -2
  10. package/esm/item/edge.js.map +1 -1
  11. package/esm/item/item.d.ts +2 -2
  12. package/esm/item/item.js +13 -6
  13. package/esm/item/item.js.map +1 -1
  14. package/esm/item/node.d.ts +1 -0
  15. package/esm/item/node.js +12 -2
  16. package/esm/item/node.js.map +1 -1
  17. package/esm/runtime/controller/data.js +15 -10
  18. package/esm/runtime/controller/data.js.map +1 -1
  19. package/esm/runtime/controller/interaction.js +4 -3
  20. package/esm/runtime/controller/interaction.js.map +1 -1
  21. package/esm/runtime/controller/item.d.ts +3 -2
  22. package/esm/runtime/controller/item.js +45 -22
  23. package/esm/runtime/controller/item.js.map +1 -1
  24. package/esm/runtime/controller/layout.js +7 -10
  25. package/esm/runtime/controller/layout.js.map +1 -1
  26. package/esm/runtime/controller/plugin.js +1 -1
  27. package/esm/runtime/controller/plugin.js.map +1 -1
  28. package/esm/runtime/graph.d.ts +19 -6
  29. package/esm/runtime/graph.js +62 -27
  30. package/esm/runtime/graph.js.map +1 -1
  31. package/esm/runtime/hooks.d.ts +2 -2
  32. package/esm/runtime/hooks.js +2 -2
  33. package/esm/stdlib/behavior/create-edge.d.ts +1 -1
  34. package/esm/stdlib/behavior/drag-canvas.d.ts +1 -1
  35. package/esm/stdlib/behavior/drag-node.d.ts +1 -1
  36. package/esm/stdlib/behavior/drag-node.js +1 -1
  37. package/esm/stdlib/behavior/drag-node.js.map +1 -1
  38. package/esm/stdlib/behavior/hover-activate.d.ts +1 -1
  39. package/esm/stdlib/behavior/orbit-canvas-3d.d.ts +1 -1
  40. package/esm/stdlib/behavior/rotate-canvas-3d.d.ts +2 -2
  41. package/esm/stdlib/behavior/scroll-canvas.js +5 -5
  42. package/esm/stdlib/behavior/scroll-canvas.js.map +1 -1
  43. package/esm/stdlib/behavior/track-canvas-3d.d.ts +1 -1
  44. package/esm/stdlib/behavior/zoom-canvas-3d.d.ts +1 -1
  45. package/esm/stdlib/behavior/zoom-canvas.d.ts +16 -0
  46. package/esm/stdlib/behavior/zoom-canvas.js +107 -5
  47. package/esm/stdlib/behavior/zoom-canvas.js.map +1 -1
  48. package/esm/stdlib/data/transformV4Data.js +12 -6
  49. package/esm/stdlib/data/transformV4Data.js.map +1 -1
  50. package/esm/stdlib/index.d.ts +6 -4
  51. package/esm/stdlib/index.js +8 -6
  52. package/esm/stdlib/index.js.map +1 -1
  53. package/esm/stdlib/item/combo/circle.js +12 -7
  54. package/esm/stdlib/item/combo/circle.js.map +1 -1
  55. package/esm/stdlib/item/combo/rect.js +12 -7
  56. package/esm/stdlib/item/combo/rect.js.map +1 -1
  57. package/esm/stdlib/item/edge/base.d.ts +22 -5
  58. package/esm/stdlib/item/edge/base.js +48 -16
  59. package/esm/stdlib/item/edge/base.js.map +1 -1
  60. package/esm/stdlib/item/edge/cubic.js +11 -6
  61. package/esm/stdlib/item/edge/cubic.js.map +1 -1
  62. package/esm/stdlib/item/edge/line.js +12 -7
  63. package/esm/stdlib/item/edge/line.js.map +1 -1
  64. package/esm/stdlib/item/edge/loop.js +6 -1
  65. package/esm/stdlib/item/edge/loop.js.map +1 -1
  66. package/esm/stdlib/item/edge/polyline.js +11 -6
  67. package/esm/stdlib/item/edge/polyline.js.map +1 -1
  68. package/esm/stdlib/item/edge/quadratic.js +11 -6
  69. package/esm/stdlib/item/edge/quadratic.js.map +1 -1
  70. package/esm/stdlib/item/node/base.d.ts +24 -13
  71. package/esm/stdlib/item/node/base.js +90 -48
  72. package/esm/stdlib/item/node/base.js.map +1 -1
  73. package/esm/stdlib/item/node/base3d.d.ts +11 -2
  74. package/esm/stdlib/item/node/base3d.js +14 -3
  75. package/esm/stdlib/item/node/base3d.js.map +1 -1
  76. package/esm/stdlib/item/node/circle.js +13 -7
  77. package/esm/stdlib/item/node/circle.js.map +1 -1
  78. package/esm/stdlib/item/node/cube.d.ts +0 -2
  79. package/esm/stdlib/item/node/cube.js +12 -9
  80. package/esm/stdlib/item/node/cube.js.map +1 -1
  81. package/esm/stdlib/item/node/diamond.js +20 -11
  82. package/esm/stdlib/item/node/diamond.js.map +1 -1
  83. package/esm/stdlib/item/node/donut.js +18 -8
  84. package/esm/stdlib/item/node/donut.js.map +1 -1
  85. package/esm/stdlib/item/node/ellipse.js +11 -6
  86. package/esm/stdlib/item/node/ellipse.js.map +1 -1
  87. package/esm/stdlib/item/node/hexagon.js +12 -7
  88. package/esm/stdlib/item/node/hexagon.js.map +1 -1
  89. package/esm/stdlib/item/node/image.js +13 -3
  90. package/esm/stdlib/item/node/image.js.map +1 -1
  91. package/esm/stdlib/item/node/index.d.ts +1 -0
  92. package/esm/stdlib/item/node/index.js +1 -0
  93. package/esm/stdlib/item/node/index.js.map +1 -1
  94. package/esm/stdlib/item/node/modelRect.d.ts +33 -1
  95. package/esm/stdlib/item/node/modelRect.js +135 -78
  96. package/esm/stdlib/item/node/modelRect.js.map +1 -1
  97. package/esm/stdlib/item/node/plane.d.ts +38 -0
  98. package/esm/stdlib/item/node/plane.js +62 -0
  99. package/esm/stdlib/item/node/plane.js.map +1 -0
  100. package/esm/stdlib/item/node/rect.js +12 -7
  101. package/esm/stdlib/item/node/rect.js.map +1 -1
  102. package/esm/stdlib/item/node/sphere.js +12 -7
  103. package/esm/stdlib/item/node/sphere.js.map +1 -1
  104. package/esm/stdlib/item/node/star.d.ts +1 -3
  105. package/esm/stdlib/item/node/star.js +16 -10
  106. package/esm/stdlib/item/node/star.js.map +1 -1
  107. package/esm/stdlib/item/node/triangle.js +17 -7
  108. package/esm/stdlib/item/node/triangle.js.map +1 -1
  109. package/esm/stdlib/plugin/edgeBundling/index.d.ts +75 -0
  110. package/esm/stdlib/plugin/edgeBundling/index.js +364 -0
  111. package/esm/stdlib/plugin/edgeBundling/index.js.map +1 -0
  112. package/esm/stdlib/plugin/hull/bubbleset.d.ts +1 -1
  113. package/esm/stdlib/plugin/hull/bubbleset.js +13 -13
  114. package/esm/stdlib/plugin/hull/bubbleset.js.map +1 -1
  115. package/esm/stdlib/plugin/hull/index.js +4 -4
  116. package/esm/stdlib/plugin/hull/util.js +1 -1
  117. package/esm/stdlib/plugin/hull/util.js.map +1 -1
  118. package/esm/stdlib/plugin/index.d.ts +1 -0
  119. package/esm/stdlib/plugin/index.js +1 -0
  120. package/esm/stdlib/plugin/index.js.map +1 -1
  121. package/esm/stdlib/plugin/legend/index.d.ts +2 -2
  122. package/esm/stdlib/plugin/legend/index.js +10 -10
  123. package/esm/stdlib/plugin/legend/index.js.map +1 -1
  124. package/esm/stdlib/plugin/lodController/index.js +10 -8
  125. package/esm/stdlib/plugin/lodController/index.js.map +1 -1
  126. package/esm/stdlib/plugin/menu/index.js +1 -1
  127. package/esm/stdlib/plugin/menu/index.js.map +1 -1
  128. package/esm/stdlib/plugin/snapline/index.d.ts +2 -2
  129. package/esm/stdlib/plugin/snapline/index.js +2 -2
  130. package/esm/stdlib/plugin/snapline/index.js.map +1 -1
  131. package/esm/stdlib/plugin/tooltip/index.d.ts +1 -1
  132. package/esm/stdlib/plugin/tooltip/index.js +3 -3
  133. package/esm/stdlib/plugin/tooltip/index.js.map +1 -1
  134. package/esm/stdlib/plugin/{watermaker → watermarker}/index.d.ts +1 -1
  135. package/esm/stdlib/plugin/{watermaker → watermarker}/index.js +7 -7
  136. package/esm/stdlib/plugin/watermarker/index.js.map +1 -0
  137. package/esm/stdlib/selector/lasso.js +3 -3
  138. package/esm/stdlib/selector/lasso.js.map +1 -1
  139. package/esm/stdlib/theme/dark.js +1 -1
  140. package/esm/stdlib/theme/dark.js.map +1 -1
  141. package/esm/stdlib/theme/light.js +4 -1
  142. package/esm/stdlib/theme/light.js.map +1 -1
  143. package/esm/stdlib/themeSolver/spec.js +3 -3
  144. package/esm/stdlib/themeSolver/subject.d.ts +1 -1
  145. package/esm/stdlib/themeSolver/subject.js +1 -1
  146. package/esm/types/animate.d.ts +1 -1
  147. package/esm/types/data.d.ts +3 -1
  148. package/esm/types/graph.d.ts +54 -11
  149. package/esm/types/hook.d.ts +13 -3
  150. package/esm/types/index.d.ts +2 -1
  151. package/esm/types/index.js +1 -0
  152. package/esm/types/index.js.map +1 -1
  153. package/esm/types/item.d.ts +8 -10
  154. package/esm/types/item.js.map +1 -1
  155. package/esm/types/layout.d.ts +1 -1
  156. package/esm/types/node.d.ts +1 -31
  157. package/esm/types/plugin.d.ts +1 -1
  158. package/esm/types/plugin.js +1 -1
  159. package/esm/types/spec.d.ts +5 -5
  160. package/esm/types/theme.d.ts +1 -1
  161. package/esm/types/view.d.ts +1 -1
  162. package/esm/util/animate.js +1 -1
  163. package/esm/util/animate.js.map +1 -1
  164. package/esm/util/canvas.d.ts +1 -1
  165. package/esm/util/canvas.js +7 -1
  166. package/esm/util/canvas.js.map +1 -1
  167. package/esm/util/data.d.ts +10 -10
  168. package/esm/util/data.js +10 -9
  169. package/esm/util/data.js.map +1 -1
  170. package/esm/util/extend.js +1 -1
  171. package/esm/util/extend.js.map +1 -1
  172. package/esm/util/item.js +1 -1
  173. package/esm/util/item.js.map +1 -1
  174. package/esm/util/math.d.ts +1 -1
  175. package/esm/util/math.js +1 -1
  176. package/esm/util/path.d.ts +1 -1
  177. package/esm/util/path.js +1 -1
  178. package/esm/util/polyline.d.ts +2 -2
  179. package/esm/util/polyline.js +3 -3
  180. package/esm/util/polyline.js.map +1 -1
  181. package/esm/util/router.js +7 -7
  182. package/esm/util/router.js.map +1 -1
  183. package/esm/util/shape.d.ts +25 -13
  184. package/esm/util/shape.js +29 -20
  185. package/esm/util/shape.js.map +1 -1
  186. package/esm/util/shape3d.d.ts +2 -2
  187. package/esm/util/shape3d.js +9 -12
  188. package/esm/util/shape3d.js.map +1 -1
  189. package/lib/constant/shape.d.ts +1 -1
  190. package/lib/index.d.ts +4 -2
  191. package/lib/index.js +1 -1
  192. package/lib/index.js.map +1 -1
  193. package/lib/item/combo.js +3 -1
  194. package/lib/item/combo.js.map +1 -1
  195. package/lib/item/edge.js +7 -2
  196. package/lib/item/edge.js.map +1 -1
  197. package/lib/item/item.d.ts +2 -2
  198. package/lib/item/item.js +13 -6
  199. package/lib/item/item.js.map +1 -1
  200. package/lib/item/node.d.ts +1 -0
  201. package/lib/item/node.js +12 -2
  202. package/lib/item/node.js.map +1 -1
  203. package/lib/runtime/controller/data.js +14 -9
  204. package/lib/runtime/controller/data.js.map +1 -1
  205. package/lib/runtime/controller/interaction.js +3 -2
  206. package/lib/runtime/controller/interaction.js.map +1 -1
  207. package/lib/runtime/controller/item.d.ts +3 -2
  208. package/lib/runtime/controller/item.js +44 -21
  209. package/lib/runtime/controller/item.js.map +1 -1
  210. package/lib/runtime/controller/layout.js +7 -33
  211. package/lib/runtime/controller/layout.js.map +1 -1
  212. package/lib/runtime/controller/plugin.js +1 -1
  213. package/lib/runtime/controller/plugin.js.map +1 -1
  214. package/lib/runtime/graph.d.ts +19 -6
  215. package/lib/runtime/graph.js +62 -27
  216. package/lib/runtime/graph.js.map +1 -1
  217. package/lib/runtime/hooks.d.ts +2 -2
  218. package/lib/runtime/hooks.js +2 -2
  219. package/lib/stdlib/behavior/create-edge.d.ts +1 -1
  220. package/lib/stdlib/behavior/drag-canvas.d.ts +1 -1
  221. package/lib/stdlib/behavior/drag-node.d.ts +1 -1
  222. package/lib/stdlib/behavior/drag-node.js +1 -1
  223. package/lib/stdlib/behavior/drag-node.js.map +1 -1
  224. package/lib/stdlib/behavior/hover-activate.d.ts +1 -1
  225. package/lib/stdlib/behavior/orbit-canvas-3d.d.ts +1 -1
  226. package/lib/stdlib/behavior/rotate-canvas-3d.d.ts +2 -2
  227. package/lib/stdlib/behavior/scroll-canvas.js +5 -5
  228. package/lib/stdlib/behavior/scroll-canvas.js.map +1 -1
  229. package/lib/stdlib/behavior/track-canvas-3d.d.ts +1 -1
  230. package/lib/stdlib/behavior/zoom-canvas-3d.d.ts +1 -1
  231. package/lib/stdlib/behavior/zoom-canvas.d.ts +16 -0
  232. package/lib/stdlib/behavior/zoom-canvas.js +106 -4
  233. package/lib/stdlib/behavior/zoom-canvas.js.map +1 -1
  234. package/lib/stdlib/data/transformV4Data.js +12 -6
  235. package/lib/stdlib/data/transformV4Data.js.map +1 -1
  236. package/lib/stdlib/index.d.ts +6 -4
  237. package/lib/stdlib/index.js +10 -8
  238. package/lib/stdlib/index.js.map +1 -1
  239. package/lib/stdlib/item/combo/circle.js +12 -7
  240. package/lib/stdlib/item/combo/circle.js.map +1 -1
  241. package/lib/stdlib/item/combo/rect.js +12 -7
  242. package/lib/stdlib/item/combo/rect.js.map +1 -1
  243. package/lib/stdlib/item/edge/base.d.ts +22 -5
  244. package/lib/stdlib/item/edge/base.js +48 -16
  245. package/lib/stdlib/item/edge/base.js.map +1 -1
  246. package/lib/stdlib/item/edge/cubic.js +11 -6
  247. package/lib/stdlib/item/edge/cubic.js.map +1 -1
  248. package/lib/stdlib/item/edge/line.js +12 -7
  249. package/lib/stdlib/item/edge/line.js.map +1 -1
  250. package/lib/stdlib/item/edge/loop.js +6 -1
  251. package/lib/stdlib/item/edge/loop.js.map +1 -1
  252. package/lib/stdlib/item/edge/polyline.js +11 -6
  253. package/lib/stdlib/item/edge/polyline.js.map +1 -1
  254. package/lib/stdlib/item/edge/quadratic.js +11 -6
  255. package/lib/stdlib/item/edge/quadratic.js.map +1 -1
  256. package/lib/stdlib/item/node/base.d.ts +24 -13
  257. package/lib/stdlib/item/node/base.js +90 -48
  258. package/lib/stdlib/item/node/base.js.map +1 -1
  259. package/lib/stdlib/item/node/base3d.d.ts +11 -2
  260. package/lib/stdlib/item/node/base3d.js +14 -3
  261. package/lib/stdlib/item/node/base3d.js.map +1 -1
  262. package/lib/stdlib/item/node/circle.js +13 -7
  263. package/lib/stdlib/item/node/circle.js.map +1 -1
  264. package/lib/stdlib/item/node/cube.d.ts +0 -2
  265. package/lib/stdlib/item/node/cube.js +12 -9
  266. package/lib/stdlib/item/node/cube.js.map +1 -1
  267. package/lib/stdlib/item/node/diamond.js +20 -11
  268. package/lib/stdlib/item/node/diamond.js.map +1 -1
  269. package/lib/stdlib/item/node/donut.js +18 -8
  270. package/lib/stdlib/item/node/donut.js.map +1 -1
  271. package/lib/stdlib/item/node/ellipse.js +11 -6
  272. package/lib/stdlib/item/node/ellipse.js.map +1 -1
  273. package/lib/stdlib/item/node/hexagon.js +12 -7
  274. package/lib/stdlib/item/node/hexagon.js.map +1 -1
  275. package/lib/stdlib/item/node/image.js +13 -3
  276. package/lib/stdlib/item/node/image.js.map +1 -1
  277. package/lib/stdlib/item/node/index.d.ts +1 -0
  278. package/lib/stdlib/item/node/index.js +1 -0
  279. package/lib/stdlib/item/node/index.js.map +1 -1
  280. package/lib/stdlib/item/node/modelRect.d.ts +33 -1
  281. package/lib/stdlib/item/node/modelRect.js +135 -78
  282. package/lib/stdlib/item/node/modelRect.js.map +1 -1
  283. package/lib/stdlib/item/node/plane.d.ts +38 -0
  284. package/lib/stdlib/item/node/plane.js +66 -0
  285. package/lib/stdlib/item/node/plane.js.map +1 -0
  286. package/lib/stdlib/item/node/rect.js +12 -7
  287. package/lib/stdlib/item/node/rect.js.map +1 -1
  288. package/lib/stdlib/item/node/sphere.js +12 -7
  289. package/lib/stdlib/item/node/sphere.js.map +1 -1
  290. package/lib/stdlib/item/node/star.d.ts +1 -3
  291. package/lib/stdlib/item/node/star.js +16 -10
  292. package/lib/stdlib/item/node/star.js.map +1 -1
  293. package/lib/stdlib/item/node/triangle.js +17 -7
  294. package/lib/stdlib/item/node/triangle.js.map +1 -1
  295. package/lib/stdlib/plugin/edgeBundling/index.d.ts +75 -0
  296. package/lib/stdlib/plugin/edgeBundling/index.js +368 -0
  297. package/lib/stdlib/plugin/edgeBundling/index.js.map +1 -0
  298. package/lib/stdlib/plugin/hull/bubbleset.d.ts +1 -1
  299. package/lib/stdlib/plugin/hull/bubbleset.js +13 -13
  300. package/lib/stdlib/plugin/hull/bubbleset.js.map +1 -1
  301. package/lib/stdlib/plugin/hull/index.js +4 -4
  302. package/lib/stdlib/plugin/hull/util.js +1 -1
  303. package/lib/stdlib/plugin/hull/util.js.map +1 -1
  304. package/lib/stdlib/plugin/index.d.ts +1 -0
  305. package/lib/stdlib/plugin/index.js +1 -0
  306. package/lib/stdlib/plugin/index.js.map +1 -1
  307. package/lib/stdlib/plugin/legend/index.d.ts +2 -2
  308. package/lib/stdlib/plugin/legend/index.js +10 -10
  309. package/lib/stdlib/plugin/legend/index.js.map +1 -1
  310. package/lib/stdlib/plugin/lodController/index.js +10 -8
  311. package/lib/stdlib/plugin/lodController/index.js.map +1 -1
  312. package/lib/stdlib/plugin/menu/index.js +1 -1
  313. package/lib/stdlib/plugin/menu/index.js.map +1 -1
  314. package/lib/stdlib/plugin/snapline/index.d.ts +2 -2
  315. package/lib/stdlib/plugin/snapline/index.js +2 -2
  316. package/lib/stdlib/plugin/snapline/index.js.map +1 -1
  317. package/lib/stdlib/plugin/tooltip/index.d.ts +1 -1
  318. package/lib/stdlib/plugin/tooltip/index.js +3 -3
  319. package/lib/stdlib/plugin/tooltip/index.js.map +1 -1
  320. package/lib/stdlib/plugin/{watermaker → watermarker}/index.d.ts +1 -1
  321. package/lib/stdlib/plugin/{watermaker → watermarker}/index.js +7 -7
  322. package/lib/stdlib/plugin/watermarker/index.js.map +1 -0
  323. package/lib/stdlib/selector/lasso.js +3 -3
  324. package/lib/stdlib/selector/lasso.js.map +1 -1
  325. package/lib/stdlib/theme/dark.js +1 -1
  326. package/lib/stdlib/theme/dark.js.map +1 -1
  327. package/lib/stdlib/theme/light.js +4 -1
  328. package/lib/stdlib/theme/light.js.map +1 -1
  329. package/lib/stdlib/themeSolver/spec.js +3 -3
  330. package/lib/stdlib/themeSolver/subject.d.ts +1 -1
  331. package/lib/stdlib/themeSolver/subject.js +1 -1
  332. package/lib/types/animate.d.ts +1 -1
  333. package/lib/types/data.d.ts +3 -1
  334. package/lib/types/graph.d.ts +54 -11
  335. package/lib/types/hook.d.ts +13 -3
  336. package/lib/types/index.d.ts +2 -1
  337. package/lib/types/index.js +3 -1
  338. package/lib/types/index.js.map +1 -1
  339. package/lib/types/item.d.ts +8 -10
  340. package/lib/types/item.js.map +1 -1
  341. package/lib/types/layout.d.ts +1 -1
  342. package/lib/types/node.d.ts +1 -31
  343. package/lib/types/plugin.d.ts +1 -1
  344. package/lib/types/plugin.js +1 -1
  345. package/lib/types/spec.d.ts +5 -5
  346. package/lib/types/theme.d.ts +1 -1
  347. package/lib/types/view.d.ts +1 -1
  348. package/lib/util/animate.js +1 -1
  349. package/lib/util/animate.js.map +1 -1
  350. package/lib/util/canvas.d.ts +1 -1
  351. package/lib/util/canvas.js +7 -1
  352. package/lib/util/canvas.js.map +1 -1
  353. package/lib/util/data.d.ts +10 -10
  354. package/lib/util/data.js +12 -11
  355. package/lib/util/data.js.map +1 -1
  356. package/lib/util/extend.js +4 -7
  357. package/lib/util/extend.js.map +1 -1
  358. package/lib/util/item.js +1 -1
  359. package/lib/util/item.js.map +1 -1
  360. package/lib/util/math.d.ts +1 -1
  361. package/lib/util/math.js +1 -1
  362. package/lib/util/path.d.ts +1 -1
  363. package/lib/util/path.js +1 -1
  364. package/lib/util/polyline.d.ts +2 -2
  365. package/lib/util/polyline.js +3 -3
  366. package/lib/util/polyline.js.map +1 -1
  367. package/lib/util/router.js +7 -7
  368. package/lib/util/router.js.map +1 -1
  369. package/lib/util/shape.d.ts +25 -13
  370. package/lib/util/shape.js +28 -19
  371. package/lib/util/shape.js.map +1 -1
  372. package/lib/util/shape3d.d.ts +2 -2
  373. package/lib/util/shape3d.js +9 -12
  374. package/lib/util/shape3d.js.map +1 -1
  375. package/package.json +37 -53
  376. package/src/index.ts +1 -1
  377. package/src/item/combo.ts +2 -1
  378. package/src/item/edge.ts +9 -2
  379. package/src/item/item.ts +21 -10
  380. package/src/item/node.ts +22 -6
  381. package/src/runtime/controller/data.ts +16 -14
  382. package/src/runtime/controller/interaction.ts +5 -4
  383. package/src/runtime/controller/item.ts +78 -36
  384. package/src/runtime/controller/layout.ts +7 -9
  385. package/src/runtime/controller/plugin.ts +1 -1
  386. package/src/runtime/graph.ts +128 -71
  387. package/src/runtime/hooks.ts +2 -2
  388. package/src/stdlib/behavior/create-edge.ts +1 -1
  389. package/src/stdlib/behavior/drag-canvas.ts +1 -1
  390. package/src/stdlib/behavior/drag-node.ts +1 -1
  391. package/src/stdlib/behavior/hover-activate.ts +1 -1
  392. package/src/stdlib/behavior/orbit-canvas-3d.ts +1 -1
  393. package/src/stdlib/behavior/rotate-canvas-3d.ts +2 -2
  394. package/src/stdlib/behavior/scroll-canvas.ts +5 -5
  395. package/src/stdlib/behavior/track-canvas-3d.ts +1 -1
  396. package/src/stdlib/behavior/zoom-canvas-3d.ts +1 -1
  397. package/src/stdlib/behavior/zoom-canvas.ts +134 -13
  398. package/src/stdlib/data/transformV4Data.ts +27 -3
  399. package/src/stdlib/index.ts +8 -4
  400. package/src/stdlib/item/combo/circle.ts +26 -11
  401. package/src/stdlib/item/combo/rect.ts +26 -11
  402. package/src/stdlib/item/edge/base.ts +45 -24
  403. package/src/stdlib/item/edge/cubic.ts +26 -4
  404. package/src/stdlib/item/edge/line.ts +27 -5
  405. package/src/stdlib/item/edge/loop.ts +6 -1
  406. package/src/stdlib/item/edge/polyline.ts +26 -4
  407. package/src/stdlib/item/edge/quadratic.ts +26 -4
  408. package/src/stdlib/item/node/base.ts +74 -48
  409. package/src/stdlib/item/node/base3d.ts +19 -3
  410. package/src/stdlib/item/node/circle.ts +29 -8
  411. package/src/stdlib/item/node/cube.ts +26 -12
  412. package/src/stdlib/item/node/diamond.ts +35 -11
  413. package/src/stdlib/item/node/donut.ts +32 -18
  414. package/src/stdlib/item/node/ellipse.ts +25 -11
  415. package/src/stdlib/item/node/hexagon.ts +27 -7
  416. package/src/stdlib/item/node/image.ts +13 -5
  417. package/src/stdlib/item/node/index.ts +1 -0
  418. package/src/stdlib/item/node/modelRect.ts +230 -136
  419. package/src/stdlib/item/node/plane.ts +121 -0
  420. package/src/stdlib/item/node/rect.ts +27 -7
  421. package/src/stdlib/item/node/sphere.ts +26 -10
  422. package/src/stdlib/item/node/star.ts +32 -11
  423. package/src/stdlib/item/node/triangle.ts +32 -9
  424. package/src/stdlib/plugin/edgeBundling/index.ts +529 -0
  425. package/src/stdlib/plugin/hull/bubbleset.ts +14 -14
  426. package/src/stdlib/plugin/hull/index.ts +4 -4
  427. package/src/stdlib/plugin/hull/util.ts +1 -1
  428. package/src/stdlib/plugin/index.ts +1 -0
  429. package/src/stdlib/plugin/legend/index.ts +11 -12
  430. package/src/stdlib/plugin/lodController/index.ts +9 -8
  431. package/src/stdlib/plugin/menu/index.ts +1 -1
  432. package/src/stdlib/plugin/snapline/index.ts +3 -3
  433. package/src/stdlib/plugin/tooltip/index.ts +4 -4
  434. package/src/stdlib/plugin/{watermaker → watermarker}/index.ts +8 -8
  435. package/src/stdlib/selector/lasso.ts +3 -3
  436. package/src/stdlib/theme/dark.ts +0 -1
  437. package/src/stdlib/theme/light.ts +3 -1
  438. package/src/stdlib/themeSolver/spec.ts +3 -3
  439. package/src/stdlib/themeSolver/subject.ts +1 -1
  440. package/src/types/animate.ts +2 -2
  441. package/src/types/data.ts +5 -1
  442. package/src/types/graph.ts +82 -11
  443. package/src/types/hook.ts +32 -3
  444. package/src/types/index.ts +2 -1
  445. package/src/types/item.ts +15 -16
  446. package/src/types/layout.ts +1 -1
  447. package/src/types/node.ts +1 -31
  448. package/src/types/plugin.ts +1 -1
  449. package/src/types/spec.ts +5 -5
  450. package/src/types/theme.ts +1 -1
  451. package/src/types/view.ts +1 -1
  452. package/src/util/animate.ts +1 -1
  453. package/src/util/canvas.ts +8 -0
  454. package/src/util/data.ts +12 -10
  455. package/src/util/extend.ts +1 -1
  456. package/src/util/item.ts +1 -1
  457. package/src/util/math.ts +1 -1
  458. package/src/util/path.ts +1 -1
  459. package/src/util/polyline.ts +3 -3
  460. package/src/util/router.ts +7 -7
  461. package/src/util/shape.ts +70 -33
  462. package/src/util/shape3d.ts +16 -10
  463. package/esm/stdlib/plugin/watermaker/index.js.map +0 -1
  464. package/lib/stdlib/plugin/watermaker/index.js.map +0 -1
@@ -11,8 +11,6 @@ import { BaseNode3D } from './base3d';
11
11
  export class CubeNode extends BaseNode3D {
12
12
  override defaultStyles = {
13
13
  keyShape: {
14
- latitudeBands: 32,
15
- longitudeBands: 32,
16
14
  width: 10,
17
15
  height: 10,
18
16
  depth: 10,
@@ -36,16 +34,26 @@ export class CubeNode extends BaseNode3D {
36
34
  let shapes: NodeShapeMap = { keyShape: undefined };
37
35
 
38
36
  // keyShape
39
- shapes.keyShape = this.drawKeyShape(model, shapeMap, diffData);
37
+ shapes.keyShape = this.drawKeyShape(model, shapeMap, diffData, diffState);
40
38
 
41
39
  // haloShape
42
40
  if (data.haloShape && this.drawHaloShape) {
43
- shapes.haloShape = this.drawHaloShape(model, shapeMap, diffData);
41
+ shapes.haloShape = this.drawHaloShape(
42
+ model,
43
+ shapeMap,
44
+ diffData,
45
+ diffState,
46
+ );
44
47
  }
45
48
 
46
49
  // labelShape
47
50
  if (data.labelShape) {
48
- shapes.labelShape = this.drawLabelShape(model, shapeMap, diffData);
51
+ shapes.labelShape = this.drawLabelShape(
52
+ model,
53
+ shapeMap,
54
+ diffData,
55
+ diffState,
56
+ );
49
57
  }
50
58
 
51
59
  // labelBackgroundShape
@@ -54,12 +62,18 @@ export class CubeNode extends BaseNode3D {
54
62
  model,
55
63
  shapeMap,
56
64
  diffData,
65
+ diffState,
57
66
  );
58
67
  }
59
68
 
60
69
  // iconShape
61
70
  if (data.iconShape) {
62
- shapes.iconShape = this.drawIconShape(model, shapeMap, diffData);
71
+ shapes.iconShape = this.drawIconShape(
72
+ model,
73
+ shapeMap,
74
+ diffData,
75
+ diffState,
76
+ );
63
77
  }
64
78
 
65
79
  // badgeShape
@@ -80,7 +94,7 @@ export class CubeNode extends BaseNode3D {
80
94
  if (data.otherShapes && this.drawOtherShapes) {
81
95
  shapes = {
82
96
  ...shapes,
83
- ...this.drawOtherShapes(model, shapeMap, diffData),
97
+ ...this.drawOtherShapes(model, shapeMap, diffData, diffState),
84
98
  };
85
99
  }
86
100
  return shapes;
@@ -92,11 +106,11 @@ export class CubeNode extends BaseNode3D {
92
106
  diffData?: { previous: NodeModelData; current: NodeModelData },
93
107
  diffState?: { previous: State[]; current: State[] },
94
108
  ): DisplayObject {
95
- return this.upsertShape(
96
- 'cube',
97
- 'keyShape',
98
- this.mergedStyles.keyShape,
109
+ return this.upsertShape('cube', 'keyShape', this.mergedStyles.keyShape, {
110
+ model,
99
111
  shapeMap,
100
- );
112
+ diffData,
113
+ diffState,
114
+ });
101
115
  }
102
116
  }
@@ -33,16 +33,26 @@ export class DiamondNode extends BaseNode {
33
33
  let shapes: NodeShapeMap = { keyShape: undefined };
34
34
 
35
35
  // keyShape
36
- shapes.keyShape = this.drawKeyShape(model, shapeMap, diffData);
36
+ shapes.keyShape = this.drawKeyShape(model, shapeMap, diffData, diffState);
37
37
 
38
38
  // haloShape
39
39
  if (data.haloShape && this.drawHaloShape) {
40
- shapes.haloShape = this.drawHaloShape(model, shapeMap, diffData);
40
+ shapes.haloShape = this.drawHaloShape(
41
+ model,
42
+ shapeMap,
43
+ diffData,
44
+ diffState,
45
+ );
41
46
  }
42
47
 
43
48
  // labelShape
44
49
  if (data.labelShape) {
45
- shapes.labelShape = this.drawLabelShape(model, shapeMap, diffData);
50
+ shapes.labelShape = this.drawLabelShape(
51
+ model,
52
+ shapeMap,
53
+ diffData,
54
+ diffState,
55
+ );
46
56
  }
47
57
 
48
58
  // labelBackgroundShape
@@ -51,6 +61,7 @@ export class DiamondNode extends BaseNode {
51
61
  model,
52
62
  shapeMap,
53
63
  diffData,
64
+ diffState,
54
65
  );
55
66
  }
56
67
 
@@ -70,7 +81,12 @@ export class DiamondNode extends BaseNode {
70
81
 
71
82
  // iconShape
72
83
  if (data.iconShape) {
73
- shapes.iconShape = this.drawIconShape(model, shapeMap, diffData);
84
+ shapes.iconShape = this.drawIconShape(
85
+ model,
86
+ shapeMap,
87
+ diffData,
88
+ diffState,
89
+ );
74
90
  }
75
91
 
76
92
  // badgeShape
@@ -91,7 +107,7 @@ export class DiamondNode extends BaseNode {
91
107
  if (data.otherShapes && this.drawOtherShapes) {
92
108
  shapes = {
93
109
  ...shapes,
94
- ...this.drawOtherShapes(model, shapeMap, diffData),
110
+ ...this.drawOtherShapes(model, shapeMap, diffData, diffState),
95
111
  };
96
112
  }
97
113
  return shapes;
@@ -111,14 +127,20 @@ export class DiamondNode extends BaseNode {
111
127
  ...this.mergedStyles.keyShape,
112
128
  path: this.getDiamondPath(keyShapeStyle),
113
129
  },
114
- shapeMap,
115
- model,
130
+ {
131
+ model,
132
+ shapeMap,
133
+ diffData,
134
+ diffState,
135
+ },
116
136
  );
117
137
  }
118
138
 
119
139
  private getDiamondPath(keyShapeStyle): PathArray {
120
- const width = keyShapeStyle.size[0];
121
- const height = keyShapeStyle.size[1];
140
+ const { size } = keyShapeStyle;
141
+ const sizeArr = Array.isArray(size) ? size : [size, size];
142
+ const width = sizeArr[0];
143
+ const height = sizeArr[1];
122
144
  const path = [
123
145
  ['M', 0, -height / 2], // top
124
146
  ['L', width / 2, 0], // right
@@ -133,8 +155,10 @@ export class DiamondNode extends BaseNode {
133
155
  keyShapeStyle: any,
134
156
  ): IAnchorPositionMap {
135
157
  const anchorPositionMap = {};
136
- const width = keyShapeStyle.size[0];
137
- const height = keyShapeStyle.size[1];
158
+ const { size } = keyShapeStyle;
159
+ const sizeArr = Array.isArray(size) ? size : [size, size];
160
+ const width = sizeArr[0];
161
+ const height = sizeArr[1];
138
162
  anchorPositionMap['bottom'] = [0, height / 2];
139
163
  anchorPositionMap['left'] = [-width / 2, 0];
140
164
  anchorPositionMap['right'] = anchorPositionMap['default'] = [width / 2, 0];
@@ -84,16 +84,26 @@ export class DonutNode extends BaseNode {
84
84
  let shapes: NodeShapeMap = { keyShape: undefined };
85
85
 
86
86
  // keyShape
87
- shapes.keyShape = this.drawKeyShape(model, shapeMap, diffData);
87
+ shapes.keyShape = this.drawKeyShape(model, shapeMap, diffData, diffState);
88
88
 
89
89
  // haloShape
90
90
  if (data.haloShape && this.drawHaloShape) {
91
- shapes.haloShape = this.drawHaloShape(model, shapeMap, diffData);
91
+ shapes.haloShape = this.drawHaloShape(
92
+ model,
93
+ shapeMap,
94
+ diffData,
95
+ diffState,
96
+ );
92
97
  }
93
98
 
94
99
  // labelShape
95
100
  if (data.labelShape) {
96
- shapes.labelShape = this.drawLabelShape(model, shapeMap, diffData);
101
+ shapes.labelShape = this.drawLabelShape(
102
+ model,
103
+ shapeMap,
104
+ diffData,
105
+ diffState,
106
+ );
97
107
  }
98
108
 
99
109
  // labelBackgroundShape
@@ -102,6 +112,7 @@ export class DonutNode extends BaseNode {
102
112
  model,
103
113
  shapeMap,
104
114
  diffData,
115
+ diffState,
105
116
  );
106
117
  }
107
118
 
@@ -121,7 +132,12 @@ export class DonutNode extends BaseNode {
121
132
 
122
133
  // iconShape
123
134
  if (data.iconShape) {
124
- shapes.iconShape = this.drawIconShape(model, shapeMap, diffData);
135
+ shapes.iconShape = this.drawIconShape(
136
+ model,
137
+ shapeMap,
138
+ diffData,
139
+ diffState,
140
+ );
125
141
  }
126
142
 
127
143
  // badgeShape
@@ -156,7 +172,7 @@ export class DonutNode extends BaseNode {
156
172
  if (data.otherShapes && this.drawOtherShapes) {
157
173
  shapes = {
158
174
  ...shapes,
159
- ...this.drawOtherShapes(model, shapeMap, diffData),
175
+ ...this.drawOtherShapes(model, shapeMap, diffData, diffState),
160
176
  };
161
177
  }
162
178
  return shapes;
@@ -236,7 +252,7 @@ export class DonutNode extends BaseNode {
236
252
  diffData?: { previous: NodeModelData; current: NodeModelData },
237
253
  diffState?: { previous: State[]; current: State[] },
238
254
  ): {
239
- beginAngle: number; // next begin iangle
255
+ beginAngle: number; // next begin angle
240
256
  shouldEnd: boolean; // finish fans drawing
241
257
  } => {
242
258
  const {
@@ -280,13 +296,12 @@ export class DonutNode extends BaseNode {
280
296
  lineWidth,
281
297
  zIndex,
282
298
  } as ShapeStyle;
283
- shapes[id] = this.upsertShape(
284
- 'path',
285
- id,
286
- style,
287
- shapeMap,
299
+ shapes[id] = this.upsertShape('path', id, style, {
288
300
  model,
289
- ) as DisplayObject;
301
+ shapeMap,
302
+ diffData,
303
+ diffState,
304
+ }) as DisplayObject;
290
305
 
291
306
  return {
292
307
  beginAngle: endAngle,
@@ -300,13 +315,12 @@ export class DonutNode extends BaseNode {
300
315
  diffData?: { previous: NodeModelData; current: NodeModelData },
301
316
  diffState?: { previous: State[]; current: State[] },
302
317
  ): DisplayObject {
303
- return this.upsertShape(
304
- 'circle',
305
- 'keyShape',
306
- this.mergedStyles.keyShape,
307
- shapeMap,
318
+ return this.upsertShape('circle', 'keyShape', this.mergedStyles.keyShape, {
308
319
  model,
309
- );
320
+ shapeMap,
321
+ diffData,
322
+ diffState,
323
+ });
310
324
  }
311
325
  }
312
326
 
@@ -33,16 +33,26 @@ export class EllipseNode extends BaseNode {
33
33
  let shapes: NodeShapeMap = { keyShape: undefined };
34
34
 
35
35
  // keyShape
36
- shapes.keyShape = this.drawKeyShape(model, shapeMap, diffData);
36
+ shapes.keyShape = this.drawKeyShape(model, shapeMap, diffData, diffState);
37
37
 
38
38
  // haloShape
39
39
  if (data.haloShape && this.drawHaloShape) {
40
- shapes.haloShape = this.drawHaloShape(model, shapeMap, diffData);
40
+ shapes.haloShape = this.drawHaloShape(
41
+ model,
42
+ shapeMap,
43
+ diffData,
44
+ diffState,
45
+ );
41
46
  }
42
47
 
43
48
  // labelShape
44
49
  if (data.labelShape) {
45
- shapes.labelShape = this.drawLabelShape(model, shapeMap, diffData);
50
+ shapes.labelShape = this.drawLabelShape(
51
+ model,
52
+ shapeMap,
53
+ diffData,
54
+ diffState,
55
+ );
46
56
  }
47
57
 
48
58
  // labelBackgroundShape
@@ -70,7 +80,12 @@ export class EllipseNode extends BaseNode {
70
80
 
71
81
  // iconShape
72
82
  if (data.iconShape) {
73
- shapes.iconShape = this.drawIconShape(model, shapeMap, diffData);
83
+ shapes.iconShape = this.drawIconShape(
84
+ model,
85
+ shapeMap,
86
+ diffData,
87
+ diffState,
88
+ );
74
89
  }
75
90
 
76
91
  // badgeShape
@@ -91,7 +106,7 @@ export class EllipseNode extends BaseNode {
91
106
  if (data.otherShapes && this.drawOtherShapes) {
92
107
  shapes = {
93
108
  ...shapes,
94
- ...this.drawOtherShapes(model, shapeMap, diffData),
109
+ ...this.drawOtherShapes(model, shapeMap, diffData, diffState),
95
110
  };
96
111
  }
97
112
  return shapes;
@@ -103,13 +118,12 @@ export class EllipseNode extends BaseNode {
103
118
  diffData?: { previous: NodeModelData; current: NodeModelData },
104
119
  diffState?: { previous: State[]; current: State[] },
105
120
  ): DisplayObject {
106
- return this.upsertShape(
107
- 'ellipse',
108
- 'keyShape',
109
- this.mergedStyles.keyShape,
110
- shapeMap,
121
+ return this.upsertShape('ellipse', 'keyShape', this.mergedStyles.keyShape, {
111
122
  model,
112
- );
123
+ shapeMap,
124
+ diffData,
125
+ diffState,
126
+ });
113
127
  }
114
128
 
115
129
  public override calculateAnchorPosition(keyShapeStyle) {
@@ -39,16 +39,26 @@ export class HexagonNode extends BaseNode {
39
39
  let shapes: NodeShapeMap = { keyShape: undefined };
40
40
 
41
41
  // keyShape
42
- shapes.keyShape = this.drawKeyShape(model, shapeMap, diffData);
42
+ shapes.keyShape = this.drawKeyShape(model, shapeMap, diffData, diffState);
43
43
 
44
44
  // haloShape
45
45
  if (data.haloShape && this.drawHaloShape) {
46
- shapes.haloShape = this.drawHaloShape(model, shapeMap, diffData);
46
+ shapes.haloShape = this.drawHaloShape(
47
+ model,
48
+ shapeMap,
49
+ diffData,
50
+ diffState,
51
+ );
47
52
  }
48
53
 
49
54
  // labelShape
50
55
  if (data.labelShape) {
51
- shapes.labelShape = this.drawLabelShape(model, shapeMap, diffData);
56
+ shapes.labelShape = this.drawLabelShape(
57
+ model,
58
+ shapeMap,
59
+ diffData,
60
+ diffState,
61
+ );
52
62
  }
53
63
 
54
64
  // labelBackgroundShape
@@ -57,6 +67,7 @@ export class HexagonNode extends BaseNode {
57
67
  model,
58
68
  shapeMap,
59
69
  diffData,
70
+ diffState,
60
71
  );
61
72
  }
62
73
 
@@ -76,7 +87,12 @@ export class HexagonNode extends BaseNode {
76
87
 
77
88
  // iconShape
78
89
  if (data.iconShape) {
79
- shapes.iconShape = this.drawIconShape(model, shapeMap, diffData);
90
+ shapes.iconShape = this.drawIconShape(
91
+ model,
92
+ shapeMap,
93
+ diffData,
94
+ diffState,
95
+ );
80
96
  }
81
97
 
82
98
  // badgeShape
@@ -97,7 +113,7 @@ export class HexagonNode extends BaseNode {
97
113
  if (data.otherShapes && this.drawOtherShapes) {
98
114
  shapes = {
99
115
  ...shapes,
100
- ...this.drawOtherShapes(model, shapeMap, diffData),
116
+ ...this.drawOtherShapes(model, shapeMap, diffData, diffState),
101
117
  };
102
118
  }
103
119
  return shapes;
@@ -117,8 +133,12 @@ export class HexagonNode extends BaseNode {
117
133
  ...this.mergedStyles.keyShape,
118
134
  points: this.getHexagonPoints(keyShapeStyle.r, keyShapeStyle.direction),
119
135
  },
120
- shapeMap,
121
- model,
136
+ {
137
+ model,
138
+ shapeMap,
139
+ diffData,
140
+ diffState,
141
+ },
122
142
  );
123
143
  }
124
144
  private getHexagonPoints(r: number, direction: string): [number, number][] {
@@ -50,8 +50,12 @@ export class ImageNode extends BaseNode {
50
50
  y: this.mergedStyles.keyShape!.y,
51
51
  anchor: '0.5 0.5',
52
52
  },
53
- shapeMap,
54
- model,
53
+ {
54
+ model,
55
+ shapeMap,
56
+ diffData,
57
+ diffState,
58
+ },
55
59
  );
56
60
 
57
61
  if (clipPath) {
@@ -146,7 +150,7 @@ export class ImageNode extends BaseNode {
146
150
  if (data.otherShapes && this.drawOtherShapes) {
147
151
  shapes = {
148
152
  ...shapes,
149
- ...this.drawOtherShapes(model, shapeMap, diffData),
153
+ ...this.drawOtherShapes(model, shapeMap, diffData, diffState),
150
154
  };
151
155
  }
152
156
  return shapes;
@@ -183,8 +187,12 @@ export class ImageNode extends BaseNode {
183
187
  fill: 'transparent',
184
188
  batchKey: 'halo',
185
189
  },
186
- shapeMap,
187
- model,
190
+ {
191
+ model,
192
+ shapeMap,
193
+ diffData,
194
+ diffState,
195
+ },
188
196
  );
189
197
  }
190
198
  }
@@ -10,5 +10,6 @@ export * from './diamond';
10
10
  export * from './modelRect';
11
11
  export * from './image';
12
12
  export * from './cube';
13
+ export * from './plane';
13
14
  export * from './base';
14
15
  export * from './base3d';