@remotion/studio 4.0.429 → 4.0.431
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/NewComposition/InputDragger.js +1 -0
- package/dist/components/Timeline/TimelineExpandedSection.js +87 -20
- package/dist/components/Timeline/TimelineListItem.js +5 -2
- package/dist/components/Timeline/TimelineSchemaField.d.ts +0 -1
- package/dist/components/Timeline/TimelineSchemaField.js +33 -16
- package/dist/components/Timeline/TimelineSequenceFrame.js +1 -0
- package/dist/components/Timeline/TimelineTracks.js +4 -1
- package/dist/components/Timeline/TimelineVideoInfo.js +49 -34
- package/dist/esm/{chunk-0rv5nqc6.js → chunk-3msfwcwh.js} +407 -354
- package/dist/esm/internals.mjs +407 -354
- package/dist/esm/previewEntry.mjs +407 -355
- package/dist/esm/renderEntry.mjs +1 -2
- package/dist/helpers/extract-frames.js +23 -7
- package/dist/helpers/get-timeline-sequence-layout.js +4 -18
- package/dist/helpers/timeline-layout.d.ts +3 -3
- package/dist/helpers/timeline-layout.js +4 -16
- package/dist/previewEntry.js +0 -1
- package/dist/renderEntry.js +0 -1
- package/package.json +12 -11
package/dist/esm/renderEntry.mjs
CHANGED
|
@@ -208,11 +208,10 @@ var renderContent = (Root) => {
|
|
|
208
208
|
renderToDOM(/* @__PURE__ */ jsx("div", {
|
|
209
209
|
children: /* @__PURE__ */ jsx(DelayedSpinner, {})
|
|
210
210
|
}));
|
|
211
|
-
import("./chunk-
|
|
211
|
+
import("./chunk-3msfwcwh.js").then(({ StudioInternals }) => {
|
|
212
212
|
window.remotion_isStudio = true;
|
|
213
213
|
window.remotion_isReadOnlyStudio = true;
|
|
214
214
|
window.remotion_inputProps = "{}";
|
|
215
|
-
Internals.enableSequenceStackTraces();
|
|
216
215
|
renderToDOM(/* @__PURE__ */ jsx(StudioInternals.Studio, {
|
|
217
216
|
readOnly: true,
|
|
218
217
|
rootComponent: Root
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.extractFrames = extractFrames;
|
|
4
4
|
const mediabunny_1 = require("mediabunny");
|
|
5
5
|
async function extractFrames({ src, timestampsInSeconds, onVideoSample, signal, }) {
|
|
6
|
+
var _a;
|
|
6
7
|
const input = new mediabunny_1.Input({
|
|
7
8
|
formats: mediabunny_1.ALL_FORMATS,
|
|
8
9
|
source: new mediabunny_1.UrlSource(src),
|
|
@@ -36,15 +37,30 @@ async function extractFrames({ src, timestampsInSeconds, onVideoSample, signal,
|
|
|
36
37
|
return;
|
|
37
38
|
}
|
|
38
39
|
const sink = new mediabunny_1.VideoSampleSink(videoTrack);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
const sampleIterator = sink.samplesAtTimestamps(timestamps);
|
|
41
|
+
try {
|
|
42
|
+
for await (const videoSample of sampleIterator) {
|
|
43
|
+
if (signal === null || signal === void 0 ? void 0 : signal.aborted) {
|
|
44
|
+
videoSample === null || videoSample === void 0 ? void 0 : videoSample.close();
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
if (!videoSample) {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
onVideoSample(videoSample);
|
|
43
51
|
}
|
|
44
|
-
|
|
45
|
-
|
|
52
|
+
}
|
|
53
|
+
finally {
|
|
54
|
+
// When input.dispose() causes the iterator to throw
|
|
55
|
+
// InputDisposedError, for-await does not call .return() on the
|
|
56
|
+
// iterator (it only does so on `break`). Explicitly call it so
|
|
57
|
+
// the iterator can close any internally buffered VideoSamples.
|
|
58
|
+
try {
|
|
59
|
+
await ((_a = sampleIterator.return) === null || _a === void 0 ? void 0 : _a.call(sampleIterator));
|
|
60
|
+
}
|
|
61
|
+
catch (_b) {
|
|
62
|
+
// Iterator already done or input disposed
|
|
46
63
|
}
|
|
47
|
-
onVideoSample(videoSample);
|
|
48
64
|
}
|
|
49
65
|
}
|
|
50
66
|
catch (error) {
|
|
@@ -13,27 +13,13 @@ const getWidthOfTrack = ({ durationInFrames, lastFrame, windowWidth, spatialDura
|
|
|
13
13
|
const getTimelineSequenceLayout = ({ durationInFrames, startFrom, maxMediaDuration, startFromMedia, video, windowWidth, premountDisplay, postmountDisplay, }) => {
|
|
14
14
|
var _a;
|
|
15
15
|
const maxMediaSequenceDuration = (maxMediaDuration !== null && maxMediaDuration !== void 0 ? maxMediaDuration : Infinity) - startFromMedia;
|
|
16
|
-
const lastFrame = (
|
|
17
|
-
|
|
16
|
+
const lastFrame = (_a = video.durationInFrames) !== null && _a !== void 0 ? _a : 1;
|
|
17
|
+
const spatialDuration = Math.min(maxMediaSequenceDuration, durationInFrames, lastFrame - startFrom);
|
|
18
18
|
// Unclipped spatial duration: without the lastFrame - startFrom constraint
|
|
19
|
-
|
|
20
|
-
const shouldAddHalfAFrameAtEnd = startFrom + durationInFrames < lastFrame;
|
|
21
|
-
const shouldAddHalfAFrameAtStart = startFrom > 0;
|
|
22
|
-
if (shouldAddHalfAFrameAtEnd) {
|
|
23
|
-
spatialDuration += 0.5;
|
|
24
|
-
naturalSpatialDuration += 0.5;
|
|
25
|
-
}
|
|
26
|
-
if (shouldAddHalfAFrameAtStart) {
|
|
27
|
-
spatialDuration += 0.5;
|
|
28
|
-
naturalSpatialDuration += 0.5;
|
|
29
|
-
}
|
|
30
|
-
const startFromWithOffset = shouldAddHalfAFrameAtStart
|
|
31
|
-
? startFrom - 0.5
|
|
32
|
-
: startFrom;
|
|
19
|
+
const naturalSpatialDuration = Math.min(maxMediaSequenceDuration, durationInFrames);
|
|
33
20
|
const marginLeft = lastFrame === 0
|
|
34
21
|
? 0
|
|
35
|
-
: (
|
|
36
|
-
(windowWidth - timeline_layout_1.TIMELINE_PADDING * 2);
|
|
22
|
+
: (startFrom / lastFrame) * (windowWidth - timeline_layout_1.TIMELINE_PADDING * 2);
|
|
37
23
|
const nonNegativeMarginLeft = Math.min(marginLeft, 0);
|
|
38
24
|
const width = getWidthOfTrack({
|
|
39
25
|
durationInFrames,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { SequenceControls } from 'remotion';
|
|
2
|
-
import type { AnyZodSchema } from '../components/RenderModal/SchemaEditor/zod-schema-type';
|
|
1
|
+
import type { SequenceControls, SequenceFieldSchema } from 'remotion';
|
|
3
2
|
export declare const TIMELINE_PADDING = 16;
|
|
4
3
|
export declare const TIMELINE_BORDER = 1;
|
|
5
4
|
export declare const TIMELINE_ITEM_BORDER_BOTTOM = 1;
|
|
@@ -8,11 +7,12 @@ export declare const SCHEMA_FIELD_ROW_HEIGHT = 26;
|
|
|
8
7
|
export declare const UNSUPPORTED_FIELD_ROW_HEIGHT = 26;
|
|
9
8
|
export type SchemaFieldInfo = {
|
|
10
9
|
key: string;
|
|
10
|
+
description: string | undefined;
|
|
11
11
|
typeName: string;
|
|
12
12
|
supported: boolean;
|
|
13
13
|
rowHeight: number;
|
|
14
14
|
currentValue: unknown;
|
|
15
|
-
fieldSchema:
|
|
15
|
+
fieldSchema: SequenceFieldSchema;
|
|
16
16
|
};
|
|
17
17
|
export declare const getSchemaFields: (controls: SequenceControls | null) => SchemaFieldInfo[] | null;
|
|
18
18
|
export declare const getExpandedTrackHeight: (controls: SequenceControls | null) => number;
|
|
@@ -1,35 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getTimelineLayerHeight = exports.getExpandedTrackHeight = exports.getSchemaFields = exports.UNSUPPORTED_FIELD_ROW_HEIGHT = exports.SCHEMA_FIELD_ROW_HEIGHT = exports.TIMELINE_TRACK_EXPANDED_HEIGHT = exports.TIMELINE_ITEM_BORDER_BOTTOM = exports.TIMELINE_BORDER = exports.TIMELINE_PADDING = void 0;
|
|
4
|
-
const zod_schema_type_1 = require("../components/RenderModal/SchemaEditor/zod-schema-type");
|
|
5
4
|
exports.TIMELINE_PADDING = 16;
|
|
6
5
|
exports.TIMELINE_BORDER = 1;
|
|
7
6
|
exports.TIMELINE_ITEM_BORDER_BOTTOM = 1;
|
|
8
7
|
exports.TIMELINE_TRACK_EXPANDED_HEIGHT = 100;
|
|
9
8
|
exports.SCHEMA_FIELD_ROW_HEIGHT = 26;
|
|
10
9
|
exports.UNSUPPORTED_FIELD_ROW_HEIGHT = 26;
|
|
11
|
-
const SUPPORTED_SCHEMA_TYPES = new Set([
|
|
12
|
-
'number',
|
|
13
|
-
'string',
|
|
14
|
-
'boolean',
|
|
15
|
-
'enum',
|
|
16
|
-
'date',
|
|
17
|
-
'array',
|
|
18
|
-
'object',
|
|
19
|
-
'optional',
|
|
20
|
-
'nullable',
|
|
21
|
-
'default',
|
|
22
|
-
]);
|
|
10
|
+
const SUPPORTED_SCHEMA_TYPES = new Set(['number', 'boolean']);
|
|
23
11
|
const getSchemaFields = (controls) => {
|
|
24
12
|
if (!controls) {
|
|
25
13
|
return null;
|
|
26
14
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const typeName = (0, zod_schema_type_1.getZodSchemaType)(fieldSchema);
|
|
15
|
+
return Object.entries(controls.schema).map(([key, fieldSchema]) => {
|
|
16
|
+
const typeName = fieldSchema.type;
|
|
30
17
|
const supported = SUPPORTED_SCHEMA_TYPES.has(typeName);
|
|
31
18
|
return {
|
|
32
19
|
key,
|
|
20
|
+
description: fieldSchema.description,
|
|
33
21
|
typeName,
|
|
34
22
|
supported,
|
|
35
23
|
rowHeight: supported
|
package/dist/previewEntry.js
CHANGED
|
@@ -44,6 +44,5 @@ const renderToDOM = (content) => {
|
|
|
44
44
|
};
|
|
45
45
|
renderToDOM(jsx_runtime_1.jsx(NoRegisterRoot_1.NoRegisterRoot, {}));
|
|
46
46
|
remotion_1.Internals.waitForRoot((NewRoot) => {
|
|
47
|
-
remotion_1.Internals.enableSequenceStackTraces();
|
|
48
47
|
renderToDOM(jsx_runtime_1.jsx(Studio_1.Studio, { readOnly: false, rootComponent: NewRoot }));
|
|
49
48
|
});
|
package/dist/renderEntry.js
CHANGED
|
@@ -203,7 +203,6 @@ const renderContent = (Root) => {
|
|
|
203
203
|
window.remotion_isStudio = true;
|
|
204
204
|
window.remotion_isReadOnlyStudio = true;
|
|
205
205
|
window.remotion_inputProps = '{}';
|
|
206
|
-
remotion_1.Internals.enableSequenceStackTraces();
|
|
207
206
|
renderToDOM(jsx_runtime_1.jsx(StudioInternals.Studio, { readOnly: true, rootComponent: Root }));
|
|
208
207
|
})
|
|
209
208
|
.catch((err) => {
|
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.431",
|
|
7
7
|
"description": "APIs for interacting with the Remotion Studio",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -11,7 +11,8 @@
|
|
|
11
11
|
"lint": "eslint src",
|
|
12
12
|
"make": "tsgo -d && bun --env-file=../.env.bundle bundle.ts",
|
|
13
13
|
"test": "bun test src",
|
|
14
|
-
"formatting": "oxfmt src --check"
|
|
14
|
+
"formatting": "oxfmt src --check",
|
|
15
|
+
"format": "oxfmt src"
|
|
15
16
|
},
|
|
16
17
|
"author": "Jonny Burger <jonny@remotion.dev>",
|
|
17
18
|
"contributors": [],
|
|
@@ -25,14 +26,14 @@
|
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|
|
27
28
|
"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/zod-types": "4.0.
|
|
35
|
-
"mediabunny": "1.
|
|
29
|
+
"remotion": "4.0.431",
|
|
30
|
+
"@remotion/player": "4.0.431",
|
|
31
|
+
"@remotion/media-utils": "4.0.431",
|
|
32
|
+
"@remotion/renderer": "4.0.431",
|
|
33
|
+
"@remotion/web-renderer": "4.0.431",
|
|
34
|
+
"@remotion/studio-shared": "4.0.431",
|
|
35
|
+
"@remotion/zod-types": "4.0.431",
|
|
36
|
+
"mediabunny": "1.35.1",
|
|
36
37
|
"memfs": "3.4.3",
|
|
37
38
|
"source-map": "0.7.3",
|
|
38
39
|
"open": "^8.4.2",
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"react": "19.2.3",
|
|
43
44
|
"react-dom": "19.2.3",
|
|
44
45
|
"@types/semver": "^7.3.4",
|
|
45
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
46
|
+
"@remotion/eslint-config-internal": "4.0.431",
|
|
46
47
|
"eslint": "9.19.0",
|
|
47
48
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
48
49
|
},
|