@mui/x-charts-premium 9.6.0 → 9.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (329) hide show
  1. package/BarChartPremium/BarChartPremium.d.mts +4 -4
  2. package/BarChartPremium/BarChartPremium.d.ts +4 -4
  3. package/BarChartPremium/BarChartPremium.plugins.d.mts +2 -2
  4. package/BarChartPremium/BarChartPremium.plugins.d.ts +2 -2
  5. package/BarChartPremium/BarPlotPremium.d.mts +1 -1
  6. package/BarChartPremium/BarPlotPremium.d.ts +1 -1
  7. package/BarChartPremium/RangeBar/AnimatedRangeBarElement.d.mts +1 -1
  8. package/BarChartPremium/RangeBar/AnimatedRangeBarElement.d.ts +1 -1
  9. package/BarChartPremium/RangeBar/RangeBarPlot.d.mts +2 -2
  10. package/BarChartPremium/RangeBar/RangeBarPlot.d.ts +2 -2
  11. package/BarChartPremium/RangeBar/createGetRangeBarDimensions.d.mts +1 -1
  12. package/BarChartPremium/RangeBar/createGetRangeBarDimensions.d.ts +1 -1
  13. package/BarChartPremium/RangeBar/seriesConfig/descriptionGetter.d.mts +1 -1
  14. package/BarChartPremium/RangeBar/seriesConfig/descriptionGetter.d.ts +1 -1
  15. package/BarChartPremium/RangeBar/seriesConfig/extrema.d.mts +1 -1
  16. package/BarChartPremium/RangeBar/seriesConfig/extrema.d.ts +1 -1
  17. package/BarChartPremium/RangeBar/seriesConfig/getColor.d.mts +1 -1
  18. package/BarChartPremium/RangeBar/seriesConfig/getColor.d.ts +1 -1
  19. package/BarChartPremium/RangeBar/seriesConfig/getSeriesWithDefaultValues.d.mts +1 -1
  20. package/BarChartPremium/RangeBar/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
  21. package/BarChartPremium/RangeBar/seriesConfig/index.d.mts +1 -1
  22. package/BarChartPremium/RangeBar/seriesConfig/index.d.ts +1 -1
  23. package/BarChartPremium/RangeBar/seriesConfig/keyboardFocusHandler.d.mts +1 -1
  24. package/BarChartPremium/RangeBar/seriesConfig/keyboardFocusHandler.d.ts +1 -1
  25. package/BarChartPremium/RangeBar/seriesConfig/legend.d.mts +1 -1
  26. package/BarChartPremium/RangeBar/seriesConfig/legend.d.ts +1 -1
  27. package/BarChartPremium/RangeBar/seriesConfig/seriesProcessor.d.mts +1 -1
  28. package/BarChartPremium/RangeBar/seriesConfig/seriesProcessor.d.ts +1 -1
  29. package/BarChartPremium/RangeBar/seriesConfig/tooltip.d.mts +1 -1
  30. package/BarChartPremium/RangeBar/seriesConfig/tooltip.d.ts +1 -1
  31. package/BarChartPremium/RangeBar/seriesConfig/tooltipPosition.d.mts +1 -1
  32. package/BarChartPremium/RangeBar/seriesConfig/tooltipPosition.d.ts +1 -1
  33. package/BarChartPremium/RangeBar/useRangeBarPlotData.d.mts +4 -4
  34. package/BarChartPremium/RangeBar/useRangeBarPlotData.d.ts +4 -4
  35. package/BarChartPremium/useBarChartPremiumProps.d.mts +5 -5
  36. package/BarChartPremium/useBarChartPremiumProps.d.ts +5 -5
  37. package/BarChartPremium/webgl/BarWebGLProgram.d.mts +5 -6
  38. package/BarChartPremium/webgl/BarWebGLProgram.d.ts +5 -6
  39. package/BarChartPremium/webgl/BarWebGLProgram.js +24 -65
  40. package/BarChartPremium/webgl/BarWebGLProgram.mjs +24 -65
  41. package/BarChartPremium/webgl/shaders.d.mts +1 -1
  42. package/BarChartPremium/webgl/shaders.d.ts +1 -1
  43. package/BarChartPremium/webgl/shaders.js +2 -15
  44. package/BarChartPremium/webgl/shaders.mjs +3 -15
  45. package/BarChartPremium/webgl/useBarWebGLPlotData.d.mts +3 -3
  46. package/BarChartPremium/webgl/useBarWebGLPlotData.d.ts +3 -3
  47. package/BarChartPremium/webgl/useWebGLBarLikePlotData.d.mts +3 -3
  48. package/BarChartPremium/webgl/useWebGLBarLikePlotData.d.ts +3 -3
  49. package/CHANGELOG.md +241 -2
  50. package/CandlestickChart/CandlestickChart.d.mts +12 -12
  51. package/CandlestickChart/CandlestickChart.d.ts +12 -12
  52. package/CandlestickChart/CandlestickChart.plugins.d.mts +2 -2
  53. package/CandlestickChart/CandlestickChart.plugins.d.ts +2 -2
  54. package/CandlestickChart/CandlestickWebGLProgram.d.mts +1 -1
  55. package/CandlestickChart/CandlestickWebGLProgram.d.ts +1 -1
  56. package/CandlestickChart/checkCandlestickScaleErrors.d.mts +2 -2
  57. package/CandlestickChart/checkCandlestickScaleErrors.d.ts +2 -2
  58. package/CandlestickChart/seriesConfig/OHLCTooltipContent.d.mts +1 -1
  59. package/CandlestickChart/seriesConfig/OHLCTooltipContent.d.ts +1 -1
  60. package/CandlestickChart/seriesConfig/descriptionGetter.d.mts +1 -1
  61. package/CandlestickChart/seriesConfig/descriptionGetter.d.ts +1 -1
  62. package/CandlestickChart/seriesConfig/extrema.d.mts +1 -1
  63. package/CandlestickChart/seriesConfig/extrema.d.ts +1 -1
  64. package/CandlestickChart/seriesConfig/getColor.d.mts +1 -1
  65. package/CandlestickChart/seriesConfig/getColor.d.ts +1 -1
  66. package/CandlestickChart/seriesConfig/getSeriesWithDefaultValues.d.mts +1 -1
  67. package/CandlestickChart/seriesConfig/getSeriesWithDefaultValues.d.ts +1 -1
  68. package/CandlestickChart/seriesConfig/index.d.mts +1 -1
  69. package/CandlestickChart/seriesConfig/index.d.ts +1 -1
  70. package/CandlestickChart/seriesConfig/legend.d.mts +1 -1
  71. package/CandlestickChart/seriesConfig/legend.d.ts +1 -1
  72. package/CandlestickChart/seriesConfig/seriesProcessor.d.mts +1 -1
  73. package/CandlestickChart/seriesConfig/seriesProcessor.d.ts +1 -1
  74. package/CandlestickChart/seriesConfig/tooltip.d.mts +1 -1
  75. package/CandlestickChart/seriesConfig/tooltip.d.ts +1 -1
  76. package/CandlestickChart/seriesConfig/tooltipPosition.d.mts +1 -1
  77. package/CandlestickChart/seriesConfig/tooltipPosition.d.ts +1 -1
  78. package/CandlestickChart/useCandlestickChartProps.d.mts +9 -9
  79. package/CandlestickChart/useCandlestickChartProps.d.ts +9 -9
  80. package/CandlestickChart/useCandlestickChartProps.mjs +0 -1
  81. package/CandlestickChart/useCandlestickPlotData.d.mts +3 -3
  82. package/CandlestickChart/useCandlestickPlotData.d.ts +3 -3
  83. package/ChartsContainerPremium/ChartsContainerPremium.d.mts +4 -4
  84. package/ChartsContainerPremium/ChartsContainerPremium.d.ts +4 -4
  85. package/ChartsContainerPremium/useChartsContainerPremiumProps.d.mts +2 -2
  86. package/ChartsContainerPremium/useChartsContainerPremiumProps.d.ts +2 -2
  87. package/ChartsDataProviderPremium/ChartsDataProviderPremium.d.mts +4 -4
  88. package/ChartsDataProviderPremium/ChartsDataProviderPremium.d.ts +4 -4
  89. package/ChartsDataProviderPremium/ChartsDataProviderPremium.js +2 -2
  90. package/ChartsDataProviderPremium/ChartsDataProviderPremium.mjs +3 -4
  91. package/ChartsDataProviderPremium/useChartsDataProviderPremiumProps.d.mts +1 -1
  92. package/ChartsDataProviderPremium/useChartsDataProviderPremiumProps.d.ts +1 -1
  93. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.d.mts +4 -4
  94. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.d.ts +4 -4
  95. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.js +2 -2
  96. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.mjs +2 -2
  97. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.d.mts +3 -3
  98. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.d.ts +3 -3
  99. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.d.mts +2 -2
  100. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.d.ts +2 -2
  101. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.d.mts +4 -4
  102. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.d.ts +4 -4
  103. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.js +2 -2
  104. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.mjs +2 -2
  105. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.plugins.d.mts +3 -3
  106. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.plugins.d.ts +3 -3
  107. package/ChartsRadialDataProviderPremium/useChartsRadialDataProviderPremiumProps.d.mts +1 -1
  108. package/ChartsRadialDataProviderPremium/useChartsRadialDataProviderPremiumProps.d.ts +1 -1
  109. package/ChartsRenderer/colors.d.mts +1 -1
  110. package/ChartsRenderer/colors.d.ts +1 -1
  111. package/ChartsRenderer/configuration.d.mts +1 -1
  112. package/ChartsRenderer/configuration.d.ts +1 -1
  113. package/ChartsZoomSlider/internals/previews/CandlestickPreviewPlot.d.mts +1 -1
  114. package/ChartsZoomSlider/internals/previews/CandlestickPreviewPlot.d.ts +1 -1
  115. package/ChartsZoomSlider/internals/previews/RangeBarPreviewPlot.d.mts +1 -1
  116. package/ChartsZoomSlider/internals/previews/RangeBarPreviewPlot.d.ts +1 -1
  117. package/HeatmapPremium/HeatmapPlotPremium.d.mts +1 -1
  118. package/HeatmapPremium/HeatmapPlotPremium.d.ts +1 -1
  119. package/HeatmapPremium/HeatmapPremium.d.mts +1 -1
  120. package/HeatmapPremium/HeatmapPremium.d.ts +1 -1
  121. package/HeatmapPremium/HeatmapPremium.plugins.d.mts +2 -2
  122. package/HeatmapPremium/HeatmapPremium.plugins.d.ts +2 -2
  123. package/HeatmapPremium/useHeatmapPremiumProps.d.mts +2 -2
  124. package/HeatmapPremium/useHeatmapPremiumProps.d.ts +2 -2
  125. package/HeatmapPremium/webgl/HeatmapWebGLProgram.js +12 -37
  126. package/HeatmapPremium/webgl/HeatmapWebGLProgram.mjs +12 -37
  127. package/HeatmapPremium/webgl/shaders.d.mts +3 -3
  128. package/HeatmapPremium/webgl/shaders.d.ts +3 -3
  129. package/HeatmapPremium/webgl/shaders.js +12 -15
  130. package/HeatmapPremium/webgl/shaders.mjs +13 -15
  131. package/HeatmapPremium/webgl/useHeatmapPlotData.d.mts +3 -3
  132. package/HeatmapPremium/webgl/useHeatmapPlotData.d.ts +3 -3
  133. package/HeatmapPremium/webgl/useHeatmapPlotData.js +3 -8
  134. package/HeatmapPremium/webgl/useHeatmapPlotData.mjs +3 -8
  135. package/Map/FocusedMapShape.js +5 -1
  136. package/Map/FocusedMapShape.mjs +5 -1
  137. package/Map/MapImagePlot.d.mts +39 -0
  138. package/Map/MapImagePlot.d.ts +39 -0
  139. package/Map/MapImagePlot.js +138 -0
  140. package/Map/MapImagePlot.mjs +132 -0
  141. package/Map/MapShape.d.mts +2 -2
  142. package/Map/MapShape.d.ts +2 -2
  143. package/Map/MapShape.js +6 -6
  144. package/Map/MapShape.mjs +6 -6
  145. package/Map/MapShapePlot.d.mts +8 -0
  146. package/Map/MapShapePlot.d.ts +8 -0
  147. package/Map/MapShapePlot.js +17 -5
  148. package/Map/MapShapePlot.mjs +17 -5
  149. package/Map/index.d.mts +2 -1
  150. package/Map/index.d.ts +2 -1
  151. package/Map/index.js +11 -0
  152. package/Map/index.mjs +1 -0
  153. package/Map/reprojectEquirectangularImage.d.mts +60 -0
  154. package/Map/reprojectEquirectangularImage.d.ts +60 -0
  155. package/Map/reprojectEquirectangularImage.js +116 -0
  156. package/Map/reprojectEquirectangularImage.mjs +110 -0
  157. package/Map/seriesConfig/descriptionGetter.d.mts +1 -1
  158. package/Map/seriesConfig/descriptionGetter.d.ts +1 -1
  159. package/Map/seriesConfig/descriptionGetter.js +5 -1
  160. package/Map/seriesConfig/descriptionGetter.mjs +5 -1
  161. package/Map/seriesConfig/getColor.js +18 -6
  162. package/Map/seriesConfig/getColor.mjs +18 -6
  163. package/Map/seriesConfig/highlight.d.mts +10 -0
  164. package/Map/seriesConfig/highlight.d.ts +10 -0
  165. package/Map/seriesConfig/highlight.js +52 -0
  166. package/Map/seriesConfig/highlight.mjs +45 -0
  167. package/Map/seriesConfig/identifierCleaner.d.mts +3 -0
  168. package/Map/seriesConfig/identifierCleaner.d.ts +3 -0
  169. package/Map/seriesConfig/identifierCleaner.js +14 -0
  170. package/Map/seriesConfig/identifierCleaner.mjs +8 -0
  171. package/Map/seriesConfig/identifierSerializer.d.mts +3 -0
  172. package/Map/seriesConfig/identifierSerializer.d.ts +3 -0
  173. package/Map/seriesConfig/identifierSerializer.js +12 -0
  174. package/Map/seriesConfig/identifierSerializer.mjs +6 -0
  175. package/Map/seriesConfig/index.d.mts +1 -1
  176. package/Map/seriesConfig/index.d.ts +1 -1
  177. package/Map/seriesConfig/index.js +8 -6
  178. package/Map/seriesConfig/index.mjs +7 -5
  179. package/Map/seriesConfig/keyboardFocusHandler.d.mts +1 -7
  180. package/Map/seriesConfig/keyboardFocusHandler.d.ts +1 -7
  181. package/Map/seriesConfig/keyboardFocusHandler.js +40 -7
  182. package/Map/seriesConfig/keyboardFocusHandler.mjs +41 -8
  183. package/Map/seriesConfig/legend.d.mts +1 -1
  184. package/Map/seriesConfig/legend.d.ts +1 -1
  185. package/Map/seriesConfig/seriesProcessor.d.mts +1 -1
  186. package/Map/seriesConfig/seriesProcessor.d.ts +1 -1
  187. package/Map/seriesConfig/seriesProcessor.js +11 -2
  188. package/Map/seriesConfig/seriesProcessor.mjs +11 -2
  189. package/Map/seriesConfig/tooltip.d.mts +1 -1
  190. package/Map/seriesConfig/tooltip.d.ts +1 -1
  191. package/Map/seriesConfig/tooltip.js +8 -4
  192. package/Map/seriesConfig/tooltip.mjs +8 -4
  193. package/Map/seriesConfig/tooltipPosition.d.mts +8 -3
  194. package/Map/seriesConfig/tooltipPosition.d.ts +8 -3
  195. package/Map/seriesConfig/tooltipPosition.js +21 -27
  196. package/Map/seriesConfig/tooltipPosition.mjs +22 -27
  197. package/RadialBarChart/RadialBarChart.d.mts +10 -10
  198. package/RadialBarChart/RadialBarChart.d.ts +10 -10
  199. package/RadialBarChart/RadialBarChart.plugins.d.mts +2 -2
  200. package/RadialBarChart/RadialBarChart.plugins.d.ts +2 -2
  201. package/RadialBarChart/RadialBarElement.d.mts +2 -2
  202. package/RadialBarChart/RadialBarElement.d.ts +2 -2
  203. package/RadialBarChart/seriesConfig/descriptionGetter.d.mts +1 -1
  204. package/RadialBarChart/seriesConfig/descriptionGetter.d.ts +1 -1
  205. package/RadialBarChart/seriesConfig/extremums.d.mts +1 -1
  206. package/RadialBarChart/seriesConfig/extremums.d.ts +1 -1
  207. package/RadialBarChart/seriesConfig/getColor.d.mts +1 -1
  208. package/RadialBarChart/seriesConfig/getColor.d.ts +1 -1
  209. package/RadialBarChart/seriesConfig/getItemAtPosition.d.mts +1 -1
  210. package/RadialBarChart/seriesConfig/getItemAtPosition.d.ts +1 -1
  211. package/RadialBarChart/seriesConfig/index.d.mts +1 -1
  212. package/RadialBarChart/seriesConfig/index.d.ts +1 -1
  213. package/RadialBarChart/seriesConfig/keyboardFocusHandler.d.mts +1 -1
  214. package/RadialBarChart/seriesConfig/keyboardFocusHandler.d.ts +1 -1
  215. package/RadialBarChart/seriesConfig/tooltip.d.mts +1 -1
  216. package/RadialBarChart/seriesConfig/tooltip.d.ts +1 -1
  217. package/RadialBarChart/useRadialBarChartProps.d.mts +6 -6
  218. package/RadialBarChart/useRadialBarChartProps.d.ts +6 -6
  219. package/RadialBarChart/useRadialBarPlotData.d.mts +1 -1
  220. package/RadialBarChart/useRadialBarPlotData.d.ts +1 -1
  221. package/RadialBarChart/useRadialBarPlotData.js +4 -1
  222. package/RadialBarChart/useRadialBarPlotData.mjs +3 -1
  223. package/RadialLineChart/RadialArea.d.mts +1 -1
  224. package/RadialLineChart/RadialArea.d.ts +1 -1
  225. package/RadialLineChart/RadialAreaPlot.d.mts +1 -1
  226. package/RadialLineChart/RadialAreaPlot.d.ts +1 -1
  227. package/RadialLineChart/RadialLine.d.mts +2 -2
  228. package/RadialLineChart/RadialLine.d.ts +2 -2
  229. package/RadialLineChart/RadialLineChart.d.mts +10 -10
  230. package/RadialLineChart/RadialLineChart.d.ts +10 -10
  231. package/RadialLineChart/RadialLineChart.plugins.d.mts +2 -2
  232. package/RadialLineChart/RadialLineChart.plugins.d.ts +2 -2
  233. package/RadialLineChart/RadialLineHighlightElement.d.mts +1 -1
  234. package/RadialLineChart/RadialLineHighlightElement.d.ts +1 -1
  235. package/RadialLineChart/RadialLineHighlightPlot.d.mts +2 -2
  236. package/RadialLineChart/RadialLineHighlightPlot.d.ts +2 -2
  237. package/RadialLineChart/RadialLinePlot.d.mts +1 -1
  238. package/RadialLineChart/RadialLinePlot.d.ts +1 -1
  239. package/RadialLineChart/RadialMarkPlot.d.mts +1 -1
  240. package/RadialLineChart/RadialMarkPlot.d.ts +1 -1
  241. package/RadialLineChart/seriesConfig/descriptionGetter.d.mts +1 -1
  242. package/RadialLineChart/seriesConfig/descriptionGetter.d.ts +1 -1
  243. package/RadialLineChart/seriesConfig/extremums.d.mts +1 -1
  244. package/RadialLineChart/seriesConfig/extremums.d.ts +1 -1
  245. package/RadialLineChart/seriesConfig/getColor.d.mts +1 -1
  246. package/RadialLineChart/seriesConfig/getColor.d.ts +1 -1
  247. package/RadialLineChart/seriesConfig/getItemAtPosition.d.mts +1 -1
  248. package/RadialLineChart/seriesConfig/getItemAtPosition.d.ts +1 -1
  249. package/RadialLineChart/seriesConfig/getItemAtPosition.mjs +1 -2
  250. package/RadialLineChart/seriesConfig/index.d.mts +1 -1
  251. package/RadialLineChart/seriesConfig/index.d.ts +1 -1
  252. package/RadialLineChart/seriesConfig/keyboardFocusHandler.d.mts +1 -1
  253. package/RadialLineChart/seriesConfig/keyboardFocusHandler.d.ts +1 -1
  254. package/RadialLineChart/seriesConfig/legend.d.mts +1 -1
  255. package/RadialLineChart/seriesConfig/legend.d.ts +1 -1
  256. package/RadialLineChart/seriesConfig/seriesProcessor.d.mts +1 -1
  257. package/RadialLineChart/seriesConfig/seriesProcessor.d.ts +1 -1
  258. package/RadialLineChart/seriesConfig/tooltip.d.mts +1 -1
  259. package/RadialLineChart/seriesConfig/tooltip.d.ts +1 -1
  260. package/RadialLineChart/useRadialLineChartProps.d.mts +7 -7
  261. package/RadialLineChart/useRadialLineChartProps.d.ts +7 -7
  262. package/RadialLineChart/useRadialLinePlotData.d.mts +1 -1
  263. package/RadialLineChart/useRadialLinePlotData.d.ts +1 -1
  264. package/ScatterChartPremium/ScatterChartPremium.d.mts +6 -6
  265. package/ScatterChartPremium/ScatterChartPremium.d.ts +6 -6
  266. package/ScatterChartPremium/ScatterChartPremium.plugins.d.mts +1 -1
  267. package/ScatterChartPremium/ScatterChartPremium.plugins.d.ts +1 -1
  268. package/ScatterChartPremium/ScatterPlotPremium.d.mts +1 -1
  269. package/ScatterChartPremium/ScatterPlotPremium.d.ts +1 -1
  270. package/ScatterChartPremium/webgl/ScatterWebGLProgram.d.mts +1 -3
  271. package/ScatterChartPremium/webgl/ScatterWebGLProgram.d.ts +1 -3
  272. package/ScatterChartPremium/webgl/ScatterWebGLProgram.js +23 -81
  273. package/ScatterChartPremium/webgl/ScatterWebGLProgram.mjs +23 -81
  274. package/context/useChartPremiumApiContext.d.mts +1 -1
  275. package/context/useChartPremiumApiContext.d.ts +1 -1
  276. package/hooks/animation/useAnimateRangeBar.d.mts +1 -1
  277. package/hooks/animation/useAnimateRangeBar.d.ts +1 -1
  278. package/hooks/useChartPremiumApiRef.d.mts +4 -4
  279. package/hooks/useChartPremiumApiRef.d.ts +4 -4
  280. package/hooks/useGeoData.d.mts +1 -1
  281. package/hooks/useGeoData.d.ts +1 -1
  282. package/hooks/useGeoData.mjs +0 -1
  283. package/hooks/useGeoFeatureIndexesByName.mjs +0 -1
  284. package/hooks/useGeoPath.d.mts +1 -1
  285. package/hooks/useGeoPath.d.ts +1 -1
  286. package/hooks/useGeoPath.mjs +0 -1
  287. package/hooks/useMapShapeSeries.d.mts +2 -2
  288. package/hooks/useMapShapeSeries.d.ts +2 -2
  289. package/hooks/useOHLCSeries.d.mts +2 -2
  290. package/hooks/useOHLCSeries.d.ts +2 -2
  291. package/hooks/useRadialLineSeries.d.mts +2 -2
  292. package/hooks/useRadialLineSeries.d.ts +2 -2
  293. package/hooks/useRangeBarSeries.d.mts +2 -2
  294. package/hooks/useRangeBarSeries.d.ts +2 -2
  295. package/index.js +1 -1
  296. package/index.mjs +1 -1
  297. package/internals/createGetVisibleCoordinate.d.mts +14 -0
  298. package/internals/createGetVisibleCoordinate.d.ts +14 -0
  299. package/internals/createGetVisibleCoordinate.js +66 -0
  300. package/internals/createGetVisibleCoordinate.mjs +60 -0
  301. package/internals/plugins/allPlugins.d.mts +2 -2
  302. package/internals/plugins/allPlugins.d.ts +2 -2
  303. package/internals/plugins/useGeoProjection/useGeoProjection.d.mts +1 -1
  304. package/internals/plugins/useGeoProjection/useGeoProjection.d.ts +1 -1
  305. package/internals/plugins/useGeoProjection/useGeoProjection.types.d.mts +1 -1
  306. package/internals/plugins/useGeoProjection/useGeoProjection.types.d.ts +1 -1
  307. package/models/seriesType/mapShape.d.mts +2 -1
  308. package/models/seriesType/mapShape.d.ts +2 -1
  309. package/models/seriesType/ohlc.d.mts +2 -2
  310. package/models/seriesType/ohlc.d.ts +2 -2
  311. package/models/seriesType/rangeBar.d.mts +2 -2
  312. package/models/seriesType/rangeBar.d.ts +2 -2
  313. package/moduleAugmentation/rangeBarOnClick.d.mts +1 -1
  314. package/moduleAugmentation/rangeBarOnClick.d.ts +1 -1
  315. package/package.json +6 -6
  316. package/plugins/selectors/useChartCandlestickPosition.selectors.d.mts +1 -1
  317. package/plugins/selectors/useChartCandlestickPosition.selectors.d.ts +1 -1
  318. package/utils/webgl/glsl.d.mts +15 -0
  319. package/utils/webgl/glsl.d.ts +15 -0
  320. package/utils/webgl/glsl.js +34 -0
  321. package/utils/webgl/glsl.mjs +28 -0
  322. package/utils/webgl/instancedAttribute.d.mts +28 -0
  323. package/utils/webgl/instancedAttribute.d.ts +28 -0
  324. package/utils/webgl/instancedAttribute.js +57 -0
  325. package/utils/webgl/instancedAttribute.mjs +50 -0
  326. package/utils/webgl/utils.d.mts +21 -2
  327. package/utils/webgl/utils.d.ts +21 -2
  328. package/utils/webgl/utils.js +44 -8
  329. package/utils/webgl/utils.mjs +41 -7
