@remotion/bundler 4.0.142 → 4.0.144

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/LICENSE.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Remotion License
2
2
 
3
+ In Remotion 5.0, the license will slightly change. [View the changes here](https://github.com/remotion-dev/remotion/pull/3750).
4
+
5
+ ---
6
+
3
7
  Depending on the type of your legal entity, you are granted permission to use Remotion for your project. Individuals and small companies are allowed to use Remotion to create videos for free (even commercial), while a company license is required for for-profit organizations of a certain size. This two-tier system was designed to ensure funding for this project while still allowing the source code to be available and the program to be free for most. Read below for the exact terms of use.
4
8
 
5
9
  - [Free license](#free-license)
@@ -1,4 +1,4 @@
1
- import type { GitSource, RenderDefaults } from '@remotion/studio';
1
+ import type { GitSource, RenderDefaults } from '@remotion/studio-shared';
2
2
  import type { StaticFile } from 'remotion';
3
3
  export declare const indexHtml: ({ publicPath, editorName, inputProps, envVariables, staticHash, remotionRoot, studioServerCommand, renderQueue, numberOfAudioTags, publicFiles, includeFavicon, title, renderDefaults, publicFolderExists, gitSource, projectName, }: {
4
4
  staticHash: string;
package/dist/index.d.ts CHANGED
@@ -30,8 +30,8 @@ export declare const BundlerInternals: {
30
30
  publicFolderExists: string | null;
31
31
  includeFavicon: boolean;
32
32
  title: string;
33
- renderDefaults: import("@remotion/studio").RenderDefaults | undefined;
34
- gitSource: import("@remotion/studio").GitSource | null;
33
+ renderDefaults: import("@remotion/studio-shared").RenderDefaults | undefined;
34
+ gitSource: import("@remotion/studio-shared").GitSource | null;
35
35
  projectName: string;
36
36
  }) => string;
37
37
  cacheExists: (remotionRoot: string, environment: "development" | "production", hash: string) => "exists" | "other-exists" | "does-not-exist";
@@ -60,12 +60,12 @@ export declare const BundlerInternals: {
60
60
  onProgress: (progress: number) => void;
61
61
  ignoreRegisterRootWarning: boolean;
62
62
  onDirectoryCreated: (dir: string) => void;
63
- gitSource: import("@remotion/studio").GitSource | null;
63
+ gitSource: import("@remotion/studio-shared").GitSource | null;
64
64
  maxTimelineTracks: number | null;
65
65
  bufferStateDelayInMilliseconds: number | null;
66
66
  } & import("./bundle").MandatoryLegacyBundleOptions) => Promise<string>;
67
67
  };
68
- export type { GitSource } from '@remotion/studio';
68
+ export type { GitSource } from '@remotion/studio-shared';
69
69
  export { BundleOptions, LegacyBundleOptions, MandatoryLegacyBundleOptions, bundle, } from './bundle';
70
70
  export { WebpackConfiguration, WebpackOverrideFn } from './webpack-config';
71
71
  export { webpack };
@@ -44,7 +44,9 @@ const reactDomVersion = react_dom_1.default.version.split('.')[0];
44
44
  if (reactDomVersion === '0') {
45
45
  throw new Error(`Version ${reactDomVersion} of "react-dom" is not supported by Remotion`);
46
46
  }
47
- const shouldUseReactDomClient = parseInt(reactDomVersion, 10) >= 18;
47
+ const shouldUseReactDomClient = no_react_1.NoReactInternals.ENABLE_V5_BREAKING_CHANGES
48
+ ? true
49
+ : parseInt(reactDomVersion, 10) >= 18;
48
50
  const esbuildLoaderOptions = {
49
51
  target: 'chrome85',
50
52
  loader: 'tsx',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/bundler",
3
- "version": "4.0.142",
3
+ "version": "4.0.144",
4
4
  "description": "Bundler for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -25,9 +25,9 @@
25
25
  "style-loader": "2.0.0",
26
26
  "source-map": "0.7.3",
27
27
  "webpack": "5.83.1",
28
- "@remotion/studio": "4.0.142",
29
- "remotion": "4.0.142",
30
- "@remotion/studio-shared": "4.0.142"
28
+ "remotion": "4.0.144",
29
+ "@remotion/studio-shared": "4.0.144",
30
+ "@remotion/studio": "4.0.144"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "react": ">=16.8.0",
package/renderEntry.tsx CHANGED
@@ -37,7 +37,7 @@ const getBundleMode = () => {
37
37
  };
38
38
 
39
39
  Internals.CSSUtils.injectCSS(
40
- Internals.CSSUtils.makeDefaultCSS(null, '#1f2428'),
40
+ Internals.CSSUtils.makeDefaultPreviewCSS(null, '#1f2428'),
41
41
  );
42
42
 
43
43
  const getCanSerializeDefaultProps = (object: unknown) => {
@@ -208,15 +208,21 @@ const getRootForElement = () => {
208
208
  };
209
209
 
210
210
  const renderToDOM = (content: React.ReactElement) => {
211
- // @ts-expect-error
212
- if (ReactDOM.createRoot) {
213
- getRootForElement().render(content);
214
- } else {
211
+ if (!ReactDOM.createRoot) {
212
+ if (NoReactInternals.ENABLE_V5_BREAKING_CHANGES) {
213
+ throw new Error(
214
+ 'Remotion 5.0 does only support React 18+. However, ReactDOM.createRoot() is undefined.',
215
+ );
216
+ }
217
+
215
218
  (ReactDOM as unknown as {render: typeof render}).render(
216
219
  content,
217
220
  videoContainer,
218
221
  );
222
+ return;
219
223
  }
224
+
225
+ getRootForElement().render(content);
220
226
  };
221
227
 
222
228
  const renderContent = (Root: React.FC) => {
@@ -254,9 +260,9 @@ const renderContent = (Root: React.FC) => {
254
260
  <DelayedSpinner />
255
261
  </div>,
256
262
  );
257
- import('@remotion/studio')
258
- .then(({Studio}) => {
259
- renderToDOM(<Studio readOnly rootComponent={Root} />);
263
+ import('@remotion/studio/internals')
264
+ .then(({StudioInternals}) => {
265
+ renderToDOM(<StudioInternals.Studio readOnly rootComponent={Root} />);
260
266
  })
261
267
  .catch((err) => {
262
268
  renderToDOM(<div>Failed to load Remotion Studio: {err.message}</div>);