@momo-kits/animated-tooltip 0.169.15 → 0.169.16-beta.5

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.
package/index.tsx CHANGED
@@ -15,6 +15,7 @@ import {
15
15
  TouchableWithoutFeedback,
16
16
  useWindowDimensions,
17
17
  View,
18
+ type ViewInstance,
18
19
  } from 'react-native';
19
20
  import {
20
21
  MiniAppContext,
@@ -72,7 +73,7 @@ const Tooltip = forwardRef<TooltipRef, TooltipProps>(function Tooltip(
72
73
  `tooltip-${Math.random().toString(36).substr(2, 9)}`,
73
74
  ).current;
74
75
 
75
- const anchorRef = useRef<View>(null);
76
+ const anchorRef = useRef<ViewInstance>(null);
76
77
 
77
78
  const [anchorPosition, setAnchorPosition] = useState({
78
79
  x: 0,
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@momo-kits/animated-tooltip",
3
- "version": "0.169.15",
3
+ "version": "0.169.16-beta.5",
4
4
  "private": false,
5
+ "license": "MoMo",
5
6
  "main": "index.tsx",
7
+ "publishConfig": {
8
+ "registry": "https://registry.npmjs.org/"
9
+ },
6
10
  "dependencies": {},
7
11
  "peerDependencies": {
8
12
  "@momo-kits/foundation": "latest",
9
13
  "react": "*",
10
14
  "react-native": "*"
11
- },
12
- "license": "MoMo",
13
- "publishConfig": {
14
- "registry": "https://registry.npmjs.org/"
15
15
  }
16
16
  }
@@ -1,5 +1,5 @@
1
1
  import { RefObject, useEffect } from 'react';
2
- import { View } from 'react-native';
2
+ import { type ViewInstance } from 'react-native';
3
3
 
4
4
  type Position = { x: number; y: number; width: number; height: number };
5
5
 
@@ -10,8 +10,8 @@ export const usePreloadMeasure = ({
10
10
  setHostPosition,
11
11
  setAnchorPosition,
12
12
  }: {
13
- hostRef?: RefObject<View | null> | null;
14
- anchorRef: RefObject<View | null>;
13
+ hostRef?: RefObject<ViewInstance | null> | null;
14
+ anchorRef: RefObject<ViewInstance | null>;
15
15
  setHostPosition: (position: { x: number; y: number }) => void;
16
16
  setAnchorPosition: (position: Position) => void;
17
17
  }) => {