@@ -1,3 +1,3 @@
1
- import { type ScatterChartProPluginSignatures } from '@mui/x-charts-pro/ScatterChartPro';
1
+ import type { ScatterChartProPluginSignatures } from '@mui/x-charts-pro/ScatterChartPro';
2
2
  export type ScatterChartPremiumPluginSignatures = ScatterChartProPluginSignatures;
3
3
  export declare const SCATTER_CHART_PREMIUM_PLUGINS: readonly [import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts").UseChartZAxisSignature>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts/internals").UseChartBrushSignature>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts").UseChartTooltipSignature<"scatter">>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts").UseChartInteractionSignature>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts").UseChartCartesianAxisSignature<"scatter">>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts").UseChartHighlightSignature<"scatter">>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts").UseChartVisibilityManagerSignature<"scatter">>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts").UseChartClosestPointSignature>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts/internals").UseChartKeyboardNavigationSignature>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts-pro/plugins").UseChartProZoomSignature>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts-pro/plugins").UseChartProExportSignature>, import("@mui/x-charts/internals").ChartPlugin<import("@mui/x-charts/internals").UseProgressiveRenderingSignature>];
@@ -1,4 +1,4 @@
1
- import { type RendererType, type ScatterPlotProps, type ScatterPlotSlots, type ScatterPlotSlotProps } from '@mui/x-charts/ScatterChart';
1
+ import type { RendererType, ScatterPlotProps, ScatterPlotSlots, ScatterPlotSlotProps } from '@mui/x-charts/ScatterChart';
2
2
  export interface ScatterPlotPremiumSlots extends ScatterPlotSlots {}
