@ledgerhq/lumen-ui-rnative-visualization 0.1.17 → 0.1.19

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 (219) hide show
  1. package/dist/module/lib/Components/Axis/XAxis/XAxis.js +4 -3
  2. package/dist/module/lib/Components/Axis/XAxis/XAxis.js.map +1 -1
  3. package/dist/module/lib/Components/Axis/XAxis/XAxis.test.js +14 -0
  4. package/dist/module/lib/Components/Axis/XAxis/XAxis.test.js.map +1 -1
  5. package/dist/module/lib/Components/Axis/YAxis/YAxis.js +4 -3
  6. package/dist/module/lib/Components/Axis/YAxis/YAxis.js.map +1 -1
  7. package/dist/module/lib/Components/Axis/YAxis/YAxis.test.js +14 -0
  8. package/dist/module/lib/Components/Axis/YAxis/YAxis.test.js.map +1 -1
  9. package/dist/module/lib/Components/CartesianChart/CartesianChart.js +30 -23
  10. package/dist/module/lib/Components/CartesianChart/CartesianChart.js.map +1 -1
  11. package/dist/module/lib/Components/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.js +61 -0
  12. package/dist/module/lib/Components/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.js.map +1 -0
  13. package/dist/module/lib/Components/CartesianChart/ChartEmptyLabel/index.js +4 -0
  14. package/dist/module/lib/Components/CartesianChart/ChartEmptyLabel/index.js.map +1 -0
  15. package/dist/module/lib/Components/CartesianChart/{RevealClip/RevealClipDefs.js → RevealAnimation/RevealAnimationProvider.js} +13 -13
  16. package/dist/module/lib/Components/CartesianChart/RevealAnimation/RevealAnimationProvider.js.map +1 -0
  17. package/dist/module/lib/Components/CartesianChart/{RevealClip/RevealClipDefs.test.js → RevealAnimation/RevealAnimationProvider.test.js} +51 -12
  18. package/dist/module/lib/Components/CartesianChart/RevealAnimation/RevealAnimationProvider.test.js.map +1 -0
  19. package/dist/module/lib/Components/CartesianChart/RevealAnimation/context.js +35 -0
  20. package/dist/module/lib/Components/CartesianChart/RevealAnimation/context.js.map +1 -0
  21. package/dist/module/lib/Components/CartesianChart/RevealAnimation/index.js +5 -0
  22. package/dist/module/lib/Components/CartesianChart/RevealAnimation/index.js.map +1 -0
  23. package/dist/module/lib/Components/CartesianChart/RevealAnimation/types.js.map +1 -0
  24. package/dist/module/lib/Components/CartesianChart/RevealAnimation/utils.js +64 -0
  25. package/dist/module/lib/Components/CartesianChart/RevealAnimation/utils.js.map +1 -0
  26. package/dist/module/lib/Components/CartesianChart/hooks/useShimmerAnimation.js +37 -0
  27. package/dist/module/lib/Components/CartesianChart/hooks/useShimmerAnimation.js.map +1 -0
  28. package/dist/module/lib/Components/CartesianChart/utils.js +1 -1
  29. package/dist/module/lib/Components/CartesianChart/utils.js.map +1 -1
  30. package/dist/module/lib/Components/Line/Line.js +18 -11
  31. package/dist/module/lib/Components/Line/Line.js.map +1 -1
  32. package/dist/module/lib/Components/Line/constants.js +5 -0
  33. package/dist/module/lib/Components/Line/constants.js.map +1 -0
  34. package/dist/module/lib/Components/Line/types.js +2 -0
  35. package/dist/module/lib/Components/Line/utils.js +38 -11
  36. package/dist/module/lib/Components/Line/utils.js.map +1 -1
  37. package/dist/module/lib/Components/Line/utils.test.js +49 -3
  38. package/dist/module/lib/Components/Line/utils.test.js.map +1 -1
  39. package/dist/module/lib/Components/LineChart/LineChart.js +131 -27
  40. package/dist/module/lib/Components/LineChart/LineChart.js.map +1 -1
  41. package/dist/module/lib/Components/LineChart/LineChart.test.js +147 -0
  42. package/dist/module/lib/Components/LineChart/LineChart.test.js.map +1 -1
  43. package/dist/module/lib/Components/LineChart/LineChartEmptyState/LineChartEmptyState.js +72 -0
  44. package/dist/module/lib/Components/LineChart/LineChartEmptyState/LineChartEmptyState.js.map +1 -0
  45. package/dist/module/lib/Components/LineChart/LineChartEmptyState/LineChartEmptyState.test.js +47 -0
  46. package/dist/module/lib/Components/LineChart/LineChartEmptyState/LineChartEmptyState.test.js.map +1 -0
  47. package/dist/module/lib/Components/LineChart/LineChartEmptyState/index.js +4 -0
  48. package/dist/module/lib/Components/LineChart/LineChartEmptyState/index.js.map +1 -0
  49. package/dist/module/lib/Components/LineChart/LineChartEmptyState/types.js +4 -0
  50. package/dist/module/lib/Components/LineChart/LineChartEmptyState/types.js.map +1 -0
  51. package/dist/module/lib/Components/LineChart/LineChartEmptyState/utils.js +22 -0
  52. package/dist/module/lib/Components/LineChart/LineChartEmptyState/utils.js.map +1 -0
  53. package/dist/module/lib/Components/LineChart/LineChartEmptyState/utils.test.js +21 -0
  54. package/dist/module/lib/Components/LineChart/LineChartEmptyState/utils.test.js.map +1 -0
  55. package/dist/module/lib/Components/LineChart/utils.js +83 -0
  56. package/dist/module/lib/Components/LineChart/utils.js.map +1 -0
  57. package/dist/module/lib/Components/LineChart/utils.test.js +174 -0
  58. package/dist/module/lib/Components/LineChart/utils.test.js.map +1 -0
  59. package/dist/module/lib/Components/Point/Point.js +6 -4
  60. package/dist/module/lib/Components/Point/Point.js.map +1 -1
  61. package/dist/module/lib/Components/ReferenceLine/ReferenceLine.js +4 -4
  62. package/dist/module/lib/Components/ReferenceLine/ReferenceLine.js.map +1 -1
  63. package/dist/module/lib/Components/ReferenceLine/constants.js +2 -2
  64. package/dist/module/lib/Components/ReferenceLine/constants.js.map +1 -1
  65. package/dist/module/lib/Components/ReferenceLine/utils.js +2 -1
  66. package/dist/module/lib/Components/ReferenceLine/utils.js.map +1 -1
  67. package/dist/module/lib/Components/Scrubber/DefaultScrubberTooltip/utils.js +2 -1
  68. package/dist/module/lib/Components/Scrubber/DefaultScrubberTooltip/utils.js.map +1 -1
  69. package/dist/module/lib/Components/Scrubber/Scrubber.js +2 -2
  70. package/dist/module/lib/Components/Scrubber/Scrubber.js.map +1 -1
  71. package/dist/module/lib/Components/Scrubber/ScrubberProvider.js +10 -2
  72. package/dist/module/lib/Components/Scrubber/ScrubberProvider.js.map +1 -1
  73. package/dist/module/lib/Components/Scrubber/ScrubberProvider.test.js +79 -1
  74. package/dist/module/lib/Components/Scrubber/ScrubberProvider.test.js.map +1 -1
  75. package/dist/module/lib/Components/Scrubber/utils.js +3 -2
  76. package/dist/module/lib/Components/Scrubber/utils.js.map +1 -1
  77. package/dist/module/lib/utils/numbers.js +16 -0
  78. package/dist/module/lib/utils/numbers.js.map +1 -0
  79. package/dist/module/lib/utils/ticks/ticks.js +0 -16
  80. package/dist/module/lib/utils/ticks/ticks.js.map +1 -1
  81. package/dist/typescript/src/lib/Components/Axis/Axis.types.d.ts +6 -0
  82. package/dist/typescript/src/lib/Components/Axis/Axis.types.d.ts.map +1 -1
  83. package/dist/typescript/src/lib/Components/Axis/XAxis/XAxis.d.ts +1 -1
  84. package/dist/typescript/src/lib/Components/Axis/XAxis/XAxis.d.ts.map +1 -1
  85. package/dist/typescript/src/lib/Components/Axis/YAxis/YAxis.d.ts +1 -1
  86. package/dist/typescript/src/lib/Components/Axis/YAxis/YAxis.d.ts.map +1 -1
  87. package/dist/typescript/src/lib/Components/CartesianChart/CartesianChart.d.ts +1 -1
  88. package/dist/typescript/src/lib/Components/CartesianChart/CartesianChart.d.ts.map +1 -1
  89. package/dist/typescript/src/lib/Components/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.d.ts +18 -0
  90. package/dist/typescript/src/lib/Components/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.d.ts.map +1 -0
  91. package/dist/typescript/src/lib/Components/CartesianChart/ChartEmptyLabel/index.d.ts +2 -0
  92. package/dist/typescript/src/lib/Components/CartesianChart/ChartEmptyLabel/index.d.ts.map +1 -0
  93. package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/RevealAnimationProvider.d.ts +3 -0
  94. package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/RevealAnimationProvider.d.ts.map +1 -0
  95. package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/context.d.ts +22 -0
  96. package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/context.d.ts.map +1 -0
  97. package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/index.d.ts +3 -0
  98. package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/index.d.ts.map +1 -0
  99. package/dist/typescript/src/lib/Components/CartesianChart/{RevealClip → RevealAnimation}/types.d.ts +15 -2
  100. package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/types.d.ts.map +1 -0
  101. package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/utils.d.ts +33 -0
  102. package/dist/typescript/src/lib/Components/CartesianChart/RevealAnimation/utils.d.ts.map +1 -0
  103. package/dist/typescript/src/lib/Components/CartesianChart/hooks/useShimmerAnimation.d.ts +13 -0
  104. package/dist/typescript/src/lib/Components/CartesianChart/hooks/useShimmerAnimation.d.ts.map +1 -0
  105. package/dist/typescript/src/lib/Components/CartesianChart/types.d.ts +12 -0
  106. package/dist/typescript/src/lib/Components/CartesianChart/types.d.ts.map +1 -1
  107. package/dist/typescript/src/lib/Components/CartesianChart/utils.d.ts +1 -1
  108. package/dist/typescript/src/lib/Components/CartesianChart/utils.d.ts.map +1 -1
  109. package/dist/typescript/src/lib/Components/Line/Line.d.ts +1 -1
  110. package/dist/typescript/src/lib/Components/Line/Line.d.ts.map +1 -1
  111. package/dist/typescript/src/lib/Components/Line/constants.d.ts +3 -0
  112. package/dist/typescript/src/lib/Components/Line/constants.d.ts.map +1 -0
  113. package/dist/typescript/src/lib/Components/Line/index.d.ts +1 -1
  114. package/dist/typescript/src/lib/Components/Line/index.d.ts.map +1 -1
  115. package/dist/typescript/src/lib/Components/Line/types.d.ts +15 -0
  116. package/dist/typescript/src/lib/Components/Line/types.d.ts.map +1 -1
  117. package/dist/typescript/src/lib/Components/Line/utils.d.ts +11 -6
  118. package/dist/typescript/src/lib/Components/Line/utils.d.ts.map +1 -1
  119. package/dist/typescript/src/lib/Components/LineChart/LineChart.d.ts +1 -1
  120. package/dist/typescript/src/lib/Components/LineChart/LineChart.d.ts.map +1 -1
  121. package/dist/typescript/src/lib/Components/LineChart/LineChartEmptyState/LineChartEmptyState.d.ts +9 -0
  122. package/dist/typescript/src/lib/Components/LineChart/LineChartEmptyState/LineChartEmptyState.d.ts.map +1 -0
  123. package/dist/typescript/src/lib/Components/LineChart/LineChartEmptyState/index.d.ts +3 -0
  124. package/dist/typescript/src/lib/Components/LineChart/LineChartEmptyState/index.d.ts.map +1 -0
  125. package/dist/typescript/src/lib/Components/LineChart/LineChartEmptyState/types.d.ts +3 -0
  126. package/dist/typescript/src/lib/Components/LineChart/LineChartEmptyState/types.d.ts.map +1 -0
  127. package/dist/typescript/src/lib/Components/LineChart/LineChartEmptyState/utils.d.ts +14 -0
  128. package/dist/typescript/src/lib/Components/LineChart/LineChartEmptyState/utils.d.ts.map +1 -0
  129. package/dist/typescript/src/lib/Components/LineChart/types.d.ts +41 -1
  130. package/dist/typescript/src/lib/Components/LineChart/types.d.ts.map +1 -1
  131. package/dist/typescript/src/lib/Components/LineChart/utils.d.ts +43 -0
  132. package/dist/typescript/src/lib/Components/LineChart/utils.d.ts.map +1 -0
  133. package/dist/typescript/src/lib/Components/Point/Point.d.ts.map +1 -1
  134. package/dist/typescript/src/lib/Components/ReferenceLine/ReferenceLine.d.ts.map +1 -1
  135. package/dist/typescript/src/lib/Components/ReferenceLine/constants.d.ts +2 -2
  136. package/dist/typescript/src/lib/Components/ReferenceLine/constants.d.ts.map +1 -1
  137. package/dist/typescript/src/lib/Components/ReferenceLine/utils.d.ts.map +1 -1
  138. package/dist/typescript/src/lib/Components/Scrubber/DefaultScrubberTooltip/utils.d.ts.map +1 -1
  139. package/dist/typescript/src/lib/Components/Scrubber/Scrubber.d.ts.map +1 -1
  140. package/dist/typescript/src/lib/Components/Scrubber/ScrubberProvider.d.ts.map +1 -1
  141. package/dist/typescript/src/lib/Components/Scrubber/utils.d.ts.map +1 -1
  142. package/dist/typescript/src/lib/utils/index.d.ts +1 -1
  143. package/dist/typescript/src/lib/utils/index.d.ts.map +1 -1
  144. package/dist/typescript/src/lib/utils/numbers.d.ts +13 -0
  145. package/dist/typescript/src/lib/utils/numbers.d.ts.map +1 -0
  146. package/dist/typescript/src/lib/utils/ticks/ticks.d.ts +1 -11
  147. package/dist/typescript/src/lib/utils/ticks/ticks.d.ts.map +1 -1
  148. package/dist/typescript/src/lib/utils/types.d.ts +27 -2
  149. package/dist/typescript/src/lib/utils/types.d.ts.map +1 -1
  150. package/package.json +3 -3
  151. package/src/lib/Components/Axis/Axis.types.ts +6 -0
  152. package/src/lib/Components/Axis/XAxis/XAxis.test.tsx +12 -0
  153. package/src/lib/Components/Axis/XAxis/XAxis.tsx +29 -32
  154. package/src/lib/Components/Axis/YAxis/YAxis.test.tsx +12 -0
  155. package/src/lib/Components/Axis/YAxis/YAxis.tsx +29 -32
  156. package/src/lib/Components/CartesianChart/CartesianChart.tsx +30 -24
  157. package/src/lib/Components/CartesianChart/ChartEmptyLabel/ChartEmptyLabel.tsx +68 -0
  158. package/src/lib/Components/CartesianChart/ChartEmptyLabel/index.ts +1 -0
  159. package/src/lib/Components/CartesianChart/{RevealClip/RevealClipDefs.test.tsx → RevealAnimation/RevealAnimationProvider.test.tsx} +60 -17
  160. package/src/lib/Components/CartesianChart/{RevealClip/RevealClipDefs.tsx → RevealAnimation/RevealAnimationProvider.tsx} +11 -11
  161. package/src/lib/Components/CartesianChart/RevealAnimation/context.ts +39 -0
  162. package/src/lib/Components/CartesianChart/RevealAnimation/index.ts +2 -0
  163. package/src/lib/Components/CartesianChart/{RevealClip → RevealAnimation}/types.ts +16 -2
  164. package/src/lib/Components/CartesianChart/RevealAnimation/utils.ts +87 -0
  165. package/src/lib/Components/CartesianChart/hooks/useShimmerAnimation.ts +52 -0
  166. package/src/lib/Components/CartesianChart/types.ts +12 -0
  167. package/src/lib/Components/CartesianChart/utils.ts +2 -1
  168. package/src/lib/Components/Line/Line.tsx +26 -14
  169. package/src/lib/Components/Line/constants.ts +2 -0
  170. package/src/lib/Components/Line/index.ts +1 -1
  171. package/src/lib/Components/Line/types.ts +17 -0
  172. package/src/lib/Components/Line/utils.test.ts +77 -3
  173. package/src/lib/Components/Line/utils.ts +63 -12
  174. package/src/lib/Components/LineChart/LineChart.test.tsx +135 -0
  175. package/src/lib/Components/LineChart/LineChart.tsx +157 -38
  176. package/src/lib/Components/LineChart/LineChartEmptyState/LineChartEmptyState.test.tsx +39 -0
  177. package/src/lib/Components/LineChart/LineChartEmptyState/LineChartEmptyState.tsx +72 -0
  178. package/src/lib/Components/LineChart/LineChartEmptyState/index.ts +2 -0
  179. package/src/lib/Components/LineChart/LineChartEmptyState/types.ts +3 -0
  180. package/src/lib/Components/LineChart/LineChartEmptyState/utils.test.ts +22 -0
  181. package/src/lib/Components/LineChart/LineChartEmptyState/utils.ts +24 -0
  182. package/src/lib/Components/LineChart/types.ts +49 -1
  183. package/src/lib/Components/LineChart/utils.test.ts +196 -0
  184. package/src/lib/Components/LineChart/utils.ts +107 -0
  185. package/src/lib/Components/Point/Point.tsx +7 -4
  186. package/src/lib/Components/ReferenceLine/ReferenceLine.tsx +8 -4
  187. package/src/lib/Components/ReferenceLine/constants.ts +2 -2
  188. package/src/lib/Components/ReferenceLine/utils.ts +2 -1
  189. package/src/lib/Components/Scrubber/DefaultScrubberTooltip/utils.ts +2 -1
  190. package/src/lib/Components/Scrubber/Scrubber.tsx +13 -2
  191. package/src/lib/Components/Scrubber/ScrubberProvider.test.tsx +83 -1
  192. package/src/lib/Components/Scrubber/ScrubberProvider.tsx +17 -2
  193. package/src/lib/Components/Scrubber/utils.ts +3 -5
  194. package/src/lib/utils/index.ts +1 -0
  195. package/src/lib/utils/numbers.ts +15 -0
  196. package/src/lib/utils/ticks/ticks.ts +1 -23
  197. package/src/lib/utils/types.ts +35 -2
  198. package/dist/module/lib/Components/CartesianChart/RevealClip/RevealClipDefs.js.map +0 -1
  199. package/dist/module/lib/Components/CartesianChart/RevealClip/RevealClipDefs.test.js.map +0 -1
  200. package/dist/module/lib/Components/CartesianChart/RevealClip/context.js +0 -8
  201. package/dist/module/lib/Components/CartesianChart/RevealClip/context.js.map +0 -1
  202. package/dist/module/lib/Components/CartesianChart/RevealClip/index.js +0 -5
  203. package/dist/module/lib/Components/CartesianChart/RevealClip/index.js.map +0 -1
  204. package/dist/module/lib/Components/CartesianChart/RevealClip/types.js.map +0 -1
  205. package/dist/module/lib/Components/CartesianChart/RevealClip/utils.js +0 -32
  206. package/dist/module/lib/Components/CartesianChart/RevealClip/utils.js.map +0 -1
  207. package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/RevealClipDefs.d.ts +0 -3
  208. package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/RevealClipDefs.d.ts.map +0 -1
  209. package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/context.d.ts +0 -7
  210. package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/context.d.ts.map +0 -1
  211. package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/index.d.ts +0 -3
  212. package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/index.d.ts.map +0 -1
  213. package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/types.d.ts.map +0 -1
  214. package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/utils.d.ts +0 -17
  215. package/dist/typescript/src/lib/Components/CartesianChart/RevealClip/utils.d.ts.map +0 -1
  216. package/src/lib/Components/CartesianChart/RevealClip/context.ts +0 -13
  217. package/src/lib/Components/CartesianChart/RevealClip/index.ts +0 -2
  218. package/src/lib/Components/CartesianChart/RevealClip/utils.ts +0 -51
  219. /package/dist/module/lib/Components/CartesianChart/{RevealClip → RevealAnimation}/types.js +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/CartesianChart/RevealClip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/CartesianChart/RevealClip/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAE1D,MAAM,MAAM,qBAAqB,GAAG;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,QAAQ,EAAE,SAAS,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;IACzB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,WAAW,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,qBAAqB,CAAA;KAAE,CAAC;IAChD;;;OAGG;IACH,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,CAAC"}
