@remotion/gif 4.0.323 → 4.0.324

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,5 +1,5 @@
1
1
 
2
2
  
3
- > @remotion/gif@4.0.323 make /Users/jonathanburger/remotion/packages/gif
3
+ > @remotion/gif@4.0.324 make /Users/jonathanburger/remotion/packages/gif
4
4
  > tsc -d && node build.mjs && bun --env-file=../.env.bundle bundle.ts
5
5
 
@@ -24,9 +24,13 @@ const useElementSize = (ref) => {
24
24
  setSize(null);
25
25
  return;
26
26
  }
27
- const probableCssParentScale = newSize[0].width / contentRect.width;
28
- const width = newSize[0].width * (1 / probableCssParentScale);
29
- const height = newSize[0].height * (1 / probableCssParentScale);
27
+ const probableCssParentScale = contentRect.width === 0 ? 1 : newSize[0].width / contentRect.width;
28
+ const width = probableCssParentScale > 0
29
+ ? newSize[0].width * (1 / probableCssParentScale)
30
+ : newSize[0].width;
31
+ const height = probableCssParentScale > 0
32
+ ? newSize[0].height * (1 / probableCssParentScale)
33
+ : newSize[0].height;
30
34
  setSize({
31
35
  width,
32
36
  height,
@@ -851,9 +851,9 @@ var useElementSize = (ref) => {
851
851
  setSize(null);
852
852
  return;
853
853
  }
854
- const probableCssParentScale = newSize[0].width / contentRect.width;
855
- const width = newSize[0].width * (1 / probableCssParentScale);
856
- const height = newSize[0].height * (1 / probableCssParentScale);
854
+ const probableCssParentScale = contentRect.width === 0 ? 1 : newSize[0].width / contentRect.width;
855
+ const width = probableCssParentScale > 0 ? newSize[0].width * (1 / probableCssParentScale) : newSize[0].width;
856
+ const height = probableCssParentScale > 0 ? newSize[0].height * (1 / probableCssParentScale) : newSize[0].height;
857
857
  setSize({
858
858
  width,
859
859
  height
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/gif"
4
4
  },
5
5
  "name": "@remotion/gif",
6
- "version": "4.0.323",
6
+ "version": "4.0.324",
7
7
  "description": "Embed GIFs in a Remotion video",
8
8
  "sideEffects": false,
9
9
  "bugs": {
@@ -24,7 +24,7 @@
24
24
  }
25
25
  },
26
26
  "dependencies": {
27
- "remotion": "4.0.323"
27
+ "remotion": "4.0.324"
28
28
  },
29
29
  "devDependencies": {
30
30
  "esbuild": "0.25.0",
@@ -32,7 +32,7 @@
32
32
  "react-dom": "19.0.0",
33
33
  "webpack": "5.96.1",
34
34
  "eslint": "9.19.0",
35
- "@remotion/eslint-config-internal": "4.0.323"
35
+ "@remotion/eslint-config-internal": "4.0.324"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "react": ">=16.8.0",