@antv/g6 5.0.0-beta.33 → 5.0.0-beta.35

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 (514) hide show
  1. package/dist/g6.min.js +2 -2
  2. package/dist/lib/animations/types.d.ts +3 -4
  3. package/dist/lib/behaviors/base-behavior.d.ts +2 -1
  4. package/dist/lib/behaviors/brush-select.d.ts +33 -16
  5. package/dist/lib/behaviors/click-element.d.ts +28 -5
  6. package/dist/lib/behaviors/collapse-expand.d.ts +3 -2
  7. package/dist/lib/behaviors/create-edge.d.ts +1 -2
  8. package/dist/lib/behaviors/drag-canvas.d.ts +7 -0
  9. package/dist/lib/behaviors/drag-element-force.d.ts +1 -2
  10. package/dist/lib/behaviors/drag-element.d.ts +4 -5
  11. package/dist/lib/behaviors/index.d.ts +2 -0
  12. package/dist/lib/behaviors/lasso-select.d.ts +4 -4
  13. package/dist/lib/behaviors/scroll-canvas.d.ts +64 -0
  14. package/dist/lib/behaviors/types.d.ts +2 -1
  15. package/dist/lib/behaviors/zoom-canvas.d.ts +1 -1
  16. package/dist/lib/constants/events/animation.d.ts +1 -4
  17. package/dist/lib/constants/events/graph.d.ts +5 -1
  18. package/dist/lib/elements/combos/base-combo.d.ts +1 -1
  19. package/dist/lib/elements/edges/base-edge.d.ts +0 -5
  20. package/dist/lib/elements/nodes/base-node.d.ts +3 -10
  21. package/dist/lib/elements/nodes/donut.d.ts +45 -0
  22. package/dist/lib/elements/nodes/html.d.ts +27 -0
  23. package/dist/lib/elements/nodes/index.d.ts +4 -0
  24. package/dist/lib/elements/shapes/badge.d.ts +1 -1
  25. package/dist/lib/{plugins/hull/shape.d.ts → elements/shapes/contour.d.ts} +17 -17
  26. package/dist/lib/elements/shapes/index.d.ts +2 -0
  27. package/dist/lib/exports.d.ts +15 -22
  28. package/dist/lib/plugins/bubble-sets.d.ts +45 -0
  29. package/dist/lib/plugins/camera-setting.d.ts +4 -2
  30. package/dist/lib/plugins/contextmenu.d.ts +1 -0
  31. package/dist/lib/plugins/grid-line.d.ts +51 -8
  32. package/dist/lib/plugins/hull/index.d.ts +44 -13
  33. package/dist/lib/plugins/index.d.ts +4 -0
  34. package/dist/lib/plugins/timebar.d.ts +225 -0
  35. package/dist/lib/plugins/tooltip.d.ts +2 -2
  36. package/dist/lib/registry/index.d.ts +1 -1
  37. package/dist/lib/runtime/data.d.ts +13 -7
  38. package/dist/lib/runtime/element.d.ts +6 -10
  39. package/dist/lib/runtime/graph.d.ts +532 -45
  40. package/dist/lib/runtime/types.d.ts +3 -3
  41. package/dist/lib/runtime/viewport.d.ts +3 -4
  42. package/dist/lib/spec/canvas.d.ts +6 -2
  43. package/dist/lib/spec/data.d.ts +74 -1
  44. package/dist/lib/spec/element/combo.d.ts +17 -6
  45. package/dist/lib/spec/element/edge.d.ts +14 -2
  46. package/dist/lib/spec/element/node.d.ts +19 -3
  47. package/{lib/spec/spec.d.ts → dist/lib/spec/graph.d.ts} +12 -4
  48. package/dist/lib/spec/index.d.ts +1 -1
  49. package/dist/lib/spec/theme.d.ts +1 -4
  50. package/dist/lib/spec/viewport.d.ts +1 -1
  51. package/dist/lib/themes/base.d.ts +1 -0
  52. package/dist/lib/themes/types.d.ts +0 -1
  53. package/dist/lib/transforms/process-parallel-edges.d.ts +2 -3
  54. package/dist/lib/transforms/types.d.ts +1 -1
  55. package/dist/lib/types/callable.d.ts +2 -2
  56. package/dist/lib/types/data.d.ts +3 -3
  57. package/dist/lib/types/id.d.ts +1 -0
  58. package/dist/lib/types/index.d.ts +1 -0
  59. package/dist/lib/types/style.d.ts +1 -3
  60. package/dist/lib/types/viewport.d.ts +4 -4
  61. package/dist/lib/utils/animation.d.ts +6 -6
  62. package/dist/lib/utils/behaviors/brush.d.ts +1 -2
  63. package/dist/lib/utils/behaviors/lasso.d.ts +1 -2
  64. package/dist/lib/utils/behaviors/utils.d.ts +1 -1
  65. package/dist/lib/utils/data.d.ts +2 -2
  66. package/dist/lib/utils/edge.d.ts +1 -2
  67. package/dist/lib/utils/element.d.ts +1 -1
  68. package/dist/lib/utils/event/events.d.ts +1 -1
  69. package/dist/lib/utils/event/index.d.ts +1 -1
  70. package/dist/lib/utils/id.d.ts +2 -3
  71. package/dist/lib/utils/palette.d.ts +2 -3
  72. package/dist/lib/utils/relation.d.ts +3 -4
  73. package/dist/lib/utils/visibility.d.ts +1 -1
  74. package/esm/animations/types.d.ts +3 -4
  75. package/esm/behaviors/base-behavior.d.ts +2 -1
  76. package/esm/behaviors/brush-select.d.ts +33 -16
  77. package/esm/behaviors/brush-select.js +7 -2
  78. package/esm/behaviors/brush-select.js.map +1 -1
  79. package/esm/behaviors/click-element.d.ts +28 -5
  80. package/esm/behaviors/click-element.js +11 -0
  81. package/esm/behaviors/click-element.js.map +1 -1
  82. package/esm/behaviors/collapse-expand.d.ts +3 -2
  83. package/esm/behaviors/collapse-expand.js +2 -2
  84. package/esm/behaviors/collapse-expand.js.map +1 -1
  85. package/esm/behaviors/create-edge.d.ts +1 -2
  86. package/esm/behaviors/create-edge.js.map +1 -1
  87. package/esm/behaviors/drag-canvas.d.ts +7 -0
  88. package/esm/behaviors/drag-canvas.js.map +1 -1
  89. package/esm/behaviors/drag-element-force.d.ts +1 -2
  90. package/esm/behaviors/drag-element-force.js.map +1 -1
  91. package/esm/behaviors/drag-element.d.ts +4 -5
  92. package/esm/behaviors/drag-element.js.map +1 -1
  93. package/esm/behaviors/focus-element.js.map +1 -1
  94. package/esm/behaviors/hover-element.js.map +1 -1
  95. package/esm/behaviors/index.d.ts +2 -0
  96. package/esm/behaviors/index.js +1 -0
  97. package/esm/behaviors/index.js.map +1 -1
  98. package/esm/behaviors/lasso-select.d.ts +4 -4
  99. package/esm/behaviors/lasso-select.js +1 -1
  100. package/esm/behaviors/lasso-select.js.map +1 -1
  101. package/esm/behaviors/scroll-canvas.d.ts +64 -0
  102. package/esm/behaviors/scroll-canvas.js +80 -0
  103. package/esm/behaviors/scroll-canvas.js.map +1 -0
  104. package/esm/behaviors/types.d.ts +2 -1
  105. package/esm/behaviors/zoom-canvas.d.ts +1 -1
  106. package/esm/constants/events/animation.d.ts +1 -4
  107. package/esm/constants/events/animation.js +0 -4
  108. package/esm/constants/events/animation.js.map +1 -1
  109. package/esm/constants/events/graph.d.ts +5 -1
  110. package/esm/constants/events/graph.js +4 -0
  111. package/esm/constants/events/graph.js.map +1 -1
  112. package/esm/elements/combos/base-combo.d.ts +1 -1
  113. package/esm/elements/edges/base-edge.d.ts +0 -5
  114. package/esm/elements/edges/base-edge.js +1 -2
  115. package/esm/elements/edges/base-edge.js.map +1 -1
  116. package/esm/elements/nodes/base-node.d.ts +3 -10
  117. package/esm/elements/nodes/base-node.js +2 -2
  118. package/esm/elements/nodes/base-node.js.map +1 -1
  119. package/esm/elements/nodes/donut.d.ts +45 -0
  120. package/esm/elements/nodes/donut.js +81 -0
  121. package/esm/elements/nodes/donut.js.map +1 -0
  122. package/esm/elements/nodes/html.d.ts +27 -0
  123. package/esm/elements/nodes/html.js +209 -0
  124. package/esm/elements/nodes/html.js.map +1 -0
  125. package/esm/elements/nodes/index.d.ts +4 -0
  126. package/esm/elements/nodes/index.js +2 -0
  127. package/esm/elements/nodes/index.js.map +1 -1
  128. package/esm/elements/shapes/badge.d.ts +1 -1
  129. package/esm/{plugins/hull/shape.d.ts → elements/shapes/contour.d.ts} +17 -17
  130. package/esm/{plugins/hull/shape.js → elements/shapes/contour.js} +12 -11
  131. package/esm/elements/shapes/contour.js.map +1 -0
  132. package/esm/elements/shapes/index.d.ts +2 -0
  133. package/esm/elements/shapes/index.js +1 -0
  134. package/esm/elements/shapes/index.js.map +1 -1
  135. package/esm/exports.d.ts +15 -22
  136. package/esm/exports.js +8 -18
  137. package/esm/exports.js.map +1 -1
  138. package/esm/plugins/bubble-sets.d.ts +45 -0
  139. package/esm/plugins/bubble-sets.js +212 -0
  140. package/esm/plugins/bubble-sets.js.map +1 -0
  141. package/esm/plugins/camera-setting.d.ts +4 -2
  142. package/esm/plugins/camera-setting.js.map +1 -1
  143. package/esm/plugins/contextmenu.d.ts +1 -0
  144. package/esm/plugins/contextmenu.js +1 -0
  145. package/esm/plugins/contextmenu.js.map +1 -1
  146. package/esm/plugins/grid-line.d.ts +51 -8
  147. package/esm/plugins/grid-line.js.map +1 -1
  148. package/esm/plugins/history/utils.js +6 -2
  149. package/esm/plugins/history/utils.js.map +1 -1
  150. package/esm/plugins/hull/index.d.ts +44 -13
  151. package/esm/plugins/hull/index.js +46 -16
  152. package/esm/plugins/hull/index.js.map +1 -1
  153. package/esm/plugins/index.d.ts +4 -0
  154. package/esm/plugins/index.js +2 -0
  155. package/esm/plugins/index.js.map +1 -1
  156. package/esm/plugins/legend.js +4 -2
  157. package/esm/plugins/legend.js.map +1 -1
  158. package/esm/plugins/timebar.d.ts +225 -0
  159. package/esm/plugins/timebar.js +253 -0
  160. package/esm/plugins/timebar.js.map +1 -0
  161. package/esm/plugins/tooltip.d.ts +2 -2
  162. package/esm/registry/build-in.js +15 -10
  163. package/esm/registry/build-in.js.map +1 -1
  164. package/esm/registry/index.d.ts +1 -1
  165. package/esm/registry/index.js +1 -1
  166. package/esm/runtime/canvas.js +7 -4
  167. package/esm/runtime/canvas.js.map +1 -1
  168. package/esm/runtime/data.d.ts +13 -7
  169. package/esm/runtime/data.js +20 -3
  170. package/esm/runtime/data.js.map +1 -1
  171. package/esm/runtime/element.d.ts +6 -10
  172. package/esm/runtime/element.js +65 -46
  173. package/esm/runtime/element.js.map +1 -1
  174. package/esm/runtime/graph.d.ts +532 -45
  175. package/esm/runtime/graph.js +418 -40
  176. package/esm/runtime/graph.js.map +1 -1
  177. package/esm/runtime/layout.js +2 -2
  178. package/esm/runtime/layout.js.map +1 -1
  179. package/esm/runtime/types.d.ts +3 -3
  180. package/esm/runtime/viewport.d.ts +3 -4
  181. package/esm/runtime/viewport.js +2 -2
  182. package/esm/runtime/viewport.js.map +1 -1
  183. package/esm/spec/canvas.d.ts +6 -2
  184. package/esm/spec/data.d.ts +74 -1
  185. package/esm/spec/element/combo.d.ts +17 -6
  186. package/esm/spec/element/edge.d.ts +14 -2
  187. package/esm/spec/element/node.d.ts +19 -3
  188. package/esm/spec/{spec.d.ts → graph.d.ts} +12 -4
  189. package/esm/spec/graph.js +2 -0
  190. package/esm/spec/graph.js.map +1 -0
  191. package/esm/spec/index.d.ts +1 -1
  192. package/esm/spec/theme.d.ts +1 -4
  193. package/esm/spec/viewport.d.ts +1 -1
  194. package/esm/themes/base.d.ts +1 -0
  195. package/esm/themes/base.js +11 -9
  196. package/esm/themes/base.js.map +1 -1
  197. package/esm/themes/types.d.ts +0 -1
  198. package/esm/transforms/process-parallel-edges.d.ts +2 -3
  199. package/esm/transforms/process-parallel-edges.js +2 -4
  200. package/esm/transforms/process-parallel-edges.js.map +1 -1
  201. package/esm/transforms/types.d.ts +1 -1
  202. package/esm/transforms/update-related-edge.js.map +1 -1
  203. package/esm/types/callable.d.ts +2 -2
  204. package/esm/types/data.d.ts +3 -3
  205. package/esm/types/id.d.ts +1 -0
  206. package/esm/types/id.js +2 -0
  207. package/esm/types/id.js.map +1 -0
  208. package/esm/types/index.d.ts +1 -0
  209. package/esm/types/style.d.ts +1 -3
  210. package/esm/types/viewport.d.ts +4 -4
  211. package/esm/utils/animation.d.ts +6 -6
  212. package/esm/utils/animation.js +3 -3
  213. package/esm/utils/animation.js.map +1 -1
  214. package/esm/utils/behaviors/brush.d.ts +1 -2
  215. package/esm/utils/behaviors/brush.js.map +1 -1
  216. package/esm/utils/behaviors/lasso.d.ts +1 -2
  217. package/esm/utils/behaviors/lasso.js.map +1 -1
  218. package/esm/utils/behaviors/utils.d.ts +1 -1
  219. package/esm/utils/change.js +8 -1
  220. package/esm/utils/change.js.map +1 -1
  221. package/esm/utils/data.d.ts +2 -2
  222. package/esm/utils/data.js +2 -2
  223. package/esm/utils/edge.d.ts +1 -2
  224. package/esm/utils/edge.js.map +1 -1
  225. package/esm/utils/element.d.ts +1 -1
  226. package/esm/utils/element.js +2 -2
  227. package/esm/utils/event/events.d.ts +1 -1
  228. package/esm/utils/event/events.js.map +1 -1
  229. package/esm/utils/event/index.d.ts +1 -1
  230. package/esm/utils/event/index.js +1 -1
  231. package/esm/utils/id.d.ts +2 -3
  232. package/esm/utils/id.js.map +1 -1
  233. package/esm/utils/palette.d.ts +2 -3
  234. package/esm/utils/palette.js +1 -1
  235. package/esm/utils/palette.js.map +1 -1
  236. package/esm/utils/relation.d.ts +3 -4
  237. package/esm/utils/relation.js +2 -2
  238. package/esm/utils/relation.js.map +1 -1
  239. package/esm/utils/style.js +3 -3
  240. package/esm/utils/style.js.map +1 -1
  241. package/esm/utils/visibility.d.ts +1 -1
  242. package/esm/utils/visibility.js +1 -1
  243. package/lib/animations/types.d.ts +3 -4
  244. package/lib/behaviors/base-behavior.d.ts +2 -1
  245. package/lib/behaviors/brush-select.d.ts +33 -16
  246. package/lib/behaviors/brush-select.js +7 -2
  247. package/lib/behaviors/brush-select.js.map +1 -1
  248. package/lib/behaviors/click-element.d.ts +28 -5
  249. package/lib/behaviors/click-element.js +11 -0
  250. package/lib/behaviors/click-element.js.map +1 -1
  251. package/lib/behaviors/collapse-expand.d.ts +3 -2
  252. package/lib/behaviors/collapse-expand.js +2 -2
  253. package/lib/behaviors/collapse-expand.js.map +1 -1
  254. package/lib/behaviors/create-edge.d.ts +1 -2
  255. package/lib/behaviors/create-edge.js.map +1 -1
  256. package/lib/behaviors/drag-canvas.d.ts +7 -0
  257. package/lib/behaviors/drag-canvas.js.map +1 -1
  258. package/lib/behaviors/drag-element-force.d.ts +1 -2
  259. package/lib/behaviors/drag-element-force.js.map +1 -1
  260. package/lib/behaviors/drag-element.d.ts +4 -5
  261. package/lib/behaviors/drag-element.js.map +1 -1
  262. package/lib/behaviors/focus-element.js.map +1 -1
  263. package/lib/behaviors/hover-element.js.map +1 -1
  264. package/lib/behaviors/index.d.ts +2 -0
  265. package/lib/behaviors/index.js +3 -1
  266. package/lib/behaviors/index.js.map +1 -1
  267. package/lib/behaviors/lasso-select.d.ts +4 -4
  268. package/lib/behaviors/lasso-select.js +1 -1
  269. package/lib/behaviors/lasso-select.js.map +1 -1
  270. package/lib/behaviors/scroll-canvas.d.ts +64 -0
  271. package/lib/behaviors/scroll-canvas.js +84 -0
  272. package/lib/behaviors/scroll-canvas.js.map +1 -0
  273. package/lib/behaviors/types.d.ts +2 -1
  274. package/lib/behaviors/zoom-canvas.d.ts +1 -1
  275. package/lib/constants/events/animation.d.ts +1 -4
  276. package/lib/constants/events/animation.js +0 -4
  277. package/lib/constants/events/animation.js.map +1 -1
  278. package/lib/constants/events/graph.d.ts +5 -1
  279. package/lib/constants/events/graph.js +4 -0
  280. package/lib/constants/events/graph.js.map +1 -1
  281. package/lib/elements/combos/base-combo.d.ts +1 -1
  282. package/lib/elements/edges/base-edge.d.ts +0 -5
  283. package/lib/elements/edges/base-edge.js +1 -2
  284. package/lib/elements/edges/base-edge.js.map +1 -1
  285. package/lib/elements/nodes/base-node.d.ts +3 -10
  286. package/lib/elements/nodes/base-node.js +2 -2
  287. package/lib/elements/nodes/base-node.js.map +1 -1
  288. package/lib/elements/nodes/donut.d.ts +45 -0
  289. package/lib/elements/nodes/donut.js +85 -0
  290. package/lib/elements/nodes/donut.js.map +1 -0
  291. package/lib/elements/nodes/html.d.ts +27 -0
  292. package/lib/elements/nodes/html.js +213 -0
  293. package/lib/elements/nodes/html.js.map +1 -0
  294. package/lib/elements/nodes/index.d.ts +4 -0
  295. package/lib/elements/nodes/index.js +5 -1
  296. package/lib/elements/nodes/index.js.map +1 -1
  297. package/lib/elements/shapes/badge.d.ts +1 -1
  298. package/lib/{plugins/hull/shape.d.ts → elements/shapes/contour.d.ts} +17 -17
  299. package/lib/{plugins/hull/shape.js → elements/shapes/contour.js} +15 -14
  300. package/lib/elements/shapes/contour.js.map +1 -0
  301. package/lib/elements/shapes/index.d.ts +2 -0
  302. package/lib/elements/shapes/index.js +3 -1
  303. package/lib/elements/shapes/index.js.map +1 -1
  304. package/lib/exports.d.ts +15 -22
  305. package/lib/exports.js +50 -17
  306. package/lib/exports.js.map +1 -1
  307. package/lib/plugins/bubble-sets.d.ts +45 -0
  308. package/lib/plugins/bubble-sets.js +216 -0
  309. package/lib/plugins/bubble-sets.js.map +1 -0
  310. package/lib/plugins/camera-setting.d.ts +4 -2
  311. package/lib/plugins/camera-setting.js.map +1 -1
  312. package/lib/plugins/contextmenu.d.ts +1 -0
  313. package/lib/plugins/contextmenu.js +1 -0
  314. package/lib/plugins/contextmenu.js.map +1 -1
  315. package/lib/plugins/grid-line.d.ts +51 -8
  316. package/lib/plugins/grid-line.js.map +1 -1
  317. package/lib/plugins/history/utils.js +6 -2
  318. package/lib/plugins/history/utils.js.map +1 -1
  319. package/lib/plugins/hull/index.d.ts +44 -13
  320. package/lib/plugins/hull/index.js +46 -16
  321. package/lib/plugins/hull/index.js.map +1 -1
  322. package/lib/plugins/index.d.ts +4 -0
  323. package/lib/plugins/index.js +5 -1
  324. package/lib/plugins/index.js.map +1 -1
  325. package/lib/plugins/legend.js +4 -2
  326. package/lib/plugins/legend.js.map +1 -1
  327. package/lib/plugins/timebar.d.ts +225 -0
  328. package/lib/plugins/timebar.js +257 -0
  329. package/lib/plugins/timebar.js.map +1 -0
  330. package/lib/plugins/tooltip.d.ts +2 -2
  331. package/lib/registry/build-in.js +12 -7
  332. package/lib/registry/build-in.js.map +1 -1
  333. package/lib/registry/index.d.ts +1 -1
  334. package/lib/registry/index.js +1 -1
  335. package/lib/runtime/canvas.js +7 -4
  336. package/lib/runtime/canvas.js.map +1 -1
  337. package/lib/runtime/data.d.ts +13 -7
  338. package/lib/runtime/data.js +20 -3
  339. package/lib/runtime/data.js.map +1 -1
  340. package/lib/runtime/element.d.ts +6 -10
  341. package/lib/runtime/element.js +64 -45
  342. package/lib/runtime/element.js.map +1 -1
  343. package/lib/runtime/graph.d.ts +532 -45
  344. package/lib/runtime/graph.js +417 -39
  345. package/lib/runtime/graph.js.map +1 -1
  346. package/lib/runtime/layout.js +2 -2
  347. package/lib/runtime/layout.js.map +1 -1
  348. package/lib/runtime/types.d.ts +3 -3
  349. package/lib/runtime/viewport.d.ts +3 -4
  350. package/lib/runtime/viewport.js +2 -2
  351. package/lib/runtime/viewport.js.map +1 -1
  352. package/lib/spec/canvas.d.ts +6 -2
  353. package/lib/spec/data.d.ts +74 -1
  354. package/lib/spec/element/combo.d.ts +17 -6
  355. package/lib/spec/element/edge.d.ts +14 -2
  356. package/lib/spec/element/node.d.ts +19 -3
  357. package/{dist/lib/spec/spec.d.ts → lib/spec/graph.d.ts} +12 -4
  358. package/lib/spec/{spec.js → graph.js} +1 -1
  359. package/lib/spec/graph.js.map +1 -0
  360. package/lib/spec/index.d.ts +1 -1
  361. package/lib/spec/theme.d.ts +1 -4
  362. package/lib/spec/viewport.d.ts +1 -1
  363. package/lib/themes/base.d.ts +1 -0
  364. package/lib/themes/base.js +11 -9
  365. package/lib/themes/base.js.map +1 -1
  366. package/lib/themes/types.d.ts +0 -1
  367. package/lib/transforms/process-parallel-edges.d.ts +2 -3
  368. package/lib/transforms/process-parallel-edges.js +2 -4
  369. package/lib/transforms/process-parallel-edges.js.map +1 -1
  370. package/lib/transforms/types.d.ts +1 -1
  371. package/lib/transforms/update-related-edge.js.map +1 -1
  372. package/lib/types/callable.d.ts +2 -2
  373. package/lib/types/data.d.ts +3 -3
  374. package/lib/types/id.d.ts +1 -0
  375. package/lib/{spec/element/base.js → types/id.js} +1 -1
  376. package/lib/types/id.js.map +1 -0
  377. package/lib/types/index.d.ts +1 -0
  378. package/lib/types/style.d.ts +1 -3
  379. package/lib/types/viewport.d.ts +4 -4
  380. package/lib/utils/animation.d.ts +6 -6
  381. package/lib/utils/animation.js +3 -3
  382. package/lib/utils/animation.js.map +1 -1
  383. package/lib/utils/behaviors/brush.d.ts +1 -2
  384. package/lib/utils/behaviors/brush.js.map +1 -1
  385. package/lib/utils/behaviors/lasso.d.ts +1 -2
  386. package/lib/utils/behaviors/lasso.js.map +1 -1
  387. package/lib/utils/behaviors/utils.d.ts +1 -1
  388. package/lib/utils/change.js +8 -1
  389. package/lib/utils/change.js.map +1 -1
  390. package/lib/utils/data.d.ts +2 -2
  391. package/lib/utils/data.js +2 -2
  392. package/lib/utils/edge.d.ts +1 -2
  393. package/lib/utils/edge.js.map +1 -1
  394. package/lib/utils/element.d.ts +1 -1
  395. package/lib/utils/element.js +2 -2
  396. package/lib/utils/event/events.d.ts +1 -1
  397. package/lib/utils/event/events.js.map +1 -1
  398. package/lib/utils/event/index.d.ts +1 -1
  399. package/lib/utils/event/index.js +1 -1
  400. package/lib/utils/id.d.ts +2 -3
  401. package/lib/utils/id.js.map +1 -1
  402. package/lib/utils/palette.d.ts +2 -3
  403. package/lib/utils/palette.js +1 -1
  404. package/lib/utils/palette.js.map +1 -1
  405. package/lib/utils/relation.d.ts +3 -4
  406. package/lib/utils/relation.js +2 -2
  407. package/lib/utils/relation.js.map +1 -1
  408. package/lib/utils/style.js +3 -3
  409. package/lib/utils/style.js.map +1 -1
  410. package/lib/utils/visibility.d.ts +1 -1
  411. package/lib/utils/visibility.js +1 -1
  412. package/package.json +2 -1
  413. package/src/animations/types.ts +3 -4
  414. package/src/behaviors/base-behavior.ts +1 -1
  415. package/src/behaviors/brush-select.ts +34 -16
  416. package/src/behaviors/click-element.ts +29 -7
  417. package/src/behaviors/collapse-expand.ts +5 -4
  418. package/src/behaviors/create-edge.ts +1 -2
  419. package/src/behaviors/drag-canvas.ts +7 -0
  420. package/src/behaviors/drag-element-force.ts +1 -2
  421. package/src/behaviors/drag-element.ts +3 -4
  422. package/src/behaviors/focus-element.ts +1 -2
  423. package/src/behaviors/hover-element.ts +1 -2
  424. package/src/behaviors/index.ts +2 -0
  425. package/src/behaviors/lasso-select.ts +3 -4
  426. package/src/behaviors/scroll-canvas.ts +143 -0
  427. package/src/behaviors/types.ts +2 -1
  428. package/src/behaviors/zoom-canvas.ts +1 -1
  429. package/src/constants/events/animation.ts +0 -4
  430. package/src/constants/events/graph.ts +4 -0
  431. package/src/elements/combos/base-combo.ts +1 -1
  432. package/src/elements/edges/base-edge.ts +1 -7
  433. package/src/elements/nodes/base-node.ts +6 -15
  434. package/src/elements/nodes/donut.ts +137 -0
  435. package/src/elements/nodes/html.ts +230 -0
  436. package/src/elements/nodes/index.ts +4 -0
  437. package/src/{plugins/hull/shape.ts → elements/shapes/contour.ts} +27 -34
  438. package/src/elements/shapes/index.ts +2 -0
  439. package/src/exports.ts +124 -25
  440. package/src/plugins/bubble-sets.ts +268 -0
  441. package/src/plugins/camera-setting.ts +4 -2
  442. package/src/plugins/contextmenu.ts +1 -0
  443. package/src/plugins/grid-line.ts +51 -8
  444. package/src/plugins/history/utils.ts +6 -2
  445. package/src/plugins/hull/index.ts +58 -22
  446. package/src/plugins/index.ts +4 -0
  447. package/src/plugins/legend.ts +6 -4
  448. package/src/plugins/timebar.ts +450 -0
  449. package/src/plugins/tooltip.ts +2 -2
  450. package/src/registry/build-in.ts +27 -8
  451. package/src/registry/index.ts +1 -1
  452. package/src/runtime/canvas.ts +7 -4
  453. package/src/runtime/data.ts +23 -4
  454. package/src/runtime/element.ts +67 -40
  455. package/src/runtime/graph.ts +554 -56
  456. package/src/runtime/layout.ts +4 -4
  457. package/src/runtime/types.ts +3 -3
  458. package/src/runtime/viewport.ts +3 -4
  459. package/src/spec/canvas.ts +6 -2
  460. package/src/spec/data.ts +74 -1
  461. package/src/spec/element/combo.ts +17 -6
  462. package/src/spec/element/edge.ts +14 -2
  463. package/src/spec/element/node.ts +19 -3
  464. package/src/spec/{spec.ts → graph.ts} +12 -4
  465. package/src/spec/index.ts +1 -1
  466. package/src/spec/theme.ts +1 -5
  467. package/src/spec/viewport.ts +1 -1
  468. package/src/themes/base.ts +12 -9
  469. package/src/themes/types.ts +0 -2
  470. package/src/transforms/arrange-draw-order.ts +1 -1
  471. package/src/transforms/process-parallel-edges.ts +5 -7
  472. package/src/transforms/types.ts +1 -1
  473. package/src/transforms/update-related-edge.ts +1 -2
  474. package/src/types/callable.ts +2 -2
  475. package/src/types/data.ts +3 -3
  476. package/src/types/id.ts +1 -0
  477. package/src/types/index.ts +1 -0
  478. package/src/types/style.ts +1 -3
  479. package/src/types/viewport.ts +4 -4
  480. package/src/utils/animation.ts +6 -6
  481. package/src/utils/behaviors/brush.ts +1 -2
  482. package/src/utils/behaviors/lasso.ts +1 -2
  483. package/src/utils/behaviors/utils.ts +1 -1
  484. package/src/utils/change.ts +7 -3
  485. package/src/utils/data.ts +2 -2
  486. package/src/utils/edge.ts +1 -1
  487. package/src/utils/element.ts +2 -2
  488. package/src/utils/event/events.ts +3 -1
  489. package/src/utils/event/index.ts +1 -1
  490. package/src/utils/id.ts +1 -2
  491. package/src/utils/palette.ts +2 -2
  492. package/src/utils/relation.ts +3 -4
  493. package/src/utils/style.ts +3 -3
  494. package/src/utils/visibility.ts +1 -1
  495. package/dist/lib/runtime/index.d.ts +0 -6
  496. package/dist/lib/spec/element/base.d.ts +0 -6
  497. package/esm/plugins/hull/shape.js.map +0 -1
  498. package/esm/runtime/index.d.ts +0 -6
  499. package/esm/runtime/index.js +0 -7
  500. package/esm/runtime/index.js.map +0 -1
  501. package/esm/spec/element/base.d.ts +0 -6
  502. package/esm/spec/element/base.js +0 -2
  503. package/esm/spec/element/base.js.map +0 -1
  504. package/esm/spec/spec.js +0 -2
  505. package/esm/spec/spec.js.map +0 -1
  506. package/lib/plugins/hull/shape.js.map +0 -1
  507. package/lib/runtime/index.d.ts +0 -6
  508. package/lib/runtime/index.js +0 -8
  509. package/lib/runtime/index.js.map +0 -1
  510. package/lib/spec/element/base.d.ts +0 -6
  511. package/lib/spec/element/base.js.map +0 -1
  512. package/lib/spec/spec.js.map +0 -1
  513. package/src/runtime/index.ts +0 -7
  514. package/src/spec/element/base.ts +0 -6
