@mui/x-charts-pro 7.22.3 → 8.0.0-alpha.1

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 (73) hide show
  1. package/BarChartPro/BarChartPro.d.ts +1 -1
  2. package/BarChartPro/BarChartPro.js +9 -59
  3. package/CHANGELOG.md +348 -12
  4. package/ChartContainerPro/ChartContainerPro.d.ts +1 -1
  5. package/ChartContainerPro/ChartContainerPro.js +21 -47
  6. package/ChartContainerPro/useChartContainerProProps.d.ts +6 -14
  7. package/ChartContainerPro/useChartContainerProProps.js +11 -25
  8. package/Heatmap/Heatmap.d.ts +16 -8
  9. package/Heatmap/Heatmap.js +6 -37
  10. package/Heatmap/HeatmapTooltip.d.ts +9 -0
  11. package/Heatmap/HeatmapTooltip.js +294 -0
  12. package/Heatmap/index.d.ts +1 -1
  13. package/Heatmap/index.js +1 -1
  14. package/LineChartPro/LineChartPro.d.ts +1 -1
  15. package/LineChartPro/LineChartPro.js +9 -60
  16. package/README.md +4 -4
  17. package/ScatterChartPro/ScatterChartPro.d.ts +1 -1
  18. package/ScatterChartPro/ScatterChartPro.js +9 -60
  19. package/context/ChartDataProviderPro/ChartDataProviderPro.d.ts +10 -0
  20. package/{modern/ResponsiveChartContainerPro/ResponsiveChartContainerPro.js → context/ChartDataProviderPro/ChartDataProviderPro.js} +50 -33
  21. package/context/ChartDataProviderPro/index.d.ts +1 -0
  22. package/context/ChartDataProviderPro/index.js +1 -0
  23. package/context/ChartDataProviderPro/useChartDataProviderProProps.d.ts +14 -0
  24. package/context/ChartDataProviderPro/useChartDataProviderProProps.js +43 -0
  25. package/context/ZoomProvider/ZoomProvider.js +1 -0
  26. package/index.d.ts +0 -1
  27. package/index.js +1 -2
  28. package/internals/utils/releaseInfo.js +1 -1
  29. package/models/seriesType/heatmap.d.ts +2 -1
  30. package/modern/BarChartPro/BarChartPro.js +9 -59
  31. package/modern/ChartContainerPro/ChartContainerPro.js +21 -47
  32. package/modern/ChartContainerPro/useChartContainerProProps.js +11 -25
  33. package/modern/Heatmap/Heatmap.js +6 -37
  34. package/modern/Heatmap/HeatmapTooltip.js +294 -0
  35. package/modern/Heatmap/index.js +1 -1
  36. package/modern/LineChartPro/LineChartPro.js +9 -60
  37. package/modern/ScatterChartPro/ScatterChartPro.js +9 -60
  38. package/{ResponsiveChartContainerPro/ResponsiveChartContainerPro.js → modern/context/ChartDataProviderPro/ChartDataProviderPro.js} +50 -33
  39. package/modern/context/ChartDataProviderPro/index.js +1 -0
  40. package/modern/context/ChartDataProviderPro/useChartDataProviderProProps.js +43 -0
  41. package/modern/context/ZoomProvider/ZoomProvider.js +1 -0
  42. package/modern/index.js +1 -2
  43. package/modern/internals/utils/releaseInfo.js +1 -1
  44. package/node/BarChartPro/BarChartPro.js +9 -59
  45. package/node/ChartContainerPro/ChartContainerPro.js +20 -46
  46. package/node/ChartContainerPro/useChartContainerProProps.js +11 -25
  47. package/node/Heatmap/Heatmap.js +6 -37
  48. package/node/Heatmap/HeatmapTooltip.js +300 -0
  49. package/node/Heatmap/index.js +4 -4
  50. package/node/LineChartPro/LineChartPro.js +9 -60
  51. package/node/ScatterChartPro/ScatterChartPro.js +9 -60
  52. package/node/{ResponsiveChartContainerPro/ResponsiveChartContainerPro.js → context/ChartDataProviderPro/ChartDataProviderPro.js} +48 -31
  53. package/node/context/ChartDataProviderPro/index.js +16 -0
  54. package/node/context/ChartDataProviderPro/useChartDataProviderProProps.js +50 -0
  55. package/node/context/ZoomProvider/ZoomProvider.js +1 -0
  56. package/node/index.js +1 -12
  57. package/node/internals/utils/releaseInfo.js +1 -1
  58. package/package.json +8 -8
  59. package/typeOverloads/modules.d.ts +1 -1
  60. package/Heatmap/DefaultHeatmapTooltip.d.ts +0 -7
  61. package/Heatmap/DefaultHeatmapTooltip.js +0 -99
  62. package/ResponsiveChartContainerPro/ResponsiveChartContainerPro.d.ts +0 -7
  63. package/ResponsiveChartContainerPro/index.d.ts +0 -1
  64. package/ResponsiveChartContainerPro/index.js +0 -1
  65. package/ResponsiveChartContainerPro/package.json +0 -6
  66. package/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.d.ts +0 -42
  67. package/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.js +0 -27
  68. package/modern/Heatmap/DefaultHeatmapTooltip.js +0 -99
  69. package/modern/ResponsiveChartContainerPro/index.js +0 -1
  70. package/modern/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.js +0 -27
  71. package/node/Heatmap/DefaultHeatmapTooltip.js +0 -105
  72. package/node/ResponsiveChartContainerPro/index.js +0 -16
  73. package/node/ResponsiveChartContainerPro/useResponsiveChartContainerProProps.js +0 -34
