@remotion/cli 3.0.29 → 3.0.30
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/CopyButton.js +1 -1
- package/dist/editor/components/Editor.js +2 -1
- package/dist/editor/components/KeyboardShortcutsModal.js +1 -1
- package/dist/editor/components/Menu/MenuItem.d.ts +1 -1
- package/dist/editor/components/MenuToolbar.js +24 -2
- package/dist/editor/components/Notifications/ColorDot.d.ts +4 -0
- package/dist/editor/components/Notifications/ColorDot.js +22 -0
- package/dist/editor/components/Notifications/Notification.d.ts +8 -0
- package/dist/editor/components/Notifications/Notification.js +31 -0
- package/dist/editor/components/Notifications/NotificationCenter.d.ts +13 -0
- package/dist/editor/components/Notifications/NotificationCenter.js +39 -0
- package/dist/editor/components/PlayPause.js +18 -2
- package/dist/editor/components/UpdateModal/UpdateModal.js +1 -1
- package/dist/editor/helpers/copy-text.d.ts +1 -1
- package/dist/editor/helpers/copy-text.js +5 -4
- package/dist/editor/helpers/pick-color.d.ts +1 -0
- package/dist/editor/helpers/pick-color.js +36 -0
- package/dist/get-cli-options.js +3 -1
- package/package.json +7 -7
|
@@ -32,7 +32,7 @@ const labelStyle = {
|
|
|
32
32
|
const CopyButton = ({ textToCopy, label, labelWhenCopied }) => {
|
|
33
33
|
const [copied, setCopied] = (0, react_1.useState)(false);
|
|
34
34
|
const onClick = (0, react_1.useCallback)(() => {
|
|
35
|
-
(0, copy_text_1.
|
|
35
|
+
(0, copy_text_1.copyText)(textToCopy);
|
|
36
36
|
setCopied(Date.now());
|
|
37
37
|
}, [textToCopy]);
|
|
38
38
|
(0, react_1.useEffect)(() => {
|
|
@@ -26,6 +26,7 @@ const GlobalKeybindings_1 = require("./GlobalKeybindings");
|
|
|
26
26
|
const KeyboardShortcutsModal_1 = require("./KeyboardShortcutsModal");
|
|
27
27
|
const NewComposition_1 = __importDefault(require("./NewComposition/NewComposition"));
|
|
28
28
|
const NoRegisterRoot_1 = require("./NoRegisterRoot");
|
|
29
|
+
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
29
30
|
const UpdateModal_1 = require("./UpdateModal/UpdateModal");
|
|
30
31
|
const background = {
|
|
31
32
|
backgroundColor: colors_1.BACKGROUND,
|
|
@@ -129,7 +130,7 @@ const Editor = () => {
|
|
|
129
130
|
});
|
|
130
131
|
return () => cleanup();
|
|
131
132
|
}, [Root, waitForRoot]);
|
|
132
|
-
return ((0, jsx_runtime_1.jsx)(keybindings_1.KeybindingContextProvider, { children: (0, jsx_runtime_1.jsx)(rich_timeline_1.RichTimelineContext.Provider, { value: richTimelineCtx, children: (0, jsx_runtime_1.jsx)(checkerboard_1.CheckerboardContext.Provider, { value: checkerboardCtx, children: (0, jsx_runtime_1.jsx)(preview_size_1.PreviewSizeContext.Provider, { value: previewSizeCtx, children: (0, jsx_runtime_1.jsx)(modals_1.ModalsContext.Provider, { value: modalsContext, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.Timeline.TimelineInOutContext.Provider, { value: timelineInOutContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.Timeline.SetTimelineInOutContext.Provider, { value: setTimelineInOutContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.MediaVolumeContext.Provider, { value: mediaVolumeContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.SetMediaVolumeContext.Provider, { value: setMediaVolumeContextValue, children: (0, jsx_runtime_1.jsx)(player_1.PlayerInternals.PlayerEventEmitterContext.Provider, { value: emitter, children: (0, jsx_runtime_1.jsx)(sidebar_1.SidebarContextProvider, { children: (0, jsx_runtime_1.jsx)(folders_1.FolderContextProvider, { children: (0, jsx_runtime_1.jsx)(highest_z_index_1.HighestZIndexProvider, { children: (0, jsx_runtime_1.jsxs)(z_index_1.HigherZIndex, { onEscape: noop_1.noop, onOutsideClick: noop_1.noop, children: [(0, jsx_runtime_1.jsxs)("div", { style: background, children: [Root === null ? null : (0, jsx_runtime_1.jsx)(Root, {}), (0, jsx_runtime_1.jsx)(FramePersistor_1.FramePersistor, {}), Root === null ? ((0, jsx_runtime_1.jsx)(NoRegisterRoot_1.NoRegisterRoot, {})) : ((0, jsx_runtime_1.jsx)(EditorContent_1.EditorContent, {})), (0, jsx_runtime_1.jsx)(GlobalKeybindings_1.GlobalKeybindings, {})] }), modalContextType &&
|
|
133
|
+
return ((0, jsx_runtime_1.jsx)(keybindings_1.KeybindingContextProvider, { children: (0, jsx_runtime_1.jsx)(rich_timeline_1.RichTimelineContext.Provider, { value: richTimelineCtx, children: (0, jsx_runtime_1.jsx)(checkerboard_1.CheckerboardContext.Provider, { value: checkerboardCtx, children: (0, jsx_runtime_1.jsx)(preview_size_1.PreviewSizeContext.Provider, { value: previewSizeCtx, children: (0, jsx_runtime_1.jsx)(modals_1.ModalsContext.Provider, { value: modalsContext, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.Timeline.TimelineInOutContext.Provider, { value: timelineInOutContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.Timeline.SetTimelineInOutContext.Provider, { value: setTimelineInOutContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.MediaVolumeContext.Provider, { value: mediaVolumeContextValue, children: (0, jsx_runtime_1.jsx)(remotion_1.Internals.SetMediaVolumeContext.Provider, { value: setMediaVolumeContextValue, children: (0, jsx_runtime_1.jsx)(player_1.PlayerInternals.PlayerEventEmitterContext.Provider, { value: emitter, children: (0, jsx_runtime_1.jsx)(sidebar_1.SidebarContextProvider, { children: (0, jsx_runtime_1.jsx)(folders_1.FolderContextProvider, { children: (0, jsx_runtime_1.jsx)(highest_z_index_1.HighestZIndexProvider, { children: (0, jsx_runtime_1.jsxs)(z_index_1.HigherZIndex, { onEscape: noop_1.noop, onOutsideClick: noop_1.noop, children: [(0, jsx_runtime_1.jsxs)("div", { style: background, children: [Root === null ? null : (0, jsx_runtime_1.jsx)(Root, {}), (0, jsx_runtime_1.jsx)(FramePersistor_1.FramePersistor, {}), Root === null ? ((0, jsx_runtime_1.jsx)(NoRegisterRoot_1.NoRegisterRoot, {})) : ((0, jsx_runtime_1.jsx)(EditorContent_1.EditorContent, {})), (0, jsx_runtime_1.jsx)(GlobalKeybindings_1.GlobalKeybindings, {})] }), (0, jsx_runtime_1.jsx)(NotificationCenter_1.NotificationCenter, {}), modalContextType &&
|
|
133
134
|
modalContextType.type === 'new-comp' && ((0, jsx_runtime_1.jsx)(NewComposition_1.default, { initialCompType: modalContextType.compType })), modalContextType &&
|
|
134
135
|
modalContextType.type === 'update' && ((0, jsx_runtime_1.jsx)(UpdateModal_1.UpdateModal, { info: modalContextType.info })), modalContextType &&
|
|
135
136
|
modalContextType.type === 'shortcuts' && ((0, jsx_runtime_1.jsx)(KeyboardShortcutsModal_1.KeyboardShortcuts, {}))] }) }) }) }) }) }) }) }) }) }) }) }) }) }));
|
|
@@ -48,6 +48,6 @@ const KeyboardShortcuts = () => {
|
|
|
48
48
|
const onQuit = (0, react_1.useCallback)(() => {
|
|
49
49
|
setSelectedModal(null);
|
|
50
50
|
}, [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.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" })] })] })] })] }));
|
|
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" })] })] })] })] }));
|
|
52
52
|
};
|
|
53
53
|
exports.KeyboardShortcuts = KeyboardShortcuts;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ComboboxValue } from '../NewComposition/ComboBox';
|
|
3
|
-
export declare type MenuId = 'remotion' | 'file' | 'view' | 'help';
|
|
3
|
+
export declare type MenuId = 'remotion' | 'file' | 'view' | 'tools' | 'help';
|
|
4
4
|
export declare type Menu = {
|
|
5
5
|
id: MenuId;
|
|
6
6
|
label: React.ReactNode;
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MenuToolbar = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const remotion_1 = require("remotion");
|
|
7
|
+
const pick_color_1 = require("../helpers/pick-color");
|
|
6
8
|
const Checkmark_1 = require("../icons/Checkmark");
|
|
7
9
|
const checkerboard_1 = require("../state/checkerboard");
|
|
8
10
|
const modals_1 = require("../state/modals");
|
|
@@ -55,7 +57,7 @@ const MenuToolbar = () => {
|
|
|
55
57
|
setSelected(null);
|
|
56
58
|
}, []);
|
|
57
59
|
const structure = (0, react_1.useMemo)(() => {
|
|
58
|
-
|
|
60
|
+
const struct = [
|
|
59
61
|
{
|
|
60
62
|
id: 'remotion',
|
|
61
63
|
label: ((0, jsx_runtime_1.jsx)(layout_1.Row, { align: "center", justify: "center", children: (0, jsx_runtime_1.jsx)("svg", { width: ICON_SIZE, height: ICON_SIZE, viewBox: "-100 -100 400 400", style: rotate, children: (0, jsx_runtime_1.jsx)("path", { fill: "#fff", stroke: "#fff", strokeWidth: "100", strokeLinejoin: "round", d: "M 2 172 a 196 100 0 0 0 195 5 A 196 240 0 0 0 100 2.259 A 196 240 0 0 0 2 172 z" }) }) })),
|
|
@@ -337,6 +339,25 @@ const MenuToolbar = () => {
|
|
|
337
339
|
},
|
|
338
340
|
],
|
|
339
341
|
},
|
|
342
|
+
'EyeDropper' in window
|
|
343
|
+
? {
|
|
344
|
+
id: 'tools',
|
|
345
|
+
label: 'Tools',
|
|
346
|
+
leaveLeftPadding: false,
|
|
347
|
+
items: [
|
|
348
|
+
{
|
|
349
|
+
id: 'color-picker',
|
|
350
|
+
value: 'color-picker',
|
|
351
|
+
label: 'Color Picker',
|
|
352
|
+
onClick: () => (0, pick_color_1.pickColor)(),
|
|
353
|
+
leftItem: null,
|
|
354
|
+
keyHint: null,
|
|
355
|
+
subMenu: null,
|
|
356
|
+
type: 'item',
|
|
357
|
+
},
|
|
358
|
+
],
|
|
359
|
+
}
|
|
360
|
+
: null,
|
|
340
361
|
{
|
|
341
362
|
id: 'help',
|
|
342
363
|
label: 'Help',
|
|
@@ -441,7 +462,8 @@ const MenuToolbar = () => {
|
|
|
441
462
|
},
|
|
442
463
|
],
|
|
443
464
|
},
|
|
444
|
-
];
|
|
465
|
+
].filter(remotion_1.Internals.truthy);
|
|
466
|
+
return struct;
|
|
445
467
|
}, [
|
|
446
468
|
checkerboard,
|
|
447
469
|
close,
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ColorDot = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const container = {
|
|
7
|
+
height: 16,
|
|
8
|
+
width: 16,
|
|
9
|
+
backgroundColor: 'red',
|
|
10
|
+
border: '1px solid rgba(255, 255, 255, 0.2)',
|
|
11
|
+
borderRadius: 8,
|
|
12
|
+
};
|
|
13
|
+
const ColorDot = ({ color }) => {
|
|
14
|
+
const style = (0, react_1.useMemo)(() => {
|
|
15
|
+
return {
|
|
16
|
+
...container,
|
|
17
|
+
backgroundColor: color,
|
|
18
|
+
};
|
|
19
|
+
}, [color]);
|
|
20
|
+
return (0, jsx_runtime_1.jsx)("div", { style: style });
|
|
21
|
+
};
|
|
22
|
+
exports.ColorDot = ColorDot;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Notification = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const notification = {
|
|
7
|
+
backgroundColor: '#111111',
|
|
8
|
+
color: 'white',
|
|
9
|
+
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
10
|
+
display: 'inline-flex',
|
|
11
|
+
padding: '8px 14px',
|
|
12
|
+
borderRadius: 4,
|
|
13
|
+
fontSize: 15,
|
|
14
|
+
border: '0.25px solid rgba(255, 255, 255, 0.1)',
|
|
15
|
+
boxShadow: '0 2px 3px rgba(0, 0, 0, 1)',
|
|
16
|
+
marginTop: 3,
|
|
17
|
+
marginBottom: 3,
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
};
|
|
20
|
+
const Notification = ({ children, id, duration, created, onRemove }) => {
|
|
21
|
+
(0, react_1.useEffect)(() => {
|
|
22
|
+
const timeout = setTimeout(() => {
|
|
23
|
+
onRemove(id);
|
|
24
|
+
}, duration - (Date.now() - created));
|
|
25
|
+
return () => {
|
|
26
|
+
clearTimeout(timeout);
|
|
27
|
+
};
|
|
28
|
+
}, [created, duration, id, onRemove]);
|
|
29
|
+
return (0, jsx_runtime_1.jsx)("div", { style: notification, children: children });
|
|
30
|
+
};
|
|
31
|
+
exports.Notification = Notification;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type TNotification = {
|
|
3
|
+
id: string;
|
|
4
|
+
content: React.ReactNode;
|
|
5
|
+
created: number;
|
|
6
|
+
duration: number;
|
|
7
|
+
};
|
|
8
|
+
declare type TNotificationCenter = {
|
|
9
|
+
addNotification: (notification: TNotification) => void;
|
|
10
|
+
};
|
|
11
|
+
export declare const notificationCenter: React.RefObject<TNotificationCenter>;
|
|
12
|
+
export declare const NotificationCenter: React.FC;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NotificationCenter = exports.notificationCenter = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const Notification_1 = require("./Notification");
|
|
7
|
+
const container = {
|
|
8
|
+
position: 'absolute',
|
|
9
|
+
justifyContent: 'center',
|
|
10
|
+
alignItems: 'center',
|
|
11
|
+
display: 'flex',
|
|
12
|
+
width: '100%',
|
|
13
|
+
flexDirection: 'column',
|
|
14
|
+
paddingTop: 20,
|
|
15
|
+
pointerEvents: 'none',
|
|
16
|
+
};
|
|
17
|
+
exports.notificationCenter = (0, react_1.createRef)();
|
|
18
|
+
const NotificationCenter = () => {
|
|
19
|
+
const [notifications, setNotifications] = (0, react_1.useState)([]);
|
|
20
|
+
const onRemove = (0, react_1.useCallback)((id) => {
|
|
21
|
+
setNotifications((not) => {
|
|
22
|
+
return not.filter((n) => n.id !== id);
|
|
23
|
+
});
|
|
24
|
+
}, []);
|
|
25
|
+
const addNotification = (0, react_1.useCallback)((notification) => {
|
|
26
|
+
setNotifications((previousNotifications) => {
|
|
27
|
+
return [...previousNotifications, notification];
|
|
28
|
+
});
|
|
29
|
+
}, []);
|
|
30
|
+
(0, react_1.useImperativeHandle)(exports.notificationCenter, () => {
|
|
31
|
+
return {
|
|
32
|
+
addNotification,
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: container, children: notifications.map((n) => {
|
|
36
|
+
return ((0, jsx_runtime_1.jsx)(Notification_1.Notification, { created: n.created, duration: n.duration, id: n.id, onRemove: onRemove, children: n.content }, n.id));
|
|
37
|
+
}) }));
|
|
38
|
+
};
|
|
39
|
+
exports.NotificationCenter = NotificationCenter;
|
|
@@ -25,7 +25,7 @@ const PlayPause = ({ playbackRate, loop }) => {
|
|
|
25
25
|
loop,
|
|
26
26
|
playbackRate,
|
|
27
27
|
});
|
|
28
|
-
const { playing, play, pause, frameBack, seek, frameForward, isLastFrame } = player_1.PlayerInternals.usePlayer();
|
|
28
|
+
const { playing, play, pause, pauseAndReturnToPlayStart, frameBack, seek, frameForward, isLastFrame, } = player_1.PlayerInternals.usePlayer();
|
|
29
29
|
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
30
30
|
(0, react_1.useEffect)(() => {
|
|
31
31
|
if (isStill) {
|
|
@@ -41,6 +41,12 @@ const PlayPause = ({ playbackRate, loop }) => {
|
|
|
41
41
|
}
|
|
42
42
|
e.preventDefault();
|
|
43
43
|
}, [pause, play, playing]);
|
|
44
|
+
const onEnter = (0, react_1.useCallback)((e) => {
|
|
45
|
+
if (playing) {
|
|
46
|
+
pauseAndReturnToPlayStart();
|
|
47
|
+
}
|
|
48
|
+
e.preventDefault();
|
|
49
|
+
}, [pauseAndReturnToPlayStart, playing]);
|
|
44
50
|
const videoFps = (_a = video === null || video === void 0 ? void 0 : video.fps) !== null && _a !== void 0 ? _a : null;
|
|
45
51
|
const onArrowLeft = (0, react_1.useCallback)((e) => {
|
|
46
52
|
if (!videoFps) {
|
|
@@ -92,16 +98,26 @@ const PlayPause = ({ playbackRate, loop }) => {
|
|
|
92
98
|
const arrowLeft = keybindings.registerKeybinding('keydown', 'ArrowLeft', onArrowLeft);
|
|
93
99
|
const arrowRight = keybindings.registerKeybinding('keydown', 'ArrowRight', onArrowRight);
|
|
94
100
|
const space = keybindings.registerKeybinding('keydown', ' ', onSpace);
|
|
101
|
+
const enter = keybindings.registerKeybinding('keydown', 'enter', onEnter);
|
|
95
102
|
const a = keybindings.registerKeybinding('keydown', 'a', jumpToStart);
|
|
96
103
|
const e = keybindings.registerKeybinding('keydown', 'e', jumpToEnd);
|
|
97
104
|
return () => {
|
|
98
105
|
arrowLeft.unregister();
|
|
99
106
|
arrowRight.unregister();
|
|
100
107
|
space.unregister();
|
|
108
|
+
enter.unregister();
|
|
101
109
|
a.unregister();
|
|
102
110
|
e.unregister();
|
|
103
111
|
};
|
|
104
|
-
}, [
|
|
112
|
+
}, [
|
|
113
|
+
jumpToEnd,
|
|
114
|
+
jumpToStart,
|
|
115
|
+
keybindings,
|
|
116
|
+
onArrowLeft,
|
|
117
|
+
onArrowRight,
|
|
118
|
+
onEnter,
|
|
119
|
+
onSpace,
|
|
120
|
+
]);
|
|
105
121
|
if (isStill) {
|
|
106
122
|
return null;
|
|
107
123
|
}
|
|
@@ -38,6 +38,6 @@ const UpdateModal = ({ info }) => {
|
|
|
38
38
|
setSelectedModal(null);
|
|
39
39
|
}, [setSelectedModal]);
|
|
40
40
|
const command = commands[info.packageManager];
|
|
41
|
-
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "Update available" }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("p", { children: "A new update for Remotion is available! Run the following command:" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)(layout_1.Flex, { children: (0, jsx_runtime_1.jsx)("pre", { onClick: () => (0, copy_text_1.
|
|
41
|
+
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "Update available" }), (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("p", { children: "A new update for Remotion is available! Run the following command:" }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)(layout_1.Flex, { children: (0, jsx_runtime_1.jsx)("pre", { onClick: () => (0, copy_text_1.copyText)(command), style: code, children: command }) }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)(CopyButton_1.CopyButton, { textToCopy: command, label: "Copy command", labelWhenCopied: "Copied!" })] }), (0, jsx_runtime_1.jsxs)("p", { children: ["This will upgrade Remotion from ", info.currentVersion, " to", ' ', info.latestVersion, "."] }), (0, jsx_runtime_1.jsxs)("p", { children: ["Read the", ' ', (0, jsx_runtime_1.jsx)("a", { style: link, target: "_blank", href: "https://github.com/remotion-dev/remotion/releases", children: "Release notes" }), ' ', "to know what", "'s", " new in Remotion."] })] })] }));
|
|
42
42
|
};
|
|
43
43
|
exports.UpdateModal = UpdateModal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const
|
|
1
|
+
export declare const copyText: (cmd: string) => void;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
const
|
|
3
|
+
exports.copyText = void 0;
|
|
4
|
+
const copyText = (cmd) => {
|
|
5
5
|
const permissionName = 'clipboard-write';
|
|
6
6
|
navigator.permissions
|
|
7
7
|
.query({ name: permissionName })
|
|
@@ -11,7 +11,8 @@ const copyCmd = (cmd) => {
|
|
|
11
11
|
}
|
|
12
12
|
})
|
|
13
13
|
.catch((err) => {
|
|
14
|
-
|
|
14
|
+
// eslint-disable-next-line no-alert
|
|
15
|
+
alert('Could not copy:' + err);
|
|
15
16
|
});
|
|
16
17
|
};
|
|
17
|
-
exports.
|
|
18
|
+
exports.copyText = copyText;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const pickColor: () => void;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pickColor = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const layout_1 = require("../components/layout");
|
|
6
|
+
const ColorDot_1 = require("../components/Notifications/ColorDot");
|
|
7
|
+
const NotificationCenter_1 = require("../components/Notifications/NotificationCenter");
|
|
8
|
+
const copy_text_1 = require("./copy-text");
|
|
9
|
+
const pickColor = () => {
|
|
10
|
+
// @ts-expect-error
|
|
11
|
+
const open = new EyeDropper().open();
|
|
12
|
+
open
|
|
13
|
+
.then((color) => {
|
|
14
|
+
var _a;
|
|
15
|
+
(0, copy_text_1.copyText)(color.sRGBHex);
|
|
16
|
+
(_a = NotificationCenter_1.notificationCenter.current) === null || _a === void 0 ? void 0 : _a.addNotification({
|
|
17
|
+
content: ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ColorDot_1.ColorDot, { color: color.sRGBHex }), " ", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), " Copied", ' ', color.sRGBHex] })),
|
|
18
|
+
created: Date.now(),
|
|
19
|
+
duration: 2000,
|
|
20
|
+
id: String(Math.random()),
|
|
21
|
+
});
|
|
22
|
+
})
|
|
23
|
+
.catch((err) => {
|
|
24
|
+
var _a;
|
|
25
|
+
if (err.message.includes('canceled')) {
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
(_a = NotificationCenter_1.notificationCenter.current) === null || _a === void 0 ? void 0 : _a.addNotification({
|
|
29
|
+
content: `Could not pick color.`,
|
|
30
|
+
duration: 2000,
|
|
31
|
+
created: Date.now(),
|
|
32
|
+
id: String(Math.random()),
|
|
33
|
+
});
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
exports.pickColor = pickColor;
|
package/dist/get-cli-options.js
CHANGED
|
@@ -152,9 +152,11 @@ const getCliOptions = async (options) => {
|
|
|
152
152
|
headless: remotion_1.Internals.getChromiumHeadlessMode(),
|
|
153
153
|
gl: (_a = remotion_1.Internals.getChromiumOpenGlRenderer()) !== null && _a !== void 0 ? _a : remotion_1.Internals.DEFAULT_OPENGL_RENDERER,
|
|
154
154
|
};
|
|
155
|
+
const parallelism = remotion_1.Internals.getConcurrency();
|
|
156
|
+
renderer_1.RenderInternals.validateConcurrency(parallelism, 'concurrency');
|
|
155
157
|
return {
|
|
156
158
|
puppeteerTimeout: remotion_1.Internals.getCurrentPuppeteerTimeout(),
|
|
157
|
-
parallelism
|
|
159
|
+
parallelism,
|
|
158
160
|
frameRange,
|
|
159
161
|
shouldOutputImageSequence,
|
|
160
162
|
codec,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/cli",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.30",
|
|
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.0.
|
|
27
|
-
"@remotion/media-utils": "3.0.
|
|
28
|
-
"@remotion/player": "3.0.
|
|
29
|
-
"@remotion/renderer": "3.0.
|
|
26
|
+
"@remotion/bundler": "3.0.30",
|
|
27
|
+
"@remotion/media-utils": "3.0.30",
|
|
28
|
+
"@remotion/player": "3.0.30",
|
|
29
|
+
"@remotion/renderer": "3.0.30",
|
|
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.0.
|
|
34
|
+
"remotion": "3.0.30",
|
|
35
35
|
"semver": "7.3.5",
|
|
36
36
|
"source-map": "0.6.1"
|
|
37
37
|
},
|
|
@@ -73,5 +73,5 @@
|
|
|
73
73
|
"publishConfig": {
|
|
74
74
|
"access": "public"
|
|
75
75
|
},
|
|
76
|
-
"gitHead": "
|
|
76
|
+
"gitHead": "5af2bdb448a7ceadb6c3f9003b014d7566878c35"
|
|
77
77
|
}
|