@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
|
@@ -4,14 +4,16 @@ exports.installPackages = void 0;
|
|
|
4
4
|
const remotion_1 = require("remotion");
|
|
5
5
|
const call_api_1 = require("../components/call-api");
|
|
6
6
|
const browser_studio_operations_1 = require("../helpers/browser-studio-operations");
|
|
7
|
+
const optional_package_dependencies_1 = require("../helpers/optional-package-dependencies");
|
|
7
8
|
const installPackages = async (dependencies) => {
|
|
8
9
|
if (!(0, remotion_1.getRemotionEnvironment)().isStudio) {
|
|
9
10
|
throw new Error('installPackages() is only available in the Studio');
|
|
10
11
|
}
|
|
12
|
+
const dependenciesWithAuxiliaryPackages = (0, optional_package_dependencies_1.withRequiredAuxiliaryPackages)(dependencies);
|
|
11
13
|
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
12
14
|
if (browserStudioOperations !== null) {
|
|
13
15
|
const response = await browserStudioOperations.packageInstallation.installPackages({
|
|
14
|
-
dependencies:
|
|
16
|
+
dependencies: dependenciesWithAuxiliaryPackages,
|
|
15
17
|
});
|
|
16
18
|
if (!response.success) {
|
|
17
19
|
const error = new Error(response.reason);
|
|
@@ -24,7 +26,7 @@ const installPackages = async (dependencies) => {
|
|
|
24
26
|
throw new Error('installPackages() is not available in Read-Only Studio');
|
|
25
27
|
}
|
|
26
28
|
return (0, call_api_1.callApi)('/api/install-package', {
|
|
27
|
-
dependencies:
|
|
29
|
+
dependencies: dependenciesWithAuxiliaryPackages,
|
|
28
30
|
});
|
|
29
31
|
};
|
|
30
32
|
exports.installPackages = installPackages;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AssetAudioVolume = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const timeline_utils_1 = require("@remotion/timeline-utils");
|
|
6
|
+
const react_1 = require("react");
|
|
7
|
+
const colors_1 = require("../helpers/colors");
|
|
8
|
+
const AssetAudioVolume = ({ src, waveformSampleRate }) => {
|
|
9
|
+
const [value, setValue] = (0, react_1.useState)('Calculating…');
|
|
10
|
+
(0, react_1.useEffect)(() => {
|
|
11
|
+
setValue('Calculating…');
|
|
12
|
+
if (src === null || waveformSampleRate === null) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
return (0, timeline_utils_1.subscribeToWaveformPeaks)({
|
|
16
|
+
src,
|
|
17
|
+
waveformSampleRate,
|
|
18
|
+
onPeaks: (_peaks, final, averageVolume) => {
|
|
19
|
+
if (final) {
|
|
20
|
+
setValue((0, timeline_utils_1.formatAverageAudioVolume)(averageVolume));
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
onError: () => setValue('Unavailable'),
|
|
24
|
+
});
|
|
25
|
+
}, [src, waveformSampleRate]);
|
|
26
|
+
return (jsx_runtime_1.jsx("span", { style: {
|
|
27
|
+
fontFamily: 'sans-serif',
|
|
28
|
+
fontSize: 13,
|
|
29
|
+
lineHeight: '20px',
|
|
30
|
+
color: colors_1.LIGHT_TEXT,
|
|
31
|
+
}, title: "RMS level across all channels over the full audio track, including silence.", children: value }));
|
|
32
|
+
};
|
|
33
|
+
exports.AssetAudioVolume = AssetAudioVolume;
|
|
@@ -510,8 +510,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
510
510
|
(0, react_1.useEffect)(() => {
|
|
511
511
|
const resetBinding = keybindings.registerKeybinding({
|
|
512
512
|
event: 'keydown',
|
|
513
|
-
|
|
514
|
-
commandCtrlKey: false,
|
|
513
|
+
action: 'resetZoom',
|
|
515
514
|
callback: onReset,
|
|
516
515
|
preventDefault: true,
|
|
517
516
|
triggerIfInputFieldFocused: false,
|
|
@@ -519,8 +518,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
519
518
|
});
|
|
520
519
|
const zoomIn = keybindings.registerKeybinding({
|
|
521
520
|
event: 'keydown',
|
|
522
|
-
|
|
523
|
-
commandCtrlKey: false,
|
|
521
|
+
action: 'zoomIn',
|
|
524
522
|
callback: onZoomIn,
|
|
525
523
|
preventDefault: true,
|
|
526
524
|
triggerIfInputFieldFocused: false,
|
|
@@ -528,8 +526,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
528
526
|
});
|
|
529
527
|
const zoomOut = keybindings.registerKeybinding({
|
|
530
528
|
event: 'keydown',
|
|
531
|
-
|
|
532
|
-
commandCtrlKey: false,
|
|
529
|
+
action: 'zoomOut',
|
|
533
530
|
callback: onZoomOut,
|
|
534
531
|
preventDefault: true,
|
|
535
532
|
triggerIfInputFieldFocused: false,
|
|
@@ -773,6 +770,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
773
770
|
try {
|
|
774
771
|
const [newPreflight, currentPreflight] = await Promise.all([
|
|
775
772
|
(0, element_install_api_1.prepareElementInstall)({
|
|
773
|
+
installationName: null,
|
|
776
774
|
destination: {
|
|
777
775
|
type: 'new-composition',
|
|
778
776
|
compositionFile: null,
|
|
@@ -780,6 +778,7 @@ const Canvas = ({ canvasContent, size }) => {
|
|
|
780
778
|
element: activeElementInstallRequest.element,
|
|
781
779
|
}),
|
|
782
780
|
(0, element_install_api_1.prepareElementInstall)({
|
|
781
|
+
installationName: null,
|
|
783
782
|
destination: {
|
|
784
783
|
type: 'current-composition',
|
|
785
784
|
compositionFile: activeElementInstallRequest.compositionFile,
|
|
@@ -5,9 +5,16 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const remotion_1 = require("remotion");
|
|
7
7
|
const ruler_canvas_size_1 = require("../helpers/ruler-canvas-size");
|
|
8
|
+
const canvas_ref_1 = require("../state/canvas-ref");
|
|
8
9
|
const CanvasOrLoading_1 = require("./CanvasOrLoading");
|
|
9
10
|
const use_is_ruler_visible_1 = require("./EditorRuler/use-is-ruler-visible");
|
|
11
|
+
const SplitterContext_1 = require("./Splitter/SplitterContext");
|
|
10
12
|
const CanvasIfSizeIsAvailable = () => {
|
|
13
|
+
const layout = (0, react_1.useContext)(SplitterContext_1.SplitterLayoutContext);
|
|
14
|
+
const refreshCanvas = (0, react_1.useContext)(canvas_ref_1.RefreshCanvasSizeContext);
|
|
15
|
+
(0, react_1.useLayoutEffect)(() => {
|
|
16
|
+
refreshCanvas === null || refreshCanvas === void 0 ? void 0 : refreshCanvas();
|
|
17
|
+
}, [layout, refreshCanvas]);
|
|
11
18
|
const rulersAreVisible = (0, use_is_ruler_visible_1.useIsRulerVisible)();
|
|
12
19
|
const context = (0, react_1.useContext)(remotion_1.Internals.CurrentScaleContext);
|
|
13
20
|
const sizeWithRulersApplied = (0, react_1.useMemo)(() => {
|
|
@@ -1,12 +1,47 @@
|
|
|
1
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
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.CaptionInspector = void 0;
|
|
4
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
38
|
+
const react_1 = __importStar(require("react"));
|
|
6
39
|
const colors_1 = require("../helpers/colors");
|
|
40
|
+
const hoverable_1 = require("../helpers/hoverable");
|
|
7
41
|
const upload_1 = require("../icons/upload");
|
|
8
|
-
const
|
|
42
|
+
const modals_1 = require("../state/modals");
|
|
9
43
|
const CaptionTextEditor_1 = require("./CaptionTextEditor");
|
|
44
|
+
const InlineAction_1 = require("./InlineAction");
|
|
10
45
|
const CollapsibleInspectorSectionHeader_1 = require("./InspectorPanel/CollapsibleInspectorSectionHeader");
|
|
11
46
|
const common_1 = require("./InspectorPanel/common");
|
|
12
47
|
const styles_1 = require("./InspectorPanel/styles");
|
|
@@ -26,38 +61,57 @@ const readOnlyStatus = {
|
|
|
26
61
|
const CaptionInspector = ({ captions, expanded, onTextChange, onTextSave, onTextCancel, onReplaceCaptions, onToggle, readOnly, readOnlyTitle, }) => {
|
|
27
62
|
const fileInput = (0, react_1.useRef)(null);
|
|
28
63
|
const [isImporting, setIsImporting] = (0, react_1.useState)(false);
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
event.currentTarget.value = '';
|
|
33
|
-
if (!file || onReplaceCaptions === null) {
|
|
64
|
+
const { setSelectedModal } = react_1.default.useContext(modals_1.SetSelectedModalContext);
|
|
65
|
+
const importCaptions = (0, react_1.useCallback)(async ({ fileName, contents, }) => {
|
|
66
|
+
if (onReplaceCaptions === null) {
|
|
34
67
|
return;
|
|
35
68
|
}
|
|
36
69
|
setIsImporting(true);
|
|
37
70
|
try {
|
|
38
71
|
onReplaceCaptions((0, parse_caption_file_1.parseCaptionFile)({
|
|
39
|
-
fileName
|
|
40
|
-
contents: await
|
|
72
|
+
fileName,
|
|
73
|
+
contents: await contents,
|
|
41
74
|
}));
|
|
42
75
|
}
|
|
43
76
|
catch (error) {
|
|
44
|
-
(0, NotificationCenter_1.showNotification)(`Could not import ${
|
|
77
|
+
(0, NotificationCenter_1.showNotification)(`Could not import ${fileName}: ${error instanceof Error ? error.message : String(error)}`, 5000);
|
|
45
78
|
}
|
|
46
79
|
finally {
|
|
47
80
|
setIsImporting(false);
|
|
48
81
|
}
|
|
49
82
|
}, [onReplaceCaptions]);
|
|
83
|
+
const onFileSelected = (0, react_1.useCallback)((event) => {
|
|
84
|
+
var _a;
|
|
85
|
+
const file = (_a = event.currentTarget.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
86
|
+
event.currentTarget.value = '';
|
|
87
|
+
if (!file) {
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
importCaptions({ fileName: file.name, contents: file.text() }).catch(() => undefined);
|
|
91
|
+
}, [importCaptions]);
|
|
92
|
+
const openCaptionSelection = (0, react_1.useCallback)(() => {
|
|
93
|
+
setSelectedModal({
|
|
94
|
+
type: 'quick-switcher',
|
|
95
|
+
mode: 'assets',
|
|
96
|
+
invocationTimestamp: Date.now(),
|
|
97
|
+
assetSelection: {
|
|
98
|
+
initialQuery: 'type:json',
|
|
99
|
+
onSelectFile: () => {
|
|
100
|
+
var _a;
|
|
101
|
+
return (_a = fileInput.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
102
|
+
},
|
|
103
|
+
onSelected: (asset) => {
|
|
104
|
+
return importCaptions({
|
|
105
|
+
fileName: asset.name,
|
|
106
|
+
contents: fetch(asset.src).then((response) => response.text()),
|
|
107
|
+
}).catch(() => undefined);
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
compositionSelection: null,
|
|
111
|
+
});
|
|
112
|
+
}, [importCaptions, setSelectedModal]);
|
|
50
113
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
51
114
|
jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: jsx_runtime_1.jsx(CollapsibleInspectorSectionHeader_1.CollapsibleInspectorSectionHeader, { action: jsx_runtime_1.jsxs("div", { style: styles_1.sectionHeaderEnd, children: [onReplaceCaptions === null ? null : (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
52
|
-
jsx_runtime_1.jsx("input", { ref: fileInput, accept: ".json", "aria-label": "Import captions file", hidden: true, onChange:
|
|
53
|
-
alignItems: 'center',
|
|
54
|
-
display: 'flex',
|
|
55
|
-
gap: 4,
|
|
56
|
-
}, disabled: isImporting, onClick: () => {
|
|
57
|
-
var _a;
|
|
58
|
-
return (_a = fileInput.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
59
|
-
}, size: "condensed", title: importTooltip, children: [
|
|
60
|
-
jsx_runtime_1.jsx(upload_1.UploadIcon, { "aria-hidden": "true", color: colors_1.CURRENT_COLOR, focusable: "false", style: { height: 12, width: 12 } }), isImporting ? 'Importing…' : 'Import'] })
|
|
61
|
-
] })), readOnly ? (jsx_runtime_1.jsx("div", { style: readOnlyStatus, title: readOnlyTitle !== null && readOnlyTitle !== void 0 ? readOnlyTitle : undefined, children: "Read only" })) : null] }), expanded: expanded, label: "Captions", onToggle: onToggle }) }), expanded ? (jsx_runtime_1.jsx(CaptionTextEditor_1.CaptionTextEditor, { captions: captions, onChange: onTextChange, onSave: onTextSave, onCancel: onTextCancel, readOnly: readOnly })) : null] }));
|
|
115
|
+
jsx_runtime_1.jsx("input", { ref: fileInput, accept: ".json", "aria-label": "Import captions file", hidden: true, onChange: onFileSelected, type: "file" }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": "Import captions", className: hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME, disabled: isImporting, onClick: openCaptionSelection, renderAction: (color) => (jsx_runtime_1.jsx(upload_1.UploadIcon, { "aria-hidden": "true", color: color, focusable: "false", style: { height: 14, width: 14 } })), title: importTooltip, variant: null })] })), readOnly ? (jsx_runtime_1.jsx("div", { style: readOnlyStatus, title: readOnlyTitle !== null && readOnlyTitle !== void 0 ? readOnlyTitle : undefined, children: "Read only" })) : null] }), expanded: expanded, label: "Captions", onToggle: onToggle }) }), expanded ? (jsx_runtime_1.jsx(CaptionTextEditor_1.CaptionTextEditor, { captions: captions, onChange: onTextChange, onSave: onTextSave, onCancel: onTextCancel, readOnly: readOnly })) : null] }));
|
|
62
116
|
};
|
|
63
117
|
exports.CaptionInspector = CaptionInspector;
|
|
@@ -6,14 +6,9 @@ const react_1 = require("react");
|
|
|
6
6
|
const no_react_1 = require("remotion/no-react");
|
|
7
7
|
const colors_1 = require("../helpers/colors");
|
|
8
8
|
const use_keybinding_1 = require("../helpers/use-keybinding");
|
|
9
|
+
const use_keyboard_shortcut_label_1 = require("../helpers/use-keyboard-shortcut-label");
|
|
9
10
|
const checkerboard_1 = require("../state/checkerboard");
|
|
10
11
|
const ControlButton_1 = require("./ControlButton");
|
|
11
|
-
const accessibilityLabel = [
|
|
12
|
-
'Show transparency as checkerboard',
|
|
13
|
-
(0, use_keybinding_1.areKeyboardShortcutsDisabled)() ? null : '(T)',
|
|
14
|
-
]
|
|
15
|
-
.filter(no_react_1.NoReactInternals.truthy)
|
|
16
|
-
.join(' ');
|
|
17
12
|
const CheckboardToggle = () => {
|
|
18
13
|
const { checkerboard, setCheckerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
|
|
19
14
|
const onClick = (0, react_1.useCallback)(() => {
|
|
@@ -21,6 +16,13 @@ const CheckboardToggle = () => {
|
|
|
21
16
|
return !c;
|
|
22
17
|
});
|
|
23
18
|
}, [setCheckerboard]);
|
|
19
|
+
const shortcut = (0, use_keyboard_shortcut_label_1.useKeyboardShortcutLabel)('toggleCheckerboard');
|
|
20
|
+
const accessibilityLabel = [
|
|
21
|
+
'Show transparency as checkerboard',
|
|
22
|
+
(0, use_keybinding_1.areKeyboardShortcutsDisabled)() || shortcut === '' ? null : `(${shortcut})`,
|
|
23
|
+
]
|
|
24
|
+
.filter(no_react_1.NoReactInternals.truthy)
|
|
25
|
+
.join(' ');
|
|
24
26
|
return (jsx_runtime_1.jsx(ControlButton_1.ControlButton, { title: accessibilityLabel, "aria-label": accessibilityLabel, "aria-pressed": checkerboard, onClick: onClick, children: (color) => (jsx_runtime_1.jsxs("svg", { "aria-hidden": "true", focusable: "false", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", style: { width: 18, height: 18 }, fill: "none", children: [
|
|
25
27
|
jsx_runtime_1.jsx("path", { fill: checkerboard ? colors_1.BLUE : color, d: "M256 48h184c13.3 0 24 10.7 24 24v184H256V48zM48 256h208v208H72c-13.3 0-24-10.7-24-24V256z" }), jsx_runtime_1.jsx("rect", { x: "48", y: "48", width: "416", height: "416", rx: "24", stroke: checkerboard ? colors_1.BLUE : color, strokeWidth: "32" }), jsx_runtime_1.jsx("path", { d: "M256 48v416M48 256h416", stroke: checkerboard ? colors_1.BLUE : color, strokeWidth: "32" })
|
|
26
28
|
] })) }));
|
|
@@ -8,6 +8,7 @@ export declare const Checkbox: React.FC<{
|
|
|
8
8
|
readonly checked: boolean;
|
|
9
9
|
readonly onChange: React.ChangeEventHandler<HTMLInputElement>;
|
|
10
10
|
readonly name: string;
|
|
11
|
+
readonly inputId?: string;
|
|
11
12
|
readonly disabled?: boolean;
|
|
12
13
|
readonly variant?: CheckboxVariant;
|
|
13
14
|
}>;
|
|
@@ -13,7 +13,7 @@ const CHECKMARK_SIZES = {
|
|
|
13
13
|
default: 14,
|
|
14
14
|
small: 13,
|
|
15
15
|
};
|
|
16
|
-
const Checkbox = ({ checked, onChange, disabled, name, variant = 'default' }) => {
|
|
16
|
+
const Checkbox = ({ checked, onChange, disabled, inputId, name, variant = 'default' }) => {
|
|
17
17
|
const size = SIZES[variant];
|
|
18
18
|
const checkmarkSize = CHECKMARK_SIZES[variant];
|
|
19
19
|
const background = (0, react_1.useMemo)(() => ({
|
|
@@ -47,7 +47,7 @@ const Checkbox = ({ checked, onChange, disabled, name, variant = 'default' }) =>
|
|
|
47
47
|
};
|
|
48
48
|
}, [disabled, size]);
|
|
49
49
|
return (jsx_runtime_1.jsxs("div", { style: background, children: [
|
|
50
|
-
jsx_runtime_1.jsx("input", { style: input, type: 'checkbox', checked: checked, onChange: onChange, disabled: disabled, name: name }), jsx_runtime_1.jsx("div", { style: box, children: checked ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, { size: checkmarkSize }) : null })
|
|
50
|
+
jsx_runtime_1.jsx("input", { id: inputId, style: input, type: 'checkbox', checked: checked, onChange: onChange, disabled: disabled, name: name }), jsx_runtime_1.jsx("div", { style: box, children: checked ? jsx_runtime_1.jsx(Checkmark_1.Checkmark, { size: checkmarkSize }) : null })
|
|
51
51
|
] }));
|
|
52
52
|
};
|
|
53
53
|
exports.Checkbox = Checkbox;
|
|
@@ -7,6 +7,7 @@ const client_id_1 = require("../helpers/client-id");
|
|
|
7
7
|
const hoverable_1 = require("../helpers/hoverable");
|
|
8
8
|
const ellipsis_1 = require("../icons/ellipsis");
|
|
9
9
|
const InlineDropdown_1 = require("./InlineDropdown");
|
|
10
|
+
const layout_1 = require("./layout");
|
|
10
11
|
const revealStyle = {
|
|
11
12
|
display: 'flex',
|
|
12
13
|
};
|
|
@@ -26,6 +27,8 @@ const CompositionContextButton = ({ visible, getItems, readOnlyStudio }) => {
|
|
|
26
27
|
if (!visible || (connectionStatus !== 'connected' && !readOnlyStudio)) {
|
|
27
28
|
return null;
|
|
28
29
|
}
|
|
29
|
-
return (jsx_runtime_1.
|
|
30
|
+
return (jsx_runtime_1.jsxs("div", { className: hoverable_1.HOVER_GROUP_REVEAL_CLASS_NAME, style: revealStyle, children: [
|
|
31
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { renderAction: renderAction, getItems: getItems, variant: null, style: hoverable_1.NO_HOVER_BACKGROUND_STYLE, className: hoverable_1.FOCUS_VISIBLE_ONLY_CLASS_NAME })
|
|
32
|
+
] }));
|
|
30
33
|
};
|
|
31
34
|
exports.CompositionContextButton = CompositionContextButton;
|
|
@@ -513,7 +513,7 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
|
|
|
513
513
|
if (item.type === 'folder') {
|
|
514
514
|
const folderPath = getFolderPath(item);
|
|
515
515
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
516
|
-
jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsxs("div", { style: reorderWrapper, children: [reorderLineStyle ? (jsx_runtime_1.jsx("div", { "data-composition-reorder-line": true, style: reorderLineStyle })) : null, jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("div", { style: style, className: `__remotion-composition-selector-item ${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, tabIndex: tabIndex, onClick: onClick, onKeyDown: onKeyDown, draggable: !window.remotion_isReadOnlyStudio, onDragStart: onItemDragStart, onDragEnd: onItemDragEnd, onDragOver: onRowDragOver, onDragLeave: onRowDragLeave, onDrop: onRowDrop, title: item.folderName, role: "button", "aria-expanded": item.expanded, children: [item.expanded ? (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { style: iconStyle, color: colors_1.CURRENT_COLOR })) : (jsx_runtime_1.jsx(folder_1.CollapsedFolderIcon, { color: colors_1.CURRENT_COLOR, style: iconStyle })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.folderName }), jsx_runtime_1.jsx(
|
|
516
|
+
jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsxs("div", { style: reorderWrapper, children: [reorderLineStyle ? (jsx_runtime_1.jsx("div", { "data-composition-reorder-line": true, style: reorderLineStyle })) : null, jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("div", { style: style, className: `__remotion-composition-selector-item ${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, tabIndex: tabIndex, onClick: onClick, onKeyDown: onKeyDown, draggable: !window.remotion_isReadOnlyStudio, onDragStart: onItemDragStart, onDragEnd: onItemDragEnd, onDragOver: onRowDragOver, onDragLeave: onRowDragLeave, onDrop: onRowDrop, title: item.folderName, role: "button", "aria-expanded": item.expanded, children: [item.expanded ? (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { style: iconStyle, color: colors_1.CURRENT_COLOR })) : (jsx_runtime_1.jsx(folder_1.CollapsedFolderIcon, { color: colors_1.CURRENT_COLOR, style: iconStyle })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.folderName }), jsx_runtime_1.jsx(CompositionContextButton_1.CompositionContextButton, { getItems: getContextMenuItems, visible: true, readOnlyStudio: window.remotion_isReadOnlyStudio })
|
|
517
517
|
] }) })
|
|
518
518
|
] }) }), item.expanded ? (jsx_runtime_1.jsx("div", { onDragOver: onFolderChildListDragOver, onDrop: onFolderChildListDrop, children: item.items.map((childItem, index) => {
|
|
519
519
|
return (jsx_runtime_1.jsx(exports.CompositionSelectorItem, { currentComposition: currentComposition, selectComposition: selectComposition, item: childItem, tabIndex: tabIndex, level: level + 1, toggleFolder: toggleFolder, clearRootDragHover: clearRootDragHover, canReorder: canReorder, activeDragRef: activeDragRef, parentFolderPath: folderPath, previousSibling: index === 0 ? null : item.items[index - 1], nextSibling: index === item.items.length - 1
|
|
@@ -522,7 +522,7 @@ const CompositionSelectorItem = ({ item, level, currentComposition, tabIndex, se
|
|
|
522
522
|
}) })) : null] }));
|
|
523
523
|
}
|
|
524
524
|
return (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: jsx_runtime_1.jsxs("div", { style: reorderWrapper, children: [reorderLineStyle ? (jsx_runtime_1.jsx("div", { "data-composition-reorder-line": true, style: reorderLineStyle })) : null, jsx_runtime_1.jsx(layout_1.Row, { align: "center", children: jsx_runtime_1.jsxs("a", { ref: compositionRowRef, style: style, tabIndex: tabIndex, onClick: onClick, onKeyDown: onKeyDown, draggable: !window.remotion_isReadOnlyStudio, onDragStart: onItemDragStart, onDragEnd: onItemDragEnd, onDragOver: onRowDragOver, onDragLeave: onRowDragLeave, onDrop: onRowDrop, type: "button", title: item.composition.id, className: `__remotion-composition __remotion-composition-selector-item ${hoverable_1.HOVERABLE_CLASS_NAME} ${hoverable_1.HOVER_GROUP_CLASS_NAME}`, "data-compname": item.composition.id, children: [
|
|
525
|
-
jsx_runtime_1.jsx(CompositionOrStillIcon_1.CompositionOrStillIcon, { composition: item.composition, color: colors_1.CURRENT_COLOR, style: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.composition.id }), jsx_runtime_1.jsx(
|
|
525
|
+
jsx_runtime_1.jsx(CompositionOrStillIcon_1.CompositionOrStillIcon, { composition: item.composition, color: colors_1.CURRENT_COLOR, style: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsx("div", { style: labelStyle, children: item.composition.id }), jsx_runtime_1.jsx(CompositionContextButton_1.CompositionContextButton, { getItems: getContextMenuItems, visible: !isDragging, readOnlyStudio: window.remotion_isReadOnlyStudio }), jsx_runtime_1.jsx(SidebarRenderButton_1.SidebarRenderButton, { visible: !isDragging, composition: item.composition, readOnlyStudio: window.remotion_isReadOnlyStudio })
|
|
526
526
|
] }) })
|
|
527
527
|
] }) }));
|
|
528
528
|
};
|
|
@@ -171,7 +171,7 @@ const LicenseSettings = () => {
|
|
|
171
171
|
const displayedError = error !== null && error !== void 0 ? error : settingsError;
|
|
172
172
|
return (jsx_runtime_1.jsx("div", { style: container, children: jsx_runtime_1.jsxs("div", { style: content, children: [
|
|
173
173
|
jsx_runtime_1.jsx(LicenseExplanation_1.LicenseExplanation, {}), jsx_runtime_1.jsx(layout_1.Spacing, { y: 2 }), jsx_runtime_1.jsxs("div", { "aria-label": "License type", role: "radiogroup", children: [
|
|
174
|
-
jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: licenseType === 'free', onClick: toggleFreeLicense, children: "I am eligible for the Free License" }), licenseType === 'free' ? (jsx_runtime_1.jsx("p", { style: freeLicenseMessage, children: "That's it! Enjoy Remotion." })) : null, jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: licenseType === 'company', onClick: toggleCompanyLicense, children: "I need a Company License" }), licenseType === 'company' ? (jsx_runtime_1.jsxs("div", { style: companyLicenseContent, children: [
|
|
174
|
+
jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: licenseType === 'free', disabled: false, onClick: toggleFreeLicense, children: "I am eligible for the Free License" }), licenseType === 'free' ? (jsx_runtime_1.jsx("p", { style: freeLicenseMessage, children: "That's it! Enjoy Remotion." })) : null, jsx_runtime_1.jsx(RadioButton_1.RadioButton, { checked: licenseType === 'company', disabled: false, onClick: toggleCompanyLicense, children: "I need a Company License" }), licenseType === 'company' ? (jsx_runtime_1.jsxs("div", { style: companyLicenseContent, children: [
|
|
175
175
|
jsx_runtime_1.jsxs("p", { style: description, children: ["Visit", ' ', jsx_runtime_1.jsxs("a", { style: externalDescriptionLink, href: "https://remotion.pro/license", target: "_blank", rel: "noopener noreferrer", children: ["remotion.pro/license",
|
|
176
176
|
jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: externalLinkIndicator, children: jsx_runtime_1.jsx("path", { d: "M4 12 12 4M6 4h6v6", fill: "none", stroke: colors_1.BLUE, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) })
|
|
177
177
|
] }), ' ', "to obtain a license key. Then enter it here."] }), jsx_runtime_1.jsxs("label", { style: inputLabel, children: ["Public license key",
|
|
@@ -5,6 +5,8 @@ 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 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");
|
|
8
10
|
const Button_1 = require("./Button");
|
|
9
11
|
const layout_1 = require("./layout");
|
|
10
12
|
const NotificationCenter_1 = require("./Notifications/NotificationCenter");
|
|
@@ -17,29 +19,20 @@ const buttonContainerStyle = {
|
|
|
17
19
|
display: 'flex',
|
|
18
20
|
minWidth: '114px',
|
|
19
21
|
};
|
|
20
|
-
const copyIcon = (jsx_runtime_1.jsx("svg", { "aria-hidden": "true", focusable: "false", "data-prefix": "far", "data-icon": "clipboard", className: "svg-inline--fa fa-clipboard fa-w-12", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 384 512", style: iconStyle, children: jsx_runtime_1.jsx("path", { fill: colors_1.CURRENT_COLOR, d: "M336 64h-80c0-35.3-28.7-64-64-64s-64 28.7-64 64H48C21.5 64 0 85.5 0 112v352c0 26.5 21.5 48 48 48h288c26.5 0 48-21.5 48-48V112c0-26.5-21.5-48-48-48zM192 40c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zm144 418c0 3.3-2.7 6-6 6H54c-3.3 0-6-2.7-6-6V118c0-3.3 2.7-6 6-6h42v36c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-36h42c3.3 0 6 2.7 6 6z" }) }));
|
|
21
22
|
const labelStyle = {
|
|
22
23
|
fontSize: 14,
|
|
23
24
|
};
|
|
24
25
|
const CopyButton = ({ textToCopy, label, labelWhenCopied }) => {
|
|
25
|
-
const
|
|
26
|
+
const { copied, markCopied } = (0, use_copy_feedback_1.useCopyFeedback)();
|
|
26
27
|
const onClick = (0, react_1.useCallback)(() => {
|
|
27
28
|
(0, copy_text_1.copyText)(textToCopy)
|
|
28
|
-
.then(
|
|
29
|
-
setCopied(Date.now());
|
|
30
|
-
})
|
|
29
|
+
.then(markCopied)
|
|
31
30
|
.catch((err) => {
|
|
32
31
|
(0, NotificationCenter_1.showNotification)(`Could not copy: ${err.message}`, 2000);
|
|
33
32
|
});
|
|
34
|
-
}, [textToCopy]);
|
|
35
|
-
(
|
|
36
|
-
|
|
37
|
-
return;
|
|
38
|
-
}
|
|
39
|
-
const to = setTimeout(() => setCopied(false), 2000);
|
|
40
|
-
return () => clearTimeout(to);
|
|
41
|
-
}, [copied]);
|
|
42
|
-
return (jsx_runtime_1.jsxs(Button_1.Button, { onClick: onClick, buttonContainerStyle: buttonContainerStyle, children: [copyIcon, jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 }), ' ', jsx_runtime_1.jsx("span", { style: labelStyle, children: copied ? labelWhenCopied : label })
|
|
33
|
+
}, [markCopied, textToCopy]);
|
|
34
|
+
return (jsx_runtime_1.jsxs(Button_1.Button, { onClick: onClick, buttonContainerStyle: buttonContainerStyle, children: [
|
|
35
|
+
jsx_runtime_1.jsx(copy_1.CopyIcon, { copied: copied, color: colors_1.CURRENT_COLOR, style: iconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1.5 }), ' ', jsx_runtime_1.jsx("span", { style: labelStyle, children: copied ? labelWhenCopied : label })
|
|
43
36
|
] }));
|
|
44
37
|
};
|
|
45
38
|
exports.CopyButton = CopyButton;
|
|
@@ -11,13 +11,18 @@ const colors_1 = require("../helpers/colors");
|
|
|
11
11
|
const format_media_duration_1 = require("../helpers/format-media-duration");
|
|
12
12
|
const get_file_manager_name_1 = require("../helpers/get-file-manager-name");
|
|
13
13
|
const get_preview_file_type_1 = require("../helpers/get-preview-file-type");
|
|
14
|
+
const get_timeline_max_zoom_1 = require("../helpers/get-timeline-max-zoom");
|
|
14
15
|
const open_in_remotion_convert_1 = require("../helpers/open-in-remotion-convert");
|
|
15
16
|
const render_codec_label_1 = require("../helpers/render-codec-label");
|
|
16
17
|
const use_image_metadata_1 = require("../helpers/use-image-metadata");
|
|
17
18
|
const use_media_metadata_1 = require("../helpers/use-media-metadata");
|
|
18
19
|
const folder_1 = require("../icons/folder");
|
|
19
20
|
const remotion_convert_1 = require("../icons/remotion-convert");
|
|
21
|
+
const separation_1 = require("../icons/separation");
|
|
22
|
+
const transcription_1 = require("../icons/transcription");
|
|
20
23
|
const trash_1 = require("../icons/trash");
|
|
24
|
+
const modals_1 = require("../state/modals");
|
|
25
|
+
const AssetAudioVolume_1 = require("./AssetAudioVolume");
|
|
21
26
|
const InlineEditableTitle_1 = require("./InlineEditableTitle");
|
|
22
27
|
const InspectorInfoHeader_1 = require("./InspectorInfoHeader");
|
|
23
28
|
const common_1 = require("./InspectorPanel/common");
|
|
@@ -139,10 +144,13 @@ const getCurrentAssetMediaSections = (mediaMetadata) => {
|
|
|
139
144
|
};
|
|
140
145
|
exports.getCurrentAssetMediaSections = getCurrentAssetMediaSections;
|
|
141
146
|
const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStudio }) => {
|
|
142
|
-
var _a, _b, _c;
|
|
147
|
+
var _a, _b, _c, _d, _e;
|
|
148
|
+
const { currentAssetMetadata } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
149
|
+
const volumeMetadata = (currentAssetMetadata === null || currentAssetMetadata === void 0 ? void 0 : currentAssetMetadata.asset) === assetName ? currentAssetMetadata : null;
|
|
143
150
|
const connectionStatus = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx)
|
|
144
151
|
.previewServerState.type;
|
|
145
152
|
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
153
|
+
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
146
154
|
const staticFiles = (0, use_static_files_1.useStaticFiles)();
|
|
147
155
|
const renameFile = (0, use_rename_static_file_1.useRenameStaticFile)({
|
|
148
156
|
relativePath: assetName !== null && assetName !== void 0 ? assetName : '',
|
|
@@ -160,6 +168,32 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
|
|
|
160
168
|
const mediaMetadata = (0, use_media_metadata_1.useMediaMetadata)(src);
|
|
161
169
|
const imageSrc = (0, exports.getCurrentAssetImageMetadataSource)(assetName);
|
|
162
170
|
const imageMetadata = (0, use_image_metadata_1.useImageMetadata)(imageSrc);
|
|
171
|
+
const mutationsDisabled = browserStudioOperations === null &&
|
|
172
|
+
(readOnlyStudio || connectionStatus !== 'connected');
|
|
173
|
+
const fileName = (_a = assetName === null || assetName === void 0 ? void 0 : assetName.split('/').pop()) !== null && _a !== void 0 ? _a : '';
|
|
174
|
+
const fileType = assetName ? (0, get_preview_file_type_1.getPreviewFileType)(assetName) : null;
|
|
175
|
+
const onTranscribe = (0, react_1.useCallback)(() => {
|
|
176
|
+
if (src === null || mutationsDisabled) {
|
|
177
|
+
return;
|
|
178
|
+
}
|
|
179
|
+
setSelectedModal({
|
|
180
|
+
type: 'transcribe',
|
|
181
|
+
src,
|
|
182
|
+
displayName: fileName,
|
|
183
|
+
audioStreamIndex: null,
|
|
184
|
+
requestInit: null,
|
|
185
|
+
});
|
|
186
|
+
}, [fileName, mutationsDisabled, setSelectedModal, src]);
|
|
187
|
+
const onTrackMatting = (0, react_1.useCallback)(() => {
|
|
188
|
+
if (src === null || fileType !== 'video' || mutationsDisabled) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
setSelectedModal({
|
|
192
|
+
type: 'video-matting',
|
|
193
|
+
src,
|
|
194
|
+
displayName: fileName,
|
|
195
|
+
});
|
|
196
|
+
}, [fileName, fileType, mutationsDisabled, setSelectedModal, src]);
|
|
163
197
|
const canRename = onAssetClick === undefined &&
|
|
164
198
|
(browserStudioOperations !== null ||
|
|
165
199
|
(connectionStatus === 'connected' && !readOnlyStudio));
|
|
@@ -187,7 +221,6 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
|
|
|
187
221
|
if (!assetName) {
|
|
188
222
|
return (jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: contentSized, minHeight: exports.CURRENT_ASSET_HEIGHT }));
|
|
189
223
|
}
|
|
190
|
-
const fileName = (_a = assetName.split('/').pop()) !== null && _a !== void 0 ? _a : assetName;
|
|
191
224
|
const fileDetails = [];
|
|
192
225
|
if (imageMetadata !== null) {
|
|
193
226
|
fileDetails.push({
|
|
@@ -210,14 +243,15 @@ const AssetInfo = ({ assetName, contentSized = false, onAssetClick, readOnlyStud
|
|
|
210
243
|
readOnlyStudio ||
|
|
211
244
|
connectionStatus !== 'connected';
|
|
212
245
|
const fileManagerName = (0, get_file_manager_name_1.getFileManagerName)(window.remotion_fileSystemPlatform);
|
|
213
|
-
const mutationsDisabled = browserStudioOperations === null &&
|
|
214
|
-
(readOnlyStudio || connectionStatus !== 'connected');
|
|
215
246
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
216
247
|
jsx_runtime_1.jsx(InspectorInfoHeader_1.InspectorInfoHeader, { contentSized: contentSized, minHeight: exports.CURRENT_ASSET_HEIGHT, padding: contentSized
|
|
217
248
|
? `0 ${InspectorPanelLayout_1.INSPECTOR_PANEL_HORIZONTAL_PADDING}px 6px`
|
|
218
|
-
: '4px 0', children: jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: fileName, canRename: canRename, getInitialSelection: use_rename_static_file_1.getStaticFileRenameSelection, onClick: onAssetClick, onCommit: onRename, size: contentSized ? 'default' : 'inspector', title: assetName }) }), fileDetails.length > 0 ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "File", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: fileDetails.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.video ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "Video", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: mediaSections.video.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.audio !== null ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "Audio", children: mediaSections.audio.length === 0 ? (jsx_runtime_1.jsx("div", { style: assetEmptyStateStyle, children: "None" })) : (jsx_runtime_1.
|
|
249
|
+
: '4px 0', children: jsx_runtime_1.jsx(InlineEditableTitle_1.InlineEditableTitle, { value: fileName, canRename: canRename, getInitialSelection: use_rename_static_file_1.getStaticFileRenameSelection, onClick: onAssetClick, onCommit: onRename, size: contentSized ? 'default' : 'inspector', title: assetName }) }), fileDetails.length > 0 ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "File", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: fileDetails.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.video ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "Video", children: jsx_runtime_1.jsx("div", { style: assetMetadataStyle, children: mediaSections.video.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))) }) })) : null, mediaSections && mediaSections.audio !== null ? (jsx_runtime_1.jsx(common_1.InspectorSection, { header: "Audio", children: mediaSections.audio.length === 0 ? (jsx_runtime_1.jsx("div", { style: assetEmptyStateStyle, children: "None" })) : (jsx_runtime_1.jsxs("div", { style: assetMetadataStyle, children: [mediaSections.audio.map((detail) => (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: detail.label, children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: detail.value }) }, detail.label))), src ? (jsx_runtime_1.jsx(common_1.InspectorDetailRow, { label: "Average volume", children: jsx_runtime_1.jsx("span", { style: assetMetadataValueStyle, children: jsx_runtime_1.jsx(AssetAudioVolume_1.AssetAudioVolume, { src: (_d = volumeMetadata === null || volumeMetadata === void 0 ? void 0 : volumeMetadata.src) !== null && _d !== void 0 ? _d : null, waveformSampleRate: volumeMetadata
|
|
250
|
+
? Math.ceil(volumeMetadata.fps *
|
|
251
|
+
get_timeline_max_zoom_1.TIMELINE_FRAME_WIDTH_AT_MAX_ZOOM)
|
|
252
|
+
: null }, (_e = volumeMetadata === null || volumeMetadata === void 0 ? void 0 : volumeMetadata.src) !== null && _e !== void 0 ? _e : src) }) })) : null] })) })) : null, jsx_runtime_1.jsx(common_1.InspectorSectionHeader, { children: "Actions" }), jsx_runtime_1.jsxs(common_1.InspectorQuickActionsSection, { children: [fileManagerAvailable ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: fileManagerDisabled, onClick: onShowInFileManager, renderIcon: (color) => (jsx_runtime_1.jsx(folder_1.ExpandedFolderIcon, { color: color, style: quickActionIconStyle })), children: ["Show in ", fileManagerName] })) : null, src ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onTranscribe, renderIcon: (color) => (jsx_runtime_1.jsx(transcription_1.TranscriptionIcon, { color: color, style: quickActionIconStyle })), children: "Transcribe" })) : null, fileType === 'video' ? (jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onTrackMatting, renderIcon: (color) => (jsx_runtime_1.jsx(separation_1.SeparationIcon, { color: color, style: quickActionIconStyle })), children: "Separate foreground" })) : null, src ? (jsx_runtime_1.jsxs(common_1.InspectorQuickAction, { disabled: false, onClick: onOpenConvert, renderIcon: (color) => (jsx_runtime_1.jsx(remotion_convert_1.RemotionConvertIcon, { color: color, style: quickActionIconStyle })), children: ["Convert",
|
|
219
253
|
jsx_runtime_1.jsx("svg", { "aria-hidden": "true", viewBox: "0 0 16 16", style: convertArrowStyle, children: jsx_runtime_1.jsx("path", { d: "M4 12 12 4M6 4h6v6", fill: "none", stroke: colors_1.CURRENT_COLOR, strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "1.5" }) })
|
|
220
|
-
] })) : null,
|
|
254
|
+
] })) : null, jsx_runtime_1.jsx(common_1.InspectorQuickAction, { disabled: mutationsDisabled, onClick: onDelete, renderIcon: (color) => (jsx_runtime_1.jsx(trash_1.TrashIcon, { color: color, style: quickActionIconStyle })), children: "Delete" })] })
|
|
221
255
|
] }));
|
|
222
256
|
};
|
|
223
257
|
exports.AssetInfo = AssetInfo;
|
|
@@ -79,6 +79,7 @@ const CompositionListRenderMarker = () => {
|
|
|
79
79
|
return null;
|
|
80
80
|
};
|
|
81
81
|
const Editor = ({ Root, readOnlyStudio }) => {
|
|
82
|
+
var _a;
|
|
82
83
|
(0, client_id_1.useStudioConfigRevision)();
|
|
83
84
|
const [drawElement, setDrawElement] = (0, react_1.useState)(null);
|
|
84
85
|
const size = player_1.PlayerInternals.useElementSize(drawElement, {
|
|
@@ -111,11 +112,11 @@ const Editor = ({ Root, readOnlyStudio }) => {
|
|
|
111
112
|
const compositionRenderErrorContextValue = (0, react_1.useMemo)(() => ({ setError: setRenderError, clearError }), [clearError]);
|
|
112
113
|
const renderErrorContextValue = (0, react_1.useMemo)(() => ({ error: renderError }), [renderError]);
|
|
113
114
|
return (jsx_runtime_1.jsx(z_index_1.HigherZIndex, { onEscape: noop_1.noop, onOutsideClick: noop_1.noop, children: jsx_runtime_1.jsx(timeline_zoom_1.TimelineZoomContext, { children: jsx_runtime_1.jsxs(SequencePropsSubscriptionProvider_1.SequencePropsSubscriptionProvider, { children: [
|
|
114
|
-
jsx_runtime_1.jsxs(remotion_1.Internals.CurrentScaleContext.Provider, { value: value, children: [
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
115
|
+
jsx_runtime_1.jsx(canvas_ref_1.RefreshCanvasSizeContext.Provider, { value: (_a = size === null || size === void 0 ? void 0 : size.refresh) !== null && _a !== void 0 ? _a : null, children: jsx_runtime_1.jsxs(remotion_1.Internals.CurrentScaleContext.Provider, { value: value, children: [
|
|
116
|
+
jsx_runtime_1.jsx(ForceSpecificCursor_1.ForceSpecificCursor, {}), jsx_runtime_1.jsx(CanvasCaptureDropHandler_1.CanvasCaptureDropHandler, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(scale_lock_1.ScaleLockProvider, { children: jsx_runtime_1.jsxs("div", { style: background, children: [
|
|
117
|
+
jsx_runtime_1.jsx(remotion_1.Internals.CompositionRenderErrorContext.Provider, { value: compositionRenderErrorContextValue, children: canvasMounted ? (jsx_runtime_1.jsx(RootCompositionLoader, { Root: MemoRoot })) : null }), jsx_runtime_1.jsx(remotion_1.Internals.CanUseRemotionHooksProvider, { children: jsx_runtime_1.jsx(RenderErrorContext_1.RenderErrorContext.Provider, { value: renderErrorContextValue, children: jsx_runtime_1.jsx(EditorContent_1.EditorContent, { readOnlyStudio: readOnlyStudio, children: jsx_runtime_1.jsx(TopPanel_1.TopPanel, { drawRef: setDrawRef, bufferStateDelayInMilliseconds: (0, studio_runtime_config_1.getStudioBufferStateDelayInMilliseconds)(), onMounted: onMounted, readOnlyStudio: readOnlyStudio }) }) }) })
|
|
118
|
+
] }) })
|
|
119
|
+
] }) }), jsx_runtime_1.jsx(Modals_1.Modals, { readOnlyStudio: readOnlyStudio }), jsx_runtime_1.jsx(NotificationCenter_1.NotificationCenter, {})
|
|
119
120
|
] }) }) }));
|
|
120
121
|
};
|
|
121
122
|
exports.Editor = Editor;
|
|
@@ -41,7 +41,7 @@ const EditorContent = ({ readOnlyStudio, children }) => {
|
|
|
41
41
|
(canvasContent.type === 'asset' &&
|
|
42
42
|
(currentAssetMetadata === null || currentAssetMetadata === void 0 ? void 0 : currentAssetMetadata.asset) === canvasContent.asset));
|
|
43
43
|
const content = (jsx_runtime_1.jsxs(SplitterContainer_1.SplitterContainer, { orientation: "horizontal", id: "top-to-bottom", maxFlex: 0.9, minFlex: 0.2, defaultFlex: 0.75, maxFlexerSize: null, minFlexerSize: null, maxAntiFlexerSize: null, minAntiFlexerSize: null, children: [
|
|
44
|
-
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: children }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "none", onCollapse: noop }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: showTimeline ? jsx_runtime_1.jsx(Timeline_1.Timeline, {}) : jsx_runtime_1.jsx(TimelineEmptyState_1.TimelineEmptyState, {}) })
|
|
44
|
+
jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "flexer", children: children }), jsx_runtime_1.jsx(SplitterHandle_1.SplitterHandle, { allowToCollapse: "none", onCollapse: noop, onCollapseDuringDrag: null }), jsx_runtime_1.jsx(SplitterElement_1.SplitterElement, { sticky: null, type: "anti-flexer", children: showTimeline ? jsx_runtime_1.jsx(Timeline_1.Timeline, {}) : jsx_runtime_1.jsx(TimelineEmptyState_1.TimelineEmptyState, {}) })
|
|
45
45
|
] }));
|
|
46
46
|
return (jsx_runtime_1.jsxs(TimelineSelection_1.TimelineSelectionProvider, { children: [
|
|
47
47
|
jsx_runtime_1.jsx(WebMcp_1.WebMcp, {}), jsx_runtime_1.jsx(transform_3d_mode_1.Transform3DModeStateProvider, { children: jsx_runtime_1.jsxs(StudioClearSelectionArea, { children: [
|
|
@@ -15,8 +15,10 @@ const ExpandedTracksProvider_1 = require("./ExpandedTracksProvider");
|
|
|
15
15
|
const get_zod_if_possible_1 = require("./get-zod-if-possible");
|
|
16
16
|
const MediaVolumeProvider_1 = require("./MediaVolumeProvider");
|
|
17
17
|
const ModalsProvider_1 = require("./ModalsProvider");
|
|
18
|
+
const CaptionQueueProcessorLoader_1 = require("./RenderQueue/CaptionQueueProcessorLoader");
|
|
18
19
|
const ClientRenderQueueProcessor_1 = require("./RenderQueue/ClientRenderQueueProcessor");
|
|
19
20
|
const context_1 = require("./RenderQueue/context");
|
|
21
|
+
const VideoMattingQueueProcessorLoader_1 = require("./RenderQueue/VideoMattingQueueProcessorLoader");
|
|
20
22
|
const SetTimelineInOutProvider_1 = require("./SetTimelineInOutProvider");
|
|
21
23
|
const SettingsContext_1 = require("./SettingsContext");
|
|
22
24
|
const ShowGuidesProvider_1 = require("./ShowGuidesProvider");
|
|
@@ -29,7 +31,7 @@ const ZoomGesturesProvider_1 = require("./ZoomGesturesProvider");
|
|
|
29
31
|
const EditorContexts = ({ children }) => {
|
|
30
32
|
return (jsx_runtime_1.jsx(get_zod_if_possible_1.ZodProvider, { children: jsx_runtime_1.jsx(VisualControls_1.VisualControlsProvider, { children: jsx_runtime_1.jsx(client_id_1.PreviewServerConnection, { children: jsx_runtime_1.jsxs(SettingsContext_1.SettingsProvider, { children: [
|
|
31
33
|
jsx_runtime_1.jsx(VisualControlsUndoSync_1.VisualControlsUndoSync, {}), jsx_runtime_1.jsxs(context_1.RenderQueueContextProvider, { children: [
|
|
32
|
-
jsx_runtime_1.jsx(ClientRenderQueueProcessor_1.ClientRenderQueueProcessor, {}), jsx_runtime_1.jsx(keybindings_1.KeybindingContextProvider, { children: jsx_runtime_1.jsx(CheckerboardProvider_1.CheckerboardProvider, { children: jsx_runtime_1.jsx(ZoomGesturesProvider_1.ZoomGesturesProvider, { children: jsx_runtime_1.jsx(ShowPixelGridProvider_1.ShowPixelGridProvider, { children: jsx_runtime_1.jsx(ShowRulersProvider_1.ShowRulersProvider, { children: jsx_runtime_1.jsx(ShowGuidesProvider_1.ShowGuidesProvider, { children: jsx_runtime_1.jsx(ShowOutlinesProvider_1.ShowOutlinesProvider, { children: jsx_runtime_1.jsx(SnappingProvider_1.SnappingProvider, { children: jsx_runtime_1.jsx(preview_size_1.PreviewSizeProvider, { children: jsx_runtime_1.jsx(ModalsProvider_1.ModalsProvider, { children: jsx_runtime_1.jsx(MediaVolumeProvider_1.MediaVolumeProvider, { children: jsx_runtime_1.jsx(player_1.PlayerInternals.PlayerEmitterProvider, { currentPlaybackRate: null, children: jsx_runtime_1.jsx(sidebar_1.SidebarContextProvider, { children: jsx_runtime_1.jsx(folders_1.FolderContextProvider, { children: jsx_runtime_1.jsx(highest_z_index_1.HighestZIndexProvider, { children: jsx_runtime_1.jsx(SetTimelineInOutProvider_1.SetTimelineInOutProvider, { children: jsx_runtime_1.jsx(ExpandedTracksProvider_1.ExpandedTracksProvider, { children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })
|
|
34
|
+
jsx_runtime_1.jsx(ClientRenderQueueProcessor_1.ClientRenderQueueProcessor, {}), jsx_runtime_1.jsx(CaptionQueueProcessorLoader_1.CaptionQueueProcessorLoader, {}), jsx_runtime_1.jsx(VideoMattingQueueProcessorLoader_1.VideoMattingQueueProcessorLoader, {}), jsx_runtime_1.jsx(keybindings_1.KeybindingContextProvider, { children: jsx_runtime_1.jsx(CheckerboardProvider_1.CheckerboardProvider, { children: jsx_runtime_1.jsx(ZoomGesturesProvider_1.ZoomGesturesProvider, { children: jsx_runtime_1.jsx(ShowPixelGridProvider_1.ShowPixelGridProvider, { children: jsx_runtime_1.jsx(ShowRulersProvider_1.ShowRulersProvider, { children: jsx_runtime_1.jsx(ShowGuidesProvider_1.ShowGuidesProvider, { children: jsx_runtime_1.jsx(ShowOutlinesProvider_1.ShowOutlinesProvider, { children: jsx_runtime_1.jsx(SnappingProvider_1.SnappingProvider, { children: jsx_runtime_1.jsx(preview_size_1.PreviewSizeProvider, { children: jsx_runtime_1.jsx(ModalsProvider_1.ModalsProvider, { children: jsx_runtime_1.jsx(MediaVolumeProvider_1.MediaVolumeProvider, { children: jsx_runtime_1.jsx(player_1.PlayerInternals.PlayerEmitterProvider, { currentPlaybackRate: null, children: jsx_runtime_1.jsx(sidebar_1.SidebarContextProvider, { children: jsx_runtime_1.jsx(folders_1.FolderContextProvider, { children: jsx_runtime_1.jsx(highest_z_index_1.HighestZIndexProvider, { children: jsx_runtime_1.jsx(SetTimelineInOutProvider_1.SetTimelineInOutProvider, { children: jsx_runtime_1.jsx(ExpandedTracksProvider_1.ExpandedTracksProvider, { children: children }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) }) })
|
|
33
35
|
] })
|
|
34
36
|
] }) }) }) }));
|
|
35
37
|
};
|