@remotion/cli 4.0.0-fastlambda.8 → 4.0.0-lambda.3
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/bundle-on-cli.d.ts +2 -0
- package/dist/bundle-on-cli.js +41 -0
- package/dist/bundle.d.ts +1 -0
- package/dist/bundle.js +31 -0
- package/dist/compositions.js +14 -3
- package/dist/download-progress.js +4 -1
- package/dist/editor/components/AudioWaveform.js +2 -2
- package/dist/editor/components/AudioWaveformBar.js +1 -1
- package/dist/editor/components/Canvas.js +1 -1
- package/dist/editor/components/CheckboardToggle.js +1 -1
- package/dist/editor/components/ClipboardIcon.js +1 -1
- package/dist/editor/components/CollapsedCompositionSelector.d.ts +4 -0
- package/dist/editor/components/CollapsedCompositionSelector.js +39 -0
- package/dist/editor/components/CompositionSelector.js +5 -45
- package/dist/editor/components/CompositionSelectorItem.js +3 -3
- package/dist/editor/components/ControlButton.js +1 -1
- package/dist/editor/components/CopyButton.js +2 -2
- package/dist/editor/components/CurrentComposition.js +2 -2
- package/dist/editor/components/Editor.js +24 -8
- package/dist/editor/components/EditorContent.js +3 -2
- package/dist/editor/components/FpsCounter.js +1 -1
- package/dist/editor/components/InitialCompositionLoader.d.ts +4 -0
- package/dist/editor/components/InitialCompositionLoader.js +60 -0
- package/dist/editor/components/KeyboardShortcutsModal.js +1 -1
- package/dist/editor/components/LoadingIndicator.js +1 -1
- package/dist/editor/components/LoopToggle.js +1 -1
- package/dist/editor/components/Menu/MenuDivider.js +1 -1
- package/dist/editor/components/Menu/MenuItem.js +3 -3
- package/dist/editor/components/Menu/MenuSubItem.js +3 -3
- package/dist/editor/components/Menu/SubMenu.js +1 -1
- package/dist/editor/components/MenuBuildIndicator.d.ts +2 -0
- package/dist/editor/components/MenuBuildIndicator.js +26 -0
- package/dist/editor/components/MenuToolbar.js +69 -9
- package/dist/editor/components/ModalContainer.js +1 -1
- package/dist/editor/components/ModalHeader.js +1 -1
- package/dist/editor/components/MuteToggle.js +1 -1
- package/dist/editor/components/NewComposition/CancelButton.js +1 -1
- package/dist/editor/components/NewComposition/ComboBox.js +3 -3
- package/dist/editor/components/NewComposition/CopyHint.js +1 -1
- package/dist/editor/components/NewComposition/InputDragger.js +2 -2
- package/dist/editor/components/NewComposition/MenuContent.js +1 -1
- package/dist/editor/components/NewComposition/NewCompAspectRatio.js +1 -1
- package/dist/editor/components/NewComposition/NewCompDuration.js +1 -1
- package/dist/editor/components/NewComposition/NewComposition.js +4 -4
- package/dist/editor/components/NewComposition/RemInput.js +1 -1
- package/dist/editor/components/NewComposition/ToggleAspectRatio.js +1 -1
- package/dist/editor/components/NewComposition/ValidationMessage.js +2 -2
- package/dist/editor/components/NoRegisterRoot.d.ts +2 -0
- package/dist/editor/components/NoRegisterRoot.js +41 -0
- package/dist/editor/components/PlayPause.js +40 -11
- package/dist/editor/components/PlaybackRateSelector.js +2 -2
- package/dist/editor/components/Preview.js +10 -7
- package/dist/editor/components/PreviewToolbar.js +1 -1
- package/dist/editor/components/RichTimelineToggle.js +1 -1
- package/dist/editor/components/SizeSelector.js +2 -2
- package/dist/editor/components/Splitter/SplitterContainer.js +1 -1
- package/dist/editor/components/Splitter/SplitterElement.js +4 -2
- package/dist/editor/components/Splitter/SplitterHandle.d.ts +4 -1
- package/dist/editor/components/Splitter/SplitterHandle.js +28 -7
- package/dist/editor/components/Thumbnail.js +1 -1
- package/dist/editor/components/TimeValue.js +1 -1
- package/dist/editor/components/Timeline/LoopedIndicator.js +2 -2
- package/dist/editor/components/Timeline/LoopedTimelineIndicators.js +3 -3
- package/dist/editor/components/Timeline/MaxTimelineTracks.js +1 -1
- package/dist/editor/components/Timeline/Timeline.js +2 -1
- package/dist/editor/components/Timeline/TimelineCollapseToggle.js +2 -2
- package/dist/editor/components/Timeline/TimelineDragHandler.js +1 -1
- package/dist/editor/components/Timeline/TimelineInOutPointer.js +2 -2
- package/dist/editor/components/Timeline/TimelineInOutPointerHandle.js +1 -1
- package/dist/editor/components/Timeline/TimelineList.js +1 -1
- package/dist/editor/components/Timeline/TimelineListItem.js +1 -1
- package/dist/editor/components/Timeline/TimelineSequence.js +1 -1
- package/dist/editor/components/Timeline/TimelineSequenceFrame.js +1 -1
- package/dist/editor/components/Timeline/TimelineSlider.js +1 -1
- package/dist/editor/components/Timeline/TimelineSliderHandle.js +1 -1
- package/dist/editor/components/Timeline/TimelineTracks.js +2 -2
- package/dist/editor/components/Timeline/TimelineVideoInfo.js +1 -1
- package/dist/editor/components/TimelineInOutToggle.js +1 -1
- package/dist/editor/components/TopPanel.js +24 -1
- package/dist/editor/components/UpdateCheck.d.ts +1 -1
- package/dist/editor/components/UpdateCheck.js +1 -1
- package/dist/editor/components/UpdateModal/UpdateModal.js +1 -1
- package/dist/editor/components/layout.js +4 -4
- package/dist/editor/helpers/use-compact-ui.d.ts +1 -0
- package/dist/editor/helpers/use-compact-ui.js +18 -0
- package/dist/editor/icons/Checkmark.js +1 -1
- package/dist/editor/icons/caret.d.ts +1 -1
- package/dist/editor/icons/caret.js +4 -4
- package/dist/editor/icons/film.js +1 -1
- package/dist/editor/icons/folder.js +2 -2
- package/dist/editor/icons/jump-to-start.d.ts +2 -0
- package/dist/editor/icons/jump-to-start.js +8 -0
- package/dist/editor/icons/keys.js +3 -3
- package/dist/editor/icons/lock.js +2 -2
- package/dist/editor/icons/media-volume.js +2 -2
- package/dist/editor/icons/pause.js +1 -1
- package/dist/editor/icons/play.js +1 -1
- package/dist/editor/icons/step-back.js +1 -1
- package/dist/editor/icons/step-forward.js +1 -1
- package/dist/editor/icons/still.js +1 -1
- package/dist/editor/icons/timeline.js +1 -1
- package/dist/editor/icons/timelineInOutPointer.js +2 -2
- package/dist/editor/state/folders.d.ts +11 -0
- package/dist/editor/state/folders.js +23 -0
- package/dist/editor/state/highest-z-index.js +2 -2
- package/dist/editor/state/keybindings.js +1 -1
- package/dist/editor/state/sidebar.d.ts +12 -0
- package/dist/editor/state/sidebar.js +40 -0
- package/dist/editor/state/z-index.js +1 -1
- package/dist/get-cli-options.d.ts +3 -1
- package/dist/get-cli-options.js +8 -2
- package/dist/get-latest-remotion-version.d.ts +1 -0
- package/dist/get-latest-remotion-version.js +31 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +5 -1
- package/dist/lambda-command.js +5 -1
- package/dist/parse-command-line.d.ts +1 -0
- package/dist/parse-command-line.js +6 -0
- package/dist/prepare-entry-point.d.ts +11 -0
- package/dist/prepare-entry-point.js +36 -0
- package/dist/preview-server/dev-middleware/compatible-api.d.ts +7 -0
- package/dist/preview-server/dev-middleware/compatible-api.js +20 -0
- package/dist/preview-server/dev-middleware/get-paths.d.ts +7 -0
- package/dist/preview-server/dev-middleware/get-paths.js +19 -0
- package/dist/preview-server/dev-middleware/index.d.ts +3 -0
- package/dist/preview-server/dev-middleware/index.js +27 -0
- package/dist/preview-server/dev-middleware/is-color-supported.d.ts +1 -0
- package/dist/preview-server/dev-middleware/is-color-supported.js +37 -0
- package/dist/preview-server/dev-middleware/middleware.d.ts +10 -0
- package/dist/preview-server/dev-middleware/middleware.js +224 -0
- package/dist/preview-server/dev-middleware/range-parser.d.ts +15 -0
- package/dist/preview-server/dev-middleware/range-parser.js +96 -0
- package/dist/preview-server/dev-middleware/ready.d.ts +3 -0
- package/dist/preview-server/dev-middleware/ready.js +11 -0
- package/dist/preview-server/dev-middleware/setup-hooks.d.ts +2 -0
- package/dist/preview-server/dev-middleware/setup-hooks.js +42 -0
- package/dist/preview-server/dev-middleware/setup-output-filesystem.d.ts +2 -0
- package/dist/preview-server/dev-middleware/setup-output-filesystem.js +13 -0
- package/dist/preview-server/dev-middleware/types.d.ts +10 -0
- package/dist/preview-server/dev-middleware/types.js +2 -0
- package/dist/preview-server/error-overlay/entry-basic.d.ts +1 -0
- package/dist/preview-server/error-overlay/entry-basic.js +21 -0
- package/dist/preview-server/error-overlay/react-overlay/effects/format-warning.d.ts +11 -0
- package/dist/preview-server/error-overlay/react-overlay/effects/format-warning.js +41 -0
- package/dist/preview-server/error-overlay/react-overlay/effects/map-error-to-react-stack.d.ts +7 -0
- package/dist/preview-server/error-overlay/react-overlay/effects/map-error-to-react-stack.js +46 -0
- package/dist/preview-server/error-overlay/react-overlay/effects/proxy-console.d.ts +24 -0
- package/dist/preview-server/error-overlay/react-overlay/effects/proxy-console.js +64 -0
- package/dist/preview-server/error-overlay/react-overlay/effects/resolve-file-source.d.ts +3 -0
- package/dist/preview-server/error-overlay/react-overlay/effects/resolve-file-source.js +31 -0
- package/dist/preview-server/error-overlay/react-overlay/effects/stack-trace-limit.d.ts +3 -0
- package/dist/preview-server/error-overlay/react-overlay/effects/stack-trace-limit.js +43 -0
- package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-error.d.ts +4 -0
- package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-error.js +45 -0
- package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-rejection.d.ts +4 -0
- package/dist/preview-server/error-overlay/react-overlay/effects/unhandled-rejection.js +41 -0
- package/dist/preview-server/error-overlay/react-overlay/index.d.ts +2 -0
- package/dist/preview-server/error-overlay/react-overlay/index.js +21 -0
- package/dist/preview-server/error-overlay/react-overlay/listen-to-runtime-errors.d.ts +8 -0
- package/dist/preview-server/error-overlay/react-overlay/listen-to-runtime-errors.js +79 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.d.ts +1 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/get-file-source.js +21 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/get-lines-around.d.ts +14 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/get-lines-around.js +24 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/get-source-map.d.ts +13 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/get-source-map.js +58 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/get-stack-frames.d.ts +2 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/get-stack-frames.js +27 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.d.ts +12 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/open-in-editor.js +460 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/parser.d.ts +2 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/parser.js +117 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/stack-frame.d.ts +40 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/stack-frame.js +31 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/unmapper.d.ts +2 -0
- package/dist/preview-server/error-overlay/react-overlay/utils/unmapper.js +64 -0
- package/dist/preview-server/error-overlay/remotion-overlay/AskOnDiscord.d.ts +2 -0
- package/dist/preview-server/error-overlay/remotion-overlay/AskOnDiscord.js +14 -0
- package/dist/preview-server/error-overlay/remotion-overlay/Button.d.ts +6 -0
- package/dist/preview-server/error-overlay/remotion-overlay/Button.js +24 -0
- package/dist/preview-server/error-overlay/remotion-overlay/CodeFrame.d.ts +6 -0
- package/dist/preview-server/error-overlay/remotion-overlay/CodeFrame.js +28 -0
- package/dist/preview-server/error-overlay/remotion-overlay/DismissButton.d.ts +2 -0
- package/dist/preview-server/error-overlay/remotion-overlay/DismissButton.js +23 -0
- package/dist/preview-server/error-overlay/remotion-overlay/ErrorDisplay.d.ts +5 -0
- package/dist/preview-server/error-overlay/remotion-overlay/ErrorDisplay.js +45 -0
- package/dist/preview-server/error-overlay/remotion-overlay/ErrorLoader.d.ts +4 -0
- package/dist/preview-server/error-overlay/remotion-overlay/ErrorLoader.js +61 -0
- package/dist/preview-server/error-overlay/remotion-overlay/ErrorTitle.d.ts +6 -0
- package/dist/preview-server/error-overlay/remotion-overlay/ErrorTitle.js +41 -0
- package/dist/preview-server/error-overlay/remotion-overlay/OpenInEditor.d.ts +5 -0
- package/dist/preview-server/error-overlay/remotion-overlay/OpenInEditor.js +91 -0
- package/dist/preview-server/error-overlay/remotion-overlay/Overlay.d.ts +14 -0
- package/dist/preview-server/error-overlay/remotion-overlay/Overlay.js +49 -0
- package/dist/preview-server/error-overlay/remotion-overlay/SearchGitHubIssues.d.ts +4 -0
- package/dist/preview-server/error-overlay/remotion-overlay/SearchGitHubIssues.js +13 -0
- package/dist/preview-server/error-overlay/remotion-overlay/StackFrame.d.ts +8 -0
- package/dist/preview-server/error-overlay/remotion-overlay/StackFrame.js +48 -0
- package/dist/preview-server/error-overlay/remotion-overlay/Symbolicating.d.ts +2 -0
- package/dist/preview-server/error-overlay/remotion-overlay/Symbolicating.js +8 -0
- package/dist/preview-server/error-overlay/remotion-overlay/carets.d.ts +3 -0
- package/dist/preview-server/error-overlay/remotion-overlay/carets.js +12 -0
- package/dist/preview-server/error-overlay/remotion-overlay/format-location.d.ts +1 -0
- package/dist/preview-server/error-overlay/remotion-overlay/format-location.js +10 -0
- package/dist/preview-server/error-overlay/remotion-overlay/index.d.ts +1 -0
- package/dist/preview-server/error-overlay/remotion-overlay/index.js +18 -0
- package/dist/preview-server/get-package-manager.d.ts +9 -0
- package/dist/preview-server/get-package-manager.js +40 -0
- package/dist/preview-server/hot-middleware/client.d.ts +19 -0
- package/dist/preview-server/hot-middleware/client.js +177 -0
- package/dist/preview-server/hot-middleware/index.d.ts +8 -0
- package/dist/preview-server/hot-middleware/index.js +150 -0
- package/dist/preview-server/hot-middleware/process-update.d.ts +12 -0
- package/dist/preview-server/hot-middleware/process-update.js +144 -0
- package/dist/preview-server/hot-middleware/strip-ansi.d.ts +1 -0
- package/dist/preview-server/hot-middleware/strip-ansi.js +21 -0
- package/dist/preview-server/hot-middleware/types.d.ts +27 -0
- package/dist/preview-server/hot-middleware/types.js +10 -0
- package/dist/preview-server/project-info.d.ts +5 -0
- package/dist/preview-server/project-info.js +22 -0
- package/dist/preview-server/routes.d.ts +7 -0
- package/dist/preview-server/routes.js +128 -0
- package/dist/preview-server/serve-static.d.ts +9 -0
- package/dist/preview-server/serve-static.js +77 -0
- package/dist/preview-server/start-server.d.ts +8 -0
- package/dist/preview-server/start-server.js +69 -0
- package/dist/preview-server/update-available.d.ts +11 -0
- package/dist/preview-server/update-available.js +44 -0
- package/dist/preview.js +2 -2
- package/dist/previewEntry.js +2 -2
- package/dist/print-error.js +1 -0
- package/dist/print-help.js +3 -3
- package/dist/render.js +30 -24
- package/dist/still.js +46 -15
- package/dist/upgrade.js +9 -7
- package/dist/versions.js +3 -0
- package/dist/webpack-cache.d.ts +12 -0
- package/dist/webpack-cache.js +66 -0
- package/package.json +12 -10
- package/web/favicon.png +0 -0
|
@@ -10,6 +10,6 @@ const menuDivider = {
|
|
|
10
10
|
backgroundColor: colors_1.INPUT_BORDER_COLOR_HOVERED,
|
|
11
11
|
};
|
|
12
12
|
const MenuDivider = () => {
|
|
13
|
-
return (0, jsx_runtime_1.jsx)("div", { style: menuDivider }
|
|
13
|
+
return (0, jsx_runtime_1.jsx)("div", { style: menuDivider });
|
|
14
14
|
};
|
|
15
15
|
exports.MenuDivider = MenuDivider;
|
|
@@ -69,8 +69,8 @@ const MenuItem = ({ label: itemName, selected, id, onItemSelected, onItemHovered
|
|
|
69
69
|
top: ((_a = size === null || size === void 0 ? void 0 : size.top) !== null && _a !== void 0 ? _a : 0) + ((_b = size === null || size === void 0 ? void 0 : size.height) !== null && _b !== void 0 ? _b : 0),
|
|
70
70
|
};
|
|
71
71
|
}, [size]);
|
|
72
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("button", { ref: ref, role: "button", tabIndex: tabIndex, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, onClick: onClick, style: containerStyle, type: "button", children: itemName }
|
|
73
|
-
? react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)("div", { className: "css-reset", style: outerStyle, children: (0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onEscape: onItemQuit, onOutsideClick: onItemQuit, children: (0, jsx_runtime_1.jsx)("div", { style: portalStyle, children: (0, jsx_runtime_1.jsx)(MenuContent_1.MenuContent, { onNextMenu: onPreviousMenu, onPreviousMenu: onNextMenu, values: menu.items, onHide: onItemQuit, leaveLeftSpace: menu.leaveLeftPadding, preselectIndex: false, topItemCanBeUnselected: true }
|
|
74
|
-
: null] }
|
|
72
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("button", { ref: ref, role: "button", tabIndex: tabIndex, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, onClick: onClick, style: containerStyle, type: "button", children: itemName }), portalStyle
|
|
73
|
+
? react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)("div", { className: "css-reset", style: outerStyle, children: (0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onEscape: onItemQuit, onOutsideClick: onItemQuit, children: (0, jsx_runtime_1.jsx)("div", { style: portalStyle, children: (0, jsx_runtime_1.jsx)(MenuContent_1.MenuContent, { onNextMenu: onPreviousMenu, onPreviousMenu: onNextMenu, values: menu.items, onHide: onItemQuit, leaveLeftSpace: menu.leaveLeftPadding, preselectIndex: false, topItemCanBeUnselected: true }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
|
|
74
|
+
: null] }));
|
|
75
75
|
};
|
|
76
76
|
exports.MenuItem = MenuItem;
|
|
@@ -84,8 +84,8 @@ const MenuSubItem = ({ label, leaveLeftSpace, leftItem, onActionChosen, id, sele
|
|
|
84
84
|
}, 100);
|
|
85
85
|
return () => clearTimeout(hi);
|
|
86
86
|
}, [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 }
|
|
88
|
-
? react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)(SubMenu_1.SubMenuComponent, { onQuitFullMenu: onQuitMenu, subMenu: subMenu, onQuitSubMenu: onQuitSubmenu, portalStyle: portalStyle, subMenuActivated: subMenuActivated }
|
|
89
|
-
: null] }
|
|
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
|
+
? 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
|
+
: null] }) }));
|
|
90
90
|
};
|
|
91
91
|
exports.MenuSubItem = MenuSubItem;
|
|
@@ -9,6 +9,6 @@ const SubMenuComponent = ({ portalStyle, subMenuActivated, subMenu, onQuitFullMe
|
|
|
9
9
|
return ((0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onEscape: onQuitFullMenu, onOutsideClick: noop_1.noop, children: (0, jsx_runtime_1.jsx)("div", { style: portalStyle, className: "css-reset", children: (0, jsx_runtime_1.jsx)(MenuContent_1.MenuContent, { onNextMenu: noop_1.noop, onPreviousMenu: onQuitSubMenu, values: subMenu.items, onHide: noop_1.noop, leaveLeftSpace: subMenu.leaveLeftSpace, preselectIndex: subMenuActivated === 'without-mouse' &&
|
|
10
10
|
typeof subMenu.preselectIndex === 'number'
|
|
11
11
|
? subMenu.preselectIndex
|
|
12
|
-
: false, topItemCanBeUnselected: false }
|
|
12
|
+
: false, topItemCanBeUnselected: false }) }) }));
|
|
13
13
|
};
|
|
14
14
|
exports.SubMenuComponent = SubMenuComponent;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MenuBuildIndicator = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const cwd = {
|
|
7
|
+
fontSize: 13,
|
|
8
|
+
opacity: 0.8,
|
|
9
|
+
};
|
|
10
|
+
const MenuBuildIndicator = () => {
|
|
11
|
+
const [isBuilding, setIsBuilding] = (0, react_1.useState)(false);
|
|
12
|
+
(0, react_1.useEffect)(() => {
|
|
13
|
+
window.remotion_isBuilding = () => {
|
|
14
|
+
setIsBuilding(true);
|
|
15
|
+
};
|
|
16
|
+
window.remotion_finishedBuilding = () => {
|
|
17
|
+
setIsBuilding(false);
|
|
18
|
+
};
|
|
19
|
+
return () => {
|
|
20
|
+
window.remotion_isBuilding = undefined;
|
|
21
|
+
window.remotion_finishedBuilding = undefined;
|
|
22
|
+
};
|
|
23
|
+
}, []);
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: cwd, title: window.remotion_cwd, children: isBuilding ? 'Building...' : window.remotion_projectName }));
|
|
25
|
+
};
|
|
26
|
+
exports.MenuBuildIndicator = MenuBuildIndicator;
|
|
@@ -8,9 +8,11 @@ const checkerboard_1 = require("../state/checkerboard");
|
|
|
8
8
|
const modals_1 = require("../state/modals");
|
|
9
9
|
const preview_size_1 = require("../state/preview-size");
|
|
10
10
|
const rich_timeline_1 = require("../state/rich-timeline");
|
|
11
|
+
const sidebar_1 = require("../state/sidebar");
|
|
11
12
|
const timeline_ref_1 = require("../state/timeline-ref");
|
|
12
13
|
const layout_1 = require("./layout");
|
|
13
14
|
const MenuItem_1 = require("./Menu/MenuItem");
|
|
15
|
+
const MenuBuildIndicator_1 = require("./MenuBuildIndicator");
|
|
14
16
|
const SizeSelector_1 = require("./SizeSelector");
|
|
15
17
|
const TimelineInOutToggle_1 = require("./TimelineInOutToggle");
|
|
16
18
|
const UpdateCheck_1 = require("./UpdateCheck");
|
|
@@ -27,10 +29,6 @@ const row = {
|
|
|
27
29
|
const flex = {
|
|
28
30
|
flex: 1,
|
|
29
31
|
};
|
|
30
|
-
const cwd = {
|
|
31
|
-
fontSize: 13,
|
|
32
|
-
opacity: 0.8,
|
|
33
|
-
};
|
|
34
32
|
const openExternal = (link) => {
|
|
35
33
|
window.open(link, '_blank');
|
|
36
34
|
};
|
|
@@ -44,6 +42,7 @@ const MenuToolbar = () => {
|
|
|
44
42
|
const { checkerboard, setCheckerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
|
|
45
43
|
const { richTimeline, setRichTimeline } = (0, react_1.useContext)(rich_timeline_1.RichTimelineContext);
|
|
46
44
|
const { size, setSize } = (0, react_1.useContext)(preview_size_1.PreviewSizeContext);
|
|
45
|
+
const { setSidebarCollapsedState, sidebarCollapsedState } = (0, react_1.useContext)(sidebar_1.SidebarContext);
|
|
47
46
|
const itemClicked = (0, react_1.useCallback)((itemId) => {
|
|
48
47
|
setSelected(itemId);
|
|
49
48
|
}, [setSelected]);
|
|
@@ -59,7 +58,7 @@ const MenuToolbar = () => {
|
|
|
59
58
|
return [
|
|
60
59
|
{
|
|
61
60
|
id: 'remotion',
|
|
62
|
-
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" }
|
|
61
|
+
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" }) }) })),
|
|
63
62
|
leaveLeftPadding: false,
|
|
64
63
|
items: [
|
|
65
64
|
{
|
|
@@ -162,7 +161,7 @@ const MenuToolbar = () => {
|
|
|
162
161
|
id: String(newSize),
|
|
163
162
|
keyHint: null,
|
|
164
163
|
label: (0, SizeSelector_1.getPreviewSizeLabel)(newSize),
|
|
165
|
-
leftItem: String(newSize) === String(size) ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}
|
|
164
|
+
leftItem: String(newSize) === String(size) ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null,
|
|
166
165
|
onClick: () => {
|
|
167
166
|
close();
|
|
168
167
|
setSize(() => newSize);
|
|
@@ -173,6 +172,65 @@ const MenuToolbar = () => {
|
|
|
173
172
|
})),
|
|
174
173
|
},
|
|
175
174
|
},
|
|
175
|
+
{
|
|
176
|
+
id: 'timeline-divider',
|
|
177
|
+
type: 'divider',
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
id: 'left-sidebar',
|
|
181
|
+
label: 'Sidebar',
|
|
182
|
+
keyHint: null,
|
|
183
|
+
type: 'item',
|
|
184
|
+
value: 'preview-size',
|
|
185
|
+
leftItem: null,
|
|
186
|
+
subMenu: {
|
|
187
|
+
leaveLeftSpace: true,
|
|
188
|
+
preselectIndex: 0,
|
|
189
|
+
items: [
|
|
190
|
+
{
|
|
191
|
+
id: 'sidebar-responsive',
|
|
192
|
+
keyHint: null,
|
|
193
|
+
label: 'Responsive',
|
|
194
|
+
leftItem: sidebarCollapsedState === 'responsive' ? ((0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {})) : null,
|
|
195
|
+
onClick: () => {
|
|
196
|
+
setSidebarCollapsedState('responsive');
|
|
197
|
+
},
|
|
198
|
+
subMenu: null,
|
|
199
|
+
type: 'item',
|
|
200
|
+
value: 'responsive',
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
id: 'sidebar-expanded',
|
|
204
|
+
keyHint: null,
|
|
205
|
+
label: 'Expanded',
|
|
206
|
+
leftItem: sidebarCollapsedState === 'expanded' ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null,
|
|
207
|
+
onClick: () => {
|
|
208
|
+
setSidebarCollapsedState('expanded');
|
|
209
|
+
},
|
|
210
|
+
subMenu: null,
|
|
211
|
+
type: 'item',
|
|
212
|
+
value: 'expanded',
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
id: 'sidebar-collapsed',
|
|
216
|
+
keyHint: null,
|
|
217
|
+
label: 'Collapsed',
|
|
218
|
+
leftItem: sidebarCollapsedState === 'collapsed' ? ((0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {})) : null,
|
|
219
|
+
onClick: () => {
|
|
220
|
+
setSidebarCollapsedState('collapsed');
|
|
221
|
+
},
|
|
222
|
+
subMenu: null,
|
|
223
|
+
type: 'item',
|
|
224
|
+
value: 'collapsed',
|
|
225
|
+
},
|
|
226
|
+
],
|
|
227
|
+
},
|
|
228
|
+
onClick: () => undefined,
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
id: 'timeline-divider',
|
|
232
|
+
type: 'divider',
|
|
233
|
+
},
|
|
176
234
|
{
|
|
177
235
|
id: 'checkerboard',
|
|
178
236
|
keyHint: 'T',
|
|
@@ -183,7 +241,7 @@ const MenuToolbar = () => {
|
|
|
183
241
|
},
|
|
184
242
|
type: 'item',
|
|
185
243
|
value: 'checkerboard',
|
|
186
|
-
leftItem: checkerboard ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}
|
|
244
|
+
leftItem: checkerboard ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null,
|
|
187
245
|
subMenu: null,
|
|
188
246
|
},
|
|
189
247
|
{
|
|
@@ -200,7 +258,7 @@ const MenuToolbar = () => {
|
|
|
200
258
|
},
|
|
201
259
|
type: 'item',
|
|
202
260
|
value: 'rich-timeline',
|
|
203
|
-
leftItem: richTimeline ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}
|
|
261
|
+
leftItem: richTimeline ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null,
|
|
204
262
|
subMenu: null,
|
|
205
263
|
},
|
|
206
264
|
{
|
|
@@ -391,7 +449,9 @@ const MenuToolbar = () => {
|
|
|
391
449
|
setCheckerboard,
|
|
392
450
|
setRichTimeline,
|
|
393
451
|
setSelectedModal,
|
|
452
|
+
setSidebarCollapsedState,
|
|
394
453
|
setSize,
|
|
454
|
+
sidebarCollapsedState,
|
|
395
455
|
size,
|
|
396
456
|
]);
|
|
397
457
|
const menus = (0, react_1.useMemo)(() => {
|
|
@@ -421,6 +481,6 @@ const MenuToolbar = () => {
|
|
|
421
481
|
}, [setSelected]);
|
|
422
482
|
return ((0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", className: "css-reset", style: row, children: [structure.map((s) => {
|
|
423
483
|
return ((0, jsx_runtime_1.jsx)(MenuItem_1.MenuItem, { selected: selected === s.id, onItemSelected: itemClicked, onItemHovered: itemHovered, id: s.id, label: s.label, onItemQuit: onItemQuit, menu: s, onPreviousMenu: onPreviousMenu, onNextMenu: onNextMenu, leaveLeftPadding: s.leaveLeftPadding }, s.id));
|
|
424
|
-
}), (0, jsx_runtime_1.jsx)(UpdateCheck_1.UpdateCheck, {}
|
|
484
|
+
}), (0, jsx_runtime_1.jsx)(UpdateCheck_1.UpdateCheck, {}), (0, jsx_runtime_1.jsx)("div", { style: flex }), (0, jsx_runtime_1.jsx)(MenuBuildIndicator_1.MenuBuildIndicator, {})] }));
|
|
425
485
|
};
|
|
426
486
|
exports.MenuToolbar = MenuToolbar;
|
|
@@ -20,6 +20,6 @@ const panel = {
|
|
|
20
20
|
color: 'white',
|
|
21
21
|
};
|
|
22
22
|
const ModalContainer = ({ children, onEscape, onOutsideClick }) => {
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: "css-reset", style: backgroundOverlay, role: "dialog", "aria-modal": "true", children: (0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onOutsideClick: onOutsideClick, onEscape: onEscape, children: (0, jsx_runtime_1.jsx)("div", { style: panel, children: children }
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)("div", { className: "css-reset", style: backgroundOverlay, role: "dialog", "aria-modal": "true", children: (0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onOutsideClick: onOutsideClick, onEscape: onEscape, children: (0, jsx_runtime_1.jsx)("div", { style: panel, children: children }) }) }));
|
|
24
24
|
};
|
|
25
25
|
exports.ModalContainer = ModalContainer;
|
|
@@ -23,6 +23,6 @@ const NewCompHeader = ({ title }) => {
|
|
|
23
23
|
const onPress = (0, react_1.useCallback)(() => {
|
|
24
24
|
setSelectedModal(null);
|
|
25
25
|
}, [setSelectedModal]);
|
|
26
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("div", { children: title }
|
|
26
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("div", { children: title }), (0, jsx_runtime_1.jsx)(layout_1.Flex, {}), (0, jsx_runtime_1.jsx)(CancelButton_1.CancelButton, { style: icon, onPress: onPress })] }));
|
|
27
27
|
};
|
|
28
28
|
exports.NewCompHeader = NewCompHeader;
|
|
@@ -19,6 +19,6 @@ const MuteToggle = ({ muted, setMuted }) => {
|
|
|
19
19
|
if (isStill) {
|
|
20
20
|
return null;
|
|
21
21
|
}
|
|
22
|
-
return ((0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: muted ? (0, jsx_runtime_1.jsx)(media_volume_1.VolumeOffIcon, {}
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, onClick: onClick, children: muted ? (0, jsx_runtime_1.jsx)(media_volume_1.VolumeOffIcon, {}) : (0, jsx_runtime_1.jsx)(media_volume_1.VolumeOnIcon, {}) }));
|
|
23
23
|
};
|
|
24
24
|
exports.MuteToggle = MuteToggle;
|
|
@@ -12,6 +12,6 @@ const style = {
|
|
|
12
12
|
};
|
|
13
13
|
const CancelButton = ({ onPress, ...props }) => {
|
|
14
14
|
const { tabIndex } = (0, z_index_1.useZIndex)();
|
|
15
|
-
return ((0, jsx_runtime_1.jsx)("button", { tabIndex: tabIndex, style: style, type: "button", onClick: onPress, children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 320 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z" }
|
|
15
|
+
return ((0, jsx_runtime_1.jsx)("button", { tabIndex: tabIndex, style: style, type: "button", onClick: onPress, children: (0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 320 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z" }) }) }));
|
|
16
16
|
};
|
|
17
17
|
exports.CancelButton = CancelButton;
|
|
@@ -83,8 +83,8 @@ const Combobox = ({ values, selectedId, style: customStyle, title }) => {
|
|
|
83
83
|
: colors_1.INPUT_BORDER_COLOR_UNHOVERED,
|
|
84
84
|
};
|
|
85
85
|
}, [customStyle, hovered, opened]);
|
|
86
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("button", { ref: ref, title: title, tabIndex: tabIndex, type: "button", style: style, children: [selected.label, " ", (0, jsx_runtime_1.jsx)(layout_1.Flex, {}
|
|
87
|
-
? react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)("div", { style: styles_1.outerPortal, className: "css-reset", children: (0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onOutsideClick: onHide, onEscape: onHide, children: (0, jsx_runtime_1.jsx)("div", { style: portalStyle, children: (0, jsx_runtime_1.jsx)(MenuContent_1.MenuContent, { onNextMenu: noop_1.noop, onPreviousMenu: noop_1.noop, values: values, onHide: onHide, leaveLeftSpace: true, preselectIndex: values.findIndex((v) => v.id === selected.id), topItemCanBeUnselected: false }
|
|
88
|
-
: null] }
|
|
86
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("button", { ref: ref, title: title, tabIndex: tabIndex, type: "button", style: style, children: [selected.label, " ", (0, jsx_runtime_1.jsx)(layout_1.Flex, {}), " ", (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), " ", (0, jsx_runtime_1.jsx)(caret_1.CaretDown, {})] }), portalStyle
|
|
87
|
+
? react_dom_1.default.createPortal((0, jsx_runtime_1.jsx)("div", { style: styles_1.outerPortal, className: "css-reset", children: (0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onOutsideClick: onHide, onEscape: onHide, children: (0, jsx_runtime_1.jsx)("div", { style: portalStyle, children: (0, jsx_runtime_1.jsx)(MenuContent_1.MenuContent, { onNextMenu: noop_1.noop, onPreviousMenu: noop_1.noop, values: values, onHide: onHide, leaveLeftSpace: true, preselectIndex: values.findIndex((v) => v.id === selected.id), topItemCanBeUnselected: false }) }) }) }), (0, portals_1.getPortal)(currentZIndex))
|
|
88
|
+
: null] }));
|
|
89
89
|
};
|
|
90
90
|
exports.Combobox = Combobox;
|
|
@@ -24,6 +24,6 @@ const CopyHint = () => {
|
|
|
24
24
|
if (!projectInfo || !projectInfo.videoFile) {
|
|
25
25
|
return null;
|
|
26
26
|
}
|
|
27
|
-
return ((0, jsx_runtime_1.jsxs)("div", { style: style, children: ["Copy this into ", (0, jsx_runtime_1.jsx)("br", {}
|
|
27
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: style, children: ["Copy this into ", (0, jsx_runtime_1.jsx)("br", {}), " your", ' ', (0, jsx_runtime_1.jsx)("span", { style: style, title: projectInfo.videoFile, children: projectInfo.relativeVideoFile }), ' ', "file."] }));
|
|
28
28
|
};
|
|
29
29
|
exports.CopyHint = CopyHint;
|
|
@@ -75,8 +75,8 @@ const InputDragger = ({ onValueChange, min: _min, step: _step, value, ...props }
|
|
|
75
75
|
}
|
|
76
76
|
}, [inputFallback]);
|
|
77
77
|
if (inputFallback) {
|
|
78
|
-
return ((0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onEscape: onBlur, onOutsideClick: noop_1.noop, children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { ref: fallbackRef, autoFocus: true, onKeyPress: onKeyPress, onBlur: onBlur, value: value, min: _min, step: _step, ...props }
|
|
78
|
+
return ((0, jsx_runtime_1.jsx)(z_index_1.HigherZIndex, { onEscape: onBlur, onOutsideClick: noop_1.noop, children: (0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { ref: fallbackRef, autoFocus: true, onKeyPress: onKeyPress, onBlur: onBlur, value: value, min: _min, step: _step, ...props }) }));
|
|
79
79
|
}
|
|
80
|
-
return ((0, jsx_runtime_1.jsx)("button", { type: "button", style: style, onClick: onClick, onPointerDown: onPointerDown, children: (0, jsx_runtime_1.jsx)("span", { style: span, children: value }
|
|
80
|
+
return ((0, jsx_runtime_1.jsx)("button", { type: "button", style: style, onClick: onClick, onPointerDown: onPointerDown, children: (0, jsx_runtime_1.jsx)("span", { style: span, children: value }) }));
|
|
81
81
|
};
|
|
82
82
|
exports.InputDragger = InputDragger;
|
|
@@ -167,6 +167,6 @@ const MenuContent = ({ onHide, values, preselectIndex, onNextMenu, onPreviousMen
|
|
|
167
167
|
item.onClick(item.id);
|
|
168
168
|
};
|
|
169
169
|
return ((0, jsx_runtime_1.jsx)(MenuSubItem_1.MenuSubItem, { selected: item.id === selectedItem, onActionChosen: onClick, onItemSelected: onItemSelected, label: item.label, id: item.id, keyHint: item.keyHint, leaveLeftSpace: leaveLeftSpace, leftItem: item.leftItem, subMenu: item.subMenu, onQuitMenu: onHide, onNextMenu: onNextMenu, subMenuActivated: subMenuActivated, setSubMenuActivated: setSubMenuActivated }, item.id));
|
|
170
|
-
}) }
|
|
170
|
+
}) }));
|
|
171
171
|
};
|
|
172
172
|
exports.MenuContent = MenuContent;
|
|
@@ -15,6 +15,6 @@ const container = {
|
|
|
15
15
|
};
|
|
16
16
|
const NewCompAspectRatio = ({ width, height, aspectRatioLocked, setAspectRatioLocked }) => {
|
|
17
17
|
const pixels = Number(width) * Number(height);
|
|
18
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("svg", { width: GUIDE_WIDTH, height: GUIDE_HEIGHT, children: (0, jsx_runtime_1.jsx)("path", { d: `M 0 0 L ${GUIDE_WIDTH} 0 L ${GUIDE_WIDTH} ${GUIDE_HEIGHT} L 0 ${GUIDE_HEIGHT}`, fill: "transparent", strokeWidth: "2", stroke: "rgba(255, 255, 255, 0.2)" }
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("svg", { width: GUIDE_WIDTH, height: GUIDE_HEIGHT, children: (0, jsx_runtime_1.jsx)("path", { d: `M 0 0 L ${GUIDE_WIDTH} 0 L ${GUIDE_WIDTH} ${GUIDE_HEIGHT} L 0 ${GUIDE_HEIGHT}`, fill: "transparent", strokeWidth: "2", stroke: "rgba(255, 255, 255, 0.2)" }) }), (0, jsx_runtime_1.jsx)(ToggleAspectRatio_1.ToggleAspectRatio, { aspectRatioLocked: Boolean(aspectRatioLocked), setAspectRatioLocked: setAspectRatioLocked }), pixels > 0 ? ((0, jsx_runtime_1.jsxs)("div", { style: new_comp_layout_1.rightLabel, children: ["Aspect ratio ", (0, render_aspect_ratio_1.aspectRatio)(Number(width), Number(height))] })) : null] }) }));
|
|
19
19
|
};
|
|
20
20
|
exports.NewCompAspectRatio = NewCompAspectRatio;
|
|
@@ -16,6 +16,6 @@ const NewCompDuration = ({ durationInFrames, setDurationInFrames, fps }) => {
|
|
|
16
16
|
setDurationInFrames(String(newVal));
|
|
17
17
|
}, [setDurationInFrames]);
|
|
18
18
|
const compDurationErrMessage = (0, validate_new_comp_data_1.validateCompositionDuration)(durationInFrames);
|
|
19
|
-
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("label", { children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: " Duration in frames" }
|
|
19
|
+
return ((0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("label", { children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: " Duration in frames" }), (0, jsx_runtime_1.jsxs)("div", { style: new_comp_layout_1.inputArea, children: [(0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: "number", value: durationInFrames, onChange: onDurationInFramesChanged, placeholder: "Duration (frames)", name: "durationInFrames", min: 1, step: 1, max: 100000000, onValueChange: onDurationChangedDirectly }), compDurationErrMessage ? ((0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { message: compDurationErrMessage })) : null] }), (0, jsx_runtime_1.jsxs)("span", { style: new_comp_layout_1.rightLabel, children: [(Number(durationInFrames) / Number(fps)).toFixed(2), "sec"] })] }) }) }));
|
|
20
20
|
};
|
|
21
21
|
exports.NewCompDuration = NewCompDuration;
|
|
@@ -145,7 +145,7 @@ const NewComposition = (props) => {
|
|
|
145
145
|
type: 'item',
|
|
146
146
|
value: frameRate,
|
|
147
147
|
keyHint: null,
|
|
148
|
-
leftItem: String(frameRate) === selectedFrameRate ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}
|
|
148
|
+
leftItem: String(frameRate) === selectedFrameRate ? (0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}) : null,
|
|
149
149
|
subMenu: null,
|
|
150
150
|
};
|
|
151
151
|
});
|
|
@@ -177,7 +177,7 @@ const NewComposition = (props) => {
|
|
|
177
177
|
},
|
|
178
178
|
];
|
|
179
179
|
}, [onTypeChanged]);
|
|
180
|
-
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "New composition" }
|
|
180
|
+
return ((0, jsx_runtime_1.jsxs)(ModalContainer_1.ModalContainer, { onOutsideClick: onQuit, onEscape: onQuit, children: [(0, jsx_runtime_1.jsx)(ModalHeader_1.NewCompHeader, { title: "New composition" }), (0, jsx_runtime_1.jsxs)("div", { style: panelContent, children: [(0, jsx_runtime_1.jsxs)("div", { style: left, children: [(0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 3 }), (0, jsx_runtime_1.jsxs)("form", { children: [(0, jsx_runtime_1.jsxs)("label", { children: [(0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: "Type" }), (0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.inputArea, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: "Type of composition", style: comboBoxStyle, values: typeValues, selectedId: type }) })] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: "Name" }), (0, jsx_runtime_1.jsxs)("div", { style: new_comp_layout_1.inputArea, children: [(0, jsx_runtime_1.jsx)(RemInput_1.RemotionInput, { value: name, onChange: onNameChange, type: "text", placeholder: "Composition name" }), compNameErrMessage ? ((0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { message: compNameErrMessage })) : null] })] })] }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)("label", { children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: "Width" }), (0, jsx_runtime_1.jsxs)("div", { style: new_comp_layout_1.inputArea, children: [(0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: "number", value: size.width, placeholder: "Width (px)", onChange: onWidthChanged, name: "width", step: 2, min: 2, max: 100000000, onValueChange: onWidthDirectlyChanged }), compWidthErrMessage ? ((0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { message: compWidthErrMessage })) : null] })] }) }) }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("label", { children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: "Height" }), (0, jsx_runtime_1.jsxs)("div", { style: new_comp_layout_1.inputArea, children: [(0, jsx_runtime_1.jsx)(InputDragger_1.InputDragger, { type: "number", value: size.height, onChange: onHeightChanged, placeholder: "Height (px)", name: "height", step: 2, min: 2, max: 100000000, onValueChange: onHeightDirectlyChanged }), compHeightErrMessage ? ((0, jsx_runtime_1.jsx)(ValidationMessage_1.ValidationMessage, { message: compHeightErrMessage })) : null] })] }) })] }), (0, jsx_runtime_1.jsx)("div", { children: (0, jsx_runtime_1.jsx)(NewCompAspectRatio_1.NewCompAspectRatio, { width: Number(size.width), height: Number(size.height), aspectRatioLocked: lockedAspectRatio, setAspectRatioLocked: setAspectRatioLocked }) })] }), (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), type === 'composition' ? ((0, jsx_runtime_1.jsx)(NewCompDuration_1.NewCompDuration, { durationInFrames: durationInFrames, fps: selectedFrameRate, setDurationInFrames: setDurationInFrames })) : null, (0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("div", {}), type === 'composition' ? ((0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", {}), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { y: 1 }), (0, jsx_runtime_1.jsxs)("label", { children: [(0, jsx_runtime_1.jsx)("div", { style: new_comp_layout_1.leftLabel, children: "Framerate" }), (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: "Framerate", style: comboBoxStyle, values: items, selectedId: selectedFrameRate })] })] })) : null] })] }), (0, jsx_runtime_1.jsxs)("div", { style: panelRight, children: [(0, jsx_runtime_1.jsx)("pre", { style: pre, children: (0, NewCompCode_1.getNewCompositionCode)({
|
|
181
181
|
type,
|
|
182
182
|
durationInFrames: Number(durationInFrames),
|
|
183
183
|
fps: Number(selectedFrameRate),
|
|
@@ -185,7 +185,7 @@ const NewComposition = (props) => {
|
|
|
185
185
|
width: Number(size.width),
|
|
186
186
|
name,
|
|
187
187
|
raw: false,
|
|
188
|
-
}) }
|
|
188
|
+
}) }), (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", style: copyRowStyle, children: [(0, jsx_runtime_1.jsx)(CopyHint_1.CopyHint, {}), (0, jsx_runtime_1.jsx)(layout_1.Flex, {}), (0, jsx_runtime_1.jsx)(CopyButton_1.CopyButton, { label: "Copy code", labelWhenCopied: "Copied!", textToCopy: (0, NewCompCode_1.getNewCompositionCode)({
|
|
189
189
|
type,
|
|
190
190
|
durationInFrames: Number(durationInFrames),
|
|
191
191
|
fps: Number(selectedFrameRate),
|
|
@@ -193,6 +193,6 @@ const NewComposition = (props) => {
|
|
|
193
193
|
width: Number(size.width),
|
|
194
194
|
name,
|
|
195
195
|
raw: true,
|
|
196
|
-
}) }
|
|
196
|
+
}) })] })] })] })] }));
|
|
197
197
|
};
|
|
198
198
|
exports.default = NewComposition;
|
|
@@ -54,6 +54,6 @@ const RemInputForwardRef = (props, ref) => {
|
|
|
54
54
|
current.removeEventListener('mouseleave', onMouseLeave);
|
|
55
55
|
};
|
|
56
56
|
}, [inputRef]);
|
|
57
|
-
return (0, jsx_runtime_1.jsx)("input", { ref: inputRef, tabIndex: tabIndex, ...props, style: style }
|
|
57
|
+
return (0, jsx_runtime_1.jsx)("input", { ref: inputRef, tabIndex: tabIndex, ...props, style: style });
|
|
58
58
|
};
|
|
59
59
|
exports.RemotionInput = (0, react_1.forwardRef)(RemInputForwardRef);
|
|
@@ -21,6 +21,6 @@ const ToggleAspectRatio = ({ aspectRatioLocked, setAspectRatioLocked }) => {
|
|
|
21
21
|
const onClick = (0, react_1.useCallback)(() => {
|
|
22
22
|
setAspectRatioLocked(!aspectRatioLocked);
|
|
23
23
|
}, [aspectRatioLocked, setAspectRatioLocked]);
|
|
24
|
-
return ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: onClick, style: buttonStyle, children: aspectRatioLocked ? ((0, jsx_runtime_1.jsx)(lock_1.LockIcon, { style: iconStyle }
|
|
24
|
+
return ((0, jsx_runtime_1.jsx)("button", { type: "button", onClick: onClick, style: buttonStyle, children: aspectRatioLocked ? ((0, jsx_runtime_1.jsx)(lock_1.LockIcon, { style: iconStyle })) : ((0, jsx_runtime_1.jsx)(lock_1.UnlockIcon, { style: iconStyle })) }));
|
|
25
25
|
};
|
|
26
26
|
exports.ToggleAspectRatio = ToggleAspectRatio;
|
|
@@ -4,7 +4,7 @@ exports.ValidationMessage = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const layout_1 = require("../layout");
|
|
6
6
|
const Triangle = (props) => {
|
|
7
|
-
return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 576 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M248.747 204.705l6.588 112c.373 6.343 5.626 11.295 11.979 11.295h41.37a12 12 0 0 0 11.979-11.295l6.588-112c.405-6.893-5.075-12.705-11.979-12.705h-54.547c-6.903 0-12.383 5.812-11.978 12.705zM330 384c0 23.196-18.804 42-42 42s-42-18.804-42-42 18.804-42 42-42 42 18.804 42 42zm-.423-360.015c-18.433-31.951-64.687-32.009-83.154 0L6.477 440.013C-11.945 471.946 11.118 512 48.054 512H527.94c36.865 0 60.035-39.993 41.577-71.987L329.577 23.985zM53.191 455.002L282.803 57.008c2.309-4.002 8.085-4.002 10.394 0l229.612 397.993c2.308 4-.579 8.998-5.197 8.998H58.388c-4.617.001-7.504-4.997-5.197-8.997z" }
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)("svg", { viewBox: "0 0 576 512", ...props, children: (0, jsx_runtime_1.jsx)("path", { fill: "currentColor", d: "M248.747 204.705l6.588 112c.373 6.343 5.626 11.295 11.979 11.295h41.37a12 12 0 0 0 11.979-11.295l6.588-112c.405-6.893-5.075-12.705-11.979-12.705h-54.547c-6.903 0-12.383 5.812-11.978 12.705zM330 384c0 23.196-18.804 42-42 42s-42-18.804-42-42 18.804-42 42-42 42 18.804 42 42zm-.423-360.015c-18.433-31.951-64.687-32.009-83.154 0L6.477 440.013C-11.945 471.946 11.118 512 48.054 512H527.94c36.865 0 60.035-39.993 41.577-71.987L329.577 23.985zM53.191 455.002L282.803 57.008c2.309-4.002 8.085-4.002 10.394 0l229.612 397.993c2.308 4-.579 8.998-5.197 8.998H58.388c-4.617.001-7.504-4.997-5.197-8.997z" }) }));
|
|
8
8
|
};
|
|
9
9
|
const style = {
|
|
10
10
|
width: 11,
|
|
@@ -18,6 +18,6 @@ const label = {
|
|
|
18
18
|
flex: 1,
|
|
19
19
|
};
|
|
20
20
|
const ValidationMessage = ({ message }) => {
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)(Triangle, { style: style, color: "#f1c40f" }
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: container, children: (0, jsx_runtime_1.jsxs)(layout_1.Row, { align: "center", children: [(0, jsx_runtime_1.jsx)(Triangle, { style: style, color: "#f1c40f" }), (0, jsx_runtime_1.jsx)(layout_1.Spacing, { x: 1 }), (0, jsx_runtime_1.jsx)("div", { style: label, children: message })] }) }));
|
|
22
22
|
};
|
|
23
23
|
exports.ValidationMessage = ValidationMessage;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoRegisterRoot = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const label = {
|
|
7
|
+
fontSize: 13,
|
|
8
|
+
color: 'white',
|
|
9
|
+
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
10
|
+
};
|
|
11
|
+
const container = {
|
|
12
|
+
display: 'flex',
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
flex: 1,
|
|
16
|
+
flexDirection: 'column',
|
|
17
|
+
textAlign: 'center',
|
|
18
|
+
lineHeight: 1.5,
|
|
19
|
+
};
|
|
20
|
+
const link = {
|
|
21
|
+
color: 'white',
|
|
22
|
+
textDecoration: 'none',
|
|
23
|
+
borderBottom: '1px solid',
|
|
24
|
+
};
|
|
25
|
+
const NoRegisterRoot = () => {
|
|
26
|
+
const [show, setShow] = (0, react_1.useState)(() => false);
|
|
27
|
+
(0, react_1.useEffect)(() => {
|
|
28
|
+
// Only show after 2 seconds so there is no flicker when the load is really fast
|
|
29
|
+
const timeout = setTimeout(() => {
|
|
30
|
+
setShow(true);
|
|
31
|
+
}, 2000);
|
|
32
|
+
return () => {
|
|
33
|
+
clearTimeout(timeout);
|
|
34
|
+
};
|
|
35
|
+
}, []);
|
|
36
|
+
if (!show) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)("div", { style: container, children: [(0, jsx_runtime_1.jsx)("div", { style: label, children: "Waiting for registerRoot() to get called." }), (0, jsx_runtime_1.jsxs)("div", { style: label, children: ["Learn more:", ' ', (0, jsx_runtime_1.jsx)("a", { target: '_blank', style: link, href: "https://www.remotion.dev/docs/register-root", children: "remotion.dev/docs/register-root" })] })] }));
|
|
40
|
+
};
|
|
41
|
+
exports.NoRegisterRoot = NoRegisterRoot;
|
|
@@ -7,6 +7,7 @@ const react_1 = require("react");
|
|
|
7
7
|
const remotion_1 = require("remotion");
|
|
8
8
|
const is_current_selected_still_1 = require("../helpers/is-current-selected-still");
|
|
9
9
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
10
|
+
const jump_to_start_1 = require("../icons/jump-to-start");
|
|
10
11
|
const pause_1 = require("../icons/pause");
|
|
11
12
|
const play_1 = require("../icons/play");
|
|
12
13
|
const step_back_1 = require("../icons/step-back");
|
|
@@ -14,7 +15,6 @@ const step_forward_1 = require("../icons/step-forward");
|
|
|
14
15
|
const ControlButton_1 = require("./ControlButton");
|
|
15
16
|
const forwardBackStyle = {
|
|
16
17
|
height: 16,
|
|
17
|
-
width: 16,
|
|
18
18
|
color: 'white',
|
|
19
19
|
};
|
|
20
20
|
const PlayPause = ({ playbackRate, loop }) => {
|
|
@@ -25,7 +25,7 @@ const PlayPause = ({ playbackRate, loop }) => {
|
|
|
25
25
|
loop,
|
|
26
26
|
playbackRate,
|
|
27
27
|
});
|
|
28
|
-
const { playing, play, pause, frameBack, frameForward, isLastFrame } = player_1.PlayerInternals.usePlayer();
|
|
28
|
+
const { playing, play, pause, 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) {
|
|
@@ -46,44 +46,73 @@ const PlayPause = ({ playbackRate, loop }) => {
|
|
|
46
46
|
if (!videoFps) {
|
|
47
47
|
return null;
|
|
48
48
|
}
|
|
49
|
-
frameBack(e.shiftKey ? videoFps : 1);
|
|
50
49
|
e.preventDefault();
|
|
51
|
-
|
|
50
|
+
if (e.altKey) {
|
|
51
|
+
seek(0);
|
|
52
|
+
}
|
|
53
|
+
else if (e.shiftKey) {
|
|
54
|
+
frameBack(videoFps);
|
|
55
|
+
}
|
|
56
|
+
else {
|
|
57
|
+
frameBack(1);
|
|
58
|
+
}
|
|
59
|
+
}, [frameBack, seek, videoFps]);
|
|
52
60
|
const onArrowRight = (0, react_1.useCallback)((e) => {
|
|
53
|
-
if (!
|
|
61
|
+
if (!video) {
|
|
54
62
|
return null;
|
|
55
63
|
}
|
|
56
|
-
|
|
64
|
+
if (e.altKey) {
|
|
65
|
+
seek(video.durationInFrames - 1);
|
|
66
|
+
}
|
|
67
|
+
else if (e.shiftKey) {
|
|
68
|
+
frameForward(video.fps);
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
frameForward(1);
|
|
72
|
+
}
|
|
57
73
|
e.preventDefault();
|
|
58
|
-
}, [frameForward,
|
|
74
|
+
}, [frameForward, seek, video]);
|
|
59
75
|
const oneFrameBack = (0, react_1.useCallback)(() => {
|
|
60
76
|
frameBack(1);
|
|
61
77
|
}, [frameBack]);
|
|
62
78
|
const oneFrameForward = (0, react_1.useCallback)(() => {
|
|
63
79
|
frameForward(1);
|
|
64
80
|
}, [frameForward]);
|
|
81
|
+
const jumpToStart = (0, react_1.useCallback)(() => {
|
|
82
|
+
seek(0);
|
|
83
|
+
}, [seek]);
|
|
84
|
+
const jumpToEnd = (0, react_1.useCallback)(() => {
|
|
85
|
+
if (!video) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
seek(video.durationInFrames - 1);
|
|
89
|
+
}, [seek, video]);
|
|
65
90
|
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
66
91
|
(0, react_1.useEffect)(() => {
|
|
67
92
|
const arrowLeft = keybindings.registerKeybinding('keydown', 'ArrowLeft', onArrowLeft);
|
|
68
93
|
const arrowRight = keybindings.registerKeybinding('keydown', 'ArrowRight', onArrowRight);
|
|
69
94
|
const space = keybindings.registerKeybinding('keydown', ' ', onSpace);
|
|
95
|
+
const a = keybindings.registerKeybinding('keydown', 'a', jumpToStart);
|
|
96
|
+
const e = keybindings.registerKeybinding('keydown', 'e', jumpToEnd);
|
|
70
97
|
return () => {
|
|
71
98
|
arrowLeft.unregister();
|
|
72
99
|
arrowRight.unregister();
|
|
73
100
|
space.unregister();
|
|
101
|
+
a.unregister();
|
|
102
|
+
e.unregister();
|
|
74
103
|
};
|
|
75
|
-
}, [keybindings, onArrowLeft, onArrowRight, onSpace]);
|
|
104
|
+
}, [jumpToEnd, jumpToStart, keybindings, onArrowLeft, onArrowRight, onSpace]);
|
|
76
105
|
if (isStill) {
|
|
77
106
|
return null;
|
|
78
107
|
}
|
|
79
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { "aria-label": "Step back one frame", title: "Step back one frame", disabled: frame === 0, onClick: oneFrameBack, children: (0, jsx_runtime_1.jsx)(step_back_1.StepBack, { style: forwardBackStyle }
|
|
108
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { "aria-label": "Jump to beginning", title: "Jump to beginning", disabled: frame === 0, onClick: jumpToStart, children: (0, jsx_runtime_1.jsx)(jump_to_start_1.JumpToStart, { style: forwardBackStyle }) }), (0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { "aria-label": "Step back one frame", title: "Step back one frame", disabled: frame === 0, onClick: oneFrameBack, children: (0, jsx_runtime_1.jsx)(step_back_1.StepBack, { style: forwardBackStyle }) }), (0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { "aria-label": playing ? 'Pause' : 'Play', title: playing ? 'Pause' : 'Play', disabled: !video, onClick: playing ? pause : play, children: playing ? ((0, jsx_runtime_1.jsx)(pause_1.Pause, { style: {
|
|
80
109
|
height: 14,
|
|
81
110
|
width: 14,
|
|
82
111
|
color: 'white',
|
|
83
|
-
} }
|
|
112
|
+
} })) : ((0, jsx_runtime_1.jsx)(play_1.Play, { style: {
|
|
84
113
|
height: 14,
|
|
85
114
|
width: 14,
|
|
86
115
|
color: 'white',
|
|
87
|
-
} }
|
|
116
|
+
} })) }), (0, jsx_runtime_1.jsx)(ControlButton_1.ControlButton, { "aria-label": "Step forward one frame", title: "Step forward one frame", disabled: isLastFrame, onClick: oneFrameForward, children: (0, jsx_runtime_1.jsx)(step_forward_1.StepForward, { style: forwardBackStyle }) })] }));
|
|
88
117
|
};
|
|
89
118
|
exports.PlayPause = PlayPause;
|
|
@@ -40,13 +40,13 @@ const PlaybackRateSelector = ({ playbackRate, setPlaybackRate }) => {
|
|
|
40
40
|
type: 'item',
|
|
41
41
|
value: newPlaybackRate,
|
|
42
42
|
keyHint: null,
|
|
43
|
-
leftItem: String(playbackRate) === String(newPlaybackRate) ? ((0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {}
|
|
43
|
+
leftItem: String(playbackRate) === String(newPlaybackRate) ? ((0, jsx_runtime_1.jsx)(Checkmark_1.Checkmark, {})) : null,
|
|
44
44
|
subMenu: null,
|
|
45
45
|
};
|
|
46
46
|
});
|
|
47
47
|
const middle = Math.floor(exports.commonPlaybackRates.length / 2);
|
|
48
48
|
return [...values.slice(0, middle), divider, ...values.slice(middle)];
|
|
49
49
|
}, [playbackRate, setPlaybackRate]);
|
|
50
|
-
return ((0, jsx_runtime_1.jsx)("div", { style: style, "aria-label": accessibilityLabel, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: accessibilityLabel, style: comboStyle, selectedId: String(playbackRate), values: items }
|
|
50
|
+
return ((0, jsx_runtime_1.jsx)("div", { style: style, "aria-label": accessibilityLabel, children: (0, jsx_runtime_1.jsx)(ComboBox_1.Combobox, { title: accessibilityLabel, style: comboStyle, selectedId: String(playbackRate), values: items }) }));
|
|
51
51
|
};
|
|
52
52
|
exports.PlaybackRateSelector = PlaybackRateSelector;
|