@ledgerhq/lumen-ui-react 0.1.56 → 0.1.58
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/ai-rules/RULES.md +5 -4
- package/dist/index.js +176 -172
- package/dist/lib/Components/core/DotIcon/DotIcon.d.ts +0 -13
- package/dist/lib/Components/core/DotIcon/DotIcon.d.ts.map +1 -1
- package/dist/lib/Components/core/DotIcon/DotIcon.js +15 -28
- package/dist/lib/Components/core/DotIcon/getDotIconProps.d.ts +66 -0
- package/dist/lib/Components/core/DotIcon/getDotIconProps.d.ts.map +1 -0
- package/dist/lib/Components/core/DotIcon/getDotIconProps.js +19 -0
- package/dist/lib/Components/core/DotIcon/index.d.ts +9 -1
- package/dist/lib/Components/core/DotIcon/index.d.ts.map +1 -1
- package/dist/lib/Components/core/DotIcon/index.js +10 -0
- package/dist/lib/Components/core/DotSymbol/DotSymbol.d.ts +1 -5
- package/dist/lib/Components/core/DotSymbol/DotSymbol.d.ts.map +1 -1
- package/dist/lib/Components/core/DotSymbol/DotSymbol.js +14 -33
- package/dist/lib/Components/core/DotSymbol/getDotSymbolProps.d.ts +102 -0
- package/dist/lib/Components/core/DotSymbol/getDotSymbolProps.d.ts.map +1 -0
- package/dist/lib/Components/core/DotSymbol/getDotSymbolProps.js +25 -0
- package/dist/lib/Components/core/DotSymbol/index.d.ts +14 -1
- package/dist/lib/Components/core/DotSymbol/index.d.ts.map +1 -1
- package/dist/lib/Components/core/DotSymbol/index.js +15 -0
- package/dist/lib/Components/core/Tooltip/Tooltip.d.ts +0 -8
- package/dist/lib/Components/core/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/lib/Components/core/Tooltip/Tooltip.js +1 -1
- package/dist/lib/Components/visualization/Axis/XAxis/XAxis.d.ts +3 -0
- package/dist/lib/Components/visualization/Axis/XAxis/XAxis.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Axis/XAxis/XAxis.js +85 -0
- package/dist/lib/Components/visualization/Axis/XAxis/index.d.ts +3 -0
- package/dist/lib/Components/visualization/Axis/XAxis/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Axis/XAxis/types.d.ts +9 -0
- package/dist/lib/Components/visualization/Axis/XAxis/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Axis/YAxis/YAxis.d.ts +3 -0
- package/dist/lib/Components/visualization/Axis/YAxis/YAxis.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Axis/YAxis/YAxis.js +85 -0
- package/dist/lib/Components/visualization/Axis/YAxis/index.d.ts +3 -0
- package/dist/lib/Components/visualization/Axis/YAxis/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Axis/YAxis/types.d.ts +14 -0
- package/dist/lib/Components/visualization/Axis/YAxis/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Axis/index.d.ts +2 -0
- package/dist/lib/Components/visualization/Axis/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Axis/types.d.ts +80 -0
- package/dist/lib/Components/visualization/Axis/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/CartesianChart.d.ts +3 -0
- package/dist/lib/Components/visualization/CartesianChart/CartesianChart.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/CartesianChart.js +107 -0
- package/dist/lib/Components/visualization/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.d.ts +11 -0
- package/dist/lib/Components/visualization/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.js +21 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/RevealAnimationProvider.d.ts +3 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/RevealAnimationProvider.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/RevealAnimationProvider.js +41 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/context.d.ts +15 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/context.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/context.js +10 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/index.d.ts +3 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/types.d.ts +57 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/utils.d.ts +35 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/utils.js +69 -0
- package/dist/lib/Components/visualization/CartesianChart/context/cartesianChartContext.d.ts +8 -0
- package/dist/lib/Components/visualization/CartesianChart/context/cartesianChartContext.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/context/cartesianChartContext.js +9 -0
- package/dist/lib/Components/visualization/CartesianChart/context/index.d.ts +3 -0
- package/dist/lib/Components/visualization/CartesianChart/context/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/context/useBuildChartContext.d.ts +25 -0
- package/dist/lib/Components/visualization/CartesianChart/context/useBuildChartContext.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/context/useBuildChartContext.js +61 -0
- package/dist/lib/Components/visualization/CartesianChart/hooks/useShimmerAnimation.d.ts +18 -0
- package/dist/lib/Components/visualization/CartesianChart/hooks/useShimmerAnimation.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/hooks/useShimmerAnimation.js +15 -0
- package/dist/lib/Components/visualization/CartesianChart/index.d.ts +4 -0
- package/dist/lib/Components/visualization/CartesianChart/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/types.d.ts +127 -0
- package/dist/lib/Components/visualization/CartesianChart/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/utils.d.ts +5 -0
- package/dist/lib/Components/visualization/CartesianChart/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/CartesianChart/utils.js +24 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChart.d.ts +3 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChart.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChart.js +90 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartAnimatedCenter.d.ts +10 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartAnimatedCenter.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartAnimatedCenter.js +61 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartCenter.d.ts +9 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartCenter.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartCenter.js +20 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartDescription.d.ts +3 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartDescription.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartDescription.js +49 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartTitle.d.ts +3 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartTitle.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/DonutChartTitle.js +55 -0
- package/dist/lib/Components/visualization/DonutChart/DonutRing.d.ts +12 -0
- package/dist/lib/Components/visualization/DonutChart/DonutRing.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/DonutRing.js +110 -0
- package/dist/lib/Components/visualization/DonutChart/RevealAnimation.d.ts +7 -0
- package/dist/lib/Components/visualization/DonutChart/RevealAnimation.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/RevealAnimation.js +28 -0
- package/dist/lib/Components/visualization/DonutChart/donutSizeContext.d.ts +18 -0
- package/dist/lib/Components/visualization/DonutChart/donutSizeContext.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/donutSizeContext.js +6 -0
- package/dist/lib/Components/visualization/DonutChart/hooks/useContrastSafeSeries.d.ts +12 -0
- package/dist/lib/Components/visualization/DonutChart/hooks/useContrastSafeSeries.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/hooks/useContrastSafeSeries.js +13 -0
- package/dist/lib/Components/visualization/DonutChart/hooks/useDonutLoadingAnimation.d.ts +8 -0
- package/dist/lib/Components/visualization/DonutChart/hooks/useDonutLoadingAnimation.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/hooks/useDonutLoadingAnimation.js +16 -0
- package/dist/lib/Components/visualization/DonutChart/index.d.ts +7 -0
- package/dist/lib/Components/visualization/DonutChart/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/types.d.ts +172 -0
- package/dist/lib/Components/visualization/DonutChart/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/index.d.ts +3 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/useDonutSeries.d.ts +10 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/useDonutSeries.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/useDonutSeries.js +16 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/utils.d.ts +9 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/useDonutSeries/utils.js +46 -0
- package/dist/lib/Components/visualization/DonutChart/utils.d.ts +37 -0
- package/dist/lib/Components/visualization/DonutChart/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/DonutChart/utils.js +83 -0
- package/dist/lib/Components/visualization/Legend/Legend.d.ts +3 -0
- package/dist/lib/Components/visualization/Legend/Legend.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Legend/Legend.js +23 -0
- package/dist/lib/Components/visualization/Legend/LegendItem.d.ts +7 -0
- package/dist/lib/Components/visualization/Legend/LegendItem.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Legend/LegendItem.js +19 -0
- package/dist/lib/Components/visualization/Legend/index.d.ts +3 -0
- package/dist/lib/Components/visualization/Legend/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Legend/types.d.ts +32 -0
- package/dist/lib/Components/visualization/Legend/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Line/Line.d.ts +3 -0
- package/dist/lib/Components/visualization/Line/Line.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Line/Line.js +82 -0
- package/dist/lib/Components/visualization/Line/index.d.ts +3 -0
- package/dist/lib/Components/visualization/Line/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Line/types.d.ts +45 -0
- package/dist/lib/Components/visualization/Line/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Line/utils.d.ts +28 -0
- package/dist/lib/Components/visualization/Line/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Line/utils.js +34 -0
- package/dist/lib/Components/visualization/LineChart/LineChart.d.ts +3 -0
- package/dist/lib/Components/visualization/LineChart/LineChart.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/LineChart.js +181 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/LineChartEmptyState.d.ts +9 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/LineChartEmptyState.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/LineChartEmptyState.js +51 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/index.d.ts +3 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/types.d.ts +3 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/utils.d.ts +8 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/LineChartEmptyState/utils.js +8 -0
- package/dist/lib/Components/visualization/LineChart/index.d.ts +3 -0
- package/dist/lib/Components/visualization/LineChart/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/types.d.ts +82 -0
- package/dist/lib/Components/visualization/LineChart/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/utils.d.ts +56 -0
- package/dist/lib/Components/visualization/LineChart/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/LineChart/utils.js +57 -0
- package/dist/lib/Components/visualization/Point/Point.d.ts +4 -0
- package/dist/lib/Components/visualization/Point/Point.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/Point.js +122 -0
- package/dist/lib/Components/visualization/Point/index.d.ts +3 -0
- package/dist/lib/Components/visualization/Point/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/pointContext/MagneticPointsProvider.d.ts +7 -0
- package/dist/lib/Components/visualization/Point/pointContext/MagneticPointsProvider.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/pointContext/MagneticPointsProvider.js +22 -0
- package/dist/lib/Components/visualization/Point/pointContext/index.d.ts +3 -0
- package/dist/lib/Components/visualization/Point/pointContext/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/pointContext/magneticPointsContext.d.ts +30 -0
- package/dist/lib/Components/visualization/Point/pointContext/magneticPointsContext.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/pointContext/magneticPointsContext.js +14 -0
- package/dist/lib/Components/visualization/Point/types.d.ts +110 -0
- package/dist/lib/Components/visualization/Point/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/usePointGeometry.d.ts +33 -0
- package/dist/lib/Components/visualization/Point/usePointGeometry.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/usePointGeometry.js +30 -0
- package/dist/lib/Components/visualization/Point/utils.d.ts +51 -0
- package/dist/lib/Components/visualization/Point/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Point/utils.js +54 -0
- package/dist/lib/Components/visualization/ReferenceLine/ReferenceLine.d.ts +3 -0
- package/dist/lib/Components/visualization/ReferenceLine/ReferenceLine.d.ts.map +1 -0
- package/dist/lib/Components/visualization/ReferenceLine/ReferenceLine.js +42 -0
- package/dist/lib/Components/visualization/ReferenceLine/index.d.ts +3 -0
- package/dist/lib/Components/visualization/ReferenceLine/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/ReferenceLine/types.d.ts +74 -0
- package/dist/lib/Components/visualization/ReferenceLine/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/ReferenceLine/useReferenceLineGeometry.d.ts +21 -0
- package/dist/lib/Components/visualization/ReferenceLine/useReferenceLineGeometry.d.ts.map +1 -0
- package/dist/lib/Components/visualization/ReferenceLine/useReferenceLineGeometry.js +49 -0
- package/dist/lib/Components/visualization/ReferenceLine/utils.d.ts +50 -0
- package/dist/lib/Components/visualization/ReferenceLine/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/ReferenceLine/utils.js +66 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/ChartTooltipItem.d.ts +9 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/ChartTooltipItem.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/ChartTooltipItem.js +50 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/DefaultScrubberTooltip.d.ts +12 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/DefaultScrubberTooltip.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/DefaultScrubberTooltip.js +82 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/utils.d.ts +58 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/DefaultScrubberTooltip/utils.js +80 -0
- package/dist/lib/Components/visualization/Scrubber/Scrubber.d.ts +29 -0
- package/dist/lib/Components/visualization/Scrubber/Scrubber.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/Scrubber.js +114 -0
- package/dist/lib/Components/visualization/Scrubber/ScrubberProvider.d.ts +3 -0
- package/dist/lib/Components/visualization/Scrubber/ScrubberProvider.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/ScrubberProvider.js +154 -0
- package/dist/lib/Components/visualization/Scrubber/context/index.d.ts +2 -0
- package/dist/lib/Components/visualization/Scrubber/context/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/context/scrubberContext.d.ts +8 -0
- package/dist/lib/Components/visualization/Scrubber/context/scrubberContext.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/context/scrubberContext.js +9 -0
- package/dist/lib/Components/visualization/Scrubber/index.d.ts +4 -0
- package/dist/lib/Components/visualization/Scrubber/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/types.d.ts +130 -0
- package/dist/lib/Components/visualization/Scrubber/types.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/useScrubberGeometry.d.ts +29 -0
- package/dist/lib/Components/visualization/Scrubber/useScrubberGeometry.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/useScrubberGeometry.js +37 -0
- package/dist/lib/Components/visualization/Scrubber/utils.d.ts +79 -0
- package/dist/lib/Components/visualization/Scrubber/utils.d.ts.map +1 -0
- package/dist/lib/Components/visualization/Scrubber/utils.js +104 -0
- package/dist/lib/Components/visualization/config.d.ts +162 -0
- package/dist/lib/Components/visualization/config.d.ts.map +1 -0
- package/dist/lib/Components/visualization/config.js +156 -0
- package/dist/lib/Components/visualization/index.d.ts +8 -0
- package/dist/lib/Components/visualization/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/index.js +27 -0
- package/dist/lib/Components/visualization/utils/domain/domain.d.ts +18 -0
- package/dist/lib/Components/visualization/utils/domain/domain.d.ts.map +1 -0
- package/dist/lib/Components/visualization/utils/domain/domain.js +35 -0
- package/dist/lib/Components/visualization/utils/index.d.ts +2 -0
- package/dist/lib/Components/visualization/utils/index.d.ts.map +1 -0
- package/dist/lib/Components/visualization/utils/numbers.d.ts +13 -0
- package/dist/lib/Components/visualization/utils/numbers.d.ts.map +1 -0
- package/dist/lib/Components/visualization/utils/numbers.js +5 -0
- package/dist/lib/Components/visualization/utils/scales/scales.d.ts +47 -0
- package/dist/lib/Components/visualization/utils/scales/scales.d.ts.map +1 -0
- package/dist/lib/Components/visualization/utils/scales/scales.js +32 -0
- package/dist/lib/Components/visualization/utils/ticks/ticks.d.ts +35 -0
- package/dist/lib/Components/visualization/utils/ticks/ticks.d.ts.map +1 -0
- package/dist/lib/Components/visualization/utils/ticks/ticks.js +23 -0
- package/dist/lib/Components/visualization/utils/types.d.ts +63 -0
- package/dist/lib/Components/visualization/utils/types.d.ts.map +1 -0
- package/dist/libs/design-core/dist/lib/colorContrast/colorContrast.js +15 -0
- package/dist/libs/design-core/dist/lib/colorContrast/hexToHsl.js +14 -0
- package/dist/libs/design-core/dist/lib/colorContrast/hslToHex.js +10 -0
- package/dist/libs/design-core/dist/lib/themes/js/primitives/primitive.colors.js +15 -0
- package/dist/libs/utils-shared/dist/index.js +115 -113
- package/dist/package.json +12 -4
- package/package.json +12 -4
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export type AxisBounds = {
|
|
2
|
+
min: number;
|
|
3
|
+
max: number;
|
|
4
|
+
};
|
|
5
|
+
export type BaseAxisProps = {
|
|
6
|
+
/**
|
|
7
|
+
* Whether to render grid lines at each tick.
|
|
8
|
+
* @default false
|
|
9
|
+
*/
|
|
10
|
+
showGrid?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Appearance of the grid lines.
|
|
13
|
+
* @default 'dashed'
|
|
14
|
+
*/
|
|
15
|
+
gridLineStyle?: 'solid' | 'dashed';
|
|
16
|
+
/**
|
|
17
|
+
* Whether to render the axis baseline.
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
showLine?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* Whether to render tick marks at each tick position.
|
|
23
|
+
* @default false
|
|
24
|
+
*/
|
|
25
|
+
showTickMark?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether to render the text labels at each tick position.
|
|
28
|
+
* When false, tick marks, grid lines, and the baseline still render.
|
|
29
|
+
* @default true
|
|
30
|
+
*/
|
|
31
|
+
showLabels?: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* Explicit tick positions along the axis.
|
|
34
|
+
* When omitted, ticks are computed automatically from the scale. An empty
|
|
35
|
+
* array is honoured literally and renders no ticks — to keep ticks while
|
|
36
|
+
* hiding their marks or labels, use `showTickMark` / `showLabels` instead.
|
|
37
|
+
*/
|
|
38
|
+
ticks?: number[];
|
|
39
|
+
/**
|
|
40
|
+
* Formats a tick value into its display label.
|
|
41
|
+
* Receives the raw tick value (number or string label) and must return a string.
|
|
42
|
+
*/
|
|
43
|
+
tickLabelFormatter?: (value: number | string) => string;
|
|
44
|
+
/**
|
|
45
|
+
* Scale algorithm used by this axis.
|
|
46
|
+
* @default 'linear'
|
|
47
|
+
*/
|
|
48
|
+
scaleType?: 'linear' | 'log' | 'band';
|
|
49
|
+
/**
|
|
50
|
+
* Explicit data values for band scales or category labels.
|
|
51
|
+
* For band scales, provides the discrete domain. For numeric scales, string values
|
|
52
|
+
* are used as tick labels at corresponding indices.
|
|
53
|
+
*/
|
|
54
|
+
data?: string[] | number[];
|
|
55
|
+
/**
|
|
56
|
+
* Fixed domain bounds or a function that adjusts the computed bounds.
|
|
57
|
+
* A partial object overrides only the specified bound(s).
|
|
58
|
+
* A function receives the auto-computed bounds and returns adjusted ones.
|
|
59
|
+
*
|
|
60
|
+
* Applied before {@link BaseAxisProps.nice}. To keep your bounds exactly as
|
|
61
|
+
* provided, set `nice: false` alongside a full `{ min, max }` override.
|
|
62
|
+
*/
|
|
63
|
+
domain?: Partial<AxisBounds> | ((bounds: AxisBounds) => AxisBounds);
|
|
64
|
+
/**
|
|
65
|
+
* Round the domain outward to clean boundaries via d3's `.nice()`
|
|
66
|
+
* (e.g. `[4, 98]` becomes `[0, 100]`).
|
|
67
|
+
*
|
|
68
|
+
* Defaults to `true` in `CartesianChart`. `LineChart` overrides this per axis,
|
|
69
|
+
* defaulting to `false` for the X axis and `true` for the Y axis.
|
|
70
|
+
*
|
|
71
|
+
* Set to `false` to keep the domain exactly as provided so data fills the plot
|
|
72
|
+
* area boundary-to-boundary — typically only useful when you also pass a full
|
|
73
|
+
* `domain: { min, max }` and don't have overlays (reference lines, scrubber
|
|
74
|
+
* positions, annotations) that may sit outside the data range.
|
|
75
|
+
*
|
|
76
|
+
* Applied after any {@link BaseAxisProps.domain} override.
|
|
77
|
+
*/
|
|
78
|
+
nice?: boolean;
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/Axis/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG;IACvB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,KAAK,MAAM,CAAC;IACxD;;;OAGG;IACH,SAAS,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,CAAC;IACtC;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAAC;IAC3B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,UAAU,KAAK,UAAU,CAAC,CAAC;IACpE;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { CartesianChartProps } from './types';
|
|
2
|
+
export declare function CartesianChart({ series, xAxis, yAxis, width, height, inset, axisPadding, ariaLabel, ariaBusy, overlay: htmlOverlay, enableScrubbing, onScrubberPositionChange, animate, magnetRadius, children, }: CartesianChartProps): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=CartesianChart.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["../../../../../src/lib/Components/visualization/CartesianChart/CartesianChart.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAGnD,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,KAAK,EACL,KAAK,EACL,KAAc,EACd,MAAuC,EACvC,KAAK,EACL,WAAW,EACX,SAAmB,EACnB,QAAgB,EAChB,OAAO,EAAE,WAAW,EACpB,eAAuB,EACvB,wBAAwB,EACxB,OAAc,EACd,YAAY,EACZ,QAAQ,GACT,EAAE,mBAAmB,2CAuGrB"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { jsx as r, jsxs as k, Fragment as O } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as h, useState as B, useCallback as E, useEffect as F, useMemo as b } from "react";
|
|
3
|
+
import { chartConfig as H } from "../config.js";
|
|
4
|
+
import { ScrubberProvider as V } from "../Scrubber/ScrubberProvider.js";
|
|
5
|
+
import { resolveInset as q, resolveAxisPadding as D } from "./utils.js";
|
|
6
|
+
import { useBuildChartContext as G } from "./context/useBuildChartContext.js";
|
|
7
|
+
import { CartesianChartProvider as J } from "./context/cartesianChartContext.js";
|
|
8
|
+
import { MagneticPointsProvider as K } from "../Point/pointContext/MagneticPointsProvider.js";
|
|
9
|
+
import { RevealAnimationProvider as L } from "./RevealAnimation/RevealAnimationProvider.js";
|
|
10
|
+
function $({
|
|
11
|
+
series: d,
|
|
12
|
+
xAxis: y,
|
|
13
|
+
yAxis: C,
|
|
14
|
+
width: e = "100%",
|
|
15
|
+
height: n = H.root.defaultHeight,
|
|
16
|
+
inset: l,
|
|
17
|
+
axisPadding: c,
|
|
18
|
+
ariaLabel: g = "Chart",
|
|
19
|
+
ariaBusy: x = !1,
|
|
20
|
+
overlay: R,
|
|
21
|
+
enableScrubbing: s = !1,
|
|
22
|
+
onScrubberPositionChange: P,
|
|
23
|
+
animate: A = !0,
|
|
24
|
+
magnetRadius: w,
|
|
25
|
+
children: M
|
|
26
|
+
}) {
|
|
27
|
+
const a = h(null), v = h(null), [W, z] = B(
|
|
28
|
+
typeof e == "number" ? e : void 0
|
|
29
|
+
), t = typeof e != "number", f = E((i) => {
|
|
30
|
+
const [p] = i;
|
|
31
|
+
p && z(p.contentRect.width);
|
|
32
|
+
}, []);
|
|
33
|
+
F(() => {
|
|
34
|
+
if (!t || !a.current || typeof ResizeObserver > "u")
|
|
35
|
+
return;
|
|
36
|
+
const i = new ResizeObserver(f);
|
|
37
|
+
return i.observe(a.current), () => i.disconnect();
|
|
38
|
+
}, [t, f]);
|
|
39
|
+
const o = typeof e == "number" ? e : W ?? 0, m = o > 0 ? o : 0, I = b(() => q(l), [l]), j = b(
|
|
40
|
+
() => D(c),
|
|
41
|
+
[c]
|
|
42
|
+
), u = G({
|
|
43
|
+
series: d,
|
|
44
|
+
xAxis: y,
|
|
45
|
+
yAxis: C,
|
|
46
|
+
width: m,
|
|
47
|
+
height: n,
|
|
48
|
+
inset: I,
|
|
49
|
+
axisPadding: j
|
|
50
|
+
});
|
|
51
|
+
return /* @__PURE__ */ r(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
ref: t ? a : void 0,
|
|
55
|
+
"data-testid": "chart-container",
|
|
56
|
+
style: {
|
|
57
|
+
width: t ? e : o,
|
|
58
|
+
height: n,
|
|
59
|
+
overflow: "visible",
|
|
60
|
+
position: "relative"
|
|
61
|
+
},
|
|
62
|
+
children: o > 0 && /* @__PURE__ */ k(O, { children: [
|
|
63
|
+
/* @__PURE__ */ r(
|
|
64
|
+
"svg",
|
|
65
|
+
{
|
|
66
|
+
ref: v,
|
|
67
|
+
"data-testid": "chart-svg",
|
|
68
|
+
width: m,
|
|
69
|
+
height: n,
|
|
70
|
+
role: "img",
|
|
71
|
+
"aria-label": g || "Chart",
|
|
72
|
+
"aria-busy": x || void 0,
|
|
73
|
+
tabIndex: s ? 0 : void 0,
|
|
74
|
+
style: {
|
|
75
|
+
display: "block",
|
|
76
|
+
overflow: "visible",
|
|
77
|
+
position: "relative",
|
|
78
|
+
outline: s ? "none" : void 0
|
|
79
|
+
},
|
|
80
|
+
children: /* @__PURE__ */ r(J, { value: u, children: /* @__PURE__ */ r(K, { children: /* @__PURE__ */ r(
|
|
81
|
+
V,
|
|
82
|
+
{
|
|
83
|
+
svgRef: v,
|
|
84
|
+
enableScrubbing: s,
|
|
85
|
+
onScrubberPositionChange: P,
|
|
86
|
+
magnetRadius: w,
|
|
87
|
+
children: /* @__PURE__ */ r(
|
|
88
|
+
L,
|
|
89
|
+
{
|
|
90
|
+
drawingArea: u.drawingArea,
|
|
91
|
+
series: d,
|
|
92
|
+
animate: A,
|
|
93
|
+
children: M
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
) }) })
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
R
|
|
101
|
+
] })
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
export {
|
|
106
|
+
$ as CartesianChart
|
|
107
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
type ChartEmptyLabelProps = PropsWithChildren;
|
|
3
|
+
/**
|
|
4
|
+
* Centred HTML overlay label shown when a chart has no data (and is not
|
|
5
|
+
* loading). Rendered through the `overlay` prop of `CartesianChart` so it shares
|
|
6
|
+
* the chart's positioned container and aligns with the chart footprint. Shared
|
|
7
|
+
* across cartesian charts.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ChartEmptyLabel({ children }: Readonly<ChartEmptyLabelProps>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=ChartEmptyLabel.d.ts.map
|
package/dist/lib/Components/visualization/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartEmptyLabel.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/visualization/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,KAAK,oBAAoB,GAAG,iBAAiB,CAAC;AAE9C;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAAE,QAAQ,EAAE,EAAE,QAAQ,CAAC,oBAAoB,CAAC,2CAc3E"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
function n({ children: t }) {
|
|
3
|
+
return /* @__PURE__ */ e(
|
|
4
|
+
"div",
|
|
5
|
+
{
|
|
6
|
+
"aria-hidden": "true",
|
|
7
|
+
className: "pointer-events-none absolute inset-0 flex items-center justify-center",
|
|
8
|
+
children: /* @__PURE__ */ e(
|
|
9
|
+
"span",
|
|
10
|
+
{
|
|
11
|
+
"data-testid": "chart-empty-label",
|
|
12
|
+
className: "animate-fade-in rounded-xs bg-muted px-12 py-6 body-3 text-muted",
|
|
13
|
+
children: t
|
|
14
|
+
}
|
|
15
|
+
)
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
n as ChartEmptyLabel
|
|
21
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RevealAnimationProvider.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/visualization/CartesianChart/RevealAnimation/RevealAnimationProvider.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAGpD,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,WAAW,EACX,MAAM,EACN,OAAc,EACd,WAAW,GACZ,EAAE,oBAAoB,2CA2CtB"}
|
package/dist/lib/Components/visualization/CartesianChart/RevealAnimation/RevealAnimationProvider.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as t, Fragment as v, jsxs as y } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as g } from "react";
|
|
3
|
+
import { chartConfig as l } from "../../config.js";
|
|
4
|
+
import { RevealAnimationContext as x } from "./context.js";
|
|
5
|
+
import { useDataFingerprint as P, useRevealAnimation as R } from "./utils.js";
|
|
6
|
+
function C({
|
|
7
|
+
children: n,
|
|
8
|
+
drawingArea: e,
|
|
9
|
+
series: m,
|
|
10
|
+
animate: s = !0,
|
|
11
|
+
transitions: o
|
|
12
|
+
}) {
|
|
13
|
+
const c = !s, d = o?.enter?.duration ?? l.reveal.durationInSeconds, h = o?.enter?.easing ?? l.reveal.easing, f = P(m), { clipId: p, clipPathAttr: r, clipPathAnimation: a, fadeAnimation: i } = R({
|
|
14
|
+
duration: d,
|
|
15
|
+
easing: h,
|
|
16
|
+
drawingArea: e
|
|
17
|
+
}), u = g(
|
|
18
|
+
() => ({
|
|
19
|
+
clipPathAttr: r,
|
|
20
|
+
getPointRevealStyle: i.getPointRevealStyle
|
|
21
|
+
}),
|
|
22
|
+
[r, i]
|
|
23
|
+
);
|
|
24
|
+
return c ? /* @__PURE__ */ t(v, { children: n }) : /* @__PURE__ */ y(x.Provider, { value: u, children: [
|
|
25
|
+
/* @__PURE__ */ t("defs", { children: /* @__PURE__ */ t("clipPath", { id: p, children: /* @__PURE__ */ t(
|
|
26
|
+
"rect",
|
|
27
|
+
{
|
|
28
|
+
x: e.x,
|
|
29
|
+
y: e.y,
|
|
30
|
+
height: e.height,
|
|
31
|
+
width: e.width,
|
|
32
|
+
style: { animation: a.style }
|
|
33
|
+
}
|
|
34
|
+
) }) }),
|
|
35
|
+
/* @__PURE__ */ t("style", { children: `${a.keyframe} ${i.keyframe}` }),
|
|
36
|
+
n
|
|
37
|
+
] }, f);
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
C as RevealAnimationProvider
|
|
41
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { RevealAnimationContextValue } from './types';
|
|
3
|
+
export declare const RevealAnimationContext: import('react').Context<RevealAnimationContextValue | undefined>;
|
|
4
|
+
/**
|
|
5
|
+
* Clip-path attribute for path-based consumers (e.g. `Line`).
|
|
6
|
+
* Returns `undefined` when the reveal animation is disabled.
|
|
7
|
+
*/
|
|
8
|
+
export declare const usePathReveal: () => string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Opacity fade-in style for accessory consumers (e.g. `Point`). Returns
|
|
11
|
+
* `undefined` when the reveal animation is disabled, leaving the consumer fully
|
|
12
|
+
* visible.
|
|
13
|
+
*/
|
|
14
|
+
export declare const usePointReveal: () => CSSProperties | undefined;
|
|
15
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/visualization/CartesianChart/RevealAnimation/context.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAE3D,eAAO,MAAM,sBAAsB,kEAEvB,CAAC;AAEb;;;GAGG;AACH,eAAO,MAAM,aAAa,QAAO,MAAM,GAAG,SAEzC,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,cAAc,QAAO,aAAa,GAAG,SAGjD,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createContext as n, useContext as e, useMemo as r } from "react";
|
|
2
|
+
const o = n(void 0), s = () => e(o)?.clipPathAttr, c = () => {
|
|
3
|
+
const t = e(o);
|
|
4
|
+
return r(() => t?.getPointRevealStyle(), [t]);
|
|
5
|
+
};
|
|
6
|
+
export {
|
|
7
|
+
o as RevealAnimationContext,
|
|
8
|
+
s as usePathReveal,
|
|
9
|
+
c as usePointReveal
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/visualization/CartesianChart/RevealAnimation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { DrawingArea, Series } from '../../utils';
|
|
3
|
+
/**
|
|
4
|
+
* Value shared by the reveal animation provider.
|
|
5
|
+
*
|
|
6
|
+
* - `clipPathAttr` drives the left-to-right clip wipe consumed by path-based
|
|
7
|
+
* components (e.g. `Line`).
|
|
8
|
+
* - `getPointRevealStyle` returns the opacity fade-in style for accessory
|
|
9
|
+
* components (e.g. `Point`) that must not be clipped, so edge content stays
|
|
10
|
+
* visible.
|
|
11
|
+
*/
|
|
12
|
+
export type RevealAnimationContextValue = {
|
|
13
|
+
/**
|
|
14
|
+
* `clip-path` attribute (`url(#id)`) used by the line/area wipe.
|
|
15
|
+
*/
|
|
16
|
+
clipPathAttr: string;
|
|
17
|
+
/**
|
|
18
|
+
* Builds the opacity fade-in style for an accessory (e.g. `Point`) so it
|
|
19
|
+
* reveals without being clipped, keeping edge content visible.
|
|
20
|
+
*/
|
|
21
|
+
getPointRevealStyle: () => CSSProperties;
|
|
22
|
+
};
|
|
23
|
+
export type EnterTransitionConfig = {
|
|
24
|
+
/**
|
|
25
|
+
* Duration in seconds. @default 0.8
|
|
26
|
+
*/
|
|
27
|
+
duration?: number;
|
|
28
|
+
/**
|
|
29
|
+
* CSS easing function. @default 'linear'
|
|
30
|
+
*/
|
|
31
|
+
easing?: string;
|
|
32
|
+
};
|
|
33
|
+
export type RevealAnimationProps = {
|
|
34
|
+
children: ReactNode;
|
|
35
|
+
/**
|
|
36
|
+
* The drawing area whose bounds define the clip rectangle.
|
|
37
|
+
*/
|
|
38
|
+
drawingArea: DrawingArea;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to animate the chart.
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
animate?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Transition configuration.
|
|
46
|
+
* @default { enter: { duration: 0.8, easing: 'linear' } }
|
|
47
|
+
*/
|
|
48
|
+
transitions?: {
|
|
49
|
+
enter?: EnterTransitionConfig;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Data series used to compute a fingerprint that restarts
|
|
53
|
+
* the animation when data changes.
|
|
54
|
+
*/
|
|
55
|
+
series: Series[];
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/visualization/CartesianChart/RevealAnimation/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAEvD;;;;;;;;GAQG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,mBAAmB,EAAE,MAAM,aAAa,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,qBAAqB,CAAA;KAAE,CAAC;IAChD;;;OAGG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
import { DrawingArea, Series } from '../../utils/types';
|
|
3
|
+
type RevealAnimationConfig = {
|
|
4
|
+
duration: number;
|
|
5
|
+
easing: string;
|
|
6
|
+
drawingArea: DrawingArea;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Creates the reveal animation for the chart.
|
|
10
|
+
* It returns
|
|
11
|
+
* - the clip id
|
|
12
|
+
* - the clip path animation
|
|
13
|
+
* - and the fade animation.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useRevealAnimation: ({ duration, easing, drawingArea, }: RevealAnimationConfig) => {
|
|
16
|
+
clipId: string;
|
|
17
|
+
clipPathAttr: string;
|
|
18
|
+
clipPathAnimation: {
|
|
19
|
+
keyframe: string;
|
|
20
|
+
style: string;
|
|
21
|
+
};
|
|
22
|
+
fadeAnimation: {
|
|
23
|
+
keyframe: string;
|
|
24
|
+
getPointRevealStyle: () => CSSProperties;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Stable signature of every series' data points, memoized on the `series`
|
|
29
|
+
* reference. Used to key the reveal provider so the reveal animation only
|
|
30
|
+
* replays when the underlying data actually changes — not on unrelated
|
|
31
|
+
* re-renders such as scrubbing or hover.
|
|
32
|
+
*/
|
|
33
|
+
export declare const useDataFingerprint: (series: Series[]) => string;
|
|
34
|
+
export {};
|
|
35
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/visualization/CartesianChart/RevealAnimation/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAG3C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAI7D,KAAK,qBAAqB,GAAG;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAAI,oCAIhC,qBAAqB;;;;;;;;;mCA2CO,aAAa;;CAnB3C,CAAC;AA2DF;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,MAAM,EAAE,KAAG,MAKrD,CAAC"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { useMemo as r, useId as m } from "react";
|
|
2
|
+
import { chartConfig as c } from "../../config.js";
|
|
3
|
+
const { reveal: l } = c, A = ({
|
|
4
|
+
duration: a,
|
|
5
|
+
easing: t,
|
|
6
|
+
drawingArea: o
|
|
7
|
+
}) => {
|
|
8
|
+
const e = m(), n = s({
|
|
9
|
+
clipId: e,
|
|
10
|
+
duration: a,
|
|
11
|
+
easing: t
|
|
12
|
+
}), i = p({
|
|
13
|
+
clipId: e,
|
|
14
|
+
duration: a,
|
|
15
|
+
easing: t,
|
|
16
|
+
drawingArea: o
|
|
17
|
+
});
|
|
18
|
+
return r(
|
|
19
|
+
() => ({
|
|
20
|
+
clipId: e,
|
|
21
|
+
clipPathAttr: `url(#${e})`,
|
|
22
|
+
clipPathAnimation: i,
|
|
23
|
+
fadeAnimation: n
|
|
24
|
+
}),
|
|
25
|
+
[e, i, n]
|
|
26
|
+
);
|
|
27
|
+
}, s = ({
|
|
28
|
+
clipId: a,
|
|
29
|
+
duration: t,
|
|
30
|
+
easing: o
|
|
31
|
+
}) => {
|
|
32
|
+
const e = `reveal-fade-${a.replaceAll(":", "")}`;
|
|
33
|
+
return r(
|
|
34
|
+
() => ({
|
|
35
|
+
keyframe: `@keyframes ${e} { from { opacity: 0; } to { opacity: 1; } }`,
|
|
36
|
+
getPointRevealStyle: () => {
|
|
37
|
+
const n = Math.max(
|
|
38
|
+
0,
|
|
39
|
+
t + l.pointFadeInAfterClipInSeconds
|
|
40
|
+
);
|
|
41
|
+
return {
|
|
42
|
+
animation: `${e} ${l.pointFadeDurationInSeconds}s ${o} ${n}s both`
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
}),
|
|
46
|
+
[t, o, e]
|
|
47
|
+
);
|
|
48
|
+
}, p = ({
|
|
49
|
+
clipId: a,
|
|
50
|
+
duration: t,
|
|
51
|
+
easing: o,
|
|
52
|
+
drawingArea: e
|
|
53
|
+
}) => {
|
|
54
|
+
const n = `reveal-clip-${a.replaceAll(":", "")}`, i = e.width;
|
|
55
|
+
return r(
|
|
56
|
+
() => ({
|
|
57
|
+
keyframe: `@keyframes ${n} { from { width: 0; } to { width: ${i}px; } }`,
|
|
58
|
+
style: `${n} ${t}s ${o} forwards`
|
|
59
|
+
}),
|
|
60
|
+
[n, t, o, i]
|
|
61
|
+
);
|
|
62
|
+
}, $ = (a) => r(
|
|
63
|
+
() => a.map((t) => t.data?.join(",") ?? "").join("|"),
|
|
64
|
+
[a]
|
|
65
|
+
);
|
|
66
|
+
export {
|
|
67
|
+
$ as useDataFingerprint,
|
|
68
|
+
A as useRevealAnimation
|
|
69
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { CartesianChartContextValue } from '../types';
|
|
2
|
+
declare const CartesianChartProvider: import('react').FC<{
|
|
3
|
+
children: import('react').ReactNode;
|
|
4
|
+
value: CartesianChartContextValue;
|
|
5
|
+
}>;
|
|
6
|
+
export declare const useCartesianChartContext: () => CartesianChartContextValue;
|
|
7
|
+
export { CartesianChartProvider };
|
|
8
|
+
//# sourceMappingURL=cartesianChartContext.d.ts.map
|
package/dist/lib/Components/visualization/CartesianChart/context/cartesianChartContext.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cartesianChartContext.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/visualization/CartesianChart/context/cartesianChartContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAE3D,QAAA,MAAO,sBAAsB;;;EACoC,CAAC;AAElE,eAAO,MAAM,wBAAwB,kCAIjC,CAAC;AAEL,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createSafeContext as t } from "../../../../../libs/utils-shared/dist/index.js";
|
|
2
|
+
const [r, e] = t("CartesianChart"), C = () => e({
|
|
3
|
+
consumerName: "useCartesianChartContext",
|
|
4
|
+
contextRequired: !0
|
|
5
|
+
});
|
|
6
|
+
export {
|
|
7
|
+
r as CartesianChartProvider,
|
|
8
|
+
C as useCartesianChartContext
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/visualization/CartesianChart/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AxisBounds, BaseAxisProps } from '../../Axis';
|
|
2
|
+
import { ChartInset, ChartScaleFunction, DrawingArea, Series } from '../../utils/types';
|
|
3
|
+
import { CartesianChartContextValue } from '../types';
|
|
4
|
+
type UseBuildChartContextParams = {
|
|
5
|
+
series: Series[];
|
|
6
|
+
xAxis?: Partial<BaseAxisProps>;
|
|
7
|
+
yAxis?: Partial<BaseAxisProps>;
|
|
8
|
+
width: number;
|
|
9
|
+
height: number;
|
|
10
|
+
inset: ChartInset;
|
|
11
|
+
axisPadding: ChartInset;
|
|
12
|
+
};
|
|
13
|
+
type AxisRange = {
|
|
14
|
+
min: number;
|
|
15
|
+
max: number;
|
|
16
|
+
};
|
|
17
|
+
export declare const computeAxisRange: (drawingArea: DrawingArea) => {
|
|
18
|
+
xRange: AxisRange;
|
|
19
|
+
yRange: AxisRange;
|
|
20
|
+
};
|
|
21
|
+
export declare const buildScale: (domain: AxisBounds, range: AxisRange, scaleType?: BaseAxisProps["scaleType"], nice?: boolean) => ChartScaleFunction;
|
|
22
|
+
export declare const computeDrawingArea: (width: number, height: number, inset: ChartInset, axisPadding: ChartInset) => DrawingArea;
|
|
23
|
+
export declare const useBuildChartContext: ({ series, xAxis, yAxis, width, height, inset, axisPadding, }: UseBuildChartContextParams) => CartesianChartContextValue;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=useBuildChartContext.d.ts.map
|
package/dist/lib/Components/visualization/CartesianChart/context/useBuildChartContext.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBuildChartContext.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/visualization/CartesianChart/context/useBuildChartContext.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAW5D,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,MAAM,EACP,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,UAAU,CAAC;AAE3D,KAAK,0BAA0B,GAAG;IAChC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,OAAO,CAAC,aAAa,CAAC,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,UAAU,CAAC;IAClB,WAAW,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,KAAK,SAAS,GAAG;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAE9C,eAAO,MAAM,gBAAgB,GAC3B,aAAa,WAAW,KACvB;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,MAAM,EAAE,SAAS,CAAA;CAMvC,CAAC;AAEH,eAAO,MAAM,UAAU,GACrB,QAAQ,UAAU,EAClB,OAAO,SAAS,EAChB,YAAW,aAAa,CAAC,WAAW,CAAY,EAChD,OAAO,OAAO,KACb,kBAGsD,CAAC;AAE1D,eAAO,MAAM,kBAAkB,GAC7B,OAAO,MAAM,EACb,QAAQ,MAAM,EACd,OAAO,UAAU,EACjB,aAAa,UAAU,KACtB,WAaF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,8DAQlC,0BAA0B,KAAG,0BAiC/B,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { useMemo as u } from "react";
|
|
2
|
+
import { computeXDomain as y, computeYDomain as C, computeDataLength as M } from "../../utils/domain/domain.js";
|
|
3
|
+
import { getCategoricalScale as R, getNumericScale as _, isBandScaleType as X } from "../../utils/scales/scales.js";
|
|
4
|
+
const Y = (t) => ({
|
|
5
|
+
xRange: { min: t.x, max: t.x + t.width },
|
|
6
|
+
yRange: {
|
|
7
|
+
min: t.y + t.height,
|
|
8
|
+
max: t.y
|
|
9
|
+
}
|
|
10
|
+
}), f = (t, e, o = "linear", c) => X(o) ? R({ domain: t, range: e }) : _({ scaleType: o, domain: t, range: e, nice: c }), B = (t, e, o, c) => {
|
|
11
|
+
const m = {
|
|
12
|
+
top: o.top + c.top,
|
|
13
|
+
right: o.right + c.right,
|
|
14
|
+
bottom: o.bottom + c.bottom,
|
|
15
|
+
left: o.left + c.left
|
|
16
|
+
};
|
|
17
|
+
return {
|
|
18
|
+
x: m.left,
|
|
19
|
+
y: m.top,
|
|
20
|
+
width: Math.max(0, t - m.left - m.right),
|
|
21
|
+
height: Math.max(0, e - m.top - m.bottom)
|
|
22
|
+
};
|
|
23
|
+
}, N = ({
|
|
24
|
+
series: t,
|
|
25
|
+
xAxis: e,
|
|
26
|
+
yAxis: o,
|
|
27
|
+
width: c,
|
|
28
|
+
height: m,
|
|
29
|
+
inset: l,
|
|
30
|
+
axisPadding: p
|
|
31
|
+
}) => {
|
|
32
|
+
const a = u(
|
|
33
|
+
() => B(c, m, l, p),
|
|
34
|
+
[c, m, l, p]
|
|
35
|
+
);
|
|
36
|
+
return u(() => {
|
|
37
|
+
const { xRange: r, yRange: S } = Y(a);
|
|
38
|
+
let h, g;
|
|
39
|
+
if (a.width > 0 && a.height > 0) {
|
|
40
|
+
const n = y(t, e), b = C(t, o);
|
|
41
|
+
h = f(n, r, e?.scaleType, e?.nice), g = f(b, S, o?.scaleType, o?.nice);
|
|
42
|
+
}
|
|
43
|
+
const i = M(t, e), D = new Map(t.map((n) => [n.id, n]));
|
|
44
|
+
return {
|
|
45
|
+
series: t,
|
|
46
|
+
seriesMap: D,
|
|
47
|
+
getXScale: (n) => h,
|
|
48
|
+
getYScale: (n) => g,
|
|
49
|
+
getXAxisConfig: (n) => e,
|
|
50
|
+
getYAxisConfig: (n) => o,
|
|
51
|
+
drawingArea: a,
|
|
52
|
+
dataLength: i
|
|
53
|
+
};
|
|
54
|
+
}, [t, e, o, a]);
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
f as buildScale,
|
|
58
|
+
Y as computeAxisRange,
|
|
59
|
+
B as computeDrawingArea,
|
|
60
|
+
N as useBuildChartContext
|
|
61
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
type ShimmerAnimationResult = {
|
|
2
|
+
/**
|
|
3
|
+
* Value for the CSS `animation` shorthand, applied via `style` on the
|
|
4
|
+
* element that should shimmer.
|
|
5
|
+
*/
|
|
6
|
+
animationStyle: string;
|
|
7
|
+
/**
|
|
8
|
+
* `@keyframes` definition to inject inside an SVG `<style>` element.
|
|
9
|
+
*/
|
|
10
|
+
keyframe: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Self-contained shimmer (opacity pulse) for SVG content. Shared by the initial
|
|
14
|
+
* loading placeholder and the transition-loading line.
|
|
15
|
+
*/
|
|
16
|
+
export declare const useShimmerAnimation: () => ShimmerAnimationResult;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=useShimmerAnimation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useShimmerAnimation.d.ts","sourceRoot":"","sources":["../../../../../../src/lib/Components/visualization/CartesianChart/hooks/useShimmerAnimation.ts"],"names":[],"mappings":"AAMA,KAAK,sBAAsB,GAAG;IAC5B;;;OAGG;IACH,cAAc,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAAO,sBAatC,CAAC"}
|