@remotion/studio 4.0.523 → 4.0.524
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/components/ActionTooltip.d.ts +9 -0
- package/dist/components/ActionTooltip.js +143 -0
- package/dist/components/Canvas.js +3 -2
- package/dist/components/CheckboardToggle.js +7 -10
- package/dist/components/ElementInstallConfirmation.js +6 -41
- package/dist/components/FullscreenToggle.js +5 -8
- package/dist/components/GlobalKeybindings.js +57 -0
- package/dist/components/InspectorSequenceSection.js +5 -5
- package/dist/components/LazySyntaxHighlightedSource.d.ts +4 -0
- package/dist/components/LazySyntaxHighlightedSource.js +43 -0
- package/dist/components/LoopToggle.js +8 -2
- package/dist/components/MenuToolbar.js +6 -4
- package/dist/components/MuteToggle.d.ts +1 -0
- package/dist/components/MuteToggle.js +16 -6
- package/dist/components/NewComposition/NewComposition.d.ts +1 -0
- package/dist/components/NewComposition/NewComposition.js +5 -4
- package/dist/components/NewComposition/NewFolder.js +2 -4
- package/dist/components/NewComposition/RenameComposition.js +3 -2
- package/dist/components/NewComposition/RenameFolder.js +2 -4
- package/dist/components/NewComposition/SlugPreview.d.ts +7 -0
- package/dist/components/NewComposition/SlugPreview.js +18 -0
- package/dist/components/OutlineToggle.js +16 -10
- package/dist/components/PlayPause.js +7 -1
- package/dist/components/PlaybackKeyboardShortcutsManager.d.ts +2 -0
- package/dist/components/PlaybackKeyboardShortcutsManager.js +36 -1
- package/dist/components/PlaybackRateSelector.js +2 -2
- package/dist/components/PreviewToolbar.js +1 -1
- package/dist/components/PreviewToolbarOverflowButton.js +8 -2
- package/dist/components/RenderQueue/CaptionQueueItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +2 -1
- package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +2 -1
- package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +2 -1
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -1
- package/dist/components/RenderQueue/VideoMattingQueueItem.js +2 -1
- package/dist/components/RulersAndGuidesToggle.js +7 -1
- package/dist/components/SettingsButton.js +8 -6
- package/dist/components/SettingsModal.js +1 -1
- package/dist/components/SidebarCollapserControls.js +13 -16
- package/dist/components/SizeSelector.js +2 -2
- package/dist/components/SnappingToggle.js +6 -8
- package/dist/components/StudioSettings.js +32 -18
- package/dist/components/SyntaxHighlightedSource.d.ts +5 -0
- package/dist/components/{HighlightedElementSource.js → SyntaxHighlightedSource.js} +2 -2
- package/dist/components/Timeline/Timeline.js +47 -39
- package/dist/components/Timeline/TimelineLayerChildren.js +12 -9
- package/dist/components/Timeline/TimelineZoomControls.js +2 -1
- package/dist/components/Timeline/timeline-field-display-utils.js +8 -5
- package/dist/components/TimelineCombobox.d.ts +1 -0
- package/dist/components/TimelineCombobox.js +8 -4
- package/dist/components/TimelineInOutToggle.js +8 -15
- package/dist/components/handle-drop.js +3 -2
- package/dist/components/keyboard-shortcuts.d.ts +4 -4
- package/dist/components/keyboard-shortcuts.js +23 -9
- package/dist/error-overlay/remotion-overlay/CodeFrame.js +29 -18
- package/dist/esm/LazyModels-hc33szyn.mjs +11 -0
- package/dist/esm/LazyModels-sg40rjw6.mjs +11 -0
- package/dist/esm/{HighlightedElementSource-jfc66k4p.mjs → SyntaxHighlightedSource-3xks91rz.mjs} +4 -4
- package/dist/esm/{TranscriptionModal-916jqhry.mjs → TranscriptionModal-3ctnxpt6.mjs} +7 -7
- package/dist/esm/{VideoMattingModal-2tm79s9b.mjs → VideoMattingModal-b0r7e60n.mjs} +7 -7
- package/dist/esm/{index-te66vvrp.mjs → index-1b9skrrd.mjs} +4 -4
- package/dist/esm/{index-1x7bsdh6.mjs → index-2j3d1g81.mjs} +2 -2
- package/dist/esm/{index-hy4xcgty.mjs → index-9qtvmwtx.mjs} +1 -1
- package/dist/esm/{index-6cvm9a65.mjs → index-c37kme2v.mjs} +842 -556
- package/dist/esm/{index-5qddp5h7.mjs → index-e3zwf3e7.mjs} +1 -1
- package/dist/esm/{index-x7t2y7ws.mjs → index-er3mh6em.mjs} +3584 -3090
- package/dist/esm/{index-jg13hf2g.mjs → index-k426ye99.mjs} +2 -1
- package/dist/esm/{index-sgtmgc4h.mjs → index-q2epbw93.mjs} +3 -3
- package/dist/esm/{index-3hgr6gjx.mjs → index-q5xv20xx.mjs} +1 -1
- package/dist/esm/{index-czwvnn9g.mjs → index-wbmp5srk.mjs} +1 -1
- package/dist/esm/{index-xhe2m2qr.mjs → index-yfrysr5f.mjs} +18 -10
- package/dist/esm/index.mjs +3 -3
- package/dist/esm/internals.mjs +8 -8
- package/dist/esm/previewEntry.mjs +8 -8
- package/dist/esm/renderEntry.mjs +3 -3
- package/dist/helpers/colors.d.ts +1 -0
- package/dist/helpers/colors.js +4 -3
- package/dist/helpers/inject-css.js +2 -2
- package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -0
- package/dist/helpers/prism-vsc-dark-plus.js +305 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- package/dist/helpers/use-create-composition.d.ts +1 -0
- package/dist/helpers/use-create-composition.js +12 -7
- package/dist/helpers/use-keybinding.d.ts +1 -1
- package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
- package/dist/helpers/use-menu-structure.js +1 -1
- package/dist/helpers/use-rename-composition.d.ts +1 -0
- package/dist/helpers/use-rename-composition.js +11 -5
- package/dist/icons/skills.js +1 -1
- package/dist/renderEntry.js +2 -2
- package/package.json +20 -20
- package/dist/components/HighlightedElementSource.d.ts +0 -5
- package/dist/esm/LazyModels-2trdm224.mjs +0 -11
- package/dist/esm/LazyModels-fjb5ckaq.mjs +0 -11
- package/dist/helpers/prism-tomorrow.d.ts +0 -1
- package/dist/helpers/prism-tomorrow.js +0 -151
- /package/dist/esm/{resolve-composition-component-location-14148845.mjs → resolve-composition-component-location-bt2d6qxq.mjs} +0 -0
|
@@ -26,6 +26,7 @@ const InputAndValidationContainer_1 = require("./InputAndValidationContainer");
|
|
|
26
26
|
const InputDragger_1 = require("./InputDragger");
|
|
27
27
|
const NewCompDuration_1 = require("./NewCompDuration");
|
|
28
28
|
const RemInput_1 = require("./RemInput");
|
|
29
|
+
const SlugPreview_1 = require("./SlugPreview");
|
|
29
30
|
const ValidationMessage_1 = require("./ValidationMessage");
|
|
30
31
|
const content = {
|
|
31
32
|
padding: 12,
|
|
@@ -68,7 +69,7 @@ const FolderDropdownLabel = ({ folderPath, indentation }) => {
|
|
|
68
69
|
};
|
|
69
70
|
const rootFolderId = 'new-composition-root-folder';
|
|
70
71
|
const folderSelectIdPrefix = 'new-composition-folder-';
|
|
71
|
-
const NewCompositionFields = ({ heightValidationMessage, inputRef, nameValidationMessage, setValues, values, widthValidationMessage, }) => {
|
|
72
|
+
const NewCompositionFields = ({ compositionId, heightValidationMessage, inputRef, nameValidationMessage, setValues, values, widthValidationMessage, }) => {
|
|
72
73
|
const { folders } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
73
74
|
const { compositionSortOrder } = (0, react_1.useContext)(folders_1.FolderContext);
|
|
74
75
|
const selectedFolderId = values.folder.folderName
|
|
@@ -207,7 +208,7 @@ const NewCompositionFields = ({ heightValidationMessage, inputRef, nameValidatio
|
|
|
207
208
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Folder" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: folderValues, selectedId: selectedFolderId, style: folderSelectStyle, title: "Folder" }) })
|
|
208
209
|
] }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
209
210
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "ID" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsxs(InputAndValidationContainer_1.InputAndValidationContainer, { children: [
|
|
210
|
-
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, value: values.id, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Composition ID", status: "ok", rightAlign: true }), nameValidationMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
211
|
+
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, value: values.id, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Composition ID", status: "ok", rightAlign: true }), jsx_runtime_1.jsx(SlugPreview_1.SlugPreview, { action: "create", currentName: null, input: values.id, slug: compositionId }), nameValidationMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
211
212
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: nameValidationMessage, type: "error" })
|
|
212
213
|
] })) : null] }) })
|
|
213
214
|
] }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
@@ -252,7 +253,7 @@ const NewCompositionLoaded = ({ canvasCapture, folderName, parentName, stack })
|
|
|
252
253
|
return;
|
|
253
254
|
input.select();
|
|
254
255
|
}, []);
|
|
255
|
-
const { codemod, createComposition, heightValidationMessage, nameValidationMessage, valid, widthValidationMessage, } = (0, use_create_composition_1.useCreateComposition)({
|
|
256
|
+
const { codemod, compositionId, createComposition, heightValidationMessage, nameValidationMessage, valid, widthValidationMessage, } = (0, use_create_composition_1.useCreateComposition)({
|
|
256
257
|
compositions,
|
|
257
258
|
durationInFrames: values.durationInFrames,
|
|
258
259
|
folderName: values.folder.folderName,
|
|
@@ -294,7 +295,7 @@ const NewCompositionLoaded = ({ canvasCapture, folderName, parentName, stack })
|
|
|
294
295
|
}, []);
|
|
295
296
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
296
297
|
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: canvasCapture === null ? 'New composition' : 'Import Canvas Capture' }), jsx_runtime_1.jsxs("form", { onSubmit: onSubmit, children: [
|
|
297
|
-
jsx_runtime_1.jsx("div", { style: content, children: jsx_runtime_1.jsx(exports.NewCompositionFields, { heightValidationMessage: heightValidationMessage, inputRef: inputRef, nameValidationMessage: nameValidationMessage, setValues: setValues, values: values, widthValidationMessage: widthValidationMessage }) }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: null, errorNotification: "Could not create composition", genericSubmitLabel: "Add to root file", submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`, codemod: codemod, stack: values.folder.stack, valid: valid, onSuccess: null, applyCodemod: ({ signal, symbolicatedStack }) => createCanvasCaptureComposition({
|
|
298
|
+
jsx_runtime_1.jsx("div", { style: content, children: jsx_runtime_1.jsx(exports.NewCompositionFields, { compositionId: compositionId, heightValidationMessage: heightValidationMessage, inputRef: inputRef, nameValidationMessage: nameValidationMessage, setValues: setValues, values: values, widthValidationMessage: widthValidationMessage }) }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: null, errorNotification: "Could not create composition", genericSubmitLabel: "Add to root file", submitLabel: ({ relativeRootPath }) => `Add to ${relativeRootPath}`, codemod: codemod, stack: values.folder.stack, valid: valid, onSuccess: null, applyCodemod: ({ signal, symbolicatedStack }) => createCanvasCaptureComposition({
|
|
298
299
|
signal,
|
|
299
300
|
symbolicatedStack,
|
|
300
301
|
}), applyCodemodForPreview: null, fallbackToRootFile: true }) })
|
|
@@ -4,7 +4,6 @@ exports.NewFolder = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
|
-
const colors_1 = require("../../helpers/colors");
|
|
8
7
|
const slugify_name_1 = require("../../helpers/slugify-name");
|
|
9
8
|
const validate_new_folder_name_1 = require("../../helpers/validate-new-folder-name");
|
|
10
9
|
const layout_1 = require("../layout");
|
|
@@ -16,6 +15,7 @@ const CodemodFooter_1 = require("./CodemodFooter");
|
|
|
16
15
|
const DismissableModal_1 = require("./DismissableModal");
|
|
17
16
|
const InputAndValidationContainer_1 = require("./InputAndValidationContainer");
|
|
18
17
|
const RemInput_1 = require("./RemInput");
|
|
18
|
+
const SlugPreview_1 = require("./SlugPreview");
|
|
19
19
|
const ValidationMessage_1 = require("./ValidationMessage");
|
|
20
20
|
const content = {
|
|
21
21
|
padding: 12,
|
|
@@ -69,9 +69,7 @@ const NewFolder = ({ parentName, stack }) => {
|
|
|
69
69
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Parent" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: parentName })
|
|
70
70
|
] })) : null, jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
71
71
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Name" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsxs(InputAndValidationContainer_1.InputAndValidationContainer, { children: [
|
|
72
|
-
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, value: newName, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Folder name", status: "ok", rightAlign: true }),
|
|
73
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsxs("div", { "aria-live": "polite", style: { fontSize: 12, color: colors_1.LIGHT_TEXT }, children: ["Will be created as ", folderName] })
|
|
74
|
-
] })) : null, folderNameErrMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
72
|
+
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, value: newName, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Folder name", status: "ok", rightAlign: true }), jsx_runtime_1.jsx(SlugPreview_1.SlugPreview, { action: "create", currentName: null, input: newName, slug: folderName }), folderNameErrMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
75
73
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: folderNameErrMessage, type: "error" })
|
|
76
74
|
] })) : null] }) })
|
|
77
75
|
] })
|
|
@@ -14,6 +14,7 @@ const CodemodFooter_1 = require("./CodemodFooter");
|
|
|
14
14
|
const DismissableModal_1 = require("./DismissableModal");
|
|
15
15
|
const InputAndValidationContainer_1 = require("./InputAndValidationContainer");
|
|
16
16
|
const RemInput_1 = require("./RemInput");
|
|
17
|
+
const SlugPreview_1 = require("./SlugPreview");
|
|
17
18
|
const ValidationMessage_1 = require("./ValidationMessage");
|
|
18
19
|
const content = {
|
|
19
20
|
padding: 12,
|
|
@@ -44,7 +45,7 @@ const RenameCompositionLoaded = () => {
|
|
|
44
45
|
const onNameChange = (0, react_1.useCallback)((e) => {
|
|
45
46
|
setName(e.target.value);
|
|
46
47
|
}, []);
|
|
47
|
-
const { codemod, renameComposition, valid, validationMessage: compNameErrMessage, } = (0, use_rename_composition_1.useRenameComposition)({
|
|
48
|
+
const { codemod, compositionId, renameComposition, valid, validationMessage: compNameErrMessage, } = (0, use_rename_composition_1.useRenameComposition)({
|
|
48
49
|
compositions,
|
|
49
50
|
currentId: resolved.result.id,
|
|
50
51
|
newId,
|
|
@@ -56,7 +57,7 @@ const RenameCompositionLoaded = () => {
|
|
|
56
57
|
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: `Rename ${resolved.result.id}` }), jsx_runtime_1.jsxs("form", { onSubmit: onSubmit, children: [
|
|
57
58
|
jsx_runtime_1.jsx("div", { style: content, children: jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
58
59
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "ID" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsxs(InputAndValidationContainer_1.InputAndValidationContainer, { children: [
|
|
59
|
-
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, value: newId, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Composition ID", status: "ok", rightAlign: true }), compNameErrMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
60
|
+
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, value: newId, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Composition ID", status: "ok", rightAlign: true }), jsx_runtime_1.jsx(SlugPreview_1.SlugPreview, { action: "rename", currentName: resolved.result.id, input: newId, slug: compositionId }), compNameErrMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
60
61
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: compNameErrMessage, type: "error" })
|
|
61
62
|
] })) : null] }) })
|
|
62
63
|
] }) }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Renaming...', errorNotification: 'Could not rename composition', genericSubmitLabel: 'Rename', submitLabel: ({ relativeRootPath }) => `Modify ${relativeRootPath}`, codemod: codemod, stack: compositionStack, valid: valid, onSuccess: null, applyCodemod: ({ signal, symbolicatedStack }) => renameComposition({
|
|
@@ -4,7 +4,6 @@ exports.RenameFolder = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
|
-
const colors_1 = require("../../helpers/colors");
|
|
8
7
|
const get_folder_id_1 = require("../../helpers/get-folder-id");
|
|
9
8
|
const slugify_name_1 = require("../../helpers/slugify-name");
|
|
10
9
|
const validate_folder_rename_1 = require("../../helpers/validate-folder-rename");
|
|
@@ -17,6 +16,7 @@ const CodemodFooter_1 = require("./CodemodFooter");
|
|
|
17
16
|
const DismissableModal_1 = require("./DismissableModal");
|
|
18
17
|
const InputAndValidationContainer_1 = require("./InputAndValidationContainer");
|
|
19
18
|
const RemInput_1 = require("./RemInput");
|
|
19
|
+
const SlugPreview_1 = require("./SlugPreview");
|
|
20
20
|
const ValidationMessage_1 = require("./ValidationMessage");
|
|
21
21
|
const content = {
|
|
22
22
|
padding: 12,
|
|
@@ -64,9 +64,7 @@ const RenameFolder = ({ folderName, parentName, stack }) => {
|
|
|
64
64
|
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: `Rename ${folderId}` }), jsx_runtime_1.jsxs("form", { onSubmit: onSubmit, children: [
|
|
65
65
|
jsx_runtime_1.jsx("div", { style: content, children: jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
66
66
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Name" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsxs(InputAndValidationContainer_1.InputAndValidationContainer, { children: [
|
|
67
|
-
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, value: newName, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Folder name", status: "ok", rightAlign: true }),
|
|
68
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsxs("div", { "aria-live": "polite", style: { fontSize: 12, color: colors_1.LIGHT_TEXT }, children: ["Will be renamed to ", slug] })
|
|
69
|
-
] })) : null, folderNameErrMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
67
|
+
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { ref: inputRef, value: newName, onChange: onNameChange, type: "text", autoFocus: true, placeholder: "Folder name", status: "ok", rightAlign: true }), jsx_runtime_1.jsx(SlugPreview_1.SlugPreview, { action: "rename", currentName: folderName, input: newName, slug: slug }), folderNameErrMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
70
68
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-start", message: folderNameErrMessage, type: "error" })
|
|
71
69
|
] })) : null] }) })
|
|
72
70
|
] }) }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsx(CodemodFooter_1.CodemodFooter, { loadingNotification: 'Renaming folder...', errorNotification: 'Could not rename folder', genericSubmitLabel: 'Rename', submitLabel: ({ relativeRootPath }) => `Modify ${relativeRootPath}`, codemod: codemod, stack: stack, valid: valid, onSuccess: null, applyCodemod: ({ signal, symbolicatedStack }) => (0, actions_1.applyCodemod)({
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SlugPreview = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const colors_1 = require("../../helpers/colors");
|
|
6
|
+
const layout_1 = require("../layout");
|
|
7
|
+
const SlugPreview = ({ action, currentName, input, slug }) => {
|
|
8
|
+
if (!slug ||
|
|
9
|
+
slug === input ||
|
|
10
|
+
slug === input.trim() ||
|
|
11
|
+
slug === currentName) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
15
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsxs("div", { "aria-live": "polite", style: { fontSize: 12, color: colors_1.LIGHT_TEXT }, children: ["Will be ", action === 'create' ? 'created as' : 'renamed to', " ", slug] })
|
|
16
|
+
] }));
|
|
17
|
+
};
|
|
18
|
+
exports.SlugPreview = SlugPreview;
|
|
@@ -4,25 +4,31 @@ exports.OutlineToggle = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../helpers/colors");
|
|
7
|
+
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
8
|
+
const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
|
|
7
9
|
const editor_outlines_1 = require("../state/editor-outlines");
|
|
10
|
+
const ActionTooltip_1 = require("./ActionTooltip");
|
|
8
11
|
const ControlButton_1 = require("./ControlButton");
|
|
9
12
|
const OutlineToggle = () => {
|
|
10
13
|
const { editorShowOutlines, setEditorShowOutlines } = (0, react_1.useContext)(editor_outlines_1.EditorShowOutlinesContext);
|
|
11
14
|
const onClick = (0, react_1.useCallback)(() => {
|
|
12
15
|
setEditorShowOutlines((current) => !current);
|
|
13
16
|
}, [setEditorShowOutlines]);
|
|
17
|
+
const shortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('toggleOutlines');
|
|
18
|
+
const ariaShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutAriaKeyShortcuts)('toggleOutlines');
|
|
19
|
+
const shortcutsDisabled = (0, use_keybinding_1.areKeyboardShortcutsDisabled)();
|
|
14
20
|
const accessibilityLabel = editorShowOutlines
|
|
15
21
|
? 'Hide outlines'
|
|
16
22
|
: 'Show outlines';
|
|
17
|
-
return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: accessibilityLabel, shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: false, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: "", "aria-label": accessibilityLabel, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaShortcut || undefined, "aria-pressed": editorShowOutlines, onClick: onClick, children: (color) => {
|
|
24
|
+
const iconColor = editorShowOutlines ? colors_1.BLUE : color;
|
|
25
|
+
return (jsx_runtime_1.jsxs("svg", { style: { width: 17, height: 17 }, viewBox: "0 0 512 512", fill: "none", "aria-hidden": "true", focusable: "false", children: [
|
|
26
|
+
jsx_runtime_1.jsx("path", { d: "M64 64H448V448H64V64Z", stroke: iconColor, strokeWidth: "36" }), [
|
|
27
|
+
[16, 16],
|
|
28
|
+
[400, 16],
|
|
29
|
+
[16, 400],
|
|
30
|
+
[400, 400],
|
|
31
|
+
].map(([x, y]) => (jsx_runtime_1.jsx("rect", { x: x, y: y, width: "96", height: "96", rx: "24", fill: colors_1.BACKGROUND_HEX, stroke: iconColor, strokeWidth: "32" }, `${x}-${y}`)))] }));
|
|
32
|
+
} }) }));
|
|
27
33
|
};
|
|
28
34
|
exports.OutlineToggle = OutlineToggle;
|
|
@@ -40,12 +40,14 @@ const react_1 = __importStar(require("react"));
|
|
|
40
40
|
const remotion_1 = require("remotion");
|
|
41
41
|
const is_current_selected_still_1 = require("../helpers/is-current-selected-still");
|
|
42
42
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
43
|
+
const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
|
|
43
44
|
const jump_to_start_1 = require("../icons/jump-to-start");
|
|
44
45
|
const pause_1 = require("../icons/pause");
|
|
45
46
|
const play_1 = require("../icons/play");
|
|
46
47
|
const step_back_1 = require("../icons/step-back");
|
|
47
48
|
const step_forward_1 = require("../icons/step-forward");
|
|
48
49
|
const in_out_1 = require("../state/in-out");
|
|
50
|
+
const ActionTooltip_1 = require("./ActionTooltip");
|
|
49
51
|
const ControlButton_1 = require("./ControlButton");
|
|
50
52
|
const imperative_state_1 = require("./Timeline/imperative-state");
|
|
51
53
|
const timeline_scroll_logic_1 = require("./Timeline/timeline-scroll-logic");
|
|
@@ -82,6 +84,10 @@ const PlayPauseInner = ({ playbackRate, loop, bufferStateDelayInMilliseconds, mu
|
|
|
82
84
|
const { play, pause, pauseAndReturnToPlayStart, frameBack, seek, frameForward, emitter, getCurrentFrame, } = player_1.PlayerInternals.usePlayerMethods();
|
|
83
85
|
const playing = remotion_1.Internals.usePlaying();
|
|
84
86
|
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
87
|
+
const jumpToBeginningShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('jumpToBeginning');
|
|
88
|
+
const jumpToBeginningAriaShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutAriaKeyShortcuts)('jumpToBeginning');
|
|
89
|
+
const playPauseShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('playPause');
|
|
90
|
+
const playPauseAriaShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutAriaKeyShortcuts)('playPause');
|
|
85
91
|
(0, react_1.useEffect)(() => {
|
|
86
92
|
if (isStill) {
|
|
87
93
|
pause();
|
|
@@ -229,6 +235,6 @@ const PlayPauseInner = ({ playbackRate, loop, bufferStateDelayInMilliseconds, mu
|
|
|
229
235
|
};
|
|
230
236
|
}, [bufferStateDelayInMilliseconds, emitter]);
|
|
231
237
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
232
|
-
jsx_runtime_1.jsx(PlaybackManager, { loop: loop, playbackRate: playbackRate, muted: muted, inFrame: inFrame, outFrame: outFrame, getCurrentFrame: getCurrentFrame }), hideNavigationControls ? null : (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { "aria-label": "
|
|
238
|
+
jsx_runtime_1.jsx(PlaybackManager, { loop: loop, playbackRate: playbackRate, muted: muted, inFrame: inFrame, outFrame: outFrame, getCurrentFrame: getCurrentFrame }), hideNavigationControls ? null : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Go to beginning", shortcut: jumpToBeginningShortcut, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { "aria-label": "Go to beginning", "aria-keyshortcuts": jumpToBeginningAriaShortcut || undefined, title: "", disabled: !videoConfig, onClick: jumpToStart, children: (color) => jsx_runtime_1.jsx(jump_to_start_1.JumpToStart, { style: backStyle, color: color }) }) })), hideNavigationControls ? null : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Go back 1 frame", shortcut: "\u2190", delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { "aria-label": "Go back 1 frame", "aria-keyshortcuts": "ArrowLeft", title: "", disabled: !videoConfig, onClick: oneFrameBack, children: (color) => jsx_runtime_1.jsx(step_back_1.StepBack, { style: forwardBackStyle, color: color }) }) })), jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: playing ? 'Pause' : 'Play', shortcut: playPauseShortcut, delay: 800, dismissOnClick: false, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { "aria-label": playing ? 'Pause' : 'Play', "aria-keyshortcuts": playPauseAriaShortcut || undefined, title: "", onClick: playing ? pause : play, disabled: !videoConfig, children: (color) => playing ? (showBufferIndicator ? (jsx_runtime_1.jsx(player_1.PlayerInternals.BufferingIndicator, { type: "studio", color: color })) : (jsx_runtime_1.jsx(pause_1.Pause, { style: iconButton, color: color }))) : (jsx_runtime_1.jsx(play_1.Play, { style: iconButton, color: color })) }) }), hideNavigationControls ? null : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Go forward 1 frame", shortcut: "\u2192", delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { "aria-label": "Go forward 1 frame", "aria-keyshortcuts": "ArrowRight", title: "", disabled: !videoConfig, onClick: oneFrameForward, children: (color) => jsx_runtime_1.jsx(step_forward_1.StepForward, { style: forwardBackStyle, color: color }) }) }))] }));
|
|
233
239
|
};
|
|
234
240
|
exports.PlayPause = react_1.default.memo(PlayPauseInner);
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
export declare const PlaybackKeyboardShortcutsManager: React.FC<{
|
|
3
3
|
readonly setPlaybackRate: React.Dispatch<React.SetStateAction<number>>;
|
|
4
|
+
readonly setMuted: React.Dispatch<React.SetStateAction<boolean>>;
|
|
5
|
+
readonly setLoop: React.Dispatch<React.SetStateAction<boolean>>;
|
|
4
6
|
}>;
|
|
@@ -3,9 +3,44 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.PlaybackKeyboardShortcutsManager = void 0;
|
|
4
4
|
const player_1 = require("@remotion/player");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
+
const is_current_selected_still_1 = require("../helpers/is-current-selected-still");
|
|
6
7
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
7
|
-
const
|
|
8
|
+
const LoopToggle_1 = require("./LoopToggle");
|
|
9
|
+
const MuteToggle_1 = require("./MuteToggle");
|
|
10
|
+
const PlaybackKeyboardShortcutsManager = ({ setPlaybackRate, setMuted, setLoop }) => {
|
|
8
11
|
const keybindings = (0, use_keybinding_1.useKeybinding)();
|
|
12
|
+
const isVideoComposition = (0, is_current_selected_still_1.useIsVideoComposition)();
|
|
13
|
+
(0, react_1.useEffect)(() => {
|
|
14
|
+
if (!isVideoComposition) {
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
const mute = keybindings.registerKeybinding({
|
|
18
|
+
event: 'keydown',
|
|
19
|
+
action: 'toggleMute',
|
|
20
|
+
callback: (event) => {
|
|
21
|
+
if (!event.repeat)
|
|
22
|
+
(0, MuteToggle_1.toggleMute)(setMuted);
|
|
23
|
+
},
|
|
24
|
+
preventDefault: true,
|
|
25
|
+
triggerIfInputFieldFocused: false,
|
|
26
|
+
keepRegisteredWhenNotHighestContext: false,
|
|
27
|
+
});
|
|
28
|
+
const loop = keybindings.registerKeybinding({
|
|
29
|
+
event: 'keydown',
|
|
30
|
+
action: 'toggleLoop',
|
|
31
|
+
callback: (event) => {
|
|
32
|
+
if (!event.repeat)
|
|
33
|
+
(0, LoopToggle_1.toggleLoop)(setLoop);
|
|
34
|
+
},
|
|
35
|
+
preventDefault: true,
|
|
36
|
+
triggerIfInputFieldFocused: false,
|
|
37
|
+
keepRegisteredWhenNotHighestContext: false,
|
|
38
|
+
});
|
|
39
|
+
return () => {
|
|
40
|
+
mute.unregister();
|
|
41
|
+
loop.unregister();
|
|
42
|
+
};
|
|
43
|
+
}, [isVideoComposition, keybindings, setLoop, setMuted]);
|
|
9
44
|
const { play, pause, isPlaying } = player_1.PlayerInternals.usePlayerMethods();
|
|
10
45
|
const onJKey = (0, react_1.useCallback)(() => {
|
|
11
46
|
const wasPlaying = isPlaying();
|
|
@@ -13,7 +13,7 @@ const TimelineCombobox_1 = require("./TimelineCombobox");
|
|
|
13
13
|
const getPlaybackRateLabel = (playbackRate) => {
|
|
14
14
|
return `${playbackRate}x`;
|
|
15
15
|
};
|
|
16
|
-
const accessibilityLabel = '
|
|
16
|
+
const accessibilityLabel = 'Playback rate';
|
|
17
17
|
const usePlaybackRateMenuItems = ({ playbackRate, setPlaybackRate, }) => {
|
|
18
18
|
const items = (0, react_1.useMemo)(() => {
|
|
19
19
|
const divider = {
|
|
@@ -57,6 +57,6 @@ const PlaybackRateSelector = ({ playbackRate, setPlaybackRate, }) => {
|
|
|
57
57
|
if (isStill || canvasContent === null) {
|
|
58
58
|
return null;
|
|
59
59
|
}
|
|
60
|
-
return (jsx_runtime_1.jsx(TimelineCombobox_1.TimelineCombobox, { title: accessibilityLabel, labelWidth: 30, selectedId: selectedId, values: items, renderLeftItem: (color) => (jsx_runtime_1.jsx(playback_rate_1.PlaybackRateIcon, { color: color, playbackRate: playbackRate })), unhoveredIconColor: colors_1.WHITE_ALPHA_80 }));
|
|
60
|
+
return (jsx_runtime_1.jsx(TimelineCombobox_1.TimelineCombobox, { title: accessibilityLabel, tooltipDelay: 800, labelWidth: 30, selectedId: selectedId, values: items, renderLeftItem: (color) => (jsx_runtime_1.jsx(playback_rate_1.PlaybackRateIcon, { color: color, playbackRate: playbackRate })), unhoveredIconColor: colors_1.WHITE_ALPHA_80 }));
|
|
61
61
|
};
|
|
62
62
|
exports.PlaybackRateSelector = PlaybackRateSelector;
|
|
@@ -99,7 +99,7 @@ const PreviewToolbar = ({ readOnlyStudio, bufferStateDelayInMilliseconds }) => {
|
|
|
99
99
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.25 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(SnappingToggle_1.SnappingToggle, {}) })
|
|
100
100
|
] }))] })) : null, jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), canvasContent && isFullscreenSupported ? (jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(FullscreenToggle_1.FullScreenToggle, { hidden: isMobileLayout }) })) : null, jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsxs("div", { style: sideContainer, children: [
|
|
101
101
|
jsx_runtime_1.jsx(layout_1.Flex, {}), isMobileLayout ? null : jsx_runtime_1.jsx(FpsCounter_1.FpsCounter, { playbackSpeed: playbackRate }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 2 }), jsx_runtime_1.jsx(PreviewToolbarControl, { children: jsx_runtime_1.jsx(RenderButton_1.RenderButton, { readOnlyStudio: readOnlyStudio, size: "compact", narrow: isMobileLayout }) }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 })
|
|
102
|
-
] }), jsx_runtime_1.jsx(PlaybackKeyboardShortcutsManager_1.PlaybackKeyboardShortcutsManager, { setPlaybackRate: setPlaybackRate }), jsx_runtime_1.jsx(PlaybackRatePersistor_1.PlaybackRatePersistor, {})
|
|
102
|
+
] }), jsx_runtime_1.jsx(PlaybackKeyboardShortcutsManager_1.PlaybackKeyboardShortcutsManager, { setPlaybackRate: setPlaybackRate, setMuted: setPlayerMuted, setLoop: setLoop }), jsx_runtime_1.jsx(PlaybackRatePersistor_1.PlaybackRatePersistor, {})
|
|
103
103
|
] }));
|
|
104
104
|
};
|
|
105
105
|
exports.PreviewToolbar = PreviewToolbar;
|
|
@@ -23,6 +23,8 @@ const clickButton = (id) => {
|
|
|
23
23
|
const PreviewToolbarOverflowButton = ({ showFullscreen, showPlaybackRate, showLoop, showCanvasViewControls, showCompositionControls, playbackRate, setPlaybackRate, loop, setLoop, }) => {
|
|
24
24
|
const keyboardShortcutsDisabled = (0, use_keybinding_1.areKeyboardShortcutsDisabled)();
|
|
25
25
|
const fullscreenShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('enterFullscreen');
|
|
26
|
+
const loopShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('toggleLoop');
|
|
27
|
+
const outlinesShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('toggleOutlines');
|
|
26
28
|
const checkerboardShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('toggleCheckerboard');
|
|
27
29
|
const { checkerboard, setCheckerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
|
|
28
30
|
const { editorShowOutlines, setEditorShowOutlines } = (0, react_1.useContext)(editor_outlines_1.EditorShowOutlinesContext);
|
|
@@ -83,7 +85,9 @@ const PreviewToolbarOverflowButton = ({ showFullscreen, showPlaybackRate, showLo
|
|
|
83
85
|
label: 'Loop',
|
|
84
86
|
value: 'loop',
|
|
85
87
|
onClick: () => (0, LoopToggle_1.toggleLoop)(setLoop),
|
|
86
|
-
keyHint:
|
|
88
|
+
keyHint: keyboardShortcutsDisabled || loopShortcut === ''
|
|
89
|
+
? null
|
|
90
|
+
: loopShortcut,
|
|
87
91
|
leftItem: loop ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
88
92
|
subMenu: null,
|
|
89
93
|
quickSwitcherLabel: null,
|
|
@@ -111,7 +115,7 @@ const PreviewToolbarOverflowButton = ({ showFullscreen, showPlaybackRate, showLo
|
|
|
111
115
|
label: 'Outlines',
|
|
112
116
|
value: 'outlines',
|
|
113
117
|
onClick: () => setEditorShowOutlines((current) => !current),
|
|
114
|
-
keyHint: null,
|
|
118
|
+
keyHint: keyboardShortcutsDisabled ? null : outlinesShortcut || null,
|
|
115
119
|
leftItem: editorShowOutlines ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
116
120
|
subMenu: null,
|
|
117
121
|
quickSwitcherLabel: null,
|
|
@@ -162,6 +166,7 @@ const PreviewToolbarOverflowButton = ({ showFullscreen, showPlaybackRate, showLo
|
|
|
162
166
|
}, [
|
|
163
167
|
checkerboardShortcut,
|
|
164
168
|
fullscreenShortcut,
|
|
169
|
+
loopShortcut,
|
|
165
170
|
previewSizeItems,
|
|
166
171
|
playbackRateItems,
|
|
167
172
|
selectedPlaybackRate,
|
|
@@ -175,6 +180,7 @@ const PreviewToolbarOverflowButton = ({ showFullscreen, showPlaybackRate, showLo
|
|
|
175
180
|
checkerboard,
|
|
176
181
|
editorShowGuides,
|
|
177
182
|
editorShowOutlines,
|
|
183
|
+
outlinesShortcut,
|
|
178
184
|
editorShowRulers,
|
|
179
185
|
setCheckerboard,
|
|
180
186
|
setEditorShowGuides,
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
7
|
const url_state_1 = require("../../helpers/url-state");
|
|
8
|
+
const ActionTooltip_1 = require("../ActionTooltip");
|
|
8
9
|
const InlineAction_1 = require("../InlineAction");
|
|
9
10
|
const layout_1 = require("../layout");
|
|
10
11
|
const use_select_asset_1 = require("../use-select-asset");
|
|
@@ -124,6 +125,6 @@ const CaptionQueueItem = ({ job, selected }) => {
|
|
|
124
125
|
return (jsx_runtime_1.jsxs(layout_1.Row, { "data-render-queue-item": job.id, style: containerStyle, align: "center", onClick: onClick, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, className: selected ? item_style_1.RENDER_QUEUE_ITEM_SELECTED_CLASSNAME : undefined, children: [
|
|
125
126
|
jsx_runtime_1.jsx(CaptionJobStatus, { job: job }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsxs("div", { style: right, children: [
|
|
126
127
|
jsx_runtime_1.jsx("div", { style: title, children: job.displayName }), jsx_runtime_1.jsx("div", { style: subtitleContainer, children: jsx_runtime_1.jsx("span", { style: subtitle, title: message, children: message }) })
|
|
127
|
-
] }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), job.status === 'running' ? null : (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderRemoveAction, onClick: onRemove,
|
|
128
|
+
] }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), job.status === 'running' ? null : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Clear", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderRemoveAction, onClick: onRemove, "aria-label": "Clear", variant: null }) }))] }));
|
|
128
129
|
};
|
|
129
130
|
exports.CaptionQueueItem = CaptionQueueItem;
|
|
@@ -7,6 +7,7 @@ const colors_1 = require("../../helpers/colors");
|
|
|
7
7
|
const get_asset_metadata_1 = require("../../helpers/get-asset-metadata");
|
|
8
8
|
const use_copy_feedback_1 = require("../../helpers/use-copy-feedback");
|
|
9
9
|
const copy_1 = require("../../icons/copy");
|
|
10
|
+
const ActionTooltip_1 = require("../ActionTooltip");
|
|
10
11
|
const InlineAction_1 = require("../InlineAction");
|
|
11
12
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
12
13
|
const revealIconStyle = {
|
|
@@ -56,6 +57,6 @@ const RenderQueueCopyToClipboard = ({ job }) => {
|
|
|
56
57
|
(0, NotificationCenter_1.showNotification)(`Could not copy to clipboard: ${err.message}`, 2000);
|
|
57
58
|
}
|
|
58
59
|
}, [job.outName, markCopied]);
|
|
59
|
-
return (jsx_runtime_1.jsx(
|
|
60
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Copy to clipboard", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Copy to clipboard", variant: null, renderAction: renderCopyAction, onClick: onClick }) }));
|
|
60
61
|
};
|
|
61
62
|
exports.RenderQueueCopyToClipboard = RenderQueueCopyToClipboard;
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
7
|
const download_blob_1 = require("../../helpers/download-blob");
|
|
8
|
+
const ActionTooltip_1 = require("../ActionTooltip");
|
|
8
9
|
const InlineAction_1 = require("../InlineAction");
|
|
9
10
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
10
11
|
const RenderQueueDownloadItem = ({ job }) => {
|
|
@@ -31,6 +32,6 @@ const RenderQueueDownloadItem = ({ job }) => {
|
|
|
31
32
|
const renderAction = (0, react_1.useCallback)((color) => {
|
|
32
33
|
return (jsx_runtime_1.jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z" }) }));
|
|
33
34
|
}, [icon]);
|
|
34
|
-
return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, renderAction: renderAction, onClick: onClick
|
|
35
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Download", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Download", variant: null, renderAction: renderAction, onClick: onClick }) }));
|
|
35
36
|
};
|
|
36
37
|
exports.RenderQueueDownloadItem = RenderQueueDownloadItem;
|
|
@@ -4,6 +4,7 @@ exports.RenderQueueCancelButton = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
|
+
const ActionTooltip_1 = require("../ActionTooltip");
|
|
7
8
|
const InlineAction_1 = require("../InlineAction");
|
|
8
9
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
9
10
|
const actions_1 = require("./actions");
|
|
@@ -30,6 +31,6 @@ const RenderQueueCancelButton = ({ job }) => {
|
|
|
30
31
|
const renderAction = (0, react_1.useCallback)((color) => {
|
|
31
32
|
return (jsx_runtime_1.jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM512 256c0 141.4-114.6 256-256 256S0 397.4 0 256S114.6 0 256 0S512 114.6 512 256z" }) }));
|
|
32
33
|
}, [icon]);
|
|
33
|
-
return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick, variant: null }));
|
|
34
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Cancel render", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Cancel render", renderAction: renderAction, onClick: onClick, variant: null }) }));
|
|
34
35
|
};
|
|
35
36
|
exports.RenderQueueCancelButton = RenderQueueCancelButton;
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
|
|
7
7
|
const colors_1 = require("../../helpers/colors");
|
|
8
8
|
const folder_1 = require("../../icons/folder");
|
|
9
|
+
const ActionTooltip_1 = require("../ActionTooltip");
|
|
9
10
|
const InlineAction_1 = require("../InlineAction");
|
|
10
11
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
11
12
|
const actions_1 = require("./actions");
|
|
@@ -26,6 +27,6 @@ const RenderQueueOpenInFinderItem = ({ job }) => {
|
|
|
26
27
|
const renderAction = (0, react_1.useCallback)((color) => {
|
|
27
28
|
return jsx_runtime_1.jsx(folder_1.ExpandedFolderIconSolid, { style: icon, color: color });
|
|
28
29
|
}, [icon]);
|
|
29
|
-
return isBrowserStudio ? null : (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick, variant: null }));
|
|
30
|
+
return isBrowserStudio ? null : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Open in Folder", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Open in Folder", renderAction: renderAction, onClick: onClick, variant: null }) }));
|
|
30
31
|
};
|
|
31
32
|
exports.RenderQueueOpenInFinderItem = RenderQueueOpenInFinderItem;
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const save_render_output_1 = require("../../api/save-render-output");
|
|
8
8
|
const colors_1 = require("../../helpers/colors");
|
|
9
|
+
const ActionTooltip_1 = require("../ActionTooltip");
|
|
9
10
|
const InlineAction_1 = require("../InlineAction");
|
|
10
11
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
11
12
|
const actions_1 = require("./actions");
|
|
@@ -41,6 +42,6 @@ const RenderQueueRemoveItem = ({ job }) => {
|
|
|
41
42
|
const renderAction = (0, react_1.useCallback)((color) => {
|
|
42
43
|
return (jsx_runtime_1.jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M310.6 150.6c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L160 210.7 54.6 105.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L114.7 256 9.4 361.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L160 301.3 265.4 406.6c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L205.3 256 310.6 150.6z" }) }));
|
|
43
44
|
}, [icon]);
|
|
44
|
-
return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderAction, onClick: onClick,
|
|
45
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Clear", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Clear", renderAction: renderAction, onClick: onClick, variant: null }) }));
|
|
45
46
|
};
|
|
46
47
|
exports.RenderQueueRemoveItem = RenderQueueRemoveItem;
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
7
|
const retry_payload_1 = require("../../helpers/retry-payload");
|
|
8
8
|
const modals_1 = require("../../state/modals");
|
|
9
|
+
const ActionTooltip_1 = require("../ActionTooltip");
|
|
9
10
|
const InlineAction_1 = require("../InlineAction");
|
|
10
11
|
const context_1 = require("./context");
|
|
11
12
|
const RenderQueueRepeatItem = ({ job }) => {
|
|
@@ -31,6 +32,6 @@ const RenderQueueRepeatItem = ({ job }) => {
|
|
|
31
32
|
const renderAction = (0, react_1.useCallback)((color) => {
|
|
32
33
|
return (jsx_runtime_1.jsx("svg", { style: icon, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M386.3 160H336c-17.7 0-32 14.3-32 32s14.3 32 32 32H464c17.7 0 32-14.3 32-32V64c0-17.7-14.3-32-32-32s-32 14.3-32 32v51.2L414.4 97.6c-87.5-87.5-229.3-87.5-316.8 0s-87.5 229.3 0 316.8s229.3 87.5 316.8 0c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0c-62.5 62.5-163.8 62.5-226.3 0s-62.5-163.8 0-226.3s163.8-62.5 226.3 0L386.3 160z" }) }));
|
|
33
34
|
}, [icon]);
|
|
34
|
-
return (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: onClick, renderAction: renderAction, variant: null }));
|
|
35
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Retry", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Retry", onClick: onClick, renderAction: renderAction, variant: null }) }));
|
|
35
36
|
};
|
|
36
37
|
exports.RenderQueueRepeatItem = RenderQueueRepeatItem;
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const colors_1 = require("../../helpers/colors");
|
|
7
7
|
const url_state_1 = require("../../helpers/url-state");
|
|
8
8
|
const ellipsis_1 = require("../../icons/ellipsis");
|
|
9
|
+
const ActionTooltip_1 = require("../ActionTooltip");
|
|
9
10
|
const InlineAction_1 = require("../InlineAction");
|
|
10
11
|
const InlineDropdown_1 = require("../InlineDropdown");
|
|
11
12
|
const layout_1 = require("../layout");
|
|
@@ -124,6 +125,6 @@ const VideoMattingQueueItem = ({ job, selected }) => {
|
|
|
124
125
|
return (jsx_runtime_1.jsxs(layout_1.Row, { "data-render-queue-item": job.id, style: style, align: "center", onClick: onClick, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [
|
|
125
126
|
jsx_runtime_1.jsx(Status, { job: job }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsxs("div", { style: right, children: [
|
|
126
127
|
jsx_runtime_1.jsx("div", { style: title, children: job.displayName }), jsx_runtime_1.jsx("div", { style: subtitles, title: tooltip, children: messages.map((message) => (jsx_runtime_1.jsx("span", { style: subtitle, children: message }, message))) })
|
|
127
|
-
] }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), done ? (jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { renderAction: (color) => (jsx_runtime_1.jsx(ellipsis_1.EllipsisIcon, { fill: color, svgProps: ellipsisIconStyle })),
|
|
128
|
+
] }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), done ? (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Reveal video layer", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { renderAction: (color) => (jsx_runtime_1.jsx(ellipsis_1.EllipsisIcon, { fill: color, svgProps: ellipsisIconStyle })), "aria-label": "Reveal video layer", values: revealItems, variant: null }) })) : null, job.status === 'running' ? null : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Clear", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderRemove, onClick: onRemove, "aria-label": "Clear", variant: null }) }))] }));
|
|
128
129
|
};
|
|
129
130
|
exports.VideoMattingQueueItem = VideoMattingQueueItem;
|
|
@@ -4,8 +4,11 @@ exports.RulersAndGuidesToggle = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../helpers/colors");
|
|
7
|
+
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
8
|
+
const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
|
|
7
9
|
const editor_guides_1 = require("../state/editor-guides");
|
|
8
10
|
const editor_rulers_1 = require("../state/editor-rulers");
|
|
11
|
+
const ActionTooltip_1 = require("./ActionTooltip");
|
|
9
12
|
const ControlButton_1 = require("./ControlButton");
|
|
10
13
|
const RulersAndGuidesToggle = ({ showGuides }) => {
|
|
11
14
|
const { editorShowGuides, setEditorShowGuides } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
|
|
@@ -22,6 +25,9 @@ const RulersAndGuidesToggle = ({ showGuides }) => {
|
|
|
22
25
|
setEditorShowRulers,
|
|
23
26
|
showGuides,
|
|
24
27
|
]);
|
|
28
|
+
const shortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('toggleRulersAndGuides');
|
|
29
|
+
const ariaShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutAriaKeyShortcuts)('toggleRulersAndGuides');
|
|
30
|
+
const shortcutsDisabled = (0, use_keybinding_1.areKeyboardShortcutsDisabled)();
|
|
25
31
|
const accessibilityLabel = showGuides
|
|
26
32
|
? rulersOrGuidesAreVisible
|
|
27
33
|
? 'Hide rulers and guides'
|
|
@@ -29,6 +35,6 @@ const RulersAndGuidesToggle = ({ showGuides }) => {
|
|
|
29
35
|
: editorShowRulers
|
|
30
36
|
? 'Hide rulers'
|
|
31
37
|
: 'Show rulers';
|
|
32
|
-
return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title:
|
|
38
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: accessibilityLabel, shortcut: shortcutsDisabled ? null : shortcut, delay: 800, dismissOnClick: false, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: "", "aria-label": accessibilityLabel, "aria-keyshortcuts": shortcutsDisabled ? undefined : ariaShortcut || undefined, "aria-pressed": rulersOrGuidesAreVisible, onClick: onClick, children: (color) => (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 576 512", style: { width: 18, height: 18 }, "aria-hidden": "true", focusable: "false", children: jsx_runtime_1.jsx("path", { fill: rulersOrGuidesAreVisible ? colors_1.BLUE : color, d: "M525.9 154.2L186.5 493.6c-6.2 6.2-16.4 6.2-22.6 0L50.7 380.5c-6.2-6.2-6.2-16.4 0-22.6l33.9-33.9 56.6 56.6c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-56.6-56.6 39.6-39.6 33.9 33.9c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-33.9-33.9 39.6-39.6 56.6 56.6c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-56.6-56.6 39.6-39.6 33.9 33.9c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-33.9-33.9 39.6-39.6 56.6 56.6c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6l-56.6-56.6 33.9-33.9c6.2-6.2 16.4-6.2 22.6 0L525.9 131.5c6.2 6.2 6.2 16.4 0 22.6zM73.3 289.9L28.1 335.2c-18.7 18.7-18.7 49.1 0 67.9L141.2 516.2c18.7 18.7 49.1 18.7 67.9 0L548.5 176.8c18.7-18.7 18.7-49.1 0-67.9L435.4-4.2C416.6-23 386.2-23 367.5-4.2 77.1 286.2 140.3 223 73.3 289.9z" }) })) }) }));
|
|
33
39
|
};
|
|
34
40
|
exports.RulersAndGuidesToggle = RulersAndGuidesToggle;
|
|
@@ -7,6 +7,7 @@ const browser_studio_operations_1 = require("../helpers/browser-studio-operation
|
|
|
7
7
|
const colors_1 = require("../helpers/colors");
|
|
8
8
|
const gear_1 = require("../icons/gear");
|
|
9
9
|
const modals_1 = require("../state/modals");
|
|
10
|
+
const ActionTooltip_1 = require("./ActionTooltip");
|
|
10
11
|
const InlineAction_1 = require("./InlineAction");
|
|
11
12
|
const UpdateStatusContext_1 = require("./UpdateStatusContext");
|
|
12
13
|
const SettingsButton = ({ showUpdates }) => {
|
|
@@ -24,7 +25,7 @@ const SettingsButton = ({ showUpdates }) => {
|
|
|
24
25
|
initialTab: updateAvailable
|
|
25
26
|
? 'updates'
|
|
26
27
|
: (0, browser_studio_operations_1.getBrowserStudioOperations)() === null
|
|
27
|
-
? '
|
|
28
|
+
? 'studio'
|
|
28
29
|
: 'shortcuts',
|
|
29
30
|
initialPublicLicenseKey: (_b = (_a = window.remotion_renderDefaults) === null || _a === void 0 ? void 0 : _a.publicLicenseKey) !== null && _b !== void 0 ? _b : null,
|
|
30
31
|
});
|
|
@@ -40,10 +41,11 @@ const SettingsButton = ({ showUpdates }) => {
|
|
|
40
41
|
flexShrink: 0,
|
|
41
42
|
}, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M256 32a224 224 0 1 1 0 448 224 224 0 1 1 0-448zm0 480a256 256 0 1 0 0-512 256 256 0 1 0 0 512zM377 231L273 127c-9.4-9.4-24.6-9.4-33.9 0L135 231c-6.9 6.9-8.9 17.2-5.2 26.2S142.3 272 152 272l40 0 0 72c0 22.1 17.9 40 40 40l48 0c22.1 0 40-17.9 40-40l0-72 40 0c9.7 0 18.5-5.8 22.2-14.8s1.7-19.3-5.2-26.2z" }) }));
|
|
42
43
|
}, []);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
44
|
+
const label = hasBugfixesAvailable
|
|
45
|
+
? 'Bugfixes available'
|
|
46
|
+
: updateAvailable
|
|
47
|
+
? 'Update available'
|
|
48
|
+
: 'Settings';
|
|
49
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: label, shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: openModal, renderAction: updateAvailable ? renderUpdateIcon : renderGearIcon, unhoveredColor: hasBugfixesAvailable ? colors_1.WARNING_COLOR : colors_1.WHITE_ALPHA_80, title: "", "aria-label": label }) }));
|
|
48
50
|
};
|
|
49
51
|
exports.SettingsButton = SettingsButton;
|