@coinbase/cds-mobile-visualization 3.4.0-beta.1 → 3.4.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dts/chart/CartesianChart.d.ts +57 -33
  3. package/dts/chart/CartesianChart.d.ts.map +1 -1
  4. package/dts/chart/ChartContextBridge.d.ts +28 -0
  5. package/dts/chart/ChartContextBridge.d.ts.map +1 -0
  6. package/dts/chart/Path.d.ts +77 -34
  7. package/dts/chart/Path.d.ts.map +1 -1
  8. package/dts/chart/PeriodSelector.d.ts +2 -2
  9. package/dts/chart/PeriodSelector.d.ts.map +1 -1
  10. package/dts/chart/area/Area.d.ts +42 -27
  11. package/dts/chart/area/Area.d.ts.map +1 -1
  12. package/dts/chart/area/AreaChart.d.ts +51 -10
  13. package/dts/chart/area/AreaChart.d.ts.map +1 -1
  14. package/dts/chart/area/DottedArea.d.ts +21 -2
  15. package/dts/chart/area/DottedArea.d.ts.map +1 -1
  16. package/dts/chart/area/GradientArea.d.ts +19 -13
  17. package/dts/chart/area/GradientArea.d.ts.map +1 -1
  18. package/dts/chart/area/SolidArea.d.ts +17 -2
  19. package/dts/chart/area/SolidArea.d.ts.map +1 -1
  20. package/dts/chart/axis/Axis.d.ts +68 -78
  21. package/dts/chart/axis/Axis.d.ts.map +1 -1
  22. package/dts/chart/axis/DefaultAxisTickLabel.d.ts +8 -0
  23. package/dts/chart/axis/DefaultAxisTickLabel.d.ts.map +1 -0
  24. package/dts/chart/axis/XAxis.d.ts +1 -1
  25. package/dts/chart/axis/XAxis.d.ts.map +1 -1
  26. package/dts/chart/axis/YAxis.d.ts +2 -2
  27. package/dts/chart/axis/YAxis.d.ts.map +1 -1
  28. package/dts/chart/axis/index.d.ts +1 -0
  29. package/dts/chart/axis/index.d.ts.map +1 -1
  30. package/dts/chart/bar/Bar.d.ts +16 -13
  31. package/dts/chart/bar/Bar.d.ts.map +1 -1
  32. package/dts/chart/bar/BarChart.d.ts +36 -20
  33. package/dts/chart/bar/BarChart.d.ts.map +1 -1
  34. package/dts/chart/bar/BarPlot.d.ts +2 -1
  35. package/dts/chart/bar/BarPlot.d.ts.map +1 -1
  36. package/dts/chart/bar/BarStack.d.ts +39 -48
  37. package/dts/chart/bar/BarStack.d.ts.map +1 -1
  38. package/dts/chart/bar/BarStackGroup.d.ts +1 -0
  39. package/dts/chart/bar/BarStackGroup.d.ts.map +1 -1
  40. package/dts/chart/bar/DefaultBar.d.ts +1 -1
  41. package/dts/chart/bar/DefaultBar.d.ts.map +1 -1
  42. package/dts/chart/bar/DefaultBarStack.d.ts.map +1 -1
  43. package/dts/chart/gradient/Gradient.d.ts +25 -0
  44. package/dts/chart/gradient/Gradient.d.ts.map +1 -0
  45. package/dts/chart/gradient/index.d.ts +2 -0
  46. package/dts/chart/gradient/index.d.ts.map +1 -0
  47. package/dts/chart/index.d.ts +3 -1
  48. package/dts/chart/index.d.ts.map +1 -1
  49. package/dts/chart/line/DefaultReferenceLineLabel.d.ts +9 -0
  50. package/dts/chart/line/DefaultReferenceLineLabel.d.ts.map +1 -0
  51. package/dts/chart/line/DottedLine.d.ts +13 -5
  52. package/dts/chart/line/DottedLine.d.ts.map +1 -1
  53. package/dts/chart/line/Line.d.ts +62 -25
  54. package/dts/chart/line/Line.d.ts.map +1 -1
  55. package/dts/chart/line/LineChart.d.ts +43 -9
  56. package/dts/chart/line/LineChart.d.ts.map +1 -1
  57. package/dts/chart/line/ReferenceLine.d.ts +68 -20
  58. package/dts/chart/line/ReferenceLine.d.ts.map +1 -1
  59. package/dts/chart/line/SolidLine.d.ts +8 -5
  60. package/dts/chart/line/SolidLine.d.ts.map +1 -1
  61. package/dts/chart/line/index.d.ts +1 -1
  62. package/dts/chart/line/index.d.ts.map +1 -1
  63. package/dts/chart/point/DefaultPointLabel.d.ts +10 -0
  64. package/dts/chart/point/DefaultPointLabel.d.ts.map +1 -0
  65. package/dts/chart/point/Point.d.ts +120 -0
  66. package/dts/chart/point/Point.d.ts.map +1 -0
  67. package/dts/chart/point/index.d.ts +3 -0
  68. package/dts/chart/point/index.d.ts.map +1 -0
  69. package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts +8 -0
  70. package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts.map +1 -0
  71. package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts +12 -0
  72. package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts.map +1 -0
  73. package/dts/chart/scrubber/DefaultScrubberLabel.d.ts +11 -0
  74. package/dts/chart/scrubber/DefaultScrubberLabel.d.ts.map +1 -0
  75. package/dts/chart/scrubber/Scrubber.d.ts +172 -43
  76. package/dts/chart/scrubber/Scrubber.d.ts.map +1 -1
  77. package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts +44 -0
  78. package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts.map +1 -0
  79. package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts +31 -0
  80. package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts.map +1 -0
  81. package/dts/chart/scrubber/ScrubberProvider.d.ts +6 -3
  82. package/dts/chart/scrubber/ScrubberProvider.d.ts.map +1 -1
  83. package/dts/chart/scrubber/index.d.ts +3 -0
  84. package/dts/chart/scrubber/index.d.ts.map +1 -1
  85. package/dts/chart/text/ChartText.d.ts +151 -77
  86. package/dts/chart/text/ChartText.d.ts.map +1 -1
  87. package/dts/chart/text/{SmartChartTextGroup.d.ts → ChartTextGroup.d.ts} +9 -3
  88. package/dts/chart/text/ChartTextGroup.d.ts.map +1 -0
  89. package/dts/chart/text/index.d.ts +1 -1
  90. package/dts/chart/text/index.d.ts.map +1 -1
  91. package/dts/chart/utils/chart.d.ts +34 -7
  92. package/dts/chart/utils/chart.d.ts.map +1 -1
  93. package/dts/chart/utils/context.d.ts +28 -7
  94. package/dts/chart/utils/context.d.ts.map +1 -1
  95. package/dts/chart/utils/gradient.d.ts +117 -0
  96. package/dts/chart/utils/gradient.d.ts.map +1 -0
  97. package/dts/chart/utils/index.d.ts +3 -0
  98. package/dts/chart/utils/index.d.ts.map +1 -1
  99. package/dts/chart/utils/path.d.ts +53 -0
  100. package/dts/chart/utils/path.d.ts.map +1 -1
  101. package/dts/chart/utils/point.d.ts +60 -1
  102. package/dts/chart/utils/point.d.ts.map +1 -1
  103. package/dts/chart/utils/scale.d.ts +91 -0
  104. package/dts/chart/utils/scale.d.ts.map +1 -1
  105. package/dts/chart/utils/scrubber.d.ts +39 -0
  106. package/dts/chart/utils/scrubber.d.ts.map +1 -0
  107. package/dts/chart/utils/transition.d.ts +140 -0
  108. package/dts/chart/utils/transition.d.ts.map +1 -0
  109. package/esm/chart/CartesianChart.js +164 -70
  110. package/esm/chart/ChartContextBridge.js +148 -0
  111. package/esm/chart/Path.js +198 -113
  112. package/esm/chart/PeriodSelector.js +2 -2
  113. package/esm/chart/__stories__/CartesianChart.stories.js +378 -131
  114. package/esm/chart/__stories__/Chart.stories.js +2 -4
  115. package/esm/chart/__stories__/PeriodSelector.stories.js +103 -75
  116. package/esm/chart/area/Area.js +25 -35
  117. package/esm/chart/area/AreaChart.js +17 -12
  118. package/esm/chart/area/DottedArea.js +61 -109
  119. package/esm/chart/area/GradientArea.js +35 -91
  120. package/esm/chart/area/SolidArea.js +22 -8
  121. package/esm/chart/area/__stories__/AreaChart.stories.js +1 -1
  122. package/esm/chart/axis/Axis.js +2 -0
  123. package/esm/chart/axis/DefaultAxisTickLabel.js +11 -0
  124. package/esm/chart/axis/XAxis.js +63 -56
  125. package/esm/chart/axis/YAxis.js +59 -52
  126. package/esm/chart/axis/__stories__/Axis.stories.js +0 -1
  127. package/esm/chart/axis/index.js +1 -0
  128. package/esm/chart/bar/Bar.js +3 -1
  129. package/esm/chart/bar/BarChart.js +15 -37
  130. package/esm/chart/bar/BarPlot.js +41 -35
  131. package/esm/chart/bar/BarStack.js +75 -38
  132. package/esm/chart/bar/BarStackGroup.js +6 -16
  133. package/esm/chart/bar/DefaultBar.js +26 -48
  134. package/esm/chart/bar/DefaultBarStack.js +23 -58
  135. package/esm/chart/bar/__stories__/BarChart.stories.js +463 -77
  136. package/esm/chart/gradient/Gradient.js +53 -0
  137. package/esm/chart/gradient/index.js +1 -0
  138. package/esm/chart/index.js +3 -1
  139. package/esm/chart/line/DefaultReferenceLineLabel.js +66 -0
  140. package/esm/chart/line/DottedLine.js +29 -14
  141. package/esm/chart/line/Line.js +106 -67
  142. package/esm/chart/line/LineChart.js +20 -14
  143. package/esm/chart/line/ReferenceLine.js +80 -63
  144. package/esm/chart/line/SolidLine.js +25 -10
  145. package/esm/chart/line/__stories__/LineChart.stories.js +2101 -1977
  146. package/esm/chart/line/__stories__/ReferenceLine.stories.js +83 -28
  147. package/esm/chart/line/index.js +1 -1
  148. package/esm/chart/point/DefaultPointLabel.js +39 -0
  149. package/esm/chart/point/Point.js +188 -0
  150. package/esm/chart/point/index.js +2 -0
  151. package/esm/chart/scrubber/DefaultScrubberBeacon.js +179 -0
  152. package/esm/chart/scrubber/DefaultScrubberBeaconLabel.js +43 -0
  153. package/esm/chart/scrubber/DefaultScrubberLabel.js +28 -0
  154. package/esm/chart/scrubber/Scrubber.js +126 -146
  155. package/esm/chart/scrubber/ScrubberBeaconGroup.js +161 -0
  156. package/esm/chart/scrubber/ScrubberBeaconLabelGroup.js +185 -0
  157. package/esm/chart/scrubber/ScrubberProvider.js +46 -54
  158. package/esm/chart/scrubber/index.js +3 -1
  159. package/esm/chart/text/ChartText.js +242 -174
  160. package/esm/chart/text/{SmartChartTextGroup.js → ChartTextGroup.js} +6 -5
  161. package/esm/chart/text/index.js +1 -1
  162. package/esm/chart/utils/chart.js +44 -3
  163. package/esm/chart/utils/gradient.js +305 -0
  164. package/esm/chart/utils/index.js +3 -0
  165. package/esm/chart/utils/path.js +76 -8
  166. package/esm/chart/utils/point.js +116 -5
  167. package/esm/chart/utils/scale.js +230 -1
  168. package/esm/chart/utils/scrubber.js +139 -0
  169. package/esm/chart/utils/transition.js +185 -0
  170. package/esm/sparkline/__stories__/Sparkline.stories.js +11 -7
  171. package/esm/sparkline/__stories__/SparklineGradient.stories.js +7 -4
  172. package/esm/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.js +51 -26
  173. package/esm/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.js +17 -9
  174. package/package.json +15 -9
  175. package/dts/chart/Point.d.ts +0 -103
  176. package/dts/chart/Point.d.ts.map +0 -1
  177. package/dts/chart/line/GradientLine.d.ts +0 -45
  178. package/dts/chart/line/GradientLine.d.ts.map +0 -1
  179. package/dts/chart/scrubber/ScrubberBeacon.d.ts +0 -75
  180. package/dts/chart/scrubber/ScrubberBeacon.d.ts.map +0 -1
  181. package/dts/chart/text/SmartChartTextGroup.d.ts.map +0 -1
  182. package/esm/chart/Point.js +0 -111
  183. package/esm/chart/line/GradientLine.js +0 -62
  184. package/esm/chart/scrubber/ScrubberBeacon.js +0 -199