@@ -16,7 +16,7 @@ import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
16
16
  import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
17
17
  import { ChartsClipPath } from '@mui/x-charts/ChartsClipPath';
18
18
  import { useLineChartProps } from '@mui/x-charts/internals';
19
- import { ResponsiveChartContainerPro } from "../ResponsiveChartContainerPro/index.js";
19
+ import { ChartContainerPro } from "../ChartContainerPro/index.js";
20
20
  import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
21
21
  import { useZoom } from "../context/ZoomProvider/useZoom.js";
22
22
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -165,10 +165,10 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
165
165
  axisHighlightProps,
166
166
  lineHighlightPlotProps,
167
167
  legendProps,
168
- tooltipProps,
169
168
  children
170
169
  } = useLineChartProps(other);
171
- return /*#__PURE__*/_jsxs(ResponsiveChartContainerPro, _extends({
170
+ const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
171
+ return /*#__PURE__*/_jsxs(ChartContainerPro, _extends({
172
172
  ref: ref
173
173
  }, chartContainerProps, {
174
174
  zoom: zoom,
@@ -178,7 +178,7 @@ const LineChartPro = /*#__PURE__*/React.forwardRef(function LineChartPro(inProps
178
178
  })), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx("g", {
179
179
  "data-drawing-container": true,
180
180
  children: /*#__PURE__*/_jsx(MarkPlotZoom, _extends({}, markPlotProps))
181
- }), /*#__PURE__*/_jsx(LineHighlightPlot, _extends({}, lineHighlightPlotProps)), /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(ChartsTooltip, _extends({}, tooltipProps)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
181
+ }), /*#__PURE__*/_jsx(LineHighlightPlot, _extends({}, lineHighlightPlotProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props.slotProps?.tooltip)), /*#__PURE__*/_jsx(ChartsClipPath, _extends({}, clipPathProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
182
182
  }));
183
183
  });
184
184
  process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
@@ -188,7 +188,7 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
188
188
  // ----------------------------------------------------------------------
189
189
  /**
190
190
  * The configuration of axes highlight.
191
- * @see See {@link https://mui.com/x/react-charts/highlighting highlighting docs} for more details.
191
+ * @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
192
192
  * @default { x: 'line' }
193
193
  */
194
194
  axisHighlight: PropTypes.shape({
@@ -238,6 +238,10 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
238
238
  * The height of the chart in px. If not defined, it takes the height of the parent element.
239
239
  */
240
240
  height: PropTypes.number,
241
+ /**
242
+ * If `true`, the legend is not rendered.
243
+ */
244
+ hideLegend: PropTypes.bool,
241
245
  /**
242
246
  * The item currently highlighted. Turns highlighting into a controlled prop.
243
247
  */
@@ -251,32 +255,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
251
255
  * @default yAxisIds[0] The id of the first provided axis
252
256
  */
253
257
  leftAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
254
- /**
255
- * @deprecated Consider using `slotProps.legend` instead.
256
- */
257
- legend: PropTypes.shape({
258
- classes: PropTypes.object,
259
- direction: PropTypes.oneOf(['column', 'row']),
260
- hidden: PropTypes.bool,
261
- itemGap: PropTypes.number,
262
- itemMarkHeight: PropTypes.number,
263
- itemMarkWidth: PropTypes.number,
264
- labelStyle: PropTypes.object,
265
- markGap: PropTypes.number,
266
- onItemClick: PropTypes.func,
267
- padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
268
- bottom: PropTypes.number,
269
- left: PropTypes.number,
270
- right: PropTypes.number,
271
- top: PropTypes.number
272
- })]),
273
- position: PropTypes.shape({
274
- horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
275
- vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
276
- }),
277
- slotProps: PropTypes.object,
278
- slots: PropTypes.object
279
- }),
280
258
  /**
281
259
  * If `true`, a loading overlay is displayed.
282
260
  * @default false
@@ -325,16 +303,6 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
325
303
  * @param {ZoomData[]} zoomData Updated zoom data.
326
304
  */
