@automattic/charts 2.0.1 → 3.0.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 (67) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/TOKENS.md +107 -48
  3. package/dist/index.cjs +294 -110
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +97 -43
  6. package/dist/index.d.cts +40 -35
  7. package/dist/index.d.ts +40 -35
  8. package/dist/index.js +292 -111
  9. package/dist/index.js.map +1 -1
  10. package/package.json +1 -1
  11. package/src/charts/area-chart/area-chart.module.scss +8 -3
  12. package/src/charts/area-chart/area-chart.tsx +1 -1
  13. package/src/charts/bar-chart/bar-chart.module.scss +14 -6
  14. package/src/charts/conversion-funnel-chart/conversion-funnel-chart.module.scss +17 -12
  15. package/src/charts/conversion-funnel-chart/conversion-funnel-chart.tsx +107 -86
  16. package/src/charts/conversion-funnel-chart/test/chart-scope.test.tsx +36 -0
  17. package/src/charts/geo-chart/geo-chart.tsx +12 -4
  18. package/src/charts/heatmap-chart/heatmap-chart.module.scss +13 -9
  19. package/src/charts/heatmap-chart/heatmap-chart.tsx +12 -5
  20. package/src/charts/leaderboard-chart/leaderboard-chart.module.scss +13 -7
  21. package/src/charts/leaderboard-chart/types.ts +0 -2
  22. package/src/charts/line-chart/line-chart.module.scss +10 -5
  23. package/src/charts/line-chart/line-chart.tsx +1 -1
  24. package/src/charts/line-chart/private/line-chart-annotation.tsx +4 -4
  25. package/src/charts/pie-chart/pie-chart.tsx +4 -1
  26. package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.tsx +4 -1
  27. package/src/charts/private/svg-empty-state/svg-empty-state.module.scss +1 -1
  28. package/src/charts/private/with-responsive/test/with-responsive.test.tsx +16 -0
  29. package/src/charts/private/with-responsive/with-responsive.tsx +18 -11
  30. package/src/charts/private/x-zoom/x-zoom.module.scss +3 -3
  31. package/src/components/legend/private/base-legend.tsx +3 -1
  32. package/src/components/tooltip/accessible-tooltip.tsx +4 -2
  33. package/src/components/tooltip/base-tooltip.tsx +8 -1
  34. package/src/components/trend-indicator/test/trend-indicator.test.tsx +20 -0
  35. package/src/components/trend-indicator/trend-indicator.module.scss +3 -6
  36. package/src/components/trend-indicator/trend-indicator.tsx +3 -0
  37. package/src/hooks/test/use-xychart-theme-provider-override.test.tsx +28 -0
  38. package/src/hooks/test/use-xychart-theme-style-reads.test.tsx +19 -13
  39. package/src/hooks/test/use-xychart-theme.test.tsx +25 -0
  40. package/src/hooks/use-xychart-theme.ts +6 -4
  41. package/src/index.ts +9 -2
  42. package/src/providers/chart-context/global-charts-provider.tsx +35 -12
  43. package/src/providers/chart-context/private/theme-override-vars.ts +87 -0
  44. package/src/providers/chart-context/private/with-catalog-pointers.ts +50 -0
  45. package/src/providers/chart-context/test/chart-context.test.tsx +0 -40
  46. package/src/providers/chart-context/test/chart-scope-class.test.tsx +19 -0
  47. package/src/providers/chart-context/test/sparse-theme.test.ts +35 -0
  48. package/src/providers/chart-context/test/theme-override-vars-guard.test.tsx +29 -0
  49. package/src/providers/chart-context/test/theme-override-vars.test.ts +118 -0
  50. package/src/providers/chart-context/test/with-catalog-pointers.test.ts +47 -0
  51. package/src/providers/chart-context/themes.ts +18 -27
  52. package/src/providers/chart-context/types.ts +0 -3
  53. package/src/providers/chart-scope/chart-scope-context.ts +8 -0
  54. package/src/providers/chart-scope/index.ts +3 -0
  55. package/src/providers/chart-scope/test/chart-scope.test.tsx +24 -0
  56. package/src/providers/chart-scope/test/use-standalone-scope-class.test.tsx +20 -0
  57. package/src/providers/chart-scope/use-chart-scope-element.ts +9 -0
  58. package/src/providers/chart-scope/use-standalone-scope-class.ts +13 -0
  59. package/src/providers/index.ts +1 -0
  60. package/src/styles/chart-scope-class.ts +6 -0
  61. package/src/styles/chart-scope.scss +83 -0
  62. package/src/styles/test/chart-scope.test.ts +165 -0
  63. package/src/types.ts +0 -34
  64. package/src/charts/private/grid-control/grid-control.module.scss +0 -8
  65. package/src/charts/private/grid-control/grid-control.tsx +0 -26
  66. package/src/charts/private/grid-control/index.ts +0 -1
  67. package/src/charts/private/grid-control/test/grid-control.test.tsx +0 -56
