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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (282) hide show
  1. package/dist/g6.min.js +2 -2
  2. package/dist/lib/behaviors/brush-select.d.ts +2 -3
  3. package/dist/lib/behaviors/collapse-expand.d.ts +1 -2
  4. package/dist/lib/behaviors/create-edge.d.ts +1 -2
  5. package/dist/lib/behaviors/drag-element-force.d.ts +1 -2
  6. package/dist/lib/behaviors/drag-element.d.ts +2 -3
  7. package/dist/lib/behaviors/lasso-select.d.ts +2 -3
  8. package/dist/lib/constants/events/animation.d.ts +1 -4
  9. package/dist/lib/elements/nodes/base-node.d.ts +2 -3
  10. package/dist/lib/elements/nodes/donut.d.ts +45 -0
  11. package/dist/lib/elements/nodes/html.d.ts +27 -0
  12. package/dist/lib/elements/nodes/index.d.ts +4 -0
  13. package/dist/lib/exports.d.ts +4 -3
  14. package/dist/lib/plugins/hull/index.d.ts +1 -2
  15. package/dist/lib/runtime/data.d.ts +4 -4
  16. package/dist/lib/runtime/element.d.ts +3 -3
  17. package/dist/lib/runtime/graph.d.ts +2 -3
  18. package/dist/lib/runtime/viewport.d.ts +1 -2
  19. package/dist/lib/spec/data.d.ts +74 -1
  20. package/dist/lib/spec/element/combo.d.ts +17 -6
  21. package/dist/lib/spec/element/edge.d.ts +14 -2
  22. package/dist/lib/spec/element/node.d.ts +19 -3
  23. package/dist/lib/themes/base.d.ts +1 -0
  24. package/dist/lib/transforms/process-parallel-edges.d.ts +1 -2
  25. package/dist/lib/transforms/types.d.ts +1 -1
  26. package/dist/lib/types/callable.d.ts +2 -2
  27. package/dist/lib/types/data.d.ts +1 -1
  28. package/dist/lib/types/id.d.ts +1 -0
  29. package/dist/lib/types/index.d.ts +1 -0
  30. package/dist/lib/types/style.d.ts +1 -3
  31. package/dist/lib/utils/animation.d.ts +1 -1
  32. package/dist/lib/utils/behaviors/brush.d.ts +1 -2
  33. package/dist/lib/utils/behaviors/lasso.d.ts +1 -2
  34. package/dist/lib/utils/behaviors/utils.d.ts +1 -1
  35. package/dist/lib/utils/edge.d.ts +1 -2
  36. package/dist/lib/utils/id.d.ts +2 -3
  37. package/dist/lib/utils/palette.d.ts +1 -2
  38. package/dist/lib/utils/relation.d.ts +1 -2
  39. package/esm/behaviors/brush-select.d.ts +2 -3
  40. package/esm/behaviors/brush-select.js.map +1 -1
  41. package/esm/behaviors/click-element.js.map +1 -1
  42. package/esm/behaviors/collapse-expand.d.ts +1 -2
  43. package/esm/behaviors/collapse-expand.js.map +1 -1
  44. package/esm/behaviors/create-edge.d.ts +1 -2
  45. package/esm/behaviors/create-edge.js.map +1 -1
  46. package/esm/behaviors/drag-element-force.d.ts +1 -2
  47. package/esm/behaviors/drag-element-force.js.map +1 -1
  48. package/esm/behaviors/drag-element.d.ts +2 -3
  49. package/esm/behaviors/drag-element.js.map +1 -1
  50. package/esm/behaviors/focus-element.js.map +1 -1
  51. package/esm/behaviors/hover-element.js.map +1 -1
  52. package/esm/behaviors/lasso-select.d.ts +2 -3
  53. package/esm/behaviors/lasso-select.js.map +1 -1
  54. package/esm/constants/events/animation.d.ts +1 -4
  55. package/esm/constants/events/animation.js +0 -4
  56. package/esm/constants/events/animation.js.map +1 -1
  57. package/esm/elements/nodes/base-node.d.ts +2 -3
  58. package/esm/elements/nodes/base-node.js.map +1 -1
  59. package/esm/elements/nodes/donut.d.ts +45 -0
  60. package/esm/elements/nodes/donut.js +81 -0
  61. package/esm/elements/nodes/donut.js.map +1 -0
  62. package/esm/elements/nodes/html.d.ts +27 -0
  63. package/esm/elements/nodes/html.js +209 -0
  64. package/esm/elements/nodes/html.js.map +1 -0
  65. package/esm/elements/nodes/index.d.ts +4 -0
  66. package/esm/elements/nodes/index.js +2 -0
  67. package/esm/elements/nodes/index.js.map +1 -1
  68. package/esm/exports.d.ts +4 -3
  69. package/esm/exports.js +2 -1
  70. package/esm/exports.js.map +1 -1
  71. package/esm/plugins/hull/index.d.ts +1 -2
  72. package/esm/plugins/hull/index.js.map +1 -1
  73. package/esm/plugins/legend.js +3 -2
  74. package/esm/plugins/legend.js.map +1 -1
  75. package/esm/registry/build-in.js +5 -3
  76. package/esm/registry/build-in.js.map +1 -1
  77. package/esm/runtime/canvas.js +5 -2
  78. package/esm/runtime/canvas.js.map +1 -1
  79. package/esm/runtime/data.d.ts +4 -4
  80. package/esm/runtime/data.js.map +1 -1
  81. package/esm/runtime/element.d.ts +3 -3
  82. package/esm/runtime/element.js +59 -42
  83. package/esm/runtime/element.js.map +1 -1
  84. package/esm/runtime/graph.d.ts +2 -3
  85. package/esm/runtime/graph.js +11 -9
  86. package/esm/runtime/graph.js.map +1 -1
  87. package/esm/runtime/layout.js +2 -2
  88. package/esm/runtime/layout.js.map +1 -1
  89. package/esm/runtime/viewport.d.ts +1 -2
  90. package/esm/runtime/viewport.js.map +1 -1
  91. package/esm/spec/data.d.ts +74 -1
  92. package/esm/spec/element/combo.d.ts +17 -6
  93. package/esm/spec/element/edge.d.ts +14 -2
  94. package/esm/spec/element/node.d.ts +19 -3
  95. package/esm/themes/base.d.ts +1 -0
  96. package/esm/themes/base.js +2 -0
  97. package/esm/themes/base.js.map +1 -1
  98. package/esm/transforms/process-parallel-edges.d.ts +1 -2
  99. package/esm/transforms/process-parallel-edges.js +2 -4
  100. package/esm/transforms/process-parallel-edges.js.map +1 -1
  101. package/esm/transforms/types.d.ts +1 -1
  102. package/esm/transforms/update-related-edge.js.map +1 -1
  103. package/esm/types/callable.d.ts +2 -2
  104. package/esm/types/data.d.ts +1 -1
  105. package/esm/types/id.d.ts +1 -0
  106. package/esm/types/id.js +2 -0
  107. package/esm/types/id.js.map +1 -0
  108. package/esm/types/index.d.ts +1 -0
  109. package/esm/types/style.d.ts +1 -3
  110. package/esm/utils/animation.d.ts +1 -1
  111. package/esm/utils/animation.js +1 -1
  112. package/esm/utils/animation.js.map +1 -1
  113. package/esm/utils/behaviors/brush.d.ts +1 -2
  114. package/esm/utils/behaviors/brush.js.map +1 -1
  115. package/esm/utils/behaviors/lasso.d.ts +1 -2
  116. package/esm/utils/behaviors/lasso.js.map +1 -1
  117. package/esm/utils/behaviors/utils.d.ts +1 -1
  118. package/esm/utils/change.js.map +1 -1
  119. package/esm/utils/edge.d.ts +1 -2
  120. package/esm/utils/edge.js.map +1 -1
  121. package/esm/utils/id.d.ts +2 -3
  122. package/esm/utils/id.js.map +1 -1
  123. package/esm/utils/palette.d.ts +1 -2
  124. package/esm/utils/palette.js.map +1 -1
  125. package/esm/utils/relation.d.ts +1 -2
  126. package/esm/utils/relation.js.map +1 -1
  127. package/esm/utils/style.js +3 -3
  128. package/esm/utils/style.js.map +1 -1
  129. package/lib/behaviors/brush-select.d.ts +2 -3
  130. package/lib/behaviors/brush-select.js.map +1 -1
  131. package/lib/behaviors/click-element.js.map +1 -1
  132. package/lib/behaviors/collapse-expand.d.ts +1 -2
  133. package/lib/behaviors/collapse-expand.js.map +1 -1
  134. package/lib/behaviors/create-edge.d.ts +1 -2
  135. package/lib/behaviors/create-edge.js.map +1 -1
  136. package/lib/behaviors/drag-element-force.d.ts +1 -2
  137. package/lib/behaviors/drag-element-force.js.map +1 -1
  138. package/lib/behaviors/drag-element.d.ts +2 -3
  139. package/lib/behaviors/drag-element.js.map +1 -1
  140. package/lib/behaviors/focus-element.js.map +1 -1
  141. package/lib/behaviors/hover-element.js.map +1 -1
  142. package/lib/behaviors/lasso-select.d.ts +2 -3
  143. package/lib/behaviors/lasso-select.js.map +1 -1
  144. package/lib/constants/events/animation.d.ts +1 -4
  145. package/lib/constants/events/animation.js +0 -4
  146. package/lib/constants/events/animation.js.map +1 -1
  147. package/lib/elements/nodes/base-node.d.ts +2 -3
  148. package/lib/elements/nodes/base-node.js.map +1 -1
  149. package/lib/elements/nodes/donut.d.ts +45 -0
  150. package/lib/elements/nodes/donut.js +85 -0
  151. package/lib/elements/nodes/donut.js.map +1 -0
  152. package/lib/elements/nodes/html.d.ts +27 -0
  153. package/lib/elements/nodes/html.js +213 -0
  154. package/lib/elements/nodes/html.js.map +1 -0
  155. package/lib/elements/nodes/index.d.ts +4 -0
  156. package/lib/elements/nodes/index.js +5 -1
  157. package/lib/elements/nodes/index.js.map +1 -1
  158. package/lib/exports.d.ts +4 -3
  159. package/lib/exports.js +5 -1
  160. package/lib/exports.js.map +1 -1
  161. package/lib/plugins/hull/index.d.ts +1 -2
  162. package/lib/plugins/hull/index.js.map +1 -1
  163. package/lib/plugins/legend.js +3 -2
  164. package/lib/plugins/legend.js.map +1 -1
  165. package/lib/registry/build-in.js +4 -2
  166. package/lib/registry/build-in.js.map +1 -1
  167. package/lib/runtime/canvas.js +5 -2
  168. package/lib/runtime/canvas.js.map +1 -1
  169. package/lib/runtime/data.d.ts +4 -4
  170. package/lib/runtime/data.js.map +1 -1
  171. package/lib/runtime/element.d.ts +3 -3
  172. package/lib/runtime/element.js +58 -41
  173. package/lib/runtime/element.js.map +1 -1
  174. package/lib/runtime/graph.d.ts +2 -3
  175. package/lib/runtime/graph.js +10 -8
  176. package/lib/runtime/graph.js.map +1 -1
  177. package/lib/runtime/layout.js +2 -2
  178. package/lib/runtime/layout.js.map +1 -1
  179. package/lib/runtime/viewport.d.ts +1 -2
  180. package/lib/runtime/viewport.js.map +1 -1
  181. package/lib/spec/data.d.ts +74 -1
  182. package/lib/spec/element/combo.d.ts +17 -6
  183. package/lib/spec/element/edge.d.ts +14 -2
  184. package/lib/spec/element/node.d.ts +19 -3
  185. package/lib/themes/base.d.ts +1 -0
  186. package/lib/themes/base.js +2 -0
  187. package/lib/themes/base.js.map +1 -1
  188. package/lib/transforms/process-parallel-edges.d.ts +1 -2
  189. package/lib/transforms/process-parallel-edges.js +2 -4
  190. package/lib/transforms/process-parallel-edges.js.map +1 -1
  191. package/lib/transforms/types.d.ts +1 -1
  192. package/lib/transforms/update-related-edge.js.map +1 -1
  193. package/lib/types/callable.d.ts +2 -2
  194. package/lib/types/data.d.ts +1 -1
  195. package/lib/types/id.d.ts +1 -0
  196. package/lib/{spec/element/base.js → types/id.js} +1 -1
  197. package/lib/types/id.js.map +1 -0
  198. package/lib/types/index.d.ts +1 -0
  199. package/lib/types/style.d.ts +1 -3
  200. package/lib/utils/animation.d.ts +1 -1
  201. package/lib/utils/animation.js +1 -1
  202. package/lib/utils/animation.js.map +1 -1
  203. package/lib/utils/behaviors/brush.d.ts +1 -2
  204. package/lib/utils/behaviors/brush.js.map +1 -1
  205. package/lib/utils/behaviors/lasso.d.ts +1 -2
  206. package/lib/utils/behaviors/lasso.js.map +1 -1
  207. package/lib/utils/behaviors/utils.d.ts +1 -1
  208. package/lib/utils/change.js.map +1 -1
  209. package/lib/utils/edge.d.ts +1 -2
  210. package/lib/utils/edge.js.map +1 -1
  211. package/lib/utils/id.d.ts +2 -3
  212. package/lib/utils/id.js.map +1 -1
  213. package/lib/utils/palette.d.ts +1 -2
  214. package/lib/utils/palette.js.map +1 -1
  215. package/lib/utils/relation.d.ts +1 -2
  216. package/lib/utils/relation.js.map +1 -1
  217. package/lib/utils/style.js +3 -3
  218. package/lib/utils/style.js.map +1 -1
  219. package/package.json +1 -1
  220. package/src/behaviors/brush-select.ts +1 -2
  221. package/src/behaviors/click-element.ts +1 -2
  222. package/src/behaviors/collapse-expand.ts +1 -2
  223. package/src/behaviors/create-edge.ts +1 -2
  224. package/src/behaviors/drag-element-force.ts +1 -2
  225. package/src/behaviors/drag-element.ts +1 -2
  226. package/src/behaviors/focus-element.ts +1 -2
  227. package/src/behaviors/hover-element.ts +1 -2
  228. package/src/behaviors/lasso-select.ts +1 -2
  229. package/src/constants/events/animation.ts +0 -4
  230. package/src/elements/nodes/base-node.ts +3 -3
  231. package/src/elements/nodes/donut.ts +137 -0
  232. package/src/elements/nodes/html.ts +230 -0
  233. package/src/elements/nodes/index.ts +4 -0
  234. package/src/exports.ts +20 -1
  235. package/src/plugins/hull/index.ts +1 -2
  236. package/src/plugins/legend.ts +4 -4
  237. package/src/registry/build-in.ts +6 -2
  238. package/src/runtime/canvas.ts +5 -2
  239. package/src/runtime/data.ts +2 -1
  240. package/src/runtime/element.ts +62 -36
  241. package/src/runtime/graph.ts +13 -10
  242. package/src/runtime/layout.ts +4 -4
  243. package/src/runtime/viewport.ts +1 -2
  244. package/src/spec/data.ts +74 -1
  245. package/src/spec/element/combo.ts +17 -6
  246. package/src/spec/element/edge.ts +14 -2
  247. package/src/spec/element/node.ts +19 -3
  248. package/src/themes/base.ts +3 -0
  249. package/src/transforms/arrange-draw-order.ts +1 -1
  250. package/src/transforms/process-parallel-edges.ts +4 -6
  251. package/src/transforms/types.ts +1 -1
  252. package/src/transforms/update-related-edge.ts +1 -2
  253. package/src/types/callable.ts +2 -2
  254. package/src/types/data.ts +1 -1
  255. package/src/types/id.ts +1 -0
  256. package/src/types/index.ts +1 -0
  257. package/src/types/style.ts +1 -3
  258. package/src/utils/animation.ts +2 -2
  259. package/src/utils/behaviors/brush.ts +1 -2
  260. package/src/utils/behaviors/lasso.ts +1 -2
  261. package/src/utils/behaviors/utils.ts +1 -1
  262. package/src/utils/change.ts +1 -2
  263. package/src/utils/edge.ts +1 -1
  264. package/src/utils/id.ts +1 -2
  265. package/src/utils/palette.ts +1 -1
  266. package/src/utils/relation.ts +1 -2
  267. package/src/utils/style.ts +3 -3
  268. package/dist/lib/runtime/index.d.ts +0 -6
  269. package/dist/lib/spec/element/base.d.ts +0 -6
  270. package/esm/runtime/index.d.ts +0 -6
  271. package/esm/runtime/index.js +0 -7
  272. package/esm/runtime/index.js.map +0 -1
  273. package/esm/spec/element/base.d.ts +0 -6
  274. package/esm/spec/element/base.js +0 -2
  275. package/esm/spec/element/base.js.map +0 -1
  276. package/lib/runtime/index.d.ts +0 -6
  277. package/lib/runtime/index.js +0 -8
  278. package/lib/runtime/index.js.map +0 -1
  279. package/lib/spec/element/base.d.ts +0 -6
  280. package/lib/spec/element/base.js.map +0 -1
  281. package/src/runtime/index.ts +0 -7
  282. package/src/spec/element/base.ts +0 -6
