@visactor/vchart-types 2.0.0-alpha.0 → 2.0.0-alpha.1

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 (255) hide show
  1. package/package.json +1 -1
  2. package/tsconfig.tsbuildinfo +1 -1
  3. package/types/animation/animate-manager.d.ts +0 -10
  4. package/types/animation/animation-planner.d.ts +13 -0
  5. package/types/animation/config.d.ts +5 -5
  6. package/types/animation/grammar-dector.d.ts +22 -0
  7. package/types/animation/index.d.ts +7 -0
  8. package/types/animation/interface.d.ts +14 -7
  9. package/types/animation/sequential-animate.d.ts +1 -0
  10. package/types/animation/state-transition.d.ts +1 -0
  11. package/types/animation/strategy/common.d.ts +17 -0
  12. package/types/animation/strategy/horizontal-bar-split.d.ts +11 -0
  13. package/types/animation/strategy/vertical-bar-split.d.ts +11 -0
  14. package/types/animation/utils.d.ts +2 -2
  15. package/types/chart/area/area.d.ts +1 -0
  16. package/types/chart/bar/bar.d.ts +1 -0
  17. package/types/chart/bar/index.d.ts +0 -1
  18. package/types/chart/bar/interface.d.ts +1 -5
  19. package/types/chart/base/base-chart.d.ts +12 -2
  20. package/types/chart/box-plot/box-plot.d.ts +1 -0
  21. package/types/chart/common/common.d.ts +1 -0
  22. package/types/chart/common/interface.d.ts +5 -5
  23. package/types/chart/funnel/index.d.ts +0 -1
  24. package/types/chart/funnel/interface.d.ts +1 -4
  25. package/types/chart/histogram/histogram.d.ts +1 -0
  26. package/types/chart/histogram/index.d.ts +0 -1
  27. package/types/chart/histogram/interface.d.ts +1 -4
  28. package/types/chart/index.d.ts +19 -17
  29. package/types/chart/interface/chart.d.ts +11 -1
  30. package/types/chart/interface/type.d.ts +1 -8
  31. package/types/chart/line/line.d.ts +1 -0
  32. package/types/chart/mosaic/mosaic.d.ts +1 -0
  33. package/types/chart/pictogram/interface.d.ts +1 -1
  34. package/types/chart/pie/index.d.ts +0 -1
  35. package/types/chart/pie/interface.d.ts +1 -5
  36. package/types/chart/progress/circular/circular.d.ts +1 -0
  37. package/types/chart/progress/linear/linear.d.ts +1 -0
  38. package/types/chart/radar/radar.d.ts +1 -0
  39. package/types/chart/range-area/range-area.d.ts +1 -0
  40. package/types/chart/range-column/index.d.ts +0 -1
  41. package/types/chart/range-column/interface.d.ts +1 -5
  42. package/types/chart/range-column/range-column.d.ts +1 -0
  43. package/types/chart/rose/rose.d.ts +1 -0
  44. package/types/chart/scatter/scatter.d.ts +1 -0
  45. package/types/chart/waterfall/waterfall.d.ts +1 -0
  46. package/types/chart/word-cloud/index.d.ts +0 -1
  47. package/types/chart/word-cloud/interface.d.ts +1 -5
  48. package/types/chart/word-cloud/word-cloud.d.ts +4 -8
  49. package/types/compile/interface/compiler.d.ts +2 -1
  50. package/types/compile/mark/compilable-mark.d.ts +1 -0
  51. package/types/compile/mark/interface.d.ts +9 -4
  52. package/types/compile/mark/mark-state-manager.d.ts +1 -0
  53. package/types/compile/morph.d.ts +3 -0
  54. package/types/component/axis/base-axis.d.ts +5 -0
  55. package/types/component/axis/cartesian/axis.d.ts +6 -13
  56. package/types/component/axis/cartesian/band-axis.d.ts +6 -0
  57. package/types/component/axis/cartesian/linear-axis.d.ts +2 -1
  58. package/types/component/axis/cartesian/log-axis.d.ts +6 -0
  59. package/types/component/axis/cartesian/symlog-axis.d.ts +6 -0
  60. package/types/component/axis/cartesian/time-axis.d.ts +5 -0
  61. package/types/component/axis/cartesian/util/common.d.ts +3 -1
  62. package/types/component/axis/interface/spec.d.ts +7 -2
  63. package/types/component/axis/mixin/band-axis-mixin.d.ts +1 -0
  64. package/types/component/axis/polar/band-axis.d.ts +6 -0
  65. package/types/component/axis/polar/linear-axis.d.ts +6 -0
  66. package/types/component/axis/polar/util/common.d.ts +4 -1
  67. package/types/component/axis/util.d.ts +2 -6
  68. package/types/component/base/base-component.d.ts +0 -3
  69. package/types/component/base/util.d.ts +1 -2
  70. package/types/component/brush/brush.d.ts +29 -26
  71. package/types/component/brush/interface.d.ts +2 -0
  72. package/types/component/common/trigger/desktop.d.ts +0 -2
  73. package/types/component/common/trigger/interface.d.ts +0 -2
  74. package/types/component/common/trigger/mobile.d.ts +0 -2
  75. package/types/component/crosshair/base.d.ts +1 -1
  76. package/types/component/crosshair/cartesian.d.ts +4 -1
  77. package/types/component/crosshair/interface/spec.d.ts +1 -1
  78. package/types/component/crosshair/polar.d.ts +4 -1
  79. package/types/component/crosshair/utils/cartesian.d.ts +11 -1
  80. package/types/component/crosshair/utils/common.d.ts +2 -3
  81. package/types/component/custom-mark/custom-mark.d.ts +1 -0
  82. package/types/component/data-zoom/data-zoom/data-zoom.d.ts +3 -0
  83. package/types/component/data-zoom/data-zoom/interface.d.ts +2 -3
  84. package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +3 -0
  85. package/types/component/index.d.ts +14 -8
  86. package/types/component/indicator/indicator.d.ts +3 -0
  87. package/types/component/interface/common.d.ts +0 -2
  88. package/types/component/interface/theme.d.ts +1 -3
  89. package/types/component/interface/type.d.ts +0 -1
  90. package/types/component/label/base-label.d.ts +4 -4
  91. package/types/component/label/interface.d.ts +10 -5
  92. package/types/component/label/total-label.d.ts +4 -1
  93. package/types/component/label/util.d.ts +1 -1
  94. package/types/component/legend/continuous/legend.d.ts +4 -0
  95. package/types/component/legend/discrete/legend.d.ts +3 -0
  96. package/types/component/legend/util.d.ts +1 -1
  97. package/types/component/marker/mark-area/cartesian-mark-area.d.ts +3 -0
  98. package/types/component/marker/mark-area/interface/theme.d.ts +4 -3
  99. package/types/component/marker/mark-area/polar-mark-area.d.ts +3 -0
  100. package/types/component/marker/mark-line/cartesian-mark-line.d.ts +3 -0
  101. package/types/component/marker/mark-line/interface/theme.d.ts +4 -3
  102. package/types/component/marker/mark-line/polar-mark-line.d.ts +3 -0
  103. package/types/component/marker/mark-point/cartesian-mark-point.d.ts +3 -0
  104. package/types/component/marker/mark-point/geo-mark-point.d.ts +3 -0
  105. package/types/component/marker/mark-point/interface/theme.d.ts +5 -2
  106. package/types/component/marker/mark-point/polar-mark-point.d.ts +3 -0
  107. package/types/component/marker/utils.d.ts +12 -0
  108. package/types/component/player/player.d.ts +3 -0
  109. package/types/component/title/title.d.ts +3 -0
  110. package/types/component/tooltip/constant.d.ts +6 -2
  111. package/types/component/tooltip/interface/common.d.ts +2 -1
  112. package/types/component/tooltip/processor/base.d.ts +4 -5
  113. package/types/component/tooltip/processor/dimension-tooltip.d.ts +1 -0
  114. package/types/component/tooltip/processor/group-tooltip.d.ts +1 -0
  115. package/types/component/tooltip/processor/interface.d.ts +11 -0
  116. package/types/component/tooltip/processor/mark-tooltip.d.ts +1 -0
  117. package/types/component/tooltip/processor/util.d.ts +1 -1
  118. package/types/component/tooltip/tooltip.d.ts +5 -2
  119. package/types/component/util.d.ts +1 -2
  120. package/types/constant/event.d.ts +2 -0
  121. package/types/core/factory.d.ts +16 -12
  122. package/types/core/index.d.ts +16 -1
  123. package/types/core/interface.d.ts +6 -1
  124. package/types/core/vchart.d.ts +2 -1
  125. package/types/data/transforms/circle-packing.d.ts +1 -1
  126. package/types/data/transforms/data-key.d.ts +1 -1
  127. package/types/data/transforms/flatten.d.ts +1 -1
  128. package/types/data/transforms/funnel.d.ts +1 -6
  129. package/types/data/transforms/pictogram.d.ts +2 -10
  130. package/types/data/transforms/sankey-links.d.ts +1 -2
  131. package/types/data/transforms/sankey-nodes.d.ts +1 -2
  132. package/types/data/transforms/sankey.d.ts +4 -4
  133. package/types/data/transforms/sunburst.d.ts +1 -1
  134. package/types/data/transforms/treemap.d.ts +1 -1
  135. package/types/data/transforms/venn.d.ts +1 -1
  136. package/types/event/event-dispatcher.d.ts +4 -1
  137. package/types/event/event.d.ts +4 -1
  138. package/types/event/events/dimension/util/cartesian.d.ts +2 -1
  139. package/types/event/events/index.d.ts +1 -5
  140. package/types/event/index.d.ts +1 -1
  141. package/types/event/interface.d.ts +13 -4
  142. package/types/index-harmony-simple.d.ts +2 -3
  143. package/types/index-harmony.d.ts +1 -1
  144. package/types/index.d.ts +12 -0
  145. package/types/interaction/index.d.ts +3 -2
  146. package/types/interaction/triggers/enum.d.ts +1 -3
  147. package/types/interaction/zoom/zoomable.d.ts +4 -0
  148. package/types/layout/base-layout.d.ts +12 -9
  149. package/types/layout/index.d.ts +4 -4
  150. package/types/layout/interface.d.ts +6 -1
  151. package/types/layout/layout-item.d.ts +5 -0
  152. package/types/layout/util.d.ts +17 -4
  153. package/types/mark/arc.d.ts +1 -1
  154. package/types/mark/base/base-line.d.ts +11 -2
  155. package/types/mark/base/base-mark.d.ts +46 -17
  156. package/types/mark/cell.d.ts +2 -2
  157. package/types/mark/component.d.ts +1 -0
  158. package/types/mark/glyph.d.ts +1 -0
  159. package/types/mark/group.d.ts +2 -1
  160. package/types/mark/index.d.ts +8 -7
  161. package/types/mark/interface/common.d.ts +20 -0
  162. package/types/mark/interface/mark.d.ts +2 -4
  163. package/types/mark/interface/type.d.ts +0 -3
  164. package/types/mark/rule.d.ts +2 -2
  165. package/types/mark/symbol.d.ts +2 -3
  166. package/types/mark/text.d.ts +2 -2
  167. package/types/mark/transform/symbol-overlap.d.ts +0 -1
  168. package/types/mark/utils/common.d.ts +0 -1
  169. package/types/model/base-model.d.ts +3 -2
  170. package/types/model/interface.d.ts +7 -2
  171. package/types/model/layout-model.d.ts +2 -1
  172. package/types/plugin/chart/index.d.ts +1 -0
  173. package/types/plugin/components/tooltip-handler/utils/attribute.d.ts +2 -3
  174. package/types/plugin/components/tooltip-handler/utils/position.d.ts +1 -12
  175. package/types/plugin/other.d.ts +0 -1
  176. package/types/region/interface.d.ts +0 -2
  177. package/types/region/region.d.ts +0 -2
  178. package/types/series/area/area.d.ts +2 -1
  179. package/types/series/bar/animation.d.ts +0 -1
  180. package/types/series/bar/bar.d.ts +6 -6
  181. package/types/series/bar/constant.d.ts +0 -1
  182. package/types/series/bar/interface.d.ts +1 -7
  183. package/types/series/base/base-series-transformer.d.ts +1 -1
  184. package/types/series/base/base-series.d.ts +2 -3
  185. package/types/series/box-plot/animation.d.ts +52 -0
  186. package/types/series/box-plot/box-plot.d.ts +3 -0
  187. package/types/series/circle-packing/circle-packing.d.ts +3 -0
  188. package/types/series/correlation/correlation.d.ts +3 -0
  189. package/types/series/dot/dot.d.ts +3 -0
  190. package/types/series/funnel/constant.d.ts +0 -1
  191. package/types/series/funnel/funnel.d.ts +7 -9
  192. package/types/series/funnel/interface.d.ts +2 -13
  193. package/types/series/funnel/tooltip-helper.d.ts +3 -1
  194. package/types/series/gauge/gauge-pointer.d.ts +3 -0
  195. package/types/series/gauge/gauge.d.ts +3 -0
  196. package/types/series/geo/geo.d.ts +1 -2
  197. package/types/series/heatmap/heatmap.d.ts +3 -0
  198. package/types/series/index.d.ts +24 -19
  199. package/types/series/interface/theme.d.ts +5 -16
  200. package/types/series/interface/type.d.ts +1 -11
  201. package/types/series/line/line.d.ts +3 -0
  202. package/types/series/link/link.d.ts +3 -0
  203. package/types/series/liquid/liquid.d.ts +3 -0
  204. package/types/series/map/map.d.ts +3 -0
  205. package/types/series/mosaic/mosaic.d.ts +2 -0
  206. package/types/series/pictogram/pictogram.d.ts +19 -13
  207. package/types/series/pictogram/tooltip-helper.d.ts +2 -2
  208. package/types/series/pie/animation/animation.d.ts +2 -3
  209. package/types/series/pie/constant.d.ts +0 -1
  210. package/types/series/pie/interface.d.ts +1 -11
  211. package/types/series/pie/pie.d.ts +5 -5
  212. package/types/series/polar/animation.d.ts +2 -4
  213. package/types/series/polar/progress-like/interface.d.ts +1 -0
  214. package/types/series/progress/circular/circular.d.ts +3 -0
  215. package/types/series/progress/linear/animation.d.ts +1 -1
  216. package/types/series/progress/linear/interface.d.ts +1 -0
  217. package/types/series/progress/linear/linear.d.ts +3 -0
  218. package/types/series/radar/animation.d.ts +1 -1
  219. package/types/series/radar/radar.d.ts +3 -0
  220. package/types/series/range-column/constant.d.ts +0 -1
  221. package/types/series/range-column/interface.d.ts +0 -3
  222. package/types/series/range-column/range-column.d.ts +5 -4
  223. package/types/series/rose/rose.d.ts +3 -0
  224. package/types/series/sankey/animation.d.ts +13 -0
  225. package/types/series/sankey/interface.d.ts +0 -1
  226. package/types/series/sankey/sankey.d.ts +3 -0
  227. package/types/series/scatter/scatter.d.ts +3 -0
  228. package/types/series/sunburst/interface.d.ts +1 -1
  229. package/types/series/sunburst/sunburst.d.ts +3 -0
  230. package/types/series/treemap/interface.d.ts +1 -1
  231. package/types/series/treemap/treemap.d.ts +3 -0
  232. package/types/series/venn/animation.d.ts +11 -0
  233. package/types/series/venn/venn.d.ts +3 -0
  234. package/types/series/waterfall/waterfall.d.ts +4 -0
  235. package/types/series/word-cloud/animation.d.ts +1 -3
  236. package/types/series/word-cloud/base.d.ts +3 -2
  237. package/types/series/word-cloud/interface.d.ts +1 -19
  238. package/types/theme/builtin/common/component/axis/cartesian-axis.d.ts +0 -1
  239. package/types/theme/builtin/common/series/funnel.d.ts +2 -2
  240. package/types/theme/builtin/common/series/word-cloud.d.ts +1 -2
  241. package/types/theme/builtin/index.d.ts +3 -1
  242. package/types/theme/color-scheme/util.d.ts +1 -1
  243. package/types/typings/spec/chart.d.ts +6 -12
  244. package/types/typings/spec/common.d.ts +3 -5
  245. package/types/typings/tooltip/position.d.ts +1 -1
  246. package/types/typings/visual.d.ts +2 -11
  247. package/types/util/mark.d.ts +1 -1
  248. package/types/util/region.d.ts +5 -0
  249. package/types/util/scale.d.ts +1 -0
  250. package/types/util/theme/common.d.ts +1 -1
  251. package/types/util/theme/merge-theme.d.ts +2 -2
  252. package/types/util/theme/preprocess.d.ts +1 -2
  253. package/types/vrender-tools.d.ts +1 -0
  254. package/types/interaction/triggers/element-highlight-by-graphic-name.d.ts +0 -13
  255. package/types/interaction/triggers/element-select-by-graphic-name.d.ts +0 -8
