@automattic/charts 1.5.3 → 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 (61) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +2 -2
  3. package/dist/index.cjs +8981 -9569
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.css +318 -202
  6. package/dist/index.d.cts +1319 -1183
  7. package/dist/index.d.ts +1319 -1183
  8. package/dist/index.js +8561 -9570
  9. package/dist/index.js.map +1 -1
  10. package/dist/visx/group/index.cjs +8 -8
  11. package/dist/visx/group/index.d.cts +2 -3
  12. package/dist/visx/group/index.d.ts +2 -3
  13. package/dist/visx/group/index.js +1 -7
  14. package/dist/visx/legend/index.cjs +20 -10
  15. package/dist/visx/legend/index.d.cts +2 -1
  16. package/dist/visx/legend/index.d.ts +2 -1
  17. package/dist/visx/legend/index.js +2 -10
  18. package/dist/visx/text/index.cjs +20 -12
  19. package/dist/visx/text/index.d.cts +2 -1
  20. package/dist/visx/text/index.d.ts +2 -1
  21. package/dist/visx/text/index.js +2 -12
  22. package/package.json +32 -38
  23. package/src/charts/area-chart/types.ts +1 -1
  24. package/src/charts/bar-chart/bar-chart.tsx +1 -1
  25. package/src/charts/geo-chart/geo-chart.tsx +3 -1
  26. package/src/charts/leaderboard-chart/leaderboard-chart.module.scss +113 -1
  27. package/src/charts/leaderboard-chart/leaderboard-chart.tsx +37 -6
  28. package/src/charts/leaderboard-chart/test/leaderboard-chart.test.tsx +81 -0
  29. package/src/charts/line-chart/line-chart.tsx +1 -1
  30. package/src/charts/line-chart/private/line-chart-annotation-label-popover.tsx +18 -2
  31. package/src/charts/line-chart/private/line-chart-annotation.tsx +1 -1
  32. package/src/charts/line-chart/types.ts +1 -1
  33. package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.tsx +2 -2
  34. package/src/charts/private/chart-layout/chart-layout.tsx +1 -2
  35. package/src/charts/private/x-zoom.tsx +2 -2
  36. package/src/components/legend/hooks/use-chart-legend-items.ts +6 -2
  37. package/src/components/legend/legend.tsx +1 -2
  38. package/src/components/legend/utils/label-transform-factory.ts +1 -1
  39. package/src/components/tooltip/accessible-tooltip.tsx +2 -6
  40. package/src/index.ts +6 -5
  41. package/src/providers/chart-context/themes.ts +1 -1
  42. package/src/providers/chart-context/types.ts +7 -2
  43. package/src/types.ts +118 -11
  44. package/src/utils/get-styles.ts +1 -2
  45. package/src/visx/types.ts +30 -1
  46. package/dist/chunk-5WRI5ZAA.js +0 -31
  47. package/dist/chunk-5WRI5ZAA.js.map +0 -1
  48. package/dist/chunk-7OZEQ5HE.cjs +0 -9
  49. package/dist/chunk-7OZEQ5HE.cjs.map +0 -1
  50. package/dist/chunk-DZUJEN5N.cjs +0 -31
  51. package/dist/chunk-DZUJEN5N.cjs.map +0 -1
  52. package/dist/chunk-NFRB2POF.js +0 -9
  53. package/dist/chunk-NFRB2POF.js.map +0 -1
  54. package/dist/index.css.map +0 -1
  55. package/dist/visx/group/index.cjs.map +0 -1
  56. package/dist/visx/group/index.js.map +0 -1
  57. package/dist/visx/legend/index.cjs.map +0 -1
  58. package/dist/visx/legend/index.js.map +0 -1
  59. package/dist/visx/text/index.cjs.map +0 -1
  60. package/dist/visx/text/index.js.map +0 -1
  61. package/tsup.config.ts +0 -46
@@ -1,5 +1,4 @@
1
1
  import { __ } from '@wordpress/i18n';
2
- import { Icon, close } from '@wordpress/icons';
3
2
  import { Stack } from '@wordpress/ui';
4
3
  import clsx from 'clsx';
5
4
  import { useEffect, useId, useRef, useState } from 'react';
@@ -10,6 +9,23 @@ import type { FC } from 'react';
10
9
 
11
10
  export const POPOVER_BUTTON_SIZE = 44;
12
11
 
