@mui/x-charts 9.0.0-alpha.2 → 9.0.0-alpha.3

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 (329) hide show
  1. package/BarChart/AnimatedBarElement.d.mts +1 -1
  2. package/BarChart/AnimatedBarElement.d.ts +1 -1
  3. package/BarChart/BarChart.js +5 -2
  4. package/BarChart/BarChart.mjs +5 -2
  5. package/BarChart/BarElement.d.mts +1 -1
  6. package/BarChart/BarElement.d.ts +1 -1
  7. package/BarChart/BarElement.js +8 -7
  8. package/BarChart/BarElement.mjs +8 -7
  9. package/BarChart/BarLabel/BarLabel.js +4 -0
  10. package/BarChart/BarLabel/BarLabel.mjs +4 -0
  11. package/BarChart/BarLabel/BarLabel.types.d.mts +2 -2
  12. package/BarChart/BarLabel/BarLabel.types.d.ts +2 -2
  13. package/BarChart/BarLabel/BarLabelItem.js +8 -7
  14. package/BarChart/BarLabel/BarLabelItem.mjs +8 -7
  15. package/BarChart/BarLabel/barLabelClasses.d.mts +15 -0
  16. package/BarChart/BarLabel/barLabelClasses.d.ts +15 -0
  17. package/BarChart/BarLabel/barLabelClasses.js +19 -0
  18. package/BarChart/BarLabel/barLabelClasses.mjs +20 -0
  19. package/BarChart/BarPlot.js +1 -2
  20. package/BarChart/BarPlot.mjs +2 -3
  21. package/BarChart/barClasses.d.mts +21 -1
  22. package/BarChart/barClasses.d.ts +21 -1
  23. package/BarChart/barClasses.js +9 -3
  24. package/BarChart/barClasses.mjs +9 -3
  25. package/BarChart/barElementClasses.d.mts +17 -10
  26. package/BarChart/barElementClasses.d.ts +17 -10
  27. package/BarChart/barElementClasses.js +19 -0
  28. package/BarChart/barElementClasses.mjs +20 -0
  29. package/BarChart/index.d.mts +1 -1
  30. package/BarChart/index.d.ts +1 -1
  31. package/BarChart/index.js +1 -8
  32. package/BarChart/index.mjs +1 -1
  33. package/CHANGELOG.md +123 -1
  34. package/ChartContainer/ChartContainer.d.mts +1 -1
  35. package/ChartContainer/ChartContainer.d.ts +1 -1
  36. package/ChartContainer/useChartContainerProps.d.mts +2 -2
  37. package/ChartContainer/useChartContainerProps.d.ts +2 -2
  38. package/ChartDataProvider/ChartDataProvider.d.mts +1 -1
  39. package/ChartDataProvider/ChartDataProvider.d.ts +1 -1
  40. package/ChartDataProvider/useChartDataProviderProps.d.mts +2 -2
  41. package/ChartDataProvider/useChartDataProviderProps.d.ts +2 -2
  42. package/ChartsContainer/ChartsContainer.d.mts +1 -1
  43. package/ChartsContainer/ChartsContainer.d.ts +1 -1
  44. package/ChartsContainer/ChartsContainer.js +5 -2
  45. package/ChartsContainer/ChartsContainer.mjs +5 -2
  46. package/ChartsContainer/useChartsContainerProps.d.mts +3 -3
  47. package/ChartsContainer/useChartsContainerProps.d.ts +3 -3
  48. package/ChartsContainer/useChartsContainerProps.js +3 -3
  49. package/ChartsContainer/useChartsContainerProps.mjs +3 -3
  50. package/ChartsDataProvider/ChartsDataProvider.d.mts +2 -2
  51. package/ChartsDataProvider/ChartsDataProvider.d.ts +2 -2
  52. package/ChartsDataProvider/useChartsDataProviderProps.d.mts +2 -2
  53. package/ChartsDataProvider/useChartsDataProviderProps.d.ts +2 -2
  54. package/ChartsLabel/ChartsLabelMark.d.mts +8 -1
  55. package/ChartsLabel/ChartsLabelMark.d.ts +8 -1
  56. package/ChartsLabel/ChartsLabelMark.js +29 -3
  57. package/ChartsLabel/ChartsLabelMark.mjs +29 -3
  58. package/ChartsLabel/labelMarkClasses.d.mts +2 -0
  59. package/ChartsLabel/labelMarkClasses.d.ts +2 -0
  60. package/ChartsLabel/labelMarkClasses.js +1 -1
  61. package/ChartsLabel/labelMarkClasses.mjs +1 -1
  62. package/ChartsLegend/ChartsLegend.js +4 -2
  63. package/ChartsLegend/ChartsLegend.mjs +4 -2
  64. package/ChartsLegend/legendContext.types.d.mts +1 -0
  65. package/ChartsLegend/legendContext.types.d.ts +1 -0
  66. package/ChartsTooltip/ChartsAxisTooltipContent.js +3 -1
  67. package/ChartsTooltip/ChartsAxisTooltipContent.mjs +3 -1
  68. package/ChartsTooltip/ChartsItemTooltipContent.js +6 -2
  69. package/ChartsTooltip/ChartsItemTooltipContent.mjs +6 -2
  70. package/ChartsTooltip/ChartsTooltipContainer.js +7 -5
  71. package/ChartsTooltip/ChartsTooltipContainer.mjs +6 -4
  72. package/ChartsTooltip/ChartsTooltipTable.d.mts +1 -1
  73. package/ChartsTooltip/ChartsTooltipTable.d.ts +1 -1
  74. package/ChartsTooltip/useAxesTooltip.d.mts +1 -0
  75. package/ChartsTooltip/useAxesTooltip.d.ts +1 -0
  76. package/ChartsTooltip/useAxesTooltip.js +6 -4
  77. package/ChartsTooltip/useAxesTooltip.mjs +6 -4
  78. package/ChartsTooltip/useItemTooltip.d.mts +5 -3
  79. package/ChartsTooltip/useItemTooltip.d.ts +5 -3
  80. package/ChartsXAxis/useAxisTicksProps.d.mts +286 -286
  81. package/ChartsXAxis/useAxisTicksProps.d.ts +286 -286
  82. package/ChartsYAxis/useAxisTicksProps.d.mts +286 -286
  83. package/ChartsYAxis/useAxisTicksProps.d.ts +286 -286
  84. package/LineChart/AreaElement.d.mts +12 -0
  85. package/LineChart/AreaElement.d.ts +12 -0
  86. package/LineChart/AreaElement.js +28 -9
  87. package/LineChart/AreaElement.mjs +30 -9
  88. package/LineChart/AreaPlot.js +10 -4
  89. package/LineChart/AreaPlot.mjs +11 -5
  90. package/LineChart/CircleMarkElement.js +9 -2
  91. package/LineChart/CircleMarkElement.mjs +10 -3
  92. package/LineChart/LineChart.js +5 -2
  93. package/LineChart/LineChart.mjs +5 -2
  94. package/LineChart/LineElement.d.mts +12 -0
  95. package/LineChart/LineElement.d.ts +12 -0
  96. package/LineChart/LineElement.js +28 -9
  97. package/LineChart/LineElement.mjs +30 -9
  98. package/LineChart/LineHighlightElement.d.mts +12 -0
  99. package/LineChart/LineHighlightElement.d.ts +12 -0
  100. package/LineChart/LineHighlightElement.js +22 -3
  101. package/LineChart/LineHighlightElement.mjs +24 -3
  102. package/LineChart/LinePlot.js +11 -5
  103. package/LineChart/LinePlot.mjs +12 -6
  104. package/LineChart/MarkElement.js +9 -2
  105. package/LineChart/MarkElement.mjs +10 -3
  106. package/LineChart/MarkPlot.js +19 -9
  107. package/LineChart/MarkPlot.mjs +20 -10
  108. package/LineChart/index.d.mts +3 -1
  109. package/LineChart/index.d.ts +3 -1
  110. package/LineChart/index.js +10 -2
  111. package/LineChart/index.mjs +2 -1
  112. package/LineChart/lineClasses.d.mts +34 -0
  113. package/LineChart/lineClasses.d.ts +34 -0
  114. package/LineChart/lineClasses.js +32 -0
  115. package/LineChart/lineClasses.mjs +23 -0
  116. package/LineChart/markElementClasses.d.mts +17 -8
  117. package/LineChart/markElementClasses.d.ts +17 -8
  118. package/LineChart/markElementClasses.js +19 -0
  119. package/LineChart/markElementClasses.mjs +20 -0
  120. package/LineChart/seriesConfig/legend.js +1 -0
  121. package/LineChart/seriesConfig/legend.mjs +1 -0
  122. package/LineChart/seriesConfig/seriesProcessor.js +1 -1
  123. package/LineChart/seriesConfig/seriesProcessor.mjs +1 -1
  124. package/LineChart/seriesConfig/tooltip.js +2 -1
  125. package/LineChart/seriesConfig/tooltip.mjs +2 -1
  126. package/PieChart/FocusedPieArc.js +8 -6
  127. package/PieChart/FocusedPieArc.mjs +8 -6
  128. package/PieChart/PieArc.d.mts +14 -11
  129. package/PieChart/PieArc.d.ts +14 -11
  130. package/PieChart/PieArc.js +22 -4
  131. package/PieChart/PieArc.mjs +24 -4
  132. package/PieChart/PieArcLabel.d.mts +16 -2
  133. package/PieChart/PieArcLabel.d.ts +16 -2
  134. package/PieChart/PieArcLabel.js +26 -5
  135. package/PieChart/PieArcLabel.mjs +28 -5
  136. package/PieChart/PieArcLabelPlot.js +6 -1
  137. package/PieChart/PieArcLabelPlot.mjs +6 -1
  138. package/PieChart/PieArcPlot.js +6 -1
  139. package/PieChart/PieArcPlot.mjs +6 -1
  140. package/PieChart/PieChart.js +5 -2
  141. package/PieChart/PieChart.mjs +5 -2
  142. package/PieChart/PiePlot.d.mts +1 -0
  143. package/PieChart/PiePlot.d.ts +1 -0
  144. package/PieChart/PiePlot.js +4 -1
  145. package/PieChart/PiePlot.mjs +4 -1
  146. package/PieChart/dataTransform/useTransformData.js +6 -8
  147. package/PieChart/dataTransform/useTransformData.mjs +6 -8
  148. package/PieChart/pieClasses.d.mts +22 -1
  149. package/PieChart/pieClasses.d.ts +22 -1
  150. package/PieChart/pieClasses.js +10 -3
  151. package/PieChart/pieClasses.mjs +10 -3
  152. package/RadarChart/RadarChart.js +5 -2
  153. package/RadarChart/RadarChart.mjs +5 -2
  154. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.mts +3 -3
  155. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.d.ts +3 -3
  156. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.js +7 -14
  157. package/RadarChart/RadarSeriesPlot/RadarSeriesArea.mjs +7 -14
  158. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.mts +2 -2
  159. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.d.ts +2 -2
  160. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.js +7 -14
  161. package/RadarChart/RadarSeriesPlot/RadarSeriesMarks.mjs +7 -14
  162. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.js +4 -9
  163. package/RadarChart/RadarSeriesPlot/RadarSeriesPlot.mjs +4 -9
  164. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.mts +1 -1
  165. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.d.ts +1 -1
  166. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.js +8 -16
  167. package/RadarChart/RadarSeriesPlot/useRadarSeriesData.mjs +8 -16
  168. package/RadarChart/seriesConfig/tooltip.js +13 -8
  169. package/RadarChart/seriesConfig/tooltip.mjs +13 -8
  170. package/RadarChart/useRadarChartProps.js +3 -3
  171. package/RadarChart/useRadarChartProps.mjs +3 -3
  172. package/ScatterChart/BatchScatter.d.mts +2 -1
  173. package/ScatterChart/BatchScatter.d.ts +2 -1
  174. package/ScatterChart/BatchScatter.js +5 -3
  175. package/ScatterChart/BatchScatter.mjs +4 -3
  176. package/ScatterChart/FocusedScatterMark.d.mts +4 -1
  177. package/ScatterChart/FocusedScatterMark.d.ts +4 -1
  178. package/ScatterChart/FocusedScatterMark.js +12 -2
  179. package/ScatterChart/FocusedScatterMark.mjs +11 -1
  180. package/ScatterChart/Scatter.d.mts +1 -1
  181. package/ScatterChart/Scatter.d.ts +1 -1
  182. package/ScatterChart/Scatter.js +11 -9
  183. package/ScatterChart/Scatter.mjs +11 -9
  184. package/ScatterChart/ScatterChart.js +5 -2
  185. package/ScatterChart/ScatterChart.mjs +5 -2
  186. package/ScatterChart/ScatterPlot.d.mts +2 -1
  187. package/ScatterChart/ScatterPlot.d.ts +2 -1
  188. package/ScatterChart/ScatterPlot.js +16 -2
  189. package/ScatterChart/ScatterPlot.mjs +16 -2
  190. package/ScatterChart/index.d.mts +2 -2
  191. package/ScatterChart/index.d.ts +2 -2
  192. package/ScatterChart/scatterClasses.d.mts +14 -2
  193. package/ScatterChart/scatterClasses.d.ts +14 -2
  194. package/ScatterChart/scatterClasses.js +9 -3
  195. package/ScatterChart/scatterClasses.mjs +9 -3
  196. package/SparkLineChart/SparkLineChart.js +5 -2
  197. package/SparkLineChart/SparkLineChart.mjs +5 -2
  198. package/context/ChartApi.d.mts +1 -1
  199. package/context/ChartApi.d.ts +1 -1
  200. package/context/ChartProvider/ChartProvider.types.d.mts +2 -2
  201. package/context/ChartProvider/ChartProvider.types.d.ts +2 -2
  202. package/context/ChartsProvider/ChartsProvider.d.mts +1 -1
  203. package/context/ChartsProvider/ChartsProvider.d.ts +1 -1
  204. package/context/ChartsProvider/ChartsProvider.types.d.mts +3 -3
  205. package/context/ChartsProvider/ChartsProvider.types.d.ts +3 -3
  206. package/hooks/index.d.mts +2 -2
  207. package/hooks/index.d.ts +2 -2
  208. package/hooks/index.js +8 -8
  209. package/hooks/index.mjs +2 -2
  210. package/hooks/useInteractionItemProps.d.mts +1 -2
  211. package/hooks/useInteractionItemProps.d.ts +1 -2
  212. package/hooks/{useItemHighlighted.d.mts → useItemHighlightState.d.mts} +5 -13
  213. package/hooks/{useItemHighlighted.d.ts → useItemHighlightState.d.ts} +5 -13
  214. package/hooks/{useItemHighlighted.js → useItemHighlightState.js} +5 -10
  215. package/hooks/useItemHighlightState.mjs +17 -0
  216. package/hooks/useItemHighlightStateGetter.d.mts +9 -0
  217. package/hooks/useItemHighlightStateGetter.d.ts +9 -0
  218. package/hooks/useItemHighlightStateGetter.js +21 -0
  219. package/hooks/useItemHighlightStateGetter.mjs +16 -0
  220. package/index.js +1 -1
  221. package/index.mjs +1 -1
  222. package/internals/commonNextFocusItem.d.mts +5 -5
  223. package/internals/commonNextFocusItem.d.ts +5 -5
  224. package/internals/createCommonKeyboardFocusHandler.d.mts +2 -2
  225. package/internals/createCommonKeyboardFocusHandler.d.ts +2 -2
  226. package/internals/identifierCleaner.d.mts +8 -4
  227. package/internals/identifierCleaner.d.ts +8 -4
  228. package/internals/identifierCleaner.js +5 -1
  229. package/internals/identifierCleaner.mjs +5 -1
  230. package/internals/identifierSerializer.d.mts +10 -2
  231. package/internals/identifierSerializer.d.ts +10 -2
  232. package/internals/identifierSerializer.js +8 -0
  233. package/internals/identifierSerializer.mjs +8 -0
  234. package/internals/plugins/allPlugins.d.mts +2 -2
  235. package/internals/plugins/allPlugins.d.ts +2 -2
  236. package/internals/plugins/corePlugins/corePlugins.d.mts +1 -1
  237. package/internals/plugins/corePlugins/corePlugins.d.ts +1 -1
  238. package/internals/plugins/corePlugins/useChartSeries/processSeries.d.mts +6 -6
  239. package/internals/plugins/corePlugins/useChartSeries/processSeries.d.ts +6 -6
  240. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.mts +9 -9
  241. package/internals/plugins/corePlugins/useChartSeries/useChartSeries.types.d.ts +9 -9
  242. package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.mts +2 -2
  243. package/internals/plugins/corePlugins/useChartSeries/useColorProcessor.d.ts +2 -2
  244. package/internals/plugins/corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.d.mts +3 -3
  245. package/internals/plugins/corePlugins/useChartSeriesConfig/types/cartesianExtremumGetter.types.d.ts +3 -3
  246. package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.mts +4 -4
  247. package/internals/plugins/corePlugins/useChartSeriesConfig/types/colorProcessor.types.d.ts +4 -4
  248. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.mts +2 -2
  249. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getItemAtPosition.types.d.ts +2 -2
  250. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.d.mts +1 -1
  251. package/internals/plugins/corePlugins/useChartSeriesConfig/types/getSeriesWithDefaultValues.types.d.ts +1 -1
  252. package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.mts +1 -1
  253. package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierCleaner.types.d.ts +1 -1
  254. package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.mts +1 -1
  255. package/internals/plugins/corePlugins/useChartSeriesConfig/types/identifierSerializer.types.d.ts +1 -1
  256. package/internals/plugins/corePlugins/useChartSeriesConfig/types/legendGetter.types.d.mts +1 -1
  257. package/internals/plugins/corePlugins/useChartSeriesConfig/types/legendGetter.types.d.ts +1 -1
  258. package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.mts +3 -3
  259. package/internals/plugins/corePlugins/useChartSeriesConfig/types/polarExtremumGetter.types.d.ts +3 -3
  260. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.mts +28 -28
  261. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesConfig.types.d.ts +28 -28
  262. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesLayout.types.d.mts +2 -2
  263. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesLayout.types.d.ts +2 -2
  264. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesProcessor.types.d.mts +6 -6
  265. package/internals/plugins/corePlugins/useChartSeriesConfig/types/seriesProcessor.types.d.ts +6 -6
  266. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.mts +21 -11
  267. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipGetter.types.d.ts +21 -11
  268. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.mts +4 -4
  269. package/internals/plugins/corePlugins/useChartSeriesConfig/types/tooltipItemPositionGetter.types.d.ts +4 -4
  270. package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.d.mts +10 -10
  271. package/internals/plugins/corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.d.ts +10 -10
  272. package/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.d.mts +3 -3
  273. package/internals/plugins/corePlugins/useChartSeriesConfig/utils/cleanIdentifier.d.ts +3 -3
  274. package/internals/plugins/corePlugins/useChartSeriesConfig/utils/serializeIdentifier.d.mts +3 -3
  275. package/internals/plugins/corePlugins/useChartSeriesConfig/utils/serializeIdentifier.d.ts +3 -3
  276. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.mts +5 -5
  277. package/internals/plugins/featurePlugins/useChartCartesianAxis/computeAxisValue.d.ts +5 -5
  278. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.mts +1 -1
  279. package/internals/plugins/featurePlugins/useChartCartesianAxis/getAxisTriggerTooltip.d.ts +1 -1
  280. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.mts +5 -5
  281. package/internals/plugins/featurePlugins/useChartCartesianAxis/useChartCartesianAxisRendering.selectors.d.ts +5 -5
  282. package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.mts +1 -2
  283. package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.d.ts +1 -2
  284. package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.js +0 -5
  285. package/internals/plugins/featurePlugins/useChartHighlight/highlightStates.mjs +0 -4
  286. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.mts +10 -29
  287. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.d.ts +10 -29
  288. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.js +27 -64
  289. package/internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.mjs +24 -60
  290. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.mts +3 -3
  291. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/keyboardFocusHandler.types.d.ts +3 -3
  292. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.js +8 -10
  293. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.mjs +8 -10
  294. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.js +1 -1
  295. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.selectors.mjs +1 -1
  296. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.mts +8 -2
  297. package/internals/plugins/featurePlugins/useChartKeyboardNavigation/useChartKeyboardNavigation.types.d.ts +8 -2
  298. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.mts +5 -5
  299. package/internals/plugins/featurePlugins/useChartPolarAxis/computeAxisValue.d.ts +5 -5
  300. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.mts +1 -1
  301. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisExtremum.d.ts +1 -1
  302. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.mts +1 -1
  303. package/internals/plugins/featurePlugins/useChartPolarAxis/getAxisTriggerTooltip.d.ts +1 -1
  304. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.js +6 -4
  305. package/internals/plugins/featurePlugins/useChartPolarAxis/useChartPolarInteraction.selectors.mjs +6 -4
  306. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.mts +10 -10
  307. package/internals/plugins/featurePlugins/useChartTooltip/useChartTooltip.types.d.ts +10 -10
  308. package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.mts +16 -16
  309. package/internals/plugins/featurePlugins/useChartVisibilityManager/useChartVisibilityManager.types.d.ts +16 -16
  310. package/internals/plugins/models/chart.d.mts +1 -1
  311. package/internals/plugins/models/chart.d.ts +1 -1
  312. package/models/seriesType/config.d.mts +18 -6
  313. package/models/seriesType/config.d.ts +18 -6
  314. package/models/seriesType/index.d.mts +8 -8
  315. package/models/seriesType/index.d.ts +8 -8
  316. package/models/seriesType/line.d.mts +2 -1
  317. package/models/seriesType/line.d.ts +2 -1
  318. package/models/seriesType/radar.d.mts +1 -1
  319. package/models/seriesType/radar.d.ts +1 -1
  320. package/package.json +3 -3
  321. package/themeAugmentation/components.d.mts +26 -1
  322. package/themeAugmentation/components.d.ts +26 -1
  323. package/themeAugmentation/overrides.d.mts +15 -1
  324. package/themeAugmentation/overrides.d.ts +15 -1
  325. package/hooks/useItemHighlighted.mjs +0 -22
  326. package/hooks/useItemHighlightedGetter.d.mts +0 -53
  327. package/hooks/useItemHighlightedGetter.d.ts +0 -53
  328. package/hooks/useItemHighlightedGetter.js +0 -26
  329. package/hooks/useItemHighlightedGetter.mjs +0 -21
