vccs 0.6.0 → 1.0.0-beta.2

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 (728) hide show
  1. package/LICENSE +25 -0
  2. package/README.md +133 -112
  3. package/dist/animation/ActiveDot.d.ts +14 -0
  4. package/dist/animation/MovingLabels.d.ts +57 -0
  5. package/dist/animation/SweepClip.d.ts +56 -0
  6. package/dist/animation/gridTransition.d.ts +38 -0
  7. package/dist/animation/motion.d.ts +78 -0
  8. package/dist/animation/ridingLabels.d.ts +29 -0
  9. package/dist/animation/useAnimationCallbacks.d.ts +5 -0
  10. package/dist/animation/useKeyedTransition.d.ts +86 -0
  11. package/dist/animation/usePointTransition.d.ts +40 -0
  12. package/dist/animation/useReducedMotion.d.ts +2 -0
  13. package/dist/animation/useTickMotion.d.ts +22 -0
  14. package/dist/cartesian/ActivePoints.d.ts +71 -0
  15. package/dist/cartesian/GraphicalItemClipPath.d.ts +27 -2
  16. package/dist/cartesian/area/Area.d.ts +229 -14
  17. package/dist/cartesian/area/RenderArea.d.ts +1 -16
  18. package/dist/cartesian/area/hooks/useArea.d.ts +13 -18
  19. package/dist/cartesian/area/type.d.ts +32 -81
  20. package/dist/cartesian/axis/AxisProps.d.ts +101 -0
  21. package/dist/cartesian/axis/XAxis.d.ts +144 -83
  22. package/dist/cartesian/axis/YAxis.d.ts +152 -94
  23. package/dist/cartesian/bar/Bar.d.ts +229 -2
  24. package/dist/cartesian/bar/components/BarBackground.d.ts +1 -1
  25. package/dist/cartesian/bar/hooks/useBar.d.ts +31 -15
  26. package/dist/cartesian/bar/type.d.ts +46 -77
  27. package/dist/cartesian/brush/Brush.d.ts +150 -2
  28. package/dist/cartesian/brush/components/BrushText.d.ts +7 -7
  29. package/dist/cartesian/brush/components/Panorama.d.ts +7 -5
  30. package/dist/cartesian/brush/components/Slide.d.ts +4 -4
  31. package/dist/cartesian/brush/components/TravellerLayer.d.ts +21 -13
  32. package/dist/cartesian/brush/hooks/useBrushHandlers.d.ts +3 -4
  33. package/dist/cartesian/brush/hooks/useBrushState.d.ts +16 -16
  34. package/dist/cartesian/brush/type.d.ts +14 -33
  35. package/dist/cartesian/brush/utils.d.ts +5 -6
  36. package/dist/cartesian/cartesian-axis/CartesianAxis.d.ts +37 -63
  37. package/dist/cartesian/cartesian-grid/Background.d.ts +1 -1
  38. package/dist/cartesian/cartesian-grid/CartesianGrid.d.ts +68 -16
  39. package/dist/cartesian/cartesian-grid/HorizontalGridLines.d.ts +18 -11
  40. package/dist/cartesian/cartesian-grid/HorizontalStripes.d.ts +6 -5
  41. package/dist/cartesian/cartesian-grid/VerticalGridLines.d.ts +17 -10
  42. package/dist/cartesian/cartesian-grid/VerticalStripes.d.ts +6 -5
  43. package/dist/cartesian/cartesian-grid/const.d.ts +2 -6
  44. package/dist/cartesian/cartesian-grid/type.d.ts +21 -30
  45. package/dist/cartesian/cartesian-grid/utils.d.ts +3 -1
  46. package/dist/cartesian/cartesianPositionToCSSTranslate.d.ts +1 -1
  47. package/dist/cartesian/error-bar/ErrorBar.d.ts +11 -30
  48. package/dist/cartesian/error-bar/ErrorBarContext.d.ts +12 -15
  49. package/dist/cartesian/funnel/Funnel.d.ts +161 -2
  50. package/dist/cartesian/funnel/type.d.ts +20 -57
  51. package/dist/cartesian/getCartesianPosition.d.ts +1 -3
  52. package/dist/cartesian/line/Line.d.ts +177 -77
  53. package/dist/cartesian/line/StaticLine.d.ts +0 -15
  54. package/dist/cartesian/line/hooks/useLine.d.ts +14 -15
  55. package/dist/cartesian/line/type.d.ts +52 -104
  56. package/dist/cartesian/reference-area/ReferenceArea.d.ts +42 -90
  57. package/dist/cartesian/reference-dot/ReferenceDot.d.ts +21 -63
  58. package/dist/cartesian/reference-line/ReferenceLine.d.ts +35 -67
  59. package/dist/cartesian/scatter/Scatter.d.ts +72 -53
  60. package/dist/cartesian/scatter/hooks/useScatter.d.ts +6 -5
  61. package/dist/cartesian/scatter/type.d.ts +89 -0
  62. package/dist/cartesian/useNeedsClip.d.ts +3 -2
  63. package/dist/cartesian/utils/get-ticks.d.ts +5 -6
  64. package/dist/cartesian/z-axis/ZAxis.d.ts +20 -21
  65. package/dist/chart/AreaChart.d.ts +231 -1
  66. package/dist/chart/BarChart.d.ts +231 -1
  67. package/dist/chart/BarList.d.ts +172 -0
  68. package/dist/chart/CalendarHeatmap.d.ts +308 -0
  69. package/dist/chart/CellGridLayer.d.ts +136 -0
  70. package/dist/chart/ChartShell.d.ts +85 -0
  71. package/dist/chart/ChartWrapper.d.ts +167 -0
  72. package/dist/chart/ChartsWrapper.d.ts +75 -87
  73. package/dist/chart/CohortChart.d.ts +254 -0
  74. package/dist/chart/ComposedChart.d.ts +231 -1
  75. package/dist/chart/FunnelChart.d.ts +201 -1
  76. package/dist/chart/Heatmap.d.ts +687 -0
  77. package/dist/chart/JourneySankey.d.ts +261 -0
  78. package/dist/chart/LineChart.d.ts +231 -1
  79. package/dist/chart/PieChart.d.ts +243 -1
  80. package/dist/chart/RadarChart.d.ts +243 -1
  81. package/dist/chart/RadialBarChart.d.ts +273 -1
  82. package/dist/chart/Sankey.d.ts +85 -157
  83. package/dist/chart/ScatterChart.d.ts +231 -1
  84. package/dist/chart/Sparkline.d.ts +257 -0
  85. package/dist/chart/SunburstChart.d.ts +101 -132
  86. package/dist/chart/Tracker.d.ts +211 -0
  87. package/dist/chart/Treemap.d.ts +101 -147
  88. package/dist/chart/cellGridProps.d.ts +40 -0
  89. package/dist/chart/cellGridUtils.d.ts +53 -0
  90. package/dist/chart/chartProps.d.ts +402 -0
  91. package/dist/chart/chartRoot.d.ts +144 -0
  92. package/dist/chart/const.d.ts +0 -2
  93. package/dist/chart/directChartTypes.d.ts +13 -0
  94. package/dist/chart/journeyTypes.d.ts +99 -0
  95. package/dist/chart/journeyUtils.d.ts +102 -0
  96. package/dist/chart/sankeyUtils.d.ts +2 -2
  97. package/dist/chart/shell.d.ts +14 -0
  98. package/dist/chart/sunburstUtils.d.ts +7 -3
  99. package/dist/chart/treemapUtils.d.ts +8 -6
  100. package/dist/componentNames.d.ts +2 -0
  101. package/dist/components/Cell.d.ts +1 -1
  102. package/dist/components/Customized.d.ts +12 -7
  103. package/dist/components/Text.d.ts +31 -31
  104. package/dist/components/label/Label.d.ts +14 -26
  105. package/dist/components/label/LabelList.d.ts +24 -14
  106. package/dist/components/label/LabelListView.d.ts +23 -0
  107. package/dist/components/label/LabelView.d.ts +79 -0
  108. package/dist/components/label/types.d.ts +70 -15
  109. package/dist/components/label/utils.d.ts +24 -12
  110. package/dist/components/legend/Legend.d.ts +109 -4
  111. package/dist/components/legend/LegendSymbol.d.ts +2 -3
  112. package/dist/components/legend/hooks/useLegend.d.ts +8 -10
  113. package/dist/components/legend/hooks/useLegendContent.d.ts +7 -14
  114. package/dist/components/legend/type.d.ts +17 -25
  115. package/dist/components/legend/utils.d.ts +4 -4
  116. package/dist/components/tooltip/Cursor.d.ts +19 -0
  117. package/dist/components/tooltip/DefaultTooltipContent.d.ts +35 -0
  118. package/dist/components/{Tooltip.d.ts → tooltip/Tooltip.d.ts} +72 -100
  119. package/dist/components/tooltip/TooltipBoundingBox.d.ts +40 -0
  120. package/dist/components/tooltip/types.d.ts +59 -0
  121. package/dist/components/types.d.ts +6 -6
  122. package/dist/components/utils.d.ts +3 -3
  123. package/dist/container/ClipPath.d.ts +1 -1
  124. package/dist/container/Layer.d.ts +1 -1
  125. package/dist/container/ResponsiveContainer.d.ts +10 -13
  126. package/dist/container/Surface.d.ts +9 -1
  127. package/dist/container/useSizeContext.d.ts +4 -10
  128. package/dist/context/cartesianLabelListContext.d.ts +6 -2
  129. package/dist/context/polarLabelViewBoxContext.d.ts +1 -1
  130. package/dist/core/area.d.ts +32 -0
  131. package/dist/core/axis/data.d.ts +28 -0
  132. package/dist/core/axis/domain.d.ts +11 -0
  133. package/dist/core/axis/key.d.ts +7 -0
  134. package/dist/core/axis/polar.d.ts +11 -0
  135. package/dist/core/axis/polarSettings.d.ts +5 -0
  136. package/dist/core/axis/position.d.ts +76 -0
  137. package/dist/core/axis/range.d.ts +8 -0
  138. package/dist/core/axis/references.d.ts +6 -0
  139. package/dist/core/axis/scale.d.ts +21 -0
  140. package/dist/core/axis/settings.d.ts +4 -0
  141. package/dist/core/axis/stacks.d.ts +14 -0
  142. package/dist/core/axis/ticks.d.ts +19 -0
  143. package/dist/core/axis/userDomain.d.ts +48 -0
  144. package/dist/core/bar.d.ts +22 -0
  145. package/dist/core/barSizing.d.ts +43 -0
  146. package/dist/core/color.d.ts +21 -0
  147. package/dist/core/coordinates.d.ts +34 -0
  148. package/dist/core/data.d.ts +2 -0
  149. package/dist/core/errorBar.d.ts +15 -0
  150. package/dist/core/funnel.d.ts +17 -0
  151. package/dist/core/interaction.d.ts +18 -0
  152. package/dist/core/layout.d.ts +43 -0
  153. package/dist/core/line.d.ts +14 -0
  154. package/dist/{state/selectors/pieSelectors.d.ts → core/pie.d.ts} +14 -16
  155. package/dist/core/polygon.d.ts +5 -0
  156. package/dist/core/radar.d.ts +20 -0
  157. package/dist/core/radialBar.d.ts +36 -0
  158. package/dist/core/rectangle.d.ts +10 -0
  159. package/dist/core/scatter.d.ts +18 -0
  160. package/dist/core/tooltip.d.ts +16 -0
  161. package/dist/es/animation/ActiveDot.mjs +39 -0
  162. package/dist/es/animation/MovingLabels.mjs +61 -0
  163. package/dist/es/animation/SweepClip.mjs +40 -0
  164. package/dist/es/animation/gridTransition.mjs +112 -0
  165. package/dist/es/animation/motion.mjs +100 -0
  166. package/dist/es/animation/ridingLabels.mjs +70 -0
  167. package/dist/es/animation/useAnimationCallbacks.mjs +23 -0
  168. package/dist/es/animation/useKeyedTransition.mjs +355 -0
  169. package/dist/es/animation/usePointTransition.mjs +119 -0
  170. package/dist/es/animation/useReducedMotion.mjs +12 -0
  171. package/dist/es/animation/useTickMotion.mjs +62 -0
  172. package/dist/es/cartesian/ActivePoints.mjs +65 -0
  173. package/dist/es/cartesian/GraphicalItemClipPath.mjs +50 -9
  174. package/dist/es/cartesian/area/Area.mjs +72 -35
  175. package/dist/es/cartesian/area/RenderArea.mjs +112 -105
  176. package/dist/es/cartesian/area/hooks/useArea.mjs +44 -42
  177. package/dist/es/cartesian/area/type.mjs +14 -46
  178. package/dist/es/cartesian/axis/AxisProps.mjs +94 -0
  179. package/dist/es/cartesian/axis/XAxis.mjs +37 -159
  180. package/dist/es/cartesian/axis/YAxis.mjs +63 -167
  181. package/dist/es/cartesian/bar/Bar.mjs +122 -53
  182. package/dist/es/cartesian/bar/components/BarBackground.mjs +1 -1
  183. package/dist/es/cartesian/bar/components/BarRectangles.mjs +188 -126
  184. package/dist/es/cartesian/bar/hooks/useBar.mjs +67 -31
  185. package/dist/es/cartesian/bar/type.mjs +4 -22
  186. package/dist/es/cartesian/brush/Brush.mjs +294 -0
  187. package/dist/es/cartesian/brush/components/Background.mjs +25 -0
  188. package/dist/es/cartesian/brush/components/BrushText.mjs +55 -0
  189. package/dist/es/cartesian/brush/components/Panorama.mjs +54 -0
  190. package/dist/es/cartesian/brush/components/Slide.mjs +40 -0
  191. package/dist/es/cartesian/brush/components/Traveller.mjs +46 -0
  192. package/dist/es/cartesian/brush/components/TravellerLayer.mjs +68 -0
  193. package/dist/es/cartesian/brush/hooks/useBrushHandlers.mjs +158 -0
  194. package/dist/es/cartesian/brush/hooks/useBrushState.mjs +67 -0
  195. package/dist/es/cartesian/brush/type.mjs +54 -0
  196. package/dist/es/cartesian/brush/utils.mjs +30 -0
  197. package/dist/es/cartesian/cartesian-axis/CartesianAxis.mjs +27 -20
  198. package/dist/es/cartesian/cartesian-grid/CartesianGrid.mjs +157 -72
  199. package/dist/es/cartesian/cartesian-grid/HorizontalGridLines.mjs +5 -1
  200. package/dist/es/cartesian/cartesian-grid/VerticalGridLines.mjs +5 -1
  201. package/dist/es/cartesian/cartesian-grid/const.mjs +3 -320
  202. package/dist/es/cartesian/cartesian-grid/utils.mjs +1 -1
  203. package/dist/es/cartesian/error-bar/ErrorBar.mjs +65 -102
  204. package/dist/es/cartesian/error-bar/ErrorBarContext.mjs +21 -5
  205. package/dist/es/cartesian/funnel/Funnel.mjs +247 -127
  206. package/dist/es/cartesian/funnel/type.mjs +8 -14
  207. package/dist/es/cartesian/line/Line.mjs +72 -25
  208. package/dist/es/cartesian/line/StaticLine.mjs +129 -166
  209. package/dist/es/cartesian/line/hooks/useLine.mjs +38 -35
  210. package/dist/es/cartesian/line/type.mjs +5 -43
  211. package/dist/es/cartesian/reference-area/ReferenceArea.mjs +108 -88
  212. package/dist/es/cartesian/reference-dot/ReferenceDot.mjs +87 -67
  213. package/dist/es/cartesian/reference-line/ReferenceLine.mjs +99 -74
  214. package/dist/es/cartesian/scatter/Scatter.mjs +188 -190
  215. package/dist/es/cartesian/scatter/hooks/useScatter.mjs +25 -6
  216. package/dist/es/cartesian/scatter/type.mjs +79 -0
  217. package/dist/es/cartesian/useNeedsClip.mjs +6 -14
  218. package/dist/es/cartesian/utils/get-ticks.mjs +6 -6
  219. package/dist/es/cartesian/z-axis/ZAxis.mjs +7 -11
  220. package/dist/es/chart/AreaChart.mjs +12 -4
  221. package/dist/es/chart/BarChart.mjs +12 -4
  222. package/dist/es/chart/BarList.mjs +265 -0
  223. package/dist/es/chart/CalendarHeatmap.mjs +299 -0
  224. package/dist/es/chart/CellGridLayer.mjs +380 -0
  225. package/dist/es/chart/ChartShell.mjs +139 -0
  226. package/dist/es/chart/ChartWrapper.mjs +215 -0
  227. package/dist/es/chart/ChartsWrapper.mjs +21 -176
  228. package/dist/es/chart/CohortChart.mjs +169 -0
  229. package/dist/es/chart/ComposedChart.mjs +14 -4
  230. package/dist/es/chart/FunnelChart.mjs +11 -5
  231. package/dist/es/chart/Heatmap.mjs +319 -0
  232. package/dist/es/chart/JourneySankey.mjs +682 -0
  233. package/dist/es/chart/LineChart.mjs +13 -4
  234. package/dist/es/chart/PieChart.mjs +13 -9
  235. package/dist/es/chart/RadarChart.mjs +13 -9
  236. package/dist/es/chart/RadialBarChart.mjs +18 -10
  237. package/dist/es/chart/Sankey.mjs +355 -244
  238. package/dist/es/chart/ScatterChart.mjs +12 -4
  239. package/dist/es/chart/Sparkline.mjs +458 -0
  240. package/dist/es/chart/SunburstChart.mjs +215 -158
  241. package/dist/es/chart/Tracker.mjs +175 -0
  242. package/dist/es/chart/Treemap.mjs +357 -300
  243. package/dist/es/chart/cellGridProps.mjs +42 -0
  244. package/dist/es/chart/cellGridUtils.mjs +80 -0
  245. package/dist/es/chart/chartProps.mjs +88 -0
  246. package/dist/es/chart/chartRoot.mjs +153 -0
  247. package/dist/es/chart/journeyTypes.mjs +90 -0
  248. package/dist/es/chart/journeyUtils.mjs +223 -0
  249. package/dist/es/chart/sankeyUtils.mjs +52 -1
  250. package/dist/es/chart/shell.mjs +30 -0
  251. package/dist/es/chart/sunburstUtils.mjs +14 -9
  252. package/dist/es/chart/treemapUtils.mjs +10 -8
  253. package/dist/es/componentNames.mjs +84 -0
  254. package/dist/es/components/Cell.mjs +3 -2
  255. package/dist/es/components/Customized.mjs +14 -9
  256. package/dist/es/components/Text.vue_vue_type_script_setup_true_lang.mjs +16 -10
  257. package/dist/es/components/label/Label.mjs +12 -30
  258. package/dist/es/components/label/LabelList.mjs +13 -48
  259. package/dist/es/components/label/LabelListView.mjs +73 -0
  260. package/dist/es/components/label/LabelView.mjs +45 -0
  261. package/dist/es/components/label/types.mjs +10 -5
  262. package/dist/es/components/label/utils.mjs +39 -19
  263. package/dist/es/components/legend/Legend.mjs +101 -36
  264. package/dist/es/components/legend/LegendSymbol.mjs +2 -2
  265. package/dist/es/components/legend/hooks/useLegend.mjs +39 -60
  266. package/dist/es/components/legend/hooks/useLegendContent.mjs +1 -13
  267. package/dist/es/components/legend/type.mjs +11 -9
  268. package/dist/es/components/legend/utils.mjs +8 -4
  269. package/dist/es/components/tooltip/Cursor.mjs +118 -0
  270. package/dist/es/components/tooltip/DefaultTooltipContent.mjs +107 -0
  271. package/dist/es/components/tooltip/Tooltip.mjs +229 -0
  272. package/dist/es/components/tooltip/TooltipBoundingBox.mjs +187 -0
  273. package/dist/es/components/utils.mjs +26 -27
  274. package/dist/es/container/ClipPath.mjs +2 -2
  275. package/dist/es/container/Layer.mjs +2 -2
  276. package/dist/es/container/ResponsiveContainer.vue_vue_type_script_setup_true_lang.mjs +20 -106
  277. package/dist/es/container/Surface.mjs +46 -7
  278. package/dist/es/container/useSizeContext.mjs +12 -3
  279. package/dist/es/context/cartesianLabelListContext.mjs +11 -2
  280. package/dist/es/{cartesian/area/utils.mjs → core/area.mjs} +5 -4
  281. package/dist/es/core/axis/data.mjs +75 -0
  282. package/dist/es/core/axis/domain.mjs +63 -0
  283. package/dist/es/core/axis/key.mjs +13 -0
  284. package/dist/es/core/axis/polar.mjs +16 -0
  285. package/dist/es/core/axis/polarSettings.mjs +100 -0
  286. package/dist/es/core/axis/position.mjs +51 -0
  287. package/dist/es/core/axis/range.mjs +46 -0
  288. package/dist/es/core/axis/references.mjs +26 -0
  289. package/dist/es/core/axis/scale.mjs +148 -0
  290. package/dist/es/core/axis/settings.mjs +76 -0
  291. package/dist/es/core/axis/stacks.mjs +97 -0
  292. package/dist/es/core/axis/ticks.mjs +82 -0
  293. package/dist/es/{utils/isDomainSpecifiedByUser.mjs → core/axis/userDomain.mjs} +5 -4
  294. package/dist/es/{cartesian/bar/utils.mjs → core/bar.mjs} +19 -16
  295. package/dist/es/core/barSizing.mjs +108 -0
  296. package/dist/es/core/color.mjs +23 -0
  297. package/dist/es/core/coordinates.mjs +57 -0
  298. package/dist/es/core/data.mjs +20 -0
  299. package/dist/es/core/errorBar.mjs +56 -0
  300. package/dist/es/{cartesian/funnel/utils.mjs → core/funnel.mjs} +31 -11
  301. package/dist/es/core/interaction.mjs +152 -0
  302. package/dist/es/core/layout.mjs +91 -0
  303. package/dist/es/{cartesian/line/utils.mjs → core/line.mjs} +7 -6
  304. package/dist/es/{state/selectors/pieSelectors.mjs → core/pie.mjs} +37 -65
  305. package/dist/es/core/polygon.mjs +7 -0
  306. package/dist/es/core/radar.mjs +58 -0
  307. package/dist/es/core/radialBar.mjs +92 -0
  308. package/dist/es/core/rectangle.mjs +25 -0
  309. package/dist/es/core/scatter.mjs +86 -0
  310. package/dist/es/core/tooltip.mjs +96 -0
  311. package/dist/es/events/componentEvents.mjs +58 -0
  312. package/dist/es/events/delegateItemEvents.mjs +24 -0
  313. package/dist/es/events/itemEvents.mjs +34 -0
  314. package/dist/es/events/sync.mjs +140 -0
  315. package/dist/es/events/useChartCallbacks.mjs +24 -0
  316. package/dist/es/events/useChartInteractions.mjs +143 -0
  317. package/dist/es/events/useItemInteractions.mjs +58 -0
  318. package/dist/es/events/useItemKeyboard.mjs +45 -0
  319. package/dist/es/events/usePointEvents.mjs +55 -0
  320. package/dist/es/hooks/deferredView.mjs +19 -0
  321. package/dist/es/hooks/publicHooks.mjs +36 -35
  322. package/dist/es/hooks/useActiveTooltipDataPoints.mjs +10 -0
  323. package/dist/es/hooks/useChartId.mjs +8 -0
  324. package/dist/es/hooks/useLayerTeleport.mjs +10 -0
  325. package/dist/es/hooks/useResponsiveSize.mjs +72 -15
  326. package/dist/es/hooks/useRoundedSize.mjs +0 -3
  327. package/dist/es/hooks/useSeriesProps.mjs +32 -0
  328. package/dist/es/hooks/useSetupGraphicalItem.mjs +74 -44
  329. package/dist/es/hooks/useTrackedData.mjs +17 -0
  330. package/dist/es/index.mjs +37 -23
  331. package/dist/es/model/animation.mjs +11 -0
  332. package/dist/es/model/axis.mjs +85 -0
  333. package/dist/es/model/axisLayout.mjs +27 -0
  334. package/dist/es/model/axisScale.mjs +52 -0
  335. package/dist/es/model/brush.mjs +27 -0
  336. package/dist/es/model/chart.mjs +122 -0
  337. package/dist/es/model/dataRange.mjs +54 -0
  338. package/dist/es/model/defaults.mjs +28 -0
  339. package/dist/es/model/layout.mjs +33 -0
  340. package/dist/es/model/legend.mjs +30 -0
  341. package/dist/es/model/options.mjs +8 -0
  342. package/dist/es/model/polar.mjs +29 -0
  343. package/dist/es/model/polarAxis.mjs +48 -0
  344. package/dist/es/model/presentation.mjs +13 -0
  345. package/dist/es/model/registries.mjs +38 -0
  346. package/dist/es/model/registry.mjs +20 -0
  347. package/dist/es/model/runtime.mjs +156 -0
  348. package/dist/es/model/tooltip.mjs +383 -0
  349. package/dist/es/nuxt.mjs +28 -0
  350. package/dist/es/polar/pie/Pie.mjs +260 -112
  351. package/dist/es/polar/pie/type.mjs +19 -8
  352. package/dist/es/polar/radar/PolarAngleAxis.mjs +117 -99
  353. package/dist/es/polar/radar/PolarGrid.mjs +73 -50
  354. package/dist/es/polar/radar/PolarRadiusAxis.mjs +124 -100
  355. package/dist/es/polar/radar/Radar.mjs +272 -219
  356. package/dist/es/polar/radial-bar/RadialBar.mjs +248 -130
  357. package/dist/es/polar/radial-bar/type.mjs +6 -7
  358. package/dist/es/resolver.mjs +19 -0
  359. package/dist/es/shape/Cross.mjs +2 -1
  360. package/dist/es/shape/Curve.mjs +7 -5
  361. package/dist/es/shape/Dot.mjs +9 -5
  362. package/dist/es/shape/Polygon.mjs +4 -7
  363. package/dist/es/shape/Rectangle.mjs +17 -10
  364. package/dist/es/shape/Sector.mjs +7 -4
  365. package/dist/es/shape/Symbols.mjs +13 -8
  366. package/dist/es/shape/Trapezoid.mjs +3 -1
  367. package/dist/es/typed.mjs +9 -0
  368. package/dist/es/types/base.mjs +6 -0
  369. package/dist/es/utils/ReduceCSSCalc.mjs +2 -2
  370. package/dist/es/utils/VueUtils.mjs +89 -3
  371. package/dist/es/utils/attributes.mjs +18 -0
  372. package/dist/es/utils/attrs.mjs +38 -26
  373. package/dist/es/utils/cartesian.mjs +1 -21
  374. package/dist/es/utils/cell.mjs +13 -1
  375. package/dist/es/utils/chart.mjs +3 -361
  376. package/dist/es/utils/const.mjs +2 -25
  377. package/dist/es/utils/createCategoricalInverse.mjs +2 -2
  378. package/dist/es/utils/data-utils.mjs +2 -6
  379. package/dist/es/utils/data.mjs +1 -1
  380. package/dist/es/utils/env.mjs +10 -0
  381. package/dist/es/utils/events.mjs +29 -2
  382. package/dist/es/utils/labelColor.mjs +16 -0
  383. package/dist/es/utils/log.mjs +23 -5
  384. package/dist/es/utils/pointer.mjs +13 -0
  385. package/dist/es/utils/polar.mjs +7 -2
  386. package/dist/es/utils/scale/getNiceTickValues.mjs +8 -8
  387. package/dist/es/utils/scale/utils/arithmetic.mjs +0 -15
  388. package/dist/es/utils/scale/utils/utils.mjs +9 -44
  389. package/dist/es/utils/style.mjs +1 -1
  390. package/dist/es/utils/svg.mjs +320 -0
  391. package/dist/es/utils/theme.mjs +50 -0
  392. package/dist/es/utils/tick.mjs +4 -3
  393. package/dist/es/utils/validate.mjs +21 -3
  394. package/dist/events/componentEvents.d.ts +60 -0
  395. package/dist/events/delegateItemEvents.d.ts +12 -0
  396. package/dist/events/itemEvents.d.ts +100 -0
  397. package/dist/events/sync.d.ts +6 -0
  398. package/dist/events/useChartCallbacks.d.ts +2 -0
  399. package/dist/events/useChartInteractions.d.ts +8 -0
  400. package/dist/events/useItemInteractions.d.ts +7 -0
  401. package/dist/events/useItemKeyboard.d.ts +24 -0
  402. package/dist/events/usePointEvents.d.ts +23 -0
  403. package/dist/hooks/deferredView.d.ts +12 -0
  404. package/dist/hooks/publicHooks.d.ts +27 -29
  405. package/dist/hooks/useActiveTooltipDataPoints.d.ts +2 -0
  406. package/dist/hooks/useChartId.d.ts +2 -0
  407. package/dist/hooks/useLayerTeleport.d.ts +5 -0
  408. package/dist/hooks/useResponsiveSize.d.ts +33 -18
  409. package/dist/hooks/useRoundedSize.d.ts +0 -3
  410. package/dist/hooks/useSeriesProps.d.ts +7 -0
  411. package/dist/hooks/useSetupGraphicalItem.d.ts +35 -4
  412. package/dist/hooks/useTrackedData.d.ts +3 -0
  413. package/dist/index.d.ts +130 -9
  414. package/dist/model/animation.d.ts +7 -0
  415. package/dist/model/axis.d.ts +29 -0
  416. package/dist/model/axisLayout.d.ts +85 -0
  417. package/dist/model/axisScale.d.ts +41 -0
  418. package/dist/model/brush.d.ts +17 -0
  419. package/dist/model/chart.d.ts +44 -0
  420. package/dist/model/dataRange.d.ts +19 -0
  421. package/dist/model/defaults.d.ts +7 -0
  422. package/dist/model/layout.d.ts +38 -0
  423. package/dist/model/legend.d.ts +28 -0
  424. package/dist/model/options.d.ts +30 -0
  425. package/dist/model/polar.d.ts +24 -0
  426. package/dist/model/polarAxis.d.ts +39 -0
  427. package/dist/model/presentation.d.ts +19 -0
  428. package/dist/model/registries.d.ts +27 -0
  429. package/dist/model/registry.d.ts +7 -0
  430. package/dist/model/runtime.d.ts +76 -0
  431. package/dist/model/tooltip.d.ts +437 -0
  432. package/dist/nuxt.d.ts +7 -0
  433. package/dist/polar/pie/Pie.d.ts +252 -2
  434. package/dist/polar/pie/type.d.ts +37 -25
  435. package/dist/polar/radar/PolarAngleAxis.d.ts +36 -39
  436. package/dist/polar/radar/PolarGrid.d.ts +10 -8
  437. package/dist/polar/radar/PolarRadiusAxis.d.ts +30 -28
  438. package/dist/polar/radar/Radar.d.ts +82 -53
  439. package/dist/polar/radial-bar/RadialBar.d.ts +251 -2
  440. package/dist/polar/radial-bar/type.d.ts +26 -26
  441. package/dist/publicProps.d.ts +96 -0
  442. package/dist/resolver.d.ts +9 -0
  443. package/dist/shape/Cross.d.ts +2 -1
  444. package/dist/shape/Curve.d.ts +8 -19
  445. package/dist/shape/Dot.d.ts +10 -6
  446. package/dist/shape/Polygon.d.ts +2 -1
  447. package/dist/shape/Rectangle.d.ts +9 -8
  448. package/dist/shape/Sector.d.ts +7 -6
  449. package/dist/shape/Symbols.d.ts +3 -3
  450. package/dist/shape/Trapezoid.d.ts +5 -5
  451. package/dist/typed.d.ts +92 -0
  452. package/dist/types/area.d.ts +5 -6
  453. package/dist/types/axis.d.ts +9 -36
  454. package/dist/types/axisSettings.d.ts +20 -0
  455. package/dist/types/bar.d.ts +17 -7
  456. package/dist/types/base.d.ts +46 -0
  457. package/dist/types/categorical.d.ts +5 -7
  458. package/dist/types/chartData.d.ts +21 -0
  459. package/dist/types/chartLayout.d.ts +7 -0
  460. package/dist/{state/rootPropsSlice.d.ts → types/chartOptions.d.ts} +4 -5
  461. package/dist/types/common.d.ts +16 -55
  462. package/dist/types/event.d.ts +2 -15
  463. package/dist/types/funnel.d.ts +23 -0
  464. package/dist/types/graphical.d.ts +77 -0
  465. package/dist/types/index.d.ts +4 -4
  466. package/dist/types/legend.d.ts +17 -0
  467. package/dist/types/line.d.ts +6 -0
  468. package/dist/types/polarOptions.d.ts +8 -0
  469. package/dist/types/radar.d.ts +4 -4
  470. package/dist/types/radialBar.d.ts +15 -0
  471. package/dist/types/reference.d.ts +22 -0
  472. package/dist/types/scale.d.ts +13 -2
  473. package/dist/{shape/types.d.ts → types/shape.d.ts} +6 -4
  474. package/dist/types/tick.d.ts +18 -7
  475. package/dist/types/tooltip.d.ts +181 -14
  476. package/dist/types/typed.d.ts +16 -0
  477. package/dist/{cartesian/type.d.ts → types/viewBox.d.ts} +0 -2
  478. package/dist/utils/ReduceCSSCalc.d.ts +0 -1
  479. package/dist/utils/VueUtils.d.ts +6 -9
  480. package/dist/utils/attributes.d.ts +56 -0
  481. package/dist/utils/attrs.d.ts +4 -45
  482. package/dist/utils/cartesian.d.ts +2 -16
  483. package/dist/utils/cell.d.ts +7 -2
  484. package/dist/utils/chart.d.ts +2 -99
  485. package/dist/utils/const.d.ts +1 -24
  486. package/dist/utils/createCategoricalInverse.d.ts +2 -6
  487. package/dist/utils/data-utils.d.ts +0 -1
  488. package/dist/utils/data.d.ts +1 -2
  489. package/dist/utils/env.d.ts +5 -0
  490. package/dist/utils/events.d.ts +14 -7
  491. package/dist/utils/grid.d.ts +1 -28
  492. package/dist/utils/index.d.ts +4 -5
  493. package/dist/utils/isDomainSpecifiedByUser.d.ts +1 -47
  494. package/dist/utils/labelColor.d.ts +2 -0
  495. package/dist/utils/log.d.ts +2 -1
  496. package/dist/utils/pointer.d.ts +2 -0
  497. package/dist/utils/polar.d.ts +2 -4
  498. package/dist/utils/scale/getNiceTickValues.d.ts +2 -61
  499. package/dist/utils/scale/utils/arithmetic.d.ts +3 -31
  500. package/dist/utils/scale/utils/utils.d.ts +2 -9
  501. package/dist/utils/scale.d.ts +1 -1
  502. package/dist/utils/style.d.ts +2 -1
  503. package/dist/utils/svg.d.ts +4 -0
  504. package/dist/utils/theme.d.ts +4 -0
  505. package/dist/utils/tick.d.ts +3 -3
  506. package/dist/utils/tooltip/translate.d.ts +9 -25
  507. package/dist/utils/validate.d.ts +12 -4
  508. package/package.json +46 -29
  509. package/dist/animation/Animate.d.ts +0 -72
  510. package/dist/cartesian/area/ActivePoints.d.ts +0 -77
  511. package/dist/cartesian/area/ClipRect.d.ts +0 -1
  512. package/dist/cartesian/area/__stories__/config.d.ts +0 -31
  513. package/dist/cartesian/area/index.d.ts +0 -2
  514. package/dist/cartesian/area/utils.d.ts +0 -19
  515. package/dist/cartesian/axis/index.d.ts +0 -2
  516. package/dist/cartesian/axis/type.d.ts +0 -57
  517. package/dist/cartesian/bar/index.d.ts +0 -1
  518. package/dist/cartesian/bar/utils.d.ts +0 -31
  519. package/dist/cartesian/brush/hooks/useBrushSetting.d.ts +0 -6
  520. package/dist/cartesian/brush/index.d.ts +0 -2
  521. package/dist/cartesian/cartesian-axis/const.d.ts +0 -24
  522. package/dist/cartesian/cartesian-axis/index.d.ts +0 -1
  523. package/dist/cartesian/cartesian-axis/use-axis-line.d.ts +0 -7
  524. package/dist/cartesian/cartesian-grid/index.d.ts +0 -1
  525. package/dist/cartesian/error-bar/index.d.ts +0 -2
  526. package/dist/cartesian/funnel/index.d.ts +0 -2
  527. package/dist/cartesian/funnel/utils.d.ts +0 -12
  528. package/dist/cartesian/index.d.ts +0 -14
  529. package/dist/cartesian/line/ActivePoints.d.ts +0 -77
  530. package/dist/cartesian/line/index.d.ts +0 -3
  531. package/dist/cartesian/line/utils.d.ts +0 -13
  532. package/dist/cartesian/reference-area/index.d.ts +0 -1
  533. package/dist/cartesian/reference-dot/index.d.ts +0 -2
  534. package/dist/cartesian/reference-line/index.d.ts +0 -1
  535. package/dist/cartesian/scatter/index.d.ts +0 -1
  536. package/dist/cartesian/z-axis/index.d.ts +0 -1
  537. package/dist/chart/LegendPortalContext.d.ts +0 -3
  538. package/dist/chart/Surface.d.ts +0 -41
  539. package/dist/chart/TooltipPortalContext.d.ts +0 -2
  540. package/dist/chart/generateCategoricalChart.d.ts +0 -123
  541. package/dist/chart/index.d.ts +0 -12
  542. package/dist/chart/provideClipPathId.d.ts +0 -12
  543. package/dist/components/DefaultLegendContent.d.ts +0 -18
  544. package/dist/components/index.d.ts +0 -6
  545. package/dist/components/label/index.d.ts +0 -2
  546. package/dist/components/legend/index.d.ts +0 -2
  547. package/dist/container/RootSurface.d.ts +0 -17
  548. package/dist/container/index.d.ts +0 -1
  549. package/dist/context/ChartDataContextProvider.d.ts +0 -17
  550. package/dist/context/PanoramaContextProvider.d.ts +0 -22
  551. package/dist/context/accessibilityContext.d.ts +0 -1
  552. package/dist/context/chartLayoutContext.d.ts +0 -8
  553. package/dist/context/cursorLayerContext.d.ts +0 -2
  554. package/dist/context/graphicalLayerContext.d.ts +0 -2
  555. package/dist/context/labelLayerContext.d.ts +0 -2
  556. package/dist/context/useTooltipAxis.d.ts +0 -2
  557. package/dist/es/animation/Animate.mjs +0 -89
  558. package/dist/es/cartesian/area/ActivePoints.mjs +0 -78
  559. package/dist/es/cartesian/area/ClipRect.mjs +0 -125
  560. package/dist/es/cartesian/line/ActivePoints.mjs +0 -79
  561. package/dist/es/chart/LegendPortalContext.mjs +0 -5
  562. package/dist/es/chart/Surface.mjs +0 -5
  563. package/dist/es/chart/Surface.vue_vue_type_script_setup_true_lang.mjs +0 -78
  564. package/dist/es/chart/TooltipPortalContext.mjs +0 -5
  565. package/dist/es/chart/generateCategoricalChart.mjs +0 -184
  566. package/dist/es/chart/provideClipPathId.mjs +0 -15
  567. package/dist/es/components/Tooltip.mjs +0 -479
  568. package/dist/es/context/ChartDataContextProvider.mjs +0 -27
  569. package/dist/es/context/PanoramaContextProvider.mjs +0 -24
  570. package/dist/es/context/accessibilityContext.mjs +0 -5
  571. package/dist/es/context/chartLayoutContext.mjs +0 -49
  572. package/dist/es/context/cursorLayerContext.mjs +0 -5
  573. package/dist/es/context/graphicalLayerContext.mjs +0 -5
  574. package/dist/es/context/labelLayerContext.mjs +0 -5
  575. package/dist/es/context/useTooltipAxis.mjs +0 -17
  576. package/dist/es/events/useChartSynchronisation.mjs +0 -113
  577. package/dist/es/hooks/useIsAnimating.mjs +0 -28
  578. package/dist/es/state/ReportChartProps.mjs +0 -62
  579. package/dist/es/state/ReportMainChartProps.mjs +0 -46
  580. package/dist/es/state/ReportPolarOptions.mjs +0 -56
  581. package/dist/es/state/SetGraphicalItem.mjs +0 -49
  582. package/dist/es/state/SetLegendPayload.mjs +0 -20
  583. package/dist/es/state/SetTooltipEntrySettings.mjs +0 -19
  584. package/dist/es/state/brushSlice.mjs +0 -26
  585. package/dist/es/state/cartesianAxisSlice.mjs +0 -50
  586. package/dist/es/state/chartDataSlice.mjs +0 -33
  587. package/dist/es/state/externalEventsMiddleware.mjs +0 -30
  588. package/dist/es/state/graphicalItemsSlice.mjs +0 -47
  589. package/dist/es/state/hooks.mjs +0 -26
  590. package/dist/es/state/keyboardEventsMiddleware.mjs +0 -63
  591. package/dist/es/state/layoutSlice.mjs +0 -39
  592. package/dist/es/state/legendSlice.mjs +0 -42
  593. package/dist/es/state/mouseEventsMiddleware.mjs +0 -41
  594. package/dist/es/state/optionsSlice.mjs +0 -25
  595. package/dist/es/state/polarAxisSlice.mjs +0 -28
  596. package/dist/es/state/polarOptionsSlice.mjs +0 -13
  597. package/dist/es/state/reduxDevtoolsJsonStringifyReplacer.mjs +0 -8
  598. package/dist/es/state/referenceElementsSlice.mjs +0 -36
  599. package/dist/es/state/rootPropsSlice.mjs +0 -32
  600. package/dist/es/state/selectors/areaSelectors.mjs +0 -77
  601. package/dist/es/state/selectors/axisSelectors.mjs +0 -908
  602. package/dist/es/state/selectors/barSelectors.mjs +0 -241
  603. package/dist/es/state/selectors/brushSelectors.mjs +0 -18
  604. package/dist/es/state/selectors/combiners/combineActiveLabel.mjs +0 -9
  605. package/dist/es/state/selectors/combiners/combineActiveTooltipIndex.mjs +0 -43
  606. package/dist/es/state/selectors/combiners/combineAxisRangeWithReverse.mjs +0 -8
  607. package/dist/es/state/selectors/combiners/combineCoordinateForDefaultIndex.mjs +0 -21
  608. package/dist/es/state/selectors/combiners/combineTooltipInteractionState.mjs +0 -37
  609. package/dist/es/state/selectors/combiners/combineTooltipPayloadConfigurations.mjs +0 -13
  610. package/dist/es/state/selectors/common.mjs +0 -4
  611. package/dist/es/state/selectors/containerSelectors.mjs +0 -7
  612. package/dist/es/state/selectors/dataSelectors.mjs +0 -35
  613. package/dist/es/state/selectors/funnelSelectors.mjs +0 -38
  614. package/dist/es/state/selectors/legendSelectors.mjs +0 -10
  615. package/dist/es/state/selectors/lineSelectors.mjs +0 -64
  616. package/dist/es/state/selectors/pickAxisId.mjs +0 -4
  617. package/dist/es/state/selectors/pickAxisType.mjs +0 -4
  618. package/dist/es/state/selectors/polarAxisSelectors.mjs +0 -167
  619. package/dist/es/state/selectors/polarGridSelectors.mjs +0 -19
  620. package/dist/es/state/selectors/polarScaleSelectors.mjs +0 -55
  621. package/dist/es/state/selectors/polarSelectors.mjs +0 -81
  622. package/dist/es/state/selectors/radarSelectors.mjs +0 -133
  623. package/dist/es/state/selectors/radialBarSelectors.mjs +0 -259
  624. package/dist/es/state/selectors/rootPropsSelectors.mjs +0 -14
  625. package/dist/es/state/selectors/scatterSelectors.mjs +0 -134
  626. package/dist/es/state/selectors/selectActivePropsFromChartPointer.mjs +0 -20
  627. package/dist/es/state/selectors/selectAllAxes.mjs +0 -10
  628. package/dist/es/state/selectors/selectChartOffset.mjs +0 -72
  629. package/dist/es/state/selectors/selectChartOffsetInternal.mjs +0 -66
  630. package/dist/es/state/selectors/selectLegendArea.mjs +0 -19
  631. package/dist/es/state/selectors/selectTooltipEventType.mjs +0 -22
  632. package/dist/es/state/selectors/selectTooltipPayloadSearcher.mjs +0 -6
  633. package/dist/es/state/selectors/selectTooltipSettings.mjs +0 -4
  634. package/dist/es/state/selectors/selectTooltipState.mjs +0 -4
  635. package/dist/es/state/selectors/selectors.mjs +0 -104
  636. package/dist/es/state/selectors/tooltipSelectors.mjs +0 -269
  637. package/dist/es/state/selectors/touchSelectors.mjs +0 -19
  638. package/dist/es/state/store.mjs +0 -55
  639. package/dist/es/state/tooltipSlice.mjs +0 -102
  640. package/dist/es/state/touchEventsMiddleware.mjs +0 -44
  641. package/dist/es/state/utils/useReportScale.mjs +0 -19
  642. package/dist/es/synchronisation/syncSelectors.mjs +0 -6
  643. package/dist/es/synchronisation/useChartSynchronisation.mjs +0 -38
  644. package/dist/es/utils/Global.mjs +0 -18
  645. package/dist/es/utils/createContext.mjs +0 -31
  646. package/dist/es/utils/legend.mjs +0 -41
  647. package/dist/es/utils/props.mjs +0 -20
  648. package/dist/es/utils/resolveDefaultProps.mjs +0 -26
  649. package/dist/events/useChartSynchronisation.d.ts +0 -8
  650. package/dist/hooks/useIsAnimating.d.ts +0 -14
  651. package/dist/polar/index.d.ts +0 -3
  652. package/dist/polar/pie/index.d.ts +0 -2
  653. package/dist/polar/radar/index.d.ts +0 -4
  654. package/dist/polar/radial-bar/index.d.ts +0 -2
  655. package/dist/shape/index.d.ts +0 -10
  656. package/dist/state/ReportBar.d.ts +0 -1
  657. package/dist/state/ReportChartProps.d.ts +0 -88
  658. package/dist/state/ReportMainChartProps.d.ts +0 -37
  659. package/dist/state/ReportPolarOptions.d.ts +0 -59
  660. package/dist/state/SetGraphicalItem.d.ts +0 -9
  661. package/dist/state/SetLegendPayload.d.ts +0 -3
  662. package/dist/state/SetTooltipEntrySettings.d.ts +0 -8
  663. package/dist/state/brushSlice.d.ts +0 -18
  664. package/dist/state/cartesianAxisSlice.d.ts +0 -96
  665. package/dist/state/chartDataSlice.d.ts +0 -44
  666. package/dist/state/externalEventsMiddleware.d.ts +0 -17
  667. package/dist/state/graphicalItemsSlice.d.ts +0 -108
  668. package/dist/state/hooks.d.ts +0 -54
  669. package/dist/state/keyboardEventsMiddleware.d.ts +0 -3
  670. package/dist/state/layoutSlice.d.ts +0 -15
  671. package/dist/state/legendSlice.d.ts +0 -29
  672. package/dist/state/mouseEventsMiddleware.d.ts +0 -5
  673. package/dist/state/optionsSlice.d.ts +0 -27
  674. package/dist/state/polarAxisSlice.d.ts +0 -10
  675. package/dist/state/polarOptionsSlice.d.ts +0 -10
  676. package/dist/state/reduxDevtoolsJsonStringifyReplacer.d.ts +0 -1
  677. package/dist/state/referenceElementsSlice.d.ts +0 -40
  678. package/dist/state/selectors/areaSelectors.d.ts +0 -24
  679. package/dist/state/selectors/axisSelectors.d.ts +0 -1833
  680. package/dist/state/selectors/barSelectors.d.ts +0 -944
  681. package/dist/state/selectors/brushSelectors.d.ts +0 -10
  682. package/dist/state/selectors/combiners/combineActiveLabel.d.ts +0 -3
  683. package/dist/state/selectors/combiners/combineActiveTooltipIndex.d.ts +0 -5
  684. package/dist/state/selectors/combiners/combineAxisRangeWithReverse.d.ts +0 -3
  685. package/dist/state/selectors/combiners/combineCoordinateForDefaultIndex.d.ts +0 -3
  686. package/dist/state/selectors/combiners/combineTooltipInteractionState.d.ts +0 -3
  687. package/dist/state/selectors/combiners/combineTooltipPayloadConfigurations.d.ts +0 -3
  688. package/dist/state/selectors/common.d.ts +0 -2
  689. package/dist/state/selectors/containerSelectors.d.ts +0 -6
  690. package/dist/state/selectors/dataSelectors.d.ts +0 -23
  691. package/dist/state/selectors/funnelSelectors.d.ts +0 -69
  692. package/dist/state/selectors/legendSelectors.d.ts +0 -7
  693. package/dist/state/selectors/lineSelectors.d.ts +0 -123
  694. package/dist/state/selectors/pickAxisId.d.ts +0 -3
  695. package/dist/state/selectors/pickAxisType.d.ts +0 -2
  696. package/dist/state/selectors/polarAxisSelectors.d.ts +0 -49
  697. package/dist/state/selectors/polarGridSelectors.d.ts +0 -118
  698. package/dist/state/selectors/polarScaleSelectors.d.ts +0 -9
  699. package/dist/state/selectors/polarSelectors.d.ts +0 -70
  700. package/dist/state/selectors/radarSelectors.d.ts +0 -76
  701. package/dist/state/selectors/radialBarSelectors.d.ts +0 -61
  702. package/dist/state/selectors/rootPropsSelectors.d.ts +0 -11
  703. package/dist/state/selectors/scatterSelectors.d.ts +0 -21
  704. package/dist/state/selectors/selectActivePropsFromChartPointer.d.ts +0 -382
  705. package/dist/state/selectors/selectAllAxes.d.ts +0 -4
  706. package/dist/state/selectors/selectChartOffset.d.ts +0 -116
  707. package/dist/state/selectors/selectChartOffsetInternal.d.ts +0 -9
  708. package/dist/state/selectors/selectLegendArea.d.ts +0 -7
  709. package/dist/state/selectors/selectTooltipEventType.d.ts +0 -8
  710. package/dist/state/selectors/selectTooltipPayloadSearcher.d.ts +0 -3
  711. package/dist/state/selectors/selectTooltipSettings.d.ts +0 -3
  712. package/dist/state/selectors/selectTooltipState.d.ts +0 -3
  713. package/dist/state/selectors/selectors.d.ts +0 -184
  714. package/dist/state/selectors/tooltipSelectors.d.ts +0 -581
  715. package/dist/state/selectors/touchSelectors.d.ts +0 -4
  716. package/dist/state/store.d.ts +0 -74
  717. package/dist/state/tooltipSlice.d.ts +0 -204
  718. package/dist/state/touchEventsMiddleware.d.ts +0 -2
  719. package/dist/state/utils/useReportScale.d.ts +0 -1
  720. package/dist/synchronisation/syncSelectors.d.ts +0 -3
  721. package/dist/synchronisation/useChartSynchronisation.d.ts +0 -11
  722. package/dist/types/offset.d.ts +0 -8
  723. package/dist/utils/Global.d.ts +0 -9
  724. package/dist/utils/context.d.ts +0 -8
  725. package/dist/utils/createContext.d.ts +0 -8
  726. package/dist/utils/legend.d.ts +0 -3
  727. package/dist/utils/props.d.ts +0 -15
  728. package/dist/utils/resolveDefaultProps.d.ts +0 -52
