@remotion/cli 3.2.39 → 3.2.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +1 -1
- package/dist/benchmark.js +7 -6
- package/dist/compositions.d.ts +1 -1
- package/dist/compositions.js +4 -3
- package/dist/config/entry-point.d.ts +2 -0
- package/dist/config/entry-point.js +12 -0
- package/dist/config/every-nth-frame.d.ts +1 -2
- package/dist/config/every-nth-frame.js +3 -11
- package/dist/config/height.d.ts +1 -1
- package/dist/config/height.js +4 -4
- package/dist/config/index.d.ts +5 -2
- package/dist/config/index.js +15 -8
- package/dist/config/log.d.ts +1 -1
- package/dist/config/number-of-gif-loops.d.ts +1 -2
- package/dist/config/number-of-gif-loops.js +3 -9
- package/dist/config/width.d.ts +1 -1
- package/dist/config/width.js +3 -3
- package/dist/editor/components/Canvas.js +3 -0
- package/dist/editor/components/GlobalKeybindings.js +4 -0
- package/dist/editor/components/NewComposition/MenuContent.js +7 -0
- package/dist/editor/components/PlayPause.js +6 -0
- package/dist/editor/components/PlaybackKeyboardShortcutsManager.js +3 -0
- package/dist/editor/components/QuickSwitcher/QuickSwitcherContent.js +2 -0
- package/dist/editor/components/QuickSwitcher/QuickSwitcherResult.js +1 -0
- package/dist/editor/components/TimelineInOutToggle.js +3 -0
- package/dist/editor/helpers/use-keybinding.d.ts +1 -0
- package/dist/editor/helpers/use-keybinding.js +3 -1
- package/dist/editor/helpers/use-menu-structure.js +10 -7
- package/dist/editor/state/z-index.js +1 -0
- package/dist/entry-point.d.ts +5 -0
- package/dist/entry-point.js +46 -0
- package/dist/get-cli-options.d.ts +4 -4
- package/dist/get-cli-options.js +7 -25
- package/dist/get-composition-id.d.ts +2 -1
- package/dist/get-composition-id.js +8 -6
- package/dist/get-composition-with-dimension-override.d.ts +3 -1
- package/dist/get-composition-with-dimension-override.js +2 -2
- package/dist/get-filename.d.ts +2 -1
- package/dist/get-filename.js +2 -1
- package/dist/get-render-media-options.js +8 -3
- package/dist/index.d.ts +10 -6
- package/dist/index.js +11 -11
- package/dist/lambda-command.d.ts +1 -1
- package/dist/lambda-command.js +2 -3
- package/dist/list-of-remotion-packages.js +1 -0
- package/dist/parse-command-line.d.ts +2 -0
- package/dist/parse-command-line.js +6 -0
- package/dist/preview-server/error-overlay/remotion-overlay/AskOnDiscord.js +1 -0
- package/dist/preview-server/error-overlay/remotion-overlay/HelpLink.js +1 -0
- package/dist/preview-server/error-overlay/remotion-overlay/OpenInEditor.js +1 -0
- package/dist/preview-server/error-overlay/remotion-overlay/SearchGitHubIssues.js +1 -0
- package/dist/preview.d.ts +1 -1
- package/dist/preview.js +4 -2
- package/dist/render.d.ts +1 -1
- package/dist/render.js +21 -12
- package/dist/still.d.ts +1 -1
- package/dist/still.js +26 -14
- package/dist/user-passed-output-location.d.ts +3 -2
- package/dist/user-passed-output-location.js +5 -7
- package/package.json +7 -7
package/LICENSE.md
CHANGED
|
@@ -36,6 +36,6 @@ Support is provided on a best-we-can-do basis via GitHub Issues and Discord.
|
|
|
36
36
|
|
|
37
37
|
## Company license
|
|
38
38
|
|
|
39
|
-
You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support.
|
|
39
|
+
You are required to obtain a company license to use Remotion if you are not within the group of entities eligible for a free license. This license will enable you to use Remotion for the allowed use cases specified in the free license, and give you access to prioritized support (read the [Support Policy](/docs/support)).
|
|
40
40
|
|
|
41
41
|
Visit [companies.remotion.dev](https://companies.remotion.dev) for pricing and to buy a license.
|
package/dist/benchmark.js
CHANGED
|
@@ -8,6 +8,7 @@ const renderer_1 = require("@remotion/renderer");
|
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
9
|
const chalk_1 = require("./chalk");
|
|
10
10
|
const config_1 = require("./config");
|
|
11
|
+
const entry_point_1 = require("./entry-point");
|
|
11
12
|
const get_cli_options_1 = require("./get-cli-options");
|
|
12
13
|
const get_render_media_options_1 = require("./get-render-media-options");
|
|
13
14
|
const log_1 = require("./log");
|
|
@@ -88,20 +89,20 @@ const makeBenchmarkProgressBar = ({ totalRuns, run, progress, doneIn, }) => {
|
|
|
88
89
|
const benchmarkCommand = async (remotionRoot, args) => {
|
|
89
90
|
var _a;
|
|
90
91
|
const runs = (_a = parse_command_line_1.parsedCli.runs) !== null && _a !== void 0 ? _a : DEFAULT_RUNS;
|
|
91
|
-
const
|
|
92
|
-
if (!
|
|
92
|
+
const { file, reason, remainingArgs } = (0, entry_point_1.findEntryPoint)(args, remotionRoot);
|
|
93
|
+
if (!file) {
|
|
93
94
|
log_1.Log.error('No entry file passed.');
|
|
94
95
|
log_1.Log.info('Pass an additional argument specifying the entry file');
|
|
95
96
|
log_1.Log.info();
|
|
96
97
|
log_1.Log.info(`$ remotion benchmark <entry file>`);
|
|
97
98
|
process.exit(1);
|
|
98
99
|
}
|
|
99
|
-
const fullPath = path_1.default.join(process.cwd(),
|
|
100
|
+
const fullPath = path_1.default.join(process.cwd(), file);
|
|
100
101
|
const { inputProps, envVariables, browserExecutable, ffmpegExecutable, ffprobeExecutable, chromiumOptions, port, puppeteerTimeout, browser, scale, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
|
|
101
102
|
isLambda: false,
|
|
102
103
|
type: 'series',
|
|
103
|
-
codec: 'h264',
|
|
104
104
|
});
|
|
105
|
+
log_1.Log.verbose('Entry point:', file, 'reason:', reason);
|
|
105
106
|
const browserInstance = (0, renderer_1.openBrowser)(browser, {
|
|
106
107
|
browserExecutable,
|
|
107
108
|
shouldDumpIo: renderer_1.RenderInternals.isEqualOrBelowLogLevel(config_1.ConfigInternals.Logging.getLogLevel(), 'verbose'),
|
|
@@ -125,8 +126,8 @@ const benchmarkCommand = async (remotionRoot, args) => {
|
|
|
125
126
|
port,
|
|
126
127
|
puppeteerInstance,
|
|
127
128
|
});
|
|
128
|
-
const ids = (
|
|
129
|
-
?
|
|
129
|
+
const ids = (remainingArgs[0]
|
|
130
|
+
? remainingArgs[0]
|
|
130
131
|
.split(',')
|
|
131
132
|
.map((c) => c.trim())
|
|
132
133
|
.filter(truthy_1.truthy)
|
package/dist/compositions.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const listCompositionsCommand: (remotionRoot: string) => Promise<void>;
|
|
1
|
+
export declare const listCompositionsCommand: (remotionRoot: string, args: string[]) => Promise<void>;
|
package/dist/compositions.js
CHANGED
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.listCompositionsCommand = void 0;
|
|
7
7
|
const renderer_1 = require("@remotion/renderer");
|
|
8
8
|
const path_1 = __importDefault(require("path"));
|
|
9
|
+
const entry_point_1 = require("./entry-point");
|
|
9
10
|
const get_cli_options_1 = require("./get-cli-options");
|
|
10
11
|
const get_config_file_name_1 = require("./get-config-file-name");
|
|
11
12
|
const log_1 = require("./log");
|
|
@@ -24,21 +25,21 @@ const max = (arr) => {
|
|
|
24
25
|
}
|
|
25
26
|
return biggest;
|
|
26
27
|
};
|
|
27
|
-
const listCompositionsCommand = async (remotionRoot) => {
|
|
28
|
-
const file =
|
|
28
|
+
const listCompositionsCommand = async (remotionRoot, args) => {
|
|
29
|
+
const { file, reason } = (0, entry_point_1.findEntryPoint)(args, remotionRoot);
|
|
29
30
|
if (!file) {
|
|
30
31
|
log_1.Log.error('The `compositions` command requires you to specify a entry point. For example');
|
|
31
32
|
log_1.Log.error(' npx remotion compositions src/index.tsx');
|
|
32
33
|
log_1.Log.error('See https://www.remotion.dev/docs/register-root for more information.');
|
|
33
34
|
process.exit(1);
|
|
34
35
|
}
|
|
36
|
+
log_1.Log.verbose('Entry point:', file, 'reason:', reason);
|
|
35
37
|
const downloadMap = renderer_1.RenderInternals.makeDownloadMap();
|
|
36
38
|
const fullPath = path_1.default.join(process.cwd(), file);
|
|
37
39
|
await (0, get_config_file_name_1.loadConfig)(remotionRoot);
|
|
38
40
|
const { browserExecutable, ffmpegExecutable, ffprobeExecutable, chromiumOptions, envVariables, inputProps, puppeteerTimeout, port, publicDir, } = await (0, get_cli_options_1.getCliOptions)({
|
|
39
41
|
isLambda: false,
|
|
40
42
|
type: 'get-compositions',
|
|
41
|
-
codec: 'h264',
|
|
42
43
|
});
|
|
43
44
|
const { urlOrBundle: bundled, cleanup: cleanupBundle } = await (0, setup_cache_1.bundleOnCliOrTakeServeUrl)({
|
|
44
45
|
remotionRoot,
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getEntryPoint = exports.setEntryPoint = void 0;
|
|
4
|
+
let entryPoint = null;
|
|
5
|
+
const setEntryPoint = (ep) => {
|
|
6
|
+
entryPoint = ep;
|
|
7
|
+
};
|
|
8
|
+
exports.setEntryPoint = setEntryPoint;
|
|
9
|
+
const getEntryPoint = () => {
|
|
10
|
+
return entryPoint;
|
|
11
|
+
};
|
|
12
|
+
exports.getEntryPoint = getEntryPoint;
|
|
@@ -1,20 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const renderer_1 = require("@remotion/renderer");
|
|
3
|
+
exports.getEveryNthFrame = exports.setEveryNthFrame = void 0;
|
|
5
4
|
let everyNthFrame = 1;
|
|
6
5
|
const setEveryNthFrame = (frame) => {
|
|
7
|
-
renderer_1.RenderInternals.validateEveryNthFrame(frame);
|
|
8
6
|
everyNthFrame = frame;
|
|
9
7
|
};
|
|
10
8
|
exports.setEveryNthFrame = setEveryNthFrame;
|
|
11
|
-
const
|
|
12
|
-
if (everyNthFrame === 1) {
|
|
13
|
-
return everyNthFrame;
|
|
14
|
-
}
|
|
15
|
-
if (codec !== 'gif') {
|
|
16
|
-
throw new Error(`"everyNthFrame" can only be set if "codec" is set to "gif". The codec is "${codec}"`);
|
|
17
|
-
}
|
|
9
|
+
const getEveryNthFrame = () => {
|
|
18
10
|
return everyNthFrame;
|
|
19
11
|
};
|
|
20
|
-
exports.
|
|
12
|
+
exports.getEveryNthFrame = getEveryNthFrame;
|
package/dist/config/height.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const overrideHeight: (newHeight: number) => void;
|
|
2
2
|
export declare const getHeight: () => number | null;
|
package/dist/config/height.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getHeight = exports.
|
|
3
|
+
exports.getHeight = exports.overrideHeight = void 0;
|
|
4
4
|
// eslint-disable-next-line no-restricted-imports
|
|
5
5
|
const remotion_1 = require("remotion");
|
|
6
6
|
let specifiedHeight;
|
|
7
|
-
const
|
|
8
|
-
remotion_1.Internals.validateDimension(newHeight, 'height', 'passed to `
|
|
7
|
+
const overrideHeight = (newHeight) => {
|
|
8
|
+
remotion_1.Internals.validateDimension(newHeight, 'height', 'passed to `overrideHeight()`');
|
|
9
9
|
specifiedHeight = newHeight;
|
|
10
10
|
};
|
|
11
|
-
exports.
|
|
11
|
+
exports.overrideHeight = overrideHeight;
|
|
12
12
|
const getHeight = () => {
|
|
13
13
|
return specifiedHeight;
|
|
14
14
|
};
|
package/dist/config/index.d.ts
CHANGED
|
@@ -23,8 +23,7 @@ export declare const ConfigInternals: {
|
|
|
23
23
|
getIgnoreCertificateErrors: () => boolean;
|
|
24
24
|
getChromiumHeadlessMode: () => boolean;
|
|
25
25
|
getChromiumOpenGlRenderer: () => "swangle" | "angle" | "egl" | "swiftshader" | null;
|
|
26
|
-
|
|
27
|
-
getAndValidateNumberOfGifLoops: (codec: "h264" | "h265" | "vp8" | "vp9" | "mp3" | "aac" | "wav" | "prores" | "h264-mkv" | "gif") => number | null;
|
|
26
|
+
getEveryNthFrame: () => number;
|
|
28
27
|
getConcurrency: () => number | null;
|
|
29
28
|
getCurrentPuppeteerTimeout: () => number;
|
|
30
29
|
getQuality: () => number | undefined;
|
|
@@ -49,6 +48,10 @@ export declare const ConfigInternals: {
|
|
|
49
48
|
getFfmpegOverrideFunction: () => import("@remotion/renderer").FfmpegOverrideFn;
|
|
50
49
|
getAudioBitrate: () => string | null;
|
|
51
50
|
getVideoBitrate: () => string | null;
|
|
51
|
+
getHeight: () => number | null;
|
|
52
|
+
getWidth: () => number | null;
|
|
52
53
|
getCrfOrUndefined: () => import("@remotion/renderer").Crf;
|
|
54
|
+
getEntryPoint: () => string | null;
|
|
55
|
+
getNumberOfGifLoops: () => import("./number-of-gif-loops").Loop;
|
|
53
56
|
};
|
|
54
57
|
export declare const overrideRemotion: () => void;
|
package/dist/config/index.js
CHANGED
|
@@ -32,14 +32,12 @@ const chromium_flags_1 = require("./chromium-flags");
|
|
|
32
32
|
const codec_1 = require("./codec");
|
|
33
33
|
const concurrency_1 = require("./concurrency");
|
|
34
34
|
const env_file_1 = require("./env-file");
|
|
35
|
-
const every_nth_frame_1 = require("./every-nth-frame");
|
|
36
35
|
const ffmpeg_executable_1 = require("./ffmpeg-executable");
|
|
37
36
|
const frame_range_1 = require("./frame-range");
|
|
38
37
|
const image_format_1 = require("./image-format");
|
|
39
38
|
const image_sequence_1 = require("./image-sequence");
|
|
40
39
|
const Logging = __importStar(require("./log"));
|
|
41
40
|
const max_timeline_tracks_1 = require("./max-timeline-tracks");
|
|
42
|
-
const number_of_gif_loops_1 = require("./number-of-gif-loops");
|
|
43
41
|
const output_location_1 = require("./output-location");
|
|
44
42
|
const override_webpack_1 = require("./override-webpack");
|
|
45
43
|
const overwrite_1 = require("./overwrite");
|
|
@@ -58,18 +56,20 @@ const codec_2 = require("./codec");
|
|
|
58
56
|
const concurrency_2 = require("./concurrency");
|
|
59
57
|
const crf_1 = require("./crf");
|
|
60
58
|
const enforce_audio_track_1 = require("./enforce-audio-track");
|
|
59
|
+
const entry_point_1 = require("./entry-point");
|
|
61
60
|
const env_file_2 = require("./env-file");
|
|
62
|
-
const
|
|
61
|
+
const every_nth_frame_1 = require("./every-nth-frame");
|
|
63
62
|
const ffmpeg_executable_2 = require("./ffmpeg-executable");
|
|
64
63
|
const ffmpeg_override_1 = require("./ffmpeg-override");
|
|
65
64
|
const frame_range_2 = require("./frame-range");
|
|
65
|
+
const height_1 = require("./height");
|
|
66
66
|
const image_format_2 = require("./image-format");
|
|
67
67
|
const image_sequence_2 = require("./image-sequence");
|
|
68
68
|
const keyboard_shortcuts_1 = require("./keyboard-shortcuts");
|
|
69
69
|
const log_1 = require("./log");
|
|
70
70
|
const max_timeline_tracks_2 = require("./max-timeline-tracks");
|
|
71
71
|
const muted_1 = require("./muted");
|
|
72
|
-
const
|
|
72
|
+
const number_of_gif_loops_1 = require("./number-of-gif-loops");
|
|
73
73
|
const output_location_2 = require("./output-location");
|
|
74
74
|
const override_webpack_2 = require("./override-webpack");
|
|
75
75
|
const overwrite_2 = require("./overwrite");
|
|
@@ -81,6 +81,7 @@ const quality_2 = require("./quality");
|
|
|
81
81
|
const scale_2 = require("./scale");
|
|
82
82
|
const timeout_2 = require("./timeout");
|
|
83
83
|
const webpack_caching_2 = require("./webpack-caching");
|
|
84
|
+
const width_1 = require("./width");
|
|
84
85
|
exports.Config = {
|
|
85
86
|
Preview: {
|
|
86
87
|
setMaxTimelineTracks: max_timeline_tracks_2.setMaxTimelineTracks,
|
|
@@ -91,6 +92,7 @@ exports.Config = {
|
|
|
91
92
|
setCachingEnabled: webpack_caching_2.setWebpackCaching,
|
|
92
93
|
setPort: preview_server_2.setPort,
|
|
93
94
|
setPublicDir: public_dir_1.setPublicDir,
|
|
95
|
+
setEntryPoint: entry_point_1.setEntryPoint,
|
|
94
96
|
},
|
|
95
97
|
Log: {
|
|
96
98
|
setLevel: log_1.setLogLevel,
|
|
@@ -112,8 +114,8 @@ exports.Config = {
|
|
|
112
114
|
setFfmpegExecutable: ffmpeg_executable_2.setFfmpegExecutable,
|
|
113
115
|
setFfprobeExecutable: ffmpeg_executable_2.setFfprobeExecutable,
|
|
114
116
|
setScale: scale_2.setScale,
|
|
115
|
-
setEveryNthFrame:
|
|
116
|
-
setNumberOfGifLoops:
|
|
117
|
+
setEveryNthFrame: every_nth_frame_1.setEveryNthFrame,
|
|
118
|
+
setNumberOfGifLoops: number_of_gif_loops_1.setNumberOfGifLoops,
|
|
117
119
|
setMuted: muted_1.setMuted,
|
|
118
120
|
setEnforceAudioTrack: enforce_audio_track_1.setEnforceAudioTrack,
|
|
119
121
|
},
|
|
@@ -128,6 +130,8 @@ exports.Config = {
|
|
|
128
130
|
setProResProfile: prores_profile_2.setProResProfile,
|
|
129
131
|
setAudioBitrate: bitrate_1.setAudioBitrate,
|
|
130
132
|
setVideoBitrate: bitrate_1.setVideoBitrate,
|
|
133
|
+
overrideHeight: height_1.overrideHeight,
|
|
134
|
+
overrideWidth: width_1.overrideWidth,
|
|
131
135
|
overrideFfmpegCommand: ffmpeg_override_1.setFfmpegOverrideFunction,
|
|
132
136
|
},
|
|
133
137
|
};
|
|
@@ -148,8 +152,7 @@ exports.ConfigInternals = {
|
|
|
148
152
|
getIgnoreCertificateErrors: chromium_flags_1.getIgnoreCertificateErrors,
|
|
149
153
|
getChromiumHeadlessMode: chromium_flags_1.getChromiumHeadlessMode,
|
|
150
154
|
getChromiumOpenGlRenderer: chromium_flags_1.getChromiumOpenGlRenderer,
|
|
151
|
-
|
|
152
|
-
getAndValidateNumberOfGifLoops: number_of_gif_loops_1.getAndValidateNumberOfGifLoops,
|
|
155
|
+
getEveryNthFrame: every_nth_frame_1.getEveryNthFrame,
|
|
153
156
|
getConcurrency: concurrency_1.getConcurrency,
|
|
154
157
|
getCurrentPuppeteerTimeout: timeout_1.getCurrentPuppeteerTimeout,
|
|
155
158
|
getQuality: quality_1.getQuality,
|
|
@@ -174,7 +177,11 @@ exports.ConfigInternals = {
|
|
|
174
177
|
getFfmpegOverrideFunction: ffmpeg_override_1.getFfmpegOverrideFunction,
|
|
175
178
|
getAudioBitrate: bitrate_1.getAudioBitrate,
|
|
176
179
|
getVideoBitrate: bitrate_1.getVideoBitrate,
|
|
180
|
+
getHeight: height_1.getHeight,
|
|
181
|
+
getWidth: width_1.getWidth,
|
|
177
182
|
getCrfOrUndefined: crf_1.getCrfOrUndefined,
|
|
183
|
+
getEntryPoint: entry_point_1.getEntryPoint,
|
|
184
|
+
getNumberOfGifLoops: number_of_gif_loops_1.getNumberOfGifLoops,
|
|
178
185
|
};
|
|
179
186
|
const overrideRemotion = () => {
|
|
180
187
|
Object.assign(remotion_1.Config, exports.Config);
|
package/dist/config/log.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { LogLevel } from '@remotion/renderer';
|
|
2
|
-
export declare const getLogLevel: () => "
|
|
2
|
+
export declare const getLogLevel: () => "error" | "verbose" | "info" | "warn";
|
|
3
3
|
export declare const setLogLevel: (newLogLevel: LogLevel) => void;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { Codec } from '@remotion/renderer';
|
|
2
1
|
export declare type Loop = number | null;
|
|
3
2
|
export declare const setNumberOfGifLoops: (newLoop: Loop | null) => void;
|
|
4
|
-
export declare const
|
|
3
|
+
export declare const getNumberOfGifLoops: () => Loop;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.getNumberOfGifLoops = exports.setNumberOfGifLoops = void 0;
|
|
4
4
|
let currentLoop = null;
|
|
5
5
|
const setNumberOfGifLoops = (newLoop) => {
|
|
6
6
|
if (newLoop !== null && typeof newLoop !== 'number') {
|
|
@@ -9,13 +9,7 @@ const setNumberOfGifLoops = (newLoop) => {
|
|
|
9
9
|
currentLoop = newLoop;
|
|
10
10
|
};
|
|
11
11
|
exports.setNumberOfGifLoops = setNumberOfGifLoops;
|
|
12
|
-
const
|
|
13
|
-
if (currentLoop === null) {
|
|
14
|
-
return currentLoop;
|
|
15
|
-
}
|
|
16
|
-
if (codec !== 'gif') {
|
|
17
|
-
throw new Error(`The "numberOfGifLoops" setting can only be used for GIFs. The codec is set to ${codec}`);
|
|
18
|
-
}
|
|
12
|
+
const getNumberOfGifLoops = () => {
|
|
19
13
|
return currentLoop;
|
|
20
14
|
};
|
|
21
|
-
exports.
|
|
15
|
+
exports.getNumberOfGifLoops = getNumberOfGifLoops;
|
package/dist/config/width.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const overrideWidth: (newWidth: number) => void;
|
|
2
2
|
export declare const getWidth: () => number | null;
|
package/dist/config/width.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getWidth = exports.
|
|
3
|
+
exports.getWidth = exports.overrideWidth = void 0;
|
|
4
4
|
// eslint-disable-next-line no-restricted-imports
|
|
5
5
|
const remotion_1 = require("remotion");
|
|
6
6
|
let passedWidth = null;
|
|
7
|
-
const
|
|
7
|
+
const overrideWidth = (newWidth) => {
|
|
8
8
|
if (typeof newWidth !== 'number') {
|
|
9
9
|
remotion_1.Internals.validateDimension(newWidth, 'width', 'passed to `setWidth()`');
|
|
10
10
|
}
|
|
11
11
|
passedWidth = newWidth;
|
|
12
12
|
};
|
|
13
|
-
exports.
|
|
13
|
+
exports.overrideWidth = overrideWidth;
|
|
14
14
|
const getWidth = () => {
|
|
15
15
|
return passedWidth;
|
|
16
16
|
};
|
|
@@ -192,18 +192,21 @@ const Canvas = () => {
|
|
|
192
192
|
key: '0',
|
|
193
193
|
commandCtrlKey: false,
|
|
194
194
|
callback: onReset,
|
|
195
|
+
preventDefault: true,
|
|
195
196
|
});
|
|
196
197
|
const zoomIn = keybindings.registerKeybinding({
|
|
197
198
|
event: 'keydown',
|
|
198
199
|
key: '+',
|
|
199
200
|
commandCtrlKey: false,
|
|
200
201
|
callback: onZoomIn,
|
|
202
|
+
preventDefault: true,
|
|
201
203
|
});
|
|
202
204
|
const zoomOut = keybindings.registerKeybinding({
|
|
203
205
|
event: 'keydown',
|
|
204
206
|
key: '-',
|
|
205
207
|
commandCtrlKey: false,
|
|
206
208
|
callback: onZoomOut,
|
|
209
|
+
preventDefault: true,
|
|
207
210
|
});
|
|
208
211
|
return () => {
|
|
209
212
|
resetBinding.unregister();
|
|
@@ -20,6 +20,7 @@ const GlobalKeybindings = () => {
|
|
|
20
20
|
});
|
|
21
21
|
},
|
|
22
22
|
commandCtrlKey: false,
|
|
23
|
+
preventDefault: true,
|
|
23
24
|
});
|
|
24
25
|
const cmdKKey = keybindings.registerKeybinding({
|
|
25
26
|
event: 'keydown',
|
|
@@ -32,6 +33,7 @@ const GlobalKeybindings = () => {
|
|
|
32
33
|
});
|
|
33
34
|
},
|
|
34
35
|
commandCtrlKey: true,
|
|
36
|
+
preventDefault: true,
|
|
35
37
|
});
|
|
36
38
|
const cKey = keybindings.registerKeybinding({
|
|
37
39
|
event: 'keypress',
|
|
@@ -40,6 +42,7 @@ const GlobalKeybindings = () => {
|
|
|
40
42
|
setCheckerboard((c) => !c);
|
|
41
43
|
},
|
|
42
44
|
commandCtrlKey: true,
|
|
45
|
+
preventDefault: true,
|
|
43
46
|
});
|
|
44
47
|
const questionMark = keybindings.registerKeybinding({
|
|
45
48
|
event: 'keypress',
|
|
@@ -52,6 +55,7 @@ const GlobalKeybindings = () => {
|
|
|
52
55
|
});
|
|
53
56
|
},
|
|
54
57
|
commandCtrlKey: false,
|
|
58
|
+
preventDefault: true,
|
|
55
59
|
});
|
|
56
60
|
return () => {
|
|
57
61
|
nKey.unregister();
|
|
@@ -104,42 +104,49 @@ const MenuContent = ({ onHide, values, preselectIndex, onNextMenu, onPreviousMen
|
|
|
104
104
|
key: 'Escape',
|
|
105
105
|
callback: onEscape,
|
|
106
106
|
commandCtrlKey: false,
|
|
107
|
+
preventDefault: true,
|
|
107
108
|
});
|
|
108
109
|
const rightBinding = keybindings.registerKeybinding({
|
|
109
110
|
event: 'keydown',
|
|
110
111
|
key: 'ArrowRight',
|
|
111
112
|
commandCtrlKey: false,
|
|
112
113
|
callback: onArrowRight,
|
|
114
|
+
preventDefault: true,
|
|
113
115
|
});
|
|
114
116
|
const leftBinding = keybindings.registerKeybinding({
|
|
115
117
|
event: 'keydown',
|
|
116
118
|
commandCtrlKey: false,
|
|
117
119
|
key: 'ArrowLeft',
|
|
118
120
|
callback: onPreviousMenu,
|
|
121
|
+
preventDefault: true,
|
|
119
122
|
});
|
|
120
123
|
const downBinding = keybindings.registerKeybinding({
|
|
121
124
|
event: 'keydown',
|
|
122
125
|
key: 'ArrowDown',
|
|
123
126
|
commandCtrlKey: false,
|
|
124
127
|
callback: onArrowDown,
|
|
128
|
+
preventDefault: true,
|
|
125
129
|
});
|
|
126
130
|
const upBinding = keybindings.registerKeybinding({
|
|
127
131
|
event: 'keydown',
|
|
128
132
|
key: 'ArrowUp',
|
|
129
133
|
callback: onArrowUp,
|
|
130
134
|
commandCtrlKey: false,
|
|
135
|
+
preventDefault: true,
|
|
131
136
|
});
|
|
132
137
|
const enterBinding = keybindings.registerKeybinding({
|
|
133
138
|
event: 'keydown',
|
|
134
139
|
key: 'Enter',
|
|
135
140
|
callback: onEnter,
|
|
136
141
|
commandCtrlKey: false,
|
|
142
|
+
preventDefault: true,
|
|
137
143
|
});
|
|
138
144
|
const spaceBinding = keybindings.registerKeybinding({
|
|
139
145
|
event: 'keyup',
|
|
140
146
|
key: ' ',
|
|
141
147
|
callback: onEnter,
|
|
142
148
|
commandCtrlKey: false,
|
|
149
|
+
preventDefault: true,
|
|
143
150
|
});
|
|
144
151
|
return () => {
|
|
145
152
|
escapeBinding.unregister();
|
|
@@ -124,36 +124,42 @@ const PlayPause = ({ playbackRate, loop }) => {
|
|
|
124
124
|
key: 'ArrowLeft',
|
|
125
125
|
callback: onArrowLeft,
|
|
126
126
|
commandCtrlKey: false,
|
|
127
|
+
preventDefault: true,
|
|
127
128
|
});
|
|
128
129
|
const arrowRight = keybindings.registerKeybinding({
|
|
129
130
|
event: 'keydown',
|
|
130
131
|
key: 'ArrowRight',
|
|
131
132
|
callback: onArrowRight,
|
|
132
133
|
commandCtrlKey: false,
|
|
134
|
+
preventDefault: true,
|
|
133
135
|
});
|
|
134
136
|
const space = keybindings.registerKeybinding({
|
|
135
137
|
event: 'keydown',
|
|
136
138
|
key: ' ',
|
|
137
139
|
callback: onSpace,
|
|
138
140
|
commandCtrlKey: false,
|
|
141
|
+
preventDefault: true,
|
|
139
142
|
});
|
|
140
143
|
const enter = keybindings.registerKeybinding({
|
|
141
144
|
event: 'keydown',
|
|
142
145
|
key: 'enter',
|
|
143
146
|
callback: onEnter,
|
|
144
147
|
commandCtrlKey: false,
|
|
148
|
+
preventDefault: false,
|
|
145
149
|
});
|
|
146
150
|
const a = keybindings.registerKeybinding({
|
|
147
151
|
event: 'keydown',
|
|
148
152
|
key: 'a',
|
|
149
153
|
callback: jumpToStart,
|
|
150
154
|
commandCtrlKey: false,
|
|
155
|
+
preventDefault: true,
|
|
151
156
|
});
|
|
152
157
|
const e = keybindings.registerKeybinding({
|
|
153
158
|
event: 'keydown',
|
|
154
159
|
key: 'e',
|
|
155
160
|
callback: jumpToEnd,
|
|
156
161
|
commandCtrlKey: false,
|
|
162
|
+
preventDefault: true,
|
|
157
163
|
});
|
|
158
164
|
return () => {
|
|
159
165
|
arrowLeft.unregister();
|
|
@@ -47,18 +47,21 @@ const PlaybackKeyboardShortcutsManager = ({ setPlaybackRate }) => {
|
|
|
47
47
|
key: 'j',
|
|
48
48
|
callback: onJKey,
|
|
49
49
|
commandCtrlKey: false,
|
|
50
|
+
preventDefault: true,
|
|
50
51
|
});
|
|
51
52
|
const kKey = keybindings.registerKeybinding({
|
|
52
53
|
event: 'keydown',
|
|
53
54
|
key: 'k',
|
|
54
55
|
callback: onKKey,
|
|
55
56
|
commandCtrlKey: false,
|
|
57
|
+
preventDefault: true,
|
|
56
58
|
});
|
|
57
59
|
const lKey = keybindings.registerKeybinding({
|
|
58
60
|
event: 'keydown',
|
|
59
61
|
key: 'l',
|
|
60
62
|
callback: onLKey,
|
|
61
63
|
commandCtrlKey: false,
|
|
64
|
+
preventDefault: true,
|
|
62
65
|
});
|
|
63
66
|
return () => {
|
|
64
67
|
jKey.unregister();
|
|
@@ -169,6 +169,7 @@ const QuickSwitcherContent = ({ initialMode, invocationTimestamp }) => {
|
|
|
169
169
|
callback: onArrowUp,
|
|
170
170
|
commandCtrlKey: false,
|
|
171
171
|
event: 'keydown',
|
|
172
|
+
preventDefault: true,
|
|
172
173
|
});
|
|
173
174
|
return () => {
|
|
174
175
|
binding.unregister();
|
|
@@ -208,6 +209,7 @@ const QuickSwitcherContent = ({ initialMode, invocationTimestamp }) => {
|
|
|
208
209
|
callback: onArrowDown,
|
|
209
210
|
commandCtrlKey: false,
|
|
210
211
|
event: 'keydown',
|
|
212
|
+
preventDefault: true,
|
|
211
213
|
});
|
|
212
214
|
return () => {
|
|
213
215
|
binding.unregister();
|
|
@@ -144,6 +144,7 @@ const TimelineInOutPointToggle = () => {
|
|
|
144
144
|
onInMark(e);
|
|
145
145
|
},
|
|
146
146
|
commandCtrlKey: false,
|
|
147
|
+
preventDefault: true,
|
|
147
148
|
});
|
|
148
149
|
const oKey = keybindings.registerKeybinding({
|
|
149
150
|
event: 'keypress',
|
|
@@ -152,6 +153,7 @@ const TimelineInOutPointToggle = () => {
|
|
|
152
153
|
onOutMark(e);
|
|
153
154
|
},
|
|
154
155
|
commandCtrlKey: false,
|
|
156
|
+
preventDefault: true,
|
|
155
157
|
});
|
|
156
158
|
const xKey = keybindings.registerKeybinding({
|
|
157
159
|
event: 'keypress',
|
|
@@ -160,6 +162,7 @@ const TimelineInOutPointToggle = () => {
|
|
|
160
162
|
onInOutClear();
|
|
161
163
|
},
|
|
162
164
|
commandCtrlKey: false,
|
|
165
|
+
preventDefault: true,
|
|
163
166
|
});
|
|
164
167
|
return () => {
|
|
165
168
|
oKey.unregister();
|
|
@@ -33,7 +33,9 @@ const useKeybinding = () => {
|
|
|
33
33
|
if (e.key.toLowerCase() === options.key.toLowerCase() &&
|
|
34
34
|
options.commandCtrlKey === commandKey) {
|
|
35
35
|
options.callback(e);
|
|
36
|
-
|
|
36
|
+
if (options.preventDefault) {
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
}
|
|
37
39
|
}
|
|
38
40
|
};
|
|
39
41
|
const toRegister = {
|
|
@@ -161,7 +161,7 @@ const useMenuStructure = (closeMenu) => {
|
|
|
161
161
|
quickSwitcherLabel: null,
|
|
162
162
|
},
|
|
163
163
|
{
|
|
164
|
-
id: 'timeline-divider',
|
|
164
|
+
id: 'timeline-divider-1',
|
|
165
165
|
type: 'divider',
|
|
166
166
|
},
|
|
167
167
|
{
|
|
@@ -220,7 +220,7 @@ const useMenuStructure = (closeMenu) => {
|
|
|
220
220
|
onClick: () => undefined,
|
|
221
221
|
},
|
|
222
222
|
{
|
|
223
|
-
id: 'timeline-divider',
|
|
223
|
+
id: 'timeline-divider-2',
|
|
224
224
|
type: 'divider',
|
|
225
225
|
},
|
|
226
226
|
{
|
|
@@ -240,7 +240,7 @@ const useMenuStructure = (closeMenu) => {
|
|
|
240
240
|
: 'Enable Checkerboard Transparency',
|
|
241
241
|
},
|
|
242
242
|
{
|
|
243
|
-
id: 'timeline-divider',
|
|
243
|
+
id: 'timeline-divider-3',
|
|
244
244
|
type: 'divider',
|
|
245
245
|
},
|
|
246
246
|
{
|
|
@@ -290,7 +290,7 @@ const useMenuStructure = (closeMenu) => {
|
|
|
290
290
|
quickSwitcherLabel: 'Timeline: Collapse all layers',
|
|
291
291
|
},
|
|
292
292
|
{
|
|
293
|
-
id: 'in-out-divider',
|
|
293
|
+
id: 'in-out-divider-4',
|
|
294
294
|
type: 'divider',
|
|
295
295
|
},
|
|
296
296
|
{
|
|
@@ -312,7 +312,7 @@ const useMenuStructure = (closeMenu) => {
|
|
|
312
312
|
quickSwitcherLabel: 'Switch composition',
|
|
313
313
|
},
|
|
314
314
|
{
|
|
315
|
-
id: 'in-out-divider',
|
|
315
|
+
id: 'in-out-divider-5',
|
|
316
316
|
type: 'divider',
|
|
317
317
|
},
|
|
318
318
|
{
|
|
@@ -372,7 +372,10 @@ const useMenuStructure = (closeMenu) => {
|
|
|
372
372
|
id: 'color-picker',
|
|
373
373
|
value: 'color-picker',
|
|
374
374
|
label: 'Color Picker',
|
|
375
|
-
onClick: () =>
|
|
375
|
+
onClick: () => {
|
|
376
|
+
closeMenu();
|
|
377
|
+
(0, pick_color_1.pickColor)();
|
|
378
|
+
},
|
|
376
379
|
leftItem: null,
|
|
377
380
|
keyHint: null,
|
|
378
381
|
subMenu: null,
|
|
@@ -453,7 +456,7 @@ const useMenuStructure = (closeMenu) => {
|
|
|
453
456
|
quickSwitcherLabel: null,
|
|
454
457
|
},
|
|
455
458
|
{
|
|
456
|
-
id: 'help-divider',
|
|
459
|
+
id: 'help-divider-6',
|
|
457
460
|
type: 'divider',
|
|
458
461
|
},
|
|
459
462
|
{
|