@antv/g6 5.0.0-beta.34 → 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 (352) 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 +31 -13
  5. package/dist/lib/behaviors/click-element.d.ts +28 -5
  6. package/dist/lib/behaviors/collapse-expand.d.ts +2 -0
  7. package/dist/lib/behaviors/drag-canvas.d.ts +7 -0
  8. package/dist/lib/behaviors/drag-element.d.ts +2 -2
  9. package/dist/lib/behaviors/index.d.ts +2 -0
  10. package/dist/lib/behaviors/lasso-select.d.ts +2 -1
  11. package/dist/lib/behaviors/scroll-canvas.d.ts +64 -0
  12. package/dist/lib/behaviors/types.d.ts +2 -1
  13. package/dist/lib/behaviors/zoom-canvas.d.ts +1 -1
  14. package/dist/lib/constants/events/graph.d.ts +5 -1
  15. package/dist/lib/elements/combos/base-combo.d.ts +1 -1
  16. package/dist/lib/elements/edges/base-edge.d.ts +0 -5
  17. package/dist/lib/elements/nodes/base-node.d.ts +1 -7
  18. package/dist/lib/elements/shapes/badge.d.ts +1 -1
  19. package/dist/lib/{plugins/hull/shape.d.ts → elements/shapes/contour.d.ts} +17 -17
  20. package/dist/lib/elements/shapes/index.d.ts +2 -0
  21. package/dist/lib/exports.d.ts +12 -20
  22. package/dist/lib/plugins/bubble-sets.d.ts +45 -0
  23. package/dist/lib/plugins/camera-setting.d.ts +4 -2
  24. package/dist/lib/plugins/contextmenu.d.ts +1 -0
  25. package/dist/lib/plugins/grid-line.d.ts +51 -8
  26. package/dist/lib/plugins/hull/index.d.ts +43 -11
  27. package/dist/lib/plugins/index.d.ts +4 -0
  28. package/dist/lib/plugins/timebar.d.ts +225 -0
  29. package/dist/lib/plugins/tooltip.d.ts +2 -2
  30. package/dist/lib/registry/index.d.ts +1 -1
  31. package/dist/lib/runtime/data.d.ts +9 -3
  32. package/dist/lib/runtime/element.d.ts +3 -7
  33. package/dist/lib/runtime/graph.d.ts +530 -42
  34. package/dist/lib/runtime/types.d.ts +3 -3
  35. package/dist/lib/runtime/viewport.d.ts +2 -2
  36. package/dist/lib/spec/canvas.d.ts +6 -2
  37. package/{lib/spec/spec.d.ts → dist/lib/spec/graph.d.ts} +12 -4
  38. package/dist/lib/spec/index.d.ts +1 -1
  39. package/dist/lib/spec/theme.d.ts +1 -4
  40. package/dist/lib/spec/viewport.d.ts +1 -1
  41. package/dist/lib/themes/types.d.ts +0 -1
  42. package/dist/lib/transforms/process-parallel-edges.d.ts +1 -1
  43. package/dist/lib/types/data.d.ts +2 -2
  44. package/dist/lib/types/viewport.d.ts +4 -4
  45. package/dist/lib/utils/animation.d.ts +5 -5
  46. package/dist/lib/utils/data.d.ts +2 -2
  47. package/dist/lib/utils/element.d.ts +1 -1
  48. package/dist/lib/utils/event/events.d.ts +1 -1
  49. package/dist/lib/utils/event/index.d.ts +1 -1
  50. package/dist/lib/utils/palette.d.ts +1 -1
  51. package/dist/lib/utils/relation.d.ts +2 -2
  52. package/dist/lib/utils/visibility.d.ts +1 -1
  53. package/esm/animations/types.d.ts +3 -4
  54. package/esm/behaviors/base-behavior.d.ts +2 -1
  55. package/esm/behaviors/brush-select.d.ts +31 -13
  56. package/esm/behaviors/brush-select.js +7 -2
  57. package/esm/behaviors/brush-select.js.map +1 -1
  58. package/esm/behaviors/click-element.d.ts +28 -5
  59. package/esm/behaviors/click-element.js +11 -0
  60. package/esm/behaviors/click-element.js.map +1 -1
  61. package/esm/behaviors/collapse-expand.d.ts +2 -0
  62. package/esm/behaviors/collapse-expand.js +2 -2
  63. package/esm/behaviors/collapse-expand.js.map +1 -1
  64. package/esm/behaviors/drag-canvas.d.ts +7 -0
  65. package/esm/behaviors/drag-canvas.js.map +1 -1
  66. package/esm/behaviors/drag-element.d.ts +2 -2
  67. package/esm/behaviors/index.d.ts +2 -0
  68. package/esm/behaviors/index.js +1 -0
  69. package/esm/behaviors/index.js.map +1 -1
  70. package/esm/behaviors/lasso-select.d.ts +2 -1
  71. package/esm/behaviors/lasso-select.js +1 -1
  72. package/esm/behaviors/lasso-select.js.map +1 -1
  73. package/esm/behaviors/scroll-canvas.d.ts +64 -0
  74. package/esm/behaviors/scroll-canvas.js +80 -0
  75. package/esm/behaviors/scroll-canvas.js.map +1 -0
  76. package/esm/behaviors/types.d.ts +2 -1
  77. package/esm/behaviors/zoom-canvas.d.ts +1 -1
  78. package/esm/constants/events/graph.d.ts +5 -1
  79. package/esm/constants/events/graph.js +4 -0
  80. package/esm/constants/events/graph.js.map +1 -1
  81. package/esm/elements/combos/base-combo.d.ts +1 -1
  82. package/esm/elements/edges/base-edge.d.ts +0 -5
  83. package/esm/elements/edges/base-edge.js +1 -2
  84. package/esm/elements/edges/base-edge.js.map +1 -1
  85. package/esm/elements/nodes/base-node.d.ts +1 -7
  86. package/esm/elements/nodes/base-node.js +2 -2
  87. package/esm/elements/nodes/base-node.js.map +1 -1
  88. package/esm/elements/shapes/badge.d.ts +1 -1
  89. package/{lib/plugins/hull/shape.d.ts → esm/elements/shapes/contour.d.ts} +17 -17
  90. package/esm/{plugins/hull/shape.js → elements/shapes/contour.js} +12 -11
  91. package/esm/elements/shapes/contour.js.map +1 -0
  92. package/esm/elements/shapes/index.d.ts +2 -0
  93. package/esm/elements/shapes/index.js +1 -0
  94. package/esm/elements/shapes/index.js.map +1 -1
  95. package/esm/exports.d.ts +12 -20
  96. package/esm/exports.js +6 -17
  97. package/esm/exports.js.map +1 -1
  98. package/esm/plugins/bubble-sets.d.ts +45 -0
  99. package/esm/plugins/bubble-sets.js +212 -0
  100. package/esm/plugins/bubble-sets.js.map +1 -0
  101. package/esm/plugins/camera-setting.d.ts +4 -2
  102. package/esm/plugins/camera-setting.js.map +1 -1
  103. package/esm/plugins/contextmenu.d.ts +1 -0
  104. package/esm/plugins/contextmenu.js +1 -0
  105. package/esm/plugins/contextmenu.js.map +1 -1
  106. package/esm/plugins/grid-line.d.ts +51 -8
  107. package/esm/plugins/grid-line.js.map +1 -1
  108. package/esm/plugins/history/utils.js +6 -2
  109. package/esm/plugins/history/utils.js.map +1 -1
  110. package/esm/plugins/hull/index.d.ts +43 -11
  111. package/esm/plugins/hull/index.js +46 -16
  112. package/esm/plugins/hull/index.js.map +1 -1
  113. package/esm/plugins/index.d.ts +4 -0
  114. package/esm/plugins/index.js +2 -0
  115. package/esm/plugins/index.js.map +1 -1
  116. package/esm/plugins/legend.js +2 -1
  117. package/esm/plugins/legend.js.map +1 -1
  118. package/esm/plugins/timebar.d.ts +225 -0
  119. package/esm/plugins/timebar.js +253 -0
  120. package/esm/plugins/timebar.js.map +1 -0
  121. package/esm/plugins/tooltip.d.ts +2 -2
  122. package/esm/registry/build-in.js +10 -7
  123. package/esm/registry/build-in.js.map +1 -1
  124. package/esm/registry/index.d.ts +1 -1
  125. package/esm/registry/index.js +1 -1
  126. package/esm/runtime/canvas.js +2 -2
  127. package/esm/runtime/canvas.js.map +1 -1
  128. package/esm/runtime/data.d.ts +9 -3
  129. package/esm/runtime/data.js +20 -3
  130. package/esm/runtime/data.js.map +1 -1
  131. package/esm/runtime/element.d.ts +3 -7
  132. package/esm/runtime/element.js +6 -4
  133. package/esm/runtime/element.js.map +1 -1
  134. package/esm/runtime/graph.d.ts +530 -42
  135. package/esm/runtime/graph.js +409 -33
  136. package/esm/runtime/graph.js.map +1 -1
  137. package/esm/runtime/types.d.ts +3 -3
  138. package/esm/runtime/viewport.d.ts +2 -2
  139. package/esm/runtime/viewport.js +2 -2
  140. package/esm/spec/canvas.d.ts +6 -2
  141. package/{dist/lib/spec/spec.d.ts → esm/spec/graph.d.ts} +12 -4
  142. package/esm/spec/graph.js +2 -0
  143. package/esm/spec/graph.js.map +1 -0
  144. package/esm/spec/index.d.ts +1 -1
  145. package/esm/spec/theme.d.ts +1 -4
  146. package/esm/spec/viewport.d.ts +1 -1
  147. package/esm/themes/base.js +9 -9
  148. package/esm/themes/base.js.map +1 -1
  149. package/esm/themes/types.d.ts +0 -1
  150. package/esm/transforms/process-parallel-edges.d.ts +1 -1
  151. package/esm/types/data.d.ts +2 -2
  152. package/esm/types/viewport.d.ts +4 -4
  153. package/esm/utils/animation.d.ts +5 -5
  154. package/esm/utils/animation.js +2 -2
  155. package/esm/utils/animation.js.map +1 -1
  156. package/esm/utils/change.js +8 -1
  157. package/esm/utils/change.js.map +1 -1
  158. package/esm/utils/data.d.ts +2 -2
  159. package/esm/utils/data.js +2 -2
  160. package/esm/utils/element.d.ts +1 -1
  161. package/esm/utils/element.js +2 -2
  162. package/esm/utils/event/events.d.ts +1 -1
  163. package/esm/utils/event/events.js.map +1 -1
  164. package/esm/utils/event/index.d.ts +1 -1
  165. package/esm/utils/event/index.js +1 -1
  166. package/esm/utils/palette.d.ts +1 -1
  167. package/esm/utils/palette.js +1 -1
  168. package/esm/utils/relation.d.ts +2 -2
  169. package/esm/utils/relation.js +2 -2
  170. package/esm/utils/visibility.d.ts +1 -1
  171. package/esm/utils/visibility.js +1 -1
  172. package/lib/animations/types.d.ts +3 -4
  173. package/lib/behaviors/base-behavior.d.ts +2 -1
  174. package/lib/behaviors/brush-select.d.ts +31 -13
  175. package/lib/behaviors/brush-select.js +7 -2
  176. package/lib/behaviors/brush-select.js.map +1 -1
  177. package/lib/behaviors/click-element.d.ts +28 -5
  178. package/lib/behaviors/click-element.js +11 -0
  179. package/lib/behaviors/click-element.js.map +1 -1
  180. package/lib/behaviors/collapse-expand.d.ts +2 -0
  181. package/lib/behaviors/collapse-expand.js +2 -2
  182. package/lib/behaviors/collapse-expand.js.map +1 -1
  183. package/lib/behaviors/drag-canvas.d.ts +7 -0
  184. package/lib/behaviors/drag-canvas.js.map +1 -1
  185. package/lib/behaviors/drag-element.d.ts +2 -2
  186. package/lib/behaviors/index.d.ts +2 -0
  187. package/lib/behaviors/index.js +3 -1
  188. package/lib/behaviors/index.js.map +1 -1
  189. package/lib/behaviors/lasso-select.d.ts +2 -1
  190. package/lib/behaviors/lasso-select.js +1 -1
  191. package/lib/behaviors/lasso-select.js.map +1 -1
  192. package/lib/behaviors/scroll-canvas.d.ts +64 -0
  193. package/lib/behaviors/scroll-canvas.js +84 -0
  194. package/lib/behaviors/scroll-canvas.js.map +1 -0
  195. package/lib/behaviors/types.d.ts +2 -1
  196. package/lib/behaviors/zoom-canvas.d.ts +1 -1
  197. package/lib/constants/events/graph.d.ts +5 -1
  198. package/lib/constants/events/graph.js +4 -0
  199. package/lib/constants/events/graph.js.map +1 -1
  200. package/lib/elements/combos/base-combo.d.ts +1 -1
  201. package/lib/elements/edges/base-edge.d.ts +0 -5
  202. package/lib/elements/edges/base-edge.js +1 -2
  203. package/lib/elements/edges/base-edge.js.map +1 -1
  204. package/lib/elements/nodes/base-node.d.ts +1 -7
  205. package/lib/elements/nodes/base-node.js +2 -2
  206. package/lib/elements/nodes/base-node.js.map +1 -1
  207. package/lib/elements/shapes/badge.d.ts +1 -1
  208. package/{esm/plugins/hull/shape.d.ts → lib/elements/shapes/contour.d.ts} +17 -17
  209. package/lib/{plugins/hull/shape.js → elements/shapes/contour.js} +15 -14
  210. package/lib/elements/shapes/contour.js.map +1 -0
  211. package/lib/elements/shapes/index.d.ts +2 -0
  212. package/lib/elements/shapes/index.js +3 -1
  213. package/lib/elements/shapes/index.js.map +1 -1
  214. package/lib/exports.d.ts +12 -20
  215. package/lib/exports.js +46 -17
  216. package/lib/exports.js.map +1 -1
  217. package/lib/plugins/bubble-sets.d.ts +45 -0
  218. package/lib/plugins/bubble-sets.js +216 -0
  219. package/lib/plugins/bubble-sets.js.map +1 -0
  220. package/lib/plugins/camera-setting.d.ts +4 -2
  221. package/lib/plugins/camera-setting.js.map +1 -1
  222. package/lib/plugins/contextmenu.d.ts +1 -0
  223. package/lib/plugins/contextmenu.js +1 -0
  224. package/lib/plugins/contextmenu.js.map +1 -1
  225. package/lib/plugins/grid-line.d.ts +51 -8
  226. package/lib/plugins/grid-line.js.map +1 -1
  227. package/lib/plugins/history/utils.js +6 -2
  228. package/lib/plugins/history/utils.js.map +1 -1
  229. package/lib/plugins/hull/index.d.ts +43 -11
  230. package/lib/plugins/hull/index.js +46 -16
  231. package/lib/plugins/hull/index.js.map +1 -1
  232. package/lib/plugins/index.d.ts +4 -0
  233. package/lib/plugins/index.js +5 -1
  234. package/lib/plugins/index.js.map +1 -1
  235. package/lib/plugins/legend.js +2 -1
  236. package/lib/plugins/legend.js.map +1 -1
  237. package/lib/plugins/timebar.d.ts +225 -0
  238. package/lib/plugins/timebar.js +257 -0
  239. package/lib/plugins/timebar.js.map +1 -0
  240. package/lib/plugins/tooltip.d.ts +2 -2
  241. package/lib/registry/build-in.js +8 -5
  242. package/lib/registry/build-in.js.map +1 -1
  243. package/lib/registry/index.d.ts +1 -1
  244. package/lib/registry/index.js +1 -1
  245. package/lib/runtime/canvas.js +2 -2
  246. package/lib/runtime/canvas.js.map +1 -1
  247. package/lib/runtime/data.d.ts +9 -3
  248. package/lib/runtime/data.js +20 -3
  249. package/lib/runtime/data.js.map +1 -1
  250. package/lib/runtime/element.d.ts +3 -7
  251. package/lib/runtime/element.js +6 -4
  252. package/lib/runtime/element.js.map +1 -1
  253. package/lib/runtime/graph.d.ts +530 -42
  254. package/lib/runtime/graph.js +409 -33
  255. package/lib/runtime/graph.js.map +1 -1
  256. package/lib/runtime/types.d.ts +3 -3
  257. package/lib/runtime/viewport.d.ts +2 -2
  258. package/lib/runtime/viewport.js +2 -2
  259. package/lib/spec/canvas.d.ts +6 -2
  260. package/{esm/spec/spec.d.ts → lib/spec/graph.d.ts} +12 -4
  261. package/lib/spec/{spec.js → graph.js} +1 -1
  262. package/lib/spec/graph.js.map +1 -0
  263. package/lib/spec/index.d.ts +1 -1
  264. package/lib/spec/theme.d.ts +1 -4
  265. package/lib/spec/viewport.d.ts +1 -1
  266. package/lib/themes/base.js +9 -9
  267. package/lib/themes/base.js.map +1 -1
  268. package/lib/themes/types.d.ts +0 -1
  269. package/lib/transforms/process-parallel-edges.d.ts +1 -1
  270. package/lib/types/data.d.ts +2 -2
  271. package/lib/types/viewport.d.ts +4 -4
  272. package/lib/utils/animation.d.ts +5 -5
  273. package/lib/utils/animation.js +2 -2
  274. package/lib/utils/animation.js.map +1 -1
  275. package/lib/utils/change.js +8 -1
  276. package/lib/utils/change.js.map +1 -1
  277. package/lib/utils/data.d.ts +2 -2
  278. package/lib/utils/data.js +2 -2
  279. package/lib/utils/element.d.ts +1 -1
  280. package/lib/utils/element.js +2 -2
  281. package/lib/utils/event/events.d.ts +1 -1
  282. package/lib/utils/event/events.js.map +1 -1
  283. package/lib/utils/event/index.d.ts +1 -1
  284. package/lib/utils/event/index.js +1 -1
  285. package/lib/utils/palette.d.ts +1 -1
  286. package/lib/utils/palette.js +1 -1
  287. package/lib/utils/relation.d.ts +2 -2
  288. package/lib/utils/relation.js +2 -2
  289. package/lib/utils/visibility.d.ts +1 -1
  290. package/lib/utils/visibility.js +1 -1
  291. package/package.json +2 -1
  292. package/src/animations/types.ts +3 -4
  293. package/src/behaviors/base-behavior.ts +1 -1
  294. package/src/behaviors/brush-select.ts +33 -14
  295. package/src/behaviors/click-element.ts +28 -5
  296. package/src/behaviors/collapse-expand.ts +4 -2
  297. package/src/behaviors/drag-canvas.ts +7 -0
  298. package/src/behaviors/drag-element.ts +2 -2
  299. package/src/behaviors/index.ts +2 -0
  300. package/src/behaviors/lasso-select.ts +2 -2
  301. package/src/behaviors/scroll-canvas.ts +143 -0
  302. package/src/behaviors/types.ts +2 -1
  303. package/src/behaviors/zoom-canvas.ts +1 -1
  304. package/src/constants/events/graph.ts +4 -0
  305. package/src/elements/combos/base-combo.ts +1 -1
  306. package/src/elements/edges/base-edge.ts +1 -7
  307. package/src/elements/nodes/base-node.ts +3 -12
  308. package/src/{plugins/hull/shape.ts → elements/shapes/contour.ts} +27 -34
  309. package/src/elements/shapes/index.ts +2 -0
  310. package/src/exports.ts +104 -24
  311. package/src/plugins/bubble-sets.ts +268 -0
  312. package/src/plugins/camera-setting.ts +4 -2
  313. package/src/plugins/contextmenu.ts +1 -0
  314. package/src/plugins/grid-line.ts +51 -8
  315. package/src/plugins/history/utils.ts +6 -2
  316. package/src/plugins/hull/index.ts +57 -20
  317. package/src/plugins/index.ts +4 -0
  318. package/src/plugins/legend.ts +3 -1
  319. package/src/plugins/timebar.ts +450 -0
  320. package/src/plugins/tooltip.ts +2 -2
  321. package/src/registry/build-in.ts +21 -6
  322. package/src/registry/index.ts +1 -1
  323. package/src/runtime/canvas.ts +2 -2
  324. package/src/runtime/data.ts +21 -3
  325. package/src/runtime/element.ts +5 -4
  326. package/src/runtime/graph.ts +543 -48
  327. package/src/runtime/types.ts +3 -3
  328. package/src/runtime/viewport.ts +2 -2
  329. package/src/spec/canvas.ts +6 -2
  330. package/src/spec/{spec.ts → graph.ts} +12 -4
  331. package/src/spec/index.ts +1 -1
  332. package/src/spec/theme.ts +1 -5
  333. package/src/spec/viewport.ts +1 -1
  334. package/src/themes/base.ts +9 -9
  335. package/src/themes/types.ts +0 -2
  336. package/src/transforms/process-parallel-edges.ts +1 -1
  337. package/src/types/data.ts +2 -2
  338. package/src/types/viewport.ts +4 -4
  339. package/src/utils/animation.ts +4 -4
  340. package/src/utils/change.ts +6 -1
  341. package/src/utils/data.ts +2 -2
  342. package/src/utils/element.ts +2 -2
  343. package/src/utils/event/events.ts +3 -1
  344. package/src/utils/event/index.ts +1 -1
  345. package/src/utils/palette.ts +1 -1
  346. package/src/utils/relation.ts +2 -2
  347. package/src/utils/visibility.ts +1 -1
  348. package/esm/plugins/hull/shape.js.map +0 -1
  349. package/esm/spec/spec.js +0 -2
  350. package/esm/spec/spec.js.map +0 -1
  351. package/lib/plugins/hull/shape.js.map +0 -1
  352. package/lib/spec/spec.js.map +0 -1
