@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
@@ -1,9 +1,8 @@
1
1
  import type { HighlightItemIdentifier, SeriesId } from "../../../../models/seriesType/index.mjs";
2
- import type { ChartsSeriesConfig, ChartSeriesType, HighlightScope } from "../../../../models/seriesType/config.mjs";
2
+ import type { ChartsSeriesConfig, HighlightScope } from "../../../../models/seriesType/config.mjs";
3
3
  type SeriesTypeWithBatchRendering = 'bar' | 'line' | (ChartsSeriesConfig extends {
4
4
  rangeBar: any;
5
5
  } ? 'rangeBar' : never);
6
- export declare function isBatchRenderingSeriesType(type: ChartSeriesType | undefined): type is SeriesTypeWithBatchRendering;
7
6
  export declare function isSeriesHighlighted<SeriesType extends SeriesTypeWithBatchRendering>(scope: Partial<HighlightScope<SeriesType>> | null, item: HighlightItemIdentifier<SeriesType> | null, seriesId: SeriesId): boolean;
8
7
  export declare function isSeriesFaded<SeriesType extends SeriesTypeWithBatchRendering>(scope: Partial<HighlightScope<SeriesType>> | null, item: HighlightItemIdentifier<SeriesType> | null, seriesId: SeriesId): boolean;
9
8
  /**
@@ -1,9 +1,8 @@
1
1
  import type { HighlightItemIdentifier, SeriesId } from "../../../../models/seriesType/index.js";
2
- import type { ChartsSeriesConfig, ChartSeriesType, HighlightScope } from "../../../../models/seriesType/config.js";
2
+ import type { ChartsSeriesConfig, HighlightScope } from "../../../../models/seriesType/config.js";
3
3
  type SeriesTypeWithBatchRendering = 'bar' | 'line' | (ChartsSeriesConfig extends {
4
4
  rangeBar: any;
5
5
  } ? 'rangeBar' : never);
6
- export declare function isBatchRenderingSeriesType(type: ChartSeriesType | undefined): type is SeriesTypeWithBatchRendering;
7
6
  export declare function isSeriesHighlighted<SeriesType extends SeriesTypeWithBatchRendering>(scope: Partial<HighlightScope<SeriesType>> | null, item: HighlightItemIdentifier<SeriesType> | null, seriesId: SeriesId): boolean;
8
7
  export declare function isSeriesFaded<SeriesType extends SeriesTypeWithBatchRendering>(scope: Partial<HighlightScope<SeriesType>> | null, item: HighlightItemIdentifier<SeriesType> | null, seriesId: SeriesId): boolean;
9
8
  /**
@@ -5,13 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.getSeriesHighlightedDataIndex = getSeriesHighlightedDataIndex;
7
7
  exports.getSeriesUnfadedDataIndex = getSeriesUnfadedDataIndex;
8
- exports.isBatchRenderingSeriesType = isBatchRenderingSeriesType;
9
8
  exports.isSeriesFaded = isSeriesFaded;
10
9
  exports.isSeriesHighlighted = isSeriesHighlighted;
11
- const batchRenderingSeries = new Set(['bar', 'rangeBar', 'line']);
12
- function isBatchRenderingSeriesType(type) {
13
- return batchRenderingSeries.has(type);
14
- }
15
10
  function isSeriesHighlighted(scope, item, seriesId) {
16
11
  return scope?.highlight === 'series' && item?.seriesId === seriesId;
17
12
  }
@@ -1,7 +1,3 @@
1
- const batchRenderingSeries = new Set(['bar', 'rangeBar', 'line']);
2
- export function isBatchRenderingSeriesType(type) {
3
- return batchRenderingSeries.has(type);
4
- }
5
1
  export function isSeriesHighlighted(scope, item, seriesId) {
6
2
  return scope?.highlight === 'series' && item?.seriesId === seriesId;
7
3
  }
@@ -2,7 +2,8 @@ import { type SeriesId } from "../../../../models/seriesType/common.mjs";
2
2
  import type { HighlightItemIdentifierWithType } from "../../../../models/seriesType/index.mjs";
3
3
  import type { ChartSeriesType, HighlightScope } from "../../../../models/seriesType/config.mjs";
4
4
  import type { ComposableChartSeriesType } from "../../../../models/seriesType/composition.mjs";
5
- type HighlightLookUp<T extends ChartSeriesType> = { [K in T]?: Map<SeriesId, HighlightScope<K>> };
5
+ import { type HighlightState } from "../../../../hooks/useItemHighlightState.mjs";
6
+ type HighlightLookUp<SeriesType extends ChartSeriesType> = { [K in SeriesType]?: Map<SeriesId, HighlightScope<K>> };
6
7
  export declare const selectorChartsHighlightScopePerSeriesId: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & Partial<{}> & {
7
8
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
8
9
  }) => HighlightLookUp<keyof import("../../../index.mjs").ChartsSeriesConfig>;
@@ -32,46 +33,26 @@ export declare const selectorChartsHighlightedItem: (args_0: import("../../coreP
32
33
  export declare const selectorChartsHighlightScope: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & import("./useChartHighlight.types.mjs").UseChartHighlightState<keyof import("../../../index.mjs").ChartsSeriesConfig> & Partial<{}> & {
33
34
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
34
35
  }) => import("./highlightConfig.types.mjs").CommonHighlightScope | null;
35
- declare const selectorChartsIsHighlightedCallbackImpl: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & import("./useChartHighlight.types.mjs").UseChartHighlightState<keyof import("../../../index.mjs").ChartsSeriesConfig> & Partial<{}> & {
36
+ declare const selectorChartsHighlightStateCallbackImpl: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & import("./useChartHighlight.types.mjs").UseChartHighlightState<keyof import("../../../index.mjs").ChartsSeriesConfig> & Partial<{}> & {
36
37
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
37
- }) => <TestedSeriesType extends ComposableChartSeriesType<keyof import("../../../index.mjs").ChartsSeriesConfig>>(item: HighlightItemIdentifierWithType<TestedSeriesType> | null) => boolean;
38
+ }) => (item: HighlightItemIdentifierWithType<ComposableChartSeriesType<keyof import("../../../index.mjs").ChartsSeriesConfig>> | null) => HighlightState;
38
39
  /**
39
- * Returns a callback to test if an item is highlighted.
40
+ * Returns a callback to get the highlight state of an item.
40
41
  * Uses an explicit function declaration so that TypeScript preserves
41
42
  * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
42
43
  * allowing module augmentation from pro/premium packages to extend the accepted types.
43
44
  */
