@remotion/studio 4.0.522 → 4.0.524
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/install-package.js +4 -2
- package/dist/components/ActionTooltip.d.ts +9 -0
- package/dist/components/ActionTooltip.js +143 -0
- package/dist/components/AssetAudioVolume.d.ts +5 -0
- package/dist/components/AssetAudioVolume.js +33 -0
- package/dist/components/Canvas.js +8 -8
- package/dist/components/CaptionInspector.js +74 -20
- package/dist/components/CheckboardToggle.js +9 -10
- 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/CurrentAsset.js +40 -6
- package/dist/components/EditorContexts.js +3 -1
- package/dist/components/ElementInstallConfirmation.js +254 -137
- package/dist/components/FixComputedValueModal.js +38 -8
- package/dist/components/FullscreenToggle.js +8 -10
- package/dist/components/GlobalKeybindings.js +107 -49
- 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 +69 -6
- package/dist/components/InstallPackage.js +4 -5
- package/dist/components/KeyboardShortcutsSettings.js +212 -33
- package/dist/components/LazySyntaxHighlightedSource.d.ts +4 -0
- package/dist/components/LazySyntaxHighlightedSource.js +43 -0
- package/dist/components/LoopToggle.js +8 -2
- package/dist/components/MenuToolbar.js +11 -7
- 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/MuteToggle.d.ts +1 -0
- package/dist/components/MuteToggle.js +16 -6
- 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/NewComposition.d.ts +1 -0
- package/dist/components/NewComposition/NewComposition.js +5 -4
- package/dist/components/NewComposition/NewFolder.js +9 -8
- package/dist/components/NewComposition/RenameComposition.js +3 -2
- package/dist/components/NewComposition/RenameFolder.js +15 -10
- package/dist/components/NewComposition/SlugPreview.d.ts +7 -0
- package/dist/components/NewComposition/SlugPreview.js +18 -0
- package/dist/components/OptionalPackageModal.d.ts +11 -0
- package/dist/components/OptionalPackageModal.js +155 -0
- package/dist/components/OutlineToggle.js +16 -10
- package/dist/components/PlayPause.js +11 -9
- package/dist/components/PlaybackKeyboardShortcutsManager.d.ts +2 -0
- package/dist/components/PlaybackKeyboardShortcutsManager.js +39 -7
- package/dist/components/PlaybackRateSelector.js +2 -2
- package/dist/components/PreviewToolbar.js +1 -1
- package/dist/components/PreviewToolbarOverflowButton.js +19 -4
- 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/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 +130 -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 +2 -1
- package/dist/components/RenderQueue/RenderQueueDownloadItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueItem.js +3 -3
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +2 -1
- package/dist/components/RenderQueue/RenderQueueOpenInFolder.js +2 -1
- package/dist/components/RenderQueue/RenderQueueRemoveItem.js +2 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +2 -1
- package/dist/components/RenderQueue/VideoMattingQueueItem.d.ts +6 -0
- package/dist/components/RenderQueue/VideoMattingQueueItem.js +130 -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/RulersAndGuidesToggle.js +7 -1
- 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 +51 -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 +17 -21
- package/dist/components/SizeSelector.js +12 -4
- package/dist/components/SkillsSettings.js +2 -3
- package/dist/components/SnappingToggle.js +9 -8
- package/dist/components/StudioSettings.js +32 -18
- package/dist/components/SyntaxHighlightedSource.d.ts +5 -0
- package/dist/components/SyntaxHighlightedSource.js +78 -0
- 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/Timeline.js +49 -81
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +2 -4
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +3 -18
- package/dist/components/Timeline/TimelineDragHandler.js +2 -2
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +1 -0
- package/dist/components/Timeline/TimelineLayerChildren.js +12 -9
- 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 +75 -17
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +0 -1
- package/dist/components/Timeline/TimelineSequenceItem.js +208 -111
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +23 -3
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +73 -25
- package/dist/components/Timeline/TimelineTimeIndicators.js +1 -0
- package/dist/components/Timeline/TimelineZoomControls.js +2 -1
- package/dist/components/Timeline/timeline-field-display-utils.js +8 -5
- 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/TimelineCombobox.d.ts +1 -0
- package/dist/components/TimelineCombobox.js +8 -4
- package/dist/components/TimelineInOutToggle.js +14 -18
- 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 +8 -12
- 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/handle-drop.js +3 -2
- 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 +191 -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/error-overlay/remotion-overlay/CodeFrame.js +29 -18
- package/dist/esm/CaptionQueueProcessor-k0yrm3dj.mjs +211 -0
- package/dist/esm/LazyModels-hc33szyn.mjs +11 -0
- package/dist/esm/LazyModels-sg40rjw6.mjs +11 -0
- package/dist/esm/SyntaxHighlightedSource-3xks91rz.mjs +1236 -0
- package/dist/esm/TranscriptionModal-3ctnxpt6.mjs +1011 -0
- package/dist/esm/VideoMattingModal-b0r7e60n.mjs +374 -0
- package/dist/esm/VideoMattingQueueProcessor-t1hgm2rm.mjs +109 -0
- package/dist/esm/index-1b9skrrd.mjs +142 -0
- package/dist/esm/index-2j3d1g81.mjs +261 -0
- package/dist/esm/index-5zrb1ft4.mjs +39 -0
- package/dist/esm/index-7tt71e8n.mjs +36 -0
- package/dist/esm/index-9qtvmwtx.mjs +1366 -0
- package/dist/esm/index-9x6e1dq0.mjs +428 -0
- package/dist/esm/index-c37kme2v.mjs +46209 -0
- package/dist/esm/index-cw0pnpg5.mjs +50 -0
- package/dist/esm/index-e3zwf3e7.mjs +36 -0
- package/dist/esm/index-er3mh6em.mjs +54688 -0
- package/dist/esm/{chunk-je0h1bgt.js → index-k426ye99.mjs} +4 -1
- package/dist/esm/index-q2epbw93.mjs +423 -0
- package/dist/esm/index-q5xv20xx.mjs +41 -0
- package/dist/esm/{chunk-6jf1natv.js → index-rcv7qkt5.mjs} +18 -1
- package/dist/esm/index-v4tr1bft.mjs +20 -0
- package/dist/esm/index-wbmp5srk.mjs +35 -0
- package/dist/esm/index-yfrysr5f.mjs +1154 -0
- package/dist/esm/index.mjs +45 -933
- package/dist/esm/internals.mjs +13 -114393
- package/dist/esm/previewEntry.mjs +387 -115050
- package/dist/esm/renderEntry.mjs +5 -5
- package/dist/esm/{chunk-m0jqdbkr.js → resolve-composition-component-location-bt2d6qxq.mjs} +1 -1
- package/dist/helpers/colors.d.ts +1 -0
- package/dist/helpers/colors.js +4 -3
- 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-vsc-dark-plus.d.ts +1 -0
- package/dist/helpers/prism-vsc-dark-plus.js +305 -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-create-composition.d.ts +1 -0
- package/dist/helpers/use-create-composition.js +12 -7
- 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 +59 -14
- package/dist/helpers/use-rename-composition.d.ts +1 -0
- package/dist/helpers/use-rename-composition.js +11 -5
- 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/skills.js +1 -1
- package/dist/icons/transcription.d.ts +4 -0
- package/dist/icons/transcription.js +7 -0
- package/dist/icons/upload.js +1 -1
- package/dist/renderEntry.js +2 -2
- package/dist/state/modals.d.ts +14 -2
- package/package.json +35 -21
- package/dist/components/UpdateCheck.d.ts +0 -1
- package/dist/components/UpdateCheck.js +0 -79
- package/dist/esm/chunk-3netyjd9.js +0 -99793
|
@@ -33,7 +33,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.TimelineSequenceItem =
|
|
36
|
+
exports.TimelineSequenceItem = void 0;
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const remotion_1 = require("remotion");
|
|
@@ -43,6 +43,8 @@ const client_id_1 = require("../../helpers/client-id");
|
|
|
43
43
|
const colors_1 = require("../../helpers/colors");
|
|
44
44
|
const get_sequence_double_click_action_1 = require("../../helpers/get-sequence-double-click-action");
|
|
45
45
|
const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
46
|
+
const is_current_selected_still_1 = require("../../helpers/is-current-selected-still");
|
|
47
|
+
const pointer_session_1 = require("../../helpers/pointer-session");
|
|
46
48
|
const studio_runtime_config_1 = require("../../helpers/studio-runtime-config");
|
|
47
49
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
48
50
|
const use_keybinding_1 = require("../../helpers/use-keybinding");
|
|
@@ -68,6 +70,8 @@ const get_sequence_split_menu_item_1 = require("./get-sequence-split-menu-item")
|
|
|
68
70
|
const imperative_state_1 = require("./imperative-state");
|
|
69
71
|
const save_sequence_prop_1 = require("./save-sequence-prop");
|
|
70
72
|
const timeline_asset_link_1 = require("./timeline-asset-link");
|
|
73
|
+
const timeline_refs_1 = require("./timeline-refs");
|
|
74
|
+
const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
|
|
71
75
|
const TimelineDuplicateCount_1 = require("./TimelineDuplicateCount");
|
|
72
76
|
const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
|
|
73
77
|
const TimelineExpandedSection_1 = require("./TimelineExpandedSection");
|
|
@@ -77,6 +81,8 @@ const TimelineMediaInfo_1 = require("./TimelineMediaInfo");
|
|
|
77
81
|
const TimelineRowChrome_1 = require("./TimelineRowChrome");
|
|
78
82
|
const TimelineSelection_1 = require("./TimelineSelection");
|
|
79
83
|
const TimelineSequenceName_1 = require("./TimelineSequenceName");
|
|
84
|
+
const TimelineTimeIndicators_1 = require("./TimelineTimeIndicators");
|
|
85
|
+
const use_asset_timeline_context_menu_1 = require("./use-asset-timeline-context-menu");
|
|
80
86
|
const use_delete_timeline_items_1 = require("./use-delete-timeline-items");
|
|
81
87
|
const use_open_sequence_in_apps_1 = require("./use-open-sequence-in-apps");
|
|
82
88
|
const use_rename_sequence_1 = require("./use-rename-sequence");
|
|
@@ -100,8 +106,6 @@ const effectDropHighlight = {
|
|
|
100
106
|
outline: colors_1.BORDER_TIMELINE_DROP_BLUE,
|
|
101
107
|
outlineOffset: -1,
|
|
102
108
|
};
|
|
103
|
-
exports.SEQUENCE_REORDER_MIME_TYPE = 'application/remotion-sequence-reorder';
|
|
104
|
-
let currentSequenceDrag = null;
|
|
105
109
|
const TimelineSequenceExpandArrowInner = ({ disabled, isExpanded, nodePathInfo, sequence }) => {
|
|
106
110
|
const { toggleTrack } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksSetterContext);
|
|
107
111
|
const hasExpandableContent = (0, use_timeline_expanded_tree_1.useTimelineSequenceHasExpandableContent)({
|
|
@@ -147,39 +151,24 @@ const sequenceReorderAfterLine = {
|
|
|
147
151
|
...sequenceReorderLineBase,
|
|
148
152
|
top: -1,
|
|
149
153
|
};
|
|
150
|
-
const
|
|
151
|
-
return
|
|
152
|
-
};
|
|
153
|
-
const isSequenceReorderDrag = (dataTransfer) => {
|
|
154
|
-
return (currentSequenceDrag !== null || hasSequenceReorderDragType(dataTransfer));
|
|
154
|
+
const getDestinationIndex = ({ fromIndex, insertionIndex, }) => {
|
|
155
|
+
return insertionIndex > fromIndex ? insertionIndex - 1 : insertionIndex;
|
|
155
156
|
};
|
|
156
|
-
const
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
if (typeof parsed.nodePathKey === 'string' &&
|
|
167
|
-
typeof parsed.siblingIndex === 'number' &&
|
|
168
|
-
(typeof parsed.parentId === 'string' || parsed.parentId === null) &&
|
|
169
|
-
typeof parsed.fileName === 'string' &&
|
|
170
|
-
parsed.nodePath &&
|
|
171
|
-
Array.isArray(parsed.nodePath.nodePath)) {
|
|
172
|
-
return parsed;
|
|
157
|
+
const sequencePointerDropTargets = new Map();
|
|
158
|
+
const getSequencePointerDropTargetAtPoint = ({ clientX, clientY, }) => {
|
|
159
|
+
for (const element of document.elementsFromPoint(clientX, clientY)) {
|
|
160
|
+
let current = element;
|
|
161
|
+
while (current) {
|
|
162
|
+
const dropTarget = sequencePointerDropTargets.get(current);
|
|
163
|
+
if (dropTarget) {
|
|
164
|
+
return dropTarget;
|
|
165
|
+
}
|
|
166
|
+
current = current.parentElement;
|
|
173
167
|
}
|
|
174
168
|
}
|
|
175
|
-
catch (_a) {
|
|
176
|
-
return null;
|
|
177
|
-
}
|
|
178
169
|
return null;
|
|
179
170
|
};
|
|
180
|
-
const
|
|
181
|
-
return insertionIndex > fromIndex ? insertionIndex - 1 : insertionIndex;
|
|
182
|
-
};
|
|
171
|
+
const SEQUENCE_REORDER_POINTER_THRESHOLD = 3;
|
|
183
172
|
const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions, nestedDepth, sequence, nodePathInfo, keyframeDisplayOffset, sequenceFrameOffset, siblingIndex, }) => {
|
|
184
173
|
var _a, _b;
|
|
185
174
|
var _c, _d, _e, _f;
|
|
@@ -188,12 +177,14 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
188
177
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
189
178
|
const previewConnected = previewServerState.type === 'connected';
|
|
190
179
|
const previewInteractive = previewConnected && (0, interactivity_enabled_1.isStudioInteractivityEnabled)();
|
|
180
|
+
const isStill = (0, is_current_selected_still_1.useIsStill)();
|
|
191
181
|
const canMutateEffects = previewConnected && (0, interactivity_enabled_1.isStudioSelectionEnabled)() && (0, browser_studio_operations_1.canUseEffectOperations)();
|
|
192
182
|
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
193
183
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
194
184
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
195
185
|
const { isHighestContext } = (0, use_keybinding_1.useKeybinding)();
|
|
196
186
|
const selectAsset = (0, use_select_asset_1.useSelectAsset)();
|
|
187
|
+
const assetContextMenu = (0, use_asset_timeline_context_menu_1.useAssetTimelineContextMenu)();
|
|
197
188
|
const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
|
|
198
189
|
const deleteTimelineItems = (0, use_delete_timeline_items_1.useDeleteTimelineItems)();
|
|
199
190
|
const { onSelect, selectable, selected } = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
@@ -210,6 +201,9 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
210
201
|
const [effectDropHovered, setEffectDropHovered] = (0, react_1.useState)(false);
|
|
211
202
|
const [isRenaming, setIsRenaming] = (0, react_1.useState)(false);
|
|
212
203
|
const [sequenceDropIndicator, setSequenceDropIndicator] = (0, react_1.useState)(null);
|
|
204
|
+
const sequenceReorderWrapperRef = (0, react_1.useRef)(null);
|
|
205
|
+
const stopSequencePointerSession = (0, react_1.useRef)(null);
|
|
206
|
+
const suppressNextClick = (0, react_1.useRef)(false);
|
|
213
207
|
const { canOpenInEditor, canConfigureApps, codingAgentInfo, editorInfo, openInCodingAgent, openInEditor, originalLocation, } = (0, use_open_sequence_in_apps_1.useOpenSequenceInApps)(sequence);
|
|
214
208
|
const validatedLocation = (0, react_1.useMemo)(() => {
|
|
215
209
|
var _a;
|
|
@@ -307,11 +301,7 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
307
301
|
setPropStatuses,
|
|
308
302
|
validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
|
|
309
303
|
]);
|
|
310
|
-
const getSequenceDropTarget = (0, react_1.useCallback)((
|
|
311
|
-
const dragData = getSequenceReorderDragData(e.dataTransfer);
|
|
312
|
-
if (!dragData) {
|
|
313
|
-
return null;
|
|
314
|
-
}
|
|
304
|
+
const getSequenceDropTarget = (0, react_1.useCallback)((clientY, dragData) => {
|
|
315
305
|
if (!nodePath || !nodePathKey || !(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source)) {
|
|
316
306
|
return {
|
|
317
307
|
type: 'invalid',
|
|
@@ -337,8 +327,12 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
337
327
|
reason: 'Sequences can only be reordered with direct JSX siblings.',
|
|
338
328
|
};
|
|
339
329
|
}
|
|
340
|
-
const
|
|
341
|
-
|
|
330
|
+
const element = sequenceReorderWrapperRef.current;
|
|
331
|
+
if (!element) {
|
|
332
|
+
return null;
|
|
333
|
+
}
|
|
334
|
+
const rect = element.getBoundingClientRect();
|
|
335
|
+
const before = clientY < rect.top + rect.height / 2;
|
|
342
336
|
const insertionIndex = before ? siblingIndex : siblingIndex + 1;
|
|
343
337
|
const toIndex = getDestinationIndex({
|
|
344
338
|
fromIndex: dragData.siblingIndex,
|
|
@@ -363,78 +357,13 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
363
357
|
siblingIndex,
|
|
364
358
|
validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
|
|
365
359
|
]);
|
|
366
|
-
const
|
|
367
|
-
if (!canReorderSequence ||
|
|
368
|
-
!nodePath ||
|
|
369
|
-
!nodePathKey ||
|
|
370
|
-
!(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source)) {
|
|
371
|
-
e.preventDefault();
|
|
372
|
-
return;
|
|
373
|
-
}
|
|
374
|
-
const dragData = {
|
|
375
|
-
nodePath,
|
|
376
|
-
nodePathKey,
|
|
377
|
-
siblingIndex,
|
|
378
|
-
parentId,
|
|
379
|
-
fileName: validatedLocation.source,
|
|
380
|
-
};
|
|
381
|
-
currentSequenceDrag = dragData;
|
|
382
|
-
e.dataTransfer.effectAllowed = 'move';
|
|
383
|
-
e.dataTransfer.setData(exports.SEQUENCE_REORDER_MIME_TYPE, JSON.stringify(dragData));
|
|
384
|
-
e.stopPropagation();
|
|
385
|
-
}, [
|
|
386
|
-
canReorderSequence,
|
|
387
|
-
nodePath,
|
|
388
|
-
nodePathKey,
|
|
389
|
-
parentId,
|
|
390
|
-
siblingIndex,
|
|
391
|
-
validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
|
|
392
|
-
]);
|
|
393
|
-
const onSequenceDragEnd = (0, react_1.useCallback)(() => {
|
|
394
|
-
currentSequenceDrag = null;
|
|
395
|
-
setSequenceDropIndicator(null);
|
|
396
|
-
}, []);
|
|
397
|
-
const onSequenceDragOver = (0, react_1.useCallback)((e) => {
|
|
398
|
-
if (!hasSequenceReorderDragType(e.dataTransfer)) {
|
|
399
|
-
return;
|
|
400
|
-
}
|
|
401
|
-
const dropTarget = getSequenceDropTarget(e);
|
|
402
|
-
if (!dropTarget) {
|
|
403
|
-
setSequenceDropIndicator(null);
|
|
404
|
-
return;
|
|
405
|
-
}
|
|
406
|
-
if (dropTarget.type === 'invalid') {
|
|
407
|
-
setSequenceDropIndicator(null);
|
|
408
|
-
e.dataTransfer.dropEffect = 'none';
|
|
409
|
-
return;
|
|
410
|
-
}
|
|
411
|
-
e.preventDefault();
|
|
412
|
-
e.stopPropagation();
|
|
413
|
-
e.dataTransfer.dropEffect = 'move';
|
|
414
|
-
setSequenceDropIndicator(dropTarget.position);
|
|
415
|
-
}, [getSequenceDropTarget]);
|
|
416
|
-
const onSequenceDragLeave = (0, react_1.useCallback)((e) => {
|
|
417
|
-
if (e.currentTarget.contains(e.relatedTarget)) {
|
|
418
|
-
return;
|
|
419
|
-
}
|
|
420
|
-
setSequenceDropIndicator(null);
|
|
421
|
-
}, []);
|
|
422
|
-
const onSequenceDrop = (0, react_1.useCallback)(async (e) => {
|
|
360
|
+
const reorderSequenceFromPointer = (0, react_1.useCallback)(async (dropTarget) => {
|
|
423
361
|
if (!canReorderSequence ||
|
|
424
362
|
previewServerState.type !== 'connected' ||
|
|
425
363
|
!nodePath ||
|
|
426
364
|
!(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source)) {
|
|
427
365
|
return;
|
|
428
366
|
}
|
|
429
|
-
const dropTarget = getSequenceDropTarget(e);
|
|
430
|
-
if (!dropTarget || dropTarget.type === 'invalid') {
|
|
431
|
-
setSequenceDropIndicator(null);
|
|
432
|
-
return;
|
|
433
|
-
}
|
|
434
|
-
e.preventDefault();
|
|
435
|
-
e.stopPropagation();
|
|
436
|
-
setSequenceDropIndicator(null);
|
|
437
|
-
currentSequenceDrag = null;
|
|
438
367
|
try {
|
|
439
368
|
const result = await (0, reorder_sequence_api_1.reorderSequence)({
|
|
440
369
|
fileName: validatedLocation.source,
|
|
@@ -452,11 +381,178 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
452
381
|
}
|
|
453
382
|
}, [
|
|
454
383
|
canReorderSequence,
|
|
455
|
-
getSequenceDropTarget,
|
|
456
384
|
nodePath,
|
|
457
385
|
previewServerState,
|
|
458
386
|
validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
|
|
459
387
|
]);
|
|
388
|
+
(0, react_1.useEffect)(() => {
|
|
389
|
+
const element = sequenceReorderWrapperRef.current;
|
|
390
|
+
if (!element || !canHandleSequenceDrag) {
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
const pointerDropTarget = {
|
|
394
|
+
getDropTarget: getSequenceDropTarget,
|
|
395
|
+
reorder: (dropTarget) => {
|
|
396
|
+
reorderSequenceFromPointer(dropTarget).catch(() => undefined);
|
|
397
|
+
},
|
|
398
|
+
setDropIndicator: setSequenceDropIndicator,
|
|
399
|
+
};
|
|
400
|
+
sequencePointerDropTargets.set(element, pointerDropTarget);
|
|
401
|
+
return () => {
|
|
402
|
+
sequencePointerDropTargets.delete(element);
|
|
403
|
+
};
|
|
404
|
+
}, [
|
|
405
|
+
canHandleSequenceDrag,
|
|
406
|
+
getSequenceDropTarget,
|
|
407
|
+
reorderSequenceFromPointer,
|
|
408
|
+
]);
|
|
409
|
+
(0, react_1.useEffect)(() => {
|
|
410
|
+
return () => {
|
|
411
|
+
var _a;
|
|
412
|
+
return (_a = stopSequencePointerSession.current) === null || _a === void 0 ? void 0 : _a.call(stopSequencePointerSession);
|
|
413
|
+
};
|
|
414
|
+
}, []);
|
|
415
|
+
const onSequencePointerDown = (0, react_1.useCallback)((e) => {
|
|
416
|
+
var _a;
|
|
417
|
+
if (!(e.target instanceof Element)) {
|
|
418
|
+
return;
|
|
419
|
+
}
|
|
420
|
+
if (e.button !== 0 ||
|
|
421
|
+
!e.isPrimary ||
|
|
422
|
+
e.target.closest('[data-remotion-sequence-reorder-row]') !==
|
|
423
|
+
e.currentTarget ||
|
|
424
|
+
e.target.closest('button, input, textarea, select, [contenteditable="true"], [data-timeline-layer-eye]') ||
|
|
425
|
+
!canReorderSequence ||
|
|
426
|
+
!nodePath ||
|
|
427
|
+
!nodePathKey ||
|
|
428
|
+
!(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source)) {
|
|
429
|
+
return;
|
|
430
|
+
}
|
|
431
|
+
(_a = stopSequencePointerSession.current) === null || _a === void 0 ? void 0 : _a.call(stopSequencePointerSession);
|
|
432
|
+
const dragData = {
|
|
433
|
+
fileName: validatedLocation.source,
|
|
434
|
+
nodePath,
|
|
435
|
+
nodePathKey,
|
|
436
|
+
parentId,
|
|
437
|
+
siblingIndex,
|
|
438
|
+
};
|
|
439
|
+
const sourceElement = e.currentTarget;
|
|
440
|
+
const sourceRect = sourceElement.getBoundingClientRect();
|
|
441
|
+
const startX = e.clientX;
|
|
442
|
+
const startY = e.clientY;
|
|
443
|
+
let currentClientY = startY;
|
|
444
|
+
let dragPreview = null;
|
|
445
|
+
let activeDropTarget = null;
|
|
446
|
+
let activeDrop = null;
|
|
447
|
+
let didDrag = false;
|
|
448
|
+
let previousUserSelect = '';
|
|
449
|
+
let previousWebkitUserSelect = '';
|
|
450
|
+
const updateDropTarget = (clientY) => {
|
|
451
|
+
var _a;
|
|
452
|
+
const pointerDropTarget = getSequencePointerDropTargetAtPoint({
|
|
453
|
+
clientX: startX,
|
|
454
|
+
clientY,
|
|
455
|
+
});
|
|
456
|
+
const dropTarget = pointerDropTarget === null || pointerDropTarget === void 0 ? void 0 : pointerDropTarget.getDropTarget(clientY, dragData);
|
|
457
|
+
if (activeDropTarget !== pointerDropTarget) {
|
|
458
|
+
activeDropTarget === null || activeDropTarget === void 0 ? void 0 : activeDropTarget.setDropIndicator(null);
|
|
459
|
+
}
|
|
460
|
+
activeDropTarget = pointerDropTarget;
|
|
461
|
+
activeDrop = (dropTarget === null || dropTarget === void 0 ? void 0 : dropTarget.type) === 'valid' ? dropTarget : null;
|
|
462
|
+
activeDropTarget === null || activeDropTarget === void 0 ? void 0 : activeDropTarget.setDropIndicator((_a = activeDrop === null || activeDrop === void 0 ? void 0 : activeDrop.position) !== null && _a !== void 0 ? _a : null);
|
|
463
|
+
};
|
|
464
|
+
const verticalScroll = timeline_refs_1.timelineVerticalScroll.current;
|
|
465
|
+
const autoScroll = (0, timeline_scroll_logic_1.startTimelineEdgeAutoScroll)({
|
|
466
|
+
includeHorizontal: false,
|
|
467
|
+
includeVertical: true,
|
|
468
|
+
verticalTopOffset: isStill ? 0 : TimelineTimeIndicators_1.TIMELINE_TIME_INDICATOR_HEIGHT,
|
|
469
|
+
onTick: (directions) => {
|
|
470
|
+
if (directions.y === null || !verticalScroll) {
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
verticalScroll.scrollTop +=
|
|
474
|
+
directions.y === 'up'
|
|
475
|
+
? -timeline_scroll_logic_1.EDGE_SCROLL_VERTICAL_INCREMENT
|
|
476
|
+
: timeline_scroll_logic_1.EDGE_SCROLL_VERTICAL_INCREMENT;
|
|
477
|
+
updateDropTarget(currentClientY);
|
|
478
|
+
},
|
|
479
|
+
});
|
|
480
|
+
stopSequencePointerSession.current = (0, pointer_session_1.startCapturedPointerSession)({
|
|
481
|
+
captureTarget: sourceElement,
|
|
482
|
+
event: e.nativeEvent,
|
|
483
|
+
onMove: (pointerEvent) => {
|
|
484
|
+
currentClientY = pointerEvent.clientY;
|
|
485
|
+
if (!didDrag &&
|
|
486
|
+
Math.hypot(pointerEvent.clientX - startX, pointerEvent.clientY - startY) < SEQUENCE_REORDER_POINTER_THRESHOLD) {
|
|
487
|
+
return;
|
|
488
|
+
}
|
|
489
|
+
if (!didDrag) {
|
|
490
|
+
didDrag = true;
|
|
491
|
+
previousUserSelect = document.body.style.userSelect;
|
|
492
|
+
previousWebkitUserSelect = document.body.style.webkitUserSelect;
|
|
493
|
+
document.body.style.userSelect = 'none';
|
|
494
|
+
document.body.style.webkitUserSelect = 'none';
|
|
495
|
+
dragPreview = sourceElement.cloneNode(true);
|
|
496
|
+
dragPreview.setAttribute('aria-hidden', 'true');
|
|
497
|
+
dragPreview.setAttribute('data-remotion-sequence-reorder-preview', 'true');
|
|
498
|
+
dragPreview.removeAttribute('data-remotion-sequence-reorder-row');
|
|
499
|
+
Object.assign(dragPreview.style, {
|
|
500
|
+
height: `${sourceRect.height}px`,
|
|
501
|
+
left: `${sourceRect.left}px`,
|
|
502
|
+
margin: '0',
|
|
503
|
+
opacity: '0.8',
|
|
504
|
+
pointerEvents: 'none',
|
|
505
|
+
position: 'fixed',
|
|
506
|
+
top: `${sourceRect.top}px`,
|
|
507
|
+
width: `${sourceRect.width}px`,
|
|
508
|
+
zIndex: '2147483647',
|
|
509
|
+
});
|
|
510
|
+
document.body.appendChild(dragPreview);
|
|
511
|
+
}
|
|
512
|
+
pointerEvent.preventDefault();
|
|
513
|
+
dragPreview.style.transform = `translate3d(0, ${pointerEvent.clientY - startY}px, 0)`;
|
|
514
|
+
updateDropTarget(pointerEvent.clientY);
|
|
515
|
+
autoScroll.update({ clientX: startX, clientY: pointerEvent.clientY });
|
|
516
|
+
},
|
|
517
|
+
onEnd: (reason, pointerEvent) => {
|
|
518
|
+
if (reason === 'pointerup' && pointerEvent && didDrag) {
|
|
519
|
+
updateDropTarget(pointerEvent.clientY);
|
|
520
|
+
}
|
|
521
|
+
autoScroll.stop();
|
|
522
|
+
activeDropTarget === null || activeDropTarget === void 0 ? void 0 : activeDropTarget.setDropIndicator(null);
|
|
523
|
+
dragPreview === null || dragPreview === void 0 ? void 0 : dragPreview.remove();
|
|
524
|
+
stopSequencePointerSession.current = null;
|
|
525
|
+
if (!didDrag) {
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
document.body.style.userSelect = previousUserSelect;
|
|
529
|
+
document.body.style.webkitUserSelect = previousWebkitUserSelect;
|
|
530
|
+
suppressNextClick.current = true;
|
|
531
|
+
setTimeout(() => {
|
|
532
|
+
suppressNextClick.current = false;
|
|
533
|
+
}, 0);
|
|
534
|
+
if (reason === 'pointerup' && pointerEvent && activeDrop) {
|
|
535
|
+
activeDropTarget === null || activeDropTarget === void 0 ? void 0 : activeDropTarget.reorder(activeDrop);
|
|
536
|
+
}
|
|
537
|
+
},
|
|
538
|
+
});
|
|
539
|
+
}, [
|
|
540
|
+
canReorderSequence,
|
|
541
|
+
isStill,
|
|
542
|
+
nodePath,
|
|
543
|
+
nodePathKey,
|
|
544
|
+
parentId,
|
|
545
|
+
siblingIndex,
|
|
546
|
+
validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
|
|
547
|
+
]);
|
|
548
|
+
const onSequenceClickCapture = (0, react_1.useCallback)((e) => {
|
|
549
|
+
if (!suppressNextClick.current) {
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
e.preventDefault();
|
|
553
|
+
e.stopPropagation();
|
|
554
|
+
suppressNextClick.current = false;
|
|
555
|
+
}, []);
|
|
460
556
|
const mediaSrc = sequence.type === 'audio' ||
|
|
461
557
|
sequence.type === 'video' ||
|
|
462
558
|
sequence.type === 'image'
|
|
@@ -695,6 +791,9 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
695
791
|
}, [canRotate, nodePathInfo, selectItem, setManuallyEnabled]);
|
|
696
792
|
const getContextMenuItems = (0, react_1.useCallback)(() => {
|
|
697
793
|
var _a;
|
|
794
|
+
if (assetContextMenu !== null) {
|
|
795
|
+
return assetContextMenu;
|
|
796
|
+
}
|
|
698
797
|
if (selectable && !selected) {
|
|
699
798
|
onSelect({ shiftKey: false, toggleKey: false });
|
|
700
799
|
}
|
|
@@ -835,6 +934,7 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
835
934
|
: [],
|
|
836
935
|
});
|
|
837
936
|
}, [
|
|
937
|
+
assetContextMenu,
|
|
838
938
|
canAddEffect,
|
|
839
939
|
canCrop,
|
|
840
940
|
canRotate,
|
|
@@ -891,9 +991,7 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
891
991
|
};
|
|
892
992
|
}, [sequenceDropIndicator]);
|
|
893
993
|
const onEffectDragOver = (0, react_1.useCallback)((e) => {
|
|
894
|
-
if (!canDropEffect ||
|
|
895
|
-
isSequenceReorderDrag(e.dataTransfer) ||
|
|
896
|
-
!(0, effect_drag_and_drop_1.hasEffectDragType)(e.dataTransfer)) {
|
|
994
|
+
if (!canDropEffect || !(0, effect_drag_and_drop_1.hasEffectDragType)(e.dataTransfer)) {
|
|
897
995
|
return;
|
|
898
996
|
}
|
|
899
997
|
e.preventDefault();
|
|
@@ -911,7 +1009,6 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
911
1009
|
previewServerState.type !== 'connected' ||
|
|
912
1010
|
nodePath === null ||
|
|
913
1011
|
validatedLocation === null ||
|
|
914
|
-
isSequenceReorderDrag(e.dataTransfer) ||
|
|
915
1012
|
!(0, effect_drag_and_drop_1.hasEffectDragType)(e.dataTransfer)) {
|
|
916
1013
|
return;
|
|
917
1014
|
}
|
|
@@ -946,11 +1043,11 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
946
1043
|
" ",
|
|
947
1044
|
jsx_runtime_1.jsx(TimelineMediaInfo_1.TimelineMediaInfo, { src: mediaSrc })
|
|
948
1045
|
] })) : null] }) }));
|
|
949
|
-
const
|
|
1046
|
+
const reorderableTrackRow = canHandleSequenceDrag ? (jsx_runtime_1.jsxs("div", { ref: sequenceReorderWrapperRef, "data-remotion-sequence-reorder-row": true, onClickCapture: onSequenceClickCapture, onPointerDownCapture: onSequencePointerDown, style: sequenceReorderWrapper, children: [sequenceReorderLineStyle ? (jsx_runtime_1.jsx("div", { style: sequenceReorderLineStyle })) : null, trackRow, sequenceDropIndicator === 'after' ? (jsx_runtime_1.jsx("div", { style: {
|
|
950
1047
|
...sequenceReorderAfterLineWrapper,
|
|
951
1048
|
top: afterDropLineOffset,
|
|
952
1049
|
}, children: jsx_runtime_1.jsx("div", { style: sequenceReorderAfterLine }) })) : null] })) : (trackRow);
|
|
953
|
-
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children:
|
|
1050
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: reorderableTrackRow })) : (reorderableTrackRow), previewConnected &&
|
|
954
1051
|
(0, interactivity_enabled_1.isStudioInteractivityEnabled)() &&
|
|
955
1052
|
isExpanded &&
|
|
956
1053
|
hasExpandableContent &&
|
|
@@ -4,6 +4,24 @@ import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-s
|
|
|
4
4
|
import type { MoveEffectKeyframeChange, MoveSequenceKeyframeChange } from './call-move-keyframe';
|
|
5
5
|
import { type SaveSequencePropChange } from './save-sequence-prop';
|
|
6
6
|
export declare const timelineSequenceFromDragSnapThresholdPx = 10;
|
|
7
|
+
export type TimelineSequenceMediaDurationDragLimits = {
|
|
8
|
+
readonly initialDuration: number;
|
|
9
|
+
readonly maximumDuration: number;
|
|
10
|
+
};
|
|
11
|
+
export declare const TimelineSequenceMediaDurationDragLimitsContext: React.Context<React.RefObject<Map<string, TimelineSequenceMediaDurationDragLimits | null>> | null>;
|
|
12
|
+
export declare const TimelineSequenceMediaDurationDragLimitsProvider: React.FC<{
|
|
13
|
+
readonly children: React.ReactNode;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const getTimelineSequenceMediaDurationDragLimits: ({ cascadedStart, displayDurationInFrames, displayStart, effectiveMaxMediaDuration, explicitDurationInFrames, hasImplicitDuration, naturalMediaDuration, timelineDurationInFrames, }: {
|
|
16
|
+
readonly cascadedStart: number;
|
|
17
|
+
readonly displayDurationInFrames: number;
|
|
18
|
+
readonly displayStart: number;
|
|
19
|
+
readonly effectiveMaxMediaDuration: number | null;
|
|
20
|
+
readonly explicitDurationInFrames: number | null;
|
|
21
|
+
readonly hasImplicitDuration: boolean;
|
|
22
|
+
readonly naturalMediaDuration: number | null;
|
|
23
|
+
readonly timelineDurationInFrames: number;
|
|
24
|
+
}) => TimelineSequenceMediaDurationDragLimits | null;
|
|
7
25
|
export type TimelineSequenceDurationDragTarget = {
|
|
8
26
|
readonly fileName: string;
|
|
9
27
|
readonly initialDuration: number;
|
|
@@ -47,8 +65,7 @@ type TimelineSequenceEffectKeyframeDragTarget = TimelineSequenceKeyframeDragTarg
|
|
|
47
65
|
export declare const isTransitionSeriesSequence: (sequence: TSequence) => boolean;
|
|
48
66
|
export declare const isCascadingSequence: (sequence: TSequence) => boolean;
|
|
49
67
|
export declare const isTimelineSequenceDurationDraggable: (sequence: TSequence) => boolean;
|
|
50
|
-
export declare const canResizeTimelineSequenceDuration: ({
|
|
51
|
-
readonly sequence: TSequence;
|
|
68
|
+
export declare const canResizeTimelineSequenceDuration: ({ status, }: {
|
|
52
69
|
readonly status: CanUpdateSequencePropStatus | undefined;
|
|
53
70
|
}) => boolean;
|
|
54
71
|
export declare const isTimelineSequenceLeftEdgeDraggable: (sequence: TSequence) => boolean;
|
|
@@ -107,8 +124,10 @@ export declare const getTimelineSequenceFromDragKeyframeMoves: ({ targets, delta
|
|
|
107
124
|
readonly effectKeyframes: MoveEffectKeyframeChange[];
|
|
108
125
|
readonly sequenceKeyframes: MoveSequenceKeyframeChange[];
|
|
109
126
|
};
|
|
110
|
-
export declare const getTimelineSequenceDurationDragTargets: ({ draggedNodePathInfo, selectedItems, sequences, overrideIdsToNodePaths, propStatuses, timelineDurationInFrames, }: {
|
|
127
|
+
export declare const getTimelineSequenceDurationDragTargets: ({ draggedNodePathInfo, draggedSequenceMediaDurationDragLimits, selectedSequenceMediaDurationDragLimits, selectedItems, sequences, overrideIdsToNodePaths, propStatuses, timelineDurationInFrames, }: {
|
|
111
128
|
readonly draggedNodePathInfo: SequenceNodePathInfo;
|
|
129
|
+
readonly draggedSequenceMediaDurationDragLimits: TimelineSequenceMediaDurationDragLimits | null;
|
|
130
|
+
readonly selectedSequenceMediaDurationDragLimits: ReadonlyMap<string, TimelineSequenceMediaDurationDragLimits | null> | null;
|
|
112
131
|
readonly selectedItems: readonly import("@remotion/canvas").CanvasSelectionItem[];
|
|
113
132
|
readonly sequences: TSequence[];
|
|
114
133
|
readonly overrideIdsToNodePaths: OverrideIdToNodePaths;
|
|
@@ -147,6 +166,7 @@ export declare const useTimelineSequenceFromDrag: ({ nodePathInfo, windowWidth,
|
|
|
147
166
|
};
|
|
148
167
|
export declare const TimelineSequenceRightEdgeDragHandle: React.NamedExoticComponent<{
|
|
149
168
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
169
|
+
readonly mediaDurationDragLimits: TimelineSequenceMediaDurationDragLimits | null;
|
|
150
170
|
readonly windowWidth: number;
|
|
151
171
|
readonly timelineDurationInFrames: number;
|
|
152
172
|
readonly onDragEnd: (wasDragged: boolean) => void;
|