@@ -1,6 +1,6 @@
1
1
  import type { IBoundsLike } from '@visactor/vutils';
2
2
  import type { StringOrNumber } from '../typings/common';
3
- import type { IOrientType, IRect } from '../typings/space';
3
+ import type { IOrientType, IPadding, IRect } from '../typings/space';
4
4
  import type { IPoint } from '../typings/coordinate';
5
5
  import type { ILayoutNumber, ILayoutPaddingSpec, ILayoutPoint, ILayoutRect, ILayoutType } from '../typings/layout';
6
6
  import type { ILayoutModel } from '../model/interface';
@@ -46,6 +46,8 @@ export interface ILayoutConstructor {
46
46
  }
47
47
  export interface ILayoutItem {
48
48
  readonly type: string;
49
+ readonly willLayoutTag: boolean;
50
+ readonly lastComputeRect: ILayoutRect;
49
51
  directionStr?: 'l2r' | 'r2l' | 't2b' | 'b2t';
50
52
  layoutClip: boolean;
51
53
  layoutType: ILayoutType;
@@ -82,6 +84,8 @@ export interface ILayoutItem {
82
84
  computeBoundsInRect: (rect: ILayoutRect) => ILayoutRect;
83
85
  setLayoutStartPosition: (pos: Partial<IPoint>) => void;
84
86
  absoluteLayoutInRect: (rect: IRect) => void;
87
+ clearWillLayoutTag: () => void;
88
+ setWillLayoutTag: () => void;
85
89
  }
86
90
  export interface ILayoutItemSpec {
87
91
  layoutType?: ILayoutType;
@@ -112,4 +116,5 @@ export interface ILayoutItemInitOption {
112
116
  layoutOrient?: IOrientType;
113
117
  transformLayoutRect?: (rect: ILayoutRect) => ILayoutRect;
114
118
  transformLayoutPosition?: (pos: Partial<IPoint>) => Partial<IPoint>;
119
+ transformLayoutPadding?: (padding: IPadding) => IPadding;
115
120
  }
@@ -26,6 +26,7 @@ export declare class LayoutItem implements ILayoutItem {
26
26
  get maxHeight(): number;
27
27
  set maxHeight(v: number);
28
28
  protected _lastComputeRect: ILayoutRect;
29
+ get lastComputeRect(): ILayoutRect;
29
30
  protected _lastComputeOutBounds: IBoundsLike;
30
31
  getLastComputeOutBounds(): IBoundsLike;
31
32
  getLayoutRect: () => ILayoutRect;
@@ -47,6 +48,8 @@ export declare class LayoutItem implements ILayoutItem {
47
48
  get model(): ILayoutModel;
48
49
  get type(): string;
49
50
  protected _option: ILayoutItemInitOption;
51
+ protected _willLayoutTag: boolean;
52
+ get willLayoutTag(): boolean;
50
53
  constructor(model: ILayoutModel, option: ILayoutItemInitOption);
51
54
  private _setLayoutAttributeFromSpec;
52
55
  setAttrFromSpec(spec: ILayoutItemSpec, chartViewRect: ILayoutRect): void;
@@ -68,4 +71,6 @@ export declare class LayoutItem implements ILayoutItem {
68
71
  computeBoundsInRect(rect: ILayoutRect): ILayoutRect;
69
72
  getModelId(): number;
70
73
  getModelVisible(): boolean;
74
+ setWillLayoutTag(): void;
75
+ clearWillLayoutTag(): void;
71
76
  }
@@ -1,6 +1,19 @@
1
1
  import type { Layout } from './base-layout';
2
2
  import type { ILayoutItem } from './interface';
3
- export declare function layoutLeftInlineItems(items: ILayoutItem[], layout: Layout, limitHeight: number): void;
4
- export declare function layoutRightInlineItems(items: ILayoutItem[], layout: Layout, limitHeight: number): void;
5
- export declare function layoutTopInlineItems(items: ILayoutItem[], layout: Layout, limitWidth: number): void;
6
- export declare function layoutBottomInlineItems(items: ILayoutItem[], layout: Layout, limitWidth: number): void;
3
+ import type { ILayoutRect } from '../typings';
4
+ export type IRecompute = {
5
+ recomputeWidth: boolean;
6
+ recomputeHeight: boolean;
7
+ };
8
+ export declare function layoutLeftInlineItems(items: ILayoutItem[], layout: Layout, limitHeight: number, recompute: IRecompute): void;
9
+ export declare function layoutRightInlineItems(items: ILayoutItem[], layout: Layout, limitHeight: number, recompute: IRecompute): void;
10
+ export declare function layoutTopInlineItems(items: ILayoutItem[], layout: Layout, limitWidth: number, recompute: IRecompute): void;
11
+ export declare function layoutBottomInlineItems(items: ILayoutItem[], layout: Layout, limitWidth: number, recompute: IRecompute): void;
12
+ export declare function getItemLayoutWithTag(item: ILayoutItem, layout: Layout, recompute: IRecompute, setRectToItem?: boolean): {
13
+ layoutRect: import("@visactor/vutils").IBoundsLike | {
14
+ width: number;
15
+ height: number;
16
+ };
17
+ rect: ILayoutRect;
18
+ layoutTag: boolean;
19
+ };
@@ -3,7 +3,7 @@ import { BaseMark } from './base/base-mark';
3
3
  import type { IArcMark, IMarkOption, IMarkRaw, IMarkStyle } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
5
  export declare class BaseArcMark<T extends IArcMarkSpec> extends BaseMark<T> implements IMarkRaw<T> {
6
- readonly type: MarkTypeEnum;
6
+ readonly type: string;
7
7
  _unCompileChannel: {
8
8
  centerOffset: boolean;
9
9
  radiusOffset: boolean;
@@ -2,9 +2,9 @@ import type { StateValueType } from '../../compile/mark';
2
2
  import type { ConvertToMarkStyleSpec, ILineLikeMarkSpec } from '../../typings/visual';
3
3
  import type { IPointLike } from '@visactor/vutils';
4
4
  import { BaseMark } from './base-mark';
5
- import type { IMarkGraphic, IMarkStyle } from '../interface';
5
+ import { type IMarkGraphic, type IMarkStyle } from '../interface';
6
6
  import type { Datum } from '../../typings/common';
7
- import type { ILine } from '@visactor/vrender-core';
7
+ import type { IGroup, ILine } from '@visactor/vrender-core';
8
8
  import type { IMarkSpec } from '../../typings/spec/common';
9
9
  export declare const LINE_SEGMENT_ATTRIBUTES: string[];
10
10
  export declare abstract class BaseLineMark<T extends ILineLikeMarkSpec = ILineLikeMarkSpec> extends BaseMark<T> {
@@ -19,4 +19,13 @@ export declare abstract class BaseLineMark<T extends ILineLikeMarkSpec = ILineLi
19
19
  _runPointsEncoder(newStyles: Record<string, (datum: Datum) => any>, g: IMarkGraphic, attrs?: any): any;
20
20
  _runEncoderOfGraphic(newStyles: Record<string, (datum: Datum) => any>, g: IMarkGraphic, attrs?: any): any;
21
21
  protected _getDataByKey(data: Datum[]): import("../interface").GroupedData<Datum>;
22
+ protected _runProgressiveJoin(): {
23
+ graphicsByGroup: {
24
+ [x: string]: IMarkGraphic[];
25
+ };
26
+ graphics: IMarkGraphic[];
27
+ needUpdate: boolean;
28
+ };
29
+ protected _setCommonAttributesToTheme(g: IMarkGraphic): void;
30
+ protected _addProgressiveGraphic(parent: IGroup, g: IMarkGraphic): void;
22
31
  }
@@ -2,15 +2,14 @@ import { type IModelMarkAttributeContext } from '../../compile/mark/interface';
2
2
  import type { Datum, IMarkSpec, ICommonSpec, ValueType, StringOrNumber, Maybe } from '../../typings';
3
3
  import type { DataView } from '@visactor/vdataset';
4
4
  import { MarkTypeEnum } from '../interface';
5
- import type { IMarkRaw, IMarkStateStyle, IMarkStyle, IMark, IMarkOption, StyleConvert, MarkInputStyle, GroupedData, IAttrs, IMarkGraphic, MarkType } from '../interface';
6
- import { MarkStateManager } from '../../compile/mark';
7
- import type { ICompilableMark, IMarkCompileOption, IMarkConfig, StateValueType } from '../../compile/mark';
5
+ import type { IMarkRaw, IMarkStateStyle, IMarkStyle, IMark, IMarkOption, StyleConvert, MarkInputStyle, GroupedData, IAttrs, IMarkGraphic, ProgressiveContext, IProgressiveTransformResult, MarkType, AnimationStateValues } from '../interface';
6
+ import type { ICompilableMark, IMarkCompileOption, IMarkConfig, IMarkStateManager, StateValueType } from '../../compile/mark/interface';
8
7
  import type { ICompilableInitOption } from '../../compile/interface';
9
- import type { IGroupGraphicAttribute, IGroup } from '@visactor/vrender-core';
8
+ import type { IGroupGraphicAttribute, IGroup, IGraphic } from '@visactor/vrender-core';
10
9
  import { GrammarItem } from '../../compile/grammar-item';
11
10
  import type { IModel } from '../../model/interface';
12
11
  import type { ICompilableData } from '../../compile/data/interface';
13
- import type { MarkAnimationSpec } from '../../animation/interface';
12
+ import { type MarkAnimationSpec } from '../../animation/interface';
14
13
  export type ExChannelCall = (key: string | number | symbol, datum: Datum, states: StateValueType, baseValue: unknown) => unknown;
15
14
  export declare class BaseMark<T extends ICommonSpec> extends GrammarItem implements IMarkRaw<T> {
16
15
  readonly type: MarkType;
@@ -36,7 +35,7 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
36
35
  getData(): ICompilableData;
37
36
  setData(d?: ICompilableData): void;
38
37
  stateStyle: IMarkStateStyle<T>;
39
- state: MarkStateManager;
38
+ state: IMarkStateManager;
40
39
  protected _unCompileChannel: {
41
40
  [key in string]: boolean;
42
41
  };
@@ -52,6 +51,7 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
52
51
  protected _stateSort?: (stateA: string, stateB: string) => number;
53
52
  protected _product: Maybe<IGroup>;
54
53
  getProduct(): IGroup;
54
+ protected _lastMark?: IMark;
55
55
  protected initMarkData(option: ICompilableInitOption): void;
56
56
  protected _compileProduct(option?: IMarkCompileOption): void;
57
57
  protected _initProduct(group?: IGroup): void;
@@ -109,11 +109,17 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
109
109
  private _computeBorderAttr;
110
110
  protected _dataByGroup: GroupedData<Datum>;
111
111
  protected _dataByKey: GroupedData<Datum>;
112
+ protected _prevDataByKey: GroupedData<Datum>;
112
113
  protected _graphicMap: Map<string, IMarkGraphic>;
113
114
  protected _graphics: IMarkGraphic[];
114
115
  protected _keyGetter: (datum: Datum) => string;
115
116
  protected _groupKeyGetter: (datum: Datum) => string;
116
- private renderContext?;
117
+ protected renderContext?: {
118
+ parameters?: any;
119
+ progressive?: ProgressiveContext;
120
+ beforeTransformProgressive?: IProgressiveTransformResult;
121
+ };
122
+ protected _attrsByGroup?: Record<string, T>;
117
123
  protected _getDataByKey(data: Datum[]): GroupedData<Datum>;
118
124
  protected _getCommonContext(): {
119
125
  markType: MarkTypeEnum;
@@ -122,35 +128,58 @@ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem impleme
122
128
  markUserId: StringOrNumber;
123
129
  modelUserId: StringOrNumber;
124
130
  };
131
+ prepareMorph(mark: IMark): void;
125
132
  reuse(mark: IMark): void;
133
+ private _parseProgressiveContext;
126
134
  getGraphics(): IMarkGraphic[];
127
- protected _createGraphic(attrs?: any): IMarkGraphic;
135
+ protected _createGraphic(attrs?: any): IGraphic;
128
136
  protected _runGroupData(data: Datum[]): void;
137
+ protected createAnimationStateList(type: string, animationConfig: Partial<MarkAnimationSpec>): any;
138
+ protected tryRunMorphing(graphics: IMarkGraphic[]): boolean;
139
+ protected _runStateAnimation(graphics: IMarkGraphic[]): void;
129
140
  protected _runJoin(data: Datum[]): void;
130
141
  _runEncoderOfGraphic(styles: Record<string, (datum: Datum) => any>, g: IMarkGraphic, attrs?: any): any;
131
142
  _runGroupEncoder(groupStyles: Record<string, (datum: Datum) => any>): any;
132
143
  protected _transformGraphicAttributes(g: IMarkGraphic, attrs: any, groupAttrs?: any): any;
133
- protected _separateNormalStyle(normalStyle: Partial<IAttrs<T>>, splitGroupEncoder?: boolean): {
134
- updateStyles: Record<string, (datum: Datum) => any>;
135
- groupStyles: Record<string, (datum: Datum) => any>;
144
+ protected _separateNormalStyle(normalStyle: Partial<IAttrs<T>>): {
145
+ updateStyles: {};
146
+ groupStyles: {};
136
147
  };
137
- protected _getEncoderByState: (stateName: string) => Record<string, (datum: Datum) => any>;
148
+ protected _getEncoderOfStyle: (stateName: string, style: Partial<IAttrs<T>>) => Record<string, (datum: Datum) => any>;
138
149
  protected _setGraphicFromMarkConfig: (g: IMarkGraphic) => void;
139
150
  protected _setStateOfGraphic: (g: IMarkGraphic) => void;
140
- protected _runEncoder(splitGroupEncoder?: boolean): void;
141
- protected _runState(): void;
151
+ protected _addProgressiveGraphic(parent: IGroup, g: IMarkGraphic): void;
152
+ protected _runEncoder(graphics: IMarkGraphic[], noGroupEncode?: boolean): void;
153
+ protected _runApplyGraphic(graphics: IMarkGraphic[]): void;
154
+ protected _updateEncoderByState(): void;
155
+ protected _runState(graphics: IMarkGraphic[]): void;
142
156
  protected _getAttrsFromConfig(attrs?: IGroupGraphicAttribute): IGroupGraphicAttribute;
143
157
  protected _updateAttrsOfGroup(): void;
144
- protected runBeforeTransform(data: Datum[]): Datum[];
158
+ protected _runBeforeTransform(data: Datum[]): Datum[];
159
+ protected _runEncoderTransform(data: Datum[], isProgressive: boolean): Datum[];
145
160
  protected _runMainTasks(): void;
146
161
  render(): void;
147
162
  updateMarkState(key: string): void;
148
- protected _cleanExitGraphics(): void;
163
+ clearExitGraphics(): void;
149
164
  isProgressive(): boolean;
150
165
  canAnimateAfterProgressive(): boolean;
151
166
  isDoingProgressive(): boolean;
152
167
  clearProgressive(): void;
153
168
  restartProgressive(): void;
154
- protected renderBeforeProgressive(): void;
169
+ private _runBeforeProgressive;
170
+ protected _runProgressiveJoin(): {
171
+ graphicsByGroup?: Record<string, IMarkGraphic[]>;
172
+ graphics?: IMarkGraphic[];
173
+ needUpdate?: boolean;
174
+ };
175
+ protected _createIncrementalGraphics(): void;
176
+ protected _setCommonAttributesToTheme(g: IMarkGraphic): void;
177
+ protected _runProgressiveEncoder(graphics: IMarkGraphic[]): void;
178
+ protected _runProgressiveApplyGraphic(graphics: IMarkGraphic[]): void;
179
+ protected _runProgressiveStep(): void;
155
180
  renderProgressive(): void;
181
+ updateAnimationState(callback: (graphic: IMarkGraphic) => AnimationStateValues): void;
182
+ hasAnimationByState(state: keyof MarkAnimationSpec): boolean;
183
+ hasAnimation(): boolean;
184
+ runAnimation(): void;
156
185
  }
@@ -1,5 +1,5 @@
1
1
  import type { ICellMarkSpec } from '../typings';
2
- import type { ICellMark, IMarkStyle } from './interface';
2
+ import type { ICellMark, IMarkGraphic, IMarkStyle } from './interface';
3
3
  import { MarkTypeEnum } from './interface/type';
4
4
  import type { IGraphic } from '@visactor/vrender-core';
5
5
  import { BaseMark } from './base';
@@ -8,6 +8,6 @@ export declare class CellMark extends BaseMark<ICellMarkSpec> implements ICellMa
8
8
  readonly type = MarkTypeEnum.cell;
9
9
  protected _getDefaultStyle(): IMarkStyle<ICellMarkSpec>;
10
10
  protected _createGraphic(attrs?: any): IGraphic;
11
- protected _transformGraphicAttributes(g: IGraphic, attrs: any, groupAttrs?: any): any;
11
+ protected _transformGraphicAttributes(g: IMarkGraphic, attrs: any, groupAttrs?: any): any;
12
12
  }
13
13
  export declare const registerCellMark: () => void;
@@ -12,6 +12,7 @@ export declare class ComponentMark extends BaseMark<ICommonSpec> implements ICom
12
12
  constructor(name: string, option: IMarkOption);
13
13
  protected _getDefaultStyle(): IMarkStyle<ICommonSpec>;
14
14
  getComponent(): IGraphic<Partial<import("@visactor/vrender-core").IGraphicAttribute>>;
15
+ clearComponent(): void;
15
16
  protected _getAttrsFromConfig(attrs?: IGroupGraphicAttribute): IGroupGraphicAttribute;
16
17
  protected _attributesTransform: (attrs: any) => any;
17
18
  setAttributeTransform(t: (attrs: any) => any): void;
@@ -25,5 +25,6 @@ export declare abstract class GlyphMark<T extends ICommonSpec = ICommonSpec, Cfg
25
25
  private _onGlyphAttributeUpdate;
26
26
  protected _setStateOfGraphic: (g: IMarkGraphic) => void;
27
27
  protected _createGraphic(attrs?: IGlyphGraphicAttribute): IGraphic;
28
+ protected _runProgressiveEncoder(graphics: IMarkGraphic[]): void;
28
29
  }
29
30
  export declare const registerGlyphMark: () => void;
@@ -1,7 +1,7 @@
1
1
  import type { Maybe } from '../typings';
2
2
  import type { IGroupMarkSpec } from '../typings/visual';
3
3
  import { BaseMark } from './base/base-mark';
4
- import type { IGroupMark, IMark, IMarkGraphic, MarkType } from './interface';
4
+ import type { AnimationStateValues, IGroupMark, IMark, IMarkGraphic, MarkType } from './interface';
5
5
  import { MarkTypeEnum } from './interface/type';
6
6
  import { type IMarkCompileOption } from '../compile/mark';
7
7
  import type { IGroup, IGroupGraphicAttribute } from '@visactor/vrender-core';
@@ -24,6 +24,7 @@ export declare class GroupMark extends BaseMark<IGroupMarkSpec> implements IGrou
24
24
  getGraphics(): IMarkGraphic[];
25
25
  protected _renderSelf(): void;
26
26
  render(): void;
27
+ updateAnimationState(callback: (g: IMarkGraphic) => AnimationStateValues): void;
27
28
  release(): void;
28
29
  }
29
30
  export declare const registerGroupMark: () => void;
@@ -5,19 +5,20 @@ import { RuleMark, registerRuleMark } from './rule';
5
5
  import { TextMark, registerTextMark } from './text';
6
6
  import { AreaMark, registerAreaMark } from './area';
7
7
  import { RectMark, registerRectMark } from './rect';
8
- import { Rect3dMark, registerRect3dMark } from './rect-3d';
9
8
  import { PathMark, registerPathMark } from './path';
10
- import { ArcMark, registerArcMark } from './arc';
11
- import { Arc3dMark, registerArc3dMark } from './arc-3d';
9
+ import { ArcMark, BaseArcMark, registerArcMark } from './arc';
12
10
  import { ComponentMark, registerComponentMark } from './component';
13
11
  import { RippleMark, registerRippleMark } from './ripple';
14
12
  import { BaseMark } from './base';
15
13
  import { PolygonMark, registerPolygonMark } from './polygon/polygon';
16
- import { Pyramid3dMark, registerPyramid3dMark } from './polygon/pyramid-3d';
17
14
  import { ImageMark, registerImageMark } from './image';
18
15
  import { registerMarkFilterTransform } from './transform/filter';
19
16
  import { registerMarkMapTransform } from './transform/map';
20
- export type { IBoxPlotMarkSpec, ILineMarkSpec, ISymbolMarkSpec, IGroupMarkSpec, IRuleMarkSpec, ITextMarkSpec, IAreaMarkSpec, IRect3dMarkSpec, IRectMarkSpec, IPathMarkSpec, IArcMarkSpec, IArc3dMarkSpec, ICommonSpec, IPolygonMarkSpec, IPyramid3dMarkSpec, ILinkPathMarkSpec, IRippleMarkSpec, ICellMarkSpec, ILiquidMarkSpec, ConvertToMarkStyleSpec } from '../typings/visual';
21
- export { LineMark, SymbolMark, GroupMark, RuleMark, TextMark, AreaMark, Rect3dMark, RectMark, PathMark, Arc3dMark, ArcMark, ComponentMark, PolygonMark, Pyramid3dMark, RippleMark, ImageMark, BaseMark };
22
- export { registerLineMark, registerSymbolMark, registerGroupMark, registerRuleMark, registerTextMark, registerAreaMark, registerRectMark, registerRect3dMark, registerPathMark, registerArcMark, registerArc3dMark, registerPolygonMark, registerPyramid3dMark, registerRippleMark, registerImageMark, registerComponentMark, registerMarkMapTransform, registerMarkFilterTransform };
17
+ import { BasePolygonMark } from './polygon/base-polygon';
18
+ import { MarkTypeEnum } from './interface/type';
19
+ export type { IBoxPlotMarkSpec, ILineMarkSpec, ISymbolMarkSpec, IGroupMarkSpec, IRuleMarkSpec, ITextMarkSpec, IAreaMarkSpec, IRectMarkSpec, IPathMarkSpec, IArcMarkSpec, ICommonSpec, IPolygonMarkSpec, ILinkPathMarkSpec, IRippleMarkSpec, ICellMarkSpec, ILiquidMarkSpec, ConvertToMarkStyleSpec } from '../typings/visual';
20
+ export type { IMarkRaw, IMark, IMarkStyle } from './interface/common';
21
+ export type { ITextMark, ILabelMark, IRectMark, IRuleMark, IImageMark, IGroupMark } from './interface/mark';
22
+ export { MarkTypeEnum, LineMark, SymbolMark, GroupMark, RuleMark, TextMark, AreaMark, RectMark, PathMark, BaseArcMark, ArcMark, ComponentMark, BasePolygonMark, PolygonMark, RippleMark, ImageMark, BaseMark };
23
+ export { registerLineMark, registerSymbolMark, registerGroupMark, registerRuleMark, registerTextMark, registerAreaMark, registerRectMark, registerPathMark, registerArcMark, registerPolygonMark, registerRippleMark, registerImageMark, registerComponentMark, registerMarkMapTransform, registerMarkFilterTransform };
23
24
  export declare const registerAllMarks: () => void;
@@ -7,6 +7,7 @@ import type { ICompilableMark, ICompilableMarkOption, IMarkConfig, IModelMarkAtt
7
7
  import type { Datum, StringOrNumber } from '../../typings';
8
8
  import type { IGraphic } from '@visactor/vrender-core';
9
9
  import type { IGroupMark } from './mark';
10
+ import type { IAnimationConfig } from '../../animation/interface';
10
11
  export interface VisualScaleType {
11
12
  scale: IBaseScale;
12
13
  field: StringOrNumber;
@@ -34,6 +35,7 @@ export type IMarkStyle<T extends ICommonSpec> = {
34
35
  [key in keyof T]: MarkInputStyle<T[key]>;
35
36
  };
36
37
  export type DiffStateValues = 'update' | 'enter' | 'exit';
38
+ export type AnimationStateValues = 'appear' | 'enter' | 'update' | 'exit' | 'disappear';
37
39
  export interface IGraphicContext {
38
40
  markType: MarkTypeEnum;
39
41
  markId: number;
@@ -41,15 +43,29 @@ export interface IGraphicContext {
41
43
  markUserId?: number | string;
42
44
  modelUserId?: number | string;
43
45
  diffState?: DiffStateValues;
46
+ reusing?: boolean;
47
+ lastAttrs?: Record<string, any>;
48
+ indexKey?: string;
49
+ diffAttrs?: Record<string, any>;
50
+ finalAttrs?: Record<string, any>;
51
+ fieldX?: string[];
52
+ originalFieldX?: string[];
53
+ fieldY?: string[];
54
+ originalFieldY?: string[];
55
+ animationState?: AnimationStateValues;
44
56
  data?: Datum[];
45
57
  uniqueKey?: string;
46
58
  key?: string;
47
59
  groupKey?: string;
48
60
  states?: string[];
61
+ graphicCount?: number;
62
+ graphicIndex?: number;
63
+ stateAnimateConfig?: IAnimationConfig | IAnimationConfig[];
49
64
  }
50
65
  export interface IMarkGraphic extends IGraphic {
51
66
  runtimeStateCache?: Record<string, any>;
52
67
  context?: IGraphicContext;
68
+ isExiting?: boolean;
53
69
  }
54
70
  export interface IMarkRaw<T extends ICommonSpec> extends ICompilableMark {
55
71
  readonly stateStyle: IMarkStateStyle<T>;
@@ -67,12 +83,16 @@ export interface IMarkRaw<T extends ICommonSpec> extends ICompilableMark {
67
83
  render: () => void;
68
84
  getGraphics: () => IMarkGraphic[];
69
85
  reuse: (mark: IMark) => void;
86
+ prepareMorph: (mark: IMark) => void;
87
+ clearExitGraphics: () => void;
70
88
  isProgressive: () => boolean;
71
89
  isDoingProgressive: () => boolean;
72
90
  clearProgressive: () => void;
73
91
  restartProgressive: () => void;
74
92
  renderProgressive: () => void;
75
93
  canAnimateAfterProgressive: () => boolean;
94
+ updateAnimationState: (callback: (graphic: IMarkGraphic) => AnimationStateValues) => void;
95
+ runAnimation: () => void;
76
96
  }
77
97
  export type IMark = IMarkRaw<ICommonSpec>;
78
98
  export interface ICompileMarkConfig extends IMarkConfig {
@@ -1,11 +1,12 @@
1
1
  import type { IGraphic } from '@visactor/vrender-core';
2
2
  import type { IMarkSpec } from '../../typings';
3
- import type { IArc3dMarkSpec, IArcMarkSpec, IAreaMarkSpec, IBoxPlotMarkSpec, ICellMarkSpec, ICommonSpec, IComposedTextMarkSpec, IGroupMarkSpec, IImageMarkSpec, ILineMarkSpec, ILinkPathMarkSpec, IPathMarkSpec, IPolygonMarkSpec, IPyramid3dMarkSpec, IRect3dMarkSpec, IRectMarkSpec, IRippleMarkSpec, IRuleMarkSpec, ISymbolMarkSpec } from '../../typings/visual';
3
+ import type { IArcMarkSpec, IAreaMarkSpec, IBoxPlotMarkSpec, ICellMarkSpec, ICommonSpec, IComposedTextMarkSpec, IGroupMarkSpec, IImageMarkSpec, ILineMarkSpec, ILinkPathMarkSpec, IPathMarkSpec, IPolygonMarkSpec, IRectMarkSpec, IRippleMarkSpec, IRuleMarkSpec, ISymbolMarkSpec } from '../../typings/visual';
4
4
  import type { IMark, IMarkRaw } from './common';
5
5
  import type { MarkType } from './type';
6
6
  export interface IComponentMark extends IMarkRaw<ICommonSpec> {
7
7
  renderInner: () => void;
8
8
  getComponent: () => IGraphic;
9
+ clearComponent: () => void;
9
10
  setAttributeTransform: (t: (attrs: any) => any) => any;
10
11
  }
11
12
  export interface IGlyphMark<T extends ICommonSpec = ICommonSpec, C = any> extends IMarkRaw<T> {
@@ -32,9 +33,7 @@ export type ITextMark = IMarkRaw<IComposedTextMarkSpec> & {
32
33
  export type ITextSpec<T> = IMarkSpec<T> & {
33
34
  textType?: 'rich' | 'text';
34
35
  };
35
- export type IArc3dMark = IMarkRaw<IArc3dMarkSpec>;
36
36
  export type IPolygonMark = IMarkRaw<IPolygonMarkSpec>;
37
- export type IPyramid3dMark = IMarkRaw<IPyramid3dMarkSpec>;
38
37
  export type IArcMark = IMarkRaw<IArcMarkSpec>;
39
38
  export type IAreaMark = IMarkRaw<IAreaMarkSpec>;
40
39
  export type IBoxPlotMark = IMarkRaw<IBoxPlotMarkSpec>;
@@ -43,7 +42,6 @@ export type IImageMark = IMarkRaw<IImageMarkSpec>;
43
42
  export type ILineMark = IMarkRaw<ILineMarkSpec>;
44
43
  export type ILinkPathMark = IMarkRaw<ILinkPathMarkSpec>;
45
44
  export type IPathMark = IMarkRaw<IPathMarkSpec>;
46
- export type IRect3dMark = IMarkRaw<IRect3dMarkSpec>;
47
45
  export type IRectMark = IMarkRaw<IRectMarkSpec>;
48
46
  export type IRippleMark = IMarkRaw<IRippleMarkSpec>;
49
47
  export type IRuleMark = IMarkRaw<IRuleMarkSpec>;
@@ -6,14 +6,11 @@ export declare const enum MarkTypeEnum {
6
6
  line = "line",
7
7
  text = "text",
8
8
  rect = "rect",
9
- rect3d = "rect3d",
10
9
  image = "image",
11
10
  path = "path",
12
11
  area = "area",
13
12
  arc = "arc",
14
- arc3d = "arc3d",
15
13
  polygon = "polygon",
16
- pyramid3d = "pyramid3d",
17
14
  boxPlot = "boxPlot",
18
15
  linkPath = "linkPath",
19
16
  cell = "cell",
@@ -1,13 +1,13 @@
1
1
  import type { IRuleMarkSpec } from '../typings/visual';
2
2
  import { BaseMark } from './base/base-mark';
3
- import type { IMarkStyle, IRuleMark } from './interface';
3
+ import type { IMarkGraphic, IMarkStyle, IRuleMark } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
5
  import type { IGraphic, ILineGraphicAttribute } from '@visactor/vrender-core';
6
6
  export declare class RuleMark extends BaseMark<IRuleMarkSpec> implements IRuleMark {
7
7
  static readonly type = MarkTypeEnum.rule;
8
8
  readonly type = MarkTypeEnum.rule;
9
9
  protected _getDefaultStyle(): IMarkStyle<IRuleMarkSpec>;
10
- protected _transformGraphicAttributes(g: IGraphic, attrs: any, groupAttrs?: any): any;
10
+ protected _transformGraphicAttributes(g: IMarkGraphic, attrs: any, groupAttrs?: any): any;
11
11
  protected _createGraphic(attrs?: ILineGraphicAttribute): IGraphic;
12
12
  }
13
13
  export declare const registerRuleMark: () => void;
@@ -1,12 +1,11 @@
1
1
  import type { ISymbolMarkSpec } from '../typings/visual';
2
2
  import { BaseMark } from './base/base-mark';
3
- import type { IMarkStyle, ISymbolMark } from './interface';
3
+ import type { IMarkGraphic, IMarkStyle, ISymbolMark } from './interface';
4
4
  import { MarkTypeEnum } from './interface/type';
5
- import type { IGraphic } from '@visactor/vrender-core';
6
5
  export declare class SymbolMark extends BaseMark<ISymbolMarkSpec> implements ISymbolMark {
7
6
  static readonly type = MarkTypeEnum.symbol;
8
7
  readonly type = MarkTypeEnum.symbol;
9
8
  protected _getDefaultStyle(): IMarkStyle<ISymbolMarkSpec>;
10
- protected _transformGraphicAttributes(g: IGraphic, attrs: any, groupAttrs?: any): any;
9
+ protected _transformGraphicAttributes(g: IMarkGraphic, attrs: any, groupAttrs?: any): any;
11
10
  }
12
11
  export declare const registerSymbolMark: () => void;
@@ -1,6 +1,6 @@
1
1
  import type { IComposedTextMarkSpec } from '../typings/visual';
2
2
  import { BaseMark } from './base/base-mark';
3
- import type { IMarkOption, IMarkStyle } from './interface';
3
+ import type { IMarkGraphic, IMarkOption, IMarkStyle } from './interface';
4
4
  import { MarkTypeEnum } from './interface';
5
5
  import type { ITextMark, ITextSpec } from './interface/mark';
6
6
  import type { IGraphic, IRichTextGraphicAttribute, ITextGraphicAttribute } from '@visactor/vrender-core';
@@ -12,7 +12,7 @@ export declare class TextMark extends BaseMark<IComposedTextMarkSpec> implements
12
12
  constructor(name: string, option: IMarkOption);
13
13
  protected _getDefaultStyle(): IMarkStyle<IComposedTextMarkSpec>;
14
14
  initStyleWithSpec(spec: ITextSpec<IComposedTextMarkSpec>): void;
15
- protected _transformGraphicAttributes(g: IGraphic, attrs: any, groupAttrs?: any): any;
15
+ protected _transformGraphicAttributes(g: IMarkGraphic, attrs: any, groupAttrs?: any): any;
16
16
  protected _createGraphic(attrs?: ITextGraphicAttribute | IRichTextGraphicAttribute): IGraphic;
17
17
  }
18
18
  export declare const registerTextMark: () => void;
@@ -4,7 +4,6 @@ export declare const transform: (options: {
4
4
  direction: number;
5
5
  delta?: number;
6
6
  deltaMul?: number;
7
- radius?: boolean;
8
7
  hideMode?: number;
9
8
  forceUpdate?: boolean;
10
9
  forceUpdateStamp?: number;
@@ -4,6 +4,5 @@ import type { GroupedData } from '../interface/common';
4
4
  export declare const MultiDatumMark: string[];
5
5
  export declare function isMultiDatumMark(type: MarkTypeEnum): boolean;
6
6
  export declare function curveTypeTransform(type: string, direction: string): string;
7
- export declare function is3DMark(type: MarkTypeEnum): boolean;
8
7
  export declare function groupData<T>(data: T[], groupBy: (datum: Datum, index: number) => string, sort?: (a: T, b: T) => number): GroupedData<T>;
9
8
  export declare const runEncoder: (styles: Record<string, (datum: Datum) => any>, datum: Datum, attrs?: any) => any;
@@ -32,7 +32,7 @@ export declare abstract class BaseModel<T extends IModelSpec> extends Compilable
32
32
  getMarks(): IMark[];
33
33
  getMarkNameMap(): Record<string, IMark>;
34
34
  getMarkSet(): MarkSet;
35
- getChart(): import("../chart/interface").IChart;
35
+ getChart(): import("..").IChart;
36
36
  protected get _theme(): any;
37
37
  protected _lastLayoutRect: ILayoutRect;
38
38
  constructor(spec: T, option: IModelOption);
@@ -48,6 +48,7 @@ export declare abstract class BaseModel<T extends IModelSpec> extends Compilable
48
48
  abstract onRender(ctx: IModelRenderOption): void;
49
49
  onDataUpdate(): void;
50
50
  beforeRelease(): void;
51
+ clear(): void;
51
52
  release(): void;
52
53
  updateSpec(spec: T): {
53
54
  change: boolean;
@@ -74,7 +75,7 @@ export declare abstract class BaseModel<T extends IModelSpec> extends Compilable
74
75
  compileMarks(group?: IGroup): void;
75
76
  protected _createMark<T extends IMark>(markInfo: IModelMarkInfo, option?: Partial<IMarkOption>, config?: ICompileMarkConfig): T;
76
77
  protected _getDataIdKey(): string | ((datum: Datum) => string) | undefined;
77
- getColorScheme(): import("..").IThemeColorScheme;
78
+ getColorScheme(): any;
78
79
  getSpecInfo(): IModelSpecInfo<any>;
79
80
  getSpecIndex(): number;
80
81
  }
@@ -7,7 +7,6 @@ import type { StringOrNumber } from '../typings/common';
7
7
  import type { IGroupMarkSpec, ConvertToMarkStyleSpec, ICommonSpec } from '../typings/visual';
8
8
  import type { IRect } from '../typings/space';
9
9
  import type { IPoint, CoordinateType } from '../typings/coordinate';
10
- import type { ITheme } from '../theme/interface';
11
10
  import type { StateValueType } from '../typings/spec';
12
11
  import type { ICompilable, ICompilableInitOption } from '../compile/interface';
13
12
  import type { IGlobalScale } from '../scale/interface';
@@ -21,6 +20,8 @@ import type { ITooltipSpec } from '../component/tooltip/interface';
21
20
  import type { TooltipActiveType } from '../typings';
22
21
  import type { IVChart } from '../core/interface';
23
22
  import type { ICompilableData } from '../compile/data/interface';
23
+ import type { IDimensionData, IDimensionInfo } from '../event/events/dimension/interface';
24
+ import type { IAxis } from '../component/axis';
24
25
  export interface IModelInitOption {
25
26
  }
26
27
  export interface IModelLayoutOption {
@@ -107,7 +108,7 @@ export interface IModelOption extends ICompilableInitOption {
107
108
  specKey?: string;
108
109
  specPath?: Array<string | number>;
109
110
  specInfoPath?: Array<string | number>;
110
- getTheme?: () => ITheme;
111
+ getTheme?: (...keys: string[]) => any;
111
112
  getSpecInfo?: () => IChartSpecInfo;
112
113
  getChartLayoutRect: () => IRect;
113
114
  getChartViewRect: () => ILayoutRect;
@@ -117,6 +118,9 @@ export interface IModelOption extends ICompilableInitOption {
117
118
  animation: boolean;
118
119
  onError: (...args: any[]) => void;
119
120
  disableTriggerEvent?: boolean;
121
+ getDimensionInfo?: (chart: IChart | undefined, pos: ILayoutPoint, isTooltip?: boolean) => IDimensionInfo[] | null;
122
+ getDimensionInfoByValue?: (axis: IAxis, value: any) => IDimensionInfo | null;
123
+ getRectByDimensionData?: (dimensionData: IDimensionData, layoutStartPoint: ILayoutPoint) => any;
120
124
  }
121
125
  export interface IModelSpecInfo<T extends Record<string, unknown> = any> {
122
126
  type: string | ComponentTypeEnum | SeriesTypeEnum;
@@ -128,6 +132,7 @@ export interface IModelSpecInfo<T extends Record<string, unknown> = any> {
128
132
  seriesIndexes?: number[];
129
133
  }
130
134
  export interface IModelConstructor {
135
+ readonly builtInTheme?: any;
131
136
  readonly transformerConstructor: new (option: IBaseModelSpecTransformerOption) => IBaseModelSpecTransformer;
132
137
  }
133
138
  export type ILayoutModelState = {
@@ -1,6 +1,6 @@
1
1
  import type { IBoundsLike } from '@visactor/vutils';
2
2
  import type { ILayoutItem } from '../layout/interface';
3
- import type { IOrientType, IPolarOrientType, IRect } from '../typings/space';
3
+ import type { IOrientType, IPadding, IPolarOrientType, IRect } from '../typings/space';
4
4
  import { BaseModel } from './base-model';
5
5
  import type { IModelSpec } from './interface';
6
6
  import type { IPoint } from '../typings/coordinate';
@@ -38,4 +38,5 @@ export declare abstract class LayoutModel<T extends IModelSpec> extends BaseMode
38
38
  abstract getBoundsInRect(rect: ILayoutRect, fullRect: ILayoutRect): IBoundsLike;
39
39
  protected _transformLayoutRect: (rect: ILayoutRect) => ILayoutRect;
40
40
  protected _transformLayoutPosition: (rect: Partial<IPoint>) => Partial<IPoint>;
41
+ protected _transformLayoutPadding: (padding: IPadding) => IPadding;
41
42
  }
@@ -1,3 +1,4 @@
1
1
  export * from './media-query';
2
2
  export * from './formatter';
3
3
  export * from './register';
4
+ export * from './interface';
@@ -1,7 +1,6 @@
1
1
  import type { TooltipPanelAttrs, TooltipRichTextAttrs } from '@visactor/vrender-components';
2
2
  import type { ITooltipActual, MaybeArray } from '../../../../typings';
3
3
  import type { ITooltipAttributes, ITooltipTextStyle } from '../interface';
4
- import type { ITheme } from '../../../../theme';
5
4
  import type { ITooltipSpec, ITooltipTextTheme, ITooltipTheme } from '../../../../component/tooltip';
6
5
  interface ITooltipTextInfo {
7
6
  width: number;
@@ -9,7 +8,7 @@ interface ITooltipTextInfo {
9
8
  text: MaybeArray<number> | MaybeArray<string> | TooltipRichTextAttrs;
10
9
  }
11
10
  export declare const measureTooltipText: (text: string | TooltipRichTextAttrs, style: ITooltipTextStyle) => ITooltipTextInfo;
12
- export declare function getTextAttributes(style?: ITooltipTextTheme, globalTheme?: ITheme, defaultAttributes?: Partial<ITooltipTextStyle>): ITooltipTextStyle;
11
+ export declare function getTextAttributes(style?: ITooltipTextTheme, globalFontFamily?: string, defaultAttributes?: Partial<ITooltipTextStyle>): ITooltipTextStyle;
13
12
  export declare const getPanelAttributes: (style: ITooltipTheme['panel']) => TooltipPanelAttrs;
14
- export declare const getTooltipAttributes: (actualTooltip: ITooltipActual, spec: ITooltipSpec, globalTheme: ITheme) => ITooltipAttributes;
13
+ export declare const getTooltipAttributes: (actualTooltip: ITooltipActual, spec: ITooltipSpec, globalFontFamily?: string) => ITooltipAttributes;
15
14
  export {};
@@ -1,18 +1,7 @@
1
- import type { IDimensionData } from '../../../../event';
2
- import { type ILayoutPoint } from '../../../../typings';
3
1
  import type { IFixedTooltipPositionPattern, IGlobalTooltipPositionPattern, TooltipFixedPosition } from '../../../../typings/tooltip/position';
4
2
  export declare const getActualTooltipPositionValue: (position: number | ((event: MouseEvent) => number), event: MouseEvent) => number;
5
- export type TooltipPositionType = -2 | -1 | 0 | 1 | 2;
3
+ export type TooltipPositionType = -2 | -1.5 | -1 | 0 | 1 | 1.5 | 2;
6
4
  export declare const positionType: Record<TooltipFixedPosition, [TooltipPositionType, TooltipPositionType]>;
7
5
  export declare const getPositionType: (position: TooltipFixedPosition, dim: 'x' | 'y', defaultCase?: TooltipPositionType) => TooltipPositionType;
8
- export declare const getCartesianCrosshairRect: (dimensionData: IDimensionData, layoutStartPoint: ILayoutPoint) => {
9
- visible: boolean;
10
- start: {
11
- [x: string]: number;
12
- };
13
- end: {
14
- [x: string]: number;
15
- };
16
- };
17
6
  export declare const isGlobalTooltipPositionPattern: (obj: any) => obj is IGlobalTooltipPositionPattern;
18
7
  export declare const isFixedTooltipPositionPattern: (obj: any) => obj is IFixedTooltipPositionPattern;