@adecore/charts 0.53.3 → 0.54.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.
package/dist/Root.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import { useContext, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore } from 'react';
2
+ import { useContentSize, useOverlayScrollbars } from '@adecore/ui';
3
+ import { formatNumber, formatRounded } from '@adecore/ui/format';
3
4
  import clsx from 'clsx';
5
+ import { useContext, useEffect, useId, useMemo, useRef, useState, useSyncExternalStore } from 'react';
4
6
  import { useTranslation } from 'react-i18next';
5
- import { useContentSize } from '@adecore/ui';
6
- import { formatNumber, formatRounded } from '@adecore/ui/format';
7
7
  import { readValue, warnMissingKey, warnOnce, xOf } from './access.js';
8
8
  import { LABEL_GAP as X_AXIS_GAP } from "./axes.js";
9
9
  import { bandLayout, GROUP_GAP } from './band.js';
@@ -33,7 +33,7 @@ const NO_ENTRIES = new Map();
33
33
  const defaultValue = value => Number.isInteger(value) ? formatNumber(value) : formatRounded(value, 2);
34
34
  /* The box of a chart: owns the data, the scales, the cursor and the keyboard; each part inside draws one layer. */
35
35
  export function ChartRoot(t0) {
36
- const $ = _c(112);
36
+ const $ = _c(114);
37
37
  const {
38
38
  data,
39
39
  x,
@@ -121,6 +121,7 @@ export function ChartRoot(t0) {
121
121
  const [measureGroups, groupsSize] = useContentSize();
122
122
  const boxHeight = grow ? Math.max(leastHeight, size.height - groupsSize.height) : leastHeight;
123
123
  const scroller = useRef(null);
124
+ const [scrollBox, setScrollBox] = useState(null);
124
125
  const points = rows === "points";
125
126
  const band = xScale === "band" && !points;
126
127
  const horizontal = orientation === "horizontal" && band;
@@ -269,6 +270,16 @@ export function ChartRoot(t0) {
269
270
  const width = layout === null || horizontal ? room : Math.max(room, Math.ceil(layout.width + marginLeft + marginRight));
270
271
  const scrolls = layout !== null && width > room;
271
272
  const overhang = scrolls ? leftAxis : 0;
273
+ let t25;
274
+ if ($[45] === Symbol.for("react.memo_cache_sentinel")) {
275
+ t25 = {
276
+ axis: "x"
277
+ };
278
+ $[45] = t25;
279
+ } else {
280
+ t25 = $[45];
281
+ }
282
+ const scrollbars = useOverlayScrollbars(scrolls ? scrollBox : null, t25);
272
283
  const xRows = [...xAxes.values()];
273
284
  const valueRoom = horizontal ? Math.max(0, ...[...series.values()].map(_temp2)) : 0;
274
285
  const titleRoom = leftY?.top ?? rightY?.top ?? 0;
@@ -371,10 +382,10 @@ export function ChartRoot(t0) {
371
382
  });
372
383
  return [left, pixel_0];
373
384
  });
374
- const readable = [...series].filter((t25, index_7, all) => {
375
- const [, entry_6] = t25;
376
- return !points || all.findIndex(t26 => {
377
- const [, other] = t26;
385
+ const readable = [...series].filter((t26, index_7, all) => {
386
+ const [, entry_6] = t26;
387
+ return !points || all.findIndex(t27 => {
388
+ const [, other] = t27;
378
389
  return other.label === entry_6.label;
379
390
  }) === index_7;
380
391
  });
@@ -480,9 +491,9 @@ export function ChartRoot(t0) {
480
491
  const keyIndex = indexAt(keyX);
481
492
  const from_0 = keyIndex >= 0 ? keyIndex : activeIndex;
482
493
  const ownsCursor = controlled || sharedCursor === null || sharedCursor.owner === id;
483
- let t27;
484
- if ($[45] !== controlled || $[46] !== id || $[47] !== onActiveXChange || $[48] !== sharedCursor) {
485
- t27 = value_5 => {
494
+ let t28;
495
+ if ($[46] !== controlled || $[47] !== id || $[48] !== onActiveXChange || $[49] !== sharedCursor) {
496
+ t28 = value_5 => {
486
497
  if (!controlled) {
487
498
  if (sharedCursor !== null) {
488
499
  sharedCursor.setX(value_5, id);
@@ -492,42 +503,42 @@ export function ChartRoot(t0) {
492
503
  }
493
504
  onActiveXChange?.(value_5);
494
505
  };
495
- $[45] = controlled;
496
- $[46] = id;
497
- $[47] = onActiveXChange;
498
- $[48] = sharedCursor;
499
- $[49] = t27;
500
- } else {
501
- t27 = $[49];
502
- }
503
- const setActiveX = t27;
504
- let t28;
505
- if ($[50] !== selected) {
506
- t28 = new Set((selected ?? []).map(String));
507
- $[50] = selected;
508
- $[51] = t28;
506
+ $[46] = controlled;
507
+ $[47] = id;
508
+ $[48] = onActiveXChange;
509
+ $[49] = sharedCursor;
510
+ $[50] = t28;
509
511
  } else {
510
- t28 = $[51];
512
+ t28 = $[50];
511
513
  }
512
- const picked = t28;
514
+ const setActiveX = t28;
513
515
  let t29;
514
- if ($[52] !== picked) {
515
- t29 = key_0 => picked.has(String(key_0));
516
- $[52] = picked;
517
- $[53] = t29;
516
+ if ($[51] !== selected) {
517
+ t29 = new Set((selected ?? []).map(String));
518
+ $[51] = selected;
519
+ $[52] = t29;
518
520
  } else {
519
- t29 = $[53];
521
+ t29 = $[52];
520
522
  }
521
- const selectedRows = (keys_0 ?? xs_0).map(t29);
523
+ const picked = t29;
522
524
  let t30;
523
- if ($[54] !== dimmed) {
524
- t30 = (row_6, index_16) => dimmed?.(row_6, index_16) ?? false;
525
- $[54] = dimmed;
526
- $[55] = t30;
525
+ if ($[53] !== picked) {
526
+ t30 = key_0 => picked.has(String(key_0));
527
+ $[53] = picked;
528
+ $[54] = t30;
527
529
  } else {
528
- t30 = $[55];
530
+ t30 = $[54];
529
531
  }
530
- const dimmedRows = data.map(t30);
532
+ const selectedRows = (keys_0 ?? xs_0).map(t30);
533
+ let t31;
534
+ if ($[55] !== dimmed) {
535
+ t31 = (row_6, index_16) => dimmed?.(row_6, index_16) ?? false;
536
+ $[55] = dimmed;
537
+ $[56] = t31;
538
+ } else {
539
+ t31 = $[56];
540
+ }
541
+ const dimmedRows = data.map(t31);
531
542
  const dimmedGroups = new Set(pointGroups.filter(run => run.indexes.every(index_17 => dimmedRows[index_17])).map(_temp9));
532
543
  const anyPicked = selectedRows.some(Boolean);
533
544
  const columnDim = [...series.values()].find(_temp0)?.dimOpacity ?? null;
@@ -547,22 +558,22 @@ export function ChartRoot(t0) {
547
558
  }
548
559
  return [...parts, ...notesAt(index_19).map(_temp10)].join(", ");
549
560
  };
550
- let t31;
551
561
  let t32;
552
- if ($[56] !== data || $[57] !== x) {
553
- t31 = () => {
562
+ let t33;
563
+ if ($[57] !== data || $[58] !== x) {
564
+ t32 = () => {
554
565
  warnMissingKey(x, data, "Chart.Root");
555
566
  };
556
- t32 = [x, data];
557
- $[56] = data;
558
- $[57] = x;
559
- $[58] = t31;
567
+ t33 = [x, data];
568
+ $[57] = data;
569
+ $[58] = x;
560
570
  $[59] = t32;
571
+ $[60] = t33;
561
572
  } else {
562
- t31 = $[58];
563
573
  t32 = $[59];
574
+ t33 = $[60];
564
575
  }
565
- useEffect(t31, t32);
576
+ useEffect(t32, t33);
566
577
  const indexAtPointer = e => {
567
578
  const box = e.currentTarget.getBoundingClientRect();
568
579
  const pixel_1 = horizontal ? e.clientY - box.top : e.clientX - box.left;
@@ -598,21 +609,21 @@ export function ChartRoot(t0) {
598
609
  }
599
610
  };
600
611
  const pressable = interactive && onActivate !== undefined && (layout !== null || points);
601
- let t33;
602
- if ($[60] !== data || $[61] !== onActivate || $[62] !== pressable) {
603
- t33 = index_24 => {
612
+ let t34;
613
+ if ($[61] !== data || $[62] !== onActivate || $[63] !== pressable) {
614
+ t34 = index_24 => {
604
615
  if (pressable && index_24 >= 0) {
605
616
  onActivate(data[index_24], index_24);
606
617
  }
607
618
  };
608
- $[60] = data;
609
- $[61] = onActivate;
610
- $[62] = pressable;
611
- $[63] = t33;
619
+ $[61] = data;
620
+ $[62] = onActivate;
621
+ $[63] = pressable;
622
+ $[64] = t34;
612
623
  } else {
613
- t33 = $[63];
624
+ t34 = $[64];
614
625
  }
615
- const activate = t33;
626
+ const activate = t34;
616
627
  const onKeyDown = e_1 => {
617
628
  if (pressable && from_0 >= 0 && (e_1.key === "Enter" || e_1.key === " ")) {
618
629
  e_1.preventDefault();
@@ -712,46 +723,46 @@ export function ChartRoot(t0) {
712
723
  halo: surface === "raised" ? "var(--surface-raised)" : "var(--surface)"
713
724
  };
714
725
  const ruleText = rules.size === 0 ? null : `${[...rules.values()].map(rule_0 => `${rule_0.label} ${formatY(rule_0.value)}`).join(", ")}.`;
715
- let t34;
716
- if ($[64] !== horizontal || $[65] !== points || $[66] !== t) {
717
- t34 = points ? t("keyboard.points") : horizontal ? t("keyboard.rows") : t("keyboard.move");
718
- $[64] = horizontal;
719
- $[65] = points;
720
- $[66] = t;
721
- $[67] = t34;
722
- } else {
723
- t34 = $[67];
724
- }
725
726
  let t35;
726
- if ($[68] !== layout || $[69] !== t) {
727
- t35 = layout !== null && layout.groups.length > 0 ? t("keyboard.groups") : null;
728
- $[68] = layout;
729
- $[69] = t;
730
- $[70] = t35;
727
+ if ($[65] !== horizontal || $[66] !== points || $[67] !== t) {
728
+ t35 = points ? t("keyboard.points") : horizontal ? t("keyboard.rows") : t("keyboard.move");
729
+ $[65] = horizontal;
730
+ $[66] = points;
731
+ $[67] = t;
732
+ $[68] = t35;
731
733
  } else {
732
- t35 = $[70];
734
+ t35 = $[68];
733
735
  }
734
736
  let t36;
735
- if ($[71] !== pressable || $[72] !== t) {
736
- t36 = pressable ? t("keyboard.activate") : null;
737
- $[71] = pressable;
738
- $[72] = t;
739
- $[73] = t36;
737
+ if ($[69] !== layout || $[70] !== t) {
738
+ t36 = layout !== null && layout.groups.length > 0 ? t("keyboard.groups") : null;
739
+ $[69] = layout;
740
+ $[70] = t;
741
+ $[71] = t36;
740
742
  } else {
741
- t36 = $[73];
743
+ t36 = $[71];
742
744
  }
743
745
  let t37;
744
- if ($[74] !== ruleText || $[75] !== t34 || $[76] !== t35 || $[77] !== t36) {
745
- t37 = [ruleText, t34, t35, t36].filter(Boolean);
746
- $[74] = ruleText;
747
- $[75] = t34;
746
+ if ($[72] !== pressable || $[73] !== t) {
747
+ t37 = pressable ? t("keyboard.activate") : null;
748
+ $[72] = pressable;
749
+ $[73] = t;
750
+ $[74] = t37;
751
+ } else {
752
+ t37 = $[74];
753
+ }
754
+ let t38;
755
+ if ($[75] !== ruleText || $[76] !== t35 || $[77] !== t36 || $[78] !== t37) {
756
+ t38 = [ruleText, t35, t36, t37].filter(Boolean);
757
+ $[75] = ruleText;
748
758
  $[76] = t35;
749
759
  $[77] = t36;
750
760
  $[78] = t37;
761
+ $[79] = t38;
751
762
  } else {
752
- t37 = $[78];
763
+ t38 = $[79];
753
764
  }
754
- const hint = t37.join(" ");
765
+ const hint = t38.join(" ");
755
766
  const highlighted = layout === null ? [] : xs_0.flatMap((__3, index_26) => cursor === "full" && index_26 === activeIndex || selectedRows[index_26] ? [index_26] : []);
756
767
  const bucketBox = (index_27, pressing) => {
757
768
  const start = Math.round(bucketStart + (layout?.lefts[index_27] ?? 0));
@@ -776,191 +787,201 @@ export function ChartRoot(t0) {
776
787
  height: pressing ? height - plot.top : plot.height
777
788
  };
778
789
  };
779
- let t38;
780
- if ($[79] !== keyX || $[80] !== setActiveX) {
781
- t38 = () => setActiveX(keyX);
782
- $[79] = keyX;
783
- $[80] = setActiveX;
784
- $[81] = t38;
790
+ let t39;
791
+ if ($[80] !== keyX || $[81] !== setActiveX) {
792
+ t39 = () => setActiveX(keyX);
793
+ $[80] = keyX;
794
+ $[81] = setActiveX;
795
+ $[82] = t39;
785
796
  } else {
786
- t38 = $[81];
797
+ t39 = $[82];
787
798
  }
788
799
  const pointer = {
789
800
  onPointerMove,
790
- onPointerLeave: t38,
801
+ onPointerLeave: t39,
791
802
  onClick: pressable ? e_2 => activate(indexAtPointer(e_2)) : undefined
792
803
  };
793
- const t39 = grow && "h-full min-h-0";
794
- let t40;
795
- if ($[82] !== className || $[83] !== t39) {
796
- t40 = clsx("flex min-w-0 flex-col gap-3", t39, className);
797
- $[82] = className;
798
- $[83] = t39;
804
+ const t40 = grow && "h-full min-h-0";
805
+ let t41;
806
+ if ($[83] !== className || $[84] !== t40) {
807
+ t41 = clsx("flex min-w-0 flex-col gap-3", t40, className);
808
+ $[83] = className;
799
809
  $[84] = t40;
810
+ $[85] = t41;
800
811
  } else {
801
- t40 = $[84];
812
+ t41 = $[85];
802
813
  }
803
- let t41;
804
- if ($[85] === Symbol.for("react.memo_cache_sentinel")) {
805
- t41 = /*#__PURE__*/_jsx("div", {
814
+ let t42;
815
+ if ($[86] === Symbol.for("react.memo_cache_sentinel")) {
816
+ t42 = /*#__PURE__*/_jsx("div", {
806
817
  ref: setLegendSlot,
807
818
  className: "empty:hidden"
808
819
  });
809
- $[85] = t41;
820
+ $[86] = t42;
810
821
  } else {
811
- t41 = $[85];
822
+ t42 = $[86];
812
823
  }
813
- const t42 = grow && !horizontal && "min-h-0 flex-1";
814
- const t43 = horizontal && pressable && "cursor-pointer";
815
- let t44;
816
- if ($[86] !== t42 || $[87] !== t43) {
817
- t44 = clsx("focus-ring-within relative flex rounded-md", t42, t43);
818
- $[86] = t42;
824
+ const t43 = grow && !horizontal && "min-h-0 flex-1";
825
+ const t44 = horizontal && pressable && "cursor-pointer";
826
+ let t45;
827
+ if ($[87] !== t43 || $[88] !== t44) {
828
+ t45 = clsx("focus-ring-within relative flex rounded-md", t43, t44);
819
829
  $[87] = t43;
820
830
  $[88] = t44;
831
+ $[89] = t45;
821
832
  } else {
822
- t44 = $[88];
833
+ t45 = $[89];
823
834
  }
824
- let t45;
825
- if ($[89] === Symbol.for("react.memo_cache_sentinel")) {
826
- t45 = {
835
+ let t46;
836
+ if ($[90] === Symbol.for("react.memo_cache_sentinel")) {
837
+ t46 = {
827
838
  outlineOffset: 4
828
839
  };
829
- $[89] = t45;
840
+ $[90] = t46;
830
841
  } else {
831
- t45 = $[89];
842
+ t46 = $[90];
832
843
  }
833
- const t46 = scrolls ? "overflow-x-auto overflow-y-hidden overscroll-x-contain" : "overflow-visible";
834
844
  let t47;
835
- if ($[90] !== t46) {
836
- t47 = clsx("min-w-0 flex-1", t46);
837
- $[90] = t46;
845
+ if ($[91] === Symbol.for("react.memo_cache_sentinel")) {
846
+ t47 = node => {
847
+ scroller.current = node;
848
+ setScrollBox(node);
849
+ };
838
850
  $[91] = t47;
839
851
  } else {
840
852
  t47 = $[91];
841
853
  }
842
- let t48;
843
- if ($[92] !== overhang || $[93] !== scroll) {
844
- t48 = overhang > 0 ? {
854
+ const t48 = scrolls ? "overflow-x-auto overflow-y-hidden overscroll-x-contain" : "overflow-visible";
855
+ let t49;
856
+ if ($[92] !== t48) {
857
+ t49 = clsx("min-w-0 flex-1", t48);
858
+ $[92] = t48;
859
+ $[93] = t49;
860
+ } else {
861
+ t49 = $[93];
862
+ }
863
+ let t50;
864
+ if ($[94] !== overhang || $[95] !== scroll) {
865
+ t50 = overhang > 0 ? {
845
866
  marginLeft: -overhang,
846
867
  paddingLeft: overhang,
847
868
  clipPath: scroll > 0 ? `inset(0 0 0 ${overhang}px)` : undefined
848
869
  } : undefined;
849
- $[92] = overhang;
850
- $[93] = scroll;
851
- $[94] = t48;
870
+ $[94] = overhang;
871
+ $[95] = scroll;
872
+ $[96] = t50;
852
873
  } else {
853
- t48 = $[94];
874
+ t50 = $[96];
854
875
  }
855
- let t49;
856
- if ($[95] === Symbol.for("react.memo_cache_sentinel")) {
857
- t49 = e_3 => setScroll(e_3.currentTarget.scrollLeft);
858
- $[95] = t49;
859
- } else {
860
- t49 = $[95];
861
- }
862
- const t50 = height;
863
876
  let t51;
864
- if ($[96] !== interactive || $[97] !== t) {
865
- t51 = interactive ? t("chart") : undefined;
866
- $[96] = interactive;
867
- $[97] = t;
868
- $[98] = t51;
877
+ if ($[97] === Symbol.for("react.memo_cache_sentinel")) {
878
+ t51 = e_3 => setScroll(e_3.currentTarget.scrollLeft);
879
+ $[97] = t51;
869
880
  } else {
870
- t51 = $[98];
881
+ t51 = $[97];
871
882
  }
872
- const t52 = pressable && "cursor-pointer";
883
+ const t52 = height;
873
884
  let t53;
874
- if ($[99] !== t52) {
875
- t53 = clsx("block overflow-visible outline-none", t52);
876
- $[99] = t52;
885
+ if ($[98] !== interactive || $[99] !== t) {
886
+ t53 = interactive ? t("chart") : undefined;
887
+ $[98] = interactive;
888
+ $[99] = t;
877
889
  $[100] = t53;
878
890
  } else {
879
891
  t53 = $[100];
880
892
  }
881
- let t54;
882
- if ($[101] === Symbol.for("react.memo_cache_sentinel")) {
883
- t54 = /*#__PURE__*/_jsx("g", {
893
+ const t54 = pressable && "cursor-pointer";
894
+ let t55;
895
+ if ($[101] !== t54) {
896
+ t55 = clsx("block overflow-visible outline-none", t54);
897
+ $[101] = t54;
898
+ $[102] = t55;
899
+ } else {
900
+ t55 = $[102];
901
+ }
902
+ let t56;
903
+ if ($[103] === Symbol.for("react.memo_cache_sentinel")) {
904
+ t56 = /*#__PURE__*/_jsx("g", {
884
905
  ref: setRulesSlot,
885
906
  tabIndex: -1
886
907
  });
887
- $[101] = t54;
908
+ $[103] = t56;
888
909
  } else {
889
- t54 = $[101];
910
+ t56 = $[103];
890
911
  }
891
- let t55;
892
- if ($[102] !== measureGroups) {
893
- t55 = node => {
894
- setGroupsSlot(node);
895
- measureGroups(node);
912
+ let t57;
913
+ if ($[104] !== measureGroups) {
914
+ t57 = node_0 => {
915
+ setGroupsSlot(node_0);
916
+ measureGroups(node_0);
896
917
  };
897
- $[102] = measureGroups;
898
- $[103] = t55;
918
+ $[104] = measureGroups;
919
+ $[105] = t57;
899
920
  } else {
900
- t55 = $[103];
921
+ t57 = $[105];
901
922
  }
902
- let t56;
903
- if ($[104] !== width) {
904
- t56 = {
923
+ let t58;
924
+ if ($[106] !== width) {
925
+ t58 = {
905
926
  width
906
927
  };
907
- $[104] = width;
908
- $[105] = t56;
928
+ $[106] = width;
929
+ $[107] = t58;
909
930
  } else {
910
- t56 = $[105];
931
+ t58 = $[107];
911
932
  }
912
- let t57;
913
- if ($[106] !== t55 || $[107] !== t56) {
914
- t57 = /*#__PURE__*/_jsx("div", {
915
- ref: t55,
933
+ let t59;
934
+ if ($[108] !== t57 || $[109] !== t58) {
935
+ t59 = /*#__PURE__*/_jsx("div", {
936
+ ref: t57,
916
937
  className: "empty:hidden",
917
- style: t56
938
+ style: t58
918
939
  });
919
- $[106] = t55;
920
- $[107] = t56;
921
940
  $[108] = t57;
941
+ $[109] = t58;
942
+ $[110] = t59;
922
943
  } else {
923
- t57 = $[108];
944
+ t59 = $[110];
924
945
  }
925
- let t58;
926
- if ($[109] === Symbol.for("react.memo_cache_sentinel")) {
927
- t58 = /*#__PURE__*/_jsx("g", {
946
+ let t60;
947
+ if ($[111] === Symbol.for("react.memo_cache_sentinel")) {
948
+ t60 = /*#__PURE__*/_jsx("g", {
928
949
  ref: setRightSlot,
929
950
  tabIndex: -1
930
951
  });
931
- $[109] = t58;
952
+ $[111] = t60;
932
953
  } else {
933
- t58 = $[109];
954
+ t60 = $[111];
934
955
  }
935
- let t59;
936
- if ($[110] === Symbol.for("react.memo_cache_sentinel")) {
937
- t59 = /*#__PURE__*/_jsx("div", {
956
+ let t61;
957
+ if ($[112] === Symbol.for("react.memo_cache_sentinel")) {
958
+ t61 = /*#__PURE__*/_jsx("div", {
938
959
  ref: setTooltipSlot,
939
960
  className: "pointer-events-none absolute inset-0"
940
961
  });
941
- $[110] = t59;
962
+ $[112] = t61;
942
963
  } else {
943
- t59 = $[110];
964
+ t61 = $[112];
944
965
  }
945
- let t60;
946
- if ($[111] === Symbol.for("react.memo_cache_sentinel")) {
947
- t60 = /*#__PURE__*/_jsx("div", {
966
+ let t62;
967
+ if ($[113] === Symbol.for("react.memo_cache_sentinel")) {
968
+ t62 = /*#__PURE__*/_jsx("div", {
948
969
  ref: setTableSlot,
949
970
  className: "empty:hidden"
950
971
  });
951
- $[111] = t60;
972
+ $[113] = t62;
952
973
  } else {
953
- t60 = $[111];
974
+ t62 = $[113];
954
975
  }
955
976
  return /*#__PURE__*/_jsx(ChartContext, {
956
977
  value: context,
957
978
  children: /*#__PURE__*/_jsxs("div", {
958
979
  ref: ref,
959
- className: t40,
960
- children: [t41, /*#__PURE__*/_jsxs("div", {
980
+ className: t41,
981
+ children: [t42, /*#__PURE__*/_jsxs("div", {
961
982
  ref: measure,
962
- className: t44,
963
- style: t45,
983
+ className: t45,
984
+ style: t46,
964
985
  ...(horizontal ? pointer : {}),
965
986
  children: [horizontal ? /*#__PURE__*/_jsx("div", {
966
987
  ref: setRowsSlot,
@@ -980,70 +1001,73 @@ export function ChartRoot(t0) {
980
1001
  tabIndex: -1
981
1002
  })
982
1003
  }), /*#__PURE__*/_jsxs("div", {
983
- ref: scroller,
984
- className: t47,
985
- style: t48,
986
- onScroll: t49,
987
- children: [/*#__PURE__*/_jsxs("svg", {
988
- width: width,
989
- height: t50,
990
- role: interactive ? "group" : "img",
991
- tabIndex: interactive ? 0 : undefined,
992
- "aria-roledescription": t51,
993
- "aria-label": label,
994
- "aria-describedby": interactive ? `${id}-hint` : undefined,
995
- "aria-activedescendant": pressable && from_0 >= 0 ? `${id}-${from_0}` : undefined,
996
- className: t53,
997
- ...(horizontal ? {} : pointer),
998
- onKeyDown: interactive ? onKeyDown : undefined,
999
- onBlur: () => {
1000
- setAnnounce(false);
1001
- setKeyX(null);
1002
- if (activeIndex >= 0 && (points || announce)) {
1003
- setActiveX(null);
1004
- }
1005
- },
1006
- children: [layout !== null && highlighted.map(index_28 => /*#__PURE__*/_jsx("rect", {
1007
- ...bucketBox(index_28, false),
1008
- className: "fill-surface-hover"
1009
- }, index_28)), children, t54, continuous !== null && !points && activeIndex >= 0 && cursor !== "none" && /*#__PURE__*/_jsx(Crosshair, {
1010
- context: context,
1011
- dots: cursor === "full"
1012
- }), points && /*#__PURE__*/_jsx(Guides, {
1013
- context: context
1014
- }), pressable && points && positions.map((position, index_29) => position === null ? null : /*#__PURE__*/_jsx("circle", {
1015
- id: `${id}-${index_29}`,
1016
- role: "button",
1017
- "aria-pressed": selectedRows[index_29],
1018
- "aria-label": describe(index_29),
1019
- cx: position[0],
1020
- cy: position[1],
1021
- r: 10,
1022
- fill: "transparent"
1023
- }, keys_0[index_29])), pressable && layout !== null && xs_0.map((key_1, index_30) => /*#__PURE__*/_jsx("rect", {
1024
- id: `${id}-${index_30}`,
1025
- role: "button",
1026
- "aria-pressed": selectedRows[index_30],
1027
- "aria-label": describe(index_30),
1028
- ...bucketBox(index_30, true),
1029
- fill: "transparent"
1030
- }, String(key_1))), xs_0.length === 0 && /*#__PURE__*/_jsx("text", {
1031
- x: Math.round((plot.left + plot.right) / 2),
1032
- y: Math.round((plot.top + plot.bottom) / 2),
1033
- dy: "0.32em",
1034
- textAnchor: "middle",
1035
- className: "fill-text-faint text-xs",
1036
- children: t("noData")
1037
- })]
1038
- }), t57]
1004
+ className: "relative flex min-w-0 flex-1",
1005
+ children: [/*#__PURE__*/_jsxs("div", {
1006
+ ref: t47,
1007
+ className: t49,
1008
+ style: t50,
1009
+ onScroll: t51,
1010
+ children: [/*#__PURE__*/_jsxs("svg", {
1011
+ width: width,
1012
+ height: t52,
1013
+ role: interactive ? "group" : "img",
1014
+ tabIndex: interactive ? 0 : undefined,
1015
+ "aria-roledescription": t53,
1016
+ "aria-label": label,
1017
+ "aria-describedby": interactive ? `${id}-hint` : undefined,
1018
+ "aria-activedescendant": pressable && from_0 >= 0 ? `${id}-${from_0}` : undefined,
1019
+ className: t55,
1020
+ ...(horizontal ? {} : pointer),
1021
+ onKeyDown: interactive ? onKeyDown : undefined,
1022
+ onBlur: () => {
1023
+ setAnnounce(false);
1024
+ setKeyX(null);
1025
+ if (activeIndex >= 0 && (points || announce)) {
1026
+ setActiveX(null);
1027
+ }
1028
+ },
1029
+ children: [layout !== null && highlighted.map(index_28 => /*#__PURE__*/_jsx("rect", {
1030
+ ...bucketBox(index_28, false),
1031
+ className: "fill-surface-hover"
1032
+ }, index_28)), children, t56, continuous !== null && !points && activeIndex >= 0 && cursor !== "none" && /*#__PURE__*/_jsx(Crosshair, {
1033
+ context: context,
1034
+ dots: cursor === "full"
1035
+ }), points && /*#__PURE__*/_jsx(Guides, {
1036
+ context: context
1037
+ }), pressable && points && positions.map((position, index_29) => position === null ? null : /*#__PURE__*/_jsx("circle", {
1038
+ id: `${id}-${index_29}`,
1039
+ role: "button",
1040
+ "aria-pressed": selectedRows[index_29],
1041
+ "aria-label": describe(index_29),
1042
+ cx: position[0],
1043
+ cy: position[1],
1044
+ r: 10,
1045
+ fill: "transparent"
1046
+ }, keys_0[index_29])), pressable && layout !== null && xs_0.map((key_1, index_30) => /*#__PURE__*/_jsx("rect", {
1047
+ id: `${id}-${index_30}`,
1048
+ role: "button",
1049
+ "aria-pressed": selectedRows[index_30],
1050
+ "aria-label": describe(index_30),
1051
+ ...bucketBox(index_30, true),
1052
+ fill: "transparent"
1053
+ }, String(key_1))), xs_0.length === 0 && /*#__PURE__*/_jsx("text", {
1054
+ x: Math.round((plot.left + plot.right) / 2),
1055
+ y: Math.round((plot.top + plot.bottom) / 2),
1056
+ dy: "0.32em",
1057
+ textAnchor: "middle",
1058
+ className: "fill-text-faint text-xs",
1059
+ children: t("noData")
1060
+ })]
1061
+ }), t59]
1062
+ }), scrollbars]
1039
1063
  }), /*#__PURE__*/_jsx("svg", {
1040
1064
  width: rightAxis,
1041
1065
  height: height,
1042
1066
  "aria-hidden": true,
1043
1067
  className: "shrink-0 overflow-visible",
1044
- children: t58
1045
- }), t59]
1046
- }), t60, interactive && /*#__PURE__*/_jsxs(_Fragment, {
1068
+ children: t60
1069
+ }), t61]
1070
+ }), t62, interactive && /*#__PURE__*/_jsxs(_Fragment, {
1047
1071
  children: [/*#__PURE__*/_jsx("p", {
1048
1072
  id: `${id}-hint`,
1049
1073
  className: "sr-only",