react-native-wagmi-charts 2.9.0 → 2.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/README.md +143 -66
  2. package/lib/commonjs/charts/candle/Candle.js +92 -177
  3. package/lib/commonjs/charts/candle/Candles.js +39 -66
  4. package/lib/commonjs/charts/candle/Chart.js +26 -37
  5. package/lib/commonjs/charts/candle/Context.js +49 -69
  6. package/lib/commonjs/charts/candle/Crosshair.js +82 -183
  7. package/lib/commonjs/charts/candle/Crosshair.js.map +1 -1
  8. package/lib/commonjs/charts/candle/CrosshairTooltip.js +61 -140
  9. package/lib/commonjs/charts/candle/DatetimeText.js +14 -19
  10. package/lib/commonjs/charts/candle/Line.js +27 -73
  11. package/lib/commonjs/charts/candle/PriceText.js +14 -19
  12. package/lib/commonjs/charts/candle/index.js +64 -67
  13. package/lib/commonjs/charts/candle/types.js +4 -4
  14. package/lib/commonjs/charts/candle/useCandleData.js +12 -9
  15. package/lib/commonjs/charts/candle/useCandlestickChart.js +7 -9
  16. package/lib/commonjs/charts/candle/useDatetime.js +18 -16
  17. package/lib/commonjs/charts/candle/usePrice.js +22 -21
  18. package/lib/commonjs/charts/candle/utils/getDomain.js +9 -5
  19. package/lib/commonjs/charts/candle/utils/getDomain.js.map +1 -1
  20. package/lib/commonjs/charts/candle/utils/getHeight.js +11 -12
  21. package/lib/commonjs/charts/candle/utils/getHeight.js.map +1 -1
  22. package/lib/commonjs/charts/candle/utils/getPrice.js +11 -12
  23. package/lib/commonjs/charts/candle/utils/getPrice.js.map +1 -1
  24. package/lib/commonjs/charts/candle/utils/getY.js +11 -12
  25. package/lib/commonjs/charts/candle/utils/getY.js.map +1 -1
  26. package/lib/commonjs/charts/candle/utils/index.js +16 -16
  27. package/lib/commonjs/charts/line/Axis.js +148 -268
  28. package/lib/commonjs/charts/line/Chart.js +62 -129
  29. package/lib/commonjs/charts/line/Chart.js.map +1 -1
  30. package/lib/commonjs/charts/line/ChartPath.js +105 -285
  31. package/lib/commonjs/charts/line/Context.js +37 -95
  32. package/lib/commonjs/charts/line/Cursor.js +74 -125
  33. package/lib/commonjs/charts/line/Cursor.js.map +1 -1
  34. package/lib/commonjs/charts/line/CursorCrosshair.js +56 -134
  35. package/lib/commonjs/charts/line/CursorCrosshair.js.map +1 -1
  36. package/lib/commonjs/charts/line/CursorLine.js +67 -152
  37. package/lib/commonjs/charts/line/CursorLine.js.map +1 -1
  38. package/lib/commonjs/charts/line/Data.js +34 -73
  39. package/lib/commonjs/charts/line/DatetimeText.js +15 -20
  40. package/lib/commonjs/charts/line/Dot.js +56 -149
  41. package/lib/commonjs/charts/line/Gradient.js +53 -124
  42. package/lib/commonjs/charts/line/Group.js +23 -54
  43. package/lib/commonjs/charts/line/Group.js.map +1 -1
  44. package/lib/commonjs/charts/line/Highlight.js +47 -115
  45. package/lib/commonjs/charts/line/HorizontalLine.js +39 -92
  46. package/lib/commonjs/charts/line/HoverTrap/index.js +7 -10
  47. package/lib/commonjs/charts/line/HoverTrap/index.web.js +43 -48
  48. package/lib/commonjs/charts/line/LineChartPathContext.js +11 -14
  49. package/lib/commonjs/charts/line/Path.js +32 -78
  50. package/lib/commonjs/charts/line/PriceText.js +36 -78
  51. package/lib/commonjs/charts/line/Tooltip.js +102 -188
  52. package/lib/commonjs/charts/line/Tooltip.js.map +1 -1
  53. package/lib/commonjs/charts/line/index.js +65 -65
  54. package/lib/commonjs/charts/line/types.js +4 -4
  55. package/lib/commonjs/charts/line/useAnimatedPath.js +22 -27
  56. package/lib/commonjs/charts/line/useCurrentY.js +17 -17
  57. package/lib/commonjs/charts/line/useDatetime.js +28 -32
  58. package/lib/commonjs/charts/line/useLineChart.js +15 -20
  59. package/lib/commonjs/charts/line/usePrice.js +26 -28
  60. package/lib/commonjs/charts/line/utils/getArea.js +14 -47
  61. package/lib/commonjs/charts/line/utils/getDomain.js +8 -5
  62. package/lib/commonjs/charts/line/utils/getDomain.js.map +1 -1
  63. package/lib/commonjs/charts/line/utils/getPath.js +14 -53
  64. package/lib/commonjs/charts/line/utils/getXPositionForCurve.js +5 -8
  65. package/lib/commonjs/charts/line/utils/index.js +19 -19
  66. package/lib/commonjs/charts/line/utils/interpolatePath.js +60 -100
  67. package/lib/commonjs/charts/line/utils/lineChartDataPropToArray.js +5 -5
  68. package/lib/commonjs/components/AnimatedText.js +29 -67
  69. package/lib/commonjs/index.js +19 -19
  70. package/lib/commonjs/types.js +2 -2
  71. package/lib/commonjs/utils/formatDatetime.js +9 -5
  72. package/lib/commonjs/utils/formatPrice.js +6 -10
  73. package/lib/commonjs/utils/index.js +13 -13
  74. package/lib/commonjs/utils/usePrevious.js +6 -8
  75. package/lib/module/charts/candle/Candle.js +76 -126
  76. package/lib/module/charts/candle/Candles.js +30 -52
  77. package/lib/module/charts/candle/Chart.js +19 -22
  78. package/lib/module/charts/candle/Context.js +29 -47
  79. package/lib/module/charts/candle/Crosshair.js +69 -142
  80. package/lib/module/charts/candle/Crosshair.js.map +1 -1
  81. package/lib/module/charts/candle/CrosshairTooltip.js +51 -101
  82. package/lib/module/charts/candle/DatetimeText.js +5 -5
  83. package/lib/module/charts/candle/Line.js +19 -37
  84. package/lib/module/charts/candle/PriceText.js +5 -5
  85. package/lib/module/charts/candle/index.js +2 -2
  86. package/lib/module/charts/candle/types.js +1 -1
  87. package/lib/module/charts/candle/useCandleData.js +7 -3
  88. package/lib/module/charts/candle/useCandlestickChart.js +1 -1
  89. package/lib/module/charts/candle/useDatetime.js +12 -10
  90. package/lib/module/charts/candle/usePrice.js +14 -12
  91. package/lib/module/charts/candle/utils/getDomain.js +6 -2
  92. package/lib/module/charts/candle/utils/getDomain.js.map +1 -1
  93. package/lib/module/charts/candle/utils/getHeight.js +8 -9
  94. package/lib/module/charts/candle/utils/getHeight.js.map +1 -1
  95. package/lib/module/charts/candle/utils/getPrice.js +8 -4
  96. package/lib/module/charts/candle/utils/getPrice.js.map +1 -1
  97. package/lib/module/charts/candle/utils/getY.js +8 -4
  98. package/lib/module/charts/candle/utils/getY.js.map +1 -1
  99. package/lib/module/charts/candle/utils/index.js +1 -1
  100. package/lib/module/charts/line/Axis.js +113 -189
  101. package/lib/module/charts/line/Chart.js +40 -73
  102. package/lib/module/charts/line/Chart.js.map +1 -1
  103. package/lib/module/charts/line/ChartPath.js +90 -238
  104. package/lib/module/charts/line/Context.js +29 -61
  105. package/lib/module/charts/line/Cursor.js +61 -82
  106. package/lib/module/charts/line/Cursor.js.map +1 -1
  107. package/lib/module/charts/line/CursorCrosshair.js +47 -99
  108. package/lib/module/charts/line/CursorCrosshair.js.map +1 -1
  109. package/lib/module/charts/line/CursorLine.js +52 -107
  110. package/lib/module/charts/line/CursorLine.js.map +1 -1
  111. package/lib/module/charts/line/Data.js +28 -41
  112. package/lib/module/charts/line/DatetimeText.js +5 -5
  113. package/lib/module/charts/line/Dot.js +39 -93
  114. package/lib/module/charts/line/Gradient.js +41 -79
  115. package/lib/module/charts/line/Group.js +14 -15
  116. package/lib/module/charts/line/Group.js.map +1 -1
  117. package/lib/module/charts/line/Highlight.js +32 -61
  118. package/lib/module/charts/line/HorizontalLine.js +27 -49
  119. package/lib/module/charts/line/HoverTrap/index.js +2 -3
  120. package/lib/module/charts/line/HoverTrap/index.web.js +34 -34
  121. package/lib/module/charts/line/LineChartPathContext.js +3 -3
  122. package/lib/module/charts/line/Path.js +20 -33
  123. package/lib/module/charts/line/PriceText.js +25 -42
  124. package/lib/module/charts/line/Tooltip.js +89 -151
  125. package/lib/module/charts/line/Tooltip.js.map +1 -1
  126. package/lib/module/charts/line/index.js +2 -2
  127. package/lib/module/charts/line/types.js +1 -1
  128. package/lib/module/charts/line/useAnimatedPath.js +16 -22
  129. package/lib/module/charts/line/useCurrentY.js +9 -4
  130. package/lib/module/charts/line/useDatetime.js +22 -26
  131. package/lib/module/charts/line/useLineChart.js +7 -10
  132. package/lib/module/charts/line/usePrice.js +20 -22
  133. package/lib/module/charts/line/utils/getArea.js +8 -15
  134. package/lib/module/charts/line/utils/getDomain.js +5 -2
  135. package/lib/module/charts/line/utils/getDomain.js.map +1 -1
  136. package/lib/module/charts/line/utils/getPath.js +8 -21
  137. package/lib/module/charts/line/utils/getXPositionForCurve.js +2 -5
  138. package/lib/module/charts/line/utils/index.js +1 -1
  139. package/lib/module/charts/line/utils/interpolatePath.js +57 -97
  140. package/lib/module/charts/line/utils/lineChartDataPropToArray.js +2 -2
  141. package/lib/module/components/AnimatedText.js +21 -25
  142. package/lib/module/index.js +1 -1
  143. package/lib/module/types.js +2 -1
  144. package/lib/module/utils/formatDatetime.js +6 -2
  145. package/lib/module/utils/formatPrice.js +3 -7
  146. package/lib/module/utils/index.js +1 -1
  147. package/lib/module/utils/usePrevious.js +1 -1
  148. package/lib/typescript/src/charts/candle/Candle.d.ts +31 -45
  149. package/lib/typescript/src/charts/candle/Candles.d.ts +13 -24
  150. package/lib/typescript/src/charts/candle/Chart.d.ts +7 -12
  151. package/lib/typescript/src/charts/candle/Context.d.ts +7 -12
  152. package/lib/typescript/src/charts/candle/Crosshair.d.ts +9 -17
  153. package/lib/typescript/src/charts/candle/CrosshairTooltip.d.ts +8 -15
  154. package/lib/typescript/src/charts/candle/DatetimeText.d.ts +9 -15
  155. package/lib/typescript/src/charts/candle/Line.d.ts +5 -10
  156. package/lib/typescript/src/charts/candle/PriceText.d.ts +7 -13
  157. package/lib/typescript/src/charts/candle/index.d.ts +13 -32
  158. package/lib/typescript/src/charts/candle/types.d.ts +16 -16
  159. package/lib/typescript/src/charts/candle/useCandleData.d.ts +1 -1
  160. package/lib/typescript/src/charts/candle/useCandlestickChart.d.ts +1 -1
  161. package/lib/typescript/src/charts/candle/useDatetime.d.ts +9 -13
  162. package/lib/typescript/src/charts/candle/usePrice.d.ts +7 -11
  163. package/lib/typescript/src/charts/candle/utils/getDomain.d.ts +1 -1
  164. package/lib/typescript/src/charts/candle/utils/getDomain.d.ts.map +1 -1
  165. package/lib/typescript/src/charts/candle/utils/getHeight.d.ts +5 -9
  166. package/lib/typescript/src/charts/candle/utils/getPrice.d.ts +5 -9
  167. package/lib/typescript/src/charts/candle/utils/getY.d.ts +5 -9
  168. package/lib/typescript/src/charts/candle/utils/index.d.ts +1 -1
  169. package/lib/typescript/src/charts/line/Axis.d.ts +14 -27
  170. package/lib/typescript/src/charts/line/Chart.d.ts +23 -33
  171. package/lib/typescript/src/charts/line/Chart.d.ts.map +1 -1
  172. package/lib/typescript/src/charts/line/ChartPath.d.ts +15 -28
  173. package/lib/typescript/src/charts/line/Context.d.ts +9 -16
  174. package/lib/typescript/src/charts/line/Cursor.d.ts +14 -22
  175. package/lib/typescript/src/charts/line/Cursor.d.ts.map +1 -1
  176. package/lib/typescript/src/charts/line/CursorCrosshair.d.ts +11 -23
  177. package/lib/typescript/src/charts/line/CursorCrosshair.d.ts.map +1 -1
  178. package/lib/typescript/src/charts/line/CursorLine.d.ts +9 -15
  179. package/lib/typescript/src/charts/line/CursorLine.d.ts.map +1 -1
  180. package/lib/typescript/src/charts/line/Data.d.ts +13 -17
  181. package/lib/typescript/src/charts/line/DatetimeText.d.ts +8 -14
  182. package/lib/typescript/src/charts/line/Dot.d.ts +25 -38
  183. package/lib/typescript/src/charts/line/Gradient.d.ts +5 -9
  184. package/lib/typescript/src/charts/line/Group.d.ts +3 -6
  185. package/lib/typescript/src/charts/line/Group.d.ts.map +1 -1
  186. package/lib/typescript/src/charts/line/Highlight.d.ts +9 -17
  187. package/lib/typescript/src/charts/line/HorizontalLine.d.ts +22 -30
  188. package/lib/typescript/src/charts/line/HoverTrap/index.d.ts +1 -1
  189. package/lib/typescript/src/charts/line/HoverTrap/index.web.d.ts +1 -1
  190. package/lib/typescript/src/charts/line/LineChartPathContext.d.ts +4 -4
  191. package/lib/typescript/src/charts/line/Path.d.ts +23 -28
  192. package/lib/typescript/src/charts/line/PriceText.d.ts +20 -28
  193. package/lib/typescript/src/charts/line/Tooltip.d.ts +20 -32
  194. package/lib/typescript/src/charts/line/index.d.ts +20 -33
  195. package/lib/typescript/src/charts/line/types.d.ts +17 -19
  196. package/lib/typescript/src/charts/line/useAnimatedPath.d.ts +7 -10
  197. package/lib/typescript/src/charts/line/useCurrentY.d.ts +2 -2
  198. package/lib/typescript/src/charts/line/useDatetime.d.ts +7 -11
  199. package/lib/typescript/src/charts/line/useLineChart.d.ts +10 -10
  200. package/lib/typescript/src/charts/line/usePrice.d.ts +7 -11
  201. package/lib/typescript/src/charts/line/utils/getArea.d.ts +9 -17
  202. package/lib/typescript/src/charts/line/utils/getDomain.d.ts +1 -1
  203. package/lib/typescript/src/charts/line/utils/getDomain.d.ts.map +1 -1
  204. package/lib/typescript/src/charts/line/utils/getPath.d.ts +11 -21
  205. package/lib/typescript/src/charts/line/utils/getXPositionForCurve.d.ts +1 -1
  206. package/lib/typescript/src/charts/line/utils/index.d.ts +1 -1
  207. package/lib/typescript/src/charts/line/utils/interpolatePath.d.ts +5 -17
  208. package/lib/typescript/src/charts/line/utils/lineChartDataPropToArray.d.ts +2 -4
  209. package/lib/typescript/src/components/AnimatedText.d.ts +4 -7
  210. package/lib/typescript/src/index.d.ts +1 -1
  211. package/lib/typescript/src/types.d.ts +4 -7
  212. package/lib/typescript/src/utils/formatDatetime.d.ts +5 -9
  213. package/lib/typescript/src/utils/formatPrice.d.ts +5 -9
  214. package/lib/typescript/src/utils/index.d.ts +1 -1
  215. package/lib/typescript/src/utils/usePrevious.d.ts +1 -1
  216. package/package.json +1 -1
  217. package/src/charts/line/CursorLine.tsx +6 -2
  218. package/src/charts/line/HorizontalLine.tsx +5 -1
