@remotion/bundler 4.0.0-preload.13 → 4.0.0-spawn.13
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.d.ts +5 -5
- package/dist/dev-middleware/compatible-api.d.ts +1 -0
- package/dist/dev-middleware/is-color-supported.js +5 -1
- package/dist/error-overlay/react-overlay/utils/open-in-editor.js +5 -1
- package/dist/error-overlay/remotion-overlay/AskOnDiscord.js +1 -1
- package/dist/error-overlay/remotion-overlay/Button.js +1 -1
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +2 -2
- package/dist/error-overlay/remotion-overlay/DismissButton.js +1 -1
- package/dist/error-overlay/remotion-overlay/ErrorDisplay.js +2 -2
- package/dist/error-overlay/remotion-overlay/ErrorLoader.js +4 -4
- package/dist/error-overlay/remotion-overlay/ErrorTitle.js +1 -1
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +1 -1
- package/dist/error-overlay/remotion-overlay/Overlay.js +1 -1
- package/dist/error-overlay/remotion-overlay/SearchGitHubIssues.js +1 -1
- package/dist/error-overlay/remotion-overlay/StackFrame.js +2 -2
- package/dist/error-overlay/remotion-overlay/Symbolicating.js +1 -1
- package/dist/error-overlay/remotion-overlay/carets.d.ts +1 -0
- package/dist/error-overlay/remotion-overlay/carets.js +2 -2
- package/dist/error-overlay/remotion-overlay/index.js +2 -2
- package/dist/get-port.js +25 -22
- package/dist/homepage/homepage.js +4 -4
- package/dist/hot-middleware/process-update.js +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/renderEntry.js +6 -6
- package/dist/start-server.d.ts +6 -6
- package/dist/start-server.js +4 -4
- package/dist/webpack-config.js +5 -1
- package/package.json +4 -4
package/dist/bundle.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { WebpackOverrideFn } from 'remotion';
|
|
2
2
|
export declare const bundle: (entryPoint: string, onProgressUpdate?: ((progress: number) => void) | undefined, options?: {
|
|
3
|
-
webpackOverride?: WebpackOverrideFn
|
|
4
|
-
outDir?: string
|
|
5
|
-
enableCaching?: boolean
|
|
6
|
-
publicPath?: string
|
|
7
|
-
}
|
|
3
|
+
webpackOverride?: WebpackOverrideFn;
|
|
4
|
+
outDir?: string;
|
|
5
|
+
enableCaching?: boolean;
|
|
6
|
+
publicPath?: string;
|
|
7
|
+
}) => Promise<string>;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
// Duplicated in create-video/src/open-in-editor.ts
|
|
3
3
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
4
|
if (k2 === undefined) k2 = k;
|
|
5
|
-
Object.
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
6
10
|
}) : (function(o, m, k, k2) {
|
|
7
11
|
if (k2 === undefined) k2 = k;
|
|
8
12
|
o[k2] = m[k];
|
|
@@ -9,6 +9,6 @@ const AskOnDiscord = () => {
|
|
|
9
9
|
const openInBrowser = (0, react_1.useCallback)(() => {
|
|
10
10
|
window.open(DISCORD_LINK, '_blank');
|
|
11
11
|
}, []);
|
|
12
|
-
return (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: openInBrowser, children: "Ask on Discord" }
|
|
12
|
+
return (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: openInBrowser, children: "Ask on Discord" });
|
|
13
13
|
};
|
|
14
14
|
exports.AskOnDiscord = AskOnDiscord;
|
|
@@ -19,6 +19,6 @@ const buttonContainer = {
|
|
|
19
19
|
fontSize: 14,
|
|
20
20
|
};
|
|
21
21
|
const Button = ({ children, onClick, disabled }) => {
|
|
22
|
-
return ((0, jsx_runtime_1.jsx)("button", { style: button, type: "button", disabled: disabled, onClick: onClick, children: (0, jsx_runtime_1.jsx)("div", { style: buttonContainer, children: children }
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)("button", { style: button, type: "button", disabled: disabled, onClick: onClick, children: (0, jsx_runtime_1.jsx)("div", { style: buttonContainer, children: children }) }));
|
|
23
23
|
};
|
|
24
24
|
exports.Button = Button;
|
|
@@ -22,7 +22,7 @@ const CodeFrame = ({ source, lineNumberWidth }) => {
|
|
|
22
22
|
tabSize: 2,
|
|
23
23
|
color: s.highlight ? 'white' : 'rgba(255, 255, 255, 0.6)',
|
|
24
24
|
lineHeight: 1.7,
|
|
25
|
-
}, children: [(0, jsx_runtime_1.jsx)("div", { style: lineNumber, children: String(s.lineNumber).padStart(lineNumberWidth, ' ') }
|
|
26
|
-
}) }
|
|
25
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { style: lineNumber, children: String(s.lineNumber).padStart(lineNumberWidth, ' ') }), s.content] }, j));
|
|
26
|
+
}) }));
|
|
27
27
|
};
|
|
28
28
|
exports.CodeFrame = CodeFrame;
|
|
@@ -18,6 +18,6 @@ const DismissButton = () => {
|
|
|
18
18
|
const dismiss = (0, react_1.useCallback)(() => {
|
|
19
19
|
window.location.href = '/';
|
|
20
20
|
}, []);
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)("button", { type: "button", style: style, onClick: dismiss, children: (0, jsx_runtime_1.jsx)("svg", { focusable: "false", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 352 512", style: size, children: (0, jsx_runtime_1.jsx)("path", { fill: "white", d: "M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z" }
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)("button", { type: "button", style: style, onClick: dismiss, children: (0, jsx_runtime_1.jsx)("svg", { focusable: "false", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 352 512", style: size, children: (0, jsx_runtime_1.jsx)("path", { fill: "white", d: "M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z" }) }) }));
|
|
22
22
|
};
|
|
23
23
|
exports.DismissButton = DismissButton;
|
|
@@ -36,10 +36,10 @@ const ErrorDisplay = ({ display }) => {
|
|
|
36
36
|
.trim();
|
|
37
37
|
}, [display.error]);
|
|
38
38
|
const lineNumberWidth = String(highestLineNumber).length;
|
|
39
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(ErrorTitle_1.ErrorTitle, { symbolicating: false, name: display.error.name, message: message }
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)(ErrorTitle_1.ErrorTitle, { symbolicating: false, name: display.error.name, message: message }), display.stackFrames.length > 0 && window.remotion_editorName ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(OpenInEditor_1.OpenInEditor, { stack: display.stackFrames[0] }), (0, jsx_runtime_1.jsx)("div", { style: spacer })] })) : null, (0, jsx_runtime_1.jsx)(SearchGitHubIssues_1.SearchGithubIssues, { message: display.error.message }), (0, jsx_runtime_1.jsx)("div", { style: spacer }), (0, jsx_runtime_1.jsx)(AskOnDiscord_1.AskOnDiscord, {}), (0, jsx_runtime_1.jsx)("div", { style: stack, children: display.stackFrames.map((s, i) => {
|
|
40
40
|
return ((0, jsx_runtime_1.jsx)(StackFrame_1.StackElement
|
|
41
41
|
// eslint-disable-next-line react/no-array-index-key
|
|
42
42
|
, { isFirst: i === 0, s: s, lineNumberWidth: lineNumberWidth, defaultFunctionName: '(anonymous function)' }, i));
|
|
43
|
-
}) }
|
|
43
|
+
}) })] }));
|
|
44
44
|
};
|
|
45
45
|
exports.ErrorDisplay = ErrorDisplay;
|
|
@@ -48,14 +48,14 @@ const ErrorLoader = ({ error }) => {
|
|
|
48
48
|
});
|
|
49
49
|
}, [error]);
|
|
50
50
|
if (state.type === 'loading') {
|
|
51
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsx)(ErrorTitle_1.ErrorTitle, { symbolicating: true, name: error.name, message: error.message }
|
|
51
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsx)(ErrorTitle_1.ErrorTitle, { symbolicating: true, name: error.name, message: error.message }) }));
|
|
52
52
|
}
|
|
53
53
|
if (state.type === 'error') {
|
|
54
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(ErrorTitle_1.ErrorTitle, { symbolicating: false, name: error.name, message: error.message }
|
|
54
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(ErrorTitle_1.ErrorTitle, { symbolicating: false, name: error.name, message: error.message }), (0, jsx_runtime_1.jsx)("div", { style: errorWhileErrorStyle, children: "Error while getting stack trace:" }), (0, jsx_runtime_1.jsx)("div", { style: errorWhileErrorStyle, children: state.err.stack }), (0, jsx_runtime_1.jsx)("div", { style: errorWhileErrorStyle, children: "Report this in the Remotion repo." })] }));
|
|
55
55
|
}
|
|
56
56
|
if (state.type === 'no-record') {
|
|
57
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(ErrorTitle_1.ErrorTitle, { symbolicating: false, name: error.name, message: error.message }
|
|
57
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)(ErrorTitle_1.ErrorTitle, { symbolicating: false, name: error.name, message: error.message }), (0, jsx_runtime_1.jsx)("div", { style: errorWhileErrorStyle, children: "Check the Terminal and browser console for error messages." })] }));
|
|
58
58
|
}
|
|
59
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsx)(ErrorDisplay_1.ErrorDisplay, { display: state.record }
|
|
59
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsx)(ErrorDisplay_1.ErrorDisplay, { display: state.record }) }));
|
|
60
60
|
};
|
|
61
61
|
exports.ErrorLoader = ErrorLoader;
|
|
@@ -36,6 +36,6 @@ const spacer = {
|
|
|
36
36
|
width: 5,
|
|
37
37
|
};
|
|
38
38
|
const ErrorTitle = ({ name, message, symbolicating }) => {
|
|
39
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: title, children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("span", { style: errName, children: name }
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: title, children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("span", { style: errName, children: name }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: row, children: [symbolicating ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Symbolicating_1.Symbolicating, {}), (0, jsx_runtime_1.jsx)("div", { style: spacer })] })) : null, (0, jsx_runtime_1.jsx)("div", { children: message })] })] }), (0, react_overlay_1.didUnmountReactApp)() ? null : (0, jsx_runtime_1.jsx)(DismissButton_1.DismissButton, {})] }));
|
|
40
40
|
};
|
|
41
41
|
exports.ErrorTitle = ErrorTitle;
|
|
@@ -85,6 +85,6 @@ const OpenInEditor = ({ stack }) => {
|
|
|
85
85
|
throw new Error('invalid state');
|
|
86
86
|
}
|
|
87
87
|
}, [state.type]);
|
|
88
|
-
return ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: openInBrowser, disabled: state.type !== 'idle', children: label }
|
|
88
|
+
return ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: openInBrowser, disabled: state.type !== 'idle', children: label }));
|
|
89
89
|
};
|
|
90
90
|
exports.OpenInEditor = OpenInEditor;
|
|
@@ -8,6 +8,6 @@ const SearchGithubIssues = ({ message }) => {
|
|
|
8
8
|
const openInBrowser = (0, react_1.useCallback)(() => {
|
|
9
9
|
window.open(`https://github.com/remotion-dev/remotion/issues?q=${encodeURIComponent(message)}`, '_blank');
|
|
10
10
|
}, [message]);
|
|
11
|
-
return (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: openInBrowser, children: "Search GitHub Issues" }
|
|
11
|
+
return (0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: openInBrowser, children: "Search GitHub Issues" });
|
|
12
12
|
};
|
|
13
13
|
exports.SearchGithubIssues = SearchGithubIssues;
|
|
@@ -41,8 +41,8 @@ const StackElement = ({ s, lineNumberWidth, isFirst, defaultFunctionName }) => {
|
|
|
41
41
|
const toggleCodeFrame = (0, react_1.useCallback)(() => {
|
|
42
42
|
setShowCodeFrame((f) => !f);
|
|
43
43
|
}, []);
|
|
44
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { style: header, children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("div", { style: fnName, children: (_a = s.originalFunctionName) !== null && _a !== void 0 ? _a : defaultFunctionName }
|
|
44
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("div", { style: header, children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("div", { style: fnName, children: (_a = s.originalFunctionName) !== null && _a !== void 0 ? _a : defaultFunctionName }), s.originalFileName ? ((0, jsx_runtime_1.jsxs)("div", { style: location, children: [(0, format_location_1.formatLocation)(s.originalFileName), ":", s.originalLineNumber] })) : null] }), s.originalScriptCode && s.originalScriptCode.length > 0 ? ((0, jsx_runtime_1.jsx)(Button_1.Button, { onClick: toggleCodeFrame, children: showCodeFrame ? (0, jsx_runtime_1.jsx)(carets_1.CaretDown, {}) : (0, jsx_runtime_1.jsx)(carets_1.CaretRight, {}) })) : null] }), (0, jsx_runtime_1.jsx)("div", { children: s.originalScriptCode &&
|
|
45
45
|
s.originalScriptCode.length > 0 &&
|
|
46
|
-
showCodeFrame ? ((0, jsx_runtime_1.jsx)(CodeFrame_1.CodeFrame, { lineNumberWidth: lineNumberWidth, source: s.originalScriptCode }
|
|
46
|
+
showCodeFrame ? ((0, jsx_runtime_1.jsx)(CodeFrame_1.CodeFrame, { lineNumberWidth: lineNumberWidth, source: s.originalScriptCode })) : null })] }));
|
|
47
47
|
};
|
|
48
48
|
exports.StackElement = StackElement;
|
|
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.Symbolicating = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const Symbolicating = (props) => {
|
|
6
|
-
return ((0, jsx_runtime_1.jsxs)("svg", { id: "loading", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", width: "16", height: "16", fill: "white", ...props, children: [(0, jsx_runtime_1.jsx)("path", { opacity: ".1", d: "M14 0 H18 V8 H14 z", transform: "rotate(0 16 16)", children: (0, jsx_runtime_1.jsx)("animate", { attributeName: "opacity", from: "1", to: ".1", dur: "1s", repeatCount: "indefinite", begin: "0" }
|
|
6
|
+
return ((0, jsx_runtime_1.jsxs)("svg", { id: "loading", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 32 32", width: "16", height: "16", fill: "white", ...props, children: [(0, jsx_runtime_1.jsx)("path", { opacity: ".1", d: "M14 0 H18 V8 H14 z", transform: "rotate(0 16 16)", children: (0, jsx_runtime_1.jsx)("animate", { attributeName: "opacity", from: "1", to: ".1", dur: "1s", repeatCount: "indefinite", begin: "0" }) }), (0, jsx_runtime_1.jsx)("path", { opacity: ".1", d: "M14 0 H18 V8 H14 z", transform: "rotate(45 16 16)", children: (0, jsx_runtime_1.jsx)("animate", { attributeName: "opacity", from: "1", to: ".1", dur: "1s", repeatCount: "indefinite", begin: "0.125s" }) }), (0, jsx_runtime_1.jsx)("path", { opacity: ".1", d: "M14 0 H18 V8 H14 z", transform: "rotate(90 16 16)", children: (0, jsx_runtime_1.jsx)("animate", { attributeName: "opacity", from: "1", to: ".1", dur: "1s", repeatCount: "indefinite", begin: "0.25s" }) }), (0, jsx_runtime_1.jsx)("path", { opacity: ".1", d: "M14 0 H18 V8 H14 z", transform: "rotate(135 16 16)", children: (0, jsx_runtime_1.jsx)("animate", { attributeName: "opacity", from: "1", to: ".1", dur: "1s", repeatCount: "indefinite", begin: "0.375s" }) }), (0, jsx_runtime_1.jsx)("path", { opacity: ".1", d: "M14 0 H18 V8 H14 z", transform: "rotate(180 16 16)", children: (0, jsx_runtime_1.jsx)("animate", { attributeName: "opacity", from: "1", to: ".1", dur: "1s", repeatCount: "indefinite", begin: "0.5s" }) }), (0, jsx_runtime_1.jsx)("path", { opacity: ".1", d: "M14 0 H18 V8 H14 z", transform: "rotate(225 16 16)", children: (0, jsx_runtime_1.jsx)("animate", { attributeName: "opacity", from: "1", to: ".1", dur: "1s", repeatCount: "indefinite", begin: "0.675s" }) }), (0, jsx_runtime_1.jsx)("path", { opacity: ".1", d: "M14 0 H18 V8 H14 z", transform: "rotate(270 16 16)", children: (0, jsx_runtime_1.jsx)("animate", { attributeName: "opacity", from: "1", to: ".1", dur: "1s", repeatCount: "indefinite", begin: "0.75s" }) }), (0, jsx_runtime_1.jsx)("path", { opacity: ".1", d: "M14 0 H18 V8 H14 z", transform: "rotate(315 16 16)", children: (0, jsx_runtime_1.jsx)("animate", { attributeName: "opacity", from: "1", to: ".1", dur: "1s", repeatCount: "indefinite", begin: "0.875s" }) })] }));
|
|
7
7
|
};
|
|
8
8
|
exports.Symbolicating = Symbolicating;
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CaretDown = exports.CaretRight = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const CaretRight = () => {
|
|
6
|
-
return ((0, jsx_runtime_1.jsx)("svg", { style: { height: 20 }, "aria-hidden": "true", focusable: "false", role: "img", viewBox: "0 0 192 512", children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z" }
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", { style: { height: 20 }, "aria-hidden": "true", focusable: "false", role: "img", viewBox: "0 0 192 512", children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z" }) }));
|
|
7
7
|
};
|
|
8
8
|
exports.CaretRight = CaretRight;
|
|
9
9
|
const CaretDown = () => {
|
|
10
|
-
return ((0, jsx_runtime_1.jsx)("svg", { "aria-hidden": "true", focusable: "false", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", style: { height: 20 }, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z" }
|
|
10
|
+
return ((0, jsx_runtime_1.jsx)("svg", { "aria-hidden": "true", focusable: "false", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", style: { height: 20 }, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z" }) }));
|
|
11
11
|
};
|
|
12
12
|
exports.CaretDown = CaretDown;
|
|
@@ -9,10 +9,10 @@ const client_1 = __importDefault(require("react-dom/client"));
|
|
|
9
9
|
const Overlay_1 = require("./Overlay");
|
|
10
10
|
const mountRemotionOverlay = () => {
|
|
11
11
|
if (client_1.default.createRoot) {
|
|
12
|
-
client_1.default.createRoot(document.getElementById('remotion-error-overlay')).render((0, jsx_runtime_1.jsx)(Overlay_1.Overlay, {}
|
|
12
|
+
client_1.default.createRoot(document.getElementById('remotion-error-overlay')).render((0, jsx_runtime_1.jsx)(Overlay_1.Overlay, {}));
|
|
13
13
|
}
|
|
14
14
|
else {
|
|
15
|
-
client_1.default.render((0, jsx_runtime_1.jsx)(Overlay_1.Overlay, {}
|
|
15
|
+
client_1.default.render((0, jsx_runtime_1.jsx)(Overlay_1.Overlay, {}), document.getElementById('remotion-error-overlay'));
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
18
|
exports.mountRemotionOverlay = mountRemotionOverlay;
|
package/dist/get-port.js
CHANGED
|
@@ -6,15 +6,30 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.getDesiredPort = void 0;
|
|
7
7
|
const net_1 = __importDefault(require("net"));
|
|
8
8
|
const getAvailablePort = (portToTry) => new Promise((resolve, reject) => {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
resolve(port);
|
|
16
|
-
});
|
|
9
|
+
let status = 'unavailable';
|
|
10
|
+
const host = '127.0.0.1';
|
|
11
|
+
const socket = new net_1.default.Socket();
|
|
12
|
+
socket.on('connect', () => {
|
|
13
|
+
status = 'unavailable';
|
|
14
|
+
socket.destroy();
|
|
17
15
|
});
|
|
16
|
+
socket.setTimeout(1000);
|
|
17
|
+
socket.on('timeout', () => {
|
|
18
|
+
status = 'available';
|
|
19
|
+
reject(new Error('Timeout (' +
|
|
20
|
+
1000 +
|
|
21
|
+
'ms) occurred waiting for ' +
|
|
22
|
+
host +
|
|
23
|
+
':' +
|
|
24
|
+
portToTry +
|
|
25
|
+
' to be available'));
|
|
26
|
+
socket.destroy();
|
|
27
|
+
});
|
|
28
|
+
socket.on('error', () => {
|
|
29
|
+
status = 'available';
|
|
30
|
+
});
|
|
31
|
+
socket.on('close', () => resolve(status));
|
|
32
|
+
socket.connect(portToTry, host);
|
|
18
33
|
});
|
|
19
34
|
const portCheckSequence = function* (ports) {
|
|
20
35
|
if (ports) {
|
|
@@ -22,22 +37,10 @@ const portCheckSequence = function* (ports) {
|
|
|
22
37
|
}
|
|
23
38
|
yield 0; // Fall back to 0 if anything else failed
|
|
24
39
|
};
|
|
25
|
-
const isPortAvailable = async (port) => {
|
|
26
|
-
try {
|
|
27
|
-
await getAvailablePort(port);
|
|
28
|
-
return true;
|
|
29
|
-
}
|
|
30
|
-
catch (error) {
|
|
31
|
-
if (!['EADDRINUSE', 'EACCES'].includes(error.code)) {
|
|
32
|
-
throw error;
|
|
33
|
-
}
|
|
34
|
-
return false;
|
|
35
|
-
}
|
|
36
|
-
};
|
|
37
40
|
const getPort = async (from, to) => {
|
|
38
41
|
const ports = makeRange(from, to);
|
|
39
42
|
for (const port of portCheckSequence(ports)) {
|
|
40
|
-
if (await
|
|
43
|
+
if ((await getAvailablePort(port)) === 'available') {
|
|
41
44
|
return port;
|
|
42
45
|
}
|
|
43
46
|
}
|
|
@@ -45,7 +48,7 @@ const getPort = async (from, to) => {
|
|
|
45
48
|
};
|
|
46
49
|
const getDesiredPort = async (desiredPort, from, to) => {
|
|
47
50
|
if (typeof desiredPort !== 'undefined' &&
|
|
48
|
-
(await
|
|
51
|
+
(await getAvailablePort(desiredPort)) === 'available') {
|
|
49
52
|
return desiredPort;
|
|
50
53
|
}
|
|
51
54
|
const actualPort = await getPort(from, to);
|
|
@@ -47,17 +47,17 @@ const AvailableCompositions = () => {
|
|
|
47
47
|
(0, renderEntry_1.setBundleModeAndUpdate)({ type: 'evaluation' });
|
|
48
48
|
}, []);
|
|
49
49
|
if ((0, bundle_mode_1.getBundleMode)().type !== 'evaluation') {
|
|
50
|
-
return ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: showComps, children: "Click here to see a list of available compositions." }
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: showComps, children: "Click here to see a list of available compositions." }));
|
|
51
51
|
}
|
|
52
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [comps === null ? (0, jsx_runtime_1.jsx)("p", { children: "Loading compositions..." }
|
|
52
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [comps === null ? (0, jsx_runtime_1.jsx)("p", { children: "Loading compositions..." }) : null, (0, jsx_runtime_1.jsx)("ul", { children: comps === null
|
|
53
53
|
? null
|
|
54
54
|
: comps.map((c) => {
|
|
55
55
|
return (0, jsx_runtime_1.jsx)("li", { children: c.id }, c.id);
|
|
56
|
-
}) }
|
|
56
|
+
}) })] }));
|
|
57
57
|
};
|
|
58
58
|
exports.AvailableCompositions = AvailableCompositions;
|
|
59
59
|
const Homepage = () => {
|
|
60
60
|
const url = window.location.origin + window.location.pathname;
|
|
61
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("h1", { children: "Remotion Bundle" }
|
|
61
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("h1", { children: "Remotion Bundle" }), "This is a website which contains a bundled Remotion video. You can render videos based on this URL.", (0, jsx_runtime_1.jsx)("h2", { children: "Available compositions" }), (0, jsx_runtime_1.jsx)(exports.AvailableCompositions, {}), (0, jsx_runtime_1.jsx)("h2", { children: "How to render" }), "Locally: ", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: pre, children: ["npx remotion render ", url, " ", '<comp-name> <output-location>'] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), "With Remotion Lambda: ", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("div", { style: pre, children: ["npx remotion lambda render ", url, " ", '<comp-name>'] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)("p", { children: ["You can also render still images, and use the Node.JS APIs", ' ', (0, jsx_runtime_1.jsx)("code", { children: "getCompositions()" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "renderMedia()" }), ",", ' ', (0, jsx_runtime_1.jsx)("code", { children: "renderMediaOnLambda()" }), ", ", (0, jsx_runtime_1.jsx)("code", { children: "renderStill()" }), " and", ' ', (0, jsx_runtime_1.jsx)("code", { children: "renderStillOnLambda()" }), " with this URL."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Visit", ' ', (0, jsx_runtime_1.jsx)("a", { href: "https://remotion.dev/docs", target: "_blank", children: "remotion.dev/docs" }), ' ', "to read the documentation."] })] }));
|
|
62
62
|
};
|
|
63
63
|
exports.Homepage = Homepage;
|
|
@@ -50,7 +50,7 @@ const processUpdate = function (hash, moduleMap, options) {
|
|
|
50
50
|
async function check() {
|
|
51
51
|
var _a;
|
|
52
52
|
const cb = function (err, updatedModules) {
|
|
53
|
-
var _a
|
|
53
|
+
var _a;
|
|
54
54
|
if (err)
|
|
55
55
|
return handleError(err);
|
|
56
56
|
if (!updatedModules) {
|
|
@@ -69,7 +69,7 @@ const processUpdate = function (hash, moduleMap, options) {
|
|
|
69
69
|
logUpdates(updatedModules, renewedModules);
|
|
70
70
|
};
|
|
71
71
|
const applyResult = (_a = module.hot) === null || _a === void 0 ? void 0 : _a.apply(applyOptions, applyCallback);
|
|
72
|
-
if (
|
|
72
|
+
if (applyResult === null || applyResult === void 0 ? void 0 : applyResult.then) {
|
|
73
73
|
// HotModuleReplacement.runtime.js refers to the result as `outdatedModules`
|
|
74
74
|
applyResult
|
|
75
75
|
.then((outdatedModules) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export declare const BundlerInternals: {
|
|
|
4
4
|
webpackOverride?: import("remotion").WebpackOverrideFn | undefined;
|
|
5
5
|
inputProps?: object | undefined;
|
|
6
6
|
envVariables?: Record<string, string> | undefined;
|
|
7
|
-
port
|
|
7
|
+
port: number | null;
|
|
8
8
|
maxTimelineTracks?: number | undefined;
|
|
9
9
|
} | undefined) => Promise<number>;
|
|
10
10
|
cacheExists: (environment: "development" | "production", inputProps: object | null) => boolean;
|
package/dist/renderEntry.js
CHANGED
|
@@ -68,12 +68,12 @@ const GetVideo = ({ state }) => {
|
|
|
68
68
|
if (!video) {
|
|
69
69
|
return null;
|
|
70
70
|
}
|
|
71
|
-
return ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(Fallback, {}
|
|
71
|
+
return ((0, jsx_runtime_1.jsx)(react_1.Suspense, { fallback: (0, jsx_runtime_1.jsx)(Fallback, {}), children: (0, jsx_runtime_1.jsx)("div", { id: "remotion-canvas", style: {
|
|
72
72
|
width: video.width,
|
|
73
73
|
height: video.height,
|
|
74
74
|
display: 'flex',
|
|
75
75
|
backgroundColor: 'transparent',
|
|
76
|
-
}, children: Component ? ((0, jsx_runtime_1.jsx)(Component, { ...((_a = video === null || video === void 0 ? void 0 : video.defaultProps) !== null && _a !== void 0 ? _a : {}), ...(0, remotion_1.getInputProps)() }
|
|
76
|
+
}, children: Component ? ((0, jsx_runtime_1.jsx)(Component, { ...((_a = video === null || video === void 0 ? void 0 : video.defaultProps) !== null && _a !== void 0 ? _a : {}), ...(0, remotion_1.getInputProps)() })) : null }) }));
|
|
77
77
|
};
|
|
78
78
|
const videoContainer = document.getElementById('video-container');
|
|
79
79
|
const explainerContainer = document.getElementById('explainer-container');
|
|
@@ -86,7 +86,7 @@ let cleanupExplainerContainer = () => {
|
|
|
86
86
|
const renderContent = () => {
|
|
87
87
|
const bundleMode = (0, bundle_mode_1.getBundleMode)();
|
|
88
88
|
if (bundleMode.type === 'composition' || bundleMode.type === 'evaluation') {
|
|
89
|
-
const markup = ((0, jsx_runtime_1.jsxs)(remotion_1.Internals.RemotionRoot, { children: [(0, jsx_runtime_1.jsx)(Root, {}
|
|
89
|
+
const markup = ((0, jsx_runtime_1.jsxs)(remotion_1.Internals.RemotionRoot, { children: [(0, jsx_runtime_1.jsx)(Root, {}), (0, jsx_runtime_1.jsx)(GetVideo, { state: bundleMode })] }));
|
|
90
90
|
if (client_1.default.createRoot) {
|
|
91
91
|
const root = client_1.default.createRoot(videoContainer);
|
|
92
92
|
root.render(markup);
|
|
@@ -110,14 +110,14 @@ const renderContent = () => {
|
|
|
110
110
|
if (bundleMode.type === 'index' || bundleMode.type === 'evaluation') {
|
|
111
111
|
if (client_1.default.createRoot) {
|
|
112
112
|
const root = client_1.default.createRoot(explainerContainer);
|
|
113
|
-
root.render((0, jsx_runtime_1.jsx)(homepage_1.Homepage, {}
|
|
113
|
+
root.render((0, jsx_runtime_1.jsx)(homepage_1.Homepage, {}));
|
|
114
114
|
cleanupExplainerContainer = () => {
|
|
115
115
|
root.unmount();
|
|
116
116
|
};
|
|
117
117
|
}
|
|
118
118
|
else {
|
|
119
119
|
const root = client_1.default;
|
|
120
|
-
root.render((0, jsx_runtime_1.jsx)(homepage_1.Homepage, {}
|
|
120
|
+
root.render((0, jsx_runtime_1.jsx)(homepage_1.Homepage, {}), explainerContainer);
|
|
121
121
|
cleanupExplainerContainer = () => {
|
|
122
122
|
root.unmountComponentAtNode(explainerContainer);
|
|
123
123
|
};
|
|
@@ -154,6 +154,6 @@ if (typeof window !== 'undefined') {
|
|
|
154
154
|
};
|
|
155
155
|
});
|
|
156
156
|
};
|
|
157
|
-
window.siteVersion = '
|
|
157
|
+
window.siteVersion = '3';
|
|
158
158
|
window.setBundleMode = exports.setBundleModeAndUpdate;
|
|
159
159
|
}
|
package/dist/start-server.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { WebpackOverrideFn } from 'remotion';
|
|
2
2
|
export declare const startServer: (entry: string, userDefinedComponent: string, options?: {
|
|
3
|
-
webpackOverride?: WebpackOverrideFn
|
|
4
|
-
inputProps?: object
|
|
5
|
-
envVariables?: Record<string, string
|
|
6
|
-
port
|
|
7
|
-
maxTimelineTracks?: number
|
|
8
|
-
}
|
|
3
|
+
webpackOverride?: WebpackOverrideFn;
|
|
4
|
+
inputProps?: object;
|
|
5
|
+
envVariables?: Record<string, string>;
|
|
6
|
+
port: number | null;
|
|
7
|
+
maxTimelineTracks?: number;
|
|
8
|
+
}) => Promise<number>;
|
package/dist/start-server.js
CHANGED
|
@@ -51,7 +51,7 @@ const startServer = async (entry, userDefinedComponent, options) => {
|
|
|
51
51
|
}));
|
|
52
52
|
app.use((0, dev_middleware_1.wdm)(compiler));
|
|
53
53
|
app.use((0, hot_middleware_1.webpackHotMiddleware)(compiler));
|
|
54
|
-
app.get('/api/update', (
|
|
54
|
+
app.get('/api/update', (_req, res) => {
|
|
55
55
|
(0, update_available_1.isUpdateAvailableWithTimeout)()
|
|
56
56
|
.then((data) => {
|
|
57
57
|
res.json(data);
|
|
@@ -62,7 +62,7 @@ const startServer = async (entry, userDefinedComponent, options) => {
|
|
|
62
62
|
});
|
|
63
63
|
});
|
|
64
64
|
});
|
|
65
|
-
app.get('/api/project-info', (
|
|
65
|
+
app.get('/api/project-info', (_req, res) => {
|
|
66
66
|
(0, project_info_1.getProjectInfo)()
|
|
67
67
|
.then((data) => {
|
|
68
68
|
res.json(data);
|
|
@@ -115,7 +115,7 @@ const startServer = async (entry, userDefinedComponent, options) => {
|
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
});
|
|
118
|
-
app.use('favicon.png', (
|
|
118
|
+
app.use('favicon.png', (_req, res) => {
|
|
119
119
|
res.sendFile(path_1.default.join(__dirname, '..', 'web', 'favicon.png'));
|
|
120
120
|
});
|
|
121
121
|
const edit = await editorGuess;
|
|
@@ -124,7 +124,7 @@ const startServer = async (entry, userDefinedComponent, options) => {
|
|
|
124
124
|
res.set('content-type', 'text/html');
|
|
125
125
|
res.end((0, static_preview_1.indexHtml)(hash, '/', displayName));
|
|
126
126
|
});
|
|
127
|
-
const desiredPort = (_e = options === null || options === void 0 ? void 0 : options.port) !== null && _e !== void 0 ? _e :
|
|
127
|
+
const desiredPort = (_e = options === null || options === void 0 ? void 0 : options.port) !== null && _e !== void 0 ? _e : undefined;
|
|
128
128
|
const port = await (0, get_port_1.getDesiredPort)(desiredPort, 3000, 3100);
|
|
129
129
|
app.listen(port);
|
|
130
130
|
return port;
|
package/dist/webpack-config.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/bundler",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-spawn.13+5f3607e8b",
|
|
4
4
|
"description": "Bundler for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"memfs": "3.4.3",
|
|
32
32
|
"mime-types": "2.1.34",
|
|
33
33
|
"react-refresh": "0.9.0",
|
|
34
|
-
"remotion": "4.0.0-
|
|
34
|
+
"remotion": "4.0.0-spawn.13+5f3607e8b",
|
|
35
35
|
"semver": "7.3.4",
|
|
36
36
|
"source-map": "0.6.1",
|
|
37
37
|
"source-map-loader": "3.0.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"react": "^18.0.0",
|
|
65
65
|
"react-dom": "^18.0.0",
|
|
66
66
|
"ts-jest": "^27.0.5",
|
|
67
|
-
"typescript": "^4.
|
|
67
|
+
"typescript": "^4.7.0"
|
|
68
68
|
},
|
|
69
69
|
"keywords": [
|
|
70
70
|
"remotion",
|
|
@@ -77,5 +77,5 @@
|
|
|
77
77
|
"publishConfig": {
|
|
78
78
|
"access": "public"
|
|
79
79
|
},
|
|
80
|
-
"gitHead": "
|
|
80
|
+
"gitHead": "5f3607e8b8b958cf0604798639c8d901e9f2a295"
|
|
81
81
|
}
|