44
- export declare function selectorChartsIsHighlightedCallback<SeriesType extends ChartSeriesType>(state: Parameters<typeof selectorChartsIsHighlightedCallbackImpl>[0]): (item: HighlightItemIdentifierWithType<SeriesType> | null) => boolean;
45
- declare const selectorChartsIsFadedCallbackImpl: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & import("./useChartHighlight.types.mjs").UseChartHighlightState<keyof import("../../../index.mjs").ChartsSeriesConfig> & Partial<{}> & {
45
+ export declare function selectorChartsHighlightStateCallback<SeriesType extends ChartSeriesType>(state: Parameters<typeof selectorChartsHighlightStateCallbackImpl>[0]): (item: HighlightItemIdentifierWithType<ComposableChartSeriesType<SeriesType>> | null) => HighlightState;
46
+ declare const selectorChartsHighlightStateImpl: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & import("./useChartHighlight.types.mjs").UseChartHighlightState<keyof import("../../../index.mjs").ChartsSeriesConfig> & Partial<{}> & {
46
47
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
47
- }) => <TestedSeriesType extends ComposableChartSeriesType<keyof import("../../../index.mjs").ChartsSeriesConfig>>(item: HighlightItemIdentifierWithType<TestedSeriesType> | null) => boolean;
48
+ }, item: any) => HighlightState;
48
49
  /**
49
- * Returns a callback to test if an item is faded.
50
+ * Returns the highlight state of an item.
50
51
  * Uses an explicit function declaration so that TypeScript preserves
51
52
  * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
52
53
  * allowing module augmentation from pro/premium packages to extend the accepted types.
53
54
  */
54
- export declare function selectorChartsIsFadedCallback<SeriesType extends ChartSeriesType>(state: Parameters<typeof selectorChartsIsFadedCallbackImpl>[0]): (item: HighlightItemIdentifierWithType<SeriesType> | null) => boolean;
55
- declare const selectorChartsIsHighlightedImpl: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & import("./useChartHighlight.types.mjs").UseChartHighlightState<keyof import("../../../index.mjs").ChartsSeriesConfig> & Partial<{}> & {
56
- cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
57
- }, item: any) => boolean;
58
- /**
59
- * Test if an item is highlighted.
60
- * Uses an explicit function declaration so that TypeScript preserves
61
- * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
62
- * allowing module augmentation from pro/premium packages to extend the accepted types.
63
- */
64
- export declare function selectorChartsIsHighlighted<SeriesType extends ChartSeriesType>(state: Parameters<typeof selectorChartsIsHighlightedImpl>[0], item: HighlightItemIdentifierWithType<ComposableChartSeriesType<SeriesType>> | null): boolean;
65
- declare const selectorChartsIsFadedImpl: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & import("./useChartHighlight.types.mjs").UseChartHighlightState<keyof import("../../../index.mjs").ChartsSeriesConfig> & Partial<{}> & {
66
- cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
67
- }, item: any) => boolean;
68
- /**
69
- * Test if an item is faded.
70
- * Uses an explicit function declaration so that TypeScript preserves
71
- * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
72
- * allowing module augmentation from pro/premium packages to extend the accepted types.
73
- */
74
- export declare function selectorChartsIsFaded<SeriesType extends ChartSeriesType>(state: Parameters<typeof selectorChartsIsFadedImpl>[0], item: HighlightItemIdentifierWithType<ComposableChartSeriesType<SeriesType>> | null): boolean;
55
+ export declare function selectorChartsHighlightState(state: Parameters<typeof selectorChartsHighlightStateImpl>[0], item: Parameters<typeof selectorChartsHighlightStateImpl>[1]): HighlightState;
75
56
  export declare const selectorChartIsSeriesHighlighted: (args_0: import("../../corePlugins/useChartId/useChartId.types.mjs").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.mjs").UseChartSeriesConfigState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.mjs").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.mjs").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.mjs").UseChartSeriesState<keyof import("../../../index.mjs").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.mjs").UseChartAnimationState & import("../../../index.mjs").UseChartInteractionListenerState & import("./useChartHighlight.types.mjs").UseChartHighlightState<keyof import("../../../index.mjs").ChartsSeriesConfig> & Partial<{}> & {
76
57
  cacheKey: import("../../models/index.mjs").ChartStateCacheKey;
77
58
  }, seriesId: string) => boolean;
@@ -2,7 +2,8 @@ import { type SeriesId } from "../../../../models/seriesType/common.js";
2
2
  import type { HighlightItemIdentifierWithType } from "../../../../models/seriesType/index.js";
3
3
  import type { ChartSeriesType, HighlightScope } from "../../../../models/seriesType/config.js";
4
4
  import type { ComposableChartSeriesType } from "../../../../models/seriesType/composition.js";