@@ -2,19 +2,14 @@ import React from 'react';
2
2
  import type { TContext, TData, TDomain } from './types';
3
3
  export declare const CandlestickChartContext: React.Context<TContext>;
4
4
  type CandlestickChartProviderProps = {
5
- children: React.ReactNode;
6
- data: TData;
7
- valueRangeY?: TDomain;
8
- onCurrentIndexChange?: (x: number) => void;
5
+ children: React.ReactNode;
6
+ data: TData;
7
+ valueRangeY?: TDomain;
8
+ onCurrentIndexChange?: (x: number) => void;
9
9
  };
10
- export declare function CandlestickChartProvider({
11
- children,
12
- data,
13
- valueRangeY,
14
- onCurrentIndexChange,
15
- }: CandlestickChartProviderProps): React.JSX.Element;
10
+ export declare function CandlestickChartProvider({ children, data, valueRangeY, onCurrentIndexChange, }: CandlestickChartProviderProps): React.JSX.Element;
16
11
  export declare namespace CandlestickChartProvider {
17
- var displayName: string;
12
+ var displayName: string;
18
13
  }
19
14
  export {};
20
- //# sourceMappingURL=Context.d.ts.map
15
+ //# sourceMappingURL=Context.d.ts.map
@@ -3,22 +3,14 @@ import { ViewProps } from 'react-native';
3
3
  import { AnimatedProps } from 'react-native-reanimated';