@@ -1 +1 @@
1
- {"version":3,"file":"ReferenceLine.d.ts","sourceRoot":"","sources":["../../../src/chart/line/ReferenceLine.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAK9D,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,mBAAmB,CAAC;AAI3B,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AAE5C;;GAEG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CACxC,cAAc,EACZ,IAAI,GACJ,IAAI,GACJ,UAAU,GACV,YAAY,GACZ,OAAO,GACP,OAAO,GACP,YAAY,GACZ,cAAc,GACd,sBAAsB,GACtB,QAAQ,GACR,qBAAqB,GACrB,mBAAmB,CACtB,CAAC;AAEF,KAAK,sBAAsB,GAAG,WAAW,GAAG;IAC1C;;;;;;;;;;;OAWG;IACH,KAAK,CAAC,E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AAK,CAAC;CACf,CAAC;AAEF,KAAK,0BAA0B,GAAG,sBAAsB,GAAG;IACzD;;OAEG;IACH,KAAK,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;IAC5B;;;OAGG;IACH,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,KAAK,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,4BAA4B,GAAG,0BAA0B,CAAC;AAE3F,eAAO,MAAM,aAAa,0DAiJzB,CAAC"}
@@ -1,12 +1,15 @@
1
- import type { SharedProps } from '@coinbase/cds-common/types';
2
1
  import { type PathProps } from '../Path';
3
- export type SolidLineProps = SharedProps &
4
- Omit<PathProps, 'fill' | 'strokeWidth'> & {
2
+ import type { LineComponentProps } from './Line';
3
+ export type SolidLineProps = Pick<
4
+ PathProps,
5
+ 'initialPath' | 'children' | 'strokeCap' | 'strokeJoin' | 'clipRect' | 'clipPath' | 'clipOffset'
6
+ > &
7
+ LineComponentProps & {
5
8
  fill?: string;
6
- strokeWidth?: number;
7
9
  };
8
10
  /**
9
- * A customizable solid line component which uses path element.
11
+ * A customizable solid line component.
12
+ * Supports gradient for gradient effects and smooth data transitions via AnimatedPath.
10
13
  */
11
14
  export declare const SolidLine: import('react').NamedExoticComponent<SolidLineProps>;
12
15
  //# sourceMappingURL=SolidLine.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SolidLine.d.ts","sourceRoot":"","sources":["../../../src/chart/line/SolidLine.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAG9D,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,MAAM,cAAc,GAAG,WAAW,GACtC,IAAI,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,CAAC,GAAG;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,SAAS,sDAyBrB,CAAC"}
1
+ {"version":3,"file":"SolidLine.d.ts","sourceRoot":"","sources":["../../../src/chart/line/SolidLine.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEjD,MAAM,MAAM,cAAc,GAAG,IAAI,CAC/B,SAAS,EACT,aAAa,GAAG,UAAU,GAAG,WAAW,GAAG,YAAY,GAAG,UAAU,GAAG,UAAU,GAAG,YAAY,CACjG,GACC,kBAAkB,GAAG;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEJ;;;GAGG;AACH,eAAO,MAAM,SAAS,sDAmCrB,CAAC"}
@@ -1,5 +1,5 @@
1
+ export * from './DefaultReferenceLineLabel';
1
2
  export * from './DottedLine';
2
- export * from './GradientLine';
3
3
  export * from './Line';
4
4
  export * from './LineChart';
5
5
  export * from './ReferenceLine';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart/line/index.ts"],"names":[],"mappings":"AACA,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart/line/index.ts"],"names":[],"mappings":"AACA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC"}
@@ -0,0 +1,10 @@
1
+ import { type ChartTextProps } from '../text';
2
+ import type { PointLabelProps } from './Point';
3
+ export type DefaultPointLabelProps = PointLabelProps &
4
+ Omit<ChartTextProps, 'children' | 'x' | 'y' | 'horizontalAlignment' | 'verticalAlignment'>;
5
+ /**
6
+ * DefaultPointLabel is the default label component for point labels.
7
+ * It renders text at the specified position relative to the point.
8
+ */
9
+ export declare const DefaultPointLabel: import('react').NamedExoticComponent<DefaultPointLabelProps>;
10
+ //# sourceMappingURL=DefaultPointLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultPointLabel.d.ts","sourceRoot":"","sources":["../../../src/chart/point/DefaultPointLabel.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,MAAM,MAAM,sBAAsB,GAAG,eAAe,GAClD,IAAI,CAAC,cAAc,EAAE,UAAU,GAAG,GAAG,GAAG,GAAG,GAAG,qBAAqB,GAAG,mBAAmB,CAAC,CAAC;AAE7F;;;GAGG;AACH,eAAO,MAAM,iBAAiB,8DAwB7B,CAAC"}
@@ -0,0 +1,120 @@
1
+ import { type ComponentType } from 'react';
2
+ import type { ChartTextChildren, ChartTextProps } from '../text/ChartText';
3
+ import { type PointLabelPosition } from '../utils';
4
+ import { type Transition } from '../utils/transition';
5
+ export type PointBaseProps = {
6
+ /**
7
+ * X coordinate in data space (not pixel coordinates).
8
+ */
9
+ dataX: number;
10
+ /**
11
+ * Y coordinate in data space (not pixel coordinates).
12
+ */
13
+ dataY: number;
14
+ /**
15
+ * The fill color of the point.
16
+ * @default theme.color.fgPrimary
17
+ */
18
+ fill?: string;
19
+ /**
20
+ * Optional Y-axis id to specify which axis to plot along.
21
+ * @default first y-axis defined in chart props.
22
+ */
23
+ yAxisId?: string;
24
+ /**
25
+ * Radius of the point.
26
+ * @default 5
27
+ */
28
+ radius?: number;
29
+ /**
30
+ * Opacity of the point.
31
+ */
32
+ opacity?: number;
33
+ /**
34
+ * Color of the outer stroke around the point.
35
+ * @default theme.color.bg
36
+ */
37
+ stroke?: string;
38
+ /**
39
+ * Outer stroke width of the point.
40
+ * Set to 0 to remove the stroke.
41
+ * @default 2
42
+ */
43
+ strokeWidth?: number;
44
+ /**
45
+ * When set, overrides the chart's animation setting for this specific point.
46
+ */
47
+ animate?: boolean;
48
+ /**
49
+ * Custom component to render the label.
50
+ * @default DefaultPointLabel
51
+ */
52
+ LabelComponent?: PointLabelComponent;
53
+ /**
54
+ * Position of the label relative to the point.
55
+ * @default 'center'
56
+ */
57
+ labelPosition?: PointLabelPosition;
58
+ /**
59
+ * Distance in pixels to offset the label from the point.
60
+ * @default 2 * radius
61
+ */
62
+ labelOffset?: number;
63
+ /**
64
+ * Font style for the label text.
65
+ */
66
+ labelFont?: ChartTextProps['font'];
67
+ };
68
+ /**
69
+ * Props for point label components.
70
+ */
71
+ export type PointLabelProps = {
72
+ /**
73
+ * X coordinate in SVG pixel space.
74
+ */
75
+ x: number;
76
+ /**
77
+ * Y coordinate in SVG pixel space.
78
+ */
79
+ y: number;
80
+ /**
81
+ * X coordinate in data space (usually same as index).
82
+ */
83
+ dataX: number;
84
+ /**
85
+ * Y coordinate in data space (same as value).
86
+ */
87
+ dataY: number;
88
+ /**
89
+ * Fill color for the point.
90
+ */
91
+ fill: string;
92
+ /**
93
+ * Position of the label relative to the point.
94
+ * @default 'center'
95
+ */
96
+ position?: PointLabelPosition;
97
+ /**
98
+ * Distance in pixels to offset the label from the point.
99
+ */
100
+ offset?: number;
101
+ /**
102
+ * Content to display in the label.
103
+ */
104
+ children: ChartTextChildren;
105
+ };
106
+ export type PointLabelComponent = ComponentType<PointLabelProps>;
107
+ export type PointProps = PointBaseProps & {
108
+ /**
109
+ * Simple text label to display at the point position.
110
+ * If provided, a label component will be automatically rendered.
111
+ */
112
+ label?: ChartTextChildren;
113
+ /**
114
+ * Transition configuration for point animations.
115
+ * Defines how the point transitions when position or color changes.
116
+ */
117
+ transition?: Transition;
118
+ };
119
+ export declare const Point: import('react').NamedExoticComponent<PointProps>;
120
+ //# sourceMappingURL=Point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Point.d.ts","sourceRoot":"","sources":["../../../src/chart/point/Point.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAA4B,MAAM,OAAO,CAAC;AAOrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EAAE,KAAK,kBAAkB,EAAgB,MAAM,UAAU,CAAC;AACjE,OAAO,EAAsC,KAAK,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAI1F,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC;;;OAGG;IACH,aAAa,CAAC,EAAE,kBAAkB,CAAC;IACnC;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;CACpC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG;IAC5B;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,QAAQ,EAAE,iBAAiB,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC,eAAe,CAAC,CAAC;AAEjE,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG;IACxC;;;OAGG;IACH,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B;;;OAGG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,KAAK,kDAmMjB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export * from './DefaultPointLabel';
2
+ export * from './Point';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/chart/point/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,SAAS,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { ScrubberBeaconProps, ScrubberBeaconRef } from './Scrubber';
2
+ export type DefaultScrubberBeaconProps = ScrubberBeaconProps;
3
+ export declare const DefaultScrubberBeacon: import('react').MemoExoticComponent<
4
+ import('react').ForwardRefExoticComponent<
5
+ ScrubberBeaconProps & import('react').RefAttributes<ScrubberBeaconRef>
6
+ >
7
+ >;
8
+ //# sourceMappingURL=DefaultScrubberBeacon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultScrubberBeacon.d.ts","sourceRoot":"","sources":["../../../src/chart/scrubber/DefaultScrubberBeacon.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAkBzE,MAAM,MAAM,0BAA0B,GAAG,mBAAmB,CAAC;AAE7D,eAAO,MAAM,qBAAqB,wJAgLjC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { type ChartTextProps } from '../text';
2
+ import type { ScrubberBeaconLabelProps } from './Scrubber';
3
+ export type DefaultScrubberBeaconLabelProps = ScrubberBeaconLabelProps &
4
+ Pick<
5
+ ChartTextProps,
6
+ 'background' | 'elevated' | 'borderRadius' | 'font' | 'verticalAlignment' | 'inset' | 'opacity'
7
+ >;
8
+ /**
9
+ * DefaultScrubberBeaconLabel is a special instance of ChartText used to label a series' scrubber beacon.
10
+ */
11
+ export declare const DefaultScrubberBeaconLabel: import('react').NamedExoticComponent<DefaultScrubberBeaconLabelProps>;
12
+ //# sourceMappingURL=DefaultScrubberBeaconLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultScrubberBeaconLabel.d.ts","sourceRoot":"","sources":["../../../src/chart/scrubber/DefaultScrubberBeaconLabel.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,SAAS,CAAC;AAEzD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAK3D,MAAM,MAAM,+BAA+B,GAAG,wBAAwB,GACpE,IAAI,CACF,cAAc,EACd,YAAY,GAAG,UAAU,GAAG,cAAc,GAAG,MAAM,GAAG,mBAAmB,GAAG,OAAO,GAAG,SAAS,CAChG,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,0BAA0B,uEAkCtC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ScrubberLabelProps } from './Scrubber';
2
+ export type DefaultScrubberLabelProps = ScrubberLabelProps;
3
+ /**
4
+ * DefaultScrubberLabel is the default label component for the scrubber line.
5
+ * It will automatically add padding around the label when elevated to fit within chart bounds to prevent shadow from being cutoff.
6
+ * It will also center the label vertically with the top available area.
7
+ */
8
+ export declare const DefaultScrubberLabel: import('react').NamedExoticComponent<
9
+ import('..').ReferenceLineLabelComponentProps
10
+ >;
11
+ //# sourceMappingURL=DefaultScrubberLabel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DefaultScrubberLabel.d.ts","sourceRoot":"","sources":["../../../src/chart/scrubber/DefaultScrubberLabel.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAErD,MAAM,MAAM,yBAAyB,GAAG,kBAAkB,CAAC;AAE3D;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,qFAahC,CAAC"}
@@ -1,25 +1,120 @@
1
1
  import React from 'react';
2
- import type { SharedProps } from '@coinbase/cds-common/types';
3
- import { type ReferenceLineProps } from '../line';
4
- import { type ScrubberBeaconProps, type ScrubberBeaconRef } from './ScrubberBeacon';
5
- /**
6
- * Configuration for scrubber functionality across chart components.
7
- * Provides consistent API with smart defaults and component customization.
8
- */
9
- export type ScrubberProps = SharedProps &
10
- Pick<ScrubberBeaconProps, 'idlePulse'> & {
2
+ import { type AnimatedProp, type SkParagraph } from '@shopify/react-native-skia';
3
+ import { type ReferenceLineBaseProps, type ReferenceLineLabelComponentProps } from '../line';
4
+ import type { ChartTextProps } from '../text';
5
+ import { type ChartInset, type Series } from '../utils';
6
+ import type { Transition } from '../utils/transition';
7
+ import {
8
+ type ScrubberBeaconGroupBaseProps,
9
+ type ScrubberBeaconGroupProps,
10
+ type ScrubberBeaconGroupRef,
11
+ } from './ScrubberBeaconGroup';
12
+ import {
13
+ type ScrubberBeaconLabelGroupBaseProps,
14
+ type ScrubberBeaconLabelGroupProps,
15
+ } from './ScrubberBeaconLabelGroup';
16
+ export type ScrubberBeaconRef = {
17
+ /**
18
+ * Triggers a single pulse animation.
19
+ * Only works when the beacon is in idle state (not actively scrubbing).
20
+ */
21
+ pulse: () => void;
22
+ };
23
+ export type ScrubberBeaconProps = {
24
+ /**
25
+ * Id of the series.
26
+ */
27
+ seriesId: Series['id'];
28
+ /**
29
+ * Color of the beacon.
30
+ */
31
+ color?: AnimatedProp<string>;
32
+ /**
33
+ * X coordinate in data space.
34
+ */
35
+ dataX: AnimatedProp<number>;
36
+ /**
37
+ * Y coordinate in data space.
38
+ */
39
+ dataY: AnimatedProp<number>;
40
+ /**
41
+ * Whether the beacon is in idle state (not actively scrubbing).
42
+ */
43
+ isIdle: AnimatedProp<boolean>;
44
+ /**
45
+ * Pulse the beacon while it is at rest.
46
+ */
47
+ idlePulse?: boolean;
48
+ /**
49
+ * Whether animations are enabled.
50
+ * @default true
51
+ */
52
+ animate?: boolean;
53
+ /**
54
+ * Transition configuration for beacon animations.
55
+ */
56
+ transitions?: {
57
+ /**
58
+ * Transition used for beacon position updates.
59
+ * @default defaultTransition
60
+ */
61
+ update?: Transition;
62
+ /**
63
+ * Transition used for the pulse animation.
64
+ * @default { type: 'timing', duration: 1600, easing: Easing.bezier(0.0, 0.0, 0.0, 1.0) }
65
+ */
66
+ pulse?: Transition;
67
+ /**
68
+ * Delay, in milliseconds between pulse transitions
69
+ * when `idlePulse` is enabled.
70
+ * @default 400
71
+ */
72
+ pulseRepeatDelay?: number;
73
+ };
74
+ /**
75
+ * Opacity of the beacon.
76
+ * @default 1
77
+ */
78
+ opacity?: AnimatedProp<number>;
79
+ };
80
+ export type ScrubberBeaconComponent = React.FC<
81
+ ScrubberBeaconProps & {
82
+ ref?: React.Ref<ScrubberBeaconRef>;
83
+ }
84
+ >;
85
+ export type ScrubberBeaconLabelProps = Pick<Series, 'color'> &
86
+ Pick<
87
+ ChartTextProps,
88
+ 'x' | 'y' | 'dx' | 'horizontalAlignment' | 'onDimensionsChange' | 'opacity' | 'font'
89
+ > & {
90
+ /**
91
+ * Label for the series.
92
+ */
93
+ label: AnimatedProp<string>;
11
94
  /**
12
- * An array of series IDs that will receive visual emphasis as the user scrubs through the chart.
13
- * Use this prop to restrict the scrubbing visual behavior to specific series.
14
- * By default, all series will be highlighted by the Scrubber.
95
+ * Id of the series.
96
+ */
97
+ seriesId: Series['id'];
98
+ };
99
+ export type ScrubberBeaconLabelComponent = React.FC<ScrubberBeaconLabelProps>;
100
+ export type ScrubberLabelProps = ReferenceLineLabelComponentProps;
101
+ export type ScrubberLabelComponent = React.FC<ScrubberLabelProps>;
102
+ export type ScrubberBaseProps = Pick<ScrubberBeaconGroupBaseProps, 'idlePulse'> &
103
+ Pick<ReferenceLineBaseProps, 'LineComponent' | 'LabelComponent' | 'labelElevated'> &
104
+ Pick<ScrubberBeaconGroupProps, 'BeaconComponent'> &
105
+ Pick<ScrubberBeaconLabelGroupProps, 'BeaconLabelComponent'> & {
106
+ /**
107
+ * Array of series IDs to highlight when scrubbing with scrubber beacons.
108
+ * By default, all series will be highlighted.
15
109
  */
16
110
  seriesIds?: string[];
17
111
  /**
18
- * Hides the scrubber line
112
+ * Hides the scrubber line.
113
+ * @note This hides Scrubber's ReferenceLine including the label.
19
114
  */
20
115
  hideLine?: boolean;
21
116
  /**
22
- * Whether to hide the overlay rect which obscures future data.
117
+ * Hides the overlay rect which obscures data beyond the scrubber position.
23
118
  */
24
119
  hideOverlay?: boolean;
25
120
  /**
@@ -28,48 +123,66 @@ export type ScrubberProps = SharedProps &
28
123
  * @default 2
29
124
  */
30
125
  overlayOffset?: number;
126
+ /**
127
+ * Minimum gap between beacon labels to prevent overlap.
128
+ * Measured in pixels.
129
+ */
130
+ beaconLabelMinGap?: ScrubberBeaconLabelGroupBaseProps['labelMinGap'];
131
+ /**
132
+ * Horizontal offset for beacon labels from their beacon position.
133
+ * Measured in pixels.
134
+ */
135
+ beaconLabelHorizontalOffset?: ScrubberBeaconLabelGroupBaseProps['labelHorizontalOffset'];
31
136
  /**
32
137
  * Label text displayed above the scrubber line.
138
+ * Can be a static string or a function that receives the current dataIndex.
33
139
  */
34
- label?: ReferenceLineProps['label'] | ((dataIndex: number) => ReferenceLineProps['label']);
140
+ label?: string | SkParagraph | ((dataIndex: number) => string | SkParagraph);
35
141
  /**
36
- * Props passed to the scrubber line's label.
142
+ * Font style for the scrubber line label.
37
143
  */
38
- labelProps?: ReferenceLineProps['labelProps'];
144
+ labelFont?: ChartTextProps['font'];
39
145
  /**
40
- * Stroke color for the scrubber line.
146
+ * Bounds inset for the scrubber line label to prevent cutoff at chart edges.
147
+ * @default { top: 4, bottom: 20, left: 12, right: 12 } when labelElevated is true, otherwise none
41
148
  */
42
- lineStroke?: ReferenceLineProps['stroke'];
149
+ labelBoundsInset?: number | ChartInset;
43
150
  /**
44
- * Custom component for the scrubber beacon.
151
+ * Font style for the beacon labels.
45
152
  */
46
- BeaconComponent?: React.ComponentType<ScrubberBeaconProps>;
153
+ beaconLabelFont?: ChartTextProps['font'];
47
154
  /**
48
- * Custom component for the scrubber line.
155
+ * Stroke color for the scrubber line.
156
+ */
157
+ lineStroke?: ReferenceLineBaseProps['stroke'];
158
+ /**
159
+ * Transition configuration for the scrubber beacon.
49
160
  */
50
- LineComponent?: React.ComponentType<ReferenceLineProps>;
161
+ beaconTransitions?: ScrubberBeaconProps['transitions'];
51
162
  };
52
- export type ScrubberRef = ScrubberBeaconRef;
163
+ export type ScrubberProps = ScrubberBaseProps;
164
+ export type ScrubberRef = ScrubberBeaconGroupRef;
53
165
  /**
54
- * Unified component that manages all scrubber elements (beacons, line, labels)
55
- * with intelligent collision detection and consistent positioning.
166
+ * Unified component that manages all scrubber elements (beacons, line, labels).
56
167
  */
57
168
  export declare const Scrubber: React.MemoExoticComponent<
58
169
  React.ForwardRefExoticComponent<
59
- SharedProps &
60
- Pick<ScrubberBeaconProps, 'idlePulse'> & {
170
+ Pick<ScrubberBeaconGroupBaseProps, 'idlePulse'> &
171
+ Pick<ReferenceLineBaseProps, 'LabelComponent' | 'LineComponent' | 'labelElevated'> &
172
+ Pick<ScrubberBeaconGroupProps, 'BeaconComponent'> &
173
+ Pick<ScrubberBeaconLabelGroupProps, 'BeaconLabelComponent'> & {
61
174
  /**
62
- * An array of series IDs that will receive visual emphasis as the user scrubs through the chart.
63
- * Use this prop to restrict the scrubbing visual behavior to specific series.
64
- * By default, all series will be highlighted by the Scrubber.
175
+ * Array of series IDs to highlight when scrubbing with scrubber beacons.
176
+ * By default, all series will be highlighted.
65
177
  */
66
178
  seriesIds?: string[];
67
179
  /**
68
- * Hides the scrubber line
180
+ * Hides the scrubber line.
181
+ * @note This hides Scrubber's ReferenceLine including the label.
69
182
  */
70
183
  hideLine?: boolean;
71
184
  /**
72
- * Whether to hide the overlay rect which obscures future data.
185
+ * Hides the overlay rect which obscures data beyond the scrubber position.
73
186
  */
74
187
  hideOverlay?: boolean;
75
188
  /**
@@ -78,27 +191,43 @@ export declare const Scrubber: React.MemoExoticComponent<
78
191
  * @default 2
79
192
  */
80
193
  overlayOffset?: number;
194
+ /**
195
+ * Minimum gap between beacon labels to prevent overlap.
196
+ * Measured in pixels.
197
+ */
198
+ beaconLabelMinGap?: ScrubberBeaconLabelGroupBaseProps['labelMinGap'];
199
+ /**
200
+ * Horizontal offset for beacon labels from their beacon position.
201
+ * Measured in pixels.
202
+ */
203
+ beaconLabelHorizontalOffset?: ScrubberBeaconLabelGroupBaseProps['labelHorizontalOffset'];
81
204
  /**
82
205
  * Label text displayed above the scrubber line.
206
+ * Can be a static string or a function that receives the current dataIndex.
83
207
  */
84
- label?: ReferenceLineProps['label'] | ((dataIndex: number) => ReferenceLineProps['label']);
208
+ label?: string | SkParagraph | ((dataIndex: number) => string | SkParagraph);
85
209
  /**
86
- * Props passed to the scrubber line's label.
210
+ * Font style for the scrubber line label.
87
211
  */
88
- labelProps?: ReferenceLineProps['labelProps'];
212
+ labelFont?: ChartTextProps['font'];
89
213
  /**
90
- * Stroke color for the scrubber line.
214
+ * Bounds inset for the scrubber line label to prevent cutoff at chart edges.
215
+ * @default { top: 4, bottom: 20, left: 12, right: 12 } when labelElevated is true, otherwise none
91
216
  */
92
- lineStroke?: ReferenceLineProps['stroke'];
217
+ labelBoundsInset?: number | ChartInset;
93
218
  /**
94
- * Custom component for the scrubber beacon.
219
+ * Font style for the beacon labels.
220
+ */
221
+ beaconLabelFont?: ChartTextProps['font'];
222
+ /**
223
+ * Stroke color for the scrubber line.
95
224
  */
96
- BeaconComponent?: React.ComponentType<ScrubberBeaconProps>;
225
+ lineStroke?: ReferenceLineBaseProps['stroke'];
97
226
  /**
98
- * Custom component for the scrubber line.
227
+ * Transition configuration for the scrubber beacon.
99
228
  */
100
- LineComponent?: React.ComponentType<ReferenceLineProps>;
101
- } & React.RefAttributes<ScrubberBeaconRef>
229
+ beaconTransitions?: ScrubberBeaconProps['transitions'];
230
+ } & React.RefAttributes<ScrubberBeaconGroupRef>
102
231
  >
103
232
  >;
104
233
  //# sourceMappingURL=Scrubber.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Scrubber.d.ts","sourceRoot":"","sources":["../../../src/chart/scrubber/Scrubber.tsx"],"names":[],"mappings":"AAAA,OAAO,KAQN,MAAM,OAAO,CAAC;AAKf,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAI9D,OAAO,EAAiB,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGjE,OAAO,EAAkB,KAAK,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAIpG;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,WAAW,GACrC,IAAI,CAAC,mBAAmB,EAAE,WAAW,CAAC,GAAG;IACvC;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;IAErB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,KAAK,CAAC,EAAE,kBAAkB,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,kBAAkB,CAAC,OAAO,CAAC,CAAC,CAAC;IAE3F;;OAEG;IACH,UAAU,CAAC,EA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,CAAC,CAAC;IAC7E;;OAEG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACnC;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC;IACvC;;OAEG;IACH,eAAe,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;IACzC;;OAEG;IACH,UAAU,CAAC,EAAE,sBAAsB,CAAC,QAAQ,CAAC,CAAC;IAC9C;;OAEG;IACH,iBAAiB,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;CACxD,CAAC;AAEJ,MAAM,MAAM,aAAa,GAAG,iBAAiB,CAAC;AAE9C,MAAM,MAAM,WAAW,GAAG,sBAAsB,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,QAAQ;IAjEjB;;;OAGG;gBACS,MAAM,EAAE;IACpB;;;OAGG;eACQ,OAAO;IAClB;;OAEG;kBACW,OAAO;IACrB;;;;OAIG;oBACa,MAAM;IACtB;;;OAGG;wBACiB,iCAAiC,CAAC,aAAa,CAAC;IACpE;;;OAGG;kCAC2B,iCAAiC,CAAC,uBAAuB,CAAC;IACxF;;;OAGG;YACK,MAAM,GAAG,WAAW,GAAG,CAAC,CAAC,SAAS,EAAE,MAAM,KAAK,MAAM,GAAG,WAAW,CAAC;IAC5E;;OAEG;gBACS,cAAc,CAAC,MAAM,CAAC;IAClC;;;OAGG;uBACgB,MAAM,GAAG,UAAU;IACtC;;OAEG;sBACe,cAAc,CAAC,MAAM,CAAC;IACxC;;OAEG;iBACU,sBAAsB,CAAC,QAAQ,CAAC;IAC7C;;OAEG;wBACiB,mBAAmB,CAAC,aAAa,CAAC;iDAqMzD,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { ScrubberBeaconComponent, ScrubberBeaconProps } from './Scrubber';
2
+ export type ScrubberBeaconGroupRef = {
3
+ /**
4
+ * Triggers a pulse animation on all beacons.
5
+ */
6
+ pulse: () => void;
7
+ };
8
+ export type ScrubberBeaconGroupBaseProps = {
9
+ /**
10
+ * Array of series IDs to render beacons for.
11
+ */
12
+ seriesIds: string[];
13
+ /**
14
+ * Pulse the beacons while at rest.
15
+ */
16
+ idlePulse?: boolean;
17
+ };
18
+ export type ScrubberBeaconGroupProps = ScrubberBeaconGroupBaseProps & {
19
+ /**
20
+ * Transition configuration for beacon animations.
21
+ */
22
+ transitions?: ScrubberBeaconProps['transitions'];
23
+ /**
24
+ * Custom component for the scrubber beacon.
25
+ * @default DefaultScrubberBeacon
26
+ */
27
+ BeaconComponent?: ScrubberBeaconComponent;
28
+ };
29
+ export declare const ScrubberBeaconGroup: import('react').MemoExoticComponent<
30
+ import('react').ForwardRefExoticComponent<
31
+ ScrubberBeaconGroupBaseProps & {
32
+ /**
33
+ * Transition configuration for beacon animations.
34
+ */
35
+ transitions?: ScrubberBeaconProps['transitions'];
36
+ /**
37
+ * Custom component for the scrubber beacon.
38
+ * @default DefaultScrubberBeacon
39
+ */
40
+ BeaconComponent?: ScrubberBeaconComponent;
41
+ } & import('react').RefAttributes<ScrubberBeaconGroupRef>
42
+ >
43
+ >;
44
+ //# sourceMappingURL=ScrubberBeaconGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScrubberBeaconGroup.d.ts","sourceRoot":"","sources":["../../../src/chart/scrubber/ScrubberBeaconGroup.tsx"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,uBAAuB,EAAE,mBAAmB,EAAqB,MAAM,YAAY,CAAC;AAgHlG,MAAM,MAAM,sBAAsB,GAAG;IACnC;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IACzC;;OAEG;IACH,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG,4BAA4B,GAAG;IACpE;;OAEG;IACH,WAAW,CAAC,EAAE,mBAAmB,CAAC,aAAa,CAAC,CAAC;IACjD;;;OAGG;IACH,eAAe,CAAC,EAAE,uBAAuB,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,mBAAmB;IAX9B;;OAEG;kBACW,mBAAmB,CAAC,aAAa,CAAC;IAChD;;;OAGG;sBACe,uBAAuB;2DAqE1C,CAAC"}
@@ -0,0 +1,31 @@
1
+ import type { ChartTextProps } from '../text';
2
+ import type { ScrubberBeaconLabelComponent, ScrubberBeaconLabelProps } from './Scrubber';
3
+ export type ScrubberBeaconLabelGroupBaseProps = {
4
+ /**
5
+ * Labels to be displayed.
6
+ */
7
+ labels: Array<Pick<ScrubberBeaconLabelProps, 'seriesId' | 'label' | 'color'>>;
8
+ /**
9
+ * Minimum gap between labels in pixels.
10
+ * @default 4
11
+ */
12
+ labelMinGap?: number;
13
+ /**
14
+ * Horizontal offset of labels from the scrubber line in pixels.
15
+ * @default 16
16
+ */
17
+ labelHorizontalOffset?: number;
18
+ /**
19
+ * Font style for the beacon labels.
20
+ */
21
+ labelFont?: ChartTextProps['font'];
22
+ };
23
+ export type ScrubberBeaconLabelGroupProps = ScrubberBeaconLabelGroupBaseProps & {
24
+ /**
25
+ * Custom component to render as a scrubber beacon label.
26
+ * @default DefaultScrubberBeaconLabel
27
+ */
28
+ BeaconLabelComponent?: ScrubberBeaconLabelComponent;
29
+ };
30
+ export declare const ScrubberBeaconLabelGroup: import('react').NamedExoticComponent<ScrubberBeaconLabelGroupProps>;
31
+ //# sourceMappingURL=ScrubberBeaconLabelGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScrubberBeaconLabelGroup.d.ts","sourceRoot":"","sources":["../../../src/chart/scrubber/ScrubberBeaconLabelGroup.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAW9C,OAAO,KAAK,EAAE,4BAA4B,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AA2DzF,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;CACpC,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG,iCAAiC,GAAG;IAC9E;;;OAGG;IACH,oBAAoB,CAAC,EAAE,4BAA4B,CAAC;CACrD,CAAC;AAEF,eAAO,MAAM,wBAAwB,qEAgLpC,CAAC"}
@@ -1,13 +1,16 @@
1
1
  import React from 'react';
2
2
  import { type ScrubberContextValue } from '../utils';
3
- export type ScrubberProviderProps = Partial<
4
- Pick<ScrubberContextValue, 'enableScrubbing' | 'onScrubberPositionChange'>
5
- > & {
3
+ export type ScrubberProviderProps = Partial<Pick<ScrubberContextValue, 'enableScrubbing'>> & {
6
4
  children: React.ReactNode;
7
5
  /**
8
6
  * Allows continuous gestures on the chart to continue outside the bounds of the chart element.
9
7
  */
10
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;
11
14
  };
12
15
  /**
13
16
  * A component which encapsulates the ScrubberContext.