@@ -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';
@@ -7,7 +7,7 @@ type BadgeOptions = DisplayObjectConfig<BadgeStyleProps>;
7
7
  export declare class Badge extends BaseShape<BadgeStyleProps> {
8
8
  static defaultStyleProps: Partial<BadgeStyleProps>;
9
9
  constructor(options: BadgeOptions);
10
- protected getBadgeStyle(attributes: ParsedBadgeStyleProps): Omit<Required<LabelStyleProps>, "transform" | "x" | "y" | "z" | "zIndex" | "className" | "transformOrigin" | "context">;
10
+ protected getBadgeStyle(attributes: ParsedBadgeStyleProps): Omit<Required<LabelStyleProps>, "transform" | "x" | "y" | "z" | "transformOrigin" | "zIndex" | "context" | "className">;
11
11
  render(attributes?: ParsedBadgeStyleProps, container?: Group): void;
12
12
  connectedCallback(): void;
13
13
  }
@@ -1,8 +1,8 @@
1
1
  import type { DisplayObjectConfig, Group, PathStyleProps } from '@antv/g';
2
- import type { LabelStyleProps } from '../../elements/shapes';
3
- import { BaseShape } from '../../elements/shapes';
4
2
  import type { CardinalPlacement, PrefixObject } from '../../types';