4
4
  import { CandlestickChartLineProps } from './Line';
5
5
  type CandlestickChartCrosshairProps = {
6
- color?: string;
7
- children?: React.ReactNode;
8
- onCurrentXChange?: (value: number) => unknown;
9
- horizontalCrosshairProps?: AnimatedProps<ViewProps>;
10
- verticalCrosshairProps?: AnimatedProps<ViewProps>;
11
- lineProps?: Partial<CandlestickChartLineProps>;
12
- minDurationMs?: number;
6
+ color?: string;
7
+ children?: React.ReactNode;
8
+ onCurrentXChange?: (value: number) => unknown;
9
+ horizontalCrosshairProps?: AnimatedProps<ViewProps>;
10
+ verticalCrosshairProps?: AnimatedProps<ViewProps>;
11
+ lineProps?: Partial<CandlestickChartLineProps>;
12
+ minDurationMs?: number;
13
13
  };
14
- export declare function CandlestickChartCrosshair({
15
- color,
16
- onCurrentXChange,
17
- children,
18
- horizontalCrosshairProps,
19
- verticalCrosshairProps,
20
- lineProps,
21
- minDurationMs,
22
- }: CandlestickChartCrosshairProps): React.JSX.Element;
14
+ export declare function CandlestickChartCrosshair({ color, onCurrentXChange, children, horizontalCrosshairProps, verticalCrosshairProps, lineProps, minDurationMs, }: CandlestickChartCrosshairProps): React.JSX.Element;
23
15
  export {};
