@remotion/cli 3.0.17 → 3.0.18

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.
@@ -8,7 +8,6 @@ const remotion_1 = require("remotion");
8
8
  const checkerboard_background_1 = require("../helpers/checkerboard-background");
9
9
  const checkerboard_1 = require("../state/checkerboard");
10
10
  const preview_size_1 = require("../state/preview-size");
11
- const LoadingIndicator_1 = require("./LoadingIndicator");
12
11
  const checkerboardSize = 49;
13
12
  const containerStyle = (options) => {
14
13
  return {
@@ -26,9 +25,8 @@ const containerStyle = (options) => {
26
25
  };
27
26
  };
28
27
  const Inner = ({ canvasSize }) => {
29
- var _a;
30
28
  const { size: previewSize } = (0, react_1.useContext)(preview_size_1.PreviewSizeContext);
31
- const video = remotion_1.Internals.useVideo();
29
+ const portalContainer = (0, react_1.useRef)(null);
32
30
  const config = (0, remotion_1.useVideoConfig)();
33
31
  const { checkerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
34
32
  const { centerX, centerY, yCorrection, xCorrection, scale } = player_1.PlayerInternals.calculateScale({
@@ -66,9 +64,14 @@ const Inner = ({ canvasSize }) => {
66
64
  xCorrection,
67
65
  yCorrection,
68
66
  ]);
69
- const Component = video ? video.component : null;
70
- const inputProps = (0, remotion_1.getInputProps)();
71
- return ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(LoadingIndicator_1.Loading, {}), children: (0, jsx_runtime_1.jsx)("div", { style: outer, children: (0, jsx_runtime_1.jsx)("div", { style: style, children: Component ? ((0, jsx_runtime_1.jsx)(Component, { ...((_a = video === null || video === void 0 ? void 0 : video.defaultProps) !== null && _a !== void 0 ? _a : {}), ...inputProps })) : null }) }) }));
67
+ (0, react_1.useEffect)(() => {
68
+ const { current } = portalContainer;
69
+ current === null || current === void 0 ? void 0 : current.appendChild(remotion_1.Internals.portalNode());
70
+ return () => {
71
+ current === null || current === void 0 ? void 0 : current.removeChild(remotion_1.Internals.portalNode());
72
+ };
73
+ }, []);
74
+ return ((0, jsx_runtime_1.jsx)("div", { style: outer, children: (0, jsx_runtime_1.jsx)("div", { ref: portalContainer, style: style }) }));
72
75
  };
73
76
  const VideoPreview = ({ canvasSize }) => {
74
77
  const config = remotion_1.Internals.useUnsafeVideoConfig();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "3.0.17",
3
+ "version": "3.0.18",
4
4
  "description": "CLI for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -23,16 +23,16 @@
23
23
  "author": "Jonny Burger <jonny@remotion.dev>",
24
24
  "license": "SEE LICENSE IN LICENSE.md",
25
25
  "dependencies": {
26
- "@remotion/bundler": "3.0.17",
27
- "@remotion/media-utils": "3.0.17",
28
- "@remotion/player": "3.0.17",
29
- "@remotion/renderer": "3.0.17",
26
+ "@remotion/bundler": "3.0.18",
27
+ "@remotion/media-utils": "3.0.18",
28
+ "@remotion/player": "3.0.18",
29
+ "@remotion/renderer": "3.0.18",
30
30
  "better-opn": "2.1.1",
31
31
  "chalk": "4.1.2",
32
32
  "dotenv": "9.0.2",
33
33
  "execa": "5.1.1",
34
34
  "minimist": "1.2.6",
35
- "remotion": "3.0.17",
35
+ "remotion": "3.0.18",
36
36
  "semver": "7.3.5"
37
37
  },
38
38
  "peerDependencies": {
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "c973653a9ced0d8793ce0cb03ce5f837b149d865"
74
+ "gitHead": "64eadd48b303d0f627ed5883f9200345af002ee2"
75
75
  }