@remotion/lottie 4.0.213 → 4.0.214

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,3 +1,3 @@
1
- export { Lottie } from './Lottie';
2
1
  export { getLottieMetadata } from './get-lottie-metadata';
2
+ export { Lottie } from './Lottie';
3
3
  export type { LottieAnimationData, LottieProps } from './types';
package/dist/cjs/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getLottieMetadata = exports.Lottie = void 0;
4
- var Lottie_1 = require("./Lottie");
5
- Object.defineProperty(exports, "Lottie", { enumerable: true, get: function () { return Lottie_1.Lottie; } });
3
+ exports.Lottie = exports.getLottieMetadata = void 0;
6
4
  var get_lottie_metadata_1 = require("./get-lottie-metadata");
7
5
  Object.defineProperty(exports, "getLottieMetadata", { enumerable: true, get: function () { return get_lottie_metadata_1.getLottieMetadata; } });
6
+ var Lottie_1 = require("./Lottie");
7
+ Object.defineProperty(exports, "Lottie", { enumerable: true, get: function () { return Lottie_1.Lottie; } });
@@ -1,3 +1,20 @@
1
+ // src/get-lottie-metadata.ts
2
+ var getLottieMetadata = (animationData) => {
3
+ const width = animationData.w;
4
+ const height = animationData.h;
5
+ const framerate = animationData.fr;
6
+ const durationInFrames = animationData.op;
7
+ if (![width, height, framerate, durationInFrames].every(Boolean)) {
8
+ return null;
9
+ }
10
+ return {
11
+ durationInFrames: Math.floor(durationInFrames),
12
+ durationInSeconds: durationInFrames / framerate,
13
+ fps: framerate,
14
+ height,
15
+ width
16
+ };
17
+ };
1
18
  // src/Lottie.tsx
2
19
  import lottie from "lottie-web";
3
20
  import {useEffect, useRef, useState} from "react";
@@ -157,23 +174,6 @@ var Lottie = ({
157
174
  style
158
175
  });
159
176
  };
160
- // src/get-lottie-metadata.ts
161
- var getLottieMetadata = (animationData) => {
162
- const width = animationData.w;
163
- const height = animationData.h;
164
- const framerate = animationData.fr;
165
- const durationInFrames = animationData.op;
166
- if (![width, height, framerate, durationInFrames].every(Boolean)) {
167
- return null;
168
- }
169
- return {
170
- durationInFrames: Math.floor(durationInFrames),
171
- durationInSeconds: durationInFrames / framerate,
172
- fps: framerate,
173
- height,
174
- width
175
- };
176
- };
177
177
  export {
178
178
  getLottieMetadata,
179
179
  Lottie
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.213",
6
+ "version": "4.0.214",
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.213"
22
+ "remotion": "4.0.214"
23
23
  },
24
24
  "peerDependencies": {
25
25
  "lottie-web": "^5",
@@ -55,6 +55,6 @@
55
55
  "formatting": "prettier src --check",
56
56
  "lint": "eslint src --ext ts,tsx",
57
57
  "test": "bun test src",
58
- "build": "bun --env-file=../.env.bundle bundle.ts"
58
+ "make": "bun --env-file=../.env.bundle bundle.ts"
59
59
  }
60
60
  }