24
- //# sourceMappingURL=Crosshair.d.ts.map
16
+ //# sourceMappingURL=Crosshair.d.ts.map
@@ -3,22 +3,15 @@ import type { StyleProp, TextStyle, ViewProps } from 'react-native';
3
3
  import type { SharedValue, AnimatedStyle } from 'react-native-reanimated';
4
4
  import { CandlestickChartPriceTextProps } from './PriceText';
5
5
  export type CandlestickChartCrosshairTooltipProps = ViewProps & {
6
- children?: React.ReactNode;
7
- xGutter?: number;
8
- yGutter?: number;
9
- tooltipTextProps?: CandlestickChartPriceTextProps;
10
- textStyle?: AnimatedStyle<StyleProp<TextStyle>>;
6
+ children?: React.ReactNode;
7
+ xGutter?: number;
8
+ yGutter?: number;
9
+ tooltipTextProps?: CandlestickChartPriceTextProps;
10
+ textStyle?: AnimatedStyle<StyleProp<TextStyle>>;
11
11
  };
12
12
  export type CandlestickChartCrosshairTooltipContext = {
13
- position: SharedValue<'left' | 'right'>;
13
+ position: SharedValue<'left' | 'right'>;
14
14
  };
15
15
  export declare const CandlestickChartCrosshairTooltipContext: React.Context<CandlestickChartCrosshairTooltipContext>;
16
- export declare function CandlestickChartCrosshairTooltip({
17
- children,
18
- xGutter,
19
- yGutter,
20
- tooltipTextProps,
21
- textStyle,
22
- ...props
23
- }: CandlestickChartCrosshairTooltipProps): React.JSX.Element;
24
- //# sourceMappingURL=CrosshairTooltip.d.ts.map
16
+ export declare function CandlestickChartCrosshairTooltip({ children, xGutter, yGutter, tooltipTextProps, textStyle, ...props }: CandlestickChartCrosshairTooltipProps): React.JSX.Element;
17
+ //# sourceMappingURL=CrosshairTooltip.d.ts.map
@@ -3,20 +3,14 @@ import type { TextProps as RNTextProps } from 'react-native';
3
3
  import type { AnimatedProps } from 'react-native-reanimated';
4
4
  import type { TFormatterFn } from '../../types';
5
5
  type CandlestickChartPriceTextProps = {
6
- locale?: string;
7
- options?: {
8
- [key: string]: string;
9
- };
10
- format?: TFormatterFn<number>;
11
- variant?: 'formatted' | 'value';
12
- style?: AnimatedProps<RNTextProps>['style'];
6
+ locale?: string;
7
+ options?: {
8
+ [key: string]: string;
9
+ };
10
+ format?: TFormatterFn<number>;
11
+ variant?: 'formatted' | 'value';
12
+ style?: AnimatedProps<RNTextProps>['style'];
13
13
  };
14
- export declare function CandlestickChartDatetimeText({
15
- locale,
16
- options,
17
- format,
18
- variant,
19
- style,
20
- }: CandlestickChartPriceTextProps): React.JSX.Element;
14
+ export declare function CandlestickChartDatetimeText({ locale, options, format, variant, style, }: CandlestickChartPriceTextProps): React.JSX.Element;
21
15
  export {};
