@remotion/studio 4.0.503 → 4.0.505
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.d.ts +2 -1
- package/dist/api/install-package.js +6 -2
- package/dist/components/AssetSelectorItem.js +4 -16
- package/dist/components/AudioWaveform.d.ts +1 -1
- package/dist/components/AudioWaveform.js +36 -3
- package/dist/components/Canvas.js +12 -5
- package/dist/components/CheckboardToggle.js +3 -1
- package/dist/components/CompositionContextButton.d.ts +1 -1
- package/dist/components/CompositionContextButton.js +2 -2
- package/dist/components/CompositionSelector.js +2 -2
- package/dist/components/CompositionSelectorItem.js +6 -7
- package/dist/components/ContextMenu.d.ts +5 -7
- package/dist/components/ContextMenu.js +54 -21
- package/dist/components/ControlButton.d.ts +4 -2
- package/dist/components/ControlButton.js +6 -20
- package/dist/components/EditorContent.js +1 -1
- package/dist/components/EditorGuides/Guide.js +2 -2
- package/dist/components/EffectPickerModal.js +70 -9
- package/dist/components/FullscreenToggle.js +1 -2
- package/dist/components/InitialCompositionLoader.js +1 -14
- package/dist/components/InlineAction.d.ts +3 -4
- package/dist/components/InlineAction.js +16 -13
- package/dist/components/InlineDropdown.d.ts +3 -2
- package/dist/components/InlineDropdown.js +16 -5
- package/dist/components/InspectorPanel/CompositionMetadata.js +7 -6
- package/dist/components/InspectorPanel/ConnectedCompositionsSection.js +2 -2
- package/dist/components/InspectorPanel/KeyframeInspector.js +2 -3
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +1 -1
- package/dist/components/InspectorPanel/common.js +24 -34
- package/dist/components/InspectorPanel/styles.js +4 -0
- package/dist/components/InspectorSequenceSection.js +1 -1
- package/dist/components/LoopToggle.js +1 -1
- package/dist/components/Menu/MenuItem.js +16 -12
- package/dist/components/MenuBuildIndicator.d.ts +3 -1
- package/dist/components/MenuBuildIndicator.js +14 -59
- package/dist/components/MenuCompositionName.js +3 -63
- package/dist/components/MenuToolbar.js +23 -3
- package/dist/components/MobilePanel.d.ts +1 -2
- package/dist/components/MobilePanel.js +6 -10
- package/dist/components/MuteToggle.js +2 -1
- package/dist/components/NewComposition/ComboBox.d.ts +1 -0
- package/dist/components/NewComposition/ComboBox.js +2 -2
- package/dist/components/NewComposition/InputDragger.d.ts +5 -0
- package/dist/components/NewComposition/InputDragger.js +11 -6
- package/dist/components/NewComposition/MenuContent.d.ts +1 -1
- package/dist/components/NewComposition/menu-typeahead.d.ts +1 -1
- package/dist/components/Notifications/NotificationCenter.js +12 -2
- package/dist/components/OutlineToggle.js +10 -2
- package/dist/components/PlayPause.js +2 -6
- package/dist/components/PlaybackRateSelector.js +4 -9
- package/dist/components/PreviewToolbar.js +12 -8
- package/dist/components/PreviewToolbarOverflowButton.d.ts +0 -1
- package/dist/components/PreviewToolbarOverflowButton.js +2 -75
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -2
- package/dist/components/RenderButton.d.ts +1 -1
- package/dist/components/RenderButton.js +55 -37
- package/dist/components/RenderModal/FrameRangeSetting.js +6 -1
- package/dist/components/RenderModal/MultiRangeSlider.js +8 -8
- package/dist/components/RenderModal/RenderModalEnvironmentVariables.js +1 -9
- package/dist/components/RenderModal/RenderModalOutputName.js +11 -2
- package/dist/components/RenderModal/ServerRenderModal.js +2 -17
- package/dist/components/RenderModal/WebRenderModal.js +3 -17
- package/dist/components/RenderModal/layout.js +7 -5
- package/dist/components/RenderModal/render-modals.js +18 -15
- package/dist/components/RenderQueue/RenderQueueRepeat.js +1 -14
- package/dist/components/SelectedOutlineElement.js +13 -22
- package/dist/components/SelectedOutlineOverlay.js +5 -1
- package/dist/components/SidebarRenderButton.js +1 -15
- package/dist/components/SizeSelector.js +4 -9
- package/dist/components/SnappingToggle.js +1 -2
- package/dist/components/Spinner.d.ts +1 -0
- package/dist/components/Spinner.js +2 -2
- package/dist/components/Splitter/SplitterContainer.d.ts +1 -0
- package/dist/components/Splitter/SplitterContainer.js +4 -1
- package/dist/components/Splitter/SplitterContext.d.ts +4 -3
- package/dist/components/Splitter/SplitterContext.js +3 -2
- package/dist/components/Splitter/SplitterElement.js +6 -1
- package/dist/components/Splitter/SplitterHandle.js +1 -0
- package/dist/components/Tabs/vertical.d.ts +1 -0
- package/dist/components/Tabs/vertical.js +8 -10
- package/dist/components/TimeValue.js +26 -8
- package/dist/components/Timeline/Timeline.js +5 -5
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +3 -6
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +5 -7
- package/dist/components/Timeline/TimelineDragHandler.js +3 -0
- package/dist/components/Timeline/TimelineEffectItem.js +6 -2
- package/dist/components/Timeline/TimelineEffectPropItem.js +6 -3
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.d.ts +6 -6
- package/dist/components/Timeline/TimelineExpandedKeyframeRow.js +34 -2
- package/dist/components/Timeline/TimelineHeightContainer.d.ts +1 -0
- package/dist/components/Timeline/TimelineHeightContainer.js +2 -2
- package/dist/components/Timeline/TimelineInOutDragHandler.js +3 -3
- package/dist/components/Timeline/TimelineKeyframeEasingLine.d.ts +5 -3
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +32 -30
- package/dist/components/Timeline/TimelineList.d.ts +1 -0
- package/dist/components/Timeline/TimelineList.js +2 -3
- package/dist/components/Timeline/TimelineScaleField.js +1 -1
- package/dist/components/Timeline/TimelineSelection.js +2 -3
- package/dist/components/Timeline/TimelineSequence.js +34 -28
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +3 -3
- package/dist/components/Timeline/TimelineSequenceItem.js +34 -23
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +10 -2
- package/dist/components/Timeline/TimelineSequencePropItem.js +64 -12
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +2 -2
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +38 -5
- package/dist/components/Timeline/TimelineTimeIndicators.js +36 -3
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -1
- package/dist/components/Timeline/TimelineVideoInfo.js +36 -3
- package/dist/components/Timeline/TimelineZoomControls.d.ts +3 -1
- package/dist/components/Timeline/TimelineZoomControls.js +59 -20
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +2 -3
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.d.ts +1 -1
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -18
- package/dist/components/Timeline/use-timeline-asset-drop.js +3 -3
- package/dist/components/Timeline/use-timeline-height.d.ts +2 -1
- package/dist/components/Timeline/use-timeline-height.js +3 -2
- package/dist/components/TimelineCombobox.d.ts +11 -0
- package/dist/components/TimelineCombobox.js +181 -0
- package/dist/components/TimelineInOutToggle.js +3 -3
- package/dist/components/TopPanel.js +8 -8
- package/dist/components/UndoRedoButtons.js +6 -5
- package/dist/components/UpdateCheck.js +18 -5
- package/dist/components/UpdateModal/UpdateModal.js +35 -12
- package/dist/components/composition-menu-items.d.ts +2 -4
- package/dist/components/composition-menu-items.js +31 -54
- package/dist/components/import-assets.d.ts +2 -1
- package/dist/components/import-assets.js +1 -1
- package/dist/components/selected-outline-types.d.ts +1 -1
- package/dist/esm/{chunk-bj1r1hh5.js → chunk-7pgk8h5m.js} +9174 -8486
- package/dist/esm/internals.mjs +9174 -8486
- package/dist/esm/previewEntry.mjs +8991 -8303
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/hoverable.d.ts +11 -0
- package/dist/helpers/hoverable.js +70 -0
- package/dist/helpers/inject-css.js +43 -23
- package/dist/helpers/install-required-package.d.ts +3 -2
- package/dist/helpers/install-required-package.js +20 -15
- package/dist/helpers/use-is-fullscreen.d.ts +1 -0
- package/dist/helpers/use-is-fullscreen.js +25 -0
- package/dist/helpers/use-menu-structure.js +88 -59
- package/dist/icons/audio.d.ts +1 -1
- package/dist/icons/audio.js +1 -1
- package/dist/icons/canvas-zoom.d.ts +10 -0
- package/dist/icons/canvas-zoom.js +21 -0
- package/dist/icons/caret.js +1 -1
- package/dist/icons/certificate.d.ts +1 -1
- package/dist/icons/certificate.js +1 -1
- package/dist/icons/data.d.ts +1 -1
- package/dist/icons/data.js +2 -2
- package/dist/icons/effects.d.ts +5 -0
- package/dist/icons/effects.js +8 -0
- package/dist/icons/ellipsis.js +1 -1
- package/dist/icons/external-link.d.ts +5 -0
- package/dist/icons/external-link.js +10 -0
- package/dist/icons/fullscreen.js +1 -1
- package/dist/icons/gear.d.ts +1 -1
- package/dist/icons/gear.js +1 -1
- package/dist/icons/gif.d.ts +1 -1
- package/dist/icons/gif.js +1 -1
- package/dist/icons/input-props.d.ts +2 -0
- package/dist/icons/input-props.js +9 -0
- package/dist/icons/jump-to-start.js +2 -2
- package/dist/icons/magnet.d.ts +3 -1
- package/dist/icons/magnet.js +2 -2
- package/dist/icons/media-volume.d.ts +6 -2
- package/dist/icons/media-volume.js +8 -6
- package/dist/icons/minus.d.ts +3 -1
- package/dist/icons/minus.js +2 -2
- package/dist/icons/pause.js +1 -1
- package/dist/icons/play.js +1 -1
- package/dist/icons/playback-rate.d.ts +5 -0
- package/dist/icons/playback-rate.js +31 -0
- package/dist/icons/plus.js +1 -1
- package/dist/icons/redo.js +2 -2
- package/dist/icons/search.d.ts +5 -0
- package/dist/icons/search.js +10 -0
- package/dist/icons/step-back.js +2 -2
- package/dist/icons/step-forward.js +2 -2
- package/dist/icons/timelineInOutPointer.js +2 -2
- package/dist/icons/undo.js +2 -2
- package/package.json +12 -12
|
@@ -17,6 +17,7 @@ const ExpandedTracksProvider_1 = require("../ExpandedTracksProvider");
|
|
|
17
17
|
const options_sidebar_tabs_1 = require("../options-sidebar-tabs");
|
|
18
18
|
const get_node_keyframes_1 = require("./get-node-keyframes");
|
|
19
19
|
const get_timeline_easing_segments_1 = require("./get-timeline-easing-segments");
|
|
20
|
+
const imperative_state_1 = require("./imperative-state");
|
|
20
21
|
const timeline_expanded_filter_1 = require("./timeline-expanded-filter");
|
|
21
22
|
const timeline_refs_1 = require("./timeline-refs");
|
|
22
23
|
const TimelineClipboardKeybindings_1 = require("./TimelineClipboardKeybindings");
|
|
@@ -571,7 +572,6 @@ const TimelineSelectableItemsProvider = ({ children, timeline }) => {
|
|
|
571
572
|
const { getIsExpanded } = (0, react_1.useContext)(ExpandedTracksProvider_1.ExpandedTracksGetterContext);
|
|
572
573
|
const { propStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
573
574
|
const { getDragOverrides, getEffectDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
574
|
-
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
575
575
|
const { selectedItems } = (0, exports.useTimelineSelection)();
|
|
576
576
|
const selectableItems = (0, react_1.useMemo)(() => (0, exports.getSelectableTimelineItems)({
|
|
577
577
|
getDragOverrides,
|
|
@@ -580,7 +580,7 @@ const TimelineSelectableItemsProvider = ({ children, timeline }) => {
|
|
|
580
580
|
propStatuses,
|
|
581
581
|
selectedItems,
|
|
582
582
|
timeline,
|
|
583
|
-
timelinePosition,
|
|
583
|
+
timelinePosition: (0, imperative_state_1.getCurrentFrame)(),
|
|
584
584
|
}), [
|
|
585
585
|
getDragOverrides,
|
|
586
586
|
getEffectDragOverrides,
|
|
@@ -588,7 +588,6 @@ const TimelineSelectableItemsProvider = ({ children, timeline }) => {
|
|
|
588
588
|
propStatuses,
|
|
589
589
|
selectedItems,
|
|
590
590
|
timeline,
|
|
591
|
-
timelinePosition,
|
|
592
591
|
]);
|
|
593
592
|
return (jsx_runtime_1.jsx(exports.TimelineSelectionOrderProvider, { items: selectableItems, children: children }));
|
|
594
593
|
};
|
|
@@ -59,6 +59,7 @@ const disable_sequence_interactivity_1 = require("./disable-sequence-interactivi
|
|
|
59
59
|
const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
|
|
60
60
|
const get_sequence_context_menu_items_1 = require("./get-sequence-context-menu-items");
|
|
61
61
|
const get_timeline_media_visualization_layout_1 = require("./get-timeline-media-visualization-layout");
|
|
62
|
+
const imperative_state_1 = require("./imperative-state");
|
|
62
63
|
const LoopedTimelineIndicators_1 = require("./LoopedTimelineIndicators");
|
|
63
64
|
const timeline_asset_link_1 = require("./timeline-asset-link");
|
|
64
65
|
const TimelineImageInfo_1 = require("./TimelineImageInfo");
|
|
@@ -158,7 +159,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
158
159
|
// Some compositions may not be longer than their media duration,
|
|
159
160
|
// if that is the case, it needs to be asynchronously determined
|
|
160
161
|
var _a, _b, _c;
|
|
161
|
-
var _d, _e, _f, _g, _h
|
|
162
|
+
var _d, _e, _f, _g, _h;
|
|
162
163
|
const video = remotion_1.Internals.useVideo();
|
|
163
164
|
const maxMediaDuration = (0, use_max_media_duration_1.useMaxMediaDuration)(s, (_d = video === null || video === void 0 ? void 0 : video.fps) !== null && _d !== void 0 ? _d : 30);
|
|
164
165
|
const effectiveMaxMediaDuration = s.loopDisplay ? null : maxMediaDuration;
|
|
@@ -200,7 +201,6 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
200
201
|
const previewInteractive = previewConnected && (0, interactivity_enabled_1.isStudioInteractivityEnabled)();
|
|
201
202
|
const editorInfo = (0, use_default_editor_info_1.useDefaultEditorInfo)((0, use_default_editor_info_1.canUseEditorPicker)(previewConnected));
|
|
202
203
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
203
|
-
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
204
204
|
const selectAsset = (0, use_select_asset_1.useSelectAsset)();
|
|
205
205
|
const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
|
|
206
206
|
const confirm = (0, ConfirmationDialog_1.useConfirmationDialog)();
|
|
@@ -233,6 +233,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
233
233
|
}
|
|
234
234
|
e.stopPropagation();
|
|
235
235
|
if (action === 'open-connected-composition') {
|
|
236
|
+
const timelinePosition = (0, imperative_state_1.getCurrentFrame)();
|
|
236
237
|
selectComposition(connectedCompositions[0], true, (0, get_sequence_double_click_action_1.getConnectedCompositionFrame)({
|
|
237
238
|
timelinePosition,
|
|
238
239
|
sequence: s,
|
|
@@ -248,7 +249,6 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
248
249
|
s,
|
|
249
250
|
selectComposition,
|
|
250
251
|
sequenceFrameOffset,
|
|
251
|
-
timelinePosition,
|
|
252
252
|
]);
|
|
253
253
|
const canHandleSequenceDoubleClick = connectedCompositions.length === 1 || canOpenInEditor;
|
|
254
254
|
const canDeleteFromSource = Boolean(nodePath && (validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source));
|
|
@@ -261,7 +261,6 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
261
261
|
const mediaSrc = s.type === 'audio' || s.type === 'video' || s.type === 'image'
|
|
262
262
|
? s.src
|
|
263
263
|
: null;
|
|
264
|
-
const assetLinkInfo = (0, react_1.useMemo)(() => (mediaSrc ? (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(mediaSrc) : null), [mediaSrc]);
|
|
265
264
|
const onDuplicateSequenceFromSource = (0, react_1.useCallback)(() => {
|
|
266
265
|
if (!(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source) || !nodePathInfo || duplicateDisabled) {
|
|
267
266
|
return;
|
|
@@ -327,21 +326,25 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
327
326
|
setPropStatuses,
|
|
328
327
|
validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
|
|
329
328
|
]);
|
|
330
|
-
const
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
:
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
329
|
+
const getContextMenuItems = (0, react_1.useCallback)(() => {
|
|
330
|
+
var _a;
|
|
331
|
+
if (selectable) {
|
|
332
|
+
onSelect({ shiftKey: false, toggleKey: false });
|
|
333
|
+
}
|
|
334
|
+
const freezeFrameMenuItem = (0, use_sequence_freeze_frame_menu_item_1.getSequenceFreezeFrameMenuItem)({
|
|
335
|
+
clientId: previewInteractive && previewServerState.type === 'connected'
|
|
336
|
+
? previewServerState.clientId
|
|
337
|
+
: null,
|
|
338
|
+
nodePath,
|
|
339
|
+
propStatusesForOverride,
|
|
340
|
+
sequence: s,
|
|
341
|
+
sequenceFrameOffset,
|
|
342
|
+
setPropStatuses,
|
|
343
|
+
timelinePosition: (0, imperative_state_1.getCurrentFrame)(),
|
|
344
|
+
validatedSource: (_a = validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source) !== null && _a !== void 0 ? _a : null,
|
|
345
|
+
});
|
|
343
346
|
return (0, get_sequence_context_menu_items_1.getSequenceContextMenuItems)({
|
|
344
|
-
assetLinkInfo,
|
|
347
|
+
assetLinkInfo: mediaSrc ? (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(mediaSrc) : null,
|
|
345
348
|
canOpenInEditor,
|
|
346
349
|
deleteDisabled,
|
|
347
350
|
disableInteractivityDisabled,
|
|
@@ -361,32 +364,35 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
361
364
|
: [],
|
|
362
365
|
});
|
|
363
366
|
}, [
|
|
364
|
-
assetLinkInfo,
|
|
365
367
|
canOpenInEditor,
|
|
366
368
|
deleteDisabled,
|
|
367
369
|
disableInteractivityDisabled,
|
|
368
370
|
duplicateDisabled,
|
|
369
371
|
editorInfo,
|
|
370
372
|
fileLocation,
|
|
371
|
-
|
|
373
|
+
mediaSrc,
|
|
374
|
+
nodePath,
|
|
375
|
+
onSelect,
|
|
372
376
|
onDeleteSequenceFromSource,
|
|
373
377
|
onDisableSequenceInteractivity,
|
|
374
378
|
onDuplicateSequenceFromSource,
|
|
375
379
|
openInEditor,
|
|
376
380
|
originalLocation,
|
|
381
|
+
previewInteractive,
|
|
382
|
+
previewServerState,
|
|
383
|
+
propStatusesForOverride,
|
|
377
384
|
s,
|
|
378
385
|
selectAsset,
|
|
386
|
+
selectable,
|
|
387
|
+
sequenceFrameOffset,
|
|
388
|
+
setPropStatuses,
|
|
389
|
+
validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
|
|
379
390
|
]);
|
|
380
|
-
const onContextMenuOpen = (0, react_1.useCallback)(() => {
|
|
381
|
-
if (selectable) {
|
|
382
|
-
onSelect({ shiftKey: false, toggleKey: false });
|
|
383
|
-
}
|
|
384
|
-
}, [onSelect, selectable]);
|
|
385
391
|
const { frozenFrame } = s;
|
|
386
392
|
const { onPointerDown: onMoveDragPointerDown } = (0, TimelineSequenceRightEdgeDragHandle_1.useTimelineSequenceFromDrag)({
|
|
387
393
|
nodePathInfo,
|
|
388
394
|
windowWidth,
|
|
389
|
-
timelineDurationInFrames: (
|
|
395
|
+
timelineDurationInFrames: (_f = video === null || video === void 0 ? void 0 : video.durationInFrames) !== null && _f !== void 0 ? _f : 1,
|
|
390
396
|
});
|
|
391
397
|
if (!video) {
|
|
392
398
|
throw new TypeError('Expected video config');
|
|
@@ -458,7 +464,7 @@ const TimelineSequenceInner = ({ s, connectedCompositions, windowWidth, nodePath
|
|
|
458
464
|
if (maxMediaDuration === null && !s.loopDisplay) {
|
|
459
465
|
return null;
|
|
460
466
|
}
|
|
461
|
-
const sequence = (jsx_runtime_1.jsxs(TimelineSequenceCurrentFrame, { s: s, displayDurationInFrames: displayDurationInFrames, premountWidth: premountWidth, postmountWidth: postmountWidth, style: style, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, fromCanUpdate: fromCanUpdate, frozenFrame: frozenFrame, onMoveDragPointerDown: onMoveDragPointerDown, onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, children: [s.type === 'audio' ? (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, visualizationWidth: mediaVisualizationLayout.width, startFrom: s.startMediaFrom, durationInFrames: s.duration, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay }) })) : null, s.type === 'video' ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: width, naturalWidth: naturalWidth, startMediaFrom: s.startMediaFrom, mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, durationInFrames: s.duration, playbackRate: s.playbackRate, volume: s.volume, doesVolumeChange: s.doesVolumeChange, premountWidth: premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0, postmountWidth: postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0, loopDisplay: s.loopDisplay, frozenMediaFrame: s.frozenMediaFrame, extendLastFrame: extendVideoLastFrame })) : null, s.type === 'image' ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(TimelineImageInfo_1.TimelineImageInfo, { src: s.src, visualizationWidth: mediaVisualizationLayout.width }) })) : null, s.loopDisplay === undefined ? null : (jsx_runtime_1.jsx(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes })), showLeftEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (
|
|
462
|
-
return previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, {
|
|
467
|
+
const sequence = (jsx_runtime_1.jsxs(TimelineSequenceCurrentFrame, { s: s, displayDurationInFrames: displayDurationInFrames, premountWidth: premountWidth, postmountWidth: postmountWidth, style: style, nodePathInfo: nodePathInfo, sequenceFrameOffset: sequenceFrameOffset, fromCanUpdate: fromCanUpdate, frozenFrame: frozenFrame, onMoveDragPointerDown: onMoveDragPointerDown, onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, children: [s.type === 'audio' ? (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, visualizationWidth: mediaVisualizationLayout.width, startFrom: s.startMediaFrom, durationInFrames: s.duration, volume: s.volume, playbackRate: s.playbackRate, loopDisplay: s.loopDisplay }) })) : null, s.type === 'video' ? (jsx_runtime_1.jsx(TimelineVideoInfo_1.TimelineVideoInfo, { src: s.src, visualizationWidth: width, naturalWidth: naturalWidth, startMediaFrom: s.startMediaFrom, mediaFrameAtSequenceZero: s.mediaFrameAtSequenceZero, sequenceFrameOffset: sequenceFrameOffset, durationInFrames: s.duration, playbackRate: s.playbackRate, volume: s.volume, doesVolumeChange: s.doesVolumeChange, premountWidth: premountWidth !== null && premountWidth !== void 0 ? premountWidth : 0, postmountWidth: postmountWidth !== null && postmountWidth !== void 0 ? postmountWidth : 0, loopDisplay: s.loopDisplay, frozenMediaFrame: s.frozenMediaFrame, extendLastFrame: extendVideoLastFrame })) : null, s.type === 'image' ? (jsx_runtime_1.jsx("div", { style: mediaVisualizationStyle, children: jsx_runtime_1.jsx(TimelineImageInfo_1.TimelineImageInfo, { src: s.src, visualizationWidth: mediaVisualizationLayout.width }) })) : null, s.loopDisplay === undefined ? null : (jsx_runtime_1.jsx(LoopedTimelineIndicators_1.LoopedTimelineIndicator, { loops: s.loopDisplay.numberOfTimes })), showLeftEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceLeftEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_g = video.durationInFrames) !== null && _g !== void 0 ? _g : 1 })) : null, showRightEdgeDragHandle && nodePathInfo && validatedLocation ? (jsx_runtime_1.jsx(TimelineSequenceRightEdgeDragHandle_1.TimelineSequenceRightEdgeDragHandle, { nodePathInfo: nodePathInfo, windowWidth: windowWidth, timelineDurationInFrames: (_h = video.durationInFrames) !== null && _h !== void 0 ? _h : 1 })) : null] }));
|
|
468
|
+
return previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: sequence })) : (sequence);
|
|
463
469
|
};
|
|
464
470
|
exports.TimelineSequence = react_1.default.memo(TimelineSequenceFn);
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type {
|
|
2
|
+
import type { TSequence } from 'remotion';
|
|
3
3
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
4
|
-
export declare const TimelineSequenceItem: React.
|
|
4
|
+
export declare const TimelineSequenceItem: React.NamedExoticComponent<{
|
|
5
5
|
readonly children: React.ReactNode;
|
|
6
6
|
readonly sequence: TSequence;
|
|
7
|
-
readonly connectedCompositions: readonly
|
|
7
|
+
readonly connectedCompositions: readonly import("remotion").AnyComposition[];
|
|
8
8
|
readonly nestedDepth: number;
|
|
9
9
|
readonly nodePathInfo: SequenceNodePathInfo | null;
|
|
10
10
|
readonly keyframeDisplayOffset: number;
|
|
@@ -61,6 +61,7 @@ const use_select_asset_1 = require("../use-select-asset");
|
|
|
61
61
|
const disable_sequence_interactivity_1 = require("./disable-sequence-interactivity");
|
|
62
62
|
const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
|
|
63
63
|
const get_sequence_context_menu_items_1 = require("./get-sequence-context-menu-items");
|
|
64
|
+
const imperative_state_1 = require("./imperative-state");
|
|
64
65
|
const save_sequence_prop_1 = require("./save-sequence-prop");
|
|
65
66
|
const timeline_asset_link_1 = require("./timeline-asset-link");
|
|
66
67
|
const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
|
|
@@ -173,9 +174,9 @@ const getSequenceReorderDragData = (dataTransfer) => {
|
|
|
173
174
|
const getDestinationIndex = ({ fromIndex, insertionIndex, }) => {
|
|
174
175
|
return insertionIndex > fromIndex ? insertionIndex - 1 : insertionIndex;
|
|
175
176
|
};
|
|
176
|
-
const
|
|
177
|
+
const TimelineSequenceItemInner = ({ children, connectedCompositions, nestedDepth, sequence, nodePathInfo, keyframeDisplayOffset, sequenceFrameOffset, siblingIndex, }) => {
|
|
177
178
|
var _a, _b, _c;
|
|
178
|
-
var _d, _e
|
|
179
|
+
var _d, _e;
|
|
179
180
|
const nodePath = (_d = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.sequenceSubscriptionKey) !== null && _d !== void 0 ? _d : null;
|
|
180
181
|
const { hovered, onPointerEnter, onPointerLeave } = (0, timeline_sequence_hover_1.useTimelineSequenceHover)(nodePathInfo);
|
|
181
182
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -195,7 +196,6 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
195
196
|
const [isRenaming, setIsRenaming] = (0, react_1.useState)(false);
|
|
196
197
|
const [sequenceDropIndicator, setSequenceDropIndicator] = (0, react_1.useState)(null);
|
|
197
198
|
const [sequenceDropRejection, setSequenceDropRejection] = (0, react_1.useState)(null);
|
|
198
|
-
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
199
199
|
const { canOpenInEditor, editorInfo, openInEditor, originalLocation } = (0, use_open_sequence_in_editor_1.useOpenSequenceInEditor)(sequence);
|
|
200
200
|
const fileLocation = (0, react_1.useMemo)(() => (0, format_file_location_1.formatFileLocation)({
|
|
201
201
|
location: originalLocation,
|
|
@@ -469,7 +469,6 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
469
469
|
sequence.type === 'image'
|
|
470
470
|
? sequence.src
|
|
471
471
|
: null;
|
|
472
|
-
const assetLinkInfo = (0, react_1.useMemo)(() => (mediaSrc ? (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(mediaSrc) : null), [mediaSrc]);
|
|
473
472
|
const isExpanded = previewConnected && nodePathInfo !== null && getIsExpanded(nodePathInfo);
|
|
474
473
|
const onToggleExpand = (0, react_1.useCallback)(() => {
|
|
475
474
|
if (nodePathInfo === null) {
|
|
@@ -573,6 +572,7 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
573
572
|
}
|
|
574
573
|
e.stopPropagation();
|
|
575
574
|
if (action === 'open-connected-composition') {
|
|
575
|
+
const timelinePosition = (0, imperative_state_1.getCurrentFrame)();
|
|
576
576
|
selectComposition(connectedCompositions[0], true, (0, get_sequence_double_click_action_1.getConnectedCompositionFrame)({
|
|
577
577
|
timelinePosition,
|
|
578
578
|
sequence,
|
|
@@ -588,7 +588,6 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
588
588
|
selectComposition,
|
|
589
589
|
sequence,
|
|
590
590
|
sequenceFrameOffset,
|
|
591
|
-
timelinePosition,
|
|
592
591
|
]);
|
|
593
592
|
const canHandleSequenceDoubleClick = connectedCompositions.length === 1 || canOpenInEditor;
|
|
594
593
|
const canRenameSelectedSequence = canRenameThisSequence &&
|
|
@@ -636,18 +635,6 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
636
635
|
}
|
|
637
636
|
setIsRenaming(true);
|
|
638
637
|
}, [canRenameThisSequence]);
|
|
639
|
-
const freezeFrameMenuItem = (0, use_sequence_freeze_frame_menu_item_1.useSequenceFreezeFrameMenuItem)({
|
|
640
|
-
clientId: previewInteractive && previewServerState.type === 'connected'
|
|
641
|
-
? previewServerState.clientId
|
|
642
|
-
: null,
|
|
643
|
-
nodePath,
|
|
644
|
-
propStatusesForOverride,
|
|
645
|
-
sequence,
|
|
646
|
-
sequenceFrameOffset,
|
|
647
|
-
setPropStatuses,
|
|
648
|
-
timelinePosition,
|
|
649
|
-
validatedSource: (_f = validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source) !== null && _f !== void 0 ? _f : null,
|
|
650
|
-
});
|
|
651
638
|
const canAddEffect = (nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.supportsEffects) === true &&
|
|
652
639
|
previewInteractive &&
|
|
653
640
|
Boolean(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source);
|
|
@@ -707,9 +694,25 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
707
694
|
key: selected_outline_types_1.cropFieldKeys.left,
|
|
708
695
|
}, undefined, undefined, { reveal: true });
|
|
709
696
|
}, [canCrop, nodePathInfo, selectItem]);
|
|
710
|
-
const
|
|
697
|
+
const getContextMenuItems = (0, react_1.useCallback)(() => {
|
|
698
|
+
var _a;
|
|
699
|
+
if (selectable) {
|
|
700
|
+
onSelect({ shiftKey: false, toggleKey: false });
|
|
701
|
+
}
|
|
702
|
+
const freezeFrameMenuItem = (0, use_sequence_freeze_frame_menu_item_1.getSequenceFreezeFrameMenuItem)({
|
|
703
|
+
clientId: previewInteractive && previewServerState.type === 'connected'
|
|
704
|
+
? previewServerState.clientId
|
|
705
|
+
: null,
|
|
706
|
+
nodePath,
|
|
707
|
+
propStatusesForOverride,
|
|
708
|
+
sequence,
|
|
709
|
+
sequenceFrameOffset,
|
|
710
|
+
setPropStatuses,
|
|
711
|
+
timelinePosition: (0, imperative_state_1.getCurrentFrame)(),
|
|
712
|
+
validatedSource: (_a = validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source) !== null && _a !== void 0 ? _a : null,
|
|
713
|
+
});
|
|
711
714
|
return (0, get_sequence_context_menu_items_1.getSequenceContextMenuItems)({
|
|
712
|
-
assetLinkInfo,
|
|
715
|
+
assetLinkInfo: mediaSrc ? (0, timeline_asset_link_1.getTimelineAssetLinkInfo)(mediaSrc) : null,
|
|
713
716
|
canOpenInEditor,
|
|
714
717
|
deleteDisabled,
|
|
715
718
|
disableInteractivityDisabled,
|
|
@@ -781,7 +784,6 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
781
784
|
: [],
|
|
782
785
|
});
|
|
783
786
|
}, [
|
|
784
|
-
assetLinkInfo,
|
|
785
787
|
canAddEffect,
|
|
786
788
|
canCrop,
|
|
787
789
|
canOpenInEditor,
|
|
@@ -791,7 +793,8 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
791
793
|
duplicateDisabled,
|
|
792
794
|
editorInfo,
|
|
793
795
|
fileLocation,
|
|
794
|
-
|
|
796
|
+
mediaSrc,
|
|
797
|
+
nodePath,
|
|
795
798
|
nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.supportsEffects,
|
|
796
799
|
onAddEffect,
|
|
797
800
|
onCrop,
|
|
@@ -799,10 +802,18 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
799
802
|
onDisableSequenceInteractivity,
|
|
800
803
|
onDuplicateSequenceFromSource,
|
|
801
804
|
onRenameSequence,
|
|
805
|
+
onSelect,
|
|
802
806
|
openInEditor,
|
|
803
807
|
originalLocation,
|
|
808
|
+
previewInteractive,
|
|
809
|
+
previewServerState,
|
|
810
|
+
propStatusesForOverride,
|
|
804
811
|
selectAsset,
|
|
812
|
+
selectable,
|
|
805
813
|
sequence,
|
|
814
|
+
sequenceFrameOffset,
|
|
815
|
+
setPropStatuses,
|
|
816
|
+
validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
|
|
806
817
|
]);
|
|
807
818
|
const canDropEffect = previewInteractive &&
|
|
808
819
|
nodePath !== null &&
|
|
@@ -870,11 +881,11 @@ const TimelineSequenceItem = ({ children, connectedCompositions, nestedDepth, se
|
|
|
870
881
|
jsx_runtime_1.jsx(TimelineMediaInfo_1.TimelineMediaInfo, { src: mediaSrc })
|
|
871
882
|
] })) : null] }) }));
|
|
872
883
|
const draggableTrackRow = canHandleSequenceDrag ? (jsx_runtime_1.jsxs("div", { draggable: canReorderSequence, onDragStart: onSequenceDragStart, onDragEnd: onSequenceDragEnd, onDragOver: onSequenceDragOver, onDragLeave: onSequenceDragLeave, onDrop: onSequenceDrop, style: sequenceReorderWrapper, children: [sequenceReorderLineStyle ? (jsx_runtime_1.jsx("div", { style: sequenceReorderLineStyle })) : null, sequenceDropRejection ? (jsx_runtime_1.jsx("div", { style: sequenceReorderRejectionStyle, children: sequenceDropRejection })) : null, trackRow] })) : (trackRow);
|
|
873
|
-
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, {
|
|
884
|
+
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [previewConnected || window.remotion_isReadOnlyStudio ? (jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: draggableTrackRow })) : (draggableTrackRow), previewConnected &&
|
|
874
885
|
(0, interactivity_enabled_1.isStudioInteractivityEnabled)() &&
|
|
875
886
|
isExpanded &&
|
|
876
887
|
hasExpandableContent &&
|
|
877
888
|
nodePathInfo &&
|
|
878
889
|
validatedLocation ? (jsx_runtime_1.jsx(TimelineExpandedSection_1.TimelineExpandedSection, { sequence: sequence, validatedLocation: validatedLocation, nodePathInfo: nodePathInfo, nestedDepth: nestedDepth, keyframeDisplayOffset: keyframeDisplayOffset })) : null, children, sequenceDropIndicator === 'after' ? (jsx_runtime_1.jsx("div", { style: sequenceReorderAfterLineWrapper, children: jsx_runtime_1.jsx("div", { style: sequenceReorderAfterLine }) })) : null] }));
|
|
879
890
|
};
|
|
880
|
-
exports.TimelineSequenceItem =
|
|
891
|
+
exports.TimelineSequenceItem = react_1.default.memo(TimelineSequenceItemInner);
|
|
@@ -4,14 +4,21 @@ import type { CodePosition } from '../../error-overlay/react-overlay/utils/get-s
|
|
|
4
4
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
5
5
|
import type { SchemaFieldInfo } from '../../helpers/timeline-layout';
|
|
6
6
|
import { type TimelineKeyframeControlsMode } from './TimelineKeyframeControls';
|
|
7
|
-
|
|
7
|
+
type TimelineSequenceKeyframedValueBaseProps = {
|
|
8
8
|
readonly field: SchemaFieldInfo;
|
|
9
9
|
readonly fileName: string;
|
|
10
10
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
11
11
|
readonly schema: InteractivitySchema;
|
|
12
12
|
readonly propStatus: CanUpdateSequencePropStatusKeyframed;
|
|
13
|
+
};
|
|
14
|
+
type TimelineSequenceKeyframedValueProps = TimelineSequenceKeyframedValueBaseProps & ({
|
|
13
15
|
readonly sourceFrame: number;
|
|
14
|
-
|
|
16
|
+
readonly keyframeDisplayOffset?: never;
|
|
17
|
+
} | {
|
|
18
|
+
readonly sourceFrame?: never;
|
|
19
|
+
readonly keyframeDisplayOffset: number;
|
|
20
|
+
});
|
|
21
|
+
export declare const TimelineSequenceKeyframedValue: React.NamedExoticComponent<TimelineSequenceKeyframedValueProps>;
|
|
15
22
|
export declare const TimelineSequencePropItem: React.FC<{
|
|
16
23
|
readonly field: SchemaFieldInfo;
|
|
17
24
|
readonly validatedLocation: CodePosition;
|
|
@@ -22,3 +29,4 @@ export declare const TimelineSequencePropItem: React.FC<{
|
|
|
22
29
|
readonly keyframeDisplayOffset: number;
|
|
23
30
|
readonly keyframeControlsMode?: TimelineKeyframeControlsMode;
|
|
24
31
|
}>;
|
|
32
|
+
export {};
|
|
@@ -1,9 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.TimelineSequencePropItem = exports.TimelineSequenceKeyframedValue = void 0;
|
|
4
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
38
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
|
-
const react_1 = require("react");
|
|
39
|
+
const react_1 = __importStar(require("react"));
|
|
7
40
|
const remotion_1 = require("remotion");
|
|
8
41
|
const client_id_1 = require("../../helpers/client-id");
|
|
9
42
|
const open_in_editor_1 = require("../../helpers/open-in-editor");
|
|
@@ -132,7 +165,16 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
132
165
|
}, [clearDragOverrides, nodePath]);
|
|
133
166
|
return (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: propStatus, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, effectiveValue: effectiveValue, scaleLockNodePath: nodePath }));
|
|
134
167
|
};
|
|
135
|
-
const
|
|
168
|
+
const TimelineSequenceKeyframedValueAtSourceFrame = ({ field, nodePath, propStatus, sourceFrame, dragOverrideValue, onSave, onDragValueChangeAtFrame, onDragEnd, }) => {
|
|
169
|
+
const onDragValueChange = (0, react_1.useCallback)((value) => onDragValueChangeAtFrame(value, sourceFrame), [onDragValueChangeAtFrame, sourceFrame]);
|
|
170
|
+
return (jsx_runtime_1.jsx(TimelineKeyframedValue_1.TimelineKeyframedValue, { field: field, propStatus: propStatus, sourceFrame: sourceFrame, dragOverrideValue: dragOverrideValue, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, scaleLockNodePath: nodePath }));
|
|
171
|
+
};
|
|
172
|
+
const TimelineSequenceKeyframedValueAtCurrentFrame = ({ keyframeDisplayOffset, ...props }) => {
|
|
173
|
+
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
174
|
+
return (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...props, sourceFrame: timelinePosition - keyframeDisplayOffset }));
|
|
175
|
+
};
|
|
176
|
+
const TimelineSequenceKeyframedValueUnmemoized = (props) => {
|
|
177
|
+
const { field, fileName, nodePath, schema, propStatus } = props;
|
|
136
178
|
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
137
179
|
const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
138
180
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
@@ -158,19 +200,28 @@ const TimelineSequenceKeyframedValue = ({ field, fileName, nodePath, schema, pro
|
|
|
158
200
|
clientId,
|
|
159
201
|
});
|
|
160
202
|
}, [clientId, field.key, fileName, nodePath, schema, setPropStatuses]);
|
|
161
|
-
const
|
|
203
|
+
const onKeyframedDragValueChangeAtFrame = (0, react_1.useCallback)((value, sourceFrame) => {
|
|
162
204
|
setDragOverrides(nodePath, field.key, remotion_1.Internals.makeKeyframedDragOverride({
|
|
163
205
|
status: propStatus,
|
|
164
206
|
frame: sourceFrame,
|
|
165
207
|
value,
|
|
166
208
|
}));
|
|
167
|
-
}, [propStatus, field.key, nodePath, setDragOverrides
|
|
209
|
+
}, [propStatus, field.key, nodePath, setDragOverrides]);
|
|
168
210
|
const onKeyframedDragEnd = (0, react_1.useCallback)(() => {
|
|
169
211
|
clearDragOverrides(nodePath);
|
|
170
212
|
}, [clearDragOverrides, nodePath]);
|
|
171
|
-
|
|
213
|
+
const valueProps = {
|
|
214
|
+
field,
|
|
215
|
+
nodePath,
|
|
216
|
+
propStatus,
|
|
217
|
+
dragOverrideValue,
|
|
218
|
+
onSave: onSaveKeyframed,
|
|
219
|
+
onDragValueChangeAtFrame: onKeyframedDragValueChangeAtFrame,
|
|
220
|
+
onDragEnd: onKeyframedDragEnd,
|
|
221
|
+
};
|
|
222
|
+
return props.sourceFrame !== undefined ? (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...valueProps, sourceFrame: props.sourceFrame })) : (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtCurrentFrame, { ...valueProps, keyframeDisplayOffset: props.keyframeDisplayOffset }));
|
|
172
223
|
};
|
|
173
|
-
exports.TimelineSequenceKeyframedValue =
|
|
224
|
+
exports.TimelineSequenceKeyframedValue = react_1.default.memo(TimelineSequenceKeyframedValueUnmemoized);
|
|
174
225
|
const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, schema, keyframeDisplayOffset, keyframeControlsMode = 'timeline', }) => {
|
|
175
226
|
var _a;
|
|
176
227
|
const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
@@ -178,8 +229,6 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
178
229
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
179
230
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
180
231
|
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
181
|
-
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
182
|
-
const sourceFrame = timelinePosition - keyframeDisplayOffset;
|
|
183
232
|
const propStatusesForOverride = remotion_1.Internals.getPropStatusesCtx(visualModePropStatuses, nodePath);
|
|
184
233
|
const propStatus = (_a = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride[field.key]) !== null && _a !== void 0 ? _a : null;
|
|
185
234
|
const dragOverrideValue = (0, react_1.useMemo)(() => {
|
|
@@ -257,7 +306,10 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
257
306
|
validatedLocation.source,
|
|
258
307
|
propStatus,
|
|
259
308
|
]);
|
|
260
|
-
const
|
|
309
|
+
const getContextMenuItems = (0, react_1.useCallback)(() => {
|
|
310
|
+
if (selection.selectable) {
|
|
311
|
+
selection.onSelect({ shiftKey: false, toggleKey: false });
|
|
312
|
+
}
|
|
261
313
|
return [
|
|
262
314
|
{
|
|
263
315
|
type: 'item',
|
|
@@ -272,7 +324,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
272
324
|
value: 'reset-sequence-field',
|
|
273
325
|
},
|
|
274
326
|
];
|
|
275
|
-
}, [canShowReset, onReset]);
|
|
327
|
+
}, [canShowReset, onReset, selection]);
|
|
276
328
|
const onPropertyDoubleClick = (0, react_1.useCallback)((event) => {
|
|
277
329
|
var _a;
|
|
278
330
|
if (!window.remotion_editorName ||
|
|
@@ -288,7 +340,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
288
340
|
if (propStatus === null) {
|
|
289
341
|
return null;
|
|
290
342
|
}
|
|
291
|
-
const fieldValue = isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx(exports.TimelineSequenceKeyframedValue, { field: field, fileName: validatedLocation.source, nodePath: nodePath, schema: schema, propStatus: propStatus,
|
|
343
|
+
const fieldValue = isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx(exports.TimelineSequenceKeyframedValue, { field: field, fileName: validatedLocation.source, nodePath: nodePath, schema: schema, propStatus: propStatus, keyframeDisplayOffset: keyframeDisplayOffset })) : propStatus.status === 'static' ? (jsx_runtime_1.jsx(Value, { field: field, nodePath: nodePath, validatedLocation: validatedLocation, schema: schema, propStatus: propStatus })) : (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineNonEditableStatus, { propStatus: propStatus }));
|
|
292
344
|
if (field.typeName === 'asset' && field.key === 'src') {
|
|
293
345
|
return (jsx_runtime_1.jsx("div", { style: {
|
|
294
346
|
...inlineSourceFieldRow,
|
|
@@ -297,6 +349,6 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
297
349
|
}, children: fieldValue }));
|
|
298
350
|
}
|
|
299
351
|
const row = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: rowDepth, eye: jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {}), keyframeControls: keyframeControls, arrow: jsx_runtime_1.jsx(TimelineExpandArrowButton_1.TimelineExpandArrowSpacer, {}), style: style, selected: selection.selected, selectable: selection.selectable, selectionItem: selection.selectionItem, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: false, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected, children: fieldValue }) }));
|
|
300
|
-
return
|
|
352
|
+
return jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: row });
|
|
301
353
|
};
|
|
302
354
|
exports.TimelineSequencePropItem = TimelineSequencePropItem;
|
|
@@ -121,7 +121,7 @@ export declare const getTimelineSequenceFromDragTargets: ({ draggedNodePathInfo,
|
|
|
121
121
|
readonly overrideIdsToNodePaths: OverrideIdToNodePaths;
|
|
122
122
|
readonly propStatuses: PropStatuses;
|
|
123
123
|
}) => TimelineSequenceFromDragTarget[] | null;
|
|
124
|
-
export declare const TimelineSequenceLeftEdgeDragHandle: React.
|
|
124
|
+
export declare const TimelineSequenceLeftEdgeDragHandle: React.NamedExoticComponent<{
|
|
125
125
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
126
126
|
readonly windowWidth: number;
|
|
127
127
|
readonly timelineDurationInFrames: number;
|
|
@@ -134,7 +134,7 @@ export declare const useTimelineSequenceFromDrag: ({ nodePathInfo, windowWidth,
|
|
|
134
134
|
dragging: boolean;
|
|
135
135
|
onPointerDown: (e: React.PointerEvent<HTMLDivElement>) => void;
|
|
136
136
|
};
|
|
137
|
-
export declare const TimelineSequenceRightEdgeDragHandle: React.
|
|
137
|
+
export declare const TimelineSequenceRightEdgeDragHandle: React.NamedExoticComponent<{
|
|
138
138
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
139
139
|
readonly windowWidth: number;
|
|
140
140
|
readonly timelineDurationInFrames: number;
|
|
@@ -1,9 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
2
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
36
|
exports.TimelineSequenceRightEdgeDragHandle = exports.useTimelineSequenceFromDrag = exports.TimelineSequenceLeftEdgeDragHandle = exports.getTimelineSequenceFromDragTargets = exports.getTimelineSequenceLeftEdgeDragTargets = exports.getTimelineSequenceDurationDragTargets = exports.getTimelineSequenceFromDragKeyframeMoves = exports.getTimelineSequenceFromDragChanges = exports.getTimelineSequenceFromDragDelta = exports.getTimelineSequenceFromDragValue = exports.getTimelineSequenceDurationDragChanges = exports.getTimelineSequenceLeftEdgeDragChanges = exports.getTimelineSequenceLeftEdgeDragValues = exports.getTimelineSequenceLeftEdgeDragDelta = exports.getTimelineSequenceDurationDragValue = exports.isTimelineSequenceLeftEdgeDraggable = exports.canResizeTimelineSequenceDuration = exports.isTimelineSequenceDurationDraggable = exports.isCascadingSequence = exports.isTransitionSeriesSequence = exports.timelineSequenceFromDragSnapThresholdPx = void 0;
|
|
4
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
38
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
6
|
-
const react_1 = require("react");
|
|
39
|
+
const react_1 = __importStar(require("react"));
|
|
7
40
|
const remotion_1 = require("remotion");
|
|
8
41
|
const no_react_1 = require("remotion/no-react");
|
|
9
42
|
const calculate_timeline_1 = require("../../helpers/calculate-timeline");
|
|
@@ -531,7 +564,7 @@ const clearFromDragOverrides = ({ clearDragOverrides, clearEffectDragOverrides,
|
|
|
531
564
|
}
|
|
532
565
|
}
|
|
533
566
|
};
|
|
534
|
-
const
|
|
567
|
+
const TimelineSequenceLeftEdgeDragHandleInner = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
|
|
535
568
|
const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
536
569
|
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
537
570
|
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
@@ -721,7 +754,7 @@ const TimelineSequenceLeftEdgeDragHandle = ({ nodePathInfo, windowWidth, timelin
|
|
|
721
754
|
};
|
|
722
755
|
return (jsx_runtime_1.jsx("div", { role: "separator", "aria-orientation": "vertical", title: "Drag to trim start", style: style, onPointerDown: onPointerDown }));
|
|
723
756
|
};
|
|
724
|
-
exports.TimelineSequenceLeftEdgeDragHandle =
|
|
757
|
+
exports.TimelineSequenceLeftEdgeDragHandle = react_1.default.memo(TimelineSequenceLeftEdgeDragHandleInner);
|
|
725
758
|
const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurationInFrames, }) => {
|
|
726
759
|
const { setPropStatuses, setDragOverrides, clearDragOverrides, setEffectDragOverrides, clearEffectDragOverrides, } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
727
760
|
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
@@ -944,7 +977,7 @@ const useTimelineSequenceFromDrag = ({ nodePathInfo, windowWidth, timelineDurati
|
|
|
944
977
|
};
|
|
945
978
|
};
|
|
946
979
|
exports.useTimelineSequenceFromDrag = useTimelineSequenceFromDrag;
|
|
947
|
-
const
|
|
980
|
+
const TimelineSequenceRightEdgeDragHandleInner = ({ nodePathInfo, windowWidth, timelineDurationInFrames }) => {
|
|
948
981
|
const { setPropStatuses, setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
949
982
|
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
950
983
|
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
@@ -1128,4 +1161,4 @@ const TimelineSequenceRightEdgeDragHandle = ({ nodePathInfo, windowWidth, timeli
|
|
|
1128
1161
|
};
|
|
1129
1162
|
return (jsx_runtime_1.jsx("div", { role: "separator", "aria-orientation": "vertical", title: "Drag to change duration", style: style, onPointerDown: onPointerDown }));
|
|
1130
1163
|
};
|
|
1131
|
-
exports.TimelineSequenceRightEdgeDragHandle =
|
|
1164
|
+
exports.TimelineSequenceRightEdgeDragHandle = react_1.default.memo(TimelineSequenceRightEdgeDragHandleInner);
|