react-native-wagmi-charts 2.0.1 → 2.1.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 (46) hide show
  1. package/.DS_Store +0 -0
  2. package/README.md +30 -1
  3. package/example/.DS_Store +0 -0
  4. package/example/package.json +11 -13
  5. package/example/src/App.tsx +39 -34
  6. package/example/src/LineChart.tsx +2 -1
  7. package/example/yarn.lock +1819 -8871
  8. package/lib/commonjs/charts/candle/HoverTrap/index.web.js +120 -0
  9. package/lib/commonjs/charts/candle/HoverTrap/index.web.js.map +1 -0
  10. package/lib/commonjs/charts/line/ChartPath.js +8 -3
  11. package/lib/commonjs/charts/line/ChartPath.js.map +1 -1
  12. package/lib/commonjs/charts/line/HoverTrap/index.js +15 -0
  13. package/lib/commonjs/charts/line/HoverTrap/index.js.map +1 -0
  14. package/lib/commonjs/charts/line/HoverTrap/index.web.js +120 -0
  15. package/lib/commonjs/charts/line/HoverTrap/index.web.js.map +1 -0
  16. package/lib/commonjs/charts/line/index.js +4 -1
  17. package/lib/commonjs/charts/line/index.js.map +1 -1
  18. package/lib/commonjs/components/AnimatedText.js +3 -5
  19. package/lib/commonjs/components/AnimatedText.js.map +1 -1
  20. package/lib/module/charts/candle/HoverTrap/index.web.js +101 -0
  21. package/lib/module/charts/candle/HoverTrap/index.web.js.map +1 -0
  22. package/lib/module/charts/line/ChartPath.js +8 -3
  23. package/lib/module/charts/line/ChartPath.js.map +1 -1
  24. package/lib/module/charts/line/HoverTrap/index.js +3 -0
  25. package/lib/module/charts/line/HoverTrap/index.js.map +1 -0
  26. package/lib/module/charts/line/HoverTrap/index.web.js +101 -0
  27. package/lib/module/charts/line/HoverTrap/index.web.js.map +1 -0
  28. package/lib/module/charts/line/index.js +3 -1
  29. package/lib/module/charts/line/index.js.map +1 -1
  30. package/lib/module/components/AnimatedText.js +2 -5
  31. package/lib/module/components/AnimatedText.js.map +1 -1
  32. package/lib/typescript/src/charts/candle/HoverTrap/index.web.d.ts +2 -0
  33. package/lib/typescript/src/charts/line/ChartPath.d.ts +3 -3
  34. package/lib/typescript/src/charts/line/HoverTrap/index.d.ts +2 -0
  35. package/lib/typescript/src/charts/line/HoverTrap/index.web.d.ts +2 -0
  36. package/lib/typescript/src/charts/line/index.d.ts +2 -0
  37. package/package.json +5 -5
  38. package/src/charts/candle/HoverTrap/index.web.tsx +110 -0
  39. package/src/charts/line/ChartPath.tsx +19 -14
  40. package/src/charts/line/HoverTrap/index.tsx +3 -0
  41. package/src/charts/line/HoverTrap/index.web.tsx +110 -0
  42. package/src/charts/line/index.ts +2 -0
  43. package/src/components/AnimatedText.tsx +2 -5
  44. package/tsconfig.json +1 -1
  45. package/yarn.lock +1840 -796
  46. package/example/patches/react-native-reanimated+2.2.2.patch +0 -28
@@ -15,6 +15,7 @@ import { LineChartDatetimeText } from './DatetimeText';
15
15
  import { useLineChartDatetime } from './useDatetime';
16
16
  import { useLineChartPrice } from './usePrice';
17
17
  import { useLineChart } from './useLineChart';
18
+ import { LineChartHoverTrap } from '../line/HoverTrap';
18
19
 
19
20
  export * from './Chart';
20
21
  export * from './ChartPath';
@@ -52,4 +53,5 @@ export const LineChart = Object.assign(_LineChart, {
52
53
  useDatetime: useLineChartDatetime,
53
54
  usePrice: useLineChartPrice,
54
55
  useChart: useLineChart,
56
+ HoverTrap: LineChartHoverTrap,
55
57
  });
@@ -18,7 +18,7 @@ interface AnimatedTextProps {
18
18
  const AnimatedTextInput = Animated.createAnimatedComponent(TextInput);
19
19
 
20
20
  export const AnimatedText = ({ text, style }: AnimatedTextProps) => {
21
- const inputRef = React.useRef<TextInput>(null);
21
+ const inputRef = React.useRef<any>(null); // eslint-disable-line @typescript-eslint/no-explicit-any
22
22
 
23
23
  if (Platform.OS === 'web') {
24
24
  // For some reason, the worklet reaction evaluates upfront regardless of any
@@ -33,10 +33,7 @@ export const AnimatedText = ({ text, style }: AnimatedTextProps) => {
33
33
  },
34
34
  (data, prevData) => {
35
35
  if (data !== prevData && inputRef.current) {
36
- inputRef.current.setNativeProps({
37
- value: data,
38
- style,
39
- });
36
+ inputRef.current.value = data;
40
37
  }
41
38
  }
42
39
  );
package/tsconfig.json CHANGED
@@ -10,7 +10,7 @@
10
10
  "importsNotUsedAsValues": "error",
11
11
  "forceConsistentCasingInFileNames": true,
12
12
  "jsx": "react",
13
- "lib": ["esnext"],
13
+ "lib": ["esnext", "dom"],
14
14
  "module": "esnext",
15
15
  "moduleResolution": "node",
16
16
  "noFallthroughCasesInSwitch": true,