22
- //# sourceMappingURL=DatetimeText.d.ts.map
16
+ //# sourceMappingURL=DatetimeText.d.ts.map
@@ -1,14 +1,9 @@
1
1
  import React from 'react';
2
2
  import { LineProps } from 'react-native-svg';
3
3
  export type CandlestickChartLineProps = Omit<LineProps, 'x' | 'y'> & {
4
- color?: string;
5
- x: number;
6
- y: number;
4
+ color?: string;
5
+ x: number;
6
+ y: number;
7
7
  };
8
- export declare const CandlestickChartLine: ({
9
- color,
10
- x,
11
- y,
12
- ...props
13
- }: CandlestickChartLineProps) => React.JSX.Element;
14
- //# sourceMappingURL=Line.d.ts.map
8
+ export declare const CandlestickChartLine: ({ color, x, y, ...props }: CandlestickChartLineProps) => React.JSX.Element;
9
+ //# sourceMappingURL=Line.d.ts.map
@@ -4,17 +4,11 @@ import type { AnimatedProps } from 'react-native-reanimated';
4
4
  import type { TFormatterFn } from '../../types';
5
5
  import type { TPriceType } from './types';
6
6
  export type CandlestickChartPriceTextProps = {
7
- format?: TFormatterFn<string>;
8
- precision?: number;
9
- variant?: 'formatted' | 'value';
10
- type?: TPriceType;
11
- style?: AnimatedProps<RNTextProps>['style'];
7
+ format?: TFormatterFn<string>;
8
+ precision?: number;
9
+ variant?: 'formatted' | 'value';
10
+ type?: TPriceType;
11
+ style?: AnimatedProps<RNTextProps>['style'];
12
12
  };
13
- export declare function CandlestickChartPriceText({
14
- format,
15
- precision,
16
- variant,
17
- type,
18
- style,
19
- }: CandlestickChartPriceTextProps): React.JSX.Element;
20
- //# sourceMappingURL=PriceText.d.ts.map
13
+ export declare function CandlestickChartPriceText({ format, precision, variant, type, style, }: CandlestickChartPriceTextProps): React.JSX.Element;
14
+ //# sourceMappingURL=PriceText.d.ts.map
@@ -25,36 +25,17 @@ export * from './usePrice';
25
25
  export * from './useCandleData';
26
26
  export * from './utils';
27
27
  export declare const CandlestickChart: typeof _CandlestickChart & {
28
- Candle: ({
29
- candle,
30
- maxHeight,
31
- domain,
32
- margin,
33
- positiveColor,
34
- negativeColor,
35
- rectProps: overrideRectProps,
36
- lineProps: overrideLineProps,
37
- index,
38
- width,
39
- useAnimations,
40
- renderLine,
41
- renderRect,
42
- }: import('./Candle').CandlestickChartCandleProps) => import('react').JSX.Element;
43
- Candles: typeof CandlestickChartCandles;
44
- Crosshair: typeof CandlestickChartCrosshair;
45
- Provider: typeof CandlestickChartProvider;
46
- PriceText: typeof CandlestickChartPriceText;
47
- DatetimeText: typeof CandlestickChartDatetimeText;
48
- Line: ({
49
- color,
50
- x,
51
- y,
52
- ...props
53
- }: import('./Line').CandlestickChartLineProps) => import('react').JSX.Element;
54
- Tooltip: typeof CandlestickChartCrosshairTooltip;
55
- useDatetime: typeof useCandlestickChartDatetime;
56
- usePrice: typeof useCandlestickChartPrice;
57
- useChart: typeof useCandlestickChart;
58
- useCandleData: typeof useCandleData;
28
+ Candle: ({ candle, maxHeight, domain, margin, positiveColor, negativeColor, rectProps: overrideRectProps, lineProps: overrideLineProps, index, width, useAnimations, renderLine, renderRect, }: import("./Candle").CandlestickChartCandleProps) => import("react").JSX.Element;
29
+ Candles: typeof CandlestickChartCandles;
30
+ Crosshair: typeof CandlestickChartCrosshair;
31
+ Provider: typeof CandlestickChartProvider;
32
+ PriceText: typeof CandlestickChartPriceText;
33
+ DatetimeText: typeof CandlestickChartDatetimeText;
34
+ Line: ({ color, x, y, ...props }: import("./Line").CandlestickChartLineProps) => import("react").JSX.Element;
35
+ Tooltip: typeof CandlestickChartCrosshairTooltip;
36
+ useDatetime: typeof useCandlestickChartDatetime;
37
+ usePrice: typeof useCandlestickChartPrice;
38
+ useChart: typeof useCandlestickChart;
39
+ useCandleData: typeof useCandleData;
59
40
  };
60
- //# sourceMappingURL=index.d.ts.map
41
+ //# sourceMappingURL=index.d.ts.map
@@ -1,25 +1,25 @@
1
1
  import type React from 'react';
2
2
  import type { SharedValue } from 'react-native-reanimated';
3
3
  export type TCandle = {
4
- timestamp: number;
5
- open: number;
6
- high: number;
7
- low: number;
8
- close: number;
4
+ timestamp: number;
5
+ open: number;
6
+ high: number;
7
+ low: number;
8
+ close: number;
9
9
  };
10
10
  export type TData = Array<TCandle>;
11
11
  export type TDomain = [min: number, max: number];