5
- type HighlightLookUp<T extends ChartSeriesType> = { [K in T]?: Map<SeriesId, HighlightScope<K>> };
5
+ import { type HighlightState } from "../../../../hooks/useItemHighlightState.js";
6
+ type HighlightLookUp<SeriesType extends ChartSeriesType> = { [K in SeriesType]?: Map<SeriesId, HighlightScope<K>> };
6
7
  export declare const selectorChartsHighlightScopePerSeriesId: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & Partial<{}> & {
7
8
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
8
9
  }) => HighlightLookUp<keyof import("../../../index.js").ChartsSeriesConfig>;
@@ -32,46 +33,26 @@ export declare const selectorChartsHighlightedItem: (args_0: import("../../coreP
32
33
  export declare const selectorChartsHighlightScope: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & import("./useChartHighlight.types.js").UseChartHighlightState<keyof import("../../../index.js").ChartsSeriesConfig> & Partial<{}> & {
33
34
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
34
35
  }) => import("./highlightConfig.types.js").CommonHighlightScope | null;
35
- declare const selectorChartsIsHighlightedCallbackImpl: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & import("./useChartHighlight.types.js").UseChartHighlightState<keyof import("../../../index.js").ChartsSeriesConfig> & Partial<{}> & {
36
+ declare const selectorChartsHighlightStateCallbackImpl: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & import("./useChartHighlight.types.js").UseChartHighlightState<keyof import("../../../index.js").ChartsSeriesConfig> & Partial<{}> & {
36
37
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
37
- }) => <TestedSeriesType extends ComposableChartSeriesType<keyof import("../../../index.js").ChartsSeriesConfig>>(item: HighlightItemIdentifierWithType<TestedSeriesType> | null) => boolean;
38
+ }) => (item: HighlightItemIdentifierWithType<ComposableChartSeriesType<keyof import("../../../index.js").ChartsSeriesConfig>> | null) => HighlightState;
38
39
  /**
39
- * Returns a callback to test if an item is highlighted.
40
+ * Returns a callback to get the highlight state of an item.
40
41
  * Uses an explicit function declaration so that TypeScript preserves
41
42
  * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
42
43
  * allowing module augmentation from pro/premium packages to extend the accepted types.
43
44
  */
44
- export declare function selectorChartsIsHighlightedCallback<SeriesType extends ChartSeriesType>(state: Parameters<typeof selectorChartsIsHighlightedCallbackImpl>[0]): (item: HighlightItemIdentifierWithType<SeriesType> | null) => boolean;
45
- declare const selectorChartsIsFadedCallbackImpl: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & import("./useChartHighlight.types.js").UseChartHighlightState<keyof import("../../../index.js").ChartsSeriesConfig> & Partial<{}> & {
45
+ export declare function selectorChartsHighlightStateCallback<SeriesType extends ChartSeriesType>(state: Parameters<typeof selectorChartsHighlightStateCallbackImpl>[0]): (item: HighlightItemIdentifierWithType<ComposableChartSeriesType<SeriesType>> | null) => HighlightState;
46
+ declare const selectorChartsHighlightStateImpl: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & import("./useChartHighlight.types.js").UseChartHighlightState<keyof import("../../../index.js").ChartsSeriesConfig> & Partial<{}> & {
46
47
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
47
- }) => <TestedSeriesType extends ComposableChartSeriesType<keyof import("../../../index.js").ChartsSeriesConfig>>(item: HighlightItemIdentifierWithType<TestedSeriesType> | null) => boolean;
48
+ }, item: any) => HighlightState;
48
49
  /**
49
- * Returns a callback to test if an item is faded.
50
+ * Returns the highlight state of an item.
50
51
  * Uses an explicit function declaration so that TypeScript preserves
51
52
  * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
52
53
  * allowing module augmentation from pro/premium packages to extend the accepted types.
53
54
  */
54
- export declare function selectorChartsIsFadedCallback<SeriesType extends ChartSeriesType>(state: Parameters<typeof selectorChartsIsFadedCallbackImpl>[0]): (item: HighlightItemIdentifierWithType<SeriesType> | null) => boolean;
55
- declare const selectorChartsIsHighlightedImpl: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & import("./useChartHighlight.types.js").UseChartHighlightState<keyof import("../../../index.js").ChartsSeriesConfig> & Partial<{}> & {
56
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
57
- }, item: any) => boolean;
58
- /**
59
- * Test if an item is highlighted.
60
- * Uses an explicit function declaration so that TypeScript preserves
61
- * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
62
- * allowing module augmentation from pro/premium packages to extend the accepted types.
63
- */
64
- export declare function selectorChartsIsHighlighted<SeriesType extends ChartSeriesType>(state: Parameters<typeof selectorChartsIsHighlightedImpl>[0], item: HighlightItemIdentifierWithType<ComposableChartSeriesType<SeriesType>> | null): boolean;
65
- declare const selectorChartsIsFadedImpl: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & import("./useChartHighlight.types.js").UseChartHighlightState<keyof import("../../../index.js").ChartsSeriesConfig> & Partial<{}> & {
66
- cacheKey: import("../../models/index.js").ChartStateCacheKey;
67
- }, item: any) => boolean;
68
- /**
69
- * Test if an item is faded.
70
- * Uses an explicit function declaration so that TypeScript preserves
71
- * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
72
- * allowing module augmentation from pro/premium packages to extend the accepted types.
73
- */
74
- export declare function selectorChartsIsFaded<SeriesType extends ChartSeriesType>(state: Parameters<typeof selectorChartsIsFadedImpl>[0], item: HighlightItemIdentifierWithType<ComposableChartSeriesType<SeriesType>> | null): boolean;
55
+ export declare function selectorChartsHighlightState(state: Parameters<typeof selectorChartsHighlightStateImpl>[0], item: Parameters<typeof selectorChartsHighlightStateImpl>[1]): HighlightState;
75
56
  export declare const selectorChartIsSeriesHighlighted: (args_0: import("../../corePlugins/useChartId/useChartId.types.js").UseChartIdState & import("../../corePlugins/useChartSeriesConfig/useChartSeriesConfig.types.js").UseChartSeriesConfigState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartExperimentalFeature/useChartExperimentalFeature.types.js").UseChartExperimentalFeaturesState & import("../../corePlugins/useChartDimensions/useChartDimensions.types.js").UseChartDimensionsState & import("../../corePlugins/useChartSeries/useChartSeries.types.js").UseChartSeriesState<keyof import("../../../index.js").ChartsSeriesConfig> & import("../../corePlugins/useChartAnimation/useChartAnimation.types.js").UseChartAnimationState & import("../../../index.js").UseChartInteractionListenerState & import("./useChartHighlight.types.js").UseChartHighlightState<keyof import("../../../index.js").ChartsSeriesConfig> & Partial<{}> & {
76
57
  cacheKey: import("../../models/index.js").ChartStateCacheKey;
77
58
  }, seriesId: string) => boolean;
