@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,326 @@
1
+ /// <reference types="node" />
2
+ import type { AxisBaseAttributes, BaseCrosshairAttrs, BaseLabelAttrs, ColorLegendAttributes, DataZoomAttributes, DiscreteLegendAttrs, GridBaseAttributes, PlayerAttributes, SizeLegendAttributes, SliderAttributes, TitleAttrs } from '@visactor/vrender-components';
3
+ import type { CoordinateType } from '@visactor/vgrammar-coordinate';
4
+ import type { IColor } from '@visactor/vrender';
5
+ import type { IEnvironmentOptions, IRendererOptions, IRunningConfig, ViewSpec, srIOption3DType, IView } from './view';
6
+ import type { CommonPaddingSpec, ValueOf } from './base';
7
+ import type { BasicEncoderSpecMap, LinkPathEncoderSpec, MarkRelativeItemSpec } from './mark';
8
+ import type { BaseEventHandler } from './event';
9
+ import type { TransformSpec } from './transform';
10
+ import type { IAnimationConfig } from './animate';
11
+ import type { ScaleSpec } from './scale';
12
+ import type { DataSpec } from './data';
13
+ import type { GridShape } from './component';
14
+ export interface IPlotOptions extends IEnvironmentOptions, IRendererOptions {
15
+ width?: number;
16
+ height?: number;
17
+ padding?: CommonPaddingSpec;
18
+ autoFit?: boolean;
19
+ options3d?: srIOption3DType;
20
+ theme?: string;
21
+ logLevel?: number;
22
+ }
23
+ export interface CartesianCoordinateOption {
24
+ id?: string;
25
+ type: 'cartesian';
26
+ transpose?: boolean;
27
+ }
28
+ export interface PolarCoordinateOption {
29
+ id?: string;
30
+ type: 'polar';
31
+ origin?: [string | number, string | number];
32
+ transpose?: boolean;
33
+ }
34
+ export type PlotIntervalEncoderSpec = Omit<BasicEncoderSpecMap['interval'], 'y'> & {
35
+ y?: number | number[];
36
+ y1?: number;
37
+ x1?: number;
38
+ };
39
+ export type PlotRectEncoderSpec = Omit<BasicEncoderSpecMap['rect'], 'y' | 'x'> & {
40
+ y?: number | number[];
41
+ x?: number | number[];
42
+ y1?: number;
43
+ x1?: number;
44
+ };
45
+ export type PlotRectXEncoderSpec = Omit<BasicEncoderSpecMap['rect'], 'x'> & {
46
+ x?: number | number[];
47
+ y1?: number;
48
+ x1?: number;
49
+ };
50
+ export type PlotRectYEncoderSpec = Omit<BasicEncoderSpecMap['rect'], 'y'> & {
51
+ y?: number | number[];
52
+ y1?: number;
53
+ x1?: number;
54
+ };
55
+ export type PlotAreaEncoderSpec = Omit<BasicEncoderSpecMap['area'], 'x' | 'y'> & {
56
+ x?: number | number[];
57
+ y?: number | number[];
58
+ };
59
+ export type PlotRuleEncoderSpec = Omit<BasicEncoderSpecMap['rule'], 'x' | 'y'> & {
60
+ x?: number | number[];
61
+ y?: number | number[];
62
+ };
63
+ export type PlotImageEncoderSpec = Omit<BasicEncoderSpecMap['image'], 'x' | 'y'> & {
64
+ x?: number | number[];
65
+ y?: number | number[];
66
+ };
67
+ export type PlotPolygonEncoderSpec = Omit<BasicEncoderSpecMap['polygon'], 'x' | 'y'> & {
68
+ x?: number[];
69
+ y?: number[];
70
+ };
71
+ export type PlotSankeyEncoderSpec = Partial<LinkPathEncoderSpec>;
72
+ export type PlotSunburstEncodeSpec = BasicEncoderSpecMap['arc'];
73
+ export type PlotTreeEncodeSpec = BasicEncoderSpecMap['symbol'];
74
+ export type PlotTreemapEncodeSpec = BasicEncoderSpecMap['rect'];
75
+ export type PlotCirclePackingEncodeSpec = BasicEncoderSpecMap['circle'];
76
+ export type PlotWordcloudEncodeSpec = BasicEncoderSpecMap['text'];
77
+ export type PlotWordcloudShapeEncodeSpec = BasicEncoderSpecMap['text'];
78
+ export type CoordinateOption = CartesianCoordinateOption | PolarCoordinateOption;
79
+ export type PlotIntervalSpec = Partial<ISemanticMarkSpec<PlotIntervalEncoderSpec, IntervalEncodeChannels>> & {
80
+ type: 'interval';
81
+ };
82
+ export type PlotLineSpec = Partial<ISemanticMarkSpec<BasicEncoderSpecMap['line'], LineEncodeChannels>> & {
83
+ type: 'line';
84
+ };
85
+ export type PlotCellSpec = Partial<ISemanticMarkSpec<BasicEncoderSpecMap['cell'], CellEncodeChannels>> & {
86
+ type: 'cell';
87
+ };
88
+ export type PlotRuleXSpec = Partial<ISemanticMarkSpec<BasicEncoderSpecMap['rule'], RuleXEncodeChannels>> & {
89
+ type: 'ruleX';
90
+ };
91
+ export type PlotRuleYSpec = Partial<ISemanticMarkSpec<BasicEncoderSpecMap['rule'], RuleYEncodeChannels>> & {
92
+ type: 'ruleY';
93
+ };
94
+ export type PlotAreaSpec = Partial<ISemanticMarkSpec<PlotAreaEncoderSpec, AreaEncodeChannels>> & {
95
+ type: 'area';
96
+ };
97
+ export type PlotSymbolSpec = Partial<ISemanticMarkSpec<BasicEncoderSpecMap['symbol'], SymbolEncodeChannels>> & {
98
+ type: 'symbol';
99
+ };
100
+ export type PlotTextSpec = Partial<ISemanticMarkSpec<BasicEncoderSpecMap['text'], TextEncodeChannels>> & {
101
+ type: 'text';
102
+ };
103
+ export type PlotRectSpec = Partial<ISemanticMarkSpec<PlotRectEncoderSpec, RectEncodeChannels>> & {
104
+ type: 'rect';
105
+ };
106
+ export type PlotRectXSpec = Partial<ISemanticMarkSpec<PlotRectXEncoderSpec, RectXEncodeChannels>> & {
107
+ type: 'rectX';
108
+ };
109
+ export type PlotRectYSpec = Partial<ISemanticMarkSpec<PlotRectYEncoderSpec, RectYEncodeChannels>> & {
110
+ type: 'rectY';
111
+ };
112
+ export type PlotPolygonSpec = Partial<ISemanticMarkSpec<PlotPolygonEncoderSpec, PolygonEncodeChannels>> & {
113
+ type: 'polygon';
114
+ };
115
+ export type PlotRuleSpec = Partial<ISemanticMarkSpec<PlotRuleEncoderSpec, RuleEncodeChannels>> & {
116
+ type: 'rule';
117
+ };
118
+ export type PlotImageSpec = Partial<ISemanticMarkSpec<PlotImageEncoderSpec, ImageEncodeChannels>> & {
119
+ type: 'image';
120
+ };
121
+ export type PlotPathSpec = Partial<ISemanticMarkSpec<BasicEncoderSpecMap['path'], PathEncodeChannels>> & {
122
+ type: 'path';
123
+ };
124
+ export interface PlotSpec {
125
+ background?: IColor;
126
+ width?: number;
127
+ height?: number;
128
+ padding?: number;
129
+ coordinate?: CoordinateOption;
130
+ marks?: Array<PlotIntervalSpec | PlotLineSpec | PlotCellSpec | PlotRuleXSpec | PlotRuleYSpec | PlotAreaSpec | PlotSymbolSpec | PlotTextSpec | PlotRectSpec | PlotRectXSpec | PlotRectYSpec | PlotPolygonSpec | PlotRuleSpec | PlotImageSpec | PlotPathSpec>;
131
+ }
132
+ export interface IPlot {
133
+ readonly view: IView;
134
+ theme: (theme: string) => this;
135
+ coordinate: (type: CoordinateType, option?: Omit<CoordinateOption, 'type'>) => this;
136
+ run: (runningConfig?: IRunningConfig) => this;
137
+ runAsync: (runningConfig?: IRunningConfig) => Promise<this>;
138
+ release: () => this;
139
+ parseSpec: (spec: PlotSpec) => this;
140
+ updateSpec: (spec: PlotSpec) => this;
141
+ getImageBuffer: () => Buffer;
142
+ on: (type: string, handler: BaseEventHandler) => this;
143
+ off: (type: string, handler?: BaseEventHandler) => this;
144
+ interval: () => IInterval;
145
+ cell: () => ICell;
146
+ area: () => IArea;
147
+ image: () => IImage;
148
+ line: () => ILine;
149
+ ruleX: () => IRuleX;
150
+ ruleY: () => IRectY;
151
+ symbol: () => ISymbol;
152
+ polygon: () => IPolygon;
153
+ text: () => IText;
154
+ rect: () => IRect;
155
+ rectX: () => IRectX;
156
+ rectY: () => IRectY;
157
+ rule: () => IRule;
158
+ wordcloud: () => IWordcloud;
159
+ wordcloudShape: () => IWordcloudShape;
160
+ circlePacking: () => ICirclePacking;
161
+ treemap: () => ITreemap;
162
+ tree: () => ITree;
163
+ sunburst: () => ISunburst;
164
+ sankey: () => ISankey;
165
+ }
166
+ export interface IPlotConstructor {
167
+ new (options?: IPlotOptions): IPlot;
168
+ }
169
+ export type WithDefaultEncode<T, K extends string> = {
170
+ [Key in K]?: Key extends keyof T ? ISemanticEncodeValue<T[Key]> : ISemanticEncodeValue<string | number>;
171
+ };
172
+ export type ISemanticEncodeValue<T> = T extends any[] ? string[] | ((datum: any) => any)[] : string | ((datum: any) => T);
173
+ export type ISemanticEncodeSpec<T> = {
174
+ [Key in keyof T]?: ISemanticEncodeValue<T[Key]>;
175
+ };
176
+ export type ISemanticStyle<T, K extends string> = Omit<T, K>;
177
+ export interface SemanticTooltipContentItem {
178
+ key?: ISemanticEncodeValue<string | number>;
179
+ value?: ISemanticEncodeValue<string | number>;
180
+ symbol?: ISemanticEncodeValue<string>;
181
+ }
182
+ export type SemanticTooltipOption = {
183
+ disableGraphicTooltip?: boolean;
184
+ disableDimensionTooltip?: boolean;
185
+ staticTitle?: string;
186
+ staticContentKey?: string | string[];
187
+ title?: ISemanticEncodeValue<string | number>;
188
+ dimensionTooltipChannel?: 'x' | 'y';
189
+ content?: SemanticTooltipContentItem[];
190
+ };
191
+ export interface SemanticAxisOption extends Partial<AxisBaseAttributes> {
192
+ tickCount?: number;
193
+ }
194
+ export interface SemanticGridOption extends Partial<GridBaseAttributes> {
195
+ type?: GridShape;
196
+ tickCount?: number;
197
+ inside?: boolean;
198
+ baseValue?: number;
199
+ sides?: number;
200
+ }
201
+ export type SemanticDataZoomOption = Partial<DataZoomAttributes>;
202
+ export type SemanticSliderOption = Partial<SliderAttributes>;
203
+ export type SemanticLegendOption = Partial<ColorLegendAttributes | DiscreteLegendAttrs | SizeLegendAttributes>;
204
+ export type SemanticCrosshairOption = Partial<BaseCrosshairAttrs>;
205
+ export type SemanticLabelOption = Partial<BaseLabelAttrs>;
206
+ export type SemanticPlayerOption = Partial<PlayerAttributes>;
207
+ export type SemanticTitleOption = Partial<TitleAttrs>;
208
+ export interface ISemanticMark<EncodeSpec, K extends string> {
209
+ readonly uid: number;
210
+ readonly type: string;
211
+ data: (values: any, transform?: TransformSpec[], id?: string) => this;
212
+ style: (style: Partial<EncodeSpec & any>) => this;
213
+ encode: (channel: K, option: ValueOf<WithDefaultEncode<EncodeSpec, K>, K>) => this;
214
+ scale: (channel: K, option: Partial<ScaleSpec>) => this;
215
+ transform: (option: TransformSpec[]) => this;
216
+ animate: (state: string, option: IAnimationConfig | IAnimationConfig[]) => this;
217
+ state: (state: string, option: Partial<EncodeSpec>) => this;
218
+ axis: (channel: string, option?: SemanticAxisOption | boolean, layout?: MarkRelativeItemSpec) => this;
219
+ legend: (channel: string, option?: SemanticLegendOption | boolean, layout?: MarkRelativeItemSpec) => this;
220
+ crosshair: (channel: string, option?: SemanticCrosshairOption | boolean) => this;
221
+ tooltip: (option: SemanticTooltipOption | boolean) => this;
222
+ coordinate: (option: CoordinateOption) => this;
223
+ grid: (channel: string, option?: SemanticGridOption | boolean) => this;
224
+ title: (option: SemanticTitleOption, layout?: MarkRelativeItemSpec) => this;
225
+ slider: (channel: string, option?: SemanticSliderOption | boolean, layout?: MarkRelativeItemSpec) => this;
226
+ datazoom: (channel: string, option?: SemanticDataZoomOption | boolean, layout?: MarkRelativeItemSpec) => this;
227
+ label: (channel: string, option?: SemanticLabelOption | boolean) => this;
228
+ player: (data?: any[], option?: SemanticPlayerOption | boolean, layout?: MarkRelativeItemSpec) => this;
229
+ toViewSpec: () => ViewSpec;
230
+ parseSpec: (spec: Partial<ISemanticMarkSpec<EncodeSpec, K>>) => this;
231
+ }
232
+ export interface ISemanticMarkSpec<EncodeSpec, K extends string> {
233
+ id: string | number;
234
+ data?: DataSpec;
235
+ encode?: WithDefaultEncode<EncodeSpec, K>;
236
+ scale?: Partial<Record<K, ScaleSpec>>;
237
+ style?: Partial<EncodeSpec & any>;
238
+ axis?: Partial<Record<K, {
239
+ option?: SemanticAxisOption | boolean;
240
+ layout?: MarkRelativeItemSpec;
241
+ } | SemanticAxisOption | boolean>>;
242
+ grid?: Partial<Record<K, SemanticGridOption | boolean>>;
243
+ transform?: TransformSpec[];
244
+ state?: Record<string, Partial<EncodeSpec>>;
245
+ animation?: Record<string, IAnimationConfig | IAnimationConfig[]>;
246
+ legend?: Record<string, {
247
+ option: SemanticLegendOption | boolean;
248
+ layout?: MarkRelativeItemSpec;
249
+ } | SemanticLegendOption | boolean>;
250
+ crosshair?: Record<string, SemanticCrosshairOption | boolean>;
251
+ tooltip?: SemanticTooltipOption | boolean;
252
+ slider?: Record<string, {
253
+ option: SemanticSliderOption | boolean;
254
+ layout?: MarkRelativeItemSpec;
255
+ } | SemanticSliderOption | boolean>;
256
+ datazoom?: Record<string, {
257
+ option: SemanticDataZoomOption | boolean;
258
+ layout?: MarkRelativeItemSpec;
259
+ } | SemanticDataZoomOption | boolean>;
260
+ label?: Record<string, SemanticLabelOption | boolean>;
261
+ player?: {
262
+ data?: any[];
263
+ option?: SemanticPlayerOption | boolean;
264
+ layout?: MarkRelativeItemSpec;
265
+ };
266
+ title?: {
267
+ option?: SemanticTitleOption;
268
+ layout?: MarkRelativeItemSpec;
269
+ } | SemanticTitleOption;
270
+ }
271
+ export type ParsedSimpleEncode<T, K extends string> = {
272
+ [Key in K]?: {
273
+ field: Key extends keyof T ? ISemanticEncodeValue<T[Key]> : ISemanticEncodeValue<string>;
274
+ scale: string;
275
+ };
276
+ };
277
+ export type SemanticEncodeChannels = 'x' | 'y' | 'group' | 'color';
278
+ export type IntervalEncodeChannels = 'x' | 'y' | 'group' | 'color' | 'stroke';
279
+ export type CellEncodeChannels = 'x' | 'y' | 'group' | 'color' | 'stroke';
280
+ export type LineEncodeChannels = 'x' | 'y' | 'group' | 'color';
281
+ export type AreaEncodeChannels = 'x' | 'y' | 'group' | 'color' | 'stroke';
282
+ export type RuleXEncodeChannels = 'x' | 'x' | 'color' | 'group';
283
+ export type RuleYEncodeChannels = 'x' | 'y' | 'color' | 'group';
284
+ export type SymbolEncodeChannels = 'x' | 'y' | 'color' | 'group' | 'size' | 'shape' | 'stroke';
285
+ export type TextEncodeChannels = 'x' | 'y' | 'color' | 'group' | 'text' | 'stroke';
286
+ export type RectEncodeChannels = 'x' | 'y' | 'color' | 'group' | 'stroke';
287
+ export type RectXEncodeChannels = 'x' | 'color' | 'group' | 'stroke';
288
+ export type RectYEncodeChannels = 'y' | 'color' | 'group' | 'stroke';
289
+ export type PolygonEncodeChannels = 'x' | 'y' | 'color' | 'group' | 'stroke';
290
+ export type RuleEncodeChannels = 'x' | 'y' | 'color' | 'group';
291
+ export type ImageEncodeChannels = 'x' | 'y' | 'color' | 'group' | 'src' | 'stroke';
292
+ export type PathEncodeChannels = 'color' | 'stroke';
293
+ export type SankeyEncodeChannels = 'node' | 'value' | 'color' | 'stroke';
294
+ export type SunburstEncodeChannels = 'node' | 'value' | 'color' | 'stroke';
295
+ export type TreeEncodeChannels = 'node' | 'value' | 'color' | 'stroke';
296
+ export type TreemapEncodeChannels = 'node' | 'value' | 'color' | 'stroke';
297
+ export type CirclepackingEncodeChannels = 'node' | 'value' | 'color' | 'stroke';
298
+ export type WordcloudEncodeChannels = 'text' | 'color' | 'stroke';
299
+ export type WordcloudShapeEncodeChannels = 'text' | 'color' | 'stroke';
300
+ export type IInterval = ISemanticMark<PlotIntervalEncoderSpec, IntervalEncodeChannels>;
301
+ export type ILine = ISemanticMark<BasicEncoderSpecMap['line'], LineEncodeChannels>;
302
+ export type ICell = ISemanticMark<BasicEncoderSpecMap['cell'], CellEncodeChannels>;
303
+ export type IRuleX = ISemanticMark<BasicEncoderSpecMap['rule'], RuleXEncodeChannels>;
304
+ export type IRuleY = ISemanticMark<BasicEncoderSpecMap['rule'], RuleYEncodeChannels>;
305
+ export type IArea = ISemanticMark<PlotAreaEncoderSpec, AreaEncodeChannels>;
306
+ export type ISymbol = ISemanticMark<BasicEncoderSpecMap['symbol'], SymbolEncodeChannels>;
307
+ export type IText = ISemanticMark<BasicEncoderSpecMap['text'], TextEncodeChannels>;
308
+ export type IRect = ISemanticMark<PlotRectEncoderSpec, RectEncodeChannels>;
309
+ export type IRectX = ISemanticMark<BasicEncoderSpecMap['rect'], RectXEncodeChannels>;
310
+ export type IRectY = ISemanticMark<BasicEncoderSpecMap['rect'], RectYEncodeChannels>;
311
+ export type IPolygon = ISemanticMark<PlotPolygonEncoderSpec, PolygonEncodeChannels>;
312
+ export type IRule = ISemanticMark<BasicEncoderSpecMap['rule'], RuleEncodeChannels>;
313
+ export type IImage = ISemanticMark<PlotImageEncoderSpec, ImageEncodeChannels>;
314
+ export type IPath = ISemanticMark<BasicEncoderSpecMap['path'], PathEncodeChannels>;
315
+ export type ISankey = ISemanticMark<PlotSankeyEncoderSpec, SankeyEncodeChannels>;
316
+ export type ISunburst = ISemanticMark<PlotSunburstEncodeSpec, SunburstEncodeChannels>;
317
+ export type IWordcloud = ISemanticMark<PlotWordcloudEncodeSpec, WordcloudEncodeChannels>;
318
+ export type IWordcloudShape = ISemanticMark<PlotWordcloudShapeEncodeSpec, WordcloudShapeEncodeChannels>;
319
+ export type ITree = ISemanticMark<PlotTreeEncodeSpec, TreeEncodeChannels>;
320
+ export type ITreemap = ISemanticMark<PlotTreemapEncodeSpec, TreemapEncodeChannels>;
321
+ export type ICirclePacking = ISemanticMark<PlotCirclePackingEncodeSpec, CirclepackingEncodeChannels>;
322
+ export type PlotMark = IInterval | IRuleX | IRuleY | ICell | ILine | IArea | ISymbol | IText | IRect | IRectX | IRectY | IPolygon | IRule | IImage | IPath | ISankey | ISunburst | ICirclePacking | ITreemap | ITree | IWordcloud | IWordcloudShape;
323
+ export interface IPlotMarkConstructor {
324
+ readonly type: string;
325
+ new (id?: string): PlotMark;
326
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ });
6
+ //# sourceMappingURL=plot.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types/plot.ts"],"names":[],"mappings":"","file":"plot.js","sourcesContent":["import type {\n AxisBaseAttributes,\n BaseCrosshairAttrs,\n BaseLabelAttrs,\n ColorLegendAttributes,\n DataZoomAttributes,\n DiscreteLegendAttrs,\n GridBaseAttributes,\n PlayerAttributes,\n SizeLegendAttributes,\n SliderAttributes,\n TitleAttrs\n} from '@visactor/vrender-components';\nimport type { CoordinateType } from '@visactor/vgrammar-coordinate';\nimport type { IColor } from '@visactor/vrender';\nimport type { IEnvironmentOptions, IRendererOptions, IRunningConfig, ViewSpec, srIOption3DType, IView } from './view';\nimport type { CommonPaddingSpec, ValueOf } from './base';\nimport type { BasicEncoderSpecMap, LinkPathEncoderSpec, MarkRelativeItemSpec } from './mark';\nimport type { BaseEventHandler } from './event';\nimport type { TransformSpec } from './transform';\nimport type { IAnimationConfig } from './animate';\nimport type { ScaleSpec } from './scale';\nimport type { DataSpec } from './data';\nimport type { GridShape } from './component';\n\nexport interface IPlotOptions extends IEnvironmentOptions, IRendererOptions {\n width?: number;\n height?: number;\n padding?: CommonPaddingSpec;\n autoFit?: boolean;\n options3d?: srIOption3DType;\n theme?: string;\n logLevel?: number;\n}\n\nexport interface CartesianCoordinateOption {\n id?: string;\n type: 'cartesian';\n transpose?: boolean;\n}\n\nexport interface PolarCoordinateOption {\n id?: string;\n type: 'polar';\n origin?: [string | number, string | number];\n transpose?: boolean;\n}\n\nexport type PlotIntervalEncoderSpec = Omit<BasicEncoderSpecMap['interval'], 'y'> & {\n y?: number | number[];\n y1?: number;\n x1?: number;\n};\n\nexport type PlotRectEncoderSpec = Omit<BasicEncoderSpecMap['rect'], 'y' | 'x'> & {\n y?: number | number[];\n x?: number | number[];\n y1?: number;\n x1?: number;\n};\n\nexport type PlotRectXEncoderSpec = Omit<BasicEncoderSpecMap['rect'], 'x'> & {\n x?: number | number[];\n y1?: number;\n x1?: number;\n};\n\nexport type PlotRectYEncoderSpec = Omit<BasicEncoderSpecMap['rect'], 'y'> & {\n y?: number | number[];\n y1?: number;\n x1?: number;\n};\n\nexport type PlotAreaEncoderSpec = Omit<BasicEncoderSpecMap['area'], 'x' | 'y'> & {\n x?: number | number[];\n y?: number | number[];\n};\n\nexport type PlotRuleEncoderSpec = Omit<BasicEncoderSpecMap['rule'], 'x' | 'y'> & {\n x?: number | number[];\n y?: number | number[];\n};\n\nexport type PlotImageEncoderSpec = Omit<BasicEncoderSpecMap['image'], 'x' | 'y'> & {\n x?: number | number[];\n y?: number | number[];\n};\nexport type PlotPolygonEncoderSpec = Omit<BasicEncoderSpecMap['polygon'], 'x' | 'y'> & {\n x?: number[];\n y?: number[];\n};\n\nexport type PlotSankeyEncoderSpec = Partial<LinkPathEncoderSpec>;\nexport type PlotSunburstEncodeSpec = BasicEncoderSpecMap['arc'];\nexport type PlotTreeEncodeSpec = BasicEncoderSpecMap['symbol'];\nexport type PlotTreemapEncodeSpec = BasicEncoderSpecMap['rect'];\nexport type PlotCirclePackingEncodeSpec = BasicEncoderSpecMap['circle'];\nexport type PlotWordcloudEncodeSpec = BasicEncoderSpecMap['text'];\nexport type PlotWordcloudShapeEncodeSpec = BasicEncoderSpecMap['text'];\n\nexport type CoordinateOption = CartesianCoordinateOption | PolarCoordinateOption;\nexport type PlotIntervalSpec = Partial<ISemanticMarkSpec<PlotIntervalEncoderSpec, IntervalEncodeChannels>> & {\n type: 'interval';\n};\nexport type PlotLineSpec = Partial<ISemanticMarkSpec<BasicEncoderSpecMap['line'], LineEncodeChannels>> & {\n type: 'line';\n};\nexport type PlotCellSpec = Partial<ISemanticMarkSpec<BasicEncoderSpecMap['cell'], CellEncodeChannels>> & {\n type: 'cell';\n};\nexport type PlotRuleXSpec = Partial<ISemanticMarkSpec<BasicEncoderSpecMap['rule'], RuleXEncodeChannels>> & {\n type: 'ruleX';\n};\nexport type PlotRuleYSpec = Partial<ISemanticMarkSpec<BasicEncoderSpecMap['rule'], RuleYEncodeChannels>> & {\n type: 'ruleY';\n};\nexport type PlotAreaSpec = Partial<ISemanticMarkSpec<PlotAreaEncoderSpec, AreaEncodeChannels>> & {\n type: 'area';\n};\nexport type PlotSymbolSpec = Partial<ISemanticMarkSpec<BasicEncoderSpecMap['symbol'], SymbolEncodeChannels>> & {\n type: 'symbol';\n};\nexport type PlotTextSpec = Partial<ISemanticMarkSpec<BasicEncoderSpecMap['text'], TextEncodeChannels>> & {\n type: 'text';\n};\nexport type PlotRectSpec = Partial<ISemanticMarkSpec<PlotRectEncoderSpec, RectEncodeChannels>> & {\n type: 'rect';\n};\nexport type PlotRectXSpec = Partial<ISemanticMarkSpec<PlotRectXEncoderSpec, RectXEncodeChannels>> & {\n type: 'rectX';\n};\nexport type PlotRectYSpec = Partial<ISemanticMarkSpec<PlotRectYEncoderSpec, RectYEncodeChannels>> & {\n type: 'rectY';\n};\nexport type PlotPolygonSpec = Partial<ISemanticMarkSpec<PlotPolygonEncoderSpec, PolygonEncodeChannels>> & {\n type: 'polygon';\n};\nexport type PlotRuleSpec = Partial<ISemanticMarkSpec<PlotRuleEncoderSpec, RuleEncodeChannels>> & {\n type: 'rule';\n};\nexport type PlotImageSpec = Partial<ISemanticMarkSpec<PlotImageEncoderSpec, ImageEncodeChannels>> & {\n type: 'image';\n};\nexport type PlotPathSpec = Partial<ISemanticMarkSpec<BasicEncoderSpecMap['path'], PathEncodeChannels>> & {\n type: 'path';\n};\n\nexport interface PlotSpec {\n background?: IColor;\n width?: number;\n height?: number;\n padding?: number;\n coordinate?: CoordinateOption;\n marks?: Array<\n | PlotIntervalSpec\n | PlotLineSpec\n | PlotCellSpec\n | PlotRuleXSpec\n | PlotRuleYSpec\n | PlotAreaSpec\n | PlotSymbolSpec\n | PlotTextSpec\n | PlotRectSpec\n | PlotRectXSpec\n | PlotRectYSpec\n | PlotPolygonSpec\n | PlotRuleSpec\n | PlotImageSpec\n | PlotPathSpec\n >;\n}\n\nexport interface IPlot {\n readonly view: IView;\n\n theme: (theme: string) => this;\n /**\n * todo: 直接接text图元还是title组件\n */\n // title: (text: ITextAttribute['text'], style: Omit<ITextAttribute, 'text'>) => this;\n coordinate: (type: CoordinateType, option?: Omit<CoordinateOption, 'type'>) => this;\n // interaction: (type: string, options: boolean | any) => this;\n\n // facet: (type: string, options: any) => this;\n\n ///--------- life cycle ---------///\n\n run: (runningConfig?: IRunningConfig) => this;\n runAsync: (runningConfig?: IRunningConfig) => Promise<this>;\n release: () => this;\n parseSpec: (spec: PlotSpec) => this;\n updateSpec: (spec: PlotSpec) => this;\n getImageBuffer: () => Buffer;\n\n ///--------- events api ---------///\n on: (type: string, handler: BaseEventHandler) => this;\n off: (type: string, handler?: BaseEventHandler) => this;\n\n ///--------- marks ---------///\n\n interval: () => IInterval;\n cell: () => ICell;\n area: () => IArea;\n image: () => IImage;\n line: () => ILine;\n ruleX: () => IRuleX;\n ruleY: () => IRectY;\n symbol: () => ISymbol;\n polygon: () => IPolygon;\n text: () => IText;\n rect: () => IRect;\n rectX: () => IRectX;\n rectY: () => IRectY;\n rule: () => IRule;\n\n // wordcloud 包如果没注册,会存在问题\n wordcloud: () => IWordcloud;\n wordcloudShape: () => IWordcloudShape;\n circlePacking: () => ICirclePacking;\n treemap: () => ITreemap;\n tree: () => ITree;\n sunburst: () => ISunburst;\n sankey: () => ISankey;\n\n // P2\n // forceGraph: () => ISemanticMark;\n // geoPath: () => ISemanticMark;\n // vector: () => ISemanticMark;\n // shape: () => ISemanticMark;\n // gauge: () => ISemanticMark;\n // heatmap: () => ISemanticMark;\n // density: () => ISemanticMark;\n // boxplot: () => ISemanticMark;\n // box: () => ISemanticMark;\n // contour: () => ISemanticMark;\n\n // observable auto define type by data\n // auto: () => ISemanticMark;\n}\n\nexport interface IPlotConstructor {\n new (options?: IPlotOptions): IPlot;\n}\n\nexport type WithDefaultEncode<T, K extends string> = {\n [Key in K]?: Key extends keyof T ? ISemanticEncodeValue<T[Key]> : ISemanticEncodeValue<string | number>;\n};\nexport type ISemanticEncodeValue<T> = T extends any[]\n ? string[] | ((datum: any) => any)[]\n : string | ((datum: any) => T);\nexport type ISemanticEncodeSpec<T> = {\n [Key in keyof T]?: ISemanticEncodeValue<T[Key]>;\n};\nexport type ISemanticStyle<T, K extends string> = Omit<T, K>;\n\nexport interface SemanticTooltipContentItem {\n key?: ISemanticEncodeValue<string | number>;\n value?: ISemanticEncodeValue<string | number>;\n symbol?: ISemanticEncodeValue<string>;\n}\nexport type SemanticTooltipOption = {\n disableGraphicTooltip?: boolean;\n disableDimensionTooltip?: boolean;\n staticTitle?: string;\n staticContentKey?: string | string[];\n title?: ISemanticEncodeValue<string | number>;\n dimensionTooltipChannel?: 'x' | 'y';\n content?: SemanticTooltipContentItem[];\n};\n\nexport interface SemanticAxisOption extends Partial<AxisBaseAttributes> {\n tickCount?: number;\n}\n\nexport interface SemanticGridOption extends Partial<GridBaseAttributes> {\n type?: GridShape;\n tickCount?: number;\n inside?: boolean;\n baseValue?: number;\n sides?: number;\n}\nexport type SemanticDataZoomOption = Partial<DataZoomAttributes>;\nexport type SemanticSliderOption = Partial<SliderAttributes>;\nexport type SemanticLegendOption = Partial<ColorLegendAttributes | DiscreteLegendAttrs | SizeLegendAttributes>;\nexport type SemanticCrosshairOption = Partial<BaseCrosshairAttrs>;\nexport type SemanticLabelOption = Partial<BaseLabelAttrs>;\nexport type SemanticPlayerOption = Partial<PlayerAttributes>;\nexport type SemanticTitleOption = Partial<TitleAttrs>;\n\nexport interface ISemanticMark<EncodeSpec, K extends string> {\n readonly uid: number;\n readonly type: string;\n data: (values: any, transform?: TransformSpec[], id?: string) => this;\n style: (style: Partial<EncodeSpec & any>) => this;\n encode: (channel: K, option: ValueOf<WithDefaultEncode<EncodeSpec, K>, K>) => this;\n scale: (channel: K, option: Partial<ScaleSpec>) => this;\n transform: (option: TransformSpec[]) => this;\n animate: (state: string, option: IAnimationConfig | IAnimationConfig[]) => this;\n state: (state: string, option: Partial<EncodeSpec>) => this;\n\n axis: (channel: string, option?: SemanticAxisOption | boolean, layout?: MarkRelativeItemSpec) => this;\n legend: (channel: string, option?: SemanticLegendOption | boolean, layout?: MarkRelativeItemSpec) => this;\n crosshair: (channel: string, option?: SemanticCrosshairOption | boolean) => this;\n tooltip: (option: SemanticTooltipOption | boolean) => this;\n coordinate: (option: CoordinateOption) => this;\n grid: (channel: string, option?: SemanticGridOption | boolean) => this;\n title: (option: SemanticTitleOption, layout?: MarkRelativeItemSpec) => this;\n\n slider: (channel: string, option?: SemanticSliderOption | boolean, layout?: MarkRelativeItemSpec) => this;\n datazoom: (channel: string, option?: SemanticDataZoomOption | boolean, layout?: MarkRelativeItemSpec) => this;\n label: (channel: string, option?: SemanticLabelOption | boolean) => this;\n player: (data?: any[], option?: SemanticPlayerOption | boolean, layout?: MarkRelativeItemSpec) => this;\n\n toViewSpec: () => ViewSpec;\n parseSpec: (spec: Partial<ISemanticMarkSpec<EncodeSpec, K>>) => this;\n}\n\nexport interface ISemanticMarkSpec<EncodeSpec, K extends string> {\n id: string | number;\n data?: DataSpec;\n encode?: WithDefaultEncode<EncodeSpec, K>;\n scale?: Partial<Record<K, ScaleSpec>>;\n style?: Partial<EncodeSpec & any>;\n axis?: Partial<\n Record<K, { option?: SemanticAxisOption | boolean; layout?: MarkRelativeItemSpec } | SemanticAxisOption | boolean>\n >;\n grid?: Partial<Record<K, SemanticGridOption | boolean>>;\n transform?: TransformSpec[];\n state?: Record<string, Partial<EncodeSpec>>;\n animation?: Record<string, IAnimationConfig | IAnimationConfig[]>;\n legend?: Record<\n string,\n { option: SemanticLegendOption | boolean; layout?: MarkRelativeItemSpec } | SemanticLegendOption | boolean\n >;\n crosshair?: Record<string, SemanticCrosshairOption | boolean>;\n tooltip?: SemanticTooltipOption | boolean;\n slider?: Record<\n string,\n { option: SemanticSliderOption | boolean; layout?: MarkRelativeItemSpec } | SemanticSliderOption | boolean\n >;\n datazoom?: Record<\n string,\n { option: SemanticDataZoomOption | boolean; layout?: MarkRelativeItemSpec } | SemanticDataZoomOption | boolean\n >;\n label?: Record<string, SemanticLabelOption | boolean>;\n player?: { data?: any[]; option?: SemanticPlayerOption | boolean; layout?: MarkRelativeItemSpec };\n title?: { option?: SemanticTitleOption; layout?: MarkRelativeItemSpec } | SemanticTitleOption;\n}\n\nexport type ParsedSimpleEncode<T, K extends string> = {\n [Key in K]?: {\n field: Key extends keyof T ? ISemanticEncodeValue<T[Key]> : ISemanticEncodeValue<string>;\n scale: string;\n };\n};\n\nexport type SemanticEncodeChannels = 'x' | 'y' | 'group' | 'color';\nexport type IntervalEncodeChannels = 'x' | 'y' | 'group' | 'color' | 'stroke';\nexport type CellEncodeChannels = 'x' | 'y' | 'group' | 'color' | 'stroke';\nexport type LineEncodeChannels = 'x' | 'y' | 'group' | 'color';\nexport type AreaEncodeChannels = 'x' | 'y' | 'group' | 'color' | 'stroke';\nexport type RuleXEncodeChannels = 'x' | 'x' | 'color' | 'group';\nexport type RuleYEncodeChannels = 'x' | 'y' | 'color' | 'group';\nexport type SymbolEncodeChannels = 'x' | 'y' | 'color' | 'group' | 'size' | 'shape' | 'stroke';\nexport type TextEncodeChannels = 'x' | 'y' | 'color' | 'group' | 'text' | 'stroke';\nexport type RectEncodeChannels = 'x' | 'y' | 'color' | 'group' | 'stroke';\nexport type RectXEncodeChannels = 'x' | 'color' | 'group' | 'stroke';\nexport type RectYEncodeChannels = 'y' | 'color' | 'group' | 'stroke';\nexport type PolygonEncodeChannels = 'x' | 'y' | 'color' | 'group' | 'stroke';\nexport type RuleEncodeChannels = 'x' | 'y' | 'color' | 'group';\nexport type ImageEncodeChannels = 'x' | 'y' | 'color' | 'group' | 'src' | 'stroke';\nexport type PathEncodeChannels = 'color' | 'stroke';\nexport type SankeyEncodeChannels = 'node' | 'value' | 'color' | 'stroke';\nexport type SunburstEncodeChannels = 'node' | 'value' | 'color' | 'stroke';\nexport type TreeEncodeChannels = 'node' | 'value' | 'color' | 'stroke';\nexport type TreemapEncodeChannels = 'node' | 'value' | 'color' | 'stroke';\nexport type CirclepackingEncodeChannels = 'node' | 'value' | 'color' | 'stroke';\nexport type WordcloudEncodeChannels = 'text' | 'color' | 'stroke';\nexport type WordcloudShapeEncodeChannels = 'text' | 'color' | 'stroke';\n\nexport type IInterval = ISemanticMark<PlotIntervalEncoderSpec, IntervalEncodeChannels>;\nexport type ILine = ISemanticMark<BasicEncoderSpecMap['line'], LineEncodeChannels>;\nexport type ICell = ISemanticMark<BasicEncoderSpecMap['cell'], CellEncodeChannels>;\nexport type IRuleX = ISemanticMark<BasicEncoderSpecMap['rule'], RuleXEncodeChannels>;\nexport type IRuleY = ISemanticMark<BasicEncoderSpecMap['rule'], RuleYEncodeChannels>;\nexport type IArea = ISemanticMark<PlotAreaEncoderSpec, AreaEncodeChannels>;\nexport type ISymbol = ISemanticMark<BasicEncoderSpecMap['symbol'], SymbolEncodeChannels>;\nexport type IText = ISemanticMark<BasicEncoderSpecMap['text'], TextEncodeChannels>;\nexport type IRect = ISemanticMark<PlotRectEncoderSpec, RectEncodeChannels>;\nexport type IRectX = ISemanticMark<BasicEncoderSpecMap['rect'], RectXEncodeChannels>;\nexport type IRectY = ISemanticMark<BasicEncoderSpecMap['rect'], RectYEncodeChannels>;\nexport type IPolygon = ISemanticMark<PlotPolygonEncoderSpec, PolygonEncodeChannels>;\nexport type IRule = ISemanticMark<BasicEncoderSpecMap['rule'], RuleEncodeChannels>;\nexport type IImage = ISemanticMark<PlotImageEncoderSpec, ImageEncodeChannels>;\nexport type IPath = ISemanticMark<BasicEncoderSpecMap['path'], PathEncodeChannels>;\nexport type ISankey = ISemanticMark<PlotSankeyEncoderSpec, SankeyEncodeChannels>;\nexport type ISunburst = ISemanticMark<PlotSunburstEncodeSpec, SunburstEncodeChannels>;\nexport type IWordcloud = ISemanticMark<PlotWordcloudEncodeSpec, WordcloudEncodeChannels>;\nexport type IWordcloudShape = ISemanticMark<PlotWordcloudShapeEncodeSpec, WordcloudShapeEncodeChannels>;\nexport type ITree = ISemanticMark<PlotTreeEncodeSpec, TreeEncodeChannels>;\nexport type ITreemap = ISemanticMark<PlotTreemapEncodeSpec, TreemapEncodeChannels>;\nexport type ICirclePacking = ISemanticMark<PlotCirclePackingEncodeSpec, CirclepackingEncodeChannels>;\n\nexport type PlotMark =\n | IInterval\n | IRuleX\n | IRuleY\n | ICell\n | ILine\n | IArea\n | ISymbol\n | IText\n | IRect\n | IRectX\n | IRectY\n | IPolygon\n | IRule\n | IImage\n | IPath\n | ISankey\n | ISunburst\n | ICirclePacking\n | ITreemap\n | ITree\n | IWordcloud\n | IWordcloudShape;\n\nexport interface IPlotMarkConstructor {\n readonly type: string;\n\n new (id?: string): PlotMark;\n}\n"]}
@@ -0,0 +1,61 @@
1
+ import type { GrammarSpec, IGrammarBase } from './grammar';
2
+ import type { GenericFunctionType } from './signal';
3
+ import type { Nil } from './base';
4
+ export type GeoJsonFeatureSpec = any;
5
+ export type GeoJsonFeatureCollectionSpec = any;
6
+ export type FitSpec = GeoJsonFeatureSpec | GeoJsonFeatureCollectionSpec | GeoJsonFeatureSpec[];
7
+ export type ProjectionType = 'albers' | 'albersUsa' | 'azimuthalEqualArea' | 'azimuthalEquidistant' | 'conicConformal' | 'conicEqualArea' | 'conicEquidistant' | 'equalEarth' | 'equirectangular' | 'gnomonic' | 'identity' | 'mercator' | 'naturalEarth1' | 'orthographic' | 'stereographic' | 'transverseMercator';
8
+ export interface BaseProjectionSpec extends GrammarSpec {
9
+ type: string;
10
+ pointRadius?: ProjectionFunctionType<number>;
11
+ extent?: ProjectionFunctionType<[[number, number], [number, number]]>;
12
+ fit?: ProjectionFunctionType<FeatureCollectionData | FeatureCollectionData[] | FeatureData | FeatureData[] | GeometryData | GeometryData[]>;
13
+ size?: ProjectionFunctionType<[number, number]>;
14
+ clipAngle?: ProjectionFunctionType<number>;
15
+ clipExtent?: ProjectionFunctionType<[number, number]>;
16
+ scale?: ProjectionFunctionType<number>;
17
+ translate?: ProjectionFunctionType<[number, number]>;
18
+ center?: ProjectionFunctionType<[number, number]>;
19
+ rotate?: ProjectionFunctionType<[number, number] | [number, number, number]>;
20
+ parallels?: ProjectionFunctionType<[number, number]>;
21
+ precision?: ProjectionFunctionType<number>;
22
+ reflectX?: ProjectionFunctionType<boolean>;
23
+ reflectY?: ProjectionFunctionType<number>;
24
+ coefficient?: ProjectionFunctionType<number>;
25
+ distance?: ProjectionFunctionType<number>;
26
+ fraction?: ProjectionFunctionType<number>;
27
+ lobes?: ProjectionFunctionType<number>;
28
+ parallel?: ProjectionFunctionType<number>;
29
+ radius?: ProjectionFunctionType<number>;
30
+ ratio?: ProjectionFunctionType<number>;
31
+ spacing?: ProjectionFunctionType<number>;
32
+ tilt?: ProjectionFunctionType<number>;
33
+ }
34
+ export interface ProjectionSpec extends BaseProjectionSpec {
35
+ name?: string;
36
+ }
37
+ export interface IProjection extends IGrammarBase {
38
+ grammarType: 'projection';
39
+ parse: (spec: ProjectionSpec) => this;
40
+ pointRadius: (spec: ProjectionSpec['pointRadius']) => this;
41
+ size: (spec: ProjectionSpec['size']) => this;
42
+ fit: (spec: ProjectionSpec['fit']) => this;
43
+ extent: (spec: ProjectionSpec['extent']) => this;
44
+ configure: (spec: Omit<ProjectionSpec, 'fit' | 'extent' | 'size' | 'pointRadius'> | Nil) => this;
45
+ }
46
+ export interface GeometryData {
47
+ type: 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineString' | 'Polygon' | 'MultiPolygon' | 'GeometryCollection';
48
+ coordinates?: [number, number] | [number, number][] | [number, number][][] | [number, number][][][];
49
+ arcs?: number[][];
50
+ }
51
+ export interface FeatureData {
52
+ type: 'Feature';
53
+ geometry: GeometryData;
54
+ properties?: Record<string, any>;
55
+ }
56
+ export interface FeatureCollectionData {
57
+ type: 'FeatureCollection';
58
+ features: FeatureData[];
59
+ }
60
+ export type ProjectionFunctionCallback<T> = (projection: any, parameters: any) => T;
61
+ export type ProjectionFunctionType<T> = GenericFunctionType<ProjectionFunctionCallback<T>, T>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ });
6
+ //# sourceMappingURL=projection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types/projection.ts"],"names":[],"mappings":"","file":"projection.js","sourcesContent":["import type { GrammarSpec, IGrammarBase } from './grammar';\nimport type { GenericFunctionType } from './signal';\nimport type { Nil } from './base';\n\nexport type GeoJsonFeatureSpec = any; // TODO\nexport type GeoJsonFeatureCollectionSpec = any; // TODO\nexport type FitSpec = GeoJsonFeatureSpec | GeoJsonFeatureCollectionSpec | GeoJsonFeatureSpec[];\nexport type ProjectionType =\n | 'albers'\n | 'albersUsa'\n | 'azimuthalEqualArea'\n | 'azimuthalEquidistant'\n | 'conicConformal'\n | 'conicEqualArea'\n | 'conicEquidistant'\n | 'equalEarth'\n | 'equirectangular'\n | 'gnomonic'\n | 'identity'\n | 'mercator'\n | 'naturalEarth1'\n | 'orthographic'\n | 'stereographic'\n | 'transverseMercator';\n\nexport interface BaseProjectionSpec extends GrammarSpec {\n type: string;\n pointRadius?: ProjectionFunctionType<number>;\n extent?: ProjectionFunctionType<[[number, number], [number, number]]>;\n fit?: ProjectionFunctionType<\n FeatureCollectionData | FeatureCollectionData[] | FeatureData | FeatureData[] | GeometryData | GeometryData[]\n >;\n size?: ProjectionFunctionType<[number, number]>;\n\n // standard properties in d3-geo\n\n clipAngle?: ProjectionFunctionType<number>;\n clipExtent?: ProjectionFunctionType<[number, number]>;\n scale?: ProjectionFunctionType<number>;\n translate?: ProjectionFunctionType<[number, number]>;\n center?: ProjectionFunctionType<[number, number]>;\n rotate?: ProjectionFunctionType<[number, number] | [number, number, number]>;\n parallels?: ProjectionFunctionType<[number, number]>;\n precision?: ProjectionFunctionType<number>;\n reflectX?: ProjectionFunctionType<boolean>;\n reflectY?: ProjectionFunctionType<number>;\n\n // extended properties in d3-geo-projections\n\n coefficient?: ProjectionFunctionType<number>;\n distance?: ProjectionFunctionType<number>;\n fraction?: ProjectionFunctionType<number>;\n lobes?: ProjectionFunctionType<number>;\n parallel?: ProjectionFunctionType<number>;\n radius?: ProjectionFunctionType<number>;\n ratio?: ProjectionFunctionType<number>;\n spacing?: ProjectionFunctionType<number>;\n tilt?: ProjectionFunctionType<number>;\n}\nexport interface ProjectionSpec extends BaseProjectionSpec {\n /*\n * The name of the projection.\n */\n name?: string;\n}\n\nexport interface IProjection extends IGrammarBase {\n grammarType: 'projection';\n parse: (spec: ProjectionSpec) => this;\n pointRadius: (spec: ProjectionSpec['pointRadius']) => this;\n size: (spec: ProjectionSpec['size']) => this;\n fit: (spec: ProjectionSpec['fit']) => this;\n extent: (spec: ProjectionSpec['extent']) => this;\n configure: (spec: Omit<ProjectionSpec, 'fit' | 'extent' | 'size' | 'pointRadius'> | Nil) => this;\n}\n\nexport interface GeometryData {\n type: 'Point' | 'MultiPoint' | 'LineString' | 'MultiLineString' | 'Polygon' | 'MultiPolygon' | 'GeometryCollection';\n coordinates?: [number, number] | [number, number][] | [number, number][][] | [number, number][][][];\n arcs?: number[][];\n}\n\nexport interface FeatureData {\n type: 'Feature';\n geometry: GeometryData;\n properties?: Record<string, any>;\n}\n\nexport interface FeatureCollectionData {\n type: 'FeatureCollection';\n features: FeatureData[];\n}\n\nexport type ProjectionFunctionCallback<T> = (projection: any, parameters: any) => T;\n\nexport type ProjectionFunctionType<T> = GenericFunctionType<ProjectionFunctionCallback<T>, T>;\n"]}
@@ -0,0 +1,19 @@
1
+ import type { IBoundsLike } from '@visactor/vutils';
2
+ import type { IColor, Stage } from '@visactor/vrender';
3
+ import type { IViewEventConfig, IViewOptions } from './view';
4
+ export interface IRenderer {
5
+ initialize: (width: number, height: number, options: IViewOptions, eventConfig: IViewEventConfig) => this;
6
+ render: (immediately?: boolean) => this;
7
+ renderNextFrame: () => this;
8
+ resize: (width: number, height: number) => this;
9
+ shouldResize: (width: number, height: number) => boolean;
10
+ combineIncrementalLayers: () => this;
11
+ setDpr: (resolution: number, redraw: boolean) => this;
12
+ background: (color: IColor) => this;
13
+ setViewBox: (viewBox: IBoundsLike, rerender: boolean) => this;
14
+ stage: () => Stage;
15
+ canvas: () => HTMLCanvasElement;
16
+ context: () => CanvasRenderingContext2D;
17
+ toCanvas: () => HTMLCanvasElement;
18
+ release: () => void;
19
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ });
6
+ //# sourceMappingURL=renderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types/renderer.ts"],"names":[],"mappings":"","file":"renderer.js","sourcesContent":["import type { IBoundsLike } from '@visactor/vutils';\nimport type { IColor, Stage } from '@visactor/vrender';\nimport type { IViewEventConfig, IViewOptions } from './view';\n\nexport interface IRenderer {\n initialize: (width: number, height: number, options: IViewOptions, eventConfig: IViewEventConfig) => this;\n\n render: (immediately?: boolean) => this;\n renderNextFrame: () => this;\n resize: (width: number, height: number) => this;\n shouldResize: (width: number, height: number) => boolean;\n combineIncrementalLayers: () => this;\n\n setDpr: (resolution: number, redraw: boolean) => this;\n background: (color: IColor) => this;\n setViewBox: (viewBox: IBoundsLike, rerender: boolean) => this;\n\n stage: () => Stage;\n canvas: () => HTMLCanvasElement;\n context: () => CanvasRenderingContext2D;\n\n toCanvas: () => HTMLCanvasElement;\n // toImageData: () => Promise<ImageData | undefined>;\n\n release: () => void;\n}\n"]}
@@ -0,0 +1,111 @@
1
+ import type { IBaseScale, ScaleType } from '@visactor/vscale';
2
+ import type { DistributiveOmit } from './base';
3
+ import type { GrammarSpec, IData } from './grammar';
4
+ import type { GenericFunctionType } from './signal';
5
+ import type { IDimensionType } from '@visactor/vgrammar-coordinate';
6
+ export type ScaleFunctionCallback<T> = (scale: IBaseScale, parameters: any) => T;
7
+ export type ScaleFunctionType<T> = GenericFunctionType<ScaleFunctionCallback<T>, T>;
8
+ export type ScaleData = {
9
+ data: string | IData;
10
+ field: string | string[];
11
+ sort?: (datumA: any, datumB: any) => number;
12
+ };
13
+ export type MultiScaleData = {
14
+ datas: {
15
+ data: string | IData;
16
+ field: string | string[];
17
+ }[];
18
+ sort?: (datumA: any, datumB: any) => number;
19
+ };
20
+ export type ScaleCoordinate = {
21
+ coordinate: string;
22
+ dimension: IDimensionType;
23
+ isSubshaft?: boolean;
24
+ reversed?: boolean;
25
+ };
26
+ export type GrammarScaleType = ScaleType | 'utc';
27
+ export interface BaseScaleSpec extends GrammarSpec {
28
+ name?: string;
29
+ type: GrammarScaleType;
30
+ domain?: ScaleData | MultiScaleData | ScaleFunctionType<any[]>;
31
+ unknown?: ScaleFunctionType<any>;
32
+ }
33
+ export interface ScaleTicksSpec {
34
+ nice?: ScaleFunctionType<boolean | number>;
35
+ niceMax?: ScaleFunctionType<boolean | number>;
36
+ niceMin?: ScaleFunctionType<boolean | number>;
37
+ }
38
+ export interface ScaleDomainSpec {
39
+ min?: ScaleFunctionType<number>;
40
+ max?: ScaleFunctionType<number>;
41
+ zero?: ScaleFunctionType<boolean>;
42
+ }
43
+ export interface DiscreteScaleSpec extends BaseScaleSpec {
44
+ range?: ScaleFunctionType<any[]> | ScaleData | MultiScaleData | ScaleCoordinate;
45
+ }
46
+ export interface OrdinalScaleSpec extends DiscreteScaleSpec {
47
+ type: 'ordinal';
48
+ }
49
+ export interface BaseBandScaleSpec extends DiscreteScaleSpec {
50
+ round?: ScaleFunctionType<boolean>;
51
+ padding?: ScaleFunctionType<number>;
52
+ paddingInner?: ScaleFunctionType<number>;
53
+ paddingOuter?: ScaleFunctionType<number>;
54
+ align?: ScaleFunctionType<number>;
55
+ }
56
+ export interface BandScaleSpec extends BaseBandScaleSpec {
57
+ type: 'band';
58
+ }
59
+ export interface PointScaleSpec extends BaseBandScaleSpec {
60
+ type: 'point';
61
+ }
62
+ export interface ContinuousScaleSpec extends BaseScaleSpec, ScaleDomainSpec {
63
+ range?: ScaleFunctionType<number[]> | ScaleData | MultiScaleData | ScaleCoordinate;
64
+ roundRange?: ScaleFunctionType<boolean>;
65
+ config?: {
66
+ clamp?: boolean | ((x: number) => any);
67
+ interpolate?: (t: number) => any;
68
+ };
69
+ }
70
+ export interface LinearScaleSpec extends ContinuousScaleSpec, ScaleTicksSpec {
71
+ type: 'linear';
72
+ }
73
+ export interface PowScaleSpec extends ContinuousScaleSpec, ScaleTicksSpec {
74
+ type: 'pow';
75
+ exponent?: ScaleFunctionType<number>;
76
+ }
77
+ export interface LogScaleSpec extends ContinuousScaleSpec, Pick<ScaleTicksSpec, 'nice'> {
78
+ type: 'log';
79
+ base?: ScaleFunctionType<number>;
80
+ }
81
+ export interface SqrtScaleSpec extends ContinuousScaleSpec, ScaleTicksSpec {
82
+ type: 'sqrt';
83
+ }
84
+ export interface SymlogScaleSpec extends ContinuousScaleSpec, ScaleTicksSpec {
85
+ type: 'symlog';
86
+ constant?: ScaleFunctionType<number>;
87
+ }
88
+ export interface TimeScaleSpec extends ContinuousScaleSpec, Pick<ScaleTicksSpec, 'nice'> {
89
+ type: 'time';
90
+ }
91
+ export interface UtcTimeScaleSpec extends ContinuousScaleSpec, Pick<ScaleTicksSpec, 'nice'> {
92
+ type: 'utc';
93
+ }
94
+ export interface QuantizeScaleSpec extends BaseScaleSpec, ScaleTicksSpec, ScaleDomainSpec {
95
+ type: 'quantize';
96
+ range?: ScaleFunctionType<any[]> | ScaleData | MultiScaleData;
97
+ }
98
+ export interface QuantileScaleSpec extends BaseScaleSpec {
99
+ type: 'quantile';
100
+ range?: ScaleFunctionType<any[]> | ScaleData | MultiScaleData;
101
+ }
102
+ export interface ThresholdScaleSpec extends BaseScaleSpec {
103
+ type: 'threshold';
104
+ range?: ScaleFunctionType<any[]> | ScaleData | MultiScaleData;
105
+ }
106
+ export interface IdentityScaleSpec extends BaseScaleSpec {
107
+ type: 'identity';
108
+ range?: ScaleFunctionType<any[]> | ScaleData | MultiScaleData;
109
+ }
110
+ export type ScaleSpec = OrdinalScaleSpec | BandScaleSpec | PointScaleSpec | LinearScaleSpec | PowScaleSpec | LogScaleSpec | SqrtScaleSpec | SymlogScaleSpec | TimeScaleSpec | UtcTimeScaleSpec | QuantizeScaleSpec | QuantileScaleSpec | ThresholdScaleSpec | IdentityScaleSpec;
111
+ export type ScaleConfigureSpec = DistributiveOmit<ScaleSpec, 'type'>;
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ });
6
+ //# sourceMappingURL=scale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/types/scale.ts"],"names":[],"mappings":"","file":"scale.js","sourcesContent":["import type { IBaseScale, ScaleType } from '@visactor/vscale';\nimport type { DistributiveOmit } from './base';\nimport type { GrammarSpec, IData } from './grammar';\nimport type { GenericFunctionType } from './signal';\nimport type { IDimensionType } from '@visactor/vgrammar-coordinate';\n\nexport type ScaleFunctionCallback<T> = (scale: IBaseScale, parameters: any) => T;\n\nexport type ScaleFunctionType<T> = GenericFunctionType<ScaleFunctionCallback<T>, T>;\n\nexport type ScaleData = { data: string | IData; field: string | string[]; sort?: (datumA: any, datumB: any) => number };\nexport type MultiScaleData = {\n datas: {\n data: string | IData;\n field: string | string[];\n }[];\n sort?: (datumA: any, datumB: any) => number;\n};\n\nexport type ScaleCoordinate = {\n coordinate: string;\n dimension: IDimensionType;\n isSubshaft?: boolean;\n reversed?: boolean;\n};\n\nexport type GrammarScaleType = ScaleType | 'utc';\n\nexport interface BaseScaleSpec extends GrammarSpec {\n name?: string;\n type: GrammarScaleType;\n domain?: ScaleData | MultiScaleData | ScaleFunctionType<any[]>;\n unknown?: ScaleFunctionType<any>;\n}\n\nexport interface ScaleTicksSpec {\n nice?: ScaleFunctionType<boolean | number>;\n niceMax?: ScaleFunctionType<boolean | number>;\n niceMin?: ScaleFunctionType<boolean | number>;\n}\n\nexport interface ScaleDomainSpec {\n min?: ScaleFunctionType<number>;\n max?: ScaleFunctionType<number>;\n zero?: ScaleFunctionType<boolean>;\n}\n/** Discrete Scale */\n\nexport interface DiscreteScaleSpec extends BaseScaleSpec {\n range?: ScaleFunctionType<any[]> | ScaleData | MultiScaleData | ScaleCoordinate;\n}\n\nexport interface OrdinalScaleSpec extends DiscreteScaleSpec {\n type: 'ordinal';\n}\n\nexport interface BaseBandScaleSpec extends DiscreteScaleSpec {\n round?: ScaleFunctionType<boolean>;\n padding?: ScaleFunctionType<number>;\n paddingInner?: ScaleFunctionType<number>;\n paddingOuter?: ScaleFunctionType<number>;\n align?: ScaleFunctionType<number>;\n}\n\nexport interface BandScaleSpec extends BaseBandScaleSpec {\n type: 'band';\n}\n\nexport interface PointScaleSpec extends BaseBandScaleSpec {\n type: 'point';\n}\n\n/** Continuous Scale */\n\nexport interface ContinuousScaleSpec extends BaseScaleSpec, ScaleDomainSpec {\n range?: ScaleFunctionType<number[]> | ScaleData | MultiScaleData | ScaleCoordinate;\n roundRange?: ScaleFunctionType<boolean>;\n config?: {\n clamp?: boolean | ((x: number) => any);\n interpolate?: (t: number) => any;\n };\n}\n\nexport interface LinearScaleSpec extends ContinuousScaleSpec, ScaleTicksSpec {\n type: 'linear';\n}\n\nexport interface PowScaleSpec extends ContinuousScaleSpec, ScaleTicksSpec {\n type: 'pow';\n /**\n * the exponent of the power\n */\n exponent?: ScaleFunctionType<number>;\n}\n\nexport interface LogScaleSpec extends ContinuousScaleSpec, Pick<ScaleTicksSpec, 'nice'> {\n type: 'log';\n /**\n * the base of the log, e.g. 10,the number shoudl be greater than 0\n */\n base?: ScaleFunctionType<number>;\n}\n\nexport interface SqrtScaleSpec extends ContinuousScaleSpec, ScaleTicksSpec {\n type: 'sqrt';\n}\n\nexport interface SymlogScaleSpec extends ContinuousScaleSpec, ScaleTicksSpec {\n type: 'symlog';\n constant?: ScaleFunctionType<number>;\n}\n\nexport interface TimeScaleSpec extends ContinuousScaleSpec, Pick<ScaleTicksSpec, 'nice'> {\n type: 'time';\n}\n\nexport interface UtcTimeScaleSpec extends ContinuousScaleSpec, Pick<ScaleTicksSpec, 'nice'> {\n type: 'utc';\n}\n\nexport interface QuantizeScaleSpec extends BaseScaleSpec, ScaleTicksSpec, ScaleDomainSpec {\n type: 'quantize';\n range?: ScaleFunctionType<any[]> | ScaleData | MultiScaleData;\n}\n\n/**\n * quantile scale adopts a different method to evaluate the thresholds,\n * by slicing the domain into intervals of (roughly) equal absolute frequency (i.e. number of individuals)\n */\nexport interface QuantileScaleSpec extends BaseScaleSpec {\n type: 'quantile';\n range?: ScaleFunctionType<any[]> | ScaleData | MultiScaleData;\n}\n\n/**\n * the threshold scale\n */\nexport interface ThresholdScaleSpec extends BaseScaleSpec {\n type: 'threshold';\n range?: ScaleFunctionType<any[]> | ScaleData | MultiScaleData;\n}\n\n/**\n * the threshold scale\n */\nexport interface IdentityScaleSpec extends BaseScaleSpec {\n type: 'identity';\n range?: ScaleFunctionType<any[]> | ScaleData | MultiScaleData;\n}\n\nexport type ScaleSpec =\n | OrdinalScaleSpec\n | BandScaleSpec\n | PointScaleSpec\n | LinearScaleSpec\n | PowScaleSpec\n | LogScaleSpec\n | SqrtScaleSpec\n | SymlogScaleSpec\n | TimeScaleSpec\n | UtcTimeScaleSpec\n | QuantizeScaleSpec\n | QuantileScaleSpec\n | ThresholdScaleSpec\n | IdentityScaleSpec;\n\nexport type ScaleConfigureSpec = DistributiveOmit<ScaleSpec, 'type'>;\n"]}
@@ -0,0 +1,20 @@
1
+ import type { GrammarSpec, IScale, ISignal } from './grammar';
2
+ export type FunctionCallback<T> = (...args: any[]) => T;
3
+ export type SignalDependency = string | ISignal<any> | IScale;
4
+ export interface SignalFunction<Callback extends FunctionCallback<T>, T> {
5
+ callback: Callback;
6
+ dependency?: SignalDependency | SignalDependency[];
7
+ }
8
+ export interface SignalReference<T = any> {
9
+ signal: string | ISignal<T>;
10
+ }
11
+ export type GenericFunctionType<Callback extends FunctionCallback<T>, T> = T | Callback | SignalReference<T> | SignalFunction<Callback, T>;
12
+ export type ParameterCallback<T> = (parameters: any) => T;
13
+ export type ParameterFunctionType<T> = GenericFunctionType<ParameterCallback<T>, T>;
14
+ export type SignalFunctionCallback<T> = (signal: T, parameters: any) => T;
15
+ export type SignalFunctionType<T> = GenericFunctionType<SignalFunctionCallback<T>, T>;
16
+ export interface SignalSpec<T> extends GrammarSpec {
17
+ name?: string;
18
+ value?: T;
19
+ update?: SignalFunctionType<T>;
20
+ }