vccs 0.0.1 → 0.2.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 (470) hide show
  1. package/LICENSE +21 -0
  2. package/dist/animation/Animate.d.ts +72 -0
  3. package/dist/cartesian/GraphicalItemClipPath.d.ts +31 -0
  4. package/dist/cartesian/area/ActivePoints.d.ts +77 -0
  5. package/dist/cartesian/area/Area.d.ts +17 -0
  6. package/dist/cartesian/area/ClipRect.d.ts +1 -0
  7. package/dist/cartesian/area/RenderArea.d.ts +16 -0
  8. package/dist/cartesian/area/__stories__/config.d.ts +31 -0
  9. package/dist/cartesian/area/hooks/useArea.d.ts +27 -0
  10. package/dist/cartesian/area/index.d.ts +2 -0
  11. package/dist/cartesian/area/type.d.ts +173 -0
  12. package/dist/cartesian/area/utils.d.ts +19 -0
  13. package/dist/cartesian/axis/XAxis.d.ts +189 -0
  14. package/dist/cartesian/axis/YAxis.d.ts +192 -0
  15. package/dist/cartesian/axis/index.d.ts +2 -0
  16. package/dist/cartesian/axis/type.d.ts +57 -0
  17. package/dist/cartesian/bar/Bar.d.ts +2 -0
  18. package/dist/cartesian/bar/components/BarBackground.d.ts +1 -0
  19. package/dist/cartesian/bar/components/BarRectangles.d.ts +1 -0
  20. package/dist/cartesian/bar/hooks/useBar.d.ts +23 -0
  21. package/dist/cartesian/bar/index.d.ts +1 -0
  22. package/dist/cartesian/bar/type.d.ts +166 -0
  23. package/dist/cartesian/bar/utils.d.ts +31 -0
  24. package/dist/cartesian/brush/Brush.d.ts +2 -0
  25. package/dist/cartesian/brush/components/Background.d.ts +15 -0
  26. package/dist/cartesian/brush/components/BrushText.d.ts +27 -0
  27. package/dist/cartesian/brush/components/Panorama.d.ts +65 -0
  28. package/dist/cartesian/brush/components/Slide.d.ts +20 -0
  29. package/dist/cartesian/brush/components/Traveller.d.ts +13 -0
  30. package/dist/cartesian/brush/components/TravellerLayer.d.ts +22 -0
  31. package/dist/cartesian/brush/hooks/useBrushHandlers.d.ts +25 -0
  32. package/dist/cartesian/brush/hooks/useBrushSetting.d.ts +6 -0
  33. package/dist/cartesian/brush/hooks/useBrushState.d.ts +29 -0
  34. package/dist/cartesian/brush/index.d.ts +2 -0
  35. package/dist/cartesian/brush/type.d.ts +103 -0
  36. package/dist/cartesian/brush/utils.d.ts +15 -0
  37. package/dist/cartesian/cartesian-axis/CartesianAxis.d.ts +209 -0
  38. package/dist/cartesian/cartesian-axis/const.d.ts +24 -0
  39. package/dist/cartesian/cartesian-axis/index.d.ts +1 -0
  40. package/dist/cartesian/cartesian-axis/use-axis-line.d.ts +7 -0
  41. package/dist/cartesian/cartesian-grid/Background.d.ts +18 -0
  42. package/dist/cartesian/cartesian-grid/CartesianGrid.d.ts +75 -0
  43. package/dist/cartesian/cartesian-grid/HorizontalGridLines.d.ts +37 -0
  44. package/dist/cartesian/cartesian-grid/HorizontalStripes.d.ts +20 -0
  45. package/dist/cartesian/cartesian-grid/VerticalGridLines.d.ts +26 -0
  46. package/dist/cartesian/cartesian-grid/VerticalStripes.d.ts +20 -0
  47. package/dist/cartesian/cartesian-grid/const.d.ts +6 -0
  48. package/dist/cartesian/cartesian-grid/index.d.ts +1 -0
  49. package/dist/cartesian/cartesian-grid/type.d.ts +145 -0
  50. package/dist/cartesian/cartesian-grid/utils.d.ts +5 -0
  51. package/dist/cartesian/error-bar/ErrorBar.d.ts +68 -0
  52. package/dist/cartesian/error-bar/ErrorBarContext.d.ts +27 -0
  53. package/dist/cartesian/error-bar/index.d.ts +2 -0
  54. package/dist/cartesian/funnel/Funnel.d.ts +2 -0
  55. package/dist/cartesian/funnel/index.d.ts +2 -0
  56. package/dist/cartesian/funnel/type.d.ts +106 -0
  57. package/dist/cartesian/funnel/utils.d.ts +12 -0
  58. package/dist/cartesian/index.d.ts +12 -0
  59. package/dist/cartesian/line/ActivePoints.d.ts +77 -0
  60. package/dist/cartesian/line/Line.d.ts +87 -0
  61. package/dist/cartesian/line/StaticLine.d.ts +16 -0
  62. package/dist/cartesian/line/hooks/useLine.d.ts +28 -0
  63. package/dist/cartesian/line/index.d.ts +3 -0
  64. package/dist/cartesian/line/type.d.ts +180 -0
  65. package/dist/cartesian/line/utils.d.ts +13 -0
  66. package/dist/cartesian/reference-area/ReferenceArea.d.ts +191 -0
  67. package/dist/cartesian/reference-area/index.d.ts +1 -0
  68. package/dist/cartesian/reference-line/ReferenceLine.d.ts +139 -0
  69. package/dist/cartesian/reference-line/index.d.ts +1 -0
  70. package/dist/cartesian/scatter/Scatter.d.ts +165 -0
  71. package/dist/cartesian/scatter/hooks/useScatter.d.ts +18 -0
  72. package/dist/cartesian/scatter/index.d.ts +1 -0
  73. package/dist/cartesian/type.d.ts +21 -0
  74. package/dist/cartesian/useNeedsClip.d.ts +6 -0
  75. package/dist/cartesian/utils/get-ticks.d.ts +16 -0
  76. package/dist/cartesian/z-axis/ZAxis.d.ts +81 -0
  77. package/dist/cartesian/z-axis/index.d.ts +1 -0
  78. package/dist/chart/AreaChart.d.ts +1 -0
  79. package/dist/chart/BarChart.d.ts +1 -0
  80. package/dist/chart/ComposedChart.d.ts +1 -0
  81. package/dist/chart/FunnelChart.d.ts +1 -0
  82. package/dist/chart/LegendPortalContext.d.ts +3 -0
  83. package/dist/chart/LineChart.d.ts +1 -0
  84. package/dist/chart/PieChart.d.ts +1 -0
  85. package/dist/chart/RadarChart.d.ts +1 -0
  86. package/dist/chart/RadialBarChart.d.ts +1 -0
  87. package/dist/chart/RechartsWrapper.d.ts +99 -0
  88. package/dist/chart/ScatterChart.d.ts +1 -0
  89. package/dist/chart/Surface.d.ts +40 -0
  90. package/dist/chart/TooltipPortalContext.d.ts +2 -0
  91. package/dist/chart/const.d.ts +6 -0
  92. package/dist/chart/generateCategoricalChart.d.ts +118 -0
  93. package/dist/chart/index.d.ts +9 -0
  94. package/dist/chart/provideClipPathId.d.ts +12 -0
  95. package/dist/components/Cell.d.ts +18 -0
  96. package/dist/components/DefaultLegendContent.d.ts +18 -0
  97. package/dist/components/Text.d.ts +149 -0
  98. package/dist/components/Tooltip.d.ts +250 -0
  99. package/dist/components/index.d.ts +4 -0
  100. package/dist/components/label/Label.d.ts +81 -0
  101. package/dist/components/label/LabelList.d.ts +63 -0
  102. package/dist/components/label/index.d.ts +2 -0
  103. package/dist/components/label/types.d.ts +88 -0
  104. package/dist/components/label/utils.d.ts +24 -0
  105. package/dist/components/legend/Legend.d.ts +4 -0
  106. package/dist/components/legend/LegendSymbol.d.ts +27 -0
  107. package/dist/components/legend/hooks/useLegend.d.ts +19 -0
  108. package/dist/components/legend/hooks/useLegendContent.d.ts +36 -0
  109. package/dist/components/legend/index.d.ts +2 -0
  110. package/dist/components/legend/type.d.ts +54 -0
  111. package/dist/components/legend/utils.d.ts +18 -0
  112. package/dist/components/types.d.ts +9 -0
  113. package/dist/components/utils.d.ts +4 -0
  114. package/dist/container/ClipPath.d.ts +12 -0
  115. package/dist/container/Layer.d.ts +2 -0
  116. package/dist/container/ResponsiveContainer.d.ts +50 -0
  117. package/dist/container/RootSurface.d.ts +17 -0
  118. package/dist/container/Surface.d.ts +25 -0
  119. package/dist/container/index.d.ts +1 -0
  120. package/dist/container/useSizeContext.d.ts +11 -0
  121. package/dist/context/ChartDataContextProvider.d.ts +17 -0
  122. package/dist/context/PanoramaContextProvider.d.ts +22 -0
  123. package/dist/context/accessibilityContext.d.ts +1 -0
  124. package/dist/context/cartesianLabelListContext.d.ts +3 -0
  125. package/dist/context/chartLayoutContext.d.ts +8 -0
  126. package/dist/context/cursorLayerContext.d.ts +2 -0
  127. package/dist/context/graphicalLayerContext.d.ts +2 -0
  128. package/dist/context/labelLayerContext.d.ts +2 -0
  129. package/dist/context/polarLabelViewBoxContext.d.ts +4 -0
  130. package/dist/context/useTooltipAxis.d.ts +2 -0
  131. package/dist/es/animation/Animate.mjs +89 -0
  132. package/dist/es/cartesian/GraphicalItemClipPath.mjs +37 -0
  133. package/dist/es/cartesian/area/ActivePoints.mjs +78 -0
  134. package/dist/es/cartesian/area/Area.mjs +52 -0
  135. package/dist/es/cartesian/area/ClipRect.mjs +125 -0
  136. package/dist/es/cartesian/area/RenderArea.mjs +185 -0
  137. package/dist/es/cartesian/area/hooks/useArea.mjs +81 -0
  138. package/dist/es/cartesian/area/type.mjs +136 -0
  139. package/dist/es/cartesian/area/utils.mjs +79 -0
  140. package/dist/es/cartesian/axis/XAxis.mjs +203 -0
  141. package/dist/es/cartesian/axis/YAxis.mjs +192 -0
  142. package/dist/es/cartesian/bar/Bar.mjs +111 -0
  143. package/dist/es/cartesian/bar/components/BarBackground.mjs +32 -0
  144. package/dist/es/cartesian/bar/components/BarRectangles.mjs +143 -0
  145. package/dist/es/cartesian/bar/hooks/useBar.mjs +53 -0
  146. package/dist/es/cartesian/bar/type.mjs +131 -0
  147. package/dist/es/cartesian/bar/utils.mjs +111 -0
  148. package/dist/es/cartesian/cartesian-axis/CartesianAxis.mjs +296 -0
  149. package/dist/es/cartesian/cartesian-grid/Background.mjs +33 -0
  150. package/dist/es/cartesian/cartesian-grid/CartesianGrid.mjs +174 -0
  151. package/dist/es/cartesian/cartesian-grid/HorizontalGridLines.mjs +50 -0
  152. package/dist/es/cartesian/cartesian-grid/HorizontalStripes.mjs +43 -0
  153. package/dist/es/cartesian/cartesian-grid/VerticalGridLines.mjs +45 -0
  154. package/dist/es/cartesian/cartesian-grid/VerticalStripes.mjs +43 -0
  155. package/dist/es/cartesian/cartesian-grid/const.mjs +336 -0
  156. package/dist/es/cartesian/cartesian-grid/utils.mjs +22 -0
  157. package/dist/es/cartesian/error-bar/ErrorBar.mjs +143 -0
  158. package/dist/es/cartesian/error-bar/ErrorBarContext.mjs +20 -0
  159. package/dist/es/cartesian/funnel/Funnel.mjs +177 -0
  160. package/dist/es/cartesian/funnel/type.mjs +80 -0
  161. package/dist/es/cartesian/funnel/utils.mjs +102 -0
  162. package/dist/es/cartesian/line/ActivePoints.mjs +79 -0
  163. package/dist/es/cartesian/line/Line.mjs +50 -0
  164. package/dist/es/cartesian/line/StaticLine.mjs +217 -0
  165. package/dist/es/cartesian/line/hooks/useLine.mjs +69 -0
  166. package/dist/es/cartesian/line/type.mjs +112 -0
  167. package/dist/es/cartesian/line/utils.mjs +34 -0
  168. package/dist/es/cartesian/reference-area/ReferenceArea.mjs +163 -0
  169. package/dist/es/cartesian/reference-line/ReferenceLine.mjs +165 -0
  170. package/dist/es/cartesian/scatter/Scatter.mjs +280 -0
  171. package/dist/es/cartesian/scatter/hooks/useScatter.mjs +23 -0
  172. package/dist/es/cartesian/useNeedsClip.mjs +23 -0
  173. package/dist/es/cartesian/utils/get-ticks.mjs +118 -0
  174. package/dist/es/cartesian/z-axis/ZAxis.mjs +72 -0
  175. package/dist/es/chart/AreaChart.mjs +9 -0
  176. package/dist/es/chart/BarChart.mjs +10 -0
  177. package/dist/es/chart/ComposedChart.mjs +10 -0
  178. package/dist/es/chart/FunnelChart.mjs +11 -0
  179. package/dist/es/chart/LegendPortalContext.mjs +5 -0
  180. package/dist/es/chart/LineChart.mjs +10 -0
  181. package/dist/es/chart/PieChart.mjs +16 -0
  182. package/dist/es/chart/RadarChart.mjs +16 -0
  183. package/dist/es/chart/RadialBarChart.mjs +16 -0
  184. package/dist/es/chart/RechartsWrapper.mjs +160 -0
  185. package/dist/es/chart/ScatterChart.mjs +10 -0
  186. package/dist/es/chart/Surface.mjs +5 -0
  187. package/dist/es/chart/Surface.vue_vue_type_script_setup_true_lang.mjs +72 -0
  188. package/dist/es/chart/TooltipPortalContext.mjs +5 -0
  189. package/dist/es/chart/const.mjs +7 -0
  190. package/dist/es/chart/generateCategoricalChart.mjs +175 -0
  191. package/dist/es/chart/provideClipPathId.mjs +15 -0
  192. package/dist/es/components/Cell.mjs +23 -0
  193. package/dist/es/components/Text.mjs +5 -0
  194. package/dist/es/components/Text.vue_vue_type_script_setup_true_lang.mjs +191 -0
  195. package/dist/es/components/Tooltip.mjs +463 -0
  196. package/dist/es/components/label/Label.mjs +40 -0
  197. package/dist/es/components/label/LabelList.mjs +55 -0
  198. package/dist/es/components/label/types.mjs +38 -0
  199. package/dist/es/components/label/utils.mjs +265 -0
  200. package/dist/es/components/legend/Legend.mjs +93 -0
  201. package/dist/es/components/legend/LegendSymbol.mjs +62 -0
  202. package/dist/es/components/legend/hooks/useLegend.mjs +72 -0
  203. package/dist/es/components/legend/hooks/useLegendContent.mjs +68 -0
  204. package/dist/es/components/legend/type.mjs +41 -0
  205. package/dist/es/components/legend/utils.mjs +25 -0
  206. package/dist/es/components/utils.mjs +44 -0
  207. package/dist/es/container/ClipPath.mjs +25 -0
  208. package/dist/es/container/Layer.mjs +14 -0
  209. package/dist/es/container/ResponsiveContainer.mjs +5 -0
  210. package/dist/es/container/ResponsiveContainer.vue_vue_type_script_setup_true_lang.mjs +144 -0
  211. package/dist/es/container/Surface.mjs +62 -0
  212. package/dist/es/container/useSizeContext.mjs +5 -0
  213. package/dist/es/context/ChartDataContextProvider.mjs +27 -0
  214. package/dist/es/context/PanoramaContextProvider.mjs +24 -0
  215. package/dist/es/context/accessibilityContext.mjs +5 -0
  216. package/dist/es/context/cartesianLabelListContext.mjs +5 -0
  217. package/dist/es/context/chartLayoutContext.mjs +49 -0
  218. package/dist/es/context/cursorLayerContext.mjs +5 -0
  219. package/dist/es/context/graphicalLayerContext.mjs +5 -0
  220. package/dist/es/context/labelLayerContext.mjs +5 -0
  221. package/dist/es/context/polarLabelViewBoxContext.mjs +8 -0
  222. package/dist/es/context/useTooltipAxis.mjs +17 -0
  223. package/dist/es/events/useChartSynchronisation.mjs +113 -0
  224. package/dist/es/hooks/useIsAnimating.mjs +28 -0
  225. package/dist/es/hooks/useSetupGraphicalItem.mjs +66 -0
  226. package/dist/es/index.mjs +46 -0
  227. package/dist/es/polar/pie/Pie.mjs +161 -0
  228. package/dist/es/polar/pie/type.mjs +97 -0
  229. package/dist/es/polar/radar/PolarAngleAxis.mjs +180 -0
  230. package/dist/es/polar/radar/PolarGrid.mjs +115 -0
  231. package/dist/es/polar/radar/PolarRadiusAxis.mjs +162 -0
  232. package/dist/es/polar/radar/Radar.mjs +284 -0
  233. package/dist/es/polar/radial-bar/RadialBar.mjs +197 -0
  234. package/dist/es/polar/radial-bar/type.mjs +97 -0
  235. package/dist/es/shape/Cross.mjs +16 -0
  236. package/dist/es/shape/Curve.mjs +86 -0
  237. package/dist/es/shape/Dot.mjs +24 -0
  238. package/dist/es/shape/Rectangle.mjs +83 -0
  239. package/dist/es/shape/Sector.mjs +156 -0
  240. package/dist/es/shape/Symbols.mjs +52 -0
  241. package/dist/es/shape/Trapezoid.mjs +52 -0
  242. package/dist/es/state/ReportChartProps.mjs +64 -0
  243. package/dist/es/state/ReportMainChartProps.mjs +46 -0
  244. package/dist/es/state/ReportPolarOptions.mjs +56 -0
  245. package/dist/es/state/SetGraphicalItem.mjs +49 -0
  246. package/dist/es/state/SetLegendPayload.mjs +20 -0
  247. package/dist/es/state/SetTooltipEntrySettings.mjs +19 -0
  248. package/dist/es/state/brushSlice.mjs +26 -0
  249. package/dist/es/state/cartesianAxisSlice.mjs +39 -0
  250. package/dist/es/state/chartDataSlice.mjs +33 -0
  251. package/dist/es/state/externalEventsMiddleware.mjs +30 -0
  252. package/dist/es/state/graphicalItemsSlice.mjs +47 -0
  253. package/dist/es/state/hooks.mjs +6 -0
  254. package/dist/es/state/keyboardEventsMiddleware.mjs +63 -0
  255. package/dist/es/state/layoutSlice.mjs +39 -0
  256. package/dist/es/state/legendSlice.mjs +40 -0
  257. package/dist/es/state/mouseEventsMiddleware.mjs +41 -0
  258. package/dist/es/state/optionsSlice.mjs +25 -0
  259. package/dist/es/state/polarAxisSlice.mjs +28 -0
  260. package/dist/es/state/polarOptionsSlice.mjs +13 -0
  261. package/dist/es/state/reduxDevtoolsJsonStringifyReplacer.mjs +8 -0
  262. package/dist/es/state/referenceElementsSlice.mjs +36 -0
  263. package/dist/es/state/rootPropsSlice.mjs +32 -0
  264. package/dist/es/state/selectors/areaSelectors.mjs +77 -0
  265. package/dist/es/state/selectors/axisSelectors.mjs +879 -0
  266. package/dist/es/state/selectors/barSelectors.mjs +241 -0
  267. package/dist/es/state/selectors/brushSelectors.mjs +18 -0
  268. package/dist/es/state/selectors/combiners/combineActiveLabel.mjs +9 -0
  269. package/dist/es/state/selectors/combiners/combineActiveTooltipIndex.mjs +43 -0
  270. package/dist/es/state/selectors/combiners/combineAxisRangeWithReverse.mjs +8 -0
  271. package/dist/es/state/selectors/combiners/combineCoordinateForDefaultIndex.mjs +21 -0
  272. package/dist/es/state/selectors/combiners/combineTooltipInteractionState.mjs +37 -0
  273. package/dist/es/state/selectors/combiners/combineTooltipPayloadConfigurations.mjs +13 -0
  274. package/dist/es/state/selectors/common.mjs +4 -0
  275. package/dist/es/state/selectors/containerSelectors.mjs +7 -0
  276. package/dist/es/state/selectors/dataSelectors.mjs +35 -0
  277. package/dist/es/state/selectors/funnelSelectors.mjs +38 -0
  278. package/dist/es/state/selectors/legendSelectors.mjs +10 -0
  279. package/dist/es/state/selectors/lineSelectors.mjs +64 -0
  280. package/dist/es/state/selectors/pickAxisId.mjs +4 -0
  281. package/dist/es/state/selectors/pickAxisType.mjs +4 -0
  282. package/dist/es/state/selectors/pieSelectors.mjs +132 -0
  283. package/dist/es/state/selectors/polarAxisSelectors.mjs +167 -0
  284. package/dist/es/state/selectors/polarGridSelectors.mjs +19 -0
  285. package/dist/es/state/selectors/polarScaleSelectors.mjs +55 -0
  286. package/dist/es/state/selectors/polarSelectors.mjs +81 -0
  287. package/dist/es/state/selectors/radarSelectors.mjs +133 -0
  288. package/dist/es/state/selectors/radialBarSelectors.mjs +259 -0
  289. package/dist/es/state/selectors/rootPropsSelectors.mjs +14 -0
  290. package/dist/es/state/selectors/scatterSelectors.mjs +134 -0
  291. package/dist/es/state/selectors/selectActivePropsFromChartPointer.mjs +20 -0
  292. package/dist/es/state/selectors/selectAllAxes.mjs +10 -0
  293. package/dist/es/state/selectors/selectChartOffset.mjs +69 -0
  294. package/dist/es/state/selectors/selectChartOffsetInternal.mjs +66 -0
  295. package/dist/es/state/selectors/selectTooltipEventType.mjs +22 -0
  296. package/dist/es/state/selectors/selectTooltipPayloadSearcher.mjs +6 -0
  297. package/dist/es/state/selectors/selectTooltipSettings.mjs +4 -0
  298. package/dist/es/state/selectors/selectTooltipState.mjs +4 -0
  299. package/dist/es/state/selectors/selectors.mjs +104 -0
  300. package/dist/es/state/selectors/tooltipSelectors.mjs +269 -0
  301. package/dist/es/state/selectors/touchSelectors.mjs +19 -0
  302. package/dist/es/state/store.mjs +55 -0
  303. package/dist/es/state/tooltipSlice.mjs +102 -0
  304. package/dist/es/state/touchEventsMiddleware.mjs +44 -0
  305. package/dist/es/state/utils/useReportScale.mjs +19 -0
  306. package/dist/es/synchronisation/syncSelectors.mjs +6 -0
  307. package/dist/es/synchronisation/useChartSynchronisation.mjs +38 -0
  308. package/dist/es/types/event.mjs +166 -0
  309. package/dist/es/utils/ReduceCSSCalc.mjs +114 -0
  310. package/dist/es/utils/VueUtils.mjs +39 -0
  311. package/dist/es/utils/attrs.mjs +69 -0
  312. package/dist/es/utils/cartesian.mjs +54 -0
  313. package/dist/es/utils/chart.mjs +366 -0
  314. package/dist/es/utils/const.mjs +32 -0
  315. package/dist/es/utils/createContext.mjs +31 -0
  316. package/dist/es/utils/data-utils.mjs +13 -0
  317. package/dist/es/utils/data.mjs +41 -0
  318. package/dist/es/utils/events.mjs +7 -0
  319. package/dist/es/utils/getLinearRegression.mjs +34 -0
  320. package/dist/es/utils/grid.mjs +23 -0
  321. package/dist/es/utils/isDomainSpecifiedByUser.mjs +116 -0
  322. package/dist/es/utils/legend.mjs +19 -0
  323. package/dist/es/utils/log.mjs +14 -0
  324. package/dist/es/utils/payload/getUniqPayload.mjs +9 -0
  325. package/dist/es/utils/polar.mjs +59 -0
  326. package/dist/es/utils/props.mjs +20 -0
  327. package/dist/es/utils/resolveDefaultProps.mjs +26 -0
  328. package/dist/es/utils/scale/getNiceTickValues.mjs +137 -0
  329. package/dist/es/utils/scale/utils/arithmetic.mjs +54 -0
  330. package/dist/es/utils/scale/utils/utils.mjs +53 -0
  331. package/dist/es/utils/style.mjs +30 -0
  332. package/dist/es/utils/tick.mjs +42 -0
  333. package/dist/es/utils/tooltip/translate.mjs +73 -0
  334. package/dist/es/utils/validate.mjs +42 -0
  335. package/dist/events/useChartSynchronisation.d.ts +8 -0
  336. package/dist/hooks/useIsAnimating.d.ts +14 -0
  337. package/dist/hooks/useSetupGraphicalItem.d.ts +7 -0
  338. package/dist/index.d.ts +6 -0
  339. package/dist/polar/index.d.ts +3 -0
  340. package/dist/polar/pie/Pie.d.ts +2 -0
  341. package/dist/polar/pie/index.d.ts +2 -0
  342. package/dist/polar/pie/type.d.ts +88 -0
  343. package/dist/polar/radar/PolarAngleAxis.d.ts +145 -0
  344. package/dist/polar/radar/PolarGrid.d.ts +77 -0
  345. package/dist/polar/radar/PolarRadiusAxis.d.ts +125 -0
  346. package/dist/polar/radar/Radar.d.ts +160 -0
  347. package/dist/polar/radar/index.d.ts +4 -0
  348. package/dist/polar/radial-bar/RadialBar.d.ts +2 -0
  349. package/dist/polar/radial-bar/index.d.ts +2 -0
  350. package/dist/polar/radial-bar/type.d.ts +96 -0
  351. package/dist/shape/Cross.d.ts +10 -0
  352. package/dist/shape/Curve.d.ts +42 -0
  353. package/dist/shape/Dot.d.ts +18 -0
  354. package/dist/shape/Rectangle.d.ts +33 -0
  355. package/dist/shape/Sector.d.ts +48 -0
  356. package/dist/shape/Symbols.d.ts +15 -0
  357. package/dist/shape/Trapezoid.d.ts +31 -0
  358. package/dist/shape/index.d.ts +9 -0
  359. package/dist/shape/types.d.ts +20 -0
  360. package/dist/state/ReportBar.d.ts +1 -0
  361. package/dist/state/ReportChartProps.d.ts +88 -0
  362. package/dist/state/ReportMainChartProps.d.ts +37 -0
  363. package/dist/state/ReportPolarOptions.d.ts +59 -0
  364. package/dist/state/SetGraphicalItem.d.ts +9 -0
  365. package/dist/state/SetLegendPayload.d.ts +3 -0
  366. package/dist/state/SetTooltipEntrySettings.d.ts +8 -0
  367. package/dist/state/brushSlice.d.ts +18 -0
  368. package/dist/state/cartesianAxisSlice.d.ts +88 -0
  369. package/dist/state/chartDataSlice.d.ts +44 -0
  370. package/dist/state/externalEventsMiddleware.d.ts +17 -0
  371. package/dist/state/graphicalItemsSlice.d.ts +108 -0
  372. package/dist/state/hooks.d.ts +54 -0
  373. package/dist/state/keyboardEventsMiddleware.d.ts +3 -0
  374. package/dist/state/layoutSlice.d.ts +15 -0
  375. package/dist/state/legendSlice.d.ts +26 -0
  376. package/dist/state/mouseEventsMiddleware.d.ts +5 -0
  377. package/dist/state/optionsSlice.d.ts +27 -0
  378. package/dist/state/polarAxisSlice.d.ts +10 -0
  379. package/dist/state/polarOptionsSlice.d.ts +10 -0
  380. package/dist/state/reduxDevtoolsJsonStringifyReplacer.d.ts +1 -0
  381. package/dist/state/referenceElementsSlice.d.ts +40 -0
  382. package/dist/state/rootPropsSlice.d.ts +26 -0
  383. package/dist/state/selectors/areaSelectors.d.ts +24 -0
  384. package/dist/state/selectors/axisSelectors.d.ts +1828 -0
  385. package/dist/state/selectors/barSelectors.d.ts +944 -0
  386. package/dist/state/selectors/brushSelectors.d.ts +10 -0
  387. package/dist/state/selectors/combiners/combineActiveLabel.d.ts +3 -0
  388. package/dist/state/selectors/combiners/combineActiveTooltipIndex.d.ts +5 -0
  389. package/dist/state/selectors/combiners/combineAxisRangeWithReverse.d.ts +3 -0
  390. package/dist/state/selectors/combiners/combineCoordinateForDefaultIndex.d.ts +3 -0
  391. package/dist/state/selectors/combiners/combineTooltipInteractionState.d.ts +3 -0
  392. package/dist/state/selectors/combiners/combineTooltipPayloadConfigurations.d.ts +3 -0
  393. package/dist/state/selectors/common.d.ts +2 -0
  394. package/dist/state/selectors/containerSelectors.d.ts +6 -0
  395. package/dist/state/selectors/dataSelectors.d.ts +23 -0
  396. package/dist/state/selectors/funnelSelectors.d.ts +69 -0
  397. package/dist/state/selectors/legendSelectors.d.ts +7 -0
  398. package/dist/state/selectors/lineSelectors.d.ts +123 -0
  399. package/dist/state/selectors/pickAxisId.d.ts +3 -0
  400. package/dist/state/selectors/pickAxisType.d.ts +2 -0
  401. package/dist/state/selectors/pieSelectors.d.ts +55 -0
  402. package/dist/state/selectors/polarAxisSelectors.d.ts +49 -0
  403. package/dist/state/selectors/polarGridSelectors.d.ts +118 -0
  404. package/dist/state/selectors/polarScaleSelectors.d.ts +9 -0
  405. package/dist/state/selectors/polarSelectors.d.ts +70 -0
  406. package/dist/state/selectors/radarSelectors.d.ts +76 -0
  407. package/dist/state/selectors/radialBarSelectors.d.ts +61 -0
  408. package/dist/state/selectors/rootPropsSelectors.d.ts +11 -0
  409. package/dist/state/selectors/scatterSelectors.d.ts +21 -0
  410. package/dist/state/selectors/selectActivePropsFromChartPointer.d.ts +382 -0
  411. package/dist/state/selectors/selectAllAxes.d.ts +4 -0
  412. package/dist/state/selectors/selectChartOffset.d.ts +116 -0
  413. package/dist/state/selectors/selectChartOffsetInternal.d.ts +9 -0
  414. package/dist/state/selectors/selectTooltipEventType.d.ts +8 -0
  415. package/dist/state/selectors/selectTooltipPayloadSearcher.d.ts +3 -0
  416. package/dist/state/selectors/selectTooltipSettings.d.ts +3 -0
  417. package/dist/state/selectors/selectTooltipState.d.ts +3 -0
  418. package/dist/state/selectors/selectors.d.ts +184 -0
  419. package/dist/state/selectors/tooltipSelectors.d.ts +581 -0
  420. package/dist/state/selectors/touchSelectors.d.ts +4 -0
  421. package/dist/state/store.d.ts +74 -0
  422. package/dist/state/tooltipSlice.d.ts +204 -0
  423. package/dist/state/touchEventsMiddleware.d.ts +2 -0
  424. package/dist/state/utils/useReportScale.d.ts +1 -0
  425. package/dist/synchronisation/syncSelectors.d.ts +3 -0
  426. package/dist/synchronisation/useChartSynchronisation.d.ts +11 -0
  427. package/dist/types/area.d.ts +8 -0
  428. package/dist/types/axis.d.ts +127 -0
  429. package/dist/types/bar.d.ts +51 -0
  430. package/dist/types/categorical.d.ts +36 -0
  431. package/dist/types/common.d.ts +129 -0
  432. package/dist/types/event.d.ts +16 -0
  433. package/dist/types/index.d.ts +4 -0
  434. package/dist/types/legend.d.ts +1 -0
  435. package/dist/types/offset.d.ts +8 -0
  436. package/dist/types/radar.d.ts +28 -0
  437. package/dist/types/scale.d.ts +11 -0
  438. package/dist/types/tick.d.ts +55 -0
  439. package/dist/types/tooltip.d.ts +33 -0
  440. package/dist/utils/ReduceCSSCalc.d.ts +2 -0
  441. package/dist/utils/VueUtils.d.ts +11 -0
  442. package/dist/utils/attrs.d.ts +46 -0
  443. package/dist/utils/cartesian.d.ts +20 -0
  444. package/dist/utils/chart.d.ts +99 -0
  445. package/dist/utils/const.d.ts +30 -0
  446. package/dist/utils/context.d.ts +8 -0
  447. package/dist/utils/createContext.d.ts +8 -0
  448. package/dist/utils/data-utils.d.ts +4 -0
  449. package/dist/utils/data.d.ts +13 -0
  450. package/dist/utils/events.d.ts +12 -0
  451. package/dist/utils/getLinearRegression.d.ts +15 -0
  452. package/dist/utils/getRelativeCoordinate.d.ts +11 -0
  453. package/dist/utils/grid.d.ts +37 -0
  454. package/dist/utils/index.d.ts +4 -0
  455. package/dist/utils/isDomainSpecifiedByUser.d.ts +47 -0
  456. package/dist/utils/legend.d.ts +3 -0
  457. package/dist/utils/log.d.ts +1 -0
  458. package/dist/utils/payload/getUniqPayload.d.ts +4 -0
  459. package/dist/utils/polar.d.ts +21 -0
  460. package/dist/utils/props.d.ts +15 -0
  461. package/dist/utils/resolveDefaultProps.d.ts +52 -0
  462. package/dist/utils/scale/getNiceTickValues.d.ts +61 -0
  463. package/dist/utils/scale/utils/arithmetic.d.ts +50 -0
  464. package/dist/utils/scale/utils/utils.d.ts +9 -0
  465. package/dist/utils/style.d.ts +12 -0
  466. package/dist/utils/tick.d.ts +19 -0
  467. package/dist/utils/tooltip/translate.d.ts +47 -0
  468. package/dist/utils/types.d.ts +14 -0
  469. package/dist/utils/validate.d.ts +25 -0
  470. package/package.json +27 -10
