@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
|
@@ -18,7 +18,6 @@ const ZOOM_WHEEL_SENSITIVITY = 0.06;
|
|
|
18
18
|
const TimelinePinchZoom = () => {
|
|
19
19
|
const isVideoComposition = (0, is_current_selected_still_1.useIsVideoComposition)();
|
|
20
20
|
const videoConfig = remotion_1.Internals.useUnsafeVideoConfig();
|
|
21
|
-
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
22
21
|
const { zoom, setZoom } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
|
|
23
22
|
const { editorZoomGestures } = (0, react_1.useContext)(editor_zoom_gestures_1.EditorZoomGesturesContext);
|
|
24
23
|
const zoomRef = (0, react_1.useRef)(zoom);
|
|
@@ -51,9 +50,6 @@ const TimelinePinchZoom = () => {
|
|
|
51
50
|
if (!videoConfig || videoConfig.durationInFrames < 2) {
|
|
52
51
|
return;
|
|
53
52
|
}
|
|
54
|
-
if (!canvasContent || canvasContent.type !== 'composition') {
|
|
55
|
-
return;
|
|
56
|
-
}
|
|
57
53
|
const scrollEl = timeline_refs_1.scrollableRef.current;
|
|
58
54
|
if (!scrollEl) {
|
|
59
55
|
return;
|
|
@@ -70,14 +66,8 @@ const TimelinePinchZoom = () => {
|
|
|
70
66
|
else if (deltaMode === WheelEvent.DOM_DELTA_PAGE) {
|
|
71
67
|
scaledDeltaY *= scrollEl.clientHeight;
|
|
72
68
|
}
|
|
73
|
-
setZoom(
|
|
74
|
-
}, [
|
|
75
|
-
editorZoomGestures,
|
|
76
|
-
isVideoComposition,
|
|
77
|
-
videoConfig,
|
|
78
|
-
canvasContent,
|
|
79
|
-
setZoom,
|
|
80
|
-
]);
|
|
69
|
+
setZoom(videoConfig.id, (z) => z * Math.exp(-scaledDeltaY * ZOOM_WHEEL_SENSITIVITY), { anchorFrame: null, anchorContentX });
|
|
70
|
+
}, [editorZoomGestures, isVideoComposition, videoConfig, setZoom]);
|
|
81
71
|
const supportsWebKitPinch = typeof window !== 'undefined' && 'GestureEvent' in window;
|
|
82
72
|
(0, react_1.useEffect)(() => {
|
|
83
73
|
const el = timeline_refs_1.timelineVerticalScroll.current;
|
|
@@ -106,16 +96,13 @@ const TimelinePinchZoom = () => {
|
|
|
106
96
|
if (!videoConfig || videoConfig.durationInFrames < 2) {
|
|
107
97
|
return;
|
|
108
98
|
}
|
|
109
|
-
if (!canvasContent || canvasContent.type !== 'composition') {
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
99
|
const scrollEl = timeline_refs_1.scrollableRef.current;
|
|
113
100
|
if (!scrollEl) {
|
|
114
101
|
return;
|
|
115
102
|
}
|
|
116
103
|
e.preventDefault();
|
|
117
104
|
suppressWheelFromWebKitPinchRef.current = true;
|
|
118
|
-
pinchBaseZoomRef.current = getCurrentTimelineZoom(
|
|
105
|
+
pinchBaseZoomRef.current = getCurrentTimelineZoom(videoConfig.id);
|
|
119
106
|
};
|
|
120
107
|
const onGestureChange = (event) => {
|
|
121
108
|
const e = event;
|
|
@@ -126,9 +113,6 @@ const TimelinePinchZoom = () => {
|
|
|
126
113
|
videoConfig.durationInFrames < 2) {
|
|
127
114
|
return;
|
|
128
115
|
}
|
|
129
|
-
if (!canvasContent || canvasContent.type !== 'composition') {
|
|
130
|
-
return;
|
|
131
|
-
}
|
|
132
116
|
const scrollEl = timeline_refs_1.scrollableRef.current;
|
|
133
117
|
if (!scrollEl) {
|
|
134
118
|
return;
|
|
@@ -138,7 +122,7 @@ const TimelinePinchZoom = () => {
|
|
|
138
122
|
clientX: e.clientX,
|
|
139
123
|
scrollEl,
|
|
140
124
|
});
|
|
141
|
-
setZoom(
|
|
125
|
+
setZoom(videoConfig.id, () => base * e.scale, {
|
|
142
126
|
anchorFrame: null,
|
|
143
127
|
anchorContentX,
|
|
144
128
|
});
|
|
@@ -161,7 +145,6 @@ const TimelinePinchZoom = () => {
|
|
|
161
145
|
supportsWebKitPinch,
|
|
162
146
|
isVideoComposition,
|
|
163
147
|
videoConfig,
|
|
164
|
-
canvasContent,
|
|
165
148
|
getCurrentTimelineZoom,
|
|
166
149
|
setZoom,
|
|
167
150
|
]);
|
|
@@ -180,9 +163,6 @@ const TimelinePinchZoom = () => {
|
|
|
180
163
|
videoConfig.durationInFrames < 2) {
|
|
181
164
|
return;
|
|
182
165
|
}
|
|
183
|
-
if (!canvasContent || canvasContent.type !== 'composition') {
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
166
|
const [t0, t1] = [event.touches[0], event.touches[1]];
|
|
187
167
|
const initialDistance = Math.hypot(t1.clientX - t0.clientX, t1.clientY - t0.clientY);
|
|
188
168
|
if (initialDistance < 1e-6) {
|
|
@@ -190,7 +170,7 @@ const TimelinePinchZoom = () => {
|
|
|
190
170
|
}
|
|
191
171
|
touchPinchRef.current = {
|
|
192
172
|
initialDistance,
|
|
193
|
-
initialZoom: getCurrentTimelineZoom(
|
|
173
|
+
initialZoom: getCurrentTimelineZoom(videoConfig.id),
|
|
194
174
|
};
|
|
195
175
|
};
|
|
196
176
|
const onTouchMove = (event) => {
|
|
@@ -201,9 +181,6 @@ const TimelinePinchZoom = () => {
|
|
|
201
181
|
videoConfig.durationInFrames < 2) {
|
|
202
182
|
return;
|
|
203
183
|
}
|
|
204
|
-
if (!canvasContent || canvasContent.type !== 'composition') {
|
|
205
|
-
return;
|
|
206
|
-
}
|
|
207
184
|
const scrollEl = timeline_refs_1.scrollableRef.current;
|
|
208
185
|
if (!scrollEl) {
|
|
209
186
|
return;
|
|
@@ -217,7 +194,7 @@ const TimelinePinchZoom = () => {
|
|
|
217
194
|
clientX,
|
|
218
195
|
scrollEl,
|
|
219
196
|
});
|
|
220
|
-
setZoom(
|
|
197
|
+
setZoom(videoConfig.id, () => pinch.initialZoom * ratio, {
|
|
221
198
|
anchorFrame: null,
|
|
222
199
|
anchorContentX,
|
|
223
200
|
});
|
|
@@ -241,7 +218,6 @@ const TimelinePinchZoom = () => {
|
|
|
241
218
|
editorZoomGestures,
|
|
242
219
|
isVideoComposition,
|
|
243
220
|
videoConfig,
|
|
244
|
-
canvasContent,
|
|
245
221
|
getCurrentTimelineZoom,
|
|
246
222
|
setZoom,
|
|
247
223
|
]);
|
|
@@ -16,17 +16,11 @@ const TimelinePlayCursorSyncer = () => {
|
|
|
16
16
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
17
17
|
const playing = remotion_1.Internals.usePlaying();
|
|
18
18
|
const { playbackRate } = remotion_1.Internals.usePlaybackRate();
|
|
19
|
-
const { canvasContent } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
20
19
|
const { zoom: zoomMap } = (0, react_1.useContext)(timeline_zoom_1.TimelineZoomCtx);
|
|
21
|
-
const compositionId = canvasContent && canvasContent.type === 'composition'
|
|
22
|
-
? canvasContent.compositionId
|
|
23
|
-
: null;
|
|
24
|
-
// Asset previews have a synthetic video config, but no composition ID
|
|
25
|
-
// with which to look up a persisted timeline zoom.
|
|
26
20
|
const zoom = (0, get_timeline_max_zoom_1.getTimelineZoom)({
|
|
27
21
|
durationInFrames: (_b = video === null || video === void 0 ? void 0 : video.durationInFrames) !== null && _b !== void 0 ? _b : 1,
|
|
28
22
|
timelineViewportWidth: (_c = (_a = timeline_refs_1.scrollableRef.current) === null || _a === void 0 ? void 0 : _a.clientWidth) !== null && _c !== void 0 ? _c : 0,
|
|
29
|
-
zoom:
|
|
23
|
+
zoom: video ? ((_d = zoomMap[video.id]) !== null && _d !== void 0 ? _d : null) : null,
|
|
30
24
|
});
|
|
31
25
|
if (video) {
|
|
32
26
|
(0, imperative_state_1.setCurrentFrame)(timelinePosition);
|
|
@@ -37,6 +37,7 @@ exports.TimelineRowChrome = exports.TimelineRowKeyframeControlsColumn = exports.
|
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const colors_1 = require("../../helpers/colors");
|
|
40
|
+
const drag_aware_double_click_1 = require("../../helpers/drag-aware-double-click");
|
|
40
41
|
const Padder_1 = require("./Padder");
|
|
41
42
|
const timeline_row_layout_1 = require("./timeline-row-layout");
|
|
42
43
|
const TimelineRowLayoutContext_1 = require("./TimelineRowLayoutContext");
|
|
@@ -72,6 +73,7 @@ exports.TimelineRowKeyframeControlsColumn = TimelineRowKeyframeControlsColumn;
|
|
|
72
73
|
const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, style, selected, selectable, onSelect, showSelectedBackground, containsSelection, hovered = false, outerHeight, onDragLeave, onDragOver, onDrop, onDoubleClick, onPointerEnter, onPointerLeave, }) => {
|
|
73
74
|
const { basePadding, rowBorderRadius, rowHorizontalMargin } = (0, react_1.useContext)(TimelineRowLayoutContext_1.TimelineRowLayoutContext);
|
|
74
75
|
const selectedBackground = (0, react_1.useContext)(exports.TimelineRowSelectedBackgroundContext);
|
|
76
|
+
const doubleClickTracker = (0, react_1.useMemo)(() => (0, drag_aware_double_click_1.createDragAwareDoubleClickTracker)(), []);
|
|
75
77
|
const indentWidth = (0, timeline_row_layout_1.getTimelineRowIndentWidth)(depth);
|
|
76
78
|
const chromeColumnStyle = (0, react_1.useMemo)(() => ({
|
|
77
79
|
alignItems: 'center',
|
|
@@ -95,7 +97,7 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
95
97
|
onSelect();
|
|
96
98
|
}
|
|
97
99
|
}, [onSelect, selected]);
|
|
98
|
-
const
|
|
100
|
+
const performDoubleClickIfNotInteractive = (0, react_1.useCallback)((e) => {
|
|
99
101
|
const { target } = e;
|
|
100
102
|
if (target instanceof Element &&
|
|
101
103
|
e.currentTarget.contains(target.closest('button, input, select, textarea, a, [contenteditable="true"]'))) {
|
|
@@ -104,6 +106,12 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
104
106
|
}
|
|
105
107
|
onDoubleClick === null || onDoubleClick === void 0 ? void 0 : onDoubleClick(e);
|
|
106
108
|
}, [onDoubleClick]);
|
|
109
|
+
const onClick = (0, react_1.useCallback)((e) => {
|
|
110
|
+
if (!doubleClickTracker.acceptClickAsDoubleClick(e)) {
|
|
111
|
+
return;
|
|
112
|
+
}
|
|
113
|
+
performDoubleClickIfNotInteractive(e);
|
|
114
|
+
}, [doubleClickTracker, performDoubleClickIfNotInteractive]);
|
|
107
115
|
const highlightBackground = (0, TimelineSelection_1.getTimelineRowHighlightBackground)({
|
|
108
116
|
showSelectedBackground,
|
|
109
117
|
selected,
|
|
@@ -139,8 +147,8 @@ const TimelineRowChrome = ({ depth, eye, keyframeControls, arrow, children, styl
|
|
|
139
147
|
}, [outerHeight, highlightBackground]);
|
|
140
148
|
const chrome = (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [keyframeControls ? (jsx_runtime_1.jsx(exports.TimelineRowKeyframeControlsColumn, { depth: depth, children: keyframeControls })) : (jsx_runtime_1.jsx("div", { style: leftChromeStyle, children: jsx_runtime_1.jsxs("div", { style: chromeColumnStyle, children: [eye, indentWidth > 0 ? jsx_runtime_1.jsx(Padder_1.Padder, { depth: depth }) : null, arrow] }) })), children] }));
|
|
141
149
|
if (outerStyle) {
|
|
142
|
-
return (jsx_runtime_1.jsx("div", { style: outerStyle, onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDown: selectable ? onPointerDown : undefined, onContextMenu: selectable ? onContextMenu : undefined,
|
|
150
|
+
return (jsx_runtime_1.jsx("div", { style: outerStyle, onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDownCapture: doubleClickTracker.beginPointerGesture, onPointerDown: selectable ? onPointerDown : undefined, onClick: onClick, onContextMenu: selectable ? onContextMenu : undefined, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: jsx_runtime_1.jsx("div", { style: innerRowStyle, children: chrome }) }));
|
|
143
151
|
}
|
|
144
|
-
return (jsx_runtime_1.jsx("div", { onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDown: selectable ? onPointerDown : undefined, onContextMenu: selectable ? onContextMenu : undefined,
|
|
152
|
+
return (jsx_runtime_1.jsx("div", { onDragLeave: onDragLeave, onDragOver: onDragOver, onDrop: onDrop, onPointerDownCapture: doubleClickTracker.beginPointerGesture, onPointerDown: selectable ? onPointerDown : undefined, onClick: onClick, onContextMenu: selectable ? onContextMenu : undefined, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, style: innerRowStyle, children: chrome }));
|
|
145
153
|
};
|
|
146
154
|
exports.TimelineRowChrome = TimelineRowChrome;
|
|
@@ -52,8 +52,10 @@ const unsupportedStatusWrapper = {
|
|
|
52
52
|
};
|
|
53
53
|
const unsupportedLabel = {
|
|
54
54
|
color: colors_1.WHITE_ALPHA_40,
|
|
55
|
+
fontFamily: 'Arial, Helvetica, sans-serif',
|
|
55
56
|
fontSize: 12,
|
|
56
57
|
fontStyle: 'italic',
|
|
58
|
+
lineHeight: '18px',
|
|
57
59
|
};
|
|
58
60
|
const computedValue = {
|
|
59
61
|
color: colors_1.WHITE_ALPHA_40,
|
|
@@ -119,10 +121,12 @@ const TimelineNonEditableStatus = ({ propStatus, field, runtimeValue, validatedL
|
|
|
119
121
|
});
|
|
120
122
|
}, [field.key, remotionSkillsInfo, setSelectedModal, validatedLocation]);
|
|
121
123
|
if (propStatus.status === 'computed') {
|
|
122
|
-
return (jsx_runtime_1.jsx(exports.UnsupportedStatus, { label:
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
return (jsx_runtime_1.jsx(exports.UnsupportedStatus, { label: runtimeValue === undefined
|
|
125
|
+
? 'computed'
|
|
126
|
+
: (0, timeline_field_display_utils_1.formatTimelineFieldValueForDisplay)({
|
|
127
|
+
fieldSchema: field.fieldSchema,
|
|
128
|
+
value: runtimeValue,
|
|
129
|
+
}), onFix: onFix, formattedValue: runtimeValue !== undefined }));
|
|
126
130
|
}
|
|
127
131
|
};
|
|
128
132
|
exports.TimelineNonEditableStatus = TimelineNonEditableStatus;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type CanvasSelectionInteraction, type CanvasSelectionItem, type CanvasSelectionSnapshot } from '@remotion/canvas';
|
|
2
|
+
import { type SequenceNodePathMutation } from '@remotion/studio-shared';
|
|
2
3
|
import React, { type CSSProperties } from 'react';
|
|
3
4
|
import { type GetDragOverrides, type GetEffectDragOverrides, type PropStatuses } from 'remotion';
|
|
4
5
|
import type { SequenceNodePathInfo, TimelineTrackData } from '../../helpers/get-timeline-sequence-sort-key';
|
|
@@ -101,6 +102,7 @@ type TimelineSelectionContextValue = {
|
|
|
101
102
|
readonly selectedItems: readonly TimelineSelection[];
|
|
102
103
|
};
|
|
103
104
|
readonly containsSelection: (nodePathInfo: SequenceNodePathInfo) => boolean;
|
|
105
|
+
readonly remapSelectionNodePaths: (mutations: readonly SequenceNodePathMutation[]) => void;
|
|
104
106
|
readonly clearSelection: () => void;
|
|
105
107
|
};
|
|
106
108
|
export declare const TimelineSelectionOrderProvider: React.FC<{
|
|
@@ -60,6 +60,7 @@ const getTimelineSelectedTrackHighlightStyle = (timelineWidth, backgroundColor =
|
|
|
60
60
|
position: 'absolute',
|
|
61
61
|
top: 0,
|
|
62
62
|
width: timelineWidth,
|
|
63
|
+
minWidth: `calc(100% + ${timeline_layout_1.TIMELINE_PADDING * 2}px)`,
|
|
63
64
|
});
|
|
64
65
|
exports.getTimelineSelectedTrackHighlightStyle = getTimelineSelectedTrackHighlightStyle;
|
|
65
66
|
const getTimelineRowHighlightBackground = ({ showSelectedBackground, selected, containsSelection, hovered, selectedBackground, }) => {
|
|
@@ -219,6 +220,7 @@ const defaultTimelineSelectionContextValue = {
|
|
|
219
220
|
selectedItems: [],
|
|
220
221
|
}),
|
|
221
222
|
containsSelection: () => false,
|
|
223
|
+
remapSelectionNodePaths: () => undefined,
|
|
222
224
|
clearSelection: () => undefined,
|
|
223
225
|
};
|
|
224
226
|
const TimelineSelectionContext = (0, react_1.createContext)(defaultTimelineSelectionContextValue);
|
|
@@ -414,7 +416,7 @@ const TimelineSelectAllKeybindings = ({ timeline }) => {
|
|
|
414
416
|
}
|
|
415
417
|
const selectAll = keybindings.registerKeybinding({
|
|
416
418
|
event: 'keydown',
|
|
417
|
-
|
|
419
|
+
action: 'selectAllSequenceRows',
|
|
418
420
|
callback: () => {
|
|
419
421
|
const latestSelectableSequenceSelections = selectableSequenceSelectionsRef.current;
|
|
420
422
|
if (latestSelectableSequenceSelections.length === 0) {
|
|
@@ -422,7 +424,6 @@ const TimelineSelectAllKeybindings = ({ timeline }) => {
|
|
|
422
424
|
}
|
|
423
425
|
currentSelection.current.selectItems(latestSelectableSequenceSelections);
|
|
424
426
|
},
|
|
425
|
-
commandCtrlKey: true,
|
|
426
427
|
preventDefault: true,
|
|
427
428
|
triggerIfInputFieldFocused: false,
|
|
428
429
|
keepRegisteredWhenNotHighestContext: false,
|
|
@@ -684,6 +685,56 @@ const TimelineSelectionProvider = ({ children }) => {
|
|
|
684
685
|
return availableSelectedItems.some((selected) => selected.type !== 'guide' &&
|
|
685
686
|
nodePathDescendsFrom(selected.nodePathInfo, nodePathInfo));
|
|
686
687
|
}, [availableSelectedItems]);
|
|
688
|
+
const remapSelectionNodePaths = (0, react_1.useCallback)((mutations) => {
|
|
689
|
+
const remapItem = (item) => {
|
|
690
|
+
if (item === null || item.type === 'guide') {
|
|
691
|
+
return item;
|
|
692
|
+
}
|
|
693
|
+
const { sequenceSubscriptionKey } = item.nodePathInfo;
|
|
694
|
+
let { nodePath } = sequenceSubscriptionKey;
|
|
695
|
+
let wasRemapped = false;
|
|
696
|
+
for (const mutation of mutations) {
|
|
697
|
+
const file = mutation.files.find((candidate) => candidate.absolutePath === sequenceSubscriptionKey.absolutePath);
|
|
698
|
+
if (!file) {
|
|
699
|
+
continue;
|
|
700
|
+
}
|
|
701
|
+
const nodePathString = JSON.stringify(nodePath);
|
|
702
|
+
const remapping = file.remappings.find((candidate) => candidate.oldNodePath !== null &&
|
|
703
|
+
JSON.stringify(candidate.oldNodePath) === nodePathString);
|
|
704
|
+
if (!remapping) {
|
|
705
|
+
continue;
|
|
706
|
+
}
|
|
707
|
+
wasRemapped = true;
|
|
708
|
+
if (remapping.newNodePath === null) {
|
|
709
|
+
return null;
|
|
710
|
+
}
|
|
711
|
+
nodePath = remapping.newNodePath;
|
|
712
|
+
}
|
|
713
|
+
if (!wasRemapped) {
|
|
714
|
+
return item;
|
|
715
|
+
}
|
|
716
|
+
return {
|
|
717
|
+
...item,
|
|
718
|
+
nodePathInfo: {
|
|
719
|
+
...item.nodePathInfo,
|
|
720
|
+
sequenceSubscriptionKey: {
|
|
721
|
+
...sequenceSubscriptionKey,
|
|
722
|
+
nodePath,
|
|
723
|
+
},
|
|
724
|
+
},
|
|
725
|
+
};
|
|
726
|
+
};
|
|
727
|
+
const snapshot = selectionController.getSnapshot();
|
|
728
|
+
const selectedItems = snapshot.selectedItems
|
|
729
|
+
.map(remapItem)
|
|
730
|
+
.filter((item) => item !== null);
|
|
731
|
+
const anchor = remapItem(snapshot.anchor);
|
|
732
|
+
if (selectedItems.some((item, index) => item !== snapshot.selectedItems[index]) ||
|
|
733
|
+
selectedItems.length !== snapshot.selectedItems.length ||
|
|
734
|
+
anchor !== snapshot.anchor) {
|
|
735
|
+
selectionController.setSnapshot({ selectedItems, anchor });
|
|
736
|
+
}
|
|
737
|
+
}, [selectionController]);
|
|
687
738
|
const value = (0, react_1.useMemo)(() => ({
|
|
688
739
|
canSelect,
|
|
689
740
|
revealRequest,
|
|
@@ -694,6 +745,7 @@ const TimelineSelectionProvider = ({ children }) => {
|
|
|
694
745
|
registerMarqueeSelectableItem,
|
|
695
746
|
getMarqueeSelection: getMarqueeSelectionForRect,
|
|
696
747
|
containsSelection,
|
|
748
|
+
remapSelectionNodePaths,
|
|
697
749
|
clearSelection,
|
|
698
750
|
}), [
|
|
699
751
|
canSelect,
|
|
@@ -705,6 +757,7 @@ const TimelineSelectionProvider = ({ children }) => {
|
|
|
705
757
|
registerMarqueeSelectableItem,
|
|
706
758
|
getMarqueeSelectionForRect,
|
|
707
759
|
containsSelection,
|
|
760
|
+
remapSelectionNodePaths,
|
|
708
761
|
clearSelection,
|
|
709
762
|
]);
|
|
710
763
|
const currentSelection = (0, react_1.useRef)(value);
|