@automattic/charts 0.57.0 → 0.59.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/CHANGELOG.md +36 -2
- package/README.md +7 -54
- package/dist/index.cjs +9607 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +32 -49
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +1612 -33
- package/dist/index.d.ts +1612 -33
- package/dist/index.js +9640 -54
- package/dist/index.js.map +1 -1
- package/package.json +9 -126
- package/src/charts/bar-chart/bar-chart.module.scss +0 -5
- package/src/charts/bar-chart/bar-chart.tsx +142 -149
- package/src/charts/bar-chart/test/bar-chart.test.tsx +48 -31
- package/src/charts/leaderboard-chart/leaderboard-chart.tsx +54 -74
- package/src/charts/leaderboard-chart/test/leaderboard-chart.test.tsx +4 -5
- package/src/charts/leaderboard-chart/types.ts +1 -11
- package/src/charts/line-chart/line-chart.module.scss +0 -5
- package/src/charts/line-chart/line-chart.tsx +202 -193
- package/src/charts/line-chart/private/line-chart-annotations-overlay.tsx +1 -2
- package/src/charts/line-chart/test/line-chart.test.tsx +49 -27
- package/src/charts/line-chart/types.ts +0 -1
- package/src/charts/pie-chart/pie-chart.module.scss +2 -10
- package/src/charts/pie-chart/pie-chart.tsx +212 -212
- package/src/charts/pie-chart/test/composition-api.test.tsx +44 -3
- package/src/charts/pie-chart/test/pie-chart.test.tsx +51 -44
- package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.module.scss +2 -8
- package/src/charts/pie-semi-circle-chart/pie-semi-circle-chart.tsx +166 -168
- package/src/charts/pie-semi-circle-chart/test/pie-semi-circle-chart.test.tsx +58 -30
- package/src/charts/private/chart-composition/index.ts +2 -0
- package/src/charts/private/chart-composition/render-legend-slot.ts +22 -0
- package/src/charts/private/chart-composition/test/render-legend-slot.test.tsx +60 -0
- package/src/charts/private/chart-composition/test/use-chart-children.test.tsx +91 -0
- package/src/charts/private/chart-composition/use-chart-children.ts +34 -2
- package/src/charts/private/chart-layout/chart-layout.module.scss +7 -0
- package/src/charts/private/chart-layout/chart-layout.tsx +106 -0
- package/src/charts/private/chart-layout/index.ts +2 -0
- package/src/charts/private/chart-layout/test/chart-layout.test.tsx +167 -0
- package/src/charts/private/single-chart-context/single-chart-context.tsx +2 -2
- package/src/charts/private/svg-empty-state/index.ts +1 -0
- package/src/charts/private/svg-empty-state/svg-empty-state.module.scss +7 -0
- package/src/charts/private/svg-empty-state/svg-empty-state.tsx +40 -0
- package/src/components/legend/hooks/test/use-chart-legend-items.test.tsx +12 -8
- package/src/components/legend/hooks/use-chart-legend-items.ts +12 -13
- package/src/components/legend/index.ts +1 -8
- package/src/components/legend/legend.tsx +33 -8
- package/src/components/legend/private/base-legend.module.scss +19 -37
- package/src/components/legend/private/base-legend.tsx +0 -2
- package/src/components/legend/test/legend.test.tsx +93 -1
- package/src/components/legend/types.ts +7 -34
- package/src/hooks/index.ts +1 -1
- package/src/hooks/use-data-with-percentages.ts +24 -0
- package/src/hooks/use-interactive-legend-data.ts +18 -15
- package/src/index.ts +66 -9
- package/src/providers/chart-context/global-charts-provider.tsx +7 -1
- package/src/providers/chart-context/hooks/use-chart-registration.ts +2 -1
- package/src/providers/chart-context/types.ts +2 -2
- package/src/types.ts +110 -45
- package/src/utils/date-parsing.ts +10 -1
- package/src/utils/test/date-parsing.test.ts +12 -0
- package/src/utils/test/resolve-css-var.test.ts +4 -2
- package/tsup.config.ts +1 -1
- package/dist/base-tooltip-DOq93wjU.d.cts +0 -38
- package/dist/base-tooltip-DOq93wjU.d.ts +0 -38
- package/dist/charts/bar-chart/index.cjs +0 -15
- package/dist/charts/bar-chart/index.cjs.map +0 -1
- package/dist/charts/bar-chart/index.css +0 -153
- package/dist/charts/bar-chart/index.css.map +0 -1
- package/dist/charts/bar-chart/index.d.cts +0 -37
- package/dist/charts/bar-chart/index.d.ts +0 -37
- package/dist/charts/bar-chart/index.js +0 -15
- package/dist/charts/bar-chart/index.js.map +0 -1
- package/dist/charts/bar-list-chart/index.cjs +0 -16
- package/dist/charts/bar-list-chart/index.cjs.map +0 -1
- package/dist/charts/bar-list-chart/index.css +0 -153
- package/dist/charts/bar-list-chart/index.css.map +0 -1
- package/dist/charts/bar-list-chart/index.d.cts +0 -92
- package/dist/charts/bar-list-chart/index.d.ts +0 -92
- package/dist/charts/bar-list-chart/index.js +0 -16
- package/dist/charts/bar-list-chart/index.js.map +0 -1
- package/dist/charts/conversion-funnel-chart/index.cjs +0 -11
- package/dist/charts/conversion-funnel-chart/index.cjs.map +0 -1
- package/dist/charts/conversion-funnel-chart/index.css +0 -251
- package/dist/charts/conversion-funnel-chart/index.css.map +0 -1
- package/dist/charts/conversion-funnel-chart/index.d.cts +0 -97
- package/dist/charts/conversion-funnel-chart/index.d.ts +0 -97
- package/dist/charts/conversion-funnel-chart/index.js +0 -11
- package/dist/charts/conversion-funnel-chart/index.js.map +0 -1
- package/dist/charts/geo-chart/index.cjs +0 -13
- package/dist/charts/geo-chart/index.cjs.map +0 -1
- package/dist/charts/geo-chart/index.css +0 -117
- package/dist/charts/geo-chart/index.css.map +0 -1
- package/dist/charts/geo-chart/index.d.cts +0 -67
- package/dist/charts/geo-chart/index.d.ts +0 -67
- package/dist/charts/geo-chart/index.js +0 -13
- package/dist/charts/geo-chart/index.js.map +0 -1
- package/dist/charts/leaderboard-chart/index.cjs +0 -20
- package/dist/charts/leaderboard-chart/index.cjs.map +0 -1
- package/dist/charts/leaderboard-chart/index.css +0 -172
- package/dist/charts/leaderboard-chart/index.css.map +0 -1
- package/dist/charts/leaderboard-chart/index.d.cts +0 -46
- package/dist/charts/leaderboard-chart/index.d.ts +0 -46
- package/dist/charts/leaderboard-chart/index.js +0 -20
- package/dist/charts/leaderboard-chart/index.js.map +0 -1
- package/dist/charts/line-chart/index.cjs +0 -15
- package/dist/charts/line-chart/index.cjs.map +0 -1
- package/dist/charts/line-chart/index.css +0 -225
- package/dist/charts/line-chart/index.css.map +0 -1
- package/dist/charts/line-chart/index.d.cts +0 -99
- package/dist/charts/line-chart/index.d.ts +0 -99
- package/dist/charts/line-chart/index.js +0 -15
- package/dist/charts/line-chart/index.js.map +0 -1
- package/dist/charts/pie-chart/index.cjs +0 -18
- package/dist/charts/pie-chart/index.cjs.map +0 -1
- package/dist/charts/pie-chart/index.css +0 -143
- package/dist/charts/pie-chart/index.css.map +0 -1
- package/dist/charts/pie-chart/index.d.cts +0 -97
- package/dist/charts/pie-chart/index.d.ts +0 -97
- package/dist/charts/pie-chart/index.js +0 -18
- package/dist/charts/pie-chart/index.js.map +0 -1
- package/dist/charts/pie-semi-circle-chart/index.cjs +0 -17
- package/dist/charts/pie-semi-circle-chart/index.cjs.map +0 -1
- package/dist/charts/pie-semi-circle-chart/index.css +0 -144
- package/dist/charts/pie-semi-circle-chart/index.css.map +0 -1
- package/dist/charts/pie-semi-circle-chart/index.d.cts +0 -94
- package/dist/charts/pie-semi-circle-chart/index.d.ts +0 -94
- package/dist/charts/pie-semi-circle-chart/index.js +0 -17
- package/dist/charts/pie-semi-circle-chart/index.js.map +0 -1
- package/dist/charts/sparkline/index.cjs +0 -16
- package/dist/charts/sparkline/index.cjs.map +0 -1
- package/dist/charts/sparkline/index.css +0 -242
- package/dist/charts/sparkline/index.css.map +0 -1
- package/dist/charts/sparkline/index.d.cts +0 -113
- package/dist/charts/sparkline/index.d.ts +0 -113
- package/dist/charts/sparkline/index.js +0 -16
- package/dist/charts/sparkline/index.js.map +0 -1
- package/dist/chunk-2A34OA5O.cjs +0 -51
- package/dist/chunk-2A34OA5O.cjs.map +0 -1
- package/dist/chunk-2NCY7R4G.js +0 -3897
- package/dist/chunk-2NCY7R4G.js.map +0 -1
- package/dist/chunk-32DH6JDF.js +0 -1263
- package/dist/chunk-32DH6JDF.js.map +0 -1
- package/dist/chunk-4OPFE4RM.js +0 -614
- package/dist/chunk-4OPFE4RM.js.map +0 -1
- package/dist/chunk-6CCZL2JJ.js +0 -63
- package/dist/chunk-6CCZL2JJ.js.map +0 -1
- package/dist/chunk-77OKCVQN.cjs +0 -421
- package/dist/chunk-77OKCVQN.cjs.map +0 -1
- package/dist/chunk-7FQX4ALL.cjs +0 -219
- package/dist/chunk-7FQX4ALL.cjs.map +0 -1
- package/dist/chunk-ASLARV7L.cjs +0 -81
- package/dist/chunk-ASLARV7L.cjs.map +0 -1
- package/dist/chunk-BCX5THDQ.js +0 -403
- package/dist/chunk-BCX5THDQ.js.map +0 -1
- package/dist/chunk-BPYKWMI7.js +0 -194
- package/dist/chunk-BPYKWMI7.js.map +0 -1
- package/dist/chunk-CZGYJKG6.js +0 -421
- package/dist/chunk-CZGYJKG6.js.map +0 -1
- package/dist/chunk-D2UH4CFE.cjs +0 -120
- package/dist/chunk-D2UH4CFE.cjs.map +0 -1
- package/dist/chunk-DAU3HNEG.js +0 -344
- package/dist/chunk-DAU3HNEG.js.map +0 -1
- package/dist/chunk-H2V4JMSA.js +0 -219
- package/dist/chunk-H2V4JMSA.js.map +0 -1
- package/dist/chunk-I2276W3I.cjs +0 -66
- package/dist/chunk-I2276W3I.cjs.map +0 -1
- package/dist/chunk-I35UYJJR.cjs +0 -468
- package/dist/chunk-I35UYJJR.cjs.map +0 -1
- package/dist/chunk-IU4DYUAV.js +0 -120
- package/dist/chunk-IU4DYUAV.js.map +0 -1
- package/dist/chunk-KXRWNFQJ.js +0 -51
- package/dist/chunk-KXRWNFQJ.js.map +0 -1
- package/dist/chunk-OP6PHB2U.js +0 -81
- package/dist/chunk-OP6PHB2U.js.map +0 -1
- package/dist/chunk-PXLEMUGJ.js +0 -165
- package/dist/chunk-PXLEMUGJ.js.map +0 -1
- package/dist/chunk-RCY6XLGU.cjs +0 -63
- package/dist/chunk-RCY6XLGU.cjs.map +0 -1
- package/dist/chunk-RHHVEJHJ.cjs +0 -1263
- package/dist/chunk-RHHVEJHJ.cjs.map +0 -1
- package/dist/chunk-TO3OQBXG.cjs +0 -165
- package/dist/chunk-TO3OQBXG.cjs.map +0 -1
- package/dist/chunk-V36ERY7Y.js +0 -375
- package/dist/chunk-V36ERY7Y.js.map +0 -1
- package/dist/chunk-VJM5XCB4.cjs +0 -614
- package/dist/chunk-VJM5XCB4.cjs.map +0 -1
- package/dist/chunk-VTS3PNMS.cjs +0 -344
- package/dist/chunk-VTS3PNMS.cjs.map +0 -1
- package/dist/chunk-WLODYNLB.js +0 -1067
- package/dist/chunk-WLODYNLB.js.map +0 -1
- package/dist/chunk-XKRJL2QT.cjs +0 -375
- package/dist/chunk-XKRJL2QT.cjs.map +0 -1
- package/dist/chunk-XWYZIFZW.js +0 -66
- package/dist/chunk-XWYZIFZW.js.map +0 -1
- package/dist/chunk-Y3NNQMAX.cjs +0 -194
- package/dist/chunk-Y3NNQMAX.cjs.map +0 -1
- package/dist/chunk-YE2T52VZ.cjs +0 -1067
- package/dist/chunk-YE2T52VZ.cjs.map +0 -1
- package/dist/chunk-Z26M4V2M.js +0 -468
- package/dist/chunk-Z26M4V2M.js.map +0 -1
- package/dist/chunk-Z45KX47P.cjs +0 -3897
- package/dist/chunk-Z45KX47P.cjs.map +0 -1
- package/dist/chunk-ZH4F5RMG.cjs +0 -403
- package/dist/chunk-ZH4F5RMG.cjs.map +0 -1
- package/dist/components/legend/index.cjs +0 -11
- package/dist/components/legend/index.cjs.map +0 -1
- package/dist/components/legend/index.css +0 -103
- package/dist/components/legend/index.css.map +0 -1
- package/dist/components/legend/index.d.cts +0 -37
- package/dist/components/legend/index.d.ts +0 -37
- package/dist/components/legend/index.js +0 -11
- package/dist/components/legend/index.js.map +0 -1
- package/dist/components/tooltip/index.cjs +0 -12
- package/dist/components/tooltip/index.cjs.map +0 -1
- package/dist/components/tooltip/index.css +0 -13
- package/dist/components/tooltip/index.css.map +0 -1
- package/dist/components/tooltip/index.d.cts +0 -71
- package/dist/components/tooltip/index.d.ts +0 -71
- package/dist/components/tooltip/index.js +0 -12
- package/dist/components/tooltip/index.js.map +0 -1
- package/dist/components/trend-indicator/index.cjs +0 -8
- package/dist/components/trend-indicator/index.cjs.map +0 -1
- package/dist/components/trend-indicator/index.css +0 -27
- package/dist/components/trend-indicator/index.css.map +0 -1
- package/dist/components/trend-indicator/index.d.cts +0 -44
- package/dist/components/trend-indicator/index.d.ts +0 -44
- package/dist/components/trend-indicator/index.js +0 -8
- package/dist/components/trend-indicator/index.js.map +0 -1
- package/dist/format-metric-value-MXm5DtQ_.d.cts +0 -24
- package/dist/format-metric-value-MXm5DtQ_.d.ts +0 -24
- package/dist/hooks/index.cjs +0 -31
- package/dist/hooks/index.cjs.map +0 -1
- package/dist/hooks/index.css +0 -103
- package/dist/hooks/index.css.map +0 -1
- package/dist/hooks/index.d.cts +0 -272
- package/dist/hooks/index.d.ts +0 -272
- package/dist/hooks/index.js +0 -31
- package/dist/hooks/index.js.map +0 -1
- package/dist/leaderboard-chart-BKYYXcg2.d.ts +0 -83
- package/dist/leaderboard-chart-DR7CGb0L.d.cts +0 -83
- package/dist/legend-C2grwnWk.d.cts +0 -9
- package/dist/legend-Cj0xM5dU.d.ts +0 -9
- package/dist/providers/index.cjs +0 -21
- package/dist/providers/index.cjs.map +0 -1
- package/dist/providers/index.css +0 -103
- package/dist/providers/index.css.map +0 -1
- package/dist/providers/index.d.cts +0 -28
- package/dist/providers/index.d.ts +0 -28
- package/dist/providers/index.js +0 -21
- package/dist/providers/index.js.map +0 -1
- package/dist/themes-BmVGrYnF.d.ts +0 -67
- package/dist/themes-CyjKm-P_.d.cts +0 -67
- package/dist/types-CuUEszrM.d.ts +0 -19
- package/dist/types-DZordNiO.d.cts +0 -505
- package/dist/types-DZordNiO.d.ts +0 -505
- package/dist/types-I67mddpr.d.cts +0 -78
- package/dist/types-I67mddpr.d.ts +0 -78
- package/dist/types-KtOPPzPX.d.cts +0 -19
- package/dist/utils/index.cjs +0 -44
- package/dist/utils/index.cjs.map +0 -1
- package/dist/utils/index.d.cts +0 -226
- package/dist/utils/index.d.ts +0 -226
- package/dist/utils/index.js +0 -44
- package/dist/utils/index.js.map +0 -1
- package/dist/with-responsive-CNfhzAUu.d.cts +0 -18
- package/dist/with-responsive-CNfhzAUu.d.ts +0 -18
- package/src/hooks/use-has-legend-child.ts +0 -22
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { R as ResponsiveConfig } from './with-responsive-CNfhzAUu.cjs';
|
|
3
|
-
import * as react from 'react';
|
|
4
|
-
import { ReactNode, FC } from 'react';
|
|
5
|
-
import { b as LegendShapeStyles, c as BaseLegendProps, B as BaseLegendItem } from './types-I67mddpr.cjs';
|
|
6
|
-
import { B as BaseChartProps, L as LeaderboardEntry } from './types-DZordNiO.cjs';
|
|
7
|
-
|
|
8
|
-
interface LeaderboardChartProps extends Pick<BaseChartProps<LeaderboardEntry>, 'className' | 'data' | 'showLegend' | 'legendOrientation' | 'legendPosition' | 'legendAlignment' | 'legendShape' | 'chartId' | 'width' | 'height' | 'size' | 'gap' | 'legendInteractive' | 'animation'> {
|
|
9
|
-
/**
|
|
10
|
-
* Whether to show comparison data
|
|
11
|
-
*/
|
|
12
|
-
withComparison?: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Whether to overlay the label on top of bar
|
|
15
|
-
*/
|
|
16
|
-
withOverlayLabel?: boolean;
|
|
17
|
-
/**
|
|
18
|
-
* Primary color for current period bars
|
|
19
|
-
*/
|
|
20
|
-
primaryColor?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Secondary color for comparison period bars
|
|
23
|
-
*/
|
|
24
|
-
secondaryColor?: string;
|
|
25
|
-
/**
|
|
26
|
-
* Formatter for values
|
|
27
|
-
*/
|
|
28
|
-
valueFormatter?: (value: number) => string;
|
|
29
|
-
/**
|
|
30
|
-
* Formatter for delta values
|
|
31
|
-
*/
|
|
32
|
-
deltaFormatter?: (value: number) => string;
|
|
33
|
-
/**
|
|
34
|
-
* Whether the chart is in loading state
|
|
35
|
-
*/
|
|
36
|
-
loading?: boolean;
|
|
37
|
-
/**
|
|
38
|
-
* Custom styling for the chart container
|
|
39
|
-
*/
|
|
40
|
-
style?: React.CSSProperties & {
|
|
41
|
-
'--a8c--charts--leaderboard--bar--border-radius'?: string;
|
|
42
|
-
};
|
|
43
|
-
/**
|
|
44
|
-
* Styles for legend shapes (width, height, margin).
|
|
45
|
-
*/
|
|
46
|
-
legendShapeStyles?: LegendShapeStyles;
|
|
47
|
-
/**
|
|
48
|
-
* Custom labels for legend items
|
|
49
|
-
*/
|
|
50
|
-
legendLabels?: {
|
|
51
|
-
/**
|
|
52
|
-
* Label for primary period data
|
|
53
|
-
*/
|
|
54
|
-
primary?: string;
|
|
55
|
-
/**
|
|
56
|
-
* Label for comparison period data (only used when withComparison is true)
|
|
57
|
-
*/
|
|
58
|
-
comparison?: string;
|
|
59
|
-
};
|
|
60
|
-
/**
|
|
61
|
-
* Child components for composition API
|
|
62
|
-
*/
|
|
63
|
-
children?: ReactNode;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
declare const LeaderboardChart: FC<LeaderboardChartProps> & {
|
|
67
|
-
Legend: react.ForwardRefExoticComponent<Omit<BaseLegendProps, "items"> & {
|
|
68
|
-
items?: BaseLegendItem[];
|
|
69
|
-
chartId?: string;
|
|
70
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
71
|
-
};
|
|
72
|
-
declare const LeaderboardChartResponsive: (({ resizeDebounceTime, maxWidth, aspectRatio, size, width, height, ...chartProps }: Omit<LeaderboardChartProps, "width" | "height" | "size"> & {
|
|
73
|
-
width?: number;
|
|
74
|
-
height?: number;
|
|
75
|
-
size?: number;
|
|
76
|
-
} & ResponsiveConfig) => react_jsx_runtime.JSX.Element) & {
|
|
77
|
-
Legend: react.ForwardRefExoticComponent<Omit<BaseLegendProps, "items"> & {
|
|
78
|
-
items?: BaseLegendItem[];
|
|
79
|
-
chartId?: string;
|
|
80
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
export { LeaderboardChartResponsive as L, LeaderboardChart as a, type LeaderboardChartProps as b };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { c as BaseLegendProps, B as BaseLegendItem } from './types-I67mddpr.cjs';
|
|
3
|
-
|
|
4
|
-
declare const Legend: react.ForwardRefExoticComponent<Omit<BaseLegendProps, "items"> & {
|
|
5
|
-
items?: BaseLegendItem[];
|
|
6
|
-
chartId?: string;
|
|
7
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
|
|
9
|
-
export { Legend as L };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { c as BaseLegendProps, B as BaseLegendItem } from './types-I67mddpr.js';
|
|
3
|
-
|
|
4
|
-
declare const Legend: react.ForwardRefExoticComponent<Omit<BaseLegendProps, "items"> & {
|
|
5
|
-
items?: BaseLegendItem[];
|
|
6
|
-
chartId?: string;
|
|
7
|
-
} & react.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
|
|
9
|
-
export { Legend as L };
|
package/dist/providers/index.cjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _chunkRHHVEJHJcjs = require('../chunk-RHHVEJHJ.cjs');
|
|
10
|
-
require('../chunk-VTS3PNMS.cjs');
|
|
11
|
-
require('../chunk-EMMSS5I5.cjs');
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
exports.GlobalChartsContext = _chunkRHHVEJHJcjs.GlobalChartsContext; exports.GlobalChartsProvider = _chunkRHHVEJHJcjs.GlobalChartsProvider; exports.defaultTheme = _chunkRHHVEJHJcjs.defaultTheme; exports.useChartId = _chunkRHHVEJHJcjs.useChartId; exports.useChartRegistration = _chunkRHHVEJHJcjs.useChartRegistration; exports.useGlobalChartsContext = _chunkRHHVEJHJcjs.useGlobalChartsContext; exports.useGlobalChartsTheme = _chunkRHHVEJHJcjs.useGlobalChartsTheme;
|
|
21
|
-
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/providers/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,8cAAC","file":"/home/runner/work/jetpack/jetpack/projects/js-packages/charts/dist/providers/index.cjs"}
|
package/dist/providers/index.css
DELETED
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
/* esbuild-sass-plugin:css-chunk:src/hooks/use-tooltip-portal-relocator.module.scss */
|
|
2
|
-
.a8ccharts-jCw5dQ {
|
|
3
|
-
position: fixed;
|
|
4
|
-
inset: 0;
|
|
5
|
-
overflow: visible;
|
|
6
|
-
z-index: 1;
|
|
7
|
-
pointer-events: none;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
/* esbuild-sass-plugin:css-chunk:src/components/legend/private/base-legend.module.scss */
|
|
11
|
-
.a8ccharts-AELBvX {
|
|
12
|
-
display: flex;
|
|
13
|
-
flex-direction: row;
|
|
14
|
-
flex-wrap: wrap;
|
|
15
|
-
gap: 16px;
|
|
16
|
-
}
|
|
17
|
-
.a8ccharts-fX8uQe {
|
|
18
|
-
display: flex;
|
|
19
|
-
flex-direction: column;
|
|
20
|
-
gap: 8px;
|
|
21
|
-
}
|
|
22
|
-
.a8ccharts-fX8uQe.a8ccharts-DEe0wg {
|
|
23
|
-
align-items: flex-start;
|
|
24
|
-
}
|
|
25
|
-
.a8ccharts-fX8uQe.a8ccharts-WBKF9I {
|
|
26
|
-
align-items: center;
|
|
27
|
-
}
|
|
28
|
-
.a8ccharts-fX8uQe.a8ccharts-JfwMng {
|
|
29
|
-
align-items: flex-end;
|
|
30
|
-
}
|
|
31
|
-
.a8ccharts-8Y73Kh {
|
|
32
|
-
position: relative;
|
|
33
|
-
}
|
|
34
|
-
.a8ccharts-8Y73Kh.a8ccharts-DEe0wg {
|
|
35
|
-
justify-content: flex-start;
|
|
36
|
-
}
|
|
37
|
-
.a8ccharts-8Y73Kh.a8ccharts-WBKF9I {
|
|
38
|
-
justify-content: center;
|
|
39
|
-
}
|
|
40
|
-
.a8ccharts-8Y73Kh.a8ccharts-JfwMng {
|
|
41
|
-
justify-content: flex-end;
|
|
42
|
-
}
|
|
43
|
-
.a8ccharts-TVM-IY {
|
|
44
|
-
position: relative;
|
|
45
|
-
}
|
|
46
|
-
.a8ccharts-TVM-IY.a8ccharts-DEe0wg {
|
|
47
|
-
justify-content: flex-start;
|
|
48
|
-
}
|
|
49
|
-
.a8ccharts-TVM-IY.a8ccharts-WBKF9I {
|
|
50
|
-
justify-content: center;
|
|
51
|
-
}
|
|
52
|
-
.a8ccharts-TVM-IY.a8ccharts-JfwMng {
|
|
53
|
-
justify-content: flex-end;
|
|
54
|
-
}
|
|
55
|
-
.a8ccharts-Vflwq8 {
|
|
56
|
-
display: flex;
|
|
57
|
-
align-items: center;
|
|
58
|
-
font-size: 0.875rem;
|
|
59
|
-
}
|
|
60
|
-
.a8ccharts-qGsavM {
|
|
61
|
-
cursor: pointer;
|
|
62
|
-
user-select: none;
|
|
63
|
-
transition: opacity 0.2s ease;
|
|
64
|
-
}
|
|
65
|
-
.a8ccharts-qGsavM:hover {
|
|
66
|
-
opacity: 0.8;
|
|
67
|
-
}
|
|
68
|
-
.a8ccharts-qGsavM:focus {
|
|
69
|
-
outline: 2px solid currentColor;
|
|
70
|
-
outline-offset: 2px;
|
|
71
|
-
border-radius: 4px;
|
|
72
|
-
}
|
|
73
|
-
.a8ccharts-qGsavM:focus:not(:focus-visible) {
|
|
74
|
-
outline: none;
|
|
75
|
-
}
|
|
76
|
-
.a8ccharts-ZtDY-Q {
|
|
77
|
-
opacity: 0.4;
|
|
78
|
-
}
|
|
79
|
-
.a8ccharts-ZtDY-Q .a8ccharts-2H65Kr {
|
|
80
|
-
text-decoration: line-through;
|
|
81
|
-
}
|
|
82
|
-
.a8ccharts-2H65Kr {
|
|
83
|
-
display: flex;
|
|
84
|
-
align-items: center;
|
|
85
|
-
gap: 0.5rem;
|
|
86
|
-
}
|
|
87
|
-
.a8ccharts-faSDBI {
|
|
88
|
-
overflow-wrap: break-word;
|
|
89
|
-
white-space: normal;
|
|
90
|
-
hyphens: auto;
|
|
91
|
-
}
|
|
92
|
-
.a8ccharts-FISUIO {
|
|
93
|
-
white-space: nowrap;
|
|
94
|
-
overflow: hidden;
|
|
95
|
-
text-overflow: ellipsis;
|
|
96
|
-
flex-shrink: 1;
|
|
97
|
-
min-width: 0;
|
|
98
|
-
}
|
|
99
|
-
.a8ccharts-DTZlT- {
|
|
100
|
-
font-weight: 500;
|
|
101
|
-
flex-shrink: 0;
|
|
102
|
-
}
|
|
103
|
-
/*# sourceMappingURL=index.css.map */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["esbuild-sass-plugin:css-chunk:src/hooks/use-tooltip-portal-relocator.module.scss","esbuild-sass-plugin:css-chunk:src/components/legend/private/base-legend.module.scss"],"sourcesContent":[".a8ccharts-jCw5dQ {\n position: fixed;\n inset: 0;\n overflow: visible;\n z-index: 1;\n pointer-events: none;\n}",".a8ccharts-AELBvX {\n display: flex;\n flex-direction: row;\n flex-wrap: wrap;\n gap: 16px;\n}\n.a8ccharts-fX8uQe {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.a8ccharts-fX8uQe.a8ccharts-DEe0wg {\n align-items: flex-start;\n}\n.a8ccharts-fX8uQe.a8ccharts-WBKF9I {\n align-items: center;\n}\n.a8ccharts-fX8uQe.a8ccharts-JfwMng {\n align-items: flex-end;\n}\n.a8ccharts-8Y73Kh {\n position: relative;\n}\n.a8ccharts-8Y73Kh.a8ccharts-DEe0wg {\n justify-content: flex-start;\n}\n.a8ccharts-8Y73Kh.a8ccharts-WBKF9I {\n justify-content: center;\n}\n.a8ccharts-8Y73Kh.a8ccharts-JfwMng {\n justify-content: flex-end;\n}\n.a8ccharts-TVM-IY {\n position: relative;\n}\n.a8ccharts-TVM-IY.a8ccharts-DEe0wg {\n justify-content: flex-start;\n}\n.a8ccharts-TVM-IY.a8ccharts-WBKF9I {\n justify-content: center;\n}\n.a8ccharts-TVM-IY.a8ccharts-JfwMng {\n justify-content: flex-end;\n}\n\n.a8ccharts-Vflwq8 {\n display: flex;\n align-items: center;\n font-size: 0.875rem;\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: 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-2H65Kr {\n display: flex;\n align-items: center;\n gap: 0.5rem;\n /* Text wrapping is handled at the text level, not the label container */\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: 500;\n flex-shrink: 0;\n}"],"mappings":";AAAA,CAAC;AACC,YAAU;AACV,SAAO;AACP,YAAU;AACV,WAAS;AACT,kBAAgB;AAClB;;;ACNA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,aAAW;AACX,OAAK;AACP;AACA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,OAAK;AACP;AACA,CALC,gBAKgB,CAAC;AAChB,eAAa;AACf;AACA,CARC,gBAQgB,CAAC;AAChB,eAAa;AACf;AACA,CAXC,gBAWgB,CAAC;AAChB,eAAa;AACf;AACA,CAAC;AACC,YAAU;AACZ;AACA,CAHC,gBAGgB,CAZC;AAahB,mBAAiB;AACnB;AACA,CANC,gBAMgB,CAZC;AAahB,mBAAiB;AACnB;AACA,CATC,gBASgB,CAZC;AAahB,mBAAiB;AACnB;AACA,CAAC;AACC,YAAU;AACZ;AACA,CAHC,gBAGgB,CAxBC;AAyBhB,mBAAiB;AACnB;AACA,CANC,gBAMgB,CAxBC;AAyBhB,mBAAiB;AACnB;AACA,CATC,gBASgB,CAxBC;AAyBhB,mBAAiB;AACnB;AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,aAAW;AACb;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;AACjB;AACA,CAbC,gBAagB,MAAM,KAAK;AAC1B,WAAS;AACX;AACA,CAAC;AACC,WAAS;AACX;AACA,CAHC,iBAGiB,CAAC;AACjB,mBAAiB;AACnB;AAEA,CAJmB;AAKjB,WAAS;AACT,eAAa;AACb,OAAK;AAEP;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;AACb,eAAa;AACf;","names":[]}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export { C as ChartRegistration, E as ElementStyles, c as GetElementStylesParams, G as GlobalChartsContext, e as GlobalChartsContextValue, a as GlobalChartsProvider, d as defaultTheme, u as useGlobalChartsContext, b as useGlobalChartsTheme } from '../themes-CyjKm-P_.cjs';
|
|
2
|
-
import { B as BaseLegendItem } from '../types-I67mddpr.cjs';
|
|
3
|
-
import 'react';
|
|
4
|
-
import '../types-DZordNiO.cjs';
|
|
5
|
-
import '@visx/annotation/lib/components/CircleSubject';
|
|
6
|
-
import '@visx/annotation/lib/components/Connector';
|
|
7
|
-
import '@visx/annotation/lib/components/Label';
|
|
8
|
-
import '@visx/annotation/lib/components/LineSubject';
|
|
9
|
-
import '@visx/axis';
|
|
10
|
-
import '@visx/legend/lib/types';
|
|
11
|
-
import '@visx/scale';
|
|
12
|
-
import '@visx/text/lib/Text';
|
|
13
|
-
import '@visx/xychart';
|
|
14
|
-
import '@wordpress/theme';
|
|
15
|
-
import 'react-google-charts';
|
|
16
|
-
import '@visx/legend';
|
|
17
|
-
|
|
18
|
-
declare const useChartId: (providedId?: string) => string;
|
|
19
|
-
|
|
20
|
-
declare const useChartRegistration: ({ chartId, legendItems, chartType, isDataValid, metadata, }: {
|
|
21
|
-
chartId: string;
|
|
22
|
-
legendItems: BaseLegendItem[];
|
|
23
|
-
chartType: string;
|
|
24
|
-
isDataValid: boolean;
|
|
25
|
-
metadata?: Record<string, unknown>;
|
|
26
|
-
}) => void;
|
|
27
|
-
|
|
28
|
-
export { useChartId, useChartRegistration };
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export { C as ChartRegistration, E as ElementStyles, c as GetElementStylesParams, G as GlobalChartsContext, e as GlobalChartsContextValue, a as GlobalChartsProvider, d as defaultTheme, u as useGlobalChartsContext, b as useGlobalChartsTheme } from '../themes-BmVGrYnF.js';
|
|
2
|
-
import { B as BaseLegendItem } from '../types-I67mddpr.js';
|
|
3
|
-
import 'react';
|
|
4
|
-
import '../types-DZordNiO.js';
|
|
5
|
-
import '@visx/annotation/lib/components/CircleSubject';
|
|
6
|
-
import '@visx/annotation/lib/components/Connector';
|
|
7
|
-
import '@visx/annotation/lib/components/Label';
|
|
8
|
-
import '@visx/annotation/lib/components/LineSubject';
|
|
9
|
-
import '@visx/axis';
|
|
10
|
-
import '@visx/legend/lib/types';
|
|
11
|
-
import '@visx/scale';
|
|
12
|
-
import '@visx/text/lib/Text';
|
|
13
|
-
import '@visx/xychart';
|
|
14
|
-
import '@wordpress/theme';
|
|
15
|
-
import 'react-google-charts';
|
|
16
|
-
import '@visx/legend';
|
|
17
|
-
|
|
18
|
-
declare const useChartId: (providedId?: string) => string;
|
|
19
|
-
|
|
20
|
-
declare const useChartRegistration: ({ chartId, legendItems, chartType, isDataValid, metadata, }: {
|
|
21
|
-
chartId: string;
|
|
22
|
-
legendItems: BaseLegendItem[];
|
|
23
|
-
chartType: string;
|
|
24
|
-
isDataValid: boolean;
|
|
25
|
-
metadata?: Record<string, unknown>;
|
|
26
|
-
}) => void;
|
|
27
|
-
|
|
28
|
-
export { useChartId, useChartRegistration };
|
package/dist/providers/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
GlobalChartsContext,
|
|
3
|
-
GlobalChartsProvider,
|
|
4
|
-
defaultTheme,
|
|
5
|
-
useChartId,
|
|
6
|
-
useChartRegistration,
|
|
7
|
-
useGlobalChartsContext,
|
|
8
|
-
useGlobalChartsTheme
|
|
9
|
-
} from "../chunk-32DH6JDF.js";
|
|
10
|
-
import "../chunk-DAU3HNEG.js";
|
|
11
|
-
import "../chunk-G3PMV62Z.js";
|
|
12
|
-
export {
|
|
13
|
-
GlobalChartsContext,
|
|
14
|
-
GlobalChartsProvider,
|
|
15
|
-
defaultTheme,
|
|
16
|
-
useChartId,
|
|
17
|
-
useChartRegistration,
|
|
18
|
-
useGlobalChartsContext,
|
|
19
|
-
useGlobalChartsTheme
|
|
20
|
-
};
|
|
21
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ReactNode, CSSProperties, FC } from 'react';
|
|
3
|
-
import { b as CompleteChartTheme, j as SeriesData, d as DataPointPercentage, C as ChartTheme } from './types-DZordNiO.js';
|
|
4
|
-
import { B as BaseLegendItem } from './types-I67mddpr.js';
|
|
5
|
-
import { LegendShape } from '@visx/legend/lib/types';
|
|
6
|
-
import { LineStyles, GlyphProps } from '@visx/xychart';
|
|
7
|
-
|
|
8
|
-
interface ChartRegistration {
|
|
9
|
-
legendItems: BaseLegendItem[];
|
|
10
|
-
chartType: string;
|
|
11
|
-
metadata?: Record<string, unknown>;
|
|
12
|
-
}
|
|
13
|
-
type GetElementStylesParams = {
|
|
14
|
-
index: number;
|
|
15
|
-
data?: SeriesData | DataPointPercentage;
|
|
16
|
-
overrideColor?: string;
|
|
17
|
-
legendShape?: LegendShape<SeriesData[], number>;
|
|
18
|
-
};
|
|
19
|
-
type ElementStyles = {
|
|
20
|
-
color: string;
|
|
21
|
-
lineStyles: LineStyles;
|
|
22
|
-
glyph: <Datum extends object>(props: GlyphProps<Datum>) => ReactNode;
|
|
23
|
-
shapeStyles: CSSProperties & LineStyles;
|
|
24
|
-
};
|
|
25
|
-
interface GlobalChartsContextValue {
|
|
26
|
-
charts: Map<string, ChartRegistration>;
|
|
27
|
-
registerChart: (id: string, data: ChartRegistration) => void;
|
|
28
|
-
unregisterChart: (id: string) => void;
|
|
29
|
-
getChartData: (id: string) => ChartRegistration | undefined;
|
|
30
|
-
theme: CompleteChartTheme;
|
|
31
|
-
getElementStyles: (params: GetElementStylesParams) => ElementStyles;
|
|
32
|
-
toggleSeriesVisibility: (chartId: string, seriesLabel: string) => void;
|
|
33
|
-
isSeriesVisible: (chartId: string, seriesLabel: string) => boolean;
|
|
34
|
-
getHiddenSeries: (chartId: string) => Set<string>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
declare const GlobalChartsContext: react.Context<GlobalChartsContextValue>;
|
|
38
|
-
interface GlobalChartsProviderProps {
|
|
39
|
-
children: ReactNode;
|
|
40
|
-
theme?: Partial<ChartTheme>;
|
|
41
|
-
/**
|
|
42
|
-
* Optional ref to an element that chart tooltip portals should be relocated into.
|
|
43
|
-
* When provided, visx tooltip portals (normally appended to document.body) will be
|
|
44
|
-
* moved into this container so they participate in the same effective CSS stacking context.
|
|
45
|
-
* The element referenced here, or one of its ancestors, should establish the desired
|
|
46
|
-
* stacking context (for example by using `position` and `z-index`) so that tooltips
|
|
47
|
-
* appear above the relevant chart content.
|
|
48
|
-
*/
|
|
49
|
-
portalContainer?: React.RefObject<HTMLElement | null>;
|
|
50
|
-
}
|
|
51
|
-
declare const GlobalChartsProvider: FC<GlobalChartsProviderProps>;
|
|
52
|
-
|
|
53
|
-
declare const useGlobalChartsContext: () => GlobalChartsContextValue;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Hook to get the global chart theme from GlobalChartsProvider
|
|
57
|
-
*
|
|
58
|
-
* @return The global chart theme
|
|
59
|
-
*/
|
|
60
|
-
declare const useGlobalChartsTheme: () => CompleteChartTheme;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Default theme configuration
|
|
64
|
-
*/
|
|
65
|
-
declare const defaultTheme: CompleteChartTheme;
|
|
66
|
-
|
|
67
|
-
export { type ChartRegistration as C, type ElementStyles as E, GlobalChartsContext as G, GlobalChartsProvider as a, useGlobalChartsTheme as b, type GetElementStylesParams as c, defaultTheme as d, type GlobalChartsContextValue as e, useGlobalChartsContext as u };
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ReactNode, CSSProperties, FC } from 'react';
|
|
3
|
-
import { b as CompleteChartTheme, j as SeriesData, d as DataPointPercentage, C as ChartTheme } from './types-DZordNiO.cjs';
|
|
4
|
-
import { B as BaseLegendItem } from './types-I67mddpr.cjs';
|
|
5
|
-
import { LegendShape } from '@visx/legend/lib/types';
|
|
6
|
-
import { LineStyles, GlyphProps } from '@visx/xychart';
|
|
7
|
-
|
|
8
|
-
interface ChartRegistration {
|
|
9
|
-
legendItems: BaseLegendItem[];
|
|
10
|
-
chartType: string;
|
|
11
|
-
metadata?: Record<string, unknown>;
|
|
12
|
-
}
|
|
13
|
-
type GetElementStylesParams = {
|
|
14
|
-
index: number;
|
|
15
|
-
data?: SeriesData | DataPointPercentage;
|
|
16
|
-
overrideColor?: string;
|
|
17
|
-
legendShape?: LegendShape<SeriesData[], number>;
|
|
18
|
-
};
|
|
19
|
-
type ElementStyles = {
|
|
20
|
-
color: string;
|
|
21
|
-
lineStyles: LineStyles;
|
|
22
|
-
glyph: <Datum extends object>(props: GlyphProps<Datum>) => ReactNode;
|
|
23
|
-
shapeStyles: CSSProperties & LineStyles;
|
|
24
|
-
};
|
|
25
|
-
interface GlobalChartsContextValue {
|
|
26
|
-
charts: Map<string, ChartRegistration>;
|
|
27
|
-
registerChart: (id: string, data: ChartRegistration) => void;
|
|
28
|
-
unregisterChart: (id: string) => void;
|
|
29
|
-
getChartData: (id: string) => ChartRegistration | undefined;
|
|
30
|
-
theme: CompleteChartTheme;
|
|
31
|
-
getElementStyles: (params: GetElementStylesParams) => ElementStyles;
|
|
32
|
-
toggleSeriesVisibility: (chartId: string, seriesLabel: string) => void;
|
|
33
|
-
isSeriesVisible: (chartId: string, seriesLabel: string) => boolean;
|
|
34
|
-
getHiddenSeries: (chartId: string) => Set<string>;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
declare const GlobalChartsContext: react.Context<GlobalChartsContextValue>;
|
|
38
|
-
interface GlobalChartsProviderProps {
|
|
39
|
-
children: ReactNode;
|
|
40
|
-
theme?: Partial<ChartTheme>;
|
|
41
|
-
/**
|
|
42
|
-
* Optional ref to an element that chart tooltip portals should be relocated into.
|
|
43
|
-
* When provided, visx tooltip portals (normally appended to document.body) will be
|
|
44
|
-
* moved into this container so they participate in the same effective CSS stacking context.
|
|
45
|
-
* The element referenced here, or one of its ancestors, should establish the desired
|
|
46
|
-
* stacking context (for example by using `position` and `z-index`) so that tooltips
|
|
47
|
-
* appear above the relevant chart content.
|
|
48
|
-
*/
|
|
49
|
-
portalContainer?: React.RefObject<HTMLElement | null>;
|
|
50
|
-
}
|
|
51
|
-
declare const GlobalChartsProvider: FC<GlobalChartsProviderProps>;
|
|
52
|
-
|
|
53
|
-
declare const useGlobalChartsContext: () => GlobalChartsContextValue;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Hook to get the global chart theme from GlobalChartsProvider
|
|
57
|
-
*
|
|
58
|
-
* @return The global chart theme
|
|
59
|
-
*/
|
|
60
|
-
declare const useGlobalChartsTheme: () => CompleteChartTheme;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Default theme configuration
|
|
64
|
-
*/
|
|
65
|
-
declare const defaultTheme: CompleteChartTheme;
|
|
66
|
-
|
|
67
|
-
export { type ChartRegistration as C, type ElementStyles as E, GlobalChartsContext as G, GlobalChartsProvider as a, useGlobalChartsTheme as b, type GetElementStylesParams as c, defaultTheme as d, type GlobalChartsContextValue as e, useGlobalChartsContext as u };
|
package/dist/types-CuUEszrM.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { L as Legend } from './legend-Cj0xM5dU.js';
|
|
2
|
-
import { ComponentType, FC, PropsWithChildren } from 'react';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Base interface for chart subcomponents in the composition API
|
|
6
|
-
*/
|
|
7
|
-
interface BaseChartSubComponents {
|
|
8
|
-
Legend: ComponentType<React.ComponentProps<typeof Legend>>;
|
|
9
|
-
SVG: FC<PropsWithChildren>;
|
|
10
|
-
HTML: FC<PropsWithChildren>;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Type helper for creating chart components with composition API
|
|
14
|
-
* @template TProps - The props type for the chart component
|
|
15
|
-
* @template TSubComponents - Additional subcomponents beyond the base ones
|
|
16
|
-
*/
|
|
17
|
-
type ChartComponentWithComposition<TProps, TSubComponents extends BaseChartSubComponents = BaseChartSubComponents> = FC<TProps> & TSubComponents;
|
|
18
|
-
|
|
19
|
-
export type { ChartComponentWithComposition as C };
|