@@ -8,8 +8,8 @@ export type ChartContextValue<TSignatures extends readonly ChartAnyPluginSignatu
8
8
  /**
9
9
  * @deprecated Use `ChartsPluginParams` instead. We added S to the charts prefix to align with other components.
10
10
  */
11
- export type ChartPluginParams<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = ChartsPluginParams<TSeriesType, TSignatures>;
11
+ export type ChartPluginParams<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = ChartsPluginParams<SeriesType, TSignatures>;
12
12
  /**
13
13
  * @deprecated Use `ChartsProviderProps` instead. We added S to the charts prefix to align with other components.
14
14
  */
15
- export type ChartProviderProps<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = ChartsProviderProps<TSeriesType, TSignatures>;
15
+ export type ChartProviderProps<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = ChartsProviderProps<SeriesType, TSignatures>;
@@ -8,8 +8,8 @@ export type ChartContextValue<TSignatures extends readonly ChartAnyPluginSignatu
8
8
  /**
9
9
  * @deprecated Use `ChartsPluginParams` instead. We added S to the charts prefix to align with other components.
10
10
  */
11
- export type ChartPluginParams<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = ChartsPluginParams<TSeriesType, TSignatures>;
11
+ export type ChartPluginParams<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = ChartsPluginParams<SeriesType, TSignatures>;
12
12
  /**
13
13
  * @deprecated Use `ChartsProviderProps` instead. We added S to the charts prefix to align with other components.
14
14
  */
