@antv/g6 5.0.0-beta.32 → 5.0.0-beta.34

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 (742) hide show
  1. package/dist/g6.min.js +2 -2
  2. package/dist/lib/behaviors/brush-select.d.ts +103 -0
  3. package/dist/lib/behaviors/click-element.d.ts +77 -0
  4. package/dist/lib/behaviors/collapse-expand.d.ts +1 -2
  5. package/dist/lib/behaviors/create-edge.d.ts +1 -2
  6. package/dist/lib/behaviors/drag-element-force.d.ts +13 -0
  7. package/dist/lib/behaviors/drag-element.d.ts +12 -12
  8. package/dist/lib/behaviors/index.d.ts +8 -0
  9. package/dist/lib/behaviors/lasso-select.d.ts +19 -0
  10. package/dist/lib/behaviors/types.d.ts +1 -0
  11. package/dist/lib/constants/change.d.ts +1 -1
  12. package/dist/lib/constants/events/animation.d.ts +1 -4
  13. package/dist/lib/constants/events/graph.d.ts +9 -7
  14. package/dist/lib/constants/registry.d.ts +3 -1
  15. package/dist/lib/elements/combos/base-combo.d.ts +43 -6
  16. package/dist/lib/elements/combos/circle.d.ts +8 -12
  17. package/dist/lib/elements/combos/rect.d.ts +5 -9
  18. package/dist/lib/elements/edges/base-edge.d.ts +64 -10
  19. package/dist/lib/elements/edges/cubic-horizontal.d.ts +2 -2
  20. package/dist/lib/elements/edges/cubic-vertical.d.ts +2 -2
  21. package/dist/lib/elements/edges/cubic.d.ts +2 -2
  22. package/dist/lib/elements/edges/polyline.d.ts +2 -2
  23. package/dist/lib/elements/edges/quadratic.d.ts +2 -2
  24. package/dist/lib/elements/nodes/base-node.d.ts +104 -14
  25. package/dist/lib/elements/nodes/circle.d.ts +5 -8
  26. package/dist/lib/elements/nodes/diamond.d.ts +2 -4
  27. package/dist/lib/elements/nodes/donut.d.ts +45 -0
  28. package/dist/lib/elements/nodes/ellipse.d.ts +5 -8
  29. package/dist/lib/elements/nodes/hexagon.d.ts +6 -9
  30. package/dist/lib/elements/nodes/html.d.ts +27 -0
  31. package/dist/lib/elements/nodes/image.d.ts +9 -11
  32. package/dist/lib/elements/nodes/index.d.ts +4 -0
  33. package/dist/lib/elements/nodes/polygon.d.ts +9 -8
  34. package/dist/lib/elements/nodes/rect.d.ts +2 -3
  35. package/dist/lib/elements/nodes/star.d.ts +7 -10
  36. package/dist/lib/elements/nodes/triangle.d.ts +7 -10
  37. package/dist/lib/exports.d.ts +8 -5
  38. package/dist/lib/layouts/index.d.ts +1 -1
  39. package/dist/lib/layouts/types.d.ts +6 -6
  40. package/dist/lib/palettes/index.d.ts +1 -0
  41. package/dist/lib/plugins/history/events.d.ts +21 -0
  42. package/dist/lib/plugins/history/index.d.ts +82 -0
  43. package/dist/lib/plugins/history/utils.d.ts +31 -0
  44. package/dist/lib/plugins/hull/index.d.ts +58 -0
  45. package/dist/lib/plugins/hull/shape.d.ts +49 -0
  46. package/dist/lib/plugins/hull/util.d.ts +12 -0
  47. package/dist/lib/plugins/index.d.ts +4 -0
  48. package/dist/lib/registry/extension/index.d.ts +1 -1
  49. package/dist/lib/registry/types.d.ts +4 -0
  50. package/dist/lib/runtime/batch.d.ts +11 -0
  51. package/dist/lib/runtime/behavior.d.ts +1 -1
  52. package/dist/lib/runtime/canvas.d.ts +13 -3
  53. package/dist/lib/runtime/data.d.ts +8 -8
  54. package/dist/lib/runtime/element.d.ts +6 -22
  55. package/dist/lib/runtime/graph.d.ts +42 -5
  56. package/dist/lib/runtime/layout.d.ts +5 -11
  57. package/dist/lib/runtime/plugin.d.ts +1 -1
  58. package/dist/lib/runtime/transform.d.ts +11 -0
  59. package/dist/lib/runtime/types.d.ts +14 -0
  60. package/dist/lib/runtime/viewport.d.ts +1 -2
  61. package/dist/lib/spec/data.d.ts +74 -1
  62. package/dist/lib/spec/element/combo.d.ts +17 -6
  63. package/dist/lib/spec/element/edge.d.ts +14 -2
  64. package/dist/lib/spec/element/node.d.ts +19 -3
  65. package/dist/lib/spec/index.d.ts +1 -0
  66. package/dist/lib/spec/spec.d.ts +7 -0
  67. package/dist/lib/spec/transform.d.ts +12 -0
  68. package/dist/lib/themes/base.d.ts +1 -0
  69. package/dist/lib/transforms/arrange-draw-order.d.ts +10 -0
  70. package/dist/lib/transforms/base-transform.d.ts +7 -0
  71. package/dist/lib/transforms/collapse-expand-combo.d.ts +10 -0
  72. package/dist/lib/transforms/index.d.ts +6 -0
  73. package/dist/lib/transforms/process-parallel-edges.d.ts +83 -0
  74. package/dist/lib/transforms/types.d.ts +20 -0
  75. package/dist/lib/transforms/update-related-edge.d.ts +9 -0
  76. package/dist/lib/types/callable.d.ts +2 -2
  77. package/dist/lib/types/canvas.d.ts +1 -1
  78. package/dist/lib/types/change.d.ts +27 -10
  79. package/dist/lib/types/data.d.ts +1 -1
  80. package/dist/lib/types/element.d.ts +6 -140
  81. package/dist/lib/types/id.d.ts +1 -0
  82. package/dist/lib/types/index.d.ts +1 -0
  83. package/dist/lib/types/node.d.ts +3 -3
  84. package/dist/lib/types/point.d.ts +1 -0
  85. package/dist/lib/types/style.d.ts +1 -3
  86. package/dist/lib/utils/animation.d.ts +2 -2
  87. package/dist/lib/utils/behaviors/brush.d.ts +18 -0
  88. package/dist/lib/utils/behaviors/lasso.d.ts +12 -0
  89. package/dist/lib/utils/behaviors/utils.d.ts +21 -0
  90. package/dist/lib/utils/change.d.ts +9 -1
  91. package/dist/lib/utils/combo.d.ts +5 -4
  92. package/dist/lib/utils/edge.d.ts +12 -2
  93. package/dist/lib/utils/event/events.d.ts +1 -1
  94. package/dist/lib/utils/extension.d.ts +1 -1
  95. package/dist/lib/utils/id.d.ts +4 -10
  96. package/dist/lib/utils/line.d.ts +21 -0
  97. package/dist/lib/utils/palette.d.ts +1 -2
  98. package/dist/lib/utils/path.d.ts +35 -0
  99. package/dist/lib/utils/point.d.ts +74 -20
  100. package/dist/lib/utils/polygon.d.ts +17 -0
  101. package/dist/lib/utils/position.d.ts +14 -1
  102. package/dist/lib/utils/prefix.d.ts +1 -1
  103. package/dist/lib/utils/relation.d.ts +1 -2
  104. package/dist/lib/utils/shortcut.d.ts +1 -0
  105. package/dist/lib/utils/vector.d.ts +3 -2
  106. package/esm/behaviors/brush-select.d.ts +103 -0
  107. package/esm/behaviors/brush-select.js +199 -0
  108. package/esm/behaviors/brush-select.js.map +1 -0
  109. package/esm/behaviors/click-element.d.ts +77 -0
  110. package/esm/behaviors/click-element.js +108 -0
  111. package/esm/behaviors/click-element.js.map +1 -0
  112. package/esm/behaviors/collapse-expand.d.ts +1 -2
  113. package/esm/behaviors/collapse-expand.js.map +1 -1
  114. package/esm/behaviors/create-edge.d.ts +1 -2
  115. package/esm/behaviors/create-edge.js.map +1 -1
  116. package/esm/behaviors/drag-element-force.d.ts +13 -0
  117. package/esm/behaviors/drag-element-force.js +55 -0
  118. package/esm/behaviors/drag-element-force.js.map +1 -0
  119. package/esm/behaviors/drag-element.d.ts +12 -12
  120. package/esm/behaviors/drag-element.js +17 -9
  121. package/esm/behaviors/drag-element.js.map +1 -1
  122. package/esm/behaviors/focus-element.js.map +1 -1
  123. package/esm/behaviors/hover-element.js +2 -2
  124. package/esm/behaviors/hover-element.js.map +1 -1
  125. package/esm/behaviors/index.d.ts +8 -0
  126. package/esm/behaviors/index.js +4 -0
  127. package/esm/behaviors/index.js.map +1 -1
  128. package/esm/behaviors/lasso-select.d.ts +19 -0
  129. package/esm/behaviors/lasso-select.js +79 -0
  130. package/esm/behaviors/lasso-select.js.map +1 -0
  131. package/esm/behaviors/types.d.ts +1 -0
  132. package/esm/constants/change.d.ts +1 -1
  133. package/esm/constants/change.js +12 -12
  134. package/esm/constants/change.js.map +1 -1
  135. package/esm/constants/events/animation.d.ts +1 -4
  136. package/esm/constants/events/animation.js +0 -4
  137. package/esm/constants/events/animation.js.map +1 -1
  138. package/esm/constants/events/graph.d.ts +9 -7
  139. package/esm/constants/events/graph.js +8 -8
  140. package/esm/constants/events/graph.js.map +1 -1
  141. package/esm/constants/registry.d.ts +3 -1
  142. package/esm/constants/registry.js +2 -0
  143. package/esm/constants/registry.js.map +1 -1
  144. package/esm/elements/combos/base-combo.d.ts +43 -6
  145. package/esm/elements/combos/base-combo.js.map +1 -1
  146. package/esm/elements/combos/circle.d.ts +8 -12
  147. package/esm/elements/combos/circle.js.map +1 -1
  148. package/esm/elements/combos/rect.d.ts +5 -9
  149. package/esm/elements/combos/rect.js.map +1 -1
  150. package/esm/elements/edges/base-edge.d.ts +64 -10
  151. package/esm/elements/edges/base-edge.js.map +1 -1
  152. package/esm/elements/edges/cubic-horizontal.d.ts +2 -2
  153. package/esm/elements/edges/cubic-vertical.d.ts +2 -2
  154. package/esm/elements/edges/cubic.d.ts +2 -2
  155. package/esm/elements/edges/polyline.d.ts +2 -2
  156. package/esm/elements/edges/quadratic.d.ts +2 -2
  157. package/esm/elements/nodes/base-node.d.ts +104 -14
  158. package/esm/elements/nodes/base-node.js +4 -1
  159. package/esm/elements/nodes/base-node.js.map +1 -1
  160. package/esm/elements/nodes/circle.d.ts +5 -8
  161. package/esm/elements/nodes/circle.js.map +1 -1
  162. package/esm/elements/nodes/diamond.d.ts +2 -4
  163. package/esm/elements/nodes/diamond.js +2 -2
  164. package/esm/elements/nodes/diamond.js.map +1 -1
  165. package/esm/elements/nodes/donut.d.ts +45 -0
  166. package/esm/elements/nodes/donut.js +81 -0
  167. package/esm/elements/nodes/donut.js.map +1 -0
  168. package/esm/elements/nodes/ellipse.d.ts +5 -8
  169. package/esm/elements/nodes/ellipse.js +1 -1
  170. package/esm/elements/nodes/ellipse.js.map +1 -1
  171. package/esm/elements/nodes/hexagon.d.ts +6 -9
  172. package/esm/elements/nodes/hexagon.js.map +1 -1
  173. package/esm/elements/nodes/html.d.ts +27 -0
  174. package/esm/elements/nodes/html.js +209 -0
  175. package/esm/elements/nodes/html.js.map +1 -0
  176. package/esm/elements/nodes/image.d.ts +9 -11
  177. package/esm/elements/nodes/image.js.map +1 -1
  178. package/esm/elements/nodes/index.d.ts +4 -0
  179. package/esm/elements/nodes/index.js +2 -0
  180. package/esm/elements/nodes/index.js.map +1 -1
  181. package/esm/elements/nodes/polygon.d.ts +9 -8
  182. package/esm/elements/nodes/polygon.js +4 -1
  183. package/esm/elements/nodes/polygon.js.map +1 -1
  184. package/esm/elements/nodes/rect.d.ts +2 -3
  185. package/esm/elements/nodes/rect.js.map +1 -1
  186. package/esm/elements/nodes/star.d.ts +7 -10
  187. package/esm/elements/nodes/star.js.map +1 -1
  188. package/esm/elements/nodes/triangle.d.ts +7 -10
  189. package/esm/elements/nodes/triangle.js.map +1 -1
  190. package/esm/exports.d.ts +8 -5
  191. package/esm/exports.js +4 -2
  192. package/esm/exports.js.map +1 -1
  193. package/esm/layouts/index.d.ts +1 -1
  194. package/esm/layouts/index.js +1 -1
  195. package/esm/layouts/index.js.map +1 -1
  196. package/esm/layouts/types.d.ts +6 -6
  197. package/esm/palettes/index.d.ts +1 -0
  198. package/esm/palettes/index.js +12 -0
  199. package/esm/palettes/index.js.map +1 -1
  200. package/esm/plugins/history/events.d.ts +21 -0
  201. package/esm/plugins/history/events.js +16 -0
  202. package/esm/plugins/history/events.js.map +1 -0
  203. package/esm/plugins/history/index.d.ts +82 -0
  204. package/esm/plugins/history/index.js +168 -0
  205. package/esm/plugins/history/index.js.map +1 -0
  206. package/esm/plugins/history/utils.d.ts +31 -0
  207. package/esm/plugins/history/utils.js +79 -0
  208. package/esm/plugins/history/utils.js.map +1 -0
  209. package/esm/plugins/hull/index.d.ts +58 -0
  210. package/esm/plugins/hull/index.js +107 -0
  211. package/esm/plugins/hull/index.js.map +1 -0
  212. package/esm/plugins/hull/shape.d.ts +49 -0
  213. package/esm/plugins/hull/shape.js +35 -0
  214. package/esm/plugins/hull/shape.js.map +1 -0
  215. package/esm/plugins/hull/util.d.ts +12 -0
  216. package/esm/plugins/hull/util.js +203 -0
  217. package/esm/plugins/hull/util.js.map +1 -0
  218. package/esm/plugins/index.d.ts +4 -0
  219. package/esm/plugins/index.js +2 -0
  220. package/esm/plugins/index.js.map +1 -1
  221. package/esm/plugins/legend.js +3 -2
  222. package/esm/plugins/legend.js.map +1 -1
  223. package/esm/registry/build-in.js +24 -7
  224. package/esm/registry/build-in.js.map +1 -1
  225. package/esm/registry/extension/index.d.ts +1 -1
  226. package/esm/registry/index.js +1 -0
  227. package/esm/registry/index.js.map +1 -1
  228. package/esm/registry/types.d.ts +4 -0
  229. package/esm/runtime/batch.d.ts +11 -0
  230. package/esm/runtime/batch.js +31 -0
  231. package/esm/runtime/batch.js.map +1 -0
  232. package/esm/runtime/behavior.d.ts +1 -1
  233. package/esm/runtime/behavior.js.map +1 -1
  234. package/esm/runtime/canvas.d.ts +13 -3
  235. package/esm/runtime/canvas.js +40 -13
  236. package/esm/runtime/canvas.js.map +1 -1
  237. package/esm/runtime/data.d.ts +8 -8
  238. package/esm/runtime/data.js +23 -25
  239. package/esm/runtime/data.js.map +1 -1
  240. package/esm/runtime/element.d.ts +6 -22
  241. package/esm/runtime/element.js +73 -177
  242. package/esm/runtime/element.js.map +1 -1
  243. package/esm/runtime/graph.d.ts +42 -5
  244. package/esm/runtime/graph.js +68 -10
  245. package/esm/runtime/graph.js.map +1 -1
  246. package/esm/runtime/layout.d.ts +5 -11
  247. package/esm/runtime/layout.js +31 -77
  248. package/esm/runtime/layout.js.map +1 -1
  249. package/esm/runtime/plugin.d.ts +1 -1
  250. package/esm/runtime/plugin.js.map +1 -1
  251. package/esm/runtime/transform.d.ts +11 -0
  252. package/esm/runtime/transform.js +20 -0
  253. package/esm/runtime/transform.js.map +1 -0
  254. package/esm/runtime/types.d.ts +14 -0
  255. package/esm/runtime/viewport.d.ts +1 -2
  256. package/esm/runtime/viewport.js.map +1 -1
  257. package/esm/spec/data.d.ts +74 -1
  258. package/esm/spec/element/combo.d.ts +17 -6
  259. package/esm/spec/element/edge.d.ts +14 -2
  260. package/esm/spec/element/node.d.ts +19 -3
  261. package/esm/spec/index.d.ts +1 -0
  262. package/esm/spec/spec.d.ts +7 -0
  263. package/esm/spec/transform.d.ts +12 -0
  264. package/esm/spec/transform.js +2 -0
  265. package/esm/spec/transform.js.map +1 -0
  266. package/esm/themes/base.d.ts +1 -0
  267. package/esm/themes/base.js +11 -1
  268. package/esm/themes/base.js.map +1 -1
  269. package/esm/transforms/arrange-draw-order.d.ts +10 -0
  270. package/esm/transforms/arrange-draw-order.js +27 -0
  271. package/esm/transforms/arrange-draw-order.js.map +1 -0
  272. package/esm/transforms/base-transform.d.ts +7 -0
  273. package/esm/transforms/base-transform.js +7 -0
  274. package/esm/transforms/base-transform.js.map +1 -0
  275. package/esm/transforms/collapse-expand-combo.d.ts +10 -0
  276. package/esm/transforms/collapse-expand-combo.js +82 -0
  277. package/esm/transforms/collapse-expand-combo.js.map +1 -0
  278. package/esm/transforms/index.d.ts +6 -0
  279. package/esm/transforms/index.js +6 -0
  280. package/esm/transforms/index.js.map +1 -0
  281. package/esm/transforms/process-parallel-edges.d.ts +83 -0
  282. package/esm/transforms/process-parallel-edges.js +213 -0
  283. package/esm/transforms/process-parallel-edges.js.map +1 -0
  284. package/esm/transforms/types.d.ts +20 -0
  285. package/esm/transforms/types.js +11 -0
  286. package/esm/transforms/types.js.map +1 -0
  287. package/esm/transforms/update-related-edge.d.ts +9 -0
  288. package/esm/transforms/update-related-edge.js +20 -0
  289. package/esm/transforms/update-related-edge.js.map +1 -0
  290. package/esm/types/callable.d.ts +2 -2
  291. package/esm/types/canvas.d.ts +1 -1
  292. package/esm/types/change.d.ts +27 -10
  293. package/esm/types/data.d.ts +1 -1
  294. package/esm/types/element.d.ts +6 -140
  295. package/esm/types/id.d.ts +1 -0
  296. package/esm/types/id.js +2 -0
  297. package/esm/types/id.js.map +1 -0
  298. package/esm/types/index.d.ts +1 -0
  299. package/esm/types/node.d.ts +3 -3
  300. package/esm/types/point.d.ts +1 -0
  301. package/esm/types/style.d.ts +1 -3
  302. package/esm/utils/animation.d.ts +2 -2
  303. package/esm/utils/animation.js +7 -1
  304. package/esm/utils/animation.js.map +1 -1
  305. package/esm/utils/behaviors/brush.d.ts +18 -0
  306. package/esm/utils/behaviors/brush.js +25 -0
  307. package/esm/utils/behaviors/brush.js.map +1 -0
  308. package/esm/utils/behaviors/lasso.d.ts +12 -0
  309. package/esm/utils/behaviors/lasso.js +112 -0
  310. package/esm/utils/behaviors/lasso.js.map +1 -0
  311. package/esm/utils/behaviors/utils.d.ts +21 -0
  312. package/esm/utils/behaviors/utils.js +42 -0
  313. package/esm/utils/behaviors/utils.js.map +1 -0
  314. package/esm/utils/change.d.ts +9 -1
  315. package/esm/utils/change.js +28 -0
  316. package/esm/utils/change.js.map +1 -1
  317. package/esm/utils/combo.d.ts +5 -4
  318. package/esm/utils/combo.js.map +1 -1
  319. package/esm/utils/edge.d.ts +12 -2
  320. package/esm/utils/edge.js +1 -1
  321. package/esm/utils/edge.js.map +1 -1
  322. package/esm/utils/event/events.d.ts +1 -1
  323. package/esm/utils/event/events.js.map +1 -1
  324. package/esm/utils/extension.d.ts +1 -1
  325. package/esm/utils/extension.js.map +1 -1
  326. package/esm/utils/id.d.ts +4 -10
  327. package/esm/utils/id.js +8 -2
  328. package/esm/utils/id.js.map +1 -1
  329. package/esm/utils/line.d.ts +21 -0
  330. package/esm/utils/line.js +41 -0
  331. package/esm/utils/line.js.map +1 -0
  332. package/esm/utils/palette.d.ts +1 -2
  333. package/esm/utils/palette.js.map +1 -1
  334. package/esm/utils/path.d.ts +35 -0
  335. package/esm/utils/path.js +143 -0
  336. package/esm/utils/path.js.map +1 -0
  337. package/esm/utils/point.d.ts +74 -20
  338. package/esm/utils/point.js +168 -44
  339. package/esm/utils/point.js.map +1 -1
  340. package/esm/utils/polygon.d.ts +17 -0
  341. package/esm/utils/polygon.js +62 -0
  342. package/esm/utils/polygon.js.map +1 -0
  343. package/esm/utils/position.d.ts +14 -1
  344. package/esm/utils/position.js +16 -0
  345. package/esm/utils/position.js.map +1 -1
  346. package/esm/utils/prefix.d.ts +1 -1
  347. package/esm/utils/prefix.js.map +1 -1
  348. package/esm/utils/relation.d.ts +1 -2
  349. package/esm/utils/relation.js.map +1 -1
  350. package/esm/utils/shortcut.d.ts +1 -0
  351. package/esm/utils/shortcut.js +13 -2
  352. package/esm/utils/shortcut.js.map +1 -1
  353. package/esm/utils/style.js +3 -3
  354. package/esm/utils/style.js.map +1 -1
  355. package/esm/utils/vector.d.ts +3 -2
  356. package/esm/utils/vector.js +10 -3
  357. package/esm/utils/vector.js.map +1 -1
  358. package/lib/behaviors/brush-select.d.ts +103 -0
  359. package/lib/behaviors/brush-select.js +203 -0
  360. package/lib/behaviors/brush-select.js.map +1 -0
  361. package/lib/behaviors/click-element.d.ts +77 -0
  362. package/lib/behaviors/click-element.js +112 -0
  363. package/lib/behaviors/click-element.js.map +1 -0
  364. package/lib/behaviors/collapse-expand.d.ts +1 -2
  365. package/lib/behaviors/collapse-expand.js.map +1 -1
  366. package/lib/behaviors/create-edge.d.ts +1 -2
  367. package/lib/behaviors/create-edge.js.map +1 -1
  368. package/lib/behaviors/drag-element-force.d.ts +13 -0
  369. package/lib/behaviors/drag-element-force.js +59 -0
  370. package/lib/behaviors/drag-element-force.js.map +1 -0
  371. package/lib/behaviors/drag-element.d.ts +12 -12
  372. package/lib/behaviors/drag-element.js +17 -9
  373. package/lib/behaviors/drag-element.js.map +1 -1
  374. package/lib/behaviors/focus-element.js.map +1 -1
  375. package/lib/behaviors/hover-element.js +1 -1
  376. package/lib/behaviors/hover-element.js.map +1 -1
  377. package/lib/behaviors/index.d.ts +8 -0
  378. package/lib/behaviors/index.js +9 -1
  379. package/lib/behaviors/index.js.map +1 -1
  380. package/lib/behaviors/lasso-select.d.ts +19 -0
  381. package/lib/behaviors/lasso-select.js +83 -0
  382. package/lib/behaviors/lasso-select.js.map +1 -0
  383. package/lib/behaviors/types.d.ts +1 -0
  384. package/lib/constants/change.d.ts +1 -1
  385. package/lib/constants/change.js +13 -13
  386. package/lib/constants/change.js.map +1 -1
  387. package/lib/constants/events/animation.d.ts +1 -4
  388. package/lib/constants/events/animation.js +0 -4
  389. package/lib/constants/events/animation.js.map +1 -1
  390. package/lib/constants/events/graph.d.ts +9 -7
  391. package/lib/constants/events/graph.js +9 -9
  392. package/lib/constants/events/graph.js.map +1 -1
  393. package/lib/constants/registry.d.ts +3 -1
  394. package/lib/constants/registry.js +2 -0
  395. package/lib/constants/registry.js.map +1 -1
  396. package/lib/elements/combos/base-combo.d.ts +43 -6
  397. package/lib/elements/combos/base-combo.js.map +1 -1
  398. package/lib/elements/combos/circle.d.ts +8 -12
  399. package/lib/elements/combos/circle.js.map +1 -1
  400. package/lib/elements/combos/rect.d.ts +5 -9
  401. package/lib/elements/combos/rect.js.map +1 -1
  402. package/lib/elements/edges/base-edge.d.ts +64 -10
  403. package/lib/elements/edges/base-edge.js.map +1 -1
  404. package/lib/elements/edges/cubic-horizontal.d.ts +2 -2
  405. package/lib/elements/edges/cubic-vertical.d.ts +2 -2
  406. package/lib/elements/edges/cubic.d.ts +2 -2
  407. package/lib/elements/edges/polyline.d.ts +2 -2
  408. package/lib/elements/edges/quadratic.d.ts +2 -2
  409. package/lib/elements/nodes/base-node.d.ts +104 -14
  410. package/lib/elements/nodes/base-node.js +4 -1
  411. package/lib/elements/nodes/base-node.js.map +1 -1
  412. package/lib/elements/nodes/circle.d.ts +5 -8
  413. package/lib/elements/nodes/circle.js.map +1 -1
  414. package/lib/elements/nodes/diamond.d.ts +2 -4
  415. package/lib/elements/nodes/diamond.js +2 -2
  416. package/lib/elements/nodes/diamond.js.map +1 -1
  417. package/lib/elements/nodes/donut.d.ts +45 -0
  418. package/lib/elements/nodes/donut.js +85 -0
  419. package/lib/elements/nodes/donut.js.map +1 -0
  420. package/lib/elements/nodes/ellipse.d.ts +5 -8
  421. package/lib/elements/nodes/ellipse.js +1 -1
  422. package/lib/elements/nodes/ellipse.js.map +1 -1
  423. package/lib/elements/nodes/hexagon.d.ts +6 -9
  424. package/lib/elements/nodes/hexagon.js.map +1 -1
  425. package/lib/elements/nodes/html.d.ts +27 -0
  426. package/lib/elements/nodes/html.js +213 -0
  427. package/lib/elements/nodes/html.js.map +1 -0
  428. package/lib/elements/nodes/image.d.ts +9 -11
  429. package/lib/elements/nodes/image.js.map +1 -1
  430. package/lib/elements/nodes/index.d.ts +4 -0
  431. package/lib/elements/nodes/index.js +5 -1
  432. package/lib/elements/nodes/index.js.map +1 -1
  433. package/lib/elements/nodes/polygon.d.ts +9 -8
  434. package/lib/elements/nodes/polygon.js +4 -1
  435. package/lib/elements/nodes/polygon.js.map +1 -1
  436. package/lib/elements/nodes/rect.d.ts +2 -3
  437. package/lib/elements/nodes/rect.js.map +1 -1
  438. package/lib/elements/nodes/star.d.ts +7 -10
  439. package/lib/elements/nodes/star.js.map +1 -1
  440. package/lib/elements/nodes/triangle.d.ts +7 -10
  441. package/lib/elements/nodes/triangle.js.map +1 -1
  442. package/lib/exports.d.ts +8 -5
  443. package/lib/exports.js +8 -1
  444. package/lib/exports.js.map +1 -1
  445. package/lib/layouts/index.d.ts +1 -1
  446. package/lib/layouts/index.js +2 -1
  447. package/lib/layouts/index.js.map +1 -1
  448. package/lib/layouts/types.d.ts +6 -6
  449. package/lib/palettes/index.d.ts +1 -0
  450. package/lib/palettes/index.js +13 -1
  451. package/lib/palettes/index.js.map +1 -1
  452. package/lib/plugins/history/events.d.ts +21 -0
  453. package/lib/plugins/history/events.js +19 -0
  454. package/lib/plugins/history/events.js.map +1 -0
  455. package/lib/plugins/history/index.d.ts +82 -0
  456. package/lib/plugins/history/index.js +175 -0
  457. package/lib/plugins/history/index.js.map +1 -0
  458. package/lib/plugins/history/utils.d.ts +31 -0
  459. package/lib/plugins/history/utils.js +84 -0
  460. package/lib/plugins/history/utils.js.map +1 -0
  461. package/lib/plugins/hull/index.d.ts +58 -0
  462. package/lib/plugins/hull/index.js +114 -0
  463. package/lib/plugins/hull/index.js.map +1 -0
  464. package/lib/plugins/hull/shape.d.ts +49 -0
  465. package/lib/plugins/hull/shape.js +39 -0
  466. package/lib/plugins/hull/shape.js.map +1 -0
  467. package/lib/plugins/hull/util.d.ts +12 -0
  468. package/lib/plugins/hull/util.js +207 -0
  469. package/lib/plugins/hull/util.js.map +1 -0
  470. package/lib/plugins/index.d.ts +4 -0
  471. package/lib/plugins/index.js +5 -1
  472. package/lib/plugins/index.js.map +1 -1
  473. package/lib/plugins/legend.js +3 -2
  474. package/lib/plugins/legend.js.map +1 -1
  475. package/lib/registry/build-in.js +19 -2
  476. package/lib/registry/build-in.js.map +1 -1
  477. package/lib/registry/extension/index.d.ts +1 -1
  478. package/lib/registry/index.js +1 -0
  479. package/lib/registry/index.js.map +1 -1
  480. package/lib/registry/types.d.ts +4 -0
  481. package/lib/runtime/batch.d.ts +11 -0
  482. package/lib/runtime/batch.js +35 -0
  483. package/lib/runtime/batch.js.map +1 -0
  484. package/lib/runtime/behavior.d.ts +1 -1
  485. package/lib/runtime/behavior.js.map +1 -1
  486. package/lib/runtime/canvas.d.ts +13 -3
  487. package/lib/runtime/canvas.js +38 -11
  488. package/lib/runtime/canvas.js.map +1 -1
  489. package/lib/runtime/data.d.ts +8 -8
  490. package/lib/runtime/data.js +22 -24
  491. package/lib/runtime/data.js.map +1 -1
  492. package/lib/runtime/element.d.ts +6 -22
  493. package/lib/runtime/element.js +72 -176
  494. package/lib/runtime/element.js.map +1 -1
  495. package/lib/runtime/graph.d.ts +42 -5
  496. package/lib/runtime/graph.js +67 -9
  497. package/lib/runtime/graph.js.map +1 -1
  498. package/lib/runtime/layout.d.ts +5 -11
  499. package/lib/runtime/layout.js +29 -75
  500. package/lib/runtime/layout.js.map +1 -1
  501. package/lib/runtime/plugin.d.ts +1 -1
  502. package/lib/runtime/plugin.js.map +1 -1
  503. package/lib/runtime/transform.d.ts +11 -0
  504. package/lib/runtime/transform.js +24 -0
  505. package/lib/runtime/transform.js.map +1 -0
  506. package/lib/runtime/types.d.ts +14 -0
  507. package/lib/runtime/viewport.d.ts +1 -2
  508. package/lib/runtime/viewport.js.map +1 -1
  509. package/lib/spec/data.d.ts +74 -1
  510. package/lib/spec/element/combo.d.ts +17 -6
  511. package/lib/spec/element/edge.d.ts +14 -2
  512. package/lib/spec/element/node.d.ts +19 -3
  513. package/lib/spec/index.d.ts +1 -0
  514. package/lib/spec/spec.d.ts +7 -0
  515. package/lib/spec/transform.d.ts +12 -0
  516. package/lib/spec/transform.js +3 -0
  517. package/lib/spec/transform.js.map +1 -0
  518. package/lib/themes/base.d.ts +1 -0
  519. package/lib/themes/base.js +11 -1
  520. package/lib/themes/base.js.map +1 -1
  521. package/lib/transforms/arrange-draw-order.d.ts +10 -0
  522. package/lib/transforms/arrange-draw-order.js +31 -0
  523. package/lib/transforms/arrange-draw-order.js.map +1 -0
  524. package/lib/transforms/base-transform.d.ts +7 -0
  525. package/lib/transforms/base-transform.js +11 -0
  526. package/lib/transforms/base-transform.js.map +1 -0
  527. package/lib/transforms/collapse-expand-combo.d.ts +10 -0
  528. package/lib/transforms/collapse-expand-combo.js +86 -0
  529. package/lib/transforms/collapse-expand-combo.js.map +1 -0
  530. package/lib/transforms/index.d.ts +6 -0
  531. package/lib/transforms/index.js +14 -0
  532. package/lib/transforms/index.js.map +1 -0
  533. package/lib/transforms/process-parallel-edges.d.ts +83 -0
  534. package/lib/transforms/process-parallel-edges.js +220 -0
  535. package/lib/transforms/process-parallel-edges.js.map +1 -0
  536. package/lib/transforms/types.d.ts +20 -0
  537. package/lib/transforms/types.js +15 -0
  538. package/lib/transforms/types.js.map +1 -0
  539. package/lib/transforms/update-related-edge.d.ts +9 -0
  540. package/lib/transforms/update-related-edge.js +24 -0
  541. package/lib/transforms/update-related-edge.js.map +1 -0
  542. package/lib/types/callable.d.ts +2 -2
  543. package/lib/types/canvas.d.ts +1 -1
  544. package/lib/types/change.d.ts +27 -10
  545. package/lib/types/data.d.ts +1 -1
  546. package/lib/types/element.d.ts +6 -140
  547. package/lib/types/id.d.ts +1 -0
  548. package/lib/{spec/element/base.js → types/id.js} +1 -1
  549. package/lib/types/id.js.map +1 -0
  550. package/lib/types/index.d.ts +1 -0
  551. package/lib/types/node.d.ts +3 -3
  552. package/lib/types/point.d.ts +1 -0
  553. package/lib/types/style.d.ts +1 -3
  554. package/lib/utils/animation.d.ts +2 -2
  555. package/lib/utils/animation.js +7 -1
  556. package/lib/utils/animation.js.map +1 -1
  557. package/lib/utils/behaviors/brush.d.ts +18 -0
  558. package/lib/utils/behaviors/brush.js +30 -0
  559. package/lib/utils/behaviors/brush.js.map +1 -0
  560. package/lib/utils/behaviors/lasso.d.ts +12 -0
  561. package/lib/utils/behaviors/lasso.js +116 -0
  562. package/lib/utils/behaviors/lasso.js.map +1 -0
  563. package/lib/utils/behaviors/utils.d.ts +21 -0
  564. package/lib/utils/behaviors/utils.js +47 -0
  565. package/lib/utils/behaviors/utils.js.map +1 -0
  566. package/lib/utils/change.d.ts +9 -1
  567. package/lib/utils/change.js +30 -1
  568. package/lib/utils/change.js.map +1 -1
  569. package/lib/utils/combo.d.ts +5 -4
  570. package/lib/utils/combo.js.map +1 -1
  571. package/lib/utils/edge.d.ts +12 -2
  572. package/lib/utils/edge.js +2 -1
  573. package/lib/utils/edge.js.map +1 -1
  574. package/lib/utils/event/events.d.ts +1 -1
  575. package/lib/utils/event/events.js.map +1 -1
  576. package/lib/utils/extension.d.ts +1 -1
  577. package/lib/utils/extension.js.map +1 -1
  578. package/lib/utils/id.d.ts +4 -10
  579. package/lib/utils/id.js +10 -4
  580. package/lib/utils/id.js.map +1 -1
  581. package/lib/utils/line.d.ts +21 -0
  582. package/lib/utils/line.js +46 -0
  583. package/lib/utils/line.js.map +1 -0
  584. package/lib/utils/palette.d.ts +1 -2
  585. package/lib/utils/palette.js.map +1 -1
  586. package/lib/utils/path.d.ts +35 -0
  587. package/lib/utils/path.js +150 -0
  588. package/lib/utils/path.js.map +1 -0
  589. package/lib/utils/point.d.ts +74 -20
  590. package/lib/utils/point.js +178 -48
  591. package/lib/utils/point.js.map +1 -1
  592. package/lib/utils/polygon.d.ts +17 -0
  593. package/lib/utils/polygon.js +66 -0
  594. package/lib/utils/polygon.js.map +1 -0
  595. package/lib/utils/position.d.ts +14 -1
  596. package/lib/utils/position.js +18 -1
  597. package/lib/utils/position.js.map +1 -1
  598. package/lib/utils/prefix.d.ts +1 -1
  599. package/lib/utils/prefix.js.map +1 -1
  600. package/lib/utils/relation.d.ts +1 -2
  601. package/lib/utils/relation.js.map +1 -1
  602. package/lib/utils/shortcut.d.ts +1 -0
  603. package/lib/utils/shortcut.js +12 -1
  604. package/lib/utils/shortcut.js.map +1 -1
  605. package/lib/utils/style.js +3 -3
  606. package/lib/utils/style.js.map +1 -1
  607. package/lib/utils/vector.d.ts +3 -2
  608. package/lib/utils/vector.js +10 -3
  609. package/lib/utils/vector.js.map +1 -1
  610. package/package.json +5 -6
  611. package/src/behaviors/brush-select.ts +305 -0
  612. package/src/behaviors/click-element.ts +181 -0
  613. package/src/behaviors/collapse-expand.ts +1 -2
  614. package/src/behaviors/create-edge.ts +1 -2
  615. package/src/behaviors/drag-element-force.ts +69 -0
  616. package/src/behaviors/drag-element.ts +27 -18
  617. package/src/behaviors/focus-element.ts +1 -2
  618. package/src/behaviors/hover-element.ts +3 -5
  619. package/src/behaviors/index.ts +8 -0
  620. package/src/behaviors/lasso-select.ts +102 -0
  621. package/src/behaviors/types.ts +2 -0
  622. package/src/constants/change.ts +1 -1
  623. package/src/constants/events/animation.ts +0 -4
  624. package/src/constants/events/graph.ts +8 -8
  625. package/src/constants/registry.ts +2 -0
  626. package/src/elements/combos/base-combo.ts +59 -10
  627. package/src/elements/combos/circle.ts +8 -11
  628. package/src/elements/combos/rect.ts +5 -8
  629. package/src/elements/edges/base-edge.ts +70 -13
  630. package/src/elements/edges/cubic-horizontal.ts +2 -2
  631. package/src/elements/edges/cubic-vertical.ts +2 -2
  632. package/src/elements/edges/cubic.ts +2 -2
  633. package/src/elements/edges/polyline.ts +2 -2
  634. package/src/elements/edges/quadratic.ts +2 -2
  635. package/src/elements/nodes/base-node.ts +117 -21
  636. package/src/elements/nodes/circle.ts +5 -7
  637. package/src/elements/nodes/diamond.ts +4 -6
  638. package/src/elements/nodes/donut.ts +137 -0
  639. package/src/elements/nodes/ellipse.ts +6 -8
  640. package/src/elements/nodes/hexagon.ts +7 -9
  641. package/src/elements/nodes/html.ts +230 -0
  642. package/src/elements/nodes/image.ts +12 -13
  643. package/src/elements/nodes/index.ts +4 -0
  644. package/src/elements/nodes/polygon.ts +17 -11
  645. package/src/elements/nodes/rect.ts +3 -4
  646. package/src/elements/nodes/star.ts +9 -11
  647. package/src/elements/nodes/triangle.ts +7 -9
  648. package/src/exports.ts +24 -3
  649. package/src/layouts/index.ts +1 -0
  650. package/src/layouts/types.ts +7 -5
  651. package/src/palettes/index.ts +13 -0
  652. package/src/plugins/history/events.ts +25 -0
  653. package/src/plugins/history/index.ts +222 -0
  654. package/src/plugins/history/utils.ts +98 -0
  655. package/src/plugins/hull/index.ts +148 -0
  656. package/src/plugins/hull/shape.ts +96 -0
  657. package/src/plugins/hull/util.ts +222 -0
  658. package/src/plugins/index.ts +4 -0
  659. package/src/plugins/legend.ts +5 -5
  660. package/src/registry/build-in.ts +28 -4
  661. package/src/registry/extension/index.ts +1 -1
  662. package/src/registry/index.ts +1 -0
  663. package/src/registry/types.ts +2 -0
  664. package/src/runtime/batch.ts +38 -0
  665. package/src/runtime/behavior.ts +1 -1
  666. package/src/runtime/canvas.ts +55 -14
  667. package/src/runtime/data.ts +33 -37
  668. package/src/runtime/element.ts +90 -203
  669. package/src/runtime/graph.ts +78 -13
  670. package/src/runtime/layout.ts +50 -81
  671. package/src/runtime/plugin.ts +1 -1
  672. package/src/runtime/transform.ts +27 -0
  673. package/src/runtime/types.ts +14 -0
  674. package/src/runtime/viewport.ts +1 -2
  675. package/src/spec/data.ts +74 -1
  676. package/src/spec/element/combo.ts +17 -6
  677. package/src/spec/element/edge.ts +14 -2
  678. package/src/spec/element/node.ts +19 -3
  679. package/src/spec/index.ts +1 -0
  680. package/src/spec/spec.ts +7 -0
  681. package/src/spec/transform.ts +15 -0
  682. package/src/themes/base.ts +12 -1
  683. package/src/transforms/arrange-draw-order.ts +36 -0
  684. package/src/transforms/base-transform.ts +11 -0
  685. package/src/transforms/collapse-expand-combo.ts +87 -0
  686. package/src/transforms/index.ts +7 -0
  687. package/src/transforms/process-parallel-edges.ts +284 -0
  688. package/src/transforms/types.ts +23 -0
  689. package/src/transforms/update-related-edge.ts +27 -0
  690. package/src/types/callable.ts +2 -2
  691. package/src/types/canvas.ts +1 -1
  692. package/src/types/change.ts +28 -10
  693. package/src/types/data.ts +1 -1
  694. package/src/types/element.ts +6 -147
  695. package/src/types/id.ts +1 -0
  696. package/src/types/index.ts +1 -0
  697. package/src/types/node.ts +3 -3
  698. package/src/types/point.ts +1 -0
  699. package/src/types/style.ts +1 -3
  700. package/src/utils/animation.ts +8 -2
  701. package/src/utils/behaviors/brush.ts +28 -0
  702. package/src/utils/behaviors/lasso.ts +126 -0
  703. package/src/utils/behaviors/utils.ts +47 -0
  704. package/src/utils/change.ts +42 -2
  705. package/src/utils/combo.ts +6 -5
  706. package/src/utils/edge.ts +7 -2
  707. package/src/utils/event/events.ts +3 -1
  708. package/src/utils/extension.ts +1 -1
  709. package/src/utils/id.ts +11 -3
  710. package/src/utils/line.ts +50 -0
  711. package/src/utils/palette.ts +1 -1
  712. package/src/utils/path.ts +153 -0
  713. package/src/utils/point.ts +190 -51
  714. package/src/utils/polygon.ts +72 -0
  715. package/src/utils/position.ts +18 -1
  716. package/src/utils/prefix.ts +1 -1
  717. package/src/utils/relation.ts +1 -2
  718. package/src/utils/shortcut.ts +13 -2
  719. package/src/utils/style.ts +4 -4
  720. package/src/utils/vector.ts +10 -3
  721. package/dist/lib/runtime/index.d.ts +0 -6
  722. package/dist/lib/spec/element/base.d.ts +0 -6
  723. package/esm/elements/types.d.ts +0 -0
  724. package/esm/elements/types.js +0 -15
  725. package/esm/elements/types.js.map +0 -1
  726. package/esm/runtime/index.d.ts +0 -6
  727. package/esm/runtime/index.js +0 -7
  728. package/esm/runtime/index.js.map +0 -1
  729. package/esm/spec/element/base.d.ts +0 -6
  730. package/esm/spec/element/base.js +0 -2
  731. package/esm/spec/element/base.js.map +0 -1
  732. package/lib/elements/types.d.ts +0 -0
  733. package/lib/elements/types.js +0 -15
  734. package/lib/elements/types.js.map +0 -1
  735. package/lib/runtime/index.d.ts +0 -6
  736. package/lib/runtime/index.js +0 -8
  737. package/lib/runtime/index.js.map +0 -1
  738. package/lib/spec/element/base.d.ts +0 -6
  739. package/lib/spec/element/base.js.map +0 -1
  740. package/src/elements/types.ts +0 -21
  741. package/src/runtime/index.ts +0 -7
  742. package/src/spec/element/base.ts +0 -6
