@remotion/cli 3.2.9 → 3.2.12-crf.5

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.
@@ -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;
@@ -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,2 @@
1
+ export declare const setKeyboardShortcutsEnabled: (enabled: boolean) => void;
2
+ export declare const getKeyboardShortcutsEnabled: () => boolean;
@@ -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 = 'Show transparency as checkerboard (T)';
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: 'Shortcuts',
372
+ label: (0, use_keybinding_1.areKeyboardShortcutsDisabled)()
373
+ ? 'Shortcuts (disabled)'
374
+ : 'Shortcuts',
372
375
  onClick: () => {
373
376
  close();
374
377
  setSelectedModal({
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  export declare const serverDisconnectedRef: React.RefObject<{
3
3
  setServerDisconnected: () => void;
4
+ setServerConnected: () => void;
4
5
  }>;
5
6
  export declare const ServerDisconnected: React.FC;
@@ -43,6 +43,9 @@ const ServerDisconnected = () => {
43
43
  setServerDisconnected: () => {
44
44
  setServerDisconnected(true);
45
45
  },
46
+ setServerConnected: () => {
47
+ setServerDisconnected(false);
48
+ },
46
49
  };
47
50
  }, []);
48
51
  if (!serverDisconnected) {
@@ -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 (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 }) })] }));
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,4 +1,5 @@
1
1
  import type { KeyEventType } from '../state/keybindings';
2
+ export declare const areKeyboardShortcutsDisabled: () => boolean;
2
3
  export declare const useKeybinding: () => {
3
4
  registerKeybinding: (options: {
4
5
  event: KeyEventType;
@@ -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,
@@ -11,10 +11,18 @@ const openEventSource = () => {
11
11
  window.location.reload();
12
12
  }
13
13
  });
14
+ source.addEventListener('open', () => {
15
+ var _a;
16
+ (_a = ServerDisconnected_1.serverDisconnectedRef.current) === null || _a === void 0 ? void 0 : _a.setServerConnected();
17
+ });
14
18
  source.addEventListener('error', () => {
15
19
  var _a;
16
20
  // Display an error message that the preview server has disconnected.
17
21
  (_a = ServerDisconnected_1.serverDisconnectedRef.current) === null || _a === void 0 ? void 0 : _a.setServerDisconnected();
22
+ // Retry later
23
+ setTimeout(() => {
24
+ (0, exports.openEventSource)();
25
+ }, 1000);
18
26
  });
19
27
  };
20
28
  exports.openEventSource = openEventSource;
@@ -30,4 +30,5 @@ export declare const getCliOptions: (options: {
30
30
  port: number | null;
31
31
  muted: boolean;
32
32
  enforceAudioTrack: boolean;
33
+ keyboardShortcutsEnables: boolean;
33
34
  }>;
@@ -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>;
@@ -33,6 +33,7 @@ export declare type CommandLineOptions = {
33
33
  port: number;
34
34
  frame: string | number;
35
35
  ['disable-headless']: boolean;
36
+ ['disable-keyboard-shortcuts']: boolean;
36
37
  muted: boolean;
37
38
  ['enforce-audio-track']: boolean;
38
39
  gl: OpenGlRenderer;
@@ -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,8 +57,10 @@ 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);
63
+ log_1.Log.info(`Server running on http://localhost:${port}`);
62
64
  (0, better_opn_1.default)(`http://localhost:${port}`);
63
65
  await new Promise(noop);
64
66
  };
package/dist/upgrade.js CHANGED
@@ -13,9 +13,9 @@ const get_package_manager_1 = require("./preview-server/get-package-manager");
13
13
  const getUpgradeCommand = ({ manager, packages, version, }) => {
14
14
  const pkgList = packages.map((p) => `${p}@${version}`);
15
15
  const commands = {
16
- npm: ['i', ...pkgList],
17
- pnpm: ['i', ...pkgList],
18
- yarn: ['add', ...pkgList],
16
+ npm: ['i', '--save-exact', ...pkgList],
17
+ pnpm: ['i', '--save-exact', ...pkgList],
18
+ yarn: ['add', '--exact', ...pkgList],
19
19
  };
20
20
  return commands[manager];
21
21
  };
@@ -39,6 +39,7 @@ const upgrade = async (remotionRoot) => {
39
39
  '@remotion/skia',
40
40
  '@remotion/lottie',
41
41
  '@remotion/media-utils',
42
+ '@remotion/paths',
42
43
  '@remotion/babel-loader',
43
44
  '@remotion/lambda',
44
45
  '@remotion/player',
package/dist/versions.js CHANGED
@@ -18,6 +18,7 @@ const packages = [
18
18
  '@remotion/skia',
19
19
  '@remotion/lottie',
20
20
  '@remotion/media-utils',
21
+ '@remotion/paths',
21
22
  '@remotion/babel-loader',
22
23
  '@remotion/lambda',
23
24
  '@remotion/preload',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/cli",
3
- "version": "3.2.9",
3
+ "version": "3.2.12-crf.5+14dc380ad",
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.9",
27
- "@remotion/media-utils": "3.2.9",
28
- "@remotion/player": "3.2.9",
29
- "@remotion/renderer": "3.2.9",
26
+ "@remotion/bundler": "3.2.12-crf.5+14dc380ad",
27
+ "@remotion/media-utils": "3.2.12-crf.5+14dc380ad",
28
+ "@remotion/player": "3.2.12-crf.5+14dc380ad",
29
+ "@remotion/renderer": "3.2.12-crf.5+14dc380ad",
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.9",
34
+ "remotion": "3.2.12-crf.5+14dc380ad",
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": "66eceb7252865747a2808fc51cdbd2b57bb38486"
74
+ "gitHead": "14dc380ad148868c35c5612f48eaf8e78ab42d9c"
75
75
  }