@remotion/cli 3.2.12 → 3.2.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 +1 -0
- package/dist/bundle.js +32 -0
- package/dist/compositions.js +2 -1
- package/dist/config/bundle-out-dir.d.ts +2 -0
- package/dist/config/bundle-out-dir.js +12 -0
- package/dist/config/every-nth-frame.d.ts +0 -3
- package/dist/config/get-public-path.d.ts +2 -0
- package/dist/config/get-public-path.js +12 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +3 -0
- package/dist/config/public-dir.d.ts +2 -0
- package/dist/config/public-dir.js +12 -0
- package/dist/editor/components/Editor.js +2 -90
- package/dist/editor/components/EditorContexts.d.ts +4 -0
- package/dist/editor/components/EditorContexts.js +97 -0
- package/dist/editor/components/MenuToolbar.js +2 -2
- package/dist/editor/components/TimelineInOutToggle.d.ts +2 -2
- package/dist/editor/components/TimelineInOutToggle.js +62 -16
- package/dist/get-cli-options.d.ts +1 -0
- package/dist/get-cli-options.js +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/list-of-remotion-packages.d.ts +1 -0
- package/dist/list-of-remotion-packages.js +20 -0
- package/dist/parse-command-line.d.ts +1 -0
- package/dist/parse-command-line.js +3 -0
- package/dist/prepare-entry-point.d.ts +12 -0
- package/dist/prepare-entry-point.js +37 -0
- package/dist/preview-server/routes.d.ts +2 -1
- package/dist/preview-server/routes.js +5 -3
- package/dist/preview-server/start-server.d.ts +2 -1
- package/dist/preview-server/start-server.js +1 -0
- package/dist/preview.js +2 -0
- package/dist/previewEntry.js +3 -2
- package/dist/render.js +2 -1
- package/dist/setup-cache.d.ts +4 -2
- package/dist/setup-cache.js +4 -3
- package/dist/still.js +2 -2
- package/dist/upgrade.js +2 -17
- package/dist/versions.js +2 -18
- package/package.json +7 -7
package/dist/bundle.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const bundleCommand: (remotionRoot: string) => Promise<void>;
|
package/dist/bundle.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bundleCommand = void 0;
|
|
4
|
+
const get_cli_options_1 = require("./get-cli-options");
|
|
5
|
+
const initialize_render_cli_1 = require("./initialize-render-cli");
|
|
6
|
+
const log_1 = require("./log");
|
|
7
|
+
const parse_command_line_1 = require("./parse-command-line");
|
|
8
|
+
const prepare_entry_point_1 = require("./prepare-entry-point");
|
|
9
|
+
const bundleCommand = async (remotionRoot) => {
|
|
10
|
+
const file = parse_command_line_1.parsedCli._[1];
|
|
11
|
+
if (!file) {
|
|
12
|
+
log_1.Log.error('No entry point specified. Pass more arguments:');
|
|
13
|
+
log_1.Log.error(' npx remotion bundle [entry-point]');
|
|
14
|
+
log_1.Log.error('Documentation: https://www.remotion.dev/docs/cli/bundle');
|
|
15
|
+
process.exit(1);
|
|
16
|
+
}
|
|
17
|
+
await (0, initialize_render_cli_1.initializeRenderCli)(remotionRoot, 'bundle');
|
|
18
|
+
const { publicPath, bundleOutDir } = await (0, get_cli_options_1.getCliOptions)({
|
|
19
|
+
isLambda: false,
|
|
20
|
+
type: 'get-compositions-or-bundle',
|
|
21
|
+
});
|
|
22
|
+
const { urlOrBundle } = await (0, prepare_entry_point_1.prepareEntryPoint)({
|
|
23
|
+
file,
|
|
24
|
+
otherSteps: [],
|
|
25
|
+
outDir: bundleOutDir,
|
|
26
|
+
publicPath,
|
|
27
|
+
remotionRoot,
|
|
28
|
+
});
|
|
29
|
+
log_1.Log.info();
|
|
30
|
+
log_1.Log.info(urlOrBundle);
|
|
31
|
+
};
|
|
32
|
+
exports.bundleCommand = bundleCommand;
|
package/dist/compositions.js
CHANGED
|
@@ -35,7 +35,7 @@ const listCompositionsCommand = async (remotionRoot) => {
|
|
|
35
35
|
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
36
36
|
const fullPath = path_1.default.join(process.cwd(), file);
|
|
37
37
|
await (0, get_config_file_name_1.loadConfig)(remotionRoot);
|
|
38
|
-
const { browserExecutable, ffmpegExecutable, ffprobeExecutable, chromiumOptions, envVariables, inputProps, puppeteerTimeout, port, } = await (0, get_cli_options_1.getCliOptions)({
|
|
38
|
+
const { browserExecutable, ffmpegExecutable, ffprobeExecutable, chromiumOptions, envVariables, inputProps, puppeteerTimeout, port, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
|
|
39
39
|
isLambda: false,
|
|
40
40
|
type: 'get-compositions',
|
|
41
41
|
});
|
|
@@ -43,6 +43,7 @@ const listCompositionsCommand = async (remotionRoot) => {
|
|
|
43
43
|
remotionRoot,
|
|
44
44
|
fullPath,
|
|
45
45
|
steps: ['bundling'],
|
|
46
|
+
publicDir,
|
|
46
47
|
});
|
|
47
48
|
const compositions = await (0, renderer_1.getCompositions)(bundled, {
|
|
48
49
|
browserExecutable,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setBundleDir = exports.getBundleOutDir = void 0;
|
|
4
|
+
let bundleOutDir = null;
|
|
5
|
+
const getBundleOutDir = () => {
|
|
6
|
+
return bundleOutDir;
|
|
7
|
+
};
|
|
8
|
+
exports.getBundleOutDir = getBundleOutDir;
|
|
9
|
+
const setBundleDir = (path) => {
|
|
10
|
+
bundleOutDir = path;
|
|
11
|
+
};
|
|
12
|
+
exports.setBundleDir = setBundleDir;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setPublicPath = exports.getPublicPath = void 0;
|
|
4
|
+
let publicPath = null;
|
|
5
|
+
const getPublicPath = () => {
|
|
6
|
+
return publicPath;
|
|
7
|
+
};
|
|
8
|
+
exports.getPublicPath = getPublicPath;
|
|
9
|
+
const setPublicPath = (path) => {
|
|
10
|
+
publicPath = path;
|
|
11
|
+
};
|
|
12
|
+
exports.setPublicPath = setPublicPath;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -44,5 +44,6 @@ export declare const ConfigInternals: {
|
|
|
44
44
|
getEnforceAudioTrack: () => boolean;
|
|
45
45
|
setEnforceAudioTrack: (enforceAudioTrack: boolean) => void;
|
|
46
46
|
getKeyboardShortcutsEnabled: () => boolean;
|
|
47
|
+
getPublicDir: () => string | null;
|
|
47
48
|
};
|
|
48
49
|
export declare const overrideRemotion: () => void;
|
package/dist/config/index.js
CHANGED
|
@@ -75,6 +75,7 @@ const overwrite_2 = require("./overwrite");
|
|
|
75
75
|
const pixel_format_2 = require("./pixel-format");
|
|
76
76
|
const preview_server_2 = require("./preview-server");
|
|
77
77
|
const prores_profile_2 = require("./prores-profile");
|
|
78
|
+
const public_dir_1 = require("./public-dir");
|
|
78
79
|
const quality_2 = require("./quality");
|
|
79
80
|
const scale_2 = require("./scale");
|
|
80
81
|
const timeout_2 = require("./timeout");
|
|
@@ -88,6 +89,7 @@ exports.Config = {
|
|
|
88
89
|
overrideWebpackConfig: override_webpack_2.overrideWebpackConfig,
|
|
89
90
|
setCachingEnabled: webpack_caching_2.setWebpackCaching,
|
|
90
91
|
setPort: preview_server_2.setPort,
|
|
92
|
+
setPublicDir: public_dir_1.setPublicDir,
|
|
91
93
|
},
|
|
92
94
|
Log: {
|
|
93
95
|
setLevel: log_1.setLogLevel,
|
|
@@ -165,6 +167,7 @@ exports.ConfigInternals = {
|
|
|
165
167
|
getEnforceAudioTrack: enforce_audio_track_1.getEnforceAudioTrack,
|
|
166
168
|
setEnforceAudioTrack: enforce_audio_track_1.setEnforceAudioTrack,
|
|
167
169
|
getKeyboardShortcutsEnabled: keyboard_shortcuts_1.getKeyboardShortcutsEnabled,
|
|
170
|
+
getPublicDir: public_dir_1.getPublicDir,
|
|
168
171
|
};
|
|
169
172
|
const overrideRemotion = () => {
|
|
170
173
|
Object.assign(remotion_1.Config, exports.Config);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setPublicDir = exports.getPublicDir = void 0;
|
|
4
|
+
let publicDir = null;
|
|
5
|
+
const getPublicDir = () => {
|
|
6
|
+
return publicDir;
|
|
7
|
+
};
|
|
8
|
+
exports.getPublicDir = getPublicDir;
|
|
9
|
+
const setPublicDir = (dir) => {
|
|
10
|
+
publicDir = dir;
|
|
11
|
+
};
|
|
12
|
+
exports.setPublicDir = setPublicDir;
|
|
@@ -5,21 +5,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Editor = void 0;
|
|
7
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
-
const player_1 = require("@remotion/player");
|
|
9
8
|
const react_1 = require("react");
|
|
10
9
|
const remotion_1 = require("remotion");
|
|
11
10
|
const colors_1 = require("../helpers/colors");
|
|
12
11
|
const noop_1 = require("../helpers/noop");
|
|
13
|
-
const checkerboard_1 = require("../state/checkerboard");
|
|
14
|
-
const folders_1 = require("../state/folders");
|
|
15
|
-
const highest_z_index_1 = require("../state/highest-z-index");
|
|
16
|
-
const in_out_1 = require("../state/in-out");
|
|
17
|
-
const keybindings_1 = require("../state/keybindings");
|
|
18
12
|
const modals_1 = require("../state/modals");
|
|
19
|
-
const mute_1 = require("../state/mute");
|
|
20
|
-
const preview_size_1 = require("../state/preview-size");
|
|
21
|
-
const rich_timeline_1 = require("../state/rich-timeline");
|
|
22
|
-
const sidebar_1 = require("../state/sidebar");
|
|
23
13
|
const timeline_zoom_1 = require("../state/timeline-zoom");
|
|
24
14
|
const z_index_1 = require("../state/z-index");
|
|
25
15
|
const EditorContent_1 = require("./EditorContent");
|
|
@@ -40,89 +30,14 @@ const background = {
|
|
|
40
30
|
position: 'absolute',
|
|
41
31
|
};
|
|
42
32
|
const Editor = () => {
|
|
43
|
-
const [emitter] = (0, react_1.useState)(() => new player_1.PlayerInternals.PlayerEmitter());
|
|
44
|
-
const [size, setSizeState] = (0, react_1.useState)(() => (0, preview_size_1.loadPreviewSizeOption)());
|
|
45
33
|
const [Root, setRoot] = (0, react_1.useState)(() => remotion_1.Internals.getRoot());
|
|
34
|
+
const { selectedModal: modalContextType } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
46
35
|
const [waitForRoot] = (0, react_1.useState)(() => {
|
|
47
36
|
if (Root) {
|
|
48
37
|
return 0;
|
|
49
38
|
}
|
|
50
39
|
return (0, remotion_1.delayRender)('Waiting for registerRoot()');
|
|
51
40
|
});
|
|
52
|
-
const [checkerboard, setCheckerboardState] = (0, react_1.useState)(() => (0, checkerboard_1.loadCheckerboardOption)());
|
|
53
|
-
const setCheckerboard = (0, react_1.useCallback)((newValue) => {
|
|
54
|
-
setCheckerboardState((prevState) => {
|
|
55
|
-
const newVal = newValue(prevState);
|
|
56
|
-
(0, checkerboard_1.persistCheckerboardOption)(newVal);
|
|
57
|
-
return newVal;
|
|
58
|
-
});
|
|
59
|
-
}, []);
|
|
60
|
-
const [richTimeline, setRichTimelineState] = (0, react_1.useState)(() => (0, rich_timeline_1.loadRichTimelineOption)());
|
|
61
|
-
const setRichTimeline = (0, react_1.useCallback)((newValue) => {
|
|
62
|
-
setRichTimelineState((prevState) => {
|
|
63
|
-
const newVal = newValue(prevState);
|
|
64
|
-
(0, rich_timeline_1.persistRichTimelineOption)(newVal);
|
|
65
|
-
return newVal;
|
|
66
|
-
});
|
|
67
|
-
}, []);
|
|
68
|
-
const setSize = (0, react_1.useCallback)((newValue) => {
|
|
69
|
-
setSizeState((prevState) => {
|
|
70
|
-
const newVal = newValue(prevState);
|
|
71
|
-
(0, preview_size_1.persistPreviewSizeOption)(newVal);
|
|
72
|
-
return newVal;
|
|
73
|
-
});
|
|
74
|
-
}, []);
|
|
75
|
-
const [inAndOutFrames, setInAndOutFrames] = (0, react_1.useState)({
|
|
76
|
-
inFrame: null,
|
|
77
|
-
outFrame: null,
|
|
78
|
-
});
|
|
79
|
-
const [mediaMuted, setMediaMuted] = (0, react_1.useState)(() => (0, mute_1.loadMuteOption)());
|
|
80
|
-
const [mediaVolume, setMediaVolume] = (0, react_1.useState)(1);
|
|
81
|
-
const [modalContextType, setModalContextType] = (0, react_1.useState)(null);
|
|
82
|
-
const previewSizeCtx = (0, react_1.useMemo)(() => {
|
|
83
|
-
return {
|
|
84
|
-
size,
|
|
85
|
-
setSize,
|
|
86
|
-
};
|
|
87
|
-
}, [setSize, size]);
|
|
88
|
-
const checkerboardCtx = (0, react_1.useMemo)(() => {
|
|
89
|
-
return {
|
|
90
|
-
checkerboard,
|
|
91
|
-
setCheckerboard,
|
|
92
|
-
};
|
|
93
|
-
}, [checkerboard, setCheckerboard]);
|
|
94
|
-
const richTimelineCtx = (0, react_1.useMemo)(() => {
|
|
95
|
-
return {
|
|
96
|
-
richTimeline,
|
|
97
|
-
setRichTimeline,
|
|
98
|
-
};
|
|
99
|
-
}, [richTimeline, setRichTimeline]);
|
|
100
|
-
const timelineInOutContextValue = (0, react_1.useMemo)(() => {
|
|
101
|
-
return inAndOutFrames;
|
|
102
|
-
}, [inAndOutFrames]);
|
|
103
|
-
const setTimelineInOutContextValue = (0, react_1.useMemo)(() => {
|
|
104
|
-
return {
|
|
105
|
-
setInAndOutFrames,
|
|
106
|
-
};
|
|
107
|
-
}, []);
|
|
108
|
-
const mediaVolumeContextValue = (0, react_1.useMemo)(() => {
|
|
109
|
-
return {
|
|
110
|
-
mediaMuted,
|
|
111
|
-
mediaVolume,
|
|
112
|
-
};
|
|
113
|
-
}, [mediaMuted, mediaVolume]);
|
|
114
|
-
const setMediaVolumeContextValue = (0, react_1.useMemo)(() => {
|
|
115
|
-
return {
|
|
116
|
-
setMediaMuted,
|
|
117
|
-
setMediaVolume,
|
|
118
|
-
};
|
|
119
|
-
}, []);
|
|
120
|
-
const modalsContext = (0, react_1.useMemo)(() => {
|
|
121
|
-
return {
|
|
122
|
-
selectedModal: modalContextType,
|
|
123
|
-
setSelectedModal: setModalContextType,
|
|
124
|
-
};
|
|
125
|
-
}, [modalContextType]);
|
|
126
41
|
(0, react_1.useEffect)(() => {
|
|
127
42
|
if (Root) {
|
|
128
43
|
return;
|
|
@@ -133,9 +48,6 @@ const Editor = () => {
|
|
|
133
48
|
});
|
|
134
49
|
return () => cleanup();
|
|
135
50
|
}, [Root, waitForRoot]);
|
|
136
|
-
return ((0, jsx_runtime_1.
|
|
137
|
-
modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType &&
|
|
138
|
-
modalContextType.type === 'update' && ((0, jsx_runtime_1.jsx)(UpdateModal_1.UpdateModal, { info: modalContextType.info })), modalContextType &&
|
|
139
|
-
modalContextType.type === 'shortcuts' && ((0, jsx_runtime_1.jsx)(KeyboardShortcutsModal_1.KeyboardShortcuts, {}))] }) }) }) }) }) }) }) }) }) }) }) }) }) }));
|
|
51
|
+
return ((0, jsx_runtime_1.jsxs)(z_index_1.HigherZIndex, { onEscape: noop_1.noop, onOutsideClick: noop_1.noop, children: [(0, jsx_runtime_1.jsx)(timeline_zoom_1.TimelineZoomContext, { children: (0, jsx_runtime_1.jsxs)("div", { style: background, children: [Root === null ? null : (0, jsx_runtime_1.jsx)(Root, {}), (0, jsx_runtime_1.jsxs)(remotion_1.Internals.CanUseRemotionHooksProvider, { children: [(0, jsx_runtime_1.jsx)(FramePersistor_1.FramePersistor, {}), (0, jsx_runtime_1.jsx)(ZoomPersistor_1.ZoomPersistor, {}), Root === null ? (0, jsx_runtime_1.jsx)(NoRegisterRoot_1.NoRegisterRoot, {}) : (0, jsx_runtime_1.jsx)(EditorContent_1.EditorContent, {}), (0, jsx_runtime_1.jsx)(GlobalKeybindings_1.GlobalKeybindings, {})] })] }) }), (0, jsx_runtime_1.jsx)(NotificationCenter_1.NotificationCenter, {}), modalContextType && modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType && modalContextType.type === 'update' && ((0, jsx_runtime_1.jsx)(UpdateModal_1.UpdateModal, { info: modalContextType.info })), modalContextType && modalContextType.type === 'shortcuts' && ((0, jsx_runtime_1.jsx)(KeyboardShortcutsModal_1.KeyboardShortcuts, {}))] }));
|
|
140
52
|
};
|
|
141
53
|
exports.Editor = Editor;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EditorContexts = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const player_1 = require("@remotion/player");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const remotion_1 = require("remotion");
|
|
8
|
+
const checkerboard_1 = require("../state/checkerboard");
|
|
9
|
+
const folders_1 = require("../state/folders");
|
|
10
|
+
const highest_z_index_1 = require("../state/highest-z-index");
|
|
11
|
+
const in_out_1 = require("../state/in-out");
|
|
12
|
+
const keybindings_1 = require("../state/keybindings");
|
|
13
|
+
const modals_1 = require("../state/modals");
|
|
14
|
+
const mute_1 = require("../state/mute");
|
|
15
|
+
const preview_size_1 = require("../state/preview-size");
|
|
16
|
+
const rich_timeline_1 = require("../state/rich-timeline");
|
|
17
|
+
const sidebar_1 = require("../state/sidebar");
|
|
18
|
+
const EditorContexts = ({ children }) => {
|
|
19
|
+
const [inAndOutFrames, setInAndOutFrames] = (0, react_1.useState)({
|
|
20
|
+
inFrame: null,
|
|
21
|
+
outFrame: null,
|
|
22
|
+
});
|
|
23
|
+
const timelineInOutContextValue = (0, react_1.useMemo)(() => {
|
|
24
|
+
return inAndOutFrames;
|
|
25
|
+
}, [inAndOutFrames]);
|
|
26
|
+
const [emitter] = (0, react_1.useState)(() => new player_1.PlayerInternals.PlayerEmitter());
|
|
27
|
+
const [size, setSizeState] = (0, react_1.useState)(() => (0, preview_size_1.loadPreviewSizeOption)());
|
|
28
|
+
const setTimelineInOutContextValue = (0, react_1.useMemo)(() => {
|
|
29
|
+
return {
|
|
30
|
+
setInAndOutFrames,
|
|
31
|
+
};
|
|
32
|
+
}, []);
|
|
33
|
+
const [checkerboard, setCheckerboardState] = (0, react_1.useState)(() => (0, checkerboard_1.loadCheckerboardOption)());
|
|
34
|
+
const setCheckerboard = (0, react_1.useCallback)((newValue) => {
|
|
35
|
+
setCheckerboardState((prevState) => {
|
|
36
|
+
const newVal = newValue(prevState);
|
|
37
|
+
(0, checkerboard_1.persistCheckerboardOption)(newVal);
|
|
38
|
+
return newVal;
|
|
39
|
+
});
|
|
40
|
+
}, []);
|
|
41
|
+
const [richTimeline, setRichTimelineState] = (0, react_1.useState)(() => (0, rich_timeline_1.loadRichTimelineOption)());
|
|
42
|
+
const setRichTimeline = (0, react_1.useCallback)((newValue) => {
|
|
43
|
+
setRichTimelineState((prevState) => {
|
|
44
|
+
const newVal = newValue(prevState);
|
|
45
|
+
(0, rich_timeline_1.persistRichTimelineOption)(newVal);
|
|
46
|
+
return newVal;
|
|
47
|
+
});
|
|
48
|
+
}, []);
|
|
49
|
+
const setSize = (0, react_1.useCallback)((newValue) => {
|
|
50
|
+
setSizeState((prevState) => {
|
|
51
|
+
const newVal = newValue(prevState);
|
|
52
|
+
(0, preview_size_1.persistPreviewSizeOption)(newVal);
|
|
53
|
+
return newVal;
|
|
54
|
+
});
|
|
55
|
+
}, []);
|
|
56
|
+
const [mediaMuted, setMediaMuted] = (0, react_1.useState)(() => (0, mute_1.loadMuteOption)());
|
|
57
|
+
const [mediaVolume, setMediaVolume] = (0, react_1.useState)(1);
|
|
58
|
+
const [modalContextType, setModalContextType] = (0, react_1.useState)(null);
|
|
59
|
+
const previewSizeCtx = (0, react_1.useMemo)(() => {
|
|
60
|
+
return {
|
|
61
|
+
size,
|
|
62
|
+
setSize,
|
|
63
|
+
};
|
|
64
|
+
}, [setSize, size]);
|
|
65
|
+
const checkerboardCtx = (0, react_1.useMemo)(() => {
|
|
66
|
+
return {
|
|
67
|
+
checkerboard,
|
|
68
|
+
setCheckerboard,
|
|
69
|
+
};
|
|
70
|
+
}, [checkerboard, setCheckerboard]);
|
|
71
|
+
const richTimelineCtx = (0, react_1.useMemo)(() => {
|
|
72
|
+
return {
|
|
73
|
+
richTimeline,
|
|
74
|
+
setRichTimeline,
|
|
75
|
+
};
|
|
76
|
+
}, [richTimeline, setRichTimeline]);
|
|
77
|
+
const mediaVolumeContextValue = (0, react_1.useMemo)(() => {
|
|
78
|
+
return {
|
|
79
|
+
mediaMuted,
|
|
80
|
+
mediaVolume,
|
|
81
|
+
};
|
|
82
|
+
}, [mediaMuted, mediaVolume]);
|
|
83
|
+
const setMediaVolumeContextValue = (0, react_1.useMemo)(() => {
|
|
84
|
+
return {
|
|
85
|
+
setMediaMuted,
|
|
86
|
+
setMediaVolume,
|
|
87
|
+
};
|
|
88
|
+
}, []);
|
|
89
|
+
const modalsContext = (0, react_1.useMemo)(() => {
|
|
90
|
+
return {
|
|
91
|
+
selectedModal: modalContextType,
|
|
92
|
+
setSelectedModal: setModalContextType,
|
|
93
|
+
};
|
|
94
|
+
}, [modalContextType]);
|
|
95
|
+
return ((0, jsx_runtime_1.jsx)(keybindings_1.KeybindingContextProvider, { children: (0, jsx_runtime_1.jsx)(rich_timeline_1.RichTimelineContext.Provider, { value: richTimelineCtx, children: (0, jsx_runtime_1.jsx)(checkerboard_1.CheckerboardContext.Provider, { value: checkerboardCtx, children: (0, jsx_runtime_1.jsx)(preview_size_1.PreviewSizeContext.Provider, { value: previewSizeCtx, children: (0, jsx_runtime_1.jsx)(modals_1.ModalsContext.Provider, { value: modalsContext, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.MediaVolumeContext.Provider, { value: mediaVolumeContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.SetMediaVolumeContext.Provider, { value: setMediaVolumeContextValue, children: (0, jsx_runtime_1.jsx)(player_1.PlayerInternals.PlayerEventEmitterContext.Provider, { value: emitter, children: (0, jsx_runtime_1.jsx)(sidebar_1.SidebarContextProvider, { children: (0, jsx_runtime_1.jsx)(folders_1.FolderContextProvider, { children: (0, jsx_runtime_1.jsx)(highest_z_index_1.HighestZIndexProvider, { children: (0, jsx_runtime_1.jsx)(in_out_1.TimelineInOutContext.Provider, { value: timelineInOutContextValue, children: (0, jsx_runtime_1.jsx)(in_out_1.SetTimelineInOutContext.Provider, { value: setTimelineInOutContextValue, children: children }) }) }) }) }) }) }) }) }) }) }) }) }));
|
|
96
|
+
};
|
|
97
|
+
exports.EditorContexts = EditorContexts;
|
|
@@ -306,7 +306,7 @@ const MenuToolbar = () => {
|
|
|
306
306
|
onClick: () => {
|
|
307
307
|
var _a;
|
|
308
308
|
close();
|
|
309
|
-
(_a = TimelineInOutToggle_1.inOutHandles.current) === null || _a === void 0 ? void 0 : _a.inMarkClick();
|
|
309
|
+
(_a = TimelineInOutToggle_1.inOutHandles.current) === null || _a === void 0 ? void 0 : _a.inMarkClick(null);
|
|
310
310
|
},
|
|
311
311
|
subMenu: null,
|
|
312
312
|
type: 'item',
|
|
@@ -320,7 +320,7 @@ const MenuToolbar = () => {
|
|
|
320
320
|
onClick: () => {
|
|
321
321
|
var _a;
|
|
322
322
|
close();
|
|
323
|
-
(_a = TimelineInOutToggle_1.inOutHandles.current) === null || _a === void 0 ? void 0 : _a.outMarkClick();
|
|
323
|
+
(_a = TimelineInOutToggle_1.inOutHandles.current) === null || _a === void 0 ? void 0 : _a.outMarkClick(null);
|
|
324
324
|
},
|
|
325
325
|
subMenu: null,
|
|
326
326
|
type: 'item',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export declare const inOutHandles: React.RefObject<{
|
|
3
|
-
inMarkClick: () => void;
|
|
4
|
-
outMarkClick: () => void;
|
|
3
|
+
inMarkClick: (e: KeyboardEvent | null) => void;
|
|
4
|
+
outMarkClick: (e: KeyboardEvent | null) => void;
|
|
5
5
|
clearMarks: () => void;
|
|
6
6
|
setMarks: (marks: [number | null, number | null]) => void;
|
|
7
7
|
}>;
|
|
@@ -11,7 +11,11 @@ const timelineInOutPointer_1 = require("../icons/timelineInOutPointer");
|
|
|
11
11
|
const in_out_1 = require("../state/in-out");
|
|
12
12
|
const marks_1 = require("../state/marks");
|
|
13
13
|
const ControlButton_1 = require("./ControlButton");
|
|
14
|
-
const getTooltipText = (pointType, key) => [
|
|
14
|
+
const getTooltipText = (pointType, key) => [
|
|
15
|
+
`Mark ${pointType}`,
|
|
16
|
+
(0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? null : `(${key})`,
|
|
17
|
+
'- right click to clear',
|
|
18
|
+
]
|
|
15
19
|
.filter(truthy_1.truthy)
|
|
16
20
|
.join(' ');
|
|
17
21
|
const style = {
|
|
@@ -27,10 +31,27 @@ const TimelineInOutPointToggle = () => {
|
|
|
27
31
|
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
28
32
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
29
33
|
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
30
|
-
const
|
|
34
|
+
const onInOutClear = (0, react_1.useCallback)(() => {
|
|
35
|
+
setInAndOutFrames(() => {
|
|
36
|
+
return {
|
|
37
|
+
inFrame: null,
|
|
38
|
+
outFrame: null,
|
|
39
|
+
};
|
|
40
|
+
});
|
|
41
|
+
}, [setInAndOutFrames]);
|
|
42
|
+
const onInMark = (0, react_1.useCallback)((e) => {
|
|
31
43
|
if (!videoConfig) {
|
|
32
44
|
return null;
|
|
33
45
|
}
|
|
46
|
+
if (e === null || e === void 0 ? void 0 : e.shiftKey) {
|
|
47
|
+
setInAndOutFrames((f) => {
|
|
48
|
+
return {
|
|
49
|
+
...f,
|
|
50
|
+
inFrame: null,
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
34
55
|
setInAndOutFrames((prev) => {
|
|
35
56
|
const biggestPossible = prev.outFrame === null ? Infinity : prev.outFrame - 1;
|
|
36
57
|
const selected = Math.min(timelinePosition, biggestPossible);
|
|
@@ -55,10 +76,43 @@ const TimelineInOutPointToggle = () => {
|
|
|
55
76
|
};
|
|
56
77
|
});
|
|
57
78
|
}, [setInAndOutFrames, timelinePosition, videoConfig]);
|
|
58
|
-
const
|
|
79
|
+
const clearInMark = (0, react_1.useCallback)((e) => {
|
|
80
|
+
if (!videoConfig) {
|
|
81
|
+
return null;
|
|
82
|
+
}
|
|
83
|
+
e.preventDefault();
|
|
84
|
+
setInAndOutFrames((f) => {
|
|
85
|
+
return {
|
|
86
|
+
...f,
|
|
87
|
+
inFrame: null,
|
|
88
|
+
};
|
|
89
|
+
});
|
|
90
|
+
}, [setInAndOutFrames, videoConfig]);
|
|
91
|
+
const clearOutMark = (0, react_1.useCallback)((e) => {
|
|
92
|
+
if (!videoConfig) {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
e === null || e === void 0 ? void 0 : e.preventDefault();
|
|
96
|
+
setInAndOutFrames((f) => {
|
|
97
|
+
return {
|
|
98
|
+
...f,
|
|
99
|
+
outFrame: null,
|
|
100
|
+
};
|
|
101
|
+
});
|
|
102
|
+
}, [setInAndOutFrames, videoConfig]);
|
|
103
|
+
const onOutMark = (0, react_1.useCallback)((e) => {
|
|
59
104
|
if (!videoConfig) {
|
|
60
105
|
return null;
|
|
61
106
|
}
|
|
107
|
+
if (e === null || e === void 0 ? void 0 : e.shiftKey) {
|
|
108
|
+
setInAndOutFrames((f) => {
|
|
109
|
+
return {
|
|
110
|
+
...f,
|
|
111
|
+
outFrame: null,
|
|
112
|
+
};
|
|
113
|
+
});
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
62
116
|
setInAndOutFrames((prev) => {
|
|
63
117
|
const smallestPossible = prev.inFrame === null ? -Infinity : prev.inFrame + 1;
|
|
64
118
|
const selected = Math.max(timelinePosition, smallestPossible);
|
|
@@ -82,28 +136,20 @@ const TimelineInOutPointToggle = () => {
|
|
|
82
136
|
};
|
|
83
137
|
});
|
|
84
138
|
}, [setInAndOutFrames, timelinePosition, videoConfig]);
|
|
85
|
-
const onInOutClear = (0, react_1.useCallback)(() => {
|
|
86
|
-
setInAndOutFrames(() => {
|
|
87
|
-
return {
|
|
88
|
-
inFrame: null,
|
|
89
|
-
outFrame: null,
|
|
90
|
-
};
|
|
91
|
-
});
|
|
92
|
-
}, [setInAndOutFrames]);
|
|
93
139
|
(0, react_1.useEffect)(() => {
|
|
94
140
|
const iKey = keybindings.registerKeybinding({
|
|
95
141
|
event: 'keypress',
|
|
96
142
|
key: 'i',
|
|
97
|
-
callback: () => {
|
|
98
|
-
onInMark();
|
|
143
|
+
callback: (e) => {
|
|
144
|
+
onInMark(e);
|
|
99
145
|
},
|
|
100
146
|
commandCtrlKey: false,
|
|
101
147
|
});
|
|
102
148
|
const oKey = keybindings.registerKeybinding({
|
|
103
149
|
event: 'keypress',
|
|
104
150
|
key: 'o',
|
|
105
|
-
callback: () => {
|
|
106
|
-
onOutMark();
|
|
151
|
+
callback: (e) => {
|
|
152
|
+
onOutMark(e);
|
|
107
153
|
},
|
|
108
154
|
commandCtrlKey: false,
|
|
109
155
|
});
|
|
@@ -172,6 +218,6 @@ const TimelineInOutPointToggle = () => {
|
|
|
172
218
|
if (isStill) {
|
|
173
219
|
return null;
|
|
174
220
|
}
|
|
175
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: getTooltipText('In', 'I'), "aria-label": getTooltipText('In', 'I'), onClick: onInMark, disabled: timelinePosition === 0, children: (0, jsx_runtime_1.jsx)(timelineInOutPointer_1.TimelineInPointer, { color: inFrame === null ? 'white' : 'var(--blue)', style: style }) }), (0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: getTooltipText('Out', '
|
|
221
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: getTooltipText('In', 'I'), "aria-label": getTooltipText('In', 'I'), onClick: (e) => onInMark(e), onContextMenu: clearInMark, disabled: timelinePosition === 0, children: (0, jsx_runtime_1.jsx)(timelineInOutPointer_1.TimelineInPointer, { color: inFrame === null ? 'white' : 'var(--blue)', style: style }) }), (0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: getTooltipText('Out', 'O'), "aria-label": getTooltipText('Out', 'O'), onClick: onOutMark, onContextMenu: clearOutMark, disabled: timelinePosition === videoConfig.durationInFrames - 1, children: (0, jsx_runtime_1.jsx)(timelineInOutPointer_1.TimelineOutPointer, { color: outFrame === null ? 'white' : 'var(--blue)', style: style }) })] }));
|
|
176
222
|
};
|
|
177
223
|
exports.TimelineInOutPointToggle = TimelineInOutPointToggle;
|
package/dist/get-cli-options.js
CHANGED
|
@@ -182,6 +182,7 @@ const getCliOptions = async (options) => {
|
|
|
182
182
|
muted: config_1.ConfigInternals.getMuted(),
|
|
183
183
|
enforceAudioTrack: config_1.ConfigInternals.getEnforceAudioTrack(),
|
|
184
184
|
keyboardShortcutsEnables: config_1.ConfigInternals.getKeyboardShortcutsEnabled(),
|
|
185
|
+
publicDir: config_1.ConfigInternals.getPublicDir(),
|
|
185
186
|
};
|
|
186
187
|
};
|
|
187
188
|
exports.getCliOptions = getCliOptions;
|
package/dist/index.d.ts
CHANGED
|
@@ -98,6 +98,7 @@ export declare const CliInternals: {
|
|
|
98
98
|
muted: boolean;
|
|
99
99
|
enforceAudioTrack: boolean;
|
|
100
100
|
keyboardShortcutsEnables: boolean;
|
|
101
|
+
publicDir: string | null;
|
|
101
102
|
}>;
|
|
102
103
|
parseCommandLine: (type: "sequence" | "still" | "lambda" | "preview" | "versions") => void;
|
|
103
104
|
loadConfig: (remotionRoot: string) => Promise<string | null>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const listOfRemotionPackages: string[];
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.listOfRemotionPackages = void 0;
|
|
4
|
+
exports.listOfRemotionPackages = [
|
|
5
|
+
'@remotion/bundler',
|
|
6
|
+
'@remotion/cli',
|
|
7
|
+
'@remotion/eslint-config',
|
|
8
|
+
'@remotion/renderer',
|
|
9
|
+
'@remotion/skia',
|
|
10
|
+
'@remotion/lottie',
|
|
11
|
+
'@remotion/media-utils',
|
|
12
|
+
'@remotion/paths',
|
|
13
|
+
'@remotion/babel-loader',
|
|
14
|
+
'@remotion/lambda',
|
|
15
|
+
'@remotion/player',
|
|
16
|
+
'@remotion/preload',
|
|
17
|
+
'@remotion/three',
|
|
18
|
+
'@remotion/gif',
|
|
19
|
+
'remotion',
|
|
20
|
+
];
|
|
@@ -138,6 +138,9 @@ const parseCommandLine = (type) => {
|
|
|
138
138
|
if (typeof exports.parsedCli['enforce-audio-track'] !== 'undefined') {
|
|
139
139
|
config_1.Config.Rendering.setEnforceAudioTrack(exports.parsedCli['enforce-audio-track']);
|
|
140
140
|
}
|
|
141
|
+
if (typeof exports.parsedCli['public-dir'] !== 'undefined') {
|
|
142
|
+
config_1.Config.Bundling.setPublicDir(exports.parsedCli['public-dir']);
|
|
143
|
+
}
|
|
141
144
|
};
|
|
142
145
|
exports.parseCommandLine = parseCommandLine;
|
|
143
146
|
const quietFlagProvided = () => exports.parsedCli.quiet || exports.parsedCli.q;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RenderStep } from './step';
|
|
2
|
+
export declare const prepareEntryPoint: ({ file, otherSteps, publicPath, outDir, remotionRoot, }: {
|
|
3
|
+
file: string;
|
|
4
|
+
otherSteps: RenderStep[];
|
|
5
|
+
outDir: string | null;
|
|
6
|
+
publicPath: string | null;
|
|
7
|
+
remotionRoot: string;
|
|
8
|
+
}) => Promise<{
|
|
9
|
+
urlOrBundle: string;
|
|
10
|
+
steps: RenderStep[];
|
|
11
|
+
shouldDelete: boolean;
|
|
12
|
+
}>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.prepareEntryPoint = void 0;
|
|
7
|
+
const renderer_1 = require("@remotion/renderer");
|
|
8
|
+
const promises_1 = require("fs/promises");
|
|
9
|
+
const path_1 = __importDefault(require("path"));
|
|
10
|
+
const process_1 = require("process");
|
|
11
|
+
const log_1 = require("./log");
|
|
12
|
+
const setup_cache_1 = require("./setup-cache");
|
|
13
|
+
const prepareEntryPoint = async ({ file, otherSteps, publicPath, outDir, remotionRoot, }) => {
|
|
14
|
+
if (renderer_1.RenderInternals.isServeUrl(file)) {
|
|
15
|
+
return { urlOrBundle: file, steps: otherSteps, shouldDelete: false };
|
|
16
|
+
}
|
|
17
|
+
const joined = path_1.default.resolve(process.cwd(), file);
|
|
18
|
+
try {
|
|
19
|
+
const stats = await (0, promises_1.stat)(joined);
|
|
20
|
+
if (stats.isDirectory()) {
|
|
21
|
+
return { urlOrBundle: joined, steps: otherSteps, shouldDelete: false };
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
catch (err) {
|
|
25
|
+
log_1.Log.error(`No file or directory exists at ${joined}.`);
|
|
26
|
+
(0, process_1.exit)(1);
|
|
27
|
+
}
|
|
28
|
+
const urlOrBundle = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({
|
|
29
|
+
fullPath: joined,
|
|
30
|
+
steps: ['bundling', ...otherSteps],
|
|
31
|
+
outDir,
|
|
32
|
+
publicPath,
|
|
33
|
+
remotionRoot,
|
|
34
|
+
});
|
|
35
|
+
return { urlOrBundle, steps: ['bundling', ...otherSteps], shouldDelete: true };
|
|
36
|
+
};
|
|
37
|
+
exports.prepareEntryPoint = prepareEntryPoint;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { IncomingMessage, ServerResponse } from 'http';
|
|
2
2
|
import type { LiveEventsServer } from './live-events';
|
|
3
|
-
export declare const handleRoutes: ({ hash, hashPrefix, request, response, liveEventsServer, getCurrentInputProps, remotionRoot, }: {
|
|
3
|
+
export declare const handleRoutes: ({ hash, hashPrefix, request, response, liveEventsServer, getCurrentInputProps, remotionRoot, userPassedPublicDir, }: {
|
|
4
4
|
hash: string;
|
|
5
5
|
hashPrefix: string;
|
|
6
6
|
request: IncomingMessage;
|
|
@@ -8,4 +8,5 @@ export declare const handleRoutes: ({ hash, hashPrefix, request, response, liveE
|
|
|
8
8
|
liveEventsServer: LiveEventsServer;
|
|
9
9
|
getCurrentInputProps: () => object;
|
|
10
10
|
remotionRoot: string;
|
|
11
|
+
userPassedPublicDir: string | null;
|
|
11
12
|
}) => void | Promise<void>;
|
|
@@ -117,7 +117,7 @@ const handleFavicon = (_, response) => {
|
|
|
117
117
|
const readStream = (0, fs_1.createReadStream)(filePath);
|
|
118
118
|
readStream.pipe(response);
|
|
119
119
|
};
|
|
120
|
-
const handleRoutes = ({ hash, hashPrefix, request, response, liveEventsServer, getCurrentInputProps, remotionRoot, }) => {
|
|
120
|
+
const handleRoutes = ({ hash, hashPrefix, request, response, liveEventsServer, getCurrentInputProps, remotionRoot, userPassedPublicDir, }) => {
|
|
121
121
|
const url = new URL(request.url, 'http://localhost');
|
|
122
122
|
if (url.pathname === '/api/update') {
|
|
123
123
|
return handleUpdate(remotionRoot, request, response);
|
|
@@ -143,8 +143,10 @@ const handleRoutes = ({ hash, hashPrefix, request, response, liveEventsServer, g
|
|
|
143
143
|
return liveEventsServer.router(request, response);
|
|
144
144
|
}
|
|
145
145
|
if (url.pathname.startsWith(hash)) {
|
|
146
|
-
const
|
|
147
|
-
|
|
146
|
+
const publicDir = userPassedPublicDir
|
|
147
|
+
? path_1.default.resolve(remotionRoot, userPassedPublicDir)
|
|
148
|
+
: path_1.default.join(remotionRoot, 'public');
|
|
149
|
+
return (0, serve_static_1.serveStatic)(publicDir, hash, request, response);
|
|
148
150
|
}
|
|
149
151
|
if (url.pathname.startsWith(hashPrefix)) {
|
|
150
152
|
return static404(response);
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { WebpackOverrideFn } from 'remotion';
|
|
2
2
|
import type { LiveEventsServer } from './live-events';
|
|
3
3
|
export declare const startServer: (entry: string, userDefinedComponent: string, options: {
|
|
4
|
-
webpackOverride
|
|
4
|
+
webpackOverride: WebpackOverrideFn;
|
|
5
5
|
getCurrentInputProps: () => object;
|
|
6
6
|
envVariables?: Record<string, string>;
|
|
7
7
|
port: number | null;
|
|
8
8
|
maxTimelineTracks?: number;
|
|
9
9
|
remotionRoot: string;
|
|
10
10
|
keyboardShortcutsEnabled: boolean;
|
|
11
|
+
userPassedPublicDir: string | null;
|
|
11
12
|
}) => Promise<{
|
|
12
13
|
port: number;
|
|
13
14
|
liveEventsServer: LiveEventsServer;
|
|
@@ -62,6 +62,7 @@ const startServer = async (entry, userDefinedComponent, options) => {
|
|
|
62
62
|
liveEventsServer,
|
|
63
63
|
getCurrentInputProps: options.getCurrentInputProps,
|
|
64
64
|
remotionRoot: options.remotionRoot,
|
|
65
|
+
userPassedPublicDir: options.userPassedPublicDir,
|
|
65
66
|
});
|
|
66
67
|
})
|
|
67
68
|
.catch((err) => {
|
package/dist/preview.js
CHANGED
|
@@ -58,6 +58,8 @@ const previewCommand = async (remotionRoot) => {
|
|
|
58
58
|
maxTimelineTracks: config_1.ConfigInternals.getMaxTimelineTracks(),
|
|
59
59
|
remotionRoot,
|
|
60
60
|
keyboardShortcutsEnabled: config_1.ConfigInternals.getKeyboardShortcutsEnabled(),
|
|
61
|
+
userPassedPublicDir: config_1.ConfigInternals.getPublicDir(),
|
|
62
|
+
webpackOverride: config_1.ConfigInternals.getWebpackOverrideFn(),
|
|
61
63
|
});
|
|
62
64
|
setLiveEventsListener(liveEventsServer);
|
|
63
65
|
log_1.Log.info(`Server running on http://localhost:${port}`);
|
package/dist/previewEntry.js
CHANGED
|
@@ -9,19 +9,20 @@ const client_1 = __importDefault(require("react-dom/client"));
|
|
|
9
9
|
const remotion_1 = require("remotion");
|
|
10
10
|
require("../styles/styles.css");
|
|
11
11
|
const Editor_1 = require("./editor/components/Editor");
|
|
12
|
+
const EditorContexts_1 = require("./editor/components/EditorContexts");
|
|
12
13
|
const ServerDisconnected_1 = require("./editor/components/Notifications/ServerDisconnected");
|
|
13
14
|
const event_source_1 = require("./event-source");
|
|
14
15
|
remotion_1.Internals.CSSUtils.injectCSS(remotion_1.Internals.CSSUtils.makeDefaultCSS(null, '#1f2428'));
|
|
15
16
|
const getServerDisconnectedDomElement = () => {
|
|
16
17
|
return document.getElementById('server-disconnected-overlay');
|
|
17
18
|
};
|
|
18
|
-
const content = ((0, jsx_runtime_1.jsx)(remotion_1.Internals.RemotionRoot, { children: (0, jsx_runtime_1.jsx)(Editor_1.Editor, {}) }));
|
|
19
|
+
const content = ((0, jsx_runtime_1.jsx)(remotion_1.Internals.RemotionRoot, { children: (0, jsx_runtime_1.jsx)(EditorContexts_1.EditorContexts, { children: (0, jsx_runtime_1.jsx)(Editor_1.Editor, {}) }) }));
|
|
19
20
|
if (client_1.default.createRoot) {
|
|
20
21
|
client_1.default.createRoot(remotion_1.Internals.getPreviewDomElement()).render(content);
|
|
21
22
|
client_1.default.createRoot(getServerDisconnectedDomElement()).render((0, jsx_runtime_1.jsx)(ServerDisconnected_1.ServerDisconnected, {}));
|
|
22
23
|
}
|
|
23
24
|
else {
|
|
24
|
-
client_1.default.render(
|
|
25
|
+
client_1.default.render(content, remotion_1.Internals.getPreviewDomElement());
|
|
25
26
|
client_1.default.render((0, jsx_runtime_1.jsx)(ServerDisconnected_1.ServerDisconnected, {}), getServerDisconnectedDomElement());
|
|
26
27
|
}
|
|
27
28
|
(0, event_source_1.openEventSource)();
|
package/dist/render.js
CHANGED
|
@@ -36,7 +36,7 @@ const render = async (remotionRoot) => {
|
|
|
36
36
|
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
37
37
|
await (0, initialize_render_cli_1.initializeRenderCli)(remotionRoot, 'sequence');
|
|
38
38
|
log_1.Log.verbose('Asset dirs', downloadMap.assetDir);
|
|
39
|
-
const { codec, proResProfile, parallelism, frameRange, shouldOutputImageSequence, overwrite, inputProps, envVariables, quality, browser, crf, pixelFormat, imageFormat, browserExecutable, ffmpegExecutable, ffprobeExecutable, scale, chromiumOptions, port, numberOfGifLoops, everyNthFrame, puppeteerTimeout, muted, enforceAudioTrack, } = await (0, get_cli_options_1.getCliOptions)({
|
|
39
|
+
const { codec, proResProfile, parallelism, frameRange, shouldOutputImageSequence, overwrite, inputProps, envVariables, quality, browser, crf, pixelFormat, imageFormat, browserExecutable, ffmpegExecutable, ffprobeExecutable, scale, chromiumOptions, port, numberOfGifLoops, everyNthFrame, puppeteerTimeout, muted, enforceAudioTrack, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
|
|
40
40
|
isLambda: false,
|
|
41
41
|
type: 'series',
|
|
42
42
|
});
|
|
@@ -68,6 +68,7 @@ const render = async (remotionRoot) => {
|
|
|
68
68
|
fullPath,
|
|
69
69
|
remotionRoot,
|
|
70
70
|
steps,
|
|
71
|
+
publicDir,
|
|
71
72
|
});
|
|
72
73
|
const onDownload = (src) => {
|
|
73
74
|
const id = Math.random();
|
package/dist/setup-cache.d.ts
CHANGED
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import type { RenderStep } from './step';
|
|
2
|
-
export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, steps, }: {
|
|
2
|
+
export declare const bundleOnCliOrTakeServeUrl: ({ fullPath, remotionRoot, steps, publicDir, }: {
|
|
3
3
|
fullPath: string;
|
|
4
4
|
remotionRoot: string;
|
|
5
5
|
steps: RenderStep[];
|
|
6
|
+
publicDir: string | null;
|
|
6
7
|
}) => Promise<{
|
|
7
8
|
urlOrBundle: string;
|
|
8
9
|
cleanup: () => Promise<void>;
|
|
9
10
|
}>;
|
|
10
|
-
export declare const bundleOnCli: ({ fullPath, steps, remotionRoot, }: {
|
|
11
|
+
export declare const bundleOnCli: ({ fullPath, steps, remotionRoot, publicDir, }: {
|
|
11
12
|
fullPath: string;
|
|
12
13
|
steps: RenderStep[];
|
|
13
14
|
remotionRoot: string;
|
|
15
|
+
publicDir: string | null;
|
|
14
16
|
}) => Promise<string>;
|
package/dist/setup-cache.js
CHANGED
|
@@ -7,21 +7,21 @@ const config_1 = require("./config");
|
|
|
7
7
|
const log_1 = require("./log");
|
|
8
8
|
const parse_command_line_1 = require("./parse-command-line");
|
|
9
9
|
const progress_bar_1 = require("./progress-bar");
|
|
10
|
-
const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, steps, }) => {
|
|
10
|
+
const bundleOnCliOrTakeServeUrl = async ({ fullPath, remotionRoot, steps, publicDir, }) => {
|
|
11
11
|
if (renderer_1.RenderInternals.isServeUrl(fullPath)) {
|
|
12
12
|
return {
|
|
13
13
|
urlOrBundle: fullPath,
|
|
14
14
|
cleanup: () => Promise.resolve(undefined),
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
const bundled = await (0, exports.bundleOnCli)({ fullPath, remotionRoot, steps });
|
|
17
|
+
const bundled = await (0, exports.bundleOnCli)({ fullPath, remotionRoot, steps, publicDir });
|
|
18
18
|
return {
|
|
19
19
|
urlOrBundle: bundled,
|
|
20
20
|
cleanup: () => renderer_1.RenderInternals.deleteDirectory(bundled),
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
exports.bundleOnCliOrTakeServeUrl = bundleOnCliOrTakeServeUrl;
|
|
24
|
-
const bundleOnCli = async ({ fullPath, steps, remotionRoot, }) => {
|
|
24
|
+
const bundleOnCli = async ({ fullPath, steps, remotionRoot, publicDir, }) => {
|
|
25
25
|
var _a;
|
|
26
26
|
const shouldCache = config_1.ConfigInternals.getWebpackCaching();
|
|
27
27
|
const onProgress = (progress) => {
|
|
@@ -35,6 +35,7 @@ const bundleOnCli = async ({ fullPath, steps, remotionRoot, }) => {
|
|
|
35
35
|
enableCaching: shouldCache,
|
|
36
36
|
webpackOverride: (_a = config_1.ConfigInternals.getWebpackOverrideFn()) !== null && _a !== void 0 ? _a : ((f) => f),
|
|
37
37
|
rootDir: remotionRoot,
|
|
38
|
+
publicDir,
|
|
38
39
|
};
|
|
39
40
|
const [hash] = bundler_1.BundlerInternals.getConfig({
|
|
40
41
|
outDir: '',
|
package/dist/still.js
CHANGED
|
@@ -35,7 +35,7 @@ const still = async (remotionRoot) => {
|
|
|
35
35
|
log_1.Log.verbose('Output file has a PNG extension, setting the image format to PNG.');
|
|
36
36
|
config_1.Config.Rendering.setImageFormat('png');
|
|
37
37
|
}
|
|
38
|
-
const { inputProps, envVariables, quality, browser, imageFormat, stillFrame, browserExecutable, chromiumOptions, scale, ffmpegExecutable, ffprobeExecutable, overwrite, puppeteerTimeout, port, } = await (0, get_cli_options_1.getCliOptions)({
|
|
38
|
+
const { inputProps, envVariables, quality, browser, imageFormat, stillFrame, browserExecutable, chromiumOptions, scale, ffmpegExecutable, ffprobeExecutable, overwrite, puppeteerTimeout, port, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
|
|
39
39
|
isLambda: false,
|
|
40
40
|
type: 'still',
|
|
41
41
|
});
|
|
@@ -72,7 +72,7 @@ const still = async (remotionRoot) => {
|
|
|
72
72
|
renderer_1.RenderInternals.isServeUrl(fullPath) ? null : 'bundling',
|
|
73
73
|
'rendering',
|
|
74
74
|
].filter(truthy_1.truthy);
|
|
75
|
-
const { cleanup: cleanupBundle, urlOrBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({ fullPath, remotionRoot, steps });
|
|
75
|
+
const { cleanup: cleanupBundle, urlOrBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({ fullPath, remotionRoot, steps, publicDir });
|
|
76
76
|
const puppeteerInstance = await browserInstance;
|
|
77
77
|
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
78
78
|
const comps = await (0, renderer_1.getCompositions)(urlOrBundle, {
|
package/dist/upgrade.js
CHANGED
|
@@ -8,6 +8,7 @@ const renderer_1 = require("@remotion/renderer");
|
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const config_1 = require("./config");
|
|
10
10
|
const get_latest_remotion_version_1 = require("./get-latest-remotion-version");
|
|
11
|
+
const list_of_remotion_packages_1 = require("./list-of-remotion-packages");
|
|
11
12
|
const log_1 = require("./log");
|
|
12
13
|
const get_package_manager_1 = require("./preview-server/get-package-manager");
|
|
13
14
|
const getUpgradeCommand = ({ manager, packages, version, }) => {
|
|
@@ -31,23 +32,7 @@ const upgrade = async (remotionRoot) => {
|
|
|
31
32
|
.map((p) => p.path)
|
|
32
33
|
.join(', ')}). Install dependencies using your favorite manager!`);
|
|
33
34
|
}
|
|
34
|
-
const toUpgrade =
|
|
35
|
-
'@remotion/bundler',
|
|
36
|
-
'@remotion/cli',
|
|
37
|
-
'@remotion/eslint-config',
|
|
38
|
-
'@remotion/renderer',
|
|
39
|
-
'@remotion/skia',
|
|
40
|
-
'@remotion/lottie',
|
|
41
|
-
'@remotion/media-utils',
|
|
42
|
-
'@remotion/paths',
|
|
43
|
-
'@remotion/babel-loader',
|
|
44
|
-
'@remotion/lambda',
|
|
45
|
-
'@remotion/player',
|
|
46
|
-
'@remotion/preload',
|
|
47
|
-
'@remotion/three',
|
|
48
|
-
'@remotion/gif',
|
|
49
|
-
'remotion',
|
|
50
|
-
].filter((u) => dependencies.includes(u));
|
|
35
|
+
const toUpgrade = list_of_remotion_packages_1.listOfRemotionPackages.filter((u) => dependencies.includes(u));
|
|
51
36
|
const prom = renderer_1.RenderInternals.execa(manager.manager, getUpgradeCommand({
|
|
52
37
|
manager: manager.manager,
|
|
53
38
|
packages: toUpgrade,
|
package/dist/versions.js
CHANGED
|
@@ -7,26 +7,10 @@ exports.versionsCommand = exports.validateVersionsBeforeCommand = exports.VERSIO
|
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
8
|
const fs_1 = __importDefault(require("fs"));
|
|
9
9
|
const config_1 = require("./config");
|
|
10
|
+
const list_of_remotion_packages_1 = require("./list-of-remotion-packages");
|
|
10
11
|
const log_1 = require("./log");
|
|
11
12
|
const parse_command_line_1 = require("./parse-command-line");
|
|
12
13
|
const resolve_from_1 = require("./resolve-from");
|
|
13
|
-
const packages = [
|
|
14
|
-
'@remotion/bundler',
|
|
15
|
-
'@remotion/cli',
|
|
16
|
-
'@remotion/eslint-config',
|
|
17
|
-
'@remotion/renderer',
|
|
18
|
-
'@remotion/skia',
|
|
19
|
-
'@remotion/lottie',
|
|
20
|
-
'@remotion/media-utils',
|
|
21
|
-
'@remotion/paths',
|
|
22
|
-
'@remotion/babel-loader',
|
|
23
|
-
'@remotion/lambda',
|
|
24
|
-
'@remotion/preload',
|
|
25
|
-
'@remotion/player',
|
|
26
|
-
'@remotion/three',
|
|
27
|
-
'@remotion/gif',
|
|
28
|
-
'remotion',
|
|
29
|
-
];
|
|
30
14
|
const getVersion = async (remotionRoot, p) => {
|
|
31
15
|
try {
|
|
32
16
|
const remotionPkgJson = (0, resolve_from_1.resolveFrom)(remotionRoot, `${p}/package.json`);
|
|
@@ -49,7 +33,7 @@ const groupBy = (vals) => {
|
|
|
49
33
|
return groups;
|
|
50
34
|
};
|
|
51
35
|
const getAllVersions = async (remotionRoot) => {
|
|
52
|
-
return (await Promise.all(
|
|
36
|
+
return (await Promise.all(list_of_remotion_packages_1.listOfRemotionPackages.map(async (p) => [p, await getVersion(remotionRoot, p)]))).filter(([, version]) => version);
|
|
53
37
|
};
|
|
54
38
|
exports.VERSIONS_COMMAND = 'versions';
|
|
55
39
|
const validateVersionsBeforeCommand = async (remotionRoot) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.13",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
24
24
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@remotion/bundler": "3.2.
|
|
27
|
-
"@remotion/media-utils": "3.2.
|
|
28
|
-
"@remotion/player": "3.2.
|
|
29
|
-
"@remotion/renderer": "3.2.
|
|
26
|
+
"@remotion/bundler": "3.2.13",
|
|
27
|
+
"@remotion/media-utils": "3.2.13",
|
|
28
|
+
"@remotion/player": "3.2.13",
|
|
29
|
+
"@remotion/renderer": "3.2.13",
|
|
30
30
|
"better-opn": "2.1.1",
|
|
31
31
|
"dotenv": "9.0.2",
|
|
32
32
|
"memfs": "3.4.3",
|
|
33
33
|
"minimist": "1.2.6",
|
|
34
|
-
"remotion": "3.2.
|
|
34
|
+
"remotion": "3.2.13",
|
|
35
35
|
"semver": "7.3.5",
|
|
36
36
|
"source-map": "0.6.1"
|
|
37
37
|
},
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "989d20fc0ace36685c71396847e1b7b7a06d00d7"
|
|
75
75
|
}
|