@coinbase/cds-mobile-visualization 3.3.0 → 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 (265) hide show
  1. package/CHANGELOG.md +80 -0
  2. package/dts/chart/CartesianChart.d.ts +125 -0
  3. package/dts/chart/CartesianChart.d.ts.map +1 -0
  4. package/dts/chart/ChartContextBridge.d.ts +28 -0
  5. package/dts/chart/ChartContextBridge.d.ts.map +1 -0
  6. package/dts/chart/ChartProvider.d.ts +6 -0
  7. package/dts/chart/ChartProvider.d.ts.map +1 -0
  8. package/dts/chart/Path.d.ts +91 -0
  9. package/dts/chart/Path.d.ts.map +1 -0
  10. package/dts/chart/PeriodSelector.d.ts +85 -0
  11. package/dts/chart/PeriodSelector.d.ts.map +1 -0
  12. package/dts/chart/area/Area.d.ts +77 -0
  13. package/dts/chart/area/Area.d.ts.map +1 -0
  14. package/dts/chart/area/AreaChart.d.ts +131 -0
  15. package/dts/chart/area/AreaChart.d.ts.map +1 -0
  16. package/dts/chart/area/DottedArea.d.ts +46 -0
  17. package/dts/chart/area/DottedArea.d.ts.map +1 -0
  18. package/dts/chart/area/GradientArea.d.ts +36 -0
  19. package/dts/chart/area/GradientArea.d.ts.map +1 -0
  20. package/dts/chart/area/SolidArea.d.ts +23 -0
  21. package/dts/chart/area/SolidArea.d.ts.map +1 -0
  22. package/dts/chart/area/index.d.ts +6 -0
  23. package/dts/chart/area/index.d.ts.map +1 -0
  24. package/dts/chart/axis/Axis.d.ts +194 -0
  25. package/dts/chart/axis/Axis.d.ts.map +1 -0
  26. package/dts/chart/axis/DefaultAxisTickLabel.d.ts +8 -0
  27. package/dts/chart/axis/DefaultAxisTickLabel.d.ts.map +1 -0
  28. package/dts/chart/axis/XAxis.d.ts +16 -0
  29. package/dts/chart/axis/XAxis.d.ts.map +1 -0
  30. package/dts/chart/axis/YAxis.d.ts +21 -0
  31. package/dts/chart/axis/YAxis.d.ts.map +1 -0
  32. package/dts/chart/axis/index.d.ts +5 -0
  33. package/dts/chart/axis/index.d.ts.map +1 -0
  34. package/dts/chart/bar/Bar.d.ts +92 -0
  35. package/dts/chart/bar/Bar.d.ts.map +1 -0
  36. package/dts/chart/bar/BarChart.d.ts +113 -0
  37. package/dts/chart/bar/BarChart.d.ts.map +1 -0
  38. package/dts/chart/bar/BarPlot.d.ts +30 -0
  39. package/dts/chart/bar/BarPlot.d.ts.map +1 -0
  40. package/dts/chart/bar/BarStack.d.ts +102 -0
  41. package/dts/chart/bar/BarStack.d.ts.map +1 -0
  42. package/dts/chart/bar/BarStackGroup.d.ts +36 -0
  43. package/dts/chart/bar/BarStackGroup.d.ts.map +1 -0
  44. package/dts/chart/bar/DefaultBar.d.ts +7 -0
  45. package/dts/chart/bar/DefaultBar.d.ts.map +1 -0
  46. package/dts/chart/bar/DefaultBarStack.d.ts +7 -0
  47. package/dts/chart/bar/DefaultBarStack.d.ts.map +1 -0
  48. package/dts/chart/bar/index.d.ts +8 -0
  49. package/dts/chart/bar/index.d.ts.map +1 -0
  50. package/dts/chart/gradient/Gradient.d.ts +25 -0
  51. package/dts/chart/gradient/Gradient.d.ts.map +1 -0
  52. package/dts/chart/gradient/index.d.ts +2 -0
  53. package/dts/chart/gradient/index.d.ts.map +1 -0
  54. package/dts/chart/index.d.ts +15 -0
  55. package/dts/chart/index.d.ts.map +1 -0
  56. package/dts/chart/line/DefaultReferenceLineLabel.d.ts +9 -0
  57. package/dts/chart/line/DefaultReferenceLineLabel.d.ts.map +1 -0
  58. package/dts/chart/line/DottedLine.d.ts +20 -0
  59. package/dts/chart/line/DottedLine.d.ts.map +1 -0
  60. package/dts/chart/line/Line.d.ts +115 -0
  61. package/dts/chart/line/Line.d.ts.map +1 -0
  62. package/dts/chart/line/LineChart.d.ts +118 -0
  63. package/dts/chart/line/LineChart.d.ts.map +1 -0
  64. package/dts/chart/line/ReferenceLine.d.ts +139 -0
  65. package/dts/chart/line/ReferenceLine.d.ts.map +1 -0
  66. package/dts/chart/line/SolidLine.d.ts +15 -0
  67. package/dts/chart/line/SolidLine.d.ts.map +1 -0
  68. package/dts/chart/line/index.d.ts +7 -0
  69. package/dts/chart/line/index.d.ts.map +1 -0
  70. package/dts/chart/point/DefaultPointLabel.d.ts +10 -0
  71. package/dts/chart/point/DefaultPointLabel.d.ts.map +1 -0
  72. package/dts/chart/point/Point.d.ts +120 -0
  73. package/dts/chart/point/Point.d.ts.map +1 -0
  74. package/dts/chart/point/index.d.ts +3 -0
  75. package/dts/chart/point/index.d.ts.map +1 -0
  76. package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts +8 -0
  77. package/dts/chart/scrubber/DefaultScrubberBeacon.d.ts.map +1 -0
  78. package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts +12 -0
  79. package/dts/chart/scrubber/DefaultScrubberBeaconLabel.d.ts.map +1 -0
  80. package/dts/chart/scrubber/DefaultScrubberLabel.d.ts +11 -0
  81. package/dts/chart/scrubber/DefaultScrubberLabel.d.ts.map +1 -0
  82. package/dts/chart/scrubber/Scrubber.d.ts +233 -0
  83. package/dts/chart/scrubber/Scrubber.d.ts.map +1 -0
  84. package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts +44 -0
  85. package/dts/chart/scrubber/ScrubberBeaconGroup.d.ts.map +1 -0
  86. package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts +31 -0
  87. package/dts/chart/scrubber/ScrubberBeaconLabelGroup.d.ts.map +1 -0
  88. package/dts/chart/scrubber/ScrubberProvider.d.ts +20 -0
  89. package/dts/chart/scrubber/ScrubberProvider.d.ts.map +1 -0
  90. package/dts/chart/scrubber/index.d.ts +5 -0
  91. package/dts/chart/scrubber/index.d.ts.map +1 -0
  92. package/dts/chart/text/ChartText.d.ts +164 -0
  93. package/dts/chart/text/ChartText.d.ts.map +1 -0
  94. package/dts/chart/text/ChartTextGroup.d.ts +61 -0
  95. package/dts/chart/text/ChartTextGroup.d.ts.map +1 -0
  96. package/dts/chart/text/index.d.ts +3 -0
  97. package/dts/chart/text/index.d.ts.map +1 -0
  98. package/dts/chart/utils/axis.d.ts +342 -0
  99. package/dts/chart/utils/axis.d.ts.map +1 -0
  100. package/dts/chart/utils/bar.d.ts +20 -0
  101. package/dts/chart/utils/bar.d.ts.map +1 -0
  102. package/dts/chart/utils/chart.d.ts +124 -0
  103. package/dts/chart/utils/chart.d.ts.map +1 -0
  104. package/dts/chart/utils/context.d.ts +116 -0
  105. package/dts/chart/utils/context.d.ts.map +1 -0
  106. package/dts/chart/utils/gradient.d.ts +117 -0
  107. package/dts/chart/utils/gradient.d.ts.map +1 -0
  108. package/dts/chart/utils/index.d.ts +11 -0
  109. package/dts/chart/utils/index.d.ts.map +1 -0
  110. package/dts/chart/utils/path.d.ts +160 -0
  111. package/dts/chart/utils/path.d.ts.map +1 -0
  112. package/dts/chart/utils/point.d.ts +134 -0
  113. package/dts/chart/utils/point.d.ts.map +1 -0
  114. package/dts/chart/utils/scale.d.ts +134 -0
  115. package/dts/chart/utils/scale.d.ts.map +1 -0
  116. package/dts/chart/utils/scrubber.d.ts +39 -0
  117. package/dts/chart/utils/scrubber.d.ts.map +1 -0
  118. package/dts/chart/utils/transition.d.ts +140 -0
  119. package/dts/chart/utils/transition.d.ts.map +1 -0
  120. package/dts/index.d.ts +2 -1
  121. package/dts/index.d.ts.map +1 -1
  122. package/dts/sparkline/Counter.d.ts +7 -2
  123. package/dts/sparkline/Sparkline.d.ts +67 -16
  124. package/dts/sparkline/Sparkline.d.ts.map +1 -1
  125. package/dts/sparkline/SparklineArea.d.ts +10 -4
  126. package/dts/sparkline/SparklineArea.d.ts.map +1 -1
  127. package/dts/sparkline/SparklineAreaPattern.d.ts +12 -4
  128. package/dts/sparkline/SparklineAreaPattern.d.ts.map +1 -1
  129. package/dts/sparkline/SparklineGradient.d.ts +21 -10
  130. package/dts/sparkline/SparklineGradient.d.ts.map +1 -1
  131. package/dts/sparkline/__figma__/Sparkline.figma.d.ts +1 -1
  132. package/dts/sparkline/generateSparklineWithId.d.ts +8 -2
  133. package/dts/sparkline/generateSparklineWithId.d.ts.map +1 -1
  134. package/dts/sparkline/index.d.ts +1 -1
  135. package/dts/sparkline/sparkline-interactive/SparklineAccessibleView.d.ts +8 -3
  136. package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts +132 -110
  137. package/dts/sparkline/sparkline-interactive/SparklineInteractive.d.ts.map +1 -1
  138. package/dts/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.d.ts +22 -9
  139. package/dts/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.d.ts.map +1 -1
  140. package/dts/sparkline/sparkline-interactive/SparklineInteractiveHoverDate.d.ts +18 -7
  141. package/dts/sparkline/sparkline-interactive/SparklineInteractiveLineVertical.d.ts +9 -4
  142. package/dts/sparkline/sparkline-interactive/SparklineInteractiveMarkerDates.d.ts +11 -6
  143. package/dts/sparkline/sparkline-interactive/SparklineInteractiveMinMax.d.ts +7 -5
  144. package/dts/sparkline/sparkline-interactive/SparklineInteractivePanGestureHandler.d.ts +22 -10
  145. package/dts/sparkline/sparkline-interactive/SparklineInteractivePaths.d.ts +21 -7
  146. package/dts/sparkline/sparkline-interactive/SparklineInteractivePaths.d.ts.map +1 -1
  147. package/dts/sparkline/sparkline-interactive/SparklineInteractivePeriodSelector.d.ts +21 -16
  148. package/dts/sparkline/sparkline-interactive/SparklineInteractiveProvider.d.ts +29 -23
  149. package/dts/sparkline/sparkline-interactive/SparklineInteractiveTimeseriesPaths.d.ts +22 -14
  150. package/dts/sparkline/sparkline-interactive/__figma__/SparklineInteractive.figma.d.ts +1 -1
  151. package/dts/sparkline/sparkline-interactive/useInterruptiblePathAnimation.d.ts +9 -5
  152. package/dts/sparkline/sparkline-interactive/useMinMaxTransform.d.ts +11 -6
  153. package/dts/sparkline/sparkline-interactive/useOpacityAnimation.d.ts +5 -2
  154. package/dts/sparkline/sparkline-interactive/useSparklineInteractiveConstants.d.ts +17 -17
  155. package/dts/sparkline/sparkline-interactive/useSparklineInteractiveLineStyles.d.ts +16 -13
  156. package/dts/sparkline/sparkline-interactive-header/SparklineInteractiveHeader.d.ts +106 -98
  157. package/dts/sparkline/sparkline-interactive-header/__figma__/SparklineInteractiveHeader.figma.d.ts +1 -1
  158. package/dts/sparkline/sparkline-interactive-header/useSparklineInteractiveHeaderStyles.d.ts +22 -19
  159. package/esm/chart/CartesianChart.js +335 -0
  160. package/esm/chart/ChartContextBridge.js +148 -0
  161. package/esm/chart/ChartProvider.js +10 -0
  162. package/esm/chart/Path.js +218 -0
  163. package/esm/chart/PeriodSelector.js +136 -0
  164. package/esm/chart/__stories__/CartesianChart.stories.js +723 -0
  165. package/esm/chart/__stories__/Chart.stories.js +77 -0
  166. package/esm/chart/__stories__/PeriodSelector.stories.js +322 -0
  167. package/esm/chart/area/Area.js +75 -0
  168. package/esm/chart/area/AreaChart.js +151 -0
  169. package/esm/chart/area/DottedArea.js +80 -0
  170. package/esm/chart/area/GradientArea.js +54 -0
  171. package/esm/chart/area/SolidArea.js +38 -0
  172. package/esm/chart/area/__stories__/AreaChart.stories.js +100 -0
  173. package/esm/chart/area/index.js +7 -0
  174. package/esm/chart/axis/Axis.js +45 -0
  175. package/esm/chart/axis/DefaultAxisTickLabel.js +11 -0
  176. package/esm/chart/axis/XAxis.js +188 -0
  177. package/esm/chart/axis/YAxis.js +177 -0
  178. package/esm/chart/axis/__stories__/Axis.stories.js +276 -0
  179. package/esm/chart/axis/index.js +6 -0
  180. package/esm/chart/bar/Bar.js +69 -0
  181. package/esm/chart/bar/BarChart.js +125 -0
  182. package/esm/chart/bar/BarPlot.js +102 -0
  183. package/esm/chart/bar/BarStack.js +551 -0
  184. package/esm/chart/bar/BarStackGroup.js +79 -0
  185. package/esm/chart/bar/DefaultBar.js +56 -0
  186. package/esm/chart/bar/DefaultBarStack.js +47 -0
  187. package/esm/chart/bar/__stories__/BarChart.stories.js +668 -0
  188. package/esm/chart/bar/index.js +9 -0
  189. package/esm/chart/gradient/Gradient.js +53 -0
  190. package/esm/chart/gradient/index.js +1 -0
  191. package/esm/chart/index.js +16 -0
  192. package/esm/chart/line/DefaultReferenceLineLabel.js +66 -0
  193. package/esm/chart/line/DottedLine.js +50 -0
  194. package/esm/chart/line/Line.js +178 -0
  195. package/esm/chart/line/LineChart.js +121 -0
  196. package/esm/chart/line/ReferenceLine.js +132 -0
  197. package/esm/chart/line/SolidLine.js +46 -0
  198. package/esm/chart/line/__stories__/LineChart.stories.js +2372 -0
  199. package/esm/chart/line/__stories__/ReferenceLine.stories.js +132 -0
  200. package/esm/chart/line/index.js +8 -0
  201. package/esm/chart/point/DefaultPointLabel.js +39 -0
  202. package/esm/chart/point/Point.js +188 -0
  203. package/esm/chart/point/index.js +2 -0
  204. package/esm/chart/scrubber/DefaultScrubberBeacon.js +179 -0
  205. package/esm/chart/scrubber/DefaultScrubberBeaconLabel.js +43 -0
  206. package/esm/chart/scrubber/DefaultScrubberLabel.js +28 -0
  207. package/esm/chart/scrubber/Scrubber.js +166 -0
  208. package/esm/chart/scrubber/ScrubberBeaconGroup.js +161 -0
  209. package/esm/chart/scrubber/ScrubberBeaconLabelGroup.js +185 -0
  210. package/esm/chart/scrubber/ScrubberProvider.js +135 -0
  211. package/esm/chart/scrubber/index.js +4 -0
  212. package/esm/chart/text/ChartText.js +305 -0
  213. package/esm/chart/text/ChartTextGroup.js +211 -0
  214. package/esm/chart/text/index.js +4 -0
  215. package/esm/chart/utils/axis.js +592 -0
  216. package/esm/chart/utils/bar.js +24 -0
  217. package/esm/chart/utils/chart.js +270 -0
  218. package/esm/chart/utils/context.js +15 -0
  219. package/esm/chart/utils/gradient.js +305 -0
  220. package/esm/chart/utils/index.js +12 -0
  221. package/esm/chart/utils/path.js +274 -0
  222. package/esm/chart/utils/point.js +229 -0
  223. package/esm/chart/utils/scale.js +277 -0
  224. package/esm/chart/utils/scrubber.js +139 -0
  225. package/esm/chart/utils/transition.js +185 -0
  226. package/esm/index.js +4 -1
  227. package/esm/sparkline/Sparkline.js +129 -16
  228. package/esm/sparkline/SparklineArea.js +7 -2
  229. package/esm/sparkline/SparklineAreaPattern.js +4 -2
  230. package/esm/sparkline/SparklineGradient.js +4 -0
  231. package/esm/sparkline/__stories__/Sparkline.stories.js +11 -7
  232. package/esm/sparkline/__stories__/SparklineGradient.stories.js +7 -4
  233. package/esm/sparkline/generateSparklineWithId.js +3 -2
  234. package/esm/sparkline/sparkline-interactive/SparklineInteractive.js +5 -1
  235. package/esm/sparkline/sparkline-interactive/SparklineInteractiveAnimatedPath.js +5 -2
  236. package/esm/sparkline/sparkline-interactive/SparklineInteractivePaths.js +4 -0
  237. package/esm/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.js +76 -24
  238. package/esm/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.js +17 -9
  239. package/package.json +17 -11
  240. package/dts/sparkline/__stories__/Sparkline.stories.d.ts +0 -3
  241. package/dts/sparkline/__stories__/Sparkline.stories.d.ts.map +0 -1
  242. package/dts/sparkline/__stories__/SparklineGradient.stories.d.ts +0 -3
  243. package/dts/sparkline/__stories__/SparklineGradient.stories.d.ts.map +0 -1
  244. package/dts/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.d.ts +0 -3
  245. package/dts/sparkline/sparkline-interactive/__stories__/SparklineInteractive.stories.d.ts.map +0 -1
  246. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractive.test.d.ts +0 -2
  247. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractive.test.d.ts.map +0 -1
  248. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractiveHoverDate.test.d.ts +0 -2
  249. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractiveHoverDate.test.d.ts.map +0 -1
  250. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractivePanGestureHandler.test.d.ts +0 -2
  251. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractivePanGestureHandler.test.d.ts.map +0 -1
  252. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractivePeriodSelector.test.d.ts +0 -2
  253. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractivePeriodSelector.test.d.ts.map +0 -1
  254. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractiveTimeseriesPaths.test.d.ts +0 -2
  255. package/dts/sparkline/sparkline-interactive/__tests__/SparklineInteractiveTimeseriesPaths.test.d.ts.map +0 -1
  256. package/dts/sparkline/sparkline-interactive/__tests__/useMinMaxTransform.test.d.ts +0 -2
  257. package/dts/sparkline/sparkline-interactive/__tests__/useMinMaxTransform.test.d.ts.map +0 -1
  258. package/dts/sparkline/sparkline-interactive/useInterruptiblePathAnimation.test.disable.d.ts +0 -2
  259. package/dts/sparkline/sparkline-interactive/useInterruptiblePathAnimation.test.disable.d.ts.map +0 -1
  260. package/dts/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.d.ts +0 -4
  261. package/dts/sparkline/sparkline-interactive-header/__stories__/SparklineInteractiveHeader.stories.d.ts.map +0 -1
  262. package/dts/sparkline/sparkline-interactive-header/__tests__/SparklineInteractiveHeader.test.d.ts +0 -2
  263. package/dts/sparkline/sparkline-interactive-header/__tests__/SparklineInteractiveHeader.test.d.ts.map +0 -1
  264. package/dts/sparkline/sparkline-interactive-header/__tests__/useSparklineInteractiveHeaderStyles.test.d.ts +0 -2
  265. package/dts/sparkline/sparkline-interactive-header/__tests__/useSparklineInteractiveHeaderStyles.test.d.ts.map +0 -1