12
+ const CloseIcon = () => (
13
+ <svg
14
+ width="16"
15
+ height="16"
16
+ viewBox="0 0 24 24"
17
+ fill="none"
18
+ stroke="currentColor"
19
+ strokeWidth="2"
20
+ strokeLinecap="round"
21
+ strokeLinejoin="round"
22
+ aria-hidden="true"
23
+ focusable="false"
24
+ >
25
+ <path d="M6 6l12 12M18 6L6 18" />
26
+ </svg>
27
+ );
28
+
13
29
  interface LineChartAnnotationLabelWithPopoverProps {
14
30
  title: string;
15
31
  subtitle?: string;
@@ -101,7 +117,7 @@ const LineChartAnnotationLabelWithPopover: FC< LineChartAnnotationLabelWithPopov
101
117
  className={ styles[ 'line-chart__annotation-label-popover-close-button' ] }
102
118
  aria-label={ __( 'Close', 'jetpack-charts' ) }
103
119
  >
104
- <Icon icon={ close } size={ 16 } />
120
+ <CloseIcon />
105
121
  </button>
106
122
  </Stack>
107
123
  </div>
@@ -15,7 +15,7 @@ import LineChartAnnotationLabelWithPopover, {
15
15
  POPOVER_BUTTON_SIZE,
16
16
  } from './line-chart-annotation-label-popover';
17
17
  import type { LineChartAnnotationProps } from '../types';
18
- import type { LabelProps } from '@visx/annotation/lib/components/Label';
18
+ import type { LabelProps } from '@visx/annotation';
19
19
  import type { TextProps } from '@visx/text';
20
20
  import type { FC } from 'react';
21
21
 
@@ -5,8 +5,8 @@ import type {
5
5
  AnnotationStyles,
6
6
  DataPoint,
7
7
  } from '../../types';
8
+ import type { RenderTooltipParams } from '../../visx/types';
8
9
  import type { GlyphProps } from '@visx/xychart';
9
- import type { RenderTooltipParams } from '@visx/xychart/lib/components/Tooltip';
10
10
  import type { ReactNode, SVGProps, FC } from 'react';
11
11
 
12
12
  export type LineChartAnnotationProps = {
@@ -37,7 +37,7 @@ import type {
37
37
  } from '../../types';
38
38
  import type { ChartComponentWithComposition } from '../private/chart-composition';
39
39
  import type { ResponsiveConfig } from '../private/with-responsive';
40
- import type { PieArcDatum } from '@visx/shape/lib/shapes/Pie';
40
+ import type { PieProvidedProps } from '@visx/shape';
41
41
  import type { FC, MouseEvent, ReactNode } from 'react';
42
42
 
43
43
  /**
@@ -135,7 +135,7 @@ type PieSemiCircleChartResponsiveComponent = ChartComponentWithComposition<
135
135
  PieSemiCircleChartBaseProps & ResponsiveConfig
136
136
  >;
137
137
 
138
- export type ArcData = PieArcDatum< DataPointPercentageCalculated >;
138
+ export type ArcData = PieProvidedProps< DataPointPercentageCalculated >[ 'arcs' ][ number ];
139
139
 
140
140
  /**
141
141
  * Validates the semi-circle pie chart data
@@ -3,9 +3,8 @@ import { useEffect } from 'react';
3
3
  import { useElementSize } from '../../../hooks';
4
4
  import { renderLegendSlot } from '../chart-composition';
5
5
  import styles from './chart-layout.module.scss';
6
- import type { LegendPosition } from '../../../types';
6
+ import type { GapSize, LegendPosition } from '../../../types';
7
7
  import type { LegendChild } from '../chart-composition/use-chart-children';
8
- import type { GapSize } from '@wordpress/theme';
9
8
  import type { CSSProperties, ReactNode } from 'react';
10
9
 
11
10
  /**
@@ -5,7 +5,7 @@ import styles from './x-zoom.module.scss';
5
5
  import type { SingleChartRef } from './single-chart-context';
6
6
  import type { AxisScale } from '@visx/axis';
7
7
  import type { EventHandlerParams } from '@visx/xychart';
8
- import type { MutableRefObject, ReactNode } from 'react';
8
+ import type { ReactNode, RefObject } from 'react';
9
9
 
10
10
  const MIN_DRAG_PIXELS = 6;
11
11
 
@@ -37,7 +37,7 @@ export function useXZoom< T extends Date | number = Date >( {
37
37
  userHandlers,
38
38
  }: {
39
39
  enabled: boolean;
40
- chartRef: MutableRefObject< SingleChartRef | null >;
40
+ chartRef: RefObject< SingleChartRef | null >;
41
41
  userHandlers?: {
42
42
  onPointerDown?: PointerHandler;
43
43
  onPointerMove?: PointerHandler;
@@ -6,9 +6,13 @@ import {
6
6
  type ElementStyles,
7
7
  } from '../../../providers';
8
8
  import { formatPercentage } from '../../../utils';
9
- import type { SeriesData, DataPointDate, DataPointPercentageCalculated } from '../../../types';
9
+ import type {
10
+ SeriesData,
11
+ DataPointDate,
12
+ DataPointPercentageCalculated,
13
+ LegendShape,
14
+ } from '../../../types';
10
15
  import type { BaseLegendItem } from '../types';
11
- import type { LegendShape } from '@visx/legend/lib/types';
12
16
  import type { GlyphProps } from '@visx/xychart';
13
17
  import type { ReactNode } from 'react';
14
18
 
@@ -3,8 +3,7 @@ import { SingleChartContext } from '../../charts/private/single-chart-context';
3
3
  import { GlobalChartsContext } from '../../providers';
4
4
  import { BaseLegend } from './private';
5
5
  import type { LegendProps } from './types';
6
- import type { ChartType } from '../../types';
7
- import type { LegendShape } from '@visx/legend/lib/types';
6
+ import type { ChartType, LegendShape } from '../../types';
8
7
 
9
8
  const defaultShapeByChartType: Partial<
10
9
  Record< ChartType, Extract< LegendShape< unknown, unknown >, string > >
@@ -1,4 +1,4 @@
1
- import type { ItemTransformer, LabelFormatter } from '@visx/legend/lib/types';
1
+ import type { ItemTransformer, LabelFormatter } from '@visx/legend';
2
2
  import type { AnyD3Scale, ScaleInput } from '@visx/scale';
3
3
 
4
4
  /**
@@ -1,10 +1,7 @@
1
1
  import { Tooltip, TooltipContext } from '@visx/xychart';
2
2
  import { useContext, useEffect, useCallback, useMemo } from 'react';
3
3
  import type { SeriesData, DataPointDate } from '../../types';
4
- import type {
5
- TooltipProps as BaseTooltipProps,
6
- RenderTooltipParams,
7
- } from '@visx/xychart/lib/components/Tooltip';
4
+ import type { RenderTooltipParams, XyChartTooltipProps } from '../../visx/types';
8
5
  import type { ReactNode } from 'react';
9
6
 
10
7
  // Type for flattened tooltip data used in individual mode
@@ -17,7 +14,7 @@ export type FlattenedTooltipData = {
17
14
 
18
15
  // Enhanced tooltip with keyboard navigation and accessibility
19
16
  interface AccessibleTooltipProps
20
- extends Omit< BaseTooltipProps< DataPointDate >, 'renderTooltip' > {
17
+ extends Omit< XyChartTooltipProps< DataPointDate >, 'renderTooltip' > {
21
18
  renderTooltip?: ( params: RenderTooltipParams< DataPointDate > ) => ReactNode;
22
19
  selectedIndex?: number | undefined;
23
20
  tooltipRef?: ( element: HTMLDivElement | null ) => void;
@@ -242,4 +239,3 @@ export const useKeyboardNavigation = ( {
242
239
 
243
240
  // Re-export the base Tooltip for backwards compatibility
244
241
  export { Tooltip };
245
- export type { BaseTooltipProps };
package/src/index.ts CHANGED
@@ -54,6 +54,12 @@ export type {
54
54
  ChartLegendConfig,
55
55
  BaseChartProps,
56
56
  GridProps,
57
+ GoogleDataTableColumn,
58
+ GoogleDataTableColumnRoleType,
59
+ GoogleDataTableRow,
60
+ LegendShape,
61
+ LegendShapeLabel,
62
+ LegendShapeRenderProps,
57
63
  } from './types';
58
64
  export type * from './visx/types';
59
65
  export type { PieChartProps, PieChartRenderTooltipParams } from './charts/pie-chart';
@@ -65,11 +71,6 @@ export type { GeoChartProps, GeoRegion, GeoResolution } from './charts/geo-chart
65
71
  export type { LegendValueDisplay, BaseLegendItem } from './components/legend';
66
72
  export type { TrendIndicatorProps, TrendDirection } from './components/trend-indicator';
67
73
  export type { LineStyles, GridStyles, EventHandlerParams } from '@visx/xychart';
68
- export type {
69
- GoogleDataTableColumn,
70
- GoogleDataTableRow,
71
- GoogleDataTableColumnRoleType,
72
- } from 'react-google-charts';
73
74
 
74
75
  // Re-exports from removed individual entry points
75
76
  export { useLeaderboardLegendItems } from './charts/leaderboard-chart/hooks';
@@ -53,7 +53,7 @@ const defaultTheme: CompleteChartTheme = {
53
53
  leaderboardChart: {
54
54
  rowGap: 12,
55
55
  columnGap: 4,
56
- labelSpacing: 1.5,
56
+ labelSpacing: 'xs',
57
57
  deltaColors: [ '#FF8C8F', '#757575', '#1F9828' ], // [negative, neutral, positive]
58
58
  },
59
59
  conversionFunnelChart: {
@@ -1,7 +1,12 @@
1
1
  import { CSSProperties, ReactNode } from 'react';
2
2
  import type { BaseLegendItem } from '../../components/legend';
3
- import type { ChartType, CompleteChartTheme, DataPointPercentage, SeriesData } from '../../types';
4
- import type { LegendShape } from '@visx/legend/lib/types';
3
+ import type {
4
+ ChartType,
5
+ CompleteChartTheme,
6
+ DataPointPercentage,
7
+ LegendShape,
8
+ SeriesData,
9
+ } from '../../types';
5
10
  import type { GlyphProps, LineStyles } from '@visx/xychart';
6
11
 
7
12
  export interface ChartRegistration {
package/src/types.ts CHANGED
@@ -1,20 +1,102 @@
1
- import type { CircleSubjectProps } from '@visx/annotation/lib/components/CircleSubject';
2
- import type { ConnectorProps } from '@visx/annotation/lib/components/Connector';
3
- import type { LabelProps } from '@visx/annotation/lib/components/Label';
4
- import type { LineSubjectProps } from '@visx/annotation/lib/components/LineSubject';
1
+ import type {
2
+ CircleSubjectProps,
3
+ ConnectorProps,
4
+ LabelProps,
5
+ LineSubjectProps,
6
+ } from '@visx/annotation';
5
7
  import type { AxisScale, Orientation, TickFormatter, AxisRendererProps } from '@visx/axis';
6
- import type { LegendShape } from '@visx/legend/lib/types';
7
8
  import type { ScaleInput, ScaleType } from '@visx/scale';
8
- import type { TextProps } from '@visx/text/lib/Text';
9
+ import type { TextProps } from '@visx/text';
9
10
  import type { EventHandlerParams, GlyphProps, GridStyles, LineStyles } from '@visx/xychart';
10
- import type { GapSize } from '@wordpress/theme';
11
- import type { CSSProperties, PointerEvent, ReactNode } from 'react';
12
- import type { GoogleDataTableColumn, GoogleDataTableRow } from 'react-google-charts';
11
+ import type {
12
+ ComponentClass,
13
+ CSSProperties,
14
+ FC,
15
+ MouseEvent,
16
+ PointerEvent,
17
+ ReactElement,
18
+ ReactNode,
19
+ } from 'react';
13
20
 
14
21
  type ValueOf< T > = T[ keyof T ];
15
22
 
16
23
  export type Optional< T, K extends keyof T > = Pick< Partial< T >, K > & Omit< T, K >;
17
24
 
25
+ /**
26
+ * Mirrors the WordPress Design System gap token scale used by the WordPress UI Stack.
27
+ */
28
+ export type GapSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl';
29
+
30
+ export type LegendShapeLabel< Data, Output, ExtraAttributes = object > = {
31
+ datum: Data;
32
+ index: number;
33
+ text: string;
34
+ value?: Output;
35
+ } & ExtraAttributes;
36
+
37
+ export type LegendShapeRenderProps< Data, Output > = {
38
+ width?: string | number;
39
+ height?: string | number;
40
+ label: LegendShapeLabel< Data, Output >;
41
+ item: Data;
42
+ itemIndex: number;
43
+ fill?: string;
44
+ size?: string | number;
45
+ style?: CSSProperties;
46
+ };
47
+
48
+ export type LegendShape< Data, Output > =
49
+ | 'rect'
50
+ | 'circle'
51
+ | 'line'
52
+ | FC< LegendShapeRenderProps< Data, Output > >
53
+ | ComponentClass< LegendShapeRenderProps< Data, Output > >;
54
+
55
+ export type GoogleDataTableColumnType =
56
+ | 'string'
57
+ | 'number'
58
+ | 'boolean'
59
+ | 'date'
60
+ | 'datetime'
61
+ | 'timeofday';
62
+
63
+ export enum GoogleDataTableColumnRoleType {
64
+ annotation = 'annotation',
65
+ annotationText = 'annotationText',
66
+ certainty = 'certainty',
67
+ emphasis = 'emphasis',
68
+ interval = 'interval',
69
+ scope = 'scope',
70
+ style = 'style',
71
+ tooltip = 'tooltip',
72
+ domain = 'domain',
73
+ }
74
+
75
+ export type GoogleDataTableColumn =
76
+ | {
77
+ type: GoogleDataTableColumnType;
78
+ label?: string;
79
+ role?: GoogleDataTableColumnRoleType;
80
+ pattern?: string;
81
+ p?: Record< string, unknown >;
82
+ id?: string;
83
+ }
84
+ | string;
85
+
86
+ export type GoogleDataTableCell =
87
+ | {
88
+ v?: unknown;
89
+ f?: string;
90
+ p?: Record< string, unknown >;
91
+ }
92
+ | string
93
+ | number
94
+ | boolean
95
+ | Date
96
+ | null;
97
+
98
+ export type GoogleDataTableRow = GoogleDataTableCell[];
99
+
18
100
  export type ChartType =
19
101
  | 'area'
20
102
  | 'bar'
@@ -101,7 +183,7 @@ export type LeaderboardEntry = {
101
183
  /**
102
184
  * Human-readable name (e.g., 'Direct') or a JSX element (e.g., <h4>Direct</h4>)
103
185
  */
104
- label: string | JSX.Element;
186
+ label: string | ReactElement;
105
187
 
106
188
  /**
107
189
  * Value of the entry
@@ -132,6 +214,31 @@ export type LeaderboardEntry = {
132
214
  * Optional color for the entry's image/icon
133
215
  */
134
216
  imageColor?: string;
217
+
218
+ /**
219
+ * Optional click handler. When provided, the entire row becomes an
220
+ * interactive `<button>`: clickable and keyboard-focusable (Enter/Space),
221
+ * with a chevron affordance revealed on hover/focus. The consumer
222
+ * decides what the action does (e.g. drill-down). Rows without onClick are
223
+ * inert and render unchanged.
224
+ *
225
+ * For links or other interactive affordances (external-link icons, info
226
+ * tooltips), put them in the `label` render prop instead of using onClick —
227
+ * a row is either a button (onClick) or carries interactive label content,
228
+ * never both, since interactive elements cannot be nested in HTML.
229
+ */
230
+ onClick?: ( event: MouseEvent< HTMLButtonElement > ) => void;
231
+
232
+ /**
233
+ * Optional accessible name for the interactive row's `<button>`. Only applies
234
+ * when `onClick` is set — without it the row renders as a Fragment with no
235
+ * element to receive `aria-label`. By default the button derives its name from
236
+ * its rendered content (label text plus the formatted value), which is the
237
+ * right outcome for plain-text labels. Set this when the `label` is JSX whose
238
+ * text content does not yield a clean name on its own — e.g. an image-only
239
+ * label — to give assistive tech a deterministic, human-readable name.
240
+ */
241
+ ariaLabel?: string;
135
242
  };
136
243
 
137
244
  export type GradientStop = {
@@ -259,7 +366,7 @@ export type ChartTheme = {
259
366
  /** Gap between columns in the leaderboard grid */
260
367
  columnGap?: number;
261
368
  /** Spacing between label and progress bars */
262
- labelSpacing?: number;
369
+ labelSpacing?: GapSize;
263
370
  /** Primary color for current period bars */
264
371
  primaryColor?: string;
265
372
  /** Secondary color for comparison period bars */
@@ -1,5 +1,4 @@
1
- import type { ChartTheme, SeriesData } from '../types';
2
- import type { LegendShape } from '@visx/legend/lib/types';
1
+ import type { ChartTheme, LegendShape, SeriesData } from '../types';
3
2
  import type { LineStyles } from '@visx/xychart';
4
3
 
5
4
  /**
package/src/visx/types.ts CHANGED
@@ -1,2 +1,31 @@
1
- export type { RenderTooltipParams } from '@visx/xychart/lib/components/Tooltip';
1
+ import type { PickD3Scale } from '@visx/scale';
2
+ import type { TooltipProps as VisxTooltipProps, UseTooltipPortalOptions } from '@visx/tooltip';
3
+ import type { GlyphProps, TooltipContextType } from '@visx/xychart';
4
+ import type { ReactNode, SVGProps } from 'react';
5
+
6
+ export type RenderTooltipParams< Datum extends object > = TooltipContextType< Datum > & {
7
+ colorScale?: PickD3Scale< 'ordinal', string, string >;
8
+ };
9
+
10
+ export interface RenderTooltipGlyphProps< Datum extends object > extends GlyphProps< Datum > {
11
+ glyphStyle?: SVGProps< SVGCircleElement >;
12
+ isNearestDatum: boolean;
13
+ }
14
+
15
+ export type XyChartTooltipProps< Datum extends object > = {
16
+ renderTooltip: ( params: RenderTooltipParams< Datum > ) => ReactNode;
17
+ renderGlyph?: ( params: RenderTooltipGlyphProps< Datum > ) => ReactNode;
18
+ snapTooltipToDatumX?: boolean;
19
+ snapTooltipToDatumY?: boolean;
20
+ showVerticalCrosshair?: boolean;
21
+ showHorizontalCrosshair?: boolean;
22
+ showDatumGlyph?: boolean;
23
+ showSeriesGlyphs?: boolean;
24
+ verticalCrosshairStyle?: SVGProps< SVGLineElement >;
25
+ horizontalCrosshairStyle?: SVGProps< SVGLineElement >;
26
+ glyphStyle?: SVGProps< SVGCircleElement >;
27
+ resizeObserverPolyfill?: UseTooltipPortalOptions[ 'polyfill' ];
28
+ } & Omit< VisxTooltipProps, 'left' | 'top' | 'children' > &
29
+ Pick< UseTooltipPortalOptions, 'debounce' | 'detectBounds' | 'scroll' | 'zIndex' >;
30
+
2
31
  export type { LineStyles, GridStyles } from '@visx/xychart';
@@ -1,31 +0,0 @@
1
- var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __commonJS = (cb, mod) => function __require() {
8
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
- // If the importer is in node compatibility mode or this is not an ESM
20
- // file that has been converted to a CommonJS file using a Babel-
21
- // compatible transform (i.e. "__esModule" has not been set), then set
22
- // "default" to the CommonJS "module.exports" for node compatibility.
23
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24
- mod
25
- ));
26
-
27
- export {
28
- __commonJS,
29
- __toESM
30
- };
31
- //# sourceMappingURL=chunk-5WRI5ZAA.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -1,9 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});// src/visx/text/index.ts
2
- var _text = require('@visx/text');
3
-
4
-
5
-
6
-
7
-
8
- exports.Text = _text.Text; exports.useText = _text.useText; exports.getStringWidth = _text.getStringWidth;
9
- //# sourceMappingURL=chunk-7OZEQ5HE.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/chunk-7OZEQ5HE.cjs","../src/visx/text/index.ts"],"names":[],"mappings":"AAAA;ACCA,kCAA8C;ADC9C;AACA;AACE;AACA;AACA;AACF,0GAAC","file":"/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/chunk-7OZEQ5HE.cjs","sourcesContent":[null,"// Re-export Text utilities from visx\nexport { Text, useText, getStringWidth } from '@visx/text';\n"]}
@@ -1,31 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var __create = Object.create;
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __getProtoOf = Object.getPrototypeOf;
6
- var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- var __commonJS = (cb, mod) => function __require() {
8
- return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
19
- // If the importer is in node compatibility mode or this is not an ESM
20
- // file that has been converted to a CommonJS file using a Babel-
21
- // compatible transform (i.e. "__esModule" has not been set), then set
22
- // "default" to the CommonJS "module.exports" for node compatibility.
23
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
24
- mod
25
- ));
26
-
27
-
28
-
29
-
30
- exports.__commonJS = __commonJS; exports.__toESM = __toESM;
31
- //# sourceMappingURL=chunk-DZUJEN5N.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/chunk-DZUJEN5N.cjs"],"names":[],"mappings":"AAAA,6EAAI,SAAS,EAAE,MAAM,CAAC,MAAM;AAC5B,IAAI,UAAU,EAAE,MAAM,CAAC,cAAc;AACrC,IAAI,iBAAiB,EAAE,MAAM,CAAC,wBAAwB;AACtD,IAAI,kBAAkB,EAAE,MAAM,CAAC,mBAAmB;AAClD,IAAI,aAAa,EAAE,MAAM,CAAC,cAAc;AACxC,IAAI,aAAa,EAAE,MAAM,CAAC,SAAS,CAAC,cAAc;AAClD,IAAI,WAAW,EAAE,CAAC,EAAE,EAAE,GAAG,EAAE,GAAG,SAAS,SAAS,CAAC,EAAE;AACnD,EAAE,OAAO,IAAI,GAAG,CAAC,CAAC,EAAE,EAAE,CAAC,iBAAiB,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAA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ts/dist/chunk-DZUJEN5N.cjs"}
@@ -1,9 +0,0 @@
1
- // src/visx/text/index.ts
2
- import { Text, useText, getStringWidth } from "@visx/text";
3
-
4
- export {
5
- Text,
6
- useText,
7
- getStringWidth
8
- };
9
- //# sourceMappingURL=chunk-NFRB2POF.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/visx/text/index.ts"],"sourcesContent":["// Re-export Text utilities from visx\nexport { Text, useText, getStringWidth } from '@visx/text';\n"],"mappings":";AACA,SAAS,MAAM,SAAS,sBAAsB;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["esbuild-sass-plugin:css-chunk:src/components/legend/private/base-legend.module.scss","esbuild-sass-plugin:css-chunk:src/components/tooltip/base-tooltip.module.scss","esbuild-sass-plugin:css-chunk:src/charts/private/chart-layout/chart-layout.module.scss","esbuild-sass-plugin:css-chunk:src/charts/private/svg-empty-state/svg-empty-state.module.scss","esbuild-sass-plugin:css-chunk:src/charts/private/with-responsive/with-responsive.module.scss","esbuild-sass-plugin:css-chunk:src/charts/private/x-zoom.module.scss","esbuild-sass-plugin:css-chunk:src/charts/line-chart/line-chart.module.scss","esbuild-sass-plugin:css-chunk:src/charts/area-chart/area-chart.module.scss","esbuild-sass-plugin:css-chunk:src/charts/bar-chart/bar-chart.module.scss","esbuild-sass-plugin:css-chunk:src/charts/conversion-funnel-chart/conversion-funnel-chart.module.scss","esbuild-sass-plugin:css-chunk:src/charts/geo-chart/geo-chart.module.scss","esbuild-sass-plugin:css-chunk:src/charts/leaderboard-chart/leaderboard-chart.module.scss","esbuild-sass-plugin:css-chunk:src/charts/pie-chart/pie-chart.module.scss","esbuild-sass-plugin:css-chunk:src/charts/pie-semi-circle-chart/pie-semi-circle-chart.module.scss","esbuild-sass-plugin:css-chunk:src/charts/sparkline/sparkline.module.scss","esbuild-sass-plugin:css-chunk:src/components/trend-indicator/trend-indicator.module.scss"],"sourcesContent":[".a8ccharts-89ApsU {\n align-self: stretch;\n}\n\n.a8ccharts-Vflwq8 {\n font-size: var(--wpds-typography-font-size-md, 13px);\n}\n.a8ccharts-qGsavM {\n cursor: pointer;\n user-select: none;\n transition: opacity 0.2s ease;\n}\n.a8ccharts-qGsavM:hover {\n opacity: 0.8;\n}\n.a8ccharts-qGsavM:focus {\n outline: 2px solid currentColor;\n outline-offset: 2px;\n border-radius: var(--wpds-border-radius-md, 4px);\n}\n.a8ccharts-qGsavM:focus:not(:focus-visible) {\n outline: none;\n}\n.a8ccharts-ZtDY-Q {\n opacity: 0.4;\n}\n.a8ccharts-ZtDY-Q .a8ccharts-2H65Kr {\n text-decoration: line-through;\n}\n\n.a8ccharts-faSDBI {\n overflow-wrap: break-word;\n white-space: normal;\n hyphens: auto;\n}\n.a8ccharts-FISUIO {\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 1;\n min-width: 0;\n}\n\n.a8ccharts-DTZlT- {\n font-weight: var(--wpds-typography-font-weight-medium, 499);\n flex-shrink: 0;\n}",".a8ccharts-OfX6nd {\n padding: var(--wpds-dimension-padding-sm, 8px);\n background-color: rgba(0, 0, 0, 0.85);\n color: #fff;\n border-radius: var(--wpds-border-radius-md, 4px);\n font-size: var(--wpds-typography-font-size-md, 13px);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n position: absolute;\n pointer-events: none;\n transform: translate(-50%, -100%);\n}",".a8ccharts-gXtQZk {\n flex: 1;\n min-height: 0;\n min-width: 0;\n}\n.a8ccharts-gXtQZk svg {\n display: block;\n}",".a8ccharts-tGXBHV {\n text-align: center;\n width: 100%;\n height: 100%;\n font-size: var(--wpds-typography-font-size-md, 13px);\n color: var(--wpds-color-fg-content-neutral-weak, #6d6d6d);\n}",".a8ccharts-GSKfBD {\n min-width: 0;\n min-height: 0;\n}",".a8ccharts-KeNSrO {\n fill: var(--charts-zoom-selection-fill, rgba(56, 88, 233, 0.16));\n stroke: var(--charts-zoom-selection-stroke, rgba(56, 88, 233, 0.65));\n stroke-width: var(--wpds-border-width-xs, 1px);\n pointer-events: none;\n}\n.a8ccharts-gg6Kte {\n position: absolute;\n top: var(--wpds-dimension-gap-sm, 8px);\n right: var(--wpds-dimension-gap-sm, 8px);\n z-index: 2;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n padding: 0;\n background: var(--charts-zoom-reset-bg, rgba(255, 255, 255, 0.92));\n color: var(--charts-zoom-reset-fg, #1e1e1e);\n border: var(--wpds-border-width-xs, 1px) solid var(--charts-zoom-reset-border, rgba(0, 0, 0, 0.16));\n border-radius: var(--wpds-border-radius-md, 4px);\n cursor: pointer;\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);\n}\n.a8ccharts-gg6Kte:hover {\n background: var(--charts-zoom-reset-bg-hover, rgb(255, 255, 255));\n}\n.a8ccharts-gg6Kte:focus-visible {\n outline: 2px solid var(--charts-zoom-reset-focus, #3858e9);\n outline-offset: 1px;\n}\n.a8ccharts-bQEoeo {\n width: 16px;\n height: 16px;\n flex-shrink: 0;\n}",".a8ccharts-v-oO8E {\n position: relative;\n}\n.a8ccharts-QrkuTW path {\n transform-origin: 0 95%;\n transform: scaleY(0);\n animation: a8ccharts--rxDU3 1s ease-out forwards;\n}\n.a8ccharts-v-oO8E svg {\n overflow: visible;\n}\n.a8ccharts-Tu0rR-, .a8ccharts--RSWXi {\n background: #fff;\n padding: var(--wpds-dimension-padding-sm, 8px);\n}\n.a8ccharts-Q-b5A1 {\n font-weight: var(--wpds-typography-font-weight-medium, 499);\n padding-bottom: var(--wpds-dimension-padding-md, 12px);\n}\n.a8ccharts-19N7T9 {\n padding: var(--wpds-dimension-padding-xs, 4px) 0;\n}\n.a8ccharts-HOAXrD {\n font-weight: var(--wpds-typography-font-weight-medium, 499);\n padding-right: var(--wpds-dimension-padding-lg, 16px);\n}\n.a8ccharts-rQiY8O {\n position: absolute;\n left: 0;\n top: 0;\n overflow: visible;\n pointer-events: none;\n}\n.a8ccharts-8AKWOe {\n pointer-events: auto;\n}\n.a8ccharts-7mh3Cl {\n display: flex;\n align-items: center;\n justify-content: center;\n pointer-events: auto;\n cursor: pointer;\n border: none;\n background: none;\n padding: 0;\n}\n.a8ccharts--RSWXi {\n min-width: 125px;\n background: #fff;\n border: none;\n border-radius: var(--wpds-border-radius-md, 4px);\n font-size: var(--wpds-typography-font-size-md, 13px);\n box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);\n position: fixed;\n margin: var(--wpds-dimension-gap-sm, 8px);\n visibility: hidden;\n}\n.a8ccharts-VAeVuJ {\n visibility: visible;\n}\n.a8ccharts-TEe-iV {\n position: initial;\n margin: auto;\n}\n.a8ccharts-b76gEu {\n padding: var(--wpds-dimension-padding-sm, 8px);\n}\n.a8ccharts-LIpFoS {\n background: none;\n border: none;\n cursor: pointer;\n width: 44px;\n height: 44px;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0;\n}\n\n.visx-tooltip-glyph svg {\n width: 10px;\n height: 10px;\n}\n\n@keyframes a8ccharts--rxDU3 {\n to {\n transform: scaleY(1);\n }\n}",".a8ccharts-cBqM5n {\n position: relative;\n}\n.a8ccharts-sciJcS path {\n transform-origin: 0 95%;\n transform: scaleY(0);\n animation: a8ccharts-UUsTq6 1s ease-out forwards;\n}\n.a8ccharts-cBqM5n svg {\n overflow: visible;\n}\n\n@keyframes a8ccharts-UUsTq6 {\n to {\n transform: scaleY(1);\n }\n}",".a8ccharts-3gflnB svg {\n overflow: visible;\n}\n.a8ccharts-98W-yu rect {\n transform-origin: bottom;\n transform-box: fill-box;\n transform: scaleY(0);\n animation: a8ccharts-z6AsiQ 1s ease-out forwards;\n}\n@keyframes a8ccharts-z6AsiQ {\n to {\n transform: scaleY(1);\n }\n}\n.a8ccharts-HFA3FF rect {\n transform-origin: left;\n transform-box: fill-box;\n transform: scaleX(0);\n animation: a8ccharts-DQp37O 1s ease-out forwards;\n}\n@keyframes a8ccharts-DQp37O {\n to {\n transform: scaleX(1);\n }\n}",".a8ccharts-Qicx1p {\n opacity: 0.6;\n pointer-events: none;\n}\n\n.a8ccharts-61WPYr {\n height: 20px;\n}\n\n.a8ccharts-RRRI6x {\n overflow: hidden;\n color: #1e1e1e;\n text-overflow: ellipsis;\n font-size: var(--wpds-typography-font-size-xl, 18px);\n font-style: normal;\n font-weight: var(--wpds-typography-font-weight-medium, 499);\n line-height: var(--wpds-typography-line-height-sm, 20px);\n margin: 0;\n}\n\n.a8ccharts-661iwx {\n overflow: hidden;\n text-overflow: ellipsis;\n font-size: var(--wpds-typography-font-size-md, 13px);\n font-style: normal;\n font-weight: var(--wpds-typography-font-weight-medium, 499);\n line-height: var(--wpds-typography-line-height-sm, 20px);\n margin: 0;\n}\n\n.a8ccharts-Z7EGnW {\n flex: 1;\n min-height: 200px;\n width: 100%;\n}\n\n.a8ccharts-VqFY0l {\n flex: 1 1 0;\n min-width: 0;\n height: 100%;\n}\n.a8ccharts-fk-hCl {\n transition: opacity 0.3s ease;\n}\n.a8ccharts-1zOc9c {\n opacity: 0.3;\n}\n\n.a8ccharts-6OabC4 {\n color: #757575;\n font-size: var(--wpds-typography-font-size-sm, 12px);\n font-weight: var(--wpds-typography-font-weight-regular, 400);\n line-height: var(--wpds-typography-line-height-xs, 16px);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.a8ccharts-9wSZ6n {\n color: #1e1e1e;\n font-size: var(--wpds-typography-font-size-md, 13px);\n font-weight: var(--wpds-typography-font-weight-medium, 499);\n line-height: var(--wpds-typography-line-height-xs, 16px);\n}\n\n.a8ccharts-sSmCTi {\n flex: 1;\n border-radius: var(--wpds-border-radius-md, 4px);\n position: relative;\n cursor: pointer;\n}\n\n.a8ccharts-EzczI- {\n width: 100%;\n min-height: 4px;\n border-radius: var(--wpds-border-radius-md, 4px) var(--wpds-border-radius-md, 4px) 0 0;\n}\n.a8ccharts-68HQJl {\n transform-origin: bottom;\n transform-box: fill-box;\n transform: scaleY(0);\n animation: a8ccharts-CmtieZ 1s ease-out forwards;\n}\n@keyframes a8ccharts-CmtieZ {\n to {\n transform: scaleY(1);\n }\n}\n\n.a8ccharts-2TeoCn {\n border-bottom: var(--wpds-border-width-xs, 1px) solid var(--Gray-Gray-5, #dcdcde);\n background: var(--black-white-white, #fff);\n border-radius: var(--wpds-border-radius-md, 4px) !important;\n padding: var(--wpds-dimension-padding-md, 12px) !important;\n box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.15), 0 3px 9px 0 rgba(0, 0, 0, 0.12) !important;\n}\n\n.a8ccharts-jkRitH {\n color: #1e1e1e;\n font-size: var(--wpds-typography-font-size-sm, 12px);\n font-style: normal;\n font-weight: var(--wpds-typography-font-weight-regular, 400);\n line-height: var(--wpds-typography-line-height-xs, 16px);\n}\n\n.a8ccharts-8jgT-3 {\n color: #1e1e1e;\n font-size: var(--wpds-typography-font-size-md, 13px);\n font-style: normal;\n font-weight: var(--wpds-typography-font-weight-medium, 499);\n line-height: var(--wpds-typography-line-height-sm, 20px);\n}\n\n.a8ccharts-Ml6MMr {\n text-align: center;\n color: #6b7280;\n font-size: var(--wpds-typography-font-size-lg, 16px);\n}",".a8ccharts-JvcqOz {\n position: relative;\n}",".a8ccharts-V3NYDq {\n transition: opacity 0.3s ease-in-out;\n}\n.a8ccharts-WHNERS {\n height: 100%;\n width: 100%;\n}\n.a8ccharts-JQbl6A {\n opacity: 0.5;\n}\n.a8ccharts-Ml1kKc {\n flex: 1;\n min-height: 0;\n overflow: auto;\n}\n\n.a8ccharts-ETItHW {\n display: grid;\n align-items: center;\n grid-template-columns: 1fr;\n row-gap: 6px;\n isolation: isolate;\n}\n.a8ccharts-ETItHW.a8ccharts-oA4hdH {\n grid-template: \"overlap\" 1fr/1fr;\n /* contains a single cell callded 'overlap' */\n}\n.a8ccharts-ETItHW.a8ccharts-oA4hdH > * {\n grid-area: overlap;\n}\n.a8ccharts-ETItHW.a8ccharts-oA4hdH .a8ccharts-UciQnF {\n padding-left: var(--wpds-dimension-padding-sm, 8px);\n}\n.a8ccharts-ETItHW .a8ccharts-np8f0T {\n height: 100%;\n min-height: 6px;\n border-radius: var(--a8c--charts--leaderboard--bar--border-radius, 9999px);\n z-index: -1; /* places it behind the label */\n}\n.a8ccharts-ETItHW .a8ccharts-zq3CmS {\n transform-origin: left;\n transform-box: fill-box;\n transform: scaleX(0);\n animation: a8ccharts-D0Q3w1 1s ease-out forwards;\n}\n@keyframes a8ccharts-D0Q3w1 {\n to {\n transform: scaleX(1);\n }\n}\n\n.a8ccharts-B6VcRn {\n justify-content: flex-end;\n}\n\n.a8ccharts-GB7tyM {\n align-items: center;\n}\n\n.a8ccharts-E0K4Hr {\n padding: var(--wpds-dimension-padding-3xl, 32px) var(--wpds-dimension-padding-lg, 16px);\n text-align: center;\n color: #666;\n font-size: var(--wpds-typography-font-size-md, 13px);\n font-style: italic;\n}",".a8ccharts-C-n-Gu {\n overflow: hidden;\n}\n.a8ccharts-IQVR6j {\n height: 100%;\n width: 100%;\n}\n.a8ccharts-eGV3AE {\n width: 100%;\n height: 100%;\n}",".a8ccharts-V0wiEb {\n height: 100%;\n width: 100%;\n}\n.a8ccharts-1khYG1 {\n width: 100%;\n height: 100%;\n}\n.a8ccharts-8tyaQj .a8ccharts-EKZS3j {\n font-weight: var(--wpds-typography-font-weight-medium, 499);\n font-size: var(--wpds-typography-font-size-lg, 16px);\n}\n.a8ccharts-8tyaQj .a8ccharts-v85A8- {\n font-size: var(--wpds-typography-font-size-md, 13px);\n}",".a8ccharts-o-3Z8B {\n display: inline-block;\n vertical-align: middle;\n line-height: 1;\n}\n.a8ccharts-o-3Z8B svg {\n display: block;\n overflow: visible;\n}\n.a8ccharts-o-3Z8B path {\n vector-effect: non-scaling-stroke;\n}\n.a8ccharts-CbLbcd {\n display: inline-block;\n}",".a8ccharts-tGw1PY {\n display: inline-flex;\n align-items: center;\n gap: 0.125em;\n font-size: var(--wpds-typography-font-size-md, 13px);\n font-weight: var(--wpds-typography-font-weight-medium, 499);\n line-height: 1;\n}\n.a8ccharts-Fn-D1W {\n color: var(--charts-trend-up-color, #1a8917);\n}\n.a8ccharts-HqtGQO {\n color: var(--charts-trend-down-color, #d63638);\n}\n.a8ccharts-S10nvO {\n color: var(--charts-trend-neutral-color, #646970);\n}\n.a8ccharts-5HjpOT {\n width: 1em;\n height: 1em;\n flex-shrink: 0;\n}\n.a8ccharts-muLL2Q {\n white-space: nowrap;\n}"],"mappings":";AAAA,CAAC;AACC,cAAY;AACd;AAEA,CAAC;AACC,aAAW,IAAI,8BAA8B,EAAE;AACjD;AACA,CAAC;AACC,UAAQ;AACR,eAAa;AACb,cAAY,QAAQ,KAAK;AAC3B;AACA,CALC,gBAKgB;AACf,WAAS;AACX;AACA,CARC,gBAQgB;AACf,WAAS,IAAI,MAAM;AACnB,kBAAgB;AAChB,iBAAe,IAAI,uBAAuB,EAAE;AAC9C;AACA,CAbC,gBAagB,MAAM,KAAK;AAC1B,WAAS;AACX;AACA,CAAC;AACC,WAAS;AACX;AACA,CAHC,iBAGiB,CAAC;AACjB,mBAAiB;AACnB;AAEA,CAAC;AACC,iBAAe;AACf,eAAa;AACb,WAAS;AACX;AACA,CAAC;AACC,eAAa;AACb,YAAU;AACV,iBAAe;AACf,eAAa;AACb,aAAW;AACb;AAEA,CAAC;AACC,eAAa,IAAI,oCAAoC,EAAE;AACvD,eAAa;AACf;;;AC9CA,CAAC;AACC,WAAS,IAAI,2BAA2B,EAAE;AAC1C,oBAAkB,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AAChC,SAAO;AACP,iBAAe,IAAI,uBAAuB,EAAE;AAC5C,aAAW,IAAI,8BAA8B,EAAE;AAC/C,cAAY,EAAE,IAAI,IAAI,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE;AACpC,YAAU;AACV,kBAAgB;AAChB,aAAW,UAAU,IAAI,EAAE;AAC7B;;;ACVA,CAAC;AACC,QAAM;AACN,cAAY;AACZ,aAAW;AACb;AACA,CALC,iBAKiB;AAChB,WAAS;AACX;;;ACPA,CA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,iBAKiB;AAChB,WAAS;AACT,YAAU;AACZ;AACA,CATC,iBASiB;AAChB,iBAAe;AACjB;AACA,CAAC;AACC,WAAS;AACX;;;ACdA,CAAC;AACC,WAAS;AACT,eAAa;AACb,OAAK;AACL,aAAW,IAAI,8BAA8B,EAAE;AAC/C,eAAa,IAAI,oCAAoC,EAAE;AACvD,eAAa;AACf;AACA,CAAC;AACC,SAAO,IAAI,uBAAuB,EAAE;AACtC;AACA,CAAC;AACC,SAAO,IAAI,yBAAyB,EAAE;AACxC;AACA,CAAC;AACC,SAAO,IAAI,4BAA4B,EAAE;AAC3C;AACA,CAAC;AACC,SAAO;AACP,UAAQ;AACR,eAAa;AACf;AACA,CAAC;AACC,eAAa;AACf;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/visx/group/index.cjs","../../../src/visx/group/index.ts"],"names":[],"mappings":"AAAA,6GAAiC;AACjC;AACA;ACDA,oCAAsB;ADGtB;AACE;AACF,6BAAC","file":"/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/visx/group/index.cjs","sourcesContent":[null,"// Re-export Group component from visx\nexport { Group } from '@visx/group';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/visx/group/index.ts"],"sourcesContent":["// Re-export Group component from visx\nexport { Group } from '@visx/group';\n"],"mappings":";;;AACA,SAAS,aAAa;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/visx/legend/index.cjs","../../../src/visx/legend/index.ts"],"names":[],"mappings":"AAAA,6GAAiC;AACjC;AACA;ACDA,sCAAkD;ADGlD;AACE;AACA;AACA;AACF,wHAAC","file":"/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/visx/legend/index.cjs","sourcesContent":[null,"// Re-export legend components from visx\nexport { LineShape, CircleShape, RectShape } from '@visx/legend';\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/visx/legend/index.ts"],"sourcesContent":["// Re-export legend components from visx\nexport { LineShape, CircleShape, RectShape } from '@visx/legend';\n"],"mappings":";;;AACA,SAAS,WAAW,aAAa,iBAAiB;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/visx/text/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACF,4DAAiC;AACjC,oCAAiC;AACjC;AACE;AACA;AACA;AACF,8IAAC","file":"/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/visx/text/index.cjs"}
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
package/tsup.config.ts DELETED
@@ -1,46 +0,0 @@
1
- import babel from 'esbuild-plugin-babel';
2
- import { sassPlugin, postcssModules } from 'esbuild-sass-plugin';
3
- import { defineConfig } from 'tsup';
4
- import pkg from './package.json';
5
-
6
- // Extract JS/TS entries from package exports. Non-JS source paths (e.g. the
7
- // `./style.css` placeholder) are skipped so tsup doesn't try to bundle them.
8
- const entry = Object.values( pkg.exports )
9
- .map( $export => ( typeof $export === 'object' ? $export[ 'jetpack:src' ] : '' ) )
10
- .filter( ( path ): path is string => Boolean( path ) && /\.[cm]?[jt]sx?$/.test( path ) );
11
-
12
- export default defineConfig( {
13
- entry,
14
- clean: true,
15
- splitting: true,
16
- sourcemap: true,
17
- dts: true,
18
- format: [ 'esm', 'cjs' ],
19
- outDir: 'dist',
20
- noExternal: [ '@wordpress/ui', 'fast-deep-equal' ],
21
- loader: {
22
- '.jpg': 'file',
23
- '.gif': 'file',
24
- '.svg': 'file',
25
- '.png': 'file',
26
- },
27
- esbuildPlugins: [
28
- babel( {
29
- filter: /\.tsx$/,
30
- config: {
31
- presets: [
32
- '@babel/preset-typescript',
33
- [ '@babel/preset-react', { runtime: 'automatic' } ],
34
- ],
35
- plugins: [ [ 'react-remove-properties', { properties: [ 'data-testid' ] } ] ],
36
- },
37
- } ),
38
- sassPlugin( {
39
- filter: /\.module\.(css|scss)$/,
40
- embedded: true,
41
- transform: postcssModules( {
42
- generateScopedName: 'a8ccharts-[contenthash:base64:6]',
43
- } ),
44
- } ),
45
- ],
46
- } );