@@ -1,7 +1,6 @@
1
1
  import type { DisplayObject, IAnimation, IAnimationEffectTiming } from '@antv/g';
2
2
  import type { State } from '../types';
3
3
  /**
4
- * @description
5
4
  * <zh/> 为 string 时,会从注册的动画中获取
6
5
  *
7
6
  * <en/> When it is a string, it will be obtained from the registered animation
@@ -18,7 +17,7 @@ export interface AnimationContext {
18
17
  * <zh/> 动画的源样式
19
18
  *
20
19
  * <en/> Source style of animation
21
- * @description
20
+ * @remarks
22
21
  * <zh/> 用于在动画执行前将 shape 的样式设置为源样式,例如 move-to 动画,需要将 shape 的 x, y 设置为源样式
23
22
  *
24
23
  * <en/> Used to set the style of shape to the source style before the animation is executed. For example, the move-to animation needs to set the x and y of shape to the source style
@@ -28,7 +27,7 @@ export interface AnimationContext {
28
27
  * <zh/> 额外的动画终态样式
29
28
  *
30
29
  * <en/> Additional animation final state style
31
- * @description
30
+ * @remarks
32
31
  * <zh/> 例如元素销毁前,需要将元素的终态透明度设置为 0
33
32
  *
34
33
  * <en/> For example, before the element is destroyed, the final state opacity of the element needs to be set to 0
@@ -38,7 +37,7 @@ export interface AnimationContext {
38
37
  * <zh/> 动画配置过滤
39
38
  *
40
39
  * <en/> Animation configuration filter
41
- * @description
40
+ * @remarks
42
41
  * <zh/> 某些情况下,需要过滤掉一些动画配置,例如位移动画只会作用于元素根节点图形,不会作用于子图形。这项配置通常用于优化动画性能,避免不必要的动画执行
43
42
  *
44
43
  * <en/> In some cases, it is necessary to filter out some animation configurations. For example, the displacement animation will only affect the root node shape of the element, not the child shape. This configuration is usually used to optimize animation performance and avoid unnecessary animation execution
@@ -1,5 +1,6 @@
1
1
  import { BaseExtension } from '../registry/extension';
2
2
  import type { CustomBehaviorOption } from '../spec/behavior';
3
- export type BaseBehaviorOptions = CustomBehaviorOption;
3
+ export interface BaseBehaviorOptions extends CustomBehaviorOption {
4
+ }
4
5
  export declare abstract class BaseBehavior<T extends BaseBehaviorOptions> extends BaseExtension<T> {
5
6
  }
@@ -6,57 +6,69 @@ import type { NodeStyle } from '../spec/element/node';
6
6
  import type { ElementType, ID, IPointerEvent, Points, State } from '../types';
7
7
  import type { ShortcutKey } from '../utils/shortcut';
8
8
  import type { BaseBehaviorOptions } from './base-behavior';
9
- type SELECT_MODE = 'union' | 'intersect' | 'diff' | 'default';
10
9
  export type States = Record<ID, State | State[]>;
10
+ /**
11
+ * <zh/> 框选配置项
12
+ *
13
+ * <en/> Brush select options
14
+ */
11
15
  export interface BrushSelectOptions extends BaseBehaviorOptions {
12
16
  /**
13
17
  * <zh/> 是否启用框选功能
14
18
  *
15
19
  * <en/> Whether to enable Brush select element function.
20
+ * @defaultValue true
16
21
  */
17
22
  enable?: boolean | ((event: IPointerEvent) => boolean);
18
23
  /**
19
24
  * <zh/> 可框选的元素类型
20
25
  *
21
26
  * <en/> Enable Elements type.
27
+ * @defaultValue ['node', 'combo', 'edge']
22
28
  */
23
29
  enableElements?: ElementType[];
24
30
  /**
25
31
  * <zh/> 是否启用动画
26
32
  *
27
33
  * <en/> Whether to enable animation.
34
+ * @defaultValue false
28
35
  */
29
36
  animation?: boolean;
30
37
  /**
31
38
  * <zh/> 交互配置 按键拖拽 或 直接拖拽
32
39
  *
33
40
  * <en/> Trigger click or drag.
41
+ * @defaultValue ['drag']
34
42
  */
35
43
  trigger?: ShortcutKey;
36
44
  /**
37
45
  * <zh/> 框选选中模式
38
- * union : 选中元素添加 state 状态
39
- * intersect : 进一步筛选已经 state 开启的元素
40
- * diff : 反转选中元素的 state 状态
41
- * default : 选中元素添加 state 状态, 其他元素 state 关闭
46
+ * - union : 选中元素添加 state 状态
47
+ * - intersect : 进一步筛选已经 state 开启的元素
48
+ * - diff : 反转选中元素的 state 状态
49
+ * - default : 选中元素添加 state 状态, 其他元素 state 关闭
42
50
  *
43
51
  * <en/> Box Select Select the mode.
44
- * union : Select element add state.
45
- * intersect : Further filter the elements that are already state enabled.
46
- * diff : Inverts the state of the selected element.
47
- * default : Check element state to turn on and other elements state to turn off.
52
+ * - union : Select element add state.
53
+ * - intersect : Further filter the elements that are already state enabled.
54
+ * - diff : Inverts the state of the selected element.
55
+ * - default : Check element state to turn on and other elements state to turn off.
56
+ * @defaultValue 'default'
48
57
  */
49
- mode?: SELECT_MODE;
58
+ mode?: 'union' | 'intersect' | 'diff' | 'default';
50
59
  /**
51
60
  * <zh/> 选中 state 状态
52
61
  *
53
62
  * <en/> Check state status.
63
+ * @defaultValue 'selected'
54
64
  */
55
- state?: 'selected' | 'active';
65
+ state?: State;
56
66
  /**
57
67
  * <zh/> 及时框选, 在框选模式为 default 时,才能使用
58
68
  *
69
+ // * TODO fixme
59
70
  * <en/> Timely screening.
71
+ * @defaultValue false
60
72
  */
61
73
  immediately?: boolean;
62
74
  /**
@@ -69,16 +81,23 @@ export interface BrushSelectOptions extends BaseBehaviorOptions {
69
81
  * <zh/> 框选元素状态回调。
70
82
  *
71
83
  * <en/> Callback when brush select elements.
84
+ * @param states - 选中的元素状态
85
+ * @returns 选中的元素状态
72
86
  */
73
87
  onSelect?: (states: States) => States;
74
88
  }
