@mui/x-charts-premium 9.3.0 → 9.4.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 (176) hide show
  1. package/BarChartPremium/BarChartPremium.js +35 -5
  2. package/BarChartPremium/BarChartPremium.mjs +35 -5
  3. package/BarChartPremium/RangeBar/RangeBarPlot.d.mts +10 -0
  4. package/BarChartPremium/RangeBar/RangeBarPlot.d.ts +10 -0
  5. package/BarChartPremium/RangeBar/RangeBarPlot.js +59 -2
  6. package/BarChartPremium/RangeBar/RangeBarPlot.mjs +59 -2
  7. package/BarChartPremium/RangeBar/RangeBarWebGLPlot.d.mts +10 -0
  8. package/BarChartPremium/RangeBar/RangeBarWebGLPlot.d.ts +10 -0
  9. package/BarChartPremium/RangeBar/RangeBarWebGLPlot.js +82 -0
  10. package/BarChartPremium/RangeBar/RangeBarWebGLPlot.mjs +76 -0
  11. package/BarChartPremium/RangeBar/seriesConfig/extrema.js +3 -0
  12. package/BarChartPremium/RangeBar/seriesConfig/extrema.mjs +3 -0
  13. package/BarChartPremium/RangeBar/seriesConfig/seriesProcessor.js +2 -2
  14. package/BarChartPremium/RangeBar/seriesConfig/seriesProcessor.mjs +2 -2
  15. package/BarChartPremium/useBarChartPremiumProps.js +2 -1
  16. package/BarChartPremium/useBarChartPremiumProps.mjs +2 -1
  17. package/BarChartPremium/webgl/useBarWebGLPlotData.d.mts +2 -7
  18. package/BarChartPremium/webgl/useBarWebGLPlotData.d.ts +2 -7
  19. package/BarChartPremium/webgl/useBarWebGLPlotData.js +4 -151
  20. package/BarChartPremium/webgl/useBarWebGLPlotData.mjs +4 -150
  21. package/BarChartPremium/webgl/useWebGLBarLikePlotData.d.mts +39 -0
  22. package/BarChartPremium/webgl/useWebGLBarLikePlotData.d.ts +39 -0
  23. package/BarChartPremium/webgl/useWebGLBarLikePlotData.js +169 -0
  24. package/BarChartPremium/webgl/useWebGLBarLikePlotData.mjs +163 -0
  25. package/CHANGELOG.md +196 -0
  26. package/CandlestickChart/CandlestickChart.js +11 -2
  27. package/CandlestickChart/CandlestickChart.mjs +11 -2
  28. package/CandlestickChart/seriesConfig/extrema.js +3 -0
  29. package/CandlestickChart/seriesConfig/extrema.mjs +3 -0
  30. package/CandlestickChart/seriesConfig/seriesProcessor.js +2 -2
  31. package/CandlestickChart/seriesConfig/seriesProcessor.mjs +2 -2
  32. package/ChartsDataProviderPremium/ChartsDataProviderPremium.js +2 -2
  33. package/ChartsDataProviderPremium/ChartsDataProviderPremium.mjs +2 -2
  34. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.d.mts +35 -0
  35. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.d.ts +35 -0
  36. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.js +125 -0
  37. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.mjs +119 -0
  38. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.d.mts +5 -0
  39. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.d.ts +5 -0
  40. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.js +10 -0
  41. package/ChartsGeoDataProviderPremium/ChartsGeoDataProviderPremium.plugins.mjs +4 -0
  42. package/ChartsGeoDataProviderPremium/index.d.mts +3 -0
  43. package/ChartsGeoDataProviderPremium/index.d.ts +3 -0
  44. package/ChartsGeoDataProviderPremium/index.js +20 -0
  45. package/ChartsGeoDataProviderPremium/index.mjs +3 -0
  46. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.d.mts +10 -0
  47. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.d.ts +10 -0
  48. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.js +49 -0
  49. package/ChartsGeoDataProviderPremium/useChartsGeoDataProviderPremiumProps.mjs +42 -0
  50. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.js +2 -2
  51. package/ChartsRadialDataProviderPremium/ChartsRadialDataProviderPremium.mjs +2 -2
  52. package/HeatmapPremium/HeatmapPremium.js +32 -2
  53. package/HeatmapPremium/HeatmapPremium.mjs +32 -2
  54. package/Map/FocusedMapShape.d.mts +4 -0
  55. package/Map/FocusedMapShape.d.ts +4 -0
  56. package/Map/FocusedMapShape.js +66 -0
  57. package/Map/FocusedMapShape.mjs +60 -0
  58. package/Map/GeoDataPlot.d.mts +26 -0
  59. package/Map/GeoDataPlot.d.ts +26 -0
  60. package/Map/GeoDataPlot.js +65 -0
  61. package/Map/GeoDataPlot.mjs +60 -0
  62. package/Map/Graticule.d.mts +1 -0
  63. package/Map/Graticule.d.ts +1 -0
  64. package/Map/Graticule.js +30 -0
  65. package/Map/Graticule.mjs +24 -0
  66. package/Map/MapShape.d.mts +10 -0
  67. package/Map/MapShape.d.ts +10 -0
  68. package/Map/MapShape.js +55 -0
  69. package/Map/MapShape.mjs +49 -0
  70. package/Map/MapShapePlot.d.mts +21 -0
  71. package/Map/MapShapePlot.d.ts +21 -0
  72. package/Map/MapShapePlot.js +86 -0
  73. package/Map/MapShapePlot.mjs +80 -0
  74. package/Map/index.d.mts +7 -0
  75. package/Map/index.d.ts +7 -0
  76. package/Map/index.js +60 -0
  77. package/Map/index.mjs +8 -0
  78. package/Map/seriesConfig/descriptionGetter.d.mts +3 -0
  79. package/Map/seriesConfig/descriptionGetter.d.ts +3 -0
  80. package/Map/seriesConfig/descriptionGetter.js +19 -0
  81. package/Map/seriesConfig/descriptionGetter.mjs +13 -0
  82. package/Map/seriesConfig/getColor.d.mts +3 -0
  83. package/Map/seriesConfig/getColor.d.ts +3 -0
  84. package/Map/seriesConfig/getColor.js +35 -0
  85. package/Map/seriesConfig/getColor.mjs +29 -0
  86. package/Map/seriesConfig/getSeriesWithDefaultValues.d.mts +3 -0
  87. package/Map/seriesConfig/getSeriesWithDefaultValues.d.ts +3 -0
  88. package/Map/seriesConfig/getSeriesWithDefaultValues.js +15 -0
  89. package/Map/seriesConfig/getSeriesWithDefaultValues.mjs +8 -0
  90. package/Map/seriesConfig/index.d.mts +2 -0
  91. package/Map/seriesConfig/index.d.ts +2 -0
  92. package/Map/seriesConfig/index.js +28 -0
  93. package/Map/seriesConfig/index.mjs +21 -0
  94. package/Map/seriesConfig/keyboardFocusHandler.d.mts +9 -0
  95. package/Map/seriesConfig/keyboardFocusHandler.d.ts +9 -0
  96. package/Map/seriesConfig/keyboardFocusHandler.js +19 -0
  97. package/Map/seriesConfig/keyboardFocusHandler.mjs +13 -0
  98. package/Map/seriesConfig/legend.d.mts +3 -0
  99. package/Map/seriesConfig/legend.d.ts +3 -0
  100. package/Map/seriesConfig/legend.js +28 -0
  101. package/Map/seriesConfig/legend.mjs +22 -0
  102. package/Map/seriesConfig/seriesProcessor.d.mts +3 -0
  103. package/Map/seriesConfig/seriesProcessor.d.ts +3 -0
  104. package/Map/seriesConfig/seriesProcessor.js +66 -0
  105. package/Map/seriesConfig/seriesProcessor.mjs +59 -0
  106. package/Map/seriesConfig/tooltip.d.mts +3 -0
  107. package/Map/seriesConfig/tooltip.d.ts +3 -0
  108. package/Map/seriesConfig/tooltip.js +33 -0
  109. package/Map/seriesConfig/tooltip.mjs +27 -0
  110. package/RadialLineChart/RadialLineHighlightPlot.d.mts +3 -2
  111. package/RadialLineChart/RadialLineHighlightPlot.d.ts +3 -2
  112. package/ScatterChartPremium/ScatterChartPremium.d.mts +2 -1
  113. package/ScatterChartPremium/ScatterChartPremium.d.ts +2 -1
  114. package/ScatterChartPremium/ScatterChartPremium.js +32 -2
  115. package/ScatterChartPremium/ScatterChartPremium.mjs +32 -2
  116. package/hooks/index.d.mts +4 -1
  117. package/hooks/index.d.ts +4 -1
  118. package/hooks/index.js +33 -0
  119. package/hooks/index.mjs +4 -1
  120. package/hooks/useGeoData.d.mts +6 -0
  121. package/hooks/useGeoData.d.ts +6 -0
  122. package/hooks/useGeoData.js +17 -0
  123. package/hooks/useGeoData.mjs +13 -0
  124. package/hooks/useGeoFeatureIndexesByName.d.mts +7 -0
  125. package/hooks/useGeoFeatureIndexesByName.d.ts +7 -0
  126. package/hooks/useGeoFeatureIndexesByName.js +19 -0
  127. package/hooks/useGeoFeatureIndexesByName.mjs +15 -0
  128. package/hooks/useGeoPath.d.mts +6 -0
  129. package/hooks/useGeoPath.d.ts +6 -0
  130. package/hooks/useGeoPath.js +17 -0
  131. package/hooks/useGeoPath.mjs +13 -0
  132. package/hooks/useMapShapeSeries.d.mts +34 -0
  133. package/hooks/useMapShapeSeries.d.ts +34 -0
  134. package/hooks/useMapShapeSeries.js +45 -0
  135. package/hooks/useMapShapeSeries.mjs +40 -0
  136. package/index.d.mts +2 -0
  137. package/index.d.ts +2 -0
  138. package/index.js +25 -1
  139. package/index.mjs +3 -1
  140. package/internals/plugins/useGeoProjection/index.d.mts +3 -0
  141. package/internals/plugins/useGeoProjection/index.d.ts +3 -0
  142. package/internals/plugins/useGeoProjection/index.js +38 -0
  143. package/internals/plugins/useGeoProjection/index.mjs +3 -0
  144. package/internals/plugins/useGeoProjection/useGeoProjection.d.mts +3 -0
  145. package/internals/plugins/useGeoProjection/useGeoProjection.d.ts +3 -0
  146. package/internals/plugins/useGeoProjection/useGeoProjection.js +58 -0
  147. package/internals/plugins/useGeoProjection/useGeoProjection.mjs +50 -0
  148. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.d.mts +39 -0
  149. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.d.ts +39 -0
  150. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.js +135 -0
  151. package/internals/plugins/useGeoProjection/useGeoProjection.selectors.mjs +128 -0
  152. package/internals/plugins/useGeoProjection/useGeoProjection.types.d.mts +55 -0
  153. package/internals/plugins/useGeoProjection/useGeoProjection.types.d.ts +55 -0
  154. package/internals/plugins/useGeoProjection/useGeoProjection.types.js +5 -0
  155. package/internals/plugins/useGeoProjection/useGeoProjection.types.mjs +1 -0
  156. package/models/chartsSlotsComponentsPropsPremium.d.mts +1 -0
  157. package/models/chartsSlotsComponentsPropsPremium.d.ts +1 -0
  158. package/models/chartsSlotsComponentsPropsPremium.js +5 -0
  159. package/models/chartsSlotsComponentsPropsPremium.mjs +1 -0
  160. package/models/index.d.mts +2 -1
  161. package/models/index.d.ts +2 -1
  162. package/models/index.js +11 -0
  163. package/models/index.mjs +2 -1
  164. package/models/seriesType/index.d.mts +2 -1
  165. package/models/seriesType/index.d.ts +2 -1
  166. package/models/seriesType/index.js +11 -0
  167. package/models/seriesType/index.mjs +2 -1
  168. package/models/seriesType/mapShape.d.mts +105 -0
  169. package/models/seriesType/mapShape.d.ts +105 -0
  170. package/models/seriesType/mapShape.js +5 -0
  171. package/models/seriesType/mapShape.mjs +1 -0
  172. package/package.json +35 -7
  173. package/typeOverloads/modules.d.mts +16 -1
  174. package/typeOverloads/modules.d.ts +16 -1
  175. package/utils/webgl/useWebGLResizeObserver.js +3 -3
  176. package/utils/webgl/useWebGLResizeObserver.mjs +2 -2
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
6
+ Object.defineProperty(exports, "__esModule", {
7
+ value: true
8
+ });
9
+ exports.ChartsGeoDataProviderPremium = ChartsGeoDataProviderPremium;
10
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
+ var React = _interopRequireWildcard(require("react"));
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
+ var _internals = require("@mui/x-charts/internals");
14
+ var _ChartsLocalizationProvider = require("@mui/x-charts/ChartsLocalizationProvider");
15
+ var _internals2 = require("@mui/x-charts-pro/internals");
16
+ var _internals3 = require("@mui/x-license/internals");
17
+ var _useChartsGeoDataProviderPremiumProps = require("./useChartsGeoDataProviderPremiumProps");
18
+ var _ChartsGeoDataProviderPremium = require("./ChartsGeoDataProviderPremium.plugins");
19
+ var _jsxRuntime = require("react/jsx-runtime");
20
+ const packageInfo = {
21
+ releaseDate: "MTc4MDUzMTIwMDAwMA==",
22
+ version: "9.4.0",
23
+ name: 'x-charts-premium'
24
+ };
25
+ /**
26
+ * Orchestrates the data providers for geographic chart components and hooks.
27
+ *
28
+ * Similar to `ChartsDataProviderPremium`, but tailored to map / geo series.
29
+ *
30
+ * Demos:
31
+ *
32
+ * - [Map](https://mui.com/x/react-charts/map/)
33
+ *
34
+ * API:
35
+ *
36
+ * - [ChartsGeoDataProviderPremium API](https://mui.com/x/api/charts/charts-geo-data-provider-premium/)
37
+ */
38
+ function ChartsGeoDataProviderPremium(props) {
39
+ const {
40
+ children,
41
+ localeText,
42
+ chartProviderProps,
43
+ slots,
44
+ slotProps
45
+ } = (0, _useChartsGeoDataProviderPremiumProps.useChartsGeoDataProviderPremiumProps)((0, _extends2.default)({}, props, {
46
+ plugins: props.plugins ?? _ChartsGeoDataProviderPremium.GEO_PREMIUM_PLUGINS
47
+ }));
48
+ (0, _internals3.useLicenseVerifier)(packageInfo);
49
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_internals.ChartsProvider, (0, _extends2.default)({}, chartProviderProps, {
50
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ChartsLocalizationProvider.ChartsLocalizationProvider, {
51
+ localeText: localeText,
52
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals.ChartsSlotsProvider, {
53
+ slots: slots,
54
+ slotProps: slotProps,
55
+ defaultSlots: _internals2.defaultSlotsMaterial,
56
+ children: children
57
+ })
58
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_internals2.ChartsWatermark, {
59
+ packageInfo: packageInfo
60
+ })]
61
+ }));
62
+ }
63
+ process.env.NODE_ENV !== "production" ? ChartsGeoDataProviderPremium.propTypes = {
64
+ // ----------------------------- Warning --------------------------------
65
+ // | These PropTypes are generated from the TypeScript type definitions |
66
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
67
+ // ----------------------------------------------------------------------
68
+ apiRef: _propTypes.default.shape({
69
+ current: _propTypes.default.any
70
+ }),
71
+ /**
72
+ * Color palette used to colorize multiple series.
73
+ * @default rainbowSurgePalette
74
+ */
75
+ colors: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.string), _propTypes.default.func]),
76
+ /**
77
+ * The height of the chart in px. If not defined, it takes the height of the parent element.
78
+ */
79
+ height: _propTypes.default.number,
80
+ /**
81
+ * This prop is used to help implement the accessibility logic.
82
+ * If you don't provide this prop. It falls back to a randomly generated id.
83
+ */
84
+ id: _propTypes.default.string,
85
+ /**
86
+ * Localized text for chart components.
87
+ */
88
+ localeText: _propTypes.default.object,
89
+ /**
90
+ * The margin between the SVG and the drawing area.
91
+ * It's used for leaving some space for extra information such as the x- and y-axis or legend.
92
+ *
93
+ * Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
94
+ */
95
+ margin: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.shape({
96
+ bottom: _propTypes.default.number,
97
+ left: _propTypes.default.number,
98
+ right: _propTypes.default.number,
99
+ top: _propTypes.default.number
100
+ })]),
101
+ /**
102
+ * The array of series to display.
103
+ * Each type of series has its own specificity.
104
+ * Please refer to the appropriate docs page to learn more about it.
105
+ */
106
+ series: _propTypes.default.arrayOf(_propTypes.default.object),
107
+ /**
108
+ * If `true`, animations are skipped.
109
+ * If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
110
+ */
111
+ skipAnimation: _propTypes.default.bool,
112
+ /**
113
+ * The props for the slots.
114
+ */
115
+ slotProps: _propTypes.default.object,
116
+ /**
117
+ * Slots to customize charts' components.
118
+ */
119
+ slots: _propTypes.default.object,
120
+ theme: _propTypes.default.oneOf(['dark', 'light']),
121
+ /**
122
+ * The width of the chart in px. If not defined, it takes the width of the parent element.
123
+ */
124
+ width: _propTypes.default.number
125
+ } : void 0;
@@ -0,0 +1,119 @@
1
+ 'use client';
2
+
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import * as React from 'react';
5
+ import PropTypes from 'prop-types';
6
+ import { ChartsProvider, ChartsSlotsProvider } from '@mui/x-charts/internals';
7
+ import { ChartsLocalizationProvider } from '@mui/x-charts/ChartsLocalizationProvider';
8
+ import { ChartsWatermark, defaultSlotsMaterial } from '@mui/x-charts-pro/internals';
9
+ import { useLicenseVerifier } from '@mui/x-license/internals';
10
+ import { useChartsGeoDataProviderPremiumProps } from "./useChartsGeoDataProviderPremiumProps.mjs";
11
+ import { GEO_PREMIUM_PLUGINS } from "./ChartsGeoDataProviderPremium.plugins.mjs";
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ const packageInfo = {
14
+ releaseDate: "MTc4MDUzMTIwMDAwMA==",
15
+ version: "9.4.0",
16
+ name: 'x-charts-premium'
17
+ };
18
+ /**
19
+ * Orchestrates the data providers for geographic chart components and hooks.
20
+ *
21
+ * Similar to `ChartsDataProviderPremium`, but tailored to map / geo series.
22
+ *
23
+ * Demos:
24
+ *
25
+ * - [Map](https://mui.com/x/react-charts/map/)
26
+ *
27
+ * API:
28
+ *
29
+ * - [ChartsGeoDataProviderPremium API](https://mui.com/x/api/charts/charts-geo-data-provider-premium/)
30
+ */
31
+ function ChartsGeoDataProviderPremium(props) {
32
+ const {
33
+ children,
34
+ localeText,
35
+ chartProviderProps,
36
+ slots,
37
+ slotProps
38
+ } = useChartsGeoDataProviderPremiumProps(_extends({}, props, {
39
+ plugins: props.plugins ?? GEO_PREMIUM_PLUGINS
40
+ }));
41
+ useLicenseVerifier(packageInfo);
42
+ return /*#__PURE__*/_jsxs(ChartsProvider, _extends({}, chartProviderProps, {
43
+ children: [/*#__PURE__*/_jsx(ChartsLocalizationProvider, {
44
+ localeText: localeText,
45
+ children: /*#__PURE__*/_jsx(ChartsSlotsProvider, {
46
+ slots: slots,
47
+ slotProps: slotProps,
48
+ defaultSlots: defaultSlotsMaterial,
49
+ children: children
50
+ })
51
+ }), /*#__PURE__*/_jsx(ChartsWatermark, {
52
+ packageInfo: packageInfo
53
+ })]
54
+ }));
55
+ }
56
+ process.env.NODE_ENV !== "production" ? ChartsGeoDataProviderPremium.propTypes = {
57
+ // ----------------------------- Warning --------------------------------
58
+ // | These PropTypes are generated from the TypeScript type definitions |
59
+ // | To update them edit the TypeScript types and run "pnpm proptypes" |
60
+ // ----------------------------------------------------------------------
61
+ apiRef: PropTypes.shape({
62
+ current: PropTypes.any
63
+ }),
64
+ /**
65
+ * Color palette used to colorize multiple series.
66
+ * @default rainbowSurgePalette
67
+ */
68
+ colors: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.string), PropTypes.func]),
69
+ /**
70
+ * The height of the chart in px. If not defined, it takes the height of the parent element.
71
+ */
72
+ height: PropTypes.number,
73
+ /**
74
+ * This prop is used to help implement the accessibility logic.
75
+ * If you don't provide this prop. It falls back to a randomly generated id.
76
+ */
77
+ id: PropTypes.string,
78
+ /**
79
+ * Localized text for chart components.
80
+ */
81
+ localeText: PropTypes.object,
82
+ /**
83
+ * The margin between the SVG and the drawing area.
84
+ * It's used for leaving some space for extra information such as the x- and y-axis or legend.
85
+ *
86
+ * Accepts a `number` to be used on all sides or an object with the optional properties: `top`, `bottom`, `left`, and `right`.
87
+ */
88
+ margin: PropTypes.oneOfType([PropTypes.number, PropTypes.shape({
89
+ bottom: PropTypes.number,
90
+ left: PropTypes.number,
91
+ right: PropTypes.number,
92
+ top: PropTypes.number
93
+ })]),
94
+ /**
95
+ * The array of series to display.
96
+ * Each type of series has its own specificity.
97
+ * Please refer to the appropriate docs page to learn more about it.
98
+ */
99
+ series: PropTypes.arrayOf(PropTypes.object),
100
+ /**
101
+ * If `true`, animations are skipped.
102
+ * If unset or `false`, the animations respects the user's `prefers-reduced-motion` setting.
103
+ */
104
+ skipAnimation: PropTypes.bool,
105
+ /**
106
+ * The props for the slots.
107
+ */
108
+ slotProps: PropTypes.object,
109
+ /**
110
+ * Slots to customize charts' components.
111
+ */
112
+ slots: PropTypes.object,
113
+ theme: PropTypes.oneOf(['dark', 'light']),
114
+ /**
115
+ * The width of the chart in px. If not defined, it takes the width of the parent element.
116
+ */
117
+ width: PropTypes.number
118
+ } : void 0;
119
+ export { ChartsGeoDataProviderPremium };
@@ -0,0 +1,5 @@
1
+ import { type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type UseChartKeyboardNavigationSignature, type UseChartVisibilityManagerSignature, type UseChartZAxisSignature, type ChartSeriesType } from '@mui/x-charts/internals';
2
+ import { type UseChartProExportSignature } from '@mui/x-charts-pro/plugins';
3
+ import { type UseGeoProjectionSignature } from "../internals/plugins/useGeoProjection/index.mjs";
4
+ export declare const GEO_PREMIUM_PLUGINS: readonly [import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature>, import("@mui/x-charts/internals").ChartPlugin<UseChartTooltipSignature<any>>, import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature>, import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature<any>>, import("@mui/x-charts/internals").ChartPlugin<UseChartKeyboardNavigationSignature>, import("@mui/x-charts/internals").ChartPlugin<UseChartVisibilityManagerSignature<any>>, import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature>, import("@mui/x-charts/internals").ChartPlugin<UseGeoProjectionSignature>];
5
+ export type GeoPremiumPluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartHighlightSignature<SeriesType>, UseChartKeyboardNavigationSignature, UseChartVisibilityManagerSignature<SeriesType>, UseChartProExportSignature, UseGeoProjectionSignature];
@@ -0,0 +1,5 @@
1
+ import { type UseChartTooltipSignature, type UseChartInteractionSignature, type UseChartHighlightSignature, type UseChartKeyboardNavigationSignature, type UseChartVisibilityManagerSignature, type UseChartZAxisSignature, type ChartSeriesType } from '@mui/x-charts/internals';
2
+ import { type UseChartProExportSignature } from '@mui/x-charts-pro/plugins';
3
+ import { type UseGeoProjectionSignature } from "../internals/plugins/useGeoProjection/index.js";
4
+ export declare const GEO_PREMIUM_PLUGINS: readonly [import("@mui/x-charts/internals").ChartPlugin<UseChartZAxisSignature>, import("@mui/x-charts/internals").ChartPlugin<UseChartTooltipSignature<any>>, import("@mui/x-charts/internals").ChartPlugin<UseChartInteractionSignature>, import("@mui/x-charts/internals").ChartPlugin<UseChartHighlightSignature<any>>, import("@mui/x-charts/internals").ChartPlugin<UseChartKeyboardNavigationSignature>, import("@mui/x-charts/internals").ChartPlugin<UseChartVisibilityManagerSignature<any>>, import("@mui/x-charts/internals").ChartPlugin<UseChartProExportSignature>, import("@mui/x-charts/internals").ChartPlugin<UseGeoProjectionSignature>];
5
+ export type GeoPremiumPluginSignatures<SeriesType extends ChartSeriesType = ChartSeriesType> = [UseChartZAxisSignature, UseChartTooltipSignature<SeriesType>, UseChartInteractionSignature, UseChartHighlightSignature<SeriesType>, UseChartKeyboardNavigationSignature, UseChartVisibilityManagerSignature<SeriesType>, UseChartProExportSignature, UseGeoProjectionSignature];
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.GEO_PREMIUM_PLUGINS = void 0;
7
+ var _internals = require("@mui/x-charts/internals");
8
+ var _plugins = require("@mui/x-charts-pro/plugins");
9
+ var _useGeoProjection = require("../internals/plugins/useGeoProjection");
10
+ const GEO_PREMIUM_PLUGINS = exports.GEO_PREMIUM_PLUGINS = [_internals.useChartZAxis, _internals.useChartTooltip, _internals.useChartInteraction, _internals.useChartHighlight, _internals.useChartKeyboardNavigation, _internals.useChartVisibilityManager, _plugins.useChartProExport, _useGeoProjection.useGeoProjection];
@@ -0,0 +1,4 @@
1
+ import { useChartTooltip, useChartInteraction, useChartHighlight, useChartKeyboardNavigation, useChartVisibilityManager, useChartZAxis } from '@mui/x-charts/internals';
2
+ import { useChartProExport } from '@mui/x-charts-pro/plugins';
3
+ import { useGeoProjection } from "../internals/plugins/useGeoProjection/index.mjs";
4
+ export const GEO_PREMIUM_PLUGINS = [useChartZAxis, useChartTooltip, useChartInteraction, useChartHighlight, useChartKeyboardNavigation, useChartVisibilityManager, useChartProExport, useGeoProjection];
@@ -0,0 +1,3 @@
1
+ import "../typeOverloads/index.mjs";
2
+ export { ChartsGeoDataProviderPremium as Unstable_ChartsGeoDataProviderPremium, type ChartsGeoDataProviderPremiumProps, type ChartsGeoDataProviderPremiumSlots, type ChartsGeoDataProviderPremiumSlotProps } from "./ChartsGeoDataProviderPremium.mjs";
3
+ export { GEO_PREMIUM_PLUGINS, type GeoPremiumPluginSignatures } from "./ChartsGeoDataProviderPremium.plugins.mjs";
@@ -0,0 +1,3 @@
1
+ import "../typeOverloads/index.js";
2
+ export { ChartsGeoDataProviderPremium as Unstable_ChartsGeoDataProviderPremium, type ChartsGeoDataProviderPremiumProps, type ChartsGeoDataProviderPremiumSlots, type ChartsGeoDataProviderPremiumSlotProps } from "./ChartsGeoDataProviderPremium.js";
3
+ export { GEO_PREMIUM_PLUGINS, type GeoPremiumPluginSignatures } from "./ChartsGeoDataProviderPremium.plugins.js";
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "GEO_PREMIUM_PLUGINS", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _ChartsGeoDataProviderPremium2.GEO_PREMIUM_PLUGINS;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "Unstable_ChartsGeoDataProviderPremium", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _ChartsGeoDataProviderPremium.ChartsGeoDataProviderPremium;
16
+ }
17
+ });
18
+ require("../typeOverloads");
19
+ var _ChartsGeoDataProviderPremium = require("./ChartsGeoDataProviderPremium");
20
+ var _ChartsGeoDataProviderPremium2 = require("./ChartsGeoDataProviderPremium.plugins");
@@ -0,0 +1,3 @@
1
+ import "../typeOverloads/index.mjs";
2
+ export { ChartsGeoDataProviderPremium as Unstable_ChartsGeoDataProviderPremium } from "./ChartsGeoDataProviderPremium.mjs";
3
+ export { GEO_PREMIUM_PLUGINS } from "./ChartsGeoDataProviderPremium.plugins.mjs";
@@ -0,0 +1,10 @@
1
+ import { type ChartAnyPluginSignature, type ChartSeriesType, type ChartsProviderProps } from '@mui/x-charts/internals';
2
+ import type { ChartsGeoDataProviderPremiumProps } from "./ChartsGeoDataProviderPremium.mjs";
3
+ import { type GeoPremiumPluginSignatures } from "./ChartsGeoDataProviderPremium.plugins.mjs";
4
+ export declare const useChartsGeoDataProviderPremiumProps: <SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = GeoPremiumPluginSignatures<SeriesType>>(inProps: ChartsGeoDataProviderPremiumProps<SeriesType, TSignatures>) => {
5
+ children: import("react").ReactNode;
6
+ localeText: Partial<import("@mui/x-charts/locales").ChartsLocaleText> | undefined;
7
+ chartProviderProps: ChartsProviderProps<SeriesType, TSignatures>;
8
+ slots: Partial<import("./ChartsGeoDataProviderPremium.mjs").ChartsGeoDataProviderPremiumSlots> | undefined;
9
+ slotProps: Partial<import("./ChartsGeoDataProviderPremium.mjs").ChartsGeoDataProviderPremiumSlotProps> | undefined;
10
+ };
@@ -0,0 +1,10 @@
1
+ import { type ChartAnyPluginSignature, type ChartSeriesType, type ChartsProviderProps } from '@mui/x-charts/internals';
2
+ import type { ChartsGeoDataProviderPremiumProps } from "./ChartsGeoDataProviderPremium.js";
3
+ import { type GeoPremiumPluginSignatures } from "./ChartsGeoDataProviderPremium.plugins.js";
4
+ export declare const useChartsGeoDataProviderPremiumProps: <SeriesType extends ChartSeriesType = ChartSeriesType, TSignatures extends readonly ChartAnyPluginSignature[] = GeoPremiumPluginSignatures<SeriesType>>(inProps: ChartsGeoDataProviderPremiumProps<SeriesType, TSignatures>) => {
5
+ children: import("react").ReactNode;
6
+ localeText: Partial<import("@mui/x-charts/locales").ChartsLocaleText> | undefined;
7
+ chartProviderProps: ChartsProviderProps<SeriesType, TSignatures>;
8
+ slots: Partial<import("./ChartsGeoDataProviderPremium.js").ChartsGeoDataProviderPremiumSlots> | undefined;
9
+ slotProps: Partial<import("./ChartsGeoDataProviderPremium.js").ChartsGeoDataProviderPremiumSlotProps> | undefined;
10
+ };
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.useChartsGeoDataProviderPremiumProps = void 0;
9
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
10
+ var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
11
+ var _styles = require("@mui/material/styles");
12
+ var _ChartsGeoDataProviderPremium = require("./ChartsGeoDataProviderPremium.plugins");
13
+ var _seriesConfig = require("../Map/seriesConfig");
14
+ const _excluded = ["children", "localeText", "plugins", "slots", "slotProps", "seriesConfig"];
15
+ const GEO_PREMIUM_SERIES_CONFIG = {
16
+ mapShape: _seriesConfig.mapShapeSeriesConfig
17
+ };
18
+ const useChartsGeoDataProviderPremiumProps = inProps => {
19
+ // eslint-disable-next-line mui/material-ui-name-matches-component-name
20
+ const props = (0, _styles.useThemeProps)({
21
+ props: inProps,
22
+ name: 'MuiChartsGeoDataProviderPremium'
23
+ });
24
+ const {
25
+ children,
26
+ localeText,
27
+ plugins = _ChartsGeoDataProviderPremium.GEO_PREMIUM_PLUGINS,
28
+ slots,
29
+ slotProps,
30
+ seriesConfig = GEO_PREMIUM_SERIES_CONFIG
31
+ } = props,
32
+ other = (0, _objectWithoutPropertiesLoose2.default)(props, _excluded);
33
+ const theme = (0, _styles.useTheme)();
34
+ const chartProviderProps = {
35
+ plugins: plugins,
36
+ pluginParams: (0, _extends2.default)({
37
+ theme: theme.palette.mode,
38
+ seriesConfig
39
+ }, other)
40
+ };
41
+ return {
42
+ children,
43
+ localeText,
44
+ chartProviderProps,
45
+ slots,
46
+ slotProps
47
+ };
48
+ };
49
+ exports.useChartsGeoDataProviderPremiumProps = useChartsGeoDataProviderPremiumProps;
@@ -0,0 +1,42 @@
1
+ 'use client';
2
+
3
+ import _extends from "@babel/runtime/helpers/esm/extends";
4
+ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/esm/objectWithoutPropertiesLoose";
5
+ const _excluded = ["children", "localeText", "plugins", "slots", "slotProps", "seriesConfig"];
6
+ import { useTheme, useThemeProps } from '@mui/material/styles';
7
+ import { GEO_PREMIUM_PLUGINS } from "./ChartsGeoDataProviderPremium.plugins.mjs";
8
+ import { mapShapeSeriesConfig } from "../Map/seriesConfig/index.mjs";
9
+ const GEO_PREMIUM_SERIES_CONFIG = {
10
+ mapShape: mapShapeSeriesConfig
11
+ };
12
+ export const useChartsGeoDataProviderPremiumProps = inProps => {
13
+ // eslint-disable-next-line mui/material-ui-name-matches-component-name
14
+ const props = useThemeProps({
15
+ props: inProps,
16
+ name: 'MuiChartsGeoDataProviderPremium'
17
+ });
18
+ const {
19
+ children,
20
+ localeText,
21
+ plugins = GEO_PREMIUM_PLUGINS,
22
+ slots,
23
+ slotProps,
24
+ seriesConfig = GEO_PREMIUM_SERIES_CONFIG
25
+ } = props,
26
+ other = _objectWithoutPropertiesLoose(props, _excluded);
27
+ const theme = useTheme();
28
+ const chartProviderProps = {
29
+ plugins: plugins,
30
+ pluginParams: _extends({
31
+ theme: theme.palette.mode,
32
+ seriesConfig
33
+ }, other)
34
+ };
35
+ return {
36
+ children,
37
+ localeText,
38
+ chartProviderProps,
39
+ slots,
40
+ slotProps
41
+ };
42
+ };
@@ -19,8 +19,8 @@ var _ChartsRadialDataProviderPremium = require("./ChartsRadialDataProviderPremiu
19
19
  var _seriesConfig = require("../RadialLineChart/seriesConfig");
20
20
  var _jsxRuntime = require("react/jsx-runtime");
21
21
  const packageInfo = {
22
- releaseDate: "MTc3OTMyMTYwMDAwMA==",
23
- version: "9.3.0",
22
+ releaseDate: "MTc4MDUzMTIwMDAwMA==",
23
+ version: "9.4.0",
24
24
  name: 'x-charts-premium'
25
25
  };
26
26
  const defaultRadialPremiumSeriesConfig = {
@@ -12,8 +12,8 @@ import { RADIAL_PREMIUM_PLUGINS } from "./ChartsRadialDataProviderPremium.plugin
12
12
  import { radialLineSeriesConfig } from "../RadialLineChart/seriesConfig/index.mjs";
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  const packageInfo = {
15
- releaseDate: "MTc3OTMyMTYwMDAwMA==",
16
- version: "9.3.0",
15
+ releaseDate: "MTc4MDUzMTIwMDAwMA==",
16
+ version: "9.4.0",
17
17
  name: 'x-charts-premium'
18
18
  };
19
19
  const defaultRadialPremiumSeriesConfig = {
@@ -154,12 +154,21 @@ process.env.NODE_ENV !== "production" ? HeatmapPremium.propTypes = {
154
154
  /**
155
155
  * The list of zoom data related to each axis.
156
156
  * Used to initialize the zoom in a specific configuration without controlling it.
157
+ *
158
+ * Each entry is either explicit zoom percentages (`{ axisId, start, end }`) or a
159
+ * range value (`{ axisId, value }`) resolved against the axis domain.
157
160
  */
158
- initialZoom: _propTypes.default.arrayOf(_propTypes.default.shape({
161
+ initialZoom: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.shape({
159
162
  axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
160
163
  end: _propTypes.default.number.isRequired,
161
164
  start: _propTypes.default.number.isRequired
162
- })),
165
+ }), _propTypes.default.shape({
166
+ axisId: _propTypes.default.oneOfType([_propTypes.default.number, _propTypes.default.string]).isRequired,
167
+ value: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.instanceOf(Date).isRequired), _propTypes.default.arrayOf(_propTypes.default.string.isRequired), _propTypes.default.func, _propTypes.default.shape({
168
+ step: _propTypes.default.number,
169
+ unit: _propTypes.default.oneOf(['day', 'hour', 'microsecond', 'millisecond', 'minute', 'month', 'second', 'week', 'year']).isRequired
170
+ })])
171
+ })]).isRequired),
163
172
  /**
164
173
  * If `true`, a loading overlay is displayed.
165
174
  * @default false
@@ -315,6 +324,27 @@ process.env.NODE_ENV !== "production" ? HeatmapPremium.propTypes = {
315
324
  id: _propTypes.default.string,
316
325
  max: _propTypes.default.number,
317
326
  min: _propTypes.default.number,
327
+ sizeMap: _propTypes.default.oneOfType([_propTypes.default.shape({
328
+ interpolator: _propTypes.default.oneOf(['linear', 'log', 'sqrt']),
329
+ max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
330
+ min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
331
+ size: _propTypes.default.arrayOf(_propTypes.default.number.isRequired).isRequired,
332
+ type: _propTypes.default.oneOf(['continuous']).isRequired
333
+ }), _propTypes.default.shape({
334
+ max: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
335
+ min: _propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]),
336
+ size: _propTypes.default.func.isRequired,
337
+ type: _propTypes.default.oneOf(['continuous']).isRequired
338
+ }), _propTypes.default.shape({
339
+ sizes: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
340
+ thresholds: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number]).isRequired).isRequired,
341
+ type: _propTypes.default.oneOf(['piecewise']).isRequired
342
+ }), _propTypes.default.shape({
343
+ sizes: _propTypes.default.arrayOf(_propTypes.default.number).isRequired,
344
+ type: _propTypes.default.oneOf(['ordinal']).isRequired,
345
+ unknownSize: _propTypes.default.number,
346
+ values: _propTypes.default.arrayOf(_propTypes.default.oneOfType([_propTypes.default.instanceOf(Date), _propTypes.default.number, _propTypes.default.string]).isRequired)
347
+ })]),
318
348
  valueGetter: _propTypes.default.func
319
349
  })),
320
350
  /**
@@ -147,12 +147,21 @@ process.env.NODE_ENV !== "production" ? HeatmapPremium.propTypes = {
147
147
  /**
148
148
  * The list of zoom data related to each axis.
149
149
  * Used to initialize the zoom in a specific configuration without controlling it.
150
+ *
151
+ * Each entry is either explicit zoom percentages (`{ axisId, start, end }`) or a
152
+ * range value (`{ axisId, value }`) resolved against the axis domain.
150
153
  */
