@remotion/lottie 4.0.278 → 4.0.279
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/dist/cjs/Lottie.js +6 -0
- package/dist/esm/index.mjs +5 -0
- package/package.json +3 -3
package/dist/cjs/Lottie.js
CHANGED
|
@@ -27,6 +27,12 @@ const Lottie = ({ animationData, className, direction, loop, playbackRate, style
|
|
|
27
27
|
const onAnimationLoadedRef = (0, react_1.useRef)(onAnimationLoaded);
|
|
28
28
|
onAnimationLoadedRef.current = onAnimationLoaded;
|
|
29
29
|
const [handle] = (0, react_1.useState)(() => (0, remotion_1.delayRender)('Waiting for Lottie animation to load'));
|
|
30
|
+
// If component unmounts, continue the render
|
|
31
|
+
(0, react_1.useEffect)(() => {
|
|
32
|
+
return () => {
|
|
33
|
+
(0, remotion_1.continueRender)(handle);
|
|
34
|
+
};
|
|
35
|
+
}, [handle]);
|
|
30
36
|
const frame = (0, remotion_1.useCurrentFrame)();
|
|
31
37
|
currentFrameRef.current = frame;
|
|
32
38
|
(0, react_1.useEffect)(() => {
|
package/dist/esm/index.mjs
CHANGED
|
@@ -85,6 +85,11 @@ var Lottie = ({
|
|
|
85
85
|
const onAnimationLoadedRef = useRef(onAnimationLoaded);
|
|
86
86
|
onAnimationLoadedRef.current = onAnimationLoaded;
|
|
87
87
|
const [handle] = useState(() => delayRender("Waiting for Lottie animation to load"));
|
|
88
|
+
useEffect(() => {
|
|
89
|
+
return () => {
|
|
90
|
+
continueRender(handle);
|
|
91
|
+
};
|
|
92
|
+
}, [handle]);
|
|
88
93
|
const frame = useCurrentFrame();
|
|
89
94
|
currentFrameRef.current = frame;
|
|
90
95
|
useEffect(() => {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/lottie"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/lottie",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.279",
|
|
7
7
|
"description": "Include Lottie animations in Remotion",
|
|
8
8
|
"main": "dist/cjs/index.js",
|
|
9
9
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"remotion": "4.0.
|
|
22
|
+
"remotion": "4.0.279"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"lottie-web": "^5",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"react": "19.0.0",
|
|
40
40
|
"react-dom": "19.0.0",
|
|
41
41
|
"eslint": "9.19.0",
|
|
42
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
42
|
+
"@remotion/eslint-config-internal": "4.0.279"
|
|
43
43
|
},
|
|
44
44
|
"keywords": [
|
|
45
45
|
"remotion",
|