vccs 0.0.1 → 0.1.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 (459) 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/index.d.ts +0 -0
  55. package/dist/cartesian/funnel/type.d.ts +37 -0
  56. package/dist/cartesian/funnel/utils.d.ts +12 -0
  57. package/dist/cartesian/index.d.ts +11 -0
  58. package/dist/cartesian/line/ActivePoints.d.ts +77 -0
  59. package/dist/cartesian/line/Line.d.ts +87 -0
  60. package/dist/cartesian/line/StaticLine.d.ts +16 -0
  61. package/dist/cartesian/line/hooks/useLine.d.ts +28 -0
  62. package/dist/cartesian/line/index.d.ts +3 -0
  63. package/dist/cartesian/line/type.d.ts +180 -0
  64. package/dist/cartesian/line/utils.d.ts +13 -0
  65. package/dist/cartesian/reference-area/ReferenceArea.d.ts +191 -0
  66. package/dist/cartesian/reference-area/index.d.ts +1 -0
  67. package/dist/cartesian/reference-line/ReferenceLine.d.ts +139 -0
  68. package/dist/cartesian/reference-line/index.d.ts +1 -0
  69. package/dist/cartesian/scatter/Scatter.d.ts +165 -0
  70. package/dist/cartesian/scatter/hooks/useScatter.d.ts +18 -0
  71. package/dist/cartesian/scatter/index.d.ts +1 -0
  72. package/dist/cartesian/type.d.ts +21 -0
  73. package/dist/cartesian/useNeedsClip.d.ts +6 -0
  74. package/dist/cartesian/utils/get-ticks.d.ts +16 -0
  75. package/dist/cartesian/z-axis/ZAxis.d.ts +81 -0
  76. package/dist/cartesian/z-axis/index.d.ts +1 -0
  77. package/dist/chart/AreaChart.d.ts +1 -0
  78. package/dist/chart/BarChart.d.ts +1 -0
  79. package/dist/chart/ComposedChart.d.ts +1 -0
  80. package/dist/chart/LegendPortalContext.d.ts +3 -0
  81. package/dist/chart/LineChart.d.ts +1 -0
  82. package/dist/chart/PieChart.d.ts +1 -0
  83. package/dist/chart/RadarChart.d.ts +1 -0
  84. package/dist/chart/RadialBarChart.d.ts +1 -0
  85. package/dist/chart/RechartsWrapper.d.ts +99 -0
  86. package/dist/chart/ScatterChart.d.ts +1 -0
  87. package/dist/chart/Surface.d.ts +40 -0
  88. package/dist/chart/TooltipPortalContext.d.ts +2 -0
  89. package/dist/chart/const.d.ts +6 -0
  90. package/dist/chart/generateCategoricalChart.d.ts +118 -0
  91. package/dist/chart/index.d.ts +8 -0
  92. package/dist/chart/provideClipPathId.d.ts +12 -0
  93. package/dist/components/Cell.d.ts +18 -0
  94. package/dist/components/DefaultLegendContent.d.ts +18 -0
  95. package/dist/components/Text.d.ts +149 -0
  96. package/dist/components/Tooltip.d.ts +250 -0
  97. package/dist/components/index.d.ts +4 -0
  98. package/dist/components/label/Label.d.ts +81 -0
  99. package/dist/components/label/LabelList.d.ts +63 -0
  100. package/dist/components/label/index.d.ts +2 -0
  101. package/dist/components/label/types.d.ts +88 -0
  102. package/dist/components/label/utils.d.ts +24 -0
  103. package/dist/components/legend/Legend.d.ts +4 -0
  104. package/dist/components/legend/LegendSymbol.d.ts +27 -0
  105. package/dist/components/legend/hooks/useLegend.d.ts +19 -0
  106. package/dist/components/legend/hooks/useLegendContent.d.ts +36 -0
  107. package/dist/components/legend/index.d.ts +2 -0
  108. package/dist/components/legend/type.d.ts +54 -0
  109. package/dist/components/legend/utils.d.ts +18 -0
  110. package/dist/components/types.d.ts +9 -0
  111. package/dist/components/utils.d.ts +4 -0
  112. package/dist/container/ClipPath.d.ts +12 -0
  113. package/dist/container/Layer.d.ts +2 -0
  114. package/dist/container/ResponsiveContainer.d.ts +50 -0
  115. package/dist/container/RootSurface.d.ts +17 -0
  116. package/dist/container/Surface.d.ts +25 -0
  117. package/dist/container/index.d.ts +1 -0
  118. package/dist/container/useSizeContext.d.ts +11 -0
  119. package/dist/context/ChartDataContextProvider.d.ts +17 -0
  120. package/dist/context/PanoramaContextProvider.d.ts +22 -0
  121. package/dist/context/accessibilityContext.d.ts +1 -0
  122. package/dist/context/cartesianLabelListContext.d.ts +3 -0
  123. package/dist/context/chartLayoutContext.d.ts +8 -0
  124. package/dist/context/cursorLayerContext.d.ts +2 -0
  125. package/dist/context/graphicalLayerContext.d.ts +2 -0
  126. package/dist/context/labelLayerContext.d.ts +2 -0
  127. package/dist/context/polarLabelViewBoxContext.d.ts +4 -0
  128. package/dist/context/useTooltipAxis.d.ts +2 -0
  129. package/dist/es/animation/Animate.mjs +63 -0
  130. package/dist/es/cartesian/GraphicalItemClipPath.mjs +36 -0
  131. package/dist/es/cartesian/area/ActivePoints.mjs +74 -0
  132. package/dist/es/cartesian/area/Area.mjs +41 -0
  133. package/dist/es/cartesian/area/ClipRect.mjs +104 -0
  134. package/dist/es/cartesian/area/RenderArea.mjs +151 -0
  135. package/dist/es/cartesian/area/hooks/useArea.mjs +57 -0
  136. package/dist/es/cartesian/area/type.mjs +136 -0
  137. package/dist/es/cartesian/area/utils.mjs +59 -0
  138. package/dist/es/cartesian/axis/XAxis.mjs +189 -0
  139. package/dist/es/cartesian/axis/YAxis.mjs +181 -0
  140. package/dist/es/cartesian/bar/Bar.mjs +89 -0
  141. package/dist/es/cartesian/bar/components/BarBackground.mjs +29 -0
  142. package/dist/es/cartesian/bar/components/BarRectangles.mjs +106 -0
  143. package/dist/es/cartesian/bar/hooks/useBar.mjs +41 -0
  144. package/dist/es/cartesian/bar/type.mjs +131 -0
  145. package/dist/es/cartesian/bar/utils.mjs +84 -0
  146. package/dist/es/cartesian/cartesian-axis/CartesianAxis.mjs +246 -0
  147. package/dist/es/cartesian/cartesian-grid/Background.mjs +30 -0
  148. package/dist/es/cartesian/cartesian-grid/CartesianGrid.mjs +155 -0
  149. package/dist/es/cartesian/cartesian-grid/HorizontalGridLines.mjs +49 -0
  150. package/dist/es/cartesian/cartesian-grid/HorizontalStripes.mjs +43 -0
  151. package/dist/es/cartesian/cartesian-grid/VerticalGridLines.mjs +44 -0
  152. package/dist/es/cartesian/cartesian-grid/VerticalStripes.mjs +43 -0
  153. package/dist/es/cartesian/cartesian-grid/const.mjs +29 -0
  154. package/dist/es/cartesian/cartesian-grid/utils.mjs +17 -0
  155. package/dist/es/cartesian/error-bar/ErrorBar.mjs +115 -0
  156. package/dist/es/cartesian/error-bar/ErrorBarContext.mjs +19 -0
  157. package/dist/es/cartesian/line/ActivePoints.mjs +75 -0
  158. package/dist/es/cartesian/line/Line.mjs +46 -0
  159. package/dist/es/cartesian/line/StaticLine.mjs +148 -0
  160. package/dist/es/cartesian/line/hooks/useLine.mjs +53 -0
  161. package/dist/es/cartesian/line/type.mjs +112 -0
  162. package/dist/es/cartesian/line/utils.mjs +33 -0
  163. package/dist/es/cartesian/reference-area/ReferenceArea.mjs +146 -0
  164. package/dist/es/cartesian/reference-line/ReferenceLine.mjs +143 -0
  165. package/dist/es/cartesian/scatter/Scatter.mjs +252 -0
  166. package/dist/es/cartesian/scatter/hooks/useScatter.mjs +19 -0
  167. package/dist/es/cartesian/useNeedsClip.mjs +14 -0
  168. package/dist/es/cartesian/utils/get-ticks.mjs +83 -0
  169. package/dist/es/cartesian/z-axis/ZAxis.mjs +70 -0
  170. package/dist/es/chart/AreaChart.mjs +9 -0
  171. package/dist/es/chart/BarChart.mjs +10 -0
  172. package/dist/es/chart/ComposedChart.mjs +10 -0
  173. package/dist/es/chart/LegendPortalContext.mjs +5 -0
  174. package/dist/es/chart/LineChart.mjs +10 -0
  175. package/dist/es/chart/PieChart.mjs +16 -0
  176. package/dist/es/chart/RadarChart.mjs +16 -0
  177. package/dist/es/chart/RadialBarChart.mjs +16 -0
  178. package/dist/es/chart/RechartsWrapper.mjs +137 -0
  179. package/dist/es/chart/ScatterChart.mjs +10 -0
  180. package/dist/es/chart/Surface.mjs +5 -0
  181. package/dist/es/chart/Surface.vue_vue_type_script_setup_true_lang.mjs +66 -0
  182. package/dist/es/chart/TooltipPortalContext.mjs +5 -0
  183. package/dist/es/chart/const.mjs +7 -0
  184. package/dist/es/chart/generateCategoricalChart.mjs +166 -0
  185. package/dist/es/chart/provideClipPathId.mjs +10 -0
  186. package/dist/es/components/Cell.mjs +11 -0
  187. package/dist/es/components/Text.mjs +5 -0
  188. package/dist/es/components/Text.vue_vue_type_script_setup_true_lang.mjs +154 -0
  189. package/dist/es/components/Tooltip.mjs +388 -0
  190. package/dist/es/components/label/Label.mjs +36 -0
  191. package/dist/es/components/label/LabelList.mjs +49 -0
  192. package/dist/es/components/label/types.mjs +35 -0
  193. package/dist/es/components/label/utils.mjs +233 -0
  194. package/dist/es/components/legend/Legend.mjs +82 -0
  195. package/dist/es/components/legend/LegendSymbol.mjs +60 -0
  196. package/dist/es/components/legend/hooks/useLegend.mjs +52 -0
  197. package/dist/es/components/legend/hooks/useLegendContent.mjs +47 -0
  198. package/dist/es/components/legend/type.mjs +41 -0
  199. package/dist/es/components/legend/utils.mjs +17 -0
  200. package/dist/es/components/utils.mjs +31 -0
  201. package/dist/es/container/ClipPath.mjs +25 -0
  202. package/dist/es/container/Layer.mjs +12 -0
  203. package/dist/es/container/ResponsiveContainer.mjs +5 -0
  204. package/dist/es/container/ResponsiveContainer.vue_vue_type_script_setup_true_lang.mjs +112 -0
  205. package/dist/es/container/Surface.mjs +58 -0
  206. package/dist/es/container/useSizeContext.mjs +5 -0
  207. package/dist/es/context/ChartDataContextProvider.mjs +21 -0
  208. package/dist/es/context/PanoramaContextProvider.mjs +19 -0
  209. package/dist/es/context/accessibilityContext.mjs +5 -0
  210. package/dist/es/context/cartesianLabelListContext.mjs +5 -0
  211. package/dist/es/context/chartLayoutContext.mjs +46 -0
  212. package/dist/es/context/cursorLayerContext.mjs +5 -0
  213. package/dist/es/context/graphicalLayerContext.mjs +5 -0
  214. package/dist/es/context/labelLayerContext.mjs +5 -0
  215. package/dist/es/context/polarLabelViewBoxContext.mjs +8 -0
  216. package/dist/es/context/useTooltipAxis.mjs +15 -0
  217. package/dist/es/events/useChartSynchronisation.mjs +88 -0
  218. package/dist/es/hooks/useSetupGraphicalItem.mjs +57 -0
  219. package/dist/es/index.mjs +42 -0
  220. package/dist/es/polar/pie/Pie.mjs +145 -0
  221. package/dist/es/polar/pie/type.mjs +97 -0
  222. package/dist/es/polar/radar/PolarAngleAxis.mjs +161 -0
  223. package/dist/es/polar/radar/PolarGrid.mjs +102 -0
  224. package/dist/es/polar/radar/PolarRadiusAxis.mjs +137 -0
  225. package/dist/es/polar/radar/Radar.mjs +248 -0
  226. package/dist/es/polar/radial-bar/RadialBar.mjs +176 -0
  227. package/dist/es/polar/radial-bar/type.mjs +97 -0
  228. package/dist/es/shape/Cross.mjs +15 -0
  229. package/dist/es/shape/Curve.mjs +60 -0
  230. package/dist/es/shape/Dot.mjs +23 -0
  231. package/dist/es/shape/Rectangle.mjs +68 -0
  232. package/dist/es/shape/Sector.mjs +128 -0
  233. package/dist/es/shape/Symbols.mjs +41 -0
  234. package/dist/es/state/ReportChartProps.mjs +63 -0
  235. package/dist/es/state/ReportMainChartProps.mjs +41 -0
  236. package/dist/es/state/ReportPolarOptions.mjs +55 -0
  237. package/dist/es/state/SetGraphicalItem.mjs +34 -0
  238. package/dist/es/state/SetLegendPayload.mjs +16 -0
  239. package/dist/es/state/SetTooltipEntrySettings.mjs +17 -0
  240. package/dist/es/state/brushSlice.mjs +22 -0
  241. package/dist/es/state/cartesianAxisSlice.mjs +33 -0
  242. package/dist/es/state/chartDataSlice.mjs +28 -0
  243. package/dist/es/state/externalEventsMiddleware.mjs +20 -0
  244. package/dist/es/state/graphicalItemsSlice.mjs +43 -0
  245. package/dist/es/state/hooks.mjs +5 -0
  246. package/dist/es/state/keyboardEventsMiddleware.mjs +55 -0
  247. package/dist/es/state/layoutSlice.mjs +33 -0
  248. package/dist/es/state/legendSlice.mjs +35 -0
  249. package/dist/es/state/mouseEventsMiddleware.mjs +34 -0
  250. package/dist/es/state/optionsSlice.mjs +22 -0
  251. package/dist/es/state/polarAxisSlice.mjs +26 -0
  252. package/dist/es/state/polarOptionsSlice.mjs +11 -0
  253. package/dist/es/state/reduxDevtoolsJsonStringifyReplacer.mjs +6 -0
  254. package/dist/es/state/referenceElementsSlice.mjs +34 -0
  255. package/dist/es/state/rootPropsSlice.mjs +21 -0
  256. package/dist/es/state/selectors/areaSelectors.mjs +67 -0
  257. package/dist/es/state/selectors/axisSelectors.mjs +693 -0
  258. package/dist/es/state/selectors/barSelectors.mjs +178 -0
  259. package/dist/es/state/selectors/brushSelectors.mjs +17 -0
  260. package/dist/es/state/selectors/combiners/combineActiveLabel.mjs +8 -0
  261. package/dist/es/state/selectors/combiners/combineActiveTooltipIndex.mjs +34 -0
  262. package/dist/es/state/selectors/combiners/combineAxisRangeWithReverse.mjs +6 -0
  263. package/dist/es/state/selectors/combiners/combineCoordinateForDefaultIndex.mjs +19 -0
  264. package/dist/es/state/selectors/combiners/combineTooltipInteractionState.mjs +32 -0
  265. package/dist/es/state/selectors/combiners/combineTooltipPayloadConfigurations.mjs +9 -0
  266. package/dist/es/state/selectors/common.mjs +4 -0
  267. package/dist/es/state/selectors/containerSelectors.mjs +4 -0
  268. package/dist/es/state/selectors/dataSelectors.mjs +16 -0
  269. package/dist/es/state/selectors/legendSelectors.mjs +9 -0
  270. package/dist/es/state/selectors/lineSelectors.mjs +57 -0
  271. package/dist/es/state/selectors/pickAxisId.mjs +4 -0
  272. package/dist/es/state/selectors/pickAxisType.mjs +4 -0
  273. package/dist/es/state/selectors/pieSelectors.mjs +97 -0
  274. package/dist/es/state/selectors/polarAxisSelectors.mjs +148 -0
  275. package/dist/es/state/selectors/polarGridSelectors.mjs +17 -0
  276. package/dist/es/state/selectors/polarScaleSelectors.mjs +52 -0
  277. package/dist/es/state/selectors/polarSelectors.mjs +64 -0
  278. package/dist/es/state/selectors/radarSelectors.mjs +113 -0
  279. package/dist/es/state/selectors/radialBarSelectors.mjs +212 -0
  280. package/dist/es/state/selectors/rootPropsSelectors.mjs +8 -0
  281. package/dist/es/state/selectors/scatterSelectors.mjs +118 -0
  282. package/dist/es/state/selectors/selectActivePropsFromChartPointer.mjs +18 -0
  283. package/dist/es/state/selectors/selectAllAxes.mjs +5 -0
  284. package/dist/es/state/selectors/selectChartOffset.mjs +60 -0
  285. package/dist/es/state/selectors/selectChartOffsetInternal.mjs +55 -0
  286. package/dist/es/state/selectors/selectTooltipEventType.mjs +21 -0
  287. package/dist/es/state/selectors/selectTooltipPayloadSearcher.mjs +6 -0
  288. package/dist/es/state/selectors/selectTooltipSettings.mjs +4 -0
  289. package/dist/es/state/selectors/selectTooltipState.mjs +4 -0
  290. package/dist/es/state/selectors/selectors.mjs +85 -0
  291. package/dist/es/state/selectors/tooltipSelectors.mjs +220 -0
  292. package/dist/es/state/selectors/touchSelectors.mjs +16 -0
  293. package/dist/es/state/store.mjs +55 -0
  294. package/dist/es/state/tooltipSlice.mjs +75 -0
  295. package/dist/es/state/touchEventsMiddleware.mjs +38 -0
  296. package/dist/es/state/utils/useReportScale.mjs +16 -0
  297. package/dist/es/synchronisation/syncSelectors.mjs +6 -0
  298. package/dist/es/synchronisation/useChartSynchronisation.mjs +24 -0
  299. package/dist/es/types/event.mjs +4 -0
  300. package/dist/es/utils/ReduceCSSCalc.mjs +82 -0
  301. package/dist/es/utils/VueUtils.mjs +18 -0
  302. package/dist/es/utils/attrs.mjs +52 -0
  303. package/dist/es/utils/cartesian.mjs +22 -0
  304. package/dist/es/utils/chart.mjs +265 -0
  305. package/dist/es/utils/const.mjs +4 -0
  306. package/dist/es/utils/createContext.mjs +12 -0
  307. package/dist/es/utils/data-utils.mjs +12 -0
  308. package/dist/es/utils/data.mjs +27 -0
  309. package/dist/es/utils/events.mjs +5 -0
  310. package/dist/es/utils/getLinearRegression.mjs +17 -0
  311. package/dist/es/utils/grid.mjs +8 -0
  312. package/dist/es/utils/isDomainSpecifiedByUser.mjs +65 -0
  313. package/dist/es/utils/legend.mjs +18 -0
  314. package/dist/es/utils/log.mjs +11 -0
  315. package/dist/es/utils/payload/getUniqPayload.mjs +7 -0
  316. package/dist/es/utils/polar.mjs +52 -0
  317. package/dist/es/utils/props.mjs +14 -0
  318. package/dist/es/utils/resolveDefaultProps.mjs +7 -0
  319. package/dist/es/utils/scale/getNiceTickValues.mjs +59 -0
  320. package/dist/es/utils/scale/utils/arithmetic.mjs +24 -0
  321. package/dist/es/utils/scale/utils/utils.mjs +34 -0
  322. package/dist/es/utils/style.mjs +19 -0
  323. package/dist/es/utils/tick.mjs +31 -0
  324. package/dist/es/utils/tooltip/translate.mjs +59 -0
  325. package/dist/es/utils/validate.mjs +31 -0
  326. package/dist/events/useChartSynchronisation.d.ts +8 -0
  327. package/dist/hooks/useSetupGraphicalItem.d.ts +7 -0
  328. package/dist/index.d.ts +6 -0
  329. package/dist/polar/index.d.ts +3 -0
  330. package/dist/polar/pie/Pie.d.ts +2 -0
  331. package/dist/polar/pie/index.d.ts +2 -0
  332. package/dist/polar/pie/type.d.ts +88 -0
  333. package/dist/polar/radar/PolarAngleAxis.d.ts +145 -0
  334. package/dist/polar/radar/PolarGrid.d.ts +77 -0
  335. package/dist/polar/radar/PolarRadiusAxis.d.ts +125 -0
  336. package/dist/polar/radar/Radar.d.ts +160 -0
  337. package/dist/polar/radar/index.d.ts +4 -0
  338. package/dist/polar/radial-bar/RadialBar.d.ts +2 -0
  339. package/dist/polar/radial-bar/index.d.ts +2 -0
  340. package/dist/polar/radial-bar/type.d.ts +96 -0
  341. package/dist/shape/Cross.d.ts +10 -0
  342. package/dist/shape/Curve.d.ts +42 -0
  343. package/dist/shape/Dot.d.ts +18 -0
  344. package/dist/shape/Rectangle.d.ts +33 -0
  345. package/dist/shape/Sector.d.ts +48 -0
  346. package/dist/shape/Symbols.d.ts +15 -0
  347. package/dist/shape/index.d.ts +8 -0
  348. package/dist/shape/types.d.ts +20 -0
  349. package/dist/state/ReportBar.d.ts +1 -0
  350. package/dist/state/ReportChartProps.d.ts +88 -0
  351. package/dist/state/ReportMainChartProps.d.ts +37 -0
  352. package/dist/state/ReportPolarOptions.d.ts +59 -0
  353. package/dist/state/SetGraphicalItem.d.ts +9 -0
  354. package/dist/state/SetLegendPayload.d.ts +3 -0
  355. package/dist/state/SetTooltipEntrySettings.d.ts +8 -0
  356. package/dist/state/brushSlice.d.ts +18 -0
  357. package/dist/state/cartesianAxisSlice.d.ts +88 -0
  358. package/dist/state/chartDataSlice.d.ts +44 -0
  359. package/dist/state/externalEventsMiddleware.d.ts +17 -0
  360. package/dist/state/graphicalItemsSlice.d.ts +108 -0
  361. package/dist/state/hooks.d.ts +54 -0
  362. package/dist/state/keyboardEventsMiddleware.d.ts +3 -0
  363. package/dist/state/layoutSlice.d.ts +15 -0
  364. package/dist/state/legendSlice.d.ts +26 -0
  365. package/dist/state/mouseEventsMiddleware.d.ts +5 -0
  366. package/dist/state/optionsSlice.d.ts +27 -0
  367. package/dist/state/polarAxisSlice.d.ts +10 -0
  368. package/dist/state/polarOptionsSlice.d.ts +10 -0
  369. package/dist/state/reduxDevtoolsJsonStringifyReplacer.d.ts +1 -0
  370. package/dist/state/referenceElementsSlice.d.ts +40 -0
  371. package/dist/state/rootPropsSlice.d.ts +26 -0
  372. package/dist/state/selectors/areaSelectors.d.ts +24 -0
  373. package/dist/state/selectors/axisSelectors.d.ts +1828 -0
  374. package/dist/state/selectors/barSelectors.d.ts +944 -0
  375. package/dist/state/selectors/brushSelectors.d.ts +10 -0
  376. package/dist/state/selectors/combiners/combineActiveLabel.d.ts +3 -0
  377. package/dist/state/selectors/combiners/combineActiveTooltipIndex.d.ts +5 -0
  378. package/dist/state/selectors/combiners/combineAxisRangeWithReverse.d.ts +3 -0
  379. package/dist/state/selectors/combiners/combineCoordinateForDefaultIndex.d.ts +3 -0
  380. package/dist/state/selectors/combiners/combineTooltipInteractionState.d.ts +3 -0
  381. package/dist/state/selectors/combiners/combineTooltipPayloadConfigurations.d.ts +3 -0
  382. package/dist/state/selectors/common.d.ts +2 -0
  383. package/dist/state/selectors/containerSelectors.d.ts +6 -0
  384. package/dist/state/selectors/dataSelectors.d.ts +23 -0
  385. package/dist/state/selectors/funnelSelectors.d.ts +69 -0
  386. package/dist/state/selectors/legendSelectors.d.ts +7 -0
  387. package/dist/state/selectors/lineSelectors.d.ts +123 -0
  388. package/dist/state/selectors/pickAxisId.d.ts +3 -0
  389. package/dist/state/selectors/pickAxisType.d.ts +2 -0
  390. package/dist/state/selectors/pieSelectors.d.ts +55 -0
  391. package/dist/state/selectors/polarAxisSelectors.d.ts +49 -0
  392. package/dist/state/selectors/polarGridSelectors.d.ts +118 -0
  393. package/dist/state/selectors/polarScaleSelectors.d.ts +9 -0
  394. package/dist/state/selectors/polarSelectors.d.ts +70 -0
  395. package/dist/state/selectors/radarSelectors.d.ts +76 -0
  396. package/dist/state/selectors/radialBarSelectors.d.ts +61 -0
  397. package/dist/state/selectors/rootPropsSelectors.d.ts +11 -0
  398. package/dist/state/selectors/scatterSelectors.d.ts +21 -0
  399. package/dist/state/selectors/selectActivePropsFromChartPointer.d.ts +382 -0
  400. package/dist/state/selectors/selectAllAxes.d.ts +4 -0
  401. package/dist/state/selectors/selectChartOffset.d.ts +116 -0
  402. package/dist/state/selectors/selectChartOffsetInternal.d.ts +9 -0
  403. package/dist/state/selectors/selectTooltipEventType.d.ts +8 -0
  404. package/dist/state/selectors/selectTooltipPayloadSearcher.d.ts +3 -0
  405. package/dist/state/selectors/selectTooltipSettings.d.ts +3 -0
  406. package/dist/state/selectors/selectTooltipState.d.ts +3 -0
  407. package/dist/state/selectors/selectors.d.ts +184 -0
  408. package/dist/state/selectors/tooltipSelectors.d.ts +581 -0
  409. package/dist/state/selectors/touchSelectors.d.ts +4 -0
  410. package/dist/state/store.d.ts +74 -0
  411. package/dist/state/tooltipSlice.d.ts +204 -0
  412. package/dist/state/touchEventsMiddleware.d.ts +2 -0
  413. package/dist/state/utils/useReportScale.d.ts +1 -0
  414. package/dist/synchronisation/syncSelectors.d.ts +3 -0
  415. package/dist/synchronisation/useChartSynchronisation.d.ts +11 -0
  416. package/dist/types/area.d.ts +8 -0
  417. package/dist/types/axis.d.ts +127 -0
  418. package/dist/types/bar.d.ts +51 -0
  419. package/dist/types/categorical.d.ts +36 -0
  420. package/dist/types/common.d.ts +129 -0
  421. package/dist/types/event.d.ts +16 -0
  422. package/dist/types/index.d.ts +4 -0
  423. package/dist/types/legend.d.ts +1 -0
  424. package/dist/types/offset.d.ts +8 -0
  425. package/dist/types/radar.d.ts +28 -0
  426. package/dist/types/scale.d.ts +11 -0
  427. package/dist/types/tick.d.ts +55 -0
  428. package/dist/types/tooltip.d.ts +33 -0
  429. package/dist/utils/ReduceCSSCalc.d.ts +2 -0
  430. package/dist/utils/VueUtils.d.ts +11 -0
  431. package/dist/utils/attrs.d.ts +46 -0
  432. package/dist/utils/cartesian.d.ts +20 -0
  433. package/dist/utils/chart.d.ts +99 -0
  434. package/dist/utils/const.d.ts +30 -0
  435. package/dist/utils/context.d.ts +8 -0
  436. package/dist/utils/createContext.d.ts +8 -0
  437. package/dist/utils/data-utils.d.ts +4 -0
  438. package/dist/utils/data.d.ts +13 -0
  439. package/dist/utils/events.d.ts +12 -0
  440. package/dist/utils/getLinearRegression.d.ts +15 -0
  441. package/dist/utils/getRelativeCoordinate.d.ts +11 -0
  442. package/dist/utils/grid.d.ts +37 -0
  443. package/dist/utils/index.d.ts +4 -0
  444. package/dist/utils/isDomainSpecifiedByUser.d.ts +47 -0
  445. package/dist/utils/legend.d.ts +3 -0
  446. package/dist/utils/log.d.ts +1 -0
  447. package/dist/utils/payload/getUniqPayload.d.ts +4 -0
  448. package/dist/utils/polar.d.ts +21 -0
  449. package/dist/utils/props.d.ts +15 -0
  450. package/dist/utils/resolveDefaultProps.d.ts +52 -0
  451. package/dist/utils/scale/getNiceTickValues.d.ts +61 -0
  452. package/dist/utils/scale/utils/arithmetic.d.ts +50 -0
  453. package/dist/utils/scale/utils/utils.d.ts +9 -0
  454. package/dist/utils/style.d.ts +12 -0
  455. package/dist/utils/tick.d.ts +19 -0
  456. package/dist/utils/tooltip/translate.d.ts +47 -0
  457. package/dist/utils/types.d.ts +14 -0
  458. package/dist/utils/validate.d.ts +25 -0
  459. package/package.json +27 -10