75
89
  export declare const DEFAULT_STYLE: {
76
90
  lineWidth: number;
77
- color: string;
91
+ fill: string;
78
92
  stroke: string;
79
93
  fillOpacity: number;
80
94
  zIndex: number;
81
95
  };
96
+ /**
97
+ * <zh/> 框选一组元素
98
+ *
99
+ * <en/> Brush select elements
100
+ */
82
101
  export declare class BrushSelect<T extends BaseBehaviorOptions = BrushSelectOptions> extends BaseBehavior<T> {
83
102
  static defaultOptions: Partial<BrushSelectOptions>;
84
103
  private startPoint?;
@@ -100,4 +119,3 @@ export declare class BrushSelect<T extends BaseBehaviorOptions = BrushSelectOpti
100
119
  unbindEvents(): void;
101
120
  destroy(): void;
102
121
  }
103
- export {};
@@ -3,48 +3,60 @@ import type { IPointerEvent, State } from '../types';
3
3
  import type { ShortcutKey } from '../utils/shortcut';
4
4
  import type { BaseBehaviorOptions } from './base-behavior';
5
5
  import { BaseBehavior } from './base-behavior';
6
+ /**
7
+ * <zh/> 点击元素交互配置项
8
+ *
9
+ * <en/> Click element behavior options
10
+ */
6
11
  export interface ClickElementOptions extends BaseBehaviorOptions {
7
12
  /**
8
13
  * <zh/> 是否启用动画
9
14
  *
10
15
  * <en/> Whether to enable animation
16
+ * @defaultValue true
11
17
  */
12
18
  animation?: boolean;
13
19
  /**
14
20
  * <zh/> 是否启用点击元素的功能
15
21
  *
16
22
  * <en/> Whether to enable the function of clicking the element
23
+ * @defaultValue true
17
24
  */
18
25
  enable?: boolean | ((event: IPointerEvent) => boolean);
19
26
  /**
20
27
  * <zh/> 是否允许多选
21
28
  *
22
29
  * <en/> Whether to allow multiple selection
30
+ * @defaultValue false
23
31
  */
24
32
  multiple?: boolean;
25
33
  /**
26
34
  * <zh/> 按下该快捷键配合鼠标点击进行多选
27
35
  *
28
36
  * <en/> Press this shortcut key to apply multiple selection with mouse click
37
+ * @defaultValue ['shift']
29
38
  */
30
39
  trigger?: ShortcutKey;
31
40
  /**
32
- * <zh/> 选中时应用的状态,默认为 selected
41
+ * <zh/> 选中时应用的状态
33
42
  *
34
43
  * <en/> The state to be applied when select.
44
+ * @defaultValue 'selected'
35
45
  */
36
- selectedState: State;
46
+ selectedState?: State;
37
47
  /**
38
- * <zh/> 当有元素被选中时,其他未选中的元素应用的状态,默认为 undefined
48
+ * <zh/> 当有元素被选中时,其他未选中的元素应用的状态
39
49
  *
40
50
  * <en/> The state to be applied on other unselected elements when some elements are selected
51
+ * @defaultValue undefined
41
52
  */
42
- unselectedState: State;
53
+ unselectedState?: State;
43
54
  /**
44
55
  * <zh/> 选中元素的度,即决定了影响范围
45
56
  *
46
57
  * <en/> The degree to determine the scope of influence
47
- * @description
58
+ * @defaultValue 0
59
+ * @remarks
48
60
  * <zh/> 对于节点来说,
49
61
  * - 0 表示只选中当前节点
50
62
  * - 1 表示选中当前节点及其直接相邻的节点和边,以此类推
@@ -61,6 +73,17 @@ export interface ClickElementOptions extends BaseBehaviorOptions {
61
73
  */
62
74
  degree?: number;
63
75
  }