15
- export type ChartProviderProps<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = ChartsProviderProps<TSeriesType, TSignatures>;
15
+ export type ChartProviderProps<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = ChartsProviderProps<SeriesType, TSignatures>;
@@ -3,5 +3,5 @@ import type { ChartsProviderProps } from "./ChartsProvider.types.mjs";
3
3
  import { type ChartAnyPluginSignature } from "../../internals/plugins/models/index.mjs";
4
4
  import type { ChartSeriesType } from "../../models/seriesType/config.mjs";
5
5
  import type { ChartCorePluginSignatures } from "../../internals/plugins/corePlugins/index.mjs";
6
- declare function ChartsProvider<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = ChartCorePluginSignatures<TSeriesType>>(props: React.PropsWithChildren<ChartsProviderProps<TSeriesType, TSignatures>>): import("react/jsx-runtime").JSX.Element;
6
+ declare function ChartsProvider<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = ChartCorePluginSignatures<SeriesType>>(props: React.PropsWithChildren<ChartsProviderProps<SeriesType, TSignatures>>): import("react/jsx-runtime").JSX.Element;
7
7
  export { ChartsProvider };
@@ -3,5 +3,5 @@ import type { ChartsProviderProps } from "./ChartsProvider.types.js";
3
3
  import { type ChartAnyPluginSignature } from "../../internals/plugins/models/index.js";
