@remotion/studio 4.0.521 → 4.0.523
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/api/install-package.js +4 -2
- package/dist/components/AssetAudioVolume.d.ts +5 -0
- package/dist/components/AssetAudioVolume.js +33 -0
- package/dist/components/Canvas.js +5 -6
- package/dist/components/CanvasIfSizeIsAvailable.js +7 -0
- package/dist/components/CaptionInspector.js +74 -20
- package/dist/components/CheckboardToggle.js +8 -6
- package/dist/components/Checkbox.d.ts +1 -0
- package/dist/components/Checkbox.js +2 -2
- package/dist/components/CompositionContextButton.js +4 -1
- package/dist/components/CompositionSelectorItem.js +2 -2
- package/dist/components/ConfigureLicenseModal.js +1 -1
- package/dist/components/CopyButton.js +7 -14
- package/dist/components/CurrentAsset.js +40 -6
- package/dist/components/Editor.js +6 -5
- package/dist/components/EditorContent.js +1 -1
- package/dist/components/EditorContexts.js +3 -1
- package/dist/components/ElementInstallConfirmation.js +290 -136
- package/dist/components/FixComputedValueModal.js +56 -16
- package/dist/components/FullscreenToggle.js +9 -8
- package/dist/components/GlobalKeybindings.js +50 -49
- package/dist/components/HighlightedElementSource.d.ts +5 -0
- package/dist/components/HighlightedElementSource.js +78 -0
- package/dist/components/InspectorLocationCopy.js +10 -5
- package/dist/components/InspectorPanel/MultiSequenceField.d.ts +12 -0
- package/dist/components/InspectorPanel/MultiSequenceField.js +131 -0
- package/dist/components/InspectorPanel/MultiSequenceInspector.d.ts +8 -0
- package/dist/components/InspectorPanel/MultiSequenceInspector.js +102 -0
- package/dist/components/InspectorPanel/MultiSequenceNumberField.d.ts +9 -0
- package/dist/components/InspectorPanel/MultiSequenceNumberField.js +88 -0
- package/dist/components/InspectorPanel.js +4 -0
- package/dist/components/InspectorSequenceSection.js +64 -1
- package/dist/components/InstallPackage.js +4 -5
- package/dist/components/KeyboardShortcutsSettings.js +212 -33
- package/dist/components/MenuBuildIndicator.js +7 -2
- package/dist/components/MenuCompositionName.js +62 -6
- package/dist/components/MenuToolbar.js +7 -5
- package/dist/components/ModalContainer.d.ts +1 -0
- package/dist/components/ModalContainer.js +2 -2
- package/dist/components/Modals.js +3 -1
- package/dist/components/ModelManager.d.ts +16 -0
- package/dist/components/ModelManager.js +200 -0
- package/dist/components/ModelsSettings.d.ts +2 -0
- package/dist/components/ModelsSettings.js +133 -0
- package/dist/components/NewComposition/DismissableModal.d.ts +1 -0
- package/dist/components/NewComposition/DismissableModal.js +2 -2
- package/dist/components/NewComposition/InputDragger.d.ts +2 -2
- package/dist/components/NewComposition/InputDragger.js +6 -6
- package/dist/components/NewComposition/NewFolder.js +11 -8
- package/dist/components/NewComposition/RenameFolder.js +17 -10
- package/dist/components/OptionalPackageModal.d.ts +11 -0
- package/dist/components/OptionalPackageModal.js +155 -0
- package/dist/components/PlayPause.js +4 -8
- package/dist/components/PlaybackKeyboardShortcutsManager.js +3 -6
- package/dist/components/PreviewToolbarOverflowButton.js +11 -2
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +5 -2
- package/dist/components/RadioButton.d.ts +1 -0
- package/dist/components/RadioButton.js +2 -2
- package/dist/components/RenderButton.js +5 -1
- package/dist/components/RenderModal/CliCopyButton.js +13 -27
- package/dist/components/RenderModal/NumberSetting.d.ts +6 -1
- package/dist/components/RenderModal/NumberSetting.js +2 -2
- package/dist/components/RenderModal/RenderModalBasic.js +1 -1
- package/dist/components/RenderModal/RenderModalOutputName.d.ts +3 -1
- package/dist/components/RenderModal/RenderModalOutputName.js +4 -4
- package/dist/components/RenderModal/SeparateAudioOption.js +1 -1
- package/dist/components/RenderModal/WebRenderModalBasic.js +1 -1
- package/dist/components/RenderQueue/CaptionQueueItem.d.ts +6 -0
- package/dist/components/RenderQueue/CaptionQueueItem.js +129 -0
- package/dist/components/RenderQueue/CaptionQueueProcessor.d.ts +1 -0
- package/dist/components/RenderQueue/CaptionQueueProcessor.js +110 -0
- package/dist/components/RenderQueue/CaptionQueueProcessorLoader.d.ts +2 -0
- package/dist/components/RenderQueue/CaptionQueueProcessorLoader.js +54 -0
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +7 -4
- package/dist/components/RenderQueue/RenderQueueItem.js +3 -3
- package/dist/components/RenderQueue/VideoMattingQueueItem.d.ts +6 -0
- package/dist/components/RenderQueue/VideoMattingQueueItem.js +129 -0
- package/dist/components/RenderQueue/VideoMattingQueueProcessor.d.ts +1 -0
- package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +105 -0
- package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.d.ts +2 -0
- package/dist/components/RenderQueue/VideoMattingQueueProcessorLoader.js +54 -0
- package/dist/components/RenderQueue/caption-job-types.d.ts +47 -0
- package/dist/components/RenderQueue/caption-job-types.js +7 -0
- package/dist/components/RenderQueue/context.d.ts +16 -0
- package/dist/components/RenderQueue/context.js +224 -11
- package/dist/components/RenderQueue/index.js +34 -10
- package/dist/components/RenderQueue/item-style.d.ts +1 -0
- package/dist/components/RenderQueue/item-style.js +2 -1
- package/dist/components/RenderQueue/load-model-for-job.d.ts +11 -0
- package/dist/components/RenderQueue/load-model-for-job.js +14 -0
- package/dist/components/RenderQueue/video-matting-job-types.d.ts +38 -0
- package/dist/components/RenderQueue/video-matting-job-types.js +5 -0
- package/dist/components/RendersTab.js +4 -4
- package/dist/components/SegmentedControl.d.ts +2 -2
- package/dist/components/SegmentedControl.js +38 -13
- package/dist/components/SelectedOutlinePolygon.js +8 -2
- package/dist/components/SettingsButton.d.ts +4 -0
- package/dist/components/SettingsButton.js +49 -0
- package/dist/components/SettingsModal.d.ts +1 -1
- package/dist/components/SettingsModal.js +3 -1
- package/dist/components/ShowOutlinesProvider.js +12 -0
- package/dist/components/SidebarCollapserControls.js +21 -16
- package/dist/components/SizeSelector.js +10 -2
- package/dist/components/SkillsSettings.js +11 -8
- package/dist/components/SnappingToggle.js +5 -2
- package/dist/components/Splitter/SplitterContainer.js +63 -10
- package/dist/components/Splitter/SplitterContext.d.ts +3 -0
- package/dist/components/Splitter/SplitterContext.js +5 -1
- package/dist/components/Splitter/SplitterElement.js +11 -2
- package/dist/components/Splitter/SplitterHandle.d.ts +1 -0
- package/dist/components/Splitter/SplitterHandle.js +55 -25
- package/dist/components/Tabs/vertical.d.ts +1 -0
- package/dist/components/Tabs/vertical.js +2 -2
- package/dist/components/TimeValue.js +2 -3
- package/dist/components/Timeline/SequencePropsObserver.js +4 -0
- package/dist/components/Timeline/SubscribeToNodePaths.d.ts +2 -1
- package/dist/components/Timeline/SubscribeToNodePaths.js +2 -1
- package/dist/components/Timeline/Timeline.js +17 -46
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +2 -4
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +3 -18
- package/dist/components/Timeline/TimelineDragHandler.js +11 -6
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +1 -0
- package/dist/components/Timeline/TimelinePinchZoom.js +6 -30
- package/dist/components/Timeline/TimelinePlayCursorSyncer.js +1 -7
- package/dist/components/Timeline/TimelineRowChrome.js +11 -3
- package/dist/components/Timeline/TimelineSchemaField.js +8 -4
- package/dist/components/Timeline/TimelineSelection.d.ts +2 -0
- package/dist/components/Timeline/TimelineSelection.js +55 -2
- package/dist/components/Timeline/TimelineSequence.js +148 -25
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +0 -1
- package/dist/components/Timeline/TimelineSequenceItem.js +220 -112
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +35 -5
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +233 -138
- package/dist/components/Timeline/TimelineSlider.js +1 -4
- package/dist/components/Timeline/TimelineTimeIndicators.js +1 -0
- package/dist/components/Timeline/TimelineWidthProvider.js +2 -5
- package/dist/components/Timeline/TimelineZoomControls.js +20 -20
- package/dist/components/Timeline/get-sequence-split-menu-item.d.ts +11 -0
- package/dist/components/Timeline/get-sequence-split-menu-item.js +55 -0
- package/dist/components/Timeline/use-asset-timeline-context-menu.d.ts +2 -0
- package/dist/components/Timeline/use-asset-timeline-context-menu.js +52 -0
- package/dist/components/Timeline/use-sequence-props-subscription.d.ts +3 -2
- package/dist/components/Timeline/use-sequence-props-subscription.js +4 -10
- package/dist/components/TimelineInOutToggle.js +20 -17
- package/dist/components/TopPanel.js +3 -19
- package/dist/components/Transcription/LazyModels.d.ts +1 -0
- package/dist/components/Transcription/LazyModels.js +5 -0
- package/dist/components/Transcription/Models.d.ts +6 -0
- package/dist/components/Transcription/Models.js +18 -0
- package/dist/components/Transcription/TranscriptionModal.d.ts +3 -0
- package/dist/components/Transcription/TranscriptionModal.js +428 -0
- package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.d.ts +5 -0
- package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +48 -0
- package/dist/components/Transcription/caption-output-name.d.ts +2 -0
- package/dist/components/Transcription/caption-output-name.js +10 -0
- package/dist/components/Transcription/resample-media-to-16-khz.d.ts +6 -0
- package/dist/components/Transcription/resample-media-to-16-khz.js +82 -0
- package/dist/components/Transcription/whisper-languages.d.ts +2 -0
- package/dist/components/Transcription/whisper-languages.js +104 -0
- package/dist/components/Transcription/whisper-webgpu-capability.d.ts +2 -0
- package/dist/components/Transcription/whisper-webgpu-capability.js +7 -0
- package/dist/components/UndoRedoButtons.js +13 -38
- package/dist/components/UpdatesSettings.js +17 -17
- package/dist/components/VideoMatting/LazyModels.d.ts +1 -0
- package/dist/components/VideoMatting/LazyModels.js +5 -0
- package/dist/components/VideoMatting/Models.d.ts +6 -0
- package/dist/components/VideoMatting/Models.js +18 -0
- package/dist/components/VideoMatting/VideoMattingModal.d.ts +3 -0
- package/dist/components/VideoMatting/VideoMattingModal.js +207 -0
- package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.d.ts +5 -0
- package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +46 -0
- package/dist/components/VideoMatting/video-matting-capability.d.ts +2 -0
- package/dist/components/VideoMatting/video-matting-capability.js +7 -0
- package/dist/components/WebMcp.js +439 -22
- package/dist/components/ZoomPersistor.js +6 -3
- package/dist/components/composition-menu-items.js +1 -1
- package/dist/components/import-assets.d.ts +3 -2
- package/dist/components/import-assets.js +5 -9
- package/dist/components/keyboard-shortcuts.d.ts +17 -1
- package/dist/components/keyboard-shortcuts.js +177 -89
- package/dist/components/public-output-name.d.ts +5 -0
- package/dist/components/public-output-name.js +60 -0
- package/dist/components/use-model-cache-status.d.ts +7 -0
- package/dist/components/use-model-cache-status.js +35 -0
- package/dist/esm/CaptionQueueProcessor-k0yrm3dj.mjs +211 -0
- package/dist/esm/HighlightedElementSource-jfc66k4p.mjs +1236 -0
- package/dist/esm/LazyModels-2trdm224.mjs +11 -0
- package/dist/esm/LazyModels-fjb5ckaq.mjs +11 -0
- package/dist/esm/TranscriptionModal-916jqhry.mjs +1011 -0
- package/dist/esm/VideoMattingModal-2tm79s9b.mjs +374 -0
- package/dist/esm/VideoMattingQueueProcessor-t1hgm2rm.mjs +109 -0
- package/dist/esm/index-1x7bsdh6.mjs +261 -0
- package/dist/esm/index-3hgr6gjx.mjs +41 -0
- package/dist/esm/index-5qddp5h7.mjs +36 -0
- package/dist/esm/index-5zrb1ft4.mjs +39 -0
- package/dist/esm/index-6cvm9a65.mjs +45923 -0
- package/dist/esm/index-7tt71e8n.mjs +36 -0
- package/dist/esm/index-9x6e1dq0.mjs +428 -0
- package/dist/esm/index-cw0pnpg5.mjs +50 -0
- package/dist/esm/index-czwvnn9g.mjs +35 -0
- package/dist/esm/index-hy4xcgty.mjs +1366 -0
- package/dist/esm/{chunk-je0h1bgt.js → index-jg13hf2g.mjs} +3 -1
- package/dist/esm/{chunk-6jf1natv.js → index-rcv7qkt5.mjs} +18 -1
- package/dist/esm/index-sgtmgc4h.mjs +423 -0
- package/dist/esm/index-te66vvrp.mjs +142 -0
- package/dist/esm/index-v4tr1bft.mjs +20 -0
- package/dist/esm/index-x7t2y7ws.mjs +54194 -0
- package/dist/esm/index-xhe2m2qr.mjs +1146 -0
- package/dist/esm/index.mjs +45 -933
- package/dist/esm/internals.mjs +13 -114127
- package/dist/esm/previewEntry.mjs +387 -114784
- package/dist/esm/renderEntry.mjs +3 -3
- package/dist/esm/{chunk-m0jqdbkr.js → resolve-composition-component-location-14148845.mjs} +1 -1
- package/dist/helpers/copy-text.js +1 -2
- package/dist/helpers/drag-aware-double-click.d.ts +2 -1
- package/dist/helpers/drag-aware-double-click.js +12 -1
- package/dist/helpers/get-asset-metadata.d.ts +1 -0
- package/dist/helpers/get-asset-metadata.js +4 -0
- package/dist/helpers/hoverable.js +8 -0
- package/dist/helpers/inject-css.js +2 -0
- package/dist/helpers/optional-package-dependencies.d.ts +3 -0
- package/dist/helpers/optional-package-dependencies.js +24 -0
- package/dist/helpers/pointer-session.d.ts +6 -0
- package/dist/helpers/pointer-session.js +36 -14
- package/dist/helpers/prism-tomorrow.d.ts +1 -0
- package/dist/helpers/prism-tomorrow.js +151 -0
- package/dist/helpers/sequence-node-path-mutations.js +11 -0
- package/dist/helpers/slugify-name.d.ts +1 -0
- package/dist/helpers/slugify-name.js +14 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -0
- package/dist/helpers/studio-runtime-config.js +6 -1
- package/dist/helpers/use-copy-feedback.d.ts +4 -0
- package/dist/helpers/use-copy-feedback.js +19 -0
- package/dist/helpers/use-keybinding.d.ts +9 -3
- package/dist/helpers/use-keybinding.js +8 -9
- package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -0
- package/dist/helpers/use-keyboard-shortcut-label.js +15 -0
- package/dist/helpers/use-menu-structure.js +58 -13
- package/dist/icons/copy.d.ts +5 -0
- package/dist/icons/copy.js +12 -0
- package/dist/icons/input-props.d.ts +1 -1
- package/dist/icons/input-props.js +2 -2
- package/dist/icons/models.d.ts +4 -0
- package/dist/icons/models.js +7 -0
- package/dist/icons/separation.d.ts +4 -0
- package/dist/icons/separation.js +7 -0
- package/dist/icons/transcription.d.ts +4 -0
- package/dist/icons/transcription.js +7 -0
- package/dist/icons/upload.js +1 -1
- package/dist/state/canvas-ref.d.ts +1 -0
- package/dist/state/canvas-ref.js +2 -1
- package/dist/state/modals.d.ts +14 -2
- package/dist/state/sidebar.d.ts +3 -0
- package/dist/state/sidebar.js +6 -1
- package/dist/state/timeline-zoom.d.ts +1 -1
- package/dist/state/timeline-zoom.js +3 -3
- package/dist/visual-controls/VisualControls.js +4 -0
- package/package.json +34 -20
- package/dist/components/UpdateCheck.d.ts +0 -1
- package/dist/components/UpdateCheck.js +0 -79
- package/dist/esm/chunk-emw4k5b0.js +0 -99527
- package/dist/esm/chunk-vkrvnx2h.js +0 -99378
- package/dist/helpers/use-max-media-duration.d.ts +0 -2
- package/dist/helpers/use-max-media-duration.js +0 -61
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.OptionalPackageModal = exports.useOptionalPackageInstalled = exports.installOptionalPackage = exports.markOptionalPackageInstalled = exports.isOptionalPackageInstalled = void 0;
|
|
37
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
39
|
+
const install_package_1 = require("../api/install-package");
|
|
40
|
+
const colors_1 = require("../helpers/colors");
|
|
41
|
+
const optional_package_dependencies_1 = require("../helpers/optional-package-dependencies");
|
|
42
|
+
const modals_1 = require("../state/modals");
|
|
43
|
+
const Button_1 = require("./Button");
|
|
44
|
+
const layout_1 = require("./layout");
|
|
45
|
+
const ModalButton_1 = require("./ModalButton");
|
|
46
|
+
const ModalContainer_1 = require("./ModalContainer");
|
|
47
|
+
const ModalFooter_1 = require("./ModalFooter");
|
|
48
|
+
const ModalHeader_1 = require("./ModalHeader");
|
|
49
|
+
const Spinner_1 = require("./Spinner");
|
|
50
|
+
const panelStyle = {
|
|
51
|
+
width: 'min(520px, calc(100vw - 40px))',
|
|
52
|
+
};
|
|
53
|
+
const contentStyle = {
|
|
54
|
+
color: colors_1.WHITE,
|
|
55
|
+
fontFamily: 'sans-serif',
|
|
56
|
+
fontSize: 14,
|
|
57
|
+
lineHeight: 1.5,
|
|
58
|
+
padding: 16,
|
|
59
|
+
};
|
|
60
|
+
const codeStyle = {
|
|
61
|
+
color: 'inherit',
|
|
62
|
+
fontFamily: 'monospace',
|
|
63
|
+
fontSize: 'inherit',
|
|
64
|
+
};
|
|
65
|
+
const statusStyle = {
|
|
66
|
+
alignItems: 'center',
|
|
67
|
+
color: colors_1.LIGHT_TEXT,
|
|
68
|
+
display: 'flex',
|
|
69
|
+
fontFamily: 'sans-serif',
|
|
70
|
+
fontSize: 14,
|
|
71
|
+
gap: 10,
|
|
72
|
+
lineHeight: 1.5,
|
|
73
|
+
};
|
|
74
|
+
const errorStyle = {
|
|
75
|
+
color: colors_1.WARNING_COLOR,
|
|
76
|
+
marginTop: 12,
|
|
77
|
+
whiteSpace: 'pre-wrap',
|
|
78
|
+
};
|
|
79
|
+
const cancelStyle = { minWidth: 90 };
|
|
80
|
+
const isOptionalPackageInstalled = (packageName) => {
|
|
81
|
+
var _a;
|
|
82
|
+
var _b;
|
|
83
|
+
return (_b = (_a = window.remotion_installedPackages) === null || _a === void 0 ? void 0 : _a.includes(packageName)) !== null && _b !== void 0 ? _b : false;
|
|
84
|
+
};
|
|
85
|
+
exports.isOptionalPackageInstalled = isOptionalPackageInstalled;
|
|
86
|
+
const OPTIONAL_PACKAGE_INSTALLED_EVENT = 'remotion-optional-package-installed';
|
|
87
|
+
const markOptionalPackageInstalled = (packageName) => {
|
|
88
|
+
var _a;
|
|
89
|
+
window.remotion_installedPackages = Array.from(new Set([...((_a = window.remotion_installedPackages) !== null && _a !== void 0 ? _a : []), packageName]));
|
|
90
|
+
window.dispatchEvent(new CustomEvent(OPTIONAL_PACKAGE_INSTALLED_EVENT, {
|
|
91
|
+
detail: packageName,
|
|
92
|
+
}));
|
|
93
|
+
};
|
|
94
|
+
exports.markOptionalPackageInstalled = markOptionalPackageInstalled;
|
|
95
|
+
const installOptionalPackage = async (packageName) => {
|
|
96
|
+
const dependencies = (0, optional_package_dependencies_1.withRequiredAuxiliaryPackages)([
|
|
97
|
+
{ name: packageName, version: null },
|
|
98
|
+
]);
|
|
99
|
+
await (0, install_package_1.installPackages)(dependencies);
|
|
100
|
+
for (const dependency of dependencies) {
|
|
101
|
+
(0, exports.markOptionalPackageInstalled)(dependency.name);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
exports.installOptionalPackage = installOptionalPackage;
|
|
105
|
+
const useOptionalPackageInstalled = (packageName) => {
|
|
106
|
+
const [installed, setInstalled] = (0, react_1.useState)(() => (0, exports.isOptionalPackageInstalled)(packageName));
|
|
107
|
+
(0, react_1.useEffect)(() => {
|
|
108
|
+
const onInstalled = (event) => {
|
|
109
|
+
if (event.detail === packageName) {
|
|
110
|
+
setInstalled(true);
|
|
111
|
+
}
|
|
112
|
+
};
|
|
113
|
+
window.addEventListener(OPTIONAL_PACKAGE_INSTALLED_EVENT, onInstalled);
|
|
114
|
+
return () => window.removeEventListener(OPTIONAL_PACKAGE_INSTALLED_EVENT, onInstalled);
|
|
115
|
+
}, [packageName]);
|
|
116
|
+
return installed;
|
|
117
|
+
};
|
|
118
|
+
exports.useOptionalPackageInstalled = useOptionalPackageInstalled;
|
|
119
|
+
const OptionalPackageModal = ({ ariaLabel, children, packageName, title }) => {
|
|
120
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
121
|
+
const installed = (0, exports.useOptionalPackageInstalled)(packageName);
|
|
122
|
+
const [installState, setInstallState] = (0, react_1.useState)({
|
|
123
|
+
type: 'idle',
|
|
124
|
+
});
|
|
125
|
+
const busy = installState.type === 'installing';
|
|
126
|
+
const packageNames = (0, optional_package_dependencies_1.withRequiredAuxiliaryPackages)([
|
|
127
|
+
{ name: packageName, version: null },
|
|
128
|
+
]).map((dependency) => dependency.name);
|
|
129
|
+
const packagesLabel = packageNames.join(' and ');
|
|
130
|
+
const dismiss = (0, react_1.useCallback)(() => {
|
|
131
|
+
if (!busy) {
|
|
132
|
+
setSelectedModal(null);
|
|
133
|
+
}
|
|
134
|
+
}, [busy, setSelectedModal]);
|
|
135
|
+
const install = (0, react_1.useCallback)(async () => {
|
|
136
|
+
setInstallState({ type: 'installing' });
|
|
137
|
+
try {
|
|
138
|
+
await (0, exports.installOptionalPackage)(packageName);
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
setInstallState({ type: 'error', error: error });
|
|
142
|
+
}
|
|
143
|
+
}, [packageName]);
|
|
144
|
+
if (installed) {
|
|
145
|
+
return children;
|
|
146
|
+
}
|
|
147
|
+
return (jsx_runtime_1.jsxs(ModalContainer_1.ModalContainer, { ariaLabel: ariaLabel, onEscape: dismiss, onOutsideClick: dismiss, panelStyle: panelStyle, children: [
|
|
148
|
+
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: title, onClose: dismiss }), jsx_runtime_1.jsx("div", { style: contentStyle, children: busy ? (jsx_runtime_1.jsxs("div", { style: statusStyle, children: [
|
|
149
|
+
jsx_runtime_1.jsx(Spinner_1.Spinner, { duration: 0.5, size: 18 }), `Installing ${packagesLabel}…`] })) : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: ["This requires installing", ' ', packageNames.map((name, index) => (jsx_runtime_1.jsxs(react_1.default.Fragment, { children: [index > 0 ? ' and ' : null, jsx_runtime_1.jsx("code", { style: codeStyle, children: name })
|
|
150
|
+
] }, name))), ". Continue?", installState.type === 'error' ? (jsx_runtime_1.jsx("div", { style: errorStyle, children: installState.error.message })) : null] })) }), jsx_runtime_1.jsx(ModalFooter_1.ModalFooterContainer, { children: jsx_runtime_1.jsxs(layout_1.Row, { align: "center", children: [
|
|
151
|
+
jsx_runtime_1.jsx(layout_1.Flex, {}), jsx_runtime_1.jsx(Button_1.Button, { disabled: busy, onClick: dismiss, style: cancelStyle, children: "Cancel" }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx(ModalButton_1.ModalButton, { disabled: busy, onClick: install, autoFocus: true, children: installState.type === 'error' ? 'Retry' : 'Continue' })
|
|
152
|
+
] }) })
|
|
153
|
+
] }));
|
|
154
|
+
};
|
|
155
|
+
exports.OptionalPackageModal = OptionalPackageModal;
|
|
@@ -147,36 +147,32 @@ const PlayPauseInner = ({ playbackRate, loop, bufferStateDelayInMilliseconds, mu
|
|
|
147
147
|
});
|
|
148
148
|
const space = keybindings.registerKeybinding({
|
|
149
149
|
event: 'keydown',
|
|
150
|
-
|
|
150
|
+
action: 'playPause',
|
|
151
151
|
callback: onSpace,
|
|
152
|
-
commandCtrlKey: false,
|
|
153
152
|
preventDefault: true,
|
|
154
153
|
triggerIfInputFieldFocused: false,
|
|
155
154
|
keepRegisteredWhenNotHighestContext: false,
|
|
156
155
|
});
|
|
157
156
|
const enter = keybindings.registerKeybinding({
|
|
158
157
|
event: 'keydown',
|
|
159
|
-
|
|
158
|
+
action: 'pauseAndReturnToPlaybackStart',
|
|
160
159
|
callback: onEnter,
|
|
161
|
-
commandCtrlKey: false,
|
|
162
160
|
preventDefault: false,
|
|
163
161
|
triggerIfInputFieldFocused: false,
|
|
164
162
|
keepRegisteredWhenNotHighestContext: false,
|
|
165
163
|
});
|
|
166
164
|
const a = keybindings.registerKeybinding({
|
|
167
165
|
event: 'keydown',
|
|
168
|
-
|
|
166
|
+
action: 'jumpToBeginning',
|
|
169
167
|
callback: jumpToStart,
|
|
170
|
-
commandCtrlKey: false,
|
|
171
168
|
preventDefault: true,
|
|
172
169
|
triggerIfInputFieldFocused: false,
|
|
173
170
|
keepRegisteredWhenNotHighestContext: false,
|
|
174
171
|
});
|
|
175
172
|
const e = keybindings.registerKeybinding({
|
|
176
173
|
event: 'keydown',
|
|
177
|
-
|
|
174
|
+
action: 'jumpToEnd',
|
|
178
175
|
callback: jumpToEnd,
|
|
179
|
-
commandCtrlKey: false,
|
|
180
176
|
preventDefault: true,
|
|
181
177
|
triggerIfInputFieldFocused: false,
|
|
182
178
|
keepRegisteredWhenNotHighestContext: false,
|
|
@@ -46,27 +46,24 @@ const PlaybackKeyboardShortcutsManager = ({ setPlaybackRate }) => {
|
|
|
46
46
|
(0, react_1.useEffect)(() => {
|
|
47
47
|
const jKey = keybindings.registerKeybinding({
|
|
48
48
|
event: 'keydown',
|
|
49
|
-
|
|
49
|
+
action: 'reversePlayback',
|
|
50
50
|
callback: onJKey,
|
|
51
|
-
commandCtrlKey: false,
|
|
52
51
|
preventDefault: true,
|
|
53
52
|
triggerIfInputFieldFocused: false,
|
|
54
53
|
keepRegisteredWhenNotHighestContext: false,
|
|
55
54
|
});
|
|
56
55
|
const kKey = keybindings.registerKeybinding({
|
|
57
56
|
event: 'keydown',
|
|
58
|
-
|
|
57
|
+
action: 'pausePlayback',
|
|
59
58
|
callback: onKKey,
|
|
60
|
-
commandCtrlKey: false,
|
|
61
59
|
preventDefault: true,
|
|
62
60
|
triggerIfInputFieldFocused: false,
|
|
63
61
|
keepRegisteredWhenNotHighestContext: false,
|
|
64
62
|
});
|
|
65
63
|
const lKey = keybindings.registerKeybinding({
|
|
66
64
|
event: 'keydown',
|
|
67
|
-
|
|
65
|
+
action: 'playForward',
|
|
68
66
|
callback: onLKey,
|
|
69
|
-
commandCtrlKey: false,
|
|
70
67
|
preventDefault: true,
|
|
71
68
|
triggerIfInputFieldFocused: false,
|
|
72
69
|
keepRegisteredWhenNotHighestContext: false,
|
|
@@ -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 use_keybinding_1 = require("../helpers/use-keybinding");
|
|
8
|
+
const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
|
|
8
9
|
const Checkmark_1 = require("../icons/Checkmark");
|
|
9
10
|
const ellipsis_1 = require("../icons/ellipsis");
|
|
10
11
|
const checkerboard_1 = require("../state/checkerboard");
|
|
@@ -21,6 +22,8 @@ const clickButton = (id) => {
|
|
|
21
22
|
};
|
|
22
23
|
const PreviewToolbarOverflowButton = ({ showFullscreen, showPlaybackRate, showLoop, showCanvasViewControls, showCompositionControls, playbackRate, setPlaybackRate, loop, setLoop, }) => {
|
|
23
24
|
const keyboardShortcutsDisabled = (0, use_keybinding_1.areKeyboardShortcutsDisabled)();
|
|
25
|
+
const fullscreenShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('enterFullscreen');
|
|
26
|
+
const checkerboardShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('toggleCheckerboard');
|
|
24
27
|
const { checkerboard, setCheckerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
|
|
25
28
|
const { editorShowOutlines, setEditorShowOutlines } = (0, react_1.useContext)(editor_outlines_1.EditorShowOutlinesContext);
|
|
26
29
|
const { editorShowGuides, setEditorShowGuides } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
|
|
@@ -93,7 +96,9 @@ const PreviewToolbarOverflowButton = ({ showFullscreen, showPlaybackRate, showLo
|
|
|
93
96
|
label: 'Transparency as checkerboard',
|
|
94
97
|
value: 'checkerboard',
|
|
95
98
|
onClick: () => setCheckerboard((current) => !current),
|
|
96
|
-
keyHint: keyboardShortcutsDisabled
|
|
99
|
+
keyHint: keyboardShortcutsDisabled || checkerboardShortcut === ''
|
|
100
|
+
? null
|
|
101
|
+
: checkerboardShortcut,
|
|
97
102
|
leftItem: checkerboard ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, {}) : null,
|
|
98
103
|
subMenu: null,
|
|
99
104
|
quickSwitcherLabel: null,
|
|
@@ -145,7 +150,9 @@ const PreviewToolbarOverflowButton = ({ showFullscreen, showPlaybackRate, showLo
|
|
|
145
150
|
label: 'Fullscreen',
|
|
146
151
|
value: 'fullscreen',
|
|
147
152
|
onClick: () => clickButton('fullscreen-toggle'),
|
|
148
|
-
keyHint: keyboardShortcutsDisabled
|
|
153
|
+
keyHint: keyboardShortcutsDisabled || fullscreenShortcut === ''
|
|
154
|
+
? null
|
|
155
|
+
: fullscreenShortcut,
|
|
149
156
|
leftItem: null,
|
|
150
157
|
subMenu: null,
|
|
151
158
|
quickSwitcherLabel: null,
|
|
@@ -153,6 +160,8 @@ const PreviewToolbarOverflowButton = ({ showFullscreen, showPlaybackRate, showLo
|
|
|
153
160
|
}
|
|
154
161
|
return items;
|
|
155
162
|
}, [
|
|
163
|
+
checkerboardShortcut,
|
|
164
|
+
fullscreenShortcut,
|
|
156
165
|
previewSizeItems,
|
|
157
166
|
playbackRateItems,
|
|
158
167
|
selectedPlaybackRate,
|
|
@@ -3,10 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ExplorerQuickSwitcherTrigger = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_1 = require("react");
|
|
6
|
-
const ShortcutHint_1 = require("../../error-overlay/remotion-overlay/ShortcutHint");
|
|
7
6
|
const colors_1 = require("../../helpers/colors");
|
|
8
7
|
const hoverable_1 = require("../../helpers/hoverable");
|
|
9
8
|
const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
9
|
+
const use_keyboard_shortcut_label_1 = require("../../helpers/use-keyboard-shortcut-label");
|
|
10
10
|
const ellipsis_1 = require("../../icons/ellipsis");
|
|
11
11
|
const modals_1 = require("../../state/modals");
|
|
12
12
|
const InlineDropdown_1 = require("../InlineDropdown");
|
|
@@ -60,8 +60,11 @@ const ExplorerQuickSwitcherTrigger = ({ mode, showShortcut, tabIndex, getActions
|
|
|
60
60
|
return jsx_runtime_1.jsx(ellipsis_1.EllipsisIcon, { svgProps: ellipsisSvgProps, fill: color });
|
|
61
61
|
}, []);
|
|
62
62
|
const moreActionsTitle = mode === 'assets' ? 'More asset actions' : 'More composition actions';
|
|
63
|
+
const quickSwitcherShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('quickSwitcher');
|
|
63
64
|
return (jsx_runtime_1.jsxs("div", { style: quickSwitcherArea, children: [
|
|
64
|
-
jsx_runtime_1.jsxs("button", { type: "button", style: quickSwitcherTrigger, onClick: openQuickSwitcher, tabIndex: tabIndex, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, children: ["Search...", showShortcut &&
|
|
65
|
+
jsx_runtime_1.jsxs("button", { type: "button", style: quickSwitcherTrigger, onClick: openQuickSwitcher, tabIndex: tabIndex, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, children: ["Search...", showShortcut &&
|
|
66
|
+
!(0, use_keybinding_1.areKeyboardShortcutsDisabled)() &&
|
|
67
|
+
quickSwitcherShortcut !== '' ? (jsx_runtime_1.jsx("span", { style: shortcutLabel, children: quickSwitcherShortcut })) : null] }), jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { variant: null, title: moreActionsTitle, renderAction: renderMoreActions, getItems: getActions, className: hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME })
|
|
65
68
|
] }));
|
|
66
69
|
};
|
|
67
70
|
exports.ExplorerQuickSwitcherTrigger = ExplorerQuickSwitcherTrigger;
|
|
@@ -54,8 +54,8 @@ const label = {
|
|
|
54
54
|
fontSize: 14,
|
|
55
55
|
lineHeight: '20px',
|
|
56
56
|
};
|
|
57
|
-
const RadioButton = ({ checked, children, onClick }) => {
|
|
58
|
-
return (jsx_runtime_1.jsxs("button", { "aria-checked": checked, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, onClick: onClick, role: "radio", style: row, type: "button", children: [
|
|
57
|
+
const RadioButton = ({ checked, disabled, children, onClick }) => {
|
|
58
|
+
return (jsx_runtime_1.jsxs("button", { "aria-checked": checked, disabled: disabled, className: `${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME}`, onClick: onClick, role: "radio", style: row, type: "button", children: [
|
|
59
59
|
jsx_runtime_1.jsx("span", { style: circle, children: checked ? jsx_runtime_1.jsx("span", { style: bullet }) : null }), jsx_runtime_1.jsx("span", { style: label, children: children })
|
|
60
60
|
] }));
|
|
61
61
|
};
|
|
@@ -42,6 +42,7 @@ const browser_studio_operations_1 = require("../helpers/browser-studio-operation
|
|
|
42
42
|
const client_id_1 = require("../helpers/client-id");
|
|
43
43
|
const colors_1 = require("../helpers/colors");
|
|
44
44
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
45
|
+
const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
|
|
45
46
|
const caret_1 = require("../icons/caret");
|
|
46
47
|
const render_1 = require("../icons/render");
|
|
47
48
|
const in_out_1 = require("../state/in-out");
|
|
@@ -128,7 +129,10 @@ const RenderButtonInner = ({ readOnlyStudio, size: controlSize = 'default', narr
|
|
|
128
129
|
}
|
|
129
130
|
return preferredRenderType;
|
|
130
131
|
}, [connectionStatus, isBrowserStudio, preferredRenderType, readOnlyStudio]);
|
|
131
|
-
const
|
|
132
|
+
const renderShortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('render');
|
|
133
|
+
const shortcut = (0, use_keybinding_1.areKeyboardShortcutsDisabled)() || renderShortcut === ''
|
|
134
|
+
? ''
|
|
135
|
+
: `(${renderShortcut})`;
|
|
132
136
|
const tooltip = renderType === 'render-command'
|
|
133
137
|
? 'Copy a CLI command to render this composition ' + shortcut
|
|
134
138
|
: 'Export the current composition ' + shortcut;
|
|
@@ -4,20 +4,15 @@ exports.CliCopyButton = 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
|
|
7
|
+
const copy_text_1 = require("../../helpers/copy-text");
|
|
8
|
+
const use_copy_feedback_1 = require("../../helpers/use-copy-feedback");
|
|
9
|
+
const copy_1 = require("../../icons/copy");
|
|
10
|
+
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
8
11
|
const svgStyle = {
|
|
9
12
|
width: 16,
|
|
10
13
|
height: 16,
|
|
11
14
|
verticalAlign: 'sub',
|
|
12
15
|
};
|
|
13
|
-
const copiedStyle = {
|
|
14
|
-
fontSize: '14px',
|
|
15
|
-
minHeight: '30px',
|
|
16
|
-
minWidth: '30px',
|
|
17
|
-
display: 'flex',
|
|
18
|
-
alignItems: 'center',
|
|
19
|
-
justifyContent: 'center',
|
|
20
|
-
};
|
|
21
16
|
const buttonStyle = {
|
|
22
17
|
width: '30px',
|
|
23
18
|
height: '30px',
|
|
@@ -28,33 +23,24 @@ const buttonStyle = {
|
|
|
28
23
|
justifyContent: 'center',
|
|
29
24
|
};
|
|
30
25
|
const CliCopyButton = ({ valueToCopy, }) => {
|
|
31
|
-
const
|
|
26
|
+
const { copied, markCopied } = (0, use_copy_feedback_1.useCopyFeedback)();
|
|
32
27
|
const [hovered, setHovered] = (0, react_1.useState)(false);
|
|
33
28
|
const fillColor = (0, react_1.useMemo)(() => {
|
|
34
29
|
return hovered ? colors_1.WHITE : colors_1.LIGHT_TEXT;
|
|
35
30
|
}, [hovered]);
|
|
36
|
-
const
|
|
37
|
-
const checkSvg = (jsx_runtime_1.jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 448 512", style: svgStyle, children: jsx_runtime_1.jsx("path", { fill: fillColor, d: "M438.6 105.4c12.5 12.5 12.5 32.8 0 45.3l-256 256c-12.5 12.5-32.8 12.5-45.3 0l-128-128c-12.5-12.5-12.5-32.8 0-45.3s32.8-12.5 45.3 0L160 338.7 393.4 105.4c12.5-12.5 32.8-12.5 45.3 0z" }) }));
|
|
31
|
+
const copyIcon = (jsx_runtime_1.jsx(copy_1.CopyIcon, { copied: copied, color: fillColor, style: svgStyle }));
|
|
38
32
|
const onPointerEnter = (0, react_1.useCallback)(() => {
|
|
39
33
|
setHovered(true);
|
|
40
34
|
}, []);
|
|
41
35
|
const onPointerLeave = (0, react_1.useCallback)(() => {
|
|
42
36
|
setHovered(false);
|
|
43
37
|
}, []);
|
|
44
|
-
(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
};
|
|
52
|
-
const to = setTimeout(() => handleClear(), 2000);
|
|
53
|
-
return () => clearTimeout(to);
|
|
54
|
-
}, [copied]);
|
|
55
|
-
return copied ? (jsx_runtime_1.jsx("span", { style: copiedStyle, children: checkSvg })) : (jsx_runtime_1.jsx("button", { type: "button", onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: buttonStyle, onClick: () => {
|
|
56
|
-
navigator.clipboard.writeText(valueToCopy);
|
|
57
|
-
setCopied(true);
|
|
58
|
-
}, children: clipboardIcon }));
|
|
38
|
+
return (jsx_runtime_1.jsx("button", { type: "button", onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: buttonStyle, onClick: () => {
|
|
39
|
+
(0, copy_text_1.copyText)(valueToCopy)
|
|
40
|
+
.then(markCopied)
|
|
41
|
+
.catch((err) => {
|
|
42
|
+
(0, NotificationCenter_1.showNotification)(`Could not copy: ${err.message}`, 2000);
|
|
43
|
+
});
|
|
44
|
+
}, children: copyIcon }));
|
|
59
45
|
};
|
|
60
46
|
exports.CliCopyButton = CliCopyButton;
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import type { AvailableOptions } from '@remotion/renderer/client';
|
|
2
2
|
import React from 'react';
|
|
3
|
+
type NumberSettingHint = AvailableOptions | {
|
|
4
|
+
readonly content: React.ReactNode;
|
|
5
|
+
readonly title: string;
|
|
6
|
+
};
|
|
3
7
|
export declare const NumberSetting: React.FC<{
|
|
4
8
|
readonly name: string;
|
|
5
9
|
readonly value: number;
|
|
@@ -8,5 +12,6 @@ export declare const NumberSetting: React.FC<{
|
|
|
8
12
|
readonly min: number;
|
|
9
13
|
readonly step: number;
|
|
10
14
|
readonly formatter?: (value: string | number) => string;
|
|
11
|
-
readonly hint?:
|
|
15
|
+
readonly hint?: NumberSettingHint;
|
|
12
16
|
}>;
|
|
17
|
+
export {};
|
|
@@ -6,6 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const layout_1 = require("../layout");
|
|
7
7
|
const InputDragger_1 = require("../NewComposition/InputDragger");
|
|
8
8
|
const RemInput_1 = require("../NewComposition/RemInput");
|
|
9
|
+
const InfoBubble_1 = require("./InfoBubble");
|
|
9
10
|
const layout_2 = require("./layout");
|
|
10
11
|
const OptionExplainerBubble_1 = require("./OptionExplainerBubble");
|
|
11
12
|
const NumberSetting = ({ name, value, step, hint, onValueChanged, max, min, formatter }) => {
|
|
@@ -23,8 +24,7 @@ const NumberSetting = ({ name, value, step, hint, onValueChanged, max, min, form
|
|
|
23
24
|
}, [onValueChanged]);
|
|
24
25
|
return (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
25
26
|
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: [name, hint ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
26
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: hint })
|
|
27
|
-
] })) : null] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(RemInput_1.RightAlignInput, { children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { value: value, name: name.toLowerCase(), onTextChange: onTextChanged, onValueChange: onValueChange, step: step, placeholder: [min, max]
|
|
27
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), typeof hint === 'string' ? (jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: hint })) : (jsx_runtime_1.jsx(InfoBubble_1.InfoBubble, { title: hint.title, children: hint.content }))] })) : null] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(RemInput_1.RightAlignInput, { children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { value: value, name: name.toLowerCase(), "aria-label": `${name}: ${formatter ? formatter(value) : value}`, onTextChange: onTextChanged, onValueChange: onValueChange, step: step, placeholder: [min, max]
|
|
28
28
|
.map((f) => (f !== null && f !== undefined ? f : ''))
|
|
29
29
|
.join('-'), min: min, max: max, formatter: formatter, status: "ok", rightAlign: true }) }) })
|
|
30
30
|
] }));
|
|
@@ -101,7 +101,7 @@ const RenderModalBasic = ({ renderMode, imageFormatOptions, outName, codec, setV
|
|
|
101
101
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Frame" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(RemInput_1.RightAlignInput, { children: jsx_runtime_1.jsx(InputDragger_1.InputDragger, { value: frame, onTextChange: onFrameChanged, placeholder: `0-${resolvedComposition.durationInFrames - 1}`, onValueChange: onFrameSetDirectly, name: "frame", step: 1, min: 0, status: "ok", max: resolvedComposition.durationInFrames - 1, rightAlign: true }) }) })
|
|
102
102
|
] })) : null, renderMode === 'video' && codec === 'prores' ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
103
103
|
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "ProRes profile" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { title: 'proResProfile', selectedId: proResProfile, values: proResProfileOptions }) })
|
|
104
|
-
] })) : null, renderMode === 'still' ? null : (jsx_runtime_1.jsx(FrameRangeSetting_1.FrameRangeSetting, { durationInFrames: resolvedComposition.durationInFrames, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame })), showOutputName ? (jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { existence: existence, inputStyle: layout_2.input, outName: outName, onValueChange: onValueChange, validationMessage: validationMessage, label: renderMode === 'sequence' ? 'Folder name' : 'Output name' })) : null, jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
104
|
+
] })) : null, renderMode === 'still' ? null : (jsx_runtime_1.jsx(FrameRangeSetting_1.FrameRangeSetting, { durationInFrames: resolvedComposition.durationInFrames, endFrame: endFrame, setEndFrame: setEndFrame, setStartFrame: setStartFrame, startFrame: startFrame })), showOutputName ? (jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { ariaLabel: null, existingOutputPath: null, existence: existence, inputStyle: layout_2.input, outName: outName, onValueChange: onValueChange, validationMessage: validationMessage, label: renderMode === 'sequence' ? 'Folder name' : 'Output name' })) : null, jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
105
105
|
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Log Level ",
|
|
106
106
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.OptionExplainerBubble, { id: "logLevelOption" })
|
|
107
107
|
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: logLevelOptions, selectedId: logLevel, title: "Log Level" }) })
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
type Props = {
|
|
3
|
+
readonly ariaLabel: string | null;
|
|
4
|
+
readonly existingOutputPath: string | null;
|
|
3
5
|
readonly existence: boolean;
|
|
4
6
|
readonly inputStyle: React.CSSProperties;
|
|
5
7
|
readonly outName: string;
|
|
@@ -7,5 +9,5 @@ type Props = {
|
|
|
7
9
|
readonly validationMessage: string | null;
|
|
8
10
|
readonly label: string;
|
|
9
11
|
};
|
|
10
|
-
export declare const RenderModalOutputName: ({ existence, inputStyle, outName, onValueChange, validationMessage, label: labelText, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const RenderModalOutputName: ({ ariaLabel, existingOutputPath, existence, inputStyle, outName, onValueChange, validationMessage, label: labelText, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
13
|
export {};
|
|
@@ -38,12 +38,12 @@ const outputNameInputContainer = {
|
|
|
38
38
|
minWidth: 0,
|
|
39
39
|
maxWidth: 280,
|
|
40
40
|
};
|
|
41
|
-
const RenderModalOutputName = ({ existence, inputStyle, outName, onValueChange, validationMessage, label: labelText, }) => {
|
|
41
|
+
const RenderModalOutputName = ({ ariaLabel, existingOutputPath, existence, inputStyle, outName, onValueChange, validationMessage, label: labelText, }) => {
|
|
42
42
|
const openExistingOutput = (0, react_1.useCallback)(() => {
|
|
43
|
-
(0, actions_1.openInFileExplorer)({ directory: outName }).catch((err) => {
|
|
43
|
+
(0, actions_1.openInFileExplorer)({ directory: existingOutputPath !== null && existingOutputPath !== void 0 ? existingOutputPath : outName }).catch((err) => {
|
|
44
44
|
(0, NotificationCenter_1.showNotification)(`Could not open file: ${err.message}`, 2000);
|
|
45
45
|
});
|
|
46
|
-
}, [outName]);
|
|
46
|
+
}, [existingOutputPath, outName]);
|
|
47
47
|
const renderOpenIcon = (0, react_1.useCallback)((color) => {
|
|
48
48
|
return jsx_runtime_1.jsx(folder_1.ExpandedFolderIconSolid, { style: openIconStyle, color: color });
|
|
49
49
|
}, []);
|
|
@@ -51,7 +51,7 @@ const RenderModalOutputName = ({ existence, inputStyle, outName, onValueChange,
|
|
|
51
51
|
const isBrowserStudio = (0, browser_studio_operations_1.getBrowserStudioOperations)() !== null;
|
|
52
52
|
return (jsx_runtime_1.jsxs("div", { style: outputNameRow, children: [
|
|
53
53
|
jsx_runtime_1.jsx(layout_1.Column, { children: jsx_runtime_1.jsx("div", { style: layout_2.label, children: labelText }) }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsxs("div", { style: outputNameInputContainer, children: [
|
|
54
|
-
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { status: validationMessage ? 'error' : existence ? 'warning' : 'ok', style: inputStyle, type: "text", value: outName, onChange: onValueChange, rightAlign: true }), validationMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
54
|
+
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { "aria-label": ariaLabel !== null && ariaLabel !== void 0 ? ariaLabel : undefined, status: validationMessage ? 'error' : existence ? 'warning' : 'ok', style: inputStyle, type: "text", value: outName, onChange: onValueChange, rightAlign: true }), validationMessage ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
55
55
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: validationMessage, type: 'error' })
|
|
56
56
|
] })) : existence ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
57
57
|
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: jsx_runtime_1.jsxs("span", { style: existsMessageStyle, children: [isBrowserStudio ? null : (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: openExistingOutput, renderAction: renderOpenIcon, title: `Open in ${fileManagerName}` })), "Exists, will be overwritten"] }), type: 'warning' })
|
|
@@ -24,7 +24,7 @@ const SeparateAudioOptionInput = ({ separateAudioTo, setSeparateAudioTo, audioCo
|
|
|
24
24
|
}
|
|
25
25
|
return null;
|
|
26
26
|
}, [audioCodec, separateAudioTo]);
|
|
27
|
-
return (jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { existence: existence, inputStyle: layout_2.input, onValueChange: onValueChange, outName: separateAudioTo, label: 'Separate audio to', validationMessage: validationMessage }));
|
|
27
|
+
return (jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { ariaLabel: null, existingOutputPath: null, existence: existence, inputStyle: layout_2.input, onValueChange: onValueChange, outName: separateAudioTo, label: 'Separate audio to', validationMessage: validationMessage }));
|
|
28
28
|
};
|
|
29
29
|
exports.SeparateAudioOptionInput = SeparateAudioOptionInput;
|
|
30
30
|
const SeparateAudioOption = ({ separateAudioTo, setSeparateAudioTo, audioCodec, outName }) => {
|
|
@@ -121,7 +121,7 @@ const WebRenderModalBasic = ({ renderMode, resolvedComposition, imageFormat, set
|
|
|
121
121
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.WebRendererOptionExplainerBubble, { apiName: "codec", id: "videoCodecOption" })
|
|
122
122
|
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: codecOptions, selectedId: effectiveVideoCodec, title: "Codec" }) })
|
|
123
123
|
] })) : null, jsx_runtime_1.jsx(FrameRangeSetting_1.FrameRangeSetting, { durationInFrames: resolvedComposition.durationInFrames, startFrame: startFrame !== null && startFrame !== void 0 ? startFrame : 0, endFrame: endFrame !== null && endFrame !== void 0 ? endFrame : resolvedComposition.durationInFrames - 1, setStartFrame: setStartFrame, setEndFrame: setEndFrame })
|
|
124
|
-
] })), jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { existence: false, inputStyle: layout_2.input, outName: outName, onValueChange: onOutNameChange, validationMessage: validationMessage, label: window.remotion_isReadOnlyStudio ? 'Download name' : 'Output name' }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
124
|
+
] })), jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { ariaLabel: null, existingOutputPath: null, existence: false, inputStyle: layout_2.input, outName: outName, onValueChange: onOutNameChange, validationMessage: validationMessage, label: window.remotion_isReadOnlyStudio ? 'Download name' : 'Output name' }), jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
125
125
|
jsx_runtime_1.jsxs("div", { style: layout_2.label, children: ["Log Level ",
|
|
126
126
|
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(OptionExplainerBubble_1.WebRendererOptionExplainerBubble, { apiName: "logLevel", id: "logLevelOption" })
|
|
127
127
|
] }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: logLevelOptions, selectedId: logLevel, title: "Log Level" }) })
|