151
- initialZoom: PropTypes.arrayOf(PropTypes.shape({
154
+ initialZoom: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape({
152
155
  axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
153
156
  end: PropTypes.number.isRequired,
154
157
  start: PropTypes.number.isRequired
155
- })),
158
+ }), PropTypes.shape({
159
+ axisId: PropTypes.oneOfType([PropTypes.number, PropTypes.string]).isRequired,
160
+ value: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.instanceOf(Date).isRequired), PropTypes.arrayOf(PropTypes.string.isRequired), PropTypes.func, PropTypes.shape({
161
+ step: PropTypes.number,
162
+ unit: PropTypes.oneOf(['day', 'hour', 'microsecond', 'millisecond', 'minute', 'month', 'second', 'week', 'year']).isRequired
163
+ })])
164
+ })]).isRequired),
156
165
  /**
157
166
  * If `true`, a loading overlay is displayed.
158
167
  * @default false
@@ -308,6 +317,27 @@ process.env.NODE_ENV !== "production" ? HeatmapPremium.propTypes = {
308
317
  id: PropTypes.string,
309
318
  max: PropTypes.number,
310
319
  min: PropTypes.number,
320
+ sizeMap: PropTypes.oneOfType([PropTypes.shape({
321
+ interpolator: PropTypes.oneOf(['linear', 'log', 'sqrt']),
322
+ max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
323
+ min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
324
+ size: PropTypes.arrayOf(PropTypes.number.isRequired).isRequired,
325
+ type: PropTypes.oneOf(['continuous']).isRequired
326
+ }), PropTypes.shape({
327
+ max: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
328
+ min: PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]),
329
+ size: PropTypes.func.isRequired,
330
+ type: PropTypes.oneOf(['continuous']).isRequired
331
+ }), PropTypes.shape({
332
+ sizes: PropTypes.arrayOf(PropTypes.number).isRequired,
333
+ thresholds: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number]).isRequired).isRequired,
334
+ type: PropTypes.oneOf(['piecewise']).isRequired
335
+ }), PropTypes.shape({
336
+ sizes: PropTypes.arrayOf(PropTypes.number).isRequired,
337
+ type: PropTypes.oneOf(['ordinal']).isRequired,
338
+ unknownSize: PropTypes.number,
339
+ values: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.number, PropTypes.string]).isRequired)
340
+ })]),
311
341
  valueGetter: PropTypes.func
312
342
  })),
313
343
  /**
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Renders an outline around the map shape currently focused through keyboard navigation.
3
+ */
4
+ export declare function FocusedMapShape(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Renders an outline around the map shape currently focused through keyboard navigation.
3
+ */
4
+ export declare function FocusedMapShape(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ 'use client';
3
+
4
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.FocusedMapShape = FocusedMapShape;
9
+ var React = _interopRequireWildcard(require("react"));
10
+ var _styles = require("@mui/material/styles");
11
+ var _hooks = require("../hooks");
12
+ var _useGeoData = require("../hooks/useGeoData");
13
+ var _useGeoPath = require("../hooks/useGeoPath");
14
+ var _useGeoFeatureIndexesByName = require("../hooks/useGeoFeatureIndexesByName");
15
+ var _useMapShapeSeries = require("../hooks/useMapShapeSeries");
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+ const FocusedMapShapeRoot = (0, _styles.styled)('path', {
18
+ name: 'MuiMapShape',
19
+ slot: 'Focused'
20
+ })(({
21
+ theme
22
+ }) => ({
23
+ fill: 'none',
24
+ stroke: (theme.vars ?? theme).palette.text.primary,
25
+ strokeWidth: 2,
26
+ pointerEvents: 'none'
27
+ }));
28
+
29
+ /**
30
+ * Renders an outline around the map shape currently focused through keyboard navigation.
31
+ */
32
+ function FocusedMapShape() {
33
+ const focusedItem = (0, _hooks.useFocusedItem)();
34
+ const geoData = (0, _useGeoData.useGeoData)();
35
+ const path = (0, _useGeoPath.useGeoPath)();
36
+ const featureIndexesByName = (0, _useGeoFeatureIndexesByName.useGeoFeatureIndexesByName)();
37
+ const series = (0, _useMapShapeSeries.useMapShapeSeries)();
38
+ if (focusedItem?.type !== 'mapShape' || !geoData || !path) {
39
+ return null;
40
+ }
41
+ const seriesItem = series.find(item => item.id === focusedItem.seriesId);
42
+ if (!seriesItem || seriesItem.hidden) {
43
+ return null;
44
+ }
45
+ const dataItem = seriesItem.data[focusedItem.dataIndex];
46
+ if (!dataItem || dataItem.hidden) {
47
+ return null;
48
+ }
49
+ const featureIndexes = featureIndexesByName.get(dataItem.name);
50
+ if (featureIndexes === undefined || featureIndexes.length === 0) {
51
+ return null;
52
+ }
53
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("g", {
54
+ "aria-hidden": true,
55
+ children: featureIndexes.map(featureIndex => {
56
+ const feature = geoData.features[featureIndex];
57
+ const d = path(feature);
58
+ if (!d) {
59
+ return null;
60
+ }
61
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(FocusedMapShapeRoot, {
62
+ d: d
63
+ }, featureIndex);
64
+ })
65
+ });
66
+ }