@remotion/cli 4.0.16 → 4.0.17
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/editor/components/CurrentCompositionSideEffects.js +9 -5
- package/dist/editor/components/FullscreenToggle.js +23 -1
- package/dist/editor/components/KeyboardShortcutsExplainer.js +1 -1
- package/dist/editor/components/RenderModal/RenderModalJSONPropsEditor.js +4 -0
- package/dist/editor/components/RenderModal/SchemaEditor/SchemaEditor.js +4 -0
- package/dist/editor/helpers/document-title.d.ts +4 -0
- package/dist/editor/helpers/document-title.js +60 -0
- package/dist/editor/helpers/render-modal-sections.d.ts +1 -0
- package/dist/get-input-props.js +2 -1
- package/dist/preview-server/routes.d.ts +1 -0
- package/package.json +8 -8
- package/dist/cloudrun-command.d.ts +0 -1
- package/dist/cloudrun-command.js +0 -27
|
@@ -4,17 +4,21 @@ exports.CurrentCompositionKeybindings = exports.TitleUpdater = void 0;
|
|
|
4
4
|
const react_1 = require("react");
|
|
5
5
|
const remotion_1 = require("remotion");
|
|
6
6
|
const client_id_1 = require("../helpers/client-id");
|
|
7
|
+
const document_title_1 = require("../helpers/document-title");
|
|
7
8
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
8
9
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
10
|
+
const context_1 = require("./RenderQueue/context");
|
|
9
11
|
const TitleUpdater = () => {
|
|
10
12
|
const video = remotion_1.Internals.useVideo();
|
|
13
|
+
const renderQueue = (0, react_1.useContext)(context_1.RenderQueueContext);
|
|
14
|
+
const { jobs } = renderQueue;
|
|
11
15
|
(0, react_1.useEffect)(() => {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return;
|
|
15
|
-
}
|
|
16
|
-
document.title = `${video.id} / ${window.remotion_projectName} - Remotion Studio`;
|
|
16
|
+
var _a;
|
|
17
|
+
(0, document_title_1.setCurrentVideoId)((_a = video === null || video === void 0 ? void 0 : video.id) !== null && _a !== void 0 ? _a : null);
|
|
17
18
|
}, [video]);
|
|
19
|
+
(0, react_1.useEffect)(() => {
|
|
20
|
+
(0, document_title_1.setRenderJobs)(jobs);
|
|
21
|
+
}, [jobs]);
|
|
18
22
|
return null;
|
|
19
23
|
};
|
|
20
24
|
exports.TitleUpdater = TitleUpdater;
|
|
@@ -3,10 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.FullScreenToggle = 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 canvas_ref_1 = require("../state/canvas-ref");
|
|
7
9
|
const preview_size_1 = require("../state/preview-size");
|
|
8
10
|
const ControlButton_1 = require("./ControlButton");
|
|
11
|
+
const accessibilityLabel = [
|
|
12
|
+
'Enter fullscreen preview',
|
|
13
|
+
(0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? null : '(F)',
|
|
14
|
+
]
|
|
15
|
+
.filter(truthy_1.truthy)
|
|
16
|
+
.join(' ');
|
|
9
17
|
const FullScreenToggle = () => {
|
|
18
|
+
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
10
19
|
const { setSize } = (0, react_1.useContext)(preview_size_1.PreviewSizeContext);
|
|
11
20
|
const onClick = (0, react_1.useCallback)(() => {
|
|
12
21
|
var _a;
|
|
@@ -20,6 +29,19 @@ const FullScreenToggle = () => {
|
|
|
20
29
|
},
|
|
21
30
|
}));
|
|
22
31
|
}, [setSize]);
|
|
23
|
-
|
|
32
|
+
(0, react_1.useEffect)(() => {
|
|
33
|
+
const f = keybindings.registerKeybinding({
|
|
34
|
+
event: 'keydown',
|
|
35
|
+
key: 'f',
|
|
36
|
+
callback: onClick,
|
|
37
|
+
commandCtrlKey: false,
|
|
38
|
+
preventDefault: true,
|
|
39
|
+
triggerIfInputFieldFocused: false,
|
|
40
|
+
});
|
|
41
|
+
return () => {
|
|
42
|
+
f.unregister();
|
|
43
|
+
};
|
|
44
|
+
}, [keybindings, onClick]);
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: (0, jsx_runtime_1.jsx)("svg", { style: { width: 18, height: 18 }, viewBox: "0 0 448 512", fill: "#fff", children: (0, jsx_runtime_1.jsx)("path", { d: "M0 180V56c0-13.3 10.7-24 24-24h124c6.6 0 12 5.4 12 12v40c0 6.6-5.4 12-12 12H64v84c0 6.6-5.4 12-12 12H12c-6.6 0-12-5.4-12-12zM288 44v40c0 6.6 5.4 12 12 12h84v84c0 6.6 5.4 12 12 12h40c6.6 0 12-5.4 12-12V56c0-13.3-10.7-24-24-24H300c-6.6 0-12 5.4-12 12zm148 276h-40c-6.6 0-12 5.4-12 12v84h-84c-6.6 0-12 5.4-12 12v40c0 6.6 5.4 12 12 12h124c13.3 0 24-10.7 24-24V332c0-6.6-5.4-12-12-12zM160 468v-40c0-6.6-5.4-12-12-12H64v-84c0-6.6-5.4-12-12-12H12c-6.6 0-12 5.4-12 12v124c0 13.3 10.7 24 24 24h124c6.6 0 12-5.4 12-12z" }) }) }));
|
|
24
46
|
};
|
|
25
47
|
exports.FullScreenToggle = FullScreenToggle;
|
|
@@ -52,6 +52,6 @@ const li = {
|
|
|
52
52
|
fontSize: 14,
|
|
53
53
|
};
|
|
54
54
|
const KeyboardShortcutsExplainer = () => {
|
|
55
|
-
return ((0, jsx_runtime_1.jsxs)("div", { children: [(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.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.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.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)("br", {}), (0, jsx_runtime_1.jsx)("div", { style: title, children: "Sidebar" }), (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: ShortcutHint_1.cmdOrCtrlCharacter }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "B" })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Toggle left sidebar" })] }), (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: ShortcutHint_1.cmdOrCtrlCharacter }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "J" })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Toggle right sidebar" })] }), (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: ShortcutHint_1.cmdOrCtrlCharacter }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "G" })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Toggle both sidebars" })] }), (0, jsx_runtime_1.jsx)("br", {})] }), (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: left, 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: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "R" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Render composition" })] }), (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: "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: left, 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.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: ShortcutHint_1.cmdOrCtrlCharacter }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "K" })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Quick Switcher" })] }), (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: left, 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: left, 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: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "X" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Clear In/Out Points" })] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("div", { style: title, children: "Zoom" }), (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)("div", { style: right, children: "Zoom in" })] }), (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)("div", { style: right, children: "Zoom out" })] }), (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" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Reset zoom" })] }), ' ', (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("div", { style: title, children: "Props Editor" }), (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: ShortcutHint_1.cmdOrCtrlCharacter }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "S" })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Save" })] })] })] })] }));
|
|
55
|
+
return ((0, jsx_runtime_1.jsxs)("div", { children: [(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.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.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.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)("br", {}), (0, jsx_runtime_1.jsx)("div", { style: title, children: "Sidebar" }), (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: ShortcutHint_1.cmdOrCtrlCharacter }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "B" })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Toggle left sidebar" })] }), (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: ShortcutHint_1.cmdOrCtrlCharacter }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "J" })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Toggle right sidebar" })] }), (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: ShortcutHint_1.cmdOrCtrlCharacter }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "G" })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Toggle both sidebars" })] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("div", { style: title, children: "View" }), (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: "F" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Enter fullscreen" })] }), (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: "esc" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Exit fullscreen" })] })] }), (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: left, 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: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "R" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Render composition" })] }), (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: "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: left, 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.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: ShortcutHint_1.cmdOrCtrlCharacter }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "K" })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Quick Switcher" })] }), (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: left, 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: left, 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: left, children: (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "X" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Clear In/Out Points" })] }), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("div", { style: title, children: "Zoom" }), (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)("div", { style: right, children: "Zoom in" })] }), (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)("div", { style: right, children: "Zoom out" })] }), (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" }) }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Reset zoom" })] }), ' ', (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("div", { style: title, children: "Props Editor" }), (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: ShortcutHint_1.cmdOrCtrlCharacter }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 0.3 }), (0, jsx_runtime_1.jsx)("kbd", { style: key, children: "S" })] }), (0, jsx_runtime_1.jsx)("div", { style: right, children: "Save" })] })] })] })] }));
|
|
56
56
|
};
|
|
57
57
|
exports.KeyboardShortcutsExplainer = KeyboardShortcutsExplainer;
|
|
@@ -29,6 +29,7 @@ const react_1 = __importStar(require("react"));
|
|
|
29
29
|
const remotion_1 = require("remotion");
|
|
30
30
|
const Button_1 = require("../../../preview-server/error-overlay/remotion-overlay/Button");
|
|
31
31
|
const colors_1 = require("../../helpers/colors");
|
|
32
|
+
const document_title_1 = require("../../helpers/document-title");
|
|
32
33
|
const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
33
34
|
const layout_1 = require("../layout");
|
|
34
35
|
const RemTextarea_1 = require("../NewComposition/RemTextarea");
|
|
@@ -95,6 +96,9 @@ const RenderModalJSONPropsEditor = ({ setValue, value, defaultProps, onSave, sho
|
|
|
95
96
|
const hasChanged = (0, react_1.useMemo)(() => {
|
|
96
97
|
return !(0, deep_equal_1.deepEqual)(value, defaultProps);
|
|
97
98
|
}, [defaultProps, value]);
|
|
99
|
+
(0, react_1.useEffect)(() => {
|
|
100
|
+
(0, document_title_1.setUnsavedProps)(hasChanged);
|
|
101
|
+
}, [hasChanged]);
|
|
98
102
|
const onQuickSave = (0, react_1.useCallback)(() => {
|
|
99
103
|
if (hasChanged) {
|
|
100
104
|
onSave();
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SchemaEditor = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const document_title_1 = require("../../../helpers/document-title");
|
|
6
7
|
const use_keybinding_1 = require("../../../helpers/use-keybinding");
|
|
7
8
|
const get_zod_if_possible_1 = require("../../get-zod-if-possible");
|
|
8
9
|
const is_menu_item_1 = require("../../Menu/is-menu-item");
|
|
@@ -23,6 +24,9 @@ const SchemaEditor = ({ schema, value, setValue, zodValidationResult, defaultPro
|
|
|
23
24
|
const hasChanged = (0, react_1.useMemo)(() => {
|
|
24
25
|
return !(0, deep_equal_1.deepEqual)(defaultProps, value);
|
|
25
26
|
}, [defaultProps, value]);
|
|
27
|
+
(0, react_1.useEffect)(() => {
|
|
28
|
+
(0, document_title_1.setUnsavedProps)(hasChanged);
|
|
29
|
+
}, [hasChanged]);
|
|
26
30
|
const onQuickSave = (0, react_1.useCallback)(() => {
|
|
27
31
|
if (hasChanged && showSaveButton) {
|
|
28
32
|
onSave(() => {
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { RenderJob } from '../../preview-server/render-queue/job';
|
|
2
|
+
export declare const setCurrentVideoId: (id: string | null) => void;
|
|
3
|
+
export declare const setUnsavedProps: (unsaved: boolean) => void;
|
|
4
|
+
export declare const setRenderJobs: (jobs: RenderJob[]) => void;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.setRenderJobs = exports.setUnsavedProps = exports.setCurrentVideoId = void 0;
|
|
4
|
+
const truthy_1 = require("../../truthy");
|
|
5
|
+
let currentVideoId = null;
|
|
6
|
+
let unsavedProps = false;
|
|
7
|
+
let tabInactive = false;
|
|
8
|
+
let renderJobs = [];
|
|
9
|
+
const setCurrentVideoId = (id) => {
|
|
10
|
+
currentVideoId = id;
|
|
11
|
+
updateTitle();
|
|
12
|
+
};
|
|
13
|
+
exports.setCurrentVideoId = setCurrentVideoId;
|
|
14
|
+
const setUnsavedProps = (unsaved) => {
|
|
15
|
+
unsavedProps = unsaved;
|
|
16
|
+
};
|
|
17
|
+
exports.setUnsavedProps = setUnsavedProps;
|
|
18
|
+
const setRenderJobs = (jobs) => {
|
|
19
|
+
renderJobs = jobs;
|
|
20
|
+
updateTitle();
|
|
21
|
+
};
|
|
22
|
+
exports.setRenderJobs = setRenderJobs;
|
|
23
|
+
document.addEventListener('visibilitychange', () => {
|
|
24
|
+
tabInactive = document.visibilityState === 'hidden';
|
|
25
|
+
updateTitle();
|
|
26
|
+
});
|
|
27
|
+
const productName = 'Remotion Studio';
|
|
28
|
+
const suffix = `- ${productName}`;
|
|
29
|
+
const updateTitle = () => {
|
|
30
|
+
if (!currentVideoId) {
|
|
31
|
+
document.title = productName;
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
const currentCompTitle = `${currentVideoId} / ${window.remotion_projectName}`;
|
|
35
|
+
document.title = [
|
|
36
|
+
getProgressInBrackets(currentVideoId, renderJobs),
|
|
37
|
+
unsavedProps && tabInactive ? '✏️' : null,
|
|
38
|
+
`${currentCompTitle} ${suffix}`,
|
|
39
|
+
]
|
|
40
|
+
.filter(truthy_1.truthy)
|
|
41
|
+
.join(' ');
|
|
42
|
+
};
|
|
43
|
+
const getProgressInBrackets = (selectedCompositionId, jobs) => {
|
|
44
|
+
const currentRender = jobs.find((job) => job.status === 'running');
|
|
45
|
+
if (!currentRender) {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
if (currentRender.status !== 'running') {
|
|
49
|
+
throw new Error('expected running job');
|
|
50
|
+
}
|
|
51
|
+
const progInPercent = Math.ceil(currentRender.progress.value * 100);
|
|
52
|
+
const progressInBrackets = currentRender.compositionId === selectedCompositionId
|
|
53
|
+
? `[${progInPercent}%]`
|
|
54
|
+
: `[${progInPercent}% ${currentRender.compositionId}]`;
|
|
55
|
+
return progressInBrackets;
|
|
56
|
+
};
|
|
57
|
+
document.addEventListener('visibilitychange', () => {
|
|
58
|
+
tabInactive = document.visibilityState === 'hidden';
|
|
59
|
+
updateTitle();
|
|
60
|
+
});
|
package/dist/get-input-props.js
CHANGED
|
@@ -33,7 +33,8 @@ const getInputProps = (onUpdate) => {
|
|
|
33
33
|
return JSON.parse(parse_command_line_1.parsedCli.props);
|
|
34
34
|
}
|
|
35
35
|
catch (err) {
|
|
36
|
-
log_1.Log.error('You passed --props but it was neither valid JSON nor a file path to a valid JSON file.'
|
|
36
|
+
log_1.Log.error('You passed --props but it was neither valid JSON nor a file path to a valid JSON file. Provided value: ' +
|
|
37
|
+
parse_command_line_1.parsedCli.props);
|
|
37
38
|
log_1.Log.info('Got the following value:', parse_command_line_1.parsedCli.props);
|
|
38
39
|
log_1.Log.error('Check that your input is parseable using `JSON.parse` and try again.');
|
|
39
40
|
if (node_os_1.default.platform() === 'win32') {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
1
2
|
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
3
|
import type { LiveEventsServer } from './live-events';
|
|
3
4
|
export declare const handleRoutes: ({ hash, hashPrefix, request, response, liveEventsServer, getCurrentInputProps, getEnvVariables, remotionRoot, entryPoint, publicDir, }: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.17",
|
|
4
4
|
"description": "CLI for Remotion",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"prompts": "2.4.1",
|
|
36
36
|
"semver": "7.5.3",
|
|
37
37
|
"source-map": "0.6.1",
|
|
38
|
-
"remotion": "4.0.
|
|
39
|
-
"
|
|
40
|
-
"@remotion/
|
|
41
|
-
"@remotion/
|
|
42
|
-
"@remotion/
|
|
38
|
+
"@remotion/bundler": "4.0.17",
|
|
39
|
+
"remotion": "4.0.17",
|
|
40
|
+
"@remotion/renderer": "4.0.17",
|
|
41
|
+
"@remotion/media-utils": "4.0.17",
|
|
42
|
+
"@remotion/player": "4.0.17"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"react": ">=16.8.0",
|
|
@@ -65,8 +65,8 @@
|
|
|
65
65
|
"typescript": "4.9.5",
|
|
66
66
|
"vitest": "0.31.1",
|
|
67
67
|
"zod": "^3.21.4",
|
|
68
|
-
"@remotion/
|
|
69
|
-
"@remotion/
|
|
68
|
+
"@remotion/zod-types": "4.0.17",
|
|
69
|
+
"@remotion/tailwind": "4.0.17"
|
|
70
70
|
},
|
|
71
71
|
"keywords": [
|
|
72
72
|
"remotion",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const cloudrunCommand: (remotionRoot: string, args: string[]) => Promise<never>;
|
package/dist/cloudrun-command.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cloudrunCommand = void 0;
|
|
4
|
-
const log_1 = require("./log");
|
|
5
|
-
const get_package_manager_1 = require("./preview-server/get-package-manager");
|
|
6
|
-
const update_available_1 = require("./preview-server/update-available");
|
|
7
|
-
const cloudrunCommand = async (remotionRoot, args) => {
|
|
8
|
-
try {
|
|
9
|
-
const path = require.resolve('@remotion/cloudrun', {
|
|
10
|
-
paths: [remotionRoot],
|
|
11
|
-
});
|
|
12
|
-
const { CloudrunInternals } = require(path);
|
|
13
|
-
await CloudrunInternals.executeCommand(args, remotionRoot);
|
|
14
|
-
process.exit(0);
|
|
15
|
-
}
|
|
16
|
-
catch (err) {
|
|
17
|
-
const manager = (0, get_package_manager_1.getPackageManager)(remotionRoot, undefined);
|
|
18
|
-
const installCommand = manager === 'unknown' ? 'npm i' : manager.installCommand;
|
|
19
|
-
log_1.Log.error(err);
|
|
20
|
-
log_1.Log.error('Remotion CloudRun is not installed.');
|
|
21
|
-
log_1.Log.info('');
|
|
22
|
-
log_1.Log.info('You can install it using:');
|
|
23
|
-
log_1.Log.info(`${installCommand} @remotion/cloudrun@${(0, update_available_1.getRemotionVersion)()}`);
|
|
24
|
-
process.exit(1);
|
|
25
|
-
}
|
|
26
|
-
};
|
|
27
|
-
exports.cloudrunCommand = cloudrunCommand;
|