4
4
  import type { ChartSeriesType } from "../../models/seriesType/config.js";
5
5
  import type { ChartCorePluginSignatures } from "../../internals/plugins/corePlugins/index.js";
6
- declare function ChartsProvider<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = ChartCorePluginSignatures<TSeriesType>>(props: React.PropsWithChildren<ChartsProviderProps<TSeriesType, TSignatures>>): import("react/jsx-runtime").JSX.Element;
6
+ declare function ChartsProvider<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = ChartCorePluginSignatures<SeriesType>>(props: React.PropsWithChildren<ChartsProviderProps<SeriesType, TSignatures>>): import("react/jsx-runtime").JSX.Element;
7
7
  export { ChartsProvider };
@@ -17,11 +17,11 @@ export type ChartsContextValue<TSignatures extends readonly ChartAnyPluginSignat
17
17
  */
18
18
  store: Store<ChartState<TSignatures, TOptionalSignatures>>;
19
19
  };
20
- export type ChartsPluginParams<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = UseChartBaseProps<TSignatures> & MergeSignaturesProperty<[...ChartCorePluginSignatures<TSeriesType>, ...TSignatures], 'params'>;
21
- export interface ChartsProviderProps<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> {
20
+ export type ChartsPluginParams<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = UseChartBaseProps<TSignatures> & MergeSignaturesProperty<[...ChartCorePluginSignatures<SeriesType>, ...TSignatures], 'params'>;
21
+ export interface ChartsProviderProps<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> {
22
22
  /**
23
23
  * Array of plugins used to add features to the chart.
24
24
  */
25
25
  plugins?: ConvertSignaturesIntoPlugins<TSignatures>;
26
- pluginParams?: ChartsPluginParams<TSeriesType, TSignatures>;
26
+ pluginParams?: ChartsPluginParams<SeriesType, TSignatures>;
27
27
  }
@@ -17,11 +17,11 @@ export type ChartsContextValue<TSignatures extends readonly ChartAnyPluginSignat
17
17
  */
18
18
  store: Store<ChartState<TSignatures, TOptionalSignatures>>;
19
19
  };
20
- export type ChartsPluginParams<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = UseChartBaseProps<TSignatures> & MergeSignaturesProperty<[...ChartCorePluginSignatures<TSeriesType>, ...TSignatures], 'params'>;
21
- export interface ChartsProviderProps<TSeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> {
20
+ export type ChartsPluginParams<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> = UseChartBaseProps<TSignatures> & MergeSignaturesProperty<[...ChartCorePluginSignatures<SeriesType>, ...TSignatures], 'params'>;
21
+ export interface ChartsProviderProps<SeriesType extends ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[]> {
22
22
  /**
23
23
  * Array of plugins used to add features to the chart.
24
24
  */
25
25
  plugins?: ConvertSignaturesIntoPlugins<TSignatures>;
26
- pluginParams?: ChartsPluginParams<TSeriesType, TSignatures>;
26
+ pluginParams?: ChartsPluginParams<SeriesType, TSignatures>;
27
27
  }
package/hooks/index.d.mts CHANGED
@@ -12,8 +12,8 @@ export { type UsePieSeriesReturnValue, type UsePieSeriesContextReturnValue, useP
12
12
  export * from "./useBarSeries.mjs";
13
13
  export * from "./useLineSeries.mjs";
14
14
  export * from "./useRadarSeries.mjs";
15
- export * from "./useItemHighlighted.mjs";
16
- export * from "./useItemHighlightedGetter.mjs";
15
+ export * from "./useItemHighlightState.mjs";
16
+ export * from "./useItemHighlightStateGetter.mjs";
17
17
  export * from "./useLegend.mjs";
18
18
  export { useChartGradientId, useChartGradientIdObjectBound } from "./useChartGradientId.mjs";
19
19
  export * from "./animation/index.mjs";
package/hooks/index.d.ts CHANGED
@@ -12,8 +12,8 @@ export { type UsePieSeriesReturnValue, type UsePieSeriesContextReturnValue, useP
12
12
  export * from "./useBarSeries.js";
13
13
  export * from "./useLineSeries.js";
14
14
  export * from "./useRadarSeries.js";
15
- export * from "./useItemHighlighted.js";
16
- export * from "./useItemHighlightedGetter.js";
15
+ export * from "./useItemHighlightState.js";
16
+ export * from "./useItemHighlightStateGetter.js";
17
17
  export * from "./useLegend.js";
18
18
  export { useChartGradientId, useChartGradientIdObjectBound } from "./useChartGradientId.js";
19
19
  export * from "./animation/index.js";
package/hooks/index.js CHANGED
@@ -204,27 +204,27 @@ Object.keys(_useRadarSeries).forEach(function (key) {
204
204
  }
205
205
  });
206
206
  });
