@remotion/studio 4.0.527 → 4.0.529
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/Studio.js +2 -0
- package/dist/components/AgentPrompt.js +3 -4
- package/dist/components/AppLaunchButton.d.ts +0 -1
- package/dist/components/AppLaunchButton.js +2 -5
- package/dist/components/AssetAudioVolume.js +2 -2
- package/dist/components/AssetSelectorItem.js +5 -5
- package/dist/components/AudioWaveform.d.ts +1 -0
- package/dist/components/AudioWaveform.js +10 -14
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Button.js +2 -2
- package/dist/components/CaptionInspector.js +1 -1
- package/dist/components/CaptionTextEditor.js +1 -1
- package/dist/components/CheckboardToggle.js +1 -1
- package/dist/components/CodeFrame.js +1 -1
- package/dist/components/CodingAgentButton.js +1 -1
- package/dist/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/dist/components/ColorPicker/ColorPicker.js +2 -2
- package/dist/components/ColorPicker/ColorPickerPopup.js +1 -1
- package/dist/components/ColorPicker/checker.d.ts +1 -1
- package/dist/components/CompactExplanation.js +3 -3
- package/dist/components/CompositionSelectorItem.js +2 -2
- package/dist/components/ConfigSelect.js +1 -1
- package/dist/components/ConfigureDefaultEditorModal.js +2 -2
- package/dist/components/ControlButton.d.ts +0 -1
- package/dist/components/ControlButton.js +2 -2
- package/dist/components/CurrentAsset.js +4 -3
- 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/ElementLibraryModal.js +1 -1
- package/dist/components/FramePersistor.js +3 -3
- package/dist/components/FullscreenToggle.js +1 -1
- package/dist/components/InitialCompositionLoader.js +5 -3
- package/dist/components/InlineAction.d.ts +2 -2
- package/dist/components/InlineAction.js +2 -3
- package/dist/components/InlineEditableTitle.d.ts +1 -1
- package/dist/components/InlineEditableTitle.js +3 -3
- package/dist/components/InspectorLocationCopy.js +1 -1
- package/dist/components/InspectorOpenInEditor.js +14 -3
- package/dist/components/InspectorPanel/AlignmentControls.js +31 -12
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +1 -1
- package/dist/components/InspectorPanel/CompositionInspector.js +1 -5
- package/dist/components/InspectorPanel/CompositionMetadata.js +4 -4
- package/dist/components/InspectorPanel/EasingInspector.js +7 -3
- package/dist/components/InspectorPanel/ElementLibraryButton.js +3 -14
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +6 -8
- package/dist/components/InspectorPanel/KeyframeInspector.js +29 -25
- package/dist/components/InspectorPanel/KeyframeSettings.js +16 -11
- package/dist/components/InspectorPanel/MultiSequenceField.js +1 -1
- package/dist/components/InspectorPanel/MultiSequenceInspector.js +2 -7
- package/dist/components/InspectorPanel/MultiSequenceNumberField.js +2 -2
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.js +1 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +33 -14
- package/dist/components/InspectorPanel/SequenceWrapAction.d.ts +8 -0
- package/dist/components/InspectorPanel/SequenceWrapAction.js +143 -0
- package/dist/components/InspectorPanel/common.d.ts +6 -2
- package/dist/components/InspectorPanel/common.js +25 -9
- 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/InspectorSequenceSection.d.ts +1 -0
- package/dist/components/InspectorSequenceSection.js +12 -10
- package/dist/components/InspectorSourceLocation.js +2 -2
- package/dist/components/KeyboardShortcutsSettings.js +2 -2
- package/dist/components/LicenseKeyValidation.js +2 -2
- package/dist/components/LoopToggle.js +1 -1
- package/dist/components/Menu/MenuSubItem.js +4 -2
- package/dist/components/Menu/styles.d.ts +2 -2
- package/dist/components/MenuBuildIndicator.js +1 -1
- package/dist/components/MenuCompositionName.js +1 -1
- package/dist/components/Modals.js +7 -6
- package/dist/components/ModelManager.js +10 -9
- package/dist/components/MuteToggle.js +1 -1
- package/dist/components/NewComposition/CancelButton.js +10 -4
- package/dist/components/NewComposition/ComboBox.d.ts +1 -1
- package/dist/components/NewComposition/ComboBox.js +2 -2
- package/dist/components/NewComposition/DuplicateComposition.js +1 -1
- package/dist/components/NewComposition/InputDragger.d.ts +4 -2
- package/dist/components/NewComposition/InputDragger.js +29 -10
- package/dist/components/NewComposition/NewComposition.js +8 -7
- package/dist/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/components/NewComposition/menu-typeahead.js +1 -1
- package/dist/components/OpenIssueButton.js +1 -1
- package/dist/components/OutlineToggle.js +1 -1
- package/dist/components/PlayPause.js +1 -1
- package/dist/components/PlaybackRateSelector.js +1 -1
- package/dist/components/PreviewToolbarOverflowButton.js +1 -1
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -1
- package/dist/components/RenderButton.js +2 -4
- package/dist/components/RenderModal/InfoBubble.d.ts +1 -1
- package/dist/components/RenderModal/InfoBubble.js +2 -2
- package/dist/components/RenderModal/NumberSetting.js +1 -1
- package/dist/components/RenderModal/OptionExplainerBubble.js +2 -2
- package/dist/components/RenderModal/RenderModalAdvanced.js +2 -2
- package/dist/components/RenderModal/RenderModalAudio.js +2 -2
- package/dist/components/RenderModal/RenderModalBasic.js +3 -3
- package/dist/components/RenderModal/RenderModalEncoding.js +4 -4
- package/dist/components/RenderModal/RenderModalOutputName.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/SchemaLabel.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodDiscriminatedUnionEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodEnumEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodFieldValidation.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/ZodStaticFileEditor.js +1 -1
- package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +1 -2
- package/dist/components/RenderModal/WebRenderModalAdvanced.js +2 -2
- package/dist/components/RenderModal/WebRenderModalAudio.js +2 -2
- package/dist/components/RenderModal/WebRenderModalBasic.js +3 -3
- package/dist/components/RenderModal/WebRenderModalPicture.js +2 -3
- package/dist/components/RenderQueue/CaptionQueueItem.js +14 -5
- package/dist/components/RenderQueue/CaptionQueueProcessor.js +30 -7
- 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/RenderQueueError.js +1 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.d.ts +3 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +11 -4
- package/dist/components/RenderQueue/RenderQueueOutputName.js +1 -1
- package/dist/components/RenderQueue/RenderQueueProgressMessage.js +1 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.d.ts +3 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +20 -3
- package/dist/components/RenderQueue/VideoMattingQueueItem.js +24 -27
- package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +68 -28
- package/dist/components/RenderQueue/caption-job-types.d.ts +3 -1
- package/dist/components/RenderQueue/context.d.ts +4 -0
- package/dist/components/RenderQueue/context.js +58 -8
- package/dist/components/RenderQueue/index.js +2 -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/RenderingSettings.js +6 -6
- package/dist/components/RulersAndGuidesToggle.js +1 -1
- package/dist/components/SegmentedButton.d.ts +0 -2
- package/dist/components/SegmentedButton.js +6 -6
- 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 +165 -106
- package/dist/components/SelectedOutlinePathPoints.d.ts +8 -0
- package/dist/components/SelectedOutlinePathPoints.js +457 -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/SelectedOutlineTransformOriginHandle.js +3 -2
- package/dist/components/SelectedOutlineUvControls.js +12 -7
- package/dist/components/SettingsButton.js +1 -1
- 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/SizeSelector.js +1 -1
- package/dist/components/SkillsSettings.d.ts +0 -1
- package/dist/components/SkillsSettings.js +14 -15
- package/dist/components/SnappingToggle.js +1 -1
- package/dist/components/Splitter/SplitterElement.js +1 -2
- package/dist/components/StudioSettings.js +2 -2
- package/dist/components/TimeValue.js +2 -4
- package/dist/components/Timeline/EasingEditorModal.js +3 -3
- package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +1 -0
- package/dist/components/Timeline/LoopedTimelineIndicators.js +7 -6
- package/dist/components/Timeline/TimelineArrayField.js +3 -3
- package/dist/components/Timeline/TimelineAssetField.js +3 -3
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +0 -1
- package/dist/components/Timeline/TimelineColorField.js +3 -3
- package/dist/components/Timeline/TimelineDragHandler.js +3 -3
- package/dist/components/Timeline/TimelineDuplicateCount.js +1 -1
- package/dist/components/Timeline/TimelineEffectItem.js +1 -1
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +12 -5
- package/dist/components/Timeline/TimelineEnumField.js +1 -1
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedRow.js +5 -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 -1
- package/dist/components/Timeline/TimelineFontFamilyField.js +14 -14
- package/dist/components/Timeline/TimelineFontWeightField.js +1 -1
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -0
- package/dist/components/Timeline/TimelineKeyframeControls.js +42 -31
- package/dist/components/Timeline/TimelineKeyframeDiamond.js +1 -1
- package/dist/components/Timeline/TimelineKeyframeEasingLine.js +1 -1
- package/dist/components/Timeline/TimelineLayerChildren.js +2 -2
- package/dist/components/Timeline/TimelineList.js +16 -8
- package/dist/components/Timeline/TimelineMediaInfo.js +1 -1
- package/dist/components/Timeline/TimelineNumberField.js +2 -4
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
- package/dist/components/Timeline/TimelineScaleField.js +1 -1
- package/dist/components/Timeline/TimelineSchemaField.js +2 -2
- 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 +40 -22
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +52 -24
- package/dist/components/Timeline/TimelineSequenceName.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceName.js +38 -6
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +3 -0
- package/dist/components/Timeline/TimelineSequencePropItem.js +266 -27
- 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/TimelineZoomControls.js +2 -2
- 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 +7 -93
- 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-split-menu-item.js +2 -2
- 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.js +4 -1
- 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-expanded-tree.d.ts +1 -1
- package/dist/components/Timeline/use-timeline-expanded-tree.js +3 -0
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +28 -19
- package/dist/components/TimelineCombobox.d.ts +1 -1
- package/dist/components/TimelineCombobox.js +5 -6
- package/dist/components/TimelineInOutToggle.js +1 -1
- package/dist/components/Transcription/Models.js +1 -1
- package/dist/components/Transcription/TranscriptionModal.js +9 -7
- 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/UndoRedoButtons.js +1 -1
- package/dist/components/UpdatesSettings.js +4 -2
- package/dist/components/VideoMatting/Models.js +1 -1
- package/dist/components/VideoMatting/VideoMattingModal.js +34 -51
- package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +1 -1
- package/dist/components/WebMcp.js +22 -40
- package/dist/components/composition-drop-preview.js +1 -0
- 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 +17 -1
- 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 +20 -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/CompositionIdListItem.js +1 -1
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +46 -3
- package/dist/error-overlay/remotion-overlay/StackFrame.js +32 -3
- package/dist/esm/{CaptionQueueProcessor-npa6szn1.mjs → CaptionQueueProcessor-qj37c6r2.mjs} +63 -17
- package/dist/esm/LazyModels-rjsrgap5.mjs +12 -0
- package/dist/esm/LazyModels-rnbjx98t.mjs +12 -0
- package/dist/esm/{TranscriptionModal-79m5wgcj.mjs → TranscriptionModal-y7zeqj2d.mjs} +21 -21
- package/dist/esm/{VideoMattingModal-31pew0xj.mjs → VideoMattingModal-jzrkhah1.mjs} +51 -69
- 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-e855w59j.mjs → index-19d05w9e.mjs} +3 -5
- package/dist/esm/index-24wge6y5.mjs +102 -0
- package/dist/esm/index-3qb54r5j.mjs +157 -0
- package/dist/esm/{index-n5gmcvhz.mjs → index-5ycb9e9q.mjs} +2 -4
- package/dist/esm/{index-s7qa3xbw.mjs → index-cakcjjy2.mjs} +7 -7
- package/dist/esm/{index-r1gr3j3a.mjs → index-dfy1t576.mjs} +50 -1
- package/dist/esm/{index-614tdz2q.mjs → index-f9hxt5yh.mjs} +3 -3
- package/dist/esm/{index-9x6e1dq0.mjs → index-hqxc6tzp.mjs} +40 -6
- package/dist/esm/{index-ac5550e7.mjs → index-jc22b2wb.mjs} +3 -3
- package/dist/esm/{index-5t2dwxsk.mjs → index-m01zjph7.mjs} +261 -25
- package/dist/esm/{index-ppspzgn9.mjs → index-m2a95v3p.mjs} +4904 -4951
- package/dist/esm/{index-9xxg6218.mjs → index-qve7mdfp.mjs} +19 -1
- package/dist/esm/{index-vxwg66ar.mjs → index-r9bj4tta.mjs} +47 -60
- package/dist/esm/{index-r0ejh5sy.mjs → index-vnc2wdfd.mjs} +44 -27
- package/dist/esm/{index-21hxsfaa.mjs → index-vtr5qzam.mjs} +6 -25
- package/dist/esm/{index-4zen9prq.mjs → index-x7kg7jqv.mjs} +6809 -5640
- package/dist/esm/index.mjs +4 -5
- package/dist/esm/internals.mjs +13 -13
- package/dist/esm/previewEntry.mjs +18 -15
- package/dist/esm/renderEntry.mjs +5 -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/checkerboard-background.js +1 -1
- package/dist/helpers/colors.d.ts +131 -112
- package/dist/helpers/colors.js +121 -100
- 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 +4 -4
- package/dist/helpers/inject-css.js +5 -7
- 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 +104 -0
- package/dist/helpers/studio-pixel-ratio.d.ts +1 -0
- package/dist/helpers/studio-pixel-ratio.js +7 -0
- 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-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/snowflake.js +1 -3
- package/dist/icons/{scissors.d.ts → split.d.ts} +1 -1
- package/dist/icons/split.js +8 -0
- package/dist/icons/trash.js +2 -2
- 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 +15 -1
- package/dist/state/timeline-sequence-hover.d.ts +6 -16
- package/dist/state/timeline-sequence-hover.js +6 -67
- 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/esm/LazyModels-nh3c8h9p.mjs +0 -12
- package/dist/esm/LazyModels-rr5v8h5y.mjs +0 -12
- 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/scissors.js +0 -8
- package/dist/icons/separation.js +0 -7
- /package/dist/esm/{resolve-composition-component-location-qrp05g62.mjs → resolve-composition-component-location-2hgf6g0a.mjs} +0 -0
|
@@ -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,11 +47,13 @@ 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");
|
|
52
54
|
const timeline_field_row_layout_1 = require("./timeline-field-row-layout");
|
|
53
55
|
const TimelineExpandArrowButton_1 = require("./TimelineExpandArrowButton");
|
|
56
|
+
const TimelineFieldLabel_1 = require("./TimelineFieldLabel");
|
|
54
57
|
const TimelineFieldRowContent_1 = require("./TimelineFieldRowContent");
|
|
55
58
|
const TimelineKeyframeControls_1 = require("./TimelineKeyframeControls");
|
|
56
59
|
const TimelineKeyframedValue_1 = require("./TimelineKeyframedValue");
|
|
@@ -87,9 +90,105 @@ const isResettableStatus = ({ status, defaultValue, }) => {
|
|
|
87
90
|
const effectiveCodeValue = (_a = status.codeValue) !== null && _a !== void 0 ? _a : defaultValue;
|
|
88
91
|
return JSON.stringify(effectiveCodeValue) !== JSON.stringify(defaultValue);
|
|
89
92
|
};
|
|
90
|
-
const
|
|
93
|
+
const getPlaybackRateAdjustedDuration = ({ durationInFrames, previousPlaybackRate, playbackRate, }) => {
|
|
94
|
+
const adjustedDuration = (durationInFrames * previousPlaybackRate) / playbackRate;
|
|
95
|
+
if (!Number.isFinite(adjustedDuration) || adjustedDuration <= 0) {
|
|
96
|
+
return null;
|
|
97
|
+
}
|
|
98
|
+
const nearestInteger = Math.round(adjustedDuration);
|
|
99
|
+
return nearestInteger > 0 &&
|
|
100
|
+
Math.abs(adjustedDuration - nearestInteger) <=
|
|
101
|
+
Number.EPSILON * Math.max(1, Math.abs(adjustedDuration)) * 2
|
|
102
|
+
? nearestInteger
|
|
103
|
+
: adjustedDuration;
|
|
104
|
+
};
|
|
105
|
+
const Value = ({ field, nodePath, validatedLocation, schema, propStatus, durationPropStatus, }) => {
|
|
106
|
+
const playbackRateBaseline = (0, react_1.useRef)(null);
|
|
107
|
+
const previewedKeyframes = (0, react_1.useRef)([]);
|
|
108
|
+
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
109
|
+
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
110
|
+
const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
|
|
111
|
+
const getPlaybackRateChanges = (0, react_1.useCallback)((value) => {
|
|
112
|
+
var _a;
|
|
113
|
+
if (field.key !== 'playbackRate' ||
|
|
114
|
+
nodePath === null ||
|
|
115
|
+
typeof value !== 'number') {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
const currentStatus = (_a = remotion_1.Internals.getPropStatusesCtx(propStatusesRef.current, nodePath)) === null || _a === void 0 ? void 0 : _a.playbackRate;
|
|
119
|
+
const previousPlaybackRate = (currentStatus === null || currentStatus === void 0 ? void 0 : currentStatus.status) === 'static' &&
|
|
120
|
+
typeof currentStatus.codeValue === 'number'
|
|
121
|
+
? currentStatus.codeValue
|
|
122
|
+
: field.fieldSchema.default;
|
|
123
|
+
if (typeof previousPlaybackRate !== 'number') {
|
|
124
|
+
return null;
|
|
125
|
+
}
|
|
126
|
+
return (0, get_playback_rate_keyframe_changes_1.getPlaybackRateKeyframeChanges)({
|
|
127
|
+
nodePath,
|
|
128
|
+
sequences: sequencesRef.current,
|
|
129
|
+
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
130
|
+
propStatuses: propStatusesRef.current,
|
|
131
|
+
previousPlaybackRate,
|
|
132
|
+
playbackRate: value,
|
|
133
|
+
});
|
|
134
|
+
}, [
|
|
135
|
+
field.fieldSchema.default,
|
|
136
|
+
field.key,
|
|
137
|
+
nodePath,
|
|
138
|
+
overrideIdToNodePathMappings,
|
|
139
|
+
propStatusesRef,
|
|
140
|
+
sequencesRef,
|
|
141
|
+
]);
|
|
142
|
+
const getAdjustedDuration = (0, react_1.useCallback)((playbackRate) => {
|
|
143
|
+
if (field.key !== 'playbackRate' ||
|
|
144
|
+
!schema.durationInFrames ||
|
|
145
|
+
(durationPropStatus === null || durationPropStatus === void 0 ? void 0 : durationPropStatus.status) !== 'static' ||
|
|
146
|
+
typeof durationPropStatus.codeValue !== 'number' ||
|
|
147
|
+
!Number.isFinite(durationPropStatus.codeValue) ||
|
|
148
|
+
typeof playbackRate !== 'number' ||
|
|
149
|
+
!Number.isFinite(playbackRate) ||
|
|
150
|
+
playbackRate <= 0) {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
const currentPlaybackRate = typeof propStatus.codeValue === 'number'
|
|
154
|
+
? propStatus.codeValue
|
|
155
|
+
: field.fieldSchema.default;
|
|
156
|
+
if (typeof currentPlaybackRate !== 'number' ||
|
|
157
|
+
!Number.isFinite(currentPlaybackRate) ||
|
|
158
|
+
currentPlaybackRate <= 0) {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
const currentDuration = durationPropStatus.codeValue;
|
|
162
|
+
let baseline = playbackRateBaseline.current;
|
|
163
|
+
// Keep the first duration and rate across successive rate edits. A change
|
|
164
|
+
// to either prop outside this control starts a new baseline.
|
|
165
|
+
if (baseline === null ||
|
|
166
|
+
!((currentDuration === baseline.durationInFrames &&
|
|
167
|
+
currentPlaybackRate === baseline.playbackRate) ||
|
|
168
|
+
(currentDuration === baseline.lastSavedDurationInFrames &&
|
|
169
|
+
currentPlaybackRate === baseline.lastSavedPlaybackRate))) {
|
|
170
|
+
baseline = {
|
|
171
|
+
durationInFrames: currentDuration,
|
|
172
|
+
playbackRate: currentPlaybackRate,
|
|
173
|
+
lastSavedDurationInFrames: currentDuration,
|
|
174
|
+
lastSavedPlaybackRate: currentPlaybackRate,
|
|
175
|
+
};
|
|
176
|
+
playbackRateBaseline.current = baseline;
|
|
177
|
+
}
|
|
178
|
+
return getPlaybackRateAdjustedDuration({
|
|
179
|
+
durationInFrames: baseline.durationInFrames,
|
|
180
|
+
previousPlaybackRate: baseline.playbackRate,
|
|
181
|
+
playbackRate,
|
|
182
|
+
});
|
|
183
|
+
}, [
|
|
184
|
+
durationPropStatus,
|
|
185
|
+
field.fieldSchema.default,
|
|
186
|
+
field.key,
|
|
187
|
+
propStatus.codeValue,
|
|
188
|
+
schema.durationInFrames,
|
|
189
|
+
]);
|
|
91
190
|
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
92
|
-
const { setDragOverrides, clearDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
191
|
+
const { setDragOverrides, clearDragOverrides, setEffectDragOverrides, clearEffectDragOverrides, } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
93
192
|
const dragOverrideValue = (0, react_1.useMemo)(() => {
|
|
94
193
|
var _a;
|
|
95
194
|
return nodePath === null
|
|
@@ -119,6 +218,8 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
119
218
|
: null;
|
|
120
219
|
const stringifiedValue = JSON.stringify(value);
|
|
121
220
|
const fieldLabel = (_a = field.description) !== null && _a !== void 0 ? _a : field.key;
|
|
221
|
+
const adjustedDuration = getAdjustedDuration(value);
|
|
222
|
+
const keyframeChanges = getPlaybackRateChanges(value);
|
|
122
223
|
if (value === propStatus.codeValue) {
|
|
123
224
|
return Promise.resolve();
|
|
124
225
|
}
|
|
@@ -126,9 +227,19 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
126
227
|
propStatus.codeValue === undefined) {
|
|
127
228
|
return Promise.resolve();
|
|
128
229
|
}
|
|
129
|
-
|
|
230
|
+
if (adjustedDuration !== null && playbackRateBaseline.current) {
|
|
231
|
+
playbackRateBaseline.current.lastSavedDurationInFrames =
|
|
232
|
+
adjustedDuration;
|
|
233
|
+
playbackRateBaseline.current.lastSavedPlaybackRate = value;
|
|
234
|
+
}
|
|
235
|
+
return (0, react_dom_1.unstable_batchedUpdates)(() => (0, save_sequence_prop_1.saveSequenceProps)({
|
|
130
236
|
addedKeyframes: null,
|
|
131
|
-
movedKeyframes:
|
|
237
|
+
movedKeyframes: keyframeChanges
|
|
238
|
+
? {
|
|
239
|
+
sequenceKeyframes: keyframeChanges.sequenceKeyframes,
|
|
240
|
+
effectKeyframes: keyframeChanges.effectKeyframes,
|
|
241
|
+
}
|
|
242
|
+
: null,
|
|
132
243
|
changes: [
|
|
133
244
|
{
|
|
134
245
|
fileName: validatedLocation.source,
|
|
@@ -139,12 +250,24 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
139
250
|
schema,
|
|
140
251
|
sourceEdit: options === null || options === void 0 ? void 0 : options.sourceEdit,
|
|
141
252
|
},
|
|
253
|
+
...(adjustedDuration === null
|
|
254
|
+
? []
|
|
255
|
+
: [
|
|
256
|
+
{
|
|
257
|
+
fileName: validatedLocation.source,
|
|
258
|
+
nodePath,
|
|
259
|
+
fieldKey: 'durationInFrames',
|
|
260
|
+
value: adjustedDuration,
|
|
261
|
+
defaultValue: null,
|
|
262
|
+
schema,
|
|
263
|
+
},
|
|
264
|
+
]),
|
|
142
265
|
],
|
|
143
266
|
setPropStatuses,
|
|
144
267
|
clientId,
|
|
145
268
|
undoLabel: `Update ${fieldLabel}`,
|
|
146
269
|
redoLabel: `Update ${fieldLabel} again`,
|
|
147
|
-
});
|
|
270
|
+
}));
|
|
148
271
|
}, [
|
|
149
272
|
propStatus,
|
|
150
273
|
clientId,
|
|
@@ -152,6 +275,8 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
152
275
|
field.fieldSchema.default,
|
|
153
276
|
field.fieldSchema.type,
|
|
154
277
|
field.key,
|
|
278
|
+
getAdjustedDuration,
|
|
279
|
+
getPlaybackRateChanges,
|
|
155
280
|
nodePath,
|
|
156
281
|
schema,
|
|
157
282
|
setPropStatuses,
|
|
@@ -161,27 +286,79 @@ const Value = ({ field, nodePath, validatedLocation, schema, propStatus }) => {
|
|
|
161
286
|
if (nodePath === null) {
|
|
162
287
|
throw new Error('Cannot drag value');
|
|
163
288
|
}
|
|
164
|
-
|
|
165
|
-
|
|
289
|
+
const adjustedDuration = getAdjustedDuration(value);
|
|
290
|
+
const keyframeChanges = getPlaybackRateChanges(value);
|
|
291
|
+
(0, react_dom_1.unstable_batchedUpdates)(() => {
|
|
292
|
+
var _a;
|
|
293
|
+
for (const preview of previewedKeyframes.current) {
|
|
294
|
+
if (preview.effectIndex === null) {
|
|
295
|
+
clearDragOverrides(preview.nodePath);
|
|
296
|
+
}
|
|
297
|
+
else {
|
|
298
|
+
clearEffectDragOverrides(preview.nodePath, preview.effectIndex);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
previewedKeyframes.current = (_a = keyframeChanges === null || keyframeChanges === void 0 ? void 0 : keyframeChanges.previews) !== null && _a !== void 0 ? _a : [];
|
|
302
|
+
setDragOverrides(nodePath, field.key, remotion_1.Internals.makeStaticDragOverride(value));
|
|
303
|
+
if (adjustedDuration !== null) {
|
|
304
|
+
setDragOverrides(nodePath, 'durationInFrames', remotion_1.Internals.makeStaticDragOverride(adjustedDuration));
|
|
305
|
+
}
|
|
306
|
+
for (const preview of previewedKeyframes.current) {
|
|
307
|
+
if (preview.effectIndex === null) {
|
|
308
|
+
setDragOverrides(preview.nodePath, preview.fieldKey, {
|
|
309
|
+
type: 'keyframed',
|
|
310
|
+
status: preview.status,
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
else {
|
|
314
|
+
setEffectDragOverrides(preview.nodePath, preview.effectIndex, preview.fieldKey, { type: 'keyframed', status: preview.status });
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
});
|
|
318
|
+
}, [
|
|
319
|
+
clearDragOverrides,
|
|
320
|
+
clearEffectDragOverrides,
|
|
321
|
+
setDragOverrides,
|
|
322
|
+
setEffectDragOverrides,
|
|
323
|
+
nodePath,
|
|
324
|
+
field.key,
|
|
325
|
+
getAdjustedDuration,
|
|
326
|
+
getPlaybackRateChanges,
|
|
327
|
+
]);
|
|
166
328
|
const onDragEnd = (0, react_1.useCallback)(() => {
|
|
167
329
|
if (nodePath === null) {
|
|
168
330
|
throw new Error('Cannot clear drag value');
|
|
169
331
|
}
|
|
170
332
|
clearDragOverrides(nodePath);
|
|
171
|
-
|
|
333
|
+
for (const preview of previewedKeyframes.current) {
|
|
334
|
+
if (preview.effectIndex === null) {
|
|
335
|
+
clearDragOverrides(preview.nodePath);
|
|
336
|
+
}
|
|
337
|
+
else {
|
|
338
|
+
clearEffectDragOverrides(preview.nodePath, preview.effectIndex);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
previewedKeyframes.current = [];
|
|
342
|
+
}, [clearDragOverrides, clearEffectDragOverrides, nodePath]);
|
|
172
343
|
return (jsx_runtime_1.jsx(TimelineSchemaField_1.TimelineFieldValue, { field: field, propStatus: propStatus, onSave: onSave, onDragValueChange: onDragValueChange, onDragEnd: onDragEnd, effectiveValue: effectiveValue, scaleLockNodePath: nodePath }));
|
|
173
344
|
};
|
|
174
345
|
const TimelineSequenceKeyframedValueAtSourceFrame = ({ field, nodePath, propStatus, sourceFrame, dragOverrideValue, onSave, onDragValueChangeAtFrame, onDragEnd, }) => {
|
|
175
346
|
const onDragValueChange = (0, react_1.useCallback)((value) => onDragValueChangeAtFrame(value, sourceFrame), [onDragValueChangeAtFrame, sourceFrame]);
|
|
176
347
|
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
348
|
};
|
|
178
|
-
const TimelineSequenceKeyframedValueAtCurrentFrame = ({ keyframeDisplayOffset, ...props }) => {
|
|
349
|
+
const TimelineSequenceKeyframedValueAtCurrentFrame = ({ keyframeDisplayOffset, keyframePlaybackRate, ...props }) => {
|
|
179
350
|
const timelinePosition = remotion_1.Internals.Timeline.useTimelinePosition();
|
|
180
351
|
const resolvedKeyframeDisplayOffset = (0, get_timeline_keyframes_1.getKeyframeDisplayOffset)({
|
|
181
352
|
propStatus: props.propStatus,
|
|
182
353
|
keyframeDisplayOffset,
|
|
354
|
+
keyframePlaybackRate,
|
|
183
355
|
});
|
|
184
|
-
return (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...props, sourceFrame:
|
|
356
|
+
return (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...props, sourceFrame: (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
357
|
+
displayFrame: timelinePosition,
|
|
358
|
+
keyframeDisplayOffset: resolvedKeyframeDisplayOffset,
|
|
359
|
+
keyframePlaybackRate,
|
|
360
|
+
propStatus: props.propStatus,
|
|
361
|
+
}) }));
|
|
185
362
|
};
|
|
186
363
|
const TimelineSequenceKeyframedValueUnmemoized = (props) => {
|
|
187
364
|
const { field, fileName, nodePath, schema, propStatus } = props;
|
|
@@ -235,17 +412,21 @@ const TimelineSequenceKeyframedValueUnmemoized = (props) => {
|
|
|
235
412
|
onDragValueChangeAtFrame: onKeyframedDragValueChangeAtFrame,
|
|
236
413
|
onDragEnd: onKeyframedDragEnd,
|
|
237
414
|
};
|
|
238
|
-
return props.sourceFrame !== undefined ? (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtSourceFrame, { ...valueProps, sourceFrame: props.sourceFrame })) : (jsx_runtime_1.jsx(TimelineSequenceKeyframedValueAtCurrentFrame, { ...valueProps, keyframeDisplayOffset: props.keyframeDisplayOffset }));
|
|
415
|
+
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
416
|
};
|
|
240
417
|
exports.TimelineSequenceKeyframedValue = react_1.default.memo(TimelineSequenceKeyframedValueUnmemoized);
|
|
241
|
-
const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, schema, keyframeDisplayOffset, keyframeControlsMode, runtimeValue, }) => {
|
|
242
|
-
var _a;
|
|
418
|
+
const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath, nodePathInfo, schema, keyframeDisplayOffset, keyframePlaybackRate, keyframeControlsMode, runtimeValue, }) => {
|
|
419
|
+
var _a, _b, _c;
|
|
243
420
|
const { propStatuses: visualModePropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesContext);
|
|
421
|
+
const propStatusesRef = (0, react_1.useContext)(remotion_1.Internals.VisualModePropStatusesRefContext);
|
|
422
|
+
const sequencesRef = (0, react_1.useContext)(remotion_1.Internals.SequenceManagerRefContext);
|
|
423
|
+
const { overrideIdToNodePathMappings } = (0, react_1.useContext)(remotion_1.Internals.OverrideIdsToNodePathsGettersContext);
|
|
244
424
|
const { getDragOverrides } = (0, react_1.useContext)(remotion_1.Internals.VisualModeDragOverridesContext);
|
|
245
425
|
const { setPropStatuses } = (0, react_1.useContext)(remotion_1.Internals.VisualModeSettersContext);
|
|
246
426
|
const { previewServerState } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx);
|
|
247
427
|
const { canOpenInEditor, defaultEditorId } = (0, use_default_editor_info_1.useEditorOpening)(previewServerState.type === 'connected');
|
|
248
428
|
const selection = (0, TimelineSelection_1.useTimelineRowSelection)(nodePathInfo);
|
|
429
|
+
const containsSelection = (0, TimelineSelection_1.useTimelineRowContainsSelection)(nodePathInfo);
|
|
249
430
|
const transform3DMode = (0, react_1.useContext)(Transform3DModeContext_1.Transform3DModeContext);
|
|
250
431
|
const propStatusesForOverride = remotion_1.Internals.getPropStatusesCtx(visualModePropStatuses, nodePath);
|
|
251
432
|
const propStatus = (_a = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride[field.key]) !== null && _a !== void 0 ? _a : null;
|
|
@@ -264,12 +445,13 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
264
445
|
propStatus,
|
|
265
446
|
selected: selection.selected,
|
|
266
447
|
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;
|
|
448
|
+
})) ? (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;
|
|
449
|
+
const hidePathValue = keyframeControlsMode === 'timeline' && field.typeName === 'svg-path';
|
|
268
450
|
const style = (0, react_1.useMemo)(() => {
|
|
269
|
-
return (0, timeline_field_row_layout_1.isTimelineFieldStacked)({ field, transform3DMode })
|
|
451
|
+
return !hidePathValue && (0, timeline_field_row_layout_1.isTimelineFieldStacked)({ field, transform3DMode })
|
|
270
452
|
? fieldRowBase
|
|
271
453
|
: { ...fieldRowBase, height: field.rowHeight };
|
|
272
|
-
}, [field, transform3DMode]);
|
|
454
|
+
}, [field, hidePathValue, transform3DMode]);
|
|
273
455
|
const canResetToDefault = (0, react_1.useMemo)(() => {
|
|
274
456
|
if (!propStatus || propStatus.status === 'computed') {
|
|
275
457
|
return false;
|
|
@@ -295,17 +477,70 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
295
477
|
? JSON.stringify(field.fieldSchema.default)
|
|
296
478
|
: null;
|
|
297
479
|
const fieldLabel = (_a = field.description) !== null && _a !== void 0 ? _a : field.key;
|
|
480
|
+
const previousPlaybackRate = field.key === 'playbackRate' &&
|
|
481
|
+
propStatus.status === 'static' &&
|
|
482
|
+
typeof propStatus.codeValue === 'number'
|
|
483
|
+
? propStatus.codeValue
|
|
484
|
+
: null;
|
|
485
|
+
const nextPlaybackRate = field.fieldSchema.default;
|
|
486
|
+
const canRetime = previousPlaybackRate !== null &&
|
|
487
|
+
Number.isFinite(previousPlaybackRate) &&
|
|
488
|
+
previousPlaybackRate > 0 &&
|
|
489
|
+
typeof nextPlaybackRate === 'number' &&
|
|
490
|
+
Number.isFinite(nextPlaybackRate) &&
|
|
491
|
+
nextPlaybackRate > 0;
|
|
492
|
+
const keyframeChanges = canRetime
|
|
493
|
+
? (0, get_playback_rate_keyframe_changes_1.getPlaybackRateKeyframeChanges)({
|
|
494
|
+
nodePath,
|
|
495
|
+
sequences: sequencesRef.current,
|
|
496
|
+
overrideIdsToNodePaths: overrideIdToNodePathMappings,
|
|
497
|
+
propStatuses: propStatusesRef.current,
|
|
498
|
+
previousPlaybackRate,
|
|
499
|
+
playbackRate: nextPlaybackRate,
|
|
500
|
+
})
|
|
501
|
+
: null;
|
|
502
|
+
const durationStatus = propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.durationInFrames;
|
|
503
|
+
const adjustedDuration = canRetime &&
|
|
504
|
+
schema.durationInFrames &&
|
|
505
|
+
(durationStatus === null || durationStatus === void 0 ? void 0 : durationStatus.status) === 'static' &&
|
|
506
|
+
typeof durationStatus.codeValue === 'number' &&
|
|
507
|
+
Number.isFinite(durationStatus.codeValue)
|
|
508
|
+
? getPlaybackRateAdjustedDuration({
|
|
509
|
+
durationInFrames: durationStatus.codeValue,
|
|
510
|
+
previousPlaybackRate,
|
|
511
|
+
playbackRate: nextPlaybackRate,
|
|
512
|
+
})
|
|
513
|
+
: null;
|
|
298
514
|
(0, save_sequence_prop_1.saveSequenceProps)({
|
|
299
515
|
addedKeyframes: null,
|
|
300
|
-
movedKeyframes:
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
516
|
+
movedKeyframes: keyframeChanges
|
|
517
|
+
? {
|
|
518
|
+
sequenceKeyframes: keyframeChanges.sequenceKeyframes,
|
|
519
|
+
effectKeyframes: keyframeChanges.effectKeyframes,
|
|
520
|
+
}
|
|
521
|
+
: null,
|
|
522
|
+
changes: [
|
|
523
|
+
...(0, get_sequence_prop_reset_changes_1.getSequencePropResetChanges)({
|
|
524
|
+
fileName: validatedLocation.source,
|
|
525
|
+
nodePath,
|
|
526
|
+
fieldKey: field.key,
|
|
527
|
+
value: field.fieldSchema.default,
|
|
528
|
+
defaultValue,
|
|
529
|
+
schema,
|
|
530
|
+
}),
|
|
531
|
+
...(adjustedDuration !== null
|
|
532
|
+
? [
|
|
533
|
+
{
|
|
534
|
+
fileName: validatedLocation.source,
|
|
535
|
+
nodePath,
|
|
536
|
+
fieldKey: 'durationInFrames',
|
|
537
|
+
value: adjustedDuration,
|
|
538
|
+
defaultValue: null,
|
|
539
|
+
schema,
|
|
540
|
+
},
|
|
541
|
+
]
|
|
542
|
+
: []),
|
|
543
|
+
],
|
|
309
544
|
setPropStatuses,
|
|
310
545
|
clientId: previewServerState.clientId,
|
|
311
546
|
undoLabel: `Reset ${fieldLabel}`,
|
|
@@ -318,8 +553,12 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
318
553
|
field.fieldSchema.default,
|
|
319
554
|
field.key,
|
|
320
555
|
nodePath,
|
|
556
|
+
overrideIdToNodePathMappings,
|
|
321
557
|
previewServerState,
|
|
558
|
+
propStatusesForOverride === null || propStatusesForOverride === void 0 ? void 0 : propStatusesForOverride.durationInFrames,
|
|
559
|
+
propStatusesRef,
|
|
322
560
|
schema,
|
|
561
|
+
sequencesRef,
|
|
323
562
|
setPropStatuses,
|
|
324
563
|
validatedLocation.source,
|
|
325
564
|
propStatus,
|
|
@@ -369,7 +608,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
369
608
|
if (propStatus === null) {
|
|
370
609
|
return null;
|
|
371
610
|
}
|
|
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 }));
|
|
611
|
+
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
612
|
if (field.typeName === 'asset' && field.key === 'src') {
|
|
374
613
|
return (jsx_runtime_1.jsx("div", { style: {
|
|
375
614
|
...inlineSourceFieldRow,
|
|
@@ -377,7 +616,7 @@ const TimelineSequencePropItem = ({ field, validatedLocation, rowDepth, nodePath
|
|
|
377
616
|
...style,
|
|
378
617
|
}, children: fieldValue }));
|
|
379
618
|
}
|
|
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:
|
|
619
|
+
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: hidePathValue ? (jsx_runtime_1.jsx(TimelineFieldLabel_1.TimelineFieldLabel, { rowDepth: rowDepth, selected: selection.selected || containsSelection, label: (_c = field.description) !== null && _c !== void 0 ? _c : field.key })) : (jsx_runtime_1.jsx(TimelineFieldRowContent_1.TimelineFieldRowContent, { field: field, rowDepth: rowDepth, selected: selection.selected || containsSelection, children: fieldValue })) }));
|
|
381
620
|
return jsx_runtime_1.jsx(ContextMenu_1.ContextMenu, { getItems: getContextMenuItems, children: row });
|
|
382
621
|
};
|
|
383
622
|
exports.TimelineSequencePropItem = TimelineSequencePropItem;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { CanUpdateSequencePropStatus,
|
|
2
|
+
import type { CanUpdateSequencePropStatus, InteractivitySchema, OverrideIdToNodePaths, PropStatuses, SequencePropsSubscriptionKey, TSequence } from 'remotion';
|
|
3
3
|
import type { SequenceNodePathInfo } from '../../helpers/get-timeline-sequence-sort-key';
|
|
4
4
|
import type { MoveEffectKeyframeChange, MoveSequenceKeyframeChange } from './call-move-keyframe';
|
|
5
|
+
import { type TimelineSequenceEffectKeyframeDragTarget, type TimelineSequenceKeyframeDragTarget } from './get-keyframed-sequence-drag-targets';
|
|
5
6
|
import { type SaveSequencePropChange } from './save-sequence-prop';
|
|
6
7
|
export declare const timelineSequenceFromDragSnapThresholdPx = 10;
|
|
7
8
|
export type TimelineSequenceMediaDurationDragLimits = {
|
|
@@ -23,6 +24,7 @@ export declare const getTimelineSequenceMediaDurationDragLimits: ({ cascadedStar
|
|
|
23
24
|
readonly timelineDurationInFrames: number;
|
|
24
25
|
}) => TimelineSequenceMediaDurationDragLimits | null;
|
|
25
26
|
export type TimelineSequenceDurationDragTarget = {
|
|
27
|
+
readonly parentPlaybackRate: number;
|
|
26
28
|
readonly fileName: string;
|
|
27
29
|
readonly initialDuration: number;
|
|
28
30
|
readonly maximumDuration: number;
|
|
@@ -31,6 +33,7 @@ export type TimelineSequenceDurationDragTarget = {
|
|
|
31
33
|
readonly schema: InteractivitySchema;
|
|
32
34
|
};
|
|
33
35
|
export type TimelineSequenceLeftEdgeDragTarget = {
|
|
36
|
+
readonly parentPlaybackRate: number;
|
|
34
37
|
readonly fileName: string;
|
|
35
38
|
readonly initialDuration: number;
|
|
36
39
|
readonly initialFrom: number;
|
|
@@ -42,6 +45,7 @@ export type TimelineSequenceLeftEdgeDragTarget = {
|
|
|
42
45
|
readonly schema: InteractivitySchema;
|
|
43
46
|
};
|
|
44
47
|
export type TimelineSequenceFromDragTarget = {
|
|
48
|
+
readonly parentPlaybackRate: number;
|
|
45
49
|
readonly canSnapToTimelineStart: boolean;
|
|
46
50
|
readonly minimumDeltaFrames: number;
|
|
47
51
|
readonly initialTimelineStart: number;
|
|
@@ -51,17 +55,6 @@ export type TimelineSequenceFromDragTarget = {
|
|
|
51
55
|
readonly nodePath: SequencePropsSubscriptionKey;
|
|
52
56
|
readonly sequenceKeyframes: TimelineSequenceKeyframeDragTarget[];
|
|
53
57
|
};
|
|
54
|
-
type TimelineSequenceKeyframeDragTarget = {
|
|
55
|
-
readonly fileName: string;
|
|
56
|
-
readonly fieldKey: string;
|
|
57
|
-
readonly isDescendant: boolean;
|
|
58
|
-
readonly nodePath: SequencePropsSubscriptionKey;
|
|
59
|
-
readonly schema: InteractivitySchema;
|
|
60
|
-
readonly status: CanUpdateSequencePropStatusKeyframed;
|
|
61
|
-
};
|
|
62
|
-
type TimelineSequenceEffectKeyframeDragTarget = TimelineSequenceKeyframeDragTarget & {
|
|
63
|
-
readonly effectIndex: number;
|
|
64
|
-
};
|
|
65
58
|
export declare const isTransitionSeriesSequence: (sequence: TSequence) => boolean;
|
|
66
59
|
export declare const isCascadingSequence: (sequence: TSequence) => boolean;
|
|
67
60
|
export declare const isTimelineSequenceDurationDraggable: (sequence: TSequence) => boolean;
|
|
@@ -149,9 +142,12 @@ export declare const getTimelineSequenceFromDragTargets: ({ draggedNodePathInfo,
|
|
|
149
142
|
readonly propStatuses: PropStatuses;
|
|
150
143
|
}) => TimelineSequenceFromDragTarget[] | null;
|
|
151
144
|
export declare const TimelineSequenceLeftEdgeDragHandle: React.NamedExoticComponent<{
|
|
145
|
+
readonly cursor: "e-resize" | "ew-resize";
|
|
152
146
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
153
147
|
readonly windowWidth: number;
|
|
154
148
|
readonly timelineDurationInFrames: number;
|
|
149
|
+
readonly initialEdgeFrame: number;
|
|
150
|
+
readonly fps: number;
|
|
155
151
|
readonly onDragEnd: (wasDragged: boolean) => void;
|
|
156
152
|
readonly onSelect: (interaction?: import("@remotion/canvas").CanvasSelectionInteraction | undefined) => void;
|
|
157
153
|
readonly selected: boolean;
|
|
@@ -165,12 +161,14 @@ export declare const useTimelineSequenceFromDrag: ({ nodePathInfo, windowWidth,
|
|
|
165
161
|
onPointerDown: (e: React.PointerEvent<HTMLDivElement>) => void;
|
|
166
162
|
};
|
|
167
163
|
export declare const TimelineSequenceRightEdgeDragHandle: React.NamedExoticComponent<{
|
|
164
|
+
readonly cursor: "ew-resize" | "w-resize";
|
|
168
165
|
readonly nodePathInfo: SequenceNodePathInfo;
|
|
169
166
|
readonly mediaDurationDragLimits: TimelineSequenceMediaDurationDragLimits | null;
|
|
170
167
|
readonly windowWidth: number;
|
|
171
168
|
readonly timelineDurationInFrames: number;
|
|
169
|
+
readonly initialEdgeFrame: number;
|
|
170
|
+
readonly fps: number;
|
|
172
171
|
readonly onDragEnd: (wasDragged: boolean) => void;
|
|
173
172
|
readonly onSelect: (interaction?: import("@remotion/canvas").CanvasSelectionInteraction | undefined) => void;
|
|
174
173
|
readonly selected: boolean;
|
|
175
174
|
}>;
|
|
176
|
-
export {};
|