@automattic/charts 0.56.3 → 0.56.4

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 (184) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/charts/bar-chart/index.cjs +5 -5
  3. package/dist/charts/bar-chart/index.css +12 -0
  4. package/dist/charts/bar-chart/index.css.map +1 -1
  5. package/dist/charts/bar-chart/index.js +4 -4
  6. package/dist/charts/bar-list-chart/index.cjs +6 -6
  7. package/dist/charts/bar-list-chart/index.css +12 -0
  8. package/dist/charts/bar-list-chart/index.css.map +1 -1
  9. package/dist/charts/bar-list-chart/index.js +5 -5
  10. package/dist/charts/conversion-funnel-chart/index.cjs +5 -3
  11. package/dist/charts/conversion-funnel-chart/index.cjs.map +1 -1
  12. package/dist/charts/conversion-funnel-chart/index.css +14 -1
  13. package/dist/charts/conversion-funnel-chart/index.css.map +1 -1
  14. package/dist/charts/conversion-funnel-chart/index.d.cts +2 -0
  15. package/dist/charts/conversion-funnel-chart/index.d.ts +2 -0
  16. package/dist/charts/conversion-funnel-chart/index.js +4 -2
  17. package/dist/charts/geo-chart/index.cjs +4 -4
  18. package/dist/charts/geo-chart/index.css +12 -0
  19. package/dist/charts/geo-chart/index.css.map +1 -1
  20. package/dist/charts/geo-chart/index.js +3 -3
  21. package/dist/charts/leaderboard-chart/index.cjs +5 -5
  22. package/dist/charts/leaderboard-chart/index.css +12 -0
  23. package/dist/charts/leaderboard-chart/index.css.map +1 -1
  24. package/dist/charts/leaderboard-chart/index.js +4 -4
  25. package/dist/charts/line-chart/index.cjs +5 -5
  26. package/dist/charts/line-chart/index.css +12 -0
  27. package/dist/charts/line-chart/index.css.map +1 -1
  28. package/dist/charts/line-chart/index.js +4 -4
  29. package/dist/charts/pie-chart/index.cjs +7 -7
  30. package/dist/charts/pie-chart/index.css +12 -0
  31. package/dist/charts/pie-chart/index.css.map +1 -1
  32. package/dist/charts/pie-chart/index.js +6 -6
  33. package/dist/charts/pie-semi-circle-chart/index.cjs +7 -7
  34. package/dist/charts/pie-semi-circle-chart/index.css +12 -0
  35. package/dist/charts/pie-semi-circle-chart/index.css.map +1 -1
  36. package/dist/charts/pie-semi-circle-chart/index.js +6 -6
  37. package/dist/charts/sparkline/index.cjs +6 -6
  38. package/dist/charts/sparkline/index.css +12 -0
  39. package/dist/charts/sparkline/index.css.map +1 -1
  40. package/dist/charts/sparkline/index.js +5 -5
  41. package/dist/{chunk-OTZT3MC2.cjs → chunk-2A34OA5O.cjs} +19 -20
  42. package/dist/chunk-2A34OA5O.cjs.map +1 -0
  43. package/dist/chunk-4YYROZDJ.cjs +375 -0
  44. package/dist/chunk-4YYROZDJ.cjs.map +1 -0
  45. package/dist/{chunk-YYQ4IK5V.cjs → chunk-5N77S5N3.cjs} +103 -80
  46. package/dist/chunk-5N77S5N3.cjs.map +1 -0
  47. package/dist/chunk-66BXSWMW.cjs +1065 -0
  48. package/dist/chunk-66BXSWMW.cjs.map +1 -0
  49. package/dist/{chunk-CEZGL6YP.js → chunk-6CCZL2JJ.js} +15 -7
  50. package/dist/chunk-6CCZL2JJ.js.map +1 -0
  51. package/dist/{chunk-NW3RUYK2.cjs → chunk-7QDEU3KN.cjs} +15 -22
  52. package/dist/chunk-7QDEU3KN.cjs.map +1 -0
  53. package/dist/{chunk-H34CJSR6.js → chunk-AWNCAKZY.js} +367 -358
  54. package/dist/chunk-AWNCAKZY.js.map +1 -0
  55. package/dist/{chunk-5XI443YP.js → chunk-BPYKWMI7.js} +72 -64
  56. package/dist/chunk-BPYKWMI7.js.map +1 -0
  57. package/dist/{chunk-7UJPVCMB.cjs → chunk-CERFRCXD.cjs} +265 -262
  58. package/dist/chunk-CERFRCXD.cjs.map +1 -0
  59. package/dist/chunk-CMHPXSCI.js +351 -0
  60. package/dist/chunk-CMHPXSCI.js.map +1 -0
  61. package/dist/chunk-EBDUXL5K.js +421 -0
  62. package/dist/chunk-EBDUXL5K.js.map +1 -0
  63. package/dist/{chunk-2VPPTJS2.js → chunk-FZYJM5PN.js} +256 -253
  64. package/dist/chunk-FZYJM5PN.js.map +1 -0
  65. package/dist/chunk-GBDFC74U.cjs +165 -0
  66. package/dist/chunk-GBDFC74U.cjs.map +1 -0
  67. package/dist/{chunk-ODF5O5PV.cjs → chunk-HNEG3EFJ.cjs} +154 -170
  68. package/dist/chunk-HNEG3EFJ.cjs.map +1 -0
  69. package/dist/{chunk-SRXJLAKG.cjs → chunk-I2276W3I.cjs} +28 -37
  70. package/dist/chunk-I2276W3I.cjs.map +1 -0
  71. package/dist/chunk-KKPZ4MVF.js +375 -0
  72. package/dist/chunk-KKPZ4MVF.js.map +1 -0
  73. package/dist/chunk-KMYJJTSR.cjs +421 -0
  74. package/dist/chunk-KMYJJTSR.cjs.map +1 -0
  75. package/dist/{chunk-A3AEEGKR.js → chunk-KXRWNFQJ.js} +20 -21
  76. package/dist/chunk-KXRWNFQJ.js.map +1 -0
  77. package/dist/{chunk-TVV7ZI7C.cjs → chunk-LSV7F26B.cjs} +362 -353
  78. package/dist/chunk-LSV7F26B.cjs.map +1 -0
  79. package/dist/{chunk-T4J6TI55.js → chunk-M7PRGJFE.js} +102 -79
  80. package/dist/chunk-M7PRGJFE.js.map +1 -0
  81. package/dist/{chunk-TNRKEBTA.js → chunk-PGJAZN2H.js} +148 -164
  82. package/dist/{chunk-TNRKEBTA.js.map → chunk-PGJAZN2H.js.map} +1 -1
  83. package/dist/chunk-R23BFDIW.js +1065 -0
  84. package/dist/chunk-R23BFDIW.js.map +1 -0
  85. package/dist/{chunk-HIWNB5PK.cjs → chunk-RCY6XLGU.cjs} +13 -5
  86. package/dist/chunk-RCY6XLGU.cjs.map +1 -0
  87. package/dist/chunk-RSYD434G.cjs +351 -0
  88. package/dist/chunk-RSYD434G.cjs.map +1 -0
  89. package/dist/{chunk-C33AQZEC.js → chunk-TYIH5LMV.js} +16 -23
  90. package/dist/chunk-TYIH5LMV.js.map +1 -0
  91. package/dist/chunk-WMWAUOQ4.js +165 -0
  92. package/dist/chunk-WMWAUOQ4.js.map +1 -0
  93. package/dist/chunk-XWYZIFZW.js +66 -0
  94. package/dist/chunk-XWYZIFZW.js.map +1 -0
  95. package/dist/{chunk-7HROSZRS.cjs → chunk-Y3NNQMAX.cjs} +70 -62
  96. package/dist/chunk-Y3NNQMAX.cjs.map +1 -0
  97. package/dist/chunk-ZXEFMKVP.cjs +120 -0
  98. package/dist/chunk-ZXEFMKVP.cjs.map +1 -0
  99. package/dist/chunk-ZY4FXLMM.js +120 -0
  100. package/dist/chunk-ZY4FXLMM.js.map +1 -0
  101. package/dist/components/legend/index.cjs +2 -2
  102. package/dist/components/legend/index.css +12 -0
  103. package/dist/components/legend/index.css.map +1 -1
  104. package/dist/components/legend/index.js +1 -1
  105. package/dist/components/tooltip/index.cjs +2 -2
  106. package/dist/components/tooltip/index.js +1 -1
  107. package/dist/components/trend-indicator/index.cjs +2 -2
  108. package/dist/components/trend-indicator/index.js +1 -1
  109. package/dist/hooks/index.cjs +4 -2
  110. package/dist/hooks/index.cjs.map +1 -1
  111. package/dist/hooks/index.css +12 -0
  112. package/dist/hooks/index.css.map +1 -1
  113. package/dist/hooks/index.d.cts +28 -2
  114. package/dist/hooks/index.d.ts +28 -2
  115. package/dist/hooks/index.js +3 -1
  116. package/dist/index.cjs +18 -18
  117. package/dist/index.cjs.map +1 -1
  118. package/dist/index.css +14 -1
  119. package/dist/index.css.map +1 -1
  120. package/dist/index.d.cts +1 -1
  121. package/dist/index.d.ts +1 -1
  122. package/dist/index.js +17 -17
  123. package/dist/providers/index.cjs +2 -2
  124. package/dist/providers/index.css +12 -0
  125. package/dist/providers/index.css.map +1 -1
  126. package/dist/providers/index.d.cts +1 -1
  127. package/dist/providers/index.d.ts +1 -1
  128. package/dist/providers/index.js +1 -1
  129. package/dist/{themes-DQs9rbN5.d.cts → themes-BDVaIfBz.d.cts} +9 -0
  130. package/dist/{themes-CRV5fVzJ.d.ts → themes-mcS8QNkQ.d.ts} +9 -0
  131. package/package.json +5 -1
  132. package/src/charts/conversion-funnel-chart/conversion-funnel-chart.module.scss +2 -1
  133. package/src/charts/conversion-funnel-chart/conversion-funnel-chart.tsx +16 -6
  134. package/src/charts/conversion-funnel-chart/test/conversion-funnel-chart.test.tsx +34 -0
  135. package/src/charts/conversion-funnel-chart/types.ts +2 -0
  136. package/src/charts/pie-chart/pie-chart.tsx +2 -3
  137. package/src/hooks/index.ts +1 -0
  138. package/src/hooks/test/use-tooltip-portal-relocator.test.ts +216 -0
  139. package/src/hooks/use-tooltip-portal-relocator.module.scss +10 -0
  140. package/src/hooks/use-tooltip-portal-relocator.ts +177 -0
  141. package/src/providers/chart-context/global-charts-provider.tsx +18 -1
  142. package/tsup.config.ts +11 -0
  143. package/dist/chunk-2VPPTJS2.js.map +0 -1
  144. package/dist/chunk-5XI443YP.js.map +0 -1
  145. package/dist/chunk-7HROSZRS.cjs.map +0 -1
  146. package/dist/chunk-7UJPVCMB.cjs.map +0 -1
  147. package/dist/chunk-A3AEEGKR.js.map +0 -1
  148. package/dist/chunk-C33AQZEC.js.map +0 -1
  149. package/dist/chunk-CEZGL6YP.js.map +0 -1
  150. package/dist/chunk-COOC2TVQ.js +0 -167
  151. package/dist/chunk-COOC2TVQ.js.map +0 -1
  152. package/dist/chunk-EJHLLXBV.js +0 -362
  153. package/dist/chunk-EJHLLXBV.js.map +0 -1
  154. package/dist/chunk-FWMJ2FR2.js +0 -121
  155. package/dist/chunk-FWMJ2FR2.js.map +0 -1
  156. package/dist/chunk-GRYNIPWH.cjs +0 -385
  157. package/dist/chunk-GRYNIPWH.cjs.map +0 -1
  158. package/dist/chunk-H34CJSR6.js.map +0 -1
  159. package/dist/chunk-HIWNB5PK.cjs.map +0 -1
  160. package/dist/chunk-IZWC33YN.cjs +0 -357
  161. package/dist/chunk-IZWC33YN.cjs.map +0 -1
  162. package/dist/chunk-KOF32DBL.cjs +0 -1058
  163. package/dist/chunk-KOF32DBL.cjs.map +0 -1
  164. package/dist/chunk-LHWRZMF7.cjs +0 -362
  165. package/dist/chunk-LHWRZMF7.cjs.map +0 -1
  166. package/dist/chunk-MFRS2PEY.cjs +0 -121
  167. package/dist/chunk-MFRS2PEY.cjs.map +0 -1
  168. package/dist/chunk-MMDLXS6O.js +0 -75
  169. package/dist/chunk-MMDLXS6O.js.map +0 -1
  170. package/dist/chunk-NW3RUYK2.cjs.map +0 -1
  171. package/dist/chunk-ODF5O5PV.cjs.map +0 -1
  172. package/dist/chunk-OTZT3MC2.cjs.map +0 -1
  173. package/dist/chunk-SBRMWDWM.js +0 -357
  174. package/dist/chunk-SBRMWDWM.js.map +0 -1
  175. package/dist/chunk-SRXJLAKG.cjs.map +0 -1
  176. package/dist/chunk-T4J6TI55.js.map +0 -1
  177. package/dist/chunk-TVV7ZI7C.cjs.map +0 -1
  178. package/dist/chunk-XVMXWV3C.cjs +0 -167
  179. package/dist/chunk-XVMXWV3C.cjs.map +0 -1
  180. package/dist/chunk-YYQ4IK5V.cjs.map +0 -1
  181. package/dist/chunk-ZDNCF642.js +0 -1058
  182. package/dist/chunk-ZDNCF642.js.map +0 -1
  183. package/dist/chunk-ZWBUEHKF.js +0 -385
  184. package/dist/chunk-ZWBUEHKF.js.map +0 -1
