@artsy/palette-mobile 19.7.0 → 19.8.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.
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { useEffect } from "react";
3
- import Animated, { Easing, useAnimatedStyle, useSharedValue, withRepeat, withTiming, } from "react-native-reanimated";
2
+ import { useEffect, useRef } from "react";
3
+ import { Animated } from "react-native";
4
4
  import { useColor } from "../../utils/hooks";
5
5
  import { Flex } from "../Flex";
6
6
  import { Text } from "../Text";
@@ -15,14 +15,17 @@ import { Text } from "../Text";
15
15
  * </Skeleton>
16
16
  */
17
17
  export const Skeleton = ({ children }) => {
18
- const opacity = useSharedValue(0.5);
18
+ const opacity = useRef(new Animated.Value(0.5));
19
19
  useEffect(() => {
20
- opacity.set(() => withRepeat(withTiming(1, { duration: 1000, easing: Easing.ease }), -1, true));
21
- }, [opacity]);
22
- const fadeLoopAnim = useAnimatedStyle(() => {
23
- return { opacity: opacity.get() };
20
+ Animated.loop(Animated.timing(opacity.current, {
21
+ toValue: 1,
22
+ duration: 1000,
23
+ useNativeDriver: true,
24
+ })).start();
24
25
  }, []);
25
- return _jsx(Animated.View, { style: fadeLoopAnim, children: children });
26
+ return (_jsx(Animated.View, { style: {
27
+ opacity: opacity.current,
28
+ }, children: children }));
26
29
  };
27
30
  export const SkeletonText = ({ children, ...rest }) => {
28
31
  const color = useColor();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@artsy/palette-mobile",
3
- "version": "19.7.0",
3
+ "version": "19.8.0",
4
4
  "description": "Artsy's design system for React Native",
5
5
  "scripts": {
6
6
  "android": "expo run:android --port 8082",