@@ -0,0 +1,82 @@
1
+ import { isNan as e } from "./validate.mjs";
2
+ //#region src/utils/ReduceCSSCalc.ts
3
+ var t = /(-?\d+(?:\.\d+)?[a-z%]*)([*/])(-?\d+(?:\.\d+)?[a-z%]*)/i, n = /(-?\d+(?:\.\d+)?[a-z%]*)([+-])(-?\d+(?:\.\d+)?[a-z%]*)/i, r = /^px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q$/, i = /(-?\d+(?:\.\d+)?)([a-z%]+)?/i, a = {
4
+ cm: 96 / 2.54,
5
+ mm: 96 / 25.4,
6
+ pt: 96 / 72,
7
+ pc: 96 / 6,
8
+ in: 96,
9
+ Q: 96 / (2.54 * 40),
10
+ px: 1
11
+ }, o = Object.keys(a), s = "NaN";
12
+ function c(e, t) {
13
+ return e * a[t];
14
+ }
15
+ var l = class t {
16
+ static parse(e) {
17
+ let [, n, r] = i.exec(e) ?? [];
18
+ return new t(parseFloat(n), r ?? "");
19
+ }
20
+ constructor(t, n) {
21
+ this.num = t, this.unit = n, this.num = t, this.unit = n, e(t) && (this.unit = ""), n !== "" && !r.test(n) && (this.num = NaN, this.unit = ""), o.includes(n) && (this.num = c(t, n), this.unit = "px");
22
+ }
23
+ add(e) {
24
+ return this.unit === e.unit ? new t(this.num + e.num, this.unit) : new t(NaN, "");
25
+ }
26
+ subtract(e) {
27
+ return this.unit === e.unit ? new t(this.num - e.num, this.unit) : new t(NaN, "");
28
+ }
29
+ multiply(e) {
30
+ return this.unit !== "" && e.unit !== "" && this.unit !== e.unit ? new t(NaN, "") : new t(this.num * e.num, this.unit || e.unit);
31
+ }
32
+ divide(e) {
33
+ return this.unit !== "" && e.unit !== "" && this.unit !== e.unit ? new t(NaN, "") : new t(this.num / e.num, this.unit || e.unit);
34
+ }
35
+ toString() {
36
+ return `${this.num}${this.unit}`;
37
+ }
38
+ isNaN() {
39
+ return e(this.num);
40
+ }
41
+ };
42
+ function u(e) {
43
+ if (e.includes(s)) return s;
44
+ let r = e;
45
+ for (; r.includes("*") || r.includes("/");) {
46
+ let [, e, n, i] = t.exec(r) ?? [], a = l.parse(e ?? ""), o = l.parse(i ?? ""), c = n === "*" ? a.multiply(o) : a.divide(o);
47
+ if (c.isNaN()) return s;
48
+ r = r.replace(t, c.toString());
49
+ }
50
+ for (; r.includes("+") || /.-\d+(?:\.\d+)?/.test(r);) {
51
+ let [, e, t, i] = n.exec(r) ?? [], a = l.parse(e ?? ""), o = l.parse(i ?? ""), c = t === "+" ? a.add(o) : a.subtract(o);
52
+ if (c.isNaN()) return s;
53
+ r = r.replace(n, c.toString());
54
+ }
55
+ return r;
56
+ }
57
+ var d = /\(([^()]*)\)/;
58
+ function f(e) {
59
+ let t = e, n;
60
+ for (; (n = d.exec(t)) != null;) {
61
+ let [, e] = n;
62
+ t = t.replace(d, u(e));
63
+ }
64
+ return t;
65
+ }
66
+ function p(e) {
67
+ let t = e.replace(/\s+/g, "");
68
+ return t = f(t), t = u(t), t;
69
+ }
70
+ function m(e) {
71
+ try {
72
+ return p(e);
73
+ } catch {
74
+ return s;
75
+ }
76
+ }
77
+ function h(e) {
78
+ let t = m(e.slice(5, -1));
79
+ return t === s ? "" : t;
80
+ }
81
+ //#endregion
82
+ export { h as reduceCSSCalc };
@@ -0,0 +1,18 @@
1
+ import { FilteredElementKeyMap as e, SVGElementPropKeys as t } from "../cartesian/cartesian-grid/const.mjs";
2
+ import { EventKeys as n } from "../types/event.mjs";
3
+ //#region src/utils/VueUtils.ts
4
+ function r(r, i, a, o) {
5
+ let s = (o && e?.[o]) ?? [];
6
+ return i.startsWith("data-") || typeof r != "function" && (o && s.includes(i) || t.includes(i)) || a && n.includes(i);
7
+ }
8
+ function i(e, t, n) {
9
+ if (!e || typeof e == "function" || typeof e == "boolean") return null;
10
+ let i = e;
11
+ if (typeof i != "object" && typeof i != "function") return null;
12
+ let a = {};
13
+ return Object.keys(i).forEach((e) => {
14
+ r(i?.[e], e, t, n) && (a[e] = i[e]);
15
+ }), a;
16
+ }
17
+ //#endregion
18
+ export { i as filterProps };
@@ -0,0 +1,52 @@
1
+ import { isSsr as e } from "./validate.mjs";
2
+ //#region src/utils/attrs.ts
3
+ var t = {
4
+ widthCache: {},
5
+ cacheCount: 0
6
+ }, n = 2e3, r = {
7
+ position: "absolute",
8
+ top: "-20000px",
9
+ left: 0,
10
+ padding: 0,
11
+ margin: 0,
12
+ border: "none",
13
+ whiteSpace: "pre"
14
+ }, i = "v-charts_measurement_span";
15
+ function a(e) {
16
+ let t = { ...e };
17
+ return Object.keys(t).forEach((e) => {
18
+ t[e] || delete t[e];
19
+ }), t;
20
+ }
21
+ function o(o, s = {}) {
22
+ if (o == null || e) return {
23
+ width: 0,
24
+ height: 0
25
+ };
26
+ let c = a(s), l = JSON.stringify({
27
+ text: o,
28
+ copyStyle: c
29
+ });
30
+ if (t.widthCache[l]) return t.widthCache[l];
31
+ try {
32
+ let e = document.getElementById(i);
33
+ e || (e = document.createElement("span"), e.setAttribute("id", i), e.setAttribute("aria-hidden", "true"), document.body.appendChild(e));
34
+ let a = {
35
+ ...r,
36
+ ...c
37
+ };
38
+ Object.assign(e.style, a), e.textContent = `${o}`;
39
+ let s = e.getBoundingClientRect(), u = {
40
+ width: s.width,
41
+ height: s.height
42
+ };
43
+ return t.widthCache[l] = u, ++t.cacheCount > n && (t.cacheCount = 0, t.widthCache = {}), u;
44
+ } catch {
45
+ return {
46
+ width: 0,
47
+ height: 0
48
+ };
49
+ }
50
+ }
51
+ //#endregion
52
+ export { o as getStringSize };
@@ -0,0 +1,22 @@
1
+ import { isVisible as e } from "./validate.mjs";
2
+ import { getEveryNthWithCondition as t } from "./tick.mjs";
3
+ //#region src/utils/cartesian.ts
4
+ function n(e) {
5
+ return (e % 180 + 180) % 180;
6
+ }
7
+ function r({ width: e, height: t }, r = 0) {
8
+ let i = n(r) * Math.PI / 180, a = Math.atan(t / e), o = i > a && i < Math.PI - a ? t / Math.sin(i) : e / Math.cos(i);
9
+ return Math.abs(o);
10
+ }
11
+ function i(n, r, i, a, o) {
12
+ let s = (a || []).slice(), { start: c, end: l } = r, u = 0, d = 1, f = c;
13
+ for (; d <= s.length;) {
14
+ let r = a?.[u];
15
+ if (r === void 0) return t(a, d) ?? [];
16
+ let s = u, p, m = () => (p === void 0 && (p = i(r, s)), p), h = r.coordinate, g = u === 0 || e(n, h, m, f, l);
17
+ g || (u = 0, f = c, d += 1), g && (f = h + n * (m() / 2 + o), u += d);
18
+ }
19
+ return [];
20
+ }
21
+ //#endregion
22
+ export { r as getAngledRectangleWidth, i as getEquidistantTicks };
@@ -0,0 +1,265 @@
1
+ import { isNan as e, isNullish as t, isNumOrStr as n, isNumber as r } from "./validate.mjs";
2
+ import { formatAngleOfSector as i, getAngleOfPoint as a, polarToCartesian as o, reverseFormatAngleOfSector as s } from "./polar.mjs";
3
+ import { findEntryInArray as c, mathSign as l } from "./data.mjs";
4
+ import { toRaw as u } from "vue";
5
+ import { stack as d, stackOffsetExpand as f, stackOffsetNone as p, stackOffsetSilhouette as m, stackOffsetWiggle as h, stackOrderNone as g } from "victory-vendor/d3-shape";
6
+ import { get as _, isNaN as v, sortBy as y } from "lodash-es";
7
+ //#region src/utils/chart.ts
8
+ function b(e, t, n) {
9
+ if (!e) return null;
10
+ let { duplicateDomain: r, type: i, range: a, scale: o, realScaleType: s, isCategorical: c, categoricalDomain: u, tickCount: d, ticks: f, niceTicks: p, axisType: m } = e;
11
+ if (!o) return null;
12
+ let h = s === "scaleBand" ? o.bandwidth() / 2 : 2, g = (t || n) && i === "category" && o.bandwidth ? o.bandwidth() / h : 0;
13
+ return g = m === "angleAxis" && a.length >= 2 ? l(a[0] - a[1]) * 2 * g : g, t && (f || p) ? (f || p).map((e, t) => ({
14
+ coordinate: o(r ? r.indexOf(e) : e) + g,
15
+ value: e,
16
+ offset: g,
17
+ index: t
18
+ })).filter((e) => !v(e.coordinate)) : c && u ? u.map((e, t) => ({
19
+ coordinate: o(e) + g,
20
+ value: e,
21
+ index: t,
22
+ offset: g
23
+ })) : o.ticks && !n ? o.ticks(d).map((e, t) => ({
24
+ coordinate: o(e) + g,
25
+ value: e,
26
+ offset: g,
27
+ index: t
28
+ })) : o.domain().map((e, t) => ({
29
+ coordinate: o(e) + g,
30
+ value: r ? r[e] : e,
31
+ index: t,
32
+ offset: g
33
+ }));
34
+ }
35
+ function x(e, r, i) {
36
+ return t(e) || t(r) ? i : n(r) ? _(u(e), r, i) : typeof r == "function" ? r(e) : i;
37
+ }
38
+ var S = /^dataMin\s*-\s*(\d+(\.\d+)?)$/, C = /^dataMax\s*\+\s*(\d+(\.\d+)?)$/;
39
+ function w(e, t, n) {
40
+ if (e && e.scale && e.scale.bandwidth) {
41
+ let t = e.scale.bandwidth();
42
+ if (!n || t > 0) return t;
43
+ }
44
+ if (e && t && t.length >= 2) {
45
+ let e = y(t, (e) => e.coordinate), n = Infinity;
46
+ for (let t = 1, r = e.length; t < r; t++) {
47
+ let r = e[t], i = e[t - 1];
48
+ n = Math.min((r.coordinate || 0) - (i.coordinate || 0), n);
49
+ }
50
+ return n === Infinity ? 0 : n;
51
+ }
52
+ return n ? void 0 : 0;
53
+ }
54
+ function T(e, t) {
55
+ if (!t || t.length !== 2 || !r(t[0]) || !r(t[1])) return e;
56
+ let n = Math.min(t[0], t[1]), i = Math.max(t[0], t[1]), a = [e[0], e[1]];
57
+ return (!r(e[0]) || e[0] < n) && (a[0] = n), (!r(e[1]) || e[1] > i) && (a[1] = i), a[0] > i && (a[0] = i), a[1] < n && (a[1] = n), a;
58
+ }
59
+ function E(e) {
60
+ return e == null ? void 0 : String(e);
61
+ }
62
+ function D({ axis: e, ticks: n, bandSize: r, entry: i, index: a, dataKey: o }) {
63
+ if (e.type === "category") {
64
+ if (!e.allowDuplicatedCategory && e.dataKey && !t(i[e.dataKey])) {
65
+ let t = c(n, "value", i[e.dataKey]);
66
+ if (t) return t.coordinate + r / 2;
67
+ }
68
+ return n[a] ? n[a].coordinate + r / 2 : null;
69
+ }
70
+ let s = x(i, t(o) ? e.dataKey : o);
71
+ return t(s) ? null : e.scale(s);
72
+ }
73
+ function O(e) {
74
+ let t = e.currentTarget, n = t.getBoundingClientRect(), r = n.width / t.offsetWidth, i = n.height / t.offsetHeight;
75
+ return {
76
+ chartX: Math.round((e.clientX - n.left) / r),
77
+ chartY: Math.round((e.clientY - n.top) / i)
78
+ };
79
+ }
80
+ function k({ tooltipEntrySettings: e, dataKey: t, payload: n, value: r, name: i }) {
81
+ return {
82
+ ...e,
83
+ dataKey: t,
84
+ payload: n,
85
+ value: r,
86
+ name: i
87
+ };
88
+ }
89
+ function A(e, t) {
90
+ return t === "horizontal" ? e.x : t === "vertical" ? e.y : t === "centric" ? e.angle : e.radius;
91
+ }
92
+ function j({ x: e, y: t }, n) {
93
+ let { radius: r, angle: o } = a({
94
+ x: e,
95
+ y: t
96
+ }, n), { innerRadius: c, outerRadius: l } = n;
97
+ if (r < c || r > l || r === 0) return null;
98
+ let { startAngle: u, endAngle: d } = i(n), f = o, p;
99
+ if (u <= d) {
100
+ for (; f > d;) f -= 360;
101
+ for (; f < u;) f += 360;
102
+ p = f >= u && f <= d;
103
+ } else {
104
+ for (; f > u;) f -= 360;
105
+ for (; f < d;) f += 360;
106
+ p = f >= d && f <= u;
107
+ }
108
+ return p ? {
109
+ ...n,
110
+ radius: r,
111
+ angle: s(f, n)
112
+ } : null;
113
+ }
114
+ function M(e, t, n, r, i) {
115
+ return n === "horizontal" || n === "vertical" ? e >= i.left && e <= i.left + i.width && t >= i.top && t <= i.top + i.height ? {
116
+ x: e,
117
+ y: t
118
+ } : null : r ? j({
119
+ x: e,
120
+ y: t
121
+ }, r) : null;
122
+ }
123
+ function N(e, t, n, r, i) {
124
+ let a = -1, o = t?.length ?? 0;
125
+ if (o <= 1) return 0;
126
+ if (r === "angleAxis" && i != null && Math.abs(Math.abs(i[1] - i[0]) - 360) <= 1e-6) for (let t = 0; t < o; t++) {
127
+ let r = t > 0 ? n[t - 1].coordinate : n[o - 1].coordinate, s = n[t].coordinate, c = t >= o - 1 ? n[0].coordinate : n[t + 1].coordinate, u;
128
+ if (l(s - r) !== l(c - s)) {
129
+ let o = [];
130
+ if (l(c - s) === l(i[1] - i[0])) {
131
+ u = c;
132
+ let e = s + i[1] - i[0];
133
+ o[0] = Math.min(e, (e + r) / 2), o[1] = Math.max(e, (e + r) / 2);
134
+ } else {
135
+ u = r;
136
+ let e = c + i[1] - i[0];
137
+ o[0] = Math.min(s, (e + s) / 2), o[1] = Math.max(s, (e + s) / 2);
138
+ }
139
+ let d = [Math.min(s, (u + s) / 2), Math.max(s, (u + s) / 2)];
140
+ if (e > d[0] && e <= d[1] || e >= o[0] && e <= o[1]) {
141
+ a = n[t].index;
142
+ break;
143
+ }
144
+ } else {
145
+ let i = Math.min(r, c), o = Math.max(r, c);
146
+ if (e > (i + s) / 2 && e <= (o + s) / 2) {
147
+ a = n[t].index;
148
+ break;
149
+ }
150
+ }
151
+ }
152
+ else for (let n = 0; n < o; n++) if (n === 0 && e <= (t[n].coordinate + t[n + 1].coordinate) / 2 || n > 0 && n < o - 1 && e > (t[n].coordinate + t[n - 1].coordinate) / 2 && e <= (t[n].coordinate + t[n + 1].coordinate) / 2 || n === o - 1 && e > (t[n].coordinate + t[n - 1].coordinate) / 2) {
153
+ a = t[n].index;
154
+ break;
155
+ }
156
+ return a;
157
+ }
158
+ function P(e, t, n, r) {
159
+ let i = t.find((e) => e && e.index === n);
160
+ if (i) {
161
+ if (e === "horizontal") return {
162
+ x: i.coordinate,
163
+ y: r.y
164
+ };
165
+ if (e === "vertical") return {
166
+ x: r.x,
167
+ y: i.coordinate
168
+ };
169
+ if (e === "centric") {
170
+ let e = i.coordinate, { radius: t } = r;
171
+ return {
172
+ ...r,
173
+ ...o(r.cx, r.cy, t, e),
174
+ angle: e,
175
+ radius: t
176
+ };
177
+ }
178
+ let t = i.coordinate, { angle: n } = r;
179
+ return {
180
+ ...r,
181
+ ...o(r.cx, r.cy, t, n),
182
+ angle: n,
183
+ radius: t
184
+ };
185
+ }
186
+ return {
187
+ x: 0,
188
+ y: 0
189
+ };
190
+ }
191
+ function F(e) {
192
+ return [e[0] === Infinity ? 0 : e[0], e[1] === -Infinity ? 0 : e[1]];
193
+ }
194
+ function I(e) {
195
+ let t = e.flat(2).filter(r);
196
+ return [Math.min(...t), Math.max(...t)];
197
+ }
198
+ function L(e, t, n) {
199
+ if (e != null) return F(Object.keys(e).reduce((r, i) => {
200
+ let { stackedData: a } = e[i], o = a.reduce((e, r) => {
201
+ let i = I(r.slice(t, n + 1));
202
+ return [Math.min(e[0], i[0]), Math.max(e[1], i[1])];
203
+ }, [Infinity, -Infinity]);
204
+ return [Math.min(o[0], r[0]), Math.max(o[1], r[1])];
205
+ }, [Infinity, -Infinity]));
206
+ }
207
+ var R = 1e-4;
208
+ function z(e) {
209
+ let t = e.domain();
210
+ if (!t || t.length <= 2) return;
211
+ let n = t.length, r = e.range(), i = Math.min(r[0], r[1]) - R, a = Math.max(r[0], r[1]) + R, o = e(t[0]), s = e(t[n - 1]);
212
+ (o < i || o > a || s < i || s > a) && e.domain([t[0], t[n - 1]]);
213
+ }
214
+ function B(e, t) {
215
+ if (e) return String(e);
216
+ if (typeof t == "string") return t;
217
+ }
218
+ function V(e) {
219
+ return e && typeof e == "object" && "clipDot" in e ? !!e.clipDot : !0;
220
+ }
221
+ var H = {
222
+ sign: (t) => {
223
+ let n = t.length;
224
+ if (!(n <= 0)) for (let r = 0, i = t[0].length; r < i; ++r) {
225
+ let i = 0, a = 0;
226
+ for (let o = 0; o < n; ++o) {
227
+ let n = e(t[o][r][1]) ? t[o][r][0] : t[o][r][1];
228
+ n >= 0 ? (t[o][r][0] = i, t[o][r][1] = i + n, i = t[o][r][1]) : (t[o][r][0] = a, t[o][r][1] = a + n, a = t[o][r][1]);
229
+ }
230
+ }
231
+ },
232
+ expand: f,
233
+ none: p,
234
+ silhouette: m,
235
+ wiggle: h,
236
+ positive: (t) => {
237
+ let n = t.length;
238
+ if (!(n <= 0)) for (let r = 0, i = t[0].length; r < i; ++r) {
239
+ let i = 0;
240
+ for (let a = 0; a < n; ++a) {
241
+ let n = e(t[a][r][1]) ? t[a][r][0] : t[a][r][1];
242
+ n >= 0 ? (t[a][r][0] = i, t[a][r][1] = i + n, i = t[a][r][1]) : (t[a][r][0] = 0, t[a][r][1] = 0);
243
+ }
244
+ }
245
+ }
246
+ };
247
+ function U(e, t, n) {
248
+ let r = H[n];
249
+ return d().keys(t).value((e, t) => +x(e, t, 0)).order(g).offset(r)(e);
250
+ }
251
+ function W({ numericAxis: e }) {
252
+ let t = e.scale.domain();
253
+ if (e.type === "number") {
254
+ let e = Math.min(t[0], t[1]), n = Math.max(t[0], t[1]);
255
+ return e <= 0 && n >= 0 ? 0 : n < 0 ? n : e;
256
+ }
257
+ return t[0];
258
+ }
259
+ function G({ axis: e, ticks: n, offset: r, bandSize: i, entry: a, index: o }) {
260
+ if (e.type === "category") return n[o] ? n[o].coordinate + r : null;
261
+ let s = x(a, e.dataKey, e.scale.domain()[o]);
262
+ return t(s) ? null : e.scale(s) - i / 2 + r;
263
+ }
264
+ //#endregion
265
+ export { C as MAX_VALUE_REG, S as MIN_VALUE_REG, N as calculateActiveTickIndex, A as calculateTooltipPos, z as checkDomainOfScale, P as getActiveCoordinate, w as getBandSizeOfAxis, W as getBaseValueOfBar, G as getCateCoordinateOfBar, D as getCateCoordinateOfLine, O as getChartPointer, L as getDomainOfStackGroups, E as getNormalizedStackId, U as getStackedData, b as getTicksOfAxis, k as getTooltipEntry, B as getTooltipNameProp, x as getValueByDataKey, M as inRange, V as isClipDot, T as truncateByDomain };
@@ -0,0 +1,4 @@
1
+ //#region src/utils/const.ts
2
+ var e = "data-recharts-item-index", t = "data-recharts-item-data-key";
3
+ //#endregion
4
+ export { t as DATA_ITEM_DATAKEY_ATTRIBUTE_NAME, e as DATA_ITEM_INDEX_ATTRIBUTE_NAME };
@@ -0,0 +1,12 @@
1
+ import { inject as e, provide as t } from "vue";
2
+ //#region src/utils/createContext.ts
3
+ function n(n) {
4
+ let r = n, i = Symbol(r);
5
+ return [(t) => {
6
+ let r = e(i, t);
7
+ if (r === void 0) throw Error(`Injection \`${i.toString()}\` not found. Component must be used within ${`\`${n}\``}`);
8
+ return r;
9
+ }, (e) => (t(i, e), e)];
10
+ }
11
+ //#endregion
12
+ export { n as createContext };
@@ -0,0 +1,12 @@
1
+ import { isNumber as e } from "./validate.mjs";
2
+ //#region src/utils/data-utils.ts
3
+ var t = 0;
4
+ function n(e) {
5
+ let n = ++t;
6
+ return `${e || ""}${n}`;
7
+ }
8
+ function r(t, n, r) {
9
+ return e(t) && e(n) ? t + r * (n - t) : n;
10
+ }
11
+ //#endregion
12
+ export { r as interpolate, n as uniqueId };
@@ -0,0 +1,27 @@
1
+ import { isNan as e, isNumber as t, isPercent as n } from "./validate.mjs";
2
+ import { get as r } from "lodash-es";
3
+ //#region src/utils/data.ts
4
+ function i(e) {
5
+ return e === 0 ? 0 : e > 0 ? 1 : -1;
6
+ }
7
+ function a(e) {
8
+ if (!Array.isArray(e)) return !1;
9
+ let t = e.length, n = {};
10
+ for (let r = 0; r < t; r++) if (!n[e[r]]) n[e[r]] = !0;
11
+ else return !0;
12
+ return !1;
13
+ }
14
+ function o(r, i, a = 0, o = !1) {
15
+ if (!t(r) && typeof r != "string") return a;
16
+ let s;
17
+ if (n(r)) {
18
+ let e = r.indexOf("%");
19
+ s = i * parseFloat(r.slice(0, e)) / 100;
20
+ } else s = +r;
21
+ return e(s) && (s = a), o && s > i && (s = i), s;
22
+ }
23
+ function s(e, t, n) {
24
+ return !e || !e.length ? null : e.find((e) => e && (typeof t == "function" ? t(e) : r(e, t)) === n);
25
+ }
26
+ //#endregion
27
+ export { s as findEntryInArray, o as getPercentValue, a as hasDuplicate, i as mathSign };
@@ -0,0 +1,5 @@
1
+ import e from "eventemitter3";
2
+ //#region src/utils/events.ts
3
+ var t = new e(), n = "recharts.syncEvent.tooltip", r = "recharts.syncEvent.brush";
4
+ //#endregion
5
+ export { r as BRUSH_SYNC_EVENT, n as TOOLTIP_SYNC_EVENT, t as eventCenter };
@@ -0,0 +1,17 @@
1
+ //#region src/utils/getLinearRegression.ts
2
+ function e(e) {
3
+ let t = e.length, n = 0, r = 0, i = 0, a = 0, o = Infinity, s = -Infinity;
4
+ for (let c = 0; c < t; c++) {
5
+ let t = e[c]?.cx || 0, l = e[c]?.cy || 0;
6
+ n += t, r += l, i += t * l, a += t * t, o = Math.min(o, t), s = Math.max(s, t);
7
+ }
8
+ let c = t * a === n * n ? 0 : (t * i - n * r) / (t * a - n * n);
9
+ return {
10
+ xmin: o,
11
+ xmax: s,
12
+ a: c,
13
+ b: (r - c * n) / t
14
+ };
15
+ }
16
+ //#endregion
17
+ export { e as getLinearRegression };
@@ -0,0 +1,8 @@
1
+ //#region src/utils/grid.ts
2
+ function e(e, t, n, r) {
3
+ if (r) return e.map((e) => e.coordinate);
4
+ let i, a, o = e.map((e) => (e.coordinate === t && (i = !0), e.coordinate === n && (a = !0), e.coordinate));
5
+ return i || o.push(t), a || o.push(n), o;
6
+ }
7
+ //#endregion
8
+ export { e as getCoordinatesOfGrid };
@@ -0,0 +1,65 @@
1
+ import { isNumber as e, isWellBehavedNumber as t } from "./validate.mjs";
2
+ import { MAX_VALUE_REG as n, MIN_VALUE_REG as r } from "./chart.mjs";
3
+ //#region src/utils/isDomainSpecifiedByUser.ts
4
+ function i(e) {
5
+ if (Array.isArray(e) && e.length === 2) {
6
+ let [n, r] = e;
7
+ if (t(n) && t(r)) return !0;
8
+ }
9
+ return !1;
10
+ }
11
+ function a(e, t, n) {
12
+ return n ? e : [Math.min(e[0], t[0]), Math.max(e[1], t[1])];
13
+ }
14
+ function o(e, n) {
15
+ if (n && typeof e != "function" && Array.isArray(e) && e.length === 2) {
16
+ let [n, r] = e, a, o;
17
+ if (t(n)) a = n;
18
+ else if (typeof n == "function") return;
19
+ if (t(r)) o = r;
20
+ else if (typeof r == "function") return;
21
+ let s = [a, o];
22
+ if (i(s)) return s;
23
+ }
24
+ }
25
+ function s(t, o, s) {
26
+ if (!(!s && o == null)) {
27
+ if (typeof t == "function" && o != null) try {
28
+ let e = t(o, s);
29
+ if (i(e)) return a(e, o, s);
30
+ } catch {}
31
+ if (Array.isArray(t) && t.length === 2) {
32
+ let [c, l] = t, u, d;
33
+ if (c === "auto") o != null && (u = Math.min(...o));
34
+ else if (e(c)) u = c;
35
+ else if (typeof c == "function") try {
36
+ o != null && (u = c(o?.[0]));
37
+ } catch {}
38
+ else if (typeof c == "string" && r.test(c)) {
39
+ let e = r.exec(c);
40
+ if (e == null || o == null) u = void 0;
41
+ else {
42
+ let t = +e[1];
43
+ u = o[0] - t;
44
+ }
45
+ } else u = o?.[0];
46
+ if (l === "auto") o != null && (d = Math.max(...o));
47
+ else if (e(l)) d = l;
48
+ else if (typeof l == "function") try {
49
+ o != null && (d = l(o?.[1]));
50
+ } catch {}
51
+ else if (typeof l == "string" && n.test(l)) {
52
+ let e = n.exec(l);
53
+ if (e == null || o == null) d = void 0;
54
+ else {
55
+ let t = +e[1];
56
+ d = o[1] + t;
57
+ }
58
+ } else d = o?.[1];
59
+ let f = [u, d];
60
+ if (i(f)) return o == null ? f : a(f, o, s);
61
+ }
62
+ }
63
+ }
64
+ //#endregion
65
+ export { i as isWellFormedNumberDomain, o as numericalDomainSpecifiedWithoutRequiringData, s as parseNumericalUserDomain };
@@ -0,0 +1,18 @@
1
+ import { isNumber as e } from "./validate.mjs";
2
+ //#region src/utils/legend.ts
3
+ function t(t, n, r) {
4
+ if (n && r) {
5
+ let { width: i, height: a } = r, { align: o, verticalAlign: s, layout: c } = n;
6
+ if ((c === "vertical" || c === "horizontal" && s === "middle") && o !== "center" && e(t[o])) return {
7
+ ...t,
8
+ [o]: t[o] + (i || 0)
9
+ };
10
+ if ((c === "horizontal" || c === "vertical" && o === "center") && s !== "middle" && e(t[s])) return {
11
+ ...t,
12
+ [s]: t[s] + (a || 0)
13
+ };
14
+ }
15
+ return t;
16
+ }
17
+ //#endregion
18
+ export { t as appendOffsetOfLegend };
@@ -0,0 +1,11 @@
1
+ //#region src/utils/log.ts
2
+ var e = process.env.NODE_ENV !== "production";
3
+ function t(t, n, ...r) {
4
+ if (e && typeof console < "u" && console.warn && (n === void 0 && console.warn("LogUtils requires an error message argument"), !t)) if (n === void 0) console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");
5
+ else {
6
+ let e = 0;
7
+ console.warn(n.replace(/%s/g, () => r[e++]));
8
+ }
9
+ }
10
+ //#endregion
11
+ export { t as warn };
@@ -0,0 +1,7 @@
1
+ import { uniqBy as e } from "es-toolkit/compat";
2
+ //#region src/utils/payload/getUniqPayload.ts
3
+ function t(t, n, r) {
4
+ return n === !0 ? e(t, r) : typeof n == "function" ? e(t, n) : t;
5
+ }
6
+ //#endregion
7
+ export { t as getUniqPayload };