207
- var _useItemHighlighted = require("./useItemHighlighted");
208
- Object.keys(_useItemHighlighted).forEach(function (key) {
207
+ var _useItemHighlightState = require("./useItemHighlightState");
208
+ Object.keys(_useItemHighlightState).forEach(function (key) {
209
209
  if (key === "default" || key === "__esModule") return;
210
210
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
211
- if (key in exports && exports[key] === _useItemHighlighted[key]) return;
211
+ if (key in exports && exports[key] === _useItemHighlightState[key]) return;
212
212
  Object.defineProperty(exports, key, {
213
213
  enumerable: true,
214
214
  get: function () {
215
- return _useItemHighlighted[key];
215
+ return _useItemHighlightState[key];
216
216
  }
217
217
  });
218
218
  });
219
- var _useItemHighlightedGetter = require("./useItemHighlightedGetter");
220
- Object.keys(_useItemHighlightedGetter).forEach(function (key) {
219
+ var _useItemHighlightStateGetter = require("./useItemHighlightStateGetter");
220
+ Object.keys(_useItemHighlightStateGetter).forEach(function (key) {
221
221
  if (key === "default" || key === "__esModule") return;
222
222
  if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
223
- if (key in exports && exports[key] === _useItemHighlightedGetter[key]) return;
223
+ if (key in exports && exports[key] === _useItemHighlightStateGetter[key]) return;
224
224
  Object.defineProperty(exports, key, {
225
225
  enumerable: true,
226
226
  get: function () {
227
- return _useItemHighlightedGetter[key];
227
+ return _useItemHighlightStateGetter[key];
228
228
  }
229
229
  });
230
230
  });
package/hooks/index.mjs CHANGED
@@ -12,8 +12,8 @@ export { usePieSeries, usePieSeriesContext } from "./usePieSeries.mjs";
12
12
  export * from "./useBarSeries.mjs";
13
13
  export * from "./useLineSeries.mjs";
14
14
  export * from "./useRadarSeries.mjs";
15
- export * from "./useItemHighlighted.mjs";
16
- export * from "./useItemHighlightedGetter.mjs";
15
+ export * from "./useItemHighlightState.mjs";
16
+ export * from "./useItemHighlightStateGetter.mjs";
17
17
  export * from "./useLegend.mjs";
18
18
  export { useChartGradientId, useChartGradientIdObjectBound } from "./useChartGradientId.mjs";
19
19
  export * from "./animation/index.mjs";
@@ -1,12 +1,11 @@
1
1
  import * as React from 'react';
2
- import { type SeriesItemIdentifierWithData } from "../models/index.mjs";
3
2
  import type { UseChartHighlightSignature } from "../internals/plugins/featurePlugins/useChartHighlight/index.mjs";
4
3
  import type { UseChartInteractionSignature } from "../internals/plugins/featurePlugins/useChartInteraction/index.mjs";
5
4
  import type { ChartSeriesType } from "../models/seriesType/config.mjs";
6
5
  import type { SeriesItemIdentifierWithType } from "../models/seriesType/index.mjs";
7
6
  import type { ChartInstance } from "../internals/plugins/models/index.mjs";
8
7
  import type { UseChartTooltipSignature } from "../internals/plugins/featurePlugins/useChartTooltip/index.mjs";
9
- export declare const useInteractionItemProps: <SeriesType extends ChartSeriesType>(data: SeriesItemIdentifierWithData<SeriesType>, skip?: boolean) => {
8
+ export declare const useInteractionItemProps: <SeriesType extends ChartSeriesType>(data: SeriesItemIdentifierWithType<SeriesType>, skip?: boolean) => {
10
9
  onPointerEnter?: () => void;
11
10
  onPointerLeave?: () => void;
12
11
  onPointerDown?: (event: React.PointerEvent) => void;
@@ -1,12 +1,11 @@
1
1
  import * as React from 'react';
2
- import { type SeriesItemIdentifierWithData } from "../models/index.js";
3
2
  import type { UseChartHighlightSignature } from "../internals/plugins/featurePlugins/useChartHighlight/index.js";
4
3
  import type { UseChartInteractionSignature } from "../internals/plugins/featurePlugins/useChartInteraction/index.js";
5
4
  import type { ChartSeriesType } from "../models/seriesType/config.js";
6
5
  import type { SeriesItemIdentifierWithType } from "../models/seriesType/index.js";
7
6
  import type { ChartInstance } from "../internals/plugins/models/index.js";
8
7
  import type { UseChartTooltipSignature } from "../internals/plugins/featurePlugins/useChartTooltip/index.js";
9
- export declare const useInteractionItemProps: <SeriesType extends ChartSeriesType>(data: SeriesItemIdentifierWithData<SeriesType>, skip?: boolean) => {
8
+ export declare const useInteractionItemProps: <SeriesType extends ChartSeriesType>(data: SeriesItemIdentifierWithType<SeriesType>, skip?: boolean) => {
10
9
  onPointerEnter?: () => void;
11
10
  onPointerLeave?: () => void;
12
11
  onPointerDown?: (event: React.PointerEvent) => void;
@@ -1,24 +1,16 @@
1
1
  import type { HighlightItemIdentifierWithType } from "../models/seriesType/index.mjs";
2
2
  import type { ChartSeriesType } from "../models/seriesType/config.mjs";
3
- type UseItemHighlightedReturnType = {
4
- /**
5
- * Whether the item is highlighted.
6
- */
7
- isHighlighted: boolean;
8
- /**
9
- * Whether the item is faded.
10
- */
11
- isFaded: boolean;
12
- };
3
+ export type HighlightState = 'highlighted' | 'faded' | 'none';
4
+ type UseItemHighlightedReturnType = HighlightState;
13
5
  type UseItemHighlightedParams<SeriesType extends ChartSeriesType = ChartSeriesType> = HighlightItemIdentifierWithType<SeriesType> | null;
14
6
  /**
15
7
  * A hook to check the highlighted state of the item.
16
8
  * This function already calculates that an item is not faded if it is highlighted.
17
9
  *
18
- * If you need fine control over the state, use the `useItemHighlightedGetter` hook instead.
10
+ * If you need fine control over the state, use the `useItemHighlightStateGetter` hook instead.
19
11
  *
20
12
  * @param {HighlightItemIdentifierWithType<SeriesType> | null} item is the item to check
21
- * @returns {UseItemHighlightedReturnType} the state of the item
13
+ * @returns {HighlightState} the state of the item
22
14
  */
23
- export declare function useItemHighlighted<SeriesType extends ChartSeriesType = ChartSeriesType>(item: UseItemHighlightedParams<SeriesType>): UseItemHighlightedReturnType;
15
+ export declare function useItemHighlightState<SeriesType extends ChartSeriesType = ChartSeriesType>(item: UseItemHighlightedParams<SeriesType>): UseItemHighlightedReturnType;
24
16
  export {};
@@ -1,24 +1,16 @@
1
1
  import type { HighlightItemIdentifierWithType } from "../models/seriesType/index.js";
2
2
  import type { ChartSeriesType } from "../models/seriesType/config.js";
3
- type UseItemHighlightedReturnType = {
4
- /**
5
- * Whether the item is highlighted.
6
- */
7
- isHighlighted: boolean;
8
- /**
9
- * Whether the item is faded.
10
- */
11
- isFaded: boolean;
12
- };
3
+ export type HighlightState = 'highlighted' | 'faded' | 'none';
4
+ type UseItemHighlightedReturnType = HighlightState;
13
5
  type UseItemHighlightedParams<SeriesType extends ChartSeriesType = ChartSeriesType> = HighlightItemIdentifierWithType<SeriesType> | null;
14
6
  /**
15
7
  * A hook to check the highlighted state of the item.
16
8
  * This function already calculates that an item is not faded if it is highlighted.
17
9
  *
18
- * If you need fine control over the state, use the `useItemHighlightedGetter` hook instead.
10
+ * If you need fine control over the state, use the `useItemHighlightStateGetter` hook instead.
19
11
  *
20
12
  * @param {HighlightItemIdentifierWithType<SeriesType> | null} item is the item to check
21
- * @returns {UseItemHighlightedReturnType} the state of the item
13
+ * @returns {HighlightState} the state of the item
22
14
  */
23
- export declare function useItemHighlighted<SeriesType extends ChartSeriesType = ChartSeriesType>(item: UseItemHighlightedParams<SeriesType>): UseItemHighlightedReturnType;
15
+ export declare function useItemHighlightState<SeriesType extends ChartSeriesType = ChartSeriesType>(item: UseItemHighlightedParams<SeriesType>): UseItemHighlightedReturnType;
24
16
  export {};
@@ -4,24 +4,19 @@
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.useItemHighlighted = useItemHighlighted;
7
+ exports.useItemHighlightState = useItemHighlightState;
8
8
  var _useStore = require("../internals/store/useStore");
9
9
  var _useChartHighlight = require("../internals/plugins/featurePlugins/useChartHighlight");
10
10
  /**
11
11
  * A hook to check the highlighted state of the item.
12
12
  * This function already calculates that an item is not faded if it is highlighted.
13
13
  *
14
- * If you need fine control over the state, use the `useItemHighlightedGetter` hook instead.
14
+ * If you need fine control over the state, use the `useItemHighlightStateGetter` hook instead.
15
15
  *
16
16
  * @param {HighlightItemIdentifierWithType<SeriesType> | null} item is the item to check
17
- * @returns {UseItemHighlightedReturnType} the state of the item
17
+ * @returns {HighlightState} the state of the item
18
18
  */
19
- function useItemHighlighted(item) {
19
+ function useItemHighlightState(item) {
20
20
  const store = (0, _useStore.useStore)();
21
- const isHighlighted = store.use(_useChartHighlight.selectorChartsIsHighlighted, item);
22
- const isFaded = store.use(_useChartHighlight.selectorChartsIsFaded, item);
23
- return {
24
- isHighlighted,
25
- isFaded: !isHighlighted && isFaded
26
- };
21
+ return store.use(_useChartHighlight.selectorChartsHighlightState, item);
27
22
  }
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+
3
+ import { useStore } from "../internals/store/useStore.mjs";
4
+ import { selectorChartsHighlightState } from "../internals/plugins/featurePlugins/useChartHighlight/index.mjs";
5
+ /**
6
+ * A hook to check the highlighted state of the item.
7
+ * This function already calculates that an item is not faded if it is highlighted.
8
+ *
9
+ * If you need fine control over the state, use the `useItemHighlightStateGetter` hook instead.
10
+ *
11
+ * @param {HighlightItemIdentifierWithType<SeriesType> | null} item is the item to check
12
+ * @returns {HighlightState} the state of the item
13
+ */
14
+ export function useItemHighlightState(item) {
15
+ const store = useStore();
16
+ return store.use(selectorChartsHighlightState, item);
17
+ }
@@ -0,0 +1,9 @@
1
+ import { type ChartSeriesType } from "../models/seriesType/config.mjs";
2
+ /**
3
+ * A hook to get a callback that returns the highlight state of an item.
4
+ *
5
+ * If you're interested by a single item, consider using `useItemHighlightState`.
6
+ *
7
+ * @returns {(item: HighlightItemIdentifierWithType | null) => HighlightState} callback to get the highlight state of an item.
8
+ */
9
+ export declare function useItemHighlightStateGetter<SeriesType extends ChartSeriesType>(): (item: import("../index.mjs").HighlightItemIdentifierWithType<import("../internals/index.mjs").ComposableChartSeriesType<keyof import("../internals/index.mjs").ChartsSeriesConfig>> | null) => import("./useItemHighlightState.mjs").HighlightState;
@@ -0,0 +1,9 @@
1
+ import { type ChartSeriesType } from "../models/seriesType/config.js";
2
+ /**
3
+ * A hook to get a callback that returns the highlight state of an item.
4
+ *
5
+ * If you're interested by a single item, consider using `useItemHighlightState`.
6
+ *
7
+ * @returns {(item: HighlightItemIdentifierWithType | null) => HighlightState} callback to get the highlight state of an item.
8
+ */
9
+ export declare function useItemHighlightStateGetter<SeriesType extends ChartSeriesType>(): (item: import("../index.js").HighlightItemIdentifierWithType<import("../internals/index.js").ComposableChartSeriesType<keyof import("../internals/index.js").ChartsSeriesConfig>> | null) => import("./useItemHighlightState.js").HighlightState;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.useItemHighlightStateGetter = useItemHighlightStateGetter;
8
+ var _useStore = require("../internals/store/useStore");
9
+ var _useChartHighlight = require("../internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors");
10
+ /**
11
+ * A hook to get a callback that returns the highlight state of an item.
12
+ *
13
+ * If you're interested by a single item, consider using `useItemHighlightState`.
14
+ *
15
+ * @returns {(item: HighlightItemIdentifierWithType | null) => HighlightState} callback to get the highlight state of an item.
16
+ */
17
+ function useItemHighlightStateGetter() {
18
+ const store = (0, _useStore.useStore)();
19
+ const getHighlightState = store.use(_useChartHighlight.selectorChartsHighlightStateCallback);
20
+ return getHighlightState;
21
+ }
@@ -0,0 +1,16 @@
1
+ 'use client';
2
+
3
+ import { useStore } from "../internals/store/useStore.mjs";
4
+ import { selectorChartsHighlightStateCallback } from "../internals/plugins/featurePlugins/useChartHighlight/useChartHighlight.selectors.mjs";
5
+ /**
6
+ * A hook to get a callback that returns the highlight state of an item.
7
+ *
8
+ * If you're interested by a single item, consider using `useItemHighlightState`.
9
+ *
10
+ * @returns {(item: HighlightItemIdentifierWithType | null) => HighlightState} callback to get the highlight state of an item.
11
+ */
12
+ export function useItemHighlightStateGetter() {
13
+ const store = useStore();
14
+ const getHighlightState = store.use(selectorChartsHighlightStateCallback);
15
+ return getHighlightState;
16
+ }
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts v9.0.0-alpha.2
2
+ * @mui/x-charts v9.0.0-alpha.3
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts v9.0.0-alpha.2
2
+ * @mui/x-charts v9.0.0-alpha.3
3
3
  *
4
4
  * @license MIT
5
5
  * This source code is licensed under the MIT license found in the
@@ -7,8 +7,8 @@ type ReturnedItem<OutSeriesType extends ChartSeriesType> = {
7
7
  seriesId: SeriesId;
8
8
  dataIndex: number;
9
9
  } | null;
10
- type StateParameters<TSeriesType extends ChartSeriesType> = Pick<ChartState<[UseChartKeyboardNavigationSignature], [], TSeriesType>, 'series'>;
11
- export declare function createGetNextIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
10
+ type StateParameters<SeriesType extends ChartSeriesType> = Pick<ChartState<[UseChartKeyboardNavigationSignature], [], SeriesType>, 'series'>;
11
+ export declare function createGetNextIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
12
12
  /**
13
13
  * The set of series types compatible with this navigation action.
14
14
  */
@@ -17,7 +17,7 @@ compatibleSeriesTypes: Set<OutSeriesType>,
17
17
  * If true, allows cycling from the last item to the first one.
18
18
  */
19
19
  allowCycles?: boolean): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
20
- export declare function createGetPreviousIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
20
+ export declare function createGetPreviousIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
21
21
  /**
22
22
  * The set of series types compatible with this navigation action.
23
23
  */
@@ -26,12 +26,12 @@ compatibleSeriesTypes: Set<OutSeriesType>,
26
26
  * If true, allows cycling from the last item to the first one.
27
27
  */
28
28
  allowCycles?: boolean): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
29
- export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
29
+ export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
30
30
  /**
31
31
  * The set of series types compatible with this navigation action.
32
32
  */
33
33
  compatibleSeriesTypes: Set<OutSeriesType>): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
34
- export declare function createGetPreviousSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
34
+ export declare function createGetPreviousSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
35
35
  /**
36
36
  * The set of series types compatible with this navigation action.
37
37
  */
@@ -7,8 +7,8 @@ type ReturnedItem<OutSeriesType extends ChartSeriesType> = {
7
7
  seriesId: SeriesId;
8
8
  dataIndex: number;
9
9
  } | null;
10
- type StateParameters<TSeriesType extends ChartSeriesType> = Pick<ChartState<[UseChartKeyboardNavigationSignature], [], TSeriesType>, 'series'>;
11
- export declare function createGetNextIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
10
+ type StateParameters<SeriesType extends ChartSeriesType> = Pick<ChartState<[UseChartKeyboardNavigationSignature], [], SeriesType>, 'series'>;
11
+ export declare function createGetNextIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
12
12
  /**
13
13
  * The set of series types compatible with this navigation action.
14
14
  */
@@ -17,7 +17,7 @@ compatibleSeriesTypes: Set<OutSeriesType>,
17
17
  * If true, allows cycling from the last item to the first one.
18
18
  */
19
19
  allowCycles?: boolean): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
20
- export declare function createGetPreviousIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
20
+ export declare function createGetPreviousIndexFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
21
21
  /**
22
22
  * The set of series types compatible with this navigation action.
23
23
  */
@@ -26,12 +26,12 @@ compatibleSeriesTypes: Set<OutSeriesType>,
26
26
  * If true, allows cycling from the last item to the first one.
27
27
  */
28
28
  allowCycles?: boolean): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
29
- export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
29
+ export declare function createGetNextSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
30
30
  /**
31
31
  * The set of series types compatible with this navigation action.
32
32
  */
33
33
  compatibleSeriesTypes: Set<OutSeriesType>): (currentItem: FocusedItemIdentifier<InSeriesType> | null, state: StateParameters<InSeriesType>) => ReturnedItem<OutSeriesType>;
34
- export declare function createGetPreviousSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey'> = InSeriesType>(
34
+ export declare function createGetPreviousSeriesFocusedItem<InSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, OutSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = InSeriesType>(
35
35
  /**
36
36
  * The set of series types compatible with this navigation action.
37
37
  */
@@ -2,14 +2,14 @@ import type { ChartSeriesType } from "../models/seriesType/config.mjs";
2
2
  /**
3
3
  * Create a keyboard focus handler for common use cases where focused item are defined by the series is and data index.
4
4
  */
5
- export declare function createCommonKeyboardFocusHandler<TSeriesType extends Exclude<ChartSeriesType, 'sankey'>, TInputSeriesType extends Exclude<ChartSeriesType, 'sankey'> = TSeriesType>(outSeriesTypes: Set<TSeriesType>, allowCycles?: boolean): (event: KeyboardEvent) => ((currentItem: import("../index.mjs").FocusedItemIdentifier<TInputSeriesType> | null, state: {
5
+ export declare function createCommonKeyboardFocusHandler<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, TInputSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = SeriesType>(outSeriesTypes: Set<SeriesType>, allowCycles?: boolean): (event: KeyboardEvent) => ((currentItem: import("../index.mjs").FocusedItemIdentifier<TInputSeriesType> | null, state: {
6
6
  series: {
7
7
  defaultizedSeries: import("./plugins/corePlugins/useChartSeries/useChartSeries.types.mjs").DefaultizedSeriesGroups<TInputSeriesType>;
8
8
  idToType: import("./index.mjs").SeriesIdToType;
9
9
  dataset?: Readonly<import("./index.mjs").DatasetType>;
10
10
  };
11
11
  }) => {
12
- type: TSeriesType;
12
+ type: SeriesType;
13
13
  seriesId: import("../index.mjs").SeriesId;
14
14
  dataIndex: number;
15
15
  } | null) | null;
@@ -2,14 +2,14 @@ import type { ChartSeriesType } from "../models/seriesType/config.js";
2
2
  /**
3
3
  * Create a keyboard focus handler for common use cases where focused item are defined by the series is and data index.
4
4
  */
5
- export declare function createCommonKeyboardFocusHandler<TSeriesType extends Exclude<ChartSeriesType, 'sankey'>, TInputSeriesType extends Exclude<ChartSeriesType, 'sankey'> = TSeriesType>(outSeriesTypes: Set<TSeriesType>, allowCycles?: boolean): (event: KeyboardEvent) => ((currentItem: import("../index.js").FocusedItemIdentifier<TInputSeriesType> | null, state: {
5
+ export declare function createCommonKeyboardFocusHandler<SeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'>, TInputSeriesType extends Exclude<ChartSeriesType, 'sankey' | 'heatmap'> = SeriesType>(outSeriesTypes: Set<SeriesType>, allowCycles?: boolean): (event: KeyboardEvent) => ((currentItem: import("../index.js").FocusedItemIdentifier<TInputSeriesType> | null, state: {
6
6
  series: {
7
7
  defaultizedSeries: import("./plugins/corePlugins/useChartSeries/useChartSeries.types.js").DefaultizedSeriesGroups<TInputSeriesType>;
8
8
  idToType: import("./index.js").SeriesIdToType;
9
9
  dataset?: Readonly<import("./index.js").DatasetType>;
10
10
  };
11
11
  }) => {
12
- type: TSeriesType;
12
+ type: SeriesType;
13
13
  seriesId: import("../index.js").SeriesId;
14
14
  dataIndex: number;
15
15
  } | null) | null;
@@ -1,11 +1,15 @@
1
1
  import type { SeriesId, SeriesItemIdentifierWithType } from "../models/index.mjs";
2
- import type { ChartSeriesType } from "../models/seriesType/config.mjs";
2
+ import type { SeriesTypeWithDataIndex } from "../models/seriesType/config.mjs";
3
3
  /**
4
4
  * Cleans an identifier by extracting only type, seriesId, and dataIndex properties.
5
5
  * This is the common cleaner for most series types (bar, line, pie, scatter, radar, etc.).
6
+ *
7
+ * The generic constraint ensures this can only be used for series types whose
8
+ * identifier actually includes `dataIndex`. Series types with different identifier
9
+ * properties (like heatmap's xIndex/yIndex) must provide their own cleaner.
6
10
  */
7
- export declare const identifierCleanerSeriesIdDataIndex: <T extends ChartSeriesType>(identifier: {
8
- type: T;
11
+ export declare const identifierCleanerSeriesIdDataIndex: <SeriesType extends SeriesTypeWithDataIndex>(identifier: {
12
+ type: SeriesType;
9
13
  seriesId: SeriesId;
10
14
  dataIndex?: number;
11
- }) => SeriesItemIdentifierWithType<T>;
15
+ }) => SeriesItemIdentifierWithType<SeriesType>;
@@ -1,11 +1,15 @@
1
1
  import type { SeriesId, SeriesItemIdentifierWithType } from "../models/index.js";
2
- import type { ChartSeriesType } from "../models/seriesType/config.js";
2
+ import type { SeriesTypeWithDataIndex } from "../models/seriesType/config.js";
3
3
  /**
4
4
  * Cleans an identifier by extracting only type, seriesId, and dataIndex properties.
5
5
  * This is the common cleaner for most series types (bar, line, pie, scatter, radar, etc.).
6
+ *
7
+ * The generic constraint ensures this can only be used for series types whose
8
+ * identifier actually includes `dataIndex`. Series types with different identifier
9
+ * properties (like heatmap's xIndex/yIndex) must provide their own cleaner.
6
10
  */
7
- export declare const identifierCleanerSeriesIdDataIndex: <T extends ChartSeriesType>(identifier: {
8
- type: T;
11
+ export declare const identifierCleanerSeriesIdDataIndex: <SeriesType extends SeriesTypeWithDataIndex>(identifier: {
12
+ type: SeriesType;
9
13
  seriesId: SeriesId;
10
14
  dataIndex?: number;
11
- }) => SeriesItemIdentifierWithType<T>;
15
+ }) => SeriesItemIdentifierWithType<SeriesType>;
@@ -7,9 +7,13 @@ exports.identifierCleanerSeriesIdDataIndex = void 0;
7
7
  /**
8
8
  * Cleans an identifier by extracting only type, seriesId, and dataIndex properties.
9
9
  * This is the common cleaner for most series types (bar, line, pie, scatter, radar, etc.).
10
+ *
11
+ * The generic constraint ensures this can only be used for series types whose
12
+ * identifier actually includes `dataIndex`. Series types with different identifier
13
+ * properties (like heatmap's xIndex/yIndex) must provide their own cleaner.
10
14
  */
11
15
  const identifierCleanerSeriesIdDataIndex = identifier => {
12
- // @ts-expect-error we need to trust the output type here, since T is generic
16
+ // @ts-expect-error we need to trust the output type here, since SeriesType is generic
13
17
  return {
14
18
  type: identifier.type,
15
19
  seriesId: identifier.seriesId,
@@ -1,9 +1,13 @@
1
1
  /**
2
2
  * Cleans an identifier by extracting only type, seriesId, and dataIndex properties.
3
3
  * This is the common cleaner for most series types (bar, line, pie, scatter, radar, etc.).
4
+ *
5
+ * The generic constraint ensures this can only be used for series types whose
6
+ * identifier actually includes `dataIndex`. Series types with different identifier
7
+ * properties (like heatmap's xIndex/yIndex) must provide their own cleaner.
4
8
  */
5
9
  export const identifierCleanerSeriesIdDataIndex = identifier => {
6
- // @ts-expect-error we need to trust the output type here, since T is generic
10
+ // @ts-expect-error we need to trust the output type here, since SeriesType is generic
7
11
  return {
8
12
  type: identifier.type,
9
13
  seriesId: identifier.seriesId,
@@ -1,9 +1,17 @@
1
1
  import type { SeriesId } from "../models/index.mjs";
2
+ import type { SeriesTypeWithDataIndex } from "../models/seriesType/config.mjs";
2
3
  export declare const typeSerializer: (type: string) => string;
3
4
  export declare const seriesIdSerializer: (id: SeriesId) => string;
4
5
  export declare const dataIndexSerializer: (dataIndex?: number) => string;
5
- export declare const identifierSerializerSeriesIdDataIndex: (identifier: {
6
- type: string;
6
+ /**
7
+ * Serializes an identifier using type, seriesId, and dataIndex properties.
8
+ *
9
+ * The generic constraint ensures this can only be used for series types whose
10
+ * identifier actually includes `dataIndex`. Series types with different identifier
11
+ * properties (like heatmap's xIndex/yIndex) must provide their own serializer.
12
+ */
13
+ export declare const identifierSerializerSeriesIdDataIndex: <SeriesType extends SeriesTypeWithDataIndex>(identifier: {
14
+ type: SeriesType;
7
15
  seriesId: SeriesId;
8
16
  dataIndex?: number;
9
17
  }) => string;
@@ -1,9 +1,17 @@
1
1
  import type { SeriesId } from "../models/index.js";
2
+ import type { SeriesTypeWithDataIndex } from "../models/seriesType/config.js";
2
3
  export declare const typeSerializer: (type: string) => string;
3
4
  export declare const seriesIdSerializer: (id: SeriesId) => string;
4
5
  export declare const dataIndexSerializer: (dataIndex?: number) => string;
5
- export declare const identifierSerializerSeriesIdDataIndex: (identifier: {
6
- type: string;
6
+ /**
7
+ * Serializes an identifier using type, seriesId, and dataIndex properties.
8
+ *
9
+ * The generic constraint ensures this can only be used for series types whose
10
+ * identifier actually includes `dataIndex`. Series types with different identifier
11
+ * properties (like heatmap's xIndex/yIndex) must provide their own serializer.
12
+ */
13
+ export declare const identifierSerializerSeriesIdDataIndex: <SeriesType extends SeriesTypeWithDataIndex>(identifier: {
14
+ type: SeriesType;
7
15
  seriesId: SeriesId;
8
16
  dataIndex?: number;
9
17
  }) => string;
@@ -9,6 +9,14 @@ exports.typeSerializer = typeSerializer;
9
9
  const seriesIdSerializer = id => `Series(${id})`;
10
10
  exports.seriesIdSerializer = seriesIdSerializer;
11
11
  const dataIndexSerializer = dataIndex => dataIndex === undefined ? '' : `Index(${dataIndex})`;
12
+
13
+ /**
14
+ * Serializes an identifier using type, seriesId, and dataIndex properties.
15
+ *
16
+ * The generic constraint ensures this can only be used for series types whose
17
+ * identifier actually includes `dataIndex`. Series types with different identifier
18
+ * properties (like heatmap's xIndex/yIndex) must provide their own serializer.
19
+ */
12
20
  exports.dataIndexSerializer = dataIndexSerializer;
13
21
  const identifierSerializerSeriesIdDataIndex = identifier => {
14
22
  return `${typeSerializer(identifier.type)}${seriesIdSerializer(identifier.seriesId)}${dataIndexSerializer(identifier.dataIndex)}`;