12
12
  export type TContext = {
13
- currentX: SharedValue<number>;
14
- currentY: SharedValue<number>;
15
- currentIndex: SharedValue<number>;
16
- data: TData;
17
- width: number;
18
- height: number;
19
- domain: TDomain;
20
- step: number;
21
- setWidth: React.Dispatch<React.SetStateAction<number>>;
22
- setHeight: React.Dispatch<React.SetStateAction<number>>;
13
+ currentX: SharedValue<number>;
14
+ currentY: SharedValue<number>;
15
+ currentIndex: SharedValue<number>;
16
+ data: TData;
17
+ width: number;
18
+ height: number;
19
+ domain: TDomain;
20
+ step: number;
21
+ setWidth: React.Dispatch<React.SetStateAction<number>>;
22
+ setHeight: React.Dispatch<React.SetStateAction<number>>;
23
23
  };
24
24
  export type TPriceType = 'crosshair' | 'open' | 'close' | 'low' | 'high';
25
- //# sourceMappingURL=types.d.ts.map
25
+ //# sourceMappingURL=types.d.ts.map
@@ -1,4 +1,4 @@
1
1
  import type { TCandle } from './types';
2
2
  import type { SharedValue } from 'react-native-reanimated';
3
3
  export declare function useCandleData(): Readonly<SharedValue<TCandle>>;
4
- //# sourceMappingURL=useCandleData.d.ts.map
4
+ //# sourceMappingURL=useCandleData.d.ts.map
@@ -1,3 +1,3 @@
1
1
  import type { TContext } from './types';
2
2
  export declare function useCandlestickChart(): TContext;
3
- //# sourceMappingURL=useCandlestickChart.d.ts.map
3
+ //# sourceMappingURL=useCandlestickChart.d.ts.map
@@ -1,17 +1,13 @@
1
1
  import type { TFormatterFn } from '../../types';
2
2
  import type { SharedValue } from 'react-native-reanimated';
