@remotion/studio 4.0.521 → 4.0.522
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/CanvasIfSizeIsAvailable.js +7 -0
- package/dist/components/CopyButton.js +7 -14
- package/dist/components/Editor.js +6 -5
- package/dist/components/EditorContent.js +1 -1
- package/dist/components/ElementInstallConfirmation.js +3 -1
- package/dist/components/FixComputedValueModal.js +20 -10
- package/dist/components/InspectorLocationCopy.js +10 -5
- package/dist/components/MenuBuildIndicator.js +7 -2
- package/dist/components/MenuCompositionName.js +62 -6
- package/dist/components/RenderModal/CliCopyButton.js +13 -27
- package/dist/components/RenderQueue/RenderQueueCopyToClipboard.js +7 -4
- package/dist/components/SidebarCollapserControls.js +11 -5
- package/dist/components/SkillsSettings.js +9 -5
- 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/Timeline/SubscribeToNodePaths.d.ts +2 -1
- package/dist/components/Timeline/SubscribeToNodePaths.js +2 -1
- package/dist/components/Timeline/Timeline.js +15 -4
- package/dist/components/Timeline/TimelineDragHandler.js +9 -4
- package/dist/components/Timeline/TimelinePinchZoom.js +6 -30
- package/dist/components/Timeline/TimelinePlayCursorSyncer.js +1 -7
- package/dist/components/Timeline/TimelineSequence.js +77 -12
- package/dist/components/Timeline/TimelineSequenceItem.js +12 -1
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +13 -3
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +168 -121
- package/dist/components/Timeline/TimelineSlider.js +1 -4
- 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-sequence-props-subscription.d.ts +3 -2
- package/dist/components/Timeline/use-sequence-props-subscription.js +4 -10
- package/dist/components/TopPanel.js +3 -19
- package/dist/components/UpdatesSettings.js +9 -5
- package/dist/components/ZoomPersistor.js +6 -3
- package/dist/components/composition-menu-items.js +1 -1
- package/dist/esm/{chunk-emw4k5b0.js → chunk-3netyjd9.js} +4917 -4651
- package/dist/esm/internals.mjs +4917 -4651
- package/dist/esm/previewEntry.mjs +4895 -4629
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/copy-text.js +1 -2
- package/dist/helpers/use-copy-feedback.d.ts +4 -0
- package/dist/helpers/use-copy-feedback.js +19 -0
- package/dist/icons/copy.d.ts +5 -0
- package/dist/icons/copy.js +12 -0
- package/dist/state/canvas-ref.d.ts +1 -0
- package/dist/state/canvas-ref.js +2 -1
- 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 +15 -15
- 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
|
@@ -35,6 +35,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.TimelineSequence = void 0;
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
|
+
const canvas_1 = require("@remotion/canvas");
|
|
38
39
|
const react_1 = __importStar(require("react"));
|
|
39
40
|
const remotion_1 = require("remotion");
|
|
40
41
|
const client_id_1 = require("../../helpers/client-id");
|
|
@@ -45,7 +46,7 @@ const get_timeline_sequence_layout_1 = require("../../helpers/get-timeline-seque
|
|
|
45
46
|
const interactivity_enabled_1 = require("../../helpers/interactivity-enabled");
|
|
46
47
|
const is_video_with_last_frame_hold_1 = require("../../helpers/is-video-with-last-frame-hold");
|
|
47
48
|
const timeline_layout_1 = require("../../helpers/timeline-layout");
|
|
48
|
-
const
|
|
49
|
+
const use_media_metadata_1 = require("../../helpers/use-media-metadata");
|
|
49
50
|
const modals_1 = require("../../state/modals");
|
|
50
51
|
const AudioWaveform_1 = require("../AudioWaveform");
|
|
51
52
|
const ConfirmationDialog_1 = require("../ConfirmationDialog");
|
|
@@ -55,6 +56,8 @@ const use_select_asset_1 = require("../use-select-asset");
|
|
|
55
56
|
const disable_sequence_interactivity_1 = require("./disable-sequence-interactivity");
|
|
56
57
|
const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
|
|
57
58
|
const get_sequence_context_menu_items_1 = require("./get-sequence-context-menu-items");
|
|
59
|
+
const get_sequence_split_menu_item_1 = require("./get-sequence-split-menu-item");
|
|
60
|
+
const get_timeline_media_start_frame_1 = require("./get-timeline-media-start-frame");
|
|
58
61
|
const get_timeline_sequence_visible_layout_1 = require("./get-timeline-sequence-visible-layout");
|
|
59
62
|
const imperative_state_1 = require("./imperative-state");
|
|
60
63
|
const LoopedTimelineIndicators_1 = require("./LoopedTimelineIndicators");
|
|
@@ -235,11 +238,27 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
235
238
|
var _a, _b, _c;
|
|
236
239
|
var _d, _e, _f, _g, _h, _j, _k;
|
|
237
240
|
const video = remotion_1.Internals.useVideo();
|
|
241
|
+
const { sequences } = (0, react_1.useContext)(remotion_1.Internals.SequenceManager);
|
|
238
242
|
const renderWindow = (0, react_1.useContext)(TimelineViewport_1.TimelineViewportContext);
|
|
239
243
|
const dragAwareDoubleClick = (0, react_1.useMemo)(() => (0, drag_aware_double_click_1.createDragAwareDoubleClickTracker)(), []);
|
|
240
|
-
const
|
|
241
|
-
const effectiveMaxMediaDuration = s.loopDisplay ? null : maxMediaDuration;
|
|
244
|
+
const mediaMetadata = (0, use_media_metadata_1.useMediaMetadata)(s.type === 'audio' || s.type === 'video' ? s.src : null);
|
|
242
245
|
const extendVideoLastFrame = (0, is_video_with_last_frame_hold_1.isVideoWithLastFrameHold)(s);
|
|
246
|
+
const naturalMediaDuration = (s.type === 'audio' || s.type === 'video') &&
|
|
247
|
+
mediaMetadata !== null &&
|
|
248
|
+
s.playbackRate > 0
|
|
249
|
+
? Math.max(0, (mediaMetadata.duration * ((_d = video === null || video === void 0 ? void 0 : video.fps) !== null && _d !== void 0 ? _d : 30) -
|
|
250
|
+
(0, get_timeline_media_start_frame_1.getTimelineMediaStartFrame)({
|
|
251
|
+
startMediaFrom: s.startMediaFrom,
|
|
252
|
+
mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero,
|
|
253
|
+
sequenceFrameOffset,
|
|
254
|
+
playbackRate: s.playbackRate,
|
|
255
|
+
})) /
|
|
256
|
+
s.playbackRate)
|
|
257
|
+
: null;
|
|
258
|
+
const maxMediaDuration = s.type === 'sequence' || s.type === 'image' || extendVideoLastFrame
|
|
259
|
+
? Infinity
|
|
260
|
+
: naturalMediaDuration;
|
|
261
|
+
const effectiveMaxMediaDuration = s.loopDisplay ? null : maxMediaDuration;
|
|
243
262
|
const { canOpenInEditor, canConfigureApps, codingAgentInfo, editorInfo, openInCodingAgent, openInEditor, originalLocation, } = (0, use_open_sequence_in_apps_1.useOpenSequenceInApps)(s);
|
|
244
263
|
const validatedLocation = (0, react_1.useMemo)(() => {
|
|
245
264
|
var _a;
|
|
@@ -406,6 +425,14 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
406
425
|
onDuplicateSelectedSequences,
|
|
407
426
|
});
|
|
408
427
|
}
|
|
428
|
+
const splitMenuItem = (0, get_sequence_split_menu_item_1.getSequenceSplitMenuItem)({
|
|
429
|
+
nodePathInfo,
|
|
430
|
+
sequence: s,
|
|
431
|
+
propStatuses: propStatusesForOverride,
|
|
432
|
+
splitFrame: (0, imperative_state_1.getCurrentFrame)(),
|
|
433
|
+
canEditSource: previewInteractive && Boolean(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source),
|
|
434
|
+
hasMultipleSelection: selected && selectedItems.length > 1,
|
|
435
|
+
});
|
|
409
436
|
const freezeFrameMenuItem = (0, use_sequence_freeze_frame_menu_item_1.getSequenceFreezeFrameMenuItem)({
|
|
410
437
|
clientId: previewInteractive && previewServerState.type === 'connected'
|
|
411
438
|
? previewServerState.clientId
|
|
@@ -447,8 +474,11 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
447
474
|
originalLocation,
|
|
448
475
|
selectAsset,
|
|
449
476
|
sequence: s,
|
|
450
|
-
sourceActions: (0, interactivity_enabled_1.isStudioInteractivityEnabled)()
|
|
451
|
-
? [
|
|
477
|
+
sourceActions: (0, interactivity_enabled_1.isStudioInteractivityEnabled)()
|
|
478
|
+
? [
|
|
479
|
+
...(splitMenuItem ? [splitMenuItem] : []),
|
|
480
|
+
...(freezeFrameMenuItem ? [freezeFrameMenuItem] : []),
|
|
481
|
+
]
|
|
452
482
|
: [],
|
|
453
483
|
});
|
|
454
484
|
}, [
|
|
@@ -462,6 +492,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
462
492
|
isProgrammaticallyDuplicated,
|
|
463
493
|
mediaSrc,
|
|
464
494
|
nodePath,
|
|
495
|
+
nodePathInfo,
|
|
465
496
|
onSelect,
|
|
466
497
|
onDeleteSequenceFromSource,
|
|
467
498
|
onDeleteSelectedSequences,
|
|
@@ -478,6 +509,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
478
509
|
selectAsset,
|
|
479
510
|
selectable,
|
|
480
511
|
selected,
|
|
512
|
+
selectedItems.length,
|
|
481
513
|
selectedSequenceNodePathInfos,
|
|
482
514
|
sequenceFrameOffset,
|
|
483
515
|
setPropStatuses,
|
|
@@ -502,7 +534,8 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
502
534
|
durationInFrames: displayDurationInFrames,
|
|
503
535
|
startFrom: s.loopDisplay ? s.from + s.loopDisplay.startOffset : s.from,
|
|
504
536
|
cascadedStart,
|
|
505
|
-
|
|
537
|
+
// The media duration cap already accounts for trimming and playback speed.
|
|
538
|
+
startFromMedia: 0,
|
|
506
539
|
maxMediaDuration: effectiveMaxMediaDuration,
|
|
507
540
|
video,
|
|
508
541
|
windowWidth,
|
|
@@ -549,7 +582,33 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
549
582
|
}, [visibleLayout]);
|
|
550
583
|
const showLeftBorderRadius = (visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.leftEdgeVisible) === true &&
|
|
551
584
|
localStart >= 0 &&
|
|
552
|
-
((_h = s.trimBefore) !== null && _h !== void 0 ? _h : 0) === 0
|
|
585
|
+
((_h = s.trimBefore) !== null && _h !== void 0 ? _h : 0) === 0 &&
|
|
586
|
+
(s.type === 'sequence' ||
|
|
587
|
+
s.type === 'image' ||
|
|
588
|
+
(0, get_timeline_media_start_frame_1.getTimelineMediaStartFrame)({
|
|
589
|
+
startMediaFrom: s.startMediaFrom,
|
|
590
|
+
mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero,
|
|
591
|
+
sequenceFrameOffset,
|
|
592
|
+
playbackRate: s.playbackRate,
|
|
593
|
+
}) === 0);
|
|
594
|
+
// Compare frame boundaries: fractional media durations still occupy the last frame.
|
|
595
|
+
const endsAtNaturalMediaDuration = !s.loopDisplay &&
|
|
596
|
+
s.frozenFrame === null &&
|
|
597
|
+
(s.type === 'audio' || s.type === 'video') &&
|
|
598
|
+
s.frozenMediaFrame === null &&
|
|
599
|
+
naturalMediaDuration !== null &&
|
|
600
|
+
Number.isFinite(naturalMediaDuration) &&
|
|
601
|
+
naturalMediaDuration > 0 &&
|
|
602
|
+
Math.ceil(Math.min(s.duration, video.durationInFrames - s.from, maxMediaDuration !== null && maxMediaDuration !== void 0 ? maxMediaDuration : Infinity)) === Math.ceil(naturalMediaDuration);
|
|
603
|
+
const parentSequence = sequences.find((candidate) => candidate.id === s.parent);
|
|
604
|
+
const parentEnd = parentSequence
|
|
605
|
+
? (0, canvas_1.getTimelineVisibleStart)(parentSequence, sequences) +
|
|
606
|
+
(0, canvas_1.getTimelineVisibleDuration)(parentSequence, sequences)
|
|
607
|
+
: video.durationInFrames;
|
|
608
|
+
const endsAtContainerBoundary = Math.ceil(s.from + displayDurationInFrames) >=
|
|
609
|
+
Math.ceil(Math.min(parentEnd, video.durationInFrames));
|
|
610
|
+
const showRightBorderRadius = (visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.rightEdgeVisible) === true &&
|
|
611
|
+
(endsAtContainerBoundary || endsAtNaturalMediaDuration);
|
|
553
612
|
const style = (0, react_1.useMemo)(() => {
|
|
554
613
|
var _a, _b;
|
|
555
614
|
return {
|
|
@@ -567,8 +626,8 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
567
626
|
: colors_1.TRANSPARENT,
|
|
568
627
|
borderTopLeftRadius: showLeftBorderRadius ? 2 : 0,
|
|
569
628
|
borderBottomLeftRadius: showLeftBorderRadius ? 2 : 0,
|
|
570
|
-
borderTopRightRadius:
|
|
571
|
-
borderBottomRightRadius:
|
|
629
|
+
borderTopRightRadius: showRightBorderRadius ? 2 : 0,
|
|
630
|
+
borderBottomRightRadius: showRightBorderRadius ? 2 : 0,
|
|
572
631
|
position: 'absolute',
|
|
573
632
|
height: (0, timeline_layout_1.getTimelineLayerHeight)(s.type),
|
|
574
633
|
marginLeft: (_a = visibleLayout === null || visibleLayout === void 0 ? void 0 : visibleLayout.marginLeft) !== null && _a !== void 0 ? _a : 0,
|
|
@@ -577,7 +636,13 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
577
636
|
// Edge handles extend outside the layer; media is clipped separately.
|
|
578
637
|
overflow: 'visible',
|
|
579
638
|
};
|
|
580
|
-
}, [
|
|
639
|
+
}, [
|
|
640
|
+
negativeStartClipped,
|
|
641
|
+
s.type,
|
|
642
|
+
showLeftBorderRadius,
|
|
643
|
+
showRightBorderRadius,
|
|
644
|
+
visibleLayout,
|
|
645
|
+
]);
|
|
581
646
|
const showRightEdgeDragHandle = (0, TimelineSequenceRightEdgeDragHandle_1.isTimelineSequenceDurationDraggable)(s) &&
|
|
582
647
|
nodePath !== null &&
|
|
583
648
|
validatedLocation !== null &&
|
|
@@ -602,10 +667,10 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
602
667
|
visibleLayout.leftEdgeVisible &&
|
|
603
668
|
negativeStartWidth === 0 &&
|
|
604
669
|
nodePathInfo &&
|
|
605
|
-
validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_j = video.durationInFrames) !== null && _j !== void 0 ? _j : 1, onDragEnd: dragAwareDoubleClick.endPointerGesture })) : null, showRightEdgeDragHandle &&
|
|
670
|
+
validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_j = video.durationInFrames) !== null && _j !== void 0 ? _j : 1, onDragEnd: dragAwareDoubleClick.endPointerGesture, onSelect: onSelect, selected: selected })) : null, showRightEdgeDragHandle &&
|
|
606
671
|
visibleLayout.rightEdgeVisible &&
|
|
607
672
|
nodePathInfo &&
|
|
608
|
-
validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_k = video.durationInFrames) !== null && _k !== void 0 ? _k : 1, onDragEnd: dragAwareDoubleClick.endPointerGesture })) : null] }), onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, children: [s.type === 'audio' && visibleLayout.media ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: s.src, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT_AUDIO, doesVolumeChange: s.doesVolumeChange, muted: s.muted, visualizationWidth: visibleLayout.media.width, startFrom: s.startMediaFrom, durationInFrames: s.duration, displayOffsetInFrames: mediaDisplayOffsetInFrames, displayDurationInFrames: mediaDisplayDurationInFrames, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay }) })) : null, s.type === 'video' && visibleLayout.media ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: visibleLayout.media.width, displayOffsetInFrames: mediaDisplayOffsetInFrames, displayDurationInFrames: mediaDisplayDurationInFrames, startMediaFrom: s.startMediaFrom, mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, playbackRate: s.playbackRate, volume: s.volume, muted: s.muted, doesVolumeChange: s.doesVolumeChange, marginLeft: visibleLayout.media.left, loopDisplay: s.loopDisplay, frozenMediaFrame: s.frozenMediaFrame, extendLastFrame: extendVideoLastFrame })) : null, s.type === 'image' && visibleLayout.media ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(TimelineImageInfo_1.TimelineImageInfo, { src: s.src, offsetInPixels: visibleLayout.media.offset }) })) : null, s.loopDisplay === undefined ? null : (jsx_runtime_1.jsx(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes, fullWidth: width, visibleOffset: visibleLayout.cropLeft, visibleWidth: visibleLayout.width }))] }));
|
|
673
|
+
validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_k = video.durationInFrames) !== null && _k !== void 0 ? _k : 1, onDragEnd: dragAwareDoubleClick.endPointerGesture, onSelect: onSelect, selected: selected })) : null] }), onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, children: [s.type === 'audio' && visibleLayout.media ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(AudioWaveform_1.AudioWaveform, { src: s.src, height: timeline_layout_1.TIMELINE_LAYER_HEIGHT_AUDIO, doesVolumeChange: s.doesVolumeChange, muted: s.muted, visualizationWidth: visibleLayout.media.width, startFrom: s.startMediaFrom, durationInFrames: s.duration, displayOffsetInFrames: mediaDisplayOffsetInFrames, displayDurationInFrames: mediaDisplayDurationInFrames, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay }) })) : null, s.type === 'video' && visibleLayout.media ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: visibleLayout.media.width, displayOffsetInFrames: mediaDisplayOffsetInFrames, displayDurationInFrames: mediaDisplayDurationInFrames, startMediaFrom: s.startMediaFrom, mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, playbackRate: s.playbackRate, volume: s.volume, muted: s.muted, doesVolumeChange: s.doesVolumeChange, marginLeft: visibleLayout.media.left, loopDisplay: s.loopDisplay, frozenMediaFrame: s.frozenMediaFrame, extendLastFrame: extendVideoLastFrame })) : null, s.type === 'image' && visibleLayout.media ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(TimelineImageInfo_1.TimelineImageInfo, { src: s.src, offsetInPixels: visibleLayout.media.offset }) })) : null, s.loopDisplay === undefined ? null : (jsx_runtime_1.jsx(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes, fullWidth: width, visibleOffset: visibleLayout.cropLeft, visibleWidth: visibleLayout.width }))] }));
|
|
609
674
|
return previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: sequence })) : (sequence);
|
|
610
675
|
};
|
|
611
676
|
exports.TimelineSequence = react_1.default.memo(TimelineSequenceFn);
|
|
@@ -64,6 +64,7 @@ const use_select_asset_1 = require("../use-select-asset");
|
|
|
64
64
|
const disable_sequence_interactivity_1 = require("./disable-sequence-interactivity");
|
|
65
65
|
const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
|
|
66
66
|
const get_sequence_context_menu_items_1 = require("./get-sequence-context-menu-items");
|
|
67
|
+
const get_sequence_split_menu_item_1 = require("./get-sequence-split-menu-item");
|
|
67
68
|
const imperative_state_1 = require("./imperative-state");
|
|
68
69
|
const save_sequence_prop_1 = require("./save-sequence-prop");
|
|
69
70
|
const timeline_asset_link_1 = require("./timeline-asset-link");
|
|
@@ -705,6 +706,14 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
705
706
|
onDuplicateSelectedSequences,
|
|
706
707
|
});
|
|
707
708
|
}
|
|
709
|
+
const splitMenuItem = (0, get_sequence_split_menu_item_1.getSequenceSplitMenuItem)({
|
|
710
|
+
nodePathInfo,
|
|
711
|
+
sequence,
|
|
712
|
+
propStatuses: propStatusesForOverride,
|
|
713
|
+
splitFrame: (0, imperative_state_1.getCurrentFrame)(),
|
|
714
|
+
canEditSource: previewInteractive && Boolean(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source),
|
|
715
|
+
hasMultipleSelection: selected && selectedItems.length > 1,
|
|
716
|
+
});
|
|
708
717
|
const freezeFrameMenuItem = (0, use_sequence_freeze_frame_menu_item_1.getSequenceFreezeFrameMenuItem)({
|
|
709
718
|
clientId: previewInteractive && previewServerState.type === 'connected'
|
|
710
719
|
? previewServerState.clientId
|
|
@@ -820,6 +829,7 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
820
829
|
subMenu: null,
|
|
821
830
|
value: 'rename-sequence',
|
|
822
831
|
},
|
|
832
|
+
...(splitMenuItem ? [splitMenuItem] : []),
|
|
823
833
|
...(freezeFrameMenuItem ? [freezeFrameMenuItem] : []),
|
|
824
834
|
]
|
|
825
835
|
: [],
|
|
@@ -839,7 +849,7 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
839
849
|
isProgrammaticallyDuplicated,
|
|
840
850
|
mediaSrc,
|
|
841
851
|
nodePath,
|
|
842
|
-
nodePathInfo
|
|
852
|
+
nodePathInfo,
|
|
843
853
|
onAddEffect,
|
|
844
854
|
onCrop,
|
|
845
855
|
onRotate,
|
|
@@ -859,6 +869,7 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
859
869
|
selectAsset,
|
|
860
870
|
selectable,
|
|
861
871
|
selected,
|
|
872
|
+
selectedItems.length,
|
|
862
873
|
selectedSequenceNodePathInfos,
|
|
863
874
|
sequence,
|
|
864
875
|
sequenceFrameOffset,
|
|
@@ -7,6 +7,7 @@ export declare const timelineSequenceFromDragSnapThresholdPx = 10;
|
|
|
7
7
|
export type TimelineSequenceDurationDragTarget = {
|
|
8
8
|
readonly fileName: string;
|
|
9
9
|
readonly initialDuration: number;
|
|
10
|
+
readonly maximumDuration: number;
|
|
10
11
|
readonly minimumDuration: number;
|
|
11
12
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
12
13
|
readonly schema: InteractivitySchema;
|
|
@@ -24,6 +25,8 @@ export type TimelineSequenceLeftEdgeDragTarget = {
|
|
|
24
25
|
};
|
|
25
26
|
export type TimelineSequenceFromDragTarget = {
|
|
26
27
|
readonly canSnapToTimelineStart: boolean;
|
|
28
|
+
readonly minimumDeltaFrames: number;
|
|
29
|
+
readonly initialTimelineStart: number;
|
|
27
30
|
readonly effectKeyframes: TimelineSequenceEffectKeyframeDragTarget[];
|
|
28
31
|
readonly fileName: string;
|
|
29
32
|
readonly initialFrom: number;
|
|
@@ -49,9 +52,10 @@ export declare const canResizeTimelineSequenceDuration: ({ sequence, status, }:
|
|
|
49
52
|
readonly status: CanUpdateSequencePropStatus | undefined;
|
|
50
53
|
}) => boolean;
|
|
51
54
|
export declare const isTimelineSequenceLeftEdgeDraggable: (sequence: TSequence) => boolean;
|
|
52
|
-
export declare const getTimelineSequenceDurationDragValue: ({ initialDuration, deltaFrames, minimumDuration, }: {
|
|
55
|
+
export declare const getTimelineSequenceDurationDragValue: ({ initialDuration, deltaFrames, maximumDuration, minimumDuration, }: {
|
|
53
56
|
readonly initialDuration: number;
|
|
54
57
|
readonly deltaFrames: number;
|
|
58
|
+
readonly maximumDuration: number;
|
|
55
59
|
readonly minimumDuration?: number | undefined;
|
|
56
60
|
}) => number;
|
|
57
61
|
export declare const getTimelineSequenceLeftEdgeDragDelta: ({ initialDuration, initialTrimBefore, deltaFrames, playbackRate, minimumDuration, }: {
|
|
@@ -85,8 +89,9 @@ export declare const getTimelineSequenceFromDragValue: ({ initialFrom, deltaFram
|
|
|
85
89
|
readonly initialFrom: number;
|
|
86
90
|
readonly deltaFrames: number;
|
|
87
91
|
}) => number;
|
|
88
|
-
export declare const getTimelineSequenceFromDragDelta: ({ deltaFrames, pxPerFrame, snappingEnabled, targets, }: {
|
|
92
|
+
export declare const getTimelineSequenceFromDragDelta: ({ deltaFrames, timelineDurationInFrames, pxPerFrame, snappingEnabled, targets, }: {
|
|
89
93
|
readonly deltaFrames: number;
|
|
94
|
+
readonly timelineDurationInFrames: number;
|
|
90
95
|
readonly pxPerFrame: number;
|
|
91
96
|
readonly snappingEnabled: boolean;
|
|
92
97
|
readonly targets: readonly TimelineSequenceFromDragTarget[];
|
|
@@ -102,12 +107,13 @@ export declare const getTimelineSequenceFromDragKeyframeMoves: ({ targets, delta
|
|
|
102
107
|
readonly effectKeyframes: MoveEffectKeyframeChange[];
|
|
103
108
|
readonly sequenceKeyframes: MoveSequenceKeyframeChange[];
|
|
104
109
|
};
|
|
105
|
-
export declare const getTimelineSequenceDurationDragTargets: ({ draggedNodePathInfo, selectedItems, sequences, overrideIdsToNodePaths, propStatuses, }: {
|
|
110
|
+
export declare const getTimelineSequenceDurationDragTargets: ({ draggedNodePathInfo, selectedItems, sequences, overrideIdsToNodePaths, propStatuses, timelineDurationInFrames, }: {
|
|
106
111
|
readonly draggedNodePathInfo: SequenceNodePathInfo;
|
|
107
112
|
readonly selectedItems: readonly import("@remotion/canvas").CanvasSelectionItem[];
|
|
108
113
|
readonly sequences: TSequence[];
|
|
109
114
|
readonly overrideIdsToNodePaths: OverrideIdToNodePaths;
|
|
110
115
|
readonly propStatuses: PropStatuses;
|
|
116
|
+
readonly timelineDurationInFrames: number;
|
|
111
117
|
}) => TimelineSequenceDurationDragTarget[] | null;
|
|
112
118
|
export declare const getTimelineSequenceLeftEdgeDragTargets: ({ draggedNodePathInfo, selectedItems, sequences, overrideIdsToNodePaths, propStatuses, }: {
|
|
113
119
|
readonly draggedNodePathInfo: SequenceNodePathInfo;
|
|
@@ -128,6 +134,8 @@ export declare const TimelineSequenceLeftEdgeDragHandle: React.NamedExoticCompon
|
|
|
128
134
|
readonly windowWidth: number;
|
|
129
135
|
readonly timelineDurationInFrames: number;
|
|
130
136
|
readonly onDragEnd: (wasDragged: boolean) => void;
|
|
137
|
+
readonly onSelect: (interaction?: import("@remotion/canvas").CanvasSelectionInteraction | undefined) => void;
|
|
138
|
+
readonly selected: boolean;
|
|
131
139
|
}>;
|
|
132
140
|
export declare const useTimelineSequenceFromDrag: ({ nodePathInfo, windowWidth, timelineDurationInFrames, onDragEnd, }: {
|
|
133
141
|
readonly nodePathInfo: SequenceNodePathInfo | null;
|
|
@@ -142,5 +150,7 @@ export declare const TimelineSequenceRightEdgeDragHandle: React.NamedExoticCompo
|
|
|
142
150
|
readonly windowWidth: number;
|
|
143
151
|
readonly timelineDurationInFrames: number;
|
|
144
152
|
readonly onDragEnd: (wasDragged: boolean) => void;
|
|
153
|
+
readonly onSelect: (interaction?: import("@remotion/canvas").CanvasSelectionInteraction | undefined) => void;
|
|
154
|
+
readonly selected: boolean;
|
|
145
155
|
}>;
|
|
146
156
|
export {};
|