@coinbase/cds-mobile-visualization 3.8.1 → 4.0.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 +8 -0
- package/dts/chart/index.d.ts +1 -15
- package/dts/chart/index.d.ts.map +1 -1
- package/dts/index.d.ts.map +1 -1
- package/dts/sparkline/index.d.ts +1 -5
- package/dts/sparkline/index.d.ts.map +1 -1
- package/esm/chart/index.js +1 -17
- package/esm/index.js +1 -3
- package/esm/sparkline/index.js +1 -5
- package/package.json +26 -20
- package/dts/chart/CartesianChart.d.ts +0 -206
- package/dts/chart/CartesianChart.d.ts.map +0 -1
- package/dts/chart/ChartContextBridge.d.ts +0 -28
- package/dts/chart/ChartContextBridge.d.ts.map +0 -1
- package/dts/chart/ChartProvider.d.ts +0 -9
- package/dts/chart/ChartProvider.d.ts.map +0 -1
- package/dts/chart/Path.d.ts +0 -121
- package/dts/chart/Path.d.ts.map +0 -1
- package/dts/chart/PeriodSelector.d.ts +0 -100
- package/dts/chart/PeriodSelector.d.ts.map +0 -1
- package/dts/chart/area/Area.d.ts +0 -83
- package/dts/chart/area/Area.d.ts.map +0 -1
- package/dts/chart/area/AreaChart.d.ts +0 -155
- package/dts/chart/area/AreaChart.d.ts.map +0 -1
- package/dts/chart/area/DottedArea.d.ts +0 -46
- package/dts/chart/area/DottedArea.d.ts.map +0 -1
- package/dts/chart/area/GradientArea.d.ts +0 -36
- package/dts/chart/area/GradientArea.d.ts.map +0 -1
- package/dts/chart/area/SolidArea.d.ts +0 -23
- package/dts/chart/area/SolidArea.d.ts.map +0 -1
- package/dts/chart/area/index.d.ts +0 -6
- package/dts/chart/area/index.d.ts.map +0 -1
- package/dts/chart/axis/Axis.d.ts +0 -174
- package/dts/chart/axis/Axis.d.ts.map +0 -1
- package/dts/chart/axis/DefaultAxisTickLabel.d.ts +0 -8
- package/dts/chart/axis/DefaultAxisTickLabel.d.ts.map +0 -1
- package/dts/chart/axis/XAxis.d.ts +0 -22
- package/dts/chart/axis/XAxis.d.ts.map +0 -1
- package/dts/chart/axis/YAxis.d.ts +0 -22
- package/dts/chart/axis/YAxis.d.ts.map +0 -1
- package/dts/chart/axis/index.d.ts +0 -5
- package/dts/chart/axis/index.d.ts.map +0 -1
- package/dts/chart/bar/Bar.d.ts +0 -100
- package/dts/chart/bar/Bar.d.ts.map +0 -1
- package/dts/chart/bar/BarChart.d.ts +0 -158
- package/dts/chart/bar/BarChart.d.ts.map +0 -1
- package/dts/chart/bar/BarPlot.d.ts +0 -31
- package/dts/chart/bar/BarPlot.d.ts.map +0 -1
- package/dts/chart/bar/BarStack.d.ts +0 -127
- package/dts/chart/bar/BarStack.d.ts.map +0 -1
- package/dts/chart/bar/BarStackGroup.d.ts +0 -37
- package/dts/chart/bar/BarStackGroup.d.ts.map +0 -1
- package/dts/chart/bar/DefaultBar.d.ts +0 -7
- package/dts/chart/bar/DefaultBar.d.ts.map +0 -1
- package/dts/chart/bar/DefaultBarStack.d.ts +0 -7
- package/dts/chart/bar/DefaultBarStack.d.ts.map +0 -1
- package/dts/chart/bar/PercentageBarChart.d.ts +0 -106
- package/dts/chart/bar/PercentageBarChart.d.ts.map +0 -1
- package/dts/chart/bar/index.d.ts +0 -9
- package/dts/chart/bar/index.d.ts.map +0 -1
- package/dts/chart/gradient/Gradient.d.ts +0 -41
- package/dts/chart/gradient/Gradient.d.ts.map +0 -1
- package/dts/chart/gradient/index.d.ts +0 -2
- package/dts/chart/gradient/index.d.ts.map +0 -1
- package/dts/chart/legend/DefaultLegendEntry.d.ts +0 -5
- package/dts/chart/legend/DefaultLegendEntry.d.ts.map +0 -1
- package/dts/chart/legend/DefaultLegendShape.d.ts +0 -5
- package/dts/chart/legend/DefaultLegendShape.d.ts.map +0 -1
- package/dts/chart/legend/Legend.d.ts +0 -168
- package/dts/chart/legend/Legend.d.ts.map +0 -1
- package/dts/chart/legend/index.d.ts +0 -4
- package/dts/chart/legend/index.d.ts.map +0 -1
- package/dts/chart/line/DefaultReferenceLineLabel.d.ts +0 -9
- package/dts/chart/line/DefaultReferenceLineLabel.d.ts.map +0 -1
- package/dts/chart/line/DottedLine.d.ts +0 -20
- package/dts/chart/line/DottedLine.d.ts.map +0 -1
- package/dts/chart/line/Line.d.ts +0 -122
- package/dts/chart/line/Line.d.ts.map +0 -1
- package/dts/chart/line/LineChart.d.ts +0 -135
- package/dts/chart/line/LineChart.d.ts.map +0 -1
- package/dts/chart/line/ReferenceLine.d.ts +0 -140
- package/dts/chart/line/ReferenceLine.d.ts.map +0 -1
- package/dts/chart/line/SolidLine.d.ts +0 -15
- package/dts/chart/line/SolidLine.d.ts.map +0 -1
- package/dts/chart/line/index.d.ts +0 -7
- package/dts/chart/line/index.d.ts.map +0 -1
- package/dts/chart/point/DefaultPointLabel.d.ts +0 -10
- package/dts/chart/point/DefaultPointLabel.d.ts.map +0 -1
- package/dts/chart/point/Point.d.ts +0 -144
- package/dts/chart/point/Point.d.ts.map +0 -1
- package/dts/chart/point/index.d.ts +0 -3
- package/dts/chart/point/index.d.ts.map +0 -1
- package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts +0 -38
- package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts.map +0 -1
- package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts +0 -12
- package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts.map +0 -1
- package/dts/chart/scrubber/DefaultScrubberLabel.d.ts +0 -12
- package/dts/chart/scrubber/DefaultScrubberLabel.d.ts.map +0 -1
- package/dts/chart/scrubber/Scrubber.d.ts +0 -302
- package/dts/chart/scrubber/Scrubber.d.ts.map +0 -1
- package/dts/chart/scrubber/ScrubberAccessibilityView.d.ts +0 -12
- package/dts/chart/scrubber/ScrubberAccessibilityView.d.ts.map +0 -1
- package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts +0 -54
- package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts.map +0 -1
- package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts +0 -46
- package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts.map +0 -1
- package/dts/chart/scrubber/ScrubberProvider.d.ts +0 -20
- package/dts/chart/scrubber/ScrubberProvider.d.ts.map +0 -1
- package/dts/chart/scrubber/index.d.ts +0 -5
- package/dts/chart/scrubber/index.d.ts.map +0 -1
- package/dts/chart/text/ChartText.d.ts +0 -164
- package/dts/chart/text/ChartText.d.ts.map +0 -1
- package/dts/chart/text/ChartTextGroup.d.ts +0 -61
- package/dts/chart/text/ChartTextGroup.d.ts.map +0 -1
- package/dts/chart/text/index.d.ts +0 -3
- package/dts/chart/text/index.d.ts.map +0 -1
- package/dts/chart/utils/axis.d.ts +0 -387
- package/dts/chart/utils/axis.d.ts.map +0 -1
- package/dts/chart/utils/bar.d.ts +0 -225
- package/dts/chart/utils/bar.d.ts.map +0 -1
- package/dts/chart/utils/chart.d.ts +0 -165
- package/dts/chart/utils/chart.d.ts.map +0 -1
- package/dts/chart/utils/context.d.ts +0 -131
- package/dts/chart/utils/context.d.ts.map +0 -1
- package/dts/chart/utils/gradient.d.ts +0 -129
- package/dts/chart/utils/gradient.d.ts.map +0 -1
- package/dts/chart/utils/index.d.ts +0 -11
- package/dts/chart/utils/index.d.ts.map +0 -1
- package/dts/chart/utils/path.d.ts +0 -186
- package/dts/chart/utils/path.d.ts.map +0 -1
- package/dts/chart/utils/point.d.ts +0 -146
- package/dts/chart/utils/point.d.ts.map +0 -1
- package/dts/chart/utils/scale.d.ts +0 -145
- package/dts/chart/utils/scale.d.ts.map +0 -1
- package/dts/chart/utils/scrubber.d.ts +0 -40
- package/dts/chart/utils/scrubber.d.ts.map +0 -1
- package/dts/chart/utils/transition.d.ts +0 -181
- package/dts/chart/utils/transition.d.ts.map +0 -1
- package/dts/sparkline/Counter.d.ts +0 -8
- package/dts/sparkline/Counter.d.ts.map +0 -1
- package/dts/sparkline/Sparkline.d.ts +0 -74
- package/dts/sparkline/Sparkline.d.ts.map +0 -1
- package/dts/sparkline/SparklineArea.d.ts +0 -15
- package/dts/sparkline/SparklineArea.d.ts.map +0 -1
- package/dts/sparkline/SparklineAreaPattern.d.ts +0 -14
- package/dts/sparkline/SparklineAreaPattern.d.ts.map +0 -1
- package/dts/sparkline/SparklineGradient.d.ts +0 -24
- package/dts/sparkline/SparklineGradient.d.ts.map +0 -1
- package/dts/sparkline/__figma__/Sparkline.figma.d.ts +0 -2
- package/dts/sparkline/__figma__/Sparkline.figma.d.ts.map +0 -1
- package/dts/sparkline/generateSparklineWithId.d.ts +0 -11
- package/dts/sparkline/generateSparklineWithId.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/SparklineAccessibleView.d.ts +0 -23
- package/dts/sparkline/sparkline-interactive/SparklineAccessibleView.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts +0 -185
- package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.d.ts +0 -25
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveHoverDate.d.ts +0 -28
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveHoverDate.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveLineVertical.d.ts +0 -13
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveLineVertical.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.d.ts +0 -17
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveMinMax.d.ts +0 -11
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveMinMax.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractivePanGestureHandler.d.ts +0 -26
- package/dts/sparkline/sparkline-interactive/SparklineInteractivePanGestureHandler.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractivePaths.d.ts +0 -25
- package/dts/sparkline/sparkline-interactive/SparklineInteractivePaths.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractivePeriodSelector.d.ts +0 -25
- package/dts/sparkline/sparkline-interactive/SparklineInteractivePeriodSelector.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveProvider.d.ts +0 -39
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveProvider.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveTimeseriesPaths.d.ts +0 -31
- package/dts/sparkline/sparkline-interactive/SparklineInteractiveTimeseriesPaths.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.d.ts +0 -2
- package/dts/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/useInterruptiblePathAnimation.d.ts +0 -13
- package/dts/sparkline/sparkline-interactive/useInterruptiblePathAnimation.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/useMinMaxTransform.d.ts +0 -16
- package/dts/sparkline/sparkline-interactive/useMinMaxTransform.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/useOpacityAnimation.d.ts +0 -6
- package/dts/sparkline/sparkline-interactive/useOpacityAnimation.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/useSparklineInteractiveConstants.d.ts +0 -22
- package/dts/sparkline/sparkline-interactive/useSparklineInteractiveConstants.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive/useSparklineInteractiveLineStyles.d.ts +0 -34
- package/dts/sparkline/sparkline-interactive/useSparklineInteractiveLineStyles.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive-header/SparklineInteractiveHeader.d.ts +0 -118
- package/dts/sparkline/sparkline-interactive-header/SparklineInteractiveHeader.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.d.ts +0 -2
- package/dts/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.d.ts.map +0 -1
- package/dts/sparkline/sparkline-interactive-header/useSparklineInteractiveHeaderStyles.d.ts +0 -29
- package/dts/sparkline/sparkline-interactive-header/useSparklineInteractiveHeaderStyles.d.ts.map +0 -1
- package/esm/chart/CartesianChart.js +0 -431
- package/esm/chart/ChartContextBridge.js +0 -159
- package/esm/chart/ChartProvider.js +0 -10
- package/esm/chart/Path.js +0 -255
- package/esm/chart/PeriodSelector.js +0 -139
- package/esm/chart/__stories__/CartesianChart.stories.js +0 -659
- package/esm/chart/__stories__/ChartAccessibility.stories.js +0 -721
- package/esm/chart/__stories__/ChartTransitions.stories.js +0 -693
- package/esm/chart/__stories__/PeriodSelector.stories.js +0 -420
- package/esm/chart/area/Area.js +0 -85
- package/esm/chart/area/AreaChart.js +0 -152
- package/esm/chart/area/DottedArea.js +0 -92
- package/esm/chart/area/GradientArea.js +0 -63
- package/esm/chart/area/SolidArea.js +0 -45
- package/esm/chart/area/__stories__/AreaChart.stories.js +0 -370
- package/esm/chart/area/index.js +0 -7
- package/esm/chart/axis/Axis.js +0 -9
- package/esm/chart/axis/DefaultAxisTickLabel.js +0 -11
- package/esm/chart/axis/XAxis.js +0 -256
- package/esm/chart/axis/YAxis.js +0 -255
- package/esm/chart/axis/__stories__/Axis.stories.js +0 -552
- package/esm/chart/axis/index.js +0 -6
- package/esm/chart/bar/Bar.js +0 -71
- package/esm/chart/bar/BarChart.js +0 -122
- package/esm/chart/bar/BarPlot.js +0 -106
- package/esm/chart/bar/BarStack.js +0 -173
- package/esm/chart/bar/BarStackGroup.js +0 -89
- package/esm/chart/bar/DefaultBar.js +0 -79
- package/esm/chart/bar/DefaultBarStack.js +0 -68
- package/esm/chart/bar/PercentageBarChart.js +0 -99
- package/esm/chart/bar/__stories__/BarChart.stories.js +0 -1417
- package/esm/chart/bar/__stories__/PercentageBarChart.stories.js +0 -833
- package/esm/chart/bar/index.js +0 -10
- package/esm/chart/gradient/Gradient.js +0 -156
- package/esm/chart/gradient/index.js +0 -1
- package/esm/chart/legend/DefaultLegendEntry.js +0 -42
- package/esm/chart/legend/DefaultLegendShape.js +0 -64
- package/esm/chart/legend/Legend.js +0 -59
- package/esm/chart/legend/__stories__/Legend.stories.js +0 -574
- package/esm/chart/legend/index.js +0 -3
- package/esm/chart/line/DefaultReferenceLineLabel.js +0 -66
- package/esm/chart/line/DottedLine.js +0 -57
- package/esm/chart/line/Line.js +0 -180
- package/esm/chart/line/LineChart.js +0 -149
- package/esm/chart/line/ReferenceLine.js +0 -132
- package/esm/chart/line/SolidLine.js +0 -53
- package/esm/chart/line/__stories__/LineChart.stories.js +0 -2018
- package/esm/chart/line/__stories__/ReferenceLine.stories.js +0 -226
- package/esm/chart/line/index.js +0 -8
- package/esm/chart/point/DefaultPointLabel.js +0 -39
- package/esm/chart/point/Point.js +0 -187
- package/esm/chart/point/index.js +0 -2
- package/esm/chart/scrubber/DefaultScrubberBeacon.js +0 -182
- package/esm/chart/scrubber/DefaultScrubberBeaconLabel.js +0 -43
- package/esm/chart/scrubber/DefaultScrubberLabel.js +0 -44
- package/esm/chart/scrubber/Scrubber.js +0 -198
- package/esm/chart/scrubber/ScrubberAccessibilityView.js +0 -177
- package/esm/chart/scrubber/ScrubberBeaconGroup.js +0 -169
- package/esm/chart/scrubber/ScrubberBeaconLabelGroup.js +0 -212
- package/esm/chart/scrubber/ScrubberProvider.js +0 -140
- package/esm/chart/scrubber/__stories__/Scrubber.stories.js +0 -946
- package/esm/chart/scrubber/index.js +0 -4
- package/esm/chart/text/ChartText.js +0 -305
- package/esm/chart/text/ChartTextGroup.js +0 -211
- package/esm/chart/text/index.js +0 -4
- package/esm/chart/utils/axis.js +0 -664
- package/esm/chart/utils/bar.js +0 -906
- package/esm/chart/utils/chart.js +0 -329
- package/esm/chart/utils/context.js +0 -22
- package/esm/chart/utils/gradient.js +0 -319
- package/esm/chart/utils/index.js +0 -12
- package/esm/chart/utils/path.js +0 -304
- package/esm/chart/utils/point.js +0 -282
- package/esm/chart/utils/scale.js +0 -288
- package/esm/chart/utils/scrubber.js +0 -146
- package/esm/chart/utils/transition.js +0 -241
- package/esm/sparkline/Counter.js +0 -45
- package/esm/sparkline/Sparkline.js +0 -165
- package/esm/sparkline/SparklineArea.js +0 -20
- package/esm/sparkline/SparklineAreaPattern.js +0 -38
- package/esm/sparkline/SparklineGradient.js +0 -77
- package/esm/sparkline/__figma__/Sparkline.figma.js +0 -22
- package/esm/sparkline/__stories__/Sparkline.stories.js +0 -124
- package/esm/sparkline/__stories__/SparklineGradient.stories.js +0 -126
- package/esm/sparkline/generateSparklineWithId.js +0 -7
- package/esm/sparkline/sparkline-interactive/SparklineAccessibleView.js +0 -75
- package/esm/sparkline/sparkline-interactive/SparklineInteractive.js +0 -308
- package/esm/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.js +0 -116
- package/esm/sparkline/sparkline-interactive/SparklineInteractiveHoverDate.js +0 -131
- package/esm/sparkline/sparkline-interactive/SparklineInteractiveLineVertical.js +0 -99
- package/esm/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.js +0 -82
- package/esm/sparkline/sparkline-interactive/SparklineInteractiveMinMax.js +0 -103
- package/esm/sparkline/sparkline-interactive/SparklineInteractivePanGestureHandler.js +0 -104
- package/esm/sparkline/sparkline-interactive/SparklineInteractivePaths.js +0 -57
- package/esm/sparkline/sparkline-interactive/SparklineInteractivePeriodSelector.js +0 -124
- package/esm/sparkline/sparkline-interactive/SparklineInteractiveProvider.js +0 -80
- package/esm/sparkline/sparkline-interactive/SparklineInteractiveTimeseriesPaths.js +0 -109
- package/esm/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.js +0 -85
- package/esm/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.js +0 -526
- package/esm/sparkline/sparkline-interactive/useInterruptiblePathAnimation.js +0 -58
- package/esm/sparkline/sparkline-interactive/useInterruptiblePathAnimation.test.disable.js +0 -37
- package/esm/sparkline/sparkline-interactive/useMinMaxTransform.js +0 -56
- package/esm/sparkline/sparkline-interactive/useOpacityAnimation.js +0 -23
- package/esm/sparkline/sparkline-interactive/useSparklineInteractiveConstants.js +0 -47
- package/esm/sparkline/sparkline-interactive/useSparklineInteractiveLineStyles.js +0 -34
- package/esm/sparkline/sparkline-interactive-header/SparklineInteractiveHeader.js +0 -233
- package/esm/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.js +0 -104
- package/esm/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.js +0 -565
- package/esm/sparkline/sparkline-interactive-header/useSparklineInteractiveHeaderStyles.js +0 -117
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import type { ChartTextProps } from '../text';
|
|
2
|
-
import { type ScrubberLabelPosition } from '../utils/scrubber';
|
|
3
|
-
import type {
|
|
4
|
-
ScrubberBeaconLabelComponent,
|
|
5
|
-
ScrubberBeaconLabelProps,
|
|
6
|
-
ScrubberBeaconProps,
|
|
7
|
-
} from './Scrubber';
|
|
8
|
-
export type ScrubberBeaconLabelGroupBaseProps = {
|
|
9
|
-
/**
|
|
10
|
-
* Labels to be displayed.
|
|
11
|
-
*/
|
|
12
|
-
labels: Array<Pick<ScrubberBeaconLabelProps, 'seriesId' | 'label' | 'color'>>;
|
|
13
|
-
/**
|
|
14
|
-
* Minimum gap between labels in pixels.
|
|
15
|
-
* @default 4
|
|
16
|
-
*/
|
|
17
|
-
labelMinGap?: number;
|
|
18
|
-
/**
|
|
19
|
-
* Horizontal offset of labels from the scrubber line in pixels.
|
|
20
|
-
* @default 16
|
|
21
|
-
*/
|
|
22
|
-
labelHorizontalOffset?: number;
|
|
23
|
-
/**
|
|
24
|
-
* Font style for the beacon labels.
|
|
25
|
-
*/
|
|
26
|
-
labelFont?: ChartTextProps['font'];
|
|
27
|
-
/**
|
|
28
|
-
* Preferred side for labels.
|
|
29
|
-
* @note labels will switch to the opposite side if there's not enough space on the preferred side.
|
|
30
|
-
* @default 'right'
|
|
31
|
-
*/
|
|
32
|
-
labelPreferredSide?: ScrubberLabelPosition;
|
|
33
|
-
};
|
|
34
|
-
export type ScrubberBeaconLabelGroupProps = ScrubberBeaconLabelGroupBaseProps & {
|
|
35
|
-
/**
|
|
36
|
-
* Custom component to render as a scrubber beacon label.
|
|
37
|
-
* @default DefaultScrubberBeaconLabel
|
|
38
|
-
*/
|
|
39
|
-
BeaconLabelComponent?: ScrubberBeaconLabelComponent;
|
|
40
|
-
/**
|
|
41
|
-
* Transition configuration for beacon label animations.
|
|
42
|
-
*/
|
|
43
|
-
transitions?: ScrubberBeaconProps['transitions'];
|
|
44
|
-
};
|
|
45
|
-
export declare const ScrubberBeaconLabelGroup: import('react').NamedExoticComponent<ScrubberBeaconLabelGroupProps>;
|
|
46
|
-
//# sourceMappingURL=ScrubberBeaconLabelGroup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScrubberBeaconLabelGroup.d.ts","sourceRoot":"","sources":["../../../src/chart/scrubber/ScrubberBeaconLabelGroup.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAqB,cAAc,EAAE,MAAM,SAAS,CAAC;AAEjE,OAAO,EAKL,KAAK,qBAAqB,EAC3B,MAAM,mBAAmB,CAAC;AAS3B,OAAO,KAAK,EACV,4BAA4B,EAC5B,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,YAAY,CAAC;AAsFpB,MAAM,MAAM,iCAAiC,GAAG;IAC9C;;OAEG;IACH,MAAM,EAAE,KAAK,CAAC,IAAI,CAAC,wBAAwB,EAAE,UAAU,GAAG,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAC9E;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACnC;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,qBAAqB,CAAC;CAC5C,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,iCAAiC,GAAG;IAC9E;;;OAGG;IACH,oBAAoB,CAAC,EAAE,4BAA4B,CAAC;IACpD;;OAEG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;CAClD,CAAC;AAEF,eAAO,MAAM,wBAAwB,qEAoMpC,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type ScrubberContextValue } from '../utils';
|
|
3
|
-
export type ScrubberProviderProps = Partial<Pick<ScrubberContextValue, 'enableScrubbing'>> & {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
/**
|
|
6
|
-
* Allows continuous gestures on the chart to continue outside the bounds of the chart element.
|
|
7
|
-
*/
|
|
8
|
-
allowOverflowGestures?: boolean;
|
|
9
|
-
/**
|
|
10
|
-
* Callback fired when the scrubber position changes.
|
|
11
|
-
* Receives the dataIndex of the scrubber or undefined when not scrubbing.
|
|
12
|
-
*/
|
|
13
|
-
onScrubberPositionChange?: (index: number | undefined) => void;
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* A component which encapsulates the ScrubberContext.
|
|
17
|
-
* It depends on a ChartContext in order to provide accurate touch tracking.
|
|
18
|
-
*/
|
|
19
|
-
export declare const ScrubberProvider: React.FC<ScrubberProviderProps>;
|
|
20
|
-
//# sourceMappingURL=ScrubberProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ScrubberProvider.d.ts","sourceRoot":"","sources":["../../../src/chart/scrubber/ScrubberProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAOpD,OAAO,EAA4C,KAAK,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAG/F,MAAM,MAAM,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,oBAAoB,EAAE,iBAAiB,CAAC,CAAC,GAAG;IAC3F,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;CAChE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CA+J5D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart/scrubber/index.ts"],"names":[],"mappings":"AAAA,cAAc,yBAAyB,CAAC;AACxC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,wBAAwB,CAAC;AACvC,cAAc,YAAY,CAAC"}
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import type { ThemeVars } from '@coinbase/cds-common/core/theme';
|
|
2
|
-
import type { Rect } from '@coinbase/cds-common/types';
|
|
3
|
-
import {
|
|
4
|
-
type AnimatedProp,
|
|
5
|
-
FontSlant,
|
|
6
|
-
FontWeight,
|
|
7
|
-
type SkParagraph,
|
|
8
|
-
TextAlign,
|
|
9
|
-
} from '@shopify/react-native-skia';
|
|
10
|
-
import { type ChartInset } from '../utils';
|
|
11
|
-
/**
|
|
12
|
-
* The supported content types for ChartText.
|
|
13
|
-
* Pass a string for simple text, or a SkParagraph for advanced rich text formatting.
|
|
14
|
-
*/
|
|
15
|
-
export type ChartTextChildren = AnimatedProp<string | SkParagraph>;
|
|
16
|
-
/**
|
|
17
|
-
* Horizontal alignment options for chart text.
|
|
18
|
-
*/
|
|
19
|
-
export type TextHorizontalAlignment = 'left' | 'center' | 'right';
|
|
20
|
-
/**
|
|
21
|
-
* Vertical alignment options for chart text.
|
|
22
|
-
*/
|
|
23
|
-
export type TextVerticalAlignment = 'top' | 'middle' | 'bottom';
|
|
24
|
-
export type ChartTextBaseProps = {
|
|
25
|
-
/**
|
|
26
|
-
* The text color.
|
|
27
|
-
* @default theme.color.fgMuted
|
|
28
|
-
*/
|
|
29
|
-
color?: string;
|
|
30
|
-
/**
|
|
31
|
-
* The background color of the text's background rectangle.
|
|
32
|
-
* @default theme.color.bgElevation1 if elevated, otherwise 'transparent'
|
|
33
|
-
*/
|
|
34
|
-
background?: string;
|
|
35
|
-
/**
|
|
36
|
-
* Whether the text's background should have an elevated appearance with a shadow.
|
|
37
|
-
*/
|
|
38
|
-
elevated?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* When true, disables automatic repositioning to fit within bounds.
|
|
41
|
-
*/
|
|
42
|
-
disableRepositioning?: boolean;
|
|
43
|
-
/**
|
|
44
|
-
* Optional bounds rectangle to constrain the text within. If provided, text will be positioned
|
|
45
|
-
* to stay within these bounds. Defaults to the full chart bounds when not provided.
|
|
46
|
-
*/
|
|
47
|
-
bounds?: Rect;
|
|
48
|
-
/**
|
|
49
|
-
* Callback fired when text dimensions change.
|
|
50
|
-
* Used for collision detection and smart positioning.
|
|
51
|
-
* Returns the adjusted position and dimensions.
|
|
52
|
-
*/
|
|
53
|
-
onDimensionsChange?: (rect: Rect) => void;
|
|
54
|
-
/**
|
|
55
|
-
* Inset around the text content for the background rect.
|
|
56
|
-
* Only affects the background, text position remains unchanged.
|
|
57
|
-
*/
|
|
58
|
-
inset?: number | ChartInset;
|
|
59
|
-
/**
|
|
60
|
-
* Border radius for the background rectangle.
|
|
61
|
-
* @default 4
|
|
62
|
-
*/
|
|
63
|
-
borderRadius?: number;
|
|
64
|
-
};
|
|
65
|
-
export type ChartTextProps = ChartTextBaseProps & {
|
|
66
|
-
/**
|
|
67
|
-
* The text content to display.
|
|
68
|
-
* Pass a string for simple text rendering, or build your own SkParagraph for advanced formatting.
|
|
69
|
-
* @example
|
|
70
|
-
* // Simple text
|
|
71
|
-
* <ChartText x={100} y={100}>Hello World</ChartText>
|
|
72
|
-
*
|
|
73
|
-
* @example
|
|
74
|
-
* // Advanced rich text with SkParagraph
|
|
75
|
-
* const paragraph = useMemo(() => {
|
|
76
|
-
* const builder = Skia.ParagraphBuilder.Make(style, fontProvider);
|
|
77
|
-
* builder.pushStyle({ fontSize: 14, fontWeight: 400 });
|
|
78
|
-
* builder.addText('Regular ');
|
|
79
|
-
* builder.pushStyle({ fontSize: 14, fontWeight: 700 });
|
|
80
|
-
* builder.addText('Bold');
|
|
81
|
-
* builder.pop();
|
|
82
|
-
* const para = builder.build();
|
|
83
|
-
* para.layout(width);
|
|
84
|
-
* return para;
|
|
85
|
-
* }, [fontProvider, width]);
|
|
86
|
-
* <ChartText x={100} y={100}>{paragraph}</ChartText>
|
|
87
|
-
*/
|
|
88
|
-
children: ChartTextChildren;
|
|
89
|
-
/**
|
|
90
|
-
* The desired x position in pixels.
|
|
91
|
-
* @note Text will be automatically positioned to fit within bounds unless `disableRepositioning` is true.
|
|
92
|
-
*/
|
|
93
|
-
x: AnimatedProp<number>;
|
|
94
|
-
/**
|
|
95
|
-
* The desired y position in pixels.
|
|
96
|
-
* @note Text will be automatically positioned to fit within bounds unless `disableRepositioning` is true.
|
|
97
|
-
*/
|
|
98
|
-
y: AnimatedProp<number>;
|
|
99
|
-
/**
|
|
100
|
-
* Horizontal offset in pixels to adjust the final x position.
|
|
101
|
-
* Useful for fine-tuning placement without affecting alignment.
|
|
102
|
-
*/
|
|
103
|
-
dx?: AnimatedProp<number>;
|
|
104
|
-
/**
|
|
105
|
-
* Vertical offset in pixels to adjust the final y position.
|
|
106
|
-
* Useful for fine-tuning placement or elevation.
|
|
107
|
-
*/
|
|
108
|
-
dy?: AnimatedProp<number>;
|
|
109
|
-
/**
|
|
110
|
-
* Horizontal alignment of the component.
|
|
111
|
-
* @default 'center'
|
|
112
|
-
*/
|
|
113
|
-
horizontalAlignment?: AnimatedProp<TextHorizontalAlignment>;
|
|
114
|
-
/**
|
|
115
|
-
* Vertical alignment of the component.
|
|
116
|
-
* @default 'middle'
|
|
117
|
-
*/
|
|
118
|
-
verticalAlignment?: AnimatedProp<TextVerticalAlignment>;
|
|
119
|
-
/**
|
|
120
|
-
* Text alignment of the SkParagraph
|
|
121
|
-
* @note when providing a custom SkParagraph as children, you still need to pass in the alignment used.
|
|
122
|
-
* @default TextAlign.Left
|
|
123
|
-
*/
|
|
124
|
-
paragraphAlignment?: TextAlign;
|
|
125
|
-
/**
|
|
126
|
-
* Theme font to use for text rendering.
|
|
127
|
-
* This sets both fontSize and fontWeight from the theme.
|
|
128
|
-
* @note this will not adjust the actual font family used,
|
|
129
|
-
* that is only adjusted by using fontFamilies on ChartText or at chart level
|
|
130
|
-
* @default 'label2'
|
|
131
|
-
*/
|
|
132
|
-
font?: ThemeVars.Font;
|
|
133
|
-
/**
|
|
134
|
-
* Font families override for Skia
|
|
135
|
-
* @example
|
|
136
|
-
* ['Helvetica', 'sans-serif']
|
|
137
|
-
*/
|
|
138
|
-
fontFamilies?: string[];
|
|
139
|
-
/**
|
|
140
|
-
* Font size override in pixels.
|
|
141
|
-
* Overrides the size from the font prop.
|
|
142
|
-
* @example
|
|
143
|
-
* // Use label1 font weight but with custom size
|
|
144
|
-
* <ChartText font="label1" fontSize={18}>Text</ChartText>
|
|
145
|
-
*/
|
|
146
|
-
fontSize?: number;
|
|
147
|
-
/**
|
|
148
|
-
* Font weight.
|
|
149
|
-
* Overrides the weight from the font prop.
|
|
150
|
-
*/
|
|
151
|
-
fontWeight?: FontWeight;
|
|
152
|
-
/**
|
|
153
|
-
* Font style (normal or italic).
|
|
154
|
-
* @default FontSlant.Upright
|
|
155
|
-
*/
|
|
156
|
-
fontStyle?: FontSlant;
|
|
157
|
-
/**
|
|
158
|
-
* Opacity of the text and background.
|
|
159
|
-
* @default 1
|
|
160
|
-
*/
|
|
161
|
-
opacity?: AnimatedProp<number>;
|
|
162
|
-
};
|
|
163
|
-
export declare const ChartText: import('react').NamedExoticComponent<ChartTextProps>;
|
|
164
|
-
//# sourceMappingURL=ChartText.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChartText.d.ts","sourceRoot":"","sources":["../../../src/chart/text/ChartText.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AAGvD,OAAO,EACL,KAAK,YAAY,EAEjB,SAAS,EACT,UAAU,EAOV,KAAK,WAAW,EAEhB,SAAS,EAEV,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,KAAK,UAAU,EAA2D,MAAM,UAAU,CAAC;AAwBpG;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,MAAM,GAAG,WAAW,CAAC,CAAC;AAEnE;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAElE;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,KAAK,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAEhE,MAAM,MAAM,kBAAkB,GAAG;IAC/B;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;;OAGG;IACH,MAAM,CAAC,EAAE,IAAI,CAAC;IACd;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAC1C;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IAC5B;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG;IAChD;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,QAAQ,EAAE,iBAAiB,CAAC;IAC5B;;;OAGG;IACH,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACxB;;;OAGG;IACH,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IACxB;;;OAGG;IACH,EAAE,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1B;;;OAGG;IACH,EAAE,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC1B;;;OAGG;IACH,mBAAmB,CAAC,EAAE,YAAY,CAAC,uBAAuB,CAAC,CAAC;IAC5D;;;OAGG;IACH,iBAAiB,CAAC,EAAE,YAAY,CAAC,qBAAqB,CAAC,CAAC;IACxD;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,SAAS,CAAC;IAC/B;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,SAAS,CAAC,IAAI,CAAC;IACtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;OAGG;IACH,OAAO,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CAChC,CAAC;AAEF,eAAO,MAAM,SAAS,sDA0TrB,CAAC"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { type ChartTextChildren, type ChartTextProps } from './ChartText';
|
|
2
|
-
/**
|
|
3
|
-
* Configuration for a single text label in the display list
|
|
4
|
-
*/
|
|
5
|
-
export type TextLabelData = {
|
|
6
|
-
/**
|
|
7
|
-
* The text content to display
|
|
8
|
-
*/
|
|
9
|
-
label: ChartTextChildren;
|
|
10
|
-
/**
|
|
11
|
-
* X coordinate where the text should be positioned
|
|
12
|
-
*/
|
|
13
|
-
x: number;
|
|
14
|
-
/**
|
|
15
|
-
* Y coordinate where the text should be positioned
|
|
16
|
-
*/
|
|
17
|
-
y: number;
|
|
18
|
-
/**
|
|
19
|
-
* Additional props to pass to the ChartText component for this specific label
|
|
20
|
-
*/
|
|
21
|
-
chartTextProps?: Partial<ChartTextProps>;
|
|
22
|
-
};
|
|
23
|
-
export type TextLabelDataWithKey = TextLabelData & {
|
|
24
|
-
key: string;
|
|
25
|
-
};
|
|
26
|
-
export type ChartTextGroupBaseProps = {
|
|
27
|
-
/**
|
|
28
|
-
* Array of text labels to display
|
|
29
|
-
*/
|
|
30
|
-
labels: TextLabelData[];
|
|
31
|
-
/**
|
|
32
|
-
* Minimum gap between labels
|
|
33
|
-
* @default 8
|
|
34
|
-
*/
|
|
35
|
-
minGap?: number;
|
|
36
|
-
/**
|
|
37
|
-
* Whether to always show first and last labels
|
|
38
|
-
* @default true
|
|
39
|
-
*/
|
|
40
|
-
prioritizeEndLabels?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Common props to apply to all ChartText components
|
|
43
|
-
*/
|
|
44
|
-
chartTextProps?: Partial<ChartTextProps>;
|
|
45
|
-
/**
|
|
46
|
-
* Custom component to render each label
|
|
47
|
-
* @default ChartText
|
|
48
|
-
*/
|
|
49
|
-
LabelComponent?: React.FC<ChartTextProps>;
|
|
50
|
-
};
|
|
51
|
-
export type ChartTextGroupProps = ChartTextGroupBaseProps;
|
|
52
|
-
/**
|
|
53
|
-
* A smart text display component that prevents label overlap through collision detection.
|
|
54
|
-
*
|
|
55
|
-
* This component renders a list of ChartText components and automatically hides overlapping elements
|
|
56
|
-
* to ensure readability.
|
|
57
|
-
*
|
|
58
|
-
* The component focuses solely on overlap prevention logic for better separation of concerns.
|
|
59
|
-
*/
|
|
60
|
-
export declare const ChartTextGroup: import('react').NamedExoticComponent<ChartTextGroupBaseProps>;
|
|
61
|
-
//# sourceMappingURL=ChartTextGroup.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ChartTextGroup.d.ts","sourceRoot":"","sources":["../../../src/chart/text/ChartTextGroup.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAErF;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,KAAK,EAAE,iBAAiB,CAAC;IACzB;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;CAC1C,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,aAAa,GAAG;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnE,MAAM,MAAM,uBAAuB,GAAG;IACpC;;OAEG;IACH,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC,cAAc,CAAC,CAAC;IACzC;;;OAGG;IACH,cAAc,CAAC,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,CAAC;AAiB1D;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc,+DA8L1B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart/text/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAC5B,cAAc,kBAAkB,CAAC"}
|