@@ -1,17 +0,0 @@
1
- import { useAnimatedProps } from 'react-native-reanimated';
2
- import type { DrawingArea, Series } from '../../../utils/types';
3
- type RevealClipAnimationConfig = {
4
- durationMs: number;
5
- drawingArea: DrawingArea;
6
- dataFingerprint: string;
7
- };
8
- type RevealClipAnimationResult = {
9
- clipId: string;
10
- animatedRectProps: ReturnType<typeof useAnimatedProps>;
11
- };
12
- export declare const useRevealClipAnimation: ({ durationMs, drawingArea, dataFingerprint, }: RevealClipAnimationConfig) => RevealClipAnimationResult;
13
- export declare const useComputeDataFingerprint: ({ series, }: {
14
- series: Series[];
15
- }) => string;
16
- export {};
17
- //# sourceMappingURL=utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../../src/lib/Components/CartesianChart/RevealClip/utils.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAGjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAGhE,KAAK,yBAAyB,GAAG;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,WAAW,CAAC;IACzB,eAAe,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,KAAK,yBAAyB,GAAG;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,iBAAiB,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC;CACxD,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,+CAIpC,yBAAyB,KAAG,yBAiB9B,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,aAEvC;IACD,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB,KAAG,MAEH,CAAC"}
@@ -1,13 +0,0 @@
1
- import { createContext, useContext } from 'react';
2
-
3
- type RevealClipContextValue = {
4
- clipPathAttr: string;
5
- };
6
-
7
- export const RevealClipContext = createContext<
8
- RevealClipContextValue | undefined
9
- >(undefined);
10
-
11
- export const useRevealClip = (): string | undefined => {
12
- return useContext(RevealClipContext)?.clipPathAttr;
13
- };
@@ -1,2 +0,0 @@
1
- export { RevealClipDefs } from './RevealClipDefs';
2
- export { useRevealClip } from './context';
@@ -1,51 +0,0 @@
1
- import { useEffect, useId } from 'react';
2
- import {
3
- useAnimatedProps,
4
- useSharedValue,
5
- withTiming,
6
- } from 'react-native-reanimated';
7
-
8
- import type { DrawingArea, Series } from '../../../utils/types';
9
- import { OVERFLOW_BUFFER } from '../utils';
10
-
11
- type RevealClipAnimationConfig = {
12
- durationMs: number;
13
- drawingArea: DrawingArea;
14
- dataFingerprint: string;
15
- };
16
-
17
- type RevealClipAnimationResult = {
18
- clipId: string;
19
- animatedRectProps: ReturnType<typeof useAnimatedProps>;
20
- };
21
-
22
- export const useRevealClipAnimation = ({
23
- durationMs,
24
- drawingArea,
25
- dataFingerprint,
26
- }: RevealClipAnimationConfig): RevealClipAnimationResult => {
27
- const clipId = useId();
28
- const width = useSharedValue(0);
29
-
30
- useEffect(() => {
31
- width.value = 0;
32
- width.value = withTiming(
33
- drawingArea.width + OVERFLOW_BUFFER.left + OVERFLOW_BUFFER.right,
34
- { duration: durationMs },
35
- );
36
- }, [drawingArea.width, durationMs, width, dataFingerprint]);
37
-
38
- const animatedRectProps = useAnimatedProps(() => ({
39
- width: width.value,
40
- }));
41
-
42
- return { clipId, animatedRectProps };
43
- };
44
-
45
- export const useComputeDataFingerprint = ({
46
- series,
47
- }: {
48
- series: Series[];
49
- }): string => {
50
- return series.map((s) => s.data?.join(',') ?? '').join('|');
51
- };