@visactor/vchart-types 1.15.5-alpha.8 → 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 (341) hide show
  1. package/package.json +3 -3
  2. package/tsconfig.tsbuildinfo +1 -1
  3. package/types/animation/animate-manager.d.ts +0 -12
  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 +98 -7
  9. package/types/animation/sequential-animate.d.ts +1 -0
  10. package/types/animation/spec.d.ts +27 -3
  11. package/types/animation/state-transition.d.ts +1 -0
  12. package/types/animation/strategy/common.d.ts +17 -0
  13. package/types/animation/strategy/horizontal-bar-split.d.ts +11 -0
  14. package/types/animation/strategy/vertical-bar-split.d.ts +11 -0
  15. package/types/animation/utils.d.ts +3 -4
  16. package/types/chart/area/area.d.ts +1 -0
  17. package/types/chart/bar/bar.d.ts +1 -0
  18. package/types/chart/bar/index.d.ts +0 -1
  19. package/types/chart/bar/interface.d.ts +1 -5
  20. package/types/chart/base/base-chart.d.ts +22 -9
  21. package/types/chart/box-plot/box-plot.d.ts +1 -0
  22. package/types/chart/common/common.d.ts +1 -0
  23. package/types/chart/common/interface.d.ts +5 -5
  24. package/types/chart/funnel/index.d.ts +0 -1
  25. package/types/chart/funnel/interface.d.ts +1 -4
  26. package/types/chart/funnel/util.d.ts +2 -0
  27. package/types/chart/histogram/histogram.d.ts +1 -0
  28. package/types/chart/histogram/index.d.ts +0 -1
  29. package/types/chart/histogram/interface.d.ts +1 -4
  30. package/types/chart/index.d.ts +19 -17
  31. package/types/chart/interface/chart.d.ts +14 -5
  32. package/types/chart/interface/common.d.ts +2 -9
  33. package/types/chart/interface/type.d.ts +1 -8
  34. package/types/chart/line/line.d.ts +1 -0
  35. package/types/chart/mosaic/mosaic.d.ts +1 -0
  36. package/types/chart/pictogram/interface.d.ts +1 -1
  37. package/types/chart/pie/index.d.ts +0 -1
  38. package/types/chart/pie/interface.d.ts +1 -5
  39. package/types/chart/progress/circular/circular.d.ts +1 -0
  40. package/types/chart/progress/linear/linear.d.ts +1 -0
  41. package/types/chart/radar/radar.d.ts +1 -0
  42. package/types/chart/range-area/range-area.d.ts +1 -0
  43. package/types/chart/range-column/index.d.ts +0 -1
  44. package/types/chart/range-column/interface.d.ts +1 -5
  45. package/types/chart/range-column/range-column.d.ts +1 -0
  46. package/types/chart/rose/rose.d.ts +1 -0
  47. package/types/chart/sankey/sankey.d.ts +1 -1
  48. package/types/chart/scatter/scatter.d.ts +1 -0
  49. package/types/chart/waterfall/waterfall.d.ts +1 -0
  50. package/types/chart/word-cloud/index.d.ts +0 -1
  51. package/types/chart/word-cloud/interface.d.ts +1 -5
  52. package/types/chart/word-cloud/word-cloud.d.ts +4 -8
  53. package/types/compile/compilable-base.d.ts +1 -1
  54. package/types/compile/compiler.d.ts +35 -25
  55. package/types/compile/data/compilable-data.d.ts +7 -7
  56. package/types/compile/data/interface.d.ts +4 -1
  57. package/types/compile/grammar-item.d.ts +7 -13
  58. package/types/compile/interface/compilable-item.d.ts +22 -28
  59. package/types/compile/interface/compiler.d.ts +14 -4
  60. package/types/compile/mark/compilable-mark.d.ts +1 -0
  61. package/types/compile/mark/index.d.ts +0 -1
  62. package/types/compile/mark/interface.d.ts +48 -34
  63. package/types/compile/mark/mark-state-manager.d.ts +12 -13
  64. package/types/compile/mark/util.d.ts +1 -1
  65. package/types/compile/morph.d.ts +3 -0
  66. package/types/compile/state-manager.d.ts +11 -0
  67. package/types/compile/util.d.ts +14 -0
  68. package/types/component/axis/base-axis.d.ts +10 -3
  69. package/types/component/axis/cartesian/axis.d.ts +7 -14
  70. package/types/component/axis/cartesian/band-axis.d.ts +6 -0
  71. package/types/component/axis/cartesian/linear-axis.d.ts +2 -1
  72. package/types/component/axis/cartesian/log-axis.d.ts +6 -0
  73. package/types/component/axis/cartesian/symlog-axis.d.ts +6 -0
  74. package/types/component/axis/cartesian/time-axis.d.ts +6 -0
  75. package/types/component/axis/cartesian/util/common.d.ts +3 -1
  76. package/types/component/axis/interface/common.d.ts +8 -0
  77. package/types/component/axis/interface/spec.d.ts +7 -2
  78. package/types/component/axis/mixin/band-axis-mixin.d.ts +1 -0
  79. package/types/component/axis/polar/band-axis.d.ts +6 -0
  80. package/types/component/axis/polar/linear-axis.d.ts +6 -0
  81. package/types/component/axis/polar/util/common.d.ts +4 -1
  82. package/types/component/axis/util.d.ts +2 -6
  83. package/types/component/base/base-component.d.ts +1 -5
  84. package/types/component/base/util.d.ts +1 -2
  85. package/types/component/brush/brush.d.ts +35 -30
  86. package/types/component/brush/interface.d.ts +2 -0
  87. package/types/component/common/trigger/desktop.d.ts +0 -2
  88. package/types/component/common/trigger/interface.d.ts +0 -2
  89. package/types/component/common/trigger/mobile.d.ts +0 -2
  90. package/types/component/crosshair/base.d.ts +25 -36
  91. package/types/component/crosshair/cartesian.d.ts +9 -29
  92. package/types/component/crosshair/interface/common.d.ts +67 -2
  93. package/types/component/crosshair/interface/index.d.ts +0 -2
  94. package/types/component/crosshair/interface/spec.d.ts +8 -4
  95. package/types/component/crosshair/polar.d.ts +10 -23
  96. package/types/component/crosshair/utils/cartesian.d.ts +10 -21
  97. package/types/component/crosshair/utils/common.d.ts +2 -3
  98. package/types/component/crosshair/utils/polar.d.ts +18 -11
  99. package/types/component/custom-mark/custom-mark.d.ts +1 -0
  100. package/types/component/data-zoom/data-filter-base-component.d.ts +4 -4
  101. package/types/component/data-zoom/data-zoom/data-zoom.d.ts +4 -1
  102. package/types/component/data-zoom/data-zoom/interface.d.ts +2 -3
  103. package/types/component/data-zoom/interface.d.ts +11 -0
  104. package/types/component/data-zoom/scroll-bar/scroll-bar.d.ts +4 -2
  105. package/types/component/geo/geo-coordinate.d.ts +2 -2
  106. package/types/component/geo/interface.d.ts +1 -1
  107. package/types/component/index.d.ts +14 -8
  108. package/types/component/indicator/indicator.d.ts +3 -0
  109. package/types/component/interface/common.d.ts +0 -2
  110. package/types/component/interface/theme.d.ts +1 -3
  111. package/types/component/interface/type.d.ts +0 -1
  112. package/types/component/label/base-label.d.ts +9 -4
  113. package/types/component/label/interface.d.ts +14 -8
  114. package/types/component/label/label.d.ts +5 -3
  115. package/types/component/label/total-label.d.ts +4 -1
  116. package/types/component/label/util.d.ts +9 -10
  117. package/types/component/legend/continuous/legend.d.ts +4 -0
  118. package/types/component/legend/discrete/legend.d.ts +3 -0
  119. package/types/component/legend/util.d.ts +2 -2
  120. package/types/component/marker/base-marker.d.ts +1 -1
  121. package/types/component/marker/mark-area/cartesian-mark-area.d.ts +3 -0
  122. package/types/component/marker/mark-area/interface/theme.d.ts +4 -3
  123. package/types/component/marker/mark-area/polar-mark-area.d.ts +3 -0
  124. package/types/component/marker/mark-line/cartesian-mark-line.d.ts +3 -0
  125. package/types/component/marker/mark-line/interface/theme.d.ts +4 -3
  126. package/types/component/marker/mark-line/polar-mark-line.d.ts +3 -0
  127. package/types/component/marker/mark-point/cartesian-mark-point.d.ts +3 -0
  128. package/types/component/marker/mark-point/geo-mark-point.d.ts +3 -0
  129. package/types/component/marker/mark-point/interface/theme.d.ts +5 -2
  130. package/types/component/marker/mark-point/polar-mark-point.d.ts +3 -0
  131. package/types/component/marker/utils.d.ts +12 -0
  132. package/types/component/player/player.d.ts +3 -0
  133. package/types/component/title/title.d.ts +3 -0
  134. package/types/component/tooltip/constant.d.ts +6 -2
  135. package/types/component/tooltip/interface/common.d.ts +2 -1
  136. package/types/component/tooltip/processor/base.d.ts +4 -5
  137. package/types/component/tooltip/processor/dimension-tooltip.d.ts +1 -0
  138. package/types/component/tooltip/processor/group-tooltip.d.ts +1 -0
  139. package/types/component/tooltip/processor/interface.d.ts +12 -1
  140. package/types/component/tooltip/processor/mark-tooltip.d.ts +1 -0
  141. package/types/component/tooltip/processor/util.d.ts +1 -1
  142. package/types/component/tooltip/tooltip.d.ts +8 -5
  143. package/types/component/util.d.ts +1 -2
  144. package/types/constant/data.d.ts +1 -0
  145. package/types/constant/event.d.ts +55 -2
  146. package/types/core/factory.d.ts +31 -2
  147. package/types/core/index.d.ts +18 -2
  148. package/types/core/interface.d.ts +19 -5
  149. package/types/core/vchart.d.ts +8 -7
  150. package/types/data/transforms/circle-packing.d.ts +1 -1
  151. package/types/data/transforms/data-key.d.ts +1 -1
  152. package/types/data/transforms/flatten.d.ts +1 -1
  153. package/types/data/transforms/funnel.d.ts +1 -6
  154. package/types/data/transforms/pictogram.d.ts +2 -10
  155. package/types/data/transforms/sankey-links.d.ts +1 -2
  156. package/types/data/transforms/sankey-nodes.d.ts +1 -2
  157. package/types/data/transforms/sankey.d.ts +4 -4
  158. package/types/data/transforms/sunburst.d.ts +1 -1
  159. package/types/data/transforms/treemap.d.ts +5 -6
  160. package/types/data/transforms/venn.d.ts +10 -0
  161. package/types/data/transforms/waterfall.d.ts +1 -0
  162. package/types/event/event-dispatcher.d.ts +4 -1
  163. package/types/event/event.d.ts +4 -1
  164. package/types/event/events/base.d.ts +1 -2
  165. package/types/event/events/dimension/util/cartesian.d.ts +2 -1
  166. package/types/event/events/index.d.ts +1 -5
  167. package/types/event/index.d.ts +1 -0
  168. package/types/event/interface.d.ts +19 -13
  169. package/types/index-harmony-simple.d.ts +4 -4
  170. package/types/index-harmony.d.ts +1 -1
  171. package/types/index.d.ts +11 -0
  172. package/types/interaction/config.d.ts +13 -0
  173. package/types/interaction/index.d.ts +10 -1
  174. package/types/interaction/interaction.d.ts +17 -25
  175. package/types/interaction/interface/common.d.ts +22 -0
  176. package/types/interaction/interface/spec.d.ts +53 -0
  177. package/types/interaction/interface/trigger.d.ts +87 -0
  178. package/types/interaction/triggers/base.d.ts +28 -0
  179. package/types/interaction/triggers/dimension-hover.d.ts +22 -0
  180. package/types/interaction/triggers/element-active-by-legend.d.ts +21 -0
  181. package/types/interaction/triggers/element-active.d.ts +20 -0
  182. package/types/interaction/triggers/element-highlight-by-group.d.ts +23 -0
  183. package/types/interaction/triggers/element-highlight-by-key.d.ts +9 -0
  184. package/types/interaction/triggers/element-highlight-by-legend.d.ts +22 -0
  185. package/types/interaction/triggers/element-highlight-by-name.d.ts +24 -0
  186. package/types/interaction/triggers/element-highlight.d.ts +25 -0
  187. package/types/interaction/triggers/element-select.d.ts +24 -0
  188. package/types/interaction/triggers/enum.d.ts +6 -0
  189. package/types/interaction/triggers/util.d.ts +12 -0
  190. package/types/interaction/zoom/zoomable.d.ts +5 -0
  191. package/types/layout/base-layout.d.ts +12 -9
  192. package/types/layout/index.d.ts +4 -4
  193. package/types/layout/interface.d.ts +8 -3
  194. package/types/layout/layout-item.d.ts +7 -3
  195. package/types/layout/util.d.ts +17 -4
  196. package/types/mark/arc.d.ts +3 -3
  197. package/types/mark/area.d.ts +2 -0
  198. package/types/mark/base/base-line.d.ts +25 -2
  199. package/types/mark/base/base-mark.d.ts +160 -13
  200. package/types/mark/box-plot.d.ts +11 -5
  201. package/types/mark/cell.d.ts +6 -3
  202. package/types/mark/component.d.ts +12 -3
  203. package/types/mark/glyph.d.ts +30 -0
  204. package/types/mark/group.d.ts +11 -6
  205. package/types/mark/index.d.ts +10 -7
  206. package/types/mark/interface/common.d.ts +81 -9
  207. package/types/mark/interface/enum.d.ts +6 -0
  208. package/types/mark/interface/index.d.ts +1 -0
  209. package/types/mark/interface/mark.d.ts +20 -5
  210. package/types/mark/interface/type.d.ts +1 -3
  211. package/types/mark/label.d.ts +4 -3
  212. package/types/mark/link-path.d.ts +35 -5
  213. package/types/mark/liquid.d.ts +47 -5
  214. package/types/mark/ripple.d.ts +39 -4
  215. package/types/mark/rule.d.ts +4 -1
  216. package/types/mark/symbol.d.ts +4 -5
  217. package/types/mark/text.d.ts +5 -3
  218. package/types/mark/transform/data-sampling.d.ts +10 -0
  219. package/types/mark/transform/filter.d.ts +1 -0
  220. package/types/mark/transform/map.d.ts +1 -0
  221. package/types/mark/transform/symbol-overlap.d.ts +13 -0
  222. package/types/mark/utils/common.d.ts +4 -1
  223. package/types/mark/utils/glyph.d.ts +2 -0
  224. package/types/mark/utils/index.d.ts +2 -0
  225. package/types/mark/utils/line.d.ts +3 -0
  226. package/types/model/base-model.d.ts +11 -10
  227. package/types/model/interface.d.ts +11 -10
  228. package/types/model/layout-model.d.ts +4 -3
  229. package/types/plugin/chart/index.d.ts +1 -0
  230. package/types/plugin/components/tooltip-handler/base.d.ts +2 -2
  231. package/types/plugin/components/tooltip-handler/utils/attribute.d.ts +2 -3
  232. package/types/plugin/components/tooltip-handler/utils/position.d.ts +1 -14
  233. package/types/plugin/other.d.ts +3 -4
  234. package/types/region/interface.d.ts +0 -4
  235. package/types/region/region.d.ts +3 -11
  236. package/types/series/area/animation.d.ts +1 -1
  237. package/types/series/area/area.d.ts +3 -2
  238. package/types/series/bar/animation.d.ts +1 -2
  239. package/types/series/bar/bar.d.ts +9 -9
  240. package/types/series/bar/constant.d.ts +0 -1
  241. package/types/series/bar/interface.d.ts +1 -7
  242. package/types/series/base/base-series-transformer.d.ts +1 -1
  243. package/types/series/base/base-series.d.ts +23 -40
  244. package/types/series/base/tooltip-helper.d.ts +1 -2
  245. package/types/series/box-plot/animation.d.ts +52 -0
  246. package/types/series/box-plot/box-plot.d.ts +6 -3
  247. package/types/series/cartesian/cartesian.d.ts +1 -1
  248. package/types/series/circle-packing/animation.d.ts +1 -1
  249. package/types/series/circle-packing/circle-packing.d.ts +4 -1
  250. package/types/series/correlation/animation.d.ts +1 -1
  251. package/types/series/correlation/correlation.d.ts +6 -4
  252. package/types/series/dot/dot.d.ts +5 -2
  253. package/types/series/funnel/constant.d.ts +0 -1
  254. package/types/series/funnel/funnel.d.ts +10 -11
  255. package/types/series/funnel/interface.d.ts +2 -13
  256. package/types/series/funnel/tooltip-helper.d.ts +4 -2
  257. package/types/series/gauge/animation.d.ts +1 -1
  258. package/types/series/gauge/gauge-pointer.d.ts +7 -1
  259. package/types/series/gauge/gauge.d.ts +5 -2
  260. package/types/series/geo/geo.d.ts +3 -4
  261. package/types/series/heatmap/animation.d.ts +1 -1
  262. package/types/series/heatmap/heatmap.d.ts +7 -1
  263. package/types/series/index.d.ts +24 -19
  264. package/types/series/interface/common.d.ts +1 -4
  265. package/types/series/interface/series.d.ts +6 -1
  266. package/types/series/interface/theme.d.ts +5 -16
  267. package/types/series/interface/type.d.ts +1 -11
  268. package/types/series/line/animation.d.ts +1 -1
  269. package/types/series/line/line.d.ts +4 -1
  270. package/types/series/link/link.d.ts +8 -2
  271. package/types/series/liquid/animation.d.ts +1 -1
  272. package/types/series/liquid/liquid.d.ts +7 -1
  273. package/types/series/map/interface.d.ts +10 -0
  274. package/types/series/map/map.d.ts +3 -0
  275. package/types/series/mixin/line-mixin.d.ts +5 -5
  276. package/types/series/mosaic/mosaic.d.ts +2 -0
  277. package/types/series/pictogram/pictogram.d.ts +2 -0
  278. package/types/series/pictogram/tooltip-helper.d.ts +2 -2
  279. package/types/series/pie/animation/animation.d.ts +4 -4
  280. package/types/series/pie/animation/centerOffset.d.ts +1 -1
  281. package/types/series/pie/constant.d.ts +0 -1
  282. package/types/series/pie/interface.d.ts +3 -13
  283. package/types/series/pie/pie.d.ts +13 -11
  284. package/types/series/polar/animation.d.ts +2 -4
  285. package/types/series/polar/progress-like/animation.d.ts +1 -1
  286. package/types/series/polar/progress-like/interface.d.ts +1 -0
  287. package/types/series/polar/progress-like/progress-like.d.ts +1 -2
  288. package/types/series/progress/circular/circular.d.ts +7 -1
  289. package/types/series/progress/linear/animation.d.ts +2 -2
  290. package/types/series/progress/linear/interface.d.ts +1 -0
  291. package/types/series/progress/linear/linear.d.ts +7 -1
  292. package/types/series/radar/animation.d.ts +12 -10
  293. package/types/series/radar/radar.d.ts +5 -2
  294. package/types/series/range-column/animation.d.ts +1 -1
  295. package/types/series/range-column/constant.d.ts +0 -1
  296. package/types/series/range-column/interface.d.ts +0 -3
  297. package/types/series/range-column/range-column.d.ts +5 -4
  298. package/types/series/rose/animation.d.ts +1 -1
  299. package/types/series/rose/rose.d.ts +3 -0
  300. package/types/series/sankey/animation.d.ts +14 -1
  301. package/types/series/sankey/interface.d.ts +0 -1
  302. package/types/series/sankey/sankey.d.ts +14 -12
  303. package/types/series/sankey/tooltip-helper.d.ts +1 -1
  304. package/types/series/scatter/animation.d.ts +1 -1
  305. package/types/series/scatter/scatter.d.ts +3 -0
  306. package/types/series/sunburst/animation/enter.d.ts +1 -1
  307. package/types/series/sunburst/animation/exit.d.ts +1 -1
  308. package/types/series/sunburst/animation/preset.d.ts +1 -1
  309. package/types/series/sunburst/animation/utils.d.ts +2 -2
  310. package/types/series/sunburst/interface.d.ts +1 -1
  311. package/types/series/sunburst/sunburst.d.ts +4 -1
  312. package/types/series/treemap/animation.d.ts +1 -1
  313. package/types/series/treemap/interface.d.ts +1 -1
  314. package/types/series/treemap/treemap.d.ts +4 -2
  315. package/types/series/venn/animation.d.ts +12 -1
  316. package/types/series/venn/venn.d.ts +5 -1
  317. package/types/series/waterfall/animation.d.ts +1 -1
  318. package/types/series/waterfall/waterfall.d.ts +6 -2
  319. package/types/series/word-cloud/animation.d.ts +2 -4
  320. package/types/series/word-cloud/base.d.ts +4 -3
  321. package/types/series/word-cloud/interface.d.ts +2 -20
  322. package/types/theme/builtin/common/component/axis/cartesian-axis.d.ts +0 -1
  323. package/types/theme/builtin/common/series/funnel.d.ts +2 -2
  324. package/types/theme/builtin/common/series/word-cloud.d.ts +1 -2
  325. package/types/theme/builtin/index.d.ts +3 -1
  326. package/types/theme/color-scheme/util.d.ts +1 -1
  327. package/types/typings/common.d.ts +13 -0
  328. package/types/typings/spec/chart.d.ts +6 -12
  329. package/types/typings/spec/common.d.ts +40 -41
  330. package/types/typings/tooltip/position.d.ts +1 -1
  331. package/types/typings/visual.d.ts +11 -13
  332. package/types/util/array.d.ts +1 -0
  333. package/types/util/index.d.ts +1 -0
  334. package/types/util/mark.d.ts +5 -0
  335. package/types/util/math.d.ts +1 -1
  336. package/types/util/region.d.ts +5 -0
  337. package/types/util/scale.d.ts +1 -0
  338. package/types/util/theme/common.d.ts +1 -1
  339. package/types/util/theme/merge-theme.d.ts +2 -2
  340. package/types/util/theme/preprocess.d.ts +1 -2
  341. package/types/vrender-tools.d.ts +1 -0
