@automattic/charts 1.6.0 → 1.7.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 (33) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/README.md +2 -2
  3. package/dist/index.cjs +22 -9
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +6 -3
  6. package/dist/index.d.cts +103 -30
  7. package/dist/index.d.ts +106 -33
  8. package/dist/index.js +22 -9
  9. package/dist/index.js.map +1 -1
  10. package/package.json +22 -21
  11. package/src/charts/area-chart/types.ts +1 -1
  12. package/src/charts/bar-chart/bar-chart.tsx +1 -1
  13. package/src/charts/geo-chart/geo-chart.tsx +3 -1
  14. package/src/charts/leaderboard-chart/leaderboard-chart.module.scss +27 -14
  15. package/src/charts/leaderboard-chart/leaderboard-chart.tsx +7 -4
  16. package/src/charts/leaderboard-chart/test/leaderboard-chart.test.tsx +51 -4
  17. package/src/charts/line-chart/line-chart.tsx +1 -1
  18. package/src/charts/line-chart/private/line-chart-annotation-label-popover.tsx +18 -2
  19. package/src/charts/line-chart/private/line-chart-annotation.tsx +1 -1
  20. package/src/charts/line-chart/types.ts +1 -1
  21. package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.tsx +2 -2
  22. package/src/charts/private/chart-layout/chart-layout.tsx +1 -2
  23. package/src/charts/private/x-zoom.tsx +2 -2
  24. package/src/components/legend/hooks/use-chart-legend-items.ts +6 -2
  25. package/src/components/legend/legend.tsx +1 -2
  26. package/src/components/legend/utils/label-transform-factory.ts +1 -1
  27. package/src/components/tooltip/accessible-tooltip.tsx +2 -6
  28. package/src/index.ts +6 -5
  29. package/src/providers/chart-context/themes.ts +1 -1
  30. package/src/providers/chart-context/types.ts +7 -2
  31. package/src/types.ts +104 -11
  32. package/src/utils/get-styles.ts +1 -2
  33. package/src/visx/types.ts +30 -1
package/dist/index.css CHANGED
@@ -477,10 +477,13 @@
477
477
  }
478
478
 
479
479
  .a8ccharts-GovfoW-interactiveRow {
480
+ --focus-ring-width: var(--wpds-border-width-focus, var(--wp-admin-border-width-focus, 2px));
480
481
  grid-column: 1 / -1;
481
482
  grid-template-columns: subgrid;
483
+ box-sizing: border-box;
482
484
  appearance: none;
483
485
  width: 100%;
486
+ padding: var(--focus-ring-width);
484
487
  color: inherit;
485
488
  font: inherit;
486
489
  text-align: inherit;
@@ -489,7 +492,6 @@
489
492
  border: 0;
490
493
  align-items: center;
491
494
  margin: 0;
492
- padding: 0;
493
495
  display: grid;
494
496
  position: relative;
495
497
  }
@@ -523,8 +525,9 @@
523
525
  }
524
526
 
