@remotion/three 4.0.149 → 4.0.150

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/bundle.ts CHANGED
@@ -1,4 +1,17 @@
1
- import {build} from 'bun';
1
+ import {build, revision} from 'bun';
2
+
3
+ if (process.env.NODE_ENV !== 'production') {
4
+ throw new Error('This script must be run using NODE_ENV=production');
5
+ }
6
+
7
+ if (!revision.startsWith('07ce')) {
8
+ // eslint-disable-next-line no-console
9
+ console.warn('warn: Remotion currently uses a fork of Bun to bundle.');
10
+ // eslint-disable-next-line no-console
11
+ console.log(
12
+ 'You dont currently run the fork, this could lead to duplicate key warnings in React.',
13
+ );
14
+ }
2
15
 
3
16
  const output = await build({
4
17
  entrypoints: ['src/index.ts'],
@@ -16,9 +29,7 @@ const output = await build({
16
29
  });
17
30
 
18
31
  const [file] = output.outputs;
19
- const text = (await file.text())
20
- .replace(/jsxDEV/g, 'jsx')
21
- .replace(/react\/jsx-dev-runtime/g, 'react/jsx-runtime');
32
+ const text = await file.text();
22
33
 
23
34
  await Bun.write('dist/esm/index.mjs', text);
24
35
 
@@ -30,9 +30,9 @@ var Unblocker = () => {
30
30
  };
31
31
  var SuspenseLoader = ({ children }) => {
32
32
  return jsx(Suspense, {
33
- fallback: jsx(Unblocker, {}, undefined, false, undefined, this),
33
+ fallback: jsx(Unblocker, {}),
34
34
  children
35
- }, undefined, false, undefined, this);
35
+ });
36
36
  };
37
37
 
38
38
  // src/validate.ts
@@ -41,7 +41,8 @@ var validateDimension = NoReactInternals.validateDimension;
41
41
 
42
42
  // src/ThreeCanvas.tsx
43
43
  import {
44
- jsx as jsx2
44
+ jsx as jsx2,
45
+ jsxs
45
46
  } from "react/jsx-runtime";
46
47
  var Scale = ({
47
48
  width,
@@ -72,7 +73,7 @@ var ThreeCanvas = (props) => {
72
73
  onCreated?.(state);
73
74
  }, [onCreated, waitForCreated]);
74
75
  return jsx2(SuspenseLoader, {
75
- children: jsx2(Canvas, {
76
+ children: jsxs(Canvas, {
76
77
  style: actualStyle,
77
78
  ...rest,
78
79
  onCreated: remotion_onCreated,
@@ -80,14 +81,14 @@ var ThreeCanvas = (props) => {
80
81
  jsx2(Scale, {
81
82
  width,
82
83
  height
83
- }, undefined, false, undefined, this),
84
+ }),
84
85
  jsx2(Internals.RemotionContextProvider, {
85
86
  contexts,
86
87
  children
87
- }, undefined, false, undefined, this)
88
+ })
88
89
  ]
89
- }, undefined, true, undefined, this)
90
- }, undefined, false, undefined, this);
90
+ })
91
+ });
91
92
  };
92
93
 
93
94
  // src/use-offthread-video-texture.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/three",
3
- "version": "4.0.149",
3
+ "version": "4.0.150",
4
4
  "description": "Utility functions for using react-three-fiber with remotion",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",
@@ -16,14 +16,14 @@
16
16
  "url": "https://github.com/remotion-dev/remotion/issues"
17
17
  },
18
18
  "dependencies": {
19
- "remotion": "4.0.149"
19
+ "remotion": "4.0.150"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "@react-three/fiber": ">=8.0.0",
23
23
  "react": ">=16.8.0",
24
24
  "react-dom": ">=16.8.0",
25
25
  "three": ">=0.137.0",
26
- "remotion": "4.0.149"
26
+ "remotion": "4.0.150"
27
27
  },
28
28
  "devDependencies": {
29
29
  "@jonny/eslint-config": "3.0.281",
@@ -39,7 +39,7 @@
39
39
  "react": "18.3.1",
40
40
  "react-dom": "18.3.1",
41
41
  "three": "0.158.0",
42
- "remotion": "4.0.149"
42
+ "remotion": "4.0.150"
43
43
  },
44
44
  "keywords": [
45
45
  "remotion",
@@ -64,6 +64,6 @@
64
64
  "scripts": {
65
65
  "formatting": "prettier src --check",
66
66
  "lint": "eslint src --ext ts,tsx",
67
- "build": "bun bundle.ts"
67
+ "build": "bun --env-file=../.env.bundle bundle.ts"
68
68
  }
69
69
  }