@@ -0,0 +1,24 @@
1
+ import type { IElementSelectOptions, ITrigger } from '../interface/trigger';
2
+ import type { IMarkGraphic } from '../../mark/interface/common';
3
+ import { BaseTrigger } from './base';
4
+ import type { BaseEventParams } from '../../event/interface';
5
+ export declare class ElementSelect extends BaseTrigger<IElementSelectOptions> implements ITrigger<IElementSelectOptions> {
6
+ static type: string;
7
+ type: string;
8
+ static defaultOptions: Partial<IElementSelectOptions>;
9
+ protected _resetType: ('view' | 'self' | 'timeout')[];
10
+ private _timer?;
11
+ constructor(options?: IElementSelectOptions);
12
+ getStartState(): string;
13
+ getResetState(): string;
14
+ protected getEvents(): {
15
+ type: import("@visactor/vrender-core").GraphicEventType | import("@visactor/vrender-core").GraphicEventType[];
16
+ handler: (e: BaseEventParams) => void;
17
+ }[];
18
+ resetAll: () => void;
19
+ handleStart: (e: BaseEventParams) => void;
20
+ handleReset: (e: BaseEventParams) => void;
21
+ start(markGraphic: IMarkGraphic): void;
22
+ reset(markGraphic: IMarkGraphic): void;
23
+ }
24
+ export declare const registerElementSelect: () => void;
@@ -0,0 +1,6 @@
1
+ export declare const enum TRIGGER_TYPE_ENUM {
2
+ DIMENSION_HOVER = "dimension-hover",
3
+ ELEMENT_HIGHLIGHT = "element-highlight",
4
+ ELEMENT_SELECT = "element-select",
5
+ ELEMENT_ACTIVE = "element-active"
6
+ }
@@ -0,0 +1,12 @@
1
+ import type { IMark, IMarkGraphic } from '../../mark/interface/common';
2
+ import type { IElementFilterOptions, IElementHighlightOptions, IElementSelectTriggerOff } from '../interface/trigger';
3
+ import type { GraphicEventType } from '@visactor/vrender-core';
4
+ import type { IBaseInteractionSpec } from '../interface/spec';
5
+ export declare const parseTriggerOffOfSelect: (triggerOff: IElementSelectTriggerOff | IElementSelectTriggerOff[]) => {
6
+ eventNames: GraphicEventType[];
7
+ resetType: ("self" | "view" | "timeout")[];
8
+ };
9
+ export declare const groupMarksByState: (marks: IMark[], states: string[]) => Record<string, number[]>;
10
+ export declare const filterMarksOfInteraction: (interactionSpec: IBaseInteractionSpec, marks: IMark[]) => IMark[];
11
+ export declare const generateFilterValue: (options: IElementFilterOptions) => (g: IMarkGraphic) => any;
12
+ export declare const highlightDefaultOptions: Partial<IElementHighlightOptions>;
@@ -7,6 +7,7 @@ export interface ITriggerOption {
7
7
  delayType: IDelayType;
8
8
  delayTime: number;
9
9
  realTime: boolean;
10
+ allowComponentZoom?: boolean;
10
11
  }