@@ -0,0 +1,9 @@
1
+ import { Coordinate } from '../types';
2
+ export type RadialCursorPoints = {
3
+ points: [startPoint: Coordinate, endPoint: Coordinate];
4
+ cx?: number;
5
+ cy?: number;
6
+ radius?: number;
7
+ startAngle?: number;
8
+ endAngle?: number;
9
+ };
@@ -0,0 +1,4 @@
1
+ import { RadialCursorPoints } from './types';
2
+ import { ChartCoordinate, Coordinate, LayoutType } from '../types';
3
+ import { ChartOffsetInternal } from '../utils/types';
4
+ export declare function getCursorPoints(layout: LayoutType, activeCoordinate: ChartCoordinate, offset: ChartOffsetInternal): [Coordinate, Coordinate] | RadialCursorPoints;
@@ -0,0 +1,12 @@
1
+ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ clipPathId: {
3
+ type: StringConstructor;
4
+ required: true;
5
+ };
6
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
7
+ clipPathId: {
8
+ type: StringConstructor;
9
+ required: true;
10
+ };
11
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
12
+ export default _default;
@@ -0,0 +1,2 @@
1
+ import { SVGAttributes } from 'vue';
2
+ export declare const Layer: import('vue').DefineComponent<SVGAttributes, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SVGAttributes> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,50 @@
1
+ import { CSSProperties, VNode } from 'vue';
2
+ export interface ResponsiveContainerProps {
3
+ aspect?: number;
4
+ width?: string | number;
5
+ height?: string | number;
6
+ minWidth?: string | number;
7
+ minHeight?: string | number;
8
+ initialDimension?: {
9
+ width: number;
10
+ height: number;
11
+ };
12
+ maxHeight?: number;
13
+ debounce?: number;
14
+ id?: string | number;
15
+ class?: string | number;
16
+ style?: Omit<CSSProperties, keyof ResponsiveContainerProps>;
17
+ onResize?: (width: number, height: number) => void;
18
+ }
19
+ declare function __VLS_template(): {
20
+ attrs: Partial<{}>;
21
+ slots: Readonly<{
22
+ default: () => VNode[];
23
+ }> & {
24
+ default: () => VNode[];
25
+ };
26
+ refs: {
27
+ containerRef: HTMLDivElement;
28
+ };
29
+ rootEl: any;
30
+ };
31
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
32
+ declare const __VLS_component: import('vue').DefineComponent<ResponsiveContainerProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ResponsiveContainerProps> & Readonly<{}>, {
33
+ width: string | number;
34
+ height: string | number;
35
+ minWidth: string | number;
36
+ initialDimension: {
37
+ width: number;
38
+ height: number;
39
+ };
40
+ debounce: number;
41
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {
42
+ containerRef: HTMLDivElement;
43
+ }, any>;
44
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
45
+ export default _default;
46
+ type __VLS_WithTemplateSlots<T, S> = T & {
47
+ new (): {
48
+ $slots: S;
49
+ };
50
+ };
@@ -0,0 +1,17 @@
1
+ export declare const RootSurface: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
2
+ title: StringConstructor;
3
+ desc: StringConstructor;
4
+ otherAttributes: {
5
+ type: ObjectConstructor;
6
+ default: () => {};
7
+ };
8
+ }>, () => import("vue/jsx-runtime").JSX.Element, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
9
+ title: StringConstructor;
10
+ desc: StringConstructor;
11
+ otherAttributes: {
12
+ type: ObjectConstructor;
13
+ default: () => {};
14
+ };
15
+ }>> & Readonly<{}>, {
16
+ otherAttributes: Record<string, any>;
17
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,25 @@
1
+ import { CSSProperties, SVGAttributes } from 'vue';
2
+ interface ViewBox {
3
+ x?: number;
4
+ y?: number;
5
+ width?: number;
6
+ height?: number;
7
+ }
8
+ declare const Surface: import('vue').DefineComponent<Omit<SVGAttributes, "viewBox"> & {
9
+ width: number;
10
+ height: number;
11
+ viewBox?: ViewBox;
12
+ class?: string;
13
+ style?: CSSProperties;
14
+ title?: string;
15
+ desc?: string;
16
+ }, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<Omit<SVGAttributes, "viewBox"> & {
17
+ width: number;
18
+ height: number;
19
+ viewBox?: ViewBox;
20
+ class?: string;
21
+ style?: CSSProperties;
22
+ title?: string;
23
+ desc?: string;
24
+ }> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
25
+ export default Surface;
@@ -0,0 +1 @@
1
+ export { default as ResponsiveContainer, type ResponsiveContainerProps } from './ResponsiveContainer';
@@ -0,0 +1,11 @@
1
+ import { Ref } from 'vue';
2
+ export interface SizeContextValue {
3
+ sizes: Ref<{
4
+ width: number;
5
+ height: number;
6
+ }>;
7
+ calculatedWidth: Ref<number>;
8
+ calculatedHeight: Ref<number>;
9
+ }
10
+ declare const useSizeContext: <T extends SizeContextValue = SizeContextValue>(fallback?: T) => T extends null ? SizeContextValue : SizeContextValue, provideSizeContext: (contextValue: SizeContextValue) => SizeContextValue;
11
+ export { provideSizeContext, useSizeContext };
@@ -0,0 +1,17 @@
1
+ import { PropType } from 'vue';
2
+ import { ChartData } from '../state/chartDataSlice';
3
+ /**
4
+ * ChartDataContextProvider for Vue
5
+ * Sets chartData in store on mount/update, clears on unmount. Renders nothing.
6
+ */
7
+ export declare const ChartDataContextProvider: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
8
+ chartData: {
9
+ type: PropType<ChartData>;
10
+ required: true;
11
+ };
12
+ }>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
13
+ chartData: {
14
+ type: PropType<ChartData>;
15
+ required: true;
16
+ };
17
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * useIsPanorama composable
3
+ * Returns the injected isPanorama value (default: false)
4
+ */
5
+ export declare function useIsPanorama(): boolean;
6
+ /**
7
+ * PanoramaContextProvider for Vue
8
+ * Provides isPanorama to descendants via provide/inject. Renders slot.
9
+ */
10
+ export declare const PanoramaContextProvider: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
11
+ isPanorama: {
12
+ type: BooleanConstructor;
13
+ required: true;
14
+ };
15
+ }>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
16
+ [key: string]: any;
17
+ }>[], {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
18
+ isPanorama: {
19
+ type: BooleanConstructor;
20
+ required: true;
21
+ };
22
+ }>> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
@@ -0,0 +1 @@
1
+ export declare const useAccessibilityLayer: () => Readonly<import('vue').ShallowRef<boolean>>;
@@ -0,0 +1,3 @@
1
+ import { Ref } from 'vue';
2
+ import { Data } from '../components/label/types';
3
+ export declare const useCartesianLabelListData: <T extends Ref<readonly Data[], readonly Data[]> = Ref<readonly Data[], readonly Data[]>>(fallback?: T) => T extends null ? Ref<readonly Data[], readonly Data[]> : Ref<readonly Data[], readonly Data[]>, provideCartesianLabelListData: (contextValue: Ref<readonly Data[], readonly Data[]>) => Ref<readonly Data[], readonly Data[]>;
@@ -0,0 +1,8 @@
1
+ import { Margin } from '../types';
2
+ export declare function useOffset(): Readonly<import('vue').ShallowRef<Required<import('../types').ChartOffset>>>;
3
+ export declare const useChartLayout: () => Readonly<import('vue').ShallowRef<import('../types').LayoutType>>;
4
+ export declare function useViewBox(): import('vue').ComputedRef<Required<import('../cartesian/type').CartesianViewBox>>;
5
+ export declare function useChartWidth(): Readonly<import('vue').ShallowRef<number>>;
6
+ export declare function useChartHeight(): Readonly<import('vue').ShallowRef<number>>;
7
+ export declare function useOffsetInternal(): Readonly<import('vue').ShallowRef<import('../utils/types').ChartOffsetInternal>>;
8
+ export declare function useMargin(): Readonly<import('vue').ShallowRef<Margin>>;
@@ -0,0 +1,2 @@
1
+ import { Ref } from 'vue';
2
+ export declare const useCursorLayerRef: <T extends Ref<SVGGElement, SVGGElement> = Ref<SVGGElement, SVGGElement>>(fallback?: T) => T extends null ? Ref<SVGGElement, SVGGElement> : Ref<SVGGElement, SVGGElement>, provideCursorLayerRef: (contextValue: Ref<SVGGElement, SVGGElement>) => Ref<SVGGElement, SVGGElement>;
@@ -0,0 +1,2 @@
1
+ import { Ref } from 'vue';
2
+ export declare const useGraphicalLayerRef: <T extends Ref<SVGGElement, SVGGElement> = Ref<SVGGElement, SVGGElement>>(fallback?: T) => T extends null ? Ref<SVGGElement, SVGGElement> : Ref<SVGGElement, SVGGElement>, provideGraphicalLayerRef: (contextValue: Ref<SVGGElement, SVGGElement>) => Ref<SVGGElement, SVGGElement>;
@@ -0,0 +1,2 @@
1
+ import { Ref } from 'vue';
2
+ export declare const useLabelLayerRef: <T extends Ref<SVGGElement, SVGGElement> = Ref<SVGGElement, SVGGElement>>(fallback?: T) => T extends null ? Ref<SVGGElement, SVGGElement> : Ref<SVGGElement, SVGGElement>, provideLabelLayerRef: (contextValue: Ref<SVGGElement, SVGGElement>) => Ref<SVGGElement, SVGGElement>;
@@ -0,0 +1,4 @@
1
+ import { ComputedRef, InjectionKey } from 'vue';
2
+ import { PolarViewBox } from '../cartesian/type';
3
+ export declare const POLAR_LABEL_VIEW_BOX_KEY: InjectionKey<ComputedRef<PolarViewBox | undefined>>;
4
+ export declare function usePolarLabelViewBox(): ComputedRef<PolarViewBox | undefined>;
@@ -0,0 +1,2 @@
1
+ export declare const useTooltipAxis: () => Readonly<import('vue').ShallowRef<import('../state/selectors/axisSelectors').AxisWithTicksSettings>>;
2
+ export declare function useTooltipAxisBandSize(): import('vue').ComputedRef<number>;
@@ -0,0 +1,89 @@
1
+ import { defineComponent, onUnmounted, ref, watch } from "vue";
2
+ import { animate } from "motion-v";
3
+ import { usePreferredReducedMotion } from "@vueuse/core";
4
+ //#region src/animation/Animate.tsx
5
+ var DEFAULT_TRANSITION = {
6
+ duration: .4,
7
+ ease: "easeOut"
8
+ };
9
+ var Animate = /* @__PURE__ */ defineComponent({
10
+ name: "Animate",
11
+ props: {
12
+ isActive: {
13
+ type: Boolean,
14
+ default: true
15
+ },
16
+ transition: {
17
+ type: Object,
18
+ default: void 0
19
+ },
20
+ onAnimationStart: {
21
+ type: Function,
22
+ default: void 0
23
+ },
24
+ onAnimationEnd: {
25
+ type: Function,
26
+ default: void 0
27
+ },
28
+ onUpdate: {
29
+ type: Function,
30
+ default: void 0
31
+ },
32
+ from: {
33
+ type: Number,
34
+ default: 0
35
+ },
36
+ to: {
37
+ type: Number,
38
+ default: 1
39
+ }
40
+ },
41
+ setup(props, { slots }) {
42
+ let animationControls = null;
43
+ const currentValue = ref(0);
44
+ const reducedMotion = usePreferredReducedMotion();
45
+ const startAnimation = () => {
46
+ if (animationControls) animationControls.stop();
47
+ if (props.onAnimationStart) props.onAnimationStart();
48
+ animationControls = animate(props.from, props.to, {
49
+ ...DEFAULT_TRANSITION,
50
+ ...props.transition,
51
+ onUpdate: (latest) => {
52
+ currentValue.value = latest;
53
+ if (props.onUpdate) props.onUpdate(latest);
54
+ },
55
+ onComplete: () => {
56
+ currentValue.value = 1;
57
+ if (props.onAnimationEnd) props.onAnimationEnd();
58
+ }
59
+ });
60
+ };
61
+ const stopAnimation = () => {
62
+ if (animationControls) {
63
+ animationControls.stop();
64
+ animationControls = null;
65
+ }
66
+ };
67
+ watch([() => props.isActive, reducedMotion], ([isActive, motion]) => {
68
+ if (isActive) if (motion === "reduce") {
69
+ stopAnimation();
70
+ if (props.onAnimationStart) props.onAnimationStart();
71
+ currentValue.value = props.to;
72
+ if (props.onAnimationEnd) props.onAnimationEnd();
73
+ } else startAnimation();
74
+ else {
75
+ stopAnimation();
76
+ currentValue.value = props.to;
77
+ }
78
+ }, { immediate: true });
79
+ onUnmounted(() => {
80
+ stopAnimation();
81
+ });
82
+ return () => {
83
+ if (!slots.default) return null;
84
+ return slots.default(currentValue.value);
85
+ };
86
+ }
87
+ });
88
+ //#endregion
89
+ export { Animate };
@@ -0,0 +1,37 @@
1
+ import { useOffset } from "../context/chartLayoutContext.mjs";
2
+ import { useNeedsClip } from "./useNeedsClip.mjs";
3
+ import { createVNode, defineComponent } from "vue";
4
+ //#region src/cartesian/GraphicalItemClipPath.tsx
5
+ var GraphicalItemClipPath = /* @__PURE__ */ defineComponent({
6
+ name: "GraphicalItemClipPath",
7
+ props: {
8
+ xAxisId: {
9
+ type: [String, Number],
10
+ default: 0
11
+ },
12
+ yAxisId: {
13
+ type: [String, Number],
14
+ default: 0
15
+ },
16
+ clipPathId: {
17
+ type: String,
18
+ required: true
19
+ }
20
+ },
21
+ setup(props) {
22
+ const offset = useOffset();
23
+ const { needClipX, needClipY, needClip } = useNeedsClip(props.xAxisId, props.yAxisId);
24
+ return () => {
25
+ if (!needClip) return null;
26
+ const { left, top, width, height } = offset.value;
27
+ return createVNode("clipPath", { "id": `clipPath-${props.clipPathId}` }, [createVNode("rect", {
28
+ "x": needClipX ? left : left - width / 2,
29
+ "y": needClipY ? top : top - height / 2,
30
+ "width": needClipX ? width : width * 2,
31
+ "height": needClipY ? height : height * 2
32
+ }, null)]);
33
+ };
34
+ }
35
+ });
36
+ //#endregion
37
+ export { GraphicalItemClipPath };
@@ -0,0 +1,78 @@
1
+ import { isNullish } from "../../utils/validate.mjs";
2
+ import { selectActiveTooltipIndex } from "../../state/selectors/tooltipSelectors.mjs";
3
+ import { useAppSelector } from "../../state/hooks.mjs";
4
+ import { Layer } from "../../container/Layer.mjs";
5
+ import { Dot } from "../../shape/Dot.mjs";
6
+ import { createVNode, defineComponent, isVNode } from "vue";
7
+ //#region src/cartesian/area/ActivePoints.tsx
8
+ function _isSlot(s) {
9
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
10
+ }
11
+ var ActivePoints = /* @__PURE__ */ defineComponent({
12
+ name: "ActivePoints",
13
+ props: {
14
+ points: {
15
+ type: Array,
16
+ required: true
17
+ },
18
+ mainColor: {
19
+ type: String,
20
+ required: true
21
+ },
22
+ itemDataKey: {
23
+ type: [
24
+ String,
25
+ Number,
26
+ Function
27
+ ],
28
+ required: true
29
+ },
30
+ activeDot: {
31
+ type: [
32
+ Object,
33
+ Boolean,
34
+ Function
35
+ ],
36
+ required: true
37
+ }
38
+ },
39
+ slots: Object,
40
+ setup(props, { slots }) {
41
+ const activeTooltipIndex = useAppSelector(selectActiveTooltipIndex);
42
+ return () => {
43
+ const { points } = props;
44
+ if (!points?.length || isNullish(activeTooltipIndex.value)) return null;
45
+ const activePoint = points[Number(activeTooltipIndex.value)];
46
+ if (isNullish(activePoint)) return null;
47
+ return renderActivePoint({
48
+ point: activePoint,
49
+ childIndex: Number(activeTooltipIndex.value),
50
+ mainColor: props.mainColor,
51
+ dataKey: props.itemDataKey,
52
+ activeDot: props.activeDot,
53
+ slots
54
+ });
55
+ };
56
+ }
57
+ });
58
+ function renderActivePoint({ point, childIndex, mainColor, activeDot, dataKey, slots }) {
59
+ if (activeDot === false) return null;
60
+ const dotProps = {
61
+ "index": childIndex,
62
+ dataKey,
63
+ "cx": point.x,
64
+ "cy": point.y,
65
+ "r": 4,
66
+ "fill": mainColor,
67
+ "stroke-width": 2,
68
+ "stroke": "#fff",
69
+ "payload": point.payload,
70
+ "value": point.value
71
+ };
72
+ let dot;
73
+ if (slots.activeDot) dot = slots.activeDot(dotProps);
74
+ else dot = createVNode(Dot, dotProps, null);
75
+ return createVNode(Layer, { "class": "v-charts-active-dot" }, _isSlot(dot) ? dot : { default: () => [dot] });
76
+ }
77
+ //#endregion
78
+ export { ActivePoints };
@@ -0,0 +1,52 @@
1
+ import { AreaVueProps } from "./type.mjs";
2
+ import { useArea } from "./hooks/useArea.mjs";
3
+ import { Layer } from "../../container/Layer.mjs";
4
+ import { StaticArea } from "./RenderArea.mjs";
5
+ import { ClipRect } from "./ClipRect.mjs";
6
+ import { ActivePoints } from "./ActivePoints.mjs";
7
+ import { useSetupGraphicalItem } from "../../hooks/useSetupGraphicalItem.mjs";
8
+ import { useGraphicalLayerRef } from "../../context/graphicalLayerContext.mjs";
9
+ import { Fragment, Teleport, createVNode, defineComponent, isVNode } from "vue";
10
+ //#region src/cartesian/area/Area.tsx
11
+ function _isSlot(s) {
12
+ return typeof s === "function" || Object.prototype.toString.call(s) === "[object Object]" && !isVNode(s);
13
+ }
14
+ /**
15
+ * Type-safe Area component with slot types preserved in .d.ts output.
16
+ * The `new () => { $slots }` pattern ensures Volar picks up slot types
17
+ * even when consuming from compiled declarations.
18
+ */
19
+ var Area = /* @__PURE__ */ defineComponent({
20
+ name: "Area",
21
+ props: AreaVueProps,
22
+ inheritAttrs: false,
23
+ slots: Object,
24
+ setup(props, { attrs, slots }) {
25
+ useSetupGraphicalItem(props, "area");
26
+ const { shouldRender, areaData, points, clipPathId, shouldShowAnimation } = useArea(props, attrs, slots.dot);
27
+ const graphicalLayerRef = useGraphicalLayerRef(null);
28
+ return () => {
29
+ let _slot;
30
+ if (!shouldRender.value) return null;
31
+ let activeDot;
32
+ if (slots.activeDot) activeDot = { activeDot: slots.activeDot };
33
+ const renderAreaContent = () => {
34
+ if (shouldShowAnimation.value) return createVNode(Layer, { "key": "area-with-animation" }, { default: () => [createVNode("defs", null, [createVNode("clipPath", { "id": `animationClipPath-${clipPathId.value}` }, [createVNode(ClipRect, null, null)])]), createVNode(Layer, { "clip-path": `url(#animationClipPath-${clipPathId.value})` }, { default: () => [createVNode(StaticArea, null, null)] })] });
35
+ return createVNode(StaticArea, { "key": "static-area" }, null);
36
+ };
37
+ const areaContent = createVNode(Fragment, null, [createVNode(Layer, { "class": ["v-charts-area", attrs.class] }, _isSlot(_slot = renderAreaContent()) ? _slot : { default: () => [_slot] }), createVNode(ActivePoints, {
38
+ "points": areaData.value?.points ?? [],
39
+ "mainColor": getLegendItemColor(attrs.stroke, props.fill),
40
+ "itemDataKey": props.dataKey,
41
+ "activeDot": props.activeDot
42
+ }, _isSlot(activeDot) ? activeDot : { default: () => [activeDot] })]);
43
+ if (graphicalLayerRef?.value) return createVNode(Teleport, { "to": graphicalLayerRef.value }, _isSlot(areaContent) ? areaContent : { default: () => [areaContent] });
44
+ return areaContent;
45
+ };
46
+ }
47
+ });
48
+ function getLegendItemColor(stroke, fill) {
49
+ return stroke && stroke !== "none" ? stroke : fill;
50
+ }
51
+ //#endregion
52
+ export { Area };
@@ -0,0 +1,125 @@
1
+ import { isNumber, isWellBehavedNumber } from "../../utils/validate.mjs";
2
+ import { useAreaContext } from "./hooks/useArea.mjs";
3
+ import { Animate } from "../../animation/Animate.mjs";
4
+ import { createVNode, defineComponent, ref, watch } from "vue";
5
+ //#region src/cartesian/area/ClipRect.tsx
6
+ var HorizontalRect = /* @__PURE__ */ defineComponent({
7
+ name: "HorizontalRect",
8
+ props: {
9
+ alpha: {
10
+ type: Number,
11
+ required: true
12
+ },
13
+ points: {
14
+ type: Array,
15
+ required: true
16
+ },
17
+ baseLine: {
18
+ type: [Number, Array],
19
+ required: true
20
+ },
21
+ strokeWidth: {
22
+ type: Number,
23
+ required: true
24
+ }
25
+ },
26
+ setup(props) {
27
+ const { points } = props;
28
+ return () => {
29
+ const { alpha, baseLine, strokeWidth } = props;
30
+ const startX = points[0].x;
31
+ const endX = points[points.length - 1].x;
32
+ const width = alpha * Math.abs(startX - endX);
33
+ let maxY = Math.max(...points.map((entry) => entry.y || 0));
34
+ if (isNumber(baseLine)) maxY = Math.max(baseLine, maxY);
35
+ else if (baseLine && Array.isArray(baseLine) && baseLine.length) maxY = Math.max(...baseLine.map((entry) => entry.y || 0), maxY);
36
+ if (isNumber(maxY)) return createVNode("rect", {
37
+ "x": startX < endX ? startX : startX - width,
38
+ "y": 0,
39
+ "width": width,
40
+ "height": Math.floor(maxY + (strokeWidth ? parseInt(`${strokeWidth}`, 10) : 1))
41
+ }, null);
42
+ return null;
43
+ };
44
+ }
45
+ });
46
+ var VerticalRect = /* @__PURE__ */ defineComponent({
47
+ name: "VerticalRect",
48
+ props: {
49
+ alpha: {
50
+ type: Number,
51
+ required: true
52
+ },
53
+ points: {
54
+ type: Array,
55
+ required: true
56
+ },
57
+ baseLine: {
58
+ type: [Number, Array],
59
+ required: true
60
+ },
61
+ strokeWidth: {
62
+ type: Number,
63
+ required: true
64
+ }
65
+ },
66
+ setup(props) {
67
+ const { points } = props;
68
+ return () => {
69
+ const { alpha, baseLine, strokeWidth } = props;
70
+ const startY = points[0].y;
71
+ const endY = points[points.length - 1].y;
72
+ if (!isWellBehavedNumber(startY) || !isWellBehavedNumber(endY)) return null;
73
+ const height = alpha * Math.abs(startY - endY);
74
+ let maxX = Math.max(...points.map((entry) => entry.x || 0));
75
+ if (isNumber(baseLine)) maxX = Math.max(baseLine, maxX);
76
+ else if (baseLine && Array.isArray(baseLine) && baseLine.length) maxX = Math.max(...baseLine.map((entry) => entry.x || 0), maxX);
77
+ return createVNode("rect", {
78
+ "x": 0,
79
+ "y": startY < endY ? startY : startY - height,
80
+ "width": maxX + (strokeWidth ? parseInt(`${strokeWidth}`, 10) : 1),
81
+ "height": Math.floor(height)
82
+ }, null);
83
+ };
84
+ }
85
+ });
86
+ var ClipRect = /* @__PURE__ */ defineComponent({
87
+ name: "ClipRect",
88
+ setup() {
89
+ const { points, props, areaData, layout, isClipRectAnimating } = useAreaContext();
90
+ const isAnimationActive = ref(false);
91
+ watch(points, (newPoints) => {
92
+ if (newPoints && newPoints.length > 0 && !isAnimationActive.value) isAnimationActive.value = true;
93
+ }, { immediate: true });
94
+ const handleAnimationEnd = () => {
95
+ isAnimationActive.value = false;
96
+ isClipRectAnimating.value = false;
97
+ props.onAnimationEnd?.();
98
+ };
99
+ return () => {
100
+ const baseLine = areaData.value?.baseLine;
101
+ if (!points.value || points.value.length === 0) return null;
102
+ return createVNode(Animate, {
103
+ "isActive": isAnimationActive.value,
104
+ "transition": props.transition,
105
+ "onAnimationStart": props.onAnimationStart,
106
+ "onAnimationEnd": handleAnimationEnd
107
+ }, { default: (t) => {
108
+ if (layout.value === "horizontal") return createVNode(HorizontalRect, {
109
+ "alpha": t,
110
+ "points": points.value,
111
+ "baseLine": baseLine,
112
+ "strokeWidth": props.strokeWidth || 2
113
+ }, null);
114
+ return createVNode(VerticalRect, {
115
+ "alpha": t,
116
+ "points": points.value,
117
+ "baseLine": baseLine,
118
+ "strokeWidth": props.strokeWidth || 2
119
+ }, null);
120
+ } });
121
+ };
122
+ }
123
+ });
124
+ //#endregion
125
+ export { ClipRect };