@@ -1,10 +1,9 @@
1
1
  import { Shortcut } from '../utils/shortcut';
2
2
  import { BaseBehavior } from './base-behavior';
3
- import type { ID } from '@antv/graphlib';
4
3
  import type { Graph } from '../runtime/graph';
5
4
  import type { RuntimeContext } from '../runtime/types';
6
5
  import type { NodeStyle } from '../spec/element/node';
7
- import type { ElementType, IPointerEvent, Points, State } from '../types';
6
+ import type { ElementType, ID, IPointerEvent, Points, State } from '../types';
8
7
  import type { ShortcutKey } from '../utils/shortcut';
9
8
  import type { BaseBehaviorOptions } from './base-behavior';
10
9
  type SELECT_MODE = 'union' | 'intersect' | 'diff' | 'default';
@@ -94,7 +93,7 @@ export declare class BrushSelect<T extends BaseBehaviorOptions = BrushSelectOpti
94
93
  clearSelected: () => void;
95
94
  updateElementState: (points: Points) => void;
96
95
  private clearBrush;
97
- getPointsSelectIds: (graph: Graph, points: Points, itemTypes: ElementType[]) => ID[];
96
+ getPointsSelectIds: (graph: Graph, points: Points, itemTypes: ElementType[]) => string[];
98
97
  isKeydown(): boolean | undefined;