@@ -3,11 +3,10 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.selectorChartsHighlightedItem = exports.selectorChartsHighlightScopePerSeriesId = exports.selectorChartsHighlightScope = exports.selectorChartSeriesUnfadedItem = exports.selectorChartSeriesHighlightedItem = exports.selectorChartIsSeriesHighlighted = exports.selectorChartIsSeriesFaded = void 0;
7
- exports.selectorChartsIsFaded = selectorChartsIsFaded;
8
- exports.selectorChartsIsFadedCallback = selectorChartsIsFadedCallback;
9
- exports.selectorChartsIsHighlighted = selectorChartsIsHighlighted;
10
- exports.selectorChartsIsHighlightedCallback = selectorChartsIsHighlightedCallback;
6
+ exports.selectorChartsHighlightScopePerSeriesId = exports.selectorChartsHighlightScope = exports.selectorChartSeriesUnfadedItem = exports.selectorChartSeriesHighlightedItem = exports.selectorChartIsSeriesHighlighted = exports.selectorChartIsSeriesFaded = void 0;
7
+ exports.selectorChartsHighlightState = selectorChartsHighlightState;
8
+ exports.selectorChartsHighlightStateCallback = selectorChartsHighlightStateCallback;
9
+ exports.selectorChartsHighlightedItem = void 0;
11
10
  var _store = require("@mui/x-internals/store");
12
11
  var _highlightStates = require("./highlightStates");
13
12
  var _useChartKeyboardNavigation = require("../useChartKeyboardNavigation");
@@ -41,70 +40,46 @@ const selectorChartsHighlightScope = exports.selectorChartsHighlightScope = (0,
41
40
  }
42
41
  return highlightScope;
43
42
  });
