@remotion/cli 3.2.10 → 3.2.11
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/config/drop-silent-audio-if-silent.d.ts +2 -0
- package/dist/config/drop-silent-audio-if-silent.js +13 -0
- package/dist/config/index.d.ts +1 -0
- package/dist/config/index.js +3 -0
- package/dist/config/keyboard-shortcuts.d.ts +2 -0
- package/dist/config/keyboard-shortcuts.js +12 -0
- package/dist/editor/components/CheckboardToggle.js +8 -1
- package/dist/editor/components/KeyboardShortcutsModal.js +15 -1
- package/dist/editor/components/Menu/MenuSubItem.js +2 -1
- package/dist/editor/components/MenuToolbar.js +4 -1
- package/dist/editor/components/TimelineInOutToggle.js +5 -2
- package/dist/editor/helpers/use-keybinding.d.ts +1 -0
- package/dist/editor/helpers/use-keybinding.js +13 -1
- 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/parse-command-line.d.ts +1 -0
- package/dist/parse-command-line.js +4 -0
- package/dist/preview-server/start-server.d.ts +1 -0
- package/dist/preview-server/start-server.js +1 -0
- package/dist/preview.js +1 -0
- package/dist/upgrade.js +1 -0
- package/dist/versions.js +1 -0
- package/package.json +7 -7
- package/dist/bundle.d.ts +0 -1
- package/dist/bundle.js +0 -32
- package/dist/config/bundle-out-dir.d.ts +0 -2
- package/dist/config/bundle-out-dir.js +0 -12
- package/dist/config/get-public-path.d.ts +0 -2
- package/dist/config/get-public-path.js +0 -12
- package/dist/prepare-entry-point.d.ts +0 -12
- package/dist/prepare-entry-point.js +0 -37
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getDropAudioIfSilent = exports.setDropAudioIfSilent = void 0;
|
|
4
|
+
const DEFAULT_DROP_AUDIO_IF_SILENT_STATE = true;
|
|
5
|
+
let mutedState = DEFAULT_DROP_AUDIO_IF_SILENT_STATE;
|
|
6
|
+
const setDropAudioIfSilent = (muted) => {
|
|
7
|
+
mutedState = muted;
|
|
8
|
+
};
|
|
9
|
+
exports.setDropAudioIfSilent = setDropAudioIfSilent;
|
|
10
|
+
const getDropAudioIfSilent = () => {
|
|
11
|
+
return mutedState;
|
|
12
|
+
};
|
|
13
|
+
exports.getDropAudioIfSilent = getDropAudioIfSilent;
|
package/dist/config/index.d.ts
CHANGED
|
@@ -43,5 +43,6 @@ export declare const ConfigInternals: {
|
|
|
43
43
|
getMuted: () => boolean;
|
|
44
44
|
getEnforceAudioTrack: () => boolean;
|
|
45
45
|
setEnforceAudioTrack: (enforceAudioTrack: boolean) => void;
|
|
46
|
+
getKeyboardShortcutsEnabled: () => boolean;
|
|
46
47
|
};
|
|
47
48
|
export declare const overrideRemotion: () => void;
|
package/dist/config/index.js
CHANGED
|
@@ -64,6 +64,7 @@ const ffmpeg_executable_2 = require("./ffmpeg-executable");
|
|
|
64
64
|
const frame_range_2 = require("./frame-range");
|
|
65
65
|
const image_format_2 = require("./image-format");
|
|
66
66
|
const image_sequence_2 = require("./image-sequence");
|
|
67
|
+
const keyboard_shortcuts_1 = require("./keyboard-shortcuts");
|
|
67
68
|
const log_1 = require("./log");
|
|
68
69
|
const max_timeline_tracks_2 = require("./max-timeline-tracks");
|
|
69
70
|
const muted_1 = require("./muted");
|
|
@@ -81,6 +82,7 @@ const webpack_caching_2 = require("./webpack-caching");
|
|
|
81
82
|
exports.Config = {
|
|
82
83
|
Preview: {
|
|
83
84
|
setMaxTimelineTracks: max_timeline_tracks_2.setMaxTimelineTracks,
|
|
85
|
+
setKeyboardShortcutsEnabled: keyboard_shortcuts_1.setKeyboardShortcutsEnabled,
|
|
84
86
|
},
|
|
85
87
|
Bundling: {
|
|
86
88
|
overrideWebpackConfig: override_webpack_2.overrideWebpackConfig,
|
|
@@ -162,6 +164,7 @@ exports.ConfigInternals = {
|
|
|
162
164
|
getMuted: muted_1.getMuted,
|
|
163
165
|
getEnforceAudioTrack: enforce_audio_track_1.getEnforceAudioTrack,
|
|
164
166
|
setEnforceAudioTrack: enforce_audio_track_1.setEnforceAudioTrack,
|
|
167
|
+
getKeyboardShortcutsEnabled: keyboard_shortcuts_1.getKeyboardShortcutsEnabled,
|
|
165
168
|
};
|
|
166
169
|
const overrideRemotion = () => {
|
|
167
170
|
Object.assign(remotion_1.Config, exports.Config);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getKeyboardShortcutsEnabled = exports.setKeyboardShortcutsEnabled = void 0;
|
|
4
|
+
let shortcutsEnabled = true;
|
|
5
|
+
const setKeyboardShortcutsEnabled = (enabled) => {
|
|
6
|
+
shortcutsEnabled = enabled;
|
|
7
|
+
};
|
|
8
|
+
exports.setKeyboardShortcutsEnabled = setKeyboardShortcutsEnabled;
|
|
9
|
+
const getKeyboardShortcutsEnabled = () => {
|
|
10
|
+
return shortcutsEnabled;
|
|
11
|
+
};
|
|
12
|
+
exports.getKeyboardShortcutsEnabled = getKeyboardShortcutsEnabled;
|
|
@@ -3,9 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CheckboardToggle = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const truthy_1 = require("../../truthy");
|
|
7
|
+
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
6
8
|
const checkerboard_1 = require("../state/checkerboard");
|
|
7
9
|
const ControlButton_1 = require("./ControlButton");
|
|
8
|
-
const accessibilityLabel =
|
|
10
|
+
const accessibilityLabel = [
|
|
11
|
+
'Show transparency as checkerboard',
|
|
12
|
+
(0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? null : '(T)',
|
|
13
|
+
]
|
|
14
|
+
.filter(truthy_1.truthy)
|
|
15
|
+
.join(' ');
|
|
9
16
|
const CheckboardToggle = () => {
|
|
10
17
|
const { checkerboard, setCheckerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
|
|
11
18
|
const onClick = (0, react_1.useCallback)(() => {
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.KeyboardShortcuts = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
6
7
|
const keys_1 = require("../icons/keys");
|
|
7
8
|
const modals_1 = require("../state/modals");
|
|
8
9
|
const layout_1 = require("./layout");
|
|
@@ -43,11 +44,24 @@ const title = {
|
|
|
43
44
|
fontSize: 14,
|
|
44
45
|
marginBottom: 10,
|
|
45
46
|
};
|
|
47
|
+
const keyboardShortcutsDisabled = {
|
|
48
|
+
padding: 12,
|
|
49
|
+
width: '100%',
|
|
50
|
+
fontSize: 14,
|
|
51
|
+
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
52
|
+
};
|
|
53
|
+
const ul = {
|
|
54
|
+
marginTop: 0,
|
|
55
|
+
marginBottom: 0,
|
|
56
|
+
};
|
|
57
|
+
const li = {
|
|
58
|
+
fontSize: 14,
|
|
59
|
+
};
|
|
46
60
|
const KeyboardShortcuts = () => {
|
|
47
61
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
48
62
|
const onQuit = (0, react_1.useCallback)(() => {
|
|
49
63
|
setSelectedModal(null);
|
|
50
64
|
}, [setSelectedModal]);
|
|
51
|
-
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onEscape: onQuit, onOutsideClick: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "Keyboard shortcuts" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { style: container, children: [(0, jsx_runtime_1.jsxs)(layout_1.Column, { children: [(0, jsx_runtime_1.jsx)("div", { style: title, children: "Playback" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ShiftIcon, {}) }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowLeft, {}) })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "1 second back" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowLeft, {}) }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Previous frame" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "Space" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Play / Pause" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowRight, {}) }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Next frame" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ShiftIcon, {}) }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowRight, {}) })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "1 second forward" })] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "A" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Jump to beginning" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "E" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Jump to end" })] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "J" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Reverse playback" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "K" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Pause" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "L" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Play / Speed up" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "Enter" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Pause & return to playback start" })] })] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 8 }), (0, jsx_runtime_1.jsxs)(layout_1.Column, { children: [(0, jsx_runtime_1.jsx)("div", { style: title, children: "Navigation" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "N" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "New composition" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "T" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Toggle checkerboard transparency" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "?" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Show keyboard shortcuts" })] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("div", { style: title, children: "Playback range" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "I" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Set In Point" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "O" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Set Out Point" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "X" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Clear In/Out Points" })] })] })] })] }));
|
|
65
|
+
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onEscape: onQuit, onOutsideClick: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "Keyboard shortcuts" }), (0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? ((0, jsx_runtime_1.jsxs)("div", { style: keyboardShortcutsDisabled, children: ["Keyboard shortcuts disabled either due to:", (0, jsx_runtime_1.jsxs)("ul", { style: ul, children: [(0, jsx_runtime_1.jsx)("li", { style: li, children: "a) --disable-keyboard-shortcuts being passed" }), (0, jsx_runtime_1.jsx)("li", { style: li, children: "b) Config.Preview.setKeyboardShortcutsEnabled(false) being set or" }), (0, jsx_runtime_1.jsx)("li", { style: li, children: " c) a Remotion version mismatch." })] })] })) : null, (0, jsx_runtime_1.jsxs)(layout_1.Row, { style: container, children: [(0, jsx_runtime_1.jsxs)(layout_1.Column, { children: [(0, jsx_runtime_1.jsx)("div", { style: title, children: "Playback" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ShiftIcon, {}) }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowLeft, {}) })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "1 second back" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowLeft, {}) }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Previous frame" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "Space" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Play / Pause" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowRight, {}) }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Next frame" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ShiftIcon, {}) }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: (0, jsx_runtime_1.jsx)(keys_1.ArrowRight, {}) })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "1 second forward" })] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "A" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Jump to beginning" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "E" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Jump to end" })] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "J" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Reverse playback" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "K" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Pause" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "L" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Play / Speed up" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "Enter" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Pause & return to playback start" })] })] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 8 }), (0, jsx_runtime_1.jsxs)(layout_1.Column, { children: [(0, jsx_runtime_1.jsx)("div", { style: title, children: "Navigation" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "N" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "New composition" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "T" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Toggle checkerboard transparency" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "?" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Show keyboard shortcuts" })] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("div", { style: title, children: "Playback range" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "I" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Set In Point" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "O" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Set Out Point" })] }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: shortLeft, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "X" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Clear In/Out Points" })] })] })] })] }));
|
|
52
66
|
};
|
|
53
67
|
exports.KeyboardShortcuts = KeyboardShortcuts;
|
|
@@ -9,6 +9,7 @@ const player_1 = require("@remotion/player");
|
|
|
9
9
|
const react_1 = require("react");
|
|
10
10
|
const react_dom_1 = __importDefault(require("react-dom"));
|
|
11
11
|
const colors_1 = require("../../helpers/colors");
|
|
12
|
+
const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
12
13
|
const caret_1 = require("../../icons/caret");
|
|
13
14
|
const z_index_1 = require("../../state/z-index");
|
|
14
15
|
const layout_1 = require("../layout");
|
|
@@ -84,7 +85,7 @@ const MenuSubItem = ({ label, leaveLeftSpace, leftItem, onActionChosen, id, sele
|
|
|
84
85
|
}, 100);
|
|
85
86
|
return () => clearTimeout(hi);
|
|
86
87
|
}, [hovered, selected, setSubMenuActivated, subMenu]);
|
|
87
|
-
return ((0, jsx_runtime_1.jsx)("div", { ref: ref, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: style, onClick: onClick, children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { children: [leaveLeftSpace ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: leftSpace, children: leftItem }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 })] })) : null, (0, jsx_runtime_1.jsx)("div", { style: labelStyle, children: label }), " ", (0, jsx_runtime_1.jsx)(layout_1.Flex, {}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 2 }), subMenu ? (0, jsx_runtime_1.jsx)(caret_1.CaretRight, {}) : null, keyHint ? (0, jsx_runtime_1.jsx)("span", { style: keyHintCss, children: keyHint }) : null, portalStyle && subMenu
|
|
88
|
+
return ((0, jsx_runtime_1.jsx)("div", { ref: ref, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: style, onClick: onClick, children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { children: [leaveLeftSpace ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { style: leftSpace, children: leftItem }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 })] })) : null, (0, jsx_runtime_1.jsx)("div", { style: labelStyle, children: label }), " ", (0, jsx_runtime_1.jsx)(layout_1.Flex, {}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 2 }), subMenu ? (0, jsx_runtime_1.jsx)(caret_1.CaretRight, {}) : null, keyHint && !(0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? ((0, jsx_runtime_1.jsx)("span", { style: keyHintCss, children: keyHint })) : null, portalStyle && subMenu
|
|
88
89
|
? react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)(SubMenu_1.SubMenuComponent, { onQuitFullMenu: onQuitMenu, subMenu: subMenu, onQuitSubMenu: onQuitSubmenu, portalStyle: portalStyle, subMenuActivated: subMenuActivated }), (0, portals_1.getPortal)(currentZIndex))
|
|
89
90
|
: null] }) }));
|
|
90
91
|
};
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const colors_1 = require("../helpers/colors");
|
|
8
8
|
const pick_color_1 = require("../helpers/pick-color");
|
|
9
|
+
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
9
10
|
const Checkmark_1 = require("../icons/Checkmark");
|
|
10
11
|
const checkerboard_1 = require("../state/checkerboard");
|
|
11
12
|
const modals_1 = require("../state/modals");
|
|
@@ -368,7 +369,9 @@ const MenuToolbar = () => {
|
|
|
368
369
|
{
|
|
369
370
|
id: 'shortcuts',
|
|
370
371
|
value: 'shortcuts',
|
|
371
|
-
label:
|
|
372
|
+
label: (0, use_keybinding_1.areKeyboardShortcutsDisabled)()
|
|
373
|
+
? 'Shortcuts (disabled)'
|
|
374
|
+
: 'Shortcuts',
|
|
372
375
|
onClick: () => {
|
|
373
376
|
close();
|
|
374
377
|
setSelectedModal({
|
|
@@ -4,13 +4,16 @@ exports.TimelineInOutPointToggle = exports.inOutHandles = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
|
+
const truthy_1 = require("../../truthy");
|
|
7
8
|
const is_current_selected_still_1 = require("../helpers/is-current-selected-still");
|
|
8
9
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
9
10
|
const timelineInOutPointer_1 = require("../icons/timelineInOutPointer");
|
|
10
11
|
const in_out_1 = require("../state/in-out");
|
|
11
12
|
const marks_1 = require("../state/marks");
|
|
12
13
|
const ControlButton_1 = require("./ControlButton");
|
|
13
|
-
const getTooltipText = (pointType) => `Mark ${pointType}
|
|
14
|
+
const getTooltipText = (pointType, key) => [`Mark ${pointType}`, (0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? null : `(${key})`]
|
|
15
|
+
.filter(truthy_1.truthy)
|
|
16
|
+
.join(' ');
|
|
14
17
|
const style = {
|
|
15
18
|
width: 16,
|
|
16
19
|
height: 16,
|
|
@@ -169,6 +172,6 @@ const TimelineInOutPointToggle = () => {
|
|
|
169
172
|
if (isStill) {
|
|
170
173
|
return null;
|
|
171
174
|
}
|
|
172
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: getTooltipText('In
|
|
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', '(O)'), "aria-label": getTooltipText('Out', '(O)'), onClick: onOutMark, disabled: timelinePosition === videoConfig.durationInFrames - 1, children: (0, jsx_runtime_1.jsx)(timelineInOutPointer_1.TimelineOutPointer, { color: outFrame === null ? 'white' : 'var(--blue)', style: style }) })] }));
|
|
173
176
|
};
|
|
174
177
|
exports.TimelineInOutPointToggle = TimelineInOutPointToggle;
|
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useKeybinding = void 0;
|
|
3
|
+
exports.useKeybinding = exports.areKeyboardShortcutsDisabled = void 0;
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const keybindings_1 = require("../state/keybindings");
|
|
6
6
|
const z_index_1 = require("../state/z-index");
|
|
7
|
+
if (!process.env.KEYBOARD_SHORTCUTS_ENABLED) {
|
|
8
|
+
console.warn('Keyboard shortcuts disabled either due to: a) --disable-keyboard-shortcuts being passed b) Config.Preview.setKeyboardShortcutsEnabled(false) being set or c) a Remotion version mismatch.');
|
|
9
|
+
}
|
|
10
|
+
const areKeyboardShortcutsDisabled = () => {
|
|
11
|
+
return !process.env.KEYBOARD_SHORTCUTS_ENABLED;
|
|
12
|
+
};
|
|
13
|
+
exports.areKeyboardShortcutsDisabled = areKeyboardShortcutsDisabled;
|
|
7
14
|
const useKeybinding = () => {
|
|
8
15
|
const [paneId] = (0, react_1.useState)(() => String(Math.random()));
|
|
9
16
|
const context = (0, react_1.useContext)(keybindings_1.KeybindingContext);
|
|
10
17
|
const { isHighestContext } = (0, z_index_1.useZIndex)();
|
|
11
18
|
const registerKeybinding = (0, react_1.useCallback)((options) => {
|
|
19
|
+
if (!process.env.KEYBOARD_SHORTCUTS_ENABLED) {
|
|
20
|
+
return {
|
|
21
|
+
unregister: () => undefined,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
12
24
|
if (!isHighestContext) {
|
|
13
25
|
return {
|
|
14
26
|
unregister: () => undefined,
|
package/dist/get-cli-options.js
CHANGED
|
@@ -181,6 +181,7 @@ const getCliOptions = async (options) => {
|
|
|
181
181
|
port: port !== null && port !== void 0 ? port : null,
|
|
182
182
|
muted: config_1.ConfigInternals.getMuted(),
|
|
183
183
|
enforceAudioTrack: config_1.ConfigInternals.getEnforceAudioTrack(),
|
|
184
|
+
keyboardShortcutsEnables: config_1.ConfigInternals.getKeyboardShortcutsEnabled(),
|
|
184
185
|
};
|
|
185
186
|
};
|
|
186
187
|
exports.getCliOptions = getCliOptions;
|
package/dist/index.d.ts
CHANGED
|
@@ -97,6 +97,7 @@ export declare const CliInternals: {
|
|
|
97
97
|
port: number | null;
|
|
98
98
|
muted: boolean;
|
|
99
99
|
enforceAudioTrack: boolean;
|
|
100
|
+
keyboardShortcutsEnables: boolean;
|
|
100
101
|
}>;
|
|
101
102
|
parseCommandLine: (type: "sequence" | "still" | "lambda" | "preview" | "versions") => void;
|
|
102
103
|
loadConfig: (remotionRoot: string) => Promise<string | null>;
|
|
@@ -28,6 +28,7 @@ exports.BooleanFlags = [
|
|
|
28
28
|
'disable-web-security',
|
|
29
29
|
'ignore-certificate-errors',
|
|
30
30
|
'disable-headless',
|
|
31
|
+
'disable-keyboard-shortcuts',
|
|
31
32
|
];
|
|
32
33
|
exports.parsedCli = (0, minimist_1.default)(process.argv.slice(2), {
|
|
33
34
|
boolean: exports.BooleanFlags,
|
|
@@ -131,6 +132,9 @@ const parseCommandLine = (type) => {
|
|
|
131
132
|
if (typeof exports.parsedCli.muted !== 'undefined') {
|
|
132
133
|
config_1.Config.Rendering.setMuted(exports.parsedCli.muted);
|
|
133
134
|
}
|
|
135
|
+
if (typeof exports.parsedCli['disable-keyboard-shortcuts'] !== 'undefined') {
|
|
136
|
+
config_1.Config.Preview.setKeyboardShortcutsEnabled(!exports.parsedCli['disable-keyboard-shortcuts']);
|
|
137
|
+
}
|
|
134
138
|
if (typeof exports.parsedCli['enforce-audio-track'] !== 'undefined') {
|
|
135
139
|
config_1.Config.Rendering.setEnforceAudioTrack(exports.parsedCli['enforce-audio-track']);
|
|
136
140
|
}
|
|
@@ -7,6 +7,7 @@ export declare const startServer: (entry: string, userDefinedComponent: string,
|
|
|
7
7
|
port: number | null;
|
|
8
8
|
maxTimelineTracks?: number;
|
|
9
9
|
remotionRoot: string;
|
|
10
|
+
keyboardShortcutsEnabled: boolean;
|
|
10
11
|
}) => Promise<{
|
|
11
12
|
port: number;
|
|
12
13
|
liveEventsServer: LiveEventsServer;
|
|
@@ -32,6 +32,7 @@ const startServer = async (entry, userDefinedComponent, options) => {
|
|
|
32
32
|
require.resolve('./error-overlay/entry-basic.js'),
|
|
33
33
|
],
|
|
34
34
|
remotionRoot: options.remotionRoot,
|
|
35
|
+
keyboardShortcutsEnabled: options.keyboardShortcutsEnabled,
|
|
35
36
|
});
|
|
36
37
|
const compiler = (0, bundler_1.webpack)(config);
|
|
37
38
|
const hashPrefix = '/static-';
|
package/dist/preview.js
CHANGED
|
@@ -57,6 +57,7 @@ const previewCommand = async (remotionRoot) => {
|
|
|
57
57
|
port: desiredPort,
|
|
58
58
|
maxTimelineTracks: config_1.ConfigInternals.getMaxTimelineTracks(),
|
|
59
59
|
remotionRoot,
|
|
60
|
+
keyboardShortcutsEnabled: config_1.ConfigInternals.getKeyboardShortcutsEnabled(),
|
|
60
61
|
});
|
|
61
62
|
setLiveEventsListener(liveEventsServer);
|
|
62
63
|
log_1.Log.info(`Server running on http://localhost:${port}`);
|
package/dist/upgrade.js
CHANGED
package/dist/versions.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.11",
|
|
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.11",
|
|
27
|
+
"@remotion/media-utils": "3.2.11",
|
|
28
|
+
"@remotion/player": "3.2.11",
|
|
29
|
+
"@remotion/renderer": "3.2.11",
|
|
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.11",
|
|
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": "43d44e718e41200aea544719e9963482f9a65120"
|
|
75
75
|
}
|
package/dist/bundle.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const bundleCommand: (remotionRoot: string) => Promise<void>;
|
package/dist/bundle.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
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/render');
|
|
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;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.setBundleOutDir = exports.getBundleOutDir = void 0;
|
|
4
|
-
let bundleOutDir = null;
|
|
5
|
-
const getBundleOutDir = () => {
|
|
6
|
-
return bundleOutDir;
|
|
7
|
-
};
|
|
8
|
-
exports.getBundleOutDir = getBundleOutDir;
|
|
9
|
-
const setBundleOutDir = (path) => {
|
|
10
|
-
bundleOutDir = path;
|
|
11
|
-
};
|
|
12
|
-
exports.setBundleOutDir = setBundleOutDir;
|
|
@@ -1,12 +0,0 @@
|
|
|
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;
|
|
@@ -1,12 +0,0 @@
|
|
|
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
|
-
}>;
|
|
@@ -1,37 +0,0 @@
|
|
|
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;
|