@remotion/studio 4.0.526 → 4.0.528
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/AgentPrompt.js +1 -2
- package/dist/components/AudioWaveform.d.ts +1 -0
- package/dist/components/AudioWaveform.js +10 -14
- package/dist/components/Canvas.js +88 -26
- package/dist/components/CanvasCaptureDropHandler.js +63 -0
- package/dist/components/CanvasOrLoading.js +10 -2
- package/dist/components/CodeFrame.js +1 -1
- package/dist/components/ColorPicker/checker.d.ts +1 -1
- package/dist/components/CompositionSelectorItem.js +1 -0
- package/dist/components/CurrentAsset.js +4 -2
- package/dist/components/EditorRuler/Ruler.js +6 -3
- package/dist/components/EffectPickerModal.js +69 -43
- package/dist/components/ElementInstallConfirmation.js +3 -3
- package/dist/components/ElementLibrariesSettings.d.ts +2 -0
- package/dist/components/ElementLibrariesSettings.js +200 -0
- package/dist/components/InitialCompositionLoader.js +4 -2
- package/dist/components/InlineDropdown.js +26 -2
- package/dist/components/InlineEditableTitle.js +1 -0
- package/dist/components/InspectorOpenInEditor.js +13 -0
- package/dist/components/InspectorPanel/AlignmentControls.js +28 -9
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +2 -1
- package/dist/components/InspectorPanel/CompositionInspector.js +3 -3
- package/dist/components/InspectorPanel/CompositionMetadata.js +4 -0
- package/dist/components/InspectorPanel/EasingInspector.js +6 -2
- package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -1
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
- package/dist/components/InspectorPanel/KeyframeInspector.js +28 -24
- package/dist/components/InspectorPanel/MultiSequenceInspector.js +32 -1
- package/dist/components/InspectorPanel/MultiSequenceNumberField.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +70 -2
- package/dist/components/InspectorPanel/SequenceWrapAction.d.ts +8 -0
- package/dist/components/InspectorPanel/SequenceWrapAction.js +151 -0
- package/dist/components/InspectorPanel/common.js +1 -0
- package/dist/components/InspectorPanel/easing-inspector-selection.d.ts +2 -1
- package/dist/components/InspectorPanel/easing-inspector-selection.js +4 -3
- package/dist/components/InspectorPanel/keyframe-inspector-frame.d.ts +2 -1
- package/dist/components/InspectorPanel/keyframe-inspector-frame.js +2 -2
- package/dist/components/InspectorPanel/styles.js +2 -0
- package/dist/components/InspectorPanel/use-composition-actions.js +1 -0
- package/dist/components/InspectorSequenceSection.d.ts +1 -0
- package/dist/components/InspectorSequenceSection.js +7 -5
- package/dist/components/InspectorSourceLocation.js +3 -0
- package/dist/components/KeyboardShortcutsSettings.js +1 -1
- package/dist/components/Menu/styles.d.ts +2 -2
- package/dist/components/MenuBuildIndicator.js +1 -0
- package/dist/components/Modals.js +7 -6
- package/dist/components/ModelManager.js +10 -9
- package/dist/components/NewComposition/CancelButton.js +11 -5
- package/dist/components/NewComposition/InputDragger.d.ts +3 -1
- package/dist/components/NewComposition/InputDragger.js +28 -9
- package/dist/components/NewComposition/NewComposition.js +7 -6
- package/dist/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/components/NewComposition/menu-typeahead.js +1 -1
- package/dist/components/Preview.js +4 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -0
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
- package/dist/components/RadioButton.js +1 -0
- package/dist/components/RenderModal/DataEditor.js +4 -1
- package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +1 -2
- package/dist/components/RenderModal/WebRenderModalPicture.js +1 -2
- package/dist/components/RenderQueue/CaptionQueueItem.js +19 -7
- package/dist/components/RenderQueue/CaptionQueueProcessor.js +65 -15
- package/dist/components/RenderQueue/QueueJobError.d.ts +8 -0
- package/dist/components/RenderQueue/QueueJobError.js +24 -0
- package/dist/components/RenderQueue/QueueJobErrorModal.d.ts +8 -0
- package/dist/components/RenderQueue/QueueJobErrorModal.js +63 -0
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.d.ts +3 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +11 -4
- package/dist/components/RenderQueue/RenderQueueRepeat.d.ts +3 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +20 -3
- package/dist/components/RenderQueue/VideoMattingQueueItem.js +25 -27
- package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +68 -28
- package/dist/components/RenderQueue/caption-job-types.d.ts +9 -1
- package/dist/components/RenderQueue/context.d.ts +4 -0
- package/dist/components/RenderQueue/context.js +58 -8
- package/dist/components/RenderQueue/index.js +3 -3
- package/dist/components/RenderQueue/load-model-for-job.d.ts +2 -1
- package/dist/components/RenderQueue/load-model-for-job.js +5 -1
- package/dist/components/RenderQueue/video-matting-job-types.d.ts +13 -6
- package/dist/components/RendersTab.js +2 -0
- package/dist/components/SelectedOutlineCropControls.js +2 -1
- package/dist/components/SelectedOutlineEditingHandles.js +9 -2
- package/dist/components/SelectedOutlineElement.js +9 -3
- package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -4
- package/dist/components/SelectedOutlineKeyboardControls.js +4 -22
- package/dist/components/SelectedOutlineOverlay.js +152 -106
- package/dist/components/SelectedOutlinePathPoints.d.ts +8 -0
- package/dist/components/SelectedOutlinePathPoints.js +433 -0
- package/dist/components/SelectedOutlinePolygon.js +21 -46
- package/dist/components/SelectedOutlineRenderer.d.ts +3 -5
- package/dist/components/SelectedOutlineRenderer.js +32 -136
- package/dist/components/SelectedOutlineSnapIndicators.d.ts +6 -0
- package/dist/components/SelectedOutlineSnapIndicators.js +16 -12
- package/dist/components/SelectedOutlineTransformOriginHandle.js +3 -2
- package/dist/components/SelectedOutlineUvControls.js +12 -7
- package/dist/components/SequencePropsSubscriptionProvider.d.ts +3 -0
- package/dist/components/SequencePropsSubscriptionProvider.js +8 -6
- package/dist/components/SettingsModal.js +30 -3
- package/dist/components/SettingsModalFooter.d.ts +1 -0
- package/dist/components/SettingsModalFooter.js +7 -3
- package/dist/components/ShowOutlinesProvider.js +1 -1
- package/dist/components/SkillsSettings.d.ts +0 -1
- package/dist/components/SkillsSettings.js +13 -14
- package/dist/components/Splitter/SplitterElement.js +1 -2
- package/dist/components/TimeValue.js +1 -1
- package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +1 -0
- package/dist/components/Timeline/LoopedTimelineIndicators.js +7 -6
- package/dist/components/Timeline/TimelineArrayField.js +1 -1
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +0 -1
- package/dist/components/Timeline/TimelineColorField.js +1 -1
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +6 -9
- package/dist/components/Timeline/TimelineDragHandler.js +1 -1
- package/dist/components/Timeline/TimelineEffectItem.js +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +12 -5
- package/dist/components/Timeline/TimelineExpandArrowButton.js +1 -0
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedRow.js +6 -4
- package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedSection.js +2 -2
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +3 -1
- package/dist/components/Timeline/TimelineFieldLabel.js +1 -0
- package/dist/components/Timeline/TimelineFontFamilyField.js +12 -12
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -0
- package/dist/components/Timeline/TimelineKeyframeControls.js +40 -28
- package/dist/components/Timeline/TimelineLayerChildren.js +1 -1
- package/dist/components/Timeline/TimelineList.js +1 -1
- package/dist/components/Timeline/TimelineNumberField.js +2 -4
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
- package/dist/components/Timeline/TimelineSelection.d.ts +9 -9
- package/dist/components/Timeline/TimelineSelection.js +16 -9
- package/dist/components/Timeline/TimelineSequence.d.ts +3 -1
- package/dist/components/Timeline/TimelineSequence.js +65 -21
- package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +46 -8
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +3 -0
- package/dist/components/Timeline/TimelineSequencePropItem.js +262 -25
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +11 -13
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +98 -77
- package/dist/components/Timeline/TimelineTextContentField.js +27 -4
- package/dist/components/Timeline/TimelineTimeIndicators.js +10 -5
- package/dist/components/Timeline/TimelineTrack.js +1 -1
- package/dist/components/Timeline/TimelineTrimTooltip.d.ts +11 -0
- package/dist/components/Timeline/TimelineTrimTooltip.js +41 -0
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
- package/dist/components/Timeline/TimelineVideoInfo.js +13 -10
- package/dist/components/Timeline/TimelineViewport.d.ts +1 -0
- package/dist/components/Timeline/TimelineViewport.js +10 -1
- package/dist/components/Timeline/delete-selected-keyframe.js +22 -8
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +1 -5
- package/dist/components/Timeline/delete-selected-timeline-item.js +9 -95
- package/dist/components/Timeline/get-animation-item-selection-for-frame.d.ts +2 -1
- package/dist/components/Timeline/get-animation-item-selection-for-frame.js +7 -5
- package/dist/components/Timeline/get-keyframed-sequence-drag-targets.d.ts +23 -0
- package/dist/components/Timeline/get-keyframed-sequence-drag-targets.js +57 -0
- package/dist/components/Timeline/get-node-keyframes.d.ts +2 -1
- package/dist/components/Timeline/get-node-keyframes.js +6 -4
- package/dist/components/Timeline/get-playback-rate-keyframe-changes.d.ts +21 -0
- package/dist/components/Timeline/get-playback-rate-keyframe-changes.js +142 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +3 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.js +13 -1
- package/dist/components/Timeline/get-timeline-keyframes.d.ts +15 -2
- package/dist/components/Timeline/get-timeline-keyframes.js +44 -6
- package/dist/components/Timeline/keyframe-clipboard.js +17 -3
- package/dist/components/Timeline/split-selected-timeline-item.d.ts +13 -10
- package/dist/components/Timeline/split-selected-timeline-item.js +61 -35
- package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
- package/dist/components/Timeline/timeline-field-row-layout.js +1 -0
- package/dist/components/Timeline/use-delete-timeline-items.js +17 -11
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +2 -1
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +3 -1
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -3
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +28 -19
- package/dist/components/TimelineCombobox.js +1 -0
- package/dist/components/Transcription/Models.js +1 -1
- package/dist/components/Transcription/TranscriptionModal.js +18 -11
- package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +1 -1
- package/dist/components/Transcription/resample-media-to-16-khz.d.ts +2 -1
- package/dist/components/Transcription/resample-media-to-16-khz.js +20 -2
- package/dist/components/UpdatesSettings.js +2 -0
- package/dist/components/VideoMatting/Models.js +1 -1
- package/dist/components/VideoMatting/VideoMattingModal.js +30 -47
- package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +1 -1
- package/dist/components/WebMcp.js +23 -40
- package/dist/components/composition-drop-preview.d.ts +9 -2
- package/dist/components/composition-drop-preview.js +8 -4
- package/dist/components/composition-menu-items.js +4 -4
- package/dist/components/delete-jsx-nodes-api.d.ts +2 -0
- package/dist/components/{delete-jsx-node-api.js → delete-jsx-nodes-api.js} +5 -5
- package/dist/components/effect-drag-and-drop.d.ts +13 -5
- package/dist/components/effect-drag-and-drop.js +19 -4
- package/dist/components/get-open-in-menu-items.d.ts +2 -1
- package/dist/components/get-open-in-menu-items.js +24 -8
- package/dist/components/keyboard-shortcuts.d.ts +4 -4
- package/dist/components/keyboard-shortcuts.js +3 -1
- package/dist/components/public-output-name.d.ts +1 -0
- package/dist/components/public-output-name.js +7 -3
- package/dist/components/selected-outline-drag.d.ts +1 -6
- package/dist/components/selected-outline-drag.js +22 -6
- package/dist/components/selected-outline-geometry.d.ts +2 -18
- package/dist/components/selected-outline-measurement.d.ts +23 -41
- package/dist/components/selected-outline-measurement.js +14 -252
- package/dist/components/selected-outline-order.d.ts +4 -11
- package/dist/components/selected-outline-order.js +2 -254
- package/dist/components/selected-outline-snap.d.ts +1 -1
- package/dist/components/selected-outline-snap.js +2 -1
- package/dist/components/selected-outline-types.d.ts +18 -28
- package/dist/components/selected-outline-uv.d.ts +4 -4
- package/dist/components/selected-outline-uv.js +6 -111
- package/dist/components/sequence-props-api.js +0 -10
- package/dist/components/use-selected-outline-control-target.js +12 -21
- package/dist/components/wrap-jsx-node-api.d.ts +2 -0
- package/dist/components/wrap-jsx-node-api.js +13 -0
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +45 -2
- package/dist/error-overlay/remotion-overlay/StackFrame.js +32 -3
- package/dist/esm/{CaptionQueueProcessor-k0yrm3dj.mjs → CaptionQueueProcessor-nr7hjcga.mjs} +96 -19
- package/dist/esm/LazyModels-ajkn7fs3.mjs +12 -0
- package/dist/esm/LazyModels-g1g7cf4e.mjs +12 -0
- package/dist/esm/{TranscriptionModal-ymnx1c7m.mjs → TranscriptionModal-e18bzbkb.mjs} +30 -22
- package/dist/esm/{VideoMattingModal-05vpczks.mjs → VideoMattingModal-5bz2s4rs.mjs} +47 -62
- package/dist/esm/{VideoMattingQueueProcessor-t1hgm2rm.mjs → VideoMattingQueueProcessor-4tkj0f4k.mjs} +69 -26
- package/dist/esm/{index-v4tr1bft.mjs → index-09txs1bj.mjs} +5 -0
- package/dist/esm/{index-4dsz9035.mjs → index-5ycb9e9q.mjs} +2 -4
- package/dist/esm/index-890dd9b3.mjs +768 -0
- package/dist/esm/{index-5bfxbpca.mjs → index-8nt6a0mw.mjs} +3 -3
- package/dist/esm/{index-5gd8k9yv.mjs → index-9q9w8v9p.mjs} +3 -3
- package/dist/esm/{index-x40wwfmt.mjs → index-c2wabcdt.mjs} +8 -6
- package/dist/esm/index-dfy1t576.mjs +129 -0
- package/dist/esm/index-dh3zk2hv.mjs +220 -0
- package/dist/esm/{index-0gewwxse.mjs → index-dpyss74p.mjs} +6179 -5011
- package/dist/esm/{index-9x6e1dq0.mjs → index-hqxc6tzp.mjs} +40 -6
- package/dist/esm/{index-cdy8v54v.mjs → index-qve7mdfp.mjs} +36 -539
- package/dist/esm/{index-eb5txqp6.mjs → index-s6qya2gg.mjs} +8 -88
- package/dist/esm/index-t7tbt980.mjs +103 -0
- package/dist/esm/{index-g7k2dvar.mjs → index-t7xnxdf8.mjs} +44 -26
- package/dist/esm/index-wqc43mw0.mjs +158 -0
- package/dist/esm/{index-bs39wngg.mjs → index-x6r9bn12.mjs} +5623 -6218
- package/dist/esm/{index-f97r9e2g.mjs → index-xac20sv4.mjs} +46 -57
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/internals.mjs +13 -10
- package/dist/esm/previewEntry.mjs +18 -12
- package/dist/esm/renderEntry.mjs +5 -1
- package/dist/esm/{resolve-composition-component-location-bt2d6qxq.mjs → resolve-composition-component-location-2hgf6g0a.mjs} +1 -1
- package/dist/helpers/calculate-timeline.d.ts +5 -1
- package/dist/helpers/calculate-timeline.js +1 -1
- package/dist/helpers/checkerboard-background.d.ts +2 -2
- package/dist/helpers/colors.d.ts +132 -112
- package/dist/helpers/colors.js +117 -95
- package/dist/helpers/copy-text.js +1 -16
- package/dist/helpers/create-folder-tree.js +2 -1
- package/dist/helpers/editor-guide-selection.d.ts +1 -1
- package/dist/helpers/editor-ruler.js +23 -12
- package/dist/helpers/get-connected-compositions.d.ts +6 -1
- package/dist/helpers/get-connected-compositions.js +1 -1
- package/dist/helpers/get-sequence-double-click-action.js +1 -1
- package/dist/helpers/get-sequence-visible-range.d.ts +1 -1
- package/dist/helpers/get-sequence-visible-range.js +2 -5
- package/dist/helpers/get-timeline-nestedness.d.ts +1 -1
- package/dist/helpers/get-timeline-nestedness.js +1 -1
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
- package/dist/helpers/get-timeline-sequence-sort-key.js +1 -1
- package/dist/helpers/hoverable.js +6 -5
- package/dist/helpers/inject-css.js +5 -7
- package/dist/helpers/open-in-editor.js +1 -1
- package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -1
- package/dist/helpers/prism-vsc-dark-plus.js +52 -51
- package/dist/helpers/resolve-studio-color.d.ts +1 -0
- package/dist/helpers/resolve-studio-color.js +11 -0
- package/dist/helpers/studio-css-variables.d.ts +1 -0
- package/dist/helpers/studio-css-variables.js +105 -0
- package/dist/helpers/studio-pixel-ratio.d.ts +1 -0
- package/dist/helpers/studio-pixel-ratio.js +7 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- package/dist/helpers/timeline-node-path-key.d.ts +1 -1
- package/dist/helpers/timeline-node-path-key.js +2 -2
- package/dist/helpers/use-keybinding.d.ts +1 -1
- package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
- package/dist/helpers/use-menu-structure.js +15 -9
- package/dist/helpers/use-runtime-values.js +2 -28
- package/dist/hot-middleware-client/client.js +5 -3
- package/dist/icons/align-center-horizontal.js +2 -1
- package/dist/icons/align-left.js +2 -1
- package/dist/icons/align-right.js +2 -1
- package/dist/icons/{separation.d.ts → background-removal.d.ts} +1 -1
- package/dist/icons/background-removal.js +9 -0
- package/dist/icons/wrap.d.ts +4 -0
- package/dist/icons/wrap.js +10 -0
- package/dist/previewEntry.js +2 -0
- package/dist/renderEntry.js +2 -0
- package/dist/state/modals.d.ts +20 -1
- package/dist/state/timeline-sequence-hover.d.ts +6 -16
- package/dist/state/timeline-sequence-hover.js +6 -67
- package/dist/state/timeline-zoom.js +4 -0
- package/package.json +20 -19
- package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.d.ts +0 -15
- package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.js +0 -31
- package/dist/components/delete-jsx-node-api.d.ts +0 -2
- package/dist/esm/LazyModels-mtggyjye.mjs +0 -11
- package/dist/esm/LazyModels-nk7py0zt.mjs +0 -11
- package/dist/esm/index-cw0pnpg5.mjs +0 -50
- package/dist/esm/index-k426ye99.mjs +0 -139
- package/dist/helpers/get-box-quads-polyfill-internals.d.ts +0 -82
- package/dist/helpers/get-box-quads-polyfill-internals.js +0 -2403
- package/dist/helpers/get-box-quads-ponyfill.d.ts +0 -10
- package/dist/helpers/get-box-quads-ponyfill.js +0 -23
- package/dist/icons/separation.js +0 -7
|
@@ -8,6 +8,7 @@ export declare const TimelineSequenceItem: React.NamedExoticComponent<{
|
|
|
8
8
|
readonly nestedDepth: number;
|
|
9
9
|
readonly nodePathInfo: SequenceNodePathInfo | null;
|
|
10
10
|
readonly keyframeDisplayOffset: number;
|
|
11
|
+
readonly keyframePlaybackRate: number;
|
|
11
12
|
readonly sequenceFrameOffset: number;
|
|
12
13
|
readonly siblingIndex: number;
|
|
13
14
|
readonly numberOfHiddenDuplicates: number;
|
|
@@ -62,6 +62,7 @@ const layout_1 = require("../layout");
|
|
|
62
62
|
const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
63
63
|
const reorder_sequence_api_1 = require("../reorder-sequence-api");
|
|
64
64
|
const selected_outline_types_1 = require("../selected-outline-types");
|
|
65
|
+
const SequencePropsSubscriptionProvider_1 = require("../SequencePropsSubscriptionProvider");
|
|
65
66
|
const use_select_asset_1 = require("../use-select-asset");
|
|
66
67
|
const disable_sequence_interactivity_1 = require("./disable-sequence-interactivity");
|
|
67
68
|
const duplicate_selected_timeline_item_1 = require("./duplicate-selected-timeline-item");
|
|
@@ -69,6 +70,7 @@ const get_sequence_context_menu_items_1 = require("./get-sequence-context-menu-i
|
|
|
69
70
|
const get_sequence_split_menu_item_1 = require("./get-sequence-split-menu-item");
|
|
70
71
|
const imperative_state_1 = require("./imperative-state");
|
|
71
72
|
const save_sequence_prop_1 = require("./save-sequence-prop");
|
|
73
|
+
const split_selected_timeline_item_1 = require("./split-selected-timeline-item");
|
|
72
74
|
const timeline_asset_link_1 = require("./timeline-asset-link");
|
|
73
75
|
const timeline_refs_1 = require("./timeline-refs");
|
|
74
76
|
const timeline_scroll_logic_1 = require("./timeline-scroll-logic");
|
|
@@ -171,10 +173,13 @@ const getSequencePointerDropTargetAtPoint = ({ clientX, clientY, }) => {
|
|
|
171
173
|
return null;
|
|
172
174
|
};
|
|
173
175
|
const SEQUENCE_REORDER_POINTER_THRESHOLD = 3;
|
|
174
|
-
const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions, nestedDepth, sequence, nodePathInfo, keyframeDisplayOffset, sequenceFrameOffset, siblingIndex, numberOfHiddenDuplicates, showProvisionalVisibilityToggle, }) => {
|
|
176
|
+
const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions, nestedDepth, sequence, nodePathInfo, keyframeDisplayOffset, keyframePlaybackRate, sequenceFrameOffset, siblingIndex, numberOfHiddenDuplicates, showProvisionalVisibilityToggle, }) => {
|
|
175
177
|
var _a, _b;
|
|
176
178
|
var _c, _d, _e;
|
|
177
179
|
const nodePath = (_c = nodePathInfo === null || nodePathInfo === void 0 ? void 0 : nodePathInfo.sequenceSubscriptionKey) !== null && _c !== void 0 ? _c : null;
|
|
180
|
+
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
181
|
+
const overrideIdToNodePathMappingsRef = (0, react_1.useContext)(SequencePropsSubscriptionProvider_1.OverrideIdToNodePathMappingsRefContext);
|
|
182
|
+
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
178
183
|
const { hovered, onPointerEnter, onPointerLeave } = (0, timeline_sequence_hover_1.useTimelineSequenceHover)(nodePathInfo);
|
|
179
184
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
180
185
|
const previewConnected = previewServerState.type === 'connected';
|
|
@@ -190,6 +195,7 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
190
195
|
const selectComposition = (0, InitialCompositionLoader_1.useSelectComposition)();
|
|
191
196
|
const deleteTimelineItems = (0, use_delete_timeline_items_1.useDeleteTimelineItems)();
|
|
192
197
|
const { onSelect, selectable, selected, selectedItems, selectItem } = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
198
|
+
const { selectItems } = (0, TimelineSelection_1.useTimelineSelection)();
|
|
193
199
|
const selectedSequenceNodePathInfos = (0, react_1.useMemo)(() => {
|
|
194
200
|
if (!selected ||
|
|
195
201
|
selectedItems.length < 2 ||
|
|
@@ -257,6 +263,26 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
257
263
|
}
|
|
258
264
|
(0, duplicate_selected_timeline_item_1.duplicateSequencesFromSource)(selectedSequenceNodePathInfos, confirm).catch(() => undefined);
|
|
259
265
|
}, [confirm, previewInteractive, selectedSequenceNodePathInfos]);
|
|
266
|
+
const onSplitSelectedSequences = (0, react_1.useCallback)(() => {
|
|
267
|
+
var _a;
|
|
268
|
+
if (!previewInteractive || selectedSequenceNodePathInfos === null) {
|
|
269
|
+
return;
|
|
270
|
+
}
|
|
271
|
+
(_a = (0, split_selected_timeline_item_1.splitSelectedTimelineItems)({
|
|
272
|
+
selections: selectedItems,
|
|
273
|
+
sequences: sequencesRef.current,
|
|
274
|
+
overrideIdsToNodePaths: overrideIdToNodePathMappingsRef.current,
|
|
275
|
+
propStatuses: propStatusesRef.current,
|
|
276
|
+
splitFrame: (0, imperative_state_1.getCurrentFrame)(),
|
|
277
|
+
})) === null || _a === void 0 ? void 0 : _a.catch(() => undefined);
|
|
278
|
+
}, [
|
|
279
|
+
overrideIdToNodePathMappingsRef,
|
|
280
|
+
previewInteractive,
|
|
281
|
+
propStatusesRef,
|
|
282
|
+
selectedItems,
|
|
283
|
+
selectedSequenceNodePathInfos,
|
|
284
|
+
sequencesRef,
|
|
285
|
+
]);
|
|
260
286
|
const onDeleteSequenceFromSource = (0, react_1.useCallback)(() => {
|
|
261
287
|
if (deleteDisabled ||
|
|
262
288
|
!(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source) ||
|
|
@@ -750,7 +776,7 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
750
776
|
const onAddEffect = (0, react_1.useCallback)(() => {
|
|
751
777
|
if (!canAddEffect ||
|
|
752
778
|
previewServerState.type !== 'connected' ||
|
|
753
|
-
|
|
779
|
+
nodePathInfo === null ||
|
|
754
780
|
!(validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source)) {
|
|
755
781
|
return;
|
|
756
782
|
}
|
|
@@ -758,13 +784,15 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
758
784
|
type: 'add-effect',
|
|
759
785
|
clientId: previewServerState.clientId,
|
|
760
786
|
fileName: validatedLocation.source,
|
|
761
|
-
|
|
787
|
+
nodePathInfo,
|
|
788
|
+
selectItems,
|
|
762
789
|
});
|
|
763
790
|
}, [
|
|
764
791
|
canAddEffect,
|
|
765
|
-
|
|
792
|
+
nodePathInfo,
|
|
766
793
|
previewServerState,
|
|
767
794
|
setSelectedModal,
|
|
795
|
+
selectItems,
|
|
768
796
|
validatedLocation === null || validatedLocation === void 0 ? void 0 : validatedLocation.source,
|
|
769
797
|
]);
|
|
770
798
|
const onCrop = (0, react_1.useCallback)(() => {
|
|
@@ -806,8 +834,10 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
806
834
|
return (0, get_sequence_context_menu_items_1.getMultiSequenceContextMenuItems)({
|
|
807
835
|
deleteDisabled: !previewInteractive,
|
|
808
836
|
duplicateDisabled: !previewInteractive,
|
|
837
|
+
splitDisabled: !previewInteractive,
|
|
809
838
|
onDeleteSelectedSequences,
|
|
810
839
|
onDuplicateSelectedSequences,
|
|
840
|
+
onSplitSelectedSequences,
|
|
811
841
|
});
|
|
812
842
|
}
|
|
813
843
|
const splitMenuItem = (0, get_sequence_split_menu_item_1.getSequenceSplitMenuItem)({
|
|
@@ -964,6 +994,7 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
964
994
|
onDisableSequenceInteractivity,
|
|
965
995
|
onDuplicateSequenceFromSource,
|
|
966
996
|
onDuplicateSelectedSequences,
|
|
997
|
+
onSplitSelectedSequences,
|
|
967
998
|
onRenameSequence,
|
|
968
999
|
onSelect,
|
|
969
1000
|
openInCodingAgent,
|
|
@@ -1013,7 +1044,7 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
1013
1044
|
const onEffectDrop = (0, react_1.useCallback)(async (e) => {
|
|
1014
1045
|
if (!canDropEffect ||
|
|
1015
1046
|
previewServerState.type !== 'connected' ||
|
|
1016
|
-
|
|
1047
|
+
nodePathInfo === null ||
|
|
1017
1048
|
validatedLocation === null ||
|
|
1018
1049
|
!(0, effect_drag_and_drop_1.hasEffectDragType)(e.dataTransfer)) {
|
|
1019
1050
|
return;
|
|
@@ -1034,10 +1065,17 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
1034
1065
|
await (0, effect_drag_and_drop_1.addEffectFromDragData)({
|
|
1035
1066
|
dragData,
|
|
1036
1067
|
fileName: validatedLocation.source,
|
|
1037
|
-
|
|
1068
|
+
nodePathInfo,
|
|
1038
1069
|
clientId: previewServerState.clientId,
|
|
1070
|
+
selectItems,
|
|
1039
1071
|
});
|
|
1040
|
-
}, [
|
|
1072
|
+
}, [
|
|
1073
|
+
canDropEffect,
|
|
1074
|
+
nodePathInfo,
|
|
1075
|
+
previewServerState,
|
|
1076
|
+
selectItems,
|
|
1077
|
+
validatedLocation,
|
|
1078
|
+
]);
|
|
1041
1079
|
const trackRow = (jsx_runtime_1.jsx(TimelineRowChrome_1.TimelineRowChrome, { depth: nestedDepth, eye: showVisibilityToggle ? (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEye, { type: sequence.type === 'audio' ? 'speaker' : 'eye', hidden: isItemHidden, onInvoked: canToggleVisibility ? onToggleVisibility : null })) : (jsx_runtime_1.jsx(TimelineLayerEye_1.TimelineLayerEyeSpacer, {})), arrow: jsx_runtime_1.jsx(TimelineLayerChildren_1.TimelineLayerChildrenToggle, { sequence: sequence }), style: rowStyle, selected: selected, selectable: selectable, onSelect: onSelect, showSelectedBackground: true, containsSelection: containsSelection, hovered: hovered, outerHeight: outerHeight, onDragLeave: canDropEffect ? onEffectDragLeave : undefined, onDragOver: canDropEffect ? onEffectDragOver : undefined, onDrop: canDropEffect ? onEffectDrop : undefined, onDoubleClick: canHandleSequenceDoubleClick ? onSequenceDoubleClick : undefined, onPointerEnter: onPointerEnter, onPointerLeave: onPointerLeave, children: jsx_runtime_1.jsxs("div", { style: labelContainerStyle, children: [connectedCompositions.length > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
1042
1080
|
jsx_runtime_1.jsx(CompositionOrStillIcon_1.CompositionOrStillIcon, { color: (0, TimelineSelection_1.getTimelineColor)(false, false), composition: connectedCompositions[0], style: connectedCompositionIconStyle }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 })
|
|
1043
1081
|
] })) : null, jsx_runtime_1.jsx(TimelineSequenceName_1.TimelineSequenceName, { displayName: timelineDisplayName, fallbackDisplayName: fallbackDisplayName, selected: selected, containsSelection: containsSelection, editing: isRenaming, onCancelEditing: onCancelRenaming, onSaveName: onSaveName }), numberOfHiddenDuplicates > 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
@@ -1058,6 +1096,6 @@ const TimelineSequenceItemInner = ({ afterDropLineOffset, connectedCompositions,
|
|
|
1058
1096
|
isExpanded &&
|
|
1059
1097
|
hasExpandableContent &&
|
|
1060
1098
|
nodePathInfo &&
|
|
1061
|
-
validatedLocation ? (jsx_runtime_1.jsx(TimelineExpandedSection_1.TimelineExpandedSection, { sequence: sequence, validatedLocation: validatedLocation, nodePathInfo: nodePathInfo, nestedDepth: nestedDepth, keyframeDisplayOffset: keyframeDisplayOffset })) : null] }));
|
|
1099
|
+
validatedLocation ? (jsx_runtime_1.jsx(TimelineExpandedSection_1.TimelineExpandedSection, { sequence: sequence, validatedLocation: validatedLocation, nodePathInfo: nodePathInfo, nestedDepth: nestedDepth, keyframeDisplayOffset: keyframeDisplayOffset, keyframePlaybackRate: keyframePlaybackRate })) : null] }));
|
|
1062
1100
|
};
|
|
1063
1101
|
exports.TimelineSequenceItem = react_1.default.memo(TimelineSequenceItemInner);
|
|
@@ -14,9 +14,11 @@ type TimelineSequenceKeyframedValueBaseProps = {
|
|
|
14
14
|
type TimelineSequenceKeyframedValueProps = TimelineSequenceKeyframedValueBaseProps & ({
|
|
15
15
|
readonly sourceFrame: number;
|
|
16
16
|
readonly keyframeDisplayOffset?: never;
|
|
17
|
+
readonly keyframePlaybackRate?: never;
|
|
17
18
|
} | {
|
|
18
19
|
readonly sourceFrame?: never;
|
|
19
20
|
readonly keyframeDisplayOffset: number;
|
|
21
|
+
readonly keyframePlaybackRate: number;
|
|
20
22
|
});
|
|
21
23
|
export declare const TimelineSequenceKeyframedValue: React.NamedExoticComponent<TimelineSequenceKeyframedValueProps>;
|
|
22
24
|
export declare const TimelineSequencePropItem: React.FC<{
|
|
@@ -27,6 +29,7 @@ export declare const TimelineSequencePropItem: React.FC<{
|
|
|
27
29
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
28
30
|
readonly schema: InteractivitySchema;
|
|
29
31
|
readonly keyframeDisplayOffset: number;
|
|
32
|
+
readonly keyframePlaybackRate: number;
|
|
30
33
|
readonly keyframeControlsMode: TimelineKeyframeControlsMode;
|
|
31
34
|
readonly runtimeValue: unknown;
|
|
32
35
|
}>;
|
|
@@ -37,6 +37,7 @@ exports.TimelineSequencePropItem = exports.TimelineSequenceKeyframedValue = void
|
|
|
37
37
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
38
38
|
const studio_shared_1 = require("@remotion/studio-shared");
|
|
39
39
|
const react_1 = __importStar(require("react"));
|
|
40
|
+
const react_dom_1 = require("react-dom");
|
|
40
41
|
const remotion_1 = require("remotion");
|
|
41
42
|
const client_id_1 = require("../../helpers/client-id");
|
|
42
43
|
const format_file_location_1 = require("../../helpers/format-file-location");
|
|
@@ -46,6 +47,7 @@ const InspectorPanelLayout_1 = require("../InspectorPanelLayout");
|
|
|
46
47
|
const use_default_editor_info_1 = require("../use-default-editor-info");
|
|
47
48
|
const call_add_keyframe_1 = require("./call-add-keyframe");
|
|
48
49
|
const get_copy_context_for_agents_menu_item_1 = require("./get-copy-context-for-agents-menu-item");
|
|
50
|
+
const get_playback_rate_keyframe_changes_1 = require("./get-playback-rate-keyframe-changes");
|
|
49
51
|
const get_sequence_prop_reset_changes_1 = require("./get-sequence-prop-reset-changes");
|
|
50
52
|
const get_timeline_keyframes_1 = require("./get-timeline-keyframes");
|
|
51
53
|
const save_sequence_prop_1 = require("./save-sequence-prop");
|
|
@@ -87,9 +89,105 @@ const isResettableStatus = ({ status, defaultValue, }) => {
|
|
|
87
89
|
const effectiveCodeValue = (_a = status.codeValue) !== null && _a !== void 0 ? _a : defaultValue;
|
|
88
90
|
return JSON.stringify(effectiveCodeValue) !== JSON.stringify(defaultValue);
|
|
89
91
|
};
|
|
90
|
-
const
|
|
92
|
+
const getPlaybackRateAdjustedDuration = ({ durationInFrames, previousPlaybackRate, playbackRate, }) => {
|
|
93
|
+
const adjustedDuration = (durationInFrames * previousPlaybackRate) / playbackRate;
|
|
94
|
+
if (!Number.isFinite(adjustedDuration) || adjustedDuration <= 0) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
const nearestInteger = Math.round(adjustedDuration);
|
|
98
|
+
return nearestInteger > 0 &&
|
|
99
|
+
Math.abs(adjustedDuration - nearestInteger) <=
|
|
100
|
+
Number.EPSILON * Math.max(1, Math.abs(adjustedDuration)) * 2
|
|
101
|
+
? nearestInteger
|
|
102
|
+
: adjustedDuration;
|
|
103
|
+
};
|
|
104
|
+
const Value = ({ field, nodePath, validatedLocation, schema, propStatus, durationPropStatus, }) => {
|
|
105
|
+
const playbackRateBaseline = (0, react_1.useRef)(null);
|
|
106
|
+
const previewedKeyframes = (0, react_1.useRef)([]);
|
|
107
|
+
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
108
|
+
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
109
|
+
const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
|
|
110
|
+
const getPlaybackRateChanges = (0, react_1.useCallback)((value) => {
|
|
111
|
+
var _a;
|
|
112
|
+
if (field.key !== 'playbackRate' ||
|
|
113
|
+
nodePath === null ||
|
|
114
|
+
typeof value !== 'number') {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
const currentStatus = (_a = remotion_1.Internals.getPropStatusesCtx(propStatusesRef.current, nodePath)) === null || _a === void 0 ? void 0 : _a.playbackRate;
|
|
118
|
+
const previousPlaybackRate = (currentStatus === null || currentStatus === void 0 ? void 0 : currentStatus.status) === 'static' &&
|
|
119
|
+
typeof currentStatus.codeValue === 'number'
|
|
120
|
+
? currentStatus.codeValue
|
|
121
|
+
: field.fieldSchema.default;
|
|
122
|
+
if (typeof previousPlaybackRate !== 'number') {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
return (0, get_playback_rate_keyframe_changes_1.getPlaybackRateKeyframeChanges)({
|
|
126
|
+
nodePath,
|
|
127
|
+
sequences: sequencesRef.current,
|
|
128
|
+
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
129
|
+
propStatuses: propStatusesRef.current,
|
|
130
|
+
previousPlaybackRate,
|
|
131
|
+
playbackRate: value,
|
|
132
|
+
});
|
|
133
|
+
}, [
|
|
134
|
+
field.fieldSchema.default,
|
|
135
|
+
field.key,
|
|
136
|
+
nodePath,
|
|
137
|
+
overrideIdToNodePathMappings,
|
|
138
|
+
propStatusesRef,
|
|
139
|
+
sequencesRef,
|
|
140
|
+
]);
|
|
141
|
+
const getAdjustedDuration = (0, react_1.useCallback)((playbackRate) => {
|
|
142
|
+
if (field.key !== 'playbackRate' ||
|
|
143
|
+
!schema.durationInFrames ||
|
|
144
|
+
(durationPropStatus === null || durationPropStatus === void 0 ? void 0 : durationPropStatus.status) !== 'static' ||
|
|
145
|
+
typeof durationPropStatus.codeValue !== 'number' ||
|
|
146
|
+
!Number.isFinite(durationPropStatus.codeValue) ||
|
|
147
|
+
typeof playbackRate !== 'number' ||
|
|
148
|
+
!Number.isFinite(playbackRate) ||
|
|
149
|
+
playbackRate <= 0) {
|
|
150
|
+
return null;
|
|
151
|
+
}
|
|
152
|
+
const currentPlaybackRate = typeof propStatus.codeValue === 'number'
|
|
153
|
+
? propStatus.codeValue
|
|
154
|
+
: field.fieldSchema.default;
|
|
155
|
+
if (typeof currentPlaybackRate !== 'number' ||
|
|
156
|
+
!Number.isFinite(currentPlaybackRate) ||
|
|
157
|
+
currentPlaybackRate <= 0) {
|
|
158
|
+
return null;
|
|
159
|
+
}
|
|
160
|
+
const currentDuration = durationPropStatus.codeValue;
|
|
161
|
+
let baseline = playbackRateBaseline.current;
|
|
162
|
+
// Keep the first duration and rate across successive rate edits. A change
|
|
163
|
+
// to either prop outside this control starts a new baseline.
|
|
164
|
+
if (baseline === null ||
|
|
165
|
+
!((currentDuration === baseline.durationInFrames &&
|
|
166
|
+
currentPlaybackRate === baseline.playbackRate) ||
|
|
167
|
+
(currentDuration === baseline.lastSavedDurationInFrames &&
|
|
168
|
+
currentPlaybackRate === baseline.lastSavedPlaybackRate))) {
|
|
169
|
+
baseline = {
|
|
170
|
+
durationInFrames: currentDuration,
|
|
171
|
+
playbackRate: currentPlaybackRate,
|
|
172
|
+
lastSavedDurationInFrames: currentDuration,
|
|
173
|
+
lastSavedPlaybackRate: currentPlaybackRate,
|
|
174
|
+
};
|
|
175
|
+
playbackRateBaseline.current = baseline;
|
|
176
|
+
}
|
|
177
|
+
return getPlaybackRateAdjustedDuration({
|
|
178
|
+
durationInFrames: baseline.durationInFrames,
|
|
179
|
+
previousPlaybackRate: baseline.playbackRate,
|
|
180
|
+
playbackRate,
|
|
181
|
+
});
|
|
182
|
+
}, [
|
|
183
|
+
durationPropStatus,
|
|
184
|
+
field.fieldSchema.default,
|
|
185
|
+
field.key,
|
|
186
|
+
propStatus.codeValue,
|
|
187
|
+
schema.durationInFrames,
|
|
188
|
+
]);
|
|
91
189
|
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
92
|
-
const { setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
190
|
+
const { setDragOverrides, clearDragOverrides, setEffectDragOverrides, clearEffectDragOverrides, } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
93
191
|
const dragOverrideValue = (0, react_1.useMemo)(() => {
|
|
94
192
|
var _a;
|
|
95
193
|
return nodePath === null
|
|
@@ -119,6 +217,8 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
119
217
|
: null;
|
|
120
218
|
const stringifiedValue = JSON.stringify(value);
|
|
121
219
|
const fieldLabel = (_a = field.description) !== null && _a !== void 0 ? _a : field.key;
|
|
220
|
+
const adjustedDuration = getAdjustedDuration(value);
|
|
221
|
+
const keyframeChanges = getPlaybackRateChanges(value);
|
|
122
222
|
if (value === propStatus.codeValue) {
|
|
123
223
|
return Promise.resolve();
|
|
124
224
|
}
|
|
@@ -126,9 +226,19 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
126
226
|
propStatus.codeValue === undefined) {
|
|
127
227
|
return Promise.resolve();
|
|
128
228
|
}
|
|
129
|
-
|
|
229
|
+
if (adjustedDuration !== null && playbackRateBaseline.current) {
|
|
230
|
+
playbackRateBaseline.current.lastSavedDurationInFrames =
|
|
231
|
+
adjustedDuration;
|
|
232
|
+
playbackRateBaseline.current.lastSavedPlaybackRate = value;
|
|
233
|
+
}
|
|
234
|
+
return (0, react_dom_1.unstable_batchedUpdates)(() => (0, save_sequence_prop_1.saveSequenceProps)({
|
|
130
235
|
addedKeyframes: null,
|
|
131
|
-
movedKeyframes:
|
|
236
|
+
movedKeyframes: keyframeChanges
|
|
237
|
+
? {
|
|
238
|
+
sequenceKeyframes: keyframeChanges.sequenceKeyframes,
|
|
239
|
+
effectKeyframes: keyframeChanges.effectKeyframes,
|
|
240
|
+
}
|
|
241
|
+
: null,
|
|
132
242
|
changes: [
|
|
133
243
|
{
|
|
134
244
|
fileName: validatedLocation.source,
|
|
@@ -139,12 +249,24 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
139
249
|
schema,
|
|
140
250
|
sourceEdit: options === null || options === void 0 ? void 0 : options.sourceEdit,
|
|
141
251
|
},
|
|
252
|
+
...(adjustedDuration === null
|
|
253
|
+
? []
|
|
254
|
+
: [
|
|
255
|
+
{
|
|
256
|
+
fileName: validatedLocation.source,
|
|
257
|
+
nodePath,
|
|
258
|
+
fieldKey: 'durationInFrames',
|
|
259
|
+
value: adjustedDuration,
|
|
260
|
+
defaultValue: null,
|
|
261
|
+
schema,
|
|
262
|
+
},
|
|
263
|
+
]),
|
|
142
264
|
],
|
|
143
265
|
setPropStatuses,
|
|
144
266
|
clientId,
|
|
145
267
|
undoLabel: `Update ${fieldLabel}`,
|
|
146
268
|
redoLabel: `Update ${fieldLabel} again`,
|
|
147
|
-
});
|
|
269
|
+
}));
|
|
148
270
|
}, [
|
|
149
271
|
propStatus,
|
|
150
272
|
clientId,
|
|
@@ -152,6 +274,8 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
152
274
|
field.fieldSchema.default,
|
|
153
275
|
field.fieldSchema.type,
|
|
154
276
|
field.key,
|
|
277
|
+
getAdjustedDuration,
|
|
278
|
+
getPlaybackRateChanges,
|
|
155
279
|
nodePath,
|
|
156
280
|
schema,
|
|
157
281
|
setPropStatuses,
|
|
@@ -161,27 +285,79 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
161
285
|
if (nodePath === null) {
|
|
162
286
|
throw new Error('Cannot drag value');
|
|
163
287
|
}
|
|
164
|
-
|
|
165
|
-
|
|
288
|
+
const adjustedDuration = getAdjustedDuration(value);
|
|
289
|
+
const keyframeChanges = getPlaybackRateChanges(value);
|
|
290
|
+
(0, react_dom_1.unstable_batchedUpdates)(() => {
|
|
291
|
+
var _a;
|
|
292
|
+
for (const preview of previewedKeyframes.current) {
|
|
293
|
+
if (preview.effectIndex === null) {
|
|
294
|
+
clearDragOverrides(preview.nodePath);
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
clearEffectDragOverrides(preview.nodePath, preview.effectIndex);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
previewedKeyframes.current = (_a = keyframeChanges === null || keyframeChanges === void 0 ? void 0 : keyframeChanges.previews) !== null && _a !== void 0 ? _a : [];
|
|
301
|
+
setDragOverrides(nodePath, field.key, remotion_1.Internals.makeStaticDragOverride(value));
|
|
302
|
+
if (adjustedDuration !== null) {
|
|
303
|
+
setDragOverrides(nodePath, 'durationInFrames', remotion_1.Internals.makeStaticDragOverride(adjustedDuration));
|
|
304
|
+
}
|
|
305
|
+
for (const preview of previewedKeyframes.current) {
|
|
306
|
+
if (preview.effectIndex === null) {
|
|
307
|
+
setDragOverrides(preview.nodePath, preview.fieldKey, {
|
|
308
|
+
type: 'keyframed',
|
|
309
|
+
status: preview.status,
|
|
310
|
+
});
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
setEffectDragOverrides(preview.nodePath, preview.effectIndex, preview.fieldKey, { type: 'keyframed', status: preview.status });
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
});
|
|
317
|
+
}, [
|
|
318
|
+
clearDragOverrides,
|
|
319
|
+
clearEffectDragOverrides,
|
|
320
|
+
setDragOverrides,
|
|
321
|
+
setEffectDragOverrides,
|
|
322
|
+
nodePath,
|
|
323
|
+
field.key,
|
|
324
|
+
getAdjustedDuration,
|
|
325
|
+
getPlaybackRateChanges,
|
|
326
|
+
]);
|
|
166
327
|
const onDragEnd = (0, react_1.useCallback)(() => {
|
|
167
328
|
if (nodePath === null) {
|
|
168
329
|
throw new Error('Cannot clear drag value');
|
|
169
330
|
}
|
|
170
331
|
clearDragOverrides(nodePath);
|
|
171
|
-
|
|
332
|
+
for (const preview of previewedKeyframes.current) {
|
|
333
|
+
if (preview.effectIndex === null) {
|
|
334
|
+
clearDragOverrides(preview.nodePath);
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
clearEffectDragOverrides(preview.nodePath, preview.effectIndex);
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
previewedKeyframes.current = [];
|
|
341
|
+
}, [clearDragOverrides, clearEffectDragOverrides, nodePath]);
|
|
172
342
|
return (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: propStatus, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, effectiveValue: effectiveValue, scaleLockNodePath: nodePath }));
|
|
173
343
|
};
|
|
174
344
|
const TimelineSequenceKeyframedValueAtSourceFrame = ({ field, nodePath, propStatus, sourceFrame, dragOverrideValue, onSave, onDragValueChangeAtFrame, onDragEnd, }) => {
|
|
175
345
|
const onDragValueChange = (0, react_1.useCallback)((value) => onDragValueChangeAtFrame(value, sourceFrame), [onDragValueChangeAtFrame, sourceFrame]);
|
|
176
346
|
return (jsx_runtime_1.jsx(TimelineKeyframedValue_1.TimelineKeyframedValue, { field: field, propStatus: propStatus, sourceFrame: sourceFrame, dragOverrideValue: dragOverrideValue, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, scaleLockNodePath: nodePath }));
|
|
177
347
|
};
|
|
178
|
-
const TimelineSequenceKeyframedValueAtCurrentFrame = ({ keyframeDisplayOffset, ...props }) => {
|
|
348
|
+
const TimelineSequenceKeyframedValueAtCurrentFrame = ({ keyframeDisplayOffset, keyframePlaybackRate, ...props }) => {
|
|
179
349
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
180
350
|
const resolvedKeyframeDisplayOffset = (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
181
351
|
propStatus: props.propStatus,
|
|
182
352
|
keyframeDisplayOffset,
|
|
353
|
+
keyframePlaybackRate,
|
|
183
354
|
});
|
|
184
|
-
return (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...props, sourceFrame:
|
|
355
|
+
return (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...props, sourceFrame: (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
356
|
+
displayFrame: timelinePosition,
|
|
357
|
+
keyframeDisplayOffset: resolvedKeyframeDisplayOffset,
|
|
358
|
+
keyframePlaybackRate,
|
|
359
|
+
propStatus: props.propStatus,
|
|
360
|
+
}) }));
|
|
185
361
|
};
|
|
186
362
|
const TimelineSequenceKeyframedValueUnmemoized = (props) => {
|
|
187
363
|
const { field, fileName, nodePath, schema, propStatus } = props;
|
|
@@ -235,17 +411,21 @@ const TimelineSequenceKeyframedValueUnmemoized = (props) => {
|
|
|
235
411
|
onDragValueChangeAtFrame: onKeyframedDragValueChangeAtFrame,
|
|
236
412
|
onDragEnd: onKeyframedDragEnd,
|
|
237
413
|
};
|
|
238
|
-
return props.sourceFrame !== undefined ? (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...valueProps, sourceFrame: props.sourceFrame })) : (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtCurrentFrame, { ...valueProps, keyframeDisplayOffset: props.keyframeDisplayOffset }));
|
|
414
|
+
return props.sourceFrame !== undefined ? (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...valueProps, sourceFrame: props.sourceFrame })) : (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtCurrentFrame, { ...valueProps, keyframeDisplayOffset: props.keyframeDisplayOffset, keyframePlaybackRate: props.keyframePlaybackRate }));
|
|
239
415
|
};
|
|
240
416
|
exports.TimelineSequenceKeyframedValue = react_1.default.memo(TimelineSequenceKeyframedValueUnmemoized);
|
|
241
|
-
const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, schema, keyframeDisplayOffset, keyframeControlsMode, runtimeValue, }) => {
|
|
242
|
-
var _a;
|
|
417
|
+
const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, schema, keyframeDisplayOffset, keyframePlaybackRate, keyframeControlsMode, runtimeValue, }) => {
|
|
418
|
+
var _a, _b;
|
|
243
419
|
const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
420
|
+
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
421
|
+
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
422
|
+
const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
|
|
244
423
|
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
245
424
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
246
425
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
247
426
|
const { canOpenInEditor, defaultEditorId } = (0, use_default_editor_info_1.useEditorOpening)(previewServerState.type === 'connected');
|
|
248
427
|
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
428
|
+
const containsSelection = (0, TimelineSelection_1.useTimelineRowContainsSelection)(nodePathInfo);
|
|
249
429
|
const transform3DMode = (0, react_1.useContext)(Transform3DModeContext_1.Transform3DModeContext);
|
|
250
430
|
const propStatusesForOverride = remotion_1.Internals.getPropStatusesCtx(visualModePropStatuses, nodePath);
|
|
251
431
|
const propStatus = (_a = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride[field.key]) !== null && _a !== void 0 ? _a : null;
|
|
@@ -264,7 +444,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
264
444
|
propStatus,
|
|
265
445
|
selected: selection.selected,
|
|
266
446
|
keyframable,
|
|
267
|
-
})) ? (jsx_runtime_1.jsx(TimelineKeyframeControls_1.TimelineKeyframeControls, { fieldKey: field.key, propStatus: propStatus, nodePath: nodePath, fileName: validatedLocation.source, keyframeDisplayOffset: keyframeDisplayOffset, defaultValue: field.fieldSchema.default, dragOverrideValue: dragOverrideValue, schema: schema, effectIndex: null, nodePathInfo: nodePathInfo, mode: keyframeControlsMode })) : null;
|
|
447
|
+
})) ? (jsx_runtime_1.jsx(TimelineKeyframeControls_1.TimelineKeyframeControls, { fieldKey: field.key, propStatus: propStatus, nodePath: nodePath, fileName: validatedLocation.source, keyframeDisplayOffset: keyframeDisplayOffset, keyframePlaybackRate: keyframePlaybackRate, defaultValue: field.fieldSchema.default, dragOverrideValue: dragOverrideValue, schema: schema, effectIndex: null, nodePathInfo: nodePathInfo, mode: keyframeControlsMode })) : null;
|
|
268
448
|
const style = (0, react_1.useMemo)(() => {
|
|
269
449
|
return (0, timeline_field_row_layout_1.isTimelineFieldStacked)({ field, transform3DMode })
|
|
270
450
|
? fieldRowBase
|
|
@@ -295,17 +475,70 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
295
475
|
? JSON.stringify(field.fieldSchema.default)
|
|
296
476
|
: null;
|
|
297
477
|
const fieldLabel = (_a = field.description) !== null && _a !== void 0 ? _a : field.key;
|
|
478
|
+
const previousPlaybackRate = field.key === 'playbackRate' &&
|
|
479
|
+
propStatus.status === 'static' &&
|
|
480
|
+
typeof propStatus.codeValue === 'number'
|
|
481
|
+
? propStatus.codeValue
|
|
482
|
+
: null;
|
|
483
|
+
const nextPlaybackRate = field.fieldSchema.default;
|
|
484
|
+
const canRetime = previousPlaybackRate !== null &&
|
|
485
|
+
Number.isFinite(previousPlaybackRate) &&
|
|
486
|
+
previousPlaybackRate > 0 &&
|
|
487
|
+
typeof nextPlaybackRate === 'number' &&
|
|
488
|
+
Number.isFinite(nextPlaybackRate) &&
|
|
489
|
+
nextPlaybackRate > 0;
|
|
490
|
+
const keyframeChanges = canRetime
|
|
491
|
+
? (0, get_playback_rate_keyframe_changes_1.getPlaybackRateKeyframeChanges)({
|
|
492
|
+
nodePath,
|
|
493
|
+
sequences: sequencesRef.current,
|
|
494
|
+
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
495
|
+
propStatuses: propStatusesRef.current,
|
|
496
|
+
previousPlaybackRate,
|
|
497
|
+
playbackRate: nextPlaybackRate,
|
|
498
|
+
})
|
|
499
|
+
: null;
|
|
500
|
+
const durationStatus = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.durationInFrames;
|
|
501
|
+
const adjustedDuration = canRetime &&
|
|
502
|
+
schema.durationInFrames &&
|
|
503
|
+
(durationStatus === null || durationStatus === void 0 ? void 0 : durationStatus.status) === 'static' &&
|
|
504
|
+
typeof durationStatus.codeValue === 'number' &&
|
|
505
|
+
Number.isFinite(durationStatus.codeValue)
|
|
506
|
+
? getPlaybackRateAdjustedDuration({
|
|
507
|
+
durationInFrames: durationStatus.codeValue,
|
|
508
|
+
previousPlaybackRate,
|
|
509
|
+
playbackRate: nextPlaybackRate,
|
|
510
|
+
})
|
|
511
|
+
: null;
|
|
298
512
|
(0, save_sequence_prop_1.saveSequenceProps)({
|
|
299
513
|
addedKeyframes: null,
|
|
300
|
-
movedKeyframes:
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
514
|
+
movedKeyframes: keyframeChanges
|
|
515
|
+
? {
|
|
516
|
+
sequenceKeyframes: keyframeChanges.sequenceKeyframes,
|
|
517
|
+
effectKeyframes: keyframeChanges.effectKeyframes,
|
|
518
|
+
}
|
|
519
|
+
: null,
|
|
520
|
+
changes: [
|
|
521
|
+
...(0, get_sequence_prop_reset_changes_1.getSequencePropResetChanges)({
|
|
522
|
+
fileName: validatedLocation.source,
|
|
523
|
+
nodePath,
|
|
524
|
+
fieldKey: field.key,
|
|
525
|
+
value: field.fieldSchema.default,
|
|
526
|
+
defaultValue,
|
|
527
|
+
schema,
|
|
528
|
+
}),
|
|
529
|
+
...(adjustedDuration !== null
|
|
530
|
+
? [
|
|
531
|
+
{
|
|
532
|
+
fileName: validatedLocation.source,
|
|
533
|
+
nodePath,
|
|
534
|
+
fieldKey: 'durationInFrames',
|
|
535
|
+
value: adjustedDuration,
|
|
536
|
+
defaultValue: null,
|
|
537
|
+
schema,
|
|
538
|
+
},
|
|
539
|
+
]
|
|
540
|
+
: []),
|
|
541
|
+
],
|
|
309
542
|
setPropStatuses,
|
|
310
543
|
clientId: previewServerState.clientId,
|
|
311
544
|
undoLabel: `Reset ${fieldLabel}`,
|
|
@@ -318,8 +551,12 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
318
551
|
field.fieldSchema.default,
|
|
319
552
|
field.key,
|
|
320
553
|
nodePath,
|
|
554
|
+
overrideIdToNodePathMappings,
|
|
321
555
|
previewServerState,
|
|
556
|
+
propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.durationInFrames,
|
|
557
|
+
propStatusesRef,
|
|
322
558
|
schema,
|
|
559
|
+
sequencesRef,
|
|
323
560
|
setPropStatuses,
|
|
324
561
|
validatedLocation.source,
|
|
325
562
|
propStatus,
|
|
@@ -369,7 +606,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
369
606
|
if (propStatus === null) {
|
|
370
607
|
return null;
|
|
371
608
|
}
|
|
372
|
-
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, field: field, runtimeValue: runtimeValue, validatedLocation: validatedLocation }));
|
|
609
|
+
const fieldValue = isKeyframedStatus(propStatus) ? (jsx_runtime_1.jsx(exports.TimelineSequenceKeyframedValue, { field: field, fileName: validatedLocation.source, nodePath: nodePath, schema: schema, propStatus: propStatus, keyframeDisplayOffset: keyframeDisplayOffset, keyframePlaybackRate: keyframePlaybackRate })) : propStatus.status === 'static' ? (jsx_runtime_1.jsx(Value, { field: field, durationPropStatus: (_b = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.durationInFrames) !== null && _b !== void 0 ? _b : null, nodePath: nodePath, validatedLocation: validatedLocation, schema: schema, propStatus: propStatus })) : (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineNonEditableStatus, { propStatus: propStatus, field: field, runtimeValue: runtimeValue, validatedLocation: validatedLocation }));
|
|
373
610
|
if (field.typeName === 'asset' && field.key === 'src') {
|
|
374
611
|
return (jsx_runtime_1.jsx("div", { style: {
|
|
375
612
|
...inlineSourceFieldRow,
|
|
@@ -377,7 +614,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
377
614
|
...style,
|
|
378
615
|
}, children: fieldValue }));
|
|
379
616
|
}
|
|
380
|
-
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, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection:
|
|
617
|
+
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, onSelect: selection.onSelect, onDoubleClick: onPropertyDoubleClick, showSelectedBackground: true, containsSelection: containsSelection, outerHeight: null, children: jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected || containsSelection, children: fieldValue }) }));
|
|
381
618
|
return jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: row });
|
|
382
619
|
};
|
|
383
620
|
exports.TimelineSequencePropItem = TimelineSequencePropItem;
|