@remotion/bundler 4.0.0-alpha10 → 4.0.0-alpha12

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/dist/bundle.js CHANGED
@@ -69,8 +69,6 @@ const getConfig = ({ entryPoint, outDir, resolvedRemotionRoot, onProgress, optio
69
69
  onProgress,
70
70
  enableCaching: (_b = options === null || options === void 0 ? void 0 : options.enableCaching) !== null && _b !== void 0 ? _b : true,
71
71
  maxTimelineTracks: 90,
72
- // For production, the variables are set dynamically
73
- envVariables: {},
74
72
  entryPoints: [],
75
73
  remotionRoot: resolvedRemotionRoot,
76
74
  keyboardShortcutsEnabled: false,
@@ -33,7 +33,7 @@ const AvailableCompositions = () => {
33
33
  }
34
34
  let timeout = null;
35
35
  const check = () => {
36
- if (window.ready === true) {
36
+ if (window.remotion_renderReady === true) {
37
37
  setComps({ type: 'loading' });
38
38
  window
39
39
  .getStaticCompositions()
@@ -5,6 +5,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.indexHtml = void 0;
7
7
  const node_path_1 = __importDefault(require("node:path"));
8
+ const remotion_1 = require("remotion");
8
9
  const indexHtml = ({ baseDir, editorName, inputProps, envVariables, staticHash, remotionRoot, studioServerCommand, renderQueue, numberOfAudioTags, publicFiles, includeFavicon, title, renderDefaults, }) => `
9
10
  <!DOCTYPE html>
10
11
  <html lang="en">
@@ -45,7 +46,7 @@ ${includeFavicon
45
46
  : ''}
46
47
  <script>window.remotion_staticFiles = ${JSON.stringify(publicFiles)}</script>
47
48
 
48
- <div id="container"></div>
49
+ <div id="${remotion_1.Internals.REMOTION_STUDIO_CONTAINER_ELEMENT}"></div>
49
50
  <div id="menuportal-0"></div>
50
51
  <div id="menuportal-1"></div>
51
52
  <div id="menuportal-2"></div>
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import esbuild = require('esbuild');
2
2
  import webpack = require('webpack');
3
3
  export declare const BundlerInternals: {
4
4
  esbuild: typeof esbuild;
5
- webpackConfig: ({ entry, userDefinedComponent, outDir, environment, webpackOverride, onProgress, enableCaching, envVariables, maxTimelineTracks, entryPoints, remotionRoot, keyboardShortcutsEnabled, poll, }: {
5
+ webpackConfig: ({ entry, userDefinedComponent, outDir, environment, webpackOverride, onProgress, enableCaching, maxTimelineTracks, entryPoints, remotionRoot, keyboardShortcutsEnabled, poll, }: {
6
6
  entry: string;
7
7
  userDefinedComponent: string;
8
8
  outDir: string | null;
@@ -10,7 +10,6 @@ export declare const BundlerInternals: {
10
10
  webpackOverride: import("./webpack-config").WebpackOverrideFn;
11
11
  onProgress?: ((f: number) => void) | undefined;
12
12
  enableCaching?: boolean | undefined;
13
- envVariables: Record<string, string>;
14
13
  maxTimelineTracks: number;
15
14
  keyboardShortcutsEnabled: boolean;
16
15
  entryPoints: string[];
@@ -1,7 +1,7 @@
1
1
  import type { Configuration } from 'webpack';
2
2
  export declare type WebpackConfiguration = Configuration;
3
3
  export declare type WebpackOverrideFn = (currentConfiguration: WebpackConfiguration) => WebpackConfiguration;
4
- export declare const webpackConfig: ({ entry, userDefinedComponent, outDir, environment, webpackOverride, onProgress, enableCaching, envVariables, maxTimelineTracks, entryPoints, remotionRoot, keyboardShortcutsEnabled, poll, }: {
4
+ export declare const webpackConfig: ({ entry, userDefinedComponent, outDir, environment, webpackOverride, onProgress, enableCaching, maxTimelineTracks, entryPoints, remotionRoot, keyboardShortcutsEnabled, poll, }: {
5
5
  entry: string;
6
6
  userDefinedComponent: string;
7
7
  outDir: string | null;
@@ -9,7 +9,6 @@ export declare const webpackConfig: ({ entry, userDefinedComponent, outDir, envi
9
9
  webpackOverride: WebpackOverrideFn;
10
10
  onProgress?: ((f: number) => void) | undefined;
11
11
  enableCaching?: boolean | undefined;
12
- envVariables: Record<string, string>;
13
12
  maxTimelineTracks: number;
14
13
  keyboardShortcutsEnabled: boolean;
15
14
  entryPoints: string[];
@@ -29,7 +29,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
29
29
  exports.webpackConfig = void 0;
30
30
  const node_crypto_1 = require("node:crypto");
31
31
  const react_dom_1 = __importDefault(require("react-dom"));
32
- const remotion_1 = require("remotion");
33
32
  const webpack_1 = __importStar(require("webpack"));
34
33
  const fast_refresh_1 = require("./fast-refresh");
35
34
  const stringify_with_circular_references_1 = require("./stringify-with-circular-references");
@@ -52,7 +51,7 @@ const esbuildLoaderOptions = {
52
51
  function truthy(value) {
53
52
  return Boolean(value);
54
53
  }
55
- const webpackConfig = ({ entry, userDefinedComponent, outDir, environment, webpackOverride = (f) => f, onProgress, enableCaching = true, envVariables, maxTimelineTracks, entryPoints, remotionRoot, keyboardShortcutsEnabled, poll, }) => {
54
+ const webpackConfig = ({ entry, userDefinedComponent, outDir, environment, webpackOverride = (f) => f, onProgress, enableCaching = true, maxTimelineTracks, entryPoints, remotionRoot, keyboardShortcutsEnabled, poll, }) => {
56
55
  const conf = webpackOverride({
57
56
  optimization: {
58
57
  minimize: false,
@@ -91,7 +90,6 @@ const webpackConfig = ({ entry, userDefinedComponent, outDir, environment, webpa
91
90
  new webpack_1.default.DefinePlugin({
92
91
  'process.env.MAX_TIMELINE_TRACKS': maxTimelineTracks,
93
92
  'process.env.KEYBOARD_SHORTCUTS_ENABLED': keyboardShortcutsEnabled,
94
- [`process.env.${remotion_1.Internals.ENV_VARIABLES_ENV_NAME}`]: JSON.stringify(envVariables),
95
93
  }),
96
94
  new optional_dependencies_1.AllowOptionalDependenciesPlugin(),
97
95
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/bundler",
3
- "version": "4.0.0-alpha10",
3
+ "version": "4.0.0-alpha12",
4
4
  "description": "Bundler for Remotion",
5
5
  "main": "dist/index.js",
6
6
  "sideEffects": false,
@@ -22,7 +22,7 @@
22
22
  "react-refresh": "0.9.0",
23
23
  "style-loader": "2.0.0",
24
24
  "webpack": "5.83.1",
25
- "remotion": "4.0.0-alpha10"
25
+ "remotion": "4.0.0-alpha12"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "react": ">=16.8.0",
@@ -1,5 +0,0 @@
1
- import type { Compiler } from 'webpack';
2
- export declare class AllowOptionalDependenciesPlugin {
3
- filter(error: Error): boolean;
4
- apply(compiler: Compiler): void;
5
- }
@@ -1,27 +0,0 @@
1
- "use strict";
2
- // When Webpack cannot resolve these dependencies, it will not print an error message.
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.AllowOptionalDependenciesPlugin = void 0;
5
- const OPTIONAL_DEPENDENCIES = [
6
- 'zod',
7
- '@remotion/zod-types',
8
- 'react-native-reanimated',
9
- 'react-native-reanimated/package.json',
10
- ];
11
- class AllowOptionalDependenciesPlugin {
12
- filter(error) {
13
- for (const dependency of OPTIONAL_DEPENDENCIES) {
14
- if (error.message.includes(`Can't resolve '${dependency}'`)) {
15
- return false;
16
- }
17
- }
18
- return true;
19
- }
20
- apply(compiler) {
21
- compiler.hooks.afterEmit.tap('AllowOptionalDependenciesPlugin', (compilation) => {
22
- compilation.errors = compilation.errors.filter(this.filter);
23
- compilation.warnings = compilation.warnings.filter(this.filter);
24
- });
25
- }
26
- }
27
- exports.AllowOptionalDependenciesPlugin = AllowOptionalDependenciesPlugin;