@momo-kits/foundation 0.156.1-beta.2 → 0.156.1-beta.4
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.
|
@@ -28,7 +28,7 @@ export const TooltipPortalProvider: React.FC<{ children: ReactNode }> = ({
|
|
|
28
28
|
const portalsRef = useRef<Map<string, ReactNode>>(new Map());
|
|
29
29
|
const hostRef = useRef<View>(null);
|
|
30
30
|
const [updateCounter, forceUpdate] = useReducer((x: number) => x + 1, 0);
|
|
31
|
-
const pendingUpdateRef = useRef<
|
|
31
|
+
const pendingUpdateRef = useRef<NodeJS.Timeout | null>(null);
|
|
32
32
|
|
|
33
33
|
const register = useCallback((id: string, content: ReactNode) => {
|
|
34
34
|
portalsRef.current.set(id, content);
|
|
@@ -54,13 +54,13 @@ export const TooltipPortalProvider: React.FC<{ children: ReactNode }> = ({
|
|
|
54
54
|
pendingUpdateRef.current = setTimeout(() => {
|
|
55
55
|
forceUpdate();
|
|
56
56
|
pendingUpdateRef.current = null;
|
|
57
|
-
}, 0);
|
|
57
|
+
}, 0) as unknown as NodeJS.Timeout;
|
|
58
58
|
}
|
|
59
59
|
}, []);
|
|
60
60
|
|
|
61
61
|
const value = useMemo(
|
|
62
62
|
() => ({ register, unregister, portals: portalsRef.current, hostRef }),
|
|
63
|
-
[register, unregister], // Include updateCounter to refresh context
|
|
63
|
+
[register, unregister, updateCounter], // Include updateCounter to refresh context
|
|
64
64
|
);
|
|
65
65
|
|
|
66
66
|
return (
|
package/Popup/PopupPromotion.tsx
CHANGED
|
@@ -121,7 +121,7 @@ const PopupPromotion: React.FC<PopupPromotionProps> = ({
|
|
|
121
121
|
|
|
122
122
|
const styles = StyleSheet.create({
|
|
123
123
|
container: {
|
|
124
|
-
aspectRatio: 0.
|
|
124
|
+
aspectRatio: 0.5625, // 9:16
|
|
125
125
|
width: '100%',
|
|
126
126
|
},
|
|
127
127
|
debugBaseLine: { borderWidth: 1, borderColor: Colors.green_06 },
|