@@ -70,15 +70,98 @@ import { useMemo as useMemo3 } from "react";
70
70
 
71
71
  // src/providers/chart-context/global-charts-provider.tsx
72
72
  import { hsl as d3Hsl2 } from "@visx/vendor/d3-color";
73
- import {
74
- createContext,
75
- useCallback as useCallback2,
76
- useMemo,
77
- useState,
78
- useEffect,
79
- useLayoutEffect,
80
- useRef as useRef2
81
- } from "react";
73
+ import { createContext, useCallback as useCallback2, useMemo, useState, useEffect as useEffect2, useLayoutEffect, useRef as useRef2 } from "react";
74
+
75
+ // src/hooks/use-tooltip-portal-relocator.ts
76
+ import { useEffect } from "react";
77
+
78
+ // src/hooks/use-tooltip-portal-relocator.module.scss
79
+ var use_tooltip_portal_relocator_module_default = {
80
+ "relocatedPortal": "a8ccharts-jCw5dQ"
81
+ };
82
+
83
+ // src/hooks/use-tooltip-portal-relocator.ts
84
+ function isVisxPortalNode(node) {
85
+ return node instanceof HTMLDivElement && node.parentElement === document.body && !node.id && !node.className && node.querySelector(".visx-tooltip") !== null;
86
+ }
87
+ var patchRefCount = 0;
88
+ var origRemoveChild = null;
89
+ var patchedRemoveChild = null;
90
+ var relocatedNodes = /* @__PURE__ */ new WeakSet();
91
+ function installRemoveChildPatch() {
92
+ if (patchRefCount++ > 0) {
93
+ return;
94
+ }
95
+ origRemoveChild = document.body.removeChild;
96
+ patchedRemoveChild = function(child) {
97
+ if (relocatedNodes.has(child) && child.parentNode !== this) {
98
+ relocatedNodes.delete(child);
99
+ child.parentNode?.removeChild(child);
100
+ return child;
101
+ }
102
+ return origRemoveChild.call(this, child);
103
+ };
104
+ document.body.removeChild = patchedRemoveChild;
105
+ }
106
+ function uninstallRemoveChildPatch() {
107
+ if (--patchRefCount > 0) {
108
+ return;
109
+ }
110
+ if (document.body.removeChild === patchedRemoveChild) {
111
+ document.body.removeChild = origRemoveChild;
112
+ }
113
+ origRemoveChild = null;
114
+ patchedRemoveChild = null;
115
+ }
116
+ function useTooltipPortalRelocator(containerRef) {
117
+ useEffect(() => {
118
+ const container = containerRef?.current;
119
+ if (!container) {
120
+ return;
121
+ }
122
+ const instanceNodes = /* @__PURE__ */ new Set();
123
+ const relocateNode = (node) => {
124
+ if (!isVisxPortalNode(node)) {
125
+ return;
126
+ }
127
+ node.classList.add(use_tooltip_portal_relocator_module_default.relocatedPortal);
128
+ const { activeElement } = node.ownerDocument;
129
+ const focusedElement = activeElement instanceof HTMLElement && node.contains(activeElement) ? activeElement : null;
130
+ container.insertBefore(node, container.firstChild);
131
+ relocatedNodes.add(node);
132
+ instanceNodes.add(node);
133
+ if (focusedElement) {
134
+ focusedElement.focus();
135
+ }
136
+ };
137
+ installRemoveChildPatch();
138
+ for (const child of Array.from(document.body.children)) {
139
+ relocateNode(child);
140
+ }
141
+ const observer = new MutationObserver((mutations) => {
142
+ for (const mutation of mutations) {
143
+ for (const node of mutation.addedNodes) {
144
+ relocateNode(node);
145
+ }
146
+ }
147
+ });
148
+ observer.observe(document.body, { childList: true });
149
+ return () => {
150
+ observer.disconnect();
151
+ for (const node of instanceNodes) {
152
+ if (node instanceof HTMLElement) {
153
+ node.classList.remove(use_tooltip_portal_relocator_module_default.relocatedPortal);
154
+ }
155
+ if (node.parentNode === container) {
156
+ document.body.appendChild(node);
157
+ }
158
+ relocatedNodes.delete(node);
159
+ }
160
+ instanceNodes.clear();
161
+ uninstallRemoveChildPatch();
162
+ };
163
+ }, [containerRef]);
164
+ }
82
165
 