327
305
  onZoomChange: PropTypes.func,
328
- /**
329
- * The chart will try to wait for the parent container to resolve its size
330
- * before it renders for the first time.
331
- *
332
- * This can be useful in some scenarios where the chart appear to grow after
333
- * the first render, like when used inside a grid.
334
- *
335
- * @default false
336
- */
337
- resolveSizeBeforeRender: PropTypes.bool,
338
306
  /**
339
307
  * Indicate which axis to display the right of the charts.
340
308
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -363,31 +331,12 @@ process.env.NODE_ENV !== "production" ? LineChartPro.propTypes = {
363
331
  slots: PropTypes.object,
364
332
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
365
333
  title: PropTypes.string,
366
- /**
367
- * The configuration of the tooltip.
368
- * @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
369
- * @default { trigger: 'item' }
370
- */
371
- tooltip: PropTypes.shape({
372
- axisContent: PropTypes.elementType,
373
- classes: PropTypes.object,
374
- itemContent: PropTypes.elementType,
375
- slotProps: PropTypes.object,
376
- slots: PropTypes.object,
377
- trigger: PropTypes.oneOf(['axis', 'item', 'none'])
378
- }),
379
334
  /**
380
335
  * Indicate which axis to display the top of the charts.
381
336
  * Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
382
337
  * @default null
383
338
  */
384
339
  topAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
385
- viewBox: PropTypes.shape({
386
- height: PropTypes.number,
387
- width: PropTypes.number,
388
- x: PropTypes.number,
389
- y: PropTypes.number
390
- }),
391
340
  /**
392
341
  * The width of the chart in px. If not defined, it takes the width of the parent element.
393
342
  */
package/README.md CHANGED
@@ -11,13 +11,13 @@ Install the package in your project directory with:
11
11
  npm install @mui/x-charts-pro
12
12
  ```
13
13
 
14
- This component has the following peer dependencies that you will need to install as well.
14
+ This component has the following peer dependencies that you need to install as well.
15
15
 
16
16
  ```json
17
17
  "peerDependencies": {
18
- "@mui/material": "^5.15.14",
19
- "react": "^17.0.0 || ^18.0.0",
20
- "react-dom": "^17.0.0 || ^18.0.0"
18
+ "@mui/material": "^5.15.14 || ^6.0.0",
19
+ "react": "^17.0.0 || ^18.0.0 || ^19.0.0",
20
+ "react-dom": "^17.0.0 || ^18.0.0 || ^19.0.0"
21
21
  },