76
+ /**
77
+ * <zh/> 点击元素
78
+ *
79
+ * <en/> Click Element
80
+ * @remarks
81
+ * ```typescript
82
+ * const graph = new Graph({
83
+ * behaviors: ['click-element'],
84
+ * });
85
+ * ```
86
+ */
64
87
  export declare class ClickElement extends BaseBehavior<ClickElementOptions> {
65
88
  private selectedElementIds;
66
89
  private shortcut;
@@ -7,12 +7,14 @@ export interface CollapseExpandOptions extends BaseBehaviorOptions {
7
7
  * <zh/> 是否启用动画
8
8
  *
9
9
  * <en/> Whether to enable animation
10
+ * @defaultValue true
10
11
  */
11
12
  animation: boolean;
12
13
  /**
13
14
  * <zh/> 是否启用展开/收起功能
14
15
  *
15
16
  * <en/> Whether to enable the expand/collapse function
17
+ * @defaultValue true
16
18
  */
17
19
  enable?: boolean | ((event: IPointerEvent) => boolean);
18
20
  /**
@@ -3,6 +3,11 @@ import type { IKeyboardEvent, IPointerEvent, Vector2, ViewportAnimationEffectTim
3
3
  import type { ShortcutKey } from '../utils/shortcut';
4
4
  import type { BaseBehaviorOptions } from './base-behavior';
5
5
  import { BaseBehavior } from './base-behavior';
6
+ /**
7
+ * <zh/> 拖拽画布交互配置项
8
+ *
9
+ * <en/> Drag canvas behavior options
10
+ */
6
11
  export interface DragCanvasOptions extends BaseBehaviorOptions {
7
12
  /**
8
13
  * <zh/> 是否启用拖拽动画,仅在使用按键移动时有效
@@ -14,6 +19,7 @@ export interface DragCanvasOptions extends BaseBehaviorOptions {
14
19
  * <zh/> 是否启用拖拽画布的功能
15
20
  *
16
21
  * <en/> Whether to enable the function of dragging the canvas
22
+ * @defaultValue true
17
23
  */
18
24
  enable?: boolean | ((event: IPointerEvent | IKeyboardEvent) => boolean);
19
25
  /**
@@ -26,6 +32,7 @@ export interface DragCanvasOptions extends BaseBehaviorOptions {
26
32
  * <zh/> 触发一次按键移动的距离
27
33
  *
28
34
  * <en/> The distance of a single key movement
35
+ * @defaultValue 10
29
36
  */
30
37
  sensitivity?: number;
31
38
  /**
@@ -26,7 +26,7 @@ export interface DragElementOptions extends BaseBehaviorOptions, PrefixObject<Ba
26
26
  * - link: Place the drag element as a child element of the target element
27
27
  * - move: Move the element and update the parent element size
28
28
  * - none: Only update the drag target position, no additional operations
29
- * @description
29
+ * @remarks
30
30
  * <zh/> combo 元素可作为元素容器置入 node 或 combo 元素
31
31
  *
32
32
  * <en/> The combo element can be placed as an element container into the node or combo element
@@ -52,7 +52,7 @@ export interface DragElementOptions extends BaseBehaviorOptions, PrefixObject<Ba
52
52
  * - in: hide the edges with the node as the target node
53
53
  * - both: hide all edges related to the node
54
54
  * - all: hide all edges in the graph
55
- * @description
55
+ * @remarks
56
56
  * <zh/> 使用幽灵节点时不会隐藏边
57
57
  *
58
58
  * <en/> Edges will not be hidden when using the drag shadow
@@ -9,6 +9,7 @@ export { DragElementForce } from './drag-element-force';
9
9
  export { FocusElement } from './focus-element';
10
10
  export { HoverElement } from './hover-element';
11
11
  export { LassoSelect } from './lasso-select';
12
+ export { ScrollCanvas } from './scroll-canvas';
12
13
  export { ZoomCanvas } from './zoom-canvas';
13
14
  export type { BaseBehaviorOptions } from './base-behavior';
14
15
  export type { BrushSelectOptions } from './brush-select';
@@ -21,4 +22,5 @@ export type { DragElementForceOptions } from './drag-element-force';
21
22
  export type { FocusElementOptions } from './focus-element';
22
23
  export type { HoverElementOptions } from './hover-element';
23
24
  export type { LassoSelectOptions } from './lasso-select';
25
+ export type { ScrollCanvasOptions } from './scroll-canvas';
24
26
  export type { ZoomCanvasOptions } from './zoom-canvas';
@@ -3,7 +3,8 @@ import type { RuntimeContext } from '../runtime/types';
3
3
  import type { ID, IPointerEvent, Points, State } from '../types';
4
4
  import type { BrushSelectOptions } from './brush-select';
5
5
  export type States = Record<ID, State | State[]>;
6
- export type LassoSelectOptions = BrushSelectOptions;
6
+ export interface LassoSelectOptions extends BrushSelectOptions {
7
+ }
7
8
  export declare class LassoSelect extends BrushSelect<LassoSelectOptions> {
8
9
  static defaultOptions: Partial<LassoSelectOptions>;
9
10
  private points?;
@@ -0,0 +1,64 @@
1
+ import type { RuntimeContext } from '../runtime/types';
2
+ import type { IKeyboardEvent } from '../types';
3
+ import { ShortcutKey } from '../utils/shortcut';
4
+ import type { BaseBehaviorOptions } from './base-behavior';
5
+ import { BaseBehavior } from './base-behavior';
6
+ export interface ScrollCanvasOptions extends BaseBehaviorOptions {
7
+ /**
8
+ * <zh/> 是否启用滚动画布的功能
9
+ *
10
+ * <en/> Whether to enable the function of scrolling the canvas
11
+ * @defaultValue true
12
+ */
13
+ enable?: boolean | ((event: WheelEvent | IKeyboardEvent) => boolean);
14
+ /**
15
+ * <zh/> 触发滚动的方式,默认使用指针滚动
16
+ *
17
+ * <en/> The way to trigger scrolling, default to scrolling with the pointer pressed
18
+ */
19
+ trigger?: CombinationKey;
20
+ /**
21
+ * <zh/> 允许的滚动方向
22
+ * - 默认情况下没有限制
23
+ * - x : 只允许水平滚动
24
+ * - y : 只允许垂直滚动
25
+ *
26
+ * <en/> The allowed rolling direction
27
+ * - by default, there is no restriction
28
+ * - x: only allow horizontal scrolling
29
+ * - y: only allow vertical scrolling
30
+ */
31
+ direction?: 'x' | 'y';
32
+ /**
33
+ * <zh/> 滚动灵敏度
34
+ *
35
+ * <en/> Scroll sensitivity
36
+ * @defaultValue 1
37
+ */
38
+ sensitivity?: number;
39
+ /**
40
+ * <zh/> 完成滚动时的回调
41
+ *
42
+ * <en/> Callback when scrolling is completed
43
+ */
44
+ onFinish?: () => void;
45
+ }
46
+ type CombinationKey = {
47
+ up: ShortcutKey;
48
+ down: ShortcutKey;
49
+ left: ShortcutKey;
50
+ right: ShortcutKey;
51
+ };
52
+ export declare class ScrollCanvas extends BaseBehavior<ScrollCanvasOptions> {
53
+ static defaultOptions: ScrollCanvasOptions;
54
+ private shortcut;
55
+ constructor(context: RuntimeContext, options: ScrollCanvasOptions);
56
+ private bindEvents;
57
+ get graphDom(): import("@antv/g").CanvasLike | null;
58
+ private onWheel;
59
+ private formatDisplacement;
60
+ private scroll;
61
+ private validate;
62
+ destroy(): void;
63
+ }
64
+ export {};
@@ -1,6 +1,7 @@
1
1
  import type { BaseBehavior } from './base-behavior';
2
2
  import type { DragCanvasOptions } from './drag-canvas';
3
+ import type { ScrollCanvasOptions } from './scroll-canvas';
3
4
  import type { ZoomCanvasOptions } from './zoom-canvas';
4
5
  export type { States } from './brush-select';
5
- export type BuiltInBehaviorOptions = DragCanvasOptions | ZoomCanvasOptions;
6
+ export type BuiltInBehaviorOptions = DragCanvasOptions | ZoomCanvasOptions | ScrollCanvasOptions;
6
7
  export type Behavior = BaseBehavior<any>;
@@ -20,7 +20,7 @@ export interface ZoomCanvasOptions extends BaseBehaviorOptions {
20
20
  * <zh/> 触发缩放的方式
21
21
  *
22
22
  * <en/> The way to trigger zoom
23
- * @description
23
+ * @remarks
24
24
  * <zh/>
25
25
  * - 数组:组合快捷键,默认使用滚轮缩放,['Control'] 表示按住 Control 键滚动鼠标滚轮时触发缩放
26
26
  * - 对象:缩放快捷键,例如 { zoomIn: ['Control', '+'], zoomOut: ['Control', '-'], reset: ['Control', '0'] }
@@ -50,5 +50,9 @@ export declare enum GraphEvent {
50
50
  /** <zh/> 批处理开始 | <en/> Batch processing starts */
51
51
  BATCH_START = "batchstart",
52
52
  /** <zh/> 批处理结束 | <en/> Batch processing ends */
53
- BATCH_END = "batchend"
53
+ BATCH_END = "batchend",
54
+ /** <zh/> 销毁开始之前 | <en/> Before destruction */
55
+ BEFORE_DESTROY = "beforedestroy",
56
+ /** <zh/> 销毁结束之后 | <en/> After destruction */
57
+ AFTER_DESTROY = "afterdestroy"
54
58
  }
@@ -31,7 +31,7 @@ export type BaseComboStyleProps<T extends Record<string, unknown> = Record<strin
31
31
  * <zh/> Combo 的子元素数据
32
32
  *
33
33
  * <en/> The data of the children of combo
34
- * @description
34
+ * @remarks
35
35
  * <zh/> 如果 combo 是收起状态,children 可能为空,通过 childrenData 能够获取完整的子元素数据
36
36
  *
37
37
  * <en/> If the combo is collapsed, children may be empty, and the complete child element data can be obtained through childrenData
@@ -42,11 +42,6 @@ export type BaseEdgeStyleProps = BaseElementStyleProps & Pick<PathStyleProps, 'i
42
42
  * <en/> Offset of the end arrow
43
43
  */
44
44
  endArrowOffset?: number;
45
- /**
46
- * <zh/> 主色
47
- * <en/> Subject color
48
- */
49
- color?: string;
50
45
  /**
51
46
  * <zh/> 边的起点 shape
52
47
  * <en/> The source shape. Represents the start of the edge
@@ -29,18 +29,12 @@ export type BaseNodeStyleProps<T extends Record<string, unknown> = Record<string
29
29
  * <en/> The size of node, which is a shortcut to set the width and height of node
30
30
  */
31
31
  size?: Size;
32
- /**
33
- * <zh/> 主色
34
- *
35
- * <en/> Subject color
36
- */
37
- color?: string;
38
32
  /**
39
33
  * @deprecated
40
34
  * <zh/> 解决类型 style.getPropertyValue 问题,不要使用该属性
41
35
  *
42
36
  * <en/> Solve the problem of style.getPropertyValue, do not use this property
43
- * @description
37
+ * @remarks
44
38
  * <zh/> 移除该属性会导致 Polygon 及其子类与 Node 不兼容
45
39
  *
46
40
  * <en/> Removing this property will cause Polygon and its subclasses to be incompatible with Node
@@ -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,37 +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
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
15
  export { parseSize } from './utils/size';
16
- export type { BaseBehaviorOptions, DragCanvasOptions, ZoomCanvasOptions } from './behaviors';
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';
17
20
  export type { BaseComboStyleProps, CircleComboStyleProps, RectComboStyleProps } from './elements/combos';
18
21
  export type { BaseEdgeStyleProps, CubicHorizontalStyleProps, CubicStyleProps, CubicVerticalStyleProps, LineStyleProps, PolylineStyleProps, QuadraticStyleProps, } from './elements/edges';
19
22
  export type { BaseNodeStyleProps, CircleStyleProps, DiamondStyleProps, EllipseStyleProps, HTMLStyleProps, HexagonStyleProps, ImageStyleProps, RectStyleProps, StarStyleProps, TriangleStyleProps, } from './elements/nodes';
20
23
  export type { BaseShapeStyleProps } from './elements/shapes';
21
- export type { BasePluginOptions, CameraSettingOptions, Hull } from './plugins';
24
+ export type { BasePluginOptions, BubbleSetsOptions, CameraSettingOptions, ContextmenuOptions, GridLineOptions, HistoryOptions, HullOptions, LegendOptions, TimebarOptions, ToolbarOptions, TooltipOptions, WatermarkOptions, } from './plugins';
22
25
  export type { RuntimeContext } from './runtime/types';
23
- 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';
24
27
  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';
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';
26
29
  export type { ShortcutKey } from './utils/shortcut';
27
- declare const Utils: {
28
- idOf: typeof idOf;
29
- treeToGraphData: typeof treeToGraphData;
30
- subStyleProps: typeof subStyleProps;
31
- omitStyleProps: typeof omitStyleProps;
32
- };
33
- declare const Theme: {
34
- dark: import("./themes/types").Theme;
35
- light: import("./themes/types").Theme;
36
- };
37
- 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
+ }