83
166
  // src/providers/chart-context/private/get-chart-color.ts
84
167
  import { hsl as d3Hsl } from "@visx/vendor/d3-color";
@@ -229,14 +312,17 @@ var defaultTheme = {
229
312
  };
230
313
 
231
314
  // src/providers/chart-context/global-charts-provider.tsx
232
- import { jsx } from "react/jsx-runtime";
233
- var GlobalChartsContext = createContext(null);
234
- var GlobalChartsProvider = ({ children, theme }) => {
315
+ import { jsx as _jsx } from "react/jsx-runtime";
316
+ var GlobalChartsContext = /* @__PURE__ */ createContext(null);
317
+ var GlobalChartsProvider = ({
318
+ children,
319
+ theme,
320
+ portalContainer
321
+ }) => {
235
322
  const [charts, setCharts] = useState(() => /* @__PURE__ */ new Map());
236
- const [hiddenSeries, setHiddenSeries] = useState(
237
- () => /* @__PURE__ */ new Map()
238
- );
323
+ const [hiddenSeries, setHiddenSeries] = useState(() => /* @__PURE__ */ new Map());
239
324
  const wrapperRef = useRef2(null);
325
+ useTooltipPortalRelocator(portalContainer ?? wrapperRef);
240
326
  const providerTheme = useMemo(() => {
241
327
  return theme ? mergeThemes(defaultTheme, theme) : defaultTheme;
242
328
  }, [theme]);
@@ -248,7 +334,9 @@ var GlobalChartsProvider = ({ children, theme }) => {
248
334
  maxHue: 0
249
335
  }));
