@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
|
@@ -242,7 +242,7 @@ const TimelineInOutPointToggle = () => {
|
|
|
242
242
|
};
|
|
243
243
|
}, [confId, onInMark, onInOutClear, onOutMark]);
|
|
244
244
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
245
|
-
jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "In point", shortcut: shortcutsDisabled ? null : inShortcut, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, {
|
|
245
|
+
jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "In point", shortcut: shortcutsDisabled ? null : inShortcut, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { "aria-label": "In point", "aria-description": "Right click to clear", "aria-keyshortcuts": shortcutsDisabled ? undefined : inAriaShortcut || undefined, style: buttonStyle, onClick: onInMark, onContextMenu: clearInMark, disabled: !videoConfig || isFirstFrame, children: (color) => (jsx_runtime_1.jsx(timelineInOutPointer_1.TimelineInPointer, { color: inFrame === null ? color : colors_1.BLUE, style: style })) }) }), jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Out point", shortcut: shortcutsDisabled ? null : outShortcut, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(ControlButton_1.ControlButton, { "aria-label": "Out point", "aria-description": "Right click to clear", "aria-keyshortcuts": shortcutsDisabled ? undefined : outAriaShortcut || undefined, style: buttonStyle, onClick: onOutMark, onContextMenu: clearOutMark, disabled: !videoConfig || isLastFrame, children: (color) => (jsx_runtime_1.jsx(timelineInOutPointer_1.TimelineOutPointer, { color: outFrame === null ? color : colors_1.BLUE, style: style })) }) })
|
|
246
246
|
] }));
|
|
247
247
|
};
|
|
248
248
|
exports.TimelineInOutPointToggle = TimelineInOutPointToggle;
|
|
@@ -8,7 +8,7 @@ const ModelManager_1 = require("../ModelManager");
|
|
|
8
8
|
const AVAILABLE_MODELS = (0, whisper_webgpu_1.getAvailableModels)();
|
|
9
9
|
const Models = ({ description, indent, visible }) => {
|
|
10
10
|
const isModelCached = (0, react_1.useCallback)((model) => (0, whisper_webgpu_1.isWhisperModelCached)({ model }), []);
|
|
11
|
-
const loadModel = (0, react_1.useCallback)((model, onProgress) => (0, whisper_webgpu_1.
|
|
11
|
+
const loadModel = (0, react_1.useCallback)((model, onProgress) => (0, whisper_webgpu_1.downloadWhisperModel)({
|
|
12
12
|
model,
|
|
13
13
|
onProgress: (progress) => onProgress(progress.progress),
|
|
14
14
|
}), []);
|
|
@@ -134,7 +134,7 @@ const openIconStyle = {
|
|
|
134
134
|
flexShrink: 0,
|
|
135
135
|
};
|
|
136
136
|
const TranscriptionSettingLabel = ({ children, inputId, name }) => {
|
|
137
|
-
return (jsx_runtime_1.jsxs("div", { style: layout_2.label, children: [inputId === null ? (name) : (jsx_runtime_1.jsx("label", { htmlFor: inputId, style: nestedLabelStyle, children: name })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InfoBubble_1.InfoBubble, {
|
|
137
|
+
return (jsx_runtime_1.jsxs("div", { style: layout_2.label, children: [inputId === null ? (name) : (jsx_runtime_1.jsx("label", { htmlFor: inputId, style: nestedLabelStyle, children: name })), jsx_runtime_1.jsx(layout_1.Spacing, { x: 0.5 }), jsx_runtime_1.jsx(InfoBubble_1.InfoBubble, { "aria-label": `Learn more about ${name}`, children: jsx_runtime_1.jsx("div", { style: tooltipContent, children: children }) })
|
|
138
138
|
] }));
|
|
139
139
|
};
|
|
140
140
|
const ModelSettings = ({ cachedModels, selectedLanguage, selectedModel, selectedTask, setSelectedLanguage, setSelectedModel, setSelectedTask, supportState, }) => {
|
|
@@ -214,11 +214,11 @@ const ModelSettings = ({ cachedModels, selectedLanguage, selectedModel, selected
|
|
|
214
214
|
}, [selectedModelInfo.supportsTranslation, setSelectedTask]);
|
|
215
215
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
216
216
|
jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
217
|
-
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Whisper model" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: modelOptions, selectedId: selectedModel,
|
|
217
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Whisper model" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: modelOptions, selectedId: selectedModel, "aria-label": "Whisper model", style: controlStyle }) })
|
|
218
218
|
] }), selectedModelInfo.multilingual ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
219
|
-
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Spoken language" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: languageOptions, selectedId: selectedLanguage,
|
|
219
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Spoken language" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: languageOptions, selectedId: selectedLanguage, "aria-label": "Spoken language", style: controlStyle }) })
|
|
220
220
|
] })) : null, selectedModelInfo.supportsTranslation ? (jsx_runtime_1.jsxs("div", { style: layout_2.optionRow, children: [
|
|
221
|
-
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Task" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: taskOptions, selectedId: effectiveTask,
|
|
221
|
+
jsx_runtime_1.jsx("div", { style: layout_2.label, children: "Task" }), jsx_runtime_1.jsx("div", { style: layout_2.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: taskOptions, selectedId: effectiveTask, "aria-label": "Task", style: controlStyle }) })
|
|
222
222
|
] })) : null, effectiveTask === 'translate' ? (jsx_runtime_1.jsx("div", { id: TRANSCRIPTION_TASK_MESSAGE_ID, "aria-live": "polite", style: taskMessageRow, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: "Word timings may be less accurate when translating to English.", type: "warning" }) })) : null, supportState.type === 'unsupported' ? (jsx_runtime_1.jsx("div", { style: { padding: '0 16px' }, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: supportState.message, type: "error" }) })) : null] }));
|
|
223
223
|
};
|
|
224
224
|
const OutputSettings = ({ exists, onOutNameChange, outName, validationMessage }) => {
|
|
@@ -246,7 +246,7 @@ const OutputSettings = ({ exists, onOutNameChange, outName, validationMessage })
|
|
|
246
246
|
jsx_runtime_1.jsx(RemInput_1.RemotionInput, { "aria-label": "Caption output file", "aria-describedby": validationMessage || exists
|
|
247
247
|
? TRANSCRIPTION_OUTPUT_MESSAGE_ID
|
|
248
248
|
: undefined, "aria-invalid": validationMessage ? true : undefined, status: validationMessage ? 'error' : exists ? 'warning' : 'ok', style: layout_2.input, type: "text", value: outName, onChange: onOutNameChange, rightAlign: true }), validationMessage || exists ? (jsx_runtime_1.jsxs("div", { id: TRANSCRIPTION_OUTPUT_MESSAGE_ID, "aria-live": "polite", children: [
|
|
249
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: validationMessage !== null && validationMessage !== void 0 ? validationMessage : (jsx_runtime_1.jsxs("span", { style: existsMessageStyle, children: [isBrowserStudio ? null : (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: openExistingOutput, renderAction: renderOpenIcon,
|
|
249
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { y: 1, block: true }), jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: validationMessage !== null && validationMessage !== void 0 ? validationMessage : (jsx_runtime_1.jsxs("span", { style: existsMessageStyle, children: [isBrowserStudio ? null : (jsx_runtime_1.jsx(InlineAction_1.InlineAction, { onClick: openExistingOutput, renderAction: renderOpenIcon, "aria-label": `Open in ${fileManagerName}`, variant: null })), "Exists, will be overwritten"] })), type: validationMessage ? 'error' : 'warning' })] })) : null] }) })
|
|
250
250
|
] }));
|
|
251
251
|
};
|
|
252
252
|
const AdvancedSettings = ({ chunkLengthInSeconds, doSample, forceFullSequences, noRepeatNgramSize, repetitionPenalty, setChunkLengthInSeconds, setDoSample, setForceFullSequences, setNoRepeatNgramSize, setRepetitionPenalty, setStrideLengthInSeconds, setTemperature, setTopK, strideLengthInSeconds, temperature, topK, decodingValidationMessage, validationMessage, }) => {
|
|
@@ -324,7 +324,9 @@ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, t
|
|
|
324
324
|
}, []);
|
|
325
325
|
const normalizedOutName = outName.normalize('NFC').toLowerCase();
|
|
326
326
|
const queuedOutputExists = captionJobs.some((job) => job.target === null &&
|
|
327
|
-
(job.status === 'idle' ||
|
|
327
|
+
(job.status === 'idle' ||
|
|
328
|
+
job.status === 'running' ||
|
|
329
|
+
job.status === 'saving') &&
|
|
328
330
|
job.outName.normalize('NFC').toLowerCase() === normalizedOutName);
|
|
329
331
|
const outputValidationMessage = target === null
|
|
330
332
|
? ((_a = (0, caption_output_name_1.validateCaptionOutputName)(outName)) !== null && _a !== void 0 ? _a : (queuedOutputExists
|
|
@@ -418,7 +420,7 @@ const TranscriptionModal = ({ audioStreamIndex, displayName, requestInit, src, t
|
|
|
418
420
|
const title = target === null ? `Transcribe ${displayName}` : 'Generate captions';
|
|
419
421
|
return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { ariaLabel: title, children: jsx_runtime_1.jsxs("div", { style: transcriptionModalStyle, children: [
|
|
420
422
|
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: title }), jsx_runtime_1.jsxs("div", { style: render_modals_1.container, children: [
|
|
421
|
-
jsx_runtime_1.jsx("div", { style: render_modals_1.flexer }), jsx_runtime_1.jsx(Button_1.Button, { onClick: onAddToQueue, disabled: !canTranscribe,
|
|
423
|
+
jsx_runtime_1.jsx("div", { style: render_modals_1.flexer }), jsx_runtime_1.jsx(Button_1.Button, { onClick: onAddToQueue, disabled: !canTranscribe, "aria-label": transcribeDisabledReason, style: {
|
|
422
424
|
...render_modals_1.buttonStyle,
|
|
423
425
|
backgroundColor: canTranscribe
|
|
424
426
|
? render_modals_1.buttonStyle.backgroundColor
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export declare const resampleMediaTo16Khz: ({ src, audioStreamIndex, requestInit, onProgress, }: {
|
|
1
|
+
export declare const resampleMediaTo16Khz: ({ src, audioStreamIndex, requestInit, onProgress, signal, }: {
|
|
2
2
|
readonly src: string;
|
|
3
3
|
readonly audioStreamIndex: number | null;
|
|
4
4
|
readonly requestInit: Omit<RequestInit, "signal"> | null;
|
|
5
5
|
readonly onProgress: (progress: number) => void;
|
|
6
|
+
readonly signal: AbortSignal;
|
|
6
7
|
}) => Promise<Float32Array<ArrayBufferLike>>;
|
|
@@ -3,13 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.resampleMediaTo16Khz = void 0;
|
|
4
4
|
const whisper_webgpu_1 = require("@remotion/whisper-webgpu");
|
|
5
5
|
const mediabunny_1 = require("mediabunny");
|
|
6
|
-
const resampleMediaTo16Khz = async ({ src, audioStreamIndex, requestInit, onProgress, }) => {
|
|
6
|
+
const resampleMediaTo16Khz = async ({ src, audioStreamIndex, requestInit, onProgress, signal, }) => {
|
|
7
7
|
var _a, _b;
|
|
8
|
+
signal.throwIfAborted();
|
|
8
9
|
const input = new mediabunny_1.Input({
|
|
9
10
|
formats: mediabunny_1.ALL_FORMATS,
|
|
10
11
|
source: new mediabunny_1.UrlSource(src, requestInit === null ? {} : { requestInit }),
|
|
11
12
|
});
|
|
12
13
|
const waveformChunks = [];
|
|
14
|
+
let conversion = null;
|
|
15
|
+
let cancellation = null;
|
|
16
|
+
const onAbort = () => {
|
|
17
|
+
var _a;
|
|
18
|
+
cancellation = (_a = conversion === null || conversion === void 0 ? void 0 : conversion.cancel().catch(() => undefined)) !== null && _a !== void 0 ? _a : null;
|
|
19
|
+
input.dispose();
|
|
20
|
+
};
|
|
21
|
+
signal.addEventListener('abort', onAbort, { once: true });
|
|
13
22
|
try {
|
|
14
23
|
onProgress(0);
|
|
15
24
|
const audioTracks = await input.getAudioTracks();
|
|
@@ -29,7 +38,8 @@ const resampleMediaTo16Khz = async ({ src, audioStreamIndex, requestInit, onProg
|
|
|
29
38
|
format: new mediabunny_1.WavOutputFormat(),
|
|
30
39
|
target: new mediabunny_1.NullTarget(),
|
|
31
40
|
});
|
|
32
|
-
|
|
41
|
+
signal.throwIfAborted();
|
|
42
|
+
conversion = await mediabunny_1.Conversion.init({
|
|
33
43
|
input,
|
|
34
44
|
output,
|
|
35
45
|
tracks: 'all',
|
|
@@ -43,6 +53,7 @@ const resampleMediaTo16Khz = async ({ src, audioStreamIndex, requestInit, onProg
|
|
|
43
53
|
forceTranscode: true,
|
|
44
54
|
numberOfChannels: 1,
|
|
45
55
|
process: (sample) => {
|
|
56
|
+
signal.throwIfAborted();
|
|
46
57
|
const floats = new Float32Array(sample.allocationSize({ format: 'f32', planeIndex: 0 }) /
|
|
47
58
|
Float32Array.BYTES_PER_ELEMENT);
|
|
48
59
|
sample.copyTo(floats, { format: 'f32', planeIndex: 0 });
|
|
@@ -57,14 +68,21 @@ const resampleMediaTo16Khz = async ({ src, audioStreamIndex, requestInit, onProg
|
|
|
57
68
|
};
|
|
58
69
|
},
|
|
59
70
|
});
|
|
71
|
+
signal.throwIfAborted();
|
|
60
72
|
if (!conversion.isValid) {
|
|
61
73
|
throw new Error('The audio track cannot be decoded in this browser. Try converting the media to WAV first.');
|
|
62
74
|
}
|
|
63
75
|
conversion.onProgress = (progress) => onProgress(progress);
|
|
64
76
|
await conversion.execute();
|
|
77
|
+
signal.throwIfAborted();
|
|
65
78
|
onProgress(1);
|
|
66
79
|
}
|
|
67
80
|
finally {
|
|
81
|
+
signal.removeEventListener('abort', onAbort);
|
|
82
|
+
await cancellation;
|
|
83
|
+
if (signal.aborted && conversion && cancellation === null) {
|
|
84
|
+
await conversion.cancel().catch(() => undefined);
|
|
85
|
+
}
|
|
68
86
|
input.dispose();
|
|
69
87
|
}
|
|
70
88
|
const waveformLength = waveformChunks.reduce((maximum, chunk) => Math.max(maximum, chunk.startFrame + chunk.waveform.length), 0);
|
|
@@ -130,7 +130,7 @@ const UndoRedoButtons = () => {
|
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
132
|
return (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
133
|
-
jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onUndo, renderAction: renderUndo,
|
|
133
|
+
jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onUndo, renderAction: renderUndo, "aria-label": undoTooltip, disabled: !canUndo, unhoveredColor: colors_1.WHITE_ALPHA_80 }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onRedo, renderAction: renderRedo, "aria-label": redoTooltip, disabled: !canRedo, unhoveredColor: colors_1.WHITE_ALPHA_80 })
|
|
134
134
|
] }));
|
|
135
135
|
};
|
|
136
136
|
exports.UndoRedoButtons = UndoRedoButtons;
|
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../helpers/colors");
|
|
7
7
|
const copy_text_1 = require("../helpers/copy-text");
|
|
8
|
+
const studio_css_variables_1 = require("../helpers/studio-css-variables");
|
|
8
9
|
const use_copy_feedback_1 = require("../helpers/use-copy-feedback");
|
|
9
10
|
const copy_1 = require("../icons/copy");
|
|
10
11
|
const InlineAction_1 = require("./InlineAction");
|
|
@@ -127,6 +128,7 @@ const RenderedReleaseNotes = ({ release }) => {
|
|
|
127
128
|
return null;
|
|
128
129
|
}
|
|
129
130
|
return `<!doctype html><html><head><base href="https://github.com/remotion-dev/remotion/" target="_blank"><style>
|
|
131
|
+
${studio_css_variables_1.studioCssVariables}
|
|
130
132
|
:root { color-scheme: dark; }
|
|
131
133
|
html, body { overflow: hidden; }
|
|
132
134
|
body { background: ${colors_1.BACKGROUND}; color: ${colors_1.LIGHT_TEXT}; font-family: sans-serif; font-size: 13px; line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
|
|
@@ -169,7 +171,7 @@ const RenderedReleaseNotes = ({ release }) => {
|
|
|
169
171
|
jsx_runtime_1.jsxs("div", { style: releaseNotesTitle, children: ["v", release.version, formattedReleaseDate === null
|
|
170
172
|
? null
|
|
171
173
|
: ` \u2013\u00a0${formattedReleaseDate}`] }), document === null ? (jsx_runtime_1.jsxs("div", { style: text, children: ["Release notes could not be loaded.", ' ', jsx_runtime_1.jsx("a", { style: link, target: "_blank", href: `https://github.com/remotion-dev/remotion/releases/tag/v${release.version}`, children: "View them on GitHub" }),
|
|
172
|
-
"."] })) : (jsx_runtime_1.jsx("iframe", { ref: frameRef, onLoad: onLoad, sandbox: "allow-popups allow-popups-to-escape-sandbox allow-same-origin", scrolling: "no", srcDoc: document, style: { ...releaseNotesFrame, height },
|
|
174
|
+
"."] })) : (jsx_runtime_1.jsx("iframe", { ref: frameRef, onLoad: onLoad, sandbox: "allow-popups allow-popups-to-escape-sandbox allow-same-origin", scrolling: "no", srcDoc: document, style: { ...releaseNotesFrame, height }, "aria-label": `Release notes for Remotion v${release.version}` }))] }));
|
|
173
175
|
};
|
|
174
176
|
const UpdatesSettings = () => {
|
|
175
177
|
const { remotionSkillsInfo } = (0, SettingsContext_1.useSettings)();
|
|
@@ -261,7 +263,7 @@ const UpdatesSettings = () => {
|
|
|
261
263
|
return (jsx_runtime_1.jsxs("div", { style: container, children: [info.updateAvailable ? (jsx_runtime_1.jsx("div", { style: title, children: "A new Remotion update is available." })) : null, info.updateAvailable && info.packageManager !== 'unknown' ? (jsx_runtime_1.jsx("div", { children: jsx_runtime_1.jsxs(ModalButton_1.ModalButton, { onClick: onUpgrade, children: ["Upgrade to v", info.latestVersion] }) })) : null, upgradeError ? (jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { message: upgradeError, type: "error", align: "flex-start" })) : null, hasKnownBugs && info.updateAvailable ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
262
264
|
jsx_runtime_1.jsxs("div", { style: title, children: ["The currently installed version v", info.currentVersion, " has the following known bugs:"] }), jsx_runtime_1.jsx(KnownBugs_1.KnownBugs, { bugs: knownBugs !== null && knownBugs !== void 0 ? knownBugs : [] }), jsx_runtime_1.jsx("div", { style: { height: '20px' } }), jsx_runtime_1.jsxs("div", { style: text, children: ["Or run the following ", updateActionType, ":"] })
|
|
263
265
|
] })) : info.updateAvailable ? (jsx_runtime_1.jsxs("div", { style: titleBeforeCommand, children: ["You can also run the following ", updateActionType, ":"] })) : (jsx_runtime_1.jsxs("div", { style: titleBeforeCommand, children: ["Your Remotion Agent Skills are out of date. Run the following", ' ', updateActionType, ":"] })), jsx_runtime_1.jsxs("div", { style: commandField, children: [
|
|
264
|
-
jsx_runtime_1.jsx("pre", { style: code, children: updateAction }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onClick, renderAction: renderCopyAction,
|
|
266
|
+
jsx_runtime_1.jsx("pre", { style: code, children: updateAction }), jsx_runtime_1.jsx(InlineAction_1.InlineAction, { variant: null, onClick: onClick, renderAction: renderCopyAction, "aria-label": "Copy command" })
|
|
265
267
|
] }), info.updateAvailable ? (jsx_runtime_1.jsxs("div", { style: text, children: ["You", "'re", " currently running Remotion v", info.currentVersion, "."] })) : null, info.updateAvailable ? ((releaseNotes === null || releaseNotes === void 0 ? void 0 : releaseNotes.currentVersion) === info.currentVersion &&
|
|
266
268
|
releaseNotes.latestVersion === info.latestVersion ? (releaseNotes.releases.length === 0 ? (jsx_runtime_1.jsxs(jsx_runtime_1.Fragment, { children: [
|
|
267
269
|
jsx_runtime_1.jsxs("div", { style: releaseNotesTitle, children: ["v", info.latestVersion] }), jsx_runtime_1.jsxs("div", { style: text, children: ["Release notes could not be loaded.", ' ', jsx_runtime_1.jsx("a", { style: link, target: "_blank", href: "https://github.com/remotion-dev/remotion/releases", children: "View them on GitHub" }),
|
|
@@ -8,7 +8,7 @@ const ModelManager_1 = require("../ModelManager");
|
|
|
8
8
|
const AVAILABLE_MODELS = (0, video_matting_1.getAvailableModels)();
|
|
9
9
|
const Models = ({ description, indent, visible }) => {
|
|
10
10
|
const isModelCached = (0, react_1.useCallback)((model) => (0, video_matting_1.isVideoMattingModelCached)({ model }), []);
|
|
11
|
-
const loadModel = (0, react_1.useCallback)((model, onProgress) => (0, video_matting_1.
|
|
11
|
+
const loadModel = (0, react_1.useCallback)((model, onProgress) => (0, video_matting_1.downloadVideoMattingModel)({
|
|
12
12
|
model,
|
|
13
13
|
onProgress: (progress) => onProgress(progress.progress),
|
|
14
14
|
}), []);
|
|
@@ -7,8 +7,8 @@ const video_matting_1 = require("@remotion/video-matting");
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const colors_1 = require("../../helpers/colors");
|
|
9
9
|
const Checkmark_1 = require("../../icons/Checkmark");
|
|
10
|
+
const gear_1 = require("../../icons/gear");
|
|
10
11
|
const models_1 = require("../../icons/models");
|
|
11
|
-
const separation_1 = require("../../icons/separation");
|
|
12
12
|
const modals_1 = require("../../state/modals");
|
|
13
13
|
const sidebar_1 = require("../../state/sidebar");
|
|
14
14
|
const Button_1 = require("../Button");
|
|
@@ -61,9 +61,9 @@ const makeOptions = ({ items, selected, setSelected, }) => items.map(({ id, labe
|
|
|
61
61
|
disabled: false,
|
|
62
62
|
onClick: () => setSelected(id),
|
|
63
63
|
}));
|
|
64
|
-
const VideoMattingModal = ({ displayName, src, }) => {
|
|
65
|
-
var _a
|
|
66
|
-
const [tab, setTab] = (0, react_1.useState)('
|
|
64
|
+
const VideoMattingModal = ({ displayName, src, target, }) => {
|
|
65
|
+
var _a;
|
|
66
|
+
const [tab, setTab] = (0, react_1.useState)('remove');
|
|
67
67
|
const isModelCached = (0, react_1.useCallback)((selectedModel) => (0, video_matting_1.isVideoMattingModelCached)({ model: selectedModel }), []);
|
|
68
68
|
const cachedModels = (0, use_model_cache_status_1.useModelCacheStatus)({
|
|
69
69
|
isModelCached,
|
|
@@ -71,10 +71,9 @@ const VideoMattingModal = ({ displayName, src, }) => {
|
|
|
71
71
|
refreshKey: tab,
|
|
72
72
|
});
|
|
73
73
|
const baseName = (0, react_1.useMemo)(() => (0, public_output_name_1.getDefaultOutputBaseName)(src, displayName, 'video'), [displayName, src]);
|
|
74
|
-
const [
|
|
75
|
-
const [
|
|
76
|
-
const [
|
|
77
|
-
const [audio, setAudio] = (0, react_1.useState)('base');
|
|
74
|
+
const [outName, setOutName] = (0, react_1.useState)(`${baseName}-no-background.webm`);
|
|
75
|
+
const [model, setModel] = (0, react_1.useState)('modnet');
|
|
76
|
+
const [audio, setAudio] = (0, react_1.useState)('keep');
|
|
78
77
|
const [videoBitrate, setVideoBitrate] = (0, react_1.useState)('very-high');
|
|
79
78
|
const [support, setSupport] = (0, react_1.useState)({ type: 'checking' });
|
|
80
79
|
const staticFiles = (0, use_static_files_1.useStaticFiles)();
|
|
@@ -95,31 +94,18 @@ const VideoMattingModal = ({ displayName, src, }) => {
|
|
|
95
94
|
cancelled = true;
|
|
96
95
|
};
|
|
97
96
|
}, [model]);
|
|
98
|
-
const
|
|
99
|
-
const normalizedForeground = foregroundOutName.normalize('NFC').toLowerCase();
|
|
100
|
-
const duplicateOutput = normalizedBase === normalizedForeground;
|
|
97
|
+
const normalizedOutput = outName.normalize('NFC').toLowerCase();
|
|
101
98
|
const queuedOutputs = new Set(videoMattingJobs
|
|
102
|
-
.filter((job) => job.status === 'idle' ||
|
|
103
|
-
.
|
|
99
|
+
.filter((job) => job.status === 'idle' ||
|
|
100
|
+
job.status === 'running' ||
|
|
101
|
+
job.status === 'saving')
|
|
102
|
+
.map((job) => job.outName)
|
|
104
103
|
.map((name) => name.normalize('NFC').toLowerCase()));
|
|
105
|
-
const
|
|
106
|
-
? '
|
|
107
|
-
:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const foregroundError = (_b = (0, public_output_name_1.validatePublicOutputName)({
|
|
111
|
-
extension: '.webm',
|
|
112
|
-
outName: foregroundOutName,
|
|
113
|
-
})) !== null && _b !== void 0 ? _b : (duplicateOutput
|
|
114
|
-
? 'Base and foreground outputs must be different'
|
|
115
|
-
: queuedOutputs.has(normalizedForeground)
|
|
116
|
-
? 'Another video matting job is using this output file'
|
|
117
|
-
: null);
|
|
118
|
-
const baseExists = staticFiles.some((file) => file.name.normalize('NFC').toLowerCase() === normalizedBase);
|
|
119
|
-
const foregroundExists = staticFiles.some((file) => file.name.normalize('NFC').toLowerCase() === normalizedForeground);
|
|
120
|
-
const canSubmit = support.type === 'supported' &&
|
|
121
|
-
baseError === null &&
|
|
122
|
-
foregroundError === null;
|
|
104
|
+
const outputError = (_a = (0, public_output_name_1.validatePublicOutputName)({ extension: '.webm', outName })) !== null && _a !== void 0 ? _a : (queuedOutputs.has(normalizedOutput)
|
|
105
|
+
? 'Another background removal job is using this output file'
|
|
106
|
+
: null);
|
|
107
|
+
const outputExists = staticFiles.some((file) => file.name.normalize('NFC').toLowerCase() === normalizedOutput);
|
|
108
|
+
const canSubmit = support.type === 'supported' && outputError === null;
|
|
123
109
|
const modelOptions = (0, react_1.useMemo)(() => makeOptions({
|
|
124
110
|
items: MODELS.map((item) => ({
|
|
125
111
|
id: item.name,
|
|
@@ -130,9 +116,7 @@ const VideoMattingModal = ({ displayName, src, }) => {
|
|
|
130
116
|
}), [cachedModels, model]);
|
|
131
117
|
const audioOptions = (0, react_1.useMemo)(() => makeOptions({
|
|
132
118
|
items: [
|
|
133
|
-
{ id: '
|
|
134
|
-
{ id: 'foreground', label: 'Foreground layer' },
|
|
135
|
-
{ id: 'both', label: 'Both layers' },
|
|
119
|
+
{ id: 'keep', label: 'Keep original audio' },
|
|
136
120
|
{ id: 'none', label: 'No audio' },
|
|
137
121
|
],
|
|
138
122
|
selected: audio,
|
|
@@ -156,11 +140,11 @@ const VideoMattingModal = ({ displayName, src, }) => {
|
|
|
156
140
|
addVideoMattingJob({
|
|
157
141
|
src,
|
|
158
142
|
displayName,
|
|
159
|
-
|
|
160
|
-
foregroundOutName,
|
|
143
|
+
outName,
|
|
161
144
|
model,
|
|
162
145
|
audio,
|
|
163
146
|
videoBitrate,
|
|
147
|
+
target,
|
|
164
148
|
});
|
|
165
149
|
setSidebarCollapsedState({ left: null, right: 'expanded' });
|
|
166
150
|
(0, OptionsPanel_1.persistSelectedOptionsSidebarPanel)('renders');
|
|
@@ -169,36 +153,35 @@ const VideoMattingModal = ({ displayName, src, }) => {
|
|
|
169
153
|
}, [
|
|
170
154
|
addVideoMattingJob,
|
|
171
155
|
audio,
|
|
172
|
-
baseOutName,
|
|
173
156
|
canSubmit,
|
|
174
157
|
displayName,
|
|
175
|
-
|
|
158
|
+
outName,
|
|
176
159
|
model,
|
|
177
160
|
setSelectedModal,
|
|
178
161
|
setSidebarCollapsedState,
|
|
179
162
|
src,
|
|
163
|
+
target,
|
|
180
164
|
videoBitrate,
|
|
181
165
|
]);
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
166
|
+
const title = `Remove background from ${displayName}`;
|
|
167
|
+
return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { ariaLabel: title, children: jsx_runtime_1.jsxs("div", { style: modalStyle, children: [
|
|
168
|
+
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: title }), jsx_runtime_1.jsxs("div", { style: render_modals_1.container, children: [
|
|
169
|
+
jsx_runtime_1.jsx("div", { style: render_modals_1.flexer }), jsx_runtime_1.jsx(Button_1.Button, { disabled: !canSubmit, onClick: submit, "aria-label": support.type === 'unsupported' ? support.message : undefined, style: {
|
|
185
170
|
...render_modals_1.buttonStyle,
|
|
186
171
|
backgroundColor: canSubmit
|
|
187
172
|
? render_modals_1.buttonStyle.backgroundColor
|
|
188
173
|
: colors_1.BLUE_DISABLED,
|
|
189
|
-
}, children: "
|
|
174
|
+
}, children: "Remove background" })
|
|
190
175
|
] }), jsx_runtime_1.jsxs("div", { style: modalLayout, children: [
|
|
191
|
-
jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { autoFocus: true, onClick: () => setTab('
|
|
192
|
-
jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { ariaLabel: "
|
|
193
|
-
? `${window.remotion_publicFolderExists}/${
|
|
194
|
-
: null, existence:
|
|
195
|
-
|
|
196
|
-
: null, existence: foregroundExists, inputStyle: layout_1.input, label: "Foreground output in public/", onValueChange: (event) => setForegroundOutName(event.target.value), outName: foregroundOutName, validationMessage: foregroundError }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
|
|
197
|
-
jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Model" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: modelOptions, selectedId: model, title: "Model", style: controlStyle }) })
|
|
176
|
+
jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { autoFocus: true, onClick: () => setTab('remove'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gear_1.GearIcon, { color: color, style: render_modals_1.icon }) })), selected: tab === 'remove', style: render_modals_1.horizontalTab, children: "General" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { onClick: () => setTab('models'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(models_1.ModelsIcon, { color: color, style: render_modals_1.icon }) })), selected: tab === 'models', style: render_modals_1.horizontalTab, children: "Models" })] }), jsx_runtime_1.jsxs("div", { style: tab === 'remove' ? panelStyle : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
|
|
177
|
+
jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { ariaLabel: "Video output file", existingOutputPath: window.remotion_publicFolderExists
|
|
178
|
+
? `${window.remotion_publicFolderExists}/${outName}`
|
|
179
|
+
: null, existence: outputExists, inputStyle: layout_1.input, label: "Output in public/", onValueChange: (event) => setOutName(event.target.value), outName: outName, validationMessage: outputError }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
|
|
180
|
+
jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Model" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: modelOptions, selectedId: model, "aria-label": "Model", style: controlStyle }) })
|
|
198
181
|
] }), support.type === 'unsupported' ? (jsx_runtime_1.jsx("div", { style: validationStyle, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: support.message, type: "error" }) })) : null, jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
|
|
199
|
-
jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Audio" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: audioOptions, selectedId: audio,
|
|
182
|
+
jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Audio" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: audioOptions, selectedId: audio, "aria-label": "Audio", style: controlStyle }) })
|
|
200
183
|
] }), jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
|
|
201
|
-
jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Video quality" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: qualityOptions, selectedId: String(videoBitrate),
|
|
184
|
+
jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Video quality" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: qualityOptions, selectedId: String(videoBitrate), "aria-label": "Video quality", style: controlStyle }) })
|
|
202
185
|
] })
|
|
203
186
|
] }), jsx_runtime_1.jsx(Models_1.Models, { description: 'Models are downloaded automatically when needed.\nYou can also manage the browser cache here.', indent: true, visible: tab === 'models' })
|
|
204
187
|
] })
|
|
@@ -42,5 +42,5 @@ const LazyVideoMattingModal = react_1.default.lazy(async () => {
|
|
|
42
42
|
const { VideoMattingModal } = await Promise.resolve().then(() => __importStar(require('./VideoMattingModal')));
|
|
43
43
|
return { default: VideoMattingModal };
|
|
44
44
|
});
|
|
45
|
-
const VideoMattingModalWithOptionalPackage = ({ state }) => (jsx_runtime_1.jsx(OptionalPackageModal_1.OptionalPackageModal, { ariaLabel: "Install video matting package", packageName: video_matting_capability_1.VIDEO_MATTING_PACKAGE, title: "
|
|
45
|
+
const VideoMattingModalWithOptionalPackage = ({ state }) => (jsx_runtime_1.jsx(OptionalPackageModal_1.OptionalPackageModal, { ariaLabel: "Install video matting package to remove background", packageName: video_matting_capability_1.VIDEO_MATTING_PACKAGE, title: "Remove background", children: jsx_runtime_1.jsx(react_1.Suspense, { fallback: null, children: jsx_runtime_1.jsx(LazyVideoMattingModal, { ...state }) }) }));
|
|
46
46
|
exports.VideoMattingModalWithOptionalPackage = VideoMattingModalWithOptionalPackage;
|
|
@@ -489,9 +489,9 @@ const WebMcp = () => {
|
|
|
489
489
|
},
|
|
490
490
|
}, { signal: controller.signal }),
|
|
491
491
|
modelContext.registerTool({
|
|
492
|
-
name: '
|
|
493
|
-
title: '
|
|
494
|
-
description: '
|
|
492
|
+
name: 'remove_video_background',
|
|
493
|
+
title: 'Remove video background',
|
|
494
|
+
description: 'Remove the background from a video asset in the public folder and add the work to the Jobs queue. If assetPath is omitted, the asset currently open in Studio is used.',
|
|
495
495
|
inputSchema: {
|
|
496
496
|
type: 'object',
|
|
497
497
|
properties: {
|
|
@@ -499,13 +499,9 @@ const WebMcp = () => {
|
|
|
499
499
|
type: 'string',
|
|
500
500
|
description: 'Optional path relative to public/. Defaults to the asset currently open in Studio.',
|
|
501
501
|
},
|
|
502
|
-
|
|
503
|
-
type: 'string',
|
|
504
|
-
description: 'Optional background output path relative to public/.',
|
|
505
|
-
},
|
|
506
|
-
foregroundOutputPath: {
|
|
502
|
+
outputPath: {
|
|
507
503
|
type: 'string',
|
|
508
|
-
description: 'Optional
|
|
504
|
+
description: 'Optional transparent video output path relative to public/.',
|
|
509
505
|
},
|
|
510
506
|
model: {
|
|
511
507
|
type: 'string',
|
|
@@ -513,8 +509,8 @@ const WebMcp = () => {
|
|
|
513
509
|
},
|
|
514
510
|
audio: {
|
|
515
511
|
type: 'string',
|
|
516
|
-
enum: ['
|
|
517
|
-
default: '
|
|
512
|
+
enum: ['keep', 'none'],
|
|
513
|
+
default: 'keep',
|
|
518
514
|
},
|
|
519
515
|
videoBitrate: {
|
|
520
516
|
oneOf: [
|
|
@@ -532,7 +528,7 @@ const WebMcp = () => {
|
|
|
532
528
|
annotations: { readOnlyHint: false },
|
|
533
529
|
execute: async (input) => {
|
|
534
530
|
var _a;
|
|
535
|
-
var _b, _c, _d, _e, _f
|
|
531
|
+
var _b, _c, _d, _e, _f;
|
|
536
532
|
if (!(0, OptionalPackageModal_1.isOptionalPackageInstalled)(video_matting_capability_1.VIDEO_MATTING_PACKAGE)) {
|
|
537
533
|
return missingOptionalPackageResult(video_matting_capability_1.VIDEO_MATTING_PACKAGE);
|
|
538
534
|
}
|
|
@@ -542,7 +538,7 @@ const WebMcp = () => {
|
|
|
542
538
|
staticFiles: staticFilesRef.current,
|
|
543
539
|
});
|
|
544
540
|
if ((0, get_preview_file_type_1.getPreviewFileType)(assetPath) !== 'video') {
|
|
545
|
-
throw new Error('The
|
|
541
|
+
throw new Error('The input asset must be a video.');
|
|
546
542
|
}
|
|
547
543
|
const videoMatting = await Promise.resolve().then(() => __importStar(require('@remotion/video-matting')));
|
|
548
544
|
const modelName = (_b = input.model) !== null && _b !== void 0 ? _b : 'ben2-base';
|
|
@@ -555,12 +551,9 @@ const WebMcp = () => {
|
|
|
555
551
|
if (!model) {
|
|
556
552
|
throw new Error(`Unknown video matting model: ${modelName}.`);
|
|
557
553
|
}
|
|
558
|
-
const audio = (_c = input.audio) !== null && _c !== void 0 ? _c : '
|
|
559
|
-
if (audio !== '
|
|
560
|
-
audio
|
|
561
|
-
audio !== 'both' &&
|
|
562
|
-
audio !== 'none') {
|
|
563
|
-
throw new Error('audio must be base, foreground, both, or none.');
|
|
554
|
+
const audio = (_c = input.audio) !== null && _c !== void 0 ? _c : 'keep';
|
|
555
|
+
if (audio !== 'keep' && audio !== 'none') {
|
|
556
|
+
throw new Error('audio must be keep or none.');
|
|
564
557
|
}
|
|
565
558
|
const videoBitrate = (_d = input.videoBitrate) !== null && _d !== void 0 ? _d : 'very-high';
|
|
566
559
|
if ((typeof videoBitrate !== 'number' ||
|
|
@@ -576,39 +569,28 @@ const WebMcp = () => {
|
|
|
576
569
|
const src = (0, remotion_1.staticFile)(assetPath);
|
|
577
570
|
const displayName = (_e = assetPath.split('/').at(-1)) !== null && _e !== void 0 ? _e : assetPath;
|
|
578
571
|
const baseName = (0, public_output_name_1.getDefaultOutputBaseName)(src, displayName, 'video');
|
|
579
|
-
const
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
typeof foregroundOutputPath !== 'string') {
|
|
583
|
-
throw new Error('Output paths must be strings.');
|
|
572
|
+
const outputPath = (_f = input.outputPath) !== null && _f !== void 0 ? _f : `${baseName}-no-background.webm`;
|
|
573
|
+
if (typeof outputPath !== 'string') {
|
|
574
|
+
throw new Error('Output path must be a string.');
|
|
584
575
|
}
|
|
585
|
-
const
|
|
586
|
-
extension: '.webm',
|
|
587
|
-
outName: baseOutputPath,
|
|
588
|
-
});
|
|
589
|
-
const foregroundError = (0, public_output_name_1.validatePublicOutputName)({
|
|
576
|
+
const outputError = (0, public_output_name_1.validatePublicOutputName)({
|
|
590
577
|
extension: '.webm',
|
|
591
|
-
outName:
|
|
578
|
+
outName: outputPath,
|
|
592
579
|
});
|
|
593
|
-
if (
|
|
594
|
-
throw new Error(
|
|
595
|
-
}
|
|
596
|
-
if (baseOutputPath.normalize('NFC').toLowerCase() ===
|
|
597
|
-
foregroundOutputPath.normalize('NFC').toLowerCase()) {
|
|
598
|
-
throw new Error('Background and foreground outputs must be different.');
|
|
580
|
+
if (outputError !== null) {
|
|
581
|
+
throw new Error(outputError);
|
|
599
582
|
}
|
|
600
583
|
const jobId = addVideoMattingJob({
|
|
601
584
|
audio,
|
|
602
|
-
baseOutName: baseOutputPath,
|
|
603
585
|
displayName,
|
|
604
|
-
|
|
586
|
+
outName: outputPath,
|
|
605
587
|
model,
|
|
606
588
|
src,
|
|
589
|
+
target: null,
|
|
607
590
|
videoBitrate,
|
|
608
591
|
});
|
|
609
592
|
return {
|
|
610
|
-
|
|
611
|
-
foregroundOutputPath,
|
|
593
|
+
outputPath,
|
|
612
594
|
jobId,
|
|
613
595
|
success: true,
|
|
614
596
|
};
|
|
@@ -14,6 +14,7 @@ const snapCompositionDropPosition = ({ compositionDimensions, destinationDimensi
|
|
|
14
14
|
key: 'composition-drop-preview',
|
|
15
15
|
dimensions: compositionDimensions,
|
|
16
16
|
uncroppedPoints: null,
|
|
17
|
+
path: null,
|
|
17
18
|
points: [
|
|
18
19
|
{ x: left * scale, y: top * scale },
|
|
19
20
|
{ x: right * scale, y: top * scale },
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import { type EffectDragData } from '@remotion/studio-protocol';
|
|
2
2
|
import { type EffectDefinition } from '@remotion/studio-shared';
|
|
3
|
-
import type {
|
|
3
|
+
import type { SequenceNodePathInfo } from '../helpers/get-timeline-sequence-sort-key';
|
|
4
4
|
export declare const hasEffectDragType: (dataTransfer: DataTransfer) => boolean;
|
|
5
5
|
export declare const hasExplicitEffectDragType: (dataTransfer: DataTransfer) => boolean;
|
|
6
6
|
export declare const getEffectDragData: (dataTransfer: DataTransfer) => EffectDragData | null;
|
|
7
|
-
export declare const addEffectFromDragData: ({ clientId, dragData, fileName,
|
|
7
|
+
export declare const addEffectFromDragData: ({ clientId, dragData, fileName, nodePathInfo, selectItems, }: {
|
|
8
8
|
readonly clientId: string;
|
|
9
9
|
readonly dragData: EffectDragData;
|
|
10
10
|
readonly fileName: string;
|
|
11
|
-
readonly
|
|
11
|
+
readonly nodePathInfo: SequenceNodePathInfo;
|
|
12
|
+
readonly selectItems: (items: readonly import("@remotion/canvas").CanvasSelectionItem[], options?: {
|
|
13
|
+
readonly reveal?: boolean | undefined;
|
|
14
|
+
readonly revealInInspector?: boolean | undefined;
|
|
15
|
+
} | undefined) => void;
|
|
12
16
|
}) => Promise<void>;
|
|
13
|
-
export declare const addEffectToSequence: ({ clientId, effect, fileName,
|
|
17
|
+
export declare const addEffectToSequence: ({ clientId, effect, fileName, nodePathInfo, selectItems, }: {
|
|
14
18
|
readonly clientId: string;
|
|
15
19
|
readonly effect: EffectDefinition;
|
|
16
20
|
readonly fileName: string;
|
|
17
|
-
readonly
|
|
21
|
+
readonly nodePathInfo: SequenceNodePathInfo;
|
|
22
|
+
readonly selectItems: (items: readonly import("@remotion/canvas").CanvasSelectionItem[], options?: {
|
|
23
|
+
readonly reveal?: boolean | undefined;
|
|
24
|
+
readonly revealInInspector?: boolean | undefined;
|
|
25
|
+
} | undefined) => void;
|
|
18
26
|
}) => Promise<void>;
|
|
@@ -22,16 +22,17 @@ const getEffectDragData = (dataTransfer) => {
|
|
|
22
22
|
return (parsed === null || parsed === void 0 ? void 0 : parsed.type) === 'effect' ? parsed.data : null;
|
|
23
23
|
};
|
|
24
24
|
exports.getEffectDragData = getEffectDragData;
|
|
25
|
-
const addEffectFromDragData = ({ clientId, dragData, fileName,
|
|
25
|
+
const addEffectFromDragData = ({ clientId, dragData, fileName, nodePathInfo, selectItems, }) => {
|
|
26
26
|
return (0, exports.addEffectToSequence)({
|
|
27
27
|
clientId,
|
|
28
28
|
effect: dragData.effect,
|
|
29
29
|
fileName,
|
|
30
|
-
|
|
30
|
+
nodePathInfo,
|
|
31
|
+
selectItems,
|
|
31
32
|
});
|
|
32
33
|
};
|
|
33
34
|
exports.addEffectFromDragData = addEffectFromDragData;
|
|
34
|
-
const addEffectToSequence = async ({ clientId, effect, fileName,
|
|
35
|
+
const addEffectToSequence = async ({ clientId, effect, fileName, nodePathInfo, selectItems, }) => {
|
|
35
36
|
try {
|
|
36
37
|
const requiredPackage = (0, studio_shared_1.getRequiredPackageForEffectImportPath)(effect.importPath);
|
|
37
38
|
if ((0, browser_studio_operations_1.getBrowserStudioEffectOperations)() === null) {
|
|
@@ -39,7 +40,7 @@ const addEffectToSequence = async ({ clientId, effect, fileName, nodePath, }) =>
|
|
|
39
40
|
}
|
|
40
41
|
const result = await (0, effect_operations_api_1.addEffect)({
|
|
41
42
|
fileName,
|
|
42
|
-
sequenceNodePath:
|
|
43
|
+
sequenceNodePath: nodePathInfo.sequenceSubscriptionKey,
|
|
43
44
|
effectName: effect.name,
|
|
44
45
|
effectImportPath: effect.importPath,
|
|
45
46
|
effectConfig: effect.config,
|
|
@@ -47,7 +48,21 @@ const addEffectToSequence = async ({ clientId, effect, fileName, nodePath, }) =>
|
|
|
47
48
|
});
|
|
48
49
|
if (!result.success) {
|
|
49
50
|
(0, NotificationCenter_1.showNotification)(result.reason, 4000);
|
|
51
|
+
return;
|
|
50
52
|
}
|
|
53
|
+
selectItems([
|
|
54
|
+
{
|
|
55
|
+
type: 'sequence-effect',
|
|
56
|
+
nodePathInfo: {
|
|
57
|
+
...nodePathInfo,
|
|
58
|
+
sequenceSubscriptionKey: {
|
|
59
|
+
...nodePathInfo.sequenceSubscriptionKey,
|
|
60
|
+
nodePath: result.insertedEffect.nodePath,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
i: result.insertedEffect.effectIndex,
|
|
64
|
+
},
|
|
65
|
+
], { revealInInspector: true });
|
|
51
66
|
}
|
|
52
67
|
catch (err) {
|
|
53
68
|
(0, NotificationCenter_1.showNotification)(err.message, 4000);
|