@visactor/vgrammar-core 0.7.0

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 (873) hide show
  1. package/README.md +160 -0
  2. package/README.zh-CN.md +11 -0
  3. package/cjs/component/axis.d.ts +26 -0
  4. package/cjs/component/axis.js +164 -0
  5. package/cjs/component/axis.js.map +1 -0
  6. package/cjs/component/crosshair.d.ts +50 -0
  7. package/cjs/component/crosshair.js +281 -0
  8. package/cjs/component/crosshair.js.map +1 -0
  9. package/cjs/component/datazoom.d.ts +19 -0
  10. package/cjs/component/datazoom.js +166 -0
  11. package/cjs/component/datazoom.js.map +1 -0
  12. package/cjs/component/grid.d.ts +27 -0
  13. package/cjs/component/grid.js +190 -0
  14. package/cjs/component/grid.js.map +1 -0
  15. package/cjs/component/index.d.ts +11 -0
  16. package/cjs/component/index.js +105 -0
  17. package/cjs/component/index.js.map +1 -0
  18. package/cjs/component/label.d.ts +19 -0
  19. package/cjs/component/label.js +121 -0
  20. package/cjs/component/label.js.map +1 -0
  21. package/cjs/component/legend.d.ts +26 -0
  22. package/cjs/component/legend.js +170 -0
  23. package/cjs/component/legend.js.map +1 -0
  24. package/cjs/component/player.d.ts +25 -0
  25. package/cjs/component/player.js +138 -0
  26. package/cjs/component/player.js.map +1 -0
  27. package/cjs/component/scale.d.ts +8 -0
  28. package/cjs/component/scale.js +25 -0
  29. package/cjs/component/scale.js.map +1 -0
  30. package/cjs/component/scrollbar.d.ts +23 -0
  31. package/cjs/component/scrollbar.js +187 -0
  32. package/cjs/component/scrollbar.js.map +1 -0
  33. package/cjs/component/slider.d.ts +19 -0
  34. package/cjs/component/slider.js +86 -0
  35. package/cjs/component/slider.js.map +1 -0
  36. package/cjs/component/title.d.ts +15 -0
  37. package/cjs/component/title.js +56 -0
  38. package/cjs/component/title.js.map +1 -0
  39. package/cjs/component/tooltip.d.ts +62 -0
  40. package/cjs/component/tooltip.js +305 -0
  41. package/cjs/component/tooltip.js.map +1 -0
  42. package/cjs/core/factory.d.ts +35 -0
  43. package/cjs/core/factory.js +73 -0
  44. package/cjs/core/factory.js.map +1 -0
  45. package/cjs/glyph/boxplot.d.ts +10 -0
  46. package/cjs/glyph/boxplot.js +418 -0
  47. package/cjs/glyph/boxplot.js.map +1 -0
  48. package/cjs/glyph/index.d.ts +7 -0
  49. package/cjs/glyph/index.js +64 -0
  50. package/cjs/glyph/index.js.map +1 -0
  51. package/cjs/glyph/link-path.d.ts +7 -0
  52. package/cjs/glyph/link-path.js +138 -0
  53. package/cjs/glyph/link-path.js.map +1 -0
  54. package/cjs/glyph/ripple.d.ts +1 -0
  55. package/cjs/glyph/ripple.js +44 -0
  56. package/cjs/glyph/ripple.js.map +1 -0
  57. package/cjs/glyph/tree-path.d.ts +7 -0
  58. package/cjs/glyph/tree-path.js +152 -0
  59. package/cjs/glyph/tree-path.js.map +1 -0
  60. package/cjs/glyph/violin.d.ts +1 -0
  61. package/cjs/glyph/violin.js +165 -0
  62. package/cjs/glyph/violin.js.map +1 -0
  63. package/cjs/glyph/wave.d.ts +1 -0
  64. package/cjs/glyph/wave.js +67 -0
  65. package/cjs/glyph/wave.js.map +1 -0
  66. package/cjs/graph/animation/animate.d.ts +48 -0
  67. package/cjs/graph/animation/animate.js +250 -0
  68. package/cjs/graph/animation/animate.js.map +1 -0
  69. package/cjs/graph/animation/animation/clip.d.ts +4 -0
  70. package/cjs/graph/animation/animation/clip.js +54 -0
  71. package/cjs/graph/animation/animation/clip.js.map +1 -0
  72. package/cjs/graph/animation/animation/fade.d.ts +4 -0
  73. package/cjs/graph/animation/animation/fade.js +42 -0
  74. package/cjs/graph/animation/animation/fade.js.map +1 -0
  75. package/cjs/graph/animation/animation/grow-cartesian.d.ts +7 -0
  76. package/cjs/graph/animation/animation/grow-cartesian.js +288 -0
  77. package/cjs/graph/animation/animation/grow-cartesian.js.map +1 -0
  78. package/cjs/graph/animation/animation/grow-interval.d.ts +3 -0
  79. package/cjs/graph/animation/animation/grow-interval.js +194 -0
  80. package/cjs/graph/animation/animation/grow-interval.js.map +1 -0
  81. package/cjs/graph/animation/animation/grow-points.d.ts +7 -0
  82. package/cjs/graph/animation/animation/grow-points.js +118 -0
  83. package/cjs/graph/animation/animation/grow-points.js.map +1 -0
  84. package/cjs/graph/animation/animation/grow-polar.d.ts +5 -0
  85. package/cjs/graph/animation/animation/grow-polar.js +164 -0
  86. package/cjs/graph/animation/animation/grow-polar.js.map +1 -0
  87. package/cjs/graph/animation/animation/index.d.ts +11 -0
  88. package/cjs/graph/animation/animation/index.js +191 -0
  89. package/cjs/graph/animation/animation/index.js.map +1 -0
  90. package/cjs/graph/animation/animation/move.d.ts +3 -0
  91. package/cjs/graph/animation/animation/move.js +90 -0
  92. package/cjs/graph/animation/animation/move.js.map +1 -0
  93. package/cjs/graph/animation/animation/rotate.d.ts +3 -0
  94. package/cjs/graph/animation/animation/rotate.js +42 -0
  95. package/cjs/graph/animation/animation/rotate.js.map +1 -0
  96. package/cjs/graph/animation/animation/scale.d.ts +3 -0
  97. package/cjs/graph/animation/animation/scale.js +84 -0
  98. package/cjs/graph/animation/animation/scale.js.map +1 -0
  99. package/cjs/graph/animation/animation/update.d.ts +6 -0
  100. package/cjs/graph/animation/animation/update.js +22 -0
  101. package/cjs/graph/animation/animation/update.js.map +1 -0
  102. package/cjs/graph/animation/animator.d.ts +26 -0
  103. package/cjs/graph/animation/animator.js +88 -0
  104. package/cjs/graph/animation/animator.js.map +1 -0
  105. package/cjs/graph/animation/arranger.d.ts +13 -0
  106. package/cjs/graph/animation/arranger.js +38 -0
  107. package/cjs/graph/animation/arranger.js.map +1 -0
  108. package/cjs/graph/animation/attribute.d.ts +27 -0
  109. package/cjs/graph/animation/attribute.js +124 -0
  110. package/cjs/graph/animation/attribute.js.map +1 -0
  111. package/cjs/graph/animation/config.d.ts +5 -0
  112. package/cjs/graph/animation/config.js +92 -0
  113. package/cjs/graph/animation/config.js.map +1 -0
  114. package/cjs/graph/animation/morph.d.ts +12 -0
  115. package/cjs/graph/animation/morph.js +174 -0
  116. package/cjs/graph/animation/morph.js.map +1 -0
  117. package/cjs/graph/attributes/common.d.ts +2 -0
  118. package/cjs/graph/attributes/common.js +22 -0
  119. package/cjs/graph/attributes/common.js.map +1 -0
  120. package/cjs/graph/attributes/helpers.d.ts +17 -0
  121. package/cjs/graph/attributes/helpers.js +86 -0
  122. package/cjs/graph/attributes/helpers.js.map +1 -0
  123. package/cjs/graph/attributes/index.d.ts +10 -0
  124. package/cjs/graph/attributes/index.js +257 -0
  125. package/cjs/graph/attributes/index.js.map +1 -0
  126. package/cjs/graph/canvas-renderer.d.ts +34 -0
  127. package/cjs/graph/canvas-renderer.js +121 -0
  128. package/cjs/graph/canvas-renderer.js.map +1 -0
  129. package/cjs/graph/constants.d.ts +23 -0
  130. package/cjs/graph/constants.js +21 -0
  131. package/cjs/graph/constants.js.map +1 -0
  132. package/cjs/graph/element.d.ts +66 -0
  133. package/cjs/graph/element.js +297 -0
  134. package/cjs/graph/element.js.map +1 -0
  135. package/cjs/graph/enums.d.ts +153 -0
  136. package/cjs/graph/enums.js +85 -0
  137. package/cjs/graph/enums.js.map +1 -0
  138. package/cjs/graph/glyph-element.d.ts +53 -0
  139. package/cjs/graph/glyph-element.js +202 -0
  140. package/cjs/graph/glyph-element.js.map +1 -0
  141. package/cjs/graph/index.d.ts +3 -0
  142. package/cjs/graph/index.js +44 -0
  143. package/cjs/graph/index.js.map +1 -0
  144. package/cjs/graph/layout/grid.d.ts +3 -0
  145. package/cjs/graph/layout/grid.js +75 -0
  146. package/cjs/graph/layout/grid.js.map +1 -0
  147. package/cjs/graph/layout/layout.d.ts +3 -0
  148. package/cjs/graph/layout/layout.js +33 -0
  149. package/cjs/graph/layout/layout.js.map +1 -0
  150. package/cjs/graph/layout/relative.d.ts +3 -0
  151. package/cjs/graph/layout/relative.js +86 -0
  152. package/cjs/graph/layout/relative.js.map +1 -0
  153. package/cjs/graph/mark/differ.d.ts +20 -0
  154. package/cjs/graph/mark/differ.js +110 -0
  155. package/cjs/graph/mark/differ.js.map +1 -0
  156. package/cjs/graph/mark/encode.d.ts +10 -0
  157. package/cjs/graph/mark/encode.js +95 -0
  158. package/cjs/graph/mark/encode.js.map +1 -0
  159. package/cjs/graph/mark/large-rects.d.ts +10 -0
  160. package/cjs/graph/mark/large-rects.js +31 -0
  161. package/cjs/graph/mark/large-rects.js.map +1 -0
  162. package/cjs/graph/mark/large-symbols.d.ts +11 -0
  163. package/cjs/graph/mark/large-symbols.js +33 -0
  164. package/cjs/graph/mark/large-symbols.js.map +1 -0
  165. package/cjs/graph/mark-tree.d.ts +2 -0
  166. package/cjs/graph/mark-tree.js +21 -0
  167. package/cjs/graph/mark-tree.js.map +1 -0
  168. package/cjs/graph/util/element.d.ts +2 -0
  169. package/cjs/graph/util/element.js +10 -0
  170. package/cjs/graph/util/element.js.map +1 -0
  171. package/cjs/graph/util/env.d.ts +2 -0
  172. package/cjs/graph/util/env.js +14 -0
  173. package/cjs/graph/util/env.js.map +1 -0
  174. package/cjs/graph/util/events-extend.d.ts +5 -0
  175. package/cjs/graph/util/events-extend.js +18 -0
  176. package/cjs/graph/util/events-extend.js.map +1 -0
  177. package/cjs/graph/util/graphic.d.ts +9 -0
  178. package/cjs/graph/util/graphic.js +59 -0
  179. package/cjs/graph/util/graphic.js.map +1 -0
  180. package/cjs/graph/util/point.d.ts +1 -0
  181. package/cjs/graph/util/point.js +75 -0
  182. package/cjs/graph/util/point.js.map +1 -0
  183. package/cjs/index.d.ts +14 -0
  184. package/cjs/index.js +111 -0
  185. package/cjs/index.js.map +1 -0
  186. package/cjs/parse/coordinate.d.ts +7 -0
  187. package/cjs/parse/coordinate.js +70 -0
  188. package/cjs/parse/coordinate.js.map +1 -0
  189. package/cjs/parse/event.d.ts +8 -0
  190. package/cjs/parse/event.js +33 -0
  191. package/cjs/parse/event.js.map +1 -0
  192. package/cjs/parse/mark.d.ts +4 -0
  193. package/cjs/parse/mark.js +25 -0
  194. package/cjs/parse/mark.js.map +1 -0
  195. package/cjs/parse/option.d.ts +3 -0
  196. package/cjs/parse/option.js +19 -0
  197. package/cjs/parse/option.js.map +1 -0
  198. package/cjs/parse/scale.d.ts +8 -0
  199. package/cjs/parse/scale.js +365 -0
  200. package/cjs/parse/scale.js.map +1 -0
  201. package/cjs/parse/transform.d.ts +5 -0
  202. package/cjs/parse/transform.js +103 -0
  203. package/cjs/parse/transform.js.map +1 -0
  204. package/cjs/parse/util.d.ts +13 -0
  205. package/cjs/parse/util.js +82 -0
  206. package/cjs/parse/util.js.map +1 -0
  207. package/cjs/parse/view.d.ts +17 -0
  208. package/cjs/parse/view.js +108 -0
  209. package/cjs/parse/view.js.map +1 -0
  210. package/cjs/semantic-marks/cell.d.ts +13 -0
  211. package/cjs/semantic-marks/cell.js +61 -0
  212. package/cjs/semantic-marks/cell.js.map +1 -0
  213. package/cjs/semantic-marks/interval.d.ts +14 -0
  214. package/cjs/semantic-marks/interval.js +80 -0
  215. package/cjs/semantic-marks/interval.js.map +1 -0
  216. package/cjs/semantic-marks/text.d.ts +10 -0
  217. package/cjs/semantic-marks/text.js +25 -0
  218. package/cjs/semantic-marks/text.js.map +1 -0
  219. package/cjs/theme/common/component.d.ts +15 -0
  220. package/cjs/theme/common/component.js +493 -0
  221. package/cjs/theme/common/component.js.map +1 -0
  222. package/cjs/theme/common/constants.d.ts +1 -0
  223. package/cjs/theme/common/constants.js +6 -0
  224. package/cjs/theme/common/constants.js.map +1 -0
  225. package/cjs/theme/common/mark.d.ts +2 -0
  226. package/cjs/theme/common/mark.js +15 -0
  227. package/cjs/theme/common/mark.js.map +1 -0
  228. package/cjs/theme/dark.d.ts +2 -0
  229. package/cjs/theme/dark.js +94 -0
  230. package/cjs/theme/dark.js.map +1 -0
  231. package/cjs/theme/default.d.ts +2 -0
  232. package/cjs/theme/default.js +18 -0
  233. package/cjs/theme/default.js.map +1 -0
  234. package/cjs/theme/theme-manager.d.ts +8 -0
  235. package/cjs/theme/theme-manager.js +26 -0
  236. package/cjs/theme/theme-manager.js.map +1 -0
  237. package/cjs/transforms/data/bin.d.ts +2 -0
  238. package/cjs/transforms/data/bin.js +21 -0
  239. package/cjs/transforms/data/bin.js.map +1 -0
  240. package/cjs/transforms/data/circular-relation.d.ts +2 -0
  241. package/cjs/transforms/data/circular-relation.js +56 -0
  242. package/cjs/transforms/data/circular-relation.js.map +1 -0
  243. package/cjs/transforms/data/contour.d.ts +2 -0
  244. package/cjs/transforms/data/contour.js +115 -0
  245. package/cjs/transforms/data/contour.js.map +1 -0
  246. package/cjs/transforms/data/filter.d.ts +2 -0
  247. package/cjs/transforms/data/filter.js +10 -0
  248. package/cjs/transforms/data/filter.js.map +1 -0
  249. package/cjs/transforms/data/fold.d.ts +2 -0
  250. package/cjs/transforms/data/fold.js +24 -0
  251. package/cjs/transforms/data/fold.js.map +1 -0
  252. package/cjs/transforms/data/funnel.d.ts +2 -0
  253. package/cjs/transforms/data/funnel.js +25 -0
  254. package/cjs/transforms/data/funnel.js.map +1 -0
  255. package/cjs/transforms/data/join.d.ts +2 -0
  256. package/cjs/transforms/data/join.js +33 -0
  257. package/cjs/transforms/data/join.js.map +1 -0
  258. package/cjs/transforms/data/kde.d.ts +2 -0
  259. package/cjs/transforms/data/kde.js +90 -0
  260. package/cjs/transforms/data/kde.js.map +1 -0
  261. package/cjs/transforms/data/map.d.ts +2 -0
  262. package/cjs/transforms/data/map.js +23 -0
  263. package/cjs/transforms/data/map.js.map +1 -0
  264. package/cjs/transforms/data/pick.d.ts +2 -0
  265. package/cjs/transforms/data/pick.js +20 -0
  266. package/cjs/transforms/data/pick.js.map +1 -0
  267. package/cjs/transforms/data/pie.d.ts +2 -0
  268. package/cjs/transforms/data/pie.js +24 -0
  269. package/cjs/transforms/data/pie.js.map +1 -0
  270. package/cjs/transforms/data/range.d.ts +4 -0
  271. package/cjs/transforms/data/range.js +15 -0
  272. package/cjs/transforms/data/range.js.map +1 -0
  273. package/cjs/transforms/data/sort.d.ts +2 -0
  274. package/cjs/transforms/data/sort.js +17 -0
  275. package/cjs/transforms/data/sort.js.map +1 -0
  276. package/cjs/transforms/data/stack.d.ts +2 -0
  277. package/cjs/transforms/data/stack.js +74 -0
  278. package/cjs/transforms/data/stack.js.map +1 -0
  279. package/cjs/transforms/data/unfold.d.ts +2 -0
  280. package/cjs/transforms/data/unfold.js +49 -0
  281. package/cjs/transforms/data/unfold.js.map +1 -0
  282. package/cjs/transforms/index.d.ts +23 -0
  283. package/cjs/transforms/index.js +213 -0
  284. package/cjs/transforms/index.js.map +1 -0
  285. package/cjs/transforms/mark/dodge.d.ts +2 -0
  286. package/cjs/transforms/mark/dodge.js +81 -0
  287. package/cjs/transforms/mark/dodge.js.map +1 -0
  288. package/cjs/transforms/mark/jitter.d.ts +4 -0
  289. package/cjs/transforms/mark/jitter.js +53 -0
  290. package/cjs/transforms/mark/jitter.js.map +1 -0
  291. package/cjs/transforms/mark/lttb-sample.d.ts +2 -0
  292. package/cjs/transforms/mark/lttb-sample.js +68 -0
  293. package/cjs/transforms/mark/lttb-sample.js.map +1 -0
  294. package/cjs/transforms/mark/mark-overlap.d.ts +2 -0
  295. package/cjs/transforms/mark/mark-overlap.js +79 -0
  296. package/cjs/transforms/mark/mark-overlap.js.map +1 -0
  297. package/cjs/transforms/mark/symmetry.d.ts +2 -0
  298. package/cjs/transforms/mark/symmetry.js +25 -0
  299. package/cjs/transforms/mark/symmetry.js.map +1 -0
  300. package/cjs/transforms/util/util.d.ts +5 -0
  301. package/cjs/transforms/util/util.js +41 -0
  302. package/cjs/transforms/util/util.js.map +1 -0
  303. package/cjs/transforms/view/identifier.d.ts +2 -0
  304. package/cjs/transforms/view/identifier.js +17 -0
  305. package/cjs/transforms/view/identifier.js.map +1 -0
  306. package/cjs/types/animate.d.ts +224 -0
  307. package/cjs/types/animate.js +6 -0
  308. package/cjs/types/animate.js.map +1 -0
  309. package/cjs/types/base.d.ts +36 -0
  310. package/cjs/types/base.js +6 -0
  311. package/cjs/types/base.js.map +1 -0
  312. package/cjs/types/component.d.ts +240 -0
  313. package/cjs/types/component.js +6 -0
  314. package/cjs/types/component.js.map +1 -0
  315. package/cjs/types/coordinate.d.ts +15 -0
  316. package/cjs/types/coordinate.js +6 -0
  317. package/cjs/types/coordinate.js.map +1 -0
  318. package/cjs/types/data.d.ts +55 -0
  319. package/cjs/types/data.js +5 -0
  320. package/cjs/types/data.js.map +1 -0
  321. package/cjs/types/dataflow.d.ts +13 -0
  322. package/cjs/types/dataflow.js +6 -0
  323. package/cjs/types/dataflow.js.map +1 -0
  324. package/cjs/types/element.d.ts +117 -0
  325. package/cjs/types/element.js +6 -0
  326. package/cjs/types/element.js.map +1 -0
  327. package/cjs/types/event.d.ts +58 -0
  328. package/cjs/types/event.js +6 -0
  329. package/cjs/types/event.js.map +1 -0
  330. package/cjs/types/glyph.d.ts +29 -0
  331. package/cjs/types/glyph.js +6 -0
  332. package/cjs/types/glyph.js.map +1 -0
  333. package/cjs/types/grammar.d.ts +184 -0
  334. package/cjs/types/grammar.js +6 -0
  335. package/cjs/types/grammar.js.map +1 -0
  336. package/cjs/types/hooks.d.ts +45 -0
  337. package/cjs/types/hooks.js +6 -0
  338. package/cjs/types/hooks.js.map +1 -0
  339. package/cjs/types/index.d.ts +22 -0
  340. package/cjs/types/index.js +31 -0
  341. package/cjs/types/index.js.map +1 -0
  342. package/cjs/types/layout.d.ts +5 -0
  343. package/cjs/types/layout.js +6 -0
  344. package/cjs/types/layout.js.map +1 -0
  345. package/cjs/types/mark.d.ts +344 -0
  346. package/cjs/types/mark.js +6 -0
  347. package/cjs/types/mark.js.map +1 -0
  348. package/cjs/types/morph.d.ts +29 -0
  349. package/cjs/types/morph.js +6 -0
  350. package/cjs/types/morph.js.map +1 -0
  351. package/cjs/types/plot.d.ts +326 -0
  352. package/cjs/types/plot.js +6 -0
  353. package/cjs/types/plot.js.map +1 -0
  354. package/cjs/types/projection.d.ts +61 -0
  355. package/cjs/types/projection.js +6 -0
  356. package/cjs/types/projection.js.map +1 -0
  357. package/cjs/types/renderer.d.ts +19 -0
  358. package/cjs/types/renderer.js +6 -0
  359. package/cjs/types/renderer.js.map +1 -0
  360. package/cjs/types/scale.d.ts +111 -0
  361. package/cjs/types/scale.js +6 -0
  362. package/cjs/types/scale.js.map +1 -0
  363. package/cjs/types/signal.d.ts +20 -0
  364. package/cjs/types/signal.js +6 -0
  365. package/cjs/types/signal.js.map +1 -0
  366. package/cjs/types/theme.d.ts +41 -0
  367. package/cjs/types/theme.js +6 -0
  368. package/cjs/types/theme.js.map +1 -0
  369. package/cjs/types/transform.d.ts +291 -0
  370. package/cjs/types/transform.js +6 -0
  371. package/cjs/types/transform.js.map +1 -0
  372. package/cjs/types/view.d.ts +217 -0
  373. package/cjs/types/view.js +6 -0
  374. package/cjs/types/view.js.map +1 -0
  375. package/cjs/util/data.d.ts +3 -0
  376. package/cjs/util/data.js +64 -0
  377. package/cjs/util/data.js.map +1 -0
  378. package/cjs/util/grammar-heap.d.ts +14 -0
  379. package/cjs/util/grammar-heap.js +66 -0
  380. package/cjs/util/grammar-heap.js.map +1 -0
  381. package/cjs/util/text.d.ts +19 -0
  382. package/cjs/util/text.js +32 -0
  383. package/cjs/util/text.js.map +1 -0
  384. package/cjs/util/unique-list.d.ts +12 -0
  385. package/cjs/util/unique-list.js +37 -0
  386. package/cjs/util/unique-list.js.map +1 -0
  387. package/cjs/view/View.d.ts +157 -0
  388. package/cjs/view/View.js +800 -0
  389. package/cjs/view/View.js.map +1 -0
  390. package/cjs/view/animate.d.ts +20 -0
  391. package/cjs/view/animate.js +106 -0
  392. package/cjs/view/animate.js.map +1 -0
  393. package/cjs/view/component.d.ts +26 -0
  394. package/cjs/view/component.js +64 -0
  395. package/cjs/view/component.js.map +1 -0
  396. package/cjs/view/constants.d.ts +17 -0
  397. package/cjs/view/constants.js +13 -0
  398. package/cjs/view/constants.js.map +1 -0
  399. package/cjs/view/coordinate.d.ts +23 -0
  400. package/cjs/view/coordinate.js +59 -0
  401. package/cjs/view/coordinate.js.map +1 -0
  402. package/cjs/view/data.d.ts +37 -0
  403. package/cjs/view/data.js +198 -0
  404. package/cjs/view/data.js.map +1 -0
  405. package/cjs/view/dataflow.d.ts +32 -0
  406. package/cjs/view/dataflow.js +146 -0
  407. package/cjs/view/dataflow.js.map +1 -0
  408. package/cjs/view/events.d.ts +4 -0
  409. package/cjs/view/events.js +34 -0
  410. package/cjs/view/events.js.map +1 -0
  411. package/cjs/view/glyph-meta.d.ts +29 -0
  412. package/cjs/view/glyph-meta.js +45 -0
  413. package/cjs/view/glyph-meta.js.map +1 -0
  414. package/cjs/view/glyph.d.ts +14 -0
  415. package/cjs/view/glyph.js +29 -0
  416. package/cjs/view/glyph.js.map +1 -0
  417. package/cjs/view/grammar-base.d.ts +46 -0
  418. package/cjs/view/grammar-base.js +171 -0
  419. package/cjs/view/grammar-base.js.map +1 -0
  420. package/cjs/view/grammar-record.d.ts +39 -0
  421. package/cjs/view/grammar-record.js +180 -0
  422. package/cjs/view/grammar-record.js.map +1 -0
  423. package/cjs/view/group.d.ts +13 -0
  424. package/cjs/view/group.js +39 -0
  425. package/cjs/view/group.js.map +1 -0
  426. package/cjs/view/index.d.ts +1 -0
  427. package/cjs/view/index.js +21 -0
  428. package/cjs/view/index.js.map +1 -0
  429. package/cjs/view/mark.d.ts +112 -0
  430. package/cjs/view/mark.js +600 -0
  431. package/cjs/view/mark.js.map +1 -0
  432. package/cjs/view/scale.d.ts +26 -0
  433. package/cjs/view/scale.js +86 -0
  434. package/cjs/view/scale.js.map +1 -0
  435. package/cjs/view/signal.d.ts +18 -0
  436. package/cjs/view/signal.js +56 -0
  437. package/cjs/view/signal.js.map +1 -0
  438. package/es/component/axis.d.ts +26 -0
  439. package/es/component/axis.js +162 -0
  440. package/es/component/axis.js.map +1 -0
  441. package/es/component/crosshair.d.ts +50 -0
  442. package/es/component/crosshair.js +275 -0
  443. package/es/component/crosshair.js.map +1 -0
  444. package/es/component/datazoom.d.ts +19 -0
  445. package/es/component/datazoom.js +161 -0
  446. package/es/component/datazoom.js.map +1 -0
  447. package/es/component/grid.d.ts +27 -0
  448. package/es/component/grid.js +193 -0
  449. package/es/component/grid.js.map +1 -0
  450. package/es/component/index.d.ts +11 -0
  451. package/es/component/index.js +22 -0
  452. package/es/component/index.js.map +1 -0
  453. package/es/component/label.d.ts +19 -0
  454. package/es/component/label.js +124 -0
  455. package/es/component/label.js.map +1 -0
  456. package/es/component/legend.d.ts +26 -0
  457. package/es/component/legend.js +169 -0
  458. package/es/component/legend.js.map +1 -0
  459. package/es/component/player.d.ts +25 -0
  460. package/es/component/player.js +136 -0
  461. package/es/component/player.js.map +1 -0
  462. package/es/component/scale.d.ts +8 -0
  463. package/es/component/scale.js +19 -0
  464. package/es/component/scale.js.map +1 -0
  465. package/es/component/scrollbar.d.ts +23 -0
  466. package/es/component/scrollbar.js +184 -0
  467. package/es/component/scrollbar.js.map +1 -0
  468. package/es/component/slider.d.ts +19 -0
  469. package/es/component/slider.js +86 -0
  470. package/es/component/slider.js.map +1 -0
  471. package/es/component/title.d.ts +15 -0
  472. package/es/component/title.js +58 -0
  473. package/es/component/title.js.map +1 -0
  474. package/es/component/tooltip.d.ts +62 -0
  475. package/es/component/tooltip.js +303 -0
  476. package/es/component/tooltip.js.map +1 -0
  477. package/es/core/factory.d.ts +35 -0
  478. package/es/core/factory.js +67 -0
  479. package/es/core/factory.js.map +1 -0
  480. package/es/glyph/boxplot.d.ts +10 -0
  481. package/es/glyph/boxplot.js +410 -0
  482. package/es/glyph/boxplot.js.map +1 -0
  483. package/es/glyph/index.d.ts +7 -0
  484. package/es/glyph/index.js +11 -0
  485. package/es/glyph/index.js.map +1 -0
  486. package/es/glyph/link-path.d.ts +7 -0
  487. package/es/glyph/link-path.js +132 -0
  488. package/es/glyph/link-path.js.map +1 -0
  489. package/es/glyph/ripple.d.ts +1 -0
  490. package/es/glyph/ripple.js +38 -0
  491. package/es/glyph/ripple.js.map +1 -0
  492. package/es/glyph/tree-path.d.ts +7 -0
  493. package/es/glyph/tree-path.js +146 -0
  494. package/es/glyph/tree-path.js.map +1 -0
  495. package/es/glyph/violin.d.ts +1 -0
  496. package/es/glyph/violin.js +163 -0
  497. package/es/glyph/violin.js.map +1 -0
  498. package/es/glyph/wave.d.ts +1 -0
  499. package/es/glyph/wave.js +61 -0
  500. package/es/glyph/wave.js.map +1 -0
  501. package/es/graph/animation/animate.d.ts +48 -0
  502. package/es/graph/animation/animate.js +247 -0
  503. package/es/graph/animation/animate.js.map +1 -0
  504. package/es/graph/animation/animation/clip.d.ts +4 -0
  505. package/es/graph/animation/animation/clip.js +44 -0
  506. package/es/graph/animation/animation/clip.js.map +1 -0
  507. package/es/graph/animation/animation/fade.d.ts +4 -0
  508. package/es/graph/animation/animation/fade.js +32 -0
  509. package/es/graph/animation/animation/fade.js.map +1 -0
  510. package/es/graph/animation/animation/grow-cartesian.d.ts +7 -0
  511. package/es/graph/animation/animation/grow-cartesian.js +272 -0
  512. package/es/graph/animation/animation/grow-cartesian.js.map +1 -0
  513. package/es/graph/animation/animation/grow-interval.d.ts +3 -0
  514. package/es/graph/animation/animation/grow-interval.js +184 -0
  515. package/es/graph/animation/animation/grow-interval.js.map +1 -0
  516. package/es/graph/animation/animation/grow-points.d.ts +7 -0
  517. package/es/graph/animation/animation/grow-points.js +107 -0
  518. package/es/graph/animation/animation/grow-points.js.map +1 -0
  519. package/es/graph/animation/animation/grow-polar.d.ts +5 -0
  520. package/es/graph/animation/animation/grow-polar.js +160 -0
  521. package/es/graph/animation/animation/grow-polar.js.map +1 -0
  522. package/es/graph/animation/animation/index.d.ts +11 -0
  523. package/es/graph/animation/animation/index.js +22 -0
  524. package/es/graph/animation/animation/index.js.map +1 -0
  525. package/es/graph/animation/animation/move.d.ts +3 -0
  526. package/es/graph/animation/animation/move.js +78 -0
  527. package/es/graph/animation/animation/move.js.map +1 -0
  528. package/es/graph/animation/animation/rotate.d.ts +3 -0
  529. package/es/graph/animation/animation/rotate.js +32 -0
  530. package/es/graph/animation/animation/rotate.js.map +1 -0
  531. package/es/graph/animation/animation/scale.d.ts +3 -0
  532. package/es/graph/animation/animation/scale.js +74 -0
  533. package/es/graph/animation/animation/scale.js.map +1 -0
  534. package/es/graph/animation/animation/update.d.ts +6 -0
  535. package/es/graph/animation/animation/update.js +20 -0
  536. package/es/graph/animation/animation/update.js.map +1 -0
  537. package/es/graph/animation/animator.d.ts +26 -0
  538. package/es/graph/animation/animator.js +83 -0
  539. package/es/graph/animation/animator.js.map +1 -0
  540. package/es/graph/animation/arranger.d.ts +13 -0
  541. package/es/graph/animation/arranger.js +29 -0
  542. package/es/graph/animation/arranger.js.map +1 -0
  543. package/es/graph/animation/attribute.d.ts +27 -0
  544. package/es/graph/animation/attribute.js +114 -0
  545. package/es/graph/animation/attribute.js.map +1 -0
  546. package/es/graph/animation/config.d.ts +5 -0
  547. package/es/graph/animation/config.js +84 -0
  548. package/es/graph/animation/config.js.map +1 -0
  549. package/es/graph/animation/morph.d.ts +12 -0
  550. package/es/graph/animation/morph.js +171 -0
  551. package/es/graph/animation/morph.js.map +1 -0
  552. package/es/graph/attributes/common.d.ts +2 -0
  553. package/es/graph/attributes/common.js +13 -0
  554. package/es/graph/attributes/common.js.map +1 -0
  555. package/es/graph/attributes/helpers.d.ts +17 -0
  556. package/es/graph/attributes/helpers.js +75 -0
  557. package/es/graph/attributes/helpers.js.map +1 -0
  558. package/es/graph/attributes/index.d.ts +10 -0
  559. package/es/graph/attributes/index.js +231 -0
  560. package/es/graph/attributes/index.js.map +1 -0
  561. package/es/graph/canvas-renderer.d.ts +34 -0
  562. package/es/graph/canvas-renderer.js +115 -0
  563. package/es/graph/canvas-renderer.js.map +1 -0
  564. package/es/graph/constants.d.ts +23 -0
  565. package/es/graph/constants.js +47 -0
  566. package/es/graph/constants.js.map +1 -0
  567. package/es/graph/element.d.ts +66 -0
  568. package/es/graph/element.js +292 -0
  569. package/es/graph/element.js.map +1 -0
  570. package/es/graph/enums.d.ts +153 -0
  571. package/es/graph/enums.js +129 -0
  572. package/es/graph/enums.js.map +1 -0
  573. package/es/graph/glyph-element.d.ts +53 -0
  574. package/es/graph/glyph-element.js +206 -0
  575. package/es/graph/glyph-element.js.map +1 -0
  576. package/es/graph/index.d.ts +3 -0
  577. package/es/graph/index.js +6 -0
  578. package/es/graph/index.js.map +1 -0
  579. package/es/graph/layout/grid.d.ts +3 -0
  580. package/es/graph/layout/grid.js +66 -0
  581. package/es/graph/layout/grid.js.map +1 -0
  582. package/es/graph/layout/layout.d.ts +3 -0
  583. package/es/graph/layout/layout.js +33 -0
  584. package/es/graph/layout/layout.js.map +1 -0
  585. package/es/graph/layout/relative.d.ts +3 -0
  586. package/es/graph/layout/relative.js +85 -0
  587. package/es/graph/layout/relative.js.map +1 -0
  588. package/es/graph/mark/differ.d.ts +20 -0
  589. package/es/graph/mark/differ.js +104 -0
  590. package/es/graph/mark/differ.js.map +1 -0
  591. package/es/graph/mark/encode.d.ts +10 -0
  592. package/es/graph/mark/encode.js +92 -0
  593. package/es/graph/mark/encode.js.map +1 -0
  594. package/es/graph/mark/large-rects.d.ts +10 -0
  595. package/es/graph/mark/large-rects.js +23 -0
  596. package/es/graph/mark/large-rects.js.map +1 -0
  597. package/es/graph/mark/large-symbols.d.ts +11 -0
  598. package/es/graph/mark/large-symbols.js +27 -0
  599. package/es/graph/mark/large-symbols.js.map +1 -0
  600. package/es/graph/mark-tree.d.ts +2 -0
  601. package/es/graph/mark-tree.js +15 -0
  602. package/es/graph/mark-tree.js.map +1 -0
  603. package/es/graph/util/element.d.ts +2 -0
  604. package/es/graph/util/element.js +8 -0
  605. package/es/graph/util/element.js.map +1 -0
  606. package/es/graph/util/env.d.ts +2 -0
  607. package/es/graph/util/env.js +6 -0
  608. package/es/graph/util/env.js.map +1 -0
  609. package/es/graph/util/events-extend.d.ts +5 -0
  610. package/es/graph/util/events-extend.js +12 -0
  611. package/es/graph/util/events-extend.js.map +1 -0
  612. package/es/graph/util/graphic.d.ts +9 -0
  613. package/es/graph/util/graphic.js +59 -0
  614. package/es/graph/util/graphic.js.map +1 -0
  615. package/es/graph/util/point.d.ts +1 -0
  616. package/es/graph/util/point.js +67 -0
  617. package/es/graph/util/point.js.map +1 -0
  618. package/es/index.d.ts +14 -0
  619. package/es/index.js +27 -0
  620. package/es/index.js.map +1 -0
  621. package/es/parse/coordinate.d.ts +7 -0
  622. package/es/parse/coordinate.js +65 -0
  623. package/es/parse/coordinate.js.map +1 -0
  624. package/es/parse/event.d.ts +8 -0
  625. package/es/parse/event.js +23 -0
  626. package/es/parse/event.js.map +1 -0
  627. package/es/parse/mark.d.ts +4 -0
  628. package/es/parse/mark.js +19 -0
  629. package/es/parse/mark.js.map +1 -0
  630. package/es/parse/option.d.ts +3 -0
  631. package/es/parse/option.js +10 -0
  632. package/es/parse/option.js.map +1 -0
  633. package/es/parse/scale.d.ts +8 -0
  634. package/es/parse/scale.js +347 -0
  635. package/es/parse/scale.js.map +1 -0
  636. package/es/parse/transform.d.ts +5 -0
  637. package/es/parse/transform.js +102 -0
  638. package/es/parse/transform.js.map +1 -0
  639. package/es/parse/util.d.ts +13 -0
  640. package/es/parse/util.js +65 -0
  641. package/es/parse/util.js.map +1 -0
  642. package/es/parse/view.d.ts +17 -0
  643. package/es/parse/view.js +98 -0
  644. package/es/parse/view.js.map +1 -0
  645. package/es/semantic-marks/cell.d.ts +13 -0
  646. package/es/semantic-marks/cell.js +57 -0
  647. package/es/semantic-marks/cell.js.map +1 -0
  648. package/es/semantic-marks/interval.d.ts +14 -0
  649. package/es/semantic-marks/interval.js +87 -0
  650. package/es/semantic-marks/interval.js.map +1 -0
  651. package/es/semantic-marks/text.d.ts +10 -0
  652. package/es/semantic-marks/text.js +22 -0
  653. package/es/semantic-marks/text.js.map +1 -0
  654. package/es/theme/common/component.d.ts +15 -0
  655. package/es/theme/common/component.js +510 -0
  656. package/es/theme/common/component.js.map +1 -0
  657. package/es/theme/common/constants.d.ts +1 -0
  658. package/es/theme/common/constants.js +2 -0
  659. package/es/theme/common/constants.js.map +1 -0
  660. package/es/theme/common/mark.d.ts +2 -0
  661. package/es/theme/common/mark.js +11 -0
  662. package/es/theme/common/mark.js.map +1 -0
  663. package/es/theme/dark.d.ts +2 -0
  664. package/es/theme/dark.js +96 -0
  665. package/es/theme/dark.js.map +1 -0
  666. package/es/theme/default.d.ts +2 -0
  667. package/es/theme/default.js +16 -0
  668. package/es/theme/default.js.map +1 -0
  669. package/es/theme/theme-manager.d.ts +8 -0
  670. package/es/theme/theme-manager.js +22 -0
  671. package/es/theme/theme-manager.js.map +1 -0
  672. package/es/transforms/data/bin.d.ts +2 -0
  673. package/es/transforms/data/bin.js +16 -0
  674. package/es/transforms/data/bin.js.map +1 -0
  675. package/es/transforms/data/circular-relation.d.ts +2 -0
  676. package/es/transforms/data/circular-relation.js +44 -0
  677. package/es/transforms/data/circular-relation.js.map +1 -0
  678. package/es/transforms/data/contour.d.ts +2 -0
  679. package/es/transforms/data/contour.js +111 -0
  680. package/es/transforms/data/contour.js.map +1 -0
  681. package/es/transforms/data/filter.d.ts +2 -0
  682. package/es/transforms/data/filter.js +2 -0
  683. package/es/transforms/data/filter.js.map +1 -0
  684. package/es/transforms/data/fold.d.ts +2 -0
  685. package/es/transforms/data/fold.js +16 -0
  686. package/es/transforms/data/fold.js.map +1 -0
  687. package/es/transforms/data/funnel.d.ts +2 -0
  688. package/es/transforms/data/funnel.js +17 -0
  689. package/es/transforms/data/funnel.js.map +1 -0
  690. package/es/transforms/data/join.d.ts +2 -0
  691. package/es/transforms/data/join.js +26 -0
  692. package/es/transforms/data/join.js.map +1 -0
  693. package/es/transforms/data/kde.d.ts +2 -0
  694. package/es/transforms/data/kde.js +80 -0
  695. package/es/transforms/data/kde.js.map +1 -0
  696. package/es/transforms/data/map.d.ts +2 -0
  697. package/es/transforms/data/map.js +16 -0
  698. package/es/transforms/data/map.js.map +1 -0
  699. package/es/transforms/data/pick.d.ts +2 -0
  700. package/es/transforms/data/pick.js +15 -0
  701. package/es/transforms/data/pick.js.map +1 -0
  702. package/es/transforms/data/pie.d.ts +2 -0
  703. package/es/transforms/data/pie.js +18 -0
  704. package/es/transforms/data/pie.js.map +1 -0
  705. package/es/transforms/data/range.d.ts +4 -0
  706. package/es/transforms/data/range.js +9 -0
  707. package/es/transforms/data/range.js.map +1 -0
  708. package/es/transforms/data/sort.d.ts +2 -0
  709. package/es/transforms/data/sort.js +13 -0
  710. package/es/transforms/data/sort.js.map +1 -0
  711. package/es/transforms/data/stack.d.ts +2 -0
  712. package/es/transforms/data/stack.js +72 -0
  713. package/es/transforms/data/stack.js.map +1 -0
  714. package/es/transforms/data/unfold.d.ts +2 -0
  715. package/es/transforms/data/unfold.js +45 -0
  716. package/es/transforms/data/unfold.js.map +1 -0
  717. package/es/transforms/index.d.ts +23 -0
  718. package/es/transforms/index.js +205 -0
  719. package/es/transforms/index.js.map +1 -0
  720. package/es/transforms/mark/dodge.d.ts +2 -0
  721. package/es/transforms/mark/dodge.js +74 -0
  722. package/es/transforms/mark/dodge.js.map +1 -0
  723. package/es/transforms/mark/jitter.d.ts +4 -0
  724. package/es/transforms/mark/jitter.js +48 -0
  725. package/es/transforms/mark/jitter.js.map +1 -0
  726. package/es/transforms/mark/lttb-sample.d.ts +2 -0
  727. package/es/transforms/mark/lttb-sample.js +60 -0
  728. package/es/transforms/mark/lttb-sample.js.map +1 -0
  729. package/es/transforms/mark/mark-overlap.d.ts +2 -0
  730. package/es/transforms/mark/mark-overlap.js +71 -0
  731. package/es/transforms/mark/mark-overlap.js.map +1 -0
  732. package/es/transforms/mark/symmetry.d.ts +2 -0
  733. package/es/transforms/mark/symmetry.js +20 -0
  734. package/es/transforms/mark/symmetry.js.map +1 -0
  735. package/es/transforms/util/util.d.ts +5 -0
  736. package/es/transforms/util/util.js +33 -0
  737. package/es/transforms/util/util.js.map +1 -0
  738. package/es/transforms/view/identifier.d.ts +2 -0
  739. package/es/transforms/view/identifier.js +13 -0
  740. package/es/transforms/view/identifier.js.map +1 -0
  741. package/es/types/animate.d.ts +224 -0
  742. package/es/types/animate.js +2 -0
  743. package/es/types/animate.js.map +1 -0
  744. package/es/types/base.d.ts +36 -0
  745. package/es/types/base.js +2 -0
  746. package/es/types/base.js.map +1 -0
  747. package/es/types/component.d.ts +240 -0
  748. package/es/types/component.js +2 -0
  749. package/es/types/component.js.map +1 -0
  750. package/es/types/coordinate.d.ts +15 -0
  751. package/es/types/coordinate.js +2 -0
  752. package/es/types/coordinate.js.map +1 -0
  753. package/es/types/data.d.ts +55 -0
  754. package/es/types/data.js +1 -0
  755. package/es/types/data.js.map +1 -0
  756. package/es/types/dataflow.d.ts +13 -0
  757. package/es/types/dataflow.js +2 -0
  758. package/es/types/dataflow.js.map +1 -0
  759. package/es/types/element.d.ts +117 -0
  760. package/es/types/element.js +2 -0
  761. package/es/types/element.js.map +1 -0
  762. package/es/types/event.d.ts +58 -0
  763. package/es/types/event.js +2 -0
  764. package/es/types/event.js.map +1 -0
  765. package/es/types/glyph.d.ts +29 -0
  766. package/es/types/glyph.js +2 -0
  767. package/es/types/glyph.js.map +1 -0
  768. package/es/types/grammar.d.ts +184 -0
  769. package/es/types/grammar.js +2 -0
  770. package/es/types/grammar.js.map +1 -0
  771. package/es/types/hooks.d.ts +45 -0
  772. package/es/types/hooks.js +2 -0
  773. package/es/types/hooks.js.map +1 -0
  774. package/es/types/index.d.ts +22 -0
  775. package/es/types/index.js +44 -0
  776. package/es/types/index.js.map +1 -0
  777. package/es/types/layout.d.ts +5 -0
  778. package/es/types/layout.js +2 -0
  779. package/es/types/layout.js.map +1 -0
  780. package/es/types/mark.d.ts +344 -0
  781. package/es/types/mark.js +2 -0
  782. package/es/types/mark.js.map +1 -0
  783. package/es/types/morph.d.ts +29 -0
  784. package/es/types/morph.js +2 -0
  785. package/es/types/morph.js.map +1 -0
  786. package/es/types/plot.d.ts +326 -0
  787. package/es/types/plot.js +2 -0
  788. package/es/types/plot.js.map +1 -0
  789. package/es/types/projection.d.ts +61 -0
  790. package/es/types/projection.js +2 -0
  791. package/es/types/projection.js.map +1 -0
  792. package/es/types/renderer.d.ts +19 -0
  793. package/es/types/renderer.js +2 -0
  794. package/es/types/renderer.js.map +1 -0
  795. package/es/types/scale.d.ts +111 -0
  796. package/es/types/scale.js +2 -0
  797. package/es/types/scale.js.map +1 -0
  798. package/es/types/signal.d.ts +20 -0
  799. package/es/types/signal.js +2 -0
  800. package/es/types/signal.js.map +1 -0
  801. package/es/types/theme.d.ts +41 -0
  802. package/es/types/theme.js +2 -0
  803. package/es/types/theme.js.map +1 -0
  804. package/es/types/transform.d.ts +291 -0
  805. package/es/types/transform.js +2 -0
  806. package/es/types/transform.js.map +1 -0
  807. package/es/types/view.d.ts +217 -0
  808. package/es/types/view.js +2 -0
  809. package/es/types/view.js.map +1 -0
  810. package/es/util/data.d.ts +3 -0
  811. package/es/util/data.js +60 -0
  812. package/es/util/data.js.map +1 -0
  813. package/es/util/grammar-heap.d.ts +14 -0
  814. package/es/util/grammar-heap.js +58 -0
  815. package/es/util/grammar-heap.js.map +1 -0
  816. package/es/util/text.d.ts +19 -0
  817. package/es/util/text.js +25 -0
  818. package/es/util/text.js.map +1 -0
  819. package/es/util/unique-list.d.ts +12 -0
  820. package/es/util/unique-list.js +29 -0
  821. package/es/util/unique-list.js.map +1 -0
  822. package/es/view/View.d.ts +157 -0
  823. package/es/view/View.js +836 -0
  824. package/es/view/View.js.map +1 -0
  825. package/es/view/animate.d.ts +20 -0
  826. package/es/view/animate.js +98 -0
  827. package/es/view/animate.js.map +1 -0
  828. package/es/view/component.d.ts +26 -0
  829. package/es/view/component.js +64 -0
  830. package/es/view/component.js.map +1 -0
  831. package/es/view/constants.d.ts +17 -0
  832. package/es/view/constants.js +32 -0
  833. package/es/view/constants.js.map +1 -0
  834. package/es/view/coordinate.d.ts +23 -0
  835. package/es/view/coordinate.js +52 -0
  836. package/es/view/coordinate.js.map +1 -0
  837. package/es/view/data.d.ts +37 -0
  838. package/es/view/data.js +195 -0
  839. package/es/view/data.js.map +1 -0
  840. package/es/view/dataflow.d.ts +32 -0
  841. package/es/view/dataflow.js +141 -0
  842. package/es/view/dataflow.js.map +1 -0
  843. package/es/view/events.d.ts +4 -0
  844. package/es/view/events.js +26 -0
  845. package/es/view/events.js.map +1 -0
  846. package/es/view/glyph-meta.d.ts +29 -0
  847. package/es/view/glyph-meta.js +37 -0
  848. package/es/view/glyph-meta.js.map +1 -0
  849. package/es/view/glyph.d.ts +14 -0
  850. package/es/view/glyph.js +27 -0
  851. package/es/view/glyph.js.map +1 -0
  852. package/es/view/grammar-base.d.ts +46 -0
  853. package/es/view/grammar-base.js +165 -0
  854. package/es/view/grammar-base.js.map +1 -0
  855. package/es/view/grammar-record.d.ts +39 -0
  856. package/es/view/grammar-record.js +170 -0
  857. package/es/view/grammar-record.js.map +1 -0
  858. package/es/view/group.d.ts +13 -0
  859. package/es/view/group.js +39 -0
  860. package/es/view/group.js.map +1 -0
  861. package/es/view/index.d.ts +1 -0
  862. package/es/view/index.js +2 -0
  863. package/es/view/index.js.map +1 -0
  864. package/es/view/mark.d.ts +112 -0
  865. package/es/view/mark.js +604 -0
  866. package/es/view/mark.js.map +1 -0
  867. package/es/view/scale.d.ts +26 -0
  868. package/es/view/scale.js +82 -0
  869. package/es/view/scale.js.map +1 -0
  870. package/es/view/signal.d.ts +18 -0
  871. package/es/view/signal.js +52 -0
  872. package/es/view/signal.js.map +1 -0
  873. package/package.json +67 -0
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+
3
+ var BuiltInEncodeNames, DiffState, GrammarMarkType, ComponentEnum, ComponentDataRank, AxisEnum, GridEnum, LegendEnum, CrosshairEnum, LabelEnum, PlayerEnum, LayoutState, HOOK_EVENT, GrammarTypeEnum;
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: !0
7
+ }), exports.GrammarTypeEnum = exports.HOOK_EVENT = exports.LayoutState = exports.PlayerEnum = exports.LabelEnum = exports.CrosshairEnum = exports.LegendEnum = exports.GridEnum = exports.AxisEnum = exports.ComponentDataRank = exports.ComponentEnum = exports.GrammarMarkType = exports.DiffState = exports.BuiltInEncodeNames = void 0,
8
+ function(BuiltInEncodeNames) {
9
+ BuiltInEncodeNames.enter = "enter", BuiltInEncodeNames.update = "update", BuiltInEncodeNames.exit = "exit",
10
+ BuiltInEncodeNames.group = "group";
11
+ }(BuiltInEncodeNames = exports.BuiltInEncodeNames || (exports.BuiltInEncodeNames = {})),
12
+ function(DiffState) {
13
+ DiffState.enter = "enter", DiffState.update = "update", DiffState.exit = "exit",
14
+ DiffState.unChange = "unChange";
15
+ }(DiffState = exports.DiffState || (exports.DiffState = {})), function(GrammarMarkType) {
16
+ GrammarMarkType.arc = "arc", GrammarMarkType.arc3d = "arc3d", GrammarMarkType.area = "area",
17
+ GrammarMarkType.image = "image", GrammarMarkType.line = "line", GrammarMarkType.path = "path",
18
+ GrammarMarkType.rect = "rect", GrammarMarkType.rect3d = "rect3d", GrammarMarkType.rule = "rule",
19
+ GrammarMarkType.shape = "shape", GrammarMarkType.symbol = "symbol", GrammarMarkType.text = "text",
20
+ GrammarMarkType.richtext = "richtext", GrammarMarkType.polygon = "polygon", GrammarMarkType.pyramid3d = "pyramid3d",
21
+ GrammarMarkType.circle = "circle", GrammarMarkType.cell = "cell", GrammarMarkType.interval = "interval",
22
+ GrammarMarkType.group = "group", GrammarMarkType.glyph = "glyph", GrammarMarkType.component = "component",
23
+ GrammarMarkType.largeRects = "largeRects", GrammarMarkType.largeSymbols = "largeSymbols";
24
+ }(GrammarMarkType = exports.GrammarMarkType || (exports.GrammarMarkType = {})),
25
+ function(ComponentEnum) {
26
+ ComponentEnum.axis = "axis", ComponentEnum.grid = "grid", ComponentEnum.crosshair = "crosshair",
27
+ ComponentEnum.legend = "legend", ComponentEnum.slider = "slider", ComponentEnum.label = "label",
28
+ ComponentEnum.datazoom = "datazoom", ComponentEnum.player = "player", ComponentEnum.tooltip = "tooltip",
29
+ ComponentEnum.dimensionTooltip = "dimensionTooltip", ComponentEnum.title = "title",
30
+ ComponentEnum.scrollbar = "scrollbar";
31
+ }(ComponentEnum = exports.ComponentEnum || (exports.ComponentEnum = {})), function(ComponentDataRank) {
32
+ ComponentDataRank[ComponentDataRank.player = 1] = "player", ComponentDataRank[ComponentDataRank.slider = 2] = "slider",
33
+ ComponentDataRank[ComponentDataRank.datazoom = 3] = "datazoom", ComponentDataRank[ComponentDataRank.legend = 4] = "legend",
34
+ ComponentDataRank[ComponentDataRank.scrollbar = 5] = "scrollbar";
35
+ }(ComponentDataRank = exports.ComponentDataRank || (exports.ComponentDataRank = {})),
36
+ function(AxisEnum) {
37
+ AxisEnum.lineAxis = "lineAxis", AxisEnum.circleAxis = "circleAxis";
38
+ }(AxisEnum = exports.AxisEnum || (exports.AxisEnum = {})), function(GridEnum) {
39
+ GridEnum.lineAxisGrid = "lineAxisGrid", GridEnum.circleAxisGrid = "circleAxisGrid";
40
+ }(GridEnum = exports.GridEnum || (exports.GridEnum = {})), function(LegendEnum) {
41
+ LegendEnum.discreteLegend = "discreteLegend", LegendEnum.colorLegend = "colorLegend",
42
+ LegendEnum.sizeLegend = "sizeLegend";
43
+ }(LegendEnum = exports.LegendEnum || (exports.LegendEnum = {})), function(CrosshairEnum) {
44
+ CrosshairEnum.lineCrosshair = "lineCrosshair", CrosshairEnum.rectCrosshair = "rectCrosshair",
45
+ CrosshairEnum.sectorCrosshair = "sectorCrosshair", CrosshairEnum.circleCrosshair = "circleCrosshair",
46
+ CrosshairEnum.polygonCrosshair = "polygonCrosshair", CrosshairEnum.ringCrosshair = "ringCrosshair";
47
+ }(CrosshairEnum = exports.CrosshairEnum || (exports.CrosshairEnum = {})), function(LabelEnum) {
48
+ LabelEnum.symbolLabel = "symbolLabel", LabelEnum.rectLabel = "rectLabel", LabelEnum.lineLabel = "lineLabel",
49
+ LabelEnum.dataLabel = "dataLabel";
50
+ }(LabelEnum = exports.LabelEnum || (exports.LabelEnum = {})), function(PlayerEnum) {
51
+ PlayerEnum.continuousPlayer = "continuousPlayer", PlayerEnum.discretePlayer = "discretePlayer";
52
+ }(PlayerEnum = exports.PlayerEnum || (exports.PlayerEnum = {})), function(LayoutState) {
53
+ LayoutState.before = "before", LayoutState.layouting = "layouting", LayoutState.reevaluate = "reevaluate",
54
+ LayoutState.after = "after";
55
+ }(LayoutState = exports.LayoutState || (exports.LayoutState = {})), function(HOOK_EVENT) {
56
+ HOOK_EVENT.BEFORE_EVALUATE_DATA = "beforeEvaluateData", HOOK_EVENT.AFTER_EVALUATE_DATA = "afterEvaluateData",
57
+ HOOK_EVENT.BEFORE_EVALUATE_SCALE = "beforeEvaluateScale", HOOK_EVENT.AFTER_EVALUATE_SCALE = "afterEvaluateScale",
58
+ HOOK_EVENT.BEFORE_PARSE_VIEW = "beforeParseView", HOOK_EVENT.AFTER_PARSE_VIEW = "afterParseView",
59
+ HOOK_EVENT.BEFORE_TRANSFORM = "beforeTransform", HOOK_EVENT.AFTER_TRANSFORM = "afterTransform",
60
+ HOOK_EVENT.BEFORE_CREATE_VRENDER_STAGE = "beforeCreateVRenderStage", HOOK_EVENT.AFTER_CREATE_VRENDER_STAGE = "afterCreateVRenderStage",
61
+ HOOK_EVENT.BEFORE_CREATE_VRENDER_LAYER = "beforeCreateVRenderLayer", HOOK_EVENT.AFTER_CREATE_VRENDER_LAYER = "afterCreateVRenderLayer",
62
+ HOOK_EVENT.BEFORE_STAGE_RESIZE = "beforeStageResize", HOOK_EVENT.AFTER_STAGE_RESIZE = "afterStageResize",
63
+ HOOK_EVENT.BEFORE_VRENDER_DRAW = "beforeVRenderDraw", HOOK_EVENT.AFTER_VRENDER_DRAW = "afterVRenderDraw",
64
+ HOOK_EVENT.BEFORE_MARK_JOIN = "beforeMarkJoin", HOOK_EVENT.AFTER_MARK_JOIN = "afterMarkJoin",
65
+ HOOK_EVENT.BEFORE_MARK_UPDATE = "beforeMarkUpdate", HOOK_EVENT.AFTER_MARK_UPDATE = "afterMarkUpdate",
66
+ HOOK_EVENT.BEFORE_MARK_STATE = "beforeMarkState", HOOK_EVENT.AFTER_MARK_STATE = "afterMarkState",
67
+ HOOK_EVENT.BEFORE_MARK_ENCODE = "beforeMarkEncode", HOOK_EVENT.AFTER_MARK_ENCODE = "afterMarkEncode",
68
+ HOOK_EVENT.BEFORE_DO_LAYOUT = "beforeDoLayout", HOOK_EVENT.AFTER_DO_LAYOUT = "afterDoLayout",
69
+ HOOK_EVENT.BEFORE_MARK_LAYOUT_END = "beforeMarkLayoutEnd", HOOK_EVENT.AFTER_MARK_LAYOUT_END = "afterMarkLayoutEnd",
70
+ HOOK_EVENT.BEFORE_DO_RENDER = "beforeDoRender", HOOK_EVENT.AFTER_DO_RENDER = "afterDoRender",
71
+ HOOK_EVENT.BEFORE_MARK_RENDER_END = "beforeMarkRenderEnd", HOOK_EVENT.AFTER_MARK_RENDER_END = "afterMarkRenderEnd",
72
+ HOOK_EVENT.BEFORE_CREATE_VRENDER_MARK = "beforeCreateVRenderMark", HOOK_EVENT.AFTER_CREATE_VRENDER_MARK = "afterCreateVRenderMark",
73
+ HOOK_EVENT.BEFORE_ADD_VRENDER_MARK = "beforeAddVRenderMark", HOOK_EVENT.AFTER_ADD_VRENDER_MARK = "afterAddVRenderMark",
74
+ HOOK_EVENT.AFTER_VRENDER_NEXT_RENDER = "afterVRenderNextRender", HOOK_EVENT.BEFORE_ELEMENT_UPDATE_DATA = "beforeElementUpdateData",
75
+ HOOK_EVENT.AFTER_ELEMENT_UPDATE_DATA = "afterElementUpdateData", HOOK_EVENT.BEFORE_ELEMENT_STATE = "beforeElementState",
76
+ HOOK_EVENT.AFTER_ELEMENT_STATE = "afterElementState", HOOK_EVENT.BEFORE_ELEMENT_ENCODE = "beforeElementEncode",
77
+ HOOK_EVENT.AFTER_ELEMENT_ENCODE = "afterElementEncode", HOOK_EVENT.ANIMATION_START = "animationStart",
78
+ HOOK_EVENT.ANIMATION_END = "animationEnd", HOOK_EVENT.ELEMENT_ANIMATION_START = "elementAnimationStart",
79
+ HOOK_EVENT.ELEMENT_ANIMATION_END = "elementAnimationEnd", HOOK_EVENT.ALL_ANIMATION_START = "allAnimationStart",
80
+ HOOK_EVENT.ALL_ANIMATION_END = "allAnimationEnd";
81
+ }(HOOK_EVENT = exports.HOOK_EVENT || (exports.HOOK_EVENT = {})), function(GrammarTypeEnum) {
82
+ GrammarTypeEnum.signal = "signal", GrammarTypeEnum.data = "data", GrammarTypeEnum.scale = "scale",
83
+ GrammarTypeEnum.coordinate = "coordinate", GrammarTypeEnum.mark = "mark";
84
+ }(GrammarTypeEnum = exports.GrammarTypeEnum || (exports.GrammarTypeEnum = {}));
85
+ //# sourceMappingURL=enums.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/graph/enums.ts"],"names":[],"mappings":";;;AAKA,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,qCAAe,CAAA;IACf,uCAAiB,CAAA;IACjB,mCAAa,CAAA;IACb,qCAAe,CAAA;AACjB,CAAC,EALW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAK7B;AAKD,IAAY,SAKX;AALD,WAAY,SAAS;IACnB,4BAAe,CAAA;IACf,8BAAiB,CAAA;IACjB,0BAAa,CAAA;IACb,kCAAqB,CAAA;AACvB,CAAC,EALW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAKpB;AAID,IAAY,eAmCX;AAnCD,WAAY,eAAe;IAEzB,8BAAW,CAAA;IACX,kCAAe,CAAA;IACf,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,gCAAa,CAAA;IACb,gCAAa,CAAA;IACb,gCAAa,CAAA;IACb,oCAAiB,CAAA;IACjB,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,oCAAiB,CAAA;IACjB,gCAAa,CAAA;IACb,wCAAqB,CAAA;IACrB,sCAAmB,CAAA;IACnB,0CAAuB,CAAA;IACvB,oCAAiB,CAAA;IAGjB,gCAAa,CAAA;IACb,wCAAqB,CAAA;IAGrB,kCAAe,CAAA;IAGf,kCAAe,CAAA;IAGf,0CAAuB,CAAA;IAGv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E5C,oEAAsD,CAAA;IACtD,kEAAoD,CAAA;IAEpD,8DAAgD,CAAA;IAChD,4DAA8C,CAAA;IAE9C,kEAAoD,CAAA;IAEpD,oEAAsD,CAAA;IACtD,kEAAoD,CAAA;IAEpD,yDAA2C,CAAA;IAC3C,uDAAyC,CAAA;IAEzC,2DAA6C,CAAA;IAC7C,yDAA2C,CAAA;IAE3C,gDAAkC,CAAA;IAClC,4CAA8B,CAAA;IAE9B,+DAAiD,CAAA;IACjD,2DAA6C,CAAA;IAE7C,uDAAyC,CAAA;IACzC,mDAAqC,CAAA;AACvC,CAAC,EAvEW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAuErB;AAED,IAAY,eAMX;AAND,WAAY,eAAe;IACzB,oCAAiB,CAAA;IACjB,gCAAa,CAAA;IACb,kCAAe,CAAA;IACf,4CAAyB,CAAA;IACzB,gCAAa,CAAA;AACf,CAAC,EANW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAM1B","file":"enums.js","sourcesContent":["/**\n * @file\n * Don't import any type, this may lead to CIRCULAR_DEPENDENCY\n */\n\nexport enum BuiltInEncodeNames {\n enter = 'enter',\n update = 'update',\n exit = 'exit',\n group = 'group'\n}\n\n/**\n * state of diff\n */\nexport enum DiffState {\n enter = 'enter',\n update = 'update',\n exit = 'exit',\n unChange = 'unChange'\n}\n/**\n * mark类型\n */\nexport enum GrammarMarkType {\n // basic mark\n arc = 'arc',\n arc3d = 'arc3d',\n area = 'area',\n image = 'image',\n line = 'line',\n path = 'path',\n rect = 'rect',\n rect3d = 'rect3d',\n rule = 'rule',\n shape = 'shape',\n symbol = 'symbol',\n text = 'text',\n richtext = 'richtext',\n polygon = 'polygon',\n pyramid3d = 'pyramid3d',\n circle = 'circle',\n\n // grammer mark\n cell = 'cell',\n interval = 'interval',\n\n // group mark\n group = 'group',\n\n // glyph mark\n glyph = 'glyph',\n\n // component mark\n component = 'component',\n\n // large mark\n largeRects = 'largeRects',\n largeSymbols = 'largeSymbols'\n}\n\n/**\n * built-in component type\n */\nexport enum ComponentEnum {\n axis = 'axis',\n grid = 'grid',\n crosshair = 'crosshair',\n legend = 'legend',\n slider = 'slider',\n label = 'label',\n datazoom = 'datazoom',\n player = 'player',\n tooltip = 'tooltip',\n dimensionTooltip = 'dimensionTooltip',\n title = 'title',\n scrollbar = 'scrollbar'\n}\n\nexport enum ComponentDataRank {\n player = 1,\n slider = 2,\n datazoom = 3,\n legend = 4,\n scrollbar = 5\n}\n\nexport enum AxisEnum {\n lineAxis = 'lineAxis',\n circleAxis = 'circleAxis'\n}\n\nexport enum GridEnum {\n lineAxisGrid = 'lineAxisGrid',\n circleAxisGrid = 'circleAxisGrid'\n}\n\nexport enum LegendEnum {\n discreteLegend = 'discreteLegend',\n colorLegend = 'colorLegend',\n sizeLegend = 'sizeLegend'\n}\n\nexport enum CrosshairEnum {\n lineCrosshair = 'lineCrosshair',\n rectCrosshair = 'rectCrosshair',\n sectorCrosshair = 'sectorCrosshair',\n circleCrosshair = 'circleCrosshair',\n polygonCrosshair = 'polygonCrosshair',\n ringCrosshair = 'ringCrosshair'\n}\n\nexport enum LabelEnum {\n symbolLabel = 'symbolLabel',\n rectLabel = 'rectLabel',\n lineLabel = 'lineLabel',\n dataLabel = 'dataLabel'\n}\n\nexport enum PlayerEnum {\n continuousPlayer = 'continuousPlayer',\n discretePlayer = 'discretePlayer'\n}\n\n/** 布局阶段 */\nexport enum LayoutState {\n before = 'before',\n layouting = 'layouting',\n reevaluate = 'reevaluate',\n after = 'after'\n}\n\nexport enum HOOK_EVENT {\n BEFORE_EVALUATE_DATA = 'beforeEvaluateData',\n AFTER_EVALUATE_DATA = 'afterEvaluateData',\n\n BEFORE_EVALUATE_SCALE = 'beforeEvaluateScale',\n AFTER_EVALUATE_SCALE = 'afterEvaluateScale',\n\n BEFORE_PARSE_VIEW = 'beforeParseView',\n AFTER_PARSE_VIEW = 'afterParseView',\n\n BEFORE_TRANSFORM = 'beforeTransform',\n AFTER_TRANSFORM = 'afterTransform',\n\n BEFORE_CREATE_VRENDER_STAGE = 'beforeCreateVRenderStage',\n AFTER_CREATE_VRENDER_STAGE = 'afterCreateVRenderStage',\n\n BEFORE_CREATE_VRENDER_LAYER = 'beforeCreateVRenderLayer',\n AFTER_CREATE_VRENDER_LAYER = 'afterCreateVRenderLayer',\n\n BEFORE_STAGE_RESIZE = 'beforeStageResize',\n AFTER_STAGE_RESIZE = 'afterStageResize',\n\n BEFORE_VRENDER_DRAW = 'beforeVRenderDraw',\n AFTER_VRENDER_DRAW = 'afterVRenderDraw',\n\n BEFORE_MARK_JOIN = 'beforeMarkJoin',\n AFTER_MARK_JOIN = 'afterMarkJoin',\n BEFORE_MARK_UPDATE = 'beforeMarkUpdate',\n AFTER_MARK_UPDATE = 'afterMarkUpdate',\n BEFORE_MARK_STATE = 'beforeMarkState',\n AFTER_MARK_STATE = 'afterMarkState',\n BEFORE_MARK_ENCODE = 'beforeMarkEncode',\n AFTER_MARK_ENCODE = 'afterMarkEncode',\n\n BEFORE_DO_LAYOUT = 'beforeDoLayout',\n AFTER_DO_LAYOUT = 'afterDoLayout',\n\n BEFORE_MARK_LAYOUT_END = 'beforeMarkLayoutEnd',\n AFTER_MARK_LAYOUT_END = 'afterMarkLayoutEnd',\n\n BEFORE_DO_RENDER = 'beforeDoRender',\n AFTER_DO_RENDER = 'afterDoRender',\n\n BEFORE_MARK_RENDER_END = 'beforeMarkRenderEnd',\n AFTER_MARK_RENDER_END = 'afterMarkRenderEnd',\n\n BEFORE_CREATE_VRENDER_MARK = 'beforeCreateVRenderMark',\n AFTER_CREATE_VRENDER_MARK = 'afterCreateVRenderMark',\n\n BEFORE_ADD_VRENDER_MARK = 'beforeAddVRenderMark',\n AFTER_ADD_VRENDER_MARK = 'afterAddVRenderMark',\n\n AFTER_VRENDER_NEXT_RENDER = 'afterVRenderNextRender',\n\n BEFORE_ELEMENT_UPDATE_DATA = 'beforeElementUpdateData',\n AFTER_ELEMENT_UPDATE_DATA = 'afterElementUpdateData',\n\n BEFORE_ELEMENT_STATE = 'beforeElementState',\n AFTER_ELEMENT_STATE = 'afterElementState',\n\n BEFORE_ELEMENT_ENCODE = 'beforeElementEncode',\n AFTER_ELEMENT_ENCODE = 'afterElementEncode',\n\n ANIMATION_START = 'animationStart',\n ANIMATION_END = 'animationEnd',\n\n ELEMENT_ANIMATION_START = 'elementAnimationStart',\n ELEMENT_ANIMATION_END = 'elementAnimationEnd',\n\n ALL_ANIMATION_START = 'allAnimationStart',\n ALL_ANIMATION_END = 'allAnimationEnd'\n}\n\nexport enum GrammarTypeEnum {\n signal = 'signal',\n data = 'data',\n scale = 'scale',\n coordinate = 'coordinate',\n mark = 'mark'\n}\n"]}
@@ -0,0 +1,53 @@
1
+ import type { IGlyphElement, IGlyphMark } from '../types';
2
+ import { Element } from './element';
3
+ import type { IGraphicAttribute, IGlyph } from '@visactor/vrender';
4
+ export declare class GlyphElement extends Element implements IGlyphElement {
5
+ graphicItem: IGlyph;
6
+ mark: IGlyphMark;
7
+ protected glyphGraphicItems: {
8
+ [markName: string]: any;
9
+ };
10
+ private glyphMeta;
11
+ constructor(mark: IGlyphMark);
12
+ getGlyphGraphicItems(): {
13
+ [markName: string]: any;
14
+ };
15
+ initGraphicItem(attributes?: any): void;
16
+ useStates(states: string[], hasAnimation?: boolean): void;
17
+ protected getStateAttrs: (stateName: string, nextStates: string[]) => {
18
+ attributes: Partial<IGraphicAttribute>;
19
+ subAttributes: Partial<IGraphicAttribute>[];
20
+ };
21
+ encodeGraphic(): void;
22
+ encodeCustom(nextAttrs?: any): {
23
+ [markName: string]: any;
24
+ };
25
+ private encodeDefault;
26
+ private _onGlyphAttributeUpdate;
27
+ private _generateGlyphItems;
28
+ getGraphicAttribute(channel: string, prev?: boolean, markName?: any): any;
29
+ setGraphicAttribute(channel: string, value: any, final?: boolean, markName?: any): void;
30
+ setGraphicAttributes(attributes: {
31
+ [channel: string]: any;
32
+ }, final?: boolean, markName?: any): void;
33
+ protected diffAttributes(graphicAttributes: {
34
+ [channel: string]: any;
35
+ }, markName?: string): {};
36
+ protected applyGlyphGraphicAttributes(graphicAttributes: any, markName: string, graphicItem: any): void;
37
+ getFinalGraphicAttributes(markName?: string): any;
38
+ protected setFinalGraphicAttributes(attributes: {
39
+ [channel: string]: any;
40
+ }, markName?: string): void;
41
+ getPrevGraphicAttributes(markName?: string): any;
42
+ protected setPrevGraphicAttributes(attributes: {
43
+ [channel: string]: any;
44
+ }, markName?: string): void;
45
+ getNextGraphicAttributes(markName?: string): any;
46
+ protected setNextGraphicAttributes(attributes: {
47
+ [channel: string]: any;
48
+ }, markName?: string): void;
49
+ clearChangedGraphicAttributes(): void;
50
+ clearGraphicAttributes(): void;
51
+ remove(): void;
52
+ release(): void;
53
+ }
@@ -0,0 +1,202 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.GlyphElement = void 0;
6
+
7
+ const vutils_1 = require("@visactor/vutils"), vgrammar_util_1 = require("@visactor/vgrammar-util"), attributes_1 = require("./attributes"), constants_1 = require("./constants"), enums_1 = require("./enums"), element_1 = require("./element"), encode_1 = require("./mark/encode");
8
+
9
+ class GlyphElement extends element_1.Element {
10
+ constructor(mark) {
11
+ super(mark), this.getStateAttrs = (stateName, nextStates) => {
12
+ var _a, _b, _c;
13
+ const isRuntimeState = !(0, vutils_1.isNil)(null === (_a = this.runtimeStatesEncoder) || void 0 === _a ? void 0 : _a[stateName]), encoder = isRuntimeState ? this.runtimeStatesEncoder[stateName] : null === (_b = this.mark.getSpec().encode) || void 0 === _b ? void 0 : _b[stateName], glyphStateAttributes = {};
14
+ if (!encoder) return glyphStateAttributes;
15
+ if ((0, vutils_1.isFunction)(encoder)) return glyphStateAttributes.attributes = encoder(this.getDatum(), this, stateName, nextStates),
16
+ glyphStateAttributes;
17
+ if (!isRuntimeState && (null === (_c = this.graphicItem.glyphStates) || void 0 === _c ? void 0 : _c[stateName])) return this.graphicItem.glyphStates[stateName];
18
+ if (encoder) {
19
+ const item = this.items[0], targetItems = [ Object.assign({}, item, {
20
+ nextAttrs: {}
21
+ }) ];
22
+ return (0, encode_1.invokeEncoderToItems)(this, targetItems, encoder, this.mark.parameters()),
23
+ this.coordinateTransformEncode(targetItems), glyphStateAttributes.attributes = targetItems[0].nextAttrs,
24
+ this.graphicItem.glyphStates ? this.graphicItem.glyphStates[stateName] || (this.graphicItem.glyphStates[stateName] = glyphStateAttributes) : this.graphicItem.glyphStates = {
25
+ [stateName]: glyphStateAttributes
26
+ }, glyphStateAttributes;
27
+ }
28
+ return glyphStateAttributes;
29
+ }, this.glyphMeta = this.mark.getGlyphMeta();
30
+ }
31
+ getGlyphGraphicItems() {
32
+ return this.glyphGraphicItems;
33
+ }
34
+ initGraphicItem(attributes = {}) {
35
+ if (this.graphicItem) return;
36
+ const attrs = Object.assign({}, attributes);
37
+ this.graphicItem = this.mark.addGraphicItem(attrs, this.groupKey), this.graphicItem[constants_1.BridgeElementKey] = this,
38
+ this.graphicItem.onBeforeAttributeUpdate = this._onGlyphAttributeUpdate(!1);
39
+ const glyphMarks = this.glyphMeta.getMarks();
40
+ this.glyphGraphicItems = {}, this.graphicItem.getSubGraphic().forEach((graphic => {
41
+ const markType = glyphMarks[graphic.name];
42
+ this.glyphGraphicItems[graphic.name] = graphic, graphic.onBeforeAttributeUpdate = attributes => {
43
+ if (!this.mark) return attributes;
44
+ return (0, attributes_1.transformAttributes)(markType, attributes, this, graphic.name);
45
+ };
46
+ })), this.clearGraphicAttributes();
47
+ }
48
+ useStates(states, hasAnimation) {
49
+ var _a;
50
+ if (!this.graphicItem) return;
51
+ this.mark.emit(enums_1.HOOK_EVENT.BEFORE_ELEMENT_STATE, {
52
+ states: states
53
+ }, this), this.states = states.slice();
54
+ const stateAnimation = (0, vutils_1.isBoolean)(hasAnimation) ? hasAnimation : !!(null === (_a = this.mark.getSpec().animation) || void 0 === _a ? void 0 : _a.state);
55
+ this.graphicItem.glyphStateProxy = this.getStateAttrs, this.graphicItem.useStates(this.states, stateAnimation),
56
+ this.mark.emit(enums_1.HOOK_EVENT.AFTER_ELEMENT_STATE, {
57
+ states: states
58
+ }, this);
59
+ }
60
+ encodeGraphic() {
61
+ this.coordinateTransformEncode(this.items);
62
+ const graphicAttributes = this.transformElementItems(this.items, this.mark.markType);
63
+ this.graphicItem || this.initGraphicItem(), this.diffState === enums_1.DiffState.enter ? (this.graphicItem.onBeforeAttributeUpdate = this._onGlyphAttributeUpdate(!0),
64
+ this.applyGraphicAttributes(graphicAttributes), this.graphicItem.onBeforeAttributeUpdate = this._onGlyphAttributeUpdate(!1)) : this.applyGraphicAttributes(graphicAttributes),
65
+ this.diffState !== enums_1.DiffState.enter && this.diffState !== enums_1.DiffState.update || !this.states.length || (Object.values(this.glyphGraphicItems).forEach((graphicItem => {
66
+ graphicItem.states = {};
67
+ })), this.useStates(this.states)), this.items.map((item => {
68
+ item.nextAttrs = {};
69
+ }));
70
+ }
71
+ encodeCustom(nextAttrs) {
72
+ var _a;
73
+ let customEncodeValues = {};
74
+ const channelEncoder = this.glyphMeta.getChannelEncoder(), functionEncoder = this.glyphMeta.getFunctionEncoder();
75
+ if (functionEncoder && (customEncodeValues = functionEncoder.call(null, Object.assign({}, null === (_a = this.graphicItem) || void 0 === _a ? void 0 : _a.attribute, nextAttrs), this.getDatum(), this, this.mark.getGlyphConfig())),
76
+ channelEncoder) {
77
+ let allAttrs;
78
+ Object.keys(channelEncoder).forEach((channel => {
79
+ var _a;
80
+ if (!(0, vutils_1.isNil)(nextAttrs[channel])) {
81
+ allAttrs || (allAttrs = Object.assign({}, null === (_a = this.graphicItem) || void 0 === _a ? void 0 : _a.attribute, nextAttrs));
82
+ const encodeResult = channelEncoder[channel].call(null, channel, nextAttrs[channel], allAttrs, this.getDatum(), this, this.mark.getGlyphConfig());
83
+ Object.keys(null != encodeResult ? encodeResult : {}).forEach((markName => {
84
+ var _a;
85
+ customEncodeValues[markName] = Object.assign(null !== (_a = customEncodeValues[markName]) && void 0 !== _a ? _a : {}, encodeResult[markName]);
86
+ }));
87
+ }
88
+ }));
89
+ }
90
+ return customEncodeValues;
91
+ }
92
+ encodeDefault() {
93
+ const defaultEncodeValues = {};
94
+ if (this.diffState === enums_1.DiffState.enter && this.glyphMeta.getDefaultEncoder()) {
95
+ const defaultEncodeResult = this.glyphMeta.getDefaultEncoder().call(null, this.getDatum(), this, this.mark.getGlyphConfig());
96
+ Object.assign(defaultEncodeValues, defaultEncodeResult);
97
+ }
98
+ return defaultEncodeValues;
99
+ }
100
+ _onGlyphAttributeUpdate(first = !1) {
101
+ return attributes => {
102
+ if (!this.mark) return attributes;
103
+ const glyphMarks = this.glyphMeta.getMarks(), graphicAttributes = (0, attributes_1.transformAttributes)(this.mark.getAttributeTransforms(), attributes, this), defaultEncodeValues = first ? this.encodeDefault() : null, customEncodeValues = this.encodeCustom(attributes);
104
+ return Object.keys(glyphMarks).forEach((markName => {
105
+ const markType = glyphMarks[markName], graphicItem = this.glyphGraphicItems[markName], customAttributes = null == customEncodeValues ? void 0 : customEncodeValues[markName], additionalAttributes = Object.assign({}, customAttributes);
106
+ if (first) {
107
+ const defaultAttributes = null == defaultEncodeValues ? void 0 : defaultEncodeValues[markName];
108
+ Object.keys(null != defaultAttributes ? defaultAttributes : {}).forEach((key => {
109
+ (0, vutils_1.has)(this.items[0].nextAttrs, key) || (0, vutils_1.has)(additionalAttributes, key) || (additionalAttributes[key] = defaultAttributes[key]);
110
+ }));
111
+ }
112
+ const glyphAttributes = Object.assign({}, (0, attributes_1.cloneTransformAttributes)(markType, attributes), additionalAttributes), glyphItems = this._generateGlyphItems(markType, this.items, glyphAttributes);
113
+ this.coordinateTransformEncode(glyphItems);
114
+ const graphicAttributes = this.transformElementItems(glyphItems, markType);
115
+ this.applyGlyphGraphicAttributes(graphicAttributes, markName, graphicItem), markType === enums_1.GrammarMarkType.shape && (graphicItem.datum = glyphItems[0].datum);
116
+ })), graphicAttributes;
117
+ };
118
+ }
119
+ _generateGlyphItems(markType, items, additionalAttributes) {
120
+ var _a;
121
+ const nextAttrs = null === (_a = items[0]) || void 0 === _a ? void 0 : _a.nextAttrs, glyphItems = items.map((item => Object.assign({}, item, {
122
+ nextAttrs: additionalAttributes
123
+ })));
124
+ return constants_1.CollectionMarkType.includes(markType) && nextAttrs.enableSegments && glyphItems.forEach(((glyphItem, index) => {
125
+ glyphItem.nextAttrs = Object.assign({}, items[index].nextAttrs, additionalAttributes);
126
+ })), glyphItems;
127
+ }
128
+ getGraphicAttribute(channel, prev = !1, markName) {
129
+ if (!this.graphicItem) return;
130
+ const prevGraphicAttributes = this.getPrevGraphicAttributes(markName);
131
+ if (prev && (0, vutils_1.has)(prevGraphicAttributes, channel)) return prevGraphicAttributes[channel];
132
+ return (markName ? this.glyphGraphicItems[markName] : this.graphicItem).attribute[channel];
133
+ }
134
+ setGraphicAttribute(channel, value, final = !0, markName) {
135
+ if (!this.graphicItem) return;
136
+ const graphicItem = markName ? this.glyphGraphicItems[markName] : this.graphicItem, finalGraphicAttributes = this.getFinalGraphicAttributes(markName), prevGraphicAttributes = this.getPrevGraphicAttributes(markName);
137
+ final && (finalGraphicAttributes[channel] = value), (0, vutils_1.has)(prevGraphicAttributes, channel) || (prevGraphicAttributes[channel] = graphicItem.attribute[channel]),
138
+ graphicItem.setAttribute(channel, value);
139
+ }
140
+ setGraphicAttributes(attributes, final = !0, markName) {
141
+ if (!this.graphicItem) return;
142
+ const graphicItem = markName ? this.glyphGraphicItems[markName] : this.graphicItem, finalGraphicAttributes = this.getFinalGraphicAttributes(markName), prevGraphicAttributes = this.getPrevGraphicAttributes(markName);
143
+ Object.keys(attributes).forEach((key => {
144
+ final && (finalGraphicAttributes[key] = attributes[key]), (0, vutils_1.has)(prevGraphicAttributes, key) || (prevGraphicAttributes[key] = graphicItem.attribute[key]);
145
+ })), graphicItem.setAttributes(attributes);
146
+ }
147
+ diffAttributes(graphicAttributes, markName) {
148
+ const diffResult = {}, finalGraphicAttributes = this.getFinalGraphicAttributes(markName);
149
+ for (const key in graphicAttributes) (0, vgrammar_util_1.isEqual)(key, finalGraphicAttributes, graphicAttributes) || (diffResult[key] = graphicAttributes[key]);
150
+ return diffResult;
151
+ }
152
+ applyGlyphGraphicAttributes(graphicAttributes, markName, graphicItem) {
153
+ if (this.mark.needAnimate()) {
154
+ const nextGraphicAttributes = this.diffAttributes(graphicAttributes, markName), prevGraphicAttributes = this.getPrevGraphicAttributes(markName), finalGraphicAttributes = this.getFinalGraphicAttributes(markName);
155
+ Object.keys(nextGraphicAttributes).forEach((channel => {
156
+ prevGraphicAttributes[channel] = graphicItem.attribute[channel], finalGraphicAttributes[channel] = nextGraphicAttributes[channel];
157
+ })), this.setNextGraphicAttributes(nextGraphicAttributes, markName), this.setPrevGraphicAttributes(prevGraphicAttributes, markName),
158
+ this.setFinalGraphicAttributes(finalGraphicAttributes, markName), graphicItem.setAttributes(nextGraphicAttributes);
159
+ } else graphicItem.setAttributes(graphicAttributes);
160
+ }
161
+ getFinalGraphicAttributes(markName) {
162
+ return (markName ? this.glyphGraphicItems[markName] : this.graphicItem).finalAttrs;
163
+ }
164
+ setFinalGraphicAttributes(attributes, markName) {
165
+ (markName ? this.glyphGraphicItems[markName] : this.graphicItem).finalAttrs = attributes;
166
+ }
167
+ getPrevGraphicAttributes(markName) {
168
+ return (markName ? this.glyphGraphicItems[markName] : this.graphicItem).prevAttrs;
169
+ }
170
+ setPrevGraphicAttributes(attributes, markName) {
171
+ (markName ? this.glyphGraphicItems[markName] : this.graphicItem).prevAttrs = attributes;
172
+ }
173
+ getNextGraphicAttributes(markName) {
174
+ return (markName ? this.glyphGraphicItems[markName] : this.graphicItem).nextAttrs;
175
+ }
176
+ setNextGraphicAttributes(attributes, markName) {
177
+ (markName ? this.glyphGraphicItems[markName] : this.graphicItem).nextAttrs = attributes;
178
+ }
179
+ clearChangedGraphicAttributes() {
180
+ this.setPrevGraphicAttributes({}), this.setNextGraphicAttributes({}), Object.keys(this.glyphGraphicItems).forEach((markName => {
181
+ this.setPrevGraphicAttributes({}, markName), this.setNextGraphicAttributes({}, markName);
182
+ }));
183
+ }
184
+ clearGraphicAttributes() {
185
+ this.setPrevGraphicAttributes({}), this.setNextGraphicAttributes({}), this.setFinalGraphicAttributes({}),
186
+ Object.keys(this.glyphGraphicItems).forEach((markName => {
187
+ this.setPrevGraphicAttributes({}, markName), this.setNextGraphicAttributes({}, markName),
188
+ this.setFinalGraphicAttributes({}, markName);
189
+ }));
190
+ }
191
+ remove() {
192
+ this.glyphGraphicItems = null, super.remove();
193
+ }
194
+ release() {
195
+ this.glyphGraphicItems && (Object.values(this.glyphGraphicItems).forEach((graphicItem => {
196
+ graphicItem[constants_1.BridgeElementKey] = null;
197
+ })), this.glyphGraphicItems = null), super.release();
198
+ }
199
+ }
200
+
201
+ exports.GlyphElement = GlyphElement;
202
+ //# sourceMappingURL=glyph-element.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/graph/glyph-element.ts"],"names":[],"mappings":";;;AAAA,6CAAqE;AACrE,2DAAkD;AAUlD,6CAA6E;AAC7E,2CAAmE;AACnE,mCAAiE;AACjE,uCAAoC;AACpC,0CAAqD;AAGrD,MAAa,YAAa,SAAQ,iBAAO;IAQvC,YAAY,IAAgB;QAC1B,KAAK,CAAC,IAAI,CAAC,CAAC;QAoDJ,kBAAa,GAAG,CAAC,SAAiB,EAAE,UAAoB,EAAE,EAAE;;YACpE,MAAM,cAAc,GAAG,CAAC,IAAA,cAAK,EAAC,MAAA,IAAI,CAAC,oBAAoB,0CAAG,SAAS,CAAC,CAAC,CAAC;YACtE,MAAM,OAAO,GAAG,cAAc;gBAC5B,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,SAAS,CAAC;gBACtC,CAAC,CAAC,MAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAe,CAAC,MAAM,0CAAG,SAAS,CAAC,CAAC;YAE1D,MAAM,oBAAoB,GAAG,EAG5B,CAAC;YAEF,IAAI,CAAC,OAAO,EAAE;gBACZ,OAAO,oB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CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;gBAC1D,WAAW,CAAC,4BAAgB,CAAC,GAAG,IAAI,CAAC;YACvC,CAAC,CAAC,CAAC;YACH,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC;SAC/B;QACD,KAAK,CAAC,OAAO,EAAE,CAAC;IAClB,CAAC;CACF;AA7YD,oCA6YC","file":"glyph-element.js","sourcesContent":["import { has, isNil, isBoolean, isFunction } from '@visactor/vutils';\nimport { isEqual } from '@visactor/vgrammar-util';\nimport type {\n IGlyphElement,\n IGlyphMark,\n MarkElementItem,\n MarkSpec,\n IGlyphMeta,\n MarkType,\n StateProxyEncodeSpec\n} from '../types';\nimport { cloneTransformAttributes, transformAttributes } from './attributes';\nimport { BridgeElementKey, CollectionMarkType } from './constants';\nimport { DiffState, HOOK_EVENT, GrammarMarkType } from './enums';\nimport { Element } from './element';\nimport { invokeEncoderToItems } from './mark/encode';\nimport type { IGraphicAttribute, IGlyph } from '@visactor/vrender';\n\nexport class GlyphElement extends Element implements IGlyphElement {\n declare graphicItem: IGlyph;\n\n declare mark: IGlyphMark;\n protected glyphGraphicItems: { [markName: string]: any };\n\n private glyphMeta: IGlyphMeta;\n\n constructor(mark: IGlyphMark) {\n super(mark);\n this.glyphMeta = this.mark.getGlyphMeta();\n }\n\n getGlyphGraphicItems() {\n return this.glyphGraphicItems;\n }\n\n initGraphicItem(attributes: any = {}) {\n if (this.graphicItem) {\n return;\n }\n\n const attrs = Object.assign({}, attributes);\n this.graphicItem = this.mark.addGraphicItem(attrs, this.groupKey) as IGlyph;\n this.graphicItem[BridgeElementKey] = this;\n this.graphicItem.onBeforeAttributeUpdate = this._onGlyphAttributeUpdate(false);\n\n const glyphMarks = this.glyphMeta.getMarks();\n this.glyphGraphicItems = {};\n this.graphicItem.getSubGraphic().forEach((graphic: any) => {\n const markType = glyphMarks[graphic.name];\n this.glyphGraphicItems[graphic.name] = graphic;\n graphic.onBeforeAttributeUpdate = (attributes: any) => {\n // mark might be released\n if (!this.mark) {\n return attributes;\n }\n const graphicAttributes = transformAttributes(markType, attributes, this, graphic.name);\n return graphicAttributes;\n };\n });\n\n this.clearGraphicAttributes();\n }\n\n useStates(states: string[], hasAnimation?: boolean) {\n if (!this.graphicItem) {\n return;\n }\n this.mark.emit(HOOK_EVENT.BEFORE_ELEMENT_STATE, { states }, this);\n\n this.states = states.slice();\n const stateAnimation = isBoolean(hasAnimation)\n ? hasAnimation\n : !!(this.mark.getSpec() as MarkSpec).animation?.state;\n this.graphicItem.glyphStateProxy = this.getStateAttrs;\n this.graphicItem.useStates(this.states, stateAnimation);\n\n this.mark.emit(HOOK_EVENT.AFTER_ELEMENT_STATE, { states }, this);\n }\n\n protected getStateAttrs = (stateName: string, nextStates: string[]) => {\n const isRuntimeState = !isNil(this.runtimeStatesEncoder?.[stateName]);\n const encoder = isRuntimeState\n ? this.runtimeStatesEncoder[stateName]\n : (this.mark.getSpec() as MarkSpec).encode?.[stateName];\n\n const glyphStateAttributes = {} as {\n attributes: Partial<IGraphicAttribute>;\n subAttributes: Partial<IGraphicAttribute>[];\n };\n\n if (!encoder) {\n return glyphStateAttributes;\n }\n\n if (isFunction(encoder)) {\n glyphStateAttributes.attributes = (encoder as StateProxyEncodeSpec)(this.getDatum(), this, stateName, nextStates);\n return glyphStateAttributes;\n }\n\n if (!isRuntimeState && this.graphicItem.glyphStates?.[stateName]) {\n return this.graphicItem.glyphStates[stateName];\n }\n\n if (encoder) {\n const item = this.items[0];\n const targetItems = [Object.assign({}, item, { nextAttrs: {} })];\n\n invokeEncoderToItems(this, targetItems, encoder, (this.mark as any).parameters());\n this.coordinateTransformEncode(targetItems);\n\n glyphStateAttributes.attributes = targetItems[0].nextAttrs;\n\n if (!this.graphicItem.glyphStates) {\n this.graphicItem.glyphStates = { [stateName]: glyphStateAttributes };\n } else if (!this.graphicItem.glyphStates[stateName]) {\n this.graphicItem.glyphStates[stateName] = glyphStateAttributes;\n }\n\n return glyphStateAttributes;\n }\n\n return glyphStateAttributes;\n };\n\n encodeGraphic() {\n this.coordinateTransformEncode(this.items);\n const graphicAttributes = this.transformElementItems(this.items, this.mark.markType);\n\n if (!this.graphicItem) {\n this.initGraphicItem();\n }\n\n if (this.diffState === DiffState.enter) {\n // apply default encoder when enter\n this.graphicItem.onBeforeAttributeUpdate = this._onGlyphAttributeUpdate(true);\n this.applyGraphicAttributes(graphicAttributes);\n this.graphicItem.onBeforeAttributeUpdate = this._onGlyphAttributeUpdate(false);\n } else {\n this.applyGraphicAttributes(graphicAttributes);\n }\n\n if ((this.diffState === DiffState.enter || this.diffState === DiffState.update) && this.states.length) {\n Object.values(this.glyphGraphicItems).forEach(graphicItem => {\n // 更新数据流后,states计算不缓存\n graphicItem.states = {};\n });\n this.useStates(this.states);\n }\n\n // clear item attributes\n this.items.map(item => {\n item.nextAttrs = {};\n });\n }\n\n encodeCustom(nextAttrs?: any): { [markName: string]: any } {\n let customEncodeValues: { [markName: string]: any } = {};\n const channelEncoder = this.glyphMeta.getChannelEncoder();\n const functionEncoder = this.glyphMeta.getFunctionEncoder();\n\n if (functionEncoder) {\n customEncodeValues = functionEncoder.call(\n null,\n Object.assign({}, this.graphicItem?.attribute, nextAttrs),\n this.getDatum(),\n this,\n this.mark.getGlyphConfig()\n );\n }\n if (channelEncoder) {\n // TODO: maybe delete origin encode value?\n let allAttrs: any;\n Object.keys(channelEncoder).forEach(channel => {\n if (!isNil(nextAttrs[channel])) {\n if (!allAttrs) {\n allAttrs = Object.assign({}, this.graphicItem?.attribute, nextAttrs);\n }\n const encodeResult = channelEncoder[channel].call(\n null,\n channel,\n nextAttrs[channel],\n allAttrs,\n this.getDatum(),\n this,\n this.mark.getGlyphConfig()\n );\n Object.keys(encodeResult ?? {}).forEach(markName => {\n customEncodeValues[markName] = Object.assign(customEncodeValues[markName] ?? {}, encodeResult[markName]);\n });\n }\n });\n }\n return customEncodeValues;\n }\n\n private encodeDefault() {\n const defaultEncodeValues: { [markName: string]: any } = {};\n // apply default encode\n if (this.diffState === DiffState.enter && this.glyphMeta.getDefaultEncoder()) {\n const defaultEncodeResult = this.glyphMeta\n .getDefaultEncoder()\n .call(null, this.getDatum(), this, this.mark.getGlyphConfig());\n Object.assign(defaultEncodeValues, defaultEncodeResult);\n }\n return defaultEncodeValues;\n }\n\n private _onGlyphAttributeUpdate(first: boolean = false) {\n return (attributes: any) => {\n // mark might be released\n if (!this.mark) {\n return attributes;\n }\n const glyphMarks = this.glyphMeta.getMarks();\n\n const graphicAttributes = transformAttributes(this.mark.getAttributeTransforms(), attributes, this);\n\n // apply default encode\n const defaultEncodeValues = first ? this.encodeDefault() : null;\n // apply custom encode\n const customEncodeValues = this.encodeCustom(attributes);\n\n Object.keys(glyphMarks).forEach(markName => {\n const markType = glyphMarks[markName];\n const graphicItem = this.glyphGraphicItems[markName];\n const customAttributes = customEncodeValues?.[markName];\n const additionalAttributes = Object.assign({}, customAttributes);\n if (first) {\n // apply default attributes when visual channel is not set\n const defaultAttributes = defaultEncodeValues?.[markName];\n Object.keys(defaultAttributes ?? {}).forEach(key => {\n if (!has(this.items[0].nextAttrs, key) && !has(additionalAttributes, key)) {\n additionalAttributes[key] = defaultAttributes[key];\n }\n });\n }\n const glyphAttributes = Object.assign({}, cloneTransformAttributes(markType, attributes), additionalAttributes);\n const glyphItems = this._generateGlyphItems(markType, this.items, glyphAttributes);\n this.coordinateTransformEncode(glyphItems);\n const graphicAttributes = this.transformElementItems(glyphItems, markType);\n\n this.applyGlyphGraphicAttributes(graphicAttributes, markName, graphicItem);\n\n if (markType === GrammarMarkType.shape) {\n // FIXME: shape需要拿到原始数据进行编码,暂时把数据绑定到graphicItem上,看后续graphicItem是否需要支持数据绑定\n graphicItem.datum = glyphItems[0].datum;\n }\n });\n\n return graphicAttributes;\n };\n }\n\n private _generateGlyphItems(markType: MarkType, items: MarkElementItem[], additionalAttributes: any) {\n const nextAttrs = items[0]?.nextAttrs;\n const glyphItems = items.map(item => Object.assign({}, item, { nextAttrs: additionalAttributes }));\n\n if ((CollectionMarkType as string[]).includes(markType) && nextAttrs.enableSegments) {\n // segment mark require all items to apply additional attributes\n glyphItems.forEach((glyphItem, index) => {\n glyphItem.nextAttrs = Object.assign({}, items[index].nextAttrs, additionalAttributes);\n });\n }\n\n return glyphItems;\n }\n\n getGraphicAttribute(channel: string, prev: boolean = false, markName?: any) {\n if (!this.graphicItem) {\n return undefined;\n }\n const prevGraphicAttributes = this.getPrevGraphicAttributes(markName);\n if (prev && has(prevGraphicAttributes, channel)) {\n return prevGraphicAttributes[channel];\n }\n\n const graphicItem = markName ? this.glyphGraphicItems[markName] : this.graphicItem;\n return graphicItem.attribute[channel];\n }\n\n setGraphicAttribute(channel: string, value: any, final: boolean = true, markName?: any) {\n if (!this.graphicItem) {\n return;\n }\n const graphicItem = markName ? this.glyphGraphicItems[markName] : this.graphicItem;\n const finalGraphicAttributes = this.getFinalGraphicAttributes(markName);\n const prevGraphicAttributes = this.getPrevGraphicAttributes(markName);\n\n if (final) {\n finalGraphicAttributes[channel] = value;\n }\n if (!has(prevGraphicAttributes, channel)) {\n prevGraphicAttributes[channel] = graphicItem.attribute[channel];\n }\n\n graphicItem.setAttribute(channel, value);\n }\n\n setGraphicAttributes(attributes: { [channel: string]: any }, final: boolean = true, markName?: any) {\n if (!this.graphicItem) {\n return;\n }\n const graphicItem = markName ? this.glyphGraphicItems[markName] : this.graphicItem;\n const finalGraphicAttributes = this.getFinalGraphicAttributes(markName);\n const prevGraphicAttributes = this.getPrevGraphicAttributes(markName);\n\n Object.keys(attributes).forEach(key => {\n if (final) {\n finalGraphicAttributes[key] = attributes[key];\n }\n if (!has(prevGraphicAttributes, key)) {\n prevGraphicAttributes[key] = graphicItem.attribute[key];\n }\n });\n\n graphicItem.setAttributes(attributes);\n }\n\n protected diffAttributes(graphicAttributes: { [channel: string]: any }, markName?: string) {\n const diffResult = {};\n const finalGraphicAttributes = this.getFinalGraphicAttributes(markName);\n for (const key in graphicAttributes) {\n if (!isEqual(key, finalGraphicAttributes, graphicAttributes)) {\n diffResult[key] = graphicAttributes[key];\n }\n }\n return diffResult;\n }\n\n protected applyGlyphGraphicAttributes(graphicAttributes: any, markName: string, graphicItem: any): void {\n if (this.mark.needAnimate()) {\n // If mark need animate, diff attributes.\n const nextGraphicAttributes = this.diffAttributes(graphicAttributes, markName);\n const prevGraphicAttributes = this.getPrevGraphicAttributes(markName);\n const finalGraphicAttributes = this.getFinalGraphicAttributes(markName);\n Object.keys(nextGraphicAttributes).forEach(channel => {\n prevGraphicAttributes[channel] = graphicItem.attribute[channel];\n finalGraphicAttributes[channel] = nextGraphicAttributes[channel];\n });\n this.setNextGraphicAttributes(nextGraphicAttributes, markName);\n this.setPrevGraphicAttributes(prevGraphicAttributes, markName);\n this.setFinalGraphicAttributes(finalGraphicAttributes, markName);\n\n // Apply next attributes to current graphic item immediately.\n // Scene graph tree should be handled like no animation exists in dataflow procedure.\n graphicItem.setAttributes(nextGraphicAttributes);\n } else {\n graphicItem.setAttributes(graphicAttributes);\n }\n }\n\n getFinalGraphicAttributes(markName?: string) {\n const graphicItem = markName ? this.glyphGraphicItems[markName] : this.graphicItem;\n return graphicItem.finalAttrs;\n }\n\n protected setFinalGraphicAttributes(attributes: { [channel: string]: any }, markName?: string) {\n const graphicItem = markName ? this.glyphGraphicItems[markName] : this.graphicItem;\n graphicItem.finalAttrs = attributes;\n }\n\n getPrevGraphicAttributes(markName?: string) {\n const graphicItem = markName ? this.glyphGraphicItems[markName] : this.graphicItem;\n return graphicItem.prevAttrs;\n }\n\n protected setPrevGraphicAttributes(attributes: { [channel: string]: any }, markName?: string) {\n const graphicItem = markName ? this.glyphGraphicItems[markName] : this.graphicItem;\n graphicItem.prevAttrs = attributes;\n }\n\n getNextGraphicAttributes(markName?: string) {\n const graphicItem = markName ? this.glyphGraphicItems[markName] : this.graphicItem;\n return graphicItem.nextAttrs;\n }\n\n protected setNextGraphicAttributes(attributes: { [channel: string]: any }, markName?: string) {\n const graphicItem = markName ? this.glyphGraphicItems[markName] : this.graphicItem;\n graphicItem.nextAttrs = attributes;\n }\n\n clearChangedGraphicAttributes() {\n this.setPrevGraphicAttributes({});\n this.setNextGraphicAttributes({});\n Object.keys(this.glyphGraphicItems).forEach(markName => {\n this.setPrevGraphicAttributes({}, markName);\n this.setNextGraphicAttributes({}, markName);\n });\n }\n\n clearGraphicAttributes() {\n this.setPrevGraphicAttributes({});\n this.setNextGraphicAttributes({});\n this.setFinalGraphicAttributes({});\n Object.keys(this.glyphGraphicItems).forEach(markName => {\n this.setPrevGraphicAttributes({}, markName);\n this.setNextGraphicAttributes({}, markName);\n this.setFinalGraphicAttributes({}, markName);\n });\n }\n\n remove() {\n this.glyphGraphicItems = null;\n super.remove();\n }\n\n release() {\n if (this.glyphGraphicItems) {\n Object.values(this.glyphGraphicItems).forEach(graphicItem => {\n graphicItem[BridgeElementKey] = null;\n });\n this.glyphGraphicItems = null;\n }\n super.release();\n }\n}\n"]}
@@ -0,0 +1,3 @@
1
+ export * from './enums';
2
+ export { Element } from './element';
3
+ export { getLinePoints, getRulePoints } from './attributes/helpers';
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ var __createBinding = this && this.__createBinding || (Object.create ? function(o, m, k, k2) {
4
+ void 0 === k2 && (k2 = k);
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ desc && !("get" in desc ? !m.__esModule : desc.writable || desc.configurable) || (desc = {
7
+ enumerable: !0,
8
+ get: function() {
9
+ return m[k];
10
+ }
11
+ }), Object.defineProperty(o, k2, desc);
12
+ } : function(o, m, k, k2) {
13
+ void 0 === k2 && (k2 = k), o[k2] = m[k];
14
+ }), __exportStar = this && this.__exportStar || function(m, exports) {
15
+ for (var p in m) "default" === p || Object.prototype.hasOwnProperty.call(exports, p) || __createBinding(exports, m, p);
16
+ };
17
+
18
+ Object.defineProperty(exports, "__esModule", {
19
+ value: !0
20
+ }), exports.getRulePoints = exports.getLinePoints = exports.Element = void 0, __exportStar(require("./enums"), exports);
21
+
22
+ var element_1 = require("./element");
23
+
24
+ Object.defineProperty(exports, "Element", {
25
+ enumerable: !0,
26
+ get: function() {
27
+ return element_1.Element;
28
+ }
29
+ });
30
+
31
+ var helpers_1 = require("./attributes/helpers");
32
+
33
+ Object.defineProperty(exports, "getLinePoints", {
34
+ enumerable: !0,
35
+ get: function() {
36
+ return helpers_1.getLinePoints;
37
+ }
38
+ }), Object.defineProperty(exports, "getRulePoints", {
39
+ enumerable: !0,
40
+ get: function() {
41
+ return helpers_1.getRulePoints;
42
+ }
43
+ });
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/graph/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,0CAAwB;AACxB,qCAAoC;AAA3B,kGAAA,OAAO,OAAA;AAChB,gDAAoE;AAA3D,wGAAA,aAAa,OAAA;AAAE,wGAAA,aAAa,OAAA","file":"index.js","sourcesContent":["export * from './enums';\nexport { Element } from './element';\nexport { getLinePoints, getRulePoints } from './attributes/helpers';\n"]}
@@ -0,0 +1,3 @@
1
+ import type { IBounds } from '@visactor/vutils';
2
+ import type { IGroupMark, ILayoutOptions, IMark } from '../../types';
3
+ export declare const doGridLayout: (group: IGroupMark, children: IMark[], parentLayoutBounds: IBounds, options?: ILayoutOptions) => void;
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.doGridLayout = void 0;
6
+
7
+ const vutils_1 = require("@visactor/vutils");
8
+
9
+ function parseTemplate(template, total) {
10
+ if ((0, vutils_1.isValidNumber)(template)) return template;
11
+ const trimmedTemplate = template.trim();
12
+ if ("auto" === trimmedTemplate) return 0;
13
+ if (trimmedTemplate.endsWith("%")) {
14
+ const percent = parseFloat(trimmedTemplate.substring(0, trimmedTemplate.length - 1));
15
+ return (0, vutils_1.isValidNumber)(percent) ? percent * total : 0;
16
+ }
17
+ return 0;
18
+ }
19
+
20
+ function computeGrid(layout, width, height) {
21
+ var _a, _b, _c, _d;
22
+ const templateRows = null !== (_a = layout.gridTemplateRows) && void 0 !== _a ? _a : [ height ], templateColumns = null !== (_b = layout.gridTemplateColumns) && void 0 !== _b ? _b : [ width ], rowGap = null !== (_c = layout.gridRowGap) && void 0 !== _c ? _c : 0, columnGap = null !== (_d = layout.gridColumnGap) && void 0 !== _d ? _d : 0, rows = templateRows.map((row => parseTemplate(row, height))), columns = templateColumns.map((column => parseTemplate(column, width))), rowAuto = Math.max(0, rows.reduce(((left, row) => left - row), height) - rows.length * rowGap) / templateRows.filter((row => "auto" === row)).length, columnAuto = Math.max(0, columns.reduce(((left, column) => left - column), width) - columns.length * columnGap) / templateColumns.filter((column => "auto" === column)).length;
23
+ let lastRow = 0;
24
+ const accumulateRows = rows.map(((row, index) => {
25
+ const finalRow = "auto" === templateRows[index] ? rowAuto : row, last = lastRow;
26
+ return lastRow += finalRow + rowGap, last;
27
+ }));
28
+ accumulateRows.push(lastRow);
29
+ let lastColumn = 0;
30
+ const accumulateColumns = columns.map(((column, index) => {
31
+ const finalColumn = "auto" === templateColumns[index] ? columnAuto : column, last = lastColumn;
32
+ return lastColumn += finalColumn + columnGap, last;
33
+ }));
34
+ return accumulateColumns.push(lastColumn), {
35
+ rows: accumulateRows,
36
+ columns: accumulateColumns,
37
+ rowGap: rowGap,
38
+ columnGap: columnGap
39
+ };
40
+ }
41
+
42
+ function normalizeIndex(index, count) {
43
+ return Math.min(index < 0 ? index + count : index - 1, count);
44
+ }
45
+
46
+ function normalizeStartEndIndex(start, end, count) {
47
+ let finalStart = normalizeIndex(start, count), finalEnd = normalizeIndex(end, count);
48
+ if ((0, vutils_1.isValidNumber)(start) || (0, vutils_1.isValidNumber)(end) ? (0,
49
+ vutils_1.isValidNumber)(start) ? (0, vutils_1.isValidNumber)(end) || (finalStart = normalizeIndex(Math.max(0, finalEnd - 1), count)) : finalEnd = normalizeIndex(finalStart + 1, count) : (finalStart = 1,
50
+ finalEnd = 2), finalStart > finalEnd) {
51
+ const temp = finalEnd;
52
+ finalEnd = finalStart, finalStart = temp;
53
+ }
54
+ return {
55
+ start: finalStart,
56
+ end: finalEnd
57
+ };
58
+ }
59
+
60
+ function getCellBounds(grid, rowStart, rowEnd, columnStart, columnEnd) {
61
+ const rowCount = grid.rows.length, columnCount = grid.columns.length, {start: finalRowStart, end: finalRowEnd} = normalizeStartEndIndex(rowStart, rowEnd, rowCount), {start: finalColumnStart, end: finalColumnEnd} = normalizeStartEndIndex(columnStart, columnEnd, columnCount), x1 = grid.columns[finalRowStart], x2 = grid.columns[finalRowEnd] - (finalColumnEnd === columnCount ? 0 : grid.columnGap), y1 = grid.rows[finalColumnStart], y2 = grid.rows[finalColumnEnd] - (finalRowEnd === rowCount ? 0 : grid.rowGap);
62
+ return (new vutils_1.Bounds).set(x1, y1, x2, y2);
63
+ }
64
+
65
+ const doGridLayout = (group, children, parentLayoutBounds, options) => {
66
+ const grid = computeGrid(group.getSpec().layout, parentLayoutBounds.width(), parentLayoutBounds.height());
67
+ null == children || children.forEach((mark => {
68
+ const markLayout = mark.getSpec().layout;
69
+ mark.layoutBounds = getCellBounds(grid, markLayout.gridRowStart, markLayout.gridRowEnd, markLayout.gridColumnStart, markLayout.gridColumnEnd),
70
+ mark.commit();
71
+ }));
72
+ };
73
+
74
+ exports.doGridLayout = doGridLayout;
75
+ //# sourceMappingURL=grid.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/graph/layout/grid.ts"],"names":[],"mappings":";;;AACA,6CAAyD;AAUzD,SAAS,aAAa,CAAC,QAAkC,EAAE,KAAa;IACtE,IAAI,IAAA,sBAAa,EAAC,QAAQ,CAAC,EAAE;QAC3B,OAAO,QAAQ,CAAC;KACjB;IACD,MAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,EAAE,CAAC;IACxC,IAAI,eAAe,KAAK,MAAM,EAAE;QAE9B,OAAO,CAAC,CAAC;KACV;SAAM,IAAI,eAAe,CAAC,QAAQ,C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C1F,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,OAAO,CAAC,IAAI,CAAC,EAAE;QACvB,MAAM,UAAU,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC,MAA0B,CAAC;QAC7D,IAAI,CAAC,YAAY,GAAG,aAAa,CAC/B,IAAI,EACJ,UAAU,CAAC,YAAY,EACvB,UAAU,CAAC,UAAU,EACrB,UAAU,CAAC,eAAe,EAC1B,UAAU,CAAC,aAAa,CACzB,CAAC;QACF,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAnBW,QAAA,YAAY,gBAmBvB","file":"grid.js","sourcesContent":["import type { IBounds } from '@visactor/vutils';\nimport { Bounds, isValidNumber } from '@visactor/vutils';\nimport type { IGroupMark, ILayoutOptions, IMark, MarkGridItemSpec, MarkGridContainerSpec } from '../../types';\n\ninterface IGrid {\n rows: number[];\n columns: number[];\n rowGap: number;\n columnGap: number;\n}\n\nfunction parseTemplate(template: number | string | 'auto', total: number) {\n if (isValidNumber(template)) {\n return template;\n }\n const trimmedTemplate = template.trim();\n if (trimmedTemplate === 'auto') {\n // handle auto later\n return 0;\n } else if (trimmedTemplate.endsWith('%')) {\n const percent = parseFloat(trimmedTemplate.substring(0, trimmedTemplate.length - 1));\n if (isValidNumber(percent)) {\n return percent * total;\n }\n return 0;\n }\n return 0;\n}\n\nfunction computeGrid(layout: MarkGridContainerSpec, width: number, height: number): IGrid {\n const templateRows = layout.gridTemplateRows ?? [height];\n const templateColumns = layout.gridTemplateColumns ?? [width];\n const rowGap = layout.gridRowGap ?? 0;\n const columnGap = layout.gridColumnGap ?? 0;\n\n // compute simple cell size\n const rows = templateRows.map(row => parseTemplate(row, height));\n const columns = templateColumns.map(column => parseTemplate(column, width));\n\n // compute auto grid\n const rowLeftSize = Math.max(0, rows.reduce((left, row) => left - row, height) - rows.length * rowGap);\n const rowAuto = rowLeftSize / templateRows.filter(row => row === 'auto').length;\n const columnLeftSize = Math.max(\n 0,\n columns.reduce((left, column) => left - column, width) - columns.length * columnGap\n );\n const columnAuto = columnLeftSize / templateColumns.filter(column => column === 'auto').length;\n // accumulate grid size\n let lastRow = 0;\n const accumulateRows = rows.map((row, index) => {\n const finalRow = templateRows[index] === 'auto' ? rowAuto : row;\n const last = lastRow;\n lastRow += finalRow + rowGap;\n return last;\n });\n accumulateRows.push(lastRow);\n let lastColumn = 0;\n const accumulateColumns = columns.map((column, index) => {\n const finalColumn = templateColumns[index] === 'auto' ? columnAuto : column;\n const last = lastColumn;\n lastColumn += finalColumn + columnGap;\n return last;\n });\n accumulateColumns.push(lastColumn);\n\n return {\n rows: accumulateRows,\n columns: accumulateColumns,\n rowGap,\n columnGap\n };\n}\n\nfunction normalizeIndex(index: number, count: number) {\n return Math.min(index < 0 ? index + count : index - 1, count);\n}\n\nfunction normalizeStartEndIndex(start: number, end: number, count: number) {\n let finalStart = normalizeIndex(start, count);\n let finalEnd = normalizeIndex(end, count);\n if (!isValidNumber(start) && !isValidNumber(end)) {\n finalStart = 1;\n finalEnd = 2;\n } else if (!isValidNumber(start)) {\n finalEnd = normalizeIndex(finalStart + 1, count);\n } else if (!isValidNumber(end)) {\n finalStart = normalizeIndex(Math.max(0, finalEnd - 1), count);\n }\n if (finalStart > finalEnd) {\n const temp = finalEnd;\n finalEnd = finalStart;\n finalStart = temp;\n }\n return { start: finalStart, end: finalEnd };\n}\n\nfunction getCellBounds(grid: IGrid, rowStart: number, rowEnd: number, columnStart: number, columnEnd: number): Bounds {\n const rowCount = grid.rows.length;\n const columnCount = grid.columns.length;\n const { start: finalRowStart, end: finalRowEnd } = normalizeStartEndIndex(rowStart, rowEnd, rowCount);\n const { start: finalColumnStart, end: finalColumnEnd } = normalizeStartEndIndex(columnStart, columnEnd, columnCount);\n\n const x1 = grid.columns[finalRowStart];\n const x2 = grid.columns[finalRowEnd] - (finalColumnEnd === columnCount ? 0 : grid.columnGap);\n const y1 = grid.rows[finalColumnStart];\n const y2 = grid.rows[finalColumnEnd] - (finalRowEnd === rowCount ? 0 : grid.rowGap);\n return new Bounds().set(x1, y1, x2, y2);\n}\n\nexport const doGridLayout = (\n group: IGroupMark,\n children: IMark[],\n parentLayoutBounds: IBounds,\n options?: ILayoutOptions\n) => {\n const layout = group.getSpec().layout as MarkGridContainerSpec;\n const grid = computeGrid(layout, parentLayoutBounds.width(), parentLayoutBounds.height());\n children?.forEach(mark => {\n const markLayout = mark.getSpec().layout as MarkGridItemSpec;\n mark.layoutBounds = getCellBounds(\n grid,\n markLayout.gridRowStart,\n markLayout.gridRowEnd,\n markLayout.gridColumnStart,\n markLayout.gridColumnEnd\n );\n mark.commit();\n });\n};\n"]}
@@ -0,0 +1,3 @@
1
+ import type { IMark } from '../../types/grammar';
2
+ import type { ILayoutOptions, IView } from '../../types/view';
3
+ export declare const defaultDoLayout: (layoutMarks: IMark[], options: ILayoutOptions, view: IView) => void;