@remotion/bundler 4.0.362 → 4.0.364
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/index-html.js
CHANGED
|
@@ -39,6 +39,11 @@ const indexHtml = ({ publicPath, editorName, inputProps, envVariables, staticHas
|
|
|
39
39
|
: ''}
|
|
40
40
|
${gitSource
|
|
41
41
|
? `<script>window.remotion_gitSource = ${JSON.stringify(gitSource)};</script>`
|
|
42
|
+
: ''}
|
|
43
|
+
${mode === 'dev'
|
|
44
|
+
? `
|
|
45
|
+
<script>window.remotion_isStudio = true;</script>
|
|
46
|
+
<script>window.remotion_isReadOnlyStudio = false;</script>`.trimStart()
|
|
42
47
|
: ''}
|
|
43
48
|
<script>window.remotion_staticFiles = ${JSON.stringify(publicFiles)}</script>
|
|
44
49
|
<script>window.remotion_installedPackages = ${JSON.stringify(installedDependencies)}</script>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export declare const injectCSS: (css: string) => void;
|
|
@@ -1,8 +1,58 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
// https://github.com/remotion-dev/remotion/issues/3412#issuecomment-1910120552
|
|
2
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
exports.injectCSS = void 0;
|
|
5
|
+
function getEnvVar() {
|
|
6
|
+
const parts = ['proc', 'ess', '.', 'en', 'v', '.', 'NOD', 'E_EN', 'V'];
|
|
7
|
+
return parts.join('');
|
|
8
|
+
}
|
|
9
|
+
const getEnvVariables = () => {
|
|
10
|
+
if (window.remotion_isStudio) {
|
|
11
|
+
// For the Studio, we already set the environment variables in index-html.ts.
|
|
12
|
+
// We just add NODE_ENV here.
|
|
13
|
+
if (!process.env.NODE_ENV) {
|
|
14
|
+
throw new Error(`${getEnvVar()} is not set`);
|
|
15
|
+
}
|
|
16
|
+
return {
|
|
17
|
+
NODE_ENV: process.env.NODE_ENV,
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const param = window.remotion_envVariables;
|
|
21
|
+
if (!param) {
|
|
22
|
+
return {};
|
|
23
|
+
}
|
|
24
|
+
return { ...JSON.parse(param), NODE_ENV: process.env.NODE_ENV };
|
|
25
|
+
};
|
|
26
|
+
const setupEnvVariables = () => {
|
|
27
|
+
const env = getEnvVariables();
|
|
28
|
+
if (!window.process) {
|
|
29
|
+
window.process = {};
|
|
30
|
+
}
|
|
31
|
+
if (!window.process.env) {
|
|
32
|
+
window.process.env = {};
|
|
33
|
+
}
|
|
34
|
+
Object.keys(env).forEach((key) => {
|
|
35
|
+
window.process.env[key] = env[key];
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
setupEnvVariables();
|
|
39
|
+
const injected = {};
|
|
40
|
+
const injectCSS = (css) => {
|
|
41
|
+
// Skip in node
|
|
42
|
+
if (typeof document === 'undefined') {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (injected[css]) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const head = document.head || document.getElementsByTagName('head')[0];
|
|
49
|
+
const style = document.createElement('style');
|
|
50
|
+
style.appendChild(document.createTextNode(css));
|
|
51
|
+
head.prepend(style);
|
|
52
|
+
injected[css] = true;
|
|
53
|
+
};
|
|
54
|
+
exports.injectCSS = injectCSS;
|
|
55
|
+
(0, exports.injectCSS)(`
|
|
6
56
|
.css-reset, .css-reset * {
|
|
7
57
|
font-size: 16px;
|
|
8
58
|
line-height: 1.5;
|
|
@@ -89,7 +139,4 @@ remotion_1.Internals.CSSUtils.injectCSS(`
|
|
|
89
139
|
background-color: #ffffff;
|
|
90
140
|
appearance: none;
|
|
91
141
|
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
142
|
`);
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/bundler"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/bundler",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.364",
|
|
7
7
|
"description": "Bundle Remotion compositions using Webpack",
|
|
8
8
|
"main": "dist/index.js",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
"css-loader": "5.2.7",
|
|
29
29
|
"esbuild": "0.25.0",
|
|
30
30
|
"react-refresh": "0.9.0",
|
|
31
|
-
"remotion": "4.0.
|
|
32
|
-
"@remotion/studio": "4.0.
|
|
33
|
-
"@remotion/studio-shared": "4.0.
|
|
34
|
-
"@remotion/media-parser": "4.0.
|
|
31
|
+
"remotion": "4.0.364",
|
|
32
|
+
"@remotion/studio": "4.0.364",
|
|
33
|
+
"@remotion/studio-shared": "4.0.364",
|
|
34
|
+
"@remotion/media-parser": "4.0.364",
|
|
35
35
|
"style-loader": "4.0.0",
|
|
36
36
|
"source-map": "0.7.3",
|
|
37
37
|
"webpack": "5.96.1"
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"react": "19.0.0",
|
|
45
45
|
"react-dom": "19.0.0",
|
|
46
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
46
|
+
"@remotion/eslint-config-internal": "4.0.364",
|
|
47
47
|
"eslint": "9.19.0"
|
|
48
48
|
},
|
|
49
49
|
"keywords": [
|