@remotion/studio 4.0.527 → 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/CodeFrame.js +1 -1
- package/dist/components/ColorPicker/checker.d.ts +1 -1
- package/dist/components/CurrentAsset.js +3 -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 +3 -1
- package/dist/components/InspectorOpenInEditor.js +13 -0
- package/dist/components/InspectorPanel/AlignmentControls.js +28 -9
- package/dist/components/InspectorPanel/CollapsibleInspectorSectionHeader.js +1 -1
- package/dist/components/InspectorPanel/EasingInspector.js +6 -2
- package/dist/components/InspectorPanel/ElementLibraryButton.js +1 -1
- package/dist/components/InspectorPanel/KeyframeEasingNavigator.js +1 -1
- package/dist/components/InspectorPanel/KeyframeInspector.js +28 -24
- package/dist/components/InspectorPanel/MultiSequenceNumberField.js +1 -1
- package/dist/components/InspectorPanel/SequenceInspectorHeader.d.ts +3 -1
- package/dist/components/InspectorPanel/SequenceSelectionInspector.js +30 -2
- package/dist/components/InspectorPanel/SequenceWrapAction.d.ts +8 -0
- package/dist/components/InspectorPanel/SequenceWrapAction.js +151 -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/InspectorSequenceSection.d.ts +1 -0
- package/dist/components/InspectorSequenceSection.js +7 -5
- package/dist/components/KeyboardShortcutsSettings.js +1 -1
- package/dist/components/Menu/styles.d.ts +2 -2
- package/dist/components/Modals.js +7 -6
- package/dist/components/ModelManager.js +10 -9
- package/dist/components/NewComposition/CancelButton.js +10 -4
- 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 +3 -2
- 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 +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/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 +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/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/SelectedOutlineTransformOriginHandle.js +3 -2
- package/dist/components/SelectedOutlineUvControls.js +12 -7
- 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/TimelineDragHandler.js +1 -1
- package/dist/components/Timeline/TimelineEffectPropItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectPropItem.js +12 -5
- 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/TimelineFontFamilyField.js +12 -12
- package/dist/components/Timeline/TimelineKeyframeControls.d.ts +1 -0
- package/dist/components/Timeline/TimelineKeyframeControls.js +39 -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 +39 -21
- package/dist/components/Timeline/TimelineSequenceItem.d.ts +1 -0
- package/dist/components/Timeline/TimelineSequenceItem.js +18 -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/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-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-keyframe-drag.js +28 -19
- package/dist/components/Transcription/Models.js +1 -1
- package/dist/components/Transcription/TranscriptionModal.js +3 -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 +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 +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-npa6szn1.mjs → CaptionQueueProcessor-nr7hjcga.mjs} +63 -17
- package/dist/esm/LazyModels-ajkn7fs3.mjs +12 -0
- package/dist/esm/LazyModels-g1g7cf4e.mjs +12 -0
- package/dist/esm/{TranscriptionModal-79m5wgcj.mjs → TranscriptionModal-e18bzbkb.mjs} +15 -15
- package/dist/esm/{VideoMattingModal-31pew0xj.mjs → VideoMattingModal-5bz2s4rs.mjs} +47 -65
- 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-n5gmcvhz.mjs → index-5ycb9e9q.mjs} +2 -4
- package/dist/esm/{index-5t2dwxsk.mjs → index-890dd9b3.mjs} +259 -21
- package/dist/esm/{index-ac5550e7.mjs → index-8nt6a0mw.mjs} +3 -3
- package/dist/esm/{index-614tdz2q.mjs → index-9q9w8v9p.mjs} +3 -3
- package/dist/esm/{index-s7qa3xbw.mjs → index-c2wabcdt.mjs} +6 -6
- package/dist/esm/{index-r1gr3j3a.mjs → index-dfy1t576.mjs} +50 -1
- package/dist/esm/{index-21hxsfaa.mjs → index-dh3zk2hv.mjs} +6 -25
- package/dist/esm/{index-4zen9prq.mjs → index-dpyss74p.mjs} +6563 -5485
- package/dist/esm/{index-9x6e1dq0.mjs → index-hqxc6tzp.mjs} +40 -6
- package/dist/esm/{index-9xxg6218.mjs → index-qve7mdfp.mjs} +19 -1
- package/dist/esm/{index-e855w59j.mjs → index-s6qya2gg.mjs} +3 -5
- package/dist/esm/index-t7tbt980.mjs +103 -0
- package/dist/esm/{index-r0ejh5sy.mjs → index-t7xnxdf8.mjs} +44 -26
- package/dist/esm/index-wqc43mw0.mjs +158 -0
- package/dist/esm/{index-ppspzgn9.mjs → index-x6r9bn12.mjs} +4026 -4761
- package/dist/esm/{index-vxwg66ar.mjs → index-xac20sv4.mjs} +44 -57
- 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/colors.d.ts +132 -112
- package/dist/helpers/colors.js +117 -95
- 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 +105 -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/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/separation.js +0 -7
- /package/dist/esm/{resolve-composition-component-location-qrp05g62.mjs → resolve-composition-component-location-2hgf6g0a.mjs} +0 -0
|
@@ -5,6 +5,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const colors_1 = require("../helpers/colors");
|
|
7
7
|
const copy_text_1 = require("../helpers/copy-text");
|
|
8
|
+
const studio_css_variables_1 = require("../helpers/studio-css-variables");
|
|
8
9
|
const use_copy_feedback_1 = require("../helpers/use-copy-feedback");
|
|
9
10
|
const copy_1 = require("../icons/copy");
|
|
10
11
|
const InlineAction_1 = require("./InlineAction");
|
|
@@ -127,6 +128,7 @@ const RenderedReleaseNotes = ({ release }) => {
|
|
|
127
128
|
return null;
|
|
128
129
|
}
|
|
129
130
|
return `<!doctype html><html><head><base href="https://github.com/remotion-dev/remotion/" target="_blank"><style>
|
|
131
|
+
${studio_css_variables_1.studioCssVariables}
|
|
130
132
|
:root { color-scheme: dark; }
|
|
131
133
|
html, body { overflow: hidden; }
|
|
132
134
|
body { background: ${colors_1.BACKGROUND}; color: ${colors_1.LIGHT_TEXT}; font-family: sans-serif; font-size: 13px; line-height: 1.5; margin: 0; overflow-wrap: anywhere; }
|
|
@@ -8,7 +8,7 @@ const ModelManager_1 = require("../ModelManager");
|
|
|
8
8
|
const AVAILABLE_MODELS = (0, video_matting_1.getAvailableModels)();
|
|
9
9
|
const Models = ({ description, indent, visible }) => {
|
|
10
10
|
const isModelCached = (0, react_1.useCallback)((model) => (0, video_matting_1.isVideoMattingModelCached)({ model }), []);
|
|
11
|
-
const loadModel = (0, react_1.useCallback)((model, onProgress) => (0, video_matting_1.
|
|
11
|
+
const loadModel = (0, react_1.useCallback)((model, onProgress) => (0, video_matting_1.downloadVideoMattingModel)({
|
|
12
12
|
model,
|
|
13
13
|
onProgress: (progress) => onProgress(progress.progress),
|
|
14
14
|
}), []);
|
|
@@ -7,8 +7,8 @@ const video_matting_1 = require("@remotion/video-matting");
|
|
|
7
7
|
const react_1 = require("react");
|
|
8
8
|
const colors_1 = require("../../helpers/colors");
|
|
9
9
|
const Checkmark_1 = require("../../icons/Checkmark");
|
|
10
|
+
const gear_1 = require("../../icons/gear");
|
|
10
11
|
const models_1 = require("../../icons/models");
|
|
11
|
-
const separation_1 = require("../../icons/separation");
|
|
12
12
|
const modals_1 = require("../../state/modals");
|
|
13
13
|
const sidebar_1 = require("../../state/sidebar");
|
|
14
14
|
const Button_1 = require("../Button");
|
|
@@ -61,9 +61,9 @@ const makeOptions = ({ items, selected, setSelected, }) => items.map(({ id, labe
|
|
|
61
61
|
disabled: false,
|
|
62
62
|
onClick: () => setSelected(id),
|
|
63
63
|
}));
|
|
64
|
-
const VideoMattingModal = ({ displayName, src, }) => {
|
|
65
|
-
var _a
|
|
66
|
-
const [tab, setTab] = (0, react_1.useState)('
|
|
64
|
+
const VideoMattingModal = ({ displayName, src, target, }) => {
|
|
65
|
+
var _a;
|
|
66
|
+
const [tab, setTab] = (0, react_1.useState)('remove');
|
|
67
67
|
const isModelCached = (0, react_1.useCallback)((selectedModel) => (0, video_matting_1.isVideoMattingModelCached)({ model: selectedModel }), []);
|
|
68
68
|
const cachedModels = (0, use_model_cache_status_1.useModelCacheStatus)({
|
|
69
69
|
isModelCached,
|
|
@@ -71,10 +71,9 @@ const VideoMattingModal = ({ displayName, src, }) => {
|
|
|
71
71
|
refreshKey: tab,
|
|
72
72
|
});
|
|
73
73
|
const baseName = (0, react_1.useMemo)(() => (0, public_output_name_1.getDefaultOutputBaseName)(src, displayName, 'video'), [displayName, src]);
|
|
74
|
-
const [
|
|
75
|
-
const [
|
|
76
|
-
const [
|
|
77
|
-
const [audio, setAudio] = (0, react_1.useState)('base');
|
|
74
|
+
const [outName, setOutName] = (0, react_1.useState)(`${baseName}-no-background.webm`);
|
|
75
|
+
const [model, setModel] = (0, react_1.useState)('modnet');
|
|
76
|
+
const [audio, setAudio] = (0, react_1.useState)('keep');
|
|
78
77
|
const [videoBitrate, setVideoBitrate] = (0, react_1.useState)('very-high');
|
|
79
78
|
const [support, setSupport] = (0, react_1.useState)({ type: 'checking' });
|
|
80
79
|
const staticFiles = (0, use_static_files_1.useStaticFiles)();
|
|
@@ -95,31 +94,18 @@ const VideoMattingModal = ({ displayName, src, }) => {
|
|
|
95
94
|
cancelled = true;
|
|
96
95
|
};
|
|
97
96
|
}, [model]);
|
|
98
|
-
const
|
|
99
|
-
const normalizedForeground = foregroundOutName.normalize('NFC').toLowerCase();
|
|
100
|
-
const duplicateOutput = normalizedBase === normalizedForeground;
|
|
97
|
+
const normalizedOutput = outName.normalize('NFC').toLowerCase();
|
|
101
98
|
const queuedOutputs = new Set(videoMattingJobs
|
|
102
|
-
.filter((job) => job.status === 'idle' ||
|
|
103
|
-
.
|
|
99
|
+
.filter((job) => job.status === 'idle' ||
|
|
100
|
+
job.status === 'running' ||
|
|
101
|
+
job.status === 'saving')
|
|
102
|
+
.map((job) => job.outName)
|
|
104
103
|
.map((name) => name.normalize('NFC').toLowerCase()));
|
|
105
|
-
const
|
|
106
|
-
? '
|
|
107
|
-
:
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
const foregroundError = (_b = (0, public_output_name_1.validatePublicOutputName)({
|
|
111
|
-
extension: '.webm',
|
|
112
|
-
outName: foregroundOutName,
|
|
113
|
-
})) !== null && _b !== void 0 ? _b : (duplicateOutput
|
|
114
|
-
? 'Base and foreground outputs must be different'
|
|
115
|
-
: queuedOutputs.has(normalizedForeground)
|
|
116
|
-
? 'Another video matting job is using this output file'
|
|
117
|
-
: null);
|
|
118
|
-
const baseExists = staticFiles.some((file) => file.name.normalize('NFC').toLowerCase() === normalizedBase);
|
|
119
|
-
const foregroundExists = staticFiles.some((file) => file.name.normalize('NFC').toLowerCase() === normalizedForeground);
|
|
120
|
-
const canSubmit = support.type === 'supported' &&
|
|
121
|
-
baseError === null &&
|
|
122
|
-
foregroundError === null;
|
|
104
|
+
const outputError = (_a = (0, public_output_name_1.validatePublicOutputName)({ extension: '.webm', outName })) !== null && _a !== void 0 ? _a : (queuedOutputs.has(normalizedOutput)
|
|
105
|
+
? 'Another background removal job is using this output file'
|
|
106
|
+
: null);
|
|
107
|
+
const outputExists = staticFiles.some((file) => file.name.normalize('NFC').toLowerCase() === normalizedOutput);
|
|
108
|
+
const canSubmit = support.type === 'supported' && outputError === null;
|
|
123
109
|
const modelOptions = (0, react_1.useMemo)(() => makeOptions({
|
|
124
110
|
items: MODELS.map((item) => ({
|
|
125
111
|
id: item.name,
|
|
@@ -130,9 +116,7 @@ const VideoMattingModal = ({ displayName, src, }) => {
|
|
|
130
116
|
}), [cachedModels, model]);
|
|
131
117
|
const audioOptions = (0, react_1.useMemo)(() => makeOptions({
|
|
132
118
|
items: [
|
|
133
|
-
{ id: '
|
|
134
|
-
{ id: 'foreground', label: 'Foreground layer' },
|
|
135
|
-
{ id: 'both', label: 'Both layers' },
|
|
119
|
+
{ id: 'keep', label: 'Keep original audio' },
|
|
136
120
|
{ id: 'none', label: 'No audio' },
|
|
137
121
|
],
|
|
138
122
|
selected: audio,
|
|
@@ -156,11 +140,11 @@ const VideoMattingModal = ({ displayName, src, }) => {
|
|
|
156
140
|
addVideoMattingJob({
|
|
157
141
|
src,
|
|
158
142
|
displayName,
|
|
159
|
-
|
|
160
|
-
foregroundOutName,
|
|
143
|
+
outName,
|
|
161
144
|
model,
|
|
162
145
|
audio,
|
|
163
146
|
videoBitrate,
|
|
147
|
+
target,
|
|
164
148
|
});
|
|
165
149
|
setSidebarCollapsedState({ left: null, right: 'expanded' });
|
|
166
150
|
(0, OptionsPanel_1.persistSelectedOptionsSidebarPanel)('renders');
|
|
@@ -169,31 +153,30 @@ const VideoMattingModal = ({ displayName, src, }) => {
|
|
|
169
153
|
}, [
|
|
170
154
|
addVideoMattingJob,
|
|
171
155
|
audio,
|
|
172
|
-
baseOutName,
|
|
173
156
|
canSubmit,
|
|
174
157
|
displayName,
|
|
175
|
-
|
|
158
|
+
outName,
|
|
176
159
|
model,
|
|
177
160
|
setSelectedModal,
|
|
178
161
|
setSidebarCollapsedState,
|
|
179
162
|
src,
|
|
163
|
+
target,
|
|
180
164
|
videoBitrate,
|
|
181
165
|
]);
|
|
182
|
-
|
|
183
|
-
|
|
166
|
+
const title = `Remove background from ${displayName}`;
|
|
167
|
+
return (jsx_runtime_1.jsx(DismissableModal_1.DismissableModal, { ariaLabel: title, children: jsx_runtime_1.jsxs("div", { style: modalStyle, children: [
|
|
168
|
+
jsx_runtime_1.jsx(ModalHeader_1.ModalHeader, { title: title }), jsx_runtime_1.jsxs("div", { style: render_modals_1.container, children: [
|
|
184
169
|
jsx_runtime_1.jsx("div", { style: render_modals_1.flexer }), jsx_runtime_1.jsx(Button_1.Button, { disabled: !canSubmit, onClick: submit, title: support.type === 'unsupported' ? support.message : undefined, style: {
|
|
185
170
|
...render_modals_1.buttonStyle,
|
|
186
171
|
backgroundColor: canSubmit
|
|
187
172
|
? render_modals_1.buttonStyle.backgroundColor
|
|
188
173
|
: colors_1.BLUE_DISABLED,
|
|
189
|
-
}, children: "
|
|
174
|
+
}, children: "Remove background" })
|
|
190
175
|
] }), jsx_runtime_1.jsxs("div", { style: modalLayout, children: [
|
|
191
|
-
jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { autoFocus: true, onClick: () => setTab('
|
|
192
|
-
jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { ariaLabel: "
|
|
193
|
-
? `${window.remotion_publicFolderExists}/${
|
|
194
|
-
: null, existence:
|
|
195
|
-
? `${window.remotion_publicFolderExists}/${foregroundOutName}`
|
|
196
|
-
: null, existence: foregroundExists, inputStyle: layout_1.input, label: "Foreground output in public/", onValueChange: (event) => setForegroundOutName(event.target.value), outName: foregroundOutName, validationMessage: foregroundError }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
|
|
176
|
+
jsx_runtime_1.jsxs("div", { style: render_modals_1.leftSidebar, children: [jsx_runtime_1.jsx(vertical_1.VerticalTab, { autoFocus: true, onClick: () => setTab('remove'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(gear_1.GearIcon, { color: color, style: render_modals_1.icon }) })), selected: tab === 'remove', style: render_modals_1.horizontalTab, children: "General" }), jsx_runtime_1.jsx(vertical_1.VerticalTab, { onClick: () => setTab('models'), renderIcon: (color) => (jsx_runtime_1.jsx("div", { style: render_modals_1.iconContainer, children: jsx_runtime_1.jsx(models_1.ModelsIcon, { color: color, style: render_modals_1.icon }) })), selected: tab === 'models', style: render_modals_1.horizontalTab, children: "Models" })] }), jsx_runtime_1.jsxs("div", { style: tab === 'remove' ? panelStyle : hiddenPanel, className: is_menu_item_1.VERTICAL_SCROLLBAR_CLASSNAME, children: [
|
|
177
|
+
jsx_runtime_1.jsx(RenderModalOutputName_1.RenderModalOutputName, { ariaLabel: "Video output file", existingOutputPath: window.remotion_publicFolderExists
|
|
178
|
+
? `${window.remotion_publicFolderExists}/${outName}`
|
|
179
|
+
: null, existence: outputExists, inputStyle: layout_1.input, label: "Output in public/", onValueChange: (event) => setOutName(event.target.value), outName: outName, validationMessage: outputError }), jsx_runtime_1.jsx(RenderModalHr_1.RenderModalHr, {}), jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
|
|
197
180
|
jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Model" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: modelOptions, selectedId: model, title: "Model", style: controlStyle }) })
|
|
198
181
|
] }), support.type === 'unsupported' ? (jsx_runtime_1.jsx("div", { style: validationStyle, children: jsx_runtime_1.jsx(ValidationMessage_1.ValidationMessage, { align: "flex-end", message: support.message, type: "error" }) })) : null, jsx_runtime_1.jsxs("div", { style: layout_1.optionRow, children: [
|
|
199
182
|
jsx_runtime_1.jsx("div", { style: layout_1.label, children: "Audio" }), jsx_runtime_1.jsx("div", { style: layout_1.rightRow, children: jsx_runtime_1.jsx(ComboBox_1.Combobox, { values: audioOptions, selectedId: audio, title: "Audio", style: controlStyle }) })
|
|
@@ -42,5 +42,5 @@ const LazyVideoMattingModal = react_1.default.lazy(async () => {
|
|
|
42
42
|
const { VideoMattingModal } = await Promise.resolve().then(() => __importStar(require('./VideoMattingModal')));
|
|
43
43
|
return { default: VideoMattingModal };
|
|
44
44
|
});
|
|
45
|
-
const VideoMattingModalWithOptionalPackage = ({ state }) => (jsx_runtime_1.jsx(OptionalPackageModal_1.OptionalPackageModal, { ariaLabel: "Install video matting package", packageName: video_matting_capability_1.VIDEO_MATTING_PACKAGE, title: "
|
|
45
|
+
const VideoMattingModalWithOptionalPackage = ({ state }) => (jsx_runtime_1.jsx(OptionalPackageModal_1.OptionalPackageModal, { ariaLabel: "Install video matting package to remove background", packageName: video_matting_capability_1.VIDEO_MATTING_PACKAGE, title: "Remove background", children: jsx_runtime_1.jsx(react_1.Suspense, { fallback: null, children: jsx_runtime_1.jsx(LazyVideoMattingModal, { ...state }) }) }));
|
|
46
46
|
exports.VideoMattingModalWithOptionalPackage = VideoMattingModalWithOptionalPackage;
|
|
@@ -489,9 +489,9 @@ const WebMcp = () => {
|
|
|
489
489
|
},
|
|
490
490
|
}, { signal: controller.signal }),
|
|
491
491
|
modelContext.registerTool({
|
|
492
|
-
name: '
|
|
493
|
-
title: '
|
|
494
|
-
description: '
|
|
492
|
+
name: 'remove_video_background',
|
|
493
|
+
title: 'Remove video background',
|
|
494
|
+
description: 'Remove the background from a video asset in the public folder and add the work to the Jobs queue. If assetPath is omitted, the asset currently open in Studio is used.',
|
|
495
495
|
inputSchema: {
|
|
496
496
|
type: 'object',
|
|
497
497
|
properties: {
|
|
@@ -499,13 +499,9 @@ const WebMcp = () => {
|
|
|
499
499
|
type: 'string',
|
|
500
500
|
description: 'Optional path relative to public/. Defaults to the asset currently open in Studio.',
|
|
501
501
|
},
|
|
502
|
-
|
|
503
|
-
type: 'string',
|
|
504
|
-
description: 'Optional background output path relative to public/.',
|
|
505
|
-
},
|
|
506
|
-
foregroundOutputPath: {
|
|
502
|
+
outputPath: {
|
|
507
503
|
type: 'string',
|
|
508
|
-
description: 'Optional
|
|
504
|
+
description: 'Optional transparent video output path relative to public/.',
|
|
509
505
|
},
|
|
510
506
|
model: {
|
|
511
507
|
type: 'string',
|
|
@@ -513,8 +509,8 @@ const WebMcp = () => {
|
|
|
513
509
|
},
|
|
514
510
|
audio: {
|
|
515
511
|
type: 'string',
|
|
516
|
-
enum: ['
|
|
517
|
-
default: '
|
|
512
|
+
enum: ['keep', 'none'],
|
|
513
|
+
default: 'keep',
|
|
518
514
|
},
|
|
519
515
|
videoBitrate: {
|
|
520
516
|
oneOf: [
|
|
@@ -532,7 +528,7 @@ const WebMcp = () => {
|
|
|
532
528
|
annotations: { readOnlyHint: false },
|
|
533
529
|
execute: async (input) => {
|
|
534
530
|
var _a;
|
|
535
|
-
var _b, _c, _d, _e, _f
|
|
531
|
+
var _b, _c, _d, _e, _f;
|
|
536
532
|
if (!(0, OptionalPackageModal_1.isOptionalPackageInstalled)(video_matting_capability_1.VIDEO_MATTING_PACKAGE)) {
|
|
537
533
|
return missingOptionalPackageResult(video_matting_capability_1.VIDEO_MATTING_PACKAGE);
|
|
538
534
|
}
|
|
@@ -542,7 +538,7 @@ const WebMcp = () => {
|
|
|
542
538
|
staticFiles: staticFilesRef.current,
|
|
543
539
|
});
|
|
544
540
|
if ((0, get_preview_file_type_1.getPreviewFileType)(assetPath) !== 'video') {
|
|
545
|
-
throw new Error('The
|
|
541
|
+
throw new Error('The input asset must be a video.');
|
|
546
542
|
}
|
|
547
543
|
const videoMatting = await Promise.resolve().then(() => __importStar(require('@remotion/video-matting')));
|
|
548
544
|
const modelName = (_b = input.model) !== null && _b !== void 0 ? _b : 'ben2-base';
|
|
@@ -555,12 +551,9 @@ const WebMcp = () => {
|
|
|
555
551
|
if (!model) {
|
|
556
552
|
throw new Error(`Unknown video matting model: ${modelName}.`);
|
|
557
553
|
}
|
|
558
|
-
const audio = (_c = input.audio) !== null && _c !== void 0 ? _c : '
|
|
559
|
-
if (audio !== '
|
|
560
|
-
audio
|
|
561
|
-
audio !== 'both' &&
|
|
562
|
-
audio !== 'none') {
|
|
563
|
-
throw new Error('audio must be base, foreground, both, or none.');
|
|
554
|
+
const audio = (_c = input.audio) !== null && _c !== void 0 ? _c : 'keep';
|
|
555
|
+
if (audio !== 'keep' && audio !== 'none') {
|
|
556
|
+
throw new Error('audio must be keep or none.');
|
|
564
557
|
}
|
|
565
558
|
const videoBitrate = (_d = input.videoBitrate) !== null && _d !== void 0 ? _d : 'very-high';
|
|
566
559
|
if ((typeof videoBitrate !== 'number' ||
|
|
@@ -576,39 +569,28 @@ const WebMcp = () => {
|
|
|
576
569
|
const src = (0, remotion_1.staticFile)(assetPath);
|
|
577
570
|
const displayName = (_e = assetPath.split('/').at(-1)) !== null && _e !== void 0 ? _e : assetPath;
|
|
578
571
|
const baseName = (0, public_output_name_1.getDefaultOutputBaseName)(src, displayName, 'video');
|
|
579
|
-
const
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
typeof foregroundOutputPath !== 'string') {
|
|
583
|
-
throw new Error('Output paths must be strings.');
|
|
572
|
+
const outputPath = (_f = input.outputPath) !== null && _f !== void 0 ? _f : `${baseName}-no-background.webm`;
|
|
573
|
+
if (typeof outputPath !== 'string') {
|
|
574
|
+
throw new Error('Output path must be a string.');
|
|
584
575
|
}
|
|
585
|
-
const
|
|
586
|
-
extension: '.webm',
|
|
587
|
-
outName: baseOutputPath,
|
|
588
|
-
});
|
|
589
|
-
const foregroundError = (0, public_output_name_1.validatePublicOutputName)({
|
|
576
|
+
const outputError = (0, public_output_name_1.validatePublicOutputName)({
|
|
590
577
|
extension: '.webm',
|
|
591
|
-
outName:
|
|
578
|
+
outName: outputPath,
|
|
592
579
|
});
|
|
593
|
-
if (
|
|
594
|
-
throw new Error(
|
|
595
|
-
}
|
|
596
|
-
if (baseOutputPath.normalize('NFC').toLowerCase() ===
|
|
597
|
-
foregroundOutputPath.normalize('NFC').toLowerCase()) {
|
|
598
|
-
throw new Error('Background and foreground outputs must be different.');
|
|
580
|
+
if (outputError !== null) {
|
|
581
|
+
throw new Error(outputError);
|
|
599
582
|
}
|
|
600
583
|
const jobId = addVideoMattingJob({
|
|
601
584
|
audio,
|
|
602
|
-
baseOutName: baseOutputPath,
|
|
603
585
|
displayName,
|
|
604
|
-
|
|
586
|
+
outName: outputPath,
|
|
605
587
|
model,
|
|
606
588
|
src,
|
|
589
|
+
target: null,
|
|
607
590
|
videoBitrate,
|
|
608
591
|
});
|
|
609
592
|
return {
|
|
610
|
-
|
|
611
|
-
foregroundOutputPath,
|
|
593
|
+
outputPath,
|
|
612
594
|
jobId,
|
|
613
595
|
success: true,
|
|
614
596
|
};
|
|
@@ -14,6 +14,7 @@ const snapCompositionDropPosition = ({ compositionDimensions, destinationDimensi
|
|
|
14
14
|
key: 'composition-drop-preview',
|
|
15
15
|
dimensions: compositionDimensions,
|
|
16
16
|
uncroppedPoints: null,
|
|
17
|
+
path: null,
|
|
17
18
|
points: [
|
|
18
19
|
{ x: left * scale, y: top * scale },
|
|
19
20
|
{ x: right * scale, y: top * scale },
|
|
@@ -1,18 +1,26 @@
|
|
|
1
1
|
import { type EffectDragData } from '@remotion/studio-protocol';
|
|
2
2
|
import { type EffectDefinition } from '@remotion/studio-shared';
|
|
3
|
-
import type {
|
|
3
|
+
import type { SequenceNodePathInfo } from '../helpers/get-timeline-sequence-sort-key';
|
|
4
4
|
export declare const hasEffectDragType: (dataTransfer: DataTransfer) => boolean;
|
|
5
5
|
export declare const hasExplicitEffectDragType: (dataTransfer: DataTransfer) => boolean;
|
|
6
6
|
export declare const getEffectDragData: (dataTransfer: DataTransfer) => EffectDragData | null;
|
|
7
|
-
export declare const addEffectFromDragData: ({ clientId, dragData, fileName,
|
|
7
|
+
export declare const addEffectFromDragData: ({ clientId, dragData, fileName, nodePathInfo, selectItems, }: {
|
|
8
8
|
readonly clientId: string;
|
|
9
9
|
readonly dragData: EffectDragData;
|
|
10
10
|
readonly fileName: string;
|
|
11
|
-
readonly
|
|
11
|
+
readonly nodePathInfo: SequenceNodePathInfo;
|
|
12
|
+
readonly selectItems: (items: readonly import("@remotion/canvas").CanvasSelectionItem[], options?: {
|
|
13
|
+
readonly reveal?: boolean | undefined;
|
|
14
|
+
readonly revealInInspector?: boolean | undefined;
|
|
15
|
+
} | undefined) => void;
|
|
12
16
|
}) => Promise<void>;
|
|
13
|
-
export declare const addEffectToSequence: ({ clientId, effect, fileName,
|
|
17
|
+
export declare const addEffectToSequence: ({ clientId, effect, fileName, nodePathInfo, selectItems, }: {
|
|
14
18
|
readonly clientId: string;
|
|
15
19
|
readonly effect: EffectDefinition;
|
|
16
20
|
readonly fileName: string;
|
|
17
|
-
readonly
|
|
21
|
+
readonly nodePathInfo: SequenceNodePathInfo;
|
|
22
|
+
readonly selectItems: (items: readonly import("@remotion/canvas").CanvasSelectionItem[], options?: {
|
|
23
|
+
readonly reveal?: boolean | undefined;
|
|
24
|
+
readonly revealInInspector?: boolean | undefined;
|
|
25
|
+
} | undefined) => void;
|
|
18
26
|
}) => Promise<void>;
|
|
@@ -22,16 +22,17 @@ const getEffectDragData = (dataTransfer) => {
|
|
|
22
22
|
return (parsed === null || parsed === void 0 ? void 0 : parsed.type) === 'effect' ? parsed.data : null;
|
|
23
23
|
};
|
|
24
24
|
exports.getEffectDragData = getEffectDragData;
|
|
25
|
-
const addEffectFromDragData = ({ clientId, dragData, fileName,
|
|
25
|
+
const addEffectFromDragData = ({ clientId, dragData, fileName, nodePathInfo, selectItems, }) => {
|
|
26
26
|
return (0, exports.addEffectToSequence)({
|
|
27
27
|
clientId,
|
|
28
28
|
effect: dragData.effect,
|
|
29
29
|
fileName,
|
|
30
|
-
|
|
30
|
+
nodePathInfo,
|
|
31
|
+
selectItems,
|
|
31
32
|
});
|
|
32
33
|
};
|
|
33
34
|
exports.addEffectFromDragData = addEffectFromDragData;
|
|
34
|
-
const addEffectToSequence = async ({ clientId, effect, fileName,
|
|
35
|
+
const addEffectToSequence = async ({ clientId, effect, fileName, nodePathInfo, selectItems, }) => {
|
|
35
36
|
try {
|
|
36
37
|
const requiredPackage = (0, studio_shared_1.getRequiredPackageForEffectImportPath)(effect.importPath);
|
|
37
38
|
if ((0, browser_studio_operations_1.getBrowserStudioEffectOperations)() === null) {
|
|
@@ -39,7 +40,7 @@ const addEffectToSequence = async ({ clientId, effect, fileName, nodePath, }) =>
|
|
|
39
40
|
}
|
|
40
41
|
const result = await (0, effect_operations_api_1.addEffect)({
|
|
41
42
|
fileName,
|
|
42
|
-
sequenceNodePath:
|
|
43
|
+
sequenceNodePath: nodePathInfo.sequenceSubscriptionKey,
|
|
43
44
|
effectName: effect.name,
|
|
44
45
|
effectImportPath: effect.importPath,
|
|
45
46
|
effectConfig: effect.config,
|
|
@@ -47,7 +48,21 @@ const addEffectToSequence = async ({ clientId, effect, fileName, nodePath, }) =>
|
|
|
47
48
|
});
|
|
48
49
|
if (!result.success) {
|
|
49
50
|
(0, NotificationCenter_1.showNotification)(result.reason, 4000);
|
|
51
|
+
return;
|
|
50
52
|
}
|
|
53
|
+
selectItems([
|
|
54
|
+
{
|
|
55
|
+
type: 'sequence-effect',
|
|
56
|
+
nodePathInfo: {
|
|
57
|
+
...nodePathInfo,
|
|
58
|
+
sequenceSubscriptionKey: {
|
|
59
|
+
...nodePathInfo.sequenceSubscriptionKey,
|
|
60
|
+
nodePath: result.insertedEffect.nodePath,
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
i: result.insertedEffect.effectIndex,
|
|
64
|
+
},
|
|
65
|
+
], { revealInInspector: true });
|
|
51
66
|
}
|
|
52
67
|
catch (err) {
|
|
53
68
|
(0, NotificationCenter_1.showNotification)(err.message, 4000);
|
|
@@ -4,7 +4,7 @@ export declare const getConfigureDefaultAppsMenuItems: ({ hasPreviousItems, onCo
|
|
|
4
4
|
readonly hasPreviousItems: boolean;
|
|
5
5
|
readonly onConfigureApps: (() => void) | null;
|
|
6
6
|
}) => ComboboxValue[];
|
|
7
|
-
export declare const getOpenInMenuItems: ({ canOpenDesktopApps, codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, excludeGitSource, fileManagerDisabled, folder, gitSourceDisabled, onConfigureApps, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInGitClient, onOpenInGitSource, onOpenInTerminal, }: {
|
|
7
|
+
export declare const getOpenInMenuItems: ({ canOpenDesktopApps, codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, excludeGitSource, fileManagerDisabled, folder, gitSourceDisabled, onConfigureApps, onCopyPath, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInGitClient, onOpenInGitSource, onOpenInTerminal, }: {
|
|
8
8
|
readonly canOpenDesktopApps: boolean;
|
|
9
9
|
readonly codingAgentInfo: GetDefaultCodingAgentInfoResponse | null;
|
|
10
10
|
readonly editorDisabled: boolean;
|
|
@@ -16,6 +16,7 @@ export declare const getOpenInMenuItems: ({ canOpenDesktopApps, codingAgentInfo,
|
|
|
16
16
|
readonly folder: boolean;
|
|
17
17
|
readonly gitSourceDisabled: boolean;
|
|
18
18
|
readonly onConfigureApps: (() => void) | null;
|
|
19
|
+
readonly onCopyPath?: (() => void) | undefined;
|
|
19
20
|
readonly onOpenInCodingAgent: (codingAgentId: "claude-code" | "codex" | "copilot" | "cursor", codingAgentName: string) => void;
|
|
20
21
|
readonly onOpenInEditor: (editorId: EditorPickerId) => void;
|
|
21
22
|
readonly onOpenInFileExplorer: () => void;
|
|
@@ -3,7 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getOpenInMenuItems = exports.getConfigureDefaultAppsMenuItems = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const no_react_1 = require("remotion/no-react");
|
|
6
|
+
const colors_1 = require("../helpers/colors");
|
|
6
7
|
const get_file_manager_name_1 = require("../helpers/get-file-manager-name");
|
|
8
|
+
const clipboard_1 = require("../icons/clipboard");
|
|
7
9
|
const editor_1 = require("../icons/editor");
|
|
8
10
|
const finder_1 = require("../icons/finder");
|
|
9
11
|
const git_client_1 = require("../icons/git-client");
|
|
@@ -16,6 +18,7 @@ const menuLabel = {
|
|
|
16
18
|
fontSize: 13,
|
|
17
19
|
lineHeight: '16px',
|
|
18
20
|
};
|
|
21
|
+
const copyIcon = { height: 16, width: 16 };
|
|
19
22
|
const getConfigureDefaultAppsMenuItems = ({ hasPreviousItems, onConfigureApps, }) => {
|
|
20
23
|
if (!onConfigureApps) {
|
|
21
24
|
return [];
|
|
@@ -38,7 +41,7 @@ const getConfigureDefaultAppsMenuItems = ({ hasPreviousItems, onConfigureApps, }
|
|
|
38
41
|
];
|
|
39
42
|
};
|
|
40
43
|
exports.getConfigureDefaultAppsMenuItems = getConfigureDefaultAppsMenuItems;
|
|
41
|
-
const getOpenInMenuItems = ({ canOpenDesktopApps, codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, excludeGitSource, fileManagerDisabled, folder, gitSourceDisabled, onConfigureApps, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInGitClient, onOpenInGitSource, onOpenInTerminal, }) => {
|
|
44
|
+
const getOpenInMenuItems = ({ canOpenDesktopApps, codingAgentInfo, editorDisabled, editorInfo, excludeCodingAgentId, excludeEditorId, excludeGitSource, fileManagerDisabled, folder, gitSourceDisabled, onConfigureApps, onCopyPath, onOpenInCodingAgent, onOpenInEditor, onOpenInFileExplorer, onOpenInGitClient, onOpenInGitSource, onOpenInTerminal, }) => {
|
|
42
45
|
var _a, _b, _c, _d;
|
|
43
46
|
const showFinder = canOpenDesktopApps && window.remotion_fileSystemPlatform === 'darwin';
|
|
44
47
|
const fileManagerName = (0, get_file_manager_name_1.getFileManagerName)(window.remotion_fileSystemPlatform);
|
|
@@ -117,6 +120,19 @@ const getOpenInMenuItems = ({ canOpenDesktopApps, codingAgentInfo, editorDisable
|
|
|
117
120
|
value: 'file-explorer',
|
|
118
121
|
}
|
|
119
122
|
: null,
|
|
123
|
+
onCopyPath
|
|
124
|
+
? {
|
|
125
|
+
id: 'copy-path',
|
|
126
|
+
keyHint: null,
|
|
127
|
+
label: jsx_runtime_1.jsx("span", { style: menuLabel, children: "Copy path" }),
|
|
128
|
+
leftItem: jsx_runtime_1.jsx(clipboard_1.ClipboardIcon, { color: colors_1.LIGHT_TEXT, style: copyIcon }),
|
|
129
|
+
onClick: onCopyPath,
|
|
130
|
+
quickSwitcherLabel: 'Copy path',
|
|
131
|
+
subMenu: null,
|
|
132
|
+
type: 'item',
|
|
133
|
+
value: 'copy-path',
|
|
134
|
+
}
|
|
135
|
+
: null,
|
|
120
136
|
].filter(no_react_1.NoReactInternals.truthy);
|
|
121
137
|
const hasCategorizedApps = editors.length > 0 ||
|
|
122
138
|
codingAgents.length > 0 ||
|
|
@@ -198,12 +198,7 @@ export declare const snapSelectedOutlineUv: ({ point, points, thresholdPx, uv, }
|
|
|
198
198
|
}) => UvCoordinate;
|
|
199
199
|
export declare const selectedOutlineTransformOriginSnapThresholdPx = 10;
|
|
200
200
|
export declare const snapSelectedOutlineTransformOriginUv: ({ crop, point, points, thresholdPx, uv, }: {
|
|
201
|
-
readonly crop:
|
|
202
|
-
readonly left: number;
|
|
203
|
-
readonly right: number;
|
|
204
|
-
readonly top: number;
|
|
205
|
-
readonly bottom: number;
|
|
206
|
-
} | null;
|
|
201
|
+
readonly crop: import("@remotion/canvas").CanvasOutlineCrop | null;
|
|
207
202
|
readonly point: OutlinePoint;
|
|
208
203
|
readonly points: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint];
|
|
209
204
|
readonly thresholdPx: number | null;
|
|
@@ -7,6 +7,7 @@ const selected_outline_geometry_1 = require("./selected-outline-geometry");
|
|
|
7
7
|
const selected_outline_measurement_1 = require("./selected-outline-measurement");
|
|
8
8
|
const selected_outline_types_1 = require("./selected-outline-types");
|
|
9
9
|
const selected_outline_uv_1 = require("./selected-outline-uv");
|
|
10
|
+
const get_timeline_keyframes_1 = require("./Timeline/get-timeline-keyframes");
|
|
10
11
|
const timeline_field_utils_1 = require("./Timeline/timeline-field-utils");
|
|
11
12
|
const timeline_rotation_utils_1 = require("./Timeline/timeline-rotation-utils");
|
|
12
13
|
const timeline_translate_utils_1 = require("./Timeline/timeline-translate-utils");
|
|
@@ -27,7 +28,12 @@ const getSelectedOutlineDragStates = ({ dragTargets, getDragOverrides, timelineP
|
|
|
27
28
|
return dragTargets.map((target) => {
|
|
28
29
|
var _a;
|
|
29
30
|
const dragOverrideValue = ((_a = getDragOverrides(target.nodePath)) !== null && _a !== void 0 ? _a : {})[selected_outline_types_1.translateFieldKey];
|
|
30
|
-
const sourceFrame =
|
|
31
|
+
const sourceFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
32
|
+
displayFrame: timelinePosition,
|
|
33
|
+
keyframeDisplayOffset: target.keyframeDisplayOffset,
|
|
34
|
+
keyframePlaybackRate: target.keyframePlaybackRate,
|
|
35
|
+
propStatus: target.propStatus,
|
|
36
|
+
});
|
|
31
37
|
const effectiveValue = remotion_1.Internals.getEffectiveVisualModeValue({
|
|
32
38
|
propStatus: target.propStatus,
|
|
33
39
|
dragOverrideValue,
|
|
@@ -193,7 +199,7 @@ const getSelectedOutlineCropDragChanges = ({ dimensions, target, values, }) => {
|
|
|
193
199
|
fileName: target.nodePath.absolutePath,
|
|
194
200
|
nodePath: target.nodePath,
|
|
195
201
|
fieldKey,
|
|
196
|
-
sourceFrame: target.sourceFrame,
|
|
202
|
+
sourceFrame: (0, get_timeline_keyframes_1.resolveKeyframeSourceFrame)(target.sourceFrame, field.propStatus),
|
|
197
203
|
value,
|
|
198
204
|
schema: target.schema,
|
|
199
205
|
clientId: target.clientId,
|
|
@@ -318,7 +324,12 @@ const getSelectedOutlineScaleDragStates = ({ dragTargets, getDragOverrides, time
|
|
|
318
324
|
return dragTargets.map((target) => {
|
|
319
325
|
var _a;
|
|
320
326
|
const dragOverrideValue = ((_a = getDragOverrides(target.nodePath)) !== null && _a !== void 0 ? _a : {})[selected_outline_types_1.scaleFieldKey];
|
|
321
|
-
const sourceFrame =
|
|
327
|
+
const sourceFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
328
|
+
displayFrame: timelinePosition,
|
|
329
|
+
keyframeDisplayOffset: target.keyframeDisplayOffset,
|
|
330
|
+
keyframePlaybackRate: target.keyframePlaybackRate,
|
|
331
|
+
propStatus: target.propStatus,
|
|
332
|
+
});
|
|
322
333
|
const effectiveValue = remotion_1.Internals.getEffectiveVisualModeValue({
|
|
323
334
|
propStatus: target.propStatus,
|
|
324
335
|
dragOverrideValue,
|
|
@@ -427,7 +438,12 @@ const getSelectedOutlineRotationDragStates = ({ dragTargets, getDragOverrides, t
|
|
|
427
438
|
return dragTargets.map((target) => {
|
|
428
439
|
var _a;
|
|
429
440
|
const dragOverrideValue = ((_a = getDragOverrides(target.nodePath)) !== null && _a !== void 0 ? _a : {})[selected_outline_types_1.rotateFieldKey];
|
|
430
|
-
const sourceFrame =
|
|
441
|
+
const sourceFrame = (0, get_timeline_keyframes_1.getKeyframeSourceFrame)({
|
|
442
|
+
displayFrame: timelinePosition,
|
|
443
|
+
keyframeDisplayOffset: target.keyframeDisplayOffset,
|
|
444
|
+
keyframePlaybackRate: target.keyframePlaybackRate,
|
|
445
|
+
propStatus: target.propStatus,
|
|
446
|
+
});
|
|
431
447
|
const effectiveValue = remotion_1.Internals.getEffectiveVisualModeValue({
|
|
432
448
|
propStatus: target.propStatus,
|
|
433
449
|
dragOverrideValue,
|
|
@@ -627,7 +643,7 @@ const getSelectedOutlineTransformOriginDragChanges = ({ target, startTranslate,
|
|
|
627
643
|
fileName: target.nodePath.absolutePath,
|
|
628
644
|
nodePath: target.nodePath,
|
|
629
645
|
fieldKey: selected_outline_types_1.transformOriginFieldKey,
|
|
630
|
-
sourceFrame: target.sourceFrame,
|
|
646
|
+
sourceFrame: (0, get_timeline_keyframes_1.resolveKeyframeSourceFrame)(target.sourceFrame, target.originPropStatus),
|
|
631
647
|
value: origin,
|
|
632
648
|
schema: target.schema,
|
|
633
649
|
});
|
|
@@ -666,7 +682,7 @@ const getSelectedOutlineTransformOriginDragChanges = ({ target, startTranslate,
|
|
|
666
682
|
fileName: target.nodePath.absolutePath,
|
|
667
683
|
nodePath: target.nodePath,
|
|
668
684
|
fieldKey: selected_outline_types_1.translateFieldKey,
|
|
669
|
-
sourceFrame: target.sourceFrame,
|
|
685
|
+
sourceFrame: (0, get_timeline_keyframes_1.resolveKeyframeSourceFrame)(target.sourceFrame, target.translatePropStatus),
|
|
670
686
|
value: translate,
|
|
671
687
|
schema: target.schema,
|
|
672
688
|
});
|
|
@@ -1,21 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
readonly y: number;
|
|
4
|
-
};
|
|
5
|
-
export type SelectedOutline = {
|
|
6
|
-
readonly key: string;
|
|
7
|
-
readonly dimensions: {
|
|
8
|
-
readonly width: number;
|
|
9
|
-
readonly height: number;
|
|
10
|
-
} | null;
|
|
11
|
-
readonly uncroppedPoints: readonly [OutlinePoint, OutlinePoint, OutlinePoint, OutlinePoint] | null;
|
|
12
|
-
readonly points: readonly [
|
|
13
|
-
OutlinePoint,
|
|
14
|
-
OutlinePoint,
|
|
15
|
-
OutlinePoint,
|
|
16
|
-
OutlinePoint
|
|
17
|
-
];
|
|
18
|
-
};
|
|
1
|
+
import type { CanvasOutlinePoint as OutlinePoint } from '@remotion/canvas';
|
|
2
|
+
export type { CanvasOutline as SelectedOutline, CanvasOutlinePoint as OutlinePoint, } from '@remotion/canvas';
|
|
19
3
|
export declare const clamp: (value: number, min: number, max: number) => number;
|
|
20
4
|
export declare const mix: (from: number, to: number, progress: number) => number;
|
|
21
5
|
export declare const mixPoint: (from: OutlinePoint, to: OutlinePoint, progress: number) => OutlinePoint;
|