package/CHANGELOG.md ADDED
@@ -0,0 +1,80 @@
1
+ # @coinbase/cds-mobile-visualization
2
+
3
+ > [NPM registry](https://www.npmjs.com/package/@coinbase/cds-mobile-visualization)
4
+
5
+ All notable changes to this project will be documented in this file.
6
+
7
+ `@coinbase/cds-mobile-visualization` adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
+
9
+ <!-- template-start -->
10
+
11
+ ## 3.4.0-beta.10 (1/6/2026 PST)
12
+
13
+ #### 🐞 Fixes
14
+
15
+ - Fix axis clip line issues when multiple axes are present on one side. [[#285](https://github.com/coinbase/cds/pull/285)]
16
+
17
+ ## 3.4.0-beta.9 (12/18/2025 PST)
18
+
19
+ #### 🐞 Fixes
20
+
21
+ - Fix: update package exports. [[#261](https://github.com/coinbase/cds/pull/261)]
22
+
23
+ #### 📘 Misc
24
+
25
+ - Update storybook to use new Text import. [[#238](https://github.com/coinbase/cds/pull/238)]
26
+
27
+ ## 3.4.0-beta.8 (12/2/2025 PST)
28
+
29
+ #### 🐞 Fixes
30
+
31
+ - Fix reanimated animation warning. [[#211](https://github.com/coinbase/cds/pull/211)]
32
+
33
+ ## 3.4.0-beta.7 (12/2/2025 PST)
34
+
35
+ #### 🐞 Fixes
36
+
37
+ - Fix babel build issue with transitions. [[#201](https://github.com/coinbase/cds/pull/201)]
38
+ - Improve opacity customization for ReferenceLine. [[#201](https://github.com/coinbase/cds/pull/201)]
39
+
40
+ ## 3.4.0-beta.6 (10/16/2025 PST)
41
+
42
+ #### 🚀 Updates
43
+
44
+ - Support connecting null values in Area and Line
45
+ - Added label to XAxis and YAxis
46
+ - Switched charts to @shopify/react-native-skia
47
+ - Added gradient support
48
+
49
+ ## 3.4.0-beta.5 (11/4/2025 PST)
50
+
51
+ This is an artificial version bump with no new change.
52
+
53
+ ## 3.4.0-beta.4 (10/27/2025 PST)
54
+
55
+ This is an artificial version bump with no new change.
56
+
57
+ ## 3.4.0-beta.3 (10/6/2025 PST)
58
+
59
+ This is an artificial version bump with no new change.
60
+
61
+ ## 3.4.0-beta.2 (10/6/2025 PST)
62
+
63
+ This is an artificial version bump with no new change.
64
+
65
+ ## 3.4.0-beta.1 (10/3/2025 PST)
66
+
67
+ #### 🚀 Updates
68
+
69
+ - Introduces new data visualization components: CartesianChart, LineChart, BarChart, etc,
70
+ - Deprecates Sparkline components.
71
+
72
+ ## 3.3.1 (10/1/2025 PST)
73
+
74
+ #### 🐞 Fixes
75
+
76
+ - Update links for new repo. [[#42](https://github.com/coinbase/cds/pull/42)]
77
+
78
+ ## 3.3.0 (9/18/2025 PST)
79
+
80
+ - Prepare for open source release.
@@ -0,0 +1,125 @@
1
+ import React from 'react';
2
+ import { type StyleProp, type View, type ViewStyle } from 'react-native';
3
+ import type { BoxBaseProps, BoxProps } from '@coinbase/cds-mobile/layout';
4
+ import { type SkTypefaceFontProvider } from '@shopify/react-native-skia';
5
+ import { type ScrubberProviderProps } from './scrubber/ScrubberProvider';
6
+ import { type AxisConfigProps, type ChartInset, type Series } from './utils';
7
+ export type CartesianChartBaseProps = Omit<BoxBaseProps, 'fontFamily'> &
8
+ Pick<ScrubberProviderProps, 'enableScrubbing' | 'onScrubberPositionChange'> & {
9
+ /**
10
+ * Configuration objects that define how to visualize the data.
11
+ * Each series contains its own data array.
12
+ */
13
+ series?: Array<Series>;
14
+ /**
15
+ * Whether to animate the chart.
16
+ * @default true
17
+ */
18
+ animate?: boolean;
19
+ /**
20
+ * Configuration for x-axis.
21
+ */
22
+ xAxis?: Partial<Omit<AxisConfigProps, 'id'>>;
23
+ /**
24
+ * Configuration for y-axis(es). Can be a single config or array of configs.
25
+ */
26
+ yAxis?: Partial<AxisConfigProps> | Partial<AxisConfigProps>[];
27
+ /**
28
+ * Inset around the entire chart (outside the axes).
29
+ */
30
+ inset?: number | Partial<ChartInset>;
31
+ };
32
+ export type CartesianChartProps = CartesianChartBaseProps &
33
+ Pick<ScrubberProviderProps, 'allowOverflowGestures'> &
34
+ Omit<BoxProps, 'fontFamily'> & {
35
+ /**
36
+ * Default font families to use within ChartText.
37
+ * If not provided, will be the default for the system.
38
+ * @example
39
+ * ['Helvetica', 'sans-serif']
40
+ */
41
+ fontFamilies?: string[];
42
+ /**
43
+ * Skia font provider to allow for custom fonts.
44
+ * If not provided, the only available fonts will be those defined by the system.
45
+ */
46
+ fontProvider?: SkTypefaceFontProvider;
47
+ /**
48
+ * Custom styles for the root element.
49
+ */
50
+ style?: StyleProp<ViewStyle>;
51
+ /**
52
+ * Custom styles for the component.
53
+ */
54
+ styles?: {
55
+ /**
56
+ * Custom styles for the root element.
57
+ */
58
+ root?: StyleProp<ViewStyle>;
59
+ /**
60
+ * Custom styles for the chart canvas element.
61
+ */
62
+ chart?: StyleProp<ViewStyle>;
63
+ };
64
+ };
65
+ export declare const CartesianChart: React.MemoExoticComponent<
66
+ React.ForwardRefExoticComponent<
67
+ Omit<BoxBaseProps, 'fontFamily'> &
68
+ Pick<ScrubberProviderProps, 'enableScrubbing' | 'onScrubberPositionChange'> & {
69
+ /**
70
+ * Configuration objects that define how to visualize the data.
71
+ * Each series contains its own data array.
72
+ */
73
+ series?: Array<Series>;
74
+ /**
75
+ * Whether to animate the chart.
76
+ * @default true
77
+ */
78
+ animate?: boolean;
79
+ /**
80
+ * Configuration for x-axis.
81
+ */
82
+ xAxis?: Partial<Omit<AxisConfigProps, 'id'>>;
83
+ /**
84
+ * Configuration for y-axis(es). Can be a single config or array of configs.
85
+ */
86
+ yAxis?: Partial<AxisConfigProps> | Partial<AxisConfigProps>[];
87
+ /**
88
+ * Inset around the entire chart (outside the axes).
89
+ */
90
+ inset?: number | Partial<ChartInset>;
91
+ } & Pick<ScrubberProviderProps, 'allowOverflowGestures'> &
92
+ Omit<BoxProps, 'fontFamily'> & {
93
+ /**
94
+ * Default font families to use within ChartText.
95
+ * If not provided, will be the default for the system.
96
+ * @example
97
+ * ['Helvetica', 'sans-serif']
98
+ */
99
+ fontFamilies?: string[];
100
+ /**
101
+ * Skia font provider to allow for custom fonts.
102
+ * If not provided, the only available fonts will be those defined by the system.
103
+ */
104
+ fontProvider?: SkTypefaceFontProvider;
105
+ /**
106
+ * Custom styles for the root element.
107
+ */
108
+ style?: StyleProp<ViewStyle>;
109
+ /**
110
+ * Custom styles for the component.
111
+ */
112
+ styles?: {
113
+ /**
114
+ * Custom styles for the root element.
115
+ */
116
+ root?: StyleProp<ViewStyle>;
117
+ /**
118
+ * Custom styles for the chart canvas element.
119
+ */
120
+ chart?: StyleProp<ViewStyle>;
121
+ };
122
+ } & React.RefAttributes<View>
123
+ >
124
+ >;
125
+ //# sourceMappingURL=CartesianChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CartesianChart.d.ts","sourceRoot":"","sources":["../../src/chart/CartesianChart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAGzE,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAE1E,OAAO,EAAgB,KAAK,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAEvF,OAAO,EAAoB,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAI3F,OAAO,EAEL,KAAK,eAAe,EAEpB,KAAK,UAAU,EAUf,KAAK,MAAM,EAEZ,MAAM,SAAS,CAAC;AAcjB,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,GACpE,IAAI,CAAC,qBAAqB,EAAE,iBAAiB,GAAG,0BAA0B,CAAC,GAAG;IAC5E;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;IACvB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC,CAAC;IAC7C;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,EAAE,CAAC;IAC9D;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACtC,CAAC;AAEJ,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,GACvD,IAAI,CAAC,qBAAqB,EAAE,uBAAuB,CAAC,GACpD,IAAI,CAAC,QAAQ,EAAE,YAAY,CAAC,GAAG;IAC7B;;;;;OAKG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB;;;OAGG;IACH,YAAY,CAAC,EAAE,sBAAsB,CAAC;IACtC;;OAEG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B;;OAEG;IACH,MAAM,CAAC,EAAE;QACP;;WAEG;QACH,IAAI,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC5B;;WAEG;QACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;KAC9B,CAAC;CACH,CAAC;AAEJ,eAAO,MAAM,cAAc;IA1DvB;;;OAGG;aACM,KAAK,CAAC,MAAM,CAAC;IACtB;;;OAGG;cACO,OAAO;IACjB;;OAEG;YACK,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC;IAC5C;;OAEG;YACK,OAAO,CAAC,eAAe,CAAC,GAAG,OAAO,CAAC,eAAe,CAAC,EAAE;IAC7D;;OAEG;YACK,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;;IAMpC;;;;;OAKG;mBACY,MAAM,EAAE;IACvB;;;OAGG;mBACY,sBAAsB;IACrC;;OAEG;YACK,SAAS,CAAC,SAAS,CAAC;IAC5B;;OAEG;aACM;QACP;;WAEG;QACH,IAAI,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;QAC5B;;WAEG;QACH,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;KAC9B;+BAqWJ,CAAC"}
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Simplified context bridge utilities for React Native.
3
+ * Adapted from its-fine to enable context sharing across React renderers
4
+ * https://github.com/pmndrs/its-fine/blob/598b81f02778c22ed21121c2b1a786bdefb14e23/src/index.tsx
5
+ */
6
+ import * as React from 'react';
7
+ /**
8
+ * A react-internal tree node provider that binds React children to the React tree for chart context bridging.
9
+ */
10
+ export declare class ChartBridgeProvider extends React.Component<{
11
+ children?: React.ReactNode;
12
+ }> {
13
+ private _reactInternals;
14
+ render(): import('react/jsx-runtime').JSX.Element;
15
+ }
16
+ export type ContextMap = Map<React.Context<any>, any> & {
17
+ get<T>(context: React.Context<T>): T | undefined;
18
+ };
19
+ /**
20
+ * Represents a chart context bridge provider component.
21
+ */
22
+ export type ChartContextBridge = React.FC<React.PropsWithChildren<object>>;
23
+ /**
24
+ * Returns a ChartContextBridge of live context providers to pierce Context across renderers.
25
+ * Pass ChartContextBridge as a component to a secondary renderer (e.g., Skia Canvas) to enable context-sharing in charts.
26
+ */
27
+ export declare function useChartContextBridge(): ChartContextBridge;
28
+ //# sourceMappingURL=ChartContextBridge.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartContextBridge.d.ts","sourceRoot":"","sources":["../../src/chart/ChartContextBridge.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAwE/B;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK,CAAC,SAAS,CAAC;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC;IACtF,OAAO,CAAC,eAAe,CAAY;IAEnC,MAAM;CAOP;AA4BD,MAAM,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,GAAG;IACtD,GAAG,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,SAAS,CAAC;CAClD,CAAC;AA8BF;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC,CAAC;AAE3E;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,kBAAkB,CAgB1D"}
@@ -0,0 +1,6 @@
1
+ import type { CartesianChartContextValue } from './utils';
2
+ export declare const useCartesianChartContext: () => CartesianChartContextValue;
3
+ export declare const CartesianChartProvider: import('react').Provider<
4
+ CartesianChartContextValue | undefined
5
+ >;
6
+ //# sourceMappingURL=ChartProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChartProvider.d.ts","sourceRoot":"","sources":["../../src/chart/ChartProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAI1D,eAAO,MAAM,wBAAwB,QAAO,0BAQ3C,CAAC;AAEF,eAAO,MAAM,sBAAsB,kEAAiC,CAAC"}
@@ -0,0 +1,91 @@
1
+ import type { Rect } from '@coinbase/cds-common/types';
2
+ import { type AnimatedProp, type PathProps as SkiaPathProps } from '@shopify/react-native-skia';
3
+ import type { Transition } from './utils/transition';
4
+ /**
5
+ * Duration in milliseconds for path enter transition.
6
+ */
7
+ export declare const pathEnterTransitionDuration = 500;
8
+ export type PathBaseProps = {
9
+ /**
10
+ * Whether to animate this path. Overrides the animate prop on the Chart component.
11
+ */
12
+ animate?: boolean;
13
+ /**
14
+ * Initial path for enter animation.
15
+ * When provided, the first animation will go from initialPath to d.
16
+ * If not provided, defaults to d (no enter animation).
17
+ */
18
+ initialPath?: string;
19
+ /**
20
+ * Fill color for the path.
21
+ * When provided, will render a fill with the given color.
22
+ * If not provided, will not render a fill.
23
+ */
24
+ fill?: string;
25
+ /**
26
+ * Opacity for the path fill.
27
+ */
28
+ fillOpacity?: number;
29
+ /**
30
+ * Stroke color for the path.
31
+ * When provided, will render a fill with the given color.
32
+ * If not provided, will not render a fill.
33
+ */
34
+ stroke?: string;
35
+ /**
36
+ * Opacity for the path stroke.
37
+ */
38
+ strokeOpacity?: AnimatedProp<number>;
39
+ };
40
+ export type PathProps = PathBaseProps &
41
+ Pick<
42
+ SkiaPathProps,
43
+ | 'antiAlias'
44
+ | 'blendMode'
45
+ | 'children'
46
+ | 'dither'
47
+ | 'invertClip'
48
+ | 'origin'
49
+ | 'matrix'
50
+ | 'strokeCap'
51
+ | 'strokeJoin'
52
+ | 'strokeMiter'
53
+ | 'strokeWidth'
54
+ | 'style'
55
+ | 'transform'
56
+ > & {
57
+ /**
58
+ * The SVG path data string.
59
+ */
60
+ d?: AnimatedProp<string | undefined>;
61
+ /**
62
+ * Offset added to the clip rect boundaries.
63
+ */
64
+ clipOffset?: number;
65
+ /**
66
+ * Custom clip path.
67
+ * When set, overrides clipRect.
68
+ * @note pass null to disable clipping.
69
+ */
70
+ clipPath?: string | null;
71
+ /**
72
+ * Custom clip path rect. If provided, this overrides the default chart rect for clipping.
73
+ * @default drawingArea of chart + clipOffset
74
+ * Will be overridden by clipPath if set.
75
+ */
76
+ clipRect?: Rect;
77
+ /**
78
+ * Animation transition
79
+ *
80
+ * @example
81
+ * // Duration based
82
+ * transition={{ type: 'timing', duration: 300 }}
83
+ *
84
+ * @example
85
+ * // Spring based
86
+ * transition={{ type: 'spring', damping: 20, stiffness: 300 }}
87
+ */
88
+ transition?: Transition;
89
+ };
90
+ export declare const Path: import('react').NamedExoticComponent<PathProps>;
91
+ //# sourceMappingURL=Path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Path.d.ts","sourceRoot":"","sources":["../../src/chart/Path.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,4BAA4B,CAAC;AACvD,OAAO,EACL,KAAK,YAAY,EAGjB,KAAK,SAAS,IAAI,aAAa,EAGhC,MAAM,4BAA4B,CAAC;AAEpC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAKrD;;GAEG;AACH,eAAO,MAAM,2BAA2B,MAAM,CAAC;AAE/C,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,aAAa,CAAC,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,aAAa,GACnC,IAAI,CACF,aAAa,EACX,WAAW,GACX,WAAW,GACX,UAAU,GACV,QAAQ,GACR,YAAY,GACZ,QAAQ,GACR,QAAQ,GACR,WAAW,GACX,YAAY,GACZ,aAAa,GACb,aAAa,GACb,OAAO,GACP,WAAW,CACd,GAAG;IACF;;OAEG;IACH,CAAC,CAAC,EAAE,YAAY,CAAC,MAAM,GAAG,SAAS,CAAC,CAAC;IACrC;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB;;;;;;;;;;OAUG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAqEJ,eAAO,MAAM,IAAI,iDAwJf,CAAC"}
@@ -0,0 +1,85 @@
1
+ import React from 'react';
2
+ import { View } from 'react-native';
3
+ import { type SegmentedTabsProps, type TabsActiveIndicatorProps } from '@coinbase/cds-mobile/tabs';
4
+ import { type TextBaseProps } from '@coinbase/cds-mobile/typography';
5
+ export declare const PeriodSelectorActiveIndicator: ({
6
+ activeTabRect,
7
+ background,
8
+ position,
9
+ borderRadius,
10
+ }: TabsActiveIndicatorProps) => import('react/jsx-runtime').JSX.Element | undefined;
11
+ export type LiveTabLabelBaseProps = TextBaseProps & {
12
+ /**
13
+ * The label to display.
14
+ * @default 'LIVE'
15
+ */
16
+ label?: string;
17
+ /**
18
+ * Whether to hide the dot.
19
+ */
20
+ hideDot?: boolean;
21
+ /**
22
+ * Style prop for customization
23
+ */
24
+ style?: any;
25
+ };
26
+ export type LiveTabLabelProps = LiveTabLabelBaseProps;
27
+ export declare const LiveTabLabel: React.MemoExoticComponent<
28
+ React.ForwardRefExoticComponent<
29
+ import('@coinbase/cds-mobile/styles/styleProps').StyleProps & {
30
+ children?: React.ReactNode;
31
+ style?: import('react-native').Animated.WithAnimatedValue<
32
+ import('react-native').StyleProp<import('react-native').TextStyle>
33
+ >;
34
+ animated?: boolean;
35
+ align?: 'start' | 'end' | 'center' | 'justify';
36
+ font?: import('@coinbase/cds-common').ThemeVars.FontFamily | 'inherit';
37
+ disabled?: boolean;
38
+ mono?: boolean;
39
+ underline?: boolean;
40
+ tabularNumbers?: boolean;
41
+ numberOfLines?: number;
42
+ ellipsize?: import('react-native').TextProps['ellipsizeMode'];
43
+ noWrap?: boolean;
44
+ dangerouslySetColor?: import('react-native').TextStyle['color'];
45
+ dangerouslySetBackground?: import('react-native').TextStyle['backgroundColor'];
46
+ renderEmptyNode?: boolean;
47
+ testID?: string;
48
+ } & {
49
+ /**
50
+ * The label to display.
51
+ * @default 'LIVE'
52
+ */
53
+ label?: string;
54
+ /**
55
+ * Whether to hide the dot.
56
+ */
57
+ hideDot?: boolean;
58
+ /**
59
+ * Style prop for customization
60
+ */
61
+ style?: any;
62
+ } & React.RefAttributes<View>
63
+ >
64
+ >;
65
+ export type PeriodSelectorProps = SegmentedTabsProps;
66
+ /**
67
+ * PeriodSelector is a specialized version of SegmentedTabs optimized for chart period selection.
68
+ * It provides transparent background, primary wash active state, and full-width layout by default.
69
+ */
70
+ export declare const PeriodSelector: React.MemoExoticComponent<
71
+ React.ForwardRefExoticComponent<
72
+ Partial<
73
+ Pick<
74
+ import('@coinbase/cds-mobile/tabs').TabsProps<string>,
75
+ 'TabComponent' | 'TabsActiveIndicatorComponent'
76
+ >
77
+ > &
78
+ Omit<
79
+ import('@coinbase/cds-mobile/tabs').TabsProps<string>,
80
+ 'TabComponent' | 'TabsActiveIndicatorComponent'
81
+ > &
82
+ React.RefAttributes<any>
83
+ >
84
+ >;
85
+ //# sourceMappingURL=PeriodSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PeriodSelector.d.ts","sourceRoot":"","sources":["../../src/chart/PeriodSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoC,MAAM,OAAO,CAAC;AACzD,OAAO,EAAc,IAAI,EAAkB,MAAM,cAAc,CAAC;AAGhE,OAAO,EAEL,KAAK,kBAAkB,EAEvB,KAAK,wBAAwB,EAC9B,MAAM,2BAA2B,CAAC;AAGnC,OAAO,EAAQ,KAAK,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAG3E,eAAO,MAAM,6BAA6B,GAAI,wDAK3C,wBAAwB,wDAmD1B,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,aAAa,GAAG;IAClD;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,KAAK,CAAC,EAAE,GAAG,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AAStD,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;IAxBvB;;;OAGG;YACK,MAAM;IACd;;OAEG;cACO,OAAO;IACjB;;OAEG;YACK,GAAG;+BAyCZ,CAAC;AASF,MAAM,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAErD;;;GAGG;AACH,eAAO,MAAM,cAAc,6TA0B1B,CAAC"}
@@ -0,0 +1,77 @@
1
+ import React from 'react';
2
+ import { type ChartPathCurveType, type Transition } from '../utils';
3
+ import type { GradientDefinition } from '../utils/gradient';
4
+ export type AreaBaseProps = {
5
+ /**
6
+ * The ID of the series to render. Will be used to find the data from the chart context.
7
+ */
8
+ seriesId: string;
9
+ /**
10
+ * The curve interpolation method to use for the line.
11
+ * @default 'bump'
12
+ */
13
+ curve?: ChartPathCurveType;
14
+ /**
15
+ * The type of area to render.
16
+ * @default 'solid'
17
+ */
18
+ type?: 'solid' | 'dotted' | 'gradient';
19
+ /**
20
+ * Component to render the area.
21
+ * Takes precedence over the type prop if provided.
22
+ */
23
+ AreaComponent?: AreaComponent;
24
+ /**
25
+ * When true, the area is connected across null values.
26
+ */
27
+ connectNulls?: boolean;
28
+ /**
29
+ * The color of the area.
30
+ * @default color of the series or 'var(--color-fgPrimary)'
31
+ */
32
+ fill?: string;
33
+ /**
34
+ * Opacity of the area
35
+ * @note when combined with gradient, both will be applied
36
+ * @default 1
37
+ */
38
+ fillOpacity?: number;
39
+ /**
40
+ * Baseline value for the gradient.
41
+ * When set, overrides the default baseline.
42
+ */
43
+ baseline?: number;
44
+ /**
45
+ * Gradient configuration.
46
+ * When provided, creates gradient or threshold-based coloring.
47
+ */
48
+ gradient?: GradientDefinition;
49
+ /**
50
+ * Whether to animate the area.
51
+ * Overrides the animate value from the chart context.
52
+ */
53
+ animate?: boolean;
54
+ };
55
+ export type AreaProps = AreaBaseProps & {
56
+ /**
57
+ * Transition configuration for path animations.
58
+ */
59
+ transition?: Transition;
60
+ };
61
+ export type AreaComponentProps = Pick<
62
+ AreaProps,
63
+ 'fill' | 'fillOpacity' | 'baseline' | 'gradient' | 'animate' | 'transition'
64
+ > & {
65
+ /**
66
+ * Path of the area
67
+ */
68
+ d: string;
69
+ /**
70
+ * ID of the y-axis to use.
71
+ * If not provided, defaults to the default y-axis.
72
+ */
73
+ yAxisId?: string;
74
+ };
75
+ export type AreaComponent = React.FC<AreaComponentProps>;
76
+ export declare const Area: React.NamedExoticComponent<AreaProps>;
77
+ //# sourceMappingURL=Area.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Area.d.ts","sourceRoot":"","sources":["../../../src/chart/area/Area.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwB,MAAM,OAAO,CAAC;AAG7C,OAAO,EAAE,KAAK,kBAAkB,EAAe,KAAK,UAAU,EAAE,MAAM,UAAU,CAAC;AACjF,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAM5D,MAAM,MAAM,aAAa,GAAG;IAC1B;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,UAAU,CAAC;IACvC;;;OAGG;IACH,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,kBAAkB,CAAC;IAC9B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG;IACtC;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,SAAS,EACT,MAAM,GAAG,aAAa,GAAG,UAAU,GAAG,UAAU,GAAG,SAAS,GAAG,YAAY,CAC5E,GAAG;IACF;;OAEG;IACH,CAAC,EAAE,MAAM,CAAC;IACV;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAAC,CAAC;AAEzD,eAAO,MAAM,IAAI,uCA+EhB,CAAC"}
@@ -0,0 +1,131 @@
1
+ import type { View } from 'react-native';
2
+ import { type XAxisProps, type YAxisProps } from '../axis';
3
+ import { type CartesianChartBaseProps, type CartesianChartProps } from '../CartesianChart';
4
+ import { type LineProps } from '../line/Line';
5
+ import { type AxisConfigProps, type Series } from '../utils';
6
+ import { type AreaProps } from './Area';
7
+ export type AreaSeries = Series &
8
+ Partial<
9
+ Pick<
10
+ AreaProps,
11
+ 'AreaComponent' | 'curve' | 'fillOpacity' | 'type' | 'fill' | 'connectNulls' | 'transition'
12
+ >
13
+ > &
14
+ Partial<Pick<LineProps, 'LineComponent' | 'strokeWidth' | 'stroke' | 'opacity'>> & {
15
+ /**
16
+ * The type of line to render for this series.
17
+ * Overrides the chart-level lineType if provided.
18
+ * @default 'solid'
19
+ */
20
+ lineType?: 'solid' | 'dotted';
21
+ };
22
+ export type AreaChartBaseProps = Omit<CartesianChartBaseProps, 'xAxis' | 'yAxis' | 'series'> &
23
+ Pick<
24
+ AreaProps,
25
+ 'AreaComponent' | 'curve' | 'fillOpacity' | 'type' | 'connectNulls' | 'transition'
26
+ > &
27
+ Pick<LineProps, 'LineComponent' | 'strokeWidth'> & {
28
+ /**
29
+ * Configuration objects that define how to visualize the data.
30
+ * Each series supports Area and Line component props for individual customization.
31
+ */
32
+ series?: Array<AreaSeries>;
33
+ /**
34
+ * Whether to stack the areas on top of each other.
35
+ * When true, each series builds cumulative values on top of the previous series.
36
+ *
37
+ * **Note**: Only applies to series data containing singular numbers (e.g., `[10, 20, 30]`).
38
+ * Series with [baseline, value] tuples (e.g., `[[0, 10], [0, -5]]`) will be skipped during stacking
39
+ * and rendered as-is.
40
+ */
41
+ stacked?: boolean;
42
+ /**
43
+ * Whether to show the X axis.
44
+ */
45
+ showXAxis?: boolean;
46
+ /**
47
+ * Whether to show the Y axis.
48
+ */
49
+ showYAxis?: boolean;
50
+ /**
51
+ * Whether to show lines on top of the areas.
52
+ * Useful for stacked contexts to show the outline of each area.
53
+ */
54
+ showLines?: boolean;
55
+ /**
56
+ * The type of line to render.
57
+ * @default 'solid'
58
+ */
59
+ lineType?: 'solid' | 'dotted';
60
+ /**
61
+ * Configuration for x-axis.
62
+ * Accepts axis config and axis props.
63
+ * To show the axis, set `showXAxis` to true.
64
+ */
65
+ xAxis?: Partial<AxisConfigProps> & XAxisProps;
66
+ /**
67
+ * Configuration for y-axis.
68
+ * Accepts axis config and axis props.
69
+ * To show the axis, set `showYAxis` to true.
70
+ */
71
+ yAxis?: Partial<AxisConfigProps> & YAxisProps;
72
+ };
73
+ export type AreaChartProps = AreaChartBaseProps &
74
+ Omit<CartesianChartProps, 'xAxis' | 'yAxis' | 'series'>;
75
+ export declare const AreaChart: import('react').MemoExoticComponent<
76
+ import('react').ForwardRefExoticComponent<
77
+ Omit<CartesianChartBaseProps, 'series' | 'xAxis' | 'yAxis'> &
78
+ Pick<
79
+ AreaProps,
80
+ 'type' | 'curve' | 'connectNulls' | 'transition' | 'fillOpacity' | 'AreaComponent'
81
+ > &
82
+ Pick<LineProps, 'strokeWidth' | 'LineComponent'> & {
83
+ /**
84
+ * Configuration objects that define how to visualize the data.
85
+ * Each series supports Area and Line component props for individual customization.
86
+ */
87
+ series?: Array<AreaSeries>;
88
+ /**
89
+ * Whether to stack the areas on top of each other.
90
+ * When true, each series builds cumulative values on top of the previous series.
91
+ *
92
+ * **Note**: Only applies to series data containing singular numbers (e.g., `[10, 20, 30]`).
93
+ * Series with [baseline, value] tuples (e.g., `[[0, 10], [0, -5]]`) will be skipped during stacking
94
+ * and rendered as-is.
95
+ */
96
+ stacked?: boolean;
97
+ /**
98
+ * Whether to show the X axis.
99
+ */
100
+ showXAxis?: boolean;
101
+ /**
102
+ * Whether to show the Y axis.
103
+ */
104
+ showYAxis?: boolean;
105
+ /**
106
+ * Whether to show lines on top of the areas.
107
+ * Useful for stacked contexts to show the outline of each area.
108
+ */
109
+ showLines?: boolean;
110
+ /**
111
+ * The type of line to render.
112
+ * @default 'solid'
113
+ */
114
+ lineType?: 'solid' | 'dotted';
115
+ /**
116
+ * Configuration for x-axis.
117
+ * Accepts axis config and axis props.
118
+ * To show the axis, set `showXAxis` to true.
119
+ */
120
+ xAxis?: Partial<AxisConfigProps> & XAxisProps;
121
+ /**
122
+ * Configuration for y-axis.
123
+ * Accepts axis config and axis props.
124
+ * To show the axis, set `showYAxis` to true.
125
+ */
126
+ yAxis?: Partial<AxisConfigProps> & YAxisProps;
127
+ } & Omit<CartesianChartProps, 'series' | 'xAxis' | 'yAxis'> &
128
+ import('react').RefAttributes<View>
129
+ >
130
+ >;
131
+ //# sourceMappingURL=AreaChart.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AreaChart.d.ts","sourceRoot":"","sources":["../../../src/chart/area/AreaChart.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAS,KAAK,UAAU,EAAS,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AACzE,OAAO,EAEL,KAAK,uBAAuB,EAC5B,KAAK,mBAAmB,EACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,EACL,KAAK,eAAe,EAIpB,KAAK,MAAM,EACZ,MAAM,UAAU,CAAC;AAElB,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAE9C,MAAM,MAAM,UAAU,GAAG,MAAM,GAC7B,OAAO,CACL,IAAI,CACF,SAAS,EACT,eAAe,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,cAAc,GAAG,YAAY,CAC5F,CACF,GACD,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,aAAa,GAAG,QAAQ,GAAG,SAAS,CAAC,CAAC,GAAG;IACjF;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;CAC/B,CAAC;AAEJ,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,uBAAuB,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC,GAC1F,IAAI,CACF,SAAS,EACT,eAAe,GAAG,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,cAAc,GAAG,YAAY,CACnF,GACD,IAAI,CAAC,SAAS,EAAE,eAAe,GAAG,aAAa,CAAC,GAAG;IACjD;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC3B;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAC9B;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC;IAC9C;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC;CAC/C,CAAC;AAEJ,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAC7C,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAC,CAAC;AAE1D,eAAO,MAAM,SAAS;IAjDlB;;;OAGG;aACM,KAAK,CAAC,UAAU,CAAC;IAC1B;;;;;;;OAOG;cACO,OAAO;IACjB;;OAEG;gBACS,OAAO;IACnB;;OAEG;gBACS,OAAO;IACnB;;;OAGG;gBACS,OAAO;IACnB;;;OAGG;eACQ,OAAO,GAAG,QAAQ;IAC7B;;;;OAIG;YACK,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU;IAC7C;;;;OAIG;YACK,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU;mGAkLhD,CAAC"}