11
12
  export type ZoomEventParams = {
12
13
  zoomDelta: number;
@@ -57,5 +58,9 @@ export declare class Zoomable implements IZoomable {
57
58
  private _bindDragEventAsRegion;
58
59
  initDragEventOfSeries(s: ISeries, callback?: (delta: [number, number], e: BaseEventParams['event']) => void, option?: ITriggerOption): void;
59
60
  initDragEventOfRegions(regions: IRegion[], filter?: (s: ISeries) => boolean, callback?: (delta: [number, number], e: BaseEventParams['event']) => void, option?: ITriggerOption): void;
61
+ private _handleDragMouseUp?;
62
+ private _handleDragMouseMove?;
63
+ protected _clearDragEvent(): void;
64
+ private isDragEnable;
60
65
  protected _handleDrag(params: ExtendEventParam, callback?: (delta: [number, number], e: BaseEventParams['event']) => void, option?: ITriggerOption): void;
61
66
  }
@@ -1,8 +1,9 @@
1
1
  import type { utilFunctionCtx } from '../typings/params';
2
2
  import type { IChart } from '../chart/interface/chart';
3
- import type { IBoundsLike } from '@visactor/vutils';
3
+ import { type IBoundsLike } from '@visactor/vutils';
4
4
  import type { IBaseLayout, ILayoutItem } from './interface';
5
5
  import type { IOrientType, IPadding, IRect } from '../typings/space';
6
+ import type { IRecompute } from './util';
6
7
  import type { ILayoutRect } from '../typings/layout';
7
8
  export type LayoutSideType = {
8
9
  top: number;
@@ -28,10 +29,12 @@ export declare class Layout implements IBaseLayout {
28
29
  bottomCurrent: number;
29
30
  _chartLayoutRect: IRect;
30
31
  _chartViewBox: IBoundsLike;
32
+ recomputeWidth: boolean;
33
+ recomputeHeight: boolean;
31
34
  protected _onError: (msg: string) => void;
32
35
  constructor(_spec?: unknown, ctx?: utilFunctionCtx);
33
36
  protected _layoutInit(_chart: IChart, items: ILayoutItem[], chartLayoutRect: IRect, chartViewBox: IBoundsLike): void;
34
- protected _layoutNormalItems(items: ILayoutItem[]): void;
37
+ protected _layoutNormalItems(items: ILayoutItem[], recompute: IRecompute): void;
35
38
  protected _groupItems(items: ILayoutItem[]): {
36
39
  regionItems: ILayoutItem[];
37
40
  relativeItems: ILayoutItem[];
@@ -48,18 +51,18 @@ export declare class Layout implements IBaseLayout {
48
51
  layoutItems(_chart: IChart, items: ILayoutItem[], chartLayoutRect: IRect, chartViewBox: IBoundsLike): void;
49
52
  protected _processAutoIndent(regionItems: ILayoutItem[], relativeItems: ILayoutItem[], relativeOverlapItems: ILayoutItem[], overlapItems: {
50
53
  [key in IOrientType]: overlapInfo;
51
- }, allRelatives: ILayoutItem[], layoutTemp: LayoutSideType): void;
52
- protected layoutNormalItems(normalItems: ILayoutItem[]): void;
53
- protected layoutNormalInlineItems(normalItems: ILayoutItem[]): void;
54
- protected _layoutRelativeOverlap(orient: IOrientType, info: overlapInfo): void;
55
- protected _layoutRelativeItem(item: ILayoutItem, layoutRect: ILayoutRect): void;
54
+ }, allRelatives: ILayoutItem[], layoutTemp: LayoutSideType, recompute: IRecompute): void;
55
+ protected layoutNormalItems(normalItems: ILayoutItem[], recompute: IRecompute): void;
56
+ protected layoutNormalInlineItems(normalItems: ILayoutItem[], recompute: IRecompute): boolean;
57
+ protected _layoutRelativeOverlap(orient: IOrientType, info: overlapInfo, recompute: IRecompute): void;
58
+ protected _layoutRelativeItem(item: ILayoutItem, recompute: IRecompute): void;
56
59
  protected _layoutRegionItem(regionItems: ILayoutItem[], regionRelativeTotalWidth: number, regionRelativeTotalHeight: number): {
57
60
  regionHeight: number;
58
61
  regionWidth: number;
59
62
  };
60
- protected layoutRegionItems(regionItems: ILayoutItem[], regionRelativeItems: ILayoutItem[], regionRelativeOverlapItems: ILayoutItem[], overlapItems?: {
63
+ protected layoutRegionItems(regionItems: ILayoutItem[], regionRelativeItems: ILayoutItem[], regionRelativeOverlapItems: ILayoutItem[], overlapItems: {
61
64
  [key in IOrientType]: overlapInfo;
62
- }): void;
65
+ }, recompute: IRecompute): void;
63
66
  protected layoutAbsoluteItems(absoluteItems: ILayoutItem[]): void;
64
67
  filterRegionsWithID(items: ILayoutItem[], id: number): ILayoutItem;
65
68
  getItemComputeLayoutRect(item: ILayoutItem): {
@@ -1,6 +1,6 @@
1
+ import type { IOffset, LayoutSideType } from './base-layout';
1
2
  import { Layout } from './base-layout';
2
3
  import { GridLayout, registerGridLayout } from './grid-layout/grid-layout';
3
- import { Layout3d, registerLayout3d } from './layout3d';
4
- import type { ILayoutSpec, IGridLayoutSpec } from './interface';
5
- export { Layout, GridLayout, Layout3d, registerGridLayout, registerLayout3d };
6
- export type { ILayoutSpec, IGridLayoutSpec };
4
+ import type { ILayoutSpec, IGridLayoutSpec, IBaseLayout, ILayoutItem } from './interface';
5
+ export { Layout, GridLayout, registerGridLayout };
6
+ export type { ILayoutSpec, IGridLayoutSpec, IBaseLayout, IOffset, ILayoutItem, LayoutSideType };
@@ -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;
@@ -76,12 +78,14 @@ export interface ILayoutItem {
76
78
  getLayoutRect: () => ILayoutRect;
77
79
  getLayout: () => IRect;
78
80
  getLastComputeOutBounds: () => IBoundsLike;
79
- onLayoutStart: (layoutRect: IRect, viewRect: ILayoutRect, ctx: any) => void;
80
- onLayoutEnd: (option: any) => void;
81
+ onLayoutStart: (layoutRect: IRect, viewRect: ILayoutRect) => void;
82
+ onLayoutEnd: () => void;
81
83
  setLayoutRect: (rect: Partial<ILayoutRect>, levelMap?: Partial<ILayoutRect>) => void;
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
  }
@@ -2,7 +2,6 @@ import type { ILayoutModel } from './../model/interface';
2
2
  import type { IRect, IPoint } from '../typings';
3
3
  import type { IBoundsLike } from '@visactor/vutils';
4
4
  import type { ILayoutItem, ILayoutItemInitOption, ILayoutItemSpec } from './interface';
5
- import type { IChartLayoutOption } from '../chart/interface/common';
6
5
  import type { ILayoutAlignSelf, ILayoutPoint, ILayoutRect } from '../typings/layout';
7
6
  export declare class LayoutItem implements ILayoutItem {
8
7
  protected _spec: ILayoutItemSpec;
@@ -27,6 +26,7 @@ export declare class LayoutItem implements ILayoutItem {
27
26
  get maxHeight(): number;
28
27
  set maxHeight(v: number);
29
28
  protected _lastComputeRect: ILayoutRect;
29
+ get lastComputeRect(): ILayoutRect;
30
30
  protected _lastComputeOutBounds: IBoundsLike;
31
31
  getLastComputeOutBounds(): IBoundsLike;
32
32
  getLayoutRect: () => ILayoutRect;
@@ -48,11 +48,13 @@ export declare class LayoutItem implements ILayoutItem {
48
48
  get model(): ILayoutModel;
49
49
  get type(): string;
50
50
  protected _option: ILayoutItemInitOption;
51
+ protected _willLayoutTag: boolean;
52
+ get willLayoutTag(): boolean;
51
53
  constructor(model: ILayoutModel, option: ILayoutItemInitOption);
52
54
  private _setLayoutAttributeFromSpec;
53
55
  setAttrFromSpec(spec: ILayoutItemSpec, chartViewRect: ILayoutRect): void;
54
- onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect, ctx: any): void;
55
- onLayoutEnd(option: IChartLayoutOption): void;
56
+ onLayoutStart(layoutRect: IRect, viewRect: ILayoutRect): void;
57
+ onLayoutEnd(): void;
56
58
  private _getAbsoluteSpecValue;
57
59
  absoluteLayoutInRect(layoutRect: IRect): void;
58
60
  setLayoutStartPosition(pos: Partial<IPoint>): void;
@@ -69,4 +71,6 @@ export declare class LayoutItem implements ILayoutItem {
69
71
  computeBoundsInRect(rect: ILayoutRect): ILayoutRect;
70
72
  getModelId(): number;
71
73
  getModelVisible(): boolean;
74
+ setWillLayoutTag(): void;
75
+ clearWillLayoutTag(): void;
72
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,15 +3,15 @@ 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;
10
10
  };
11
11
  constructor(name: string, option: IMarkOption);
12
12
  protected _getDefaultStyle(): IMarkStyle<T>;
13
- protected computeOuterRadius: (key: string, datum: Datum, states: StateValueType, opt: any, superValue: number) => number;
14
- protected computeCenter: (key: 'x' | 'y', datum: Datum, states: StateValueType, opt: any, center: number) => number;
13
+ protected computeOuterRadius: (key: string, datum: Datum, states: StateValueType, superValue: number) => number;
14
+ protected computeCenter: (key: 'x' | 'y', datum: Datum, states: StateValueType, center: number) => number;
15
15
  }
16
16
  export declare class ArcMark extends BaseArcMark<IArcMarkSpec> implements IArcMark {
17
17
  static readonly type = MarkTypeEnum.arc;
@@ -6,6 +6,8 @@ export declare class AreaMark extends BaseLineMark<IAreaMarkSpec> implements IAr
6
6
  static readonly type = MarkTypeEnum.area;
7
7
  readonly type = MarkTypeEnum.area;
8
8
  protected _getDefaultStyle(): IMarkStyle<IAreaMarkSpec>;
9
+ protected _getSegmentAttributes(): string[];
9
10
  protected _getIgnoreAttributes(): string[];
11
+ _isValidPointChannel: (channel: string) => boolean;
10
12
  }
11
13
  export declare const registerAreaMark: () => void;
@@ -1,8 +1,31 @@
1
1
  import type { StateValueType } from '../../compile/mark';
2
2
  import type { ConvertToMarkStyleSpec, ILineLikeMarkSpec } from '../../typings/visual';
3
+ import type { IPointLike } from '@visactor/vutils';
3
4
  import { BaseMark } from './base-mark';
4
- import type { IMarkStyle } from '../interface';
5
+ import { type IMarkGraphic, type IMarkStyle } from '../interface';
6
+ import type { Datum } from '../../typings/common';
7
+ import type { IGroup, ILine } from '@visactor/vrender-core';
8
+ import type { IMarkSpec } from '../../typings/spec/common';
9
+ export declare const LINE_SEGMENT_ATTRIBUTES: string[];
5
10
  export declare abstract class BaseLineMark<T extends ILineLikeMarkSpec = ILineLikeMarkSpec> extends BaseMark<T> {
6
11
  protected abstract _getIgnoreAttributes(): string[];
7
- setStyle<T>(style: Partial<ConvertToMarkStyleSpec<T>> | Partial<IMarkStyle<T>>, state?: StateValueType, level?: number, stateStyle?: import("../interface").IMarkStateStyle<T>): void;
12
+ protected _getSegmentAttributes(): string[];
13
+ protected _segmentStyleKeys: string[];
14
+ initStyleWithSpec(spec: IMarkSpec<T>): void;
15
+ setStyle<T>(style: Partial<ConvertToMarkStyleSpec<T>> | Partial<IMarkStyle<T>>, state?: StateValueType, level?: number): void;
16
+ _isValidPointChannel: (channel: string) => boolean;
17
+ _getLineSegments(items: any[], points: IPointLike[]): any[];
18
+ _getPrevPoints(g: ILine): IPointLike[];
19
+ _runPointsEncoder(newStyles: Record<string, (datum: Datum) => any>, g: IMarkGraphic, attrs?: any): any;
20
+ _runEncoderOfGraphic(newStyles: Record<string, (datum: Datum) => any>, g: IMarkGraphic, attrs?: any): any;
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;
8
31
  }
@@ -1,13 +1,84 @@
1
- import type { IAttributeOpt, IModelMarkAttributeContext } from '../../compile/mark/interface';
2
- import type { Datum, IMarkSpec, ICommonSpec, ValueType } from '../../typings';
3
- import type { IMarkRaw, IMarkStateStyle, IMarkStyle, IMarkOption, StyleConvert, MarkInputStyle } from '../interface';
4
- import { CompilableMark } from '../../compile/mark/compilable-mark';
5
- import type { StateValueType } from '../../compile/mark';
6
- export type ExChannelCall = (key: string | number | symbol, datum: Datum, states: StateValueType, opt: unknown, baseValue: unknown) => unknown;
7
- export declare class BaseMark<T extends ICommonSpec> extends CompilableMark implements IMarkRaw<T> {
1
+ import { type IModelMarkAttributeContext } from '../../compile/mark/interface';
2
+ import type { Datum, IMarkSpec, ICommonSpec, ValueType, StringOrNumber, Maybe } from '../../typings';
3
+ import type { DataView } from '@visactor/vdataset';
4
+ import { MarkTypeEnum } from '../interface';
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';
7
+ import type { ICompilableInitOption } from '../../compile/interface';
8
+ import type { IGroupGraphicAttribute, IGroup, IGraphic } from '@visactor/vrender-core';
9
+ import { GrammarItem } from '../../compile/grammar-item';
10
+ import type { IModel } from '../../model/interface';
11
+ import type { ICompilableData } from '../../compile/data/interface';
12
+ import { type MarkAnimationSpec } from '../../animation/interface';
13
+ export type ExChannelCall = (key: string | number | symbol, datum: Datum, states: StateValueType, baseValue: unknown) => unknown;
14
+ export declare class BaseMark<T extends ICommonSpec> extends GrammarItem implements IMarkRaw<T> {
15
+ readonly type: MarkType;
16
+ readonly name: string;
17
+ readonly key: ICompilableMark['key'];
18
+ protected _markConfig: IMarkConfig;
19
+ protected _isCommited?: boolean;
20
+ commit(render?: boolean, recursion?: boolean): void;
21
+ uncommit(): void;
22
+ isCommited(): boolean;
23
+ getMarkConfig(): IMarkConfig;
24
+ setMarkConfig(config: IMarkConfig): void;
25
+ protected _visible: boolean;
26
+ getVisible(): boolean;
27
+ setVisible(visible: boolean): void;
28
+ protected _userId: StringOrNumber;
29
+ getUserId(): StringOrNumber;
30
+ setUserId(userId: StringOrNumber): void;
31
+ readonly model: IModel;
32
+ protected _data: ICompilableData;
33
+ getDataView(): DataView | undefined;
34
+ setDataView(d?: DataView): void;
35
+ getData(): ICompilableData;
36
+ setData(d?: ICompilableData): void;
8
37
  stateStyle: IMarkStateStyle<T>;
38
+ state: IMarkStateManager;
39
+ protected _unCompileChannel: {
40
+ [key in string]: boolean;
41
+ };
42
+ hasState(state: string): boolean;
43
+ getState(state: string): unknown;
44
+ protected _animationConfig: Partial<MarkAnimationSpec>;
45
+ getAnimationConfig(): Partial<MarkAnimationSpec>;
46
+ setAnimationConfig(config: Partial<MarkAnimationSpec>): void;
47
+ private _skipBeforeLayouted;
48
+ setSkipBeforeLayouted(skip: boolean): void;
49
+ protected _groupKey?: string;
50
+ setGroupKey(groupKey: string): void;
51
+ protected _stateSort?: (stateA: string, stateB: string) => number;
52
+ protected _product: Maybe<IGroup>;
53
+ getProduct(): IGroup;
54
+ protected _lastMark?: IMark;
55
+ protected initMarkData(option: ICompilableInitOption): void;
56
+ protected _compileProduct(option?: IMarkCompileOption): void;
57
+ protected _initProduct(group?: IGroup): void;
58
+ generateProductId(): string;
59
+ layout(layout: () => void): void;
60
+ compileData(): void;
61
+ compileEncode(): void;
62
+ compileState(): void;
63
+ compileAnimation(): void;
64
+ _context: any;
65
+ compileContext(extraContext?: any): void;
66
+ getContext(): any;
67
+ protected compileTransform(): void;
68
+ updateState(newState: Record<string, unknown>, noRender?: boolean): void;
69
+ getMarks(): IMark[];
70
+ runAnimationByState(state?: string): void;
71
+ stopAnimationByState(state?: string): void;
72
+ pauseAnimationByState(state?: string): void;
73
+ resumeAnimationByState(state?: string): void;
74
+ removeProduct(): void;
75
+ release(): void;
76
+ protected _simpleStyle: T;
77
+ setSimpleStyle(s: T): void;
78
+ getSimpleStyle(): T;
9
79
  protected _option: IMarkOption;
10
80
  protected _attributeContext: IModelMarkAttributeContext;
81
+ protected _encoderOfState: Record<string, Record<string, (datum: Datum) => any>>;
11
82
  _extensionChannel: {
12
83
  [key: string | number | symbol]: string[];
13
84
  };
@@ -16,17 +87,18 @@ export declare class BaseMark<T extends ICommonSpec> extends CompilableMark impl
16
87
  };
17
88
  constructor(name: string, option: IMarkOption);
18
89
  created(): void;
19
- initStyleWithSpec(spec: IMarkSpec<T>, key?: string): void;
90
+ initStyleWithSpec(spec: IMarkSpec<T>): void;
20
91
  protected _transformStyleValue<T>(styleConverter: StyleConvert<T>, transform: (value: ValueType<T>) => ValueType<T>): StyleConvert<any>;
21
92
  convertAngleToRadian(styleConverter: StyleConvert<number>): any;
22
93
  isUserLevel(level: number): boolean;
23
- setStyle<U extends keyof T>(style: Partial<IMarkStyle<T>>, state?: StateValueType, level?: number, stateStyle?: IMarkStateStyle<T>): void;
94
+ setStyle<U extends keyof T>(style: Partial<IMarkStyle<T>>, state?: StateValueType, level?: number): void;
24
95
  getStyle(key: string, state?: StateValueType): any;
25
- protected _filterAttribute<U extends keyof T>(attr: U, style: MarkInputStyle<T[U]>, state: StateValueType, level: number, isUserLevel: boolean, stateStyle?: IMarkStateStyle<T>): StyleConvert<T[U]>;
26
- setReferer<U extends keyof T>(mark: IMarkRaw<T>, styleKey?: U, state?: StateValueType, stateStyle?: IMarkStateStyle<T>): void;
96
+ protected _filterAttribute<U extends keyof T>(attr: U, style: MarkInputStyle<T[U]>, state: StateValueType, level: number, isUserLevel: boolean): StyleConvert<T[U]>;
97
+ setReferer<U extends keyof T>(mark: IMarkRaw<T>, styleKey?: U, state?: StateValueType): void;
27
98
  setPostProcess<U extends keyof T>(key: U, postProcessFunc: any, state?: StateValueType): void;
28
- getAttribute<U extends keyof T>(key: U, datum: Datum, state?: StateValueType, opt?: IAttributeOpt): any;
29
- setAttribute<U extends keyof T>(attr: U, style: MarkInputStyle<T[U]>, state?: StateValueType, level?: number, stateStyle?: IMarkStateStyle<T>): void;
99
+ getAttribute<U extends keyof T>(key: U, datum: Datum, state?: StateValueType): any;
100
+ getAttributesOfState(datum: Datum, state?: StateValueType): any;
101
+ setAttribute<U extends keyof T>(attr: U, style: MarkInputStyle<T[U]>, state?: StateValueType, level?: number): void;
30
102
  protected _getDefaultStyle(): IMarkStyle<T>;
31
103
  protected _styleConvert<U extends keyof T>(style?: MarkInputStyle<T[U]>): StyleConvert<T[U]> | undefined;
32
104
  protected _computeAttribute<U extends keyof T>(key: U, state: StateValueType): any;
@@ -35,4 +107,79 @@ export declare class BaseMark<T extends ICommonSpec> extends CompilableMark impl
35
107
  private _initSpecStyle;
36
108
  private _computeGradientAttr;
37
109
  private _computeBorderAttr;
110
+ protected _dataByGroup: GroupedData<Datum>;
111
+ protected _dataByKey: GroupedData<Datum>;
112
+ protected _prevDataByKey: GroupedData<Datum>;
113
+ protected _graphicMap: Map<string, IMarkGraphic>;
114
+ protected _graphics: IMarkGraphic[];
115
+ protected _keyGetter: (datum: Datum) => string;
116
+ protected _groupKeyGetter: (datum: Datum) => string;
117
+ protected renderContext?: {
118
+ parameters?: any;
119
+ progressive?: ProgressiveContext;
120
+ beforeTransformProgressive?: IProgressiveTransformResult;
121
+ };
122
+ protected _attrsByGroup?: Record<string, T>;
123
+ protected _getDataByKey(data: Datum[]): GroupedData<Datum>;
124
+ protected _getCommonContext(): {
125
+ markType: MarkTypeEnum;
126
+ markId: number;
127
+ modelId: number;
128
+ markUserId: StringOrNumber;
129
+ modelUserId: StringOrNumber;
130
+ };
131
+ prepareMorph(mark: IMark): void;
132
+ reuse(mark: IMark): void;
133
+ private _parseProgressiveContext;
134
+ getGraphics(): IMarkGraphic[];
135
+ protected _createGraphic(attrs?: any): IGraphic;
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;
140
+ protected _runJoin(data: Datum[]): void;
141
+ _runEncoderOfGraphic(styles: Record<string, (datum: Datum) => any>, g: IMarkGraphic, attrs?: any): any;
142
+ _runGroupEncoder(groupStyles: Record<string, (datum: Datum) => any>): any;
143
+ protected _transformGraphicAttributes(g: IMarkGraphic, attrs: any, groupAttrs?: any): any;
144
+ protected _separateNormalStyle(normalStyle: Partial<IAttrs<T>>): {
145
+ updateStyles: {};
146
+ groupStyles: {};
147
+ };
148
+ protected _getEncoderOfStyle: (stateName: string, style: Partial<IAttrs<T>>) => Record<string, (datum: Datum) => any>;
149
+ protected _setGraphicFromMarkConfig: (g: IMarkGraphic) => void;
150
+ protected _setStateOfGraphic: (g: IMarkGraphic) => 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;
156
+ protected _getAttrsFromConfig(attrs?: IGroupGraphicAttribute): IGroupGraphicAttribute;
157
+ protected _updateAttrsOfGroup(): void;
158
+ protected _runBeforeTransform(data: Datum[]): Datum[];
159
+ protected _runEncoderTransform(data: Datum[], isProgressive: boolean): Datum[];
160
+ protected _runMainTasks(): void;
161
+ render(): void;
162
+ updateMarkState(key: string): void;
163
+ clearExitGraphics(): void;
164
+ isProgressive(): boolean;
165
+ canAnimateAfterProgressive(): boolean;
166
+ isDoingProgressive(): boolean;
167
+ clearProgressive(): void;
168
+ restartProgressive(): 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;
180
+ renderProgressive(): void;
181
+ updateAnimationState(callback: (graphic: IMarkGraphic) => AnimationStateValues): void;
182
+ hasAnimationByState(state: keyof MarkAnimationSpec): boolean;
183
+ hasAnimation(): boolean;
184
+ runAnimation(): void;
38
185
  }
@@ -1,12 +1,18 @@
1
- import type { IBoxPlotMarkSpec } from '../typings/visual';
2
- import { BaseMark } from './base/base-mark';
3
- import type { IGroupMark } from '@visactor/vgrammar-core';
1
+ import type { BoxPlotShaftShape, IBoxPlotMarkSpec } from '../typings/visual';
4
2
  import type { IBoxPlotMark, IMarkStyle } from './interface';
5
3
  import { MarkTypeEnum } from './interface/type';
6
- export declare class BoxPlotMark extends BaseMark<IBoxPlotMarkSpec> implements IBoxPlotMark {
4
+ import { GlyphMark } from './glyph';
5
+ export declare class BoxPlotMark extends GlyphMark<IBoxPlotMarkSpec, {
6
+ direction?: 'horizontal' | 'vertical';
7
+ shaftShape?: BoxPlotShaftShape;
8
+ }> implements IBoxPlotMark {
7
9
  static readonly type = MarkTypeEnum.boxPlot;
8
10
  readonly type = MarkTypeEnum.boxPlot;
11
+ protected _isHorizontal(): boolean;
12
+ setGlyphConfig(cfg: {
13
+ direction?: 'horizontal' | 'vertical';
14
+ shaftShape?: BoxPlotShaftShape;
15
+ }): void;
9
16
  protected _getDefaultStyle(): IMarkStyle<IBoxPlotMarkSpec>;
10
- protected _initProduct(group?: string | IGroupMark): void;
11
17
  }
12
18
  export declare const registerBoxPlotMark: () => void;
@@ -1,10 +1,13 @@
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
- import { BaseSymbolMark } from './symbol';
5
- export declare class CellMark extends BaseSymbolMark<ICellMarkSpec> implements ICellMark {
4
+ import type { IGraphic } from '@visactor/vrender-core';
5
+ import { BaseMark } from './base';
6
+ export declare class CellMark extends BaseMark<ICellMarkSpec> implements ICellMark {
6
7
  static readonly type = MarkTypeEnum.cell;
7
8
  readonly type = MarkTypeEnum.cell;
8
9
  protected _getDefaultStyle(): IMarkStyle<ICellMarkSpec>;
10
+ protected _createGraphic(attrs?: any): IGraphic;
11
+ protected _transformGraphicAttributes(g: IMarkGraphic, attrs: any, groupAttrs?: any): any;
9
12
  }
10
13
  export declare const registerCellMark: () => void;
@@ -1,14 +1,23 @@
1
- import type { IGroupMark } from '@visactor/vgrammar-core';
2
1
  import type { ICommonSpec } from '../typings';
3
2
  import { BaseMark } from './base/base-mark';
4
- import type { IComponentMark, IMarkOption } from './interface';
3
+ import type { IComponentMark, IMarkOption, IMarkStyle } from './interface';
5
4
  import { MarkTypeEnum } from './interface/type';
5
+ import type { IGraphic, IGroupGraphicAttribute } from '@visactor/vrender-core';
6
6
  export declare class ComponentMark extends BaseMark<ICommonSpec> implements IComponentMark {
7
7
  static readonly type = MarkTypeEnum.component;
8
8
  type: string;
9
9
  private _componentType;
10
+ private _component;
10
11
  private _mode;
11
12
  constructor(name: string, option: IMarkOption);
12
- protected _initProduct(group?: string | IGroupMark): void;
13
+ protected _getDefaultStyle(): IMarkStyle<ICommonSpec>;
14
+ getComponent(): IGraphic<Partial<import("@visactor/vrender-core").IGraphicAttribute>>;
15
+ clearComponent(): void;
16
+ protected _getAttrsFromConfig(attrs?: IGroupGraphicAttribute): IGroupGraphicAttribute;
17
+ protected _attributesTransform: (attrs: any) => any;
18
+ setAttributeTransform(t: (attrs: any) => any): void;
19
+ renderInner(): void;
20
+ render(): void;
21
+ release(): void;
13
22
  }
14
23
  export declare const registerComponentMark: () => void;
@@ -0,0 +1,30 @@
1
+ import type { ICommonSpec } from '../typings/visual';
2
+ import { BaseMark } from './base/base-mark';
3
+ import type { IGlyph, IGlyphGraphicAttribute, IGraphic } from '@visactor/vrender-core';
4
+ import type { IGlyphMark } from './interface/mark';
5
+ import type { MarkType } from './interface/type';
6
+ import type { Datum } from '../typings/common';
7
+ import type { IMarkGraphic } from './interface/common';
8
+ export declare abstract class GlyphMark<T extends ICommonSpec = ICommonSpec, Cfg = any> extends BaseMark<T> implements IGlyphMark<T, Cfg> {
9
+ protected _defaultGlyphAttrs: T;
10
+ protected _subMarks: Record<string, {
11
+ type: MarkType;
12
+ defaultAttributes?: any;
13
+ }>;
14
+ getSubMarks(): Record<string, {
15
+ type: string;
16
+ defaultAttributes?: any;
17
+ }>;
18
+ protected _glyphConfig: Cfg;
19
+ setGlyphConfig(cfg: Cfg): void;
20
+ getGlyphConfig(): Cfg;
21
+ protected _positionChannels: string[];
22
+ getPositionChannels(): string[];
23
+ protected _positionEncoder: (glyphAttrs: any, datum: Datum, g: IGlyph) => Record<string, any>;
24
+ protected _channelEncoder: Record<string, (channelValue: any) => Record<string, any>>;
25
+ private _onGlyphAttributeUpdate;
26
+ protected _setStateOfGraphic: (g: IMarkGraphic) => void;
27
+ protected _createGraphic(attrs?: IGlyphGraphicAttribute): IGraphic;
28
+ protected _runProgressiveEncoder(graphics: IMarkGraphic[]): void;
29
+ }
30
+ export declare const registerGlyphMark: () => void;
@@ -1,18 +1,17 @@
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, IMarkStyle, MarkType } from './interface';
4
+ import type { AnimationStateValues, IGroupMark, IMark, IMarkGraphic, MarkType } from './interface';
5
5
  import { MarkTypeEnum } from './interface/type';
6
- import type { IGroupMark as IVGrammarGroupMark } from '@visactor/vgrammar-core';
7
- import type { IMarkCompileOption } from '../compile/mark';
6
+ import { type IMarkCompileOption } from '../compile/mark';
7
+ import type { IGroup, IGroupGraphicAttribute } from '@visactor/vrender-core';
8
8
  export declare class GroupMark extends BaseMark<IGroupMarkSpec> implements IGroupMark {
9
9
  static readonly type = MarkTypeEnum.group;
10
10
  readonly type = MarkTypeEnum.group;
11
11
  protected _marks: IMark[];
12
12
  getMarks(): IMark[];
13
- protected _product: Maybe<IVGrammarGroupMark>;
14
- getProduct: () => Maybe<IVGrammarGroupMark>;
15
- protected _getDefaultStyle(): IMarkStyle<IGroupMarkSpec>;
13
+ protected _product: Maybe<IGroup>;
14
+ getProduct: () => Maybe<IGroup>;
16
15
  protected isMarkExist(mark: IMark): boolean;
17
16
  addMark(mark: IMark): boolean;
18
17
  removeMark(mark: IMark): boolean;
@@ -21,5 +20,11 @@ export declare class GroupMark extends BaseMark<IGroupMarkSpec> implements IGrou
21
20
  getMarkInUserId(id: string | number): IMark;
22
21
  getMarkInName(name: string): IMark[];
23
22
  protected _compileProduct(option?: IMarkCompileOption): void;
23
+ protected _getAttrsFromConfig(attrs?: IGroupGraphicAttribute): IGroupGraphicAttribute;
24
+ getGraphics(): IMarkGraphic[];
25
+ protected _renderSelf(): void;
26
+ render(): void;
27
+ updateAnimationState(callback: (g: IMarkGraphic) => AnimationStateValues): void;
28
+ release(): void;
24
29
  }
25
30
  export declare const registerGroupMark: () => void;