@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
|
@@ -1 +1 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","source","autoPlay","loop","resizeMode"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/LottieAnimation.tsx";import React,{forwardRef}from"react";import{View}from"react-native";import LottieView from"lottie-react-native";import{
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","source","autoPlay","loop","resizeMode","speed"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/LottieAnimation.tsx";import React,{forwardRef}from"react";import{View}from"react-native";import LottieView from"lottie-react-native";import{jsx as _jsx}from"react/jsx-runtime";var LottieAnimation=forwardRef(function(_ref,ref){var style=_ref.style,source=_ref.source,_ref$autoPlay=_ref.autoPlay,autoPlay=_ref$autoPlay===void 0?true:_ref$autoPlay,_ref$loop=_ref.loop,loop=_ref$loop===void 0?true:_ref$loop,_ref$resizeMode=_ref.resizeMode,resizeMode=_ref$resizeMode===void 0?"cover":_ref$resizeMode,_ref$speed=_ref.speed,speed=_ref$speed===void 0?1:_ref$speed,rest=_objectWithoutProperties(_ref,_excluded);return _jsx(View,{style:style,children:_jsx(LottieView,Object.assign({ref:ref,source:source,autoPlay:autoPlay,loop:loop,resizeMode:resizeMode,speed:speed,style:{width:"100%",height:"100%"}},rest))});});export default LottieAnimation;
|
|
@@ -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":["../../../../src/components/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":["../../../../src/components/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"}
|