@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
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { CaptionJob } from './caption-job-types';
|
|
2
3
|
import type { AnyRenderJob } from './context';
|
|
4
|
+
import type { VideoMattingJob } from './video-matting-job-types';
|
|
3
5
|
export declare const RenderQueueCancelButton: React.FC<{
|
|
4
|
-
readonly job: AnyRenderJob;
|
|
6
|
+
readonly job: AnyRenderJob | CaptionJob | VideoMattingJob;
|
|
5
7
|
}>;
|
|
@@ -10,18 +10,19 @@ const NotificationCenter_1 = require("../Notifications/NotificationCenter");
|
|
|
10
10
|
const actions_1 = require("./actions");
|
|
11
11
|
const context_1 = require("./context");
|
|
12
12
|
const RenderQueueCancelButton = ({ job }) => {
|
|
13
|
-
const isClientJob = (0, context_1.isClientRenderJob)(job);
|
|
14
13
|
const { cancelClientJob } = (0, react_1.useContext)(context_1.RenderQueueContext);
|
|
15
14
|
const onClick = (0, react_1.useCallback)((e) => {
|
|
16
15
|
e.stopPropagation();
|
|
17
|
-
if (
|
|
16
|
+
if (job.type === 'caption' ||
|
|
17
|
+
job.type === 'video-matting' ||
|
|
18
|
+
(0, context_1.isClientRenderJob)(job)) {
|
|
18
19
|
cancelClientJob(job.id);
|
|
19
20
|
return;
|
|
20
21
|
}
|
|
21
22
|
(0, actions_1.cancelRenderJob)(job).catch((err) => {
|
|
22
23
|
(0, NotificationCenter_1.showNotification)(`Could not cancel job: ${err.message}`, 2000);
|
|
23
24
|
});
|
|
24
|
-
}, [job,
|
|
25
|
+
}, [job, cancelClientJob]);
|
|
25
26
|
const icon = (0, react_1.useMemo)(() => {
|
|
26
27
|
return {
|
|
27
28
|
height: 14,
|
|
@@ -31,6 +32,12 @@ const RenderQueueCancelButton = ({ job }) => {
|
|
|
31
32
|
const renderAction = (0, react_1.useCallback)((color) => {
|
|
32
33
|
return (jsx_runtime_1.jsx("svg", { style: icon, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M367.2 412.5L99.5 144.8C77.1 176.1 64 214.5 64 256c0 106 86 192 192 192c41.5 0 79.9-13.1 111.2-35.5zm45.3-45.3C434.9 335.9 448 297.5 448 256c0-106-86-192-192-192c-41.5 0-79.9 13.1-111.2 35.5L412.5 367.2zM512 256c0 141.4-114.6 256-256 256S0 397.4 0 256S114.6 0 256 0S512 114.6 512 256z" }) }));
|
|
33
34
|
}, [icon]);
|
|
34
|
-
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Cancel", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label":
|
|
35
|
+
return (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Cancel", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { "aria-label": job.type === 'caption'
|
|
36
|
+
? 'Cancel transcription'
|
|
37
|
+
: job.type === 'video-matting'
|
|
38
|
+
? 'outName' in job
|
|
39
|
+
? 'Cancel background removal'
|
|
40
|
+
: 'Cancel video matting'
|
|
41
|
+
: 'Cancel render', renderAction: renderAction, onClick: onClick, variant: null }) }));
|
|
35
42
|
};
|
|
36
43
|
exports.RenderQueueCancelButton = RenderQueueCancelButton;
|
|
@@ -20,6 +20,6 @@ const RenderQueueOutputName = ({ job }) => {
|
|
|
20
20
|
}
|
|
21
21
|
return job.outName;
|
|
22
22
|
};
|
|
23
|
-
return (jsx_runtime_1.jsx("span", { style: style,
|
|
23
|
+
return (jsx_runtime_1.jsx("span", { role: "group", style: style, "aria-label": getTitle(), children: job.outName }));
|
|
24
24
|
};
|
|
25
25
|
exports.RenderQueueOutputName = RenderQueueOutputName;
|
|
@@ -27,6 +27,6 @@ const RenderQueueProgressMessage = ({ job }) => {
|
|
|
27
27
|
const message = isClientJob
|
|
28
28
|
? (0, client_render_progress_1.getClientRenderProgressMessage)(job.progress)
|
|
29
29
|
: job.progress.message;
|
|
30
|
-
return (jsx_runtime_1.jsx("button", { onClick: onClick, type: "button", style: outputLocation, tabIndex: tabIndex,
|
|
30
|
+
return (jsx_runtime_1.jsx("button", { onClick: onClick, type: "button", style: outputLocation, tabIndex: tabIndex, "aria-label": message, children: message }));
|
|
31
31
|
};
|
|
32
32
|
exports.RenderQueueProgressMessage = RenderQueueProgressMessage;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { CaptionJob } from './caption-job-types';
|
|
2
3
|
import type { AnyRenderJob } from './context';
|
|
4
|
+
import type { VideoMattingJob } from './video-matting-job-types';
|
|
3
5
|
export declare const RenderQueueRepeatItem: React.FC<{
|
|
4
|
-
readonly job: AnyRenderJob;
|
|
6
|
+
readonly job: AnyRenderJob | CaptionJob | VideoMattingJob;
|
|
5
7
|
}>;
|
|
@@ -11,10 +11,27 @@ const InlineAction_1 = require("../InlineAction");
|
|
|
11
11
|
const context_1 = require("./context");
|
|
12
12
|
const RenderQueueRepeatItem = ({ job }) => {
|
|
13
13
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.SetSelectedModalContext);
|
|
14
|
-
const isClientJob = (0, context_1.isClientRenderJob)(job);
|
|
15
14
|
const onClick = (0, react_1.useCallback)((e) => {
|
|
16
15
|
e.stopPropagation();
|
|
17
|
-
if (
|
|
16
|
+
if (job.type === 'caption') {
|
|
17
|
+
setSelectedModal({
|
|
18
|
+
type: 'transcribe',
|
|
19
|
+
src: job.src,
|
|
20
|
+
displayName: job.displayName,
|
|
21
|
+
audioStreamIndex: job.audioStreamIndex,
|
|
22
|
+
requestInit: job.requestInit,
|
|
23
|
+
target: job.target,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
else if (job.type === 'video-matting') {
|
|
27
|
+
setSelectedModal({
|
|
28
|
+
type: 'video-matting',
|
|
29
|
+
src: job.src,
|
|
30
|
+
displayName: job.displayName,
|
|
31
|
+
target: job.target,
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
else if ((0, context_1.isClientRenderJob)(job)) {
|
|
18
35
|
const retryPayload = (0, retry_payload_1.makeClientRetryPayload)(job);
|
|
19
36
|
setSelectedModal(retryPayload);
|
|
20
37
|
}
|
|
@@ -22,7 +39,7 @@ const RenderQueueRepeatItem = ({ job }) => {
|
|
|
22
39
|
const retryPayload = (0, retry_payload_1.makeRetryPayload)(job);
|
|
23
40
|
setSelectedModal(retryPayload);
|
|
24
41
|
}
|
|
25
|
-
}, [job,
|
|
42
|
+
}, [job, setSelectedModal]);
|
|
26
43
|
const icon = (0, react_1.useMemo)(() => {
|
|
27
44
|
return {
|
|
28
45
|
height: 12,
|
|
@@ -14,6 +14,10 @@ const use_select_asset_1 = require("../use-select-asset");
|
|
|
14
14
|
const CircularProgress_1 = require("./CircularProgress");
|
|
15
15
|
const context_1 = require("./context");
|
|
16
16
|
const item_style_1 = require("./item-style");
|
|
17
|
+
const QueueJobError_1 = require("./QueueJobError");
|
|
18
|
+
const RenderQueueCancelledMessage_1 = require("./RenderQueueCancelledMessage");
|
|
19
|
+
const RenderQueueItemCancelButton_1 = require("./RenderQueueItemCancelButton");
|
|
20
|
+
const RenderQueueRepeat_1 = require("./RenderQueueRepeat");
|
|
17
21
|
const SuccessIcon_1 = require("./SuccessIcon");
|
|
18
22
|
const container = {
|
|
19
23
|
borderRadius: 4,
|
|
@@ -50,12 +54,12 @@ const ellipsisIconStyle = {
|
|
|
50
54
|
style: { height: 12 },
|
|
51
55
|
};
|
|
52
56
|
const Status = ({ job }) => {
|
|
53
|
-
if (job.status === 'running') {
|
|
54
|
-
return (jsx_runtime_1.jsx("div", { style: statusIcon, role: "progressbar", "aria-label": "
|
|
57
|
+
if (job.status === 'running' || job.status === 'saving') {
|
|
58
|
+
return (jsx_runtime_1.jsx("div", { style: statusIcon, role: "progressbar", "aria-label": "Background removal progress", "aria-valuemin": 0, "aria-valuemax": 100, "aria-valuenow": Math.round(job.progress.value * 100), "aria-valuetext": job.progress.message, children: jsx_runtime_1.jsx(CircularProgress_1.CircularProgress, { progress: Math.max(0.07, job.progress.value) }) }));
|
|
55
59
|
}
|
|
56
60
|
if (job.status === 'done')
|
|
57
61
|
return jsx_runtime_1.jsx(SuccessIcon_1.SuccessIcon, {});
|
|
58
|
-
if (job.status === 'failed')
|
|
62
|
+
if (job.status === 'failed' || job.status === 'cancelled')
|
|
59
63
|
return (jsx_runtime_1.jsx("svg", { style: statusIcon, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: colors_1.FAIL_COLOR, d: "M0 160V352L160 512H352L512 352V160L352 0H160L0 160zm353.9 32-64 64 64 64L320 353.9l-64-64-64 64L158.1 320l64-64-64-64L192 158.1l64 64 64-64z" }) }));
|
|
60
64
|
return (jsx_runtime_1.jsx("svg", { style: statusIcon, viewBox: "0 0 512 512", children: jsx_runtime_1.jsx("path", { fill: colors_1.LIGHT_TEXT, d: "M256 512C114.6 512 0 397.4 0 256S114.6 0 256 0s256 114.6 256 256-114.6 256-256 256zM232 120v136c0 8 4 15.5 10.7 20l96 64 26.6-39.9-85.3-56.9V120z" }) }));
|
|
61
65
|
};
|
|
@@ -74,50 +78,41 @@ const VideoMattingQueueItem = ({ job, selected }) => {
|
|
|
74
78
|
WebkitUserSelect: 'none',
|
|
75
79
|
}), [done, hovered, selected]);
|
|
76
80
|
const messages = job.status === 'idle'
|
|
77
|
-
? ['Queued for
|
|
78
|
-
: job.status === 'running'
|
|
81
|
+
? ['Queued for background removal']
|
|
82
|
+
: job.status === 'running' || job.status === 'saving'
|
|
79
83
|
? [job.progress.message, job.progress.detail].filter((message) => message !== null)
|
|
80
84
|
: job.status === 'failed'
|
|
81
85
|
? [job.error.message]
|
|
82
|
-
:
|
|
86
|
+
: job.status === 'cancelled'
|
|
87
|
+
? ['Cancelled']
|
|
88
|
+
: [job.outName];
|
|
83
89
|
const tooltip = messages.join('\n');
|
|
84
90
|
const revealAsset = (0, react_1.useCallback)((assetName) => {
|
|
85
91
|
selectAsset(assetName);
|
|
86
92
|
(0, url_state_1.pushUrl)(`/assets/${assetName}`);
|
|
87
93
|
}, [selectAsset]);
|
|
94
|
+
const outputName = job.outName;
|
|
88
95
|
const onClick = (0, react_1.useCallback)(() => {
|
|
89
96
|
if (!done)
|
|
90
97
|
return;
|
|
91
|
-
revealAsset(
|
|
92
|
-
}, [done,
|
|
98
|
+
revealAsset(outputName);
|
|
99
|
+
}, [done, outputName, revealAsset]);
|
|
93
100
|
const revealItems = (0, react_1.useMemo)(() => {
|
|
94
101
|
return [
|
|
95
102
|
{
|
|
96
103
|
disabled: false,
|
|
97
|
-
id: 'reveal-
|
|
104
|
+
id: 'reveal-output',
|
|
98
105
|
keyHint: null,
|
|
99
|
-
label: 'Reveal
|
|
106
|
+
label: 'Reveal output',
|
|
100
107
|
leftItem: null,
|
|
101
|
-
onClick: () => revealAsset(
|
|
108
|
+
onClick: () => revealAsset(outputName),
|
|
102
109
|
quickSwitcherLabel: null,
|
|
103
110
|
subMenu: null,
|
|
104
111
|
type: 'item',
|
|
105
|
-
value: 'reveal-
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
disabled: false,
|
|
109
|
-
id: 'reveal-background',
|
|
110
|
-
keyHint: null,
|
|
111
|
-
label: 'Reveal background',
|
|
112
|
-
leftItem: null,
|
|
113
|
-
onClick: () => revealAsset(job.baseOutName),
|
|
114
|
-
quickSwitcherLabel: null,
|
|
115
|
-
subMenu: null,
|
|
116
|
-
type: 'item',
|
|
117
|
-
value: 'reveal-background',
|
|
112
|
+
value: 'reveal-output',
|
|
118
113
|
},
|
|
119
114
|
];
|
|
120
|
-
}, [
|
|
115
|
+
}, [outputName, revealAsset]);
|
|
121
116
|
const onRemove = (0, react_1.useCallback)((event) => {
|
|
122
117
|
event.stopPropagation();
|
|
123
118
|
removeVideoMattingJob(job.id);
|
|
@@ -125,7 +120,9 @@ const VideoMattingQueueItem = ({ job, selected }) => {
|
|
|
125
120
|
const renderRemove = (0, react_1.useCallback)((color) => (jsx_runtime_1.jsx("svg", { style: removeIcon, viewBox: "0 0 320 512", children: jsx_runtime_1.jsx("path", { fill: color, d: "M310.6 150.6 205.3 256l105.3 105.4-45.3 45.3L160 301.3 54.6 406.6 9.4 361.4 114.7 256 9.4 150.6l45.2-45.2L160 210.7l105.3-105.3z" }) })), []);
|
|
126
121
|
return (jsx_runtime_1.jsxs(layout_1.Row, { "data-render-queue-item": job.id, style: style, align: "center", onClick: onClick, onPointerEnter: () => setHovered(true), onPointerLeave: () => setHovered(false), children: [
|
|
127
122
|
jsx_runtime_1.jsx(Status, { job: job }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), jsx_runtime_1.jsxs("div", { style: right, children: [
|
|
128
|
-
jsx_runtime_1.jsx("div", { style: title, children: job.displayName }), jsx_runtime_1.jsx("div", { style: subtitles,
|
|
129
|
-
] }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), done ? (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Reveal
|
|
123
|
+
jsx_runtime_1.jsx("div", { style: title, children: job.displayName }), jsx_runtime_1.jsx("div", { role: "group", style: subtitles, "aria-label": tooltip, children: job.status === 'cancelled' ? (jsx_runtime_1.jsx(RenderQueueCancelledMessage_1.RenderQueueCancelledMessage, {})) : job.status === 'failed' ? (jsx_runtime_1.jsx(QueueJobError_1.QueueJobError, { error: job.error, modalTitle: "Background removal failed" })) : (messages.map((message) => (jsx_runtime_1.jsx("span", { style: subtitle, children: message }, message)))) })
|
|
124
|
+
] }), jsx_runtime_1.jsx(layout_1.Spacing, { x: 1 }), done ? (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Reveal output", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineDropdown_1.InlineDropdown, { renderAction: (color) => (jsx_runtime_1.jsx(ellipsis_1.EllipsisIcon, { fill: color, svgProps: ellipsisIconStyle })), "aria-label": "Reveal output", values: revealItems, variant: null }) })) : null, job.status === 'done' ||
|
|
125
|
+
job.status === 'failed' ||
|
|
126
|
+
job.status === 'cancelled' ? (jsx_runtime_1.jsx(RenderQueueRepeat_1.RenderQueueRepeatItem, { job: job })) : null, job.status === 'running' ? (jsx_runtime_1.jsx(RenderQueueItemCancelButton_1.RenderQueueCancelButton, { job: job })) : job.status === 'saving' ? null : (jsx_runtime_1.jsx(ActionTooltip_1.ActionTooltip, { label: "Clear", shortcut: null, delay: 800, dismissOnClick: true, children: jsx_runtime_1.jsx(InlineAction_1.InlineAction, { renderAction: renderRemove, onClick: onRemove, "aria-label": "Clear", variant: null }) }))] }));
|
|
130
127
|
};
|
|
131
128
|
exports.VideoMattingQueueItem = VideoMattingQueueItem;
|
|
@@ -4,41 +4,51 @@ exports.VideoMattingQueueProcessor = void 0;
|
|
|
4
4
|
const video_matting_1 = require("@remotion/video-matting");
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const write_static_file_1 = require("../../api/write-static-file");
|
|
7
|
+
const browser_studio_operations_1 = require("../../helpers/browser-studio-operations");
|
|
8
|
+
const call_api_1 = require("../call-api");
|
|
7
9
|
const context_1 = require("./context");
|
|
8
10
|
const load_model_for_job_1 = require("./load-model-for-job");
|
|
9
11
|
const VideoMattingQueueProcessor = () => {
|
|
10
|
-
const { markVideoMattingJobDone, markVideoMattingJobFailed, setProcessVideoMattingJobCallback, updateVideoMattingJobProgress, } = (0, react_1.useContext)(context_1.RenderQueueContext);
|
|
12
|
+
const { markVideoMattingJobDone, markVideoMattingJobFailed, markVideoMattingJobCancelled, markVideoMattingJobSaving, getAbortController, setProcessVideoMattingJobCallback, updateVideoMattingJobProgress, } = (0, react_1.useContext)(context_1.RenderQueueContext);
|
|
11
13
|
const processJob = (0, react_1.useCallback)(async (job) => {
|
|
12
|
-
|
|
14
|
+
const { signal } = getAbortController(job.id);
|
|
15
|
+
let output = null;
|
|
13
16
|
let processingError = null;
|
|
14
17
|
try {
|
|
18
|
+
signal.throwIfAborted();
|
|
15
19
|
updateVideoMattingJobProgress(job.id, {
|
|
16
20
|
detail: null,
|
|
17
21
|
message: 'Checking WebGPU support...',
|
|
18
22
|
value: 0,
|
|
19
23
|
});
|
|
20
24
|
const support = await (0, video_matting_1.canUseVideoMatting)({ model: job.model });
|
|
25
|
+
signal.throwIfAborted();
|
|
21
26
|
if (!support.supported) {
|
|
22
27
|
throw new Error(support.detailedReason);
|
|
23
28
|
}
|
|
24
29
|
await (0, load_model_for_job_1.loadModelForJob)({
|
|
30
|
+
signal,
|
|
25
31
|
model: job.model,
|
|
26
32
|
progressStart: 0,
|
|
27
33
|
progressSpan: 0.2,
|
|
28
34
|
isModelCached: (model) => (0, video_matting_1.isVideoMattingModelCached)({ model }),
|
|
29
|
-
loadModel: (model, onProgress) =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
35
|
+
loadModel: async (model, onProgress) => {
|
|
36
|
+
await (0, video_matting_1.downloadVideoMattingModel)({
|
|
37
|
+
signal,
|
|
38
|
+
model,
|
|
39
|
+
onProgress: (progress) => onProgress(progress.progress),
|
|
40
|
+
});
|
|
41
|
+
await (0, video_matting_1.loadVideoMattingModel)({ model, signal });
|
|
42
|
+
},
|
|
33
43
|
updateProgress: (progress) => updateVideoMattingJobProgress(job.id, {
|
|
34
44
|
...progress,
|
|
35
45
|
detail: null,
|
|
36
46
|
}),
|
|
37
47
|
});
|
|
38
|
-
|
|
48
|
+
const mattingOptions = {
|
|
49
|
+
signal,
|
|
39
50
|
src: job.src,
|
|
40
51
|
model: job.model,
|
|
41
|
-
audio: job.audio,
|
|
42
52
|
videoBitrate: job.videoBitrate,
|
|
43
53
|
onProgress: (progress) => {
|
|
44
54
|
var _a;
|
|
@@ -47,51 +57,81 @@ const VideoMattingQueueProcessor = () => {
|
|
|
47
57
|
? `Processed ${progress.processedFrames} ${progress.processedFrames === 1 ? 'frame' : 'frames'}`
|
|
48
58
|
: `Processed ${progress.processedFrames} ${progress.processedFrames === 1 ? 'frame' : 'frames'} · ${Math.round(progress.progress * 100)}%`,
|
|
49
59
|
message: progress.stage === 'finalizing'
|
|
50
|
-
? 'Finalizing video
|
|
51
|
-
: '
|
|
60
|
+
? 'Finalizing video...'
|
|
61
|
+
: 'Removing background...',
|
|
52
62
|
value: 0.2 + ((_a = progress.progress) !== null && _a !== void 0 ? _a : 1) * 0.65,
|
|
53
63
|
});
|
|
54
64
|
},
|
|
65
|
+
};
|
|
66
|
+
output = await video_matting_1.VideoMattingInternals.removeVideoBackground({
|
|
67
|
+
...mattingOptions,
|
|
68
|
+
audio: job.audio,
|
|
55
69
|
});
|
|
70
|
+
if (output === null) {
|
|
71
|
+
throw new Error('Video matting produced no output.');
|
|
72
|
+
}
|
|
73
|
+
signal.throwIfAborted();
|
|
56
74
|
updateVideoMattingJobProgress(job.id, {
|
|
57
75
|
detail: null,
|
|
58
|
-
message: 'Saving video
|
|
76
|
+
message: 'Saving video...',
|
|
59
77
|
value: 0.88,
|
|
60
78
|
});
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
79
|
+
const video = await output.video.getBlob();
|
|
80
|
+
signal.throwIfAborted();
|
|
81
|
+
markVideoMattingJobSaving(job.id);
|
|
82
|
+
await video
|
|
83
|
+
.arrayBuffer()
|
|
84
|
+
.then((contents) => (0, write_static_file_1.writeStaticFile)({ contents, filePath: job.outName }));
|
|
85
|
+
if (job.target !== null) {
|
|
86
|
+
updateVideoMattingJobProgress(job.id, {
|
|
87
|
+
detail: null,
|
|
88
|
+
message: 'Replacing video source...',
|
|
89
|
+
value: 0.97,
|
|
90
|
+
});
|
|
91
|
+
const browserStudioOperations = (0, browser_studio_operations_1.getBrowserStudioOperations)();
|
|
92
|
+
const request = {
|
|
93
|
+
fileName: job.target.fileName,
|
|
94
|
+
nodePath: job.target.nodePath.nodePath,
|
|
95
|
+
src: job.outName,
|
|
96
|
+
};
|
|
97
|
+
const replaceSource = browserStudioOperations === null || browserStudioOperations === void 0 ? void 0 : browserStudioOperations.replaceVideoSource;
|
|
98
|
+
if (browserStudioOperations && !replaceSource) {
|
|
99
|
+
throw new Error('Browser Studio cannot replace the video source.');
|
|
100
|
+
}
|
|
101
|
+
const response = replaceSource
|
|
102
|
+
? await replaceSource(request)
|
|
103
|
+
: await (0, call_api_1.callApi)('/api/replace-video-source', request);
|
|
104
|
+
if (!response.success) {
|
|
105
|
+
throw new Error(response.reason);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
73
108
|
}
|
|
74
109
|
catch (error) {
|
|
75
110
|
processingError =
|
|
76
111
|
error instanceof Error ? error : new Error(String(error));
|
|
77
112
|
}
|
|
113
|
+
if (output) {
|
|
114
|
+
await Promise.allSettled([output.video.dispose()]);
|
|
115
|
+
}
|
|
78
116
|
try {
|
|
79
|
-
await Promise.all([
|
|
80
|
-
outputs === null || outputs === void 0 ? void 0 : outputs.base.dispose(),
|
|
81
|
-
outputs === null || outputs === void 0 ? void 0 : outputs.foreground.dispose(),
|
|
82
|
-
]);
|
|
83
117
|
await (0, video_matting_1.disposeVideoMattingModel)({ model: job.model });
|
|
84
118
|
}
|
|
85
119
|
catch (_a) {
|
|
86
120
|
// Cleanup errors must not hide successfully written outputs.
|
|
87
121
|
}
|
|
88
|
-
if (
|
|
122
|
+
if (signal.aborted) {
|
|
123
|
+
markVideoMattingJobCancelled(job.id);
|
|
124
|
+
}
|
|
125
|
+
else if (processingError) {
|
|
89
126
|
markVideoMattingJobFailed(job.id, processingError);
|
|
90
127
|
}
|
|
91
128
|
else {
|
|
92
129
|
markVideoMattingJobDone(job.id);
|
|
93
130
|
}
|
|
94
131
|
}, [
|
|
132
|
+
getAbortController,
|
|
133
|
+
markVideoMattingJobCancelled,
|
|
134
|
+
markVideoMattingJobSaving,
|
|
95
135
|
markVideoMattingJobDone,
|
|
96
136
|
markVideoMattingJobFailed,
|
|
97
137
|
updateVideoMattingJobProgress,
|
|
@@ -32,12 +32,16 @@ type RenderQueueContextType = {
|
|
|
32
32
|
updateCaptionJobProgress: (jobId: string, progress: CaptionJobProgress) => void;
|
|
33
33
|
markCaptionJobDone: (jobId: string, captionCount: number) => void;
|
|
34
34
|
markCaptionJobFailed: (jobId: string, error: Error) => void;
|
|
35
|
+
markCaptionJobCancelled: (jobId: string) => void;
|
|
36
|
+
markCaptionJobSaving: (jobId: string) => void;
|
|
35
37
|
removeCaptionJob: (jobId: string) => void;
|
|
36
38
|
setProcessCaptionJobCallback: (callback: ((job: CaptionJob) => Promise<void>) | null) => void;
|
|
37
39
|
addVideoMattingJob: (params: AddVideoMattingJobParams) => string;
|
|
38
40
|
updateVideoMattingJobProgress: (jobId: string, progress: VideoMattingJobProgress) => void;
|
|
39
41
|
markVideoMattingJobDone: (jobId: string) => void;
|
|
40
42
|
markVideoMattingJobFailed: (jobId: string, error: Error) => void;
|
|
43
|
+
markVideoMattingJobCancelled: (jobId: string) => void;
|
|
44
|
+
markVideoMattingJobSaving: (jobId: string) => void;
|
|
41
45
|
removeVideoMattingJob: (jobId: string) => void;
|
|
42
46
|
setProcessVideoMattingJobCallback: (callback: ((job: VideoMattingJob) => Promise<void>) | null) => void;
|
|
43
47
|
getAbortController: (jobId: string) => AbortController;
|
|
@@ -68,12 +68,16 @@ exports.RenderQueueContext = react_1.default.createContext({
|
|
|
68
68
|
updateCaptionJobProgress: noop,
|
|
69
69
|
markCaptionJobDone: noop,
|
|
70
70
|
markCaptionJobFailed: noop,
|
|
71
|
+
markCaptionJobCancelled: noop,
|
|
72
|
+
markCaptionJobSaving: noop,
|
|
71
73
|
removeCaptionJob: noop,
|
|
72
74
|
setProcessCaptionJobCallback: noop,
|
|
73
75
|
addVideoMattingJob: noopString,
|
|
74
76
|
updateVideoMattingJobProgress: noop,
|
|
75
77
|
markVideoMattingJobDone: noop,
|
|
76
78
|
markVideoMattingJobFailed: noop,
|
|
79
|
+
markVideoMattingJobCancelled: noop,
|
|
80
|
+
markVideoMattingJobSaving: noop,
|
|
77
81
|
removeVideoMattingJob: noop,
|
|
78
82
|
setProcessVideoMattingJobCallback: noop,
|
|
79
83
|
getAbortController: () => new AbortController(),
|
|
@@ -89,8 +93,12 @@ const RenderQueueContextProvider = ({ children }) => {
|
|
|
89
93
|
const hasActiveLocalJob = clientJobs.some((job) => job.status === 'idle' ||
|
|
90
94
|
job.status === 'running' ||
|
|
91
95
|
job.status === 'saving') ||
|
|
92
|
-
captionJobs.some((job) => job.status === 'idle' ||
|
|
93
|
-
|
|
96
|
+
captionJobs.some((job) => job.status === 'idle' ||
|
|
97
|
+
job.status === 'running' ||
|
|
98
|
+
job.status === 'saving') ||
|
|
99
|
+
videoMattingJobs.some((job) => job.status === 'idle' ||
|
|
100
|
+
job.status === 'running' ||
|
|
101
|
+
job.status === 'saving');
|
|
94
102
|
const [currentlyProcessing, setCurrentlyProcessing] = (0, react_1.useState)(null);
|
|
95
103
|
const lastLocalJobStartedAt = (0, react_1.useRef)(clientJobs.reduce((latest, job) => Math.max(latest, job.startedAt), 0));
|
|
96
104
|
const processJobCallbackRef = (0, react_1.useRef)(null);
|
|
@@ -154,7 +162,9 @@ const RenderQueueContextProvider = ({ children }) => {
|
|
|
154
162
|
status: 'running',
|
|
155
163
|
progress: {
|
|
156
164
|
detail: null,
|
|
157
|
-
message: '
|
|
165
|
+
message: 'outName' in job
|
|
166
|
+
? 'Starting background removal...'
|
|
167
|
+
: 'Starting video matting...',
|
|
158
168
|
value: 0,
|
|
159
169
|
},
|
|
160
170
|
}
|
|
@@ -283,17 +293,20 @@ const RenderQueueContextProvider = ({ children }) => {
|
|
|
283
293
|
return id;
|
|
284
294
|
}, [getLocalJobStartedAt]);
|
|
285
295
|
const updateCaptionJobProgress = (0, react_1.useCallback)((jobId, progress) => {
|
|
286
|
-
setCaptionJobs((prev) => prev.map((job) => job.id === jobId
|
|
287
|
-
|
|
296
|
+
setCaptionJobs((prev) => prev.map((job) => job.id === jobId &&
|
|
297
|
+
(job.status === 'running' || job.status === 'saving')
|
|
298
|
+
? { ...job, progress }
|
|
288
299
|
: job));
|
|
289
300
|
}, []);
|
|
290
301
|
const markCaptionJobDone = (0, react_1.useCallback)((jobId, captionCount) => {
|
|
302
|
+
(0, client_render_queue_1.deleteAbortController)(jobId);
|
|
291
303
|
setCaptionJobs((prev) => prev.map((job) => job.id === jobId
|
|
292
304
|
? { ...job, status: 'done', captionCount }
|
|
293
305
|
: job));
|
|
294
306
|
setCurrentlyProcessing((current) => (current === jobId ? null : current));
|
|
295
307
|
}, []);
|
|
296
308
|
const markCaptionJobFailed = (0, react_1.useCallback)((jobId, error) => {
|
|
309
|
+
(0, client_render_queue_1.deleteAbortController)(jobId);
|
|
297
310
|
setCaptionJobs((prev) => prev.map((job) => job.id === jobId
|
|
298
311
|
? {
|
|
299
312
|
...job,
|
|
@@ -303,12 +316,24 @@ const RenderQueueContextProvider = ({ children }) => {
|
|
|
303
316
|
: job));
|
|
304
317
|
setCurrentlyProcessing((current) => (current === jobId ? null : current));
|
|
305
318
|
}, []);
|
|
319
|
+
const markCaptionJobCancelled = (0, react_1.useCallback)((jobId) => {
|
|
320
|
+
(0, client_render_queue_1.deleteAbortController)(jobId);
|
|
321
|
+
setCaptionJobs((prev) => prev.map((job) => job.id === jobId ? { ...job, status: 'cancelled' } : job));
|
|
322
|
+
setCurrentlyProcessing((current) => (current === jobId ? null : current));
|
|
323
|
+
}, []);
|
|
324
|
+
const markCaptionJobSaving = (0, react_1.useCallback)((jobId) => {
|
|
325
|
+
setCaptionJobs((prev) => prev.map((job) => job.id === jobId && job.status === 'running'
|
|
326
|
+
? { ...job, status: 'saving' }
|
|
327
|
+
: job));
|
|
328
|
+
}, []);
|
|
306
329
|
const removeCaptionJob = (0, react_1.useCallback)((jobId) => {
|
|
307
330
|
setCaptionJobs((prev) => {
|
|
308
331
|
const jobToRemove = prev.find((job) => job.id === jobId);
|
|
309
|
-
if ((jobToRemove === null || jobToRemove === void 0 ? void 0 : jobToRemove.status) === 'running'
|
|
332
|
+
if ((jobToRemove === null || jobToRemove === void 0 ? void 0 : jobToRemove.status) === 'running' ||
|
|
333
|
+
(jobToRemove === null || jobToRemove === void 0 ? void 0 : jobToRemove.status) === 'saving') {
|
|
310
334
|
return prev;
|
|
311
335
|
}
|
|
336
|
+
(0, client_render_queue_1.deleteAbortController)(jobId);
|
|
312
337
|
return prev.filter((job) => job.id !== jobId);
|
|
313
338
|
});
|
|
314
339
|
}, []);
|
|
@@ -333,13 +358,18 @@ const RenderQueueContextProvider = ({ children }) => {
|
|
|
333
358
|
return id;
|
|
334
359
|
}, [getLocalJobStartedAt]);
|
|
335
360
|
const updateVideoMattingJobProgress = (0, react_1.useCallback)((jobId, progress) => {
|
|
336
|
-
setVideoMattingJobs((prev) => prev.map((job) => job.id === jobId
|
|
361
|
+
setVideoMattingJobs((prev) => prev.map((job) => job.id === jobId &&
|
|
362
|
+
(job.status === 'running' || job.status === 'saving')
|
|
363
|
+
? { ...job, progress }
|
|
364
|
+
: job));
|
|
337
365
|
}, []);
|
|
338
366
|
const markVideoMattingJobDone = (0, react_1.useCallback)((jobId) => {
|
|
367
|
+
(0, client_render_queue_1.deleteAbortController)(jobId);
|
|
339
368
|
setVideoMattingJobs((prev) => prev.map((job) => (job.id === jobId ? { ...job, status: 'done' } : job)));
|
|
340
369
|
setCurrentlyProcessing((current) => (current === jobId ? null : current));
|
|
341
370
|
}, []);
|
|
342
371
|
const markVideoMattingJobFailed = (0, react_1.useCallback)((jobId, error) => {
|
|
372
|
+
(0, client_render_queue_1.deleteAbortController)(jobId);
|
|
343
373
|
setVideoMattingJobs((prev) => prev.map((job) => job.id === jobId
|
|
344
374
|
? {
|
|
345
375
|
...job,
|
|
@@ -349,12 +379,24 @@ const RenderQueueContextProvider = ({ children }) => {
|
|
|
349
379
|
: job));
|
|
350
380
|
setCurrentlyProcessing((current) => (current === jobId ? null : current));
|
|
351
381
|
}, []);
|
|
382
|
+
const markVideoMattingJobCancelled = (0, react_1.useCallback)((jobId) => {
|
|
383
|
+
(0, client_render_queue_1.deleteAbortController)(jobId);
|
|
384
|
+
setVideoMattingJobs((prev) => prev.map((job) => job.id === jobId ? { ...job, status: 'cancelled' } : job));
|
|
385
|
+
setCurrentlyProcessing((current) => (current === jobId ? null : current));
|
|
386
|
+
}, []);
|
|
387
|
+
const markVideoMattingJobSaving = (0, react_1.useCallback)((jobId) => {
|
|
388
|
+
setVideoMattingJobs((prev) => prev.map((job) => job.id === jobId && job.status === 'running'
|
|
389
|
+
? { ...job, status: 'saving' }
|
|
390
|
+
: job));
|
|
391
|
+
}, []);
|
|
352
392
|
const removeVideoMattingJob = (0, react_1.useCallback)((jobId) => {
|
|
353
393
|
setVideoMattingJobs((prev) => {
|
|
354
394
|
const jobToRemove = prev.find((job) => job.id === jobId);
|
|
355
|
-
if ((jobToRemove === null || jobToRemove === void 0 ? void 0 : jobToRemove.status) === 'running'
|
|
395
|
+
if ((jobToRemove === null || jobToRemove === void 0 ? void 0 : jobToRemove.status) === 'running' ||
|
|
396
|
+
(jobToRemove === null || jobToRemove === void 0 ? void 0 : jobToRemove.status) === 'saving') {
|
|
356
397
|
return prev;
|
|
357
398
|
}
|
|
399
|
+
(0, client_render_queue_1.deleteAbortController)(jobId);
|
|
358
400
|
return prev.filter((job) => job.id !== jobId);
|
|
359
401
|
});
|
|
360
402
|
}, []);
|
|
@@ -408,12 +450,16 @@ const RenderQueueContextProvider = ({ children }) => {
|
|
|
408
450
|
updateCaptionJobProgress,
|
|
409
451
|
markCaptionJobDone,
|
|
410
452
|
markCaptionJobFailed,
|
|
453
|
+
markCaptionJobCancelled,
|
|
454
|
+
markCaptionJobSaving,
|
|
411
455
|
removeCaptionJob,
|
|
412
456
|
setProcessCaptionJobCallback,
|
|
413
457
|
addVideoMattingJob,
|
|
414
458
|
updateVideoMattingJobProgress,
|
|
415
459
|
markVideoMattingJobDone,
|
|
416
460
|
markVideoMattingJobFailed,
|
|
461
|
+
markVideoMattingJobCancelled,
|
|
462
|
+
markVideoMattingJobSaving,
|
|
417
463
|
removeVideoMattingJob,
|
|
418
464
|
setProcessVideoMattingJobCallback,
|
|
419
465
|
getAbortController: client_render_queue_1.getAbortController,
|
|
@@ -438,12 +484,16 @@ const RenderQueueContextProvider = ({ children }) => {
|
|
|
438
484
|
updateCaptionJobProgress,
|
|
439
485
|
markCaptionJobDone,
|
|
440
486
|
markCaptionJobFailed,
|
|
487
|
+
markCaptionJobCancelled,
|
|
488
|
+
markCaptionJobSaving,
|
|
441
489
|
removeCaptionJob,
|
|
442
490
|
setProcessCaptionJobCallback,
|
|
443
491
|
addVideoMattingJob,
|
|
444
492
|
updateVideoMattingJobProgress,
|
|
445
493
|
markVideoMattingJobDone,
|
|
446
494
|
markVideoMattingJobFailed,
|
|
495
|
+
markVideoMattingJobCancelled,
|
|
496
|
+
markVideoMattingJobSaving,
|
|
447
497
|
removeVideoMattingJob,
|
|
448
498
|
setProcessVideoMattingJobCallback,
|
|
449
499
|
]);
|
|
@@ -115,8 +115,7 @@ const RenderQueue = () => {
|
|
|
115
115
|
}
|
|
116
116
|
if ((0, video_matting_job_types_1.isVideoMattingJob)(job) &&
|
|
117
117
|
job.status === 'done' &&
|
|
118
|
-
|
|
119
|
-
canvasContent.asset === job.foregroundOutName)) {
|
|
118
|
+
canvasContent.asset === job.outName) {
|
|
120
119
|
return i;
|
|
121
120
|
}
|
|
122
121
|
}
|
|
@@ -125,7 +124,7 @@ const RenderQueue = () => {
|
|
|
125
124
|
}, [allJobs, canvasContent]);
|
|
126
125
|
if (jobCount === 0) {
|
|
127
126
|
return (jsx_runtime_1.jsxs("div", { style: explainer, children: [
|
|
128
|
-
jsx_runtime_1.jsx(layout_1.Spacing, { y: 5 }), jsx_runtime_1.jsx("div", { style: errorExplanation, children: "Renders, transcriptions and
|
|
127
|
+
jsx_runtime_1.jsx(layout_1.Spacing, { y: 5 }), jsx_runtime_1.jsx("div", { style: errorExplanation, children: "Renders, transcriptions and background removal jobs will show up here." }), jsx_runtime_1.jsx(layout_1.Spacing, { y: 2, block: true })
|
|
129
128
|
] }));
|
|
130
129
|
}
|
|
131
130
|
return (jsx_runtime_1.jsx("div", { ref: divRef, style: renderQueue, className: ['css-reset', is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME].join(' '), children: allJobs.map((job, index) => {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export declare const loadModelForJob: <Model extends string>({ isModelCached, loadModel, model, progressSpan, progressStart, updateProgress, }: {
|
|
1
|
+
export declare const loadModelForJob: <Model extends string>({ isModelCached, loadModel, model, signal, progressSpan, progressStart, updateProgress, }: {
|
|
2
2
|
isModelCached: (model: Model) => Promise<boolean>;
|
|
3
3
|
loadModel: (model: Model, onProgress: (progress: number | null) => void) => Promise<unknown>;
|
|
4
4
|
model: Model;
|
|
5
|
+
signal: AbortSignal;
|
|
5
6
|
progressSpan: number;
|
|
6
7
|
progressStart: number;
|
|
7
8
|
updateProgress: (progress: {
|
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.loadModelForJob = void 0;
|
|
4
|
-
const loadModelForJob = async ({ isModelCached, loadModel, model, progressSpan, progressStart, updateProgress, }) => {
|
|
4
|
+
const loadModelForJob = async ({ isModelCached, loadModel, model, signal, progressSpan, progressStart, updateProgress, }) => {
|
|
5
|
+
signal.throwIfAborted();
|
|
5
6
|
const cached = await isModelCached(model);
|
|
7
|
+
signal.throwIfAborted();
|
|
6
8
|
await loadModel(model, (progress) => {
|
|
9
|
+
signal.throwIfAborted();
|
|
7
10
|
const percentage = progress === null ? '' : ` ${Math.round(progress * 100)}%`;
|
|
8
11
|
updateProgress({
|
|
9
12
|
message: `${cached ? 'Loading' : 'Downloading'} ${model}${percentage}`,
|
|
10
13
|
value: progressStart + (progress !== null && progress !== void 0 ? progress : 0) * progressSpan,
|
|
11
14
|
});
|
|
12
15
|
});
|
|
16
|
+
signal.throwIfAborted();
|
|
13
17
|
};
|
|
14
18
|
exports.loadModelForJob = loadModelForJob;
|