5
- type HullLabelStyleProps = LabelStyleProps & {
3
+ import type { LabelStyleProps } from '../shapes';
4
+ import { BaseShape } from './base-shape';
5
+ interface ContourLabelStyleProps extends LabelStyleProps {
6
6
  /**
7
7
  * <zh/> 标签位置,可选值为 'top'、'right'、'bottom'、'left'、'center';默认为 'bottom'
8
8
  * <en/> Label position, optional values are 'top', 'right', 'bottom', 'left', 'center'; default is 'bottom'
@@ -12,10 +12,10 @@ type HullLabelStyleProps = LabelStyleProps & {
12
12
  * <zh/> 标签是否贴合轮廓,默认为 true
13
13
  * <en/> Whether the label is close to the contour, default is true
14
14
  */
15
- closeToHull?: boolean;
15
+ closeToPath?: boolean;
16
16
  /**
17
- * <zh/> 标签是否跟随轮廓旋转,默认为 true,仅在 closeToHull 为 true 时生效
18
- * <en/> Whether the label rotates with the contour, default is true. Only effective when closeToHull is true
17
+ * <zh/> 标签是否跟随轮廓旋转,默认为 true,仅在 closeToPath 为 true 时生效
18
+ * <en/> Whether the label rotates with the contour, default is true. Only effective when closeToPath is true
19
19
  */
20
20
  autoRotate?: boolean;
21
21
  /**
@@ -33,17 +33,17 @@ type HullLabelStyleProps = LabelStyleProps & {
33
33
  * <en/> The maximum width of the text, which will be automatically ellipsis if exceeded
34
34
  */
35
35
  maxWidth?: number;
36
- };
37
- export type HullStyleProps = PathStyleProps & {
36
+ }
37
+ export type ContourStyleProps = PathStyleProps & {
38
38
  label?: boolean;
39
- } & PrefixObject<HullLabelStyleProps, 'label'>;
40
- type ParsedHullStyleProps = Required<HullStyleProps>;
41
- type HullOptions = DisplayObjectConfig<HullStyleProps>;
42
- export declare class Hull extends BaseShape<HullStyleProps> {
43
- static defaultStyleProps: Partial<HullStyleProps>;
44
- constructor(options: HullOptions);
45
- protected getLabelStyle(attributes: ParsedHullStyleProps): LabelStyleProps | false;
46
- protected getContourStyle(attributes: ParsedHullStyleProps): Omit<Required<HullStyleProps>, "transform" | "x" | "y" | "z" | "zIndex" | "className" | "transformOrigin" | "context">;
47
- render(attributes: ParsedHullStyleProps, container: Group): void;
39
+ } & PrefixObject<ContourLabelStyleProps, 'label'>;
40
+ type ParsedContourStyleProps = Required<ContourStyleProps>;
41
+ type ContourOptions = DisplayObjectConfig<ContourStyleProps>;
42
+ export declare class Contour extends BaseShape<ContourStyleProps> {
43
+ static defaultStyleProps: Partial<ContourStyleProps>;
44
+ constructor(options: ContourOptions);
45
+ protected getLabelStyle(attributes: ParsedContourStyleProps): LabelStyleProps | false;
46
+ protected getKeyStyle(attributes: ParsedContourStyleProps): PathStyleProps;
47
+ render(attributes: ParsedContourStyleProps, container: Group): void;
48
48
  }
49
49
  export {};
@@ -5,9 +5,11 @@
5
5
  */
6
6
  export { Badge } from './badge';
7
7
  export { BaseShape } from './base-shape';
8
+ export { Contour } from './contour';
8
9
  export { Icon } from './icon';
9
10
  export { Label } from './label';
10
11
  export type { BadgeStyleProps } from './badge';
11
12
  export type { BaseShapeStyleProps } from './base-shape';
13
+ export type { ContourStyleProps } from './contour';
12
14
  export type { IconStyleProps } from './icon';
13
15
  export type { LabelStyleProps } from './label';
@@ -1,36 +1,29 @@
1
- import { idOf } from './utils/id';
2
- import { omitStyleProps, subStyleProps } from './utils/prefix';
3
- import { treeToGraphData } from './utils/tree';
4
- export { BaseBehavior, DragCanvas, ZoomCanvas } from './behaviors';
1
+ export { BaseBehavior, BrushSelect, ClickElement, CollapseExpand, CreateEdge, DragCanvas, DragElement, DragElementForce, FocusElement, HoverElement, LassoSelect, ZoomCanvas, } from './behaviors';
5
2
  export { CanvasEvent, ComboEvent, CommonEvent, ContainerEvent, EdgeEvent, ExtensionCategory, GraphEvent, NodeEvent, } from './constants';
6
3
  export { BaseCombo, CircleCombo, RectCombo } from './elements/combos';
7
4
  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';
5
+ export { BaseNode, Circle, Diamond, Donut, Ellipse, HTML, Hexagon, Image, Rect, Star, Triangle, } from './elements/nodes';
9
6
  export { BaseShape } from './elements/shapes';
10
- export { BasePlugin, CameraSetting, History } from './plugins';
7
+ export { AntVDagreLayout, CircularLayout, ComboCombinedLayout, ConcentricLayout, D3Force3DLayout, D3ForceLayout, DagreLayout, ForceAtlas2Layout, ForceLayout, FruchtermanLayout, GridLayout, MDSLayout, RadialLayout, RandomLayout, compactBox, dendrogram, indented, mindmap, } from './layouts';
8
+ export { BasePlugin, BubbleSets, CameraSetting, Contextmenu, GridLine, History, Hull, Legend, Timebar, Toolbar, Tooltip, Watermark, } from './plugins';
11
9
  export { getExtension, getExtensions, register } from './registry';
12
10
  export { Graph } from './runtime/graph';
13
11
  export { BaseTransform } from './transforms';
12
+ export { idOf } from './utils/id';
13
+ export { omitStyleProps, subStyleProps } from './utils/prefix';
14
14
  export { Shortcut } from './utils/shortcut';
15
- export type { BaseBehaviorOptions, DragCanvasOptions, ZoomCanvasOptions } from './behaviors';
15
+ export { parseSize } from './utils/size';
16
+ export { treeToGraphData } from './utils/tree';
17
+ export type { BaseStyleProps } from '@antv/g';
18
+ export type { AntVDagreLayoutOptions, CircularLayoutOptions, ComboCombinedLayoutOptions, ConcentricLayoutOptions, D3Force3DLayoutOptions, D3ForceLayoutOptions, DagreLayoutOptions, ForceAtlas2LayoutOptions, ForceLayoutOptions, FruchtermanLayoutOptions, GridLayoutOptions, MDSLayoutOptions, RadialLayoutOptions, RandomLayoutOptions, } from '@antv/layout';
19
+ export type { BaseBehaviorOptions, BrushSelectOptions, ClickElementOptions, CollapseExpandOptions, CreateEdgeOptions, DragCanvasOptions, DragElementForceOptions, DragElementOptions, FocusElementOptions, HoverElementOptions, LassoSelectOptions, ZoomCanvasOptions, } from './behaviors';
16
20
  export type { BaseComboStyleProps, CircleComboStyleProps, RectComboStyleProps } from './elements/combos';
17
21
  export type { BaseEdgeStyleProps, CubicHorizontalStyleProps, CubicStyleProps, CubicVerticalStyleProps, LineStyleProps, PolylineStyleProps, QuadraticStyleProps, } from './elements/edges';
18
- export type { BaseNodeStyleProps, CircleStyleProps, DiamondStyleProps, EllipseStyleProps, HexagonStyleProps, ImageStyleProps, RectStyleProps, StarStyleProps, TriangleStyleProps, } from './elements/nodes';
22
+ export type { BaseNodeStyleProps, CircleStyleProps, DiamondStyleProps, EllipseStyleProps, HTMLStyleProps, HexagonStyleProps, ImageStyleProps, RectStyleProps, StarStyleProps, TriangleStyleProps, } from './elements/nodes';
19
23
  export type { BaseShapeStyleProps } from './elements/shapes';
20
- export type { BasePluginOptions, CameraSettingOptions, Hull } from './plugins';
24
+ export type { BasePluginOptions, BubbleSetsOptions, CameraSettingOptions, ContextmenuOptions, GridLineOptions, HistoryOptions, HullOptions, LegendOptions, TimebarOptions, ToolbarOptions, TooltipOptions, WatermarkOptions, } from './plugins';
21
25
  export type { RuntimeContext } from './runtime/types';
22
- export type { BehaviorOptions, CanvasOptions, ComboData, ComboOptions, EdgeData, EdgeOptions, G6Spec, GraphData, LayoutOptions, NodeData, NodeOptions, PluginOptions, ThemeOptions, ViewportOptions, } from './spec';
26
+ export type { BehaviorOptions, CanvasOptions, ComboData, ComboOptions, EdgeData, EdgeOptions, GraphData, GraphOptions, LayoutOptions, NodeData, NodeOptions, PluginOptions, ThemeOptions, ViewportOptions, } from './spec';
23
27
  export type { BaseTransformOptions } from './transforms';
24
- export type { IAnimateEvent, IDragEvent, IElementLifeCycleEvent, IEvent, IGraphLifeCycleEvent, IKeyboardEvent, IPointerEvent, IViewportEvent, IWheelEvent, Point, Vector2, Vector3, ViewportAnimationEffectTiming, } from './types';
28
+ export type { CardinalPlacement, Combo, CornerPlacement, DirectionalPlacement, Edge, Element, ElementType, IAnimateEvent, ID, IDragEvent, IElementLifeCycleEvent, IEvent, IGraphLifeCycleEvent, IKeyboardEvent, IPointerEvent, IViewportEvent, IWheelEvent, Node, Placement, Point, RelativePlacement, State, Vector2, Vector3, ViewportAnimationEffectTiming, } from './types';
25
29
  export type { ShortcutKey } from './utils/shortcut';
26
- declare const Utils: {
27
- idOf: typeof idOf;
28
- treeToGraphData: typeof treeToGraphData;
29
- subStyleProps: typeof subStyleProps;
30
- omitStyleProps: typeof omitStyleProps;
31
- };
32
- declare const Theme: {
33
- dark: import("./themes/types").Theme;
34
- light: import("./themes/types").Theme;
35
- };
36
- export { Theme, Utils };
@@ -0,0 +1,45 @@
1
+ import type { IBubbleSetOptions } from 'bubblesets-js';
2
+ import type { ContourStyleProps } from '../elements/shapes';
3
+ import type { RuntimeContext } from '../runtime/types';
4
+ import type { CallableValue, ID } from '../types';
5
+ import type { BasePluginOptions } from './base-plugin';
6
+ import { BasePlugin } from './base-plugin';
7
+ export interface BubbleSetsOptions extends BasePluginOptions, IBubbleSetOptions, ContourStyleProps {
8
+ /**
9
+ * <zh/> 成员元素,包括节点和边
10
+ *
11
+ * <en/> Member elements, including nodes and edges
12
+ */
13
+ members: ID[];
14
+ /**
15
+ * <zh/> 需要避开的元素,在绘制轮廓时不会包含这些元素。目前支持设置节点
16
+ *
17
+ * <en/> Elements to avoid, these elements will not be included when drawing the contour, currently only nodes are supported
18
+ */
19
+ avoidMembers?: ID[];
20
+ }
21
+ export declare class BubbleSets extends BasePlugin<BubbleSetsOptions> {
22
+ private shape;
23
+ private bubbleSets;
24
+ private path;
25
+ private members;
26
+ private avoidMembers;
27
+ private bubbleSetOptions;
28
+ static defaultOptions: Partial<BubbleSetsOptions>;
29
+ constructor(context: RuntimeContext, options: BubbleSetsOptions);
30
+ private bindEvents;
31
+ private init;
32
+ private parseOptions;
33
+ private drawBubbleSets;
34
+ private updateBubbleSetsPath;
35
+ private getPath;
36
+ addMember(members: ID | ID[]): void;
37
+ removeMember(members: ID | ID[]): void;
38
+ updateMember(members: CallableValue<ID[]>): void;
39
+ getMember(): string[];
40
+ addAvoidMember(avoidMembers: ID | ID[]): void;
41
+ removeAvoidMember(avoidMembers: ID | ID[]): void;
42
+ updateAvoidMember(avoidMembers: ID | ID[]): void;
43
+ getAvoidMember(): string[];
44
+ destroy(): void;
45
+ }
@@ -39,9 +39,11 @@ export interface CameraSettingOptions extends BasePluginOptions {
39
39
  */
40
40
  fov?: number;
41
41
  /**
42
- * <zh/> 相机视口宽高比,仅在透视相机下有效。设置为 'auto' 时,会自动根据画布宽高比设置
42
+ * <zh/> 相机视口宽高比,仅在透视相机下有效
43
+ * - 设置为 'auto' 时,会自动根据画布宽高比设置
43
44
  *
44
- * <en/> Camera viewport aspect ratio, only valid in perspective camera. When set to 'auto', it will be automatically set according to the canvas aspect ratio
45
+ * <en/> Camera viewport aspect ratio, only valid in perspective camera.
46
+ * - When set to 'auto', it will be automatically set according to the canvas aspect ratio
45
47
  */
46
48
  aspect?: number | 'auto';
47
49
  /**
@@ -52,6 +52,7 @@ export type ContextmenuOptions = BasePluginOptions & {
52
52
  };
53
53
  /**
54
54
  * <zh/> 支持处理事件,并显示右键菜单,在菜单点击之后,可以触发相应的事件。
55
+ *
55
56
  * <en/> Support processing events and displaying right-click menus.
56
57
  * After clicking the menu, you can trigger the corresponding event.
57
58
  */
@@ -1,19 +1,62 @@
1
- import { BaseStyleProps } from '@antv/g';
2
1
  import type { RuntimeContext } from '../runtime/types';
3
2
  import type { BasePluginOptions } from './base-plugin';
4
3
  import { BasePlugin } from './base-plugin';
5
- export interface GridLineOptions extends BasePluginOptions, Pick<BaseStyleProps, 'stroke' | 'lineWidth'> {
6
- /** <zh/> 单个网格的大小 | <en/> The size of a single grid */
4
+ export interface GridLineOptions extends BasePluginOptions {
5
+ /**
6
+ * <zh/> 网格线颜色
7
+ *
8
+ * <en/> Grid line color
9
+ * @defaultValue '#0001'
10
+ */
11
+ stroke?: string;
12
+ /**
13
+ * <zh/> 网格线宽
14
+ *
15
+ * <en/> Grid line width
16
+ * @defaultValue 1
17
+ */
18
+ lineWidth?: number | string;
19
+ /**
20
+ * <zh/> 单个网格的大小
21
+ *
22
+ * <en/> The size of a single grid
23
+ * @defaultValue 20
24
+ */
7
25
  size?: number;
8
- /** <zh/> 是否显示边框 | <en/> Whether to show the border */
26
+ /**
27
+ * <zh/> 是否显示边框
28
+ *
29
+ * <en/> Whether to show the border
30
+ * @defaultValue true
31
+ */
9
32
  border?: boolean;
10
- /** <zh/> 边框线宽 | <en/> Border line width */
33
+ /**
34
+ * <zh/> 边框线宽
35
+ *
36
+ * <en/> Border line width
37
+ * @defaultValue 1
38
+ */
11
39
  borderLineWidth?: number;
12
- /** <zh/> 边框颜色 | <en/> Border color */
40
+ /**
41
+ * <zh/> 边框颜色
42
+ *
43
+ * <en/> Border color
44
+ * @defaultValue '#0001'
45
+ */
13
46
  borderStroke?: string;
14
- /** <zh/> 边框样式 | <en/> Border style */
47
+ /**
48
+ * <zh/> 边框样式
49
+ *
50
+ * <en/> Border style
51
+ * @defaultValue 'solid'
52
+ */
15
53
  borderStyle?: string;
16
- /** <zh/> 是否跟随图移动 | <en/> Whether to follow with the graph */
54
+ /**
55
+ * <zh/> 是否跟随图移动
56
+ *
57
+ * <en/> Whether to follow with the graph
58
+ * @defaultValue false
59
+ */
17
60
  follow?: boolean;
18
61
  }
19
62
  export declare class GridLine extends BasePlugin<GridLineOptions> {
@@ -1,28 +1,34 @@
1
- import type { ID } from '@antv/graphlib';
1
+ import type { ContourStyleProps } from '../../elements/shapes';
2
2
  import type { RuntimeContext } from '../../runtime/types';
3
- import type { CallableValue } from '../../types';
3
+ import type { CallableValue, ID } from '../../types';
4
4
  import type { BasePluginOptions } from '../base-plugin';
5
5
  import { BasePlugin } from '../base-plugin';
6
- import type { HullStyleProps } from './shape';
7
- export interface HullOptions extends BasePluginOptions, HullStyleProps {
6
+ export interface HullOptions extends BasePluginOptions, ContourStyleProps {
8
7
  /**
9
8
  * <zh/> Hull 内的元素
9
+ *
10
10
  * <en/> Elements in Hull
11
11
  */
12
12
  members?: ID[];
13
13
  /**
14
14
  * <zh/> 凹度,数值越大凹度越小;默认为 Infinity 代表为 Convex Hull
15
+ *
15
16
  * <en/> Concavity. Default is Infinity, which means Convex Hull
17
+ * @defaultValue Infinity
16
18
  */
17
19
  concavity?: number;
18
20
  /**
19
21
  * <zh/> 内边距,默认为 10
22
+ *
20
23
  * <en/> Padding, default is 10
24
+ * @defaultValue 10
21
25
  */
22
26
  padding?: number;
23
27
  /**
24
28
  * <zh/> 拐角类型,目前支持 'rounded'、'smooth' 和 'sharp'
29
+ *
25
30
  * <en/> Corner type, currently supports 'rounded', 'smooth' and 'sharp'
31
+ * @defaultValue 'rounded'
26
32
  */
27
33
  corner?: 'rounded' | 'smooth' | 'sharp';
28
34
  }
@@ -38,11 +44,7 @@ export declare class Hull extends BasePlugin<HullOptions> {
38
44
  * <en/> Hull path
39
45
  */
40
46
  private path;
41
- /**
42
- * <zh> 是否初次渲染完成
43
- * <en> Whether the first rendering is completed
44
- */
45
- private firstRender;
47
+ private optionsCache;
46
48
  static defaultOptions: Partial<HullOptions>;
47
49
  constructor(context: RuntimeContext, options: HullOptions);
48
50
  private bindEvents;
@@ -51,9 +53,38 @@ export declare class Hull extends BasePlugin<HullOptions> {
51
53
  private updateHullPath;
52
54
  private getHullPath;
53
55
  private getPadding;
54
- addMembers(members: ID | ID[]): void;
55
- removeMembers(members: ID | ID[]): void;
56
- updateMembers(members: CallableValue<ID[]>): void;
57
- updateOptions(options: CallableValue<HullOptions>): void;
56
+ /**
57
+ * <zh/> 添加 Hull 成员
58
+ *
59
+ * <en/> Add Hull member
60
+ * @param members - <zh/> 元素 Ids | <en/> Element Ids
61
+ */
62
+ addMember(members: ID | ID[]): void;
63
+ /**
64
+ * <zh/> 移除 Hull 成员
65
+ *
66
+ * <en/> Remove Hull member
67
+ * @param members - <zh/> 元素 Ids | <en/> Element Ids
68
+ */
69
+ removeMember(members: ID | ID[]): void;
70
+ /**
71
+ * <zh/> 更新 Hull 成员
72
+ *
73
+ * <en/> Update Hull member
74
+ * @param members - <zh/> 元素 Ids | <en/> Element Ids
75
+ */
76
+ updateMember(members: CallableValue<ID[]>): void;
77
+ /**
78
+ * <zh/> 获取 Hull 成员
79
+ *
80
+ * <en/> Get Hull member
81
+ * @returns <zh/> 元素 Ids | <en/> Element Ids
82
+ */
83
+ getMember(): string[];
84
+ /**
85
+ * <zh/> 销毁 Hull
86
+ *
87
+ * <en/> Destroy Hull
88
+ */
58
89
  destroy(): void;
59
90
  }
@@ -1,20 +1,24 @@
1
1
  export { BasePlugin } from './base-plugin';
2
+ export { BubbleSets } from './bubble-sets';
2
3
  export { CameraSetting } from './camera-setting';
3
4
  export { Contextmenu } from './contextmenu';
4
5
  export { GridLine } from './grid-line';
5
6
  export { History } from './history';
6
7
  export { Hull } from './hull';
7
8
  export { Legend } from './legend';
9
+ export { Timebar } from './timebar';
8
10
  export { Toolbar } from './toolbar';
9
11
  export { Tooltip } from './tooltip';
10
12
  export { Watermark } from './watermark';
11
13
  export type { BasePluginOptions } from './base-plugin';
14
+ export type { BubbleSetsOptions } from './bubble-sets';
12
15
  export type { CameraSettingOptions } from './camera-setting';
13
16
  export type { ContextmenuOptions } from './contextmenu';
14
17
  export type { GridLineOptions } from './grid-line';
15
18
  export type { HistoryOptions } from './history';
16
19
  export type { HullOptions } from './hull';
17
20
  export type { LegendOptions } from './legend';
21
+ export type { TimebarOptions } from './timebar';
18
22
  export type { ToolbarOptions } from './toolbar';
19
23
  export type { TooltipOptions } from './tooltip';
20
24
  export type { WatermarkOptions } from './watermark';
@@ -0,0 +1,225 @@
1
+ import { BasePlugin } from './base-plugin';
2
+ import type { RuntimeContext } from '../runtime/types';
3
+ import type { ElementDatum, ElementType } from '../types';
4
+ import type { BasePluginOptions } from './base-plugin';
5
+ /**
6
+ * <zh/> Timebar 时间条的配置项。
7
+ * <en/> The configuration item of the Timebar.
8
+ */
9
+ export interface TimebarOptions extends BasePluginOptions {
10
+ /**
11
+ * <zh/> 给工具栏的 DOM 追加的类名,便于自定义样式
12
+ *
13
+ * <en/> The class name appended to the menu DOM for custom styles
14
+ * @defaultValue 'g6-timebar'
15
+ */
16
+ className?: string;
17
+ /**
18
+ * <zh/> X 位置
19
+ *
20
+ * <en/> X position
21
+ * @remarks
22
+ * <zh/> 设置后 `position` 会失效
23
+ *
24
+ * <en/> Setting will invalidate `position`
25
+ */
26
+ x?: number;
27
+ /**
28
+ * <zh/> Y 位置
29
+ *
30
+ * <en/> Y position
31
+ * <zh/> 设置后 `position` 会失效
32
+ *
33
+ * <en/> Setting will invalidate `position`
34
+ */
35
+ y?: number;
36
+ /**
37
+ * <zh/> 时间条宽度
38
+ *
39
+ * <en/> Timebar width
40
+ * @defaultValue 450
41
+ */
42
+ width?: number;
43
+ /**
44
+ * <zh/> 时间条高度
45
+ *
46
+ * <en/> Timebar height
47
+ * @defaultValue 60
48
+ */
49
+ height?: number;
50
+ /**
51
+ * <zh/> Timebar 的位置, 当前可配置 'bottom' | 'top'
52
+ *
53
+ * <en/> Timebar location, currently configurable 'bottom' | 'top'
54
+ * @defaultValue 'bottom'
55
+ */
56
+ position?: 'bottom' | 'top';
57
+ /**
58
+ * <zh/> 获取元素时间
59
+ *
60
+ * <en/> Get element time
61
+ */
62
+ getTime?: (datum: ElementDatum) => number;
63
+ /**
64
+ * <zh/> 时间数据
65
+ *
66
+ * <en/> Time data
67
+ * @remarks
68
+ * <zh/> timebarType 为 'chart' 时,需要额外传入 value 字段作为图表数据
69
+ *
70
+ * <en/> When timebarType is 'chart', you need to pass in the value field as chart data
71
+ */
72
+ data: number[] | {
73
+ time: number;
74
+ value: number;
75
+ }[];
76
+ /**
77
+ * <zh/> Timebar 展示类型
78
+ * - time: 显示为时间轴
79
+ * - chart: 显示为趋势图
80
+ *
81
+ * <en/> Timebar Displays the type
82
+ * - time: Display as a timeline
83
+ * - chart: Display as a trend chart
84
+ * @defaultValue 'time'
85
+ */
86
+ timebarType?: 'time' | 'chart';
87
+ /**
88
+ * <zh/> 筛选类型
89
+ *
90
+ * <en/> Filter element types
91
+ */
92
+ elementTypes?: ElementType[];
93
+ /**
94
+ * <zh/> 筛选模式
95
+ * - modify: 通过修改图数据进行筛选
96
+ * - visibility: 通过修改元素可见性进行筛选
97
+ *
98
+ * <en/> Filter mode
99
+ * - modify: Filter by modifying the graph data.
100
+ * - visibility: Filter by modifying element visibility
101
+ * @defaultValue 'modify'
102
+ */
103
+ mode?: 'modify' | 'visibility';
104
+ /**
105
+ * <zh/> 当前时间值
106
+ *
107
+ * <en/> Current time value
108
+ */
109
+ values?: number | [number, number] | Date | [Date, Date];
110
+ /**
111
+ * <zh/> 图表模式下自定义时间格式化
112
+ *
113
+ * <en/> Custom time formatting in chart mode
114
+ */
115
+ labelFormatter?: (time: number | Date) => string;
116
+ /**
117
+ * <zh/> 是否循环播放
118
+ *
119
+ * <en/> Whether to loop
120
+ */
121
+ loop?: boolean;
122
+ /**
123
+ * <zh/> 时间区间变化时执行的回调
124
+ *
125
+ * <en/> Callback executed when the time interval changes
126
+ */
127
+ onChange?: (values: number | [number, number]) => void;
128
+ /**
129
+ * <zh/> 重置时执行的回调
130
+ *
131
+ * <en/> Callback executed when reset
132
+ */
133
+ onReset?: () => void;
134
+ /**
135
+ * <zh/> 播放速度变化时执行的回调
136
+ *
137
+ * <en/> Callback executed when the playback speed changes
138
+ */
139
+ onSpeedChange?: (speed: number) => void;
140
+ /**
141
+ * <zh/> 开始播放时执行的回调
142
+ *
143
+ * <en/> Callback executed when playback starts
144
+ */
145
+ onPlay?: () => void;
146
+ /**
147
+ * <zh/> 暂停时执行的回调
148
+ *
149
+ * <en/> Callback executed when paused
150
+ */
151
+ onPause?: () => void;
152
+ /**
153
+ * <zh/> 后退时执行的回调
154
+ *
155
+ * <en/> Callback executed when backward
156
+ */
157
+ onBackward?: () => void;
158
+ /**
159
+ * <zh/> 前进时执行的回调
160
+ *
161
+ * <en/> Callback executed when forward
162
+ */
163
+ onForward?: () => void;
164
+ }
165
+ /**
166
+ * <zh/> 时间组件
167
+ *
168
+ * <en/> Timebar
169
+ */
170
+ export declare class Timebar extends BasePlugin<TimebarOptions> {
171
+ static defaultOptions: Partial<TimebarOptions>;
172
+ private timebar?;
173
+ private canvas?;
174
+ private wrapper?;
175
+ private originalData?;
176
+ constructor(context: RuntimeContext, options: TimebarOptions);
177
+ /**
178
+ * <zh/> 播放
179
+ *
180
+ * <en/> Play
181
+ */
182
+ play(): void;
183
+ /**
184
+ * <zh/> 暂停
185
+ *
186
+ * <en/> Pause
187
+ */
188
+ pause(): void;
189
+ /**
190
+ * <zh/> 前进
191
+ *
192
+ * <en/> Forward
193
+ */
194
+ forward(): void;
195
+ /**
196
+ * <zh/> 后退
197
+ *
198
+ * <en/> Backward
199
+ */
200
+ backward(): void;
201
+ /**
202
+ * <zh/> 重置
203
+ *
204
+ * <en/> Reset
205
+ */
206
+ reset(): void;
207
+ update(options: Partial<TimebarOptions>): void;
208
+ /**
209
+ * <zh/> 备份数据
210
+ *
211
+ * <en/> Backup data
212
+ */
213
+ private backup;
214
+ private upsertTimebar;
215
+ private upsertWrapper;
216
+ private upsertCanvas;
217
+ private filterElements;
218
+ private hiddenElements;
219
+ /**
220
+ * <zh/> 销毁时间条
221
+ *
222
+ * <en/> Destroy the timebar
223
+ */
224
+ destroy(): void;
225
+ }
@@ -7,9 +7,9 @@ export interface TooltipOptions extends BasePluginOptions, Pick<TooltipStyleProp
7
7
  /** <zh/> 触发方式 | <en/> Event type that triggers display of tooltip */
8
8
  trigger?: 'hover' | 'click';
9
9
  /** <zh/> 自定义内容 | <en/> Function for getting tooltip content */
10
- getContent?: (evt: IElementEvent, items: ElementDatum[]) => HTMLElement | string;
10
+ getContent?: (event: IElementEvent, items: ElementDatum[]) => HTMLElement | string;
11
11
  /** <zh/> 是否启用 | <en/> Is enable */
12
- enable?: boolean | ((evt: IElementEvent) => boolean);
12
+ enable?: boolean | ((event: IElementEvent) => boolean);
13
13
  }
14
14
  export declare class Tooltip extends BasePlugin<TooltipOptions> {
15
15
  static defaultOptions: Partial<TooltipOptions>;
@@ -17,7 +17,7 @@ import type { ExtensionRegistry } from './types';
17
17
  * <zh/> 要注册的扩展类,在使用时创建实例
18
18
  *
19
19
  * <en/> The extension class to be registered. An instance will be created upon use
20
- * @description
20
+ * @remarks
21
21
  * <zh/> 内置扩展在项目导入时会自动注册。对于非内置扩展,可以通过 `register` 方法手动注册。扩展只需要注册一次,即可在项目的任何位置使用。
22
22
  *
23
23
  * <en/> Built-in extensions are automatically registered when the project is imported. For non-built-in extensions, you can manually register them using the `register` method. Extensions only need to be registered once and can be used anywhere in the project.