@remotion/three 3.3.7 → 3.3.9

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.
@@ -5,12 +5,15 @@ const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("react");
6
6
  const remotion_1 = require("remotion");
7
7
  const Unblocker = () => {
8
- const [handle] = (0, react_1.useState)(() => (0, remotion_1.delayRender)(`Waiting for <Suspense /> of <ThreeCanvas /> to resolve`));
9
- (0, react_1.useEffect)(() => {
10
- return () => {
11
- (0, remotion_1.continueRender)(handle);
12
- };
13
- }, [handle]);
8
+ if (typeof document !== 'undefined') {
9
+ // eslint-disable-next-line react-hooks/rules-of-hooks
10
+ (0, react_1.useLayoutEffect)(() => {
11
+ const handle = (0, remotion_1.delayRender)(`Waiting for <Suspense /> of <ThreeCanvas /> to resolve`);
12
+ return () => {
13
+ (0, remotion_1.continueRender)(handle);
14
+ };
15
+ }, []);
16
+ }
14
17
  return null;
15
18
  };
16
19
  const SuspenseLoader = ({ children }) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/three",
3
- "version": "3.3.7",
3
+ "version": "3.3.9",
4
4
  "description": "Utility functions for using react-three-fiber with remotion",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -20,7 +20,7 @@
20
20
  "url": "https://github.com/remotion-dev/remotion/issues"
21
21
  },
22
22
  "dependencies": {
23
- "remotion": "3.3.7"
23
+ "remotion": "3.3.9"
24
24
  },
25
25
  "peerDependencies": {
26
26
  "@react-three/fiber": ">=8.0.0",
@@ -55,5 +55,5 @@
55
55
  "publishConfig": {
56
56
  "access": "public"
57
57
  },
58
- "gitHead": "5a9310dd3db431e7a3e2eb2e2b3c508bbc7b258a"
58
+ "gitHead": "86269c98522cb7ea280f8283fa6c57885b971b3b"
59
59
  }