250
336
  useLayoutEffect(() => {
251
- const { colors } = providerTheme;
337
+ const {
338
+ colors
339
+ } = providerTheme;
252
340
  const resolvedColors = [];
253
341
  const hues = [];
254
342
  const existingHslColors = [];
@@ -269,11 +357,7 @@ var GlobalChartsProvider = ({ children, theme }) => {
269
357
  resolvedColors.push(colorValue);
270
358
  const hslColor = d3Hsl2(colorValue);
271
359
  if (!isNaN(hslColor.h)) {
272
- const hslTuple = [
273
- hslColor.h,
274
- hslColor.s * 100,
275
- hslColor.l * 100
276
- ];
360
+ const hslTuple = [hslColor.h, hslColor.s * 100, hslColor.l * 100];
277
361
  hues.push(hslTuple[0]);
278
362
  existingHslColors.push(hslTuple);
279
363
  minHue = Math.min(minHue, hslTuple[0]);
@@ -291,10 +375,8 @@ var GlobalChartsProvider = ({ children, theme }) => {
291
375
  maxHue
292
376
  });
293
377
  }, [providerTheme]);
294
- const [groupToColorMap, setGroupToColorMap] = useState(
295
- () => /* @__PURE__ */ new Map()
296
- );
297
- useEffect(() => {
378
+ const [groupToColorMap, setGroupToColorMap] = useState(() => /* @__PURE__ */ new Map());
379
+ useEffect2(() => {
298
380
  setGroupToColorMap(/* @__PURE__ */ new Map());
299
381
  }, [providerTheme.colors]);
300
382
  const registerChart = useCallback2((id, data) => {
@@ -307,52 +389,48 @@ var GlobalChartsProvider = ({ children, theme }) => {
307
389
  return newMap;
308
390
  });
309
391
  }, []);
310
- const getChartData = useCallback2(
311
- (id) => {
312
- return charts.get(id);
313
- },
314
- [charts]
315
- );
316
- const resolveColor = useCallback2(
317
- ({
318
- group,
319
- index,
320
- overrideColor
321
- }) => {
322
- if (overrideColor) {
323
- return normalizeColorToHex(overrideColor, wrapperRef.current, resolveCssVariable);
324
- }
325
- if (group) {
326
- const existing = groupToColorMap.get(group);
327
- if (existing) {
328
- return existing;
329
- }
330
- const assignedCount = groupToColorMap.size;
331
- const color = getChartColor(assignedCount, colorCache);
332
- groupToColorMap.set(group, color);
333
- return color;
392
+ const getChartData = useCallback2((id) => {
393
+ return charts.get(id);
394
+ }, [charts]);
395
+ const resolveColor = useCallback2(({
396
+ group,
397
+ index,
398
+ overrideColor
399
+ }) => {
400
+ if (overrideColor) {
401
+ return normalizeColorToHex(overrideColor, wrapperRef.current, resolveCssVariable);
402
+ }
403
+ if (group) {
404
+ const existing = groupToColorMap.get(group);
405
+ if (existing) {
406
+ return existing;
334
407
  }
335
- return getChartColor(index, colorCache);
336
- },
337
- [colorCache, groupToColorMap]
338
- );
339
- const getElementStyles = useCallback2(
340
- ({ data, index, overrideColor, legendShape }) => {
341
- const isSeriesData = data && typeof data === "object" && "data" in data && "options" in data;
342
- const isPointPercentageData = data && typeof data === "object" && "percentage" in data;
343
- return {
344
- color: resolveColor({
345
- group: data?.group,
346
- index,
347
- overrideColor: overrideColor || isSeriesData && data?.options?.stroke || isPointPercentageData && data?.color
348
- }),
349
- lineStyles: isSeriesData ? getSeriesLineStyles(data, index, providerTheme) : {},
350
- glyph: providerTheme.glyphs?.[index],
351
- shapeStyles: isSeriesData ? getItemShapeStyles(data, index, providerTheme, legendShape) : {}
352
- };
353
- },
354
- [providerTheme, resolveColor]
355
- );
408
+ const assignedCount = groupToColorMap.size;
409
+ const color = getChartColor(assignedCount, colorCache);
410
+ groupToColorMap.set(group, color);
411
+ return color;
412
+ }
413
+ return getChartColor(index, colorCache);
414
+ }, [colorCache, groupToColorMap]);
415
+ const getElementStyles = useCallback2(({
416
+ data,
417
+ index,
418
+ overrideColor,
419
+ legendShape
420
+ }) => {
421
+ const isSeriesData = data && typeof data === "object" && "data" in data && "options" in data;
422
+ const isPointPercentageData = data && typeof data === "object" && "percentage" in data;
423
+ return {
424
+ color: resolveColor({
425
+ group: data?.group,
426
+ index,
427
+ overrideColor: overrideColor || isSeriesData && data?.options?.stroke || isPointPercentageData && data?.color
428
+ }),
429
+ lineStyles: isSeriesData ? getSeriesLineStyles(data, index, providerTheme) : {},
430
+ glyph: providerTheme.glyphs?.[index],
431
+ shapeStyles: isSeriesData ? getItemShapeStyles(data, index, providerTheme, legendShape) : {}
432
+ };
433
+ }, [providerTheme, resolveColor]);
356
434
  const toggleSeriesVisibility = useCallback2((chartId, seriesLabel) => {
357
435
  setHiddenSeries((prev) => {
358
436
  const newMap = new Map(prev);
@@ -371,45 +449,35 @@ var GlobalChartsProvider = ({ children, theme }) => {
371
449
  return newMap;
372
450
  });
373
451
  }, []);
374
- const isSeriesVisible = useCallback2(
375
- (chartId, seriesLabel) => {
376
- const chartHidden = hiddenSeries.get(chartId);
377
- return !chartHidden || !chartHidden.has(seriesLabel);
378
- },
379
- [hiddenSeries]
380
- );
381
- const getHiddenSeries = useCallback2(
382
- (chartId) => {
383
- const set = hiddenSeries.get(chartId);
384
- return set ? new Set(set) : /* @__PURE__ */ new Set();
385
- },
386
- [hiddenSeries]
387
- );
388
- const value = useMemo(
389
- () => ({
390
- charts,
391
- registerChart,
392
- unregisterChart,
393
- getChartData,
394
- theme: providerTheme,
395
- getElementStyles,
396
- toggleSeriesVisibility,
397
- isSeriesVisible,
398
- getHiddenSeries
399
- }),
400
- [
401
- charts,
402
- registerChart,
403
- unregisterChart,
404
- getChartData,
405
- providerTheme,
406
- getElementStyles,
407
- toggleSeriesVisibility,
408
- isSeriesVisible,
409
- getHiddenSeries
410
- ]
411
- );
412
- return /* @__PURE__ */ jsx(GlobalChartsContext.Provider, { value, children: /* @__PURE__ */ jsx("div", { ref: wrapperRef, style: { display: "contents" }, children }) });
452
+ const isSeriesVisible = useCallback2((chartId, seriesLabel) => {
453
+ const chartHidden = hiddenSeries.get(chartId);
454
+ return !chartHidden || !chartHidden.has(seriesLabel);
455
+ }, [hiddenSeries]);
456
+ const getHiddenSeries = useCallback2((chartId) => {
457
+ const set = hiddenSeries.get(chartId);
458
+ return set ? new Set(set) : /* @__PURE__ */ new Set();
459
+ }, [hiddenSeries]);
460
+ const value = useMemo(() => ({
461
+ charts,
462
+ registerChart,
463
+ unregisterChart,
464
+ getChartData,
465
+ theme: providerTheme,
466
+ getElementStyles,
467
+ toggleSeriesVisibility,
468
+ isSeriesVisible,
469
+ getHiddenSeries
470
+ }), [charts, registerChart, unregisterChart, getChartData, providerTheme, getElementStyles, toggleSeriesVisibility, isSeriesVisible, getHiddenSeries]);
471
+ return /* @__PURE__ */ _jsx(GlobalChartsContext.Provider, {
472
+ value,
473
+ children: /* @__PURE__ */ _jsx("div", {
474
+ ref: wrapperRef,
475
+ style: {
476
+ display: "contents"
477
+ },
478
+ children
479
+ })
480
+ });
413
481
  };
414
482
 
415
483
  // src/providers/chart-context/hooks/use-global-charts-context.ts
@@ -430,7 +498,7 @@ var useChartId = (providedId) => {
430
498
  };
431
499
 
432
500
  // src/providers/chart-context/hooks/use-chart-registration.ts
433
- import { useEffect as useEffect2, useMemo as useMemo2 } from "react";
501
+ import { useEffect as useEffect3, useMemo as useMemo2 } from "react";
434
502
  var useChartRegistration = ({
435
503
  chartId,
436
504
  legendItems,
@@ -441,7 +509,7 @@ var useChartRegistration = ({
441
509
  const { registerChart, unregisterChart } = useGlobalChartsContext();
442
510
  const stableLegendItems = useDeepMemo(legendItems);
443
511
  const memoizedMetadata = useMemo2(() => metadata, [metadata]);
444
- useEffect2(() => {
512
+ useEffect3(() => {
445
513
  if (isDataValid) {
446
514
  registerChart(chartId, {
447
515
  legendItems: stableLegendItems,
@@ -520,9 +588,7 @@ var useChartMargin = (height, options, data, theme, horizontal = false) => {
520
588
  const yTicks = useMemo5(() => {
521
589
  const allDataPoints = data.flatMap((series) => series.data);
522
590
  if (horizontal) {
523
- return allDataPoints.map(
524
- (d) => d.label || options.axis?.y?.tickFormat(d.date.getTime(), 0, [])
525
- );
591
+ return allDataPoints.map((d) => d.label || options.axis?.y?.tickFormat(d.date.getTime(), 0, []));
526
592
  }
527
593
  const minY = Math.min(...allDataPoints.map((d) => d.value));
528
594
  const maxY = Math.max(...allDataPoints.map((d) => d.value));
@@ -534,15 +600,16 @@ var useChartMargin = (height, options, data, theme, horizontal = false) => {
534
600
  return getTicks(yScale, options.axis?.y?.numTicks);
535
601
  }, [options, data, height, horizontal]);
536
602
  return useMemo5(() => {
537
- const defaultMargin = { top: 10, right: 20, bottom: 20, left: 20 };
603
+ const defaultMargin = {
604
+ top: 10,
605
+ right: 20,
606
+ bottom: 20,
607
+ left: 20
608
+ };
538
609
  const defaultTickWidth = 40;
539
610
  const yAxisOrientation = options.axis?.y?.orientation;
540
611
  const yAxisStyles = yAxisOrientation === "right" ? theme.axisStyles.y.right : theme.axisStyles.y.left;
541
- const yTickWidth = getLongestTickWidth(
542
- yTicks,
543
- options.axis?.y?.tickFormat,
544
- yAxisStyles.axisLabel
545
- );
612
+ const yTickWidth = getLongestTickWidth(yTicks, options.axis?.y?.tickFormat, yAxisStyles.axisLabel);
546
613
  const yMarginValue = (yTickWidth ?? defaultTickWidth) + (yAxisStyles?.tickLength ?? 0);
547
614
  if (yAxisOrientation === "right") {
548
615
  defaultMargin.right = yMarginValue;
@@ -590,7 +657,7 @@ import { useContext as useContext5, useMemo as useMemo6, forwardRef as forwardRe
590
657
 
591
658
  // src/charts/private/single-chart-context/single-chart-context.tsx
592
659
  import { createContext as createContext2 } from "react";
593
- var ChartInstanceContext = createContext2(null);
660
+ var ChartInstanceContext = /* @__PURE__ */ createContext2(null);
594
661
  var SingleChartContext = ChartInstanceContext;
595
662
 
596
663
  // src/charts/private/single-chart-context/use-single-chart-context.ts
@@ -609,11 +676,7 @@ import { Group } from "@visx/group";
609
676
  import { LegendItem, LegendLabel, LegendOrdinal, LegendShape } from "@visx/legend";
610
677
  import { scaleOrdinal } from "@visx/scale";
611
678
  import clsx from "clsx";
612
- import {
613
- forwardRef,
614
- useCallback as useCallback4,
615
- useContext as useContext4
616
- } from "react";
679
+ import { forwardRef, useCallback as useCallback4, useContext as useContext4 } from "react";
617
680
 
618
681
  // src/components/legend/utils/value-or-identity.ts
619
682
  function valueOrIdentity(_) {
@@ -657,7 +720,7 @@ var base_legend_module_default = {
657
720
  };
658
721
 
659
722
  // src/components/legend/private/base-legend.tsx
660
- import { jsx as jsx2, jsxs } from "react/jsx-runtime";
723
+ import { jsx as _jsx2, jsxs as _jsxs } from "react/jsx-runtime";
661
724
  var orientationToFlexDirection = {
662
725
  horizontal: "row",
663
726
  vertical: "column"
@@ -669,241 +732,186 @@ var LegendText = ({
669
732
  }) => {
670
733
  const isEllipsis = maxWidth != null && textOverflow === "ellipsis";
671
734
  const [textRef, isTruncated] = useTextTruncation(Boolean(isEllipsis));
672
- return /* @__PURE__ */ jsx2(
673
- "span",
674
- {
675
- ref: textRef,
676
- className: clsx(
677
- base_legend_module_default["legend-item-text"],
678
- maxWidth != null && base_legend_module_default[`legend-item-text--${textOverflow}`]
679
- ),
680
- style: {
681
- ...maxWidth != null && {
682
- maxWidth,
683
- minWidth: 0
684
- }
685
- },
686
- title: isEllipsis && isTruncated ? text : void 0,
687
- children: text
688
- }
689
- );
735
+ return /* @__PURE__ */ _jsx2("span", {
736
+ ref: textRef,
737
+ className: clsx(base_legend_module_default["legend-item-text"], maxWidth != null && base_legend_module_default[`legend-item-text--${textOverflow}`]),
738
+ style: {
739
+ ...maxWidth != null && {
740
+ maxWidth,
741
+ minWidth: 0
742
+ }
743
+ },
744
+ title: isEllipsis && isTruncated ? text : void 0,
745
+ children: text
746
+ });
690
747
  };
691
- var BaseLegend = forwardRef(
692
- ({
693
- items,
694
- className,
695
- orientation = "horizontal",
696
- position = "bottom",
697
- alignment = "center",
698
- maxWidth,
699
- textOverflow = "wrap",
700
- shape = "rect",
701
- fill = valueOrIdentityString,
702
- size = valueOrIdentityString,
703
- labelFormat = valueOrIdentity,
704
- labelTransform = labelTransformFactory,
705
- shapeWidth = 16,
706
- shapeHeight = 16,
707
- shapeMargin = "2px 4px 2px 0",
708
- labelAlign = "left",
709
- labelFlex = "0 0 auto",
710
- // Use natural width instead of expanding to fill space
711
- labelMargin = "0 4px",
712
- itemMargin = "0",
713
- itemDirection = "row",
714
- legendLabelProps,
715
- legendItemClassName,
716
- render,
717
- interactive = false,
718
- chartId,
719
- ...legendItemProps
720
- }, ref) => {
721
- const theme = useGlobalChartsTheme();
722
- const context = useContext4(GlobalChartsContext);
723
- const legendScale = scaleOrdinal({
724
- domain: items.map((item) => item.label),
725
- range: items.map((item) => item.color)
726
- });
727
- const domain = legendScale.domain();
728
- const getShapeStyle = useCallback4(
729
- ({ index }) => items[index]?.shapeStyle,
730
- [items]
731
- );
732
- const handleLegendClick = useCallback4(
733
- (seriesLabel) => {
734
- if (interactive && chartId && context) {
735
- context.toggleSeriesVisibility(chartId, seriesLabel);
736
- }
737
- },
738
- [interactive, chartId, context]
739
- );
740
- const isSeriesVisible = useCallback4(
741
- (seriesLabel) => {
742
- if (!interactive || !chartId || !context) {
743
- return true;
744
- }
745
- return context.isSeriesVisible(chartId, seriesLabel);
746
- },
747
- [interactive, chartId, context]
748
- );
749
- const createClickHandler = useCallback4(
750
- (labelText) => {
751
- if (!interactive) {
752
- return void 0;
753
- }
754
- return () => handleLegendClick(labelText);
755
- },
756
- [interactive, handleLegendClick]
757
- );
758
- const createKeyDownHandler = useCallback4(
759
- (labelText) => {
760
- if (!interactive) {
761
- return void 0;
762
- }
763
- return (event) => {
764
- if (event.key === "Enter" || event.key === " ") {
765
- event.preventDefault();
766
- handleLegendClick(labelText);
767
- }
768
- };
748
+ var BaseLegend = /* @__PURE__ */ forwardRef(({
749
+ items,
750
+ className,
751
+ orientation = "horizontal",
752
+ position = "bottom",
753
+ alignment = "center",
754
+ maxWidth,
755
+ textOverflow = "wrap",
756
+ shape = "rect",
757
+ fill = valueOrIdentityString,
758
+ size = valueOrIdentityString,
759
+ labelFormat = valueOrIdentity,
760
+ labelTransform = labelTransformFactory,
761
+ shapeWidth = 16,
762
+ shapeHeight = 16,
763
+ shapeMargin = "2px 4px 2px 0",
764
+ labelAlign = "left",
765
+ labelFlex = "0 0 auto",
766
+ // Use natural width instead of expanding to fill space
767
+ labelMargin = "0 4px",
768
+ itemMargin = "0",
769
+ itemDirection = "row",
770
+ legendLabelProps,
771
+ legendItemClassName,
772
+ render,
773
+ interactive = false,
774
+ chartId,
775
+ ...legendItemProps
776
+ }, ref) => {
777
+ const theme = useGlobalChartsTheme();
778
+ const context = useContext4(GlobalChartsContext);
779
+ const legendScale = scaleOrdinal({
780
+ domain: items.map((item) => item.label),
781
+ range: items.map((item) => item.color)
782
+ });
783
+ const domain = legendScale.domain();
784
+ const getShapeStyle = useCallback4(({
785
+ index
786
+ }) => items[index]?.shapeStyle, [items]);
787
+ const handleLegendClick = useCallback4((seriesLabel) => {
788
+ if (interactive && chartId && context) {
789
+ context.toggleSeriesVisibility(chartId, seriesLabel);
790
+ }
791
+ }, [interactive, chartId, context]);
792
+ const isSeriesVisible = useCallback4((seriesLabel) => {
793
+ if (!interactive || !chartId || !context) {
794
+ return true;
795
+ }
796
+ return context.isSeriesVisible(chartId, seriesLabel);
797
+ }, [interactive, chartId, context]);
798
+ const createClickHandler = useCallback4((labelText) => {
799
+ if (!interactive) {
800
+ return void 0;
801
+ }
802
+ return () => handleLegendClick(labelText);
803
+ }, [interactive, handleLegendClick]);
804
+ const createKeyDownHandler = useCallback4((labelText) => {
805
+ if (!interactive) {
806
+ return void 0;
807
+ }
808
+ return (event) => {
809
+ if (event.key === "Enter" || event.key === " ") {
810
+ event.preventDefault();
811
+ handleLegendClick(labelText);
812
+ }
813
+ };
814
+ }, [interactive, handleLegendClick]);
815
+ return render ? render(items) : /* @__PURE__ */ _jsx2(LegendOrdinal, {
816
+ scale: legendScale,
817
+ labelFormat,
818
+ labelTransform,
819
+ children: (labels) => /* @__PURE__ */ _jsx2("div", {
820
+ ref,
821
+ role: "list",
822
+ className: clsx(base_legend_module_default.legend, base_legend_module_default[`legend--${orientation}`], base_legend_module_default[`legend--alignment-${alignment}`], base_legend_module_default[`legend--position-${position}`], className),
823
+ style: {
824
+ flexDirection: orientationToFlexDirection[orientation],
825
+ ...theme.legendContainerStyles
769
826
  },
770
- [interactive, handleLegendClick]
771
- );
772
- return render ? render(items) : /* @__PURE__ */ jsx2(
773
- LegendOrdinal,
774
- {
775
- scale: legendScale,
776
- labelFormat,
777
- labelTransform,
778
- children: (labels) => /* @__PURE__ */ jsx2(
779
- "div",
780
- {
781
- ref,
782
- role: "list",
783
- "data-testid": `legend-${orientation}`,
784
- className: clsx(
785
- base_legend_module_default.legend,
786
- base_legend_module_default[`legend--${orientation}`],
787
- base_legend_module_default[`legend--alignment-${alignment}`],
788
- base_legend_module_default[`legend--position-${position}`],
789
- className
790
- ),
827
+ children: labels.map((label, i) => {
828
+ const visible = isSeriesVisible(label.text);
829
+ const handleClick = createClickHandler(label.text);
830
+ const handleKeyDown = createKeyDownHandler(label.text);
831
+ return /* @__PURE__ */ _jsxs(LegendItem, {
832
+ className: clsx("visx-legend-item", base_legend_module_default["legend-item"], interactive && base_legend_module_default["legend-item--interactive"], !visible && base_legend_module_default["legend-item--inactive"], legendItemClassName),
833
+ margin: itemMargin,
834
+ flexDirection: orientation === "vertical" && alignment === "end" ? "row-reverse" : itemDirection,
835
+ onClick: handleClick,
836
+ onKeyDown: handleKeyDown,
837
+ role: interactive ? "button" : void 0,
838
+ tabIndex: interactive ? 0 : void 0,
839
+ "aria-pressed": interactive ? visible : void 0,
840
+ "aria-label": interactive ? `${label.text}: ${visible ? "visible" : "hidden"}. Toggle visibility.` : void 0,
841
+ ...legendItemProps,
842
+ children: [items[i]?.renderGlyph ? /* @__PURE__ */ _jsx2("svg", {
843
+ width: items[i]?.glyphSize * 2,
844
+ height: items[i]?.glyphSize * 2,
845
+ children: /* @__PURE__ */ _jsx2(Group, {
846
+ children: items[i]?.renderGlyph({
847
+ key: `legend-glyph-${label.text}`,
848
+ datum: {},
849
+ index: i,
850
+ color: fill(label),
851
+ size: items[i]?.glyphSize,
852
+ x: items[i]?.glyphSize,
853
+ y: items[i]?.glyphSize
854
+ })
855
+ })
856
+ }) : /* @__PURE__ */ _jsx2(LegendShape, {
857
+ shape,
858
+ height: shapeHeight,
859
+ width: shapeWidth,
860
+ margin: shapeMargin,
861
+ item: domain[i],
862
+ itemIndex: i,
863
+ label,
864
+ fill,
865
+ size,
866
+ shapeStyle: getShapeStyle
867
+ }), /* @__PURE__ */ _jsxs(LegendLabel, {
868
+ className: clsx("visx-legend-label", base_legend_module_default["legend-item-label"]),
791
869
  style: {
792
- flexDirection: orientationToFlexDirection[orientation],
793
- ...theme.legendContainerStyles
870
+ justifyContent: labelAlign,
871
+ flex: labelFlex,
872
+ margin: labelMargin,
873
+ ...theme.legendLabelStyles
794
874
  },
795
- children: labels.map((label, i) => {
796
- const visible = isSeriesVisible(label.text);
797
- const handleClick = createClickHandler(label.text);
798
- const handleKeyDown = createKeyDownHandler(label.text);
799
- return /* @__PURE__ */ jsxs(
800
- LegendItem,
801
- {
802
- className: clsx(
803
- "visx-legend-item",
804
- base_legend_module_default["legend-item"],
805
- interactive && base_legend_module_default["legend-item--interactive"],
806
- !visible && base_legend_module_default["legend-item--inactive"],
807
- legendItemClassName
808
- ),
809
- "data-testid": "legend-item",
810
- margin: itemMargin,
811
- flexDirection: orientation === "vertical" && alignment === "end" ? "row-reverse" : itemDirection,
812
- onClick: handleClick,
813
- onKeyDown: handleKeyDown,
814
- role: interactive ? "button" : void 0,
815
- tabIndex: interactive ? 0 : void 0,
816
- "aria-pressed": interactive ? visible : void 0,
817
- "aria-label": interactive ? `${label.text}: ${visible ? "visible" : "hidden"}. Toggle visibility.` : void 0,
818
- ...legendItemProps,
819
- children: [
820
- items[i]?.renderGlyph ? /* @__PURE__ */ jsx2(
821
- "svg",
822
- {
823
- width: items[i]?.glyphSize * 2,
824
- height: items[i]?.glyphSize * 2,
825
- "data-testid": "legend-glyph",
826
- children: /* @__PURE__ */ jsx2(Group, { children: items[i]?.renderGlyph({
827
- key: `legend-glyph-${label.text}`,
828
- datum: {},
829
- index: i,
830
- color: fill(label),
831
- size: items[i]?.glyphSize,
832
- x: items[i]?.glyphSize,
833
- y: items[i]?.glyphSize
834
- }) })
835
- }
836
- ) : /* @__PURE__ */ jsx2(
837
- LegendShape,
838
- {
839
- shape,
840
- height: shapeHeight,
841
- width: shapeWidth,
842
- margin: shapeMargin,
843
- item: domain[i],
844
- itemIndex: i,
845
- label,
846
- fill,
847
- size,
848
- shapeStyle: getShapeStyle
849
- }
850
- ),
851
- /* @__PURE__ */ jsxs(
852
- LegendLabel,
853
- {
854
- className: clsx("visx-legend-label", base_legend_module_default["legend-item-label"]),
855
- style: {
856
- justifyContent: labelAlign,
857
- flex: labelFlex,
858
- margin: labelMargin,
859
- ...theme.legendLabelStyles
860
- },
861
- ...legendLabelProps,
862
- children: [
863
- /* @__PURE__ */ jsx2(
864
- LegendText,
865
- {
866
- text: label.text,
867
- textOverflow,
868
- maxWidth
869
- }
870
- ),
871
- items.find((item) => item.label === label.text)?.value && /* @__PURE__ */ jsxs("span", { className: base_legend_module_default["legend-item-value"], children: [
872
- "\xA0",
873
- items.find((item) => item.label === label.text)?.value
874
- ] })
875
- ]
876
- }
877
- )
878
- ]
879
- },
880
- `legend-${label.text}-${i}`
881
- );
882
- })
883
- }
884
- )
885
- }
886
- );
887
- }
888
- );
875
+ ...legendLabelProps,
876
+ children: [/* @__PURE__ */ _jsx2(LegendText, {
877
+ text: label.text,
878
+ textOverflow,
879
+ maxWidth
880
+ }), items.find((item) => item.label === label.text)?.value && /* @__PURE__ */ _jsxs("span", {
881
+ className: base_legend_module_default["legend-item-value"],
882
+ children: ["\xA0", items.find((item) => item.label === label.text)?.value]
883
+ })]
884
+ })]
885
+ }, `legend-${label.text}-${i}`);
886
+ })
887
+ })
888
+ });
889
+ });
889
890
 
890
891
  // src/components/legend/legend.tsx
891
- import { jsx as jsx3 } from "react/jsx-runtime";
892
- var Legend = forwardRef2(
893
- ({ chartId, items, ...props }, ref) => {
894
- const context = useContext5(GlobalChartsContext);
895
- const singleChartContext = useContext5(SingleChartContext);
896
- const contextChartId = chartId ?? singleChartContext?.chartId;
897
- const contextItems = useMemo6(() => {
898
- return contextChartId && context ? context.getChartData(contextChartId)?.legendItems : void 0;
899
- }, [contextChartId, context]);
900
- const legendItems = items || contextItems;
901
- if (!legendItems) {
902
- return null;
903
- }
904
- return /* @__PURE__ */ jsx3(BaseLegend, { ref, items: legendItems, ...props, chartId: contextChartId });
892
+ import { jsx as _jsx3 } from "react/jsx-runtime";
893
+ var Legend = /* @__PURE__ */ forwardRef2(({
894
+ chartId,
895
+ items,
896
+ ...props
897
+ }, ref) => {
898
+ const context = useContext5(GlobalChartsContext);
899
+ const singleChartContext = useContext5(SingleChartContext);
900
+ const contextChartId = chartId ?? singleChartContext?.chartId;
901
+ const contextItems = useMemo6(() => {
902
+ return contextChartId && context ? context.getChartData(contextChartId)?.legendItems : void 0;
903
+ }, [contextChartId, context]);
904
+ const legendItems = items || contextItems;
905
+ if (!legendItems) {
906
+ return null;
905
907
  }
906
- );
908
+ return /* @__PURE__ */ _jsx3(BaseLegend, {
909
+ ref,
910
+ items: legendItems,
911
+ ...props,
912
+ chartId: contextChartId
913
+ });
914
+ });
907
915
 
908
916
  // src/components/legend/hooks/use-chart-legend-items.ts
909
917
  import { formatNumber } from "@automattic/number-formatters";
@@ -1144,12 +1152,12 @@ var useInteractiveLegendData = ({
1144
1152
  };
1145
1153
 
1146
1154
  // src/hooks/use-prefers-reduced-motion.ts
1147
- import { useState as useState4, useEffect as useEffect3 } from "react";
1155
+ import { useState as useState4, useEffect as useEffect4 } from "react";
1148
1156
  var QUERY = "(prefers-reduced-motion: no-preference)";
1149
1157
  var getInitialState = () => !window.matchMedia(QUERY).matches;
1150
1158
  function usePrefersReducedMotion() {
1151
1159
  const [prefersReducedMotion, setPrefersReducedMotion] = useState4(getInitialState);
1152
- useEffect3(() => {
1160
+ useEffect4(() => {
1153
1161
  const mediaQueryList = window.matchMedia(QUERY);
1154
1162
  const listener = (event) => {
1155
1163
  setPrefersReducedMotion(!event.matches);
@@ -1165,6 +1173,7 @@ function usePrefersReducedMotion() {
1165
1173
  export {
1166
1174
  SingleChartContext,
1167
1175
  useSingleChartContext,
1176
+ useTooltipPortalRelocator,
1168
1177
  defaultTheme,
1169
1178
  GlobalChartsContext,
1170
1179
  GlobalChartsProvider,
@@ -1186,4 +1195,4 @@ export {
1186
1195
  Legend,
1187
1196
  useChartLegendItems
1188
1197
  };
1189
- //# sourceMappingURL=chunk-H34CJSR6.js.map
1198
+ //# sourceMappingURL=chunk-AWNCAKZY.js.map