@@ -3,7 +3,7 @@ import type { PathArray } from '@antv/util';
3
3
  import type { Point } from '../../types';
4
4
  import type { BaseEdgeStyleProps } from './base-edge';
5
5
  import { BaseEdge } from './base-edge';
6
- export type QuadraticStyleProps = BaseEdgeStyleProps & {
6
+ export interface QuadraticStyleProps extends BaseEdgeStyleProps {
7
7
  /**
8
8
  * <zh/> 控制点,用于定义曲线的形状。如果不指定,将会通过`curveOffset`和`curvePosition`来计算控制点
9
9
  * <en/> Control point. Used to define the shape of the curve. If not specified, it will be calculated using `curveOffset` and `curvePosition`.
@@ -19,7 +19,7 @@ export type QuadraticStyleProps = BaseEdgeStyleProps & {
19
19
  * <en/> The distance of the control point from the line
20
20
  */
21
21
  curveOffset?: number;
22
- };
22
+ }
23
23
  type ParsedQuadraticStyleProps = Required<QuadraticStyleProps>;
24
24
  export declare class Quadratic extends BaseEdge {
25
25
  static defaultStyleProps: Partial<QuadraticStyleProps>;
@@ -1,9 +1,105 @@
1
- import type { BaseStyleProps, DisplayObject, DisplayObjectConfig, Group } from '@antv/g';
1
+ import type { DisplayObject, DisplayObjectConfig, Group } from '@antv/g';
2
2
  import type { CategoricalPalette } from '../../palettes/types';
3
- import type { BadgePlacement, BaseNodeProps, Keyframe, LabelPlacement, Placement, Point, Port, PortStyleProps, PrefixObject } from '../../types';
3
+ import type { NodeData } from '../../spec';
4
+ import type { BadgePlacement, BaseElementStyleProps, ID, Keyframe, LabelPlacement, Node, Placement, Point, Port, PortStyleProps, PrefixObject, Size } from '../../types';
4
5
  import type { BadgeStyleProps, IconStyleProps, LabelStyleProps } from '../shapes';
5
6
  import { BaseShape } from '../shapes';
6
- export type BaseNodeStyleProps<H extends BaseStyleProps = BaseNodeProps> = BaseNodeProps & ShapeSwitch & {
7
+ export type BaseNodeStyleProps<T extends Record<string, unknown> = Record<string, any>> = T & BaseElementStyleProps & PrefixObject<NodeLabelStyleProps, 'label'> & PrefixObject<T, 'halo'> & PrefixObject<IconStyleProps, 'icon'> & PrefixObject<BadgeStyleProps, 'badge'> & PrefixObject<PortStyleProps, 'port'> & {
8
+ /**
9
+ * <zh/> x 坐标
10
+ *
11
+ * <en/> The x-coordinate of node
12
+ */
13
+ x?: number | string;
14
+ /**
15
+ * <zh/> y 坐标
16
+ *
17
+ * <en/> The y-coordinate of node
18
+ */
19
+ y?: number | string;
20
+ /**
21
+ * <zh/> z 坐标
22
+ *
23
+ * <en/> The z-coordinate of node
24
+ */
25
+ z?: number;
26
+ /**
27
+ * <zh/> 节点大小,快捷设置节点宽高
28
+ *
29
+ * <en/> The size of node, which is a shortcut to set the width and height of node
30
+ */
31
+ size?: Size;
32
+ /**
33
+ * <zh/> 主色
34
+ *
35
+ * <en/> Subject color
36
+ */
37
+ color?: string;
38
+ /**
39
+ * @deprecated
40
+ * <zh/> 解决类型 style.getPropertyValue 问题,不要使用该属性
41
+ *
42
+ * <en/> Solve the problem of style.getPropertyValue, do not use this property
43
+ * @description
44
+ * <zh/> 移除该属性会导致 Polygon 及其子类与 Node 不兼容
45
+ *
46
+ * <en/> Removing this property will cause Polygon and its subclasses to be incompatible with Node
47
+ * @ignore
48
+ */
49
+ points?: ([number, number] | [number, number, number])[];
50
+ /**
51
+ * <zh/> 父节点 id
52
+ * <en/> The id of the parent node/combo
53
+ */
54
+ parentId?: ID;
55
+ /**
56
+ * <zh/> 是否收起
57
+ *
58
+ * <en/> Indicates whether the node is collapsed
59
+ */
60
+ collapsed?: boolean;
61
+ /**
62
+ * <zh/> 子节点实例
63
+ *
64
+ * <en/> The instance of the child node
65
+ */
66
+ childrenNode?: Node[];
67
+ /**
68
+ * <zh/> 子节点数据
69
+ *
70
+ * <en/> The data of the child node
71
+ */
72
+ childrenData?: NodeData[];
73
+ /**
74
+ * <zh/> 是否显示节点标签
75
+ *
76
+ * <en/> Whether to show the node label
77
+ */
78
+ label?: boolean;
79
+ /**
80
+ * <zh/> 是否显示节点光环
81
+ *
82
+ * <en/> Whether to show the node halo
83
+ */
84
+ halo?: boolean;
85
+ /**
86
+ * <zh/> 是否显示节点图标
87
+ *
88
+ * <en/> Whether to show the node icon
89
+ */
90
+ icon?: boolean;
91
+ /**
92
+ * <zh/> 是否显示节点徽标
93
+ *
94
+ * <en/> Whether to show the node badge
95
+ */
96
+ badge?: boolean;
97
+ /**
98
+ * <zh/> 是否显示连接桩
99
+ *
100
+ * <en/> Whether to show the node port
101
+ */
102
+ port?: boolean;
7
103
  /**
8
104
  * <zh/> 连接桩
9
105
  * <en/> Port
@@ -19,18 +115,19 @@ export type BaseNodeStyleProps<H extends BaseStyleProps = BaseNodeProps> = BaseN
19
115
  * <en/> Badge background color palette
20
116
  */
21
117
  badgePalette?: string[] | CategoricalPalette;
22
- } & PrefixObject<NodeLabelStyleProps, 'label'> & PrefixObject<H, 'halo'> & PrefixObject<IconStyleProps, 'icon'> & PrefixObject<BadgeStyleProps, 'badge'> & PrefixObject<PortStyleProps, 'port'>;
118
+ };
23
119
  /**
24
120
  * Design document: https://www.yuque.com/antv/g6/gl1iof1xpzg6ed98
25
121
  *
26
122
  * The P is the StyleProps of Key Shape.
27
123
  * The KeyShape is the type of the key shape.
28
124
  */
29
- export declare abstract class BaseNode<S extends BaseNodeStyleProps = any> extends BaseShape<S> {
125
+ export declare abstract class BaseNode<S extends BaseNodeStyleProps = BaseNodeStyleProps> extends BaseShape<S> {
30
126
  type: string;
31
127
  static defaultStyleProps: Partial<BaseNodeStyleProps>;
32
128
  constructor(options: DisplayObjectConfig<S>);
33
- protected getSize(attributes?: Required<S>): import("../../types").Vector3;
129
+ get parsedAttributes(): Required<S>;
130
+ protected getSize(attributes?: S & import("@antv/g").BaseCustomElementStyleProps): import("../../types").Vector3;
34
131
  protected getKeyStyle(attributes: Required<S>): any;
35
132
  protected getLabelStyle(attributes: Required<S>): false | LabelStyleProps;
36
133
  protected getHaloStyle(attributes: Required<S>): any;
@@ -43,7 +140,7 @@ export declare abstract class BaseNode<S extends BaseNodeStyleProps = any> exten
43
140
  * Get the key shape for the node.
44
141
  * @returns Key shape.
45
142
  */
46
- getKey(): DisplayObject;
143
+ getKey<T extends DisplayObject>(): T;
47
144
  /**
48
145
  * Get the ports for the node.
49
146
  * @returns Ports shape map.
@@ -118,11 +215,4 @@ export type NodePortStyleProps = Partial<PortStyleProps> & {
118
215
  */
119
216
  placement: Placement;
120
217
  };
121
- type ShapeSwitch = {
122
- label?: boolean;
123
- halo?: boolean;
124
- icon?: boolean;
125
- badge?: boolean;
126
- port?: boolean;
127
- };
128
218
  export {};
@@ -3,18 +3,15 @@ import type { Point } from '../../types';
3
3
  import type { IconStyleProps } from '../shapes';
4
4
  import type { BaseNodeStyleProps } from './base-node';
5
5
  import { BaseNode } from './base-node';
6
- export type CircleStyleProps = BaseNodeStyleProps<KeyStyleProps>;
7
- type ParsedCircleStyleProps = Required<CircleStyleProps>;
8
- type KeyStyleProps = GCircleStyleProps;
6
+ export type CircleStyleProps = BaseNodeStyleProps;
9
7
  /**
10
8
  * Draw circle based on BaseNode, override drawKeyShape.
11
9
  */
12
- export declare class Circle extends BaseNode<CircleStyleProps> {
10
+ export declare class Circle extends BaseNode {
13
11
  static defaultStyleProps: Partial<CircleStyleProps>;
14
12
  constructor(options: DisplayObjectConfig<CircleStyleProps>);
15
- protected drawKeyShape(attributes: ParsedCircleStyleProps, container: Group): any;
16
- protected getKeyStyle(attributes: ParsedCircleStyleProps): KeyStyleProps;
17
- protected getIconStyle(attributes: ParsedCircleStyleProps): false | IconStyleProps;
13
+ protected drawKeyShape(attributes: Required<CircleStyleProps>, container: Group): any;
14
+ protected getKeyStyle(attributes: Required<CircleStyleProps>): GCircleStyleProps;
15
+ protected getIconStyle(attributes: Required<CircleStyleProps>): false | IconStyleProps;
18
16
  getIntersectPoint(point: Point): Point;
19
17
  }
20
- export {};
@@ -1,15 +1,13 @@
1
1
  import type { DisplayObjectConfig } from '@antv/g';
2
2
  import type { Point } from '../../types';
3
- import type { ParsedPolygonStyleProps, PolygonStyleProps } from './polygon';
3
+ import type { PolygonStyleProps } from './polygon';
4
4
  import { Polygon } from './polygon';
5
5
  export type DiamondStyleProps = PolygonStyleProps;
6
- type ParsedDiamondStyleProps = ParsedPolygonStyleProps;
7
6
  /**
8
7
  * Draw diamond based on BaseNode, override drawKeyShape.
9
8
  */
10
9
  export declare class Diamond extends Polygon {
11
10
  constructor(options: DisplayObjectConfig<DiamondStyleProps>);
12
- protected getPoints(attributes: ParsedDiamondStyleProps): Point[];
11
+ protected getPoints(attributes: Required<DiamondStyleProps>): Point[];
13
12
  getIntersectPoint(point: Point): Point;
14
13
  }
15
- export {};
@@ -0,0 +1,45 @@
1
+ import { Circle } from './circle';
2
+ import type { BaseStyleProps, DisplayObjectConfig, Group } from '@antv/g';
3
+ import type { PrefixObject } from '../../types';
4
+ import type { CircleStyleProps } from './circle';
5
+ interface Round extends BaseStyleProps {
6
+ /**
7
+ * <zh/> 数值,用于计算比例
8
+ *
9
+ * <en/> Numerical value used to calculate the scale.
10
+ */
11
+ value: number;
12
+ /**
13
+ * <zh/> 颜色
14
+ *
15
+ * <en/> Color.
16
+ */
17
+ color?: string;
18
+ }
19
+ export interface DonutStyleProps extends CircleStyleProps, PrefixObject<BaseStyleProps, 'donut'> {
20
+ /**
21
+ * <zh/> 内环半径,使用百分比或者像素值
22
+ *
23
+ * <en/> Inner ring radius, using percentage or pixel value.
24
+ */
25
+ innerRadius?: string | number;
26
+ /**
27
+ * <zh/> 圆环数据
28
+ *
29
+ * <en/> Donut data.
30
+ */
31
+ donuts?: number[] | Round[];
32
+ /**
33
+ * <zh/> 颜色或者色板名
34
+ *
35
+ * <en/> Color or palette.
36
+ */
37
+ colors?: string | string[];
38
+ }
39
+ export declare class Donut extends Circle {
40
+ static defaultStyleProps: Partial<DonutStyleProps>;
41
+ constructor(options: DisplayObjectConfig<DonutStyleProps>);
42
+ protected drawDonutShape(attributes: Required<DonutStyleProps>, container: Group): void;
43
+ render(attributes: Required<DonutStyleProps>, container?: Group): void;
44
+ }
45
+ export {};
@@ -3,15 +3,12 @@ import type { Point } from '../../types';
3
3
  import type { IconStyleProps } from '../shapes';
4
4
  import type { BaseNodeStyleProps } from './base-node';
5
5
  import { BaseNode } from './base-node';
6
- export type EllipseStyleProps = BaseNodeStyleProps<KeyStyleProps>;
7
- type ParsedEllipseStyleProps = Required<EllipseStyleProps>;
8
- type KeyStyleProps = GEllipseStyleProps;
9
- export declare class Ellipse extends BaseNode<EllipseStyleProps> {
6
+ export type EllipseStyleProps = BaseNodeStyleProps;
7
+ export declare class Ellipse extends BaseNode {
10
8
  static defaultStyleProps: Partial<EllipseStyleProps>;
11
9
  constructor(options: DisplayObjectConfig<EllipseStyleProps>);
12
- protected drawKeyShape(attributes: ParsedEllipseStyleProps, container: Group): any;
13
- protected getKeyStyle(attributes: ParsedEllipseStyleProps): KeyStyleProps;
14
- protected getIconStyle(attributes: ParsedEllipseStyleProps): false | IconStyleProps;
10
+ protected drawKeyShape(attributes: Required<EllipseStyleProps>, container: Group): any;
11
+ protected getKeyStyle(attributes: Required<EllipseStyleProps>): GEllipseStyleProps;
12
+ protected getIconStyle(attributes: Required<EllipseStyleProps>): false | IconStyleProps;
15
13
  getIntersectPoint(point: Point): Point;
16
14
  }
17
- export {};
@@ -1,21 +1,18 @@
1
1
  import type { DisplayObjectConfig } from '@antv/g';
2
2
  import type { Point } from '../../types';
3
3
  import type { IconStyleProps } from '../shapes';
4
- import type { ParsedPolygonStyleProps, PolygonStyleProps } from './polygon';
4
+ import type { PolygonStyleProps } from './polygon';
5
5
  import { Polygon } from './polygon';
6
- export type HexagonStyleProps = PolygonStyleProps & ExtendsStyleProps;
7
- type ParsedHexagonStyleProps = ParsedPolygonStyleProps & Required<HexagonStyleProps>;
8
- type ExtendsStyleProps = {
6
+ export type HexagonStyleProps = PolygonStyleProps<{
9
7
  /**
10
8
  * <zh/> 外半径
11
9
  * <en/> outer radius
12
10
  */
13
11
  outerR?: number;
14
- };
15
- export declare class Hexagon extends Polygon {
12
+ }>;
13
+ export declare class Hexagon extends Polygon<HexagonStyleProps> {
16
14
  constructor(options: DisplayObjectConfig<HexagonStyleProps>);
17
15
  private getOuterR;
18
- protected getPoints(attributes: ParsedHexagonStyleProps): Point[];
19
- protected getIconStyle(attributes: ParsedHexagonStyleProps): false | IconStyleProps;
16
+ protected getPoints(attributes: Required<HexagonStyleProps>): Point[];
17
+ protected getIconStyle(attributes: Required<HexagonStyleProps>): false | IconStyleProps;
20
18
  }
21
- export {};
@@ -0,0 +1,27 @@
1
+ import type { DisplayObjectConfig, HTMLStyleProps as GHTMLStyleProps, Group } from '@antv/g';
2
+ import type { BaseNodeStyleProps } from './base-node';
3
+ import { BaseNode } from './base-node';
4
+ export type HTMLStyleProps = BaseNodeStyleProps<{
5
+ innerHTML: string | HTMLElement;
6
+ }>;
7
+ /**
8
+ * @see https://github.com/antvis/G/blob/next/packages/g-lite/src/plugins/EventPlugin.ts
9
+ */
10
+ export declare class HTML extends BaseNode<HTMLStyleProps> {
11
+ static defaultStyleProps: Partial<HTMLStyleProps>;
12
+ constructor(options: DisplayObjectConfig<HTMLStyleProps>);
13
+ private rootPointerEvent;
14
+ private get eventService();
15
+ private get events();
16
+ protected getDomElement(): HTMLElement;
17
+ protected getKeyStyle(attributes: Required<HTMLStyleProps>): GHTMLStyleProps;
18
+ protected drawKeyShape(attributes: Required<HTMLStyleProps>, container: Group): any;
19
+ connectedCallback(): void;
20
+ attributeChangedCallback(name: any, oldValue: any, newValue: any): void;
21
+ onDestroy(): void;
22
+ private forwardEvents;
23
+ private normalizeToPointerEvent;
24
+ private transferMouseData;
25
+ private bootstrapEvent;
26
+ private getViewportXY;
27
+ }
@@ -1,20 +1,18 @@
1
1
  import type { DisplayObjectConfig, RectStyleProps as GRectStyleProps, Group } from '@antv/g';
2
2
  import { Image as GImage, ImageStyleProps as GImageStyleProps } from '@antv/g';
3
- import type { PrefixObject } from '../../types';
4
3
  import type { IconStyleProps } from '../shapes';
5
4
  import type { BaseNodeStyleProps } from './base-node';
6
5
  import { BaseNode } from './base-node';
7
- export type ImageStyleProps = BaseNodeStyleProps<KeyStyleProps>;
8
- type ParsedImageStyleProps = Required<ImageStyleProps>;
9
- type KeyStyleProps = GImageStyleProps & PrefixObject<HaloStyleProps, 'halo'>;
10
- type HaloStyleProps = GRectStyleProps;
6
+ export type ImageStyleProps = BaseNodeStyleProps<{
7
+ img?: string | HTMLImageElement;
8
+ src?: string | HTMLImageElement;
9
+ }>;
11
10
  export declare class Image extends BaseNode<ImageStyleProps> {
12
11
  static defaultStyleProps: Partial<ImageStyleProps>;
13
12
  constructor(options: DisplayObjectConfig<ImageStyleProps>);
14
- protected getKeyStyle(attributes: ParsedImageStyleProps): KeyStyleProps;
15
- protected getHaloStyle(attributes: ParsedImageStyleProps): false | HaloStyleProps;
16
- protected getIconStyle(attributes: ParsedImageStyleProps): false | IconStyleProps;
17
- protected drawKeyShape(attributes: ParsedImageStyleProps, container: Group): GImage | undefined;
18
- protected drawHaloShape(attributes: ParsedImageStyleProps, container: Group): void;
13
+ protected getKeyStyle(attributes: Required<ImageStyleProps>): GImageStyleProps;
14
+ protected getHaloStyle(attributes: Required<ImageStyleProps>): false | GRectStyleProps;
15
+ protected getIconStyle(attributes: Required<ImageStyleProps>): false | IconStyleProps;
16
+ protected drawKeyShape(attributes: Required<ImageStyleProps>, container: Group): GImage | undefined;
17
+ protected drawHaloShape(attributes: Required<ImageStyleProps>, container: Group): void;
19
18
  }
20
- export {};
@@ -1,8 +1,10 @@
1
1
  export { BaseNode } from './base-node';
2
2
  export { Circle } from './circle';
3
3
  export { Diamond } from './diamond';
4
+ export { Donut } from './donut';
4
5
  export { Ellipse } from './ellipse';
5
6
  export { Hexagon } from './hexagon';
7
+ export { HTML } from './html';
6
8
  export { Image } from './image';
7
9
  export { Rect } from './rect';
8
10
  export { Star } from './star';
@@ -10,8 +12,10 @@ export { Triangle } from './triangle';
10
12
  export type { BaseNodeStyleProps } from './base-node';
11
13
  export type { CircleStyleProps } from './circle';
12
14
  export type { DiamondStyleProps } from './diamond';
15
+ export type { DonutStyleProps } from './donut';
13
16
  export type { EllipseStyleProps } from './ellipse';
14
17
  export type { HexagonStyleProps } from './hexagon';
18
+ export type { HTMLStyleProps } from './html';
15
19
  export type { ImageStyleProps } from './image';
16
20
  export type { RectStyleProps } from './rect';
17
21
  export type { StarStyleProps } from './star';
@@ -2,16 +2,17 @@ import type { DisplayObjectConfig, PolygonStyleProps as GPolygonStyleProps, Grou
2
2
  import type { Point } from '../../types';
3
3
  import type { BaseNodeStyleProps } from './base-node';
4
4
  import { BaseNode } from './base-node';
5
- export type PolygonStyleProps = BaseNodeStyleProps<PolygonKeyStyleProps>;
6
- export type ParsedPolygonStyleProps = Required<PolygonStyleProps>;
7
- export type PolygonKeyStyleProps = GPolygonStyleProps;
5
+ export type PolygonStyleProps<T extends Record<string, unknown> = Record<string, any>> = BaseNodeStyleProps<T & {
6
+ points: ([number, number] | [number, number, number])[];
7
+ }>;
8
8
  /**
9
9
  * Abstract class for polygon nodes,i.e triangle, diamond, hexagon, etc.
10
10
  */
11
- export declare abstract class Polygon extends BaseNode<PolygonStyleProps> {
12
- constructor(options: DisplayObjectConfig<PolygonStyleProps>);
13
- protected drawKeyShape(attributes: ParsedPolygonStyleProps, container: Group): any;
14
- protected getKeyStyle(attributes: ParsedPolygonStyleProps): PolygonKeyStyleProps;
15
- protected abstract getPoints(attributes: ParsedPolygonStyleProps): Point[];
11
+ export declare abstract class Polygon<T extends PolygonStyleProps = PolygonStyleProps> extends BaseNode<T> {
12
+ constructor(options: DisplayObjectConfig<PolygonStyleProps<T>>);
13
+ get parsedAttributes(): Required<PolygonStyleProps<T>>;
14
+ protected drawKeyShape(attributes: Required<PolygonStyleProps<T>>, container: Group): any;
15
+ protected getKeyStyle(attributes: Required<PolygonStyleProps<T>>): GPolygonStyleProps;
16
+ protected abstract getPoints(attributes: Required<PolygonStyleProps<T>>): Point[];
16
17
  getIntersectPoint(point: Point): Point;
17
18
  }
@@ -3,16 +3,15 @@ import { Rect as GRect } from '@antv/g';
3
3
  import type { IconStyleProps } from '../shapes';
4
4
  import type { BaseNodeStyleProps } from './base-node';
5
5
  import { BaseNode } from './base-node';
6
- export type RectStyleProps = BaseNodeStyleProps<KeyStyleProps>;
6
+ export type RectStyleProps = BaseNodeStyleProps;
7
7
  type ParsedRectStyleProps = Required<RectStyleProps>;
8
- type KeyStyleProps = GRectStyleProps;
9
8
  /**
10
9
  * Draw Rect based on BaseNode, override drawKeyShape.
11
10
  */
12
11
  export declare class Rect extends BaseNode<RectStyleProps> {
13
12
  static defaultStyleProps: Partial<RectStyleProps>;
14
13
  constructor(options: DisplayObjectConfig<RectStyleProps>);
15
- protected getKeyStyle(attributes: ParsedRectStyleProps): KeyStyleProps;
14
+ protected getKeyStyle(attributes: ParsedRectStyleProps): GRectStyleProps;
16
15
  protected getIconStyle(attributes: ParsedRectStyleProps): false | IconStyleProps;
17
16
  protected drawKeyShape(attributes: ParsedRectStyleProps, container: Group): GRect | undefined;
18
17
  }
@@ -2,23 +2,20 @@ import type { DisplayObjectConfig } from '@antv/g';
2
2
  import type { Point } from '../../types';
3
3
  import type { IconStyleProps } from '../shapes';
4
4
  import { NodePortStyleProps } from './base-node';
5
- import type { ParsedPolygonStyleProps, PolygonStyleProps } from './polygon';
5
+ import type { PolygonStyleProps } from './polygon';
6
6
  import { Polygon } from './polygon';
7
- export type StarStyleProps = PolygonStyleProps & ExtendsStyleProps;
8
- type ParsedStarStyleProps = ParsedPolygonStyleProps & Required<ExtendsStyleProps>;
9
- type ExtendsStyleProps = {
7
+ export type StarStyleProps = PolygonStyleProps<{
10
8
  /**
11
9
  * <zh/> 内半径
12
10
  * <en/> Inner radius
13
11
  */
14
12
  innerR?: number;
15
- };
16
- export declare class Star extends Polygon {
13
+ }>;
14
+ export declare class Star extends Polygon<StarStyleProps> {
17
15
  constructor(options: DisplayObjectConfig<StarStyleProps>);
18
16
  private getInnerR;
19
17
  private getOuterR;
20
- protected getPoints(attributes: ParsedStarStyleProps): Point[];
21
- protected getIconStyle(attributes: ParsedStarStyleProps): false | IconStyleProps;
22
- protected getPortXY(attributes: ParsedStarStyleProps, style: NodePortStyleProps): Point;
18
+ protected getPoints(attributes: Required<StarStyleProps>): Point[];
19
+ protected getIconStyle(attributes: Required<StarStyleProps>): false | IconStyleProps;
20
+ protected getPortXY(attributes: Required<StarStyleProps>, style: NodePortStyleProps): Point;
23
21
  }
24
- export {};
@@ -2,23 +2,20 @@ import type { DisplayObjectConfig } from '@antv/g';
2
2
  import type { Point } from '../../types';
3
3
  import { IconStyleProps } from '../shapes';
4
4
  import type { NodePortStyleProps } from './base-node';
5
- import type { ParsedPolygonStyleProps, PolygonStyleProps } from './polygon';
5
+ import type { PolygonStyleProps } from './polygon';
6
6
  import { Polygon } from './polygon';
7
- export type TriangleStyleProps = PolygonStyleProps & ExtendsStyleProps;
8
- type ParsedTriangleStyleProps = ParsedPolygonStyleProps & Required<ExtendsStyleProps>;
9
- type ExtendsStyleProps = {
7
+ export type TriangleStyleProps = PolygonStyleProps<{
10
8
  /**
11
9
  * <zh/> 三角形的方向
12
10
  * <en/> The direction of the triangle
13
11
  */
14
12
  direction?: TriangleDirection;
15
- };
13
+ }>;
16
14
  export type TriangleDirection = 'up' | 'left' | 'right' | 'down';
17
- export declare class Triangle extends Polygon {
15
+ export declare class Triangle extends Polygon<TriangleStyleProps> {
18
16
  static defaultStyleProps: Partial<TriangleStyleProps>;
19
17
  constructor(options: DisplayObjectConfig<TriangleStyleProps>);
20
- protected getPoints(attributes: ParsedTriangleStyleProps): Point[];
21
- protected getPortXY(attributes: ParsedTriangleStyleProps, style: NodePortStyleProps): Point;
22
- protected getIconStyle(attributes: ParsedTriangleStyleProps): false | IconStyleProps;
18
+ protected getPoints(attributes: Required<TriangleStyleProps>): Point[];
19
+ protected getPortXY(attributes: Required<TriangleStyleProps>, style: NodePortStyleProps): Point;
20
+ protected getIconStyle(attributes: Required<TriangleStyleProps>): false | IconStyleProps;
23
21
  }
24
- export {};
@@ -5,21 +5,24 @@ export { BaseBehavior, DragCanvas, ZoomCanvas } from './behaviors';
5
5
  export { CanvasEvent, ComboEvent, CommonEvent, ContainerEvent, EdgeEvent, ExtensionCategory, GraphEvent, NodeEvent, } from './constants';
6
6
  export { BaseCombo, CircleCombo, RectCombo } from './elements/combos';
7
7
  export { BaseEdge, Cubic, CubicHorizontal, CubicVertical, Line, Polyline, Quadratic } from './elements/edges';
8
- export { BaseNode, Circle, Diamond, Ellipse, Hexagon, Image, Rect, Star, Triangle } from './elements/nodes';
8
+ export { BaseNode, Circle, Diamond, Donut, Ellipse, HTML, Hexagon, Image, Rect, Star, Triangle, } from './elements/nodes';
9
9
  export { BaseShape } from './elements/shapes';
10
- export { BasePlugin, CameraSetting } from './plugins';
10
+ export { BasePlugin, CameraSetting, History } from './plugins';
11
11
  export { getExtension, getExtensions, register } from './registry';
12
12
  export { Graph } from './runtime/graph';
13
+ export { BaseTransform } from './transforms';
13
14
  export { Shortcut } from './utils/shortcut';
15
+ export { parseSize } from './utils/size';
14
16
  export type { BaseBehaviorOptions, DragCanvasOptions, ZoomCanvasOptions } from './behaviors';
15
17
  export type { BaseComboStyleProps, CircleComboStyleProps, RectComboStyleProps } from './elements/combos';
16
18
  export type { BaseEdgeStyleProps, CubicHorizontalStyleProps, CubicStyleProps, CubicVerticalStyleProps, LineStyleProps, PolylineStyleProps, QuadraticStyleProps, } from './elements/edges';
17
- export type { BaseNodeStyleProps, CircleStyleProps, DiamondStyleProps, EllipseStyleProps, HexagonStyleProps, ImageStyleProps, RectStyleProps, StarStyleProps, TriangleStyleProps, } from './elements/nodes';
19
+ export type { BaseNodeStyleProps, CircleStyleProps, DiamondStyleProps, EllipseStyleProps, HTMLStyleProps, HexagonStyleProps, ImageStyleProps, RectStyleProps, StarStyleProps, TriangleStyleProps, } from './elements/nodes';
18
20
  export type { BaseShapeStyleProps } from './elements/shapes';
19
- export type { BasePluginOptions, CameraSettingOptions } from './plugins';
21
+ export type { BasePluginOptions, CameraSettingOptions, Hull } from './plugins';
20
22
  export type { RuntimeContext } from './runtime/types';
21
23
  export type { BehaviorOptions, CanvasOptions, ComboData, ComboOptions, EdgeData, EdgeOptions, G6Spec, GraphData, LayoutOptions, NodeData, NodeOptions, PluginOptions, ThemeOptions, ViewportOptions, } from './spec';
22
- export type { IAnimateEvent, IDragEvent, IElementLifeCycleEvent, IEvent, IGraphLifeCycleEvent, IKeyboardEvent, IPointerEvent, IViewportEvent, IWheelEvent, Point, Vector2, Vector3, ViewportAnimationEffectTiming, } from './types';
24
+ export type { BaseTransformOptions } from './transforms';
25
+ export type { Combo, Edge, Element, IAnimateEvent, ID, IDragEvent, IElementLifeCycleEvent, IEvent, IGraphLifeCycleEvent, IKeyboardEvent, IPointerEvent, IViewportEvent, IWheelEvent, Node, Point, Vector2, Vector3, ViewportAnimationEffectTiming, } from './types';
23
26
  export type { ShortcutKey } from './utils/shortcut';
24
27
  declare const Utils: {
25
28
  idOf: typeof idOf;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="src/layouts/hierarchy" />
2
2
  export { compactBox, dendrogram, indented, mindmap } from '@antv/hierarchy';
3
- export { AntVDagreLayout, CircularLayout, ComboCombinedLayout, ConcentricLayout, D3ForceLayout, DagreLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, MDSLayout, RadialLayout, RandomLayout, } from '@antv/layout';
3
+ export { AntVDagreLayout, CircularLayout, ComboCombinedLayout, ConcentricLayout, D3Force3DLayout, D3ForceLayout, DagreLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, MDSLayout, RadialLayout, RandomLayout, } from '@antv/layout';
@@ -1,7 +1,7 @@
1
- import type { AntVDagreLayoutOptions, CircularLayoutOptions, ConcentricLayoutOptions, D3ForceLayoutOptions, DagreLayoutOptions, ForceAtlas2LayoutOptions, ForceLayoutOptions, FruchtermanLayoutOptions, GridLayoutOptions, MDSLayoutOptions, RadialLayoutOptions, RandomLayoutOptions } from '@antv/layout';
1
+ import type { AntVDagreLayoutOptions, CircularLayoutOptions, ConcentricLayoutOptions, D3Force3DLayoutOptions, D3ForceLayoutOptions, DagreLayoutOptions, ForceAtlas2LayoutOptions, ForceLayoutOptions, FruchtermanLayoutOptions, GridLayoutOptions, MDSLayoutOptions, RadialLayoutOptions, RandomLayoutOptions } from '@antv/layout';
2
2
  import type { NodeData } from '../spec/data';
3
- export type BuiltInLayoutOptions = AntVDagreLayout | CircularLayout | ConcentricLayout | D3ForceLayout | DagreLayout | ForceAtlas2 | ForceLayout | FruchtermanLayout | GridLayout | MDSLayout | RadialLayout | RandomLayout;
4
- export interface BaseLayoutOptions extends AnimationOptions, WebWorkerLayoutOptions, PresetLayoutOptions {
3
+ export type BuiltInLayoutOptions = AntVDagreLayout | CircularLayout | ConcentricLayout | D3ForceLayout | D3Force3DLayout | DagreLayout | ForceAtlas2 | ForceLayout | FruchtermanLayout | GridLayout | MDSLayout | RadialLayout | RandomLayout;
4
+ export interface BaseLayoutOptions extends AnimationOptions, WebWorkerLayoutOptions {
5
5
  type: string;
6
6
  /**
7
7
  * <zh/> 参与该布局的节点
@@ -37,6 +37,9 @@ interface FruchtermanLayout extends BaseLayoutOptions, FruchtermanLayoutOptions
37
37
  interface D3ForceLayout extends BaseLayoutOptions, D3ForceLayoutOptions {
38
38
  type: 'd3force';
39
39
  }
40
+ interface D3Force3DLayout extends BaseLayoutOptions, D3Force3DLayoutOptions {
41
+ type: 'd3force3d';
42
+ }
40
43
  interface ForceLayout extends BaseLayoutOptions, ForceLayoutOptions {
41
44
  type: 'force' | 'gforce';
42
45
  }
@@ -49,9 +52,6 @@ interface AntVDagreLayout extends BaseLayoutOptions, AntVDagreLayoutOptions {
49
52
  interface DagreLayout extends BaseLayoutOptions, DagreLayoutOptions {
50
53
  type: 'dagre';
51
54
  }
52
- export interface PresetLayoutOptions {
53
- presetLayout?: BaseLayoutOptions;
54
- }
55
55
  export interface AnimationOptions {
56
56
  /**
57
57
  * <zh/> 启用布局动画,对于迭代布局,会在两次迭代之间进行动画过渡
@@ -4,6 +4,7 @@
4
4
  * <en/> Built-in palettes
5
5
  */
6
6
  export declare const spectral: string[];
7
+ export declare const tableau: string[];
7
8
  export declare const oranges: string[];
8
9
  export declare const greens: string[];
9
10
  export declare const blues: string[];
@@ -0,0 +1,21 @@
1
+ import type { Loosen } from '../../types';
2
+ import type { Command } from './utils';
3
+ export interface IHistoryEvent {
4
+ cmd?: Command | null;
5
+ }
6
+ export type HistoryEventHandler = (e: IHistoryEvent) => void;
7
+ export declare enum HistoryEvent {
8
+ /** <zh/> 当命令被撤销时 | <en/> When the command is undone */
9
+ UNDO = "undo",
10
+ /** <zh/> 当命令被重做时 | <en/> When the command is redone */
11
+ REDO = "redo",
12
+ /** <zh/> 当命令被取消时 | <en/> When the command is canceled */
13
+ CANCEL = "cancel",
14
+ /** <zh/> 当命令被添加到队列时 | <en/> When the command is added */
15
+ ADD = "add",
16
+ /** <zh/> 当历史队列被清空时 | <en/> When the command queue is cleared */
17
+ CLEAR = "clear",
18
+ /** <zh/> 当历史队列发生变化时 | <en/> When the command queue changes */
19
+ CHANGE = "change"
20
+ }
21
+ export type HistoryEventName = Loosen<HistoryEvent>;