525
527
  .a8ccharts-GovfoW-interactiveRow:focus-visible {
526
- outline: 2px solid var(--wpds-color-fg-interactive-brand, var(--wp-admin-theme-color, #3858e9));
527
- outline-offset: -2px;
528
+ border-radius: var(--wpds-border-radius-sm, 2px);
529
+ outline: var(--focus-ring-width) solid var(--wpds-color-stroke-focus-brand, var(--wp-admin-theme-color, #3858e9));
530
+ outline-offset: calc(-1 * var(--focus-ring-width));
528
531
  }
529
532
 
530
533
  .a8ccharts-GovfoW-chevron {
package/dist/index.d.cts CHANGED
@@ -1,23 +1,63 @@
1
1
  import { LegendOrdinal } from "@visx/legend";
2
- import { CircleSubjectProps } from "@visx/annotation/lib/components/CircleSubject.js";
3
- import { ConnectorProps } from "@visx/annotation/lib/components/Connector.js";
4
- import { LabelProps } from "@visx/annotation/lib/components/Label.js";
5
- import { LineSubjectProps } from "@visx/annotation/lib/components/LineSubject.js";
2
+ import { CircleSubjectProps, ConnectorProps, LabelProps, LineSubjectProps } from "@visx/annotation";
6
3
  import { AxisRendererProps, AxisScale, Orientation, TickFormatter } from "@visx/axis";
7
- import { LegendShape } from "@visx/legend/lib/types/index.js";
8
- import { ScaleInput, ScaleType } from "@visx/scale";
9
- import { TextProps } from "@visx/text/lib/Text.js";
10
- import { EventHandlerParams, EventHandlerParams as EventHandlerParams$1, GlyphProps, GridStyles, GridStyles as GridStyles$1, LineStyles, LineStyles as LineStyles$1 } from "@visx/xychart";
11
- import { GapSize } from "@wordpress/theme";
12
- import { CSSProperties, ComponentProps, ComponentType, FC, MouseEvent, PointerEvent, PropsWithChildren, ReactNode, SVGProps } from "react";
13
- import { GoogleDataTableColumn, GoogleDataTableColumn as GoogleDataTableColumn$1, GoogleDataTableColumnRoleType, GoogleDataTableRow, GoogleDataTableRow as GoogleDataTableRow$1 } from "react-google-charts";
14
- import { RenderTooltipParams, RenderTooltipParams as RenderTooltipParams$1, TooltipProps as BaseTooltipProps$1 } from "@visx/xychart/lib/components/Tooltip.js";
15
- import { TextProps as TextProps$1 } from "@visx/text";
16
- import { PieArcDatum } from "@visx/shape/lib/shapes/Pie.js";
4
+ import { PickD3Scale, ScaleInput, ScaleType } from "@visx/scale";
5
+ import { TextProps } from "@visx/text";
6
+ import { EventHandlerParams, EventHandlerParams as EventHandlerParams$1, GlyphProps, GridStyles, GridStyles as GridStyles$1, LineStyles, LineStyles as LineStyles$1, TooltipContextType } from "@visx/xychart";
7
+ import { CSSProperties, ComponentClass, ComponentProps, ComponentType, FC, MouseEvent, PointerEvent, PropsWithChildren, ReactElement, ReactNode, SVGProps } from "react";
8
+ import { TooltipProps as TooltipProps$1, UseTooltipPortalOptions } from "@visx/tooltip";
9
+ import { PieProvidedProps } from "@visx/shape";
17
10
 
18
11
  //#region src/types.d.ts
19
12
  type ValueOf<T> = T[keyof T];
20
13
  type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
14
+ /**
15
+ * Mirrors the WordPress Design System gap token scale used by the WordPress UI Stack.
16
+ */
17
+ type GapSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
18
+ type LegendShapeLabel<Data, Output, ExtraAttributes = object> = {
19
+ datum: Data;
20
+ index: number;
21
+ text: string;
22
+ value?: Output;
23
+ } & ExtraAttributes;
24
+ type LegendShapeRenderProps<Data, Output> = {
25
+ width?: string | number;
26
+ height?: string | number;
27
+ label: LegendShapeLabel<Data, Output>;
28
+ item: Data;
29
+ itemIndex: number;
30
+ fill?: string;
31
+ size?: string | number;
32
+ style?: CSSProperties;
33
+ };
34
+ type LegendShape<Data, Output> = 'rect' | 'circle' | 'line' | FC<LegendShapeRenderProps<Data, Output>> | ComponentClass<LegendShapeRenderProps<Data, Output>>;
35
+ type GoogleDataTableColumnType = 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'timeofday';
36
+ declare enum GoogleDataTableColumnRoleType {
37
+ annotation = "annotation",
38
+ annotationText = "annotationText",
39
+ certainty = "certainty",
40
+ emphasis = "emphasis",
41
+ interval = "interval",
42
+ scope = "scope",
43
+ style = "style",
44
+ tooltip = "tooltip",
45
+ domain = "domain"
46
+ }
47
+ type GoogleDataTableColumn = {
48
+ type: GoogleDataTableColumnType;
49
+ label?: string;
50
+ role?: GoogleDataTableColumnRoleType;
51
+ pattern?: string;
52
+ p?: Record<string, unknown>;
53
+ id?: string;
54
+ } | string;
55
+ type GoogleDataTableCell = {
56
+ v?: unknown;
57
+ f?: string;
58
+ p?: Record<string, unknown>;
59
+ } | string | number | boolean | Date | null;
60
+ type GoogleDataTableRow = GoogleDataTableCell[];
21
61
  type ChartType = 'area' | 'bar' | 'conversion-funnel' | 'leaderboard' | 'line' | 'pie' | 'pie-semi-circle';
22
62
  type OrientationType = ValueOf<typeof Orientation>;
23
63
  type AnnotationStyles = {
@@ -66,7 +106,7 @@ type DataPoint = {
66
106
  * ['Canada', 38000000, 9985000]
67
107
  * ]
68
108
  */
69
- type GeoData = [GoogleDataTableColumn$1[], ...GoogleDataTableRow$1[]];
109
+ type GeoData = [GoogleDataTableColumn[], ...GoogleDataTableRow[]];
70
110
  type DataPointDate = {
71
111
  date?: Date;
72
112
  /**
@@ -92,7 +132,7 @@ type LeaderboardEntry = {
92
132
  /**
93
133
  * Human-readable name (e.g., 'Direct') or a JSX element (e.g., <h4>Direct</h4>)
94
134
  */
95
- label: string | JSX.Element;
135
+ label: string | ReactElement;
96
136
  /**
97
137
  * Value of the entry
98
138
  */
@@ -130,6 +170,16 @@ type LeaderboardEntry = {
130
170
  * never both, since interactive elements cannot be nested in HTML.
131
171
  */
132
172
  onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
173
+ /**
174
+ * Optional accessible name for the interactive row's `<button>`. Only applies
175
+ * when `onClick` is set — without it the row renders as a Fragment with no
176
+ * element to receive `aria-label`. By default the button derives its name from
177
+ * its rendered content (label text plus the formatted value), which is the
178
+ * right outcome for plain-text labels. Set this when the `label` is JSX whose
179
+ * text content does not yield a clean name on its own — e.g. an image-only
180
+ * label — to give assistive tech a deterministic, human-readable name.
181
+ */
182
+ ariaLabel?: string;
133
183
  };
134
184
  type GradientStop = {
135
185
  offset: string;
@@ -226,7 +276,7 @@ type ChartTheme = {
226
276
  leaderboardChart?: {
227
277
  /** Gap between rows in the leaderboard grid */rowGap?: number; /** Gap between columns in the leaderboard grid */
228
278
  columnGap?: number; /** Spacing between label and progress bars */
229
- labelSpacing?: number; /** Primary color for current period bars */
279
+ labelSpacing?: GapSize; /** Primary color for current period bars */
230
280
  primaryColor?: string; /** Secondary color for comparison period bars */
231
281
  secondaryColor?: string; /** Delta colors: [negative, neutral, positive] */
232
282
  deltaColors?: [string, string, string];
@@ -608,6 +658,29 @@ interface ChartInstanceRef {
608
658
  }
609
659
  type SingleChartRef = ChartInstanceRef;
610
660
  //#endregion
661
+ //#region src/visx/types.d.ts
662
+ type RenderTooltipParams<Datum extends object> = TooltipContextType<Datum> & {
663
+ colorScale?: PickD3Scale<'ordinal', string, string>;
664
+ };
665
+ interface RenderTooltipGlyphProps<Datum extends object> extends GlyphProps<Datum> {
666
+ glyphStyle?: SVGProps<SVGCircleElement>;
667
+ isNearestDatum: boolean;
668
+ }
669
+ type XyChartTooltipProps<Datum extends object> = {
670
+ renderTooltip: (params: RenderTooltipParams<Datum>) => ReactNode;
671
+ renderGlyph?: (params: RenderTooltipGlyphProps<Datum>) => ReactNode;
672
+ snapTooltipToDatumX?: boolean;
673
+ snapTooltipToDatumY?: boolean;
674
+ showVerticalCrosshair?: boolean;
675
+ showHorizontalCrosshair?: boolean;
676
+ showDatumGlyph?: boolean;
677
+ showSeriesGlyphs?: boolean;
678
+ verticalCrosshairStyle?: SVGProps<SVGLineElement>;
679
+ horizontalCrosshairStyle?: SVGProps<SVGLineElement>;
680
+ glyphStyle?: SVGProps<SVGCircleElement>;
681
+ resizeObserverPolyfill?: UseTooltipPortalOptions['polyfill'];
682
+ } & Omit<TooltipProps$1, 'left' | 'top' | 'children'> & Pick<UseTooltipPortalOptions, 'debounce' | 'detectBounds' | 'scroll' | 'zIndex'>;
683
+ //#endregion
611
684
  //#region src/charts/line-chart/types.d.ts
612
685
  type LineChartAnnotationProps = {
613
686
  datum: DataPointDate;
@@ -634,7 +707,7 @@ interface LineChartProps extends BaseChartProps<SeriesData[]> {
634
707
  withGradientFill: boolean;
635
708
  smoothing?: boolean;
636
709
  curveType?: CurveType;
637
- renderTooltip?: (params: RenderTooltipParams$1<DataPointDate>) => ReactNode;
710
+ renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
638
711
  withStartGlyphs?: boolean;
639
712
  withEndGlyphs?: boolean;
640
713
  renderGlyph?: <Datum extends object>(props: GlyphProps<Datum>) => ReactNode;
@@ -684,7 +757,7 @@ interface AreaChartProps extends BaseChartProps<SeriesData[]> {
684
757
  /**
685
758
  * Custom tooltip renderer.
686
759
  */
687
- renderTooltip?: (params: RenderTooltipParams$1<DataPointDate>) => ReactNode;
760
+ renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
688
761
  /**
689
762
  * Whether to show crosshair lines in the tooltip.
690
763
  */
@@ -750,7 +823,7 @@ declare const AreaChartResponsive: AreaChartResponsiveComponent;
750
823
  //#endregion
751
824
  //#region src/charts/bar-chart/bar-chart.d.ts
752
825
  interface BarChartProps extends BaseChartProps<SeriesData[]> {
753
- renderTooltip?: (params: RenderTooltipParams$1<DataPointDate>) => ReactNode;
826
+ renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
754
827
  orientation?: 'horizontal' | 'vertical';
755
828
  withPatterns?: boolean;
756
829
  showZeroValues?: boolean;
@@ -807,14 +880,14 @@ interface BarListChartProps extends Exclude<BarChartProps, 'orientation' | 'size
807
880
  };
808
881
  }
809
882
  interface RenderLabelProps {
810
- textProps: TextProps$1;
883
+ textProps: TextProps;
811
884
  x: number;
812
885
  y: number;
813
886
  label: string;
814
887
  formatter: (value: string) => string;
815
888
  }
816
889
  interface RenderValueProps {
817
- textProps: TextProps$1;
890
+ textProps: TextProps;
818
891
  x: number;
819
892
  y: number;
820
893
  value: number;
@@ -837,7 +910,7 @@ declare const BarListChartResponsive: ({
837
910
  width,
838
911
  height,
839
912
  ...chartProps
840
- }: Omit<BarListChartProps, "size" | "width" | "height"> & {
913
+ }: Omit<BarListChartProps, "width" | "height" | "size"> & {
841
914
  width?: number;
842
915
  height?: number;
843
916
  size?: number;
@@ -981,7 +1054,7 @@ declare const GeoChartResponsive: ({
981
1054
  width,
982
1055
  height,
983
1056
  ...chartProps
984
- }: Omit<GeoChartProps, "size" | "width" | "height"> & {
1057
+ }: Omit<GeoChartProps, "width" | "height" | "size"> & {
985
1058
  width?: number;
986
1059
  height?: number;
987
1060
  size?: number;
@@ -1057,7 +1130,7 @@ declare const LeaderboardChartResponsive: (({
1057
1130
  width,
1058
1131
  height,
1059
1132
  ...chartProps
1060
- }: Omit<LeaderboardChartProps, "size" | "width" | "height"> & {
1133
+ }: Omit<LeaderboardChartProps, "width" | "height" | "size"> & {
1061
1134
  width?: number;
1062
1135
  height?: number;
1063
1136
  size?: number;
@@ -1448,7 +1521,7 @@ interface PieSemiCircleChartProps extends BaseChartProps<DataPointPercentage[]>
1448
1521
  type PieSemiCircleChartBaseProps = Optional<PieSemiCircleChartProps, 'width'>;
1449
1522
  type PieSemiCircleChartComponent = ChartComponentWithComposition<PieSemiCircleChartBaseProps>;
1450
1523
  type PieSemiCircleChartResponsiveComponent = ChartComponentWithComposition<PieSemiCircleChartBaseProps & ResponsiveConfig>;
1451
- type ArcData = PieArcDatum<DataPointPercentageCalculated>;
1524
+ type ArcData = PieProvidedProps<DataPointPercentageCalculated>['arcs'][number];
1452
1525
  declare const PieSemiCircleChart: PieSemiCircleChartComponent;
1453
1526
  declare const PieSemiCircleChartResponsive: PieSemiCircleChartResponsiveComponent;
1454
1527
  //#endregion
@@ -1564,7 +1637,7 @@ declare const Sparkline: ({
1564
1637
  width,
1565
1638
  height,
1566
1639
  ...chartProps
1567
- }: Omit<SparklineProps, "size" | "width" | "height"> & {
1640
+ }: Omit<SparklineProps, "width" | "height" | "size"> & {
1568
1641
  width?: number;
1569
1642
  height?: number;
1570
1643
  size?: number;
@@ -1621,8 +1694,8 @@ type FlattenedTooltipData = {
1621
1694
  seriesIndex: number;
1622
1695
  dataPointIndex: number;
1623
1696
  };
1624
- interface AccessibleTooltipProps extends Omit<BaseTooltipProps$1<DataPointDate>, 'renderTooltip'> {
1625
- renderTooltip?: (params: RenderTooltipParams$1<DataPointDate>) => ReactNode;
1697
+ interface AccessibleTooltipProps extends Omit<XyChartTooltipProps<DataPointDate>, 'renderTooltip'> {
1698
+ renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
1626
1699
  selectedIndex?: number | undefined;
1627
1700
  tooltipRef?: (element: HTMLDivElement | null) => void;
1628
1701
  keyboardFocusedClassName?: string;
@@ -1756,5 +1829,5 @@ declare const useGlobalChartsTheme: () => CompleteChartTheme;
1756
1829
  */
1757
1830
  declare const defaultTheme: CompleteChartTheme;
1758
1831
  //#endregion
1759
- 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 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 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, LeaderboardChartResponsive as LeaderboardChart, type LeaderboardChartProps, LeaderboardChart as LeaderboardChartUnresponsive, type LeaderboardEntry, Legend, type LegendItemStyles, type LegendLabelStyles, type LegendPosition, type LegendProps, 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 RenderTooltipParams, type RenderValueProps, type ScaleOptions, type SeriesData, type SeriesDataOptions, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, type TooltipData, type TooltipDatum, type TooltipProps, type TooltipRenderProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, useChartLegendItems, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
1832
+ 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 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 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, 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 SeriesData, type SeriesDataOptions, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, type TooltipData, type TooltipDatum, type TooltipProps, type TooltipRenderProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type XyChartTooltipProps, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, useChartLegendItems, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
1760
1833
  //# sourceMappingURL=index.d.cts.map
package/dist/index.d.ts CHANGED
@@ -1,23 +1,63 @@
1
- import { EventHandlerParams, EventHandlerParams as EventHandlerParams$1, GlyphProps, GridStyles, GridStyles as GridStyles$1, LineStyles, LineStyles as LineStyles$1 } from "@visx/xychart";
2
- import { CSSProperties, ComponentProps, ComponentType, FC, MouseEvent, PointerEvent, PropsWithChildren, ReactNode, SVGProps } from "react";
1
+ import { EventHandlerParams, EventHandlerParams as EventHandlerParams$1, GlyphProps, GridStyles, GridStyles as GridStyles$1, LineStyles, LineStyles as LineStyles$1, TooltipContextType } from "@visx/xychart";
2
+ import { CSSProperties, ComponentClass, ComponentProps, ComponentType, FC, MouseEvent, PointerEvent, PropsWithChildren, ReactElement, ReactNode, SVGProps } from "react";
3
3
  import { TextProps } from "@visx/text";
4
- import { ScaleInput, ScaleType } from "@visx/scale";
4
+ import { PickD3Scale, ScaleInput, ScaleType } from "@visx/scale";
5
5
  import { LegendOrdinal } from "@visx/legend";
6
- import { GoogleDataTableColumn, GoogleDataTableColumn as GoogleDataTableColumn$1, GoogleDataTableColumnRoleType, GoogleDataTableRow, GoogleDataTableRow as GoogleDataTableRow$1 } from "react-google-charts";
7
- import { CircleSubjectProps } from "@visx/annotation/lib/components/CircleSubject.js";
8
- import { ConnectorProps } from "@visx/annotation/lib/components/Connector.js";
9
- import { LabelProps } from "@visx/annotation/lib/components/Label.js";
10
- import { LineSubjectProps } from "@visx/annotation/lib/components/LineSubject.js";
6
+ import { CircleSubjectProps, ConnectorProps, LabelProps, LineSubjectProps } from "@visx/annotation";
7
+ import { TooltipProps as TooltipProps$1, UseTooltipPortalOptions } from "@visx/tooltip";
8
+ import { PieProvidedProps } from "@visx/shape";
11
9
  import { AxisRendererProps, AxisScale, Orientation, TickFormatter } from "@visx/axis";
12
- import { LegendShape as LegendShape$1 } from "@visx/legend/lib/types/index.js";
13
- import { TextProps as TextProps$1 } from "@visx/text/lib/Text.js";
14
- import { GapSize } from "@wordpress/theme";
15
- import { RenderTooltipParams, RenderTooltipParams as RenderTooltipParams$1, TooltipProps as BaseTooltipProps$1 } from "@visx/xychart/lib/components/Tooltip.js";
16
- import { PieArcDatum } from "@visx/shape/lib/shapes/Pie.js";
17
10
 
18
11
  //#region src/types.d.ts
19
12
  type ValueOf<T> = T[keyof T];
20
13
  type Optional<T, K extends keyof T> = Pick<Partial<T>, K> & Omit<T, K>;
14
+ /**
15
+ * Mirrors the WordPress Design System gap token scale used by the WordPress UI Stack.
16
+ */
17
+ type GapSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
18
+ type LegendShapeLabel<Data, Output, ExtraAttributes = object> = {
19
+ datum: Data;
20
+ index: number;
21
+ text: string;
22
+ value?: Output;
23
+ } & ExtraAttributes;
24
+ type LegendShapeRenderProps<Data, Output> = {
25
+ width?: string | number;
26
+ height?: string | number;
27
+ label: LegendShapeLabel<Data, Output>;
28
+ item: Data;
29
+ itemIndex: number;
30
+ fill?: string;
31
+ size?: string | number;
32
+ style?: CSSProperties;
33
+ };
34
+ type LegendShape<Data, Output> = 'rect' | 'circle' | 'line' | FC<LegendShapeRenderProps<Data, Output>> | ComponentClass<LegendShapeRenderProps<Data, Output>>;
35
+ type GoogleDataTableColumnType = 'string' | 'number' | 'boolean' | 'date' | 'datetime' | 'timeofday';
36
+ declare enum GoogleDataTableColumnRoleType {
37
+ annotation = "annotation",
38
+ annotationText = "annotationText",
39
+ certainty = "certainty",
40
+ emphasis = "emphasis",
41
+ interval = "interval",
42
+ scope = "scope",
43
+ style = "style",
44
+ tooltip = "tooltip",
45
+ domain = "domain"
46
+ }
47
+ type GoogleDataTableColumn = {
48
+ type: GoogleDataTableColumnType;
49
+ label?: string;
50
+ role?: GoogleDataTableColumnRoleType;
51
+ pattern?: string;
52
+ p?: Record<string, unknown>;
53
+ id?: string;
54
+ } | string;
55
+ type GoogleDataTableCell = {
56
+ v?: unknown;
57
+ f?: string;
58
+ p?: Record<string, unknown>;
59
+ } | string | number | boolean | Date | null;
60
+ type GoogleDataTableRow = GoogleDataTableCell[];
21
61
  type ChartType = 'area' | 'bar' | 'conversion-funnel' | 'leaderboard' | 'line' | 'pie' | 'pie-semi-circle';
22
62
  type OrientationType = ValueOf<typeof Orientation>;
23
63
  type AnnotationStyles = {
@@ -66,7 +106,7 @@ type DataPoint = {
66
106
  * ['Canada', 38000000, 9985000]
67
107
  * ]
68
108
  */
69
- type GeoData = [GoogleDataTableColumn$1[], ...GoogleDataTableRow$1[]];
109
+ type GeoData = [GoogleDataTableColumn[], ...GoogleDataTableRow[]];
70
110
  type DataPointDate = {
71
111
  date?: Date;
72
112
  /**
@@ -92,7 +132,7 @@ type LeaderboardEntry = {
92
132
  /**
93
133
  * Human-readable name (e.g., 'Direct') or a JSX element (e.g., <h4>Direct</h4>)
94
134
  */
95
- label: string | JSX.Element;
135
+ label: string | ReactElement;
96
136
  /**
97
137
  * Value of the entry
98
138
  */
@@ -130,6 +170,16 @@ type LeaderboardEntry = {
130
170
  * never both, since interactive elements cannot be nested in HTML.
131
171
  */
132
172
  onClick?: (event: MouseEvent<HTMLButtonElement>) => void;
173
+ /**
174
+ * Optional accessible name for the interactive row's `<button>`. Only applies
175
+ * when `onClick` is set — without it the row renders as a Fragment with no
176
+ * element to receive `aria-label`. By default the button derives its name from
177
+ * its rendered content (label text plus the formatted value), which is the
178
+ * right outcome for plain-text labels. Set this when the `label` is JSX whose
179
+ * text content does not yield a clean name on its own — e.g. an image-only
180
+ * label — to give assistive tech a deterministic, human-readable name.
181
+ */
182
+ ariaLabel?: string;
133
183
  };
134
184
  type GradientStop = {
135
185
  offset: string;
@@ -217,8 +267,8 @@ type ChartTheme = {
217
267
  labelStyles?: CSSProperties; /** Styles for legend container */
218
268
  containerStyles?: CSSProperties;
219
269
  }; /** Styles for small SVG text (eg. axis tick labels), passed through to the XYChart theme. */
220
- svgLabelSmall?: TextProps$1; /** Styles for large SVG text (eg. axis titles), passed through to the XYChart theme. */
221
- svgLabelBig?: TextProps$1;
270
+ svgLabelSmall?: TextProps; /** Styles for large SVG text (eg. axis titles), passed through to the XYChart theme. */
271
+ svgLabelBig?: TextProps;
222
272
  annotationStyles?: AnnotationStyles; /** GeoChart specific settings */
223
273
  geoChart?: {
224
274
  /** Default fill color for a geo chart feature (e.g. country) with no data */featureFillColor?: string;
@@ -226,7 +276,7 @@ type ChartTheme = {
226
276
  leaderboardChart?: {
227
277
  /** Gap between rows in the leaderboard grid */rowGap?: number; /** Gap between columns in the leaderboard grid */
228
278
  columnGap?: number; /** Spacing between label and progress bars */
229
- labelSpacing?: number; /** Primary color for current period bars */
279
+ labelSpacing?: GapSize; /** Primary color for current period bars */
230
280
  primaryColor?: string; /** Secondary color for comparison period bars */
231
281
  secondaryColor?: string; /** Delta colors: [negative, neutral, positive] */
232
282
  deltaColors?: [string, string, string];
@@ -374,7 +424,7 @@ type ChartLegendConfig<T = DataPoint | DataPointDate | LeaderboardEntry> = {
374
424
  /**
375
425
  * Shape of the legend marker icon.
376
426
  */
377
- shape?: LegendShape$1<T, number>;
427
+ shape?: LegendShape<T, number>;
378
428
  /**
379
429
  * Enable interactive legend items that can toggle series visibility.
380
430
  * Supported for all chart types that render series.
@@ -578,7 +628,7 @@ interface ChartLegendOptions {
578
628
  renderGlyph?: <Datum extends object>(props: GlyphProps<Datum>) => ReactNode;
579
629
  showValues?: boolean;
580
630
  legendValueDisplay?: LegendValueDisplay;
581
- legendShape?: LegendShape$1<SeriesData[], number>;
631
+ legendShape?: LegendShape<SeriesData[], number>;
582
632
  }
583
633
  /**
584
634
  * Hook to transform chart data into legend items
@@ -587,7 +637,7 @@ interface ChartLegendOptions {
587
637
  * @param legendShape - The shape type for legend items (string literal or React component)
588
638
  * @return Array of legend items ready for display
589
639
  */
590
- declare function useChartLegendItems<T extends SeriesData[] | DataPointDate[] | DataPointPercentageCalculated[]>(data: T, options?: ChartLegendOptions, legendShape?: LegendShape$1<SeriesData[], number>): BaseLegendItem[];
640
+ declare function useChartLegendItems<T extends SeriesData[] | DataPointDate[] | DataPointPercentageCalculated[]>(data: T, options?: ChartLegendOptions, legendShape?: LegendShape<SeriesData[], number>): BaseLegendItem[];
591
641
  //#endregion
592
642
  //#region src/charts/private/single-chart-context/single-chart-context.d.ts
593
643
  interface ChartInstanceRef {
@@ -608,6 +658,29 @@ interface ChartInstanceRef {
608
658
  }
609
659
  type SingleChartRef = ChartInstanceRef;
610
660
  //#endregion
661
+ //#region src/visx/types.d.ts
662
+ type RenderTooltipParams<Datum extends object> = TooltipContextType<Datum> & {
663
+ colorScale?: PickD3Scale<'ordinal', string, string>;
664
+ };
665
+ interface RenderTooltipGlyphProps<Datum extends object> extends GlyphProps<Datum> {
666
+ glyphStyle?: SVGProps<SVGCircleElement>;
667
+ isNearestDatum: boolean;
668
+ }
669
+ type XyChartTooltipProps<Datum extends object> = {
670
+ renderTooltip: (params: RenderTooltipParams<Datum>) => ReactNode;
671
+ renderGlyph?: (params: RenderTooltipGlyphProps<Datum>) => ReactNode;
672
+ snapTooltipToDatumX?: boolean;
673
+ snapTooltipToDatumY?: boolean;
674
+ showVerticalCrosshair?: boolean;
675
+ showHorizontalCrosshair?: boolean;
676
+ showDatumGlyph?: boolean;
677
+ showSeriesGlyphs?: boolean;
678
+ verticalCrosshairStyle?: SVGProps<SVGLineElement>;
679
+ horizontalCrosshairStyle?: SVGProps<SVGLineElement>;
680
+ glyphStyle?: SVGProps<SVGCircleElement>;
681
+ resizeObserverPolyfill?: UseTooltipPortalOptions['polyfill'];
682
+ } & Omit<TooltipProps$1, 'left' | 'top' | 'children'> & Pick<UseTooltipPortalOptions, 'debounce' | 'detectBounds' | 'scroll' | 'zIndex'>;
683
+ //#endregion
611
684
  //#region src/charts/line-chart/types.d.ts
612
685
  type LineChartAnnotationProps = {
613
686
  datum: DataPointDate;
@@ -634,7 +707,7 @@ interface LineChartProps extends BaseChartProps<SeriesData[]> {
634
707
  withGradientFill: boolean;
635
708
  smoothing?: boolean;
636
709
  curveType?: CurveType;
637
- renderTooltip?: (params: RenderTooltipParams$1<DataPointDate>) => ReactNode;
710
+ renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
638
711
  withStartGlyphs?: boolean;
639
712
  withEndGlyphs?: boolean;
640
713
  renderGlyph?: <Datum extends object>(props: GlyphProps<Datum>) => ReactNode;
@@ -684,7 +757,7 @@ interface AreaChartProps extends BaseChartProps<SeriesData[]> {
684
757
  /**
685
758
  * Custom tooltip renderer.
686
759
  */
687
- renderTooltip?: (params: RenderTooltipParams$1<DataPointDate>) => ReactNode;
760
+ renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
688
761
  /**
689
762
  * Whether to show crosshair lines in the tooltip.
690
763
  */
@@ -750,7 +823,7 @@ declare const AreaChartResponsive: AreaChartResponsiveComponent;
750
823
  //#endregion
751
824
  //#region src/charts/bar-chart/bar-chart.d.ts
752
825
  interface BarChartProps extends BaseChartProps<SeriesData[]> {
753
- renderTooltip?: (params: RenderTooltipParams$1<DataPointDate>) => ReactNode;
826
+ renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
754
827
  orientation?: 'horizontal' | 'vertical';
755
828
  withPatterns?: boolean;
756
829
  showZeroValues?: boolean;
@@ -837,7 +910,7 @@ declare const BarListChartResponsive: ({
837
910
  width,
838
911
  height,
839
912
  ...chartProps
840
- }: Omit<BarListChartProps, "size" | "width" | "height"> & {
913
+ }: Omit<BarListChartProps, "width" | "height" | "size"> & {
841
914
  width?: number;
842
915
  height?: number;
843
916
  size?: number;
@@ -981,7 +1054,7 @@ declare const GeoChartResponsive: ({
981
1054
  width,
982
1055
  height,
983
1056
  ...chartProps
984
- }: Omit<GeoChartProps, "size" | "width" | "height"> & {
1057
+ }: Omit<GeoChartProps, "width" | "height" | "size"> & {
985
1058
  width?: number;
986
1059
  height?: number;
987
1060
  size?: number;
@@ -1057,7 +1130,7 @@ declare const LeaderboardChartResponsive: (({
1057
1130
  width,
1058
1131
  height,
1059
1132
  ...chartProps
1060
- }: Omit<LeaderboardChartProps, "size" | "width" | "height"> & {
1133
+ }: Omit<LeaderboardChartProps, "width" | "height" | "size"> & {
1061
1134
  width?: number;
1062
1135
  height?: number;
1063
1136
  size?: number;
@@ -1448,7 +1521,7 @@ interface PieSemiCircleChartProps extends BaseChartProps<DataPointPercentage[]>
1448
1521
  type PieSemiCircleChartBaseProps = Optional<PieSemiCircleChartProps, 'width'>;
1449
1522
  type PieSemiCircleChartComponent = ChartComponentWithComposition<PieSemiCircleChartBaseProps>;
1450
1523
  type PieSemiCircleChartResponsiveComponent = ChartComponentWithComposition<PieSemiCircleChartBaseProps & ResponsiveConfig>;
1451
- type ArcData = PieArcDatum<DataPointPercentageCalculated>;
1524
+ type ArcData = PieProvidedProps<DataPointPercentageCalculated>['arcs'][number];
1452
1525
  declare const PieSemiCircleChart: PieSemiCircleChartComponent;
1453
1526
  declare const PieSemiCircleChartResponsive: PieSemiCircleChartResponsiveComponent;
1454
1527
  //#endregion
@@ -1564,7 +1637,7 @@ declare const Sparkline: ({
1564
1637
  width,
1565
1638
  height,
1566
1639
  ...chartProps
1567
- }: Omit<SparklineProps, "size" | "width" | "height"> & {
1640
+ }: Omit<SparklineProps, "width" | "height" | "size"> & {
1568
1641
  width?: number;
1569
1642
  height?: number;
1570
1643
  size?: number;
@@ -1621,8 +1694,8 @@ type FlattenedTooltipData = {
1621
1694
  seriesIndex: number;
1622
1695
  dataPointIndex: number;
1623
1696
  };
1624
- interface AccessibleTooltipProps extends Omit<BaseTooltipProps$1<DataPointDate>, 'renderTooltip'> {
1625
- renderTooltip?: (params: RenderTooltipParams$1<DataPointDate>) => ReactNode;
1697
+ interface AccessibleTooltipProps extends Omit<XyChartTooltipProps<DataPointDate>, 'renderTooltip'> {
1698
+ renderTooltip?: (params: RenderTooltipParams<DataPointDate>) => ReactNode;
1626
1699
  selectedIndex?: number | undefined;
1627
1700
  tooltipRef?: (element: HTMLDivElement | null) => void;
1628
1701
  keyboardFocusedClassName?: string;
@@ -1710,7 +1783,7 @@ type GetElementStylesParams = {
1710
1783
  index: number;
1711
1784
  data?: SeriesData | DataPointPercentage;
1712
1785
  overrideColor?: string;
1713
- legendShape?: LegendShape$1<SeriesData[], number>;
1786
+ legendShape?: LegendShape<SeriesData[], number>;
1714
1787
  };
1715
1788
  type ElementStyles = {
1716
1789
  color: string;
@@ -1756,5 +1829,5 @@ declare const useGlobalChartsTheme: () => CompleteChartTheme;
1756
1829
  */
1757
1830
  declare const defaultTheme: CompleteChartTheme;
1758
1831
  //#endregion
1759
- 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 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 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, LeaderboardChartResponsive as LeaderboardChart, type LeaderboardChartProps, LeaderboardChart as LeaderboardChartUnresponsive, type LeaderboardEntry, Legend, type LegendItemStyles, type LegendLabelStyles, type LegendPosition, type LegendProps, 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 RenderTooltipParams, type RenderValueProps, type ScaleOptions, type SeriesData, type SeriesDataOptions, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, type TooltipData, type TooltipDatum, type TooltipProps, type TooltipRenderProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, useChartLegendItems, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
1832
+ 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 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 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, 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 SeriesData, type SeriesDataOptions, Sparkline, type SparklineDataPoint, type SparklineProps, SparklineUnresponsive, type StepLabelRenderProps, type StepRateRenderProps, type TooltipData, type TooltipDatum, type TooltipProps, type TooltipRenderProps, type TrendDirection, TrendIndicator, type TrendIndicatorProps, type XyChartTooltipProps, defaultTheme, formatMetricValue, formatPercentage, getColorDistance, hexToRgba, isValidHexColor, lightenHexColor, mergeThemes, normalizeColorToHex, parseAsLocalDate, parseHslString, parseRgbString, useChartLegendItems, useGlobalChartsContext, useGlobalChartsTheme, useLeaderboardLegendItems, validateHexColor };
1760
1833
  //# sourceMappingURL=index.d.ts.map