44
- const alwaysFalse = () => false;
45
- const selectorChartsIsHighlightedCallbackImpl = (0, _store.createSelectorMemoized)(selectorChartsHighlightScope, selectorChartsHighlightedItem, _useChartSeriesConfig.selectorChartSeriesConfig, function selectorChartsIsHighlightedCallbackCombiner(highlightScope, highlightedItem, seriesConfig) {
43
+ const alwaysNone = () => 'none';
44
+ const selectorChartsHighlightStateCallbackImpl = (0, _store.createSelectorMemoized)(selectorChartsHighlightScope, selectorChartsHighlightedItem, _useChartSeriesConfig.selectorChartSeriesConfig, function selectorChartsHighlightStateCallbackCombiner(highlightScope, highlightedItem, seriesConfig) {
46
45
  if (highlightedItem === null || highlightScope === null) {
47
- return alwaysFalse;
46
+ return alwaysNone;
48
47
  }
49
- return seriesConfig[highlightedItem.type].isHighlightedCreator(highlightScope, highlightedItem);
48
+ const config = seriesConfig[highlightedItem.type];
49
+ const isHighlighted = config.isHighlightedCreator(highlightScope, highlightedItem);
50
+ const isFaded = config.isFadedCreator(highlightScope, highlightedItem);
51
+ return item => {
52
+ if (isHighlighted(item)) {
53
+ return 'highlighted';
54
+ }
55
+ if (isFaded(item)) {
56
+ return 'faded';
57
+ }
58
+ return 'none';
59
+ };
50
60
  });
51
61
 
52
62
  /**
53
- * Returns a callback to test if an item is highlighted.
63
+ * Returns a callback to get the highlight state of an item.
54
64
  * Uses an explicit function declaration so that TypeScript preserves
55
65
  * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
56
66
  * allowing module augmentation from pro/premium packages to extend the accepted types.
57
67
  */
58
- function selectorChartsIsHighlightedCallback(state) {
59
- return selectorChartsIsHighlightedCallbackImpl(state);
68
+ function selectorChartsHighlightStateCallback(state) {
69
+ return selectorChartsHighlightStateCallbackImpl(state);
60
70
  }
61
- const selectorChartsIsFadedCallbackImpl = (0, _store.createSelectorMemoized)(selectorChartsHighlightScope, selectorChartsHighlightedItem, _useChartSeriesConfig.selectorChartSeriesConfig, function selectorChartsIsFadedCallbackCombiner(highlightScope, highlightedItem, seriesConfig) {
62
- if (highlightedItem === null || highlightScope === null) {
63
- return alwaysFalse;
64
- }
65
- return seriesConfig[highlightedItem.type].isFadedCreator(highlightScope, highlightedItem);
66
- });
67
-
68
- /**
69
- * Returns a callback to test if an item is faded.
70
- * Uses an explicit function declaration so that TypeScript preserves
71
- * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
72
- * allowing module augmentation from pro/premium packages to extend the accepted types.
73
- */
74
- function selectorChartsIsFadedCallback(state) {
75
- return selectorChartsIsFadedCallbackImpl(state);
76
- }
77
- const selectorChartsIsHighlightedImpl = (0, _store.createSelector)(selectorChartsHighlightScope, selectorChartsHighlightedItem, _useChartSeriesConfig.selectorChartSeriesConfig, function selectorChartsIsHighlightedCombiner(highlightScope, highlightedItem, seriesConfig, item) {
78
- if (highlightedItem === null || highlightScope === null) {
79
- return false;
80
- }
81
- return seriesConfig[highlightedItem.type].isHighlightedCreator(highlightScope, highlightedItem)(item);
82
- });
83
-
84
- /**
85
- * Test if an item is highlighted.
86
- * Uses an explicit function declaration so that TypeScript preserves
87
- * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
88
- * allowing module augmentation from pro/premium packages to extend the accepted types.
89
- */
90
- function selectorChartsIsHighlighted(state, item) {
91
- return selectorChartsIsHighlightedImpl(state, item);
92
- }
93
- const selectorChartsIsFadedImpl = (0, _store.createSelector)(selectorChartsHighlightScope, selectorChartsHighlightedItem, _useChartSeriesConfig.selectorChartSeriesConfig, function selectorChartsIsFadedCombiner(highlightScope, highlightedItem, seriesConfig, item) {
94
- if (highlightedItem === null || highlightScope === null) {
95
- return false;
96
- }
97
- return seriesConfig[highlightedItem.type].isFadedCreator(highlightScope, highlightedItem)(item);
71
+ const selectorChartsHighlightStateImpl = (0, _store.createSelectorMemoized)(selectorChartsHighlightStateCallback, function selectorChartsHighlightStateCombiner(getHighlightState, item) {
72
+ return getHighlightState(item);
98
73
  });
99
74
 
100
75
  /**
101
- * Test if an item is faded.
76
+ * Returns the highlight state of an item.
102
77
  * Uses an explicit function declaration so that TypeScript preserves
103
78
  * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
104
79
  * allowing module augmentation from pro/premium packages to extend the accepted types.
105
80
  */
106
- function selectorChartsIsFaded(state, item) {
107
- return selectorChartsIsFadedImpl(state, item);
81
+ function selectorChartsHighlightState(state, item) {
82
+ return selectorChartsHighlightStateImpl(state, item);
108
83
  }
109
84
 
110
85
  // ==========================================================================================
@@ -116,26 +91,14 @@ function selectorChartsIsFaded(state, item) {
116
91
  // ==========================================================================================
117
92
 
118
93
  const selectorChartIsSeriesHighlighted = exports.selectorChartIsSeriesHighlighted = (0, _store.createSelector)(selectorChartsHighlightScope, selectorChartsHighlightedItem, function selectorChartIsSeriesHighlighted(scope, item, seriesId) {
119
- if (!(0, _highlightStates.isBatchRenderingSeriesType)(item?.type)) {
120
- return false;
121
- }
122
94
  return (0, _highlightStates.isSeriesHighlighted)(scope, item, seriesId);
123
95
  });
124
96
  const selectorChartIsSeriesFaded = exports.selectorChartIsSeriesFaded = (0, _store.createSelector)(selectorChartsHighlightScope, selectorChartsHighlightedItem, function selectorChartIsSeriesFaded(scope, item, seriesId) {
125
- if (!(0, _highlightStates.isBatchRenderingSeriesType)(item?.type)) {
126
- return false;
127
- }
128
97
  return (0, _highlightStates.isSeriesFaded)(scope, item, seriesId);
129
98
  });
130
99
  const selectorChartSeriesUnfadedItem = exports.selectorChartSeriesUnfadedItem = (0, _store.createSelector)(selectorChartsHighlightScope, selectorChartsHighlightedItem, function selectorChartSeriesUnfadedItem(scope, item, seriesId) {
131
- if (!(0, _highlightStates.isBatchRenderingSeriesType)(item?.type)) {
132
- return null;
133
- }
134
100
  return (0, _highlightStates.getSeriesUnfadedDataIndex)(scope, item, seriesId);
135
101
  });
136
102
  const selectorChartSeriesHighlightedItem = exports.selectorChartSeriesHighlightedItem = (0, _store.createSelector)(selectorChartsHighlightScope, selectorChartsHighlightedItem, function selectorChartSeriesHighlightedItem(scope, item, seriesId) {
137
- if (!(0, _highlightStates.isBatchRenderingSeriesType)(item?.type)) {
138
- return null;
139
- }
140
103
  return (0, _highlightStates.getSeriesHighlightedDataIndex)(scope, item, seriesId);
141
104
  });
@@ -1,5 +1,5 @@
1
1
  import { createSelector, createSelectorMemoized } from '@mui/x-internals/store';
2
- import { getSeriesHighlightedDataIndex, getSeriesUnfadedDataIndex, isSeriesFaded, isSeriesHighlighted, isBatchRenderingSeriesType } from "./highlightStates.mjs";
2
+ import { getSeriesHighlightedDataIndex, getSeriesUnfadedDataIndex, isSeriesFaded, isSeriesHighlighted } from "./highlightStates.mjs";
3
3
  import { selectorChartsKeyboardItem } from "../useChartKeyboardNavigation/index.mjs";
4
4
  import { selectorChartSeriesProcessed } from "../../corePlugins/useChartSeries/useChartSeries.selectors.mjs";
5
5
  import { selectorChartSeriesConfig } from "../../corePlugins/useChartSeriesConfig/index.mjs";
@@ -31,70 +31,46 @@ export const selectorChartsHighlightScope = createSelector(selectorChartsHighlig
31
31
  }
32
32
  return highlightScope;
33
33
  });
34
- const alwaysFalse = () => false;
35
- const selectorChartsIsHighlightedCallbackImpl = createSelectorMemoized(selectorChartsHighlightScope, selectorChartsHighlightedItem, selectorChartSeriesConfig, function selectorChartsIsHighlightedCallbackCombiner(highlightScope, highlightedItem, seriesConfig) {
34
+ const alwaysNone = () => 'none';
35
+ const selectorChartsHighlightStateCallbackImpl = createSelectorMemoized(selectorChartsHighlightScope, selectorChartsHighlightedItem, selectorChartSeriesConfig, function selectorChartsHighlightStateCallbackCombiner(highlightScope, highlightedItem, seriesConfig) {
36
36
  if (highlightedItem === null || highlightScope === null) {
37
- return alwaysFalse;
37
+ return alwaysNone;
38
38
  }
39
- return seriesConfig[highlightedItem.type].isHighlightedCreator(highlightScope, highlightedItem);
39
+ const config = seriesConfig[highlightedItem.type];
40
+ const isHighlighted = config.isHighlightedCreator(highlightScope, highlightedItem);
41
+ const isFaded = config.isFadedCreator(highlightScope, highlightedItem);
42
+ return item => {
43
+ if (isHighlighted(item)) {
44
+ return 'highlighted';
45
+ }
46
+ if (isFaded(item)) {
47
+ return 'faded';
48
+ }
49
+ return 'none';
50
+ };
40
51
  });
41
52
 
42
53
  /**
43
- * Returns a callback to test if an item is highlighted.
54
+ * Returns a callback to get the highlight state of an item.
44
55
  * Uses an explicit function declaration so that TypeScript preserves
45
56
  * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
46
57
  * allowing module augmentation from pro/premium packages to extend the accepted types.
47
58
  */
48
- export function selectorChartsIsHighlightedCallback(state) {
49
- return selectorChartsIsHighlightedCallbackImpl(state);
59
+ export function selectorChartsHighlightStateCallback(state) {
60
+ return selectorChartsHighlightStateCallbackImpl(state);
50
61
  }
51
- const selectorChartsIsFadedCallbackImpl = createSelectorMemoized(selectorChartsHighlightScope, selectorChartsHighlightedItem, selectorChartSeriesConfig, function selectorChartsIsFadedCallbackCombiner(highlightScope, highlightedItem, seriesConfig) {
52
- if (highlightedItem === null || highlightScope === null) {
53
- return alwaysFalse;
54
- }
55
- return seriesConfig[highlightedItem.type].isFadedCreator(highlightScope, highlightedItem);
56
- });
57
-
58
- /**
59
- * Returns a callback to test if an item is faded.
60
- * Uses an explicit function declaration so that TypeScript preserves
61
- * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
62
- * allowing module augmentation from pro/premium packages to extend the accepted types.
63
- */
64
- export function selectorChartsIsFadedCallback(state) {
65
- return selectorChartsIsFadedCallbackImpl(state);
66
- }
67
- const selectorChartsIsHighlightedImpl = createSelector(selectorChartsHighlightScope, selectorChartsHighlightedItem, selectorChartSeriesConfig, function selectorChartsIsHighlightedCombiner(highlightScope, highlightedItem, seriesConfig, item) {
68
- if (highlightedItem === null || highlightScope === null) {
69
- return false;
70
- }
71
- return seriesConfig[highlightedItem.type].isHighlightedCreator(highlightScope, highlightedItem)(item);
72
- });
73
-
74
- /**
75
- * Test if an item is highlighted.
76
- * Uses an explicit function declaration so that TypeScript preserves
77
- * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
78
- * allowing module augmentation from pro/premium packages to extend the accepted types.
79
- */
80
- export function selectorChartsIsHighlighted(state, item) {
81
- return selectorChartsIsHighlightedImpl(state, item);
82
- }
83
- const selectorChartsIsFadedImpl = createSelector(selectorChartsHighlightScope, selectorChartsHighlightedItem, selectorChartSeriesConfig, function selectorChartsIsFadedCombiner(highlightScope, highlightedItem, seriesConfig, item) {
84
- if (highlightedItem === null || highlightScope === null) {
85
- return false;
86
- }
87
- return seriesConfig[highlightedItem.type].isFadedCreator(highlightScope, highlightedItem)(item);
62
+ const selectorChartsHighlightStateImpl = createSelectorMemoized(selectorChartsHighlightStateCallback, function selectorChartsHighlightStateCombiner(getHighlightState, item) {
63
+ return getHighlightState(item);
88
64
  });
89
65
 
90
66
  /**
91
- * Test if an item is faded.
67
+ * Returns the highlight state of an item.
92
68
  * Uses an explicit function declaration so that TypeScript preserves
93
69
  * the `HighlightItemIdentifier<ChartSeriesType>` reference in `.d.ts` output,
94
70
  * allowing module augmentation from pro/premium packages to extend the accepted types.
95
71
  */
96
- export function selectorChartsIsFaded(state, item) {
97
- return selectorChartsIsFadedImpl(state, item);
72
+ export function selectorChartsHighlightState(state, item) {
73
+ return selectorChartsHighlightStateImpl(state, item);
98
74
  }
99
75
 
100
76
  // ==========================================================================================
@@ -106,26 +82,14 @@ export function selectorChartsIsFaded(state, item) {
106
82
  // ==========================================================================================
107
83
 
108
84
  export const selectorChartIsSeriesHighlighted = createSelector(selectorChartsHighlightScope, selectorChartsHighlightedItem, function selectorChartIsSeriesHighlighted(scope, item, seriesId) {
109
- if (!isBatchRenderingSeriesType(item?.type)) {
110
- return false;
111
- }
112
85
  return isSeriesHighlighted(scope, item, seriesId);
113
86
  });
114
87
  export const selectorChartIsSeriesFaded = createSelector(selectorChartsHighlightScope, selectorChartsHighlightedItem, function selectorChartIsSeriesFaded(scope, item, seriesId) {
115
- if (!isBatchRenderingSeriesType(item?.type)) {
116
- return false;
117
- }
118
88
  return isSeriesFaded(scope, item, seriesId);
119
89
  });
120
90
  export const selectorChartSeriesUnfadedItem = createSelector(selectorChartsHighlightScope, selectorChartsHighlightedItem, function selectorChartSeriesUnfadedItem(scope, item, seriesId) {
121
- if (!isBatchRenderingSeriesType(item?.type)) {
122
- return null;
123
- }
124
91
  return getSeriesUnfadedDataIndex(scope, item, seriesId);
125
92
  });
126
93
  export const selectorChartSeriesHighlightedItem = createSelector(selectorChartsHighlightScope, selectorChartsHighlightedItem, function selectorChartSeriesHighlightedItem(scope, item, seriesId) {
127
- if (!isBatchRenderingSeriesType(item?.type)) {
128
- return null;
129
- }
130
94
  return getSeriesHighlightedDataIndex(scope, item, seriesId);
131
95
  });
@@ -3,12 +3,12 @@ import type { FocusedItemIdentifier } from "../../../../models/seriesType/index.
3
3
  import type { UseChartKeyboardNavigationSignature } from "./useChartKeyboardNavigation.types.mjs";
4
4
  import type { ChartState } from "../../models/chart.mjs";
5
5
  import type { UseChartCartesianAxisSignature } from "../useChartCartesianAxis/index.mjs";
6
- export type FocusedItemUpdater<TSeriesType extends ChartSeriesType, OutputSeriesType extends ChartSeriesType = ChartSeriesType> = (currentItem: (TSeriesType extends any ? FocusedItemIdentifier<TSeriesType> : never) | null, state: TSeriesType extends CartesianChartSeriesType ? Pick<ChartState<[UseChartKeyboardNavigationSignature], [UseChartCartesianAxisSignature], TSeriesType>, 'series' | 'cartesianAxis'> : Pick<ChartState<[UseChartKeyboardNavigationSignature], [], TSeriesType>, 'series'>) => FocusedItemIdentifier<OutputSeriesType> | null;
6
+ export type FocusedItemUpdater<SeriesType extends ChartSeriesType, OutputSeriesType extends ChartSeriesType = ChartSeriesType> = (currentItem: (SeriesType extends any ? FocusedItemIdentifier<SeriesType> : never) | null, state: SeriesType extends CartesianChartSeriesType ? Pick<ChartState<[UseChartKeyboardNavigationSignature], [UseChartCartesianAxisSignature], SeriesType>, 'series' | 'cartesianAxis'> : Pick<ChartState<[UseChartKeyboardNavigationSignature], [], SeriesType>, 'series'>) => FocusedItemIdentifier<OutputSeriesType> | null;
7
7
  /**
8
8
  * Get the next focusable item in the chart.
9
- * @param {SeriesItemIdentifierWithType<TSeriesType> | null} currentItem The current focused item.
9
+ * @param {SeriesItemIdentifierWithType<SeriesType> | null} currentItem The current focused item.
10
10
  * @param {KeyboardEvent} event The keyboard event that triggered the navigation.
11
11
  * @param {ChartState<[UseChartKeyboardNavigationSignature], []>} state The current chart state.
12
12
  * @returns {SeriesItemIdentifierWithType<ChartSeriesType> | null} The next focusable item or null if none found.
13
13
  */
14
- export type KeyboardFocusHandler<TSeriesType extends ChartSeriesType, OutputSeriesType extends ChartSeriesType = ChartSeriesType> = (event: KeyboardEvent) => FocusedItemUpdater<TSeriesType, OutputSeriesType> | null;
14
+ export type KeyboardFocusHandler<SeriesType extends ChartSeriesType, OutputSeriesType extends ChartSeriesType = ChartSeriesType> = (event: KeyboardEvent) => FocusedItemUpdater<SeriesType, OutputSeriesType> | null;
@@ -3,12 +3,12 @@ import type { FocusedItemIdentifier } from "../../../../models/seriesType/index.
3
3
  import type { UseChartKeyboardNavigationSignature } from "./useChartKeyboardNavigation.types.js";
4
4
  import type { ChartState } from "../../models/chart.js";
5
5
  import type { UseChartCartesianAxisSignature } from "../useChartCartesianAxis/index.js";
6
- export type FocusedItemUpdater<TSeriesType extends ChartSeriesType, OutputSeriesType extends ChartSeriesType = ChartSeriesType> = (currentItem: (TSeriesType extends any ? FocusedItemIdentifier<TSeriesType> : never) | null, state: TSeriesType extends CartesianChartSeriesType ? Pick<ChartState<[UseChartKeyboardNavigationSignature], [UseChartCartesianAxisSignature], TSeriesType>, 'series' | 'cartesianAxis'> : Pick<ChartState<[UseChartKeyboardNavigationSignature], [], TSeriesType>, 'series'>) => FocusedItemIdentifier<OutputSeriesType> | null;
6
+ export type FocusedItemUpdater<SeriesType extends ChartSeriesType, OutputSeriesType extends ChartSeriesType = ChartSeriesType> = (currentItem: (SeriesType extends any ? FocusedItemIdentifier<SeriesType> : never) | null, state: SeriesType extends CartesianChartSeriesType ? Pick<ChartState<[UseChartKeyboardNavigationSignature], [UseChartCartesianAxisSignature], SeriesType>, 'series' | 'cartesianAxis'> : Pick<ChartState<[UseChartKeyboardNavigationSignature], [], SeriesType>, 'series'>) => FocusedItemIdentifier<OutputSeriesType> | null;
7
7
  /**
8
8
  * Get the next focusable item in the chart.
9
- * @param {SeriesItemIdentifierWithType<TSeriesType> | null} currentItem The current focused item.
9
+ * @param {SeriesItemIdentifierWithType<SeriesType> | null} currentItem The current focused item.
10
10
  * @param {KeyboardEvent} event The keyboard event that triggered the navigation.
11
11
  * @param {ChartState<[UseChartKeyboardNavigationSignature], []>} state The current chart state.
12
12
  * @returns {SeriesItemIdentifierWithType<ChartSeriesType> | null} The next focusable item or null if none found.
13
13
  */
14
- export type KeyboardFocusHandler<TSeriesType extends ChartSeriesType, OutputSeriesType extends ChartSeriesType = ChartSeriesType> = (event: KeyboardEvent) => FocusedItemUpdater<TSeriesType, OutputSeriesType> | null;
14
+ export type KeyboardFocusHandler<SeriesType extends ChartSeriesType, OutputSeriesType extends ChartSeriesType = ChartSeriesType> = (event: KeyboardEvent) => FocusedItemUpdater<SeriesType, OutputSeriesType> | null;
@@ -47,7 +47,7 @@ const useChartKeyboardNavigation = ({
47
47
  });
48
48
  React.useEffect(() => {
49
49
  const element = chartsLayerContainerRef.current;
50
- if (!element || !params.enableKeyboardNavigation) {
50
+ if (!element || params.disableKeyboardNavigation) {
51
51
  return undefined;
52
52
  }
53
53
  function keyboardHandler(event) {
@@ -90,14 +90,12 @@ const useChartKeyboardNavigation = ({
90
90
  element.removeEventListener('blur', removeFocus);
91
91
  element.removeEventListener('focus', restoreFocus);
92
92
  };
93
- }, [chartsLayerContainerRef, removeFocus, restoreFocus, params.enableKeyboardNavigation, store]);
93
+ }, [chartsLayerContainerRef, removeFocus, restoreFocus, params.disableKeyboardNavigation, store]);
94
94
  (0, _useEnhancedEffect.default)(() => {
95
- if (store.state.keyboardNavigation.enableKeyboardNavigation !== params.enableKeyboardNavigation) {
96
- store.set('keyboardNavigation', (0, _extends2.default)({}, store.state.keyboardNavigation, {
97
- enableKeyboardNavigation: !!params.enableKeyboardNavigation
98
- }));
99
- }
100
- }, [store, params.enableKeyboardNavigation]);
95
+ store.set('keyboardNavigation', (0, _extends2.default)({}, store.state.keyboardNavigation, {
96
+ enabled: !params.disableKeyboardNavigation
97
+ }));
98
+ }, [store, params.disableKeyboardNavigation]);
101
99
  return {};
102
100
  };
103
101
  exports.useChartKeyboardNavigation = useChartKeyboardNavigation;
@@ -105,9 +103,9 @@ useChartKeyboardNavigation.getInitialState = params => ({
105
103
  keyboardNavigation: {
106
104
  item: null,
107
105
  isFocused: false,
108
- enableKeyboardNavigation: !!params.enableKeyboardNavigation
106
+ enabled: !params.disableKeyboardNavigation
109
107
  }
110
108
  });
111
109
  useChartKeyboardNavigation.params = {
112
- enableKeyboardNavigation: true
110
+ disableKeyboardNavigation: true
113
111
  };
@@ -40,7 +40,7 @@ export const useChartKeyboardNavigation = ({
40
40
  });
41
41
  React.useEffect(() => {
42
42
  const element = chartsLayerContainerRef.current;
43
- if (!element || !params.enableKeyboardNavigation) {
43
+ if (!element || params.disableKeyboardNavigation) {
44
44
  return undefined;
45
45
  }
46
46
  function keyboardHandler(event) {
@@ -83,23 +83,21 @@ export const useChartKeyboardNavigation = ({
83
83
  element.removeEventListener('blur', removeFocus);
84
84
  element.removeEventListener('focus', restoreFocus);
85
85
  };
86
- }, [chartsLayerContainerRef, removeFocus, restoreFocus, params.enableKeyboardNavigation, store]);
86
+ }, [chartsLayerContainerRef, removeFocus, restoreFocus, params.disableKeyboardNavigation, store]);
87
87
  useEnhancedEffect(() => {
88
- if (store.state.keyboardNavigation.enableKeyboardNavigation !== params.enableKeyboardNavigation) {
89
- store.set('keyboardNavigation', _extends({}, store.state.keyboardNavigation, {
90
- enableKeyboardNavigation: !!params.enableKeyboardNavigation
91
- }));
92
- }
93
- }, [store, params.enableKeyboardNavigation]);
88
+ store.set('keyboardNavigation', _extends({}, store.state.keyboardNavigation, {
89
+ enabled: !params.disableKeyboardNavigation
90
+ }));
91
+ }, [store, params.disableKeyboardNavigation]);
94
92
  return {};
95
93
  };
96
94
  useChartKeyboardNavigation.getInitialState = params => ({
97
95
  keyboardNavigation: {
98
96
  item: null,
99
97
  isFocused: false,
100
- enableKeyboardNavigation: !!params.enableKeyboardNavigation
98
+ enabled: !params.disableKeyboardNavigation
101
99
  }
102
100
  });
103
101
  useChartKeyboardNavigation.params = {
104
- enableKeyboardNavigation: true
102
+ disableKeyboardNavigation: true
105
103
  };