@@ -1,28 +1,22 @@
1
- import { DataKey, VueClassValue } from './common';
2
- /**
3
- * null means no active index
4
- * string means: whichever index from the chart data it is.
5
- * Different charts have different requirements on data shapes,
6
- * and are also responsible for providing a function that will accept this index
7
- * and return data.
8
- */
9
- export type TooltipIndex = string | null;
1
+ import { ChartCoordinate, ChartDataKey, Coordinate, VueClassValue } from './base.js';
2
+ import { VNodeChild } from 'vue';
3
+ import { AxisId } from './axisSettings.js';
10
4
  export type TooltipEventType = 'axis' | 'item';
11
5
  export type TooltipTrigger = 'hover' | 'click';
12
6
  export type TooltipType = 'none';
13
7
  export type ValueType = number | string | Array<number | string>;
14
8
  export type NameType = number | string;
15
- export type Formatter<TValue extends ValueType, TName extends NameType> = (value: TValue, name: TName, item: Payload<TValue, TName>, index: number, payload: ReadonlyArray<Payload<TValue, TName>>) => any;
9
+ export type Formatter<TValue extends ValueType, TName extends NameType> = (value: TValue, name: TName, item: Payload<TValue, TName>, index: number, payload: ReadonlyArray<Payload<TValue, TName>>) => VNodeChild;
16
10
  export interface Payload<TValue extends ValueType, TName extends NameType> {
17
11
  type?: TooltipType;
18
12
  color?: string;
19
13
  name?: TName;
20
14
  value?: TValue;
21
- unit?: string;
15
+ unit?: string | number;
22
16
  fill?: string;
23
- dataKey?: DataKey<any>;
24
- nameKey?: DataKey<any>;
25
- payload?: any;
17
+ dataKey?: ChartDataKey;
18
+ nameKey?: ChartDataKey;
19
+ payload?: unknown;
26
20
  chartType?: string;
27
21
  stroke?: string;
28
22
  strokeDasharray?: string | number;
@@ -31,3 +25,176 @@ export interface Payload<TValue extends ValueType, TName extends NameType> {
31
25
  hide?: boolean;
32
26
  formatter?: Formatter<TValue, TName>;
33
27
  }
28
+ /**
29
+ * One Tooltip can display multiple TooltipPayloadEntries at a time.
30
+ */
31
+ export type TooltipPayloadEntry = Payload<ValueType, NameType>;
32
+ /**
33
+ * So what happens is that the tooltip payload is decided based on the available data, and the dataKey.
34
+ * The dataKey can either be defined on the graphical element (like Line, or Bar)
35
+ * or on the tooltip itself.
36
+ *
37
+ * The data can be defined in the chart element, or in the graphical item.
38
+ *
39
+ * So this type is all the settings, other than the data + dataKey complications.
40
+ */
41
+ export type TooltipEntrySettings = Omit<TooltipPayloadEntry, 'payload' | 'value'> & {
42
+ nameKey: ChartDataKey | undefined;
43
+ };
44
+ /**
45
+ * This is what Tooltip renders.
46
+ */
47
+ export type TooltipPayload = ReadonlyArray<TooltipPayloadEntry>;
48
+ /** Position in the chart's keyboard target order; null clears selection. */
49
+ export type TooltipActiveIndex = number | null;
50
+ /** Hierarchy lookup keys stay separate from numeric selection indexes. */
51
+ export type TooltipPayloadSearcher<T = unknown, R = T> = (data: T, payloadKey: string, nameKey?: ChartDataKey) => R | undefined;
52
+ type TooltipKeyboardItem = {
53
+ /** Stable identity, independent of the current payload lookup path. */
54
+ identity?: unknown;
55
+ index: number;
56
+ payloadKey?: string;
57
+ coordinate: Coordinate;
58
+ onClick?: (event: KeyboardEvent) => void;
59
+ };
60
+ export type TooltipPayloadConfiguration = {
61
+ model?: {
62
+ /** Standalone selection owns the root rather than a series. */
63
+ root?: boolean;
64
+ index: () => TooltipActiveIndex | undefined;
65
+ request: (index: TooltipActiveIndex) => void;
66
+ };
67
+ keyboardItems?: ReadonlyArray<TooltipKeyboardItem>;
68
+ /** Pointer-only targets do not enter keyboard order. */
69
+ pointerItems?: ReadonlyArray<TooltipKeyboardItem>;
70
+ /**
71
+ * Value and name per item (numeric index or payload key) when they are not fields of the
72
+ * payload: hierarchy totals come from layout, and a cell's payload is its domain object.
73
+ */
74
+ values?: Readonly<Record<string, ValueType | null>>;
75
+ names?: Readonly<Record<string, string>>;
76
+ /** Per-entry swatch colours (Pie sectors, Funnel trapezoids), by item index; see core/color entryColor. */
77
+ colors?: ReadonlyArray<string | undefined>;
78
+ settings: TooltipEntrySettings;
79
+ /** Arrays use the numeric item index; hierarchies use the target payload key. */
80
+ dataDefinedOnItem: unknown;
81
+ /**
82
+ * Opportunity for the graphical item to define its own Tooltip coordinates
83
+ * instead of relying on the axes.
84
+ *
85
+ * If undefined, then Recharts will use mouse interaction coordinates, or the axis coordinates,
86
+ * with some defaults (like, top/left of the chart).
87
+ */
88
+ positions: Readonly<Partial<Record<number, Coordinate>>> | ReadonlyArray<Coordinate | undefined> | undefined;
89
+ };
90
+ export type ActiveTooltipProps = {
91
+ activeIndex: TooltipActiveIndex;
92
+ activeCoordinate: ChartCoordinate | undefined;
93
+ };
94
+ /**
95
+ * So this informs the "tooltip event type". Tooltip event type can be either "axis" or "item"
96
+ * and it is used for two things:
97
+ * 1. Sets the active area
98
+ * 2. Sets the background and cursor highlights
99
+ *
100
+ * Some charts only allow to have one type of tooltip event type, some allow both.
101
+ * Those charts that allow both will have one default, and the "shared" prop will be used to switch between them.
102
+ * Undefined means "use the chart default".
103
+ *
104
+ * Charts that only allow one tooltip event type, will ignore the shared prop.
105
+ */
106
+ type SharedTooltipSettings = boolean | undefined;
107
+ export type TooltipSettings = {
108
+ activeIndex?: TooltipActiveIndex;
109
+ shared: SharedTooltipSettings;
110
+ trigger: TooltipTrigger;
111
+ axisId: AxisId;
112
+ /**
113
+ * The `active` prop, despite its name, does not mean "always active".
114
+ * It means "active after user interaction has ended".
115
+ * By default, the tooltip is only active while the user is hovering over the chart.
116
+ * With `active=true`, the tooltip will remain visible after mouse leave event.
117
+ *
118
+ * If you want to see the "active before user interaction" settings, see `defaultIndex`.
119
+ *
120
+ * Undefined means "depends on user interactions".
121
+ */
122
+ active: boolean | undefined;
123
+ /**
124
+ * If you want to set the tooltip to be active before user interaction, you can set this property.
125
+ */
126
+ defaultIndex: TooltipActiveIndex | undefined;
127
+ };
128
+ /**
129
+ * A generic state for user interaction with the chart.
130
+ * User interaction can come through multiple channels: mouse events, keyboard events, or hardcoded in props, or synchronised from other charts.
131
+ *
132
+ * Each channel is represented as a TooltipInteraction, and the tooltip model decides which one wins.
133
+ */
134
+ export type TooltipInteraction = {
135
+ configuration?: TooltipPayloadConfiguration;
136
+ /**
137
+ * If user interaction is in progress or not.
138
+ * Why is this its own property? Why is this not computed from the index?
139
+ * Certainly if index !== -1 then the tooltip is active, right?
140
+ * Well not so fast. Recharts allows Tooltips can be set to `active=true`
141
+ * which means the tooltip remains displayed after the user stops interacting.
142
+ * - This implies that we cannot set index to <empty value> after interaction ends,
143
+ * because the chart must remember the last position just in case the `active` prop on Tooltip is set to true.
144
+ */
145
+ active: boolean;
146
+ /**
147
+ * This is the current data index that is set for the chart.
148
+ * This can come from mouse events, keyboard events, or hardcoded in props
149
+ * in property `defaultIndex` on Tooltip.
150
+ */
151
+ index: TooltipActiveIndex;
152
+ /**
153
+ * DataKey filter.
154
+ *
155
+ * In case of multiple graphical items, this is the dataKey that is set for the item.
156
+ * Very useful for `Tooltip.shared=false`, where activeIndex can display multiple values,
157
+ * but we only want to display one of them.
158
+ *
159
+ * If we want to interact with all the graphical items, then this is undefined.
160
+ * This is the case for eventTooltipType === 'axis' for example.
161
+ */
162
+ dataKey: ChartDataKey | undefined;
163
+ /**
164
+ * The Coordinate where user last interacted with the chart. This needs saved so we can continue to render the tooltip at that point.
165
+ * This is undefined on several occasions:
166
+ * - before the user started interacting with the chart,
167
+ * - when the chart is controlled programmatically through `defaultIndex` prop
168
+ * - when the chart is controlled using keyboard interactions
169
+ */
170
+ coordinate: Coordinate | undefined;
171
+ };
172
+ export type TooltipSyncInteraction = TooltipInteraction & {
173
+ /**
174
+ * Tooltip synchronization is a feature that allows multiple charts to share the same interaction state.
175
+ * This comes with one specialty - the syncMethod. `syncMethod=value` allows the user to synchronise charts
176
+ * based on the active label (which is rendered as the title of the Tooltip).
177
+ * To allow that, we need the label to be stored in the sync state.
178
+ */
179
+ label: string | undefined;
180
+ };
181
+ /**
182
+ * A request to select a tooltip target. An axis request selects a category. Any other request
183
+ * names its series by the registered configuration, because a dataKey is not unique (two
184
+ * Scatters may have none); `index: null` clears the selection.
185
+ */
186
+ export type TooltipTargetRequest = {
187
+ active?: boolean;
188
+ coordinate?: ChartCoordinate;
189
+ } & ({
190
+ type: 'axis';
191
+ index: TooltipActiveIndex;
192
+ } | {
193
+ type?: TooltipEventType;
194
+ index: TooltipActiveIndex;
195
+ configuration: TooltipPayloadConfiguration | undefined;
196
+ } | {
197
+ type?: TooltipEventType;
198
+ index: null;
199
+ });
200
+ export {};
@@ -0,0 +1,16 @@
1
+ import { VNode } from 'vue';
2
+ type RowPath<Row, Remaining extends readonly unknown[] = [1, 1, 1, 1]> = Remaining extends readonly [unknown, ...infer Rest] ? {
3
+ [Key in Extract<keyof Row, string | number>]: Key | (NonNullable<Row[Key]> extends readonly (infer Entry)[] ? `${Key}[${number}]` | `${Key}[${number}].${RowPath<Entry, Rest> & (string | number)}` : NonNullable<Row[Key]> extends object ? `${Key}.${RowPath<NonNullable<Row[Key]>, Rest> & (string | number)}` : never);
4
+ }[Extract<keyof Row, string | number>] : Row extends object ? string | number : never;
5
+ export type RowDataKey<Row> = RowPath<Row> | ((row: Row) => unknown);
6
+ export interface ChartRenderContext<Slots> {
7
+ slots: Slots;
8
+ attrs: Record<string, unknown>;
9
+ emit: (...args: never[]) => void;
10
+ }
11
+ export type ChartVNode<Props, Slots> = VNode & {
12
+ __ctx?: ChartRenderContext<Slots> & {
13
+ props: Props;
14
+ };
15
+ };
16
+ export {};
@@ -1,5 +1,3 @@
1
- export type Unit = string | number;
2
- export type Orientation = 'top' | 'bottom' | 'left' | 'right';
3
1
  export interface PolarViewBox {
4
2
  cx?: number;
5
3
  cy?: number;
@@ -1,2 +1 @@
1
- export declare function safeEvaluateExpression(expression: string): string;
2
1
  export declare function reduceCSSCalc(expression: string): string;
@@ -1,11 +1,8 @@
1
- import { FilteredSvgElementType } from '../cartesian/cartesian-grid/const';
1
+ import { FilteredSvgElementType } from './svg.js';
2
+ export declare function filterProps(props: Record<string, unknown> | boolean | unknown, includeEvents: boolean, svgElementType?: FilteredSvgElementType): Record<string, unknown> | null;
2
3
  /**
3
- * Checks if the property is valid to spread onto an SVG element or onto a specific component
4
- * @param {unknown} property property value currently being compared
5
- * @param {string} key property key currently being compared
6
- * @param {boolean} includeEvents if events are included in spreadable props
7
- * @param {boolean} svgElementType checks against map of SVG element types to attributes
8
- * @returns {boolean} is prop valid
4
+ * The attributes of `source` that belong on an SVG element, under their SVG names. Chart data
5
+ * passed along as props (payload, dataKey, tooltipPosition…) never reaches the DOM.
6
+ * Vue listeners (onClick, onMouseenter) are kept.
9
7
  */
10
- export declare function isValidSpreadableProp(property: unknown, key: string, includeEvents?: boolean, svgElementType?: FilteredSvgElementType): boolean;
11
- export declare function filterProps(props: Record<string, any> | boolean | unknown, includeEvents: boolean, svgElementType?: FilteredSvgElementType): Record<string, any>;
8
+ export declare function svgAttrs(source: Record<string, unknown> | null | undefined): Record<string, unknown>;
@@ -0,0 +1,56 @@
1
+ import { AriaAttributes, SVGAttributes } from 'vue';
2
+ type CamelCase<Name extends string> = Name extends `${infer Head}-${infer Tail}` ? `${Head}${Capitalize<CamelCase<Tail>>}` : Name;
3
+ type Letter = 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z';
4
+ /**
5
+ * `data-*` attributes, in the camelized form strict templates check on components. At least one
6
+ * letter follows `data`: a bare `data` is no data attribute, so undeclared it stays an error.
7
+ */
8
+ type DataAttributes = {
9
+ [key: `data${Letter}${string}`]: unknown;
10
+ };
11
+ /**
12
+ * SVG attributes in the form that strict Vue templates check on a component: Volar camelizes
13
+ * attribute names except `aria-*`. `class` and `style` are allowed on every component already.
14
+ */
15
+ export type SvgTemplateAttributes = {
16
+ [Key in keyof SVGAttributes as Key extends `aria-${string}` | 'class' | 'style' ? never : Key extends string ? CamelCase<Key> : never]?: SVGAttributes[Key];
17
+ } & AriaAttributes & DataAttributes;
18
+ /**
19
+ * Attributes a template may pass to a component whose root is an HTML element. Only the
20
+ * accessibility and test hooks: Vue's `HTMLAttributes` also carries augmentations from other
21
+ * packages (motion-v adds gesture props), which must not leak into our declarations.
22
+ */
23
+ export type HtmlTemplateAttributes = AriaAttributes & DataAttributes & {
24
+ id?: string;
25
+ role?: string;
26
+ };
27
+ type ComponentConstructor = abstract new (...args: never) => {
28
+ $props: unknown;
29
+ };
30
+ /**
31
+ * Adds `Attributes` to the template props of component `C`. Declared props keep their own types;
32
+ * only names the component does not declare are added. An interface, so declarations name it
33
+ * instead of expanding the component type.
34
+ */
35
+ interface ForwardedAttributes<C extends ComponentConstructor, Attributes> {
36
+ new (props?: Record<string, unknown>): InstanceType<C> & {
37
+ $props: Omit<Attributes, keyof InstanceType<C>['$props']>;
38
+ };
39
+ /** Type only: the declared props without the forwarded attributes (see `DeclaredProps`). */
40
+ readonly '~declaredProps'?: InstanceType<C>['$props'];
41
+ }
42
+ export type WithAttributes<C extends ComponentConstructor, Attributes> = C & ForwardedAttributes<C, Attributes>;
43
+ /** The props a component declares, with its events and v-model updates, but no forwarded attributes. */
44
+ export type DeclaredProps<C extends ComponentConstructor> = C extends {
45
+ readonly '~declaredProps'?: infer Props;
46
+ } ? unknown extends Props ? InstanceType<C>['$props'] : Props : InstanceType<C>['$props'];
47
+ /**
48
+ * Marks a component that forwards undeclared attributes (`stroke-dasharray`, `data-*`,
49
+ * `aria-*`) to its root SVG element, so strict templates (`strictTemplates`) accept them.
50
+ * Runtime behaviour is unchanged: Vue already forwards these attributes. `@__NO_SIDE_EFFECTS__`
51
+ * tells bundlers that a call can be dropped, so an unused wrapped component is tree-shaken.
52
+ */
53
+ export declare function forwardsSvgAttributes<C extends ComponentConstructor>(component: C): WithAttributes<C, SvgTemplateAttributes>;
54
+ /** Like `forwardsSvgAttributes`, for components whose root is an HTML element. */
55
+ export declare function forwardsHtmlAttributes<C extends ComponentConstructor>(component: C): WithAttributes<C, HtmlTemplateAttributes>;
56
+ export {};
@@ -1,46 +1,5 @@
1
- import { Size } from '../types';
1
+ import { Size } from '../types/index.js';
2
2
  import { CSSProperties } from 'vue';
3
- export declare function getStringSize(text: string | number, style?: CSSProperties): Size;
4
- export type RequiredKeys<T> = {
5
- [K in keyof T]-?: object extends Pick<T, K> ? never : K;
6
- }[keyof T];
7
- export type OptionalKeys<T> = {
8
- [K in keyof T]-?: object extends Pick<T, K> ? K : never;
9
- }[keyof T];
10
- export type DisallowExtraKeys<T, D> = {
11
- [K in keyof D]: K extends keyof T ? D[K] : never;
12
- };
13
- /**
14
- * This type will take a source type `T` and a default type `D` and will return a new type
15
- * where all properties that are optional in `T` but required in `D` are made required in the result.
16
- * Properties that are required in `T` and optional in `D` will remain required.
17
- * Properties that are optional in both `T` and `D` will remain optional.
18
- *
19
- * This is useful for creating a type that represents the resolved props of a component with default props.
20
- */
21
- export type RequiresDefaultProps<T, D extends Partial<T>> = Pick<T, RequiredKeys<T>> & Required<Pick<T, Extract<OptionalKeys<T>, RequiredKeys<D>>>> & Pick<T, Exclude<OptionalKeys<T>, keyof D>>;
22
- /**
23
- * This function mimics the behavior of the `defaultProps` static property in React.
24
- * Functional components do not have a defaultProps property, so this function is useful to resolve default props.
25
- *
26
- * The common recommendation is to use ES6 destructuring with default values in the function signature,
27
- * but you need to be careful there and make sure you destructure all the individual properties
28
- * and not the whole object. See the test file for example.
29
- *
30
- * And because destructuring all properties one by one is a faff, and it's easy to miss one property,
31
- * this function exists.
32
- *
33
- * @param realProps - the props object passed to the component by the user
34
- * @param defaultProps - the default props object defined in the component by Recharts
35
- * @returns - the props object with all the default props resolved. All `undefined` values are replaced with the default value.
36
- */
37
- export declare function resolveDefaultProps<T, D extends Partial<T>>(realProps: T, defaultProps: D & DisallowExtraKeys<T, D>): RequiresDefaultProps<T, D>;
38
- /**
39
- * merge props and attrs
40
- * @param props - props
41
- * @param attrs - attrs
42
- * @returns merged props
43
- */
44
- export declare function mergePropAttrs<T extends object>(props: T, attrs: any): T & {
45
- toObject: () => T;
46
- };
3
+ /** Test isolation only: measurements stubbed in one test must not leak into the next. */
4
+ export declare function clearStringSizeCache(): void;
5
+ export declare function getStringSize(text: unknown, style?: CSSProperties, canMeasure?: boolean): Size;
@@ -1,19 +1,5 @@
1
- import { Sign } from '../cartesian/type';
2
- import { Size } from '../types';
3
- import { CartesianTickItem } from '../types/tick';
4
- /**
5
- * Normalizes the angle so that 0 <= angle < 180.
6
- * @param {number} angle Angle in degrees.
7
- * @return {number} the normalized angle with a value of at least 0 and never greater or equal to 180.
8
- */
9
- export declare function normalizeAngle(angle: number): number;
10
- /**
11
- * Calculates the width of the largest horizontal line that fits inside a rectangle that is displayed at an angle.
12
- * @param {object} size Width and height of the text in a horizontal position.
13
- * @param {number} angle Angle in degrees in which the text is displayed.
14
- * @return {number} The width of the largest horizontal line that fits inside a rectangle that is displayed at an angle.
15
- */
16
- export declare function getAngledRectangleWidth({ width, height }: Size, angle?: number | undefined): number;
1
+ import { Sign } from '../types/viewBox.js';
2
+ import { CartesianTickItem } from '../types/tick.js';
17
3
  export declare function getEquidistantTicks(sign: Sign, boundaries: {
18
4
  start: number;
19
5
  end: number;
@@ -1,11 +1,16 @@
1
- import { VNode } from 'vue';
1
+ import { SVGAttributes, ShallowRef, VNode } from 'vue';
2
2
  /**
3
3
  * Extract Cell VNode props from a VNode tree.
4
4
  * Handles Fragment wrapping from v-for.
5
5
  */
6
- export declare function extractCellProps(vnodes: VNode[]): Record<string, any>[];
6
+ export declare function extractCellProps(vnodes: VNode[]): Array<SVGAttributes & Record<string, unknown>>;
7
7
  /**
8
8
  * Filter out Cell VNodes from a VNode tree, preserving non-Cell siblings.
9
9
  * Recursively descends Fragment children to preserve co-located content (e.g. LabelList).
10
10
  */
11
11
  export declare function filterOutCells(vnodes: VNode[]): VNode[];
12
+ /**
13
+ * Stores the Cell props read during a render, but only when they changed: a new but equal array
14
+ * would re-run everything that reads it (legend payloads, geometry) on every render.
15
+ */
16
+ export declare function assignCells(target: ShallowRef<Array<SVGAttributes & Record<string, unknown>>>, cells: Array<SVGAttributes & Record<string, unknown>>): void;
@@ -1,99 +1,2 @@
1
- import { BaseAxisProps } from '../cartesian/axis/type';
2
- import { PolarViewBoxRequired } from '../cartesian/type';
3
- import { NormalizedStackId } from '../shape';
4
- import { BaseAxisWithScale, StackGroup } from '../state/selectors/axisSelectors';
5
- import { TooltipEntrySettings, TooltipPayloadEntry } from '../state/tooltipSlice';
6
- import { ChartCoordinate, ChartOffsetRequired, ChartPointer, Coordinate, DataKey, LayoutType, StackOffsetType, TickItem, ValueType } from '../types';
7
- import { AxisRange, AxisType, NumberDomain } from '../types/axis';
8
- import { AxisPropsNeededForTicksGenerator, StackId } from '../types/tick';
9
- import { Series, SeriesPoint } from 'victory-vendor/d3-shape';
10
- /**
11
- * Get the ticks of an axis
12
- * @param {object} axis The configuration of an axis
13
- * @param {boolean} isGrid Whether or not are the ticks in grid
14
- * @param {boolean} isAll Return the ticks of all the points or not
15
- * @return {Array} Ticks
16
- */
17
- export declare function getTicksOfAxis(axis: null | AxisPropsNeededForTicksGenerator, isGrid?: boolean, isAll?: boolean): ReadonlyArray<TickItem> | null;
18
- export declare function getValueByDataKey<T>(obj: T, dataKey: DataKey<T>, defaultValue?: any): any;
19
- export declare const MIN_VALUE_REG: RegExp;
20
- export declare const MAX_VALUE_REG: RegExp;
21
- /**
22
- * Calculate the size between two category
23
- * @param {object} axis The options of axis
24
- * @param {Array} ticks The ticks of axis
25
- * @param {boolean} isBar if items in axis are bars
26
- * @return {number} Size
27
- */
28
- export declare function getBandSizeOfAxis(axis?: BaseAxisWithScale, ticks?: ReadonlyArray<TickItem>, isBar?: boolean): number | undefined;
29
- /**
30
- * Both value and domain are tuples of two numbers
31
- * - but the type stays as array of numbers until we have better support in rest of the app
32
- * @param value input that will be truncated
33
- * @param domain boundaries
34
- * @returns tuple of two numbers
35
- */
36
- export declare function truncateByDomain(value: SeriesPoint<Record<number, number>>, domain: ReadonlyArray<number>): [number, number] | SeriesPoint<Record<number, number>>;
37
- export declare function getNormalizedStackId(publicStackId: StackId | undefined): NormalizedStackId | undefined;
38
- export declare function getCateCoordinateOfLine<T extends Record<string, unknown>>({ axis, ticks, bandSize, entry, index, dataKey, }: {
39
- axis: {
40
- dataKey?: DataKey<T>;
41
- allowDuplicatedCategory?: boolean;
42
- type?: BaseAxisProps['type'];
43
- scale: (v: number) => number;
44
- };
45
- ticks: Array<TickItem>;
46
- bandSize: number;
47
- entry: T;
48
- index: number;
49
- dataKey?: DataKey<T>;
50
- }): number | null;
51
- export declare function getChartPointer(event: PointerEvent | MouseEvent): ChartPointer | undefined;
52
- export declare function getTooltipEntry({ tooltipEntrySettings, dataKey, payload, value, name, }: {
53
- tooltipEntrySettings: TooltipEntrySettings;
54
- dataKey: DataKey<any>;
55
- payload: any;
56
- value: ValueType;
57
- name: string | undefined;
58
- }): TooltipPayloadEntry;
59
- export type RangeObj = {
60
- x?: number;
61
- y?: number;
62
- cx?: number;
63
- cy?: number;
64
- angle?: number;
65
- radius?: number;
66
- };
67
- export declare function calculateTooltipPos(rangeObj: RangeObj, layout: LayoutType): number | undefined;
68
- export declare function inRangeOfSector({ x, y }: Coordinate, viewBox: PolarViewBoxRequired): RangeObj | null;
69
- export declare function inRange(x: number, y: number, layout: LayoutType, polarViewBox: PolarViewBoxRequired | undefined, offset: ChartOffsetRequired): RangeObj | null;
70
- export declare function calculateActiveTickIndex(coordinate: number, ticks: ReadonlyArray<TickItem>, unsortedTicks: ReadonlyArray<TickItem>, axisType: AxisType | undefined, range: AxisRange | undefined): number;
71
- export declare function getActiveCoordinate(layout: LayoutType, tooltipTicks: readonly TickItem[], activeIndex: number, rangeObj: RangeObj): ChartCoordinate;
72
- export declare function getDomainOfStackGroups(stackGroups: Record<StackId, StackGroup> | undefined, startIndex: number, endIndex: number): NumberDomain | undefined;
73
- export declare function checkDomainOfScale(scale: any): void;
74
- export declare function getTooltipNameProp(nameFromItem: string | number | undefined | unknown, dataKey: DataKey<any> | undefined): string | undefined;
75
- export declare function isClipDot(dot: any): boolean;
76
- type OffsetAccessor = (series: Array<Series<Record<string, unknown>, string>>, order: number[]) => void;
77
- export declare const offsetSign: OffsetAccessor;
78
- /**
79
- * Replaces all negative values with zero when stacking data.
80
- *
81
- * If all values in the series are positive then this behaves the same as 'none' stacker.
82
- *
83
- * @param {Array} series from d3-shape Stack
84
- * @return {Array} series with applied offset
85
- */
86
- export declare const offsetPositive: OffsetAccessor;
87
- export declare function getStackedData(data: ReadonlyArray<Record<string, unknown>>, dataKeys: ReadonlyArray<DataKey<any>>, offsetType: StackOffsetType): ReadonlyArray<Series<Record<string, unknown>, DataKey<any>>>;
88
- export declare function getBaseValueOfBar({ numericAxis }: {
89
- numericAxis: BaseAxisWithScale;
90
- }): number | unknown;
91
- export declare function getCateCoordinateOfBar({ axis, ticks, offset, bandSize, entry, index, }: {
92
- axis: BaseAxisWithScale;
93
- ticks: ReadonlyArray<TickItem>;
94
- offset: number;
95
- bandSize: number;
96
- entry: any;
97
- index: number;
98
- }): number | null;
99
- export {};
1
+ import { DataKey } from '../types/index.js';
2
+ export declare function getValueByDataKey<T>(obj: unknown, dataKey: DataKey<T> | undefined, defaultValue?: unknown): any;
@@ -3,28 +3,5 @@
3
3
  * The index is the position of the element in the data array.
4
4
  * This can be either a number (for array-based charts) or a string (for the charts that have a matrix-shaped data).
5
5
  */
6
- export declare const DATA_ITEM_INDEX_ATTRIBUTE_NAME = "data-recharts-item-index";
7
- /**
8
- * We use this attribute to identify which element is the one that the user is touching.
9
- * DataKey works here as a kind of identifier for the element. It's not a perfect identifier for ~two~ three reasons:
10
- *
11
- * 1. There can be two different elements with the same dataKey; we won't know which is it
12
- * 2. DataKey can be a function, and that serialized will be a `[Function: anonymous]` string
13
- * which means we will be able to identify that it was a function but can't tell which one.
14
- * This will lead to some weird bugs. A proper fix would be to either:
15
- * a) use a unique identifier for each element (passed from props, or generated)
16
- * b) figure out how to compare the dataKey or graphical item by object reference
17
- *
18
- * a) is a fuss because we don't have the unique identifier in props,
19
- * and b) is possible most of the time except for touchMove events which work differently from mouseEnter/mouseLeave:
20
- * - while mouseEnter is fired for the element that the mouse is over,
21
- * touchMove is fired for the element where user has started touching. As the finger moves,
22
- * we can identify the element that the user is touching by using the elementFromPoint method,
23
- * but it keeps calling the handler on the element where touchStart was fired.
24
- *
25
- * Okay and now I discovered a third reason: the dataKey can be undefined and that's still fine
26
- * because if dataKey is undefined then graphical elements assume the dataKey of the axes.
27
- * Which makes it a convenient way of using recharts to render a chart but horrible identifier.
28
- */
29
- export declare const DATA_ITEM_DATAKEY_ATTRIBUTE_NAME = "data-recharts-item-data-key";
6
+ export declare const DATA_ITEM_INDEX_ATTRIBUTE_NAME = "data-v-charts-item-index";
30
7
  export declare const DEFAULT_Y_AXIS_WIDTH = 60;
@@ -1,9 +1,5 @@
1
- import { RechartsScale } from '../types/scale';
1
+ import { RechartsScale } from '../types/scale.js';
2
2
  export type InverseScaleFunction = (pixelValue: number) => unknown;
3
- /**
4
- * Binary search for sorted arrays (ascending or descending).
5
- */
6
- export declare function bisect(haystack: ReadonlyArray<number>, needle: number): number;
7
3
  /**
8
4
  * Creates an inverse scale function for categorical/ordinal scales.
9
5
  * Uses bisect to find the closest domain value for a given pixel coordinate.
@@ -13,4 +9,4 @@ export declare function createCategoricalInverse(scale: RechartsScale | undefine
13
9
  * Creates an inverse function: uses native `.invert` for numeric scales,
14
10
  * falls back to categorical bisect for ordinal/band/point scales.
15
11
  */
16
- export declare function combineInverseScaleFunction(scale: RechartsScale | undefined): InverseScaleFunction | undefined;
12
+ export declare function inverseScaleFunction(scale: RechartsScale | undefined): InverseScaleFunction | undefined;
@@ -1,4 +1,3 @@
1
- export declare function uniqueId(prefix?: string): string;
2
1
  export declare function interpolate(start: unknown, end: number, t: number): number;
3
2
  export declare function interpolate(start: unknown, end: null, t: number): null;
4
3
  export declare function interpolate(start: unknown, end: number | null, t: number): number | null;
@@ -9,5 +9,4 @@ export declare function hasDuplicate(ary: ReadonlyArray<unknown>): boolean;
9
9
  * @return {number} value
10
10
  */
11
11
  export declare function getPercentValue(percent: number | string, totalValue: number, defaultValue?: number, validate?: boolean): number;
12
- export declare function findEntryInArray<T>(ary: ReadonlyArray<T>, specifiedKey: number | string | ((entry: T) => unknown), specifiedValue: unknown): T;
13
- export declare function interpolateNumber(numberA: number | undefined, numberB: number | undefined, t: number): number;
12
+ export declare function findEntryInArray<T>(ary: ReadonlyArray<T>, specifiedKey: number | string | ((entry: T) => unknown), specifiedValue: unknown): T | null | undefined;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * True without a DOM. Only for defaults outside a component, such as text measurement in
3
+ * plain functions; inside setup use `isServerRender()` from model/runtime.
4
+ */
5
+ export declare function isServer(): boolean;
@@ -1,12 +1,19 @@
1
- import { default as EventEmitter } from 'eventemitter3';
2
- import { PayloadAction } from '@reduxjs/toolkit';
3
- import { TooltipSyncState } from '../state/tooltipSlice';
4
- import { BrushStartEndIndex } from '../state/chartDataSlice';
5
- declare const eventCenter: EventEmitter<EventTypes>;
6
- export { eventCenter };
1
+ import { TooltipSyncInteraction } from '../types/tooltip.js';
2
+ import { BrushStartEndIndex } from '../types/chartData.js';
7
3
  export declare const TOOLTIP_SYNC_EVENT = "recharts.syncEvent.tooltip";
8
4
  export declare const BRUSH_SYNC_EVENT = "recharts.syncEvent.brush";
5
+ export type TooltipSyncMessage = TooltipSyncInteraction & {
6
+ kind: 'tooltip';
7
+ };
9
8
  interface EventTypes {
10
- [TOOLTIP_SYNC_EVENT]: (syncId: number | string, data: PayloadAction<TooltipSyncState>, emitter: symbol) => void;
9
+ [TOOLTIP_SYNC_EVENT]: (syncId: number | string, data: TooltipSyncMessage, emitter: symbol) => void;
11
10
  [BRUSH_SYNC_EVENT]: (syncId: number | string, data: BrushStartEndIndex, emitter: symbol) => void;
12
11
  }
12
+ export type SyncEventName = keyof EventTypes;
13
+ export type SyncListener<T extends SyncEventName> = (...args: Parameters<EventTypes[T]>) => void;
14
+ export declare const eventCenter: {
15
+ on<Event extends SyncEventName>(event: Event, listener: SyncListener<NoInfer<Event>>): void;
16
+ off<Event extends SyncEventName>(event: Event, listener: SyncListener<NoInfer<Event>>): void;
17
+ emit<Event extends SyncEventName>(event: Event, ...args: Parameters<EventTypes[NoInfer<Event>]>): void;
18
+ };
19
+ export {};
@@ -1,5 +1,4 @@
1
- import { AxisPropsForCartesianGridTicksGeneration } from '../cartesian/cartesian-grid/type';
2
- import { ChartOffset, TickItem } from '../types';
1
+ import { TickItem } from '../types/index.js';
3
2
  /**
4
3
  * Calculate the Coordinates of grid
5
4
  * @param {Array} ticks The ticks in axis
@@ -9,29 +8,3 @@ import { ChartOffset, TickItem } from '../types';
9
8
  * @return {Array} Coordinates
10
9
  */
11
10
  export declare function getCoordinatesOfGrid(ticks: ReadonlyArray<TickItem>, minValue: number, maxValue: number, syncWithTicks: boolean): number[];
12
- export type HorizontalCoordinatesGenerator = (props: {
13
- yAxis: AxisPropsForCartesianGridTicksGeneration;
14
- width: number;
15
- height: number;
16
- offset: ChartOffset;
17
- }, syncWithTicks: boolean) => number[];
18
- export declare const defaultHorizontalCoordinatesGenerator: HorizontalCoordinatesGenerator;
19
- export type VerticalCoordinatesGenerator = (props: {
20
- xAxis: AxisPropsForCartesianGridTicksGeneration;
21
- width: number;
22
- height: number;
23
- offset: ChartOffset;
24
- }, syncWithTicks: boolean) => number[];
25
- export declare const defaultVerticalCoordinatesGenerator: VerticalCoordinatesGenerator;
26
- export declare function calculateHorizontalPoints(yAxis: AxisPropsForCartesianGridTicksGeneration, width: number, height: number, offset: ChartOffset, syncWithTicks: boolean, customPoints?: number[], horizontalValues?: number[] | string[], horizontalCoordinatesGenerator?: (props: {
27
- yAxis: AxisPropsForCartesianGridTicksGeneration;
28
- width: number;
29
- height: number;
30
- offset: ChartOffset;
31
- }, syncWithTicks: boolean) => number[]): number[];
32
- export declare function calculateVerticalPoints(xAxis: AxisPropsForCartesianGridTicksGeneration, width: number, height: number, offset: ChartOffset, syncWithTicks: boolean, customPoints?: number[], verticalValues?: number[] | string[], verticalCoordinatesGenerator?: (props: {
33
- xAxis: AxisPropsForCartesianGridTicksGeneration;
34
- width: number;
35
- height: number;
36
- offset: ChartOffset;
37
- }, syncWithTicks: boolean) => number[]): number[];