3
3
  export interface ScatterPlotPremiumSlotProps extends ScatterPlotSlotProps {}
4
4
  export interface ScatterPlotPremiumProps extends Omit<ScatterPlotProps, 'renderer'> {
@@ -1,4 +1,4 @@
1
- import { type RendererType, type ScatterPlotProps, type ScatterPlotSlots, type ScatterPlotSlotProps } from '@mui/x-charts/ScatterChart';
1
+ import type { RendererType, ScatterPlotProps, ScatterPlotSlots, ScatterPlotSlotProps } from '@mui/x-charts/ScatterChart';
2
2
  export interface ScatterPlotPremiumSlots extends ScatterPlotSlots {}
3
3
  export interface ScatterPlotPremiumSlotProps extends ScatterPlotSlotProps {}
4
4
  export interface ScatterPlotPremiumProps extends Omit<ScatterPlotProps, 'renderer'> {
@@ -1,4 +1,4 @@
1
- import { type ScatterWebGLPlotData } from "./useScatterWebGLPlotData.mjs";
1
+ import type { ScatterWebGLPlotData } from "./useScatterWebGLPlotData.mjs";
2
2
  export declare class ScatterWebGLProgram {
3
3
  private gl;
4
4
  private readonly shaders;
@@ -13,6 +13,4 @@ export declare class ScatterWebGLProgram {
13
13
  plot(plotData: ScatterWebGLPlotData): void;
14
14
  render(plotData: ScatterWebGLPlotData): void;
15
15
  dispose(): void;
16
- private setupInstancedAttribute;
17
- private uploadBuffer;
18
16
  }
@@ -1,4 +1,4 @@
1
- import { type ScatterWebGLPlotData } from "./useScatterWebGLPlotData.js";
1
+ import type { ScatterWebGLPlotData } from "./useScatterWebGLPlotData.js";
2
2
  export declare class ScatterWebGLProgram {
3
3
  private gl;
4
4
  private readonly shaders;
@@ -13,6 +13,4 @@ export declare class ScatterWebGLProgram {
13
13
  plot(plotData: ScatterWebGLPlotData): void;
14
14
  render(plotData: ScatterWebGLPlotData): void;
15
15
  dispose(): void;
16
- private setupInstancedAttribute;
17
- private uploadBuffer;
18
16
  }
@@ -5,32 +5,26 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.ScatterWebGLProgram = void 0;
7
7
  var _utils = require("../../utils/webgl/utils");
8
+ var _instancedAttribute = require("../../utils/webgl/instancedAttribute");
8
9
  var _shaders = require("./shaders");
9
- const QUAD_VERTICES = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);
10
10
  class ScatterWebGLProgram {
11
11
  shaders = [];
12
+
13
+ /* Colors come in as Uint8 [0, 255]; normalized=true makes the GPU read them back as vec4 in [0, 1]. */
14
+
12
15
  constructor(gl) {
13
16
  this.gl = gl;
14
- gl.enable(gl.BLEND);
15
- gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
16
- this.quadBuffer = gl.createBuffer();
17
- gl.bindBuffer(gl.ARRAY_BUFFER, this.quadBuffer);
18
- gl.bufferData(gl.ARRAY_BUFFER, QUAD_VERTICES, gl.STATIC_DRAW);
19
- const prog = initializeProgram(gl, _shaders.scatterVertexShader, _shaders.scatterFragmentShader);
20
- this.program = prog.program;
21
- this.shaders.push(prog.vertexShader, prog.fragmentShader);
17
+ (0, _utils.setupStandardBlending)(gl);
18
+ const linked = (0, _utils.linkProgram)(gl, _shaders.scatterVertexShader, _shaders.scatterFragmentShader);
19
+ this.program = linked.program;
20
+ this.shaders.push(...linked.shaders);
21
+ this.quadBuffer = (0, _utils.uploadQuadBuffer)(gl);
22
22
  this.vao = gl.createVertexArray();
23
23
  gl.bindVertexArray(this.vao);
24
-
25
- // a_position references the shared quad; bind it once while the VAO is active.
26
- gl.bindBuffer(gl.ARRAY_BUFFER, this.quadBuffer);
27
- const aPosition = gl.getAttribLocation(this.program, 'a_position');
28
- gl.enableVertexAttribArray(aPosition);
29
- gl.vertexAttribPointer(aPosition, 2, gl.FLOAT, false, 0, 0);
30
- this.centers = this.setupInstancedAttribute('a_center', 2, gl.FLOAT, false);
31
- this.sizes = this.setupInstancedAttribute('a_size', 1, gl.FLOAT, false);
32
- // Colors come in as Uint8 [0, 255]; normalized=true makes the GPU read them back as vec4 in [0, 1].
33
- this.colors = this.setupInstancedAttribute('a_color', 4, gl.UNSIGNED_BYTE, true);
24
+ (0, _utils.bindQuadBuffer)(gl, this.program, this.quadBuffer);
25
+ this.centers = (0, _instancedAttribute.createInstancedAttribute)(gl, this.program, 'a_center', 2);
26
+ this.sizes = (0, _instancedAttribute.createInstancedAttribute)(gl, this.program, 'a_size', 1);
27
+ this.colors = (0, _instancedAttribute.createInstancedAttribute)(gl, this.program, 'a_color', 4, gl.UNSIGNED_BYTE, true);
34
28
  gl.bindVertexArray(null);
35
29
  }
36
30
  setResolution(width, height) {
@@ -41,9 +35,12 @@ class ScatterWebGLProgram {
41
35
  gl.uniform2f(gl.getUniformLocation(this.program, 'u_resolution'), width, height);
42
36
  }
43
37
  plot(plotData) {
44
- this.uploadBuffer(this.centers, plotData.centers);
45
- this.uploadBuffer(this.sizes, plotData.sizes);
46
- this.uploadBuffer(this.colors, plotData.colors);
38
+ const {
39
+ gl
40
+ } = this;
41
+ (0, _utils.uploadGrowableBuffer)(gl, this.centers.buffer, plotData.centers);
42
+ (0, _utils.uploadGrowableBuffer)(gl, this.sizes.buffer, plotData.sizes);
43
+ (0, _utils.uploadGrowableBuffer)(gl, this.colors.buffer, plotData.colors);
47
44
  }
48
45
  render(plotData) {
49
46
  if (plotData.pointCount === 0) {
@@ -64,66 +61,11 @@ class ScatterWebGLProgram {
64
61
  } = this;
65
62
  gl.deleteProgram(this.program);
66
63
  gl.deleteVertexArray(this.vao);
67
- gl.deleteBuffer(this.centers.buffer);
68
- gl.deleteBuffer(this.sizes.buffer);
69
- gl.deleteBuffer(this.colors.buffer);
64
+ gl.deleteBuffer(this.centers.buffer.buffer);
65
+ gl.deleteBuffer(this.sizes.buffer.buffer);
66
+ gl.deleteBuffer(this.colors.buffer.buffer);
70
67
  gl.deleteBuffer(this.quadBuffer);
71
68
  this.shaders.forEach(shader => gl.deleteShader(shader));
72
69
  }
73
-
74
- // Assumes the owning VAO (Vertex Array Object) is already bound.
75
- setupInstancedAttribute(name, size, glType, normalized) {
76
- const {
77
- gl,
78
- program
79
- } = this;
80
- const buffer = gl.createBuffer();
81
- gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
82
- const location = gl.getAttribLocation(program, name);
83
- gl.enableVertexAttribArray(location);
84
- gl.vertexAttribPointer(location, size, glType, normalized, 0, 0);
85
- gl.vertexAttribDivisor(location, 1);
86
- return {
87
- buffer,
88
- size,
89
- glType,
90
- capacityBytes: 0,
91
- lastUploaded: null
92
- };
93
- }
94
- uploadBuffer(target, data) {
95
- if (target.lastUploaded === data) {
96
- return;
97
- }
98
- const {
99
- gl
100
- } = this;
101
- gl.bindBuffer(gl.ARRAY_BUFFER, target.buffer);
102
- if (data.byteLength <= target.capacityBytes) {
103
- gl.bufferSubData(gl.ARRAY_BUFFER, 0, data);
104
- } else {
105
- gl.bufferData(gl.ARRAY_BUFFER, data, gl.DYNAMIC_DRAW);
106
- target.capacityBytes = data.byteLength;
107
- }
108
- target.lastUploaded = data;
109
- }
110
70
  }
111
- exports.ScatterWebGLProgram = ScatterWebGLProgram;
112
- function initializeProgram(gl, vertexShaderSource, fragmentShaderSource) {
113
- const program = gl.createProgram();
114
- const vertexShader = (0, _utils.compileShader)(gl, vertexShaderSource, gl.VERTEX_SHADER);
115
- const fragmentShader = (0, _utils.compileShader)(gl, fragmentShaderSource, gl.FRAGMENT_SHADER);
116
- gl.attachShader(program, vertexShader);
117
- gl.attachShader(program, fragmentShader);
118
- gl.linkProgram(program);
119
- if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
120
- console.error(`Program linking failed: ${gl.getProgramInfoLog(program)}`);
121
- console.error(`Vertex shader info-log: ${gl.getShaderInfoLog(vertexShader)}`);
122
- console.error(`Fragment shader info-log: ${gl.getShaderInfoLog(fragmentShader)}`);
123
- }
124
- return {
125
- program,
126
- vertexShader,
127
- fragmentShader
128
- };
129
- }
71
+ exports.ScatterWebGLProgram = ScatterWebGLProgram;
@@ -1,30 +1,24 @@
1
- import { compileShader, logWebGLErrors } from "../../utils/webgl/utils.mjs";
1
+ import { bindQuadBuffer, linkProgram, logWebGLErrors, setupStandardBlending, uploadGrowableBuffer, uploadQuadBuffer } from "../../utils/webgl/utils.mjs";
2
+ import { createInstancedAttribute } from "../../utils/webgl/instancedAttribute.mjs";
2
3
  import { scatterVertexShader, scatterFragmentShader } from "./shaders.mjs";
3
- const QUAD_VERTICES = new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]);
4
4
  export class ScatterWebGLProgram {
5
5
  shaders = [];
6
+
7
+ /* Colors come in as Uint8 [0, 255]; normalized=true makes the GPU read them back as vec4 in [0, 1]. */
8
+
6
9
  constructor(gl) {
7
10
  this.gl = gl;
8
- gl.enable(gl.BLEND);
9
- gl.blendFunc(gl.SRC_ALPHA, gl.ONE_MINUS_SRC_ALPHA);
10
- this.quadBuffer = gl.createBuffer();
11
- gl.bindBuffer(gl.ARRAY_BUFFER, this.quadBuffer);
12
- gl.bufferData(gl.ARRAY_BUFFER, QUAD_VERTICES, gl.STATIC_DRAW);
13
- const prog = initializeProgram(gl, scatterVertexShader, scatterFragmentShader);
14
- this.program = prog.program;
15
- this.shaders.push(prog.vertexShader, prog.fragmentShader);
11
+ setupStandardBlending(gl);
12
+ const linked = linkProgram(gl, scatterVertexShader, scatterFragmentShader);
13
+ this.program = linked.program;
14
+ this.shaders.push(...linked.shaders);
15
+ this.quadBuffer = uploadQuadBuffer(gl);
16
16
  this.vao = gl.createVertexArray();
17
17
  gl.bindVertexArray(this.vao);
18
-
19
- // a_position references the shared quad; bind it once while the VAO is active.
20
- gl.bindBuffer(gl.ARRAY_BUFFER, this.quadBuffer);
21
- const aPosition = gl.getAttribLocation(this.program, 'a_position');
22
- gl.enableVertexAttribArray(aPosition);
23
- gl.vertexAttribPointer(aPosition, 2, gl.FLOAT, false, 0, 0);
24
- this.centers = this.setupInstancedAttribute('a_center', 2, gl.FLOAT, false);
25
- this.sizes = this.setupInstancedAttribute('a_size', 1, gl.FLOAT, false);
26
- // Colors come in as Uint8 [0, 255]; normalized=true makes the GPU read them back as vec4 in [0, 1].
27
- this.colors = this.setupInstancedAttribute('a_color', 4, gl.UNSIGNED_BYTE, true);
18
+ bindQuadBuffer(gl, this.program, this.quadBuffer);
19
+ this.centers = createInstancedAttribute(gl, this.program, 'a_center', 2);
20
+ this.sizes = createInstancedAttribute(gl, this.program, 'a_size', 1);
21
+ this.colors = createInstancedAttribute(gl, this.program, 'a_color', 4, gl.UNSIGNED_BYTE, true);
28
22
  gl.bindVertexArray(null);
29
23
  }
30
24
  setResolution(width, height) {
@@ -35,9 +29,12 @@ export class ScatterWebGLProgram {
35
29
  gl.uniform2f(gl.getUniformLocation(this.program, 'u_resolution'), width, height);
36
30
  }
37
31
  plot(plotData) {
38
- this.uploadBuffer(this.centers, plotData.centers);
39
- this.uploadBuffer(this.sizes, plotData.sizes);
40
- this.uploadBuffer(this.colors, plotData.colors);
32
+ const {
33
+ gl
34
+ } = this;
35
+ uploadGrowableBuffer(gl, this.centers.buffer, plotData.centers);
36
+ uploadGrowableBuffer(gl, this.sizes.buffer, plotData.sizes);
37
+ uploadGrowableBuffer(gl, this.colors.buffer, plotData.colors);
41
38
  }
42
39
  render(plotData) {
43
40
  if (plotData.pointCount === 0) {
@@ -58,65 +55,10 @@ export class ScatterWebGLProgram {
58
55
  } = this;
59
56
  gl.deleteProgram(this.program);
60
57
  gl.deleteVertexArray(this.vao);
61
- gl.deleteBuffer(this.centers.buffer);
62
- gl.deleteBuffer(this.sizes.buffer);
63
- gl.deleteBuffer(this.colors.buffer);
58
+ gl.deleteBuffer(this.centers.buffer.buffer);
59
+ gl.deleteBuffer(this.sizes.buffer.buffer);
60
+ gl.deleteBuffer(this.colors.buffer.buffer);
64
61
  gl.deleteBuffer(this.quadBuffer);
65
62
  this.shaders.forEach(shader => gl.deleteShader(shader));
66
63
  }
67
-
68
- // Assumes the owning VAO (Vertex Array Object) is already bound.
69
- setupInstancedAttribute(name, size, glType, normalized) {
70
- const {
71
- gl,
72
- program
73
- } = this;
74
- const buffer = gl.createBuffer();
75
- gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
76
- const location = gl.getAttribLocation(program, name);
77
- gl.enableVertexAttribArray(location);
78
- gl.vertexAttribPointer(location, size, glType, normalized, 0, 0);
79
- gl.vertexAttribDivisor(location, 1);
80
- return {
81
- buffer,
82
- size,
83
- glType,
84
- capacityBytes: 0,
85
- lastUploaded: null
86
- };
87
- }
88
- uploadBuffer(target, data) {
89
- if (target.lastUploaded === data) {
90
- return;
91
- }
92
- const {
93
- gl
94
- } = this;
95
- gl.bindBuffer(gl.ARRAY_BUFFER, target.buffer);
96
- if (data.byteLength <= target.capacityBytes) {
97
- gl.bufferSubData(gl.ARRAY_BUFFER, 0, data);
98
- } else {
99
- gl.bufferData(gl.ARRAY_BUFFER, data, gl.DYNAMIC_DRAW);
100
- target.capacityBytes = data.byteLength;
101
- }
102
- target.lastUploaded = data;
103
- }
104
- }
105
- function initializeProgram(gl, vertexShaderSource, fragmentShaderSource) {
106
- const program = gl.createProgram();
107
- const vertexShader = compileShader(gl, vertexShaderSource, gl.VERTEX_SHADER);
108
- const fragmentShader = compileShader(gl, fragmentShaderSource, gl.FRAGMENT_SHADER);
109
- gl.attachShader(program, vertexShader);
110
- gl.attachShader(program, fragmentShader);
111
- gl.linkProgram(program);
112
- if (!gl.getProgramParameter(program, gl.LINK_STATUS)) {
113
- console.error(`Program linking failed: ${gl.getProgramInfoLog(program)}`);
114
- console.error(`Vertex shader info-log: ${gl.getShaderInfoLog(vertexShader)}`);
115
- console.error(`Fragment shader info-log: ${gl.getShaderInfoLog(fragmentShader)}`);
116
- }
117
- return {
118
- program,
119
- vertexShader,
120
- fragmentShader
121
- };
122
64
  }
@@ -1,4 +1,4 @@
1
- import { type ChartPremiumApi } from "./ChartPremiumApi.mjs";
1
+ import type { ChartPremiumApi } from "./ChartPremiumApi.mjs";
2
2
  /**
3
3
  * The `useChartPremiumApiContext` hook provides access to the chart API.
4
4
  * This is only available when the chart is rendered within a chart or a `ChartsDataProviderPremium` component.
@@ -1,4 +1,4 @@
1
- import { type ChartPremiumApi } from "./ChartPremiumApi.js";
1
+ import type { ChartPremiumApi } from "./ChartPremiumApi.js";
2
2
  /**
3
3
  * The `useChartPremiumApiContext` hook provides access to the chart API.
4
4
  * This is only available when the chart is rendered within a chart or a `ChartsDataProviderPremium` component.
@@ -1,5 +1,5 @@
1
1
  import type * as React from 'react';
2
- import { type AnimatedRangeBarElementProps } from "../../BarChartPremium/RangeBar/AnimatedRangeBarElement.mjs";
2
+ import type { AnimatedRangeBarElementProps } from "../../BarChartPremium/RangeBar/AnimatedRangeBarElement.mjs";
3
3
  type UseAnimateRangeBarParams = Pick<AnimatedRangeBarElementProps, 'x' | 'y' | 'xOrigin' | 'yOrigin' | 'width' | 'height' | 'skipAnimation' | 'layout'> & {
4
4
  ref?: React.Ref<SVGRectElement>;
5
5
  hidden?: boolean;
@@ -1,5 +1,5 @@
1
1
  import type * as React from 'react';
2
- import { type AnimatedRangeBarElementProps } from "../../BarChartPremium/RangeBar/AnimatedRangeBarElement.js";
2
+ import type { AnimatedRangeBarElementProps } from "../../BarChartPremium/RangeBar/AnimatedRangeBarElement.js";
3
3
  type UseAnimateRangeBarParams = Pick<AnimatedRangeBarElementProps, 'x' | 'y' | 'xOrigin' | 'yOrigin' | 'width' | 'height' | 'skipAnimation' | 'layout'> & {
4
4
  ref?: React.Ref<SVGRectElement>;
5
5
  hidden?: boolean;
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { type ChartAnyPluginSignature } from '@mui/x-charts/internals';
3
- import { type ChartPremiumApi } from "../context/index.mjs";
4
- import { type AllPluginSignatures } from "../internals/plugins/allPlugins.mjs";
5
- import { type PremiumPluginsPerSeriesType } from "../context/ChartPremiumApi.mjs";
2
+ import type { ChartAnyPluginSignature } from '@mui/x-charts/internals';
3
+ import type { ChartPremiumApi } from "../context/index.mjs";
4
+ import type { AllPluginSignatures } from "../internals/plugins/allPlugins.mjs";
5
+ import type { PremiumPluginsPerSeriesType } from "../context/ChartPremiumApi.mjs";
6
6
  /**
7
7
  * Hook that instantiates a [[ChartPremiumApiRef]].
8
8
  * The chart type needs to be given as the generic parameter to narrow down the API to the specific chart type.
@@ -1,8 +1,8 @@
1
1
  import * as React from 'react';
2
- import { type ChartAnyPluginSignature } from '@mui/x-charts/internals';
3
- import { type ChartPremiumApi } from "../context/index.js";
4
- import { type AllPluginSignatures } from "../internals/plugins/allPlugins.js";
5
- import { type PremiumPluginsPerSeriesType } from "../context/ChartPremiumApi.js";
2
+ import type { ChartAnyPluginSignature } from '@mui/x-charts/internals';
3
+ import type { ChartPremiumApi } from "../context/index.js";
4
+ import type { AllPluginSignatures } from "../internals/plugins/allPlugins.js";
5
+ import type { PremiumPluginsPerSeriesType } from "../context/ChartPremiumApi.js";
6
6
  /**
7
7
  * Hook that instantiates a [[ChartPremiumApiRef]].
8
8
  * The chart type needs to be given as the generic parameter to narrow down the API to the specific chart type.
@@ -1,4 +1,4 @@
1
- import { type ExtendedFeatureCollection } from '@mui/x-charts-vendor/d3-geo';
1
+ import type { ExtendedFeatureCollection } from '@mui/x-charts-vendor/d3-geo';
2
2
  /**
3
3
  * Get the GeoJSON `FeatureCollection` currently registered with the geo chart,
4
4
  * or `null` when no `geoData` has been configured.
@@ -1,4 +1,4 @@
1
- import { type ExtendedFeatureCollection } from '@mui/x-charts-vendor/d3-geo';
1
+ import type { ExtendedFeatureCollection } from '@mui/x-charts-vendor/d3-geo';
2
2
  /**
3
3
  * Get the GeoJSON `FeatureCollection` currently registered with the geo chart,
4
4
  * or `null` when no `geoData` has been configured.
@@ -2,7 +2,6 @@
2
2
 
3
3
  import { useStore } from '@mui/x-charts/internals';
4
4
  import { selectorChartGeoData } from "../internals/plugins/useGeoProjection/index.mjs";
5
-
6
5
  /**
7
6
  * Get the GeoJSON `FeatureCollection` currently registered with the geo chart,
8
7
  * or `null` when no `geoData` has been configured.
@@ -2,7 +2,6 @@
2
2
 
3
3
  import { useStore } from '@mui/x-charts/internals';
4
4
  import { selectorChartGeoFeatureIndexesByName } from "../internals/plugins/useGeoProjection/index.mjs";
5
-
6
5
  /**
7
6
  * Get a map from `feature.properties.name` to the indices of that feature in `geoData.features`.
8
7
  *
@@ -1,4 +1,4 @@
1
- import { type GeoPath } from '@mui/x-charts-vendor/d3-geo';
1
+ import type { GeoPath } from '@mui/x-charts-vendor/d3-geo';
2
2
  /**
3
3
  * Get the geo path registered with the geo chart, resolved against d3-geo and
4
4
  * fitted to the chart's drawing area.
@@ -1,4 +1,4 @@
1
- import { type GeoPath } from '@mui/x-charts-vendor/d3-geo';
1
+ import type { GeoPath } from '@mui/x-charts-vendor/d3-geo';
2
2
  /**
3
3
  * Get the geo path registered with the geo chart, resolved against d3-geo and
4
4
  * fitted to the chart's drawing area.
@@ -2,7 +2,6 @@
2
2
 
3
3
  import { useStore } from '@mui/x-charts/internals';
4
4
  import { selectorChartGeoPath } from "../internals/plugins/useGeoProjection/index.mjs";
5
-
6
5
  /**
7
6
  * Get the geo path registered with the geo chart, resolved against d3-geo and
8
7
  * fitted to the chart's drawing area.
@@ -1,5 +1,5 @@
1
- import { type ChartSeriesDefaultized, type ProcessedSeries } from '@mui/x-charts/internals';
2
- import { type SeriesId } from '@mui/x-charts/models';
1
+ import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
2
+ import type { SeriesId } from '@mui/x-charts/models';
3
3
  export type UseMapShapeSeriesReturnValue = ChartSeriesDefaultized<'mapShape'>;
4
4
  export type UseMapShapeSeriesContextReturnValue = ProcessedSeries['mapShape'];
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { type ChartSeriesDefaultized, type ProcessedSeries } from '@mui/x-charts/internals';
2
- import { type SeriesId } from '@mui/x-charts/models';
1
+ import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
2
+ import type { SeriesId } from '@mui/x-charts/models';
3
3
  export type UseMapShapeSeriesReturnValue = ChartSeriesDefaultized<'mapShape'>;
4
4
  export type UseMapShapeSeriesContextReturnValue = ProcessedSeries['mapShape'];
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { type ChartSeriesDefaultized, type ProcessedSeries } from '@mui/x-charts/internals';
2
- import { type SeriesId } from '@mui/x-charts/models';
1
+ import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
2
+ import type { SeriesId } from '@mui/x-charts/models';
3
3
  export type UseOHLCSeriesReturnValue = ChartSeriesDefaultized<'ohlc'>;
4
4
  export type UseOHLCSeriesContextReturnValue = ProcessedSeries['ohlc'];
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { type ChartSeriesDefaultized, type ProcessedSeries } from '@mui/x-charts/internals';
2
- import { type SeriesId } from '@mui/x-charts/models';
1
+ import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
2
+ import type { SeriesId } from '@mui/x-charts/models';
3
3
  export type UseOHLCSeriesReturnValue = ChartSeriesDefaultized<'ohlc'>;
4
4
  export type UseOHLCSeriesContextReturnValue = ProcessedSeries['ohlc'];
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { type ChartSeriesDefaultized, type ProcessedSeries } from '@mui/x-charts/internals';
2
- import { type SeriesId } from '@mui/x-charts/models';
1
+ import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
2
+ import type { SeriesId } from '@mui/x-charts/models';
3
3
  export type UseRadialLineSeriesReturnValue = ChartSeriesDefaultized<'radialLine'>;
4
4
  export type UseRadialLineSeriesContextReturnValue = ProcessedSeries['radialLine'];
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { type ChartSeriesDefaultized, type ProcessedSeries } from '@mui/x-charts/internals';
2
- import { type SeriesId } from '@mui/x-charts/models';
1
+ import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
2
+ import type { SeriesId } from '@mui/x-charts/models';
3
3
  export type UseRadialLineSeriesReturnValue = ChartSeriesDefaultized<'radialLine'>;
4
4
  export type UseRadialLineSeriesContextReturnValue = ProcessedSeries['radialLine'];
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { type ChartSeriesDefaultized, type ProcessedSeries } from '@mui/x-charts/internals';
2
- import { type SeriesId } from '@mui/x-charts/models';
1
+ import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
2
+ import type { SeriesId } from '@mui/x-charts/models';
3
3
  export type UseRangeBarSeriesReturnValue = ChartSeriesDefaultized<'rangeBar'>;
4
4
  export type UseRangeBarSeriesContextReturnValue = ProcessedSeries['rangeBar'];
5
5
  /**
@@ -1,5 +1,5 @@
1
- import { type ChartSeriesDefaultized, type ProcessedSeries } from '@mui/x-charts/internals';
2
- import { type SeriesId } from '@mui/x-charts/models';
1
+ import type { ChartSeriesDefaultized, ProcessedSeries } from '@mui/x-charts/internals';
2
+ import type { SeriesId } from '@mui/x-charts/models';
3
3
  export type UseRangeBarSeriesReturnValue = ChartSeriesDefaultized<'rangeBar'>;
4
4
  export type UseRangeBarSeriesContextReturnValue = ProcessedSeries['rangeBar'];
5
5
  /**
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-premium v9.6.0
2
+ * @mui/x-charts-premium v9.8.0
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-premium v9.6.0
2
+ * @mui/x-charts-premium v9.8.0
3
3
  *
4
4
  * @license SEE LICENSE IN LICENSE
5
5
  * This source code is licensed under the SEE LICENSE IN LICENSE license found in the
@@ -0,0 +1,14 @@
1
+ import type { GeoProjection } from '@mui/x-charts-vendor/d3-geo';
2
+ /**
3
+ * Builds a test that maps a device pixel to its `[lon, lat]`, or `null` when the
4
+ * pixel is not part of the visible map. It combines two clips that `projection.invert`
5
+ * alone misses:
6
+ *
7
+ * - the **post-clip** (cartesian) stream rejects device pixels outside the clip
8
+ * rectangle — relevant once the map is panned/zoomed with a `clipExtent`;
9
+ * - streaming the inverted coordinate **back** through the projection applies the
10
+ * pre-clip (spherical) boundary and checks the round trip: azimuthal projections
11
+ * clamp `invert` outside the visible disk to the limb, and those clamped points do
12
+ * not project back to the pixel they came from.
13
+ */
14
+ export declare function createGetVisibleCoordinate(projection: GeoProjection): ([deviceX, deviceY]: [number, number]) => [number, number] | null;
@@ -0,0 +1,14 @@
1
+ import type { GeoProjection } from '@mui/x-charts-vendor/d3-geo';
2
+ /**
3
+ * Builds a test that maps a device pixel to its `[lon, lat]`, or `null` when the
4
+ * pixel is not part of the visible map. It combines two clips that `projection.invert`
5
+ * alone misses:
6
+ *
7
+ * - the **post-clip** (cartesian) stream rejects device pixels outside the clip
8
+ * rectangle — relevant once the map is panned/zoomed with a `clipExtent`;
9
+ * - streaming the inverted coordinate **back** through the projection applies the
10
+ * pre-clip (spherical) boundary and checks the round trip: azimuthal projections
11
+ * clamp `invert` outside the visible disk to the limb, and those clamped points do
12
+ * not project back to the pixel they came from.
13
+ */
14
+ export declare function createGetVisibleCoordinate(projection: GeoProjection): ([deviceX, deviceY]: [number, number]) => [number, number] | null;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.createGetVisibleCoordinate = createGetVisibleCoordinate;
7
+ // A `GeoStream` sink that only records whether a point passed through (and where),
8
+ // so a projection/clip pipeline can be probed one point at a time.
9
+
10
+ function createPointSink() {
11
+ const sink = {
12
+ hit: false,
13
+ x: 0,
14
+ y: 0,
15
+ point(x, y) {
16
+ sink.hit = true;
17
+ sink.x = x;
18
+ sink.y = y;
19
+ },
20
+ lineStart() {},
21
+ lineEnd() {},
22
+ polygonStart() {},
23
+ polygonEnd() {}
24
+ };
25
+ return sink;
26
+ }
27
+
28
+ /**
29
+ * Builds a test that maps a device pixel to its `[lon, lat]`, or `null` when the
30
+ * pixel is not part of the visible map. It combines two clips that `projection.invert`
31
+ * alone misses:
32
+ *
33
+ * - the **post-clip** (cartesian) stream rejects device pixels outside the clip
34
+ * rectangle — relevant once the map is panned/zoomed with a `clipExtent`;
35
+ * - streaming the inverted coordinate **back** through the projection applies the
36
+ * pre-clip (spherical) boundary and checks the round trip: azimuthal projections
37
+ * clamp `invert` outside the visible disk to the limb, and those clamped points do
38
+ * not project back to the pixel they came from.
39
+ */
40
+ function createGetVisibleCoordinate(projection) {
41
+ const invert = projection.invert;
42
+ const forwardSink = createPointSink();
43
+ const forwardStream = projection.stream(forwardSink);
44
+ const postClip = projection.postclip?.();
45
+ const clipSink = createPointSink();
46
+ const clipStream = postClip?.(clipSink);
47
+ return ([deviceX, deviceY]) => {
48
+ if (clipStream) {
49
+ clipSink.hit = false;
50
+ clipStream.point(deviceX, deviceY);
51
+ if (!clipSink.hit) {
52
+ return null;
53
+ }
54
+ }
55
+ const coordinates = invert([deviceX, deviceY]);
56
+ if (!coordinates) {
57
+ return null;
58
+ }
59
+ forwardSink.hit = false;
60
+ forwardStream.point(coordinates[0], coordinates[1]);
61
+ if (!forwardSink.hit || Math.abs(forwardSink.x - deviceX) > 0.5 || Math.abs(forwardSink.y - deviceY) > 0.5) {
62
+ return null;
63
+ }
64
+ return coordinates;
65
+ };
66
+ }