@remotion/studio 4.0.526 → 4.0.528
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AgentPrompt.js +1 -2
- package/dist/components/AudioWaveform.d.ts +1 -0
- package/dist/components/AudioWaveform.js +10 -14
- package/dist/components/Canvas.js +88 -26
- package/dist/components/CanvasCaptureDropHandler.js +63 -0
- package/dist/components/CanvasOrLoading.js +10 -2
- package/dist/components/CodeFrame.js +1 -1
- package/dist/components/ColorPicker/checker.d.ts +1 -1
- package/dist/components/CompositionSelectorItem.js +1 -0
- package/dist/components/CurrentAsset.js +4 -2
- package/dist/components/EditorRuler/Ruler.js +6 -3
- package/dist/components/EffectPickerModal.js +69 -43
- package/dist/components/ElementInstallConfirmation.js +3 -3
- package/dist/components/ElementLibrariesSettings.d.ts +2 -0
- package/dist/components/ElementLibrariesSettings.js +200 -0
- package/dist/components/InitialCompositionLoader.js +4 -2
- package/dist/components/InlineDropdown.js +26 -2
- package/dist/components/InlineEditableTitle.js +1 -0
- package/dist/components/InspectorOpenInEditor.js +13 -0
- package/dist/components/InspectorPanel/AlignmentControls.js +28 -9
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +2 -1
- package/dist/components/InspectorPanel/CompositionInspector.js +3 -3
- package/dist/components/InspectorPanel/CompositionMetadata.js +4 -0
- package/dist/components/InspectorPanel/EasingInspector.js +6 -2
- package/dist/components/InspectorPanel/ElementLibraryButton.js +2 -1
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
- package/dist/components/InspectorPanel/KeyframeInspector.js +28 -24
- package/dist/components/InspectorPanel/MultiSequenceInspector.js +32 -1
- package/dist/components/InspectorPanel/MultiSequenceNumberField.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +70 -2
- package/dist/components/InspectorPanel/SequenceWrapAction.d.ts +8 -0
- package/dist/components/InspectorPanel/SequenceWrapAction.js +151 -0
- package/dist/components/InspectorPanel/common.js +1 -0
- package/dist/components/InspectorPanel/easing-inspector-selection.d.ts +2 -1
- package/dist/components/InspectorPanel/easing-inspector-selection.js +4 -3
- package/dist/components/InspectorPanel/keyframe-inspector-frame.d.ts +2 -1
- package/dist/components/InspectorPanel/keyframe-inspector-frame.js +2 -2
- package/dist/components/InspectorPanel/styles.js +2 -0
- package/dist/components/InspectorPanel/use-composition-actions.js +1 -0
- package/dist/components/InspectorSequenceSection.d.ts +1 -0
- package/dist/components/InspectorSequenceSection.js +7 -5
- package/dist/components/InspectorSourceLocation.js +3 -0
- package/dist/components/KeyboardShortcutsSettings.js +1 -1
- package/dist/components/Menu/styles.d.ts +2 -2
- package/dist/components/MenuBuildIndicator.js +1 -0
- package/dist/components/Modals.js +7 -6
- package/dist/components/ModelManager.js +10 -9
- package/dist/components/NewComposition/CancelButton.js +11 -5
- package/dist/components/NewComposition/InputDragger.d.ts +3 -1
- package/dist/components/NewComposition/InputDragger.js +28 -9
- package/dist/components/NewComposition/NewComposition.js +7 -6
- package/dist/components/NewComposition/RemInput.d.ts +1 -1
- package/dist/components/NewComposition/menu-typeahead.js +1 -1
- package/dist/components/Preview.js +4 -0
- package/dist/components/QuickSwitcher/ExplorerQuickSwitcherTrigger.js +1 -0
- package/dist/components/QuickSwitcher/QuickSwitcherContent.js +1 -0
- package/dist/components/RadioButton.js +1 -0
- package/dist/components/RenderModal/DataEditor.js +4 -1
- package/dist/components/RenderModal/SchemaEditor/create-zod-values.js +1 -2
- package/dist/components/RenderModal/WebRenderModalPicture.js +1 -2
- package/dist/components/RenderQueue/CaptionQueueItem.js +19 -7
- package/dist/components/RenderQueue/CaptionQueueProcessor.js +65 -15
- package/dist/components/RenderQueue/QueueJobError.d.ts +8 -0
- package/dist/components/RenderQueue/QueueJobError.js +24 -0
- package/dist/components/RenderQueue/QueueJobErrorModal.d.ts +8 -0
- package/dist/components/RenderQueue/QueueJobErrorModal.js +63 -0
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.d.ts +3 -1
- package/dist/components/RenderQueue/RenderQueueItemCancelButton.js +11 -4
- package/dist/components/RenderQueue/RenderQueueRepeat.d.ts +3 -1
- package/dist/components/RenderQueue/RenderQueueRepeat.js +20 -3
- package/dist/components/RenderQueue/VideoMattingQueueItem.js +25 -27
- package/dist/components/RenderQueue/VideoMattingQueueProcessor.js +68 -28
- package/dist/components/RenderQueue/caption-job-types.d.ts +9 -1
- package/dist/components/RenderQueue/context.d.ts +4 -0
- package/dist/components/RenderQueue/context.js +58 -8
- package/dist/components/RenderQueue/index.js +3 -3
- package/dist/components/RenderQueue/load-model-for-job.d.ts +2 -1
- package/dist/components/RenderQueue/load-model-for-job.js +5 -1
- package/dist/components/RenderQueue/video-matting-job-types.d.ts +13 -6
- package/dist/components/RendersTab.js +2 -0
- package/dist/components/SelectedOutlineCropControls.js +2 -1
- package/dist/components/SelectedOutlineEditingHandles.js +9 -2
- package/dist/components/SelectedOutlineElement.js +9 -3
- package/dist/components/SelectedOutlineKeyboardControls.d.ts +2 -4
- package/dist/components/SelectedOutlineKeyboardControls.js +4 -22
- package/dist/components/SelectedOutlineOverlay.js +152 -106
- package/dist/components/SelectedOutlinePathPoints.d.ts +8 -0
- package/dist/components/SelectedOutlinePathPoints.js +433 -0
- package/dist/components/SelectedOutlinePolygon.js +21 -46
- package/dist/components/SelectedOutlineRenderer.d.ts +3 -5
- package/dist/components/SelectedOutlineRenderer.js +32 -136
- package/dist/components/SelectedOutlineSnapIndicators.d.ts +6 -0
- package/dist/components/SelectedOutlineSnapIndicators.js +16 -12
- package/dist/components/SelectedOutlineTransformOriginHandle.js +3 -2
- package/dist/components/SelectedOutlineUvControls.js +12 -7
- package/dist/components/SequencePropsSubscriptionProvider.d.ts +3 -0
- package/dist/components/SequencePropsSubscriptionProvider.js +8 -6
- package/dist/components/SettingsModal.js +30 -3
- package/dist/components/SettingsModalFooter.d.ts +1 -0
- package/dist/components/SettingsModalFooter.js +7 -3
- package/dist/components/ShowOutlinesProvider.js +1 -1
- package/dist/components/SkillsSettings.d.ts +0 -1
- package/dist/components/SkillsSettings.js +13 -14
- package/dist/components/Splitter/SplitterElement.js +1 -2
- package/dist/components/TimeValue.js +1 -1
- package/dist/components/Timeline/LoopedTimelineIndicators.d.ts +1 -0
- package/dist/components/Timeline/LoopedTimelineIndicators.js +7 -6
- package/dist/components/Timeline/TimelineArrayField.js +1 -1
- package/dist/components/Timeline/TimelineClipboardKeybindings.js +0 -1
- package/dist/components/Timeline/TimelineColorField.js +1 -1
- package/dist/components/Timeline/TimelineDeleteKeybindings.js +6 -9
- package/dist/components/Timeline/TimelineDragHandler.js +1 -1
- package/dist/components/Timeline/TimelineEffectItem.js +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +12 -5
- package/dist/components/Timeline/TimelineExpandArrowButton.js +1 -0
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedRow.js +6 -4
- package/dist/components/Timeline/TimelineExpandedSection.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedSection.js +2 -2
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +1 -0
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +3 -1
- package/dist/components/Timeline/TimelineFieldLabel.js +1 -0
- package/dist/components/Timeline/TimelineFontFamilyField.js +12 -12
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -0
- package/dist/components/Timeline/TimelineKeyframeControls.js +40 -28
- package/dist/components/Timeline/TimelineLayerChildren.js +1 -1
- package/dist/components/Timeline/TimelineList.js +1 -1
- package/dist/components/Timeline/TimelineNumberField.js +2 -4
- package/dist/components/Timeline/TimelinePrimitiveFieldValue.js +1 -1
- package/dist/components/Timeline/TimelineSelection.d.ts +9 -9
- package/dist/components/Timeline/TimelineSelection.js +16 -9
- package/dist/components/Timeline/TimelineSequence.d.ts +3 -1
- package/dist/components/Timeline/TimelineSequence.js +65 -21
- package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +46 -8
- package/dist/components/Timeline/TimelineSequencePropItem.d.ts +3 -0
- package/dist/components/Timeline/TimelineSequencePropItem.js +262 -25
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.d.ts +11 -13
- package/dist/components/Timeline/TimelineSequenceRightEdgeDragHandle.js +98 -77
- package/dist/components/Timeline/TimelineTextContentField.js +27 -4
- package/dist/components/Timeline/TimelineTimeIndicators.js +10 -5
- package/dist/components/Timeline/TimelineTrack.js +1 -1
- package/dist/components/Timeline/TimelineTrimTooltip.d.ts +11 -0
- package/dist/components/Timeline/TimelineTrimTooltip.js +41 -0
- package/dist/components/Timeline/TimelineVideoInfo.d.ts +1 -0
- package/dist/components/Timeline/TimelineVideoInfo.js +13 -10
- package/dist/components/Timeline/TimelineViewport.d.ts +1 -0
- package/dist/components/Timeline/TimelineViewport.js +10 -1
- package/dist/components/Timeline/delete-selected-keyframe.js +22 -8
- package/dist/components/Timeline/delete-selected-timeline-item.d.ts +1 -5
- package/dist/components/Timeline/delete-selected-timeline-item.js +9 -95
- package/dist/components/Timeline/get-animation-item-selection-for-frame.d.ts +2 -1
- package/dist/components/Timeline/get-animation-item-selection-for-frame.js +7 -5
- package/dist/components/Timeline/get-keyframed-sequence-drag-targets.d.ts +23 -0
- package/dist/components/Timeline/get-keyframed-sequence-drag-targets.js +57 -0
- package/dist/components/Timeline/get-node-keyframes.d.ts +2 -1
- package/dist/components/Timeline/get-node-keyframes.js +6 -4
- package/dist/components/Timeline/get-playback-rate-keyframe-changes.d.ts +21 -0
- package/dist/components/Timeline/get-playback-rate-keyframe-changes.js +142 -0
- package/dist/components/Timeline/get-sequence-context-menu-items.d.ts +3 -1
- package/dist/components/Timeline/get-sequence-context-menu-items.js +13 -1
- package/dist/components/Timeline/get-timeline-keyframes.d.ts +15 -2
- package/dist/components/Timeline/get-timeline-keyframes.js +44 -6
- package/dist/components/Timeline/keyframe-clipboard.js +17 -3
- package/dist/components/Timeline/split-selected-timeline-item.d.ts +13 -10
- package/dist/components/Timeline/split-selected-timeline-item.js +61 -35
- package/dist/components/Timeline/timeline-field-display-utils.js +1 -0
- package/dist/components/Timeline/timeline-field-row-layout.js +1 -0
- package/dist/components/Timeline/use-delete-timeline-items.js +17 -11
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.d.ts +2 -1
- package/dist/components/Timeline/use-expanded-track-keyframe-rows.js +3 -1
- package/dist/components/Timeline/use-sequence-freeze-frame-menu-item.js +7 -3
- package/dist/components/Timeline/use-timeline-keyframe-drag.js +28 -19
- package/dist/components/TimelineCombobox.js +1 -0
- package/dist/components/Transcription/Models.js +1 -1
- package/dist/components/Transcription/TranscriptionModal.js +18 -11
- package/dist/components/Transcription/TranscriptionModalWithOptionalWhisper.js +1 -1
- package/dist/components/Transcription/resample-media-to-16-khz.d.ts +2 -1
- package/dist/components/Transcription/resample-media-to-16-khz.js +20 -2
- package/dist/components/UpdatesSettings.js +2 -0
- package/dist/components/VideoMatting/Models.js +1 -1
- package/dist/components/VideoMatting/VideoMattingModal.js +30 -47
- package/dist/components/VideoMatting/VideoMattingModalWithOptionalPackage.js +1 -1
- package/dist/components/WebMcp.js +23 -40
- package/dist/components/composition-drop-preview.d.ts +9 -2
- package/dist/components/composition-drop-preview.js +8 -4
- package/dist/components/composition-menu-items.js +4 -4
- package/dist/components/delete-jsx-nodes-api.d.ts +2 -0
- package/dist/components/{delete-jsx-node-api.js → delete-jsx-nodes-api.js} +5 -5
- package/dist/components/effect-drag-and-drop.d.ts +13 -5
- package/dist/components/effect-drag-and-drop.js +19 -4
- package/dist/components/get-open-in-menu-items.d.ts +2 -1
- package/dist/components/get-open-in-menu-items.js +24 -8
- package/dist/components/keyboard-shortcuts.d.ts +4 -4
- package/dist/components/keyboard-shortcuts.js +3 -1
- package/dist/components/public-output-name.d.ts +1 -0
- package/dist/components/public-output-name.js +7 -3
- package/dist/components/selected-outline-drag.d.ts +1 -6
- package/dist/components/selected-outline-drag.js +22 -6
- package/dist/components/selected-outline-geometry.d.ts +2 -18
- package/dist/components/selected-outline-measurement.d.ts +23 -41
- package/dist/components/selected-outline-measurement.js +14 -252
- package/dist/components/selected-outline-order.d.ts +4 -11
- package/dist/components/selected-outline-order.js +2 -254
- package/dist/components/selected-outline-snap.d.ts +1 -1
- package/dist/components/selected-outline-snap.js +2 -1
- package/dist/components/selected-outline-types.d.ts +18 -28
- package/dist/components/selected-outline-uv.d.ts +4 -4
- package/dist/components/selected-outline-uv.js +6 -111
- package/dist/components/sequence-props-api.js +0 -10
- package/dist/components/use-selected-outline-control-target.js +12 -21
- package/dist/components/wrap-jsx-node-api.d.ts +2 -0
- package/dist/components/wrap-jsx-node-api.js +13 -0
- package/dist/error-overlay/remotion-overlay/OpenInEditor.js +45 -2
- package/dist/error-overlay/remotion-overlay/StackFrame.js +32 -3
- package/dist/esm/{CaptionQueueProcessor-k0yrm3dj.mjs → CaptionQueueProcessor-nr7hjcga.mjs} +96 -19
- package/dist/esm/LazyModels-ajkn7fs3.mjs +12 -0
- package/dist/esm/LazyModels-g1g7cf4e.mjs +12 -0
- package/dist/esm/{TranscriptionModal-ymnx1c7m.mjs → TranscriptionModal-e18bzbkb.mjs} +30 -22
- package/dist/esm/{VideoMattingModal-05vpczks.mjs → VideoMattingModal-5bz2s4rs.mjs} +47 -62
- package/dist/esm/{VideoMattingQueueProcessor-t1hgm2rm.mjs → VideoMattingQueueProcessor-4tkj0f4k.mjs} +69 -26
- package/dist/esm/{index-v4tr1bft.mjs → index-09txs1bj.mjs} +5 -0
- package/dist/esm/{index-4dsz9035.mjs → index-5ycb9e9q.mjs} +2 -4
- package/dist/esm/index-890dd9b3.mjs +768 -0
- package/dist/esm/{index-5bfxbpca.mjs → index-8nt6a0mw.mjs} +3 -3
- package/dist/esm/{index-5gd8k9yv.mjs → index-9q9w8v9p.mjs} +3 -3
- package/dist/esm/{index-x40wwfmt.mjs → index-c2wabcdt.mjs} +8 -6
- package/dist/esm/index-dfy1t576.mjs +129 -0
- package/dist/esm/index-dh3zk2hv.mjs +220 -0
- package/dist/esm/{index-0gewwxse.mjs → index-dpyss74p.mjs} +6179 -5011
- package/dist/esm/{index-9x6e1dq0.mjs → index-hqxc6tzp.mjs} +40 -6
- package/dist/esm/{index-cdy8v54v.mjs → index-qve7mdfp.mjs} +36 -539
- package/dist/esm/{index-eb5txqp6.mjs → index-s6qya2gg.mjs} +8 -88
- package/dist/esm/index-t7tbt980.mjs +103 -0
- package/dist/esm/{index-g7k2dvar.mjs → index-t7xnxdf8.mjs} +44 -26
- package/dist/esm/index-wqc43mw0.mjs +158 -0
- package/dist/esm/{index-bs39wngg.mjs → index-x6r9bn12.mjs} +5623 -6218
- package/dist/esm/{index-f97r9e2g.mjs → index-xac20sv4.mjs} +46 -57
- package/dist/esm/index.mjs +4 -4
- package/dist/esm/internals.mjs +13 -10
- package/dist/esm/previewEntry.mjs +18 -12
- package/dist/esm/renderEntry.mjs +5 -1
- package/dist/esm/{resolve-composition-component-location-bt2d6qxq.mjs → resolve-composition-component-location-2hgf6g0a.mjs} +1 -1
- package/dist/helpers/calculate-timeline.d.ts +5 -1
- package/dist/helpers/calculate-timeline.js +1 -1
- package/dist/helpers/checkerboard-background.d.ts +2 -2
- package/dist/helpers/colors.d.ts +132 -112
- package/dist/helpers/colors.js +117 -95
- package/dist/helpers/copy-text.js +1 -16
- package/dist/helpers/create-folder-tree.js +2 -1
- package/dist/helpers/editor-guide-selection.d.ts +1 -1
- package/dist/helpers/editor-ruler.js +23 -12
- package/dist/helpers/get-connected-compositions.d.ts +6 -1
- package/dist/helpers/get-connected-compositions.js +1 -1
- package/dist/helpers/get-sequence-double-click-action.js +1 -1
- package/dist/helpers/get-sequence-visible-range.d.ts +1 -1
- package/dist/helpers/get-sequence-visible-range.js +2 -5
- package/dist/helpers/get-timeline-nestedness.d.ts +1 -1
- package/dist/helpers/get-timeline-nestedness.js +1 -1
- package/dist/helpers/get-timeline-sequence-sort-key.d.ts +1 -1
- package/dist/helpers/get-timeline-sequence-sort-key.js +1 -1
- package/dist/helpers/hoverable.js +6 -5
- package/dist/helpers/inject-css.js +5 -7
- package/dist/helpers/open-in-editor.js +1 -1
- package/dist/helpers/prism-vsc-dark-plus.d.ts +1 -1
- package/dist/helpers/prism-vsc-dark-plus.js +52 -51
- package/dist/helpers/resolve-studio-color.d.ts +1 -0
- package/dist/helpers/resolve-studio-color.js +11 -0
- package/dist/helpers/studio-css-variables.d.ts +1 -0
- package/dist/helpers/studio-css-variables.js +105 -0
- package/dist/helpers/studio-pixel-ratio.d.ts +1 -0
- package/dist/helpers/studio-pixel-ratio.js +7 -0
- package/dist/helpers/studio-runtime-config.d.ts +1 -1
- package/dist/helpers/timeline-node-path-key.d.ts +1 -1
- package/dist/helpers/timeline-node-path-key.js +2 -2
- package/dist/helpers/use-keybinding.d.ts +1 -1
- package/dist/helpers/use-keyboard-shortcut-label.d.ts +2 -2
- package/dist/helpers/use-menu-structure.js +15 -9
- package/dist/helpers/use-runtime-values.js +2 -28
- package/dist/hot-middleware-client/client.js +5 -3
- package/dist/icons/align-center-horizontal.js +2 -1
- package/dist/icons/align-left.js +2 -1
- package/dist/icons/align-right.js +2 -1
- package/dist/icons/{separation.d.ts → background-removal.d.ts} +1 -1
- package/dist/icons/background-removal.js +9 -0
- package/dist/icons/wrap.d.ts +4 -0
- package/dist/icons/wrap.js +10 -0
- package/dist/previewEntry.js +2 -0
- package/dist/renderEntry.js +2 -0
- package/dist/state/modals.d.ts +20 -1
- package/dist/state/timeline-sequence-hover.d.ts +6 -16
- package/dist/state/timeline-sequence-hover.js +6 -67
- package/dist/state/timeline-zoom.js +4 -0
- package/package.json +20 -19
- package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.d.ts +0 -15
- package/dist/components/Timeline/get-easing-selection-after-keyframe-delete.js +0 -31
- package/dist/components/delete-jsx-node-api.d.ts +0 -2
- package/dist/esm/LazyModels-mtggyjye.mjs +0 -11
- package/dist/esm/LazyModels-nk7py0zt.mjs +0 -11
- package/dist/esm/index-cw0pnpg5.mjs +0 -50
- package/dist/esm/index-k426ye99.mjs +0 -139
- package/dist/helpers/get-box-quads-polyfill-internals.d.ts +0 -82
- package/dist/helpers/get-box-quads-polyfill-internals.js +0 -2403
- package/dist/helpers/get-box-quads-ponyfill.d.ts +0 -10
- package/dist/helpers/get-box-quads-ponyfill.js +0 -23
- package/dist/icons/separation.js +0 -7
|
@@ -3,16 +3,15 @@ import {
|
|
|
3
3
|
} from "./index-7tt71e8n.mjs";
|
|
4
4
|
import {
|
|
5
5
|
RenderModalOutputName
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-c2wabcdt.mjs";
|
|
7
7
|
import {
|
|
8
8
|
Button,
|
|
9
9
|
Checkmark,
|
|
10
10
|
Combobox,
|
|
11
11
|
DismissableModal,
|
|
12
|
+
GearIcon,
|
|
12
13
|
ModalHeader,
|
|
13
|
-
ModelsIcon,
|
|
14
14
|
RenderModalHr,
|
|
15
|
-
SeparationIcon,
|
|
16
15
|
SetSelectedModalContext,
|
|
17
16
|
SidebarContext,
|
|
18
17
|
VerticalTab,
|
|
@@ -25,17 +24,20 @@ import {
|
|
|
25
24
|
rightRow,
|
|
26
25
|
useStaticFiles,
|
|
27
26
|
validatePublicOutputName
|
|
28
|
-
} from "./index-
|
|
27
|
+
} from "./index-x6r9bn12.mjs";
|
|
28
|
+
import"./index-dh3zk2hv.mjs";
|
|
29
29
|
import {
|
|
30
30
|
RenderQueueContext
|
|
31
|
-
} from "./index-
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
31
|
+
} from "./index-hqxc6tzp.mjs";
|
|
32
|
+
import"./index-s6qya2gg.mjs";
|
|
33
|
+
import"./index-dfy1t576.mjs";
|
|
34
|
+
import"./index-t7tbt980.mjs";
|
|
34
35
|
import {
|
|
35
36
|
Models
|
|
36
|
-
} from "./index-
|
|
37
|
-
import"./index-
|
|
37
|
+
} from "./index-8nt6a0mw.mjs";
|
|
38
|
+
import"./index-t7xnxdf8.mjs";
|
|
38
39
|
import {
|
|
40
|
+
ModelsIcon,
|
|
39
41
|
VERTICAL_SCROLLBAR_CLASSNAME,
|
|
40
42
|
ValidationMessage,
|
|
41
43
|
buttonStyle,
|
|
@@ -48,11 +50,12 @@ import {
|
|
|
48
50
|
leftSidebar,
|
|
49
51
|
optionsPanel,
|
|
50
52
|
outerModalStyle
|
|
51
|
-
} from "./index-
|
|
53
|
+
} from "./index-890dd9b3.mjs";
|
|
54
|
+
import"./index-qve7mdfp.mjs";
|
|
52
55
|
import"./index-5zrb1ft4.mjs";
|
|
53
56
|
import {
|
|
54
57
|
BLUE_DISABLED
|
|
55
|
-
} from "./index-
|
|
58
|
+
} from "./index-wqc43mw0.mjs";
|
|
56
59
|
import"./index-rcv7qkt5.mjs";
|
|
57
60
|
|
|
58
61
|
// src/components/VideoMatting/VideoMattingModal.tsx
|
|
@@ -108,9 +111,10 @@ var makeOptions = ({
|
|
|
108
111
|
}));
|
|
109
112
|
var VideoMattingModal = ({
|
|
110
113
|
displayName,
|
|
111
|
-
src
|
|
114
|
+
src,
|
|
115
|
+
target
|
|
112
116
|
}) => {
|
|
113
|
-
const [tab, setTab] = useState("
|
|
117
|
+
const [tab, setTab] = useState("remove");
|
|
114
118
|
const isModelCached = useCallback((selectedModel) => isVideoMattingModelCached({ model: selectedModel }), []);
|
|
115
119
|
const cachedModels = useModelCacheStatus({
|
|
116
120
|
isModelCached,
|
|
@@ -118,10 +122,9 @@ var VideoMattingModal = ({
|
|
|
118
122
|
refreshKey: tab
|
|
119
123
|
});
|
|
120
124
|
const baseName = useMemo(() => getDefaultOutputBaseName(src, displayName, "video"), [displayName, src]);
|
|
121
|
-
const [
|
|
122
|
-
const [
|
|
123
|
-
const [
|
|
124
|
-
const [audio, setAudio] = useState("base");
|
|
125
|
+
const [outName, setOutName] = useState(`${baseName}-no-background.webm`);
|
|
126
|
+
const [model, setModel] = useState("modnet");
|
|
127
|
+
const [audio, setAudio] = useState("keep");
|
|
125
128
|
const [videoBitrate, setVideoBitrate] = useState("very-high");
|
|
126
129
|
const [support, setSupport] = useState({ type: "checking" });
|
|
127
130
|
const staticFiles = useStaticFiles();
|
|
@@ -140,18 +143,11 @@ var VideoMattingModal = ({
|
|
|
140
143
|
cancelled = true;
|
|
141
144
|
};
|
|
142
145
|
}, [model]);
|
|
143
|
-
const
|
|
144
|
-
const
|
|
145
|
-
const
|
|
146
|
-
const
|
|
147
|
-
const
|
|
148
|
-
const foregroundError = validatePublicOutputName({
|
|
149
|
-
extension: ".webm",
|
|
150
|
-
outName: foregroundOutName
|
|
151
|
-
}) ?? (duplicateOutput ? "Base and foreground outputs must be different" : queuedOutputs.has(normalizedForeground) ? "Another video matting job is using this output file" : null);
|
|
152
|
-
const baseExists = staticFiles.some((file) => file.name.normalize("NFC").toLowerCase() === normalizedBase);
|
|
153
|
-
const foregroundExists = staticFiles.some((file) => file.name.normalize("NFC").toLowerCase() === normalizedForeground);
|
|
154
|
-
const canSubmit = support.type === "supported" && baseError === null && foregroundError === null;
|
|
146
|
+
const normalizedOutput = outName.normalize("NFC").toLowerCase();
|
|
147
|
+
const queuedOutputs = new Set(videoMattingJobs.filter((job) => job.status === "idle" || job.status === "running" || job.status === "saving").map((job) => job.outName).map((name) => name.normalize("NFC").toLowerCase()));
|
|
148
|
+
const outputError = validatePublicOutputName({ extension: ".webm", outName }) ?? (queuedOutputs.has(normalizedOutput) ? "Another background removal job is using this output file" : null);
|
|
149
|
+
const outputExists = staticFiles.some((file) => file.name.normalize("NFC").toLowerCase() === normalizedOutput);
|
|
150
|
+
const canSubmit = support.type === "supported" && outputError === null;
|
|
155
151
|
const modelOptions = useMemo(() => makeOptions({
|
|
156
152
|
items: MODELS.map((item) => ({
|
|
157
153
|
id: item.name,
|
|
@@ -162,9 +158,7 @@ var VideoMattingModal = ({
|
|
|
162
158
|
}), [cachedModels, model]);
|
|
163
159
|
const audioOptions = useMemo(() => makeOptions({
|
|
164
160
|
items: [
|
|
165
|
-
{ id: "
|
|
166
|
-
{ id: "foreground", label: "Foreground layer" },
|
|
167
|
-
{ id: "both", label: "Both layers" },
|
|
161
|
+
{ id: "keep", label: "Keep original audio" },
|
|
168
162
|
{ id: "none", label: "No audio" }
|
|
169
163
|
],
|
|
170
164
|
selected: audio,
|
|
@@ -184,11 +178,11 @@ var VideoMattingModal = ({
|
|
|
184
178
|
addVideoMattingJob({
|
|
185
179
|
src,
|
|
186
180
|
displayName,
|
|
187
|
-
|
|
188
|
-
foregroundOutName,
|
|
181
|
+
outName,
|
|
189
182
|
model,
|
|
190
183
|
audio,
|
|
191
|
-
videoBitrate
|
|
184
|
+
videoBitrate,
|
|
185
|
+
target
|
|
192
186
|
});
|
|
193
187
|
setSidebarCollapsedState({ left: null, right: "expanded" });
|
|
194
188
|
persistSelectedOptionsSidebarPanel("renders");
|
|
@@ -197,23 +191,24 @@ var VideoMattingModal = ({
|
|
|
197
191
|
}, [
|
|
198
192
|
addVideoMattingJob,
|
|
199
193
|
audio,
|
|
200
|
-
baseOutName,
|
|
201
194
|
canSubmit,
|
|
202
195
|
displayName,
|
|
203
|
-
|
|
196
|
+
outName,
|
|
204
197
|
model,
|
|
205
198
|
setSelectedModal,
|
|
206
199
|
setSidebarCollapsedState,
|
|
207
200
|
src,
|
|
201
|
+
target,
|
|
208
202
|
videoBitrate
|
|
209
203
|
]);
|
|
204
|
+
const title = `Remove background from ${displayName}`;
|
|
210
205
|
return /* @__PURE__ */ jsx(DismissableModal, {
|
|
211
|
-
ariaLabel:
|
|
206
|
+
ariaLabel: title,
|
|
212
207
|
children: /* @__PURE__ */ jsxs("div", {
|
|
213
208
|
style: modalStyle,
|
|
214
209
|
children: [
|
|
215
210
|
/* @__PURE__ */ jsx(ModalHeader, {
|
|
216
|
-
title
|
|
211
|
+
title
|
|
217
212
|
}),
|
|
218
213
|
/* @__PURE__ */ jsxs("div", {
|
|
219
214
|
style: container,
|
|
@@ -229,7 +224,7 @@ var VideoMattingModal = ({
|
|
|
229
224
|
...buttonStyle,
|
|
230
225
|
backgroundColor: canSubmit ? buttonStyle.backgroundColor : BLUE_DISABLED
|
|
231
226
|
},
|
|
232
|
-
children: "
|
|
227
|
+
children: "Remove background"
|
|
233
228
|
})
|
|
234
229
|
]
|
|
235
230
|
}),
|
|
@@ -241,17 +236,17 @@ var VideoMattingModal = ({
|
|
|
241
236
|
children: [
|
|
242
237
|
/* @__PURE__ */ jsx(VerticalTab, {
|
|
243
238
|
autoFocus: true,
|
|
244
|
-
onClick: () => setTab("
|
|
239
|
+
onClick: () => setTab("remove"),
|
|
245
240
|
renderIcon: (color) => /* @__PURE__ */ jsx("div", {
|
|
246
241
|
style: iconContainer,
|
|
247
|
-
children: /* @__PURE__ */ jsx(
|
|
242
|
+
children: /* @__PURE__ */ jsx(GearIcon, {
|
|
248
243
|
color,
|
|
249
244
|
style: icon
|
|
250
245
|
})
|
|
251
246
|
}),
|
|
252
|
-
selected: tab === "
|
|
247
|
+
selected: tab === "remove",
|
|
253
248
|
style: horizontalTab,
|
|
254
|
-
children: "
|
|
249
|
+
children: "General"
|
|
255
250
|
}),
|
|
256
251
|
/* @__PURE__ */ jsx(VerticalTab, {
|
|
257
252
|
onClick: () => setTab("models"),
|
|
@@ -269,28 +264,18 @@ var VideoMattingModal = ({
|
|
|
269
264
|
]
|
|
270
265
|
}),
|
|
271
266
|
/* @__PURE__ */ jsxs("div", {
|
|
272
|
-
style: tab === "
|
|
267
|
+
style: tab === "remove" ? panelStyle : hiddenPanel,
|
|
273
268
|
className: VERTICAL_SCROLLBAR_CLASSNAME,
|
|
274
269
|
children: [
|
|
275
270
|
/* @__PURE__ */ jsx(RenderModalOutputName, {
|
|
276
|
-
ariaLabel: "
|
|
277
|
-
existingOutputPath: window.remotion_publicFolderExists ? `${window.remotion_publicFolderExists}/${
|
|
278
|
-
existence:
|
|
279
|
-
inputStyle: input,
|
|
280
|
-
label: "Base output in public/",
|
|
281
|
-
onValueChange: (event) => setBaseOutName(event.target.value),
|
|
282
|
-
outName: baseOutName,
|
|
283
|
-
validationMessage: baseError
|
|
284
|
-
}),
|
|
285
|
-
/* @__PURE__ */ jsx(RenderModalOutputName, {
|
|
286
|
-
ariaLabel: "Foreground video output file",
|
|
287
|
-
existingOutputPath: window.remotion_publicFolderExists ? `${window.remotion_publicFolderExists}/${foregroundOutName}` : null,
|
|
288
|
-
existence: foregroundExists,
|
|
271
|
+
ariaLabel: "Video output file",
|
|
272
|
+
existingOutputPath: window.remotion_publicFolderExists ? `${window.remotion_publicFolderExists}/${outName}` : null,
|
|
273
|
+
existence: outputExists,
|
|
289
274
|
inputStyle: input,
|
|
290
|
-
label: "
|
|
291
|
-
onValueChange: (event) =>
|
|
292
|
-
outName
|
|
293
|
-
validationMessage:
|
|
275
|
+
label: "Output in public/",
|
|
276
|
+
onValueChange: (event) => setOutName(event.target.value),
|
|
277
|
+
outName,
|
|
278
|
+
validationMessage: outputError
|
|
294
279
|
}),
|
|
295
280
|
/* @__PURE__ */ jsx(RenderModalHr, {}),
|
|
296
281
|
/* @__PURE__ */ jsxs("div", {
|
package/dist/esm/{VideoMattingQueueProcessor-t1hgm2rm.mjs → VideoMattingQueueProcessor-4tkj0f4k.mjs}
RENAMED
|
@@ -1,99 +1,142 @@
|
|
|
1
1
|
import {
|
|
2
2
|
loadModelForJob
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-09txs1bj.mjs";
|
|
4
4
|
import {
|
|
5
5
|
RenderQueueContext
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-hqxc6tzp.mjs";
|
|
7
7
|
import {
|
|
8
|
+
callApi,
|
|
9
|
+
getBrowserStudioOperations,
|
|
8
10
|
writeStaticFile
|
|
9
|
-
} from "./index-
|
|
11
|
+
} from "./index-dfy1t576.mjs";
|
|
10
12
|
import"./index-rcv7qkt5.mjs";
|
|
11
13
|
|
|
12
14
|
// src/components/RenderQueue/VideoMattingQueueProcessor.tsx
|
|
13
15
|
import {
|
|
14
16
|
canUseVideoMatting,
|
|
15
17
|
disposeVideoMattingModel,
|
|
18
|
+
downloadVideoMattingModel,
|
|
16
19
|
isVideoMattingModelCached,
|
|
17
20
|
loadVideoMattingModel,
|
|
18
|
-
|
|
21
|
+
VideoMattingInternals
|
|
19
22
|
} from "@remotion/video-matting";
|
|
20
23
|
import { useCallback, useContext, useEffect } from "react";
|
|
21
24
|
var VideoMattingQueueProcessor = () => {
|
|
22
25
|
const {
|
|
23
26
|
markVideoMattingJobDone,
|
|
24
27
|
markVideoMattingJobFailed,
|
|
28
|
+
markVideoMattingJobCancelled,
|
|
29
|
+
markVideoMattingJobSaving,
|
|
30
|
+
getAbortController,
|
|
25
31
|
setProcessVideoMattingJobCallback,
|
|
26
32
|
updateVideoMattingJobProgress
|
|
27
33
|
} = useContext(RenderQueueContext);
|
|
28
34
|
const processJob = useCallback(async (job) => {
|
|
29
|
-
|
|
35
|
+
const { signal } = getAbortController(job.id);
|
|
36
|
+
let output = null;
|
|
30
37
|
let processingError = null;
|
|
31
38
|
try {
|
|
39
|
+
signal.throwIfAborted();
|
|
32
40
|
updateVideoMattingJobProgress(job.id, {
|
|
33
41
|
detail: null,
|
|
34
42
|
message: "Checking WebGPU support...",
|
|
35
43
|
value: 0
|
|
36
44
|
});
|
|
37
45
|
const support = await canUseVideoMatting({ model: job.model });
|
|
46
|
+
signal.throwIfAborted();
|
|
38
47
|
if (!support.supported) {
|
|
39
48
|
throw new Error(support.detailedReason);
|
|
40
49
|
}
|
|
41
50
|
await loadModelForJob({
|
|
51
|
+
signal,
|
|
42
52
|
model: job.model,
|
|
43
53
|
progressStart: 0,
|
|
44
54
|
progressSpan: 0.2,
|
|
45
55
|
isModelCached: (model) => isVideoMattingModelCached({ model }),
|
|
46
|
-
loadModel: (model, onProgress) =>
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
56
|
+
loadModel: async (model, onProgress) => {
|
|
57
|
+
await downloadVideoMattingModel({
|
|
58
|
+
signal,
|
|
59
|
+
model,
|
|
60
|
+
onProgress: (progress) => onProgress(progress.progress)
|
|
61
|
+
});
|
|
62
|
+
await loadVideoMattingModel({ model, signal });
|
|
63
|
+
},
|
|
50
64
|
updateProgress: (progress) => updateVideoMattingJobProgress(job.id, {
|
|
51
65
|
...progress,
|
|
52
66
|
detail: null
|
|
53
67
|
})
|
|
54
68
|
});
|
|
55
|
-
|
|
69
|
+
const mattingOptions = {
|
|
70
|
+
signal,
|
|
56
71
|
src: job.src,
|
|
57
72
|
model: job.model,
|
|
58
|
-
audio: job.audio,
|
|
59
73
|
videoBitrate: job.videoBitrate,
|
|
60
74
|
onProgress: (progress) => {
|
|
61
75
|
updateVideoMattingJobProgress(job.id, {
|
|
62
76
|
detail: progress.stage === "finalizing" ? `Processed ${progress.processedFrames} ${progress.processedFrames === 1 ? "frame" : "frames"}` : `Processed ${progress.processedFrames} ${progress.processedFrames === 1 ? "frame" : "frames"} · ${Math.round(progress.progress * 100)}%`,
|
|
63
|
-
message: progress.stage === "finalizing" ? "Finalizing video
|
|
77
|
+
message: progress.stage === "finalizing" ? "Finalizing video..." : "Removing background...",
|
|
64
78
|
value: 0.2 + (progress.progress ?? 1) * 0.65
|
|
65
79
|
});
|
|
66
80
|
}
|
|
81
|
+
};
|
|
82
|
+
output = await VideoMattingInternals.removeVideoBackground({
|
|
83
|
+
...mattingOptions,
|
|
84
|
+
audio: job.audio
|
|
67
85
|
});
|
|
86
|
+
if (output === null) {
|
|
87
|
+
throw new Error("Video matting produced no output.");
|
|
88
|
+
}
|
|
89
|
+
signal.throwIfAborted();
|
|
68
90
|
updateVideoMattingJobProgress(job.id, {
|
|
69
91
|
detail: null,
|
|
70
|
-
message: "Saving video
|
|
92
|
+
message: "Saving video...",
|
|
71
93
|
value: 0.88
|
|
72
94
|
});
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
95
|
+
const video = await output.video.getBlob();
|
|
96
|
+
signal.throwIfAborted();
|
|
97
|
+
markVideoMattingJobSaving(job.id);
|
|
98
|
+
await video.arrayBuffer().then((contents) => writeStaticFile({ contents, filePath: job.outName }));
|
|
99
|
+
if (job.target !== null) {
|
|
100
|
+
updateVideoMattingJobProgress(job.id, {
|
|
101
|
+
detail: null,
|
|
102
|
+
message: "Replacing video source...",
|
|
103
|
+
value: 0.97
|
|
104
|
+
});
|
|
105
|
+
const browserStudioOperations = getBrowserStudioOperations();
|
|
106
|
+
const request = {
|
|
107
|
+
fileName: job.target.fileName,
|
|
108
|
+
nodePath: job.target.nodePath.nodePath,
|
|
109
|
+
src: job.outName
|
|
110
|
+
};
|
|
111
|
+
const replaceSource = browserStudioOperations?.replaceVideoSource;
|
|
112
|
+
if (browserStudioOperations && !replaceSource) {
|
|
113
|
+
throw new Error("Browser Studio cannot replace the video source.");
|
|
114
|
+
}
|
|
115
|
+
const response = replaceSource ? await replaceSource(request) : await callApi("/api/replace-video-source", request);
|
|
116
|
+
if (!response.success) {
|
|
117
|
+
throw new Error(response.reason);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
81
120
|
} catch (error) {
|
|
82
121
|
processingError = error instanceof Error ? error : new Error(String(error));
|
|
83
122
|
}
|
|
123
|
+
if (output) {
|
|
124
|
+
await Promise.allSettled([output.video.dispose()]);
|
|
125
|
+
}
|
|
84
126
|
try {
|
|
85
|
-
await Promise.all([
|
|
86
|
-
outputs?.base.dispose(),
|
|
87
|
-
outputs?.foreground.dispose()
|
|
88
|
-
]);
|
|
89
127
|
await disposeVideoMattingModel({ model: job.model });
|
|
90
128
|
} catch {}
|
|
91
|
-
if (
|
|
129
|
+
if (signal.aborted) {
|
|
130
|
+
markVideoMattingJobCancelled(job.id);
|
|
131
|
+
} else if (processingError) {
|
|
92
132
|
markVideoMattingJobFailed(job.id, processingError);
|
|
93
133
|
} else {
|
|
94
134
|
markVideoMattingJobDone(job.id);
|
|
95
135
|
}
|
|
96
136
|
}, [
|
|
137
|
+
getAbortController,
|
|
138
|
+
markVideoMattingJobCancelled,
|
|
139
|
+
markVideoMattingJobSaving,
|
|
97
140
|
markVideoMattingJobDone,
|
|
98
141
|
markVideoMattingJobFailed,
|
|
99
142
|
updateVideoMattingJobProgress
|
|
@@ -3,18 +3,23 @@ var loadModelForJob = async ({
|
|
|
3
3
|
isModelCached,
|
|
4
4
|
loadModel,
|
|
5
5
|
model,
|
|
6
|
+
signal,
|
|
6
7
|
progressSpan,
|
|
7
8
|
progressStart,
|
|
8
9
|
updateProgress
|
|
9
10
|
}) => {
|
|
11
|
+
signal.throwIfAborted();
|
|
10
12
|
const cached = await isModelCached(model);
|
|
13
|
+
signal.throwIfAborted();
|
|
11
14
|
await loadModel(model, (progress) => {
|
|
15
|
+
signal.throwIfAborted();
|
|
12
16
|
const percentage = progress === null ? "" : ` ${Math.round(progress * 100)}%`;
|
|
13
17
|
updateProgress({
|
|
14
18
|
message: `${cached ? "Loading" : "Downloading"} ${model}${percentage}`,
|
|
15
19
|
value: progressStart + (progress ?? 0) * progressSpan
|
|
16
20
|
});
|
|
17
21
|
});
|
|
22
|
+
signal.throwIfAborted();
|
|
18
23
|
};
|
|
19
24
|
|
|
20
25
|
export { loadModelForJob };
|