99
98
  validate(event: IPointerEvent): any;
100
99
  bindEvents(): void;
@@ -1,6 +1,5 @@
1
- import type { ID } from '@antv/graphlib';
2
1
  import type { RuntimeContext } from '../runtime/types';
3
- import type { IPointerEvent } from '../types';
2
+ import type { ID, IPointerEvent } from '../types';
4
3
  import type { BaseBehaviorOptions } from './base-behavior';
5
4
  import { BaseBehavior } from './base-behavior';
6
5
  export interface CollapseExpandOptions extends BaseBehaviorOptions {
@@ -1,8 +1,7 @@
1
- import type { ID } from '@antv/graphlib';
2
1
  import type { RuntimeContext } from '../runtime/types';
3
2
  import type { EdgeData } from '../spec';
4
3
  import type { EdgeStyle } from '../spec/element/edge';
5
- import type { IPointerEvent } from '../types';
4
+ import type { ID, IPointerEvent } from '../types';
6
5
  import type { BaseBehaviorOptions } from './base-behavior';
7
6
  import { BaseBehavior } from './base-behavior';
8
7
  export interface CreateEdgeOptions extends BaseBehaviorOptions {
@@ -1,5 +1,4 @@
1
- import type { ID } from '@antv/graphlib';
2
- import type { Element, IDragEvent, Point } from '../types';
1
+ import type { Element, ID, IDragEvent, Point } from '../types';
3
2
  import type { DragElementOptions } from './drag-element';
4
3
  import { DragElement } from './drag-element';
5
4
  export interface DragElementForceOptions extends Omit<DragElementOptions, 'animation' | 'dropEffect' | 'shadow'> {
@@ -1,7 +1,6 @@
1
1
  import type { BaseStyleProps } from '@antv/g';
2
- import type { ID } from '@antv/graphlib';
3
2
  import type { RuntimeContext } from '../runtime/types';
4
- import type { EdgeDirection, Element, IDragEvent, Point, PrefixObject } from '../types';
3
+ import type { EdgeDirection, Element, ID, IDragEvent, Point, PrefixObject } from '../types';
5
4
  import type { BaseBehaviorOptions } from './base-behavior';
6
5
  import { BaseBehavior } from './base-behavior';
7
6
  export interface DragElementOptions extends BaseBehaviorOptions, PrefixObject<BaseStyleProps, 'shadow'> {
@@ -84,7 +83,7 @@ export declare class DragElement extends BaseBehavior<DragElementOptions> {
84
83
  constructor(context: RuntimeContext, options: DragElementOptions);
85
84
  update(options: Partial<DragElementOptions>): void;
86
85
  private bindEvents;
87
- protected getSelectedNodeIDs(currTarget: ID[]): ID[];
86
+ protected getSelectedNodeIDs(currTarget: ID[]): string[];
88
87
  protected getDelta(event: IElementDragEvent): [number, number] | Float32Array | [number, number, number];
89
88
  protected onDragStart(event: IElementDragEvent): void;
90
89
  protected onDrag(event: IElementDragEvent): void;
@@ -1,7 +1,6 @@
1
1
  import { BrushSelect } from './brush-select';
2
- import type { ID } from '@antv/graphlib';
3
2
  import type { RuntimeContext } from '../runtime/types';
4
- import type { IPointerEvent, Points, State } from '../types';
3
+ import type { ID, IPointerEvent, Points, State } from '../types';
5
4
  import type { BrushSelectOptions } from './brush-select';
6
5
  export type States = Record<ID, State | State[]>;
7
6
  export type LassoSelectOptions = BrushSelectOptions;
@@ -9,7 +8,7 @@ export declare class LassoSelect extends BrushSelect<LassoSelectOptions> {
9
8
  static defaultOptions: Partial<LassoSelectOptions>;
10
9
  private points?;
11
10
  private pathShape?;
12
- selectElementFn: (graph: import("..").Graph, id: ID, points: Points) => boolean;
11
+ selectElementFn: (graph: import("..").Graph, id: string, points: Points) => boolean;
13
12
  constructor(context: RuntimeContext, options: LassoSelectOptions);
14
13
  pointerDown: (event: IPointerEvent) => Promise<void>;
15
14
  pointerMove: (event: IPointerEvent) => Promise<void>;
@@ -1,7 +1,4 @@
1
1
  export declare enum AnimationType {
2
2
  DRAW = "draw",
3
- TRANSFORM = "transform",
4
- ELEMENT_VISIBILITY_CHANGE = "elementvisibilitychange",
5
- ELEMENT_STATE_CHANGE = "elementstatechange",
6
- ELEMENT_TRANSLATE = "elementtranslate"
3
+ TRANSFORM = "transform"
7
4
  }
@@ -1,8 +1,7 @@
1
1
  import type { DisplayObject, DisplayObjectConfig, Group } from '@antv/g';
2
- import type { ID } from '@antv/graphlib';
3
2
  import type { CategoricalPalette } from '../../palettes/types';
4
3
  import type { NodeData } from '../../spec';
5
- import type { BadgePlacement, BaseElementStyleProps, Keyframe, LabelPlacement, Node, Placement, Point, Port, PortStyleProps, PrefixObject, Size } from '../../types';
4
+ import type { BadgePlacement, BaseElementStyleProps, ID, Keyframe, LabelPlacement, Node, Placement, Point, Port, PortStyleProps, PrefixObject, Size } from '../../types';
6
5
  import type { BadgeStyleProps, IconStyleProps, LabelStyleProps } from '../shapes';
7
6
  import { BaseShape } from '../shapes';
8
7
  export type BaseNodeStyleProps<T extends Record<string, unknown> = Record<string, any>> = T & BaseElementStyleProps & PrefixObject<NodeLabelStyleProps, 'label'> & PrefixObject<T, 'halo'> & PrefixObject<IconStyleProps, 'icon'> & PrefixObject<BadgeStyleProps, 'badge'> & PrefixObject<PortStyleProps, 'port'> & {
@@ -141,7 +140,7 @@ export declare abstract class BaseNode<S extends BaseNodeStyleProps = BaseNodeSt
141
140
  * Get the key shape for the node.
142
141
  * @returns Key shape.
143
142
  */
144
- getKey(): DisplayObject;
143
+ getKey<T extends DisplayObject>(): T;
145
144
  /**
146
145
  * Get the ports for the node.
147
146
  * @returns Ports shape map.
@@ -0,0 +1,45 @@
1
+ import { Circle } from './circle';
2
+ import type { BaseStyleProps, DisplayObjectConfig, Group } from '@antv/g';
3
+ import type { PrefixObject } from '../../types';
4
+ import type { CircleStyleProps } from './circle';
5
+ interface Round extends BaseStyleProps {
6
+ /**
7
+ * <zh/> 数值,用于计算比例
8
+ *
9
+ * <en/> Numerical value used to calculate the scale.
10
+ */
11
+ value: number;
12
+ /**
13
+ * <zh/> 颜色
14
+ *
15
+ * <en/> Color.
16
+ */
17
+ color?: string;
18
+ }
19
+ export interface DonutStyleProps extends CircleStyleProps, PrefixObject<BaseStyleProps, 'donut'> {
20
+ /**
21
+ * <zh/> 内环半径,使用百分比或者像素值
22
+ *
23
+ * <en/> Inner ring radius, using percentage or pixel value.
24
+ */
25
+ innerRadius?: string | number;
26
+ /**
27
+ * <zh/> 圆环数据
28
+ *
29
+ * <en/> Donut data.
30
+ */
31
+ donuts?: number[] | Round[];
32
+ /**
33
+ * <zh/> 颜色或者色板名
34
+ *
35
+ * <en/> Color or palette.
36
+ */
37
+ colors?: string | string[];
38
+ }
39
+ export declare class Donut extends Circle {
40
+ static defaultStyleProps: Partial<DonutStyleProps>;
41
+ constructor(options: DisplayObjectConfig<DonutStyleProps>);
42
+ protected drawDonutShape(attributes: Required<DonutStyleProps>, container: Group): void;
43
+ render(attributes: Required<DonutStyleProps>, container?: Group): void;
44
+ }
45
+ export {};
@@ -0,0 +1,27 @@
1
+ import type { DisplayObjectConfig, HTMLStyleProps as GHTMLStyleProps, Group } from '@antv/g';
2
+ import type { BaseNodeStyleProps } from './base-node';
3
+ import { BaseNode } from './base-node';
4
+ export type HTMLStyleProps = BaseNodeStyleProps<{
5
+ innerHTML: string | HTMLElement;
6
+ }>;
7
+ /**
8
+ * @see https://github.com/antvis/G/blob/next/packages/g-lite/src/plugins/EventPlugin.ts
9
+ */
10
+ export declare class HTML extends BaseNode<HTMLStyleProps> {
11
+ static defaultStyleProps: Partial<HTMLStyleProps>;
12
+ constructor(options: DisplayObjectConfig<HTMLStyleProps>);
13
+ private rootPointerEvent;
14
+ private get eventService();
15
+ private get events();
16
+ protected getDomElement(): HTMLElement;
17
+ protected getKeyStyle(attributes: Required<HTMLStyleProps>): GHTMLStyleProps;
18
+ protected drawKeyShape(attributes: Required<HTMLStyleProps>, container: Group): any;
19
+ connectedCallback(): void;
20
+ attributeChangedCallback(name: any, oldValue: any, newValue: any): void;
21
+ onDestroy(): void;
22
+ private forwardEvents;
23
+ private normalizeToPointerEvent;
24
+ private transferMouseData;
25
+ private bootstrapEvent;
26
+ private getViewportXY;
27
+ }
@@ -1,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';
@@ -5,23 +5,24 @@ export { BaseBehavior, DragCanvas, ZoomCanvas } from './behaviors';
5
5
  export { CanvasEvent, ComboEvent, CommonEvent, ContainerEvent, EdgeEvent, ExtensionCategory, GraphEvent, NodeEvent, } from './constants';
6
6
  export { BaseCombo, CircleCombo, RectCombo } from './elements/combos';
7
7
  export { BaseEdge, Cubic, CubicHorizontal, CubicVertical, Line, Polyline, Quadratic } from './elements/edges';
8
- export { BaseNode, Circle, Diamond, Ellipse, Hexagon, Image, Rect, Star, Triangle } from './elements/nodes';
8
+ export { BaseNode, Circle, Diamond, Donut, Ellipse, HTML, Hexagon, Image, Rect, Star, Triangle, } from './elements/nodes';
9
9
  export { BaseShape } from './elements/shapes';
10
10
  export { BasePlugin, CameraSetting, History } from './plugins';
11
11
  export { getExtension, getExtensions, register } from './registry';
12
12
  export { Graph } from './runtime/graph';
13
13
  export { BaseTransform } from './transforms';
14
14
  export { Shortcut } from './utils/shortcut';
15
+ export { parseSize } from './utils/size';
15
16
  export type { BaseBehaviorOptions, DragCanvasOptions, ZoomCanvasOptions } from './behaviors';
16
17
  export type { BaseComboStyleProps, CircleComboStyleProps, RectComboStyleProps } from './elements/combos';
17
18
  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';
19
+ export type { BaseNodeStyleProps, CircleStyleProps, DiamondStyleProps, EllipseStyleProps, HTMLStyleProps, HexagonStyleProps, ImageStyleProps, RectStyleProps, StarStyleProps, TriangleStyleProps, } from './elements/nodes';
19
20
  export type { BaseShapeStyleProps } from './elements/shapes';
20
21
  export type { BasePluginOptions, CameraSettingOptions, Hull } from './plugins';
21
22
  export type { RuntimeContext } from './runtime/types';
22
23
  export type { BehaviorOptions, CanvasOptions, ComboData, ComboOptions, EdgeData, EdgeOptions, G6Spec, GraphData, LayoutOptions, NodeData, NodeOptions, PluginOptions, ThemeOptions, ViewportOptions, } from './spec';
23
24
  export type { BaseTransformOptions } from './transforms';
24
- export type { IAnimateEvent, IDragEvent, IElementLifeCycleEvent, IEvent, IGraphLifeCycleEvent, IKeyboardEvent, IPointerEvent, IViewportEvent, IWheelEvent, Point, Vector2, Vector3, ViewportAnimationEffectTiming, } from './types';
25
+ export type { Combo, Edge, Element, IAnimateEvent, ID, IDragEvent, IElementLifeCycleEvent, IEvent, IGraphLifeCycleEvent, IKeyboardEvent, IPointerEvent, IViewportEvent, IWheelEvent, Node, Point, Vector2, Vector3, ViewportAnimationEffectTiming, } from './types';
25
26
  export type { ShortcutKey } from './utils/shortcut';
26
27
  declare const Utils: {
27
28
  idOf: typeof idOf;
@@ -1,6 +1,5 @@
1
- import type { ID } from '@antv/graphlib';
2
1
  import type { RuntimeContext } from '../../runtime/types';
3
- import type { CallableValue } from '../../types';
2
+ import type { CallableValue, ID } from '../../types';
4
3
  import type { BasePluginOptions } from '../base-plugin';
5
4
  import { BasePlugin } from '../base-plugin';
6
5
  import type { HullStyleProps } from './shape';
@@ -1,7 +1,7 @@
1
- import { Graph as GraphLib, ID } from '@antv/graphlib';
1
+ import { Graph as GraphLib } from '@antv/graphlib';
2
2
  import { COMBO_KEY, TREE_KEY } from '../constants';
3
3
  import type { ComboData, EdgeData, GraphData, NodeData } from '../spec';
4
- import type { DataChange, DataID, ElementDatum, NodeLikeData, PartialEdgeData, PartialGraphData, PartialNodeLikeData, Position, State } from '../types';
4
+ import type { DataChange, DataID, ElementDatum, ID, NodeLikeData, PartialEdgeData, PartialGraphData, PartialNodeLikeData, Position, State } from '../types';
5
5
  import type { EdgeDirection } from '../types/edge';
6
6
  import type { ElementType } from '../types/element';
7
7
  export declare class DataController {
@@ -17,8 +17,8 @@ export declare class DataController {
17
17
  * <en/> When the combo is deleted, its id will be removed from comboIds. At this time, the NodeRemoved obtained according to the changes event of Graphlib cannot distinguish whether it is a combo or a node.
18
18
  * Therefore, it is necessary to record the id of the last deleted combo and use it to judge isCombo
19
19
  */
20
- protected latestRemovedComboIds: Set<ID>;
21
- protected comboIds: Set<ID>;
20
+ protected latestRemovedComboIds: Set<string>;
21
+ protected comboIds: Set<string>;
22
22
  /**
23
23
  * <zh/> 获取详细数据变更
24
24
  *
@@ -1,7 +1,6 @@
1
1
  import type { DisplayObject, IAnimation } from '@antv/g';
2
- import type { ID } from '@antv/graphlib';
3
2
  import type { AnimationStage } from '../spec/element/animation';
4
- import type { Combo, Element, ElementDatum, ElementType, Node, State } from '../types';
3
+ import type { Combo, Element, ElementDatum, ElementType, ID, Node, State } from '../types';
5
4
  import type { RuntimeContext } from './types';
6
5
  export declare class ElementController {
7
6
  private context;
@@ -12,6 +11,7 @@ export declare class ElementController {
12
11
  init(): void;
13
12
  private emit;
14
13
  private forEachElementData;
14
+ getElementType(elementType: ElementType, datum: ElementDatum): string;
15
15
  private getTheme;
16
16
  getThemeStyle(elementType: ElementType): import("../spec/element/node").NodeStyle | import("../spec/element/edge").EdgeStyle;
17
17
  getThemeStateStyle(elementType: ElementType, states: State[]): any;
@@ -28,7 +28,7 @@ export declare class ElementController {
28
28
  *
29
29
  * <en/> compute default style of single element
30
30
  */
31
- private computedElementDefaultStyle;
31
+ private computeElementDefaultStyle;
32
32
  private computeElementsDefaultStyle;
33
33
  getDefaultStyle(id: ID): Record<string, unknown>;
34
34
  private getElementState;
@@ -1,12 +1,11 @@
1
1
  import EventEmitter from '@antv/event-emitter';
2
2
  import type { AABB, BaseStyleProps } from '@antv/g';
3
- import type { ID } from '@antv/graphlib';
4
3
  import type { Plugin } from '../plugins/types';
5
4
  import type { BehaviorOptions, ComboData, ComboOptions, EdgeData, EdgeOptions, G6Spec, GraphData, LayoutOptions, NodeData, NodeOptions, PluginOptions, ThemeOptions, TransformOptions } from '../spec';
6
5
  import type { UpdateBehaviorOption } from '../spec/behavior';
7
6
  import type { UpdatePluginOption } from '../spec/plugin';
8
7
  import type { UpdateTransformOption } from '../spec/transform';
9
- import type { CallableValue, DataID, EdgeDirection, ElementType, FitViewOptions, IEvent, NodeLikeData, PartialEdgeData, PartialGraphData, PartialNodeLikeData, Point, Position, State, ViewportAnimationEffectTiming } from '../types';
8
+ import type { CallableValue, DataID, EdgeDirection, ElementType, FitViewOptions, ID, IEvent, NodeLikeData, PartialEdgeData, PartialGraphData, PartialNodeLikeData, Point, Position, State, ViewportAnimationEffectTiming } from '../types';
10
9
  import type { DataURLOptions } from './canvas';
11
10
  import { Canvas } from './canvas';
12
11
  import type { HierarchyKey } from './data';
@@ -178,7 +177,7 @@ export declare class Graph extends EventEmitter {
178
177
  getElementDataByState(elementType: 'edge', state: State): EdgeData[];
179
178
  getElementDataByState(elementType: 'combo', state: State): ComboData[];
180
179
  private initCanvas;
181
- private createRuntime;
180
+ private initRuntime;
182
181
  private prepare;
183
182
  /**
184
183
  * <zh/> 执行渲染
@@ -1,6 +1,5 @@
1
1
  import { AABB } from '@antv/g';
2
- import type { ID } from '@antv/graphlib';
3
- import type { FitViewOptions, Point, TransformOptions, ViewportAnimationEffectTiming } from '../types';
2
+ import type { FitViewOptions, ID, Point, TransformOptions, ViewportAnimationEffectTiming } from '../types';
4
3
  import type { RuntimeContext } from './types';
5
4
  export declare class ViewportController {
6
5
  private context;
@@ -1,4 +1,4 @@
1
- import type { ID } from '@antv/graphlib';
1
+ import type { ID } from '../types';
2
2
  import type { ComboStyle } from './element/combo';
3
3
  import type { EdgeStyle } from './element/edge';
4
4
  import type { NodeStyle } from './element/node';
@@ -23,22 +23,95 @@ export interface GraphData {
23
23
  combos?: ComboData[];
24
24
  }
25
25
  export interface NodeData {
26
+ /**
27
+ * <zh/> 节点 ID
28
+ *
29
+ * <en/> Node ID
30
+ */
26
31
  id: ID;
32
+ /**
33
+ * <zh/> 节点类型
34
+ *
35
+ * <en/> Node type
36
+ */
37
+ type?: string;
38
+ /**
39
+ * <zh/> 节点数据
40
+ *
41
+ * <en/> Node data
42
+ */
27
43
  data?: Record<string, unknown>;
44
+ /**
45
+ * <zh/> 节点样式
46
+ *
47
+ * <en/> Node style
48
+ */
28
49
  style?: NodeStyle;
29
50
  [key: string]: unknown;
30
51
  }
31
52
  export interface ComboData {
53
+ /**
54
+ * <zh/> Combo ID
55
+ *
56
+ * <en/> Combo ID
57
+ */
32
58
  id: ID;
59
+ /**
60
+ * <zh/> Combo 类型
61
+ *
62
+ * <en/> Combo type
63
+ */
64
+ type?: string;
65
+ /**
66
+ * <zh/> Combo 数据
67
+ *
68
+ * <en/> Combo data
69
+ */
33
70
  data?: Record<string, unknown>;
71
+ /**
72
+ * <zh/> Combo 样式
73
+ *
74
+ * <en/> Combo style
75
+ */
34
76
  style?: ComboStyle;
35
77
  [key: string]: unknown;
36
78
  }
37
79
  export interface EdgeData {
80
+ /**
81
+ * <zh/> 边 ID
82
+ *
83
+ * <en/> Edge ID
84
+ */
38
85
  id?: ID;
86
+ /**
87
+ * <zh/> 边源节点 ID
88
+ *
89
+ * <en/> Source node ID
90
+ */
39
91
  source: ID;
92
+ /**
93
+ * <zh/> 边目标节点 ID
94
+ *
95
+ * <en/> Target node ID
96
+ */
40
97
  target: ID;
98
+ /**
99
+ * <zh/> 边类型
100
+ *
101
+ * <en/> Edge type
102
+ */
103
+ type?: string;
104
+ /**
105
+ * <zh/> 边数据
106
+ *
107
+ * <en/> Edge data
108
+ */
41
109
  data?: Record<string, unknown>;
110
+ /**
111
+ * <zh/> 边样式
112
+ *
113
+ * <en/> Edge style
114
+ */
42
115
  style?: EdgeStyle;
43
116
  [key: string]: unknown;
44
117
  }
@@ -1,9 +1,8 @@
1
- import type { ID } from '@antv/graphlib';
2
1
  import type { BaseComboStyleProps } from '../../elements/combos';
2
+ import type { ID, State } from '../../types';
3
3
  import type { CallableObject } from '../../types/callable';
4
- import type { NodeData } from '../data';
4
+ import type { ComboData } from '../data';
5
5
  import type { AnimationOptions } from './animation';
6
- import type { BaseElementStyle } from './base';
7
6
  import type { PaletteOptions } from './palette';
8
7
  /**
9
8
  * <zh/> Combo 配置项
@@ -11,18 +10,24 @@ import type { PaletteOptions } from './palette';
11
10
  * <en/> Combo spec
12
11
  */
13
12
  export interface ComboOptions {
13
+ /**
14
+ * <zh/> Combo 类型
15
+ *
16
+ * <en/> Combo type
17
+ */
18
+ type?: string | ((datum: ComboData) => string);
14
19
  /**
15
20
  * <zh/> Combo 样式
16
21
  *
17
22
  * <en/> Combo style
18
23
  */
19
- style?: CallableObject<ComboStyle, NodeData>;
24
+ style?: CallableObject<ComboStyle, ComboData>;
20
25
  /**
21
26
  * <zh/> Combo 状态样式
22
27
  *
23
28
  * <en/> Combo state style
24
29
  */
25
- state?: Record<string, CallableObject<ComboStyle, NodeData>>;
30
+ state?: Record<string, CallableObject<ComboStyle, ComboData>>;
26
31
  /**
27
32
  * <zh/> Combo 动画
28
33
  *
@@ -42,7 +47,13 @@ export interface StaticComboOptions {
42
47
  animation?: AnimationOptions;
43
48
  palette?: PaletteOptions;
44
49
  }
45
- export interface ComboStyle extends BaseElementStyle, Partial<BaseComboStyleProps> {
50
+ export interface ComboStyle extends Partial<BaseComboStyleProps> {
51
+ /**
52
+ * <zh/> 初始状态
53
+ *
54
+ * <en/> Initial state
55
+ */
56
+ states?: State[];
46
57
  children?: ID[];
47
58
  [key: string]: any;
48
59
  }
@@ -1,8 +1,8 @@
1
1
  import type { BaseEdgeStyleProps } from '../../elements/edges';
2
+ import { State } from '../../types';
2
3
  import type { CallableObject } from '../../types/callable';
3
4
  import type { EdgeData } from '../data';
4
5
  import type { AnimationOptions } from './animation';
5
- import type { BaseElementStyle } from './base';
6
6
  import type { PaletteOptions } from './palette';
7
7
  /**
8
8
  * <zh/> 边配置项
@@ -10,6 +10,12 @@ import type { PaletteOptions } from './palette';
10
10
  * <en/> Edge spec
11
11
  */
12
12
  export interface EdgeOptions {
13
+ /**
14
+ * <zh/> 边类型
15
+ *
16
+ * <en/> Edge type
17
+ */
18
+ type?: string | ((datum: EdgeData) => string);
13
19
  /**
14
20
  * <zh/> 边样式
15
21
  *
@@ -41,6 +47,12 @@ export interface StaticEdgeOptions {
41
47
  animation?: AnimationOptions;
42
48
  palette?: PaletteOptions;
43
49
  }
44
- export interface EdgeStyle extends BaseElementStyle, Partial<BaseEdgeStyleProps> {
50
+ export interface EdgeStyle extends Partial<BaseEdgeStyleProps> {
51
+ /**
52
+ * <zh/> 初始状态
53
+ *
54
+ * <en/> Initial state
55
+ */
56
+ states?: State[];
45
57
  [key: string]: any;
46
58
  }
@@ -1,9 +1,8 @@
1
- import type { ID } from '@antv/graphlib';
2
1
  import type { BaseNodeStyleProps } from '../../elements/nodes';
2
+ import type { ID, State } from '../../types';
3
3
  import type { CallableObject } from '../../types/callable';
4
4
  import type { NodeData } from '../data';
5
5
  import type { AnimationOptions } from './animation';
6
- import type { BaseElementStyle } from './base';
7
6
  import type { PaletteOptions } from './palette';
8
7
  /**
9
8
  * <zh/> 节点配置项
@@ -11,6 +10,12 @@ import type { PaletteOptions } from './palette';
11
10
  * <en/> Node spec
12
11
  */
13
12
  export interface NodeOptions {
13
+ /**
14
+ * <zh/> 节点类型
15
+ *
16
+ * <en/> Node type
17
+ */
18
+ type?: string | ((datum: NodeData) => string);
14
19
  /**
15
20
  * <zh/> 节点样式
16
21
  *
@@ -42,7 +47,18 @@ export interface StaticNodeOptions {
42
47
  animation?: AnimationOptions;
43
48
  palette?: PaletteOptions;
44
49
  }
45
- export interface NodeStyle extends BaseElementStyle, Partial<BaseNodeStyleProps> {
50
+ export interface NodeStyle extends Partial<BaseNodeStyleProps> {
51
+ /**
52
+ * <zh/> 初始状态
53
+ *
54
+ * <en/> Initial state
55
+ */
56
+ states?: State[];
57
+ /**
58
+ * <zh/> 子节点 ID (树图专用)
59
+ *
60
+ * <en/> Child node ID (for tree graph)
61
+ */
46
62
  children?: ID[];
47
63
  [key: string]: any;
48
64
  }
@@ -8,6 +8,7 @@ type ThemeTokens = {
8
8
  nodeStroke: string;
9
9
  nodeBadgePalette?: string[];
10
10
  nodePaletteOptions?: PaletteOptions;
11
+ donutPaletteOptions?: PaletteOptions;
11
12
  edgeColor: string;
12
13
  edgeColorDisabled: string;
13
14
  edgePaletteOptions?: PaletteOptions;
@@ -1,8 +1,7 @@
1
1
  import type { PathStyleProps } from '@antv/g';
2
- import type { ID } from '@antv/graphlib';
3
2
  import type { RuntimeContext } from '../runtime/types';
4
3
  import type { EdgeData } from '../spec';
5
- import type { ElementDatum, ElementType } from '../types';
4
+ import type { ElementDatum, ElementType, ID } from '../types';
6
5
  import type { BaseTransformOptions } from './base-transform';
7
6
  import { BaseTransform } from './base-transform';
8
7
  import type { DrawData } from './types';
@@ -1,5 +1,5 @@
1
- import { ID } from '@antv/graphlib';
2
1
  import type { ComboData, EdgeData, NodeData } from '../spec';
2
+ import type { ID } from '../types';
3
3
  import type { BaseTransform, BaseTransformOptions } from './base-transform';
4
4
  export type BuiltInTransformOptions = BaseTransformOptions;
5
5
  export type Transform = BaseTransform<any>;
@@ -25,6 +25,6 @@ export type CallableValue<Returns, Param = Returns> = Returns | ((args: Param) =
25
25
  * fill: ({ model }) => model.value,
26
26
  * }
27
27
  */
28
- export type CallableObject<Obj extends Record<string, unknown>, T> = ((datum: T, index: number, data: T[]) => Obj) | {
29
- [K in keyof Obj]: Obj[K] | ((datum: T, index: number, data: T[]) => NonNullable<Obj[K]>);
28
+ export type CallableObject<Obj extends Record<string, unknown>, T> = ((datum: T) => Obj) | {
29
+ [K in keyof Obj]: Obj[K] | ((datum: T) => NonNullable<Obj[K]>);
30
30
  };
@@ -1,5 +1,5 @@
1
- import type { ID } from '@antv/graphlib';
2
1
  import type { ComboData, EdgeData, NodeData } from '../spec/data';
2
+ import type { ID } from '../types';
3
3
  export type DataID = {
4
4
  nodes?: ID[];
5
5
  edges?: ID[];
@@ -0,0 +1 @@
1
+ export type ID = string;
@@ -9,6 +9,7 @@ export type * from './element';
9
9
  export type * from './enum';
10
10
  export type * from './event';
11
11
  export type * from './graphlib';
12
+ export type * from './id';
12
13
  export type * from './node';
13
14
  export type * from './padding';
14
15
  export type * from './placement';
@@ -1,4 +1,4 @@
1
- import type { ElementData, ElementDatum } from './data';
1
+ import type { ElementDatum } from './data';
2
2
  /**
3
3
  * <zh/> 样式计算迭代上下文
4
4
  *
@@ -6,6 +6,4 @@ import type { ElementData, ElementDatum } from './data';
6
6
  */
7
7
  export type StyleIterationContext = {
8
8
  datum: ElementDatum;
9
- index: number;
10
- elementData: ElementData;
11
9
  };