@remotion/studio 4.0.465 → 4.0.466
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/CompositionSelectorItem.js +16 -79
- package/dist/components/EditorContent.js +1 -3
- package/dist/components/Menu/MenuItem.d.ts +1 -1
- package/dist/components/Modals.js +1 -1
- package/dist/components/NewComposition/MenuContent.js +1 -0
- package/dist/components/RenderButton.js +1 -0
- package/dist/components/RenderModal/RenderModalAdvanced.d.ts +1 -11
- package/dist/components/RenderModal/RenderModalAdvanced.js +4 -50
- package/dist/components/RenderModal/RenderModalEncoding.d.ts +37 -0
- package/dist/components/RenderModal/RenderModalEncoding.js +165 -0
- package/dist/components/RenderModal/RenderModalPicture.d.ts +1 -22
- package/dist/components/RenderModal/RenderModalPicture.js +6 -84
- package/dist/components/RenderModal/ServerRenderModal.d.ts +1 -0
- package/dist/components/RenderModal/ServerRenderModal.js +16 -4
- package/dist/components/RenderQueue/actions.d.ts +2 -1
- package/dist/components/RenderQueue/actions.js +2 -1
- package/dist/components/SidebarRenderButton.js +1 -0
- package/dist/components/Timeline/Timeline.js +6 -4
- package/dist/components/Timeline/TimelineEffectFieldRow.js +2 -1
- package/dist/components/Timeline/TimelineEffectGroupRow.d.ts +1 -0
- package/dist/components/Timeline/TimelineEffectGroupRow.js +18 -2
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +1 -1
- package/dist/components/Timeline/TimelineExpandedRow.js +1 -1
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.d.ts +7 -0
- package/dist/components/Timeline/TimelineExpandedTrackKeyframes.js +123 -0
- package/dist/components/Timeline/TimelineSchemaField.js +2 -1
- package/dist/components/Timeline/TimelineStack/index.js +7 -47
- package/dist/components/Timeline/TimelineTracks.js +2 -16
- package/dist/components/Timeline/get-timeline-keyframes.d.ts +6 -0
- package/dist/components/Timeline/get-timeline-keyframes.js +22 -0
- package/dist/components/composition-menu-items.d.ts +12 -0
- package/dist/components/composition-menu-items.js +166 -0
- package/dist/esm/{chunk-pqk2qd0d.js → chunk-sa3dm85y.js} +3694 -3257
- package/dist/esm/internals.mjs +3694 -3257
- package/dist/esm/previewEntry.mjs +3443 -3006
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/make-render-command.d.ts +2 -2
- package/dist/helpers/make-render-command.js +2 -1
- package/dist/helpers/open-in-editor.d.ts +8 -0
- package/dist/helpers/open-in-editor.js +58 -1
- package/dist/helpers/render-modal-sections.d.ts +1 -1
- package/dist/helpers/render-modal-sections.js +35 -5
- package/dist/helpers/retry-payload.js +3 -0
- package/dist/helpers/timeline-layout.d.ts +1 -0
- package/dist/helpers/timeline-layout.js +6 -1
- package/dist/helpers/use-menu-structure.js +43 -0
- package/dist/state/modals.d.ts +1 -0
- package/package.json +10 -10
package/dist/esm/renderEntry.mjs
CHANGED
|
@@ -207,7 +207,7 @@ var renderContent = (Root) => {
|
|
|
207
207
|
renderToDOM(/* @__PURE__ */ jsx("div", {
|
|
208
208
|
children: /* @__PURE__ */ jsx(DelayedSpinner, {})
|
|
209
209
|
}));
|
|
210
|
-
import("./chunk-
|
|
210
|
+
import("./chunk-sa3dm85y.js").then(({ StudioInternals }) => {
|
|
211
211
|
window.remotion_isStudio = true;
|
|
212
212
|
window.remotion_isReadOnlyStudio = true;
|
|
213
213
|
window.remotion_inputProps = "{}";
|
|
@@ -10,7 +10,7 @@ export declare const normalizeServeUrlForRenderCommand: ({ locationHref, composi
|
|
|
10
10
|
type StrictRequired<T> = {
|
|
11
11
|
[K in keyof T]-?: Exclude<T[K], undefined>;
|
|
12
12
|
};
|
|
13
|
-
type RenderMediaCommandOptions = Omit<StrictRequired<Pick<RenderMediaOptions, 'codec' | 'crf' | 'concurrency' | 'disallowParallelEncoding' | 'muted' | 'enforceAudioTrack' | 'everyNthFrame' | 'numberOfGifLoops' | 'colorSpace' | 'scale' | 'logLevel' | 'repro' | 'metadata' | 'jpegQuality' | 'pixelFormat' | 'proResProfile' | 'x264Preset' | 'audioCodec' | 'forSeamlessAacConcatenation' | 'separateAudioTo' | 'hardwareAcceleration' | 'chromeMode' | 'offthreadVideoCacheSizeInBytes' | 'offthreadVideoThreads' | 'mediaCacheSizeInBytes' | 'audioBitrate' | 'videoBitrate' | 'encodingMaxRate' | 'encodingBufferSize' | 'sampleRate'>>, 'audioBitrate' | 'videoBitrate' | 'encodingMaxRate' | 'encodingBufferSize' | 'jpegQuality' | 'proResProfile'> & {
|
|
13
|
+
type RenderMediaCommandOptions = Omit<StrictRequired<Pick<RenderMediaOptions, 'codec' | 'crf' | 'concurrency' | 'disallowParallelEncoding' | 'muted' | 'enforceAudioTrack' | 'everyNthFrame' | 'numberOfGifLoops' | 'colorSpace' | 'scale' | 'logLevel' | 'repro' | 'metadata' | 'jpegQuality' | 'pixelFormat' | 'proResProfile' | 'x264Preset' | 'gopSize' | 'audioCodec' | 'forSeamlessAacConcatenation' | 'separateAudioTo' | 'hardwareAcceleration' | 'chromeMode' | 'offthreadVideoCacheSizeInBytes' | 'offthreadVideoThreads' | 'mediaCacheSizeInBytes' | 'audioBitrate' | 'videoBitrate' | 'encodingMaxRate' | 'encodingBufferSize' | 'sampleRate'>>, 'audioBitrate' | 'videoBitrate' | 'encodingMaxRate' | 'encodingBufferSize' | 'jpegQuality' | 'proResProfile'> & {
|
|
14
14
|
audioBitrate: string | null;
|
|
15
15
|
videoBitrate: string | null;
|
|
16
16
|
encodingMaxRate: string | null;
|
|
@@ -48,5 +48,5 @@ type ReadOnlyStudioRenderCommandInput = RenderMediaCommandOptions & RenderStillC
|
|
|
48
48
|
envVariables: Record<string, string>;
|
|
49
49
|
inputProps: Record<string, unknown>;
|
|
50
50
|
};
|
|
51
|
-
export declare const makeReadOnlyStudioRenderCommand: ({ remotionVersion, locationHref, compositionId, outName, renderMode, renderDefaults, durationInFrames, concurrency, frame, startFrame, endFrame, stillImageFormat, sequenceImageFormat, videoImageFormat, jpegQuality, codec, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, crf, videoBitrate, audioBitrate, audioCodec, everyNthFrame, numberOfGifLoops, disallowParallelEncoding, encodingBufferSize, encodingMaxRate, forSeamlessAacConcatenation, separateAudioTo, colorSpace, scale, logLevel, delayRenderTimeout, hardwareAcceleration, chromeMode, headless, disableWebSecurity, ignoreCertificateErrors, gl, userAgent, multiProcessOnLinux, darkMode, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, mediaCacheSizeInBytes, beepOnFinish, repro, metadata, sampleRate, envVariables, inputProps, }: ReadOnlyStudioRenderCommandInput) => string;
|
|
51
|
+
export declare const makeReadOnlyStudioRenderCommand: ({ remotionVersion, locationHref, compositionId, outName, renderMode, renderDefaults, durationInFrames, concurrency, frame, startFrame, endFrame, stillImageFormat, sequenceImageFormat, videoImageFormat, jpegQuality, codec, muted, enforceAudioTrack, proResProfile, x264Preset, gopSize, pixelFormat, crf, videoBitrate, audioBitrate, audioCodec, everyNthFrame, numberOfGifLoops, disallowParallelEncoding, encodingBufferSize, encodingMaxRate, forSeamlessAacConcatenation, separateAudioTo, colorSpace, scale, logLevel, delayRenderTimeout, hardwareAcceleration, chromeMode, headless, disableWebSecurity, ignoreCertificateErrors, gl, userAgent, multiProcessOnLinux, darkMode, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, mediaCacheSizeInBytes, beepOnFinish, repro, metadata, sampleRate, envVariables, inputProps, }: ReadOnlyStudioRenderCommandInput) => string;
|
|
52
52
|
export {};
|
|
@@ -80,7 +80,7 @@ const renderMediaValueFlag = (option, value, defaultValue) => {
|
|
|
80
80
|
const renderMediaBooleanFlag = (option, value, defaultValue) => {
|
|
81
81
|
return booleanFlag(getRenderMediaFlag(option), value, defaultValue);
|
|
82
82
|
};
|
|
83
|
-
const makeReadOnlyStudioRenderCommand = ({ remotionVersion, locationHref, compositionId, outName, renderMode, renderDefaults, durationInFrames, concurrency, frame, startFrame, endFrame, stillImageFormat, sequenceImageFormat, videoImageFormat, jpegQuality, codec, muted, enforceAudioTrack, proResProfile, x264Preset, pixelFormat, crf, videoBitrate, audioBitrate, audioCodec, everyNthFrame, numberOfGifLoops, disallowParallelEncoding, encodingBufferSize, encodingMaxRate, forSeamlessAacConcatenation, separateAudioTo, colorSpace, scale, logLevel, delayRenderTimeout, hardwareAcceleration, chromeMode, headless, disableWebSecurity, ignoreCertificateErrors, gl, userAgent, multiProcessOnLinux, darkMode, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, mediaCacheSizeInBytes, beepOnFinish, repro, metadata, sampleRate, envVariables, inputProps, }) => {
|
|
83
|
+
const makeReadOnlyStudioRenderCommand = ({ remotionVersion, locationHref, compositionId, outName, renderMode, renderDefaults, durationInFrames, concurrency, frame, startFrame, endFrame, stillImageFormat, sequenceImageFormat, videoImageFormat, jpegQuality, codec, muted, enforceAudioTrack, proResProfile, x264Preset, gopSize, pixelFormat, crf, videoBitrate, audioBitrate, audioCodec, everyNthFrame, numberOfGifLoops, disallowParallelEncoding, encodingBufferSize, encodingMaxRate, forSeamlessAacConcatenation, separateAudioTo, colorSpace, scale, logLevel, delayRenderTimeout, hardwareAcceleration, chromeMode, headless, disableWebSecurity, ignoreCertificateErrors, gl, userAgent, multiProcessOnLinux, darkMode, offthreadVideoCacheSizeInBytes, offthreadVideoThreads, mediaCacheSizeInBytes, beepOnFinish, repro, metadata, sampleRate, envVariables, inputProps, }) => {
|
|
84
84
|
var _a;
|
|
85
85
|
const serveUrl = (0, exports.normalizeServeUrlForRenderCommand)({
|
|
86
86
|
locationHref,
|
|
@@ -154,6 +154,7 @@ const makeReadOnlyStudioRenderCommand = ({ remotionVersion, locationHref, compos
|
|
|
154
154
|
renderMediaValueFlag('colorSpace', colorSpace, renderDefaults.colorSpace),
|
|
155
155
|
valueFlag(options.proResProfileOption.cliFlag, proResProfile, renderDefaults.proResProfile),
|
|
156
156
|
renderMediaValueFlag('x264Preset', x264Preset, renderDefaults.x264Preset),
|
|
157
|
+
renderMediaValueFlag('gopSize', gopSize, renderDefaults.gopSize),
|
|
157
158
|
valueFlag(options.crfOption.cliFlag, crf, null),
|
|
158
159
|
valueFlag(options.jpegQualityOption.cliFlag, jpegQuality, renderDefaults.jpegQuality),
|
|
159
160
|
renderMediaValueFlag('videoBitrate', videoBitrate, renderDefaults.videoBitrate),
|
|
@@ -2,3 +2,11 @@ import type { SymbolicatedStackFrame } from '@remotion/studio-shared';
|
|
|
2
2
|
import type { OriginalPosition } from '../error-overlay/react-overlay/utils/get-source-map';
|
|
3
3
|
export declare const openInEditor: (stack: SymbolicatedStackFrame) => Promise<Response>;
|
|
4
4
|
export declare const openOriginalPositionInEditor: (originalPosition: OriginalPosition) => Promise<void>;
|
|
5
|
+
export declare const preloadCompositionComponentInfo: ({ compositionFile, compositionId, }: {
|
|
6
|
+
compositionFile: string;
|
|
7
|
+
compositionId: string;
|
|
8
|
+
}) => void;
|
|
9
|
+
export declare const openCompositionComponentInEditor: ({ compositionFile, compositionId, }: {
|
|
10
|
+
compositionFile: string;
|
|
11
|
+
compositionId: string;
|
|
12
|
+
}) => Promise<void>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.openOriginalPositionInEditor = exports.openInEditor = void 0;
|
|
3
|
+
exports.openCompositionComponentInEditor = exports.preloadCompositionComponentInfo = exports.openOriginalPositionInEditor = exports.openInEditor = void 0;
|
|
4
4
|
const openInEditor = (stack) => {
|
|
5
5
|
const { originalFileName, originalLineNumber, originalColumnNumber, originalFunctionName, originalScriptCode, } = stack;
|
|
6
6
|
return fetch(`/api/open-in-editor`, {
|
|
@@ -30,3 +30,60 @@ const openOriginalPositionInEditor = async (originalPosition) => {
|
|
|
30
30
|
});
|
|
31
31
|
};
|
|
32
32
|
exports.openOriginalPositionInEditor = openOriginalPositionInEditor;
|
|
33
|
+
const componentResolutionCache = new Map();
|
|
34
|
+
const getComponentResolutionCacheKey = ({ compositionFile, compositionId, }) => {
|
|
35
|
+
return `${compositionFile}::${compositionId}`;
|
|
36
|
+
};
|
|
37
|
+
const loadCompositionComponentInfo = async ({ compositionFile, compositionId, }) => {
|
|
38
|
+
const cacheKey = getComponentResolutionCacheKey({
|
|
39
|
+
compositionFile,
|
|
40
|
+
compositionId,
|
|
41
|
+
});
|
|
42
|
+
const existing = componentResolutionCache.get(cacheKey);
|
|
43
|
+
if (existing) {
|
|
44
|
+
return existing;
|
|
45
|
+
}
|
|
46
|
+
const promise = (async () => {
|
|
47
|
+
const response = await fetch(`/api/composition-component-info`, {
|
|
48
|
+
method: 'post',
|
|
49
|
+
headers: {
|
|
50
|
+
'content-type': 'application/json',
|
|
51
|
+
},
|
|
52
|
+
body: JSON.stringify({
|
|
53
|
+
compositionFile,
|
|
54
|
+
compositionId,
|
|
55
|
+
}),
|
|
56
|
+
});
|
|
57
|
+
const body = (await response.json());
|
|
58
|
+
if (!body.success) {
|
|
59
|
+
throw new Error(body.error);
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
location: body.location,
|
|
63
|
+
canAddSequence: body.canAddSequence,
|
|
64
|
+
};
|
|
65
|
+
})();
|
|
66
|
+
componentResolutionCache.set(cacheKey, promise);
|
|
67
|
+
try {
|
|
68
|
+
return await promise;
|
|
69
|
+
}
|
|
70
|
+
catch (err) {
|
|
71
|
+
componentResolutionCache.delete(cacheKey);
|
|
72
|
+
throw err;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
const preloadCompositionComponentInfo = ({ compositionFile, compositionId, }) => {
|
|
76
|
+
loadCompositionComponentInfo({
|
|
77
|
+
compositionFile,
|
|
78
|
+
compositionId,
|
|
79
|
+
}).catch(() => undefined);
|
|
80
|
+
};
|
|
81
|
+
exports.preloadCompositionComponentInfo = preloadCompositionComponentInfo;
|
|
82
|
+
const openCompositionComponentInEditor = async ({ compositionFile, compositionId, }) => {
|
|
83
|
+
const info = await loadCompositionComponentInfo({
|
|
84
|
+
compositionFile,
|
|
85
|
+
compositionId,
|
|
86
|
+
});
|
|
87
|
+
await (0, exports.openOriginalPositionInEditor)(info.location);
|
|
88
|
+
};
|
|
89
|
+
exports.openCompositionComponentInEditor = openCompositionComponentInEditor;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { RenderType } from '../components/RenderModal/RenderModalAdvanced';
|
|
2
|
-
type Section = 'general' | '
|
|
2
|
+
type Section = 'general' | 'data' | 'picture' | 'audio' | 'gif' | 'encoding' | 'environment' | 'advanced';
|
|
3
3
|
export declare const useRenderModalSections: (renderMode: RenderType, codec: "aac" | "av1" | "gif" | "h264" | "h264-mkv" | "h264-ts" | "h265" | "mp3" | "prores" | "vp8" | "vp9" | "wav") => {
|
|
4
4
|
tab: Section;
|
|
5
5
|
setTab: import("react").Dispatch<import("react").SetStateAction<Section>>;
|
|
@@ -6,19 +6,49 @@ const useRenderModalSections = (renderMode, codec) => {
|
|
|
6
6
|
const [selectedTab, setTab] = (0, react_1.useState)('general');
|
|
7
7
|
const shownTabs = (0, react_1.useMemo)(() => {
|
|
8
8
|
if (renderMode === 'audio') {
|
|
9
|
-
return [
|
|
9
|
+
return [
|
|
10
|
+
'general',
|
|
11
|
+
'data',
|
|
12
|
+
'audio',
|
|
13
|
+
'encoding',
|
|
14
|
+
'environment',
|
|
15
|
+
'advanced',
|
|
16
|
+
];
|
|
10
17
|
}
|
|
11
18
|
if (renderMode === 'still') {
|
|
12
|
-
return ['general', 'data', 'picture', 'advanced'];
|
|
19
|
+
return ['general', 'data', 'picture', 'environment', 'advanced'];
|
|
13
20
|
}
|
|
14
21
|
if (renderMode === 'sequence') {
|
|
15
|
-
return [
|
|
22
|
+
return [
|
|
23
|
+
'general',
|
|
24
|
+
'data',
|
|
25
|
+
'picture',
|
|
26
|
+
'encoding',
|
|
27
|
+
'environment',
|
|
28
|
+
'advanced',
|
|
29
|
+
];
|
|
16
30
|
}
|
|
17
31
|
if (renderMode === 'video') {
|
|
18
32
|
if (codec === 'gif') {
|
|
19
|
-
return [
|
|
33
|
+
return [
|
|
34
|
+
'general',
|
|
35
|
+
'data',
|
|
36
|
+
'picture',
|
|
37
|
+
'gif',
|
|
38
|
+
'encoding',
|
|
39
|
+
'environment',
|
|
40
|
+
'advanced',
|
|
41
|
+
];
|
|
20
42
|
}
|
|
21
|
-
return [
|
|
43
|
+
return [
|
|
44
|
+
'general',
|
|
45
|
+
'data',
|
|
46
|
+
'picture',
|
|
47
|
+
'audio',
|
|
48
|
+
'encoding',
|
|
49
|
+
'environment',
|
|
50
|
+
'advanced',
|
|
51
|
+
];
|
|
22
52
|
}
|
|
23
53
|
throw new TypeError('Unknown render mode');
|
|
24
54
|
}, [codec, renderMode]);
|
|
@@ -25,6 +25,7 @@ const makeRetryPayload = (job) => {
|
|
|
25
25
|
initialEnforceAudioTrack: defaults.enforceAudioTrack,
|
|
26
26
|
initialProResProfile: null,
|
|
27
27
|
initialx264Preset: defaults.x264Preset,
|
|
28
|
+
initialGopSize: defaults.gopSize,
|
|
28
29
|
initialPixelFormat: defaults.pixelFormat,
|
|
29
30
|
initialAudioBitrate: defaults.audioBitrate,
|
|
30
31
|
initialVideoBitrate: defaults.videoBitrate,
|
|
@@ -78,6 +79,7 @@ const makeRetryPayload = (job) => {
|
|
|
78
79
|
initialEnforceAudioTrack: defaults.enforceAudioTrack,
|
|
79
80
|
initialProResProfile: null,
|
|
80
81
|
initialx264Preset: defaults.x264Preset,
|
|
82
|
+
initialGopSize: defaults.gopSize,
|
|
81
83
|
initialPixelFormat: defaults.pixelFormat,
|
|
82
84
|
initialAudioBitrate: defaults.audioBitrate,
|
|
83
85
|
initialVideoBitrate: defaults.videoBitrate,
|
|
@@ -133,6 +135,7 @@ const makeRetryPayload = (job) => {
|
|
|
133
135
|
initialEnforceAudioTrack: job.enforceAudioTrack,
|
|
134
136
|
initialProResProfile: (_d = job.proResProfile) !== null && _d !== void 0 ? _d : null,
|
|
135
137
|
initialx264Preset: (_e = job.x264Preset) !== null && _e !== void 0 ? _e : defaults.x264Preset,
|
|
138
|
+
initialGopSize: job.gopSize,
|
|
136
139
|
initialPixelFormat: job.pixelFormat,
|
|
137
140
|
initialAudioBitrate: job.audioBitrate,
|
|
138
141
|
initialVideoBitrate: job.videoBitrate,
|
|
@@ -15,6 +15,7 @@ export type TimelineFieldOnDragValueChange = (value: unknown) => void;
|
|
|
15
15
|
export type TimelineEffectGroupInfo = {
|
|
16
16
|
readonly effectIndex: number;
|
|
17
17
|
readonly effectSchema: SequenceSchemaShape;
|
|
18
|
+
readonly documentationLink: string | null;
|
|
18
19
|
};
|
|
19
20
|
export type TimelineTreeNode = {
|
|
20
21
|
readonly kind: 'group';
|
|
@@ -50,6 +50,7 @@ const buildTimelineTree = ({ sequence, nodePathInfo, getDragOverrides, codeValue
|
|
|
50
50
|
label: 'Effects',
|
|
51
51
|
effectInfo: null,
|
|
52
52
|
children: sequence.effects.map((effect, i) => {
|
|
53
|
+
var _a;
|
|
53
54
|
const effectFields = (0, studio_shared_1.getEffectFieldsToShow)(effect, i);
|
|
54
55
|
return {
|
|
55
56
|
kind: 'group',
|
|
@@ -60,7 +61,11 @@ const buildTimelineTree = ({ sequence, nodePathInfo, getDragOverrides, codeValue
|
|
|
60
61
|
numberOfSequencesWithThisNodePath: 0,
|
|
61
62
|
},
|
|
62
63
|
label: effect.label,
|
|
63
|
-
effectInfo: {
|
|
64
|
+
effectInfo: {
|
|
65
|
+
effectIndex: i,
|
|
66
|
+
effectSchema: effect.schema,
|
|
67
|
+
documentationLink: (_a = effect.documentationLink) !== null && _a !== void 0 ? _a : null,
|
|
68
|
+
},
|
|
64
69
|
children: effectFields.map((f) => {
|
|
65
70
|
var _a;
|
|
66
71
|
return ({
|
|
@@ -7,9 +7,11 @@ const remotion_1 = require("remotion");
|
|
|
7
7
|
const no_react_1 = require("remotion/no-react");
|
|
8
8
|
const restart_studio_1 = require("../api/restart-studio");
|
|
9
9
|
const AskAiModal_1 = require("../components/AskAiModal");
|
|
10
|
+
const composition_menu_items_1 = require("../components/composition-menu-items");
|
|
10
11
|
const layout_1 = require("../components/layout");
|
|
11
12
|
const NotificationCenter_1 = require("../components/Notifications/NotificationCenter");
|
|
12
13
|
const SizeSelector_1 = require("../components/SizeSelector");
|
|
14
|
+
const use_resolved_stack_1 = require("../components/Timeline/use-resolved-stack");
|
|
13
15
|
const TimelineInOutToggle_1 = require("../components/TimelineInOutToggle");
|
|
14
16
|
const ShortcutHint_1 = require("../error-overlay/remotion-overlay/ShortcutHint");
|
|
15
17
|
const Checkmark_1 = require("../icons/Checkmark");
|
|
@@ -145,12 +147,14 @@ const getFileMenu = ({ readOnlyStudio, closeMenu, previewServerState, setSelecte
|
|
|
145
147
|
};
|
|
146
148
|
};
|
|
147
149
|
const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
150
|
+
var _a;
|
|
148
151
|
const { setSelectedModal } = (0, react_1.useContext)(modals_1.ModalsContext);
|
|
149
152
|
const { checkerboard, setCheckerboard } = (0, react_1.useContext)(checkerboard_1.CheckerboardContext);
|
|
150
153
|
const { editorZoomGestures, setEditorZoomGestures } = (0, react_1.useContext)(editor_zoom_gestures_1.EditorZoomGesturesContext);
|
|
151
154
|
const { editorShowRulers, setEditorShowRulers } = (0, react_1.useContext)(editor_rulers_1.EditorShowRulersContext);
|
|
152
155
|
const { editorShowGuides, setEditorShowGuides } = (0, react_1.useContext)(editor_guides_1.EditorShowGuidesContext);
|
|
153
156
|
const { size, setSize } = (0, react_1.useContext)(remotion_1.Internals.PreviewSizeContext);
|
|
157
|
+
const { canvasContent, compositions } = (0, react_1.useContext)(remotion_1.Internals.CompositionManager);
|
|
154
158
|
const { type } = (0, react_1.useContext)(client_id_1.StudioServerConnectionCtx).previewServerState;
|
|
155
159
|
const { setSidebarCollapsedState, sidebarCollapsedStateLeft, sidebarCollapsedStateRight, } = (0, react_1.useContext)(sidebar_1.SidebarContext);
|
|
156
160
|
const sizes = (0, react_1.useMemo)(() => (0, SizeSelector_1.getUniqueSizes)(size), [size]);
|
|
@@ -158,6 +162,26 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
158
162
|
const { remotion_packageManager } = window;
|
|
159
163
|
const sizePreselectIndex = sizes.findIndex((s) => String(size.size) === String(s.size));
|
|
160
164
|
const mobileLayout = (0, mobile_layout_1.useMobileLayout)();
|
|
165
|
+
const currentComposition = (0, react_1.useMemo)(() => {
|
|
166
|
+
var _a;
|
|
167
|
+
if (canvasContent === null || canvasContent.type !== 'composition') {
|
|
168
|
+
return null;
|
|
169
|
+
}
|
|
170
|
+
return ((_a = compositions.find((c) => c.id === canvasContent.compositionId)) !== null && _a !== void 0 ? _a : null);
|
|
171
|
+
}, [canvasContent, compositions]);
|
|
172
|
+
const resolvedCompositionLocation = (0, use_resolved_stack_1.useResolvedStack)((_a = currentComposition === null || currentComposition === void 0 ? void 0 : currentComposition.stack) !== null && _a !== void 0 ? _a : null);
|
|
173
|
+
(0, react_1.useEffect)(() => {
|
|
174
|
+
if (type !== 'connected' ||
|
|
175
|
+
!window.remotion_editorName ||
|
|
176
|
+
!currentComposition ||
|
|
177
|
+
!(resolvedCompositionLocation === null || resolvedCompositionLocation === void 0 ? void 0 : resolvedCompositionLocation.source)) {
|
|
178
|
+
return;
|
|
179
|
+
}
|
|
180
|
+
(0, open_in_editor_1.preloadCompositionComponentInfo)({
|
|
181
|
+
compositionFile: resolvedCompositionLocation.source,
|
|
182
|
+
compositionId: currentComposition.id,
|
|
183
|
+
});
|
|
184
|
+
}, [currentComposition, resolvedCompositionLocation === null || resolvedCompositionLocation === void 0 ? void 0 : resolvedCompositionLocation.source, type]);
|
|
161
185
|
const structure = (0, react_1.useMemo)(() => {
|
|
162
186
|
let struct = [
|
|
163
187
|
{
|
|
@@ -574,6 +598,20 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
574
598
|
: null,
|
|
575
599
|
].filter(remotion_1.Internals.truthy),
|
|
576
600
|
},
|
|
601
|
+
{
|
|
602
|
+
id: 'composition',
|
|
603
|
+
label: 'Composition',
|
|
604
|
+
leaveLeftPadding: false,
|
|
605
|
+
items: (0, composition_menu_items_1.getCompositionMenuItems)({
|
|
606
|
+
closeMenu,
|
|
607
|
+
composition: currentComposition,
|
|
608
|
+
connectionStatus: type,
|
|
609
|
+
resolvedLocation: resolvedCompositionLocation,
|
|
610
|
+
setSelectedModal,
|
|
611
|
+
readOnlyStudio,
|
|
612
|
+
}),
|
|
613
|
+
quickSwitcherLabel: null,
|
|
614
|
+
},
|
|
577
615
|
{
|
|
578
616
|
id: 'tools',
|
|
579
617
|
label: 'Tools',
|
|
@@ -834,6 +872,8 @@ const useMenuStructure = (closeMenu, readOnlyStudio) => {
|
|
|
834
872
|
type,
|
|
835
873
|
sizePreselectIndex,
|
|
836
874
|
sizes,
|
|
875
|
+
currentComposition,
|
|
876
|
+
resolvedCompositionLocation,
|
|
837
877
|
editorZoomGestures,
|
|
838
878
|
editorShowRulers,
|
|
839
879
|
editorShowGuides,
|
|
@@ -866,6 +906,9 @@ const getItemLabel = (item) => {
|
|
|
866
906
|
return (_a = item.label) === null || _a === void 0 ? void 0 : _a.toString();
|
|
867
907
|
};
|
|
868
908
|
const itemToSearchResult = (item, setSelectedModal, prefixes) => {
|
|
909
|
+
if (item.disabled) {
|
|
910
|
+
return [];
|
|
911
|
+
}
|
|
869
912
|
if (item.subMenu) {
|
|
870
913
|
return item.subMenu.items
|
|
871
914
|
.map((subItem) => {
|
package/dist/state/modals.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export type RenderModalState = {
|
|
|
48
48
|
initialEnforceAudioTrack: boolean;
|
|
49
49
|
initialProResProfile: _InternalTypes['ProResProfile'] | null;
|
|
50
50
|
initialx264Preset: X264Preset;
|
|
51
|
+
initialGopSize: number | null;
|
|
51
52
|
initialPixelFormat: PixelFormat | null;
|
|
52
53
|
initialVideoBitrate: string | null;
|
|
53
54
|
initialAudioBitrate: string | null;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/studio",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.466",
|
|
7
7
|
"description": "APIs for interacting with the Remotion Studio",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"scripts": {
|
|
@@ -25,14 +25,14 @@
|
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"semver": "7.5.3",
|
|
28
|
-
"remotion": "4.0.
|
|
29
|
-
"@remotion/player": "4.0.
|
|
30
|
-
"@remotion/media-utils": "4.0.
|
|
31
|
-
"@remotion/renderer": "4.0.
|
|
32
|
-
"@remotion/web-renderer": "4.0.
|
|
33
|
-
"@remotion/studio-shared": "4.0.
|
|
34
|
-
"@remotion/timeline-utils": "4.0.
|
|
35
|
-
"@remotion/zod-types": "4.0.
|
|
28
|
+
"remotion": "4.0.466",
|
|
29
|
+
"@remotion/player": "4.0.466",
|
|
30
|
+
"@remotion/media-utils": "4.0.466",
|
|
31
|
+
"@remotion/renderer": "4.0.466",
|
|
32
|
+
"@remotion/web-renderer": "4.0.466",
|
|
33
|
+
"@remotion/studio-shared": "4.0.466",
|
|
34
|
+
"@remotion/timeline-utils": "4.0.466",
|
|
35
|
+
"@remotion/zod-types": "4.0.466",
|
|
36
36
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
37
37
|
"mediabunny": "1.45.0",
|
|
38
38
|
"memfs": "3.4.3",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"react": "19.2.3",
|
|
44
44
|
"react-dom": "19.2.3",
|
|
45
45
|
"@types/semver": "7.5.3",
|
|
46
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
46
|
+
"@remotion/eslint-config-internal": "4.0.466",
|
|
47
47
|
"eslint": "9.19.0",
|
|
48
48
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
49
49
|
},
|