22
22
  ```
23
23
 
@@ -13,5 +13,5 @@ export interface ScatterChartProProps extends ScatterChartProps, ZoomProps {
13
13
  *
14
14
  * - [ScatterChart API](https://mui.com/x/api/charts/scatter-chart/)
15
15
  */
16
- declare const ScatterChartPro: React.ForwardRefExoticComponent<ScatterChartProProps & React.RefAttributes<unknown>>;
16
+ declare const ScatterChartPro: React.ForwardRefExoticComponent<ScatterChartProProps & React.RefAttributes<SVGSVGElement>>;
17
17
  export { ScatterChartPro };
@@ -16,7 +16,7 @@ import { ChartsLegend } from '@mui/x-charts/ChartsLegend';
16
16
  import { ChartsAxisHighlight } from '@mui/x-charts/ChartsAxisHighlight';
17
17
  import { ChartsTooltip } from '@mui/x-charts/ChartsTooltip';
18
18
  import { useScatterChartProps } from '@mui/x-charts/internals';
19
- import { ResponsiveChartContainerPro } from "../ResponsiveChartContainerPro/index.js";
19
+ import { ChartContainerPro } from "../ChartContainerPro/index.js";
20
20
  import { ZoomSetup } from "../context/ZoomProvider/ZoomSetup.js";
21
21
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
22
22
  /**
@@ -49,10 +49,10 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
49
49
  overlayProps,
50
50
  legendProps,
51
51
  axisHighlightProps,
52
- tooltipProps,
53
52
  children
54
53
  } = useScatterChartProps(other);
55
- return /*#__PURE__*/_jsx(ResponsiveChartContainerPro, _extends({
54
+ const Tooltip = props.slots?.tooltip ?? ChartsTooltip;
55
+ return /*#__PURE__*/_jsx(ChartContainerPro, _extends({
56
56
  ref: ref
57
57
  }, chartContainerProps, {
58
58
  zoom: zoom,
@@ -61,7 +61,7 @@ const ScatterChartPro = /*#__PURE__*/React.forwardRef(function ScatterChartPro(i
61
61
  children: [!props.disableVoronoi && /*#__PURE__*/_jsx(ChartsVoronoiHandler, _extends({}, voronoiHandlerProps)), /*#__PURE__*/_jsx(ChartsAxis, _extends({}, chartsAxisProps)), /*#__PURE__*/_jsx(ChartsGrid, _extends({}, gridProps)), /*#__PURE__*/_jsx("g", {
62
62
  "data-drawing-container": true,
63
63
  children: /*#__PURE__*/_jsx(ScatterPlot, _extends({}, scatterPlotProps))
64
- }), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(ChartsTooltip, _extends({}, tooltipProps)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
64
+ }), /*#__PURE__*/_jsx(ChartsOverlay, _extends({}, overlayProps)), !props.hideLegend && /*#__PURE__*/_jsx(ChartsLegend, _extends({}, legendProps)), /*#__PURE__*/_jsx(ChartsAxisHighlight, _extends({}, axisHighlightProps)), !props.loading && /*#__PURE__*/_jsx(Tooltip, _extends({}, props?.slotProps?.tooltip)), /*#__PURE__*/_jsx(ZoomSetup, {}), children]
65
65
  }))
66
66
  }));
67
67
  });
@@ -72,7 +72,7 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
72
72
  // ----------------------------------------------------------------------
73
73
  /**
74
74
  * The configuration of axes highlight.
75
- * @see See {@link https://mui.com/x/react-charts/highlighting highlighting docs} for more details.
75
+ * @see See {@link https://mui.com/x/react-charts/highlighting/ highlighting docs} for more details.
76
76
  * @default { x: 'none', y: 'none' }
77
77
  */
78
78
  axisHighlight: PropTypes.shape({
@@ -119,6 +119,10 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
119
119
  * The height of the chart in px. If not defined, it takes the height of the parent element.
120
120
  */
121
121
  height: PropTypes.number,
122
+ /**
123
+ * If `true`, the legend is not rendered.
124
+ */
125
+ hideLegend: PropTypes.bool,
122
126
  /**
123
127
  * The item currently highlighted. Turns highlighting into a controlled prop.
124
128
  */
@@ -132,32 +136,6 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
132
136
  * @default yAxisIds[0] The id of the first provided axis
133
137
  */
134
138
  leftAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
135
- /**
136
- * @deprecated Consider using `slotProps.legend` instead.
137
- */
138
- legend: PropTypes.shape({
139
- classes: PropTypes.object,
140
- direction: PropTypes.oneOf(['column', 'row']),
141
- hidden: PropTypes.bool,
142
- itemGap: PropTypes.number,
143
- itemMarkHeight: PropTypes.number,
144
- itemMarkWidth: PropTypes.number,
145
- labelStyle: PropTypes.object,
146
- markGap: PropTypes.number,
147
- onItemClick: PropTypes.func,
148
- padding: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
149
- bottom: PropTypes.number,
150
- left: PropTypes.number,
151
- right: PropTypes.number,
152
- top: PropTypes.number
153
- })]),
154
- position: PropTypes.shape({
155
- horizontal: PropTypes.oneOf(['left', 'middle', 'right']).isRequired,
156
- vertical: PropTypes.oneOf(['bottom', 'middle', 'top']).isRequired
157
- }),
158
- slotProps: PropTypes.object,
159
- slots: PropTypes.object
160
- }),
161
139
  /**
162
140
  * If `true`, a loading overlay is displayed.
163
141
  * @default false
@@ -193,16 +171,6 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
193
171
  * @param {ZoomData[]} zoomData Updated zoom data.
194
172
  */
195
173
  onZoomChange: PropTypes.func,
196
- /**
197
- * The chart will try to wait for the parent container to resolve its size
198
- * before it renders for the first time.
199
- *
200
- * This can be useful in some scenarios where the chart appear to grow after
201
- * the first render, like when used inside a grid.
202
- *
203
- * @default false
204
- */
205
- resolveSizeBeforeRender: PropTypes.bool,
206
174
  /**
207
175
  * Indicate which axis to display the right of the charts.
208
176
  * Can be a string (the id of the axis) or an object `ChartsYAxisProps`.
@@ -231,31 +199,12 @@ process.env.NODE_ENV !== "production" ? ScatterChartPro.propTypes = {
231
199
  slots: PropTypes.object,
232
200
  sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),
233
201
  title: PropTypes.string,
234
- /**
235
- * The configuration of the tooltip.
236
- * @see See {@link https://mui.com/x/react-charts/tooltip/ tooltip docs} for more details.
237
- * @default { trigger: 'item' }
238
- */
239
- tooltip: PropTypes.shape({
240
- axisContent: PropTypes.elementType,
241
- classes: PropTypes.object,
242
- itemContent: PropTypes.elementType,
243
- slotProps: PropTypes.object,
244
- slots: PropTypes.object,
245
- trigger: PropTypes.oneOf(['axis', 'item', 'none'])
246
- }),
247
202
  /**
248
203
  * Indicate which axis to display the top of the charts.
249
204
  * Can be a string (the id of the axis) or an object `ChartsXAxisProps`.
250
205
  * @default null
251
206
  */
252
207
  topAxis: PropTypes.oneOfType([PropTypes.object, PropTypes.string]),
253
- viewBox: PropTypes.shape({
254
- height: PropTypes.number,
255
- width: PropTypes.number,
256
- x: PropTypes.number,
257
- y: PropTypes.number
258
- }),
259
208
  /**
260
209
  * Defines the maximal distance between a scatter point and the pointer that triggers the interaction.
261
210
  * If `undefined`, the radius is assumed to be infinite.
@@ -0,0 +1,10 @@
1
+ import * as React from 'react';
2
+ import { ChartDataProviderProps } from '@mui/x-charts/internals';
3
+ import { ZoomProps } from '../ZoomProvider';
4
+ export interface ChartDataProviderProProps extends ChartDataProviderProps, ZoomProps {
5
+ }
6
+ declare function ChartDataProviderPro(props: ChartDataProviderProProps): React.JSX.Element;
7
+ declare namespace ChartDataProviderPro {
8
+ var propTypes: any;
9
+ }
10
+ export { ChartDataProviderPro };
@@ -3,27 +3,54 @@
3
3
  import _extends from "@babel/runtime/helpers/esm/extends";
4
4
  import * as React from 'react';
5
5
  import PropTypes from 'prop-types';
6
- import { Watermark } from '@mui/x-license/Watermark';
7
- import { ResizableContainer } from '@mui/x-charts/internals';
8
- import { getReleaseInfo } from "../internals/utils/releaseInfo.js";
9
- import { ChartContainerPro } from "../ChartContainerPro/index.js";
10
- import { useResponsiveChartContainerProProps } from "./useResponsiveChartContainerProProps.js";
11
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ import { DrawingAreaProvider, InteractionProvider, PluginProvider, SeriesProvider, AnimationProvider, SvgRefProvider, SizeProvider } from '@mui/x-charts/internals';
7
+ import { HighlightedProvider, ZAxisContextProvider } from '@mui/x-charts/context';
8
+ import { useLicenseVerifier } from '@mui/x-license/useLicenseVerifier';
9
+ import { getReleaseInfo } from "../../internals/utils/releaseInfo.js";
10
+ import { CartesianProviderPro } from "../CartesianProviderPro/index.js";
11
+ import { ZoomProvider } from "../ZoomProvider/index.js";
12
+ import { useChartContainerProProps } from "./useChartDataProviderProProps.js";
13
+ import { jsx as _jsx } from "react/jsx-runtime";
12
14
  const releaseInfo = getReleaseInfo();
13
- const ResponsiveChartContainerPro = /*#__PURE__*/React.forwardRef(function ResponsiveChartContainerPro(props, ref) {
15
+ function ChartDataProviderPro(props) {
14
16
  const {
15
- chartContainerProProps,
16
- resizableChartContainerProps,
17
- hasIntrinsicSize
18
- } = useResponsiveChartContainerProProps(props, ref);
19
- return /*#__PURE__*/_jsxs(ResizableContainer, _extends({}, resizableChartContainerProps, {
20
- children: [hasIntrinsicSize ? /*#__PURE__*/_jsx(ChartContainerPro, _extends({}, chartContainerProProps)) : null, /*#__PURE__*/_jsx(Watermark, {
21
- packageName: "x-charts-pro",
22
- releaseInfo: releaseInfo
23
- })]
17
+ zoomProviderProps,
18
+ drawingAreaProviderProps,
19
+ seriesProviderProps,
20
+ zAxisContextProps,
21
+ highlightedProviderProps,
22
+ cartesianProviderProps,
23
+ sizeProviderProps,
24
+ pluginProviderProps,
25
+ animationProviderProps,
26
+ children
27
+ } = useChartContainerProProps(props);
28
+ useLicenseVerifier('x-charts-pro', releaseInfo);
29
+ return /*#__PURE__*/_jsx(SizeProvider, _extends({}, sizeProviderProps, {
30
+ children: /*#__PURE__*/_jsx(DrawingAreaProvider, _extends({}, drawingAreaProviderProps, {
31
+ children: /*#__PURE__*/_jsx(AnimationProvider, _extends({}, animationProviderProps, {
32
+ children: /*#__PURE__*/_jsx(PluginProvider, _extends({}, pluginProviderProps, {
33
+ children: /*#__PURE__*/_jsx(ZoomProvider, _extends({}, zoomProviderProps, {
34
+ children: /*#__PURE__*/_jsx(SeriesProvider, _extends({}, seriesProviderProps, {
35
+ children: /*#__PURE__*/_jsx(CartesianProviderPro, _extends({}, cartesianProviderProps, {
36
+ children: /*#__PURE__*/_jsx(ZAxisContextProvider, _extends({}, zAxisContextProps, {
37
+ children: /*#__PURE__*/_jsx(InteractionProvider, {
38
+ children: /*#__PURE__*/_jsx(HighlightedProvider, _extends({}, highlightedProviderProps, {
39
+ children: /*#__PURE__*/_jsx(SvgRefProvider, {
40
+ children: children
41
+ })
42
+ }))
43
+ })
44
+ }))
45
+ }))
46
+ }))
47
+ }))
48
+ }))
49
+ }))
50
+ }))
24
51
  }));
25
- });
26
- process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes = {
52
+ }
53
+ process.env.NODE_ENV !== "production" ? ChartDataProviderPro.propTypes = {
27
54
  // ----------------------------- Warning --------------------------------
28
55
  // | These PropTypes are generated from the TypeScript type definitions |
29
56
  // | To update them edit the TypeScript types and run "pnpm proptypes" |
@@ -47,9 +74,9 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
47
74
  */
48
75
  disableAxisListener: PropTypes.bool,
49
76
  /**
50
- * The height of the chart in px. If not defined, it takes the height of the parent element.
77
+ * The height of the chart in px.
51
78
  */
52
- height: PropTypes.number,
79
+ height: PropTypes.number.isRequired,
53
80
  /**
54
81
  * The item currently highlighted. Turns highlighting into a controlled prop.
55
82
  */
@@ -86,16 +113,6 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
86
113
  * If not provided, the container supports line, bar, scatter and pie charts.
87
114
  */
88
115
  plugins: PropTypes.arrayOf(PropTypes.object),
89
- /**
90
- * The chart will try to wait for the parent container to resolve its size
91
- * before it renders for the first time.
92
- *
93
- * This can be useful in some scenarios where the chart appear to grow after
94
- * the first render, like when used inside a grid.
95
- *
96
- * @default false
97
- */
98
- resolveSizeBeforeRender: PropTypes.bool,
99
116
  /**
100
117
  * The array of series to display.
101
118
  * Each type of series has its own specificity.
@@ -116,9 +133,9 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
116
133
  y: PropTypes.number
117
134
  }),
118
135
  /**
119
- * The width of the chart in px. If not defined, it takes the width of the parent element.
136
+ * The width of the chart in px.
120
137
  */
121
- width: PropTypes.number,
138
+ width: PropTypes.number.isRequired,
122
139
  /**
123
140
  * The configuration of the x-axes.
124
141
  * If not provided, a default axis config is used.
@@ -279,4 +296,4 @@ process.env.NODE_ENV !== "production" ? ResponsiveChartContainerPro.propTypes =
279
296
  start: PropTypes.number.isRequired
280
297
  }))
281
298
  } : void 0;
282
- export { ResponsiveChartContainerPro };
299
+ export { ChartDataProviderPro };
@@ -0,0 +1 @@
1
+ export * from './ChartDataProviderPro';
@@ -0,0 +1 @@
1
+ export * from "./ChartDataProviderPro.js";
@@ -0,0 +1,14 @@
1
+ import { ZoomProviderProps } from '../ZoomProvider';
2
+ import type { ChartDataProviderProProps } from './ChartDataProviderPro';
3
+ export declare const useChartContainerProProps: (props: ChartDataProviderProProps) => {
4
+ zoomProviderProps: Omit<ZoomProviderProps, "children">;
5
+ children: import("react").ReactNode;
6
+ drawingAreaProviderProps: Omit<import("@mui/x-charts/internals").DrawingAreaProviderProps, "children">;
7
+ pluginProviderProps: Omit<import("@mui/x-charts/internals").PluginProviderProps, "children">;
8
+ seriesProviderProps: Omit<import("@mui/x-charts/internals").SeriesProviderProps, "children">;
9
+ cartesianProviderProps: Omit<import("@mui/x-charts/internals").CartesianProviderProps, "children">;
10
+ zAxisContextProps: Omit<import("@mui/x-charts").ZAxisContextProviderProps, "children">;
11
+ highlightedProviderProps: Omit<import("@mui/x-charts").HighlightedProviderProps, "children">;
12
+ sizeProviderProps: Omit<import("@mui/x-charts/internals").SizeProviderProps, "children">;
13
+ animationProviderProps: Omit<import("@mui/x-charts/internals").AnimationProviderProps, "children">;
14
+ };
@@ -0,0 +1,43 @@
1
+ 'use client';
2
+
3
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
4
+ const _excluded = ["zoom", "onZoomChange"];
5
+ import { useChartDataProviderProps } from '@mui/x-charts/internals';
6
+ export const useChartContainerProProps = props => {
7
+ const {
8
+ zoom,
9
+ onZoomChange
10
+ } = props,
11
+ baseProps = _objectWithoutPropertiesLoose(props, _excluded);
12
+ const {
13
+ children,
14
+ drawingAreaProviderProps,
15
+ seriesProviderProps,
16
+ cartesianProviderProps,
17
+ zAxisContextProps,
18
+ highlightedProviderProps,
19
+ sizeProviderProps,
20
+ pluginProviderProps,
21
+ animationProviderProps,
22
+ xAxis,
23
+ yAxis
24
+ } = useChartDataProviderProps(baseProps);
25
+ const zoomProviderProps = {
26
+ zoom,
27
+ onZoomChange,
28
+ xAxis,
29
+ yAxis
30
+ };
31
+ return {
32
+ zoomProviderProps,
33
+ children,
34
+ drawingAreaProviderProps,
35
+ pluginProviderProps,
36
+ seriesProviderProps,
37
+ cartesianProviderProps,
38
+ zAxisContextProps,
39
+ highlightedProviderProps,
40
+ sizeProviderProps,
41
+ animationProviderProps
42
+ };
43
+ };
@@ -25,6 +25,7 @@ export function ZoomProvider({
25
25
  const defaultZoomData = React.useRef(initializeZoomData(options));
26
26
  const [zoomData, setZoomData] = useControlled({
27
27
  controlled: zoom,
28
+ // eslint-disable-next-line react-compiler/react-compiler
28
29
  default: defaultZoomData.current,
29
30
  name: 'ZoomProvider',
30
31
  state: 'zoom'
package/index.d.ts CHANGED
@@ -23,7 +23,6 @@ export * from '@mui/x-charts/SparkLineChart';
23
23
  export * from '@mui/x-charts/Gauge';
24
24
  export * from '@mui/x-charts/ChartsSurface';
25
25
  export * from './Heatmap';
26
- export * from './ResponsiveChartContainerPro';
27
26
  export * from './ChartContainerPro';
28
27
  export * from './ScatterChartPro';
29
28
  export * from './BarChartPro';
package/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @mui/x-charts-pro v7.22.3
2
+ * @mui/x-charts-pro v8.0.0-alpha.1
3
3
  *
4
4
  * @license MUI X Commercial
5
5
  * This source code is licensed under the commercial license found in the
@@ -35,7 +35,6 @@ export * from '@mui/x-charts/ChartsSurface';
35
35
 
36
36
  // Pro components
37
37
  export * from "./Heatmap/index.js";
38
- export * from "./ResponsiveChartContainerPro/index.js";
39
38
  export * from "./ChartContainerPro/index.js";
40
39
  export * from "./ScatterChartPro/index.js";
41
40
  export * from "./BarChartPro/index.js";
@@ -1,6 +1,6 @@
1
1
  import { ponyfillGlobal } from '@mui/utils';
2
2
  export const getReleaseInfo = () => {
3
- const releaseInfo = "MTczMjE0MzYwMDAwMA==";
3
+ const releaseInfo = "MTczMjIzMDAwMDAwMA==";
4
4
  if (process.env.NODE_ENV !== 'production') {
5
5
  // A simple hack to set the value in the test environment (has no build step).
6
6
  // eslint-disable-next-line no-useless-concat
@@ -1,4 +1,5 @@
1
- import { DefaultizedProps, CommonDefaultizedProps, CommonSeriesType, CartesianSeriesType } from '@mui/x-charts/internals';
1
+ import { DefaultizedProps } from '@mui/x-internals/types';
2
+ import { CommonDefaultizedProps, CommonSeriesType, CartesianSeriesType } from '@mui/x-charts/internals';
2
3
  export type HeatmapValueType = [number, number, number];
3
4
  export interface HeatmapSeriesType extends Omit<CommonSeriesType<HeatmapValueType>, 'color'>, CartesianSeriesType {
4
5
  type: 'heatmap';