package/dist/index.css CHANGED
@@ -1,3 +1,39 @@
1
+ :where(.a8c-charts-scope) {
2
+ --a8c-charts-color-grid: var(--a8c-charts-color-grid-theme, var(--wpds-color-stroke-surface-neutral, #dbdbdb));
3
+ --a8c-charts-color-axis: var(--a8c-charts-color-axis-theme, var(--wpds-color-stroke-surface-neutral, #dbdbdb));
4
+ --a8c-charts-color-tick: var(--a8c-charts-color-tick-theme, var(--wpds-color-stroke-surface-neutral, #dbdbdb));
5
+ --a8c-charts-color-label: var(--wpds-color-foreground-content-neutral, #1e1e1e);
6
+ --a8c-charts-color-label-secondary: var(--wpds-color-foreground-content-neutral-weak, #707070);
7
+ --a8c-charts-color-label-inverse: var(--wpds-color-foreground-interactive-neutral-strong, #f0f0f0);
8
+ --a8c-charts-color-label-on-fill: #fff;
9
+ --a8c-charts-color-label-axis: var(--a8c-charts-color-label-axis-theme, var(--a8c-charts-color-label));
10
+ --a8c-charts-color-annotation: var(--wpds-color-foreground-content-neutral, #1e1e1e);
11
+ --a8c-charts-color-trend-up: var(--wpds-color-foreground-content-success-weak, #008030);
12
+ --a8c-charts-color-trend-down: var(--wpds-color-foreground-content-error-weak, #cc1818);
13
+ --a8c-charts-color-trend-neutral: var(--wpds-color-foreground-content-neutral-weak, #707070);
14
+ --a8c-charts-color-background: var(--a8c-charts-color-background-theme, var(--wpds-color-background-surface-neutral-strong, #fff));
15
+ --a8c-charts-color-surface: var(--wpds-color-background-surface-neutral-strong, #fff);
16
+ --a8c-charts-color-surface-secondary: var(--wpds-color-background-surface-neutral-weak, #f4f4f4);
17
+ --a8c-charts-color-track: var(--wpds-color-background-track-neutral-weak, #f0f0f0);
18
+ --a8c-charts-color-tooltip-surface: rgb(0 0 0 / 85%);
19
+ --a8c-charts-color-zoom-selection: var(--wpds-color-background-interactive-brand-strong, #3858e9);
20
+ --a8c-charts-color-zoom-selection-stroke: var(--wpds-color-stroke-interactive-brand, #3858e9);
21
+ --a8c-charts-elevation-xs:
22
+ 0 1px 1px 0 #00000008,
23
+ 0 1px 2px 0 #00000005,
24
+ 0 3px 3px 0 #00000005,
25
+ 0 4px 4px 0 #00000003;
26
+ --a8c-charts-elevation-sm:
27
+ 0 1px 2px 0 #0000000d,
28
+ 0 2px 3px 0 #0000000a,
29
+ 0 6px 6px 0 #00000008,
30
+ 0 8px 8px 0 #00000005;
31
+ --a8c-charts-motion-duration-entrance: var(--wpds-motion-duration-xl, 400ms);
32
+ --a8c-charts-motion-easing-entrance: var(--wpds-motion-easing-expressive, cubic-bezier(0.25, 0, 0, 1));
33
+ --a8c-charts-border-radius-bar: var(--wpds-border-radius-md, 4px);
34
+ --a8c-charts-border-radius-cell: var(--wpds-border-radius-sm, 2px);
35
+ --a8c-charts-border-radius-leaderboard-bar: 9999px;
36
+ }
1
37
  .a8ccharts-04TogW-legend {
2
38
  align-self: stretch;
3
39
  }
@@ -79,7 +115,7 @@
79
115
  .a8ccharts-udGPVq-svg-empty-state {
80
116
  text-align: center;
81
117
  font-size: var(--wpds-typography-font-size-md, 13px);
82
- color: var(--a8c-charts-color-label-secondary, var(--wpds-color-foreground-content-neutral-weak, #707070));
118
+ color: var(--a8c-charts-color-label-secondary);
83
119
  }
84
120
  .a8ccharts-sP1gHa-container {
85
121
  width: 100%;
@@ -100,9 +136,9 @@
100
136
  min-height: 0;
101
137
  }
102
138
  .a8ccharts-ur9dWW-x-zoom__selection {
103
- fill: var(--a8c-charts-color-zoom-selection, var(--wpds-color-background-interactive-brand-strong, #3858e9));
139
+ fill: var(--a8c-charts-color-zoom-selection);
104
140
  fill-opacity: .16;
105
- stroke: var(--a8c-charts-color-zoom-selection-stroke, var(--wpds-color-stroke-interactive-brand, #3858e9));
141
+ stroke: var(--a8c-charts-color-zoom-selection-stroke);
106
142
  stroke-opacity: .65;
107
143
  stroke-width: var(--wpds-border-width-xs, 1px);
108
144
  pointer-events: none;
@@ -117,7 +153,7 @@
117
153
  }
118
154
 
119
155
  .a8ccharts-ur9dWW-x-zoom__reset:not(:hover, :active, :focus) {
120
- background-color: var(--a8c-charts-color-background, var(--wpds-color-background-surface-neutral-strong, #fff));
156
+ background-color: var(--a8c-charts-color-surface);
121
157
  }
122
158
  .a8ccharts-inuQka-line-chart {
123
159
  position: relative;
@@ -125,8 +161,7 @@
125
161
 
126
162
  .a8ccharts-inuQka-line-chart--animated path {
127
163
  transform-origin: 0 95%;
128
- animation: a8ccharts-inuQka-rise var(--wpds-motion-duration-xl, .4s) var(--wpds-motion-easing-expressive, cubic-bezier(.25, 0, 0, 1)) forwards;
129
- transform: scaleY(0);
164
+ animation: a8ccharts-inuQka-rise var(--a8c-charts-motion-duration-entrance) var(--a8c-charts-motion-easing-entrance) both;
130
165
  }
131
166
 
132
167
  .a8ccharts-inuQka-line-chart svg {
@@ -134,8 +169,8 @@
134
169
  }
135
170
 
136
171
  .a8ccharts-inuQka-line-chart__tooltip, .a8ccharts-inuQka-line-chart__annotation-label-popover {
137
- background: var(--a8c-charts-color-background, var(--wpds-color-background-surface-neutral-strong, #fff));
138
- color: var(--a8c-charts-color-label, var(--wpds-color-foreground-content-neutral, #1e1e1e));
172
+ background: var(--a8c-charts-color-surface);
173
+ color: var(--a8c-charts-color-label);
139
174
  padding: var(--wpds-dimension-padding-sm, 8px);
140
175
  }
141
176
 
@@ -218,6 +253,10 @@
218
253
  }
219
254
 
220
255
  @keyframes a8ccharts-inuQka-rise {
256
+ from {
257
+ transform: scaleY(0);
258
+ }
259
+
221
260
  to {
222
261
  transform: scaleY(1);
223
262
  }
@@ -228,8 +267,7 @@
228
267
 
229
268
  .a8ccharts-jlynaq-area-chart--animated path {
230
269
  transform-origin: 0 95%;
231
- animation: a8ccharts-jlynaq-rise var(--wpds-motion-duration-xl, .4s) var(--wpds-motion-easing-expressive, cubic-bezier(.25, 0, 0, 1)) forwards;
232
- transform: scaleY(0);
270
+ animation: a8ccharts-jlynaq-rise var(--a8c-charts-motion-duration-entrance) var(--a8c-charts-motion-easing-entrance) both;
233
271
  }
234
272
 
235
273
  .a8ccharts-jlynaq-area-chart svg {
@@ -237,6 +275,10 @@
237
275
  }
238
276
 
239
277
  @keyframes a8ccharts-jlynaq-rise {
278
+ from {
279
+ transform: scaleY(0);
280
+ }
281
+
240
282
  to {
241
283
  transform: scaleY(1);
242
284
  }
@@ -248,11 +290,14 @@
248
290
  .a8ccharts-97yN9W-bar-chart--animated rect {
249
291
  transform-origin: bottom;
250
292
  transform-box: fill-box;
251
- animation: a8ccharts-97yN9W-rise var(--wpds-motion-duration-xl, .4s) var(--wpds-motion-easing-expressive, cubic-bezier(.25, 0, 0, 1)) forwards;
252
- transform: scaleY(0);
293
+ animation: a8ccharts-97yN9W-rise var(--a8c-charts-motion-duration-entrance) var(--a8c-charts-motion-easing-entrance) both;
253
294
  }
254
295
 
255
296
  @keyframes a8ccharts-97yN9W-rise {
297
+ from {
298
+ transform: scaleY(0);
299
+ }
300
+
256
301
  to {
257
302
  transform: scaleY(1);
258
303
  }
@@ -261,11 +306,14 @@
261
306
  .a8ccharts-97yN9W-bar-chart--animated-horizontal rect {
262
307
  transform-origin: 0;
263
308
  transform-box: fill-box;
264
- animation: a8ccharts-97yN9W-stretch var(--wpds-motion-duration-xl, .4s) var(--wpds-motion-easing-expressive, cubic-bezier(.25, 0, 0, 1)) forwards;
265
- transform: scaleX(0);
309
+ animation: a8ccharts-97yN9W-stretch var(--a8c-charts-motion-duration-entrance) var(--a8c-charts-motion-easing-entrance) both;
266
310
  }
267
311
 
268
312
  @keyframes a8ccharts-97yN9W-stretch {
313
+ from {
314
+ transform: scaleX(0);
315
+ }
316
+
269
317
  to {
270
318
  transform: scaleX(1);
271
319
  }
@@ -280,7 +328,7 @@
280
328
  }
281
329
 
282
330
  .a8ccharts-mGEVca-main-rate {
283
- color: var(--a8c-charts-color-label, var(--wpds-color-foreground-content-neutral, #1e1e1e));
331
+ color: var(--a8c-charts-color-label);
284
332
  text-overflow: ellipsis;
285
333
  font-size: var(--wpds-typography-font-size-xl, 18px);
286
334
  font-style: normal;
@@ -321,7 +369,7 @@
321
369
  }
322
370
 
323
371
  .a8ccharts-mGEVca-step-label {
324
- color: var(--a8c-charts-color-label-secondary, var(--wpds-color-foreground-content-neutral-weak, #707070));
372
+ color: var(--a8c-charts-color-label-secondary);
325
373
  font-size: var(--wpds-typography-font-size-sm, 12px);
326
374
  font-weight: var(--wpds-typography-font-weight-default, 400);
327
375
  line-height: var(--wpds-typography-line-height-xs, 16px);
@@ -331,21 +379,21 @@
331
379
  }
332
380
 
333
381
  .a8ccharts-mGEVca-step-rate {
334
- color: var(--a8c-charts-color-label, var(--wpds-color-foreground-content-neutral, #1e1e1e));
382
+ color: var(--a8c-charts-color-label);
335
383
  font-size: var(--wpds-typography-font-size-md, 13px);
336
384
  font-weight: var(--wpds-typography-font-weight-emphasis, 499);
337
385
  line-height: var(--wpds-typography-line-height-xs, 16px);
338
386
  }
339
387
 
340
388
  .a8ccharts-mGEVca-bar-container {
341
- border-radius: var(--wpds-border-radius-md, 4px);
389
+ border-radius: var(--a8c-charts-border-radius-bar);
342
390
  cursor: pointer;
343
391
  flex: 1;
344
392
  position: relative;
345
393
  }
346
394
 
347
395
  .a8ccharts-mGEVca-funnel-bar {
348
- border-radius: var(--wpds-border-radius-md, 4px) var(--wpds-border-radius-md, 4px) 0 0;
396
+ border-radius: var(--a8c-charts-border-radius-bar) var(--a8c-charts-border-radius-bar) 0 0;
349
397
  width: 100%;
350
398
  min-height: 4px;
351
399
  }
@@ -353,25 +401,28 @@
353
401
  .a8ccharts-mGEVca-funnel-bar--animated {
354
402
  transform-origin: bottom;
355
403
  transform-box: fill-box;
356
- animation: a8ccharts-mGEVca-stretch var(--wpds-motion-duration-xl, .4s) var(--wpds-motion-easing-expressive, cubic-bezier(.25, 0, 0, 1)) forwards;
357
- transform: scaleY(0);
404
+ animation: a8ccharts-mGEVca-stretch var(--a8c-charts-motion-duration-entrance) var(--a8c-charts-motion-easing-entrance) both;
358
405
  }
359
406
 
360
407
  @keyframes a8ccharts-mGEVca-stretch {
408
+ from {
409
+ transform: scaleY(0);
410
+ }
411
+
361
412
  to {
362
413
  transform: scaleY(1);
363
414
  }
364
415
  }
365
416
 
366
417
  .a8ccharts-mGEVca-tooltip-wrapper {
367
- background: var(--a8c-charts-color-background, var(--wpds-color-background-surface-neutral-strong, #fff));
418
+ background: var(--a8c-charts-color-surface);
368
419
  border-radius: var(--wpds-border-radius-md, 4px) !important;
369
420
  padding: var(--wpds-dimension-padding-md, 12px) !important;
370
421
  box-shadow: var(--a8c-charts-elevation-sm, 0 1px 2px 0 #0000000d, 0 2px 3px 0 #0000000a, 0 6px 6px 0 #00000008, 0 8px 8px 0 #00000005) !important;
371
422
  }
372
423
 
373
424
  .a8ccharts-mGEVca-tooltip-title {
374
- color: var(--a8c-charts-color-label, var(--wpds-color-foreground-content-neutral, #1e1e1e));
425
+ color: var(--a8c-charts-color-label);
375
426
  font-size: var(--wpds-typography-font-size-sm, 12px);
376
427
  font-style: normal;
377
428
  font-weight: var(--wpds-typography-font-weight-default, 400);
@@ -379,7 +430,7 @@
379
430
  }
380
431
 
381
432
  .a8ccharts-mGEVca-tooltip-content {
382
- color: var(--a8c-charts-color-label, var(--wpds-color-foreground-content-neutral, #1e1e1e));
433
+ color: var(--a8c-charts-color-label);
383
434
  font-size: var(--wpds-typography-font-size-md, 13px);
384
435
  font-style: normal;
385
436
  font-weight: var(--wpds-typography-font-weight-emphasis, 499);
@@ -388,7 +439,7 @@
388
439
 
389
440
  .a8ccharts-mGEVca-empty-state {
390
441
  text-align: center;
391
- color: var(--a8c-charts-color-label-secondary, var(--wpds-color-foreground-content-neutral-weak, #707070));
442
+ color: var(--a8c-charts-color-label-secondary);
392
443
  font-size: var(--wpds-typography-font-size-lg, 16px);
393
444
  }
394
445
  .a8ccharts-8hS2IW-container {
@@ -407,7 +458,7 @@
407
458
 
408
459
  .a8ccharts-O3YMOW-heatmap-chart__empty {
409
460
  padding: var(--wpds-dimension-padding-lg, 16px);
410
- color: var(--a8c-charts-color-label-secondary, var(--wpds-color-foreground-content-neutral-weak, #707070));
461
+ color: var(--a8c-charts-color-label-secondary);
411
462
  }
412
463
 
413
464
  .a8ccharts-O3YMOW-heatmap-chart__grid {
@@ -419,7 +470,7 @@
419
470
  }
420
471
 
421
472
  .a8ccharts-O3YMOW-heatmap-chart__grid:focus-visible {
422
- outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--a8c-charts-color-focus, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
473
+ outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9));
423
474
  outline-offset: 2px;
424
475
  border-radius: var(--wpds-border-radius-sm, 2px);
425
476
  }
@@ -442,7 +493,7 @@
442
493
  }
443
494
 
444
495
  .a8ccharts-O3YMOW-heatmap-chart__col-label, .a8ccharts-O3YMOW-heatmap-chart__row-label {
445
- color: var(--a8c-charts-color-label-secondary, var(--wpds-color-foreground-content-neutral-weak, #707070));
496
+ color: var(--a8c-charts-color-label-secondary);
446
497
  font-size: var(--wpds-typography-font-size-xs, 11px);
447
498
  white-space: nowrap;
448
499
  overflow: visible;
@@ -460,8 +511,8 @@
460
511
  }
461
512
 
462
513
  .a8ccharts-O3YMOW-heatmap-chart__cell {
463
- border-radius: var(--wpds-border-radius-sm, 2px);
464
- background: var(--a8c-charts-color-track, var(--wpds-color-background-track-neutral-weak, #f0f0f0));
514
+ border-radius: var(--a8c-charts-border-radius-cell);
515
+ background: var(--a8c-charts-color-track);
465
516
  justify-content: center;
466
517
  align-items: center;
467
518
  min-width: 0;
@@ -479,23 +530,23 @@
479
530
  }
480
531
 
481
532
  .a8ccharts-O3YMOW-heatmap-chart__cell--selected {
482
- outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--a8c-charts-color-focus, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
533
+ outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9));
483
534
  outline-offset: calc(-1 * var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)));
484
535
  }
485
536
 
486
537
  .a8ccharts-O3YMOW-heatmap-chart__cell-value {
487
- color: var(--a8c-charts-color-label, var(--wpds-color-foreground-content-neutral, #1e1e1e));
538
+ color: var(--a8c-charts-color-label);
488
539
  font-size: var(--wpds-typography-font-size-md, 13px);
489
540
  }
490
541
 
491
542
  .a8ccharts-O3YMOW-heatmap-chart__cell--strong .a8ccharts-O3YMOW-heatmap-chart__cell-value {
492
- color: var(--a8c-charts-color-label-inverse, var(--wpds-color-foreground-interactive-neutral-strong, #f0f0f0));
543
+ color: var(--a8c-charts-color-label-inverse);
493
544
  }
494
545
 
495
546
  .a8ccharts-O3YMOW-heatmap-chart__legend-swatch {
496
547
  width: var(--wpds-dimension-size-3xs, 12px);
497
548
  height: var(--wpds-dimension-size-3xs, 12px);
498
- border-radius: var(--wpds-border-radius-sm, 2px);
549
+ border-radius: var(--a8c-charts-border-radius-cell);
499
550
  background: color-mix(in sRGB, var(--a8c-charts-color-heatmap-primary) calc((.15 + .85 * var(--a8c-charts-heatmap-cell-intensity)) * 100%), var(--a8c-charts-color-heatmap-background, #fff));
500
551
  }
501
552
  .a8ccharts-GovfoW-leaderboardChart {
@@ -547,18 +598,21 @@
547
598
  height: 100%;
548
599
  min-height: 6px;
549
600
  min-width: var(--wpds-dimension-size-5xs, 4px);
550
- border-radius: var(--a8c-charts-border-radius-leaderboard-bar, var(--a8c--charts--leaderboard--bar--border-radius, 9999px));
601
+ border-radius: var(--a8c-charts-border-radius-leaderboard-bar);
551
602
  z-index: -1;
552
603
  }
553
604
 
554
605
  .a8ccharts-GovfoW-barWithLabelContainer .a8ccharts-GovfoW-bar--animated {
555
606
  transform-origin: 0;
556
607
  transform-box: fill-box;
557
- animation: a8ccharts-GovfoW-stretch var(--wpds-motion-duration-xl, .4s) var(--wpds-motion-easing-expressive, cubic-bezier(.25, 0, 0, 1)) forwards;
558
- transform: scaleX(0);
608
+ animation: a8ccharts-GovfoW-stretch var(--a8c-charts-motion-duration-entrance) var(--a8c-charts-motion-easing-entrance) both;
559
609
  }
560
610
 
561
611
  @keyframes a8ccharts-GovfoW-stretch {
612
+ from {
613
+ transform: scaleX(0);
614
+ }
615
+
562
616
  to {
563
617
  transform: scaleX(1);
564
618
  }
@@ -587,7 +641,7 @@
587
641
  .a8ccharts-GovfoW-emptyState {
588
642
  padding: var(--wpds-dimension-padding-3xl, 32px) var(--wpds-dimension-padding-lg, 16px);
589
643
  text-align: center;
590
- color: var(--a8c-charts-color-label-secondary, var(--wpds-color-foreground-content-neutral-weak, #707070));
644
+ color: var(--a8c-charts-color-label-secondary);
591
645
  font-size: var(--wpds-typography-font-size-md, 13px);
592
646
  font-style: italic;
593
647
  }
@@ -650,14 +704,14 @@
650
704
 
651
705
  .a8ccharts-GovfoW-interactiveRow:focus-visible {
652
706
  border-radius: var(--wpds-border-radius-sm, 2px);
653
- outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--a8c-charts-color-focus, var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9)));
707
+ outline: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)) solid var(--wpds-color-stroke-focus, var(--wp-admin-theme-color, #3858e9));
654
708
  outline-offset: calc(-1 * var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px)));
655
709
  }
656
710
 
657
711
  .a8ccharts-GovfoW-chevron {
658
712
  inset-inline-end: var(--wpds-dimension-padding-xs, 4px);
659
713
  opacity: 0;
660
- color: var(--a8c-charts-color-label-secondary, var(--wpds-color-foreground-content-neutral-weak, #707070));
714
+ color: var(--a8c-charts-color-label-secondary);
661
715
  transition: opacity var(--wpds-motion-duration-sm, .1s) var(--wpds-motion-easing-subtle, cubic-bezier(.15, 0, .15, 1));
662
716
  pointer-events: none;
663
717
  margin-block: auto;
@@ -724,15 +778,15 @@
724
778
  }
725
779
 
726
780
  .a8ccharts-zR7F7G-trend-indicator--up {
727
- color: var(--a8c-charts-color-trend-up, var(--charts-trend-up-color, var(--wpds-color-foreground-content-success-weak, #008030)));
781
+ color: var(--a8c-charts-color-trend-up);
728
782
  }
729
783
 
730
784
  .a8ccharts-zR7F7G-trend-indicator--down {
731
- color: var(--a8c-charts-color-trend-down, var(--charts-trend-down-color, var(--wpds-color-foreground-content-error-weak, #cc1818)));
785
+ color: var(--a8c-charts-color-trend-down);
732
786
  }
733
787
 
734
788
  .a8ccharts-zR7F7G-trend-indicator--neutral {
735
- color: var(--a8c-charts-color-trend-neutral, var(--charts-trend-neutral-color, var(--wpds-color-foreground-content-neutral-weak, #707070)));
789
+ color: var(--a8c-charts-color-trend-neutral);
736
790
  }
737
791
 
738
792
  .a8ccharts-zR7F7G-trend-indicator__icon {
package/dist/index.d.cts CHANGED
@@ -604,37 +604,6 @@ type BaseChartProps<T = DataPoint | DataPointDate | LeaderboardEntry> = {
604
604
  };
605
605
  };
606
606
  };
607
- /**
608
- * Properties for grid components
609
- */
610
- type GridProps = {
611
- /**
612
- * Width of the grid in pixels
613
- */
614
- width: number;
615
- /**
616
- * Height of the grid in pixels
617
- */
618
- height: number;
619
- /**
620
- * Grid visibility. x is default.
621
- */
622
- gridVisibility?: 'x' | 'y' | 'xy' | 'none';
623
- /**
624
- * X-axis scale for the grid
625
- * TODO: Fix any type after resolving visx scale type issues
626
- */
627
- xScale: any;
628
- /**
629
- * Y-axis scale for the grid
630
- * TODO: Fix any type after resolving visx scale type issues
631
- */
632
- yScale: any;
633
- /**
634
- * Top offset for the grid
635
- */
636
- top?: number;
637
- };
638
607
  //#endregion
639
608
  //#region src/components/legend/types.d.ts
640
609
  type VisxLegendProps = Pick<ComponentProps<typeof LegendOrdinal>, 'className' | 'shape' | 'fill' | 'size' | 'labelFormat' | 'labelTransform'>;
@@ -1310,8 +1279,7 @@ interface LeaderboardChartProps extends Pick<BaseChartProps<LeaderboardEntry>, '
1310
1279
  * Custom styling for the chart container
1311
1280
  */
1312
1281
  style?: React.CSSProperties & {
1313
- '--a8c-charts-border-radius-leaderboard-bar'?: string; /** @deprecated Use `--a8c-charts-border-radius-leaderboard-bar`. */
1314
- '--a8c--charts--leaderboard--bar--border-radius'?: string;
1282
+ '--a8c-charts-border-radius-leaderboard-bar'?: string;
1315
1283
  };
1316
1284
  /**
1317
1285
  * Custom labels for legend items
@@ -1560,6 +1528,21 @@ declare const relativeLuminance: (hex: string) => number;
1560
1528
  */
1561
1529
  declare const prefersLightText: (backgroundHex: string) => boolean;
1562
1530
  //#endregion
1531
+ //#region src/utils/resolve-css-var.d.ts
1532
+ /**
1533
+ * Resolves a CSS custom property (variable) to its computed value.
1534
+ * Handles multiple formats:
1535
+ * - Plain variable names: '--my-color'
1536
+ * - CSS var() syntax: 'var(--my-color)'
1537
+ * - CSS var() with fallback: 'var(--my-color, #ffffff)'
1538
+ * - Regular values (returned as-is): '#ffffff', 'red'
1539
+ *
1540
+ * @param value - A CSS variable name, var() expression, or regular value
1541
+ * @param element - Optional DOM element to resolve the variable from (defaults to document.documentElement)
1542
+ * @return The resolved value, fallback value, or null if unresolvable
1543
+ */
1544
+ declare const resolveCssVariable: (value: string, element?: HTMLElement | null) => string | null;
1545
+ //#endregion
1563
1546
  //#region src/charts/leaderboard-chart/hooks/use-leaderboard-legend-items.d.ts
1564
1547
  /**
1565
1548
  * Hook to create legend items from leaderboard data
@@ -2042,7 +2025,6 @@ interface GlobalChartsContextValue {
2042
2025
  getChartData: (id: string) => ChartRegistration | undefined;
2043
2026
  theme: CompleteChartTheme;
2044
2027
  getElementStyles: (params: GetElementStylesParams) => ElementStyles;
2045
- resolveThemeColor: (value: string) => string;
2046
2028
  toggleSeriesVisibility: (chartId: string, seriesLabel: string) => void;
2047
2029
  isSeriesVisible: (chartId: string, seriesLabel: string) => boolean;
2048
2030
  getHiddenSeries: (chartId: string) => Set<string>;
@@ -2060,6 +2042,21 @@ declare const GlobalChartsProvider: FC<GlobalChartsProviderProps>;
2060
2042
  //#region src/providers/chart-context/hooks/use-global-charts-context.d.ts
2061
2043
  declare const useGlobalChartsContext: () => GlobalChartsContextValue;
2062
2044
  //#endregion
2045
+ //#region src/providers/chart-context/hooks/use-chart-registration.d.ts
2046
+ declare const useChartRegistration: ({
2047
+ chartId,
2048
+ legendItems,
2049
+ chartType,
2050
+ isDataValid,
2051
+ metadata
2052
+ }: {
2053
+ chartId: string;
2054
+ legendItems: BaseLegendItem[];
2055
+ chartType: ChartType;
2056
+ isDataValid: boolean;
2057
+ metadata?: Record<string, unknown>;
2058
+ }) => void;
2059
+ //#endregion
2063
2060
  //#region src/providers/chart-context/hooks/use-global-charts-theme.d.ts
2064
2061
  /**
2065
2062
  * Hook to get the global chart theme from GlobalChartsProvider
@@ -2074,5 +2071,13 @@ declare const useGlobalChartsTheme: () => CompleteChartTheme;
2074
2071
  */
2075
2072
  declare const defaultTheme: CompleteChartTheme;
2076
2073
  //#endregion
2077
- export { AccessibleTooltip, type AnnotationStyles, type ArcData, AreaChartResponsive as AreaChart, type AreaChartProps, AreaChart as AreaChartUnresponsive, type AxisOptions, BarChartResponsive as BarChart, type BarChartProps, BarChart as BarChartUnresponsive, BarListChartResponsive as BarListChart, type BarListChartProps, BarListChart as BarListChartUnresponsive, type BaseChartProps, type BaseLegendItem, type BaseLegendProps, BaseTooltip, type BaseTooltipProps, type CalendarHeatmapResult, type ChartLegendConfig, type ChartLegendOptions, type ChartTheme, type CompleteChartTheme, ConversionFunnelChartWithProvider as ConversionFunnelChart, type ConversionFunnelChartProps, type CurveType, type DataPoint, type DataPointDate, type DataPointPercentage, type EventHandlerParams, type FunnelStep, GeoChartResponsive as GeoChart, type GeoChartError, type GeoChartProps, GeoChartWithProvider as GeoChartUnresponsive, type GeoData, type GeoRegion, type GeoResolution, GlobalChartsContext, GlobalChartsProvider, GlobalChartsProvider as ThemeProvider, type GoogleDataTableColumn, type GoogleDataTableColumnRoleType, type GoogleDataTableRow, type GradientConfig, type GradientStop, type GridProps, type GridStyles, type HeatmapCell, HeatmapChartResponsive as HeatmapChart, type HeatmapChartProps, HeatmapChart as HeatmapChartUnresponsive, type HeatmapColumn, type HeatmapTooltipData, LeaderboardChartResponsive as LeaderboardChart, type LeaderboardChartProps, LeaderboardChart as LeaderboardChartUnresponsive, type LeaderboardEntry, Legend, type LegendItemStyles, type LegendLabelStyles, type LegendPosition, type LegendProps, type LegendShape, type LegendShapeLabel, type LegendShapeRenderProps, type LegendShapeStyles, type LegendValueDisplay, LineChartResponsive as LineChart, type LineChartAnnotationProps, type LineChartProps, LineChart as LineChartUnresponsive, type LineStyles, type MainMetricRenderProps, type MetricValueType, type MultipleDataPointsDate, type Optional, type OrientationType, PieChartResponsive as PieChart, type PieChartProps, type PieChartRenderTooltipParams, PieChart as PieChartUnresponsive, PieSemiCircleChartResponsive as PieSemiCircleChart, type PieSemiCircleChartProps, type PieSemiCircleChartRenderTooltipParams, PieSemiCircleChart as PieSemiCircleChartUnresponsive, type RenderLabelProps, type RenderLineGlyphProps, type RenderTooltipGlyphProps, type RenderTooltipParams, type RenderValueProps, type ScaleOptions, type SeriesChartLegendConfig, type SeriesData, type SeriesDataOptions, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, type TickResolution, type TooltipData, type TooltipDatum, type TooltipProps, type TooltipRenderProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type XyChartTooltipProps, buildCalendarHeatmapData, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, mixHexColors, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, prefersLightText, relativeLuminance, useChartLegendItems, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
2074
+ //#region src/providers/chart-scope/use-chart-scope-element.d.ts
2075
+ /**
2076
+ * Returns the nearest chart scope element, or `null` when rendered outside any scope (and during SSR, before the ref is attached).
2077
+ *
2078
+ * @return {HTMLElement | null} The nearest chart scope element, or `null`.
2079
+ */
2080
+ declare const useChartScopeElement: () => HTMLElement | null;
2081
+ //#endregion
2082
+ export { AccessibleTooltip, type AnnotationStyles, type ArcData, AreaChartResponsive as AreaChart, type AreaChartProps, AreaChart as AreaChartUnresponsive, type AxisOptions, BarChartResponsive as BarChart, type BarChartProps, BarChart as BarChartUnresponsive, BarListChartResponsive as BarListChart, type BarListChartProps, BarListChart as BarListChartUnresponsive, type BaseChartProps, type BaseLegendItem, type BaseLegendProps, BaseTooltip, type BaseTooltipProps, type CalendarHeatmapResult, type ChartLegendConfig, type ChartLegendOptions, type ChartTheme, type CompleteChartTheme, ConversionFunnelChartWithProvider as ConversionFunnelChart, type ConversionFunnelChartProps, type CurveType, type DataPoint, type DataPointDate, type DataPointPercentage, type EventHandlerParams, type FunnelStep, GeoChartResponsive as GeoChart, type GeoChartError, type GeoChartProps, GeoChartWithProvider as GeoChartUnresponsive, type GeoData, type GeoRegion, type GeoResolution, GlobalChartsContext, GlobalChartsProvider, GlobalChartsProvider as ThemeProvider, type GoogleDataTableColumn, type GoogleDataTableColumnRoleType, type GoogleDataTableRow, type GradientConfig, type GradientStop, type GridStyles, type HeatmapCell, HeatmapChartResponsive as HeatmapChart, type HeatmapChartProps, HeatmapChart as HeatmapChartUnresponsive, type HeatmapColumn, type HeatmapTooltipData, LeaderboardChartResponsive as LeaderboardChart, type LeaderboardChartProps, LeaderboardChart as LeaderboardChartUnresponsive, type LeaderboardEntry, Legend, type LegendItemStyles, type LegendLabelStyles, type LegendPosition, type LegendProps, type LegendShape, type LegendShapeLabel, type LegendShapeRenderProps, type LegendShapeStyles, type LegendValueDisplay, LineChartResponsive as LineChart, type LineChartAnnotationProps, type LineChartProps, LineChart as LineChartUnresponsive, type LineStyles, type MainMetricRenderProps, type MetricValueType, type MultipleDataPointsDate, type Optional, type OrientationType, PieChartResponsive as PieChart, type PieChartProps, type PieChartRenderTooltipParams, PieChart as PieChartUnresponsive, PieSemiCircleChartResponsive as PieSemiCircleChart, type PieSemiCircleChartProps, type PieSemiCircleChartRenderTooltipParams, PieSemiCircleChart as PieSemiCircleChartUnresponsive, type RenderLabelProps, type RenderLineGlyphProps, type RenderTooltipGlyphProps, type RenderTooltipParams, type RenderValueProps, type ScaleOptions, type SeriesChartLegendConfig, type SeriesData, type SeriesDataOptions, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, type TickResolution, type TooltipData, type TooltipDatum, type TooltipProps, type TooltipRenderProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type XyChartTooltipProps, buildCalendarHeatmapData, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, mixHexColors, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, prefersLightText, relativeLuminance, resolveCssVariable, useChartLegendItems, useChartRegistration, useChartScopeElement, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
2078
2083
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -604,37 +604,6 @@ type BaseChartProps<T = DataPoint | DataPointDate | LeaderboardEntry> = {
604
604
  };
605
605
  };
606
606
  };
607
- /**
608
- * Properties for grid components
609
- */
610
- type GridProps = {
611
- /**
612
- * Width of the grid in pixels
613
- */
614
- width: number;
615
- /**
616
- * Height of the grid in pixels
617
- */
618
- height: number;
619
- /**
620
- * Grid visibility. x is default.
621
- */
622
- gridVisibility?: 'x' | 'y' | 'xy' | 'none';
623
- /**
624
- * X-axis scale for the grid
625
- * TODO: Fix any type after resolving visx scale type issues
626
- */
627
- xScale: any;
628
- /**
629
- * Y-axis scale for the grid
630
- * TODO: Fix any type after resolving visx scale type issues
631
- */
632
- yScale: any;
633
- /**
634
- * Top offset for the grid
635
- */
636
- top?: number;
637
- };
638
607
  //#endregion
639
608
  //#region src/components/legend/types.d.ts
640
609
  type VisxLegendProps = Pick<ComponentProps<typeof LegendOrdinal>, 'className' | 'shape' | 'fill' | 'size' | 'labelFormat' | 'labelTransform'>;
@@ -1310,8 +1279,7 @@ interface LeaderboardChartProps extends Pick<BaseChartProps<LeaderboardEntry>, '
1310
1279
  * Custom styling for the chart container
1311
1280
  */
1312
1281
  style?: React.CSSProperties & {
1313
- '--a8c-charts-border-radius-leaderboard-bar'?: string; /** @deprecated Use `--a8c-charts-border-radius-leaderboard-bar`. */
1314
- '--a8c--charts--leaderboard--bar--border-radius'?: string;
1282
+ '--a8c-charts-border-radius-leaderboard-bar'?: string;
1315
1283
  };
1316
1284
  /**
1317
1285
  * Custom labels for legend items
@@ -1560,6 +1528,21 @@ declare const relativeLuminance: (hex: string) => number;
1560
1528
  */
1561
1529
  declare const prefersLightText: (backgroundHex: string) => boolean;
1562
1530
  //#endregion
1531
+ //#region src/utils/resolve-css-var.d.ts
1532
+ /**
1533
+ * Resolves a CSS custom property (variable) to its computed value.
1534
+ * Handles multiple formats:
1535
+ * - Plain variable names: '--my-color'
1536
+ * - CSS var() syntax: 'var(--my-color)'
1537
+ * - CSS var() with fallback: 'var(--my-color, #ffffff)'
1538
+ * - Regular values (returned as-is): '#ffffff', 'red'
1539
+ *
1540
+ * @param value - A CSS variable name, var() expression, or regular value
1541
+ * @param element - Optional DOM element to resolve the variable from (defaults to document.documentElement)
1542
+ * @return The resolved value, fallback value, or null if unresolvable
1543
+ */
1544
+ declare const resolveCssVariable: (value: string, element?: HTMLElement | null) => string | null;
1545
+ //#endregion
1563
1546
  //#region src/charts/leaderboard-chart/hooks/use-leaderboard-legend-items.d.ts
1564
1547
  /**
1565
1548
  * Hook to create legend items from leaderboard data
@@ -2042,7 +2025,6 @@ interface GlobalChartsContextValue {
2042
2025
  getChartData: (id: string) => ChartRegistration | undefined;
2043
2026
  theme: CompleteChartTheme;
2044
2027
  getElementStyles: (params: GetElementStylesParams) => ElementStyles;
2045
- resolveThemeColor: (value: string) => string;
2046
2028
  toggleSeriesVisibility: (chartId: string, seriesLabel: string) => void;
2047
2029
  isSeriesVisible: (chartId: string, seriesLabel: string) => boolean;
2048
2030
  getHiddenSeries: (chartId: string) => Set<string>;
@@ -2060,6 +2042,21 @@ declare const GlobalChartsProvider: FC<GlobalChartsProviderProps>;
2060
2042
  //#region src/providers/chart-context/hooks/use-global-charts-context.d.ts
2061
2043
  declare const useGlobalChartsContext: () => GlobalChartsContextValue;
2062
2044
  //#endregion
2045
+ //#region src/providers/chart-context/hooks/use-chart-registration.d.ts
2046
+ declare const useChartRegistration: ({
2047
+ chartId,
2048
+ legendItems,
2049
+ chartType,
2050
+ isDataValid,
2051
+ metadata
2052
+ }: {
2053
+ chartId: string;
2054
+ legendItems: BaseLegendItem[];
2055
+ chartType: ChartType;
2056
+ isDataValid: boolean;
2057
+ metadata?: Record<string, unknown>;
2058
+ }) => void;
2059
+ //#endregion
2063
2060
  //#region src/providers/chart-context/hooks/use-global-charts-theme.d.ts
2064
2061
  /**
2065
2062
  * Hook to get the global chart theme from GlobalChartsProvider
@@ -2074,5 +2071,13 @@ declare const useGlobalChartsTheme: () => CompleteChartTheme;
2074
2071
  */
2075
2072
  declare const defaultTheme: CompleteChartTheme;
2076
2073
  //#endregion
2077
- export { AccessibleTooltip, type AnnotationStyles, type ArcData, AreaChartResponsive as AreaChart, type AreaChartProps, AreaChart as AreaChartUnresponsive, type AxisOptions, BarChartResponsive as BarChart, type BarChartProps, BarChart as BarChartUnresponsive, BarListChartResponsive as BarListChart, type BarListChartProps, BarListChart as BarListChartUnresponsive, type BaseChartProps, type BaseLegendItem, type BaseLegendProps, BaseTooltip, type BaseTooltipProps, type CalendarHeatmapResult, type ChartLegendConfig, type ChartLegendOptions, type ChartTheme, type CompleteChartTheme, ConversionFunnelChartWithProvider as ConversionFunnelChart, type ConversionFunnelChartProps, type CurveType, type DataPoint, type DataPointDate, type DataPointPercentage, type EventHandlerParams, type FunnelStep, GeoChartResponsive as GeoChart, type GeoChartError, type GeoChartProps, GeoChartWithProvider as GeoChartUnresponsive, type GeoData, type GeoRegion, type GeoResolution, GlobalChartsContext, GlobalChartsProvider, GlobalChartsProvider as ThemeProvider, type GoogleDataTableColumn, type GoogleDataTableColumnRoleType, type GoogleDataTableRow, type GradientConfig, type GradientStop, type GridProps, type GridStyles, type HeatmapCell, HeatmapChartResponsive as HeatmapChart, type HeatmapChartProps, HeatmapChart as HeatmapChartUnresponsive, type HeatmapColumn, type HeatmapTooltipData, LeaderboardChartResponsive as LeaderboardChart, type LeaderboardChartProps, LeaderboardChart as LeaderboardChartUnresponsive, type LeaderboardEntry, Legend, type LegendItemStyles, type LegendLabelStyles, type LegendPosition, type LegendProps, type LegendShape, type LegendShapeLabel, type LegendShapeRenderProps, type LegendShapeStyles, type LegendValueDisplay, LineChartResponsive as LineChart, type LineChartAnnotationProps, type LineChartProps, LineChart as LineChartUnresponsive, type LineStyles, type MainMetricRenderProps, type MetricValueType, type MultipleDataPointsDate, type Optional, type OrientationType, PieChartResponsive as PieChart, type PieChartProps, type PieChartRenderTooltipParams, PieChart as PieChartUnresponsive, PieSemiCircleChartResponsive as PieSemiCircleChart, type PieSemiCircleChartProps, type PieSemiCircleChartRenderTooltipParams, PieSemiCircleChart as PieSemiCircleChartUnresponsive, type RenderLabelProps, type RenderLineGlyphProps, type RenderTooltipGlyphProps, type RenderTooltipParams, type RenderValueProps, type ScaleOptions, type SeriesChartLegendConfig, type SeriesData, type SeriesDataOptions, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, type TickResolution, type TooltipData, type TooltipDatum, type TooltipProps, type TooltipRenderProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type XyChartTooltipProps, buildCalendarHeatmapData, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, mixHexColors, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, prefersLightText, relativeLuminance, useChartLegendItems, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
2074
+ //#region src/providers/chart-scope/use-chart-scope-element.d.ts
2075
+ /**
2076
+ * Returns the nearest chart scope element, or `null` when rendered outside any scope (and during SSR, before the ref is attached).
2077
+ *
2078
+ * @return {HTMLElement | null} The nearest chart scope element, or `null`.
2079
+ */
2080
+ declare const useChartScopeElement: () => HTMLElement | null;
2081
+ //#endregion
2082
+ export { AccessibleTooltip, type AnnotationStyles, type ArcData, AreaChartResponsive as AreaChart, type AreaChartProps, AreaChart as AreaChartUnresponsive, type AxisOptions, BarChartResponsive as BarChart, type BarChartProps, BarChart as BarChartUnresponsive, BarListChartResponsive as BarListChart, type BarListChartProps, BarListChart as BarListChartUnresponsive, type BaseChartProps, type BaseLegendItem, type BaseLegendProps, BaseTooltip, type BaseTooltipProps, type CalendarHeatmapResult, type ChartLegendConfig, type ChartLegendOptions, type ChartTheme, type CompleteChartTheme, ConversionFunnelChartWithProvider as ConversionFunnelChart, type ConversionFunnelChartProps, type CurveType, type DataPoint, type DataPointDate, type DataPointPercentage, type EventHandlerParams, type FunnelStep, GeoChartResponsive as GeoChart, type GeoChartError, type GeoChartProps, GeoChartWithProvider as GeoChartUnresponsive, type GeoData, type GeoRegion, type GeoResolution, GlobalChartsContext, GlobalChartsProvider, GlobalChartsProvider as ThemeProvider, type GoogleDataTableColumn, type GoogleDataTableColumnRoleType, type GoogleDataTableRow, type GradientConfig, type GradientStop, type GridStyles, type HeatmapCell, HeatmapChartResponsive as HeatmapChart, type HeatmapChartProps, HeatmapChart as HeatmapChartUnresponsive, type HeatmapColumn, type HeatmapTooltipData, LeaderboardChartResponsive as LeaderboardChart, type LeaderboardChartProps, LeaderboardChart as LeaderboardChartUnresponsive, type LeaderboardEntry, Legend, type LegendItemStyles, type LegendLabelStyles, type LegendPosition, type LegendProps, type LegendShape, type LegendShapeLabel, type LegendShapeRenderProps, type LegendShapeStyles, type LegendValueDisplay, LineChartResponsive as LineChart, type LineChartAnnotationProps, type LineChartProps, LineChart as LineChartUnresponsive, type LineStyles, type MainMetricRenderProps, type MetricValueType, type MultipleDataPointsDate, type Optional, type OrientationType, PieChartResponsive as PieChart, type PieChartProps, type PieChartRenderTooltipParams, PieChart as PieChartUnresponsive, PieSemiCircleChartResponsive as PieSemiCircleChart, type PieSemiCircleChartProps, type PieSemiCircleChartRenderTooltipParams, PieSemiCircleChart as PieSemiCircleChartUnresponsive, type RenderLabelProps, type RenderLineGlyphProps, type RenderTooltipGlyphProps, type RenderTooltipParams, type RenderValueProps, type ScaleOptions, type SeriesChartLegendConfig, type SeriesData, type SeriesDataOptions, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, type TickResolution, type TooltipData, type TooltipDatum, type TooltipProps, type TooltipRenderProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type XyChartTooltipProps, buildCalendarHeatmapData, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, mixHexColors, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, prefersLightText, relativeLuminance, resolveCssVariable, useChartLegendItems, useChartRegistration, useChartScopeElement, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
2078
2083
  //# sourceMappingURL=index.d.ts.map