@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
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ModelManager
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-t7xnxdf8.mjs";
|
|
4
4
|
|
|
5
5
|
// src/components/VideoMatting/Models.tsx
|
|
6
6
|
import {
|
|
7
|
+
downloadVideoMattingModel,
|
|
7
8
|
getAvailableModels,
|
|
8
9
|
isVideoMattingModelCached,
|
|
9
|
-
loadVideoMattingModel,
|
|
10
10
|
removeVideoMattingModel
|
|
11
11
|
} from "@remotion/video-matting";
|
|
12
12
|
import { useCallback } from "react";
|
|
@@ -14,7 +14,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
14
14
|
var AVAILABLE_MODELS = getAvailableModels();
|
|
15
15
|
var Models = ({ description, indent, visible }) => {
|
|
16
16
|
const isModelCached = useCallback((model) => isVideoMattingModelCached({ model }), []);
|
|
17
|
-
const loadModel = useCallback((model, onProgress) =>
|
|
17
|
+
const loadModel = useCallback((model, onProgress) => downloadVideoMattingModel({
|
|
18
18
|
model,
|
|
19
19
|
onProgress: (progress) => onProgress(progress.progress)
|
|
20
20
|
}), []);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ModelManager
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-t7xnxdf8.mjs";
|
|
4
4
|
|
|
5
5
|
// src/components/Transcription/Models.tsx
|
|
6
6
|
import {
|
|
7
7
|
clearStaleModels,
|
|
8
|
+
downloadWhisperModel,
|
|
8
9
|
getAvailableModels,
|
|
9
10
|
isWhisperModelCached,
|
|
10
|
-
loadWhisperModel,
|
|
11
11
|
removeWhisperModel
|
|
12
12
|
} from "@remotion/whisper-webgpu";
|
|
13
13
|
import { useCallback } from "react";
|
|
@@ -15,7 +15,7 @@ import { jsx } from "react/jsx-runtime";
|
|
|
15
15
|
var AVAILABLE_MODELS = getAvailableModels();
|
|
16
16
|
var Models = ({ description, indent, visible }) => {
|
|
17
17
|
const isModelCached = useCallback((model) => isWhisperModelCached({ model }), []);
|
|
18
|
-
const loadModel = useCallback((model, onProgress) =>
|
|
18
|
+
const loadModel = useCallback((model, onProgress) => downloadWhisperModel({
|
|
19
19
|
model,
|
|
20
20
|
onProgress: (progress) => onProgress(progress.progress)
|
|
21
21
|
}), []);
|
|
@@ -4,24 +4,26 @@ import {
|
|
|
4
4
|
getFileManagerName,
|
|
5
5
|
label,
|
|
6
6
|
optionRow,
|
|
7
|
-
rightRow
|
|
7
|
+
rightRow
|
|
8
|
+
} from "./index-x6r9bn12.mjs";
|
|
9
|
+
import {
|
|
8
10
|
showNotification
|
|
9
|
-
} from "./index-
|
|
11
|
+
} from "./index-dh3zk2hv.mjs";
|
|
10
12
|
import {
|
|
11
13
|
openInFileExplorer
|
|
12
|
-
} from "./index-
|
|
14
|
+
} from "./index-s6qya2gg.mjs";
|
|
13
15
|
import {
|
|
14
16
|
getBrowserStudioOperations
|
|
15
|
-
} from "./index-
|
|
17
|
+
} from "./index-dfy1t576.mjs";
|
|
16
18
|
import {
|
|
17
19
|
Column,
|
|
18
20
|
InlineAction,
|
|
19
21
|
Spacing,
|
|
20
22
|
ValidationMessage
|
|
21
|
-
} from "./index-
|
|
23
|
+
} from "./index-890dd9b3.mjs";
|
|
22
24
|
import {
|
|
23
25
|
WHITE
|
|
24
|
-
} from "./index-
|
|
26
|
+
} from "./index-wqc43mw0.mjs";
|
|
25
27
|
|
|
26
28
|
// src/components/RenderModal/RenderModalOutputName.tsx
|
|
27
29
|
import { useCallback } from "react";
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// src/helpers/inserted-element-selection.ts
|
|
2
|
+
var pendingSelection = null;
|
|
3
|
+
var listeners = new Set;
|
|
4
|
+
var requestInsertedElementSelection = (selection) => {
|
|
5
|
+
pendingSelection = selection;
|
|
6
|
+
for (const listener of listeners) {
|
|
7
|
+
listener();
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
var clearInsertedElementSelection = (selection) => {
|
|
11
|
+
if (pendingSelection !== selection) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
pendingSelection = null;
|
|
15
|
+
for (const listener of listeners) {
|
|
16
|
+
listener();
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
var subscribeToInsertedElementSelection = (listener) => {
|
|
20
|
+
listeners.add(listener);
|
|
21
|
+
return () => listeners.delete(listener);
|
|
22
|
+
};
|
|
23
|
+
var getInsertedElementSelection = () => pendingSelection;
|
|
24
|
+
|
|
25
|
+
// src/helpers/sequence-node-path-mutations.ts
|
|
26
|
+
var pendingMutations = [];
|
|
27
|
+
var seenMutationIds = new Set;
|
|
28
|
+
var queueSequenceNodePathMutation = (mutation) => {
|
|
29
|
+
if (seenMutationIds.has(mutation.mutationId)) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
seenMutationIds.add(mutation.mutationId);
|
|
33
|
+
pendingMutations.push(mutation);
|
|
34
|
+
if (mutation.timelineSelection !== null) {
|
|
35
|
+
requestInsertedElementSelection({
|
|
36
|
+
compositionId: mutation.timelineSelection.compositionId,
|
|
37
|
+
nodePath: {
|
|
38
|
+
absolutePath: mutation.timelineSelection.absolutePath,
|
|
39
|
+
nodePath: mutation.timelineSelection.nodePath
|
|
40
|
+
},
|
|
41
|
+
notification: null
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
var queueSequenceNodePathMutationFromApiResponse = (response) => {
|
|
46
|
+
if (typeof response !== "object" || response === null || !("nodePathMutation" in response)) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const { nodePathMutation } = response;
|
|
50
|
+
if (typeof nodePathMutation !== "object" || nodePathMutation === null || !("mutationId" in nodePathMutation) || typeof nodePathMutation.mutationId !== "string") {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
queueSequenceNodePathMutation(nodePathMutation);
|
|
54
|
+
};
|
|
55
|
+
var takePendingSequenceNodePathMutations = () => pendingMutations.splice(0);
|
|
56
|
+
|
|
57
|
+
// src/components/call-api.ts
|
|
58
|
+
var callApi = (endpoint, body, signal) => {
|
|
59
|
+
return new Promise((resolve, reject) => {
|
|
60
|
+
fetch(endpoint, {
|
|
61
|
+
method: "post",
|
|
62
|
+
headers: {
|
|
63
|
+
"content-type": "application/json"
|
|
64
|
+
},
|
|
65
|
+
signal,
|
|
66
|
+
body: JSON.stringify(body)
|
|
67
|
+
}).then((res) => res.json()).then((data) => {
|
|
68
|
+
if (data.success) {
|
|
69
|
+
queueSequenceNodePathMutationFromApiResponse(data.data);
|
|
70
|
+
resolve(data.data);
|
|
71
|
+
} else {
|
|
72
|
+
reject(new Error(data.error));
|
|
73
|
+
}
|
|
74
|
+
}).catch((err) => {
|
|
75
|
+
reject(err);
|
|
76
|
+
});
|
|
77
|
+
});
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// src/helpers/browser-studio-operations.ts
|
|
81
|
+
var BROWSER_STUDIO_OPERATIONS_READY_EVENT = "remotion-browser-studio-operations-ready";
|
|
82
|
+
var getBrowserStudioOperations = () => {
|
|
83
|
+
if (typeof window === "undefined") {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
return window.remotion_browserStudio ?? null;
|
|
87
|
+
};
|
|
88
|
+
var getBrowserStudioKeyframeOperations = () => getBrowserStudioOperations()?.keyframes ?? null;
|
|
89
|
+
var getBrowserStudioEffectOperations = () => getBrowserStudioOperations()?.effects ?? null;
|
|
90
|
+
var canUseKeyframeOperations = () => !window.remotion_isReadOnlyStudio || getBrowserStudioKeyframeOperations() !== null;
|
|
91
|
+
var canUseEffectOperations = () => !window.remotion_isReadOnlyStudio || getBrowserStudioEffectOperations() !== null;
|
|
92
|
+
var canInstallPackages = () => {
|
|
93
|
+
const browserStudioOperations = getBrowserStudioOperations();
|
|
94
|
+
if (browserStudioOperations !== null) {
|
|
95
|
+
return true;
|
|
96
|
+
}
|
|
97
|
+
return !window.remotion_isReadOnlyStudio;
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
// src/api/write-static-file.ts
|
|
101
|
+
var writeStaticFile = async ({
|
|
102
|
+
contents,
|
|
103
|
+
filePath
|
|
104
|
+
}) => {
|
|
105
|
+
if (filePath.includes("\\")) {
|
|
106
|
+
return Promise.reject(new Error("File path cannot contain backslashes"));
|
|
107
|
+
}
|
|
108
|
+
const browserStudioOperations = getBrowserStudioOperations();
|
|
109
|
+
if (browserStudioOperations) {
|
|
110
|
+
return browserStudioOperations.writeStaticFile({ contents, filePath });
|
|
111
|
+
}
|
|
112
|
+
if (window.remotion_isReadOnlyStudio) {
|
|
113
|
+
throw new Error("writeStaticFile() is not available in read-only Studio");
|
|
114
|
+
}
|
|
115
|
+
const url = new URL(`${window.remotion_staticBase}/api/add-asset`, window.location.origin);
|
|
116
|
+
url.search = new URLSearchParams({
|
|
117
|
+
filePath
|
|
118
|
+
}).toString();
|
|
119
|
+
const response = await fetch(url, {
|
|
120
|
+
method: "POST",
|
|
121
|
+
body: contents
|
|
122
|
+
});
|
|
123
|
+
if (!response.ok) {
|
|
124
|
+
const jsonResponse = await response.json();
|
|
125
|
+
throw new Error(jsonResponse.error);
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export { requestInsertedElementSelection, clearInsertedElementSelection, subscribeToInsertedElementSelection, getInsertedElementSelection, queueSequenceNodePathMutation, takePendingSequenceNodePathMutations, callApi, BROWSER_STUDIO_OPERATIONS_READY_EVENT, getBrowserStudioOperations, getBrowserStudioEffectOperations, canUseKeyframeOperations, canUseEffectOperations, canInstallPackages, writeStaticFile };
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import {
|
|
2
|
+
callApi,
|
|
3
|
+
getBrowserStudioOperations
|
|
4
|
+
} from "./index-dfy1t576.mjs";
|
|
5
|
+
import {
|
|
6
|
+
getPortal,
|
|
7
|
+
useZIndex
|
|
8
|
+
} from "./index-qve7mdfp.mjs";
|
|
9
|
+
import {
|
|
10
|
+
NOTIFICATION_BACKGROUND,
|
|
11
|
+
NOTIFICATION_BORDER,
|
|
12
|
+
NOTIFICATION_SHADOW,
|
|
13
|
+
TRANSPARENT,
|
|
14
|
+
WHITE_HEX
|
|
15
|
+
} from "./index-wqc43mw0.mjs";
|
|
16
|
+
|
|
17
|
+
// src/components/Notifications/NotificationCenter.tsx
|
|
18
|
+
import {
|
|
19
|
+
createRef,
|
|
20
|
+
useCallback,
|
|
21
|
+
useImperativeHandle,
|
|
22
|
+
useState
|
|
23
|
+
} from "react";
|
|
24
|
+
import ReactDOM from "react-dom";
|
|
25
|
+
|
|
26
|
+
// src/components/Notifications/Notification.tsx
|
|
27
|
+
import { useEffect } from "react";
|
|
28
|
+
import { jsx } from "react/jsx-runtime";
|
|
29
|
+
var notification = {
|
|
30
|
+
backgroundColor: NOTIFICATION_BACKGROUND,
|
|
31
|
+
color: WHITE_HEX,
|
|
32
|
+
fontFamily: "Arial, Helvetica, sans-serif",
|
|
33
|
+
display: "inline-flex",
|
|
34
|
+
padding: "6px 14px",
|
|
35
|
+
borderRadius: 6,
|
|
36
|
+
fontSize: 13,
|
|
37
|
+
border: NOTIFICATION_BORDER,
|
|
38
|
+
boxShadow: NOTIFICATION_SHADOW,
|
|
39
|
+
marginTop: 3,
|
|
40
|
+
marginBottom: 3,
|
|
41
|
+
alignItems: "center"
|
|
42
|
+
};
|
|
43
|
+
var Notification = ({ children, id, duration, created, onRemove }) => {
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
if (duration === null) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
const timeout = setTimeout(() => {
|
|
49
|
+
onRemove(id);
|
|
50
|
+
}, duration - (Date.now() - created));
|
|
51
|
+
return () => {
|
|
52
|
+
clearTimeout(timeout);
|
|
53
|
+
};
|
|
54
|
+
}, [created, duration, id, onRemove]);
|
|
55
|
+
return /* @__PURE__ */ jsx("div", {
|
|
56
|
+
className: "css-reset",
|
|
57
|
+
style: notification,
|
|
58
|
+
children
|
|
59
|
+
});
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
// src/components/Notifications/NotificationCenter.tsx
|
|
63
|
+
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
64
|
+
var container = {
|
|
65
|
+
position: "absolute",
|
|
66
|
+
justifyContent: "center",
|
|
67
|
+
alignItems: "center",
|
|
68
|
+
display: "flex",
|
|
69
|
+
width: "100%",
|
|
70
|
+
flexDirection: "column",
|
|
71
|
+
paddingTop: 40,
|
|
72
|
+
pointerEvents: "none",
|
|
73
|
+
backgroundColor: TRANSPARENT
|
|
74
|
+
};
|
|
75
|
+
var notificationCenter = createRef();
|
|
76
|
+
var showNotification = (content, durationInMs) => {
|
|
77
|
+
return notificationCenter.current.addNotification({
|
|
78
|
+
content,
|
|
79
|
+
duration: durationInMs,
|
|
80
|
+
created: Date.now(),
|
|
81
|
+
id: String(Math.random()).replace("0.", "")
|
|
82
|
+
});
|
|
83
|
+
};
|
|
84
|
+
var NotificationCenter = () => {
|
|
85
|
+
const [notifications, setNotifications] = useState([]);
|
|
86
|
+
const { currentZIndex } = useZIndex();
|
|
87
|
+
const onRemove = useCallback((id) => {
|
|
88
|
+
setNotifications((not) => {
|
|
89
|
+
return not.filter((n) => n.id !== id);
|
|
90
|
+
});
|
|
91
|
+
}, []);
|
|
92
|
+
const addNotification = useCallback((notification2) => {
|
|
93
|
+
setNotifications((previousNotifications) => {
|
|
94
|
+
return [...previousNotifications, notification2];
|
|
95
|
+
});
|
|
96
|
+
return {
|
|
97
|
+
dismiss: () => {
|
|
98
|
+
setNotifications((oldNotifications) => {
|
|
99
|
+
return oldNotifications.filter((notificationToFilter) => notificationToFilter.id !== notification2.id);
|
|
100
|
+
});
|
|
101
|
+
},
|
|
102
|
+
replaceContent: (newContent, durationInMs) => {
|
|
103
|
+
setNotifications((oldNotifications) => {
|
|
104
|
+
return oldNotifications.map((notificationToMap) => {
|
|
105
|
+
if (notificationToMap.id === notification2.id) {
|
|
106
|
+
return {
|
|
107
|
+
...notificationToMap,
|
|
108
|
+
duration: durationInMs,
|
|
109
|
+
content: newContent,
|
|
110
|
+
created: Date.now()
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
return notificationToMap;
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
}, []);
|
|
119
|
+
useImperativeHandle(notificationCenter, () => {
|
|
120
|
+
return {
|
|
121
|
+
addNotification
|
|
122
|
+
};
|
|
123
|
+
}, [addNotification]);
|
|
124
|
+
return ReactDOM.createPortal(/* @__PURE__ */ jsx2("div", {
|
|
125
|
+
style: container,
|
|
126
|
+
children: notifications.map((n) => {
|
|
127
|
+
return /* @__PURE__ */ jsx2(Notification, {
|
|
128
|
+
created: n.created,
|
|
129
|
+
duration: n.duration,
|
|
130
|
+
id: n.id,
|
|
131
|
+
onRemove,
|
|
132
|
+
children: n.content
|
|
133
|
+
}, n.id);
|
|
134
|
+
})
|
|
135
|
+
}), getPortal(currentZIndex + 1));
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
// src/api/install-package.ts
|
|
139
|
+
import { getRemotionEnvironment } from "remotion";
|
|
140
|
+
|
|
141
|
+
// src/helpers/optional-package-dependencies.ts
|
|
142
|
+
import { extraPackages } from "@remotion/studio-shared";
|
|
143
|
+
var TRANSFORMERS_PACKAGE = "@huggingface/transformers";
|
|
144
|
+
var packagesRequiringTransformers = new Set([
|
|
145
|
+
"@remotion/whisper-webgpu",
|
|
146
|
+
"@remotion/video-matting"
|
|
147
|
+
]);
|
|
148
|
+
var withRequiredAuxiliaryPackages = (dependencies) => {
|
|
149
|
+
if (!dependencies.some((dependency) => packagesRequiringTransformers.has(dependency.name)) || dependencies.some((dependency) => dependency.name === TRANSFORMERS_PACKAGE)) {
|
|
150
|
+
return [...dependencies];
|
|
151
|
+
}
|
|
152
|
+
const transformers = extraPackages.find((pkg) => pkg.name === TRANSFORMERS_PACKAGE);
|
|
153
|
+
if (!transformers) {
|
|
154
|
+
throw new Error(`No recommended version found for ${TRANSFORMERS_PACKAGE}`);
|
|
155
|
+
}
|
|
156
|
+
return [
|
|
157
|
+
...dependencies,
|
|
158
|
+
{ name: transformers.name, version: transformers.version }
|
|
159
|
+
];
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
// src/api/install-package.ts
|
|
163
|
+
var installPackages = async (dependencies) => {
|
|
164
|
+
if (!getRemotionEnvironment().isStudio) {
|
|
165
|
+
throw new Error("installPackages() is only available in the Studio");
|
|
166
|
+
}
|
|
167
|
+
const dependenciesWithAuxiliaryPackages = withRequiredAuxiliaryPackages(dependencies);
|
|
168
|
+
const browserStudioOperations = getBrowserStudioOperations();
|
|
169
|
+
if (browserStudioOperations !== null) {
|
|
170
|
+
const response = await browserStudioOperations.packageInstallation.installPackages({
|
|
171
|
+
dependencies: dependenciesWithAuxiliaryPackages
|
|
172
|
+
});
|
|
173
|
+
if (!response.success) {
|
|
174
|
+
const error = new Error(response.reason);
|
|
175
|
+
error.stack = response.stack;
|
|
176
|
+
throw error;
|
|
177
|
+
}
|
|
178
|
+
return {};
|
|
179
|
+
}
|
|
180
|
+
if (window.remotion_isReadOnlyStudio) {
|
|
181
|
+
throw new Error("installPackages() is not available in Read-Only Studio");
|
|
182
|
+
}
|
|
183
|
+
return callApi("/api/install-package", {
|
|
184
|
+
dependencies: dependenciesWithAuxiliaryPackages
|
|
185
|
+
});
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
// src/helpers/install-required-package.ts
|
|
189
|
+
var installQueue = Promise.resolve();
|
|
190
|
+
var uniqueDependencies = (dependencies) => Array.from(new Map(dependencies.map((dependency) => [dependency.name, dependency])).values());
|
|
191
|
+
var getMissingPackages = (dependencies) => {
|
|
192
|
+
const installedPackages = window.remotion_installedPackages ?? [];
|
|
193
|
+
return uniqueDependencies(dependencies).filter((dependency) => dependency.version !== null || !installedPackages.includes(dependency.name));
|
|
194
|
+
};
|
|
195
|
+
var addInstalledPackages = (dependencies) => {
|
|
196
|
+
const installedPackages = window.remotion_installedPackages ?? [];
|
|
197
|
+
window.remotion_installedPackages = Array.from(new Set([
|
|
198
|
+
...installedPackages,
|
|
199
|
+
...uniqueDependencies(dependencies).map((dependency) => dependency.name)
|
|
200
|
+
]));
|
|
201
|
+
};
|
|
202
|
+
var formatPackageList = (dependencies) => dependencies.length === 1 ? dependencies[0].name : `${dependencies.length} packages`;
|
|
203
|
+
var installRequiredPackages = async (dependencies) => {
|
|
204
|
+
const runInstall = async () => {
|
|
205
|
+
const missingPackages = getMissingPackages(dependencies);
|
|
206
|
+
if (missingPackages.length === 0)
|
|
207
|
+
return;
|
|
208
|
+
showNotification(`Installing ${formatPackageList(missingPackages)}...`, 3000);
|
|
209
|
+
await installPackages(missingPackages);
|
|
210
|
+
addInstalledPackages(missingPackages);
|
|
211
|
+
showNotification(`Installed ${formatPackageList(missingPackages)}`, 3000);
|
|
212
|
+
};
|
|
213
|
+
const queuedInstall = installQueue.then(runInstall, runInstall);
|
|
214
|
+
installQueue = queuedInstall.catch(() => {
|
|
215
|
+
return;
|
|
216
|
+
});
|
|
217
|
+
await queuedInstall;
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
export { showNotification, NotificationCenter, TRANSFORMERS_PACKAGE, withRequiredAuxiliaryPackages, installPackages, getMissingPackages, installRequiredPackages };
|