3
- export declare function useCandlestickChartDatetime({
4
- format,
5
- locale,
6
- options,
7
- }?: {
8
- format?: TFormatterFn<number>;
9
- locale?: string;
10
- options?: {
11
- [key: string]: string;
12
- };
3
+ export declare function useCandlestickChartDatetime({ format, locale, options, }?: {
4
+ format?: TFormatterFn<number>;
5
+ locale?: string;
6
+ options?: {
7
+ [key: string]: string;
8
+ };
13
9
  }): {
14
- value: Readonly<SharedValue<string>>;
15
- formatted: Readonly<SharedValue<string>>;
10
+ value: Readonly<SharedValue<string>>;
11
+ formatted: Readonly<SharedValue<string>>;
16
12
  };
17
- //# sourceMappingURL=useDatetime.d.ts.map
13
+ //# sourceMappingURL=useDatetime.d.ts.map
@@ -1,16 +1,12 @@
1
1
  import type { TFormatterFn } from '../../types';
2
2
  import type { TPriceType } from './types';
3
3
  import type { SharedValue } from 'react-native-reanimated';
4
- export declare function useCandlestickChartPrice({
5
- format,
6
- precision,
7
- type,
8
- }?: {
9
- format?: TFormatterFn<string>;
10
- precision?: number;
11
- type?: TPriceType;
4
+ export declare function useCandlestickChartPrice({ format, precision, type, }?: {
5
+ format?: TFormatterFn<string>;
6
+ precision?: number;
7
+ type?: TPriceType;
12
8
  }): {
13
- value: Readonly<SharedValue<string>>;
14
- formatted: Readonly<SharedValue<string>>;
9
+ value: Readonly<SharedValue<string>>;
10
+ formatted: Readonly<SharedValue<string>>;
15
11
  };
16
- //# sourceMappingURL=usePrice.d.ts.map
12
+ //# sourceMappingURL=usePrice.d.ts.map
@@ -1,3 +1,3 @@
1
1
  import type { TCandle } from '../types';
2
2
  export declare function getDomain(rows: TCandle[]): [min: number, max: number];
3
- //# sourceMappingURL=getDomain.d.ts.map
3
+ //# sourceMappingURL=getDomain.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getDomain.d.ts","sourceRoot":"","sources":["../../../../../../src/charts/candle/utils/getDomain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAMrE"}
1
+ {"version":3,"file":"getDomain.d.ts","sourceRoot":"","sources":["../../../../../../src/charts/candle/utils/getDomain.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAExC,wBAAgB,SAAS,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,CAOrE"}
@@ -1,11 +1,7 @@
1
1
  import type { TDomain } from '../types';
2
- export declare function getHeight({
3
- value,
4
- domain,
5
- maxHeight,
6
- }: {
7
- value: number;
8
- domain: TDomain;
9
- maxHeight: number;
2
+ export declare function getHeight({ value, domain, maxHeight, }: {
3
+ value: number;
4
+ domain: TDomain;
5
+ maxHeight: number;
10
6
  }): number;
11
- //# sourceMappingURL=getHeight.d.ts.map
7
+ //# sourceMappingURL=getHeight.d.ts.map
@@ -1,11 +1,7 @@
1
1
  import type { TDomain } from '../types';
2
- export declare function getPrice({
3
- y,
4
- domain,
5
- maxHeight,
6
- }: {
7
- y: number;
8
- domain: TDomain;
9
- maxHeight: number;
2
+ export declare function getPrice({ y, domain, maxHeight, }: {
3
+ y: number;
4
+ domain: TDomain;
5
+ maxHeight: number;
10
6
  }): number;
11
- //# sourceMappingURL=getPrice.d.ts.map
7
+ //# sourceMappingURL=getPrice.d.ts.map
@@ -1,11 +1,7 @@
1
1
  import type { TDomain } from '../types';
2
- export declare function getY({
3
- value,
4
- domain,
5
- maxHeight,
6
- }: {
7
- value: number;
8
- domain: TDomain;
9
- maxHeight: number;
2
+ export declare function getY({ value, domain, maxHeight, }: {
3
+ value: number;
4
+ domain: TDomain;
5
+ maxHeight: number;
10
6
  }): number;
11
- //# sourceMappingURL=getY.d.ts.map
7
+ //# sourceMappingURL=getY.d.ts.map
@@ -2,4 +2,4 @@ export * from './getDomain';
2
2
  export * from './getHeight';
3
3
  export * from './getPrice';
4
4
  export * from './getY';
5
- //# sourceMappingURL=index.d.ts.map
5
+ //# sourceMappingURL=index.d.ts.map
@@ -3,31 +3,18 @@ import { ViewProps, TextStyle, ViewStyle } from 'react-native';
3
3
  export type LineChartAxisPosition = 'left' | 'right' | 'top' | 'bottom';
4
4
  export type LineChartAxisOrientation = 'horizontal' | 'vertical';
5
5
  export type LineChartAxisProps = ViewProps & {
6
- position: LineChartAxisPosition;
7
- orientation: LineChartAxisOrientation;
8
- color?: string;
9
- strokeWidth?: number;
10
- tickCount?: number;
11
- domain?: [number, number];
12
- hideOnInteraction?: boolean;
13
- format?: (value: number | string) => string | number;
14
- textStyle?: TextStyle;
15
- labelPadding?: number;
16
- labelWidth?: number;
17
- containerStyle?: ViewStyle;
6
+ position: LineChartAxisPosition;
7
+ orientation: LineChartAxisOrientation;
8
+ color?: string;
9
+ strokeWidth?: number;
10
+ tickCount?: number;
11
+ domain?: [number, number];
12
+ hideOnInteraction?: boolean;
13
+ format?: (value: number | string) => string | number;
14
+ textStyle?: TextStyle;
15
+ labelPadding?: number;
16
+ labelWidth?: number;
17
+ containerStyle?: ViewStyle;
18
18
  };
19
- export declare const LineChartAxis: ({
20
- position,
21
- orientation,
22
- color,
23
- strokeWidth,
24
- tickCount,
25
- domain,
26
- hideOnInteraction,
27
- format,
28
- textStyle,
29
- labelPadding,
30
- containerStyle,
31
- ...props
32
- }: LineChartAxisProps) => React.JSX.Element;
33
- //# sourceMappingURL=Axis.d.ts.map
19
+ export declare const LineChartAxis: ({ position, orientation, color, strokeWidth, tickCount, domain, hideOnInteraction, format, textStyle, labelPadding, containerStyle, ...props }: LineChartAxisProps) => React.JSX.Element;
20
+ //# sourceMappingURL=Axis.d.ts.map
@@ -3,40 +3,30 @@ import * as d3Shape from 'd3-shape';
3
3
  import { ViewProps } from 'react-native';
4
4
  import { Path } from 'react-native-redash';
5
5
  export declare const LineChartDimensionsContext: React.Context<{
6
- width: number;
7
- height: number;
8
- pointWidth: number;
9
- parsedPath: Path;
10
- path: string;
11
- area: string;
12
- shape: d3Shape.CurveFactory;
13
- gutter: number;
14
- pathWidth: number;
6
+ width: number;
7
+ height: number;
8
+ pointWidth: number;
9
+ parsedPath: Path;
10
+ path: string;
11
+ area: string;
12
+ shape: d3Shape.CurveFactory;
13
+ gutter: number;
14
+ pathWidth: number;
15
15
  }>;
16
- type LineChartProps = ViewProps & {
17
- children: React.ReactNode;
18
- yGutter?: number;
19
- width?: number;
20
- height?: number;
21
- shape?: unknown;
22
- /**
23
- * If your `LineChart.Provider` uses a dictionary with multiple IDs for multiple paths, then this field is required.
24
- */
25
- id?: string;
26
- absolute?: boolean;
16
+ export type LineChartProps = ViewProps & {
17
+ children: React.ReactNode;
18
+ yGutter?: number;
19
+ width?: number;
20
+ height?: number;
21
+ shape?: d3Shape.CurveFactory;
22
+ /**
23
+ * If your `LineChart.Provider` uses a dictionary with multiple IDs for multiple paths, then this field is required.
24
+ */
25
+ id?: string;
26
+ absolute?: boolean;
27
27
  };
28
- export declare function LineChart({
29
- children,
30
- yGutter,
31
- width,
32
- height,
33
- shape,
34
- id,
35
- absolute,
36
- ...props
37
- }: LineChartProps): React.JSX.Element;
28
+ export declare function LineChart({ children, yGutter, width, height, shape, id, absolute, ...props }: LineChartProps): React.JSX.Element;
38
29
  export declare namespace LineChart {
39
- var displayName: string;
30
+ var displayName: string;
40
31
  }
41
- export {};
42
- //# sourceMappingURL=Chart.d.ts.map
32
+ //# sourceMappingURL=Chart.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../../../src/charts/line/Chart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,OAAO,MAAM,UAAU,CAAC;AAEpC,OAAO,EAAgC,SAAS,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,IAAI,EAAS,MAAM,qBAAqB,CAAC;AAKlD,eAAO,MAAM,0BAA0B;;;;gBAInB,IAAI;;;;;;EAMtB,CAAC;AAEH,KAAK,cAAc,GAAG,SAAS,GAAG;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAMF,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,OAAY,EACZ,KAAmB,EACnB,MAAoB,EACpB,KAA0B,EAC1B,EAAE,EACF,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,qBAwFhB;yBAjGe,SAAS"}
1
+ {"version":3,"file":"Chart.d.ts","sourceRoot":"","sources":["../../../../../src/charts/line/Chart.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,OAAO,MAAM,UAAU,CAAC;AAEpC,OAAO,EAAgC,SAAS,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,IAAI,EAAS,MAAM,qBAAqB,CAAC;AAKlD,eAAO,MAAM,0BAA0B;;;;gBAInB,IAAI;;;;;;EAMtB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG;IACvC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC;IAC7B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAMF,wBAAgB,SAAS,CAAC,EACxB,QAAQ,EACR,OAAY,EACZ,KAAmB,EACnB,MAAoB,EACpB,KAA0B,EAC1B,EAAE,EACF,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,qBAwFhB;yBAjGe,SAAS"}
@@ -2,35 +2,22 @@ import React from 'react';
2
2
  import { WithTimingConfig } from 'react-native-reanimated';
3
3
  import { LineChartPathProps } from './Path';
4
4
  type LineChartPathWrapperProps = {
5
- animationDuration?: number;
6
- animationProps?: Omit<Partial<WithTimingConfig>, 'duration'>;
7
- children?: React.ReactNode;
8
- color?: string;
9
- inactiveColor?: string;
10
- width?: number;
11
- widthOffset?: number;
12
- pathProps?: Partial<LineChartPathProps>;
13
- showInactivePath?: boolean;
14
- animateOnMount?: 'foreground';
15
- mountAnimationDuration?: number;
16
- mountAnimationProps?: Partial<WithTimingConfig>;
5
+ animationDuration?: number;
6
+ animationProps?: Omit<Partial<WithTimingConfig>, 'duration'>;
7
+ children?: React.ReactNode;
8
+ color?: string;
9
+ inactiveColor?: string;
10
+ width?: number;
11
+ widthOffset?: number;
12
+ pathProps?: Partial<LineChartPathProps>;
13
+ showInactivePath?: boolean;
14
+ animateOnMount?: 'foreground';
15
+ mountAnimationDuration?: number;
16
+ mountAnimationProps?: Partial<WithTimingConfig>;
17
17
  };
18
- export declare function LineChartPathWrapper({
19
- animationDuration,
20
- animationProps,
21
- children,
22
- color,
23
- inactiveColor,
24
- width: strokeWidth,
25
- widthOffset,
26
- pathProps,
27
- showInactivePath,
28
- animateOnMount,
29
- mountAnimationDuration,
30
- mountAnimationProps,
31
- }: LineChartPathWrapperProps): React.JSX.Element;
18
+ export declare function LineChartPathWrapper({ animationDuration, animationProps, children, color, inactiveColor, width: strokeWidth, widthOffset, pathProps, showInactivePath, animateOnMount, mountAnimationDuration, mountAnimationProps, }: LineChartPathWrapperProps): React.JSX.Element;
32
19
  export declare namespace LineChartPathWrapper {
33
- var displayName: string;
20
+ var displayName: string;
34
21
  }
35
22
  export {};
36
- //# sourceMappingURL=ChartPath.d.ts.map
23
+ //# sourceMappingURL=ChartPath.d.ts.map
@@ -3,23 +3,16 @@ import type { TLineChartDataProp } from './types';
3
3
  import type { TLineChartContext, YRangeProp } from './types';
4
4
  export declare const LineChartContext: React.Context<TLineChartContext>;
5
5
  type LineChartProviderProps = {
6
- children: React.ReactNode;
7
- data: TLineChartDataProp;
8
- yRange?: YRangeProp;
9
- onCurrentIndexChange?: (x: number) => void;
10
- xLength?: number;
11
- xDomain?: [number, number];
6
+ children: React.ReactNode;
7
+ data: TLineChartDataProp;
8
+ yRange?: YRangeProp;
9
+ onCurrentIndexChange?: (x: number) => void;
10
+ xLength?: number;
11
+ xDomain?: [number, number];
12
12
  };
13
- export declare function LineChartProvider({
14
- children,
15
- data,
16
- yRange,
17
- onCurrentIndexChange,
18
- xLength,
19
- xDomain,
20
- }: LineChartProviderProps): React.JSX.Element;
13
+ export declare function LineChartProvider({ children, data, yRange, onCurrentIndexChange, xLength, xDomain, }: LineChartProviderProps): React.JSX.Element;
21
14
  export declare namespace LineChartProvider {
22
- var displayName: string;
15
+ var displayName: string;
23
16
  }
24
17
  export {};
25
- //# sourceMappingURL=Context.d.ts.map
18
+ //# sourceMappingURL=Context.d.ts.map
@@ -1,29 +1,21 @@
1
1
  import React from 'react';
2
2
  export type LineChartCursorProps = {
3
- children: React.ReactNode;
4
- type: 'line' | 'crosshair';
5
- snapToPoint?: boolean;
6
- at?: number;
7
- shouldCancelWhenOutside?: boolean;
8
- minDurationMs?: number;
9
- onActivated?: () => void;
10
- onEnded?: () => void;
11
- orientation?: 'horizontal' | 'vertical';
3
+ children: React.ReactNode;
4
+ type: 'line' | 'crosshair';
5
+ snapToPoint?: boolean;
6
+ at?: number;
7
+ shouldCancelWhenOutside?: boolean;
8
+ minDurationMs?: number;
9
+ onActivated?: () => void;
10
+ onEnded?: () => void;
11
+ orientation?: 'horizontal' | 'vertical';
12
+ persistOnEnd?: boolean;
12
13
  };
13
14
  export declare const CursorContext: React.Context<{
14
- type: string;
15
+ type: string;
15
16
  }>;
16
- export declare function LineChartCursor({
17
- children,
18
- snapToPoint,
19
- type,
20
- at,
21
- shouldCancelWhenOutside,
22
- minDurationMs,
23
- onActivated,
24
- onEnded,
25
- }: LineChartCursorProps): React.JSX.Element;
17
+ export declare function LineChartCursor({ children, snapToPoint, type, at, shouldCancelWhenOutside, persistOnEnd, minDurationMs, onActivated, onEnded, }: LineChartCursorProps): React.JSX.Element;
26
18
  export declare namespace LineChartCursor {
27
- var displayName: string;
19
+ var displayName: string;
28
20
  }
29
- //# sourceMappingURL=Cursor.d.ts.map
21
+ //# sourceMappingURL=Cursor.d.ts.map