@draftbit/core 50.3.2-b57f9b.2 → 50.3.2
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/lib/commonjs/components/LottieAnimation.js +1 -1
- package/lib/typescript/src/components/LottieAnimation.d.ts +1 -0
- package/lib/typescript/src/components/LottieAnimation.js +5 -7
- package/lib/typescript/src/components/LottieAnimation.js.map +1 -1
- package/lib/typescript/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/components/LottieAnimation.js +5 -7
- package/src/components/LottieAnimation.js.map +1 -1
- package/src/components/LottieAnimation.tsx +6 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "50.3.2
|
|
3
|
+
"version": "50.3.2",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"types": "lib/typescript/src/index.d.ts",
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"homepage": "https://github.com/draftbit/react-native-jigsaw#readme",
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
|
-
"@dotlottie/react-player": "
|
|
43
|
+
"@dotlottie/react-player": "1.6.1",
|
|
44
44
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
45
|
-
"@draftbit/theme": "
|
|
45
|
+
"@draftbit/theme": "50.3.2",
|
|
46
46
|
"@expo/vector-icons": "^14.0.0",
|
|
47
47
|
"@gorhom/bottom-sheet": "5.0.0-alpha.7",
|
|
48
48
|
"@lottiefiles/react-lottie-player": "3.5.3",
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
"lodash.isnumber": "^3.0.3",
|
|
60
60
|
"lodash.omit": "^4.5.0",
|
|
61
61
|
"lodash.tonumber": "^4.0.3",
|
|
62
|
-
"lottie-react-native": "
|
|
62
|
+
"lottie-react-native": "6.5.1",
|
|
63
63
|
"react-native-animated-spinkit": "1.5.2",
|
|
64
64
|
"react-native-confirmation-code-field": "^7.3.1",
|
|
65
65
|
"react-native-deck-swiper": "^2.0.12",
|
|
@@ -121,5 +121,5 @@
|
|
|
121
121
|
],
|
|
122
122
|
"testEnvironment": "node"
|
|
123
123
|
},
|
|
124
|
-
"gitHead": "
|
|
124
|
+
"gitHead": "d5556d77e2d2adc146c028eb81586863a395d3c7"
|
|
125
125
|
}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
2
|
import { View } from "react-native";
|
|
3
3
|
import LottieView from "lottie-react-native";
|
|
4
|
-
|
|
5
|
-
const LottieAnimation = forwardRef(({ style, source, autoPlay = true, loop = true, resizeMode = "cover", ...rest }, ref) => {
|
|
6
|
-
const sizeStyles = extractSizeStyles(style);
|
|
4
|
+
const LottieAnimation = forwardRef(({ style, source, autoPlay = true, loop = true, resizeMode = "cover", speed = 1, ...rest }, ref) => {
|
|
7
5
|
return (React.createElement(View, { style: style },
|
|
8
|
-
React.createElement(LottieView, { ref: ref, source: source, autoPlay: autoPlay, loop: loop, resizeMode: resizeMode,
|
|
9
|
-
//
|
|
10
|
-
// This
|
|
11
|
-
style:
|
|
6
|
+
React.createElement(LottieView, { ref: ref, source: source, autoPlay: autoPlay, loop: loop, resizeMode: resizeMode, speed: speed,
|
|
7
|
+
// A specific size is required on mobile, but not on web.
|
|
8
|
+
// This ensures consistent behavior across platforms during preview.
|
|
9
|
+
style: { width: "100%", height: "100%" }, ...rest })));
|
|
12
10
|
});
|
|
13
11
|
export default LottieAnimation;
|
|
14
12
|
//# sourceMappingURL=LottieAnimation.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LottieAnimation.js","sourceRoot":"","sources":["LottieAnimation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAwB,MAAM,cAAc,CAAC;AAC1D,OAAO,UAA+B,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"LottieAnimation.js","sourceRoot":"","sources":["LottieAnimation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,IAAI,EAAwB,MAAM,cAAc,CAAC;AAC1D,OAAO,UAA+B,MAAM,qBAAqB,CAAC;AAWlE,MAAM,eAAe,GAAG,UAAU,CAChC,CACE,EACE,KAAK,EACL,MAAM,EACN,QAAQ,GAAG,IAAI,EACf,IAAI,GAAG,IAAI,EACX,UAAU,GAAG,OAAO,EACpB,KAAK,GAAG,CAAC,EACT,GAAG,IAAI,EACR,EACD,GAAG,EACH,EAAE;IACF,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,KAAK;QAChB,oBAAC,UAAU,IACT,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACd,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK;YACZ,yDAAyD;YACzD,oEAAoE;YACpE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,KACpC,IAAI,GACR,CACG,CACR,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import React, { forwardRef } from "react";
|
|
2
2
|
import { View, StyleProp, ViewStyle } from "react-native";
|
|
3
3
|
import LottieView, { AnimationObject } from "lottie-react-native";
|
|
4
|
-
import { extractSizeStyles } from "../utilities";
|
|
5
4
|
|
|
6
5
|
type Props = {
|
|
7
6
|
style?: StyleProp<ViewStyle>;
|
|
8
7
|
resizeMode?: "cover" | "contain" | "center";
|
|
9
8
|
source: string | AnimationObject | { uri: string };
|
|
10
9
|
autoPlay?: boolean;
|
|
10
|
+
speed?: number;
|
|
11
11
|
loop?: boolean;
|
|
12
12
|
};
|
|
13
13
|
|
|
@@ -19,11 +19,11 @@ const LottieAnimation = forwardRef<LottieView, Props>(
|
|
|
19
19
|
autoPlay = true,
|
|
20
20
|
loop = true,
|
|
21
21
|
resizeMode = "cover",
|
|
22
|
+
speed = 1,
|
|
22
23
|
...rest
|
|
23
24
|
},
|
|
24
25
|
ref
|
|
25
26
|
) => {
|
|
26
|
-
const sizeStyles = extractSizeStyles(style);
|
|
27
27
|
return (
|
|
28
28
|
<View style={style}>
|
|
29
29
|
<LottieView
|
|
@@ -32,9 +32,10 @@ const LottieAnimation = forwardRef<LottieView, Props>(
|
|
|
32
32
|
autoPlay={autoPlay}
|
|
33
33
|
loop={loop}
|
|
34
34
|
resizeMode={resizeMode}
|
|
35
|
-
|
|
36
|
-
//
|
|
37
|
-
|
|
35
|
+
speed={speed}
|
|
36
|
+
// A specific size is required on mobile, but not on web.
|
|
37
|
+
// This ensures consistent behavior across platforms during preview.
|
|
38
|
+
style={{ width: "100%", height: "100%" }}
|
|
38
39
|
{...rest}
|
|
39
40
|
/>
|
|
40
41
|
</View>
|