@remotion/studio 4.0.456 → 4.0.458
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/FramePersistor.js +1 -1
- package/dist/components/PlaybackRatePersistor.js +1 -1
- package/dist/components/PreviewToolbar.js +1 -1
- package/dist/components/Timeline/Padder.d.ts +4 -0
- package/dist/components/Timeline/Padder.js +14 -0
- package/dist/components/Timeline/Timeline.js +10 -3
- package/dist/components/Timeline/TimelineEnumField.d.ts +11 -0
- package/dist/components/Timeline/TimelineEnumField.js +34 -0
- package/dist/components/Timeline/TimelineExpandArrowButton.d.ts +0 -1
- package/dist/components/Timeline/TimelineExpandArrowButton.js +3 -4
- package/dist/components/Timeline/TimelineExpandedRow.d.ts +16 -0
- package/dist/components/Timeline/TimelineExpandedRow.js +49 -0
- package/dist/components/Timeline/TimelineExpandedSection.d.ts +2 -2
- package/dist/components/Timeline/TimelineExpandedSection.js +11 -63
- package/dist/components/Timeline/TimelineFieldRow.d.ts +3 -1
- package/dist/components/Timeline/TimelineFieldRow.js +13 -12
- package/dist/components/Timeline/TimelineListItem.d.ts +1 -1
- package/dist/components/Timeline/TimelineListItem.js +6 -15
- package/dist/components/Timeline/TimelinePlayCursorSyncer.js +5 -5
- package/dist/components/Timeline/TimelineSchemaField.js +4 -0
- package/dist/components/Timeline/TimelineSequence.d.ts +1 -1
- package/dist/components/Timeline/TimelineSequence.js +93 -51
- package/dist/components/Timeline/TimelineStack/index.js +1 -1
- package/dist/components/Timeline/TimelineTimeIndicators.js +10 -3
- package/dist/components/Timeline/TimelineTracks.js +5 -4
- package/dist/components/Timeline/sequence-props-subscription-store.d.ts +19 -0
- package/dist/components/Timeline/sequence-props-subscription-store.js +151 -0
- package/dist/components/Timeline/use-sequence-props-subscription.js +35 -112
- package/dist/esm/{chunk-0y1jhm8s.js → chunk-261b3aa0.js} +2168 -1959
- package/dist/esm/internals.mjs +2168 -1959
- package/dist/esm/previewEntry.mjs +2176 -1967
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/timeline-layout.d.ts +15 -17
- package/dist/helpers/timeline-layout.js +32 -52
- package/package.json +9 -9
package/dist/esm/renderEntry.mjs
CHANGED
|
@@ -209,7 +209,7 @@ var renderContent = (Root) => {
|
|
|
209
209
|
renderToDOM(/* @__PURE__ */ jsx("div", {
|
|
210
210
|
children: /* @__PURE__ */ jsx(DelayedSpinner, {})
|
|
211
211
|
}));
|
|
212
|
-
import("./chunk-
|
|
212
|
+
import("./chunk-261b3aa0.js").then(({ StudioInternals }) => {
|
|
213
213
|
window.remotion_isStudio = true;
|
|
214
214
|
window.remotion_isReadOnlyStudio = true;
|
|
215
215
|
window.remotion_inputProps = "{}";
|
|
@@ -1,24 +1,14 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type CodeValues, type DragOverrides, type SchemaFieldInfo, type SequenceControls } from '@remotion/studio-shared';
|
|
2
|
+
import type { EffectDefinitionAndStack, TSequence } from 'remotion';
|
|
3
|
+
export type { CodeValues, DragOverrides, SchemaFieldInfo, SequenceControls };
|
|
4
|
+
export { SCHEMA_FIELD_ROW_HEIGHT, UNSUPPORTED_FIELD_ROW_HEIGHT, getFieldsToShow, } from '@remotion/studio-shared';
|
|
2
5
|
export declare const TIMELINE_PADDING = 16;
|
|
3
6
|
export declare const TIMELINE_BORDER = 1;
|
|
4
7
|
export declare const TIMELINE_ITEM_BORDER_BOTTOM = 1;
|
|
5
8
|
export declare const TIMELINE_TRACK_EXPANDED_HEIGHT = 100;
|
|
6
|
-
export declare const SCHEMA_FIELD_ROW_HEIGHT = 22;
|
|
7
|
-
export declare const UNSUPPORTED_FIELD_ROW_HEIGHT = 22;
|
|
8
9
|
export declare const TREE_GROUP_ROW_HEIGHT = 22;
|
|
9
|
-
export declare const TREE_INDENT_PER_LEVEL = 16;
|
|
10
10
|
export declare const EXPANDED_SECTION_PADDING_LEFT = 28;
|
|
11
11
|
export declare const EXPANDED_SECTION_PADDING_RIGHT = 10;
|
|
12
|
-
export type SchemaFieldInfo = {
|
|
13
|
-
key: string;
|
|
14
|
-
description: string | undefined;
|
|
15
|
-
typeName: string;
|
|
16
|
-
supported: boolean;
|
|
17
|
-
rowHeight: number;
|
|
18
|
-
currentValue: unknown;
|
|
19
|
-
fieldSchema: SequenceFieldSchema;
|
|
20
|
-
};
|
|
21
|
-
export declare const getSchemaFields: (controls: SequenceControls | null) => SchemaFieldInfo[] | null;
|
|
22
12
|
export type EffectSchemaFieldLabel = {
|
|
23
13
|
key: string;
|
|
24
14
|
description: string | undefined;
|
|
@@ -35,14 +25,22 @@ export type TimelineTreeNode = {
|
|
|
35
25
|
readonly label: string;
|
|
36
26
|
readonly field: SchemaFieldInfo | null;
|
|
37
27
|
};
|
|
38
|
-
export declare const buildTimelineTree: (sequence
|
|
28
|
+
export declare const buildTimelineTree: ({ sequence, dragOverrides, codeValues, }: {
|
|
29
|
+
sequence: TSequence;
|
|
30
|
+
dragOverrides: DragOverrides;
|
|
31
|
+
codeValues: CodeValues;
|
|
32
|
+
}) => TimelineTreeNode[];
|
|
39
33
|
export type FlatTreeRow = {
|
|
40
34
|
readonly node: TimelineTreeNode;
|
|
41
35
|
readonly depth: number;
|
|
42
36
|
};
|
|
43
|
-
export declare const flattenVisibleTreeNodes: (nodes
|
|
37
|
+
export declare const flattenVisibleTreeNodes: ({ nodes, expandedTracks, depth, }: {
|
|
38
|
+
nodes: TimelineTreeNode[];
|
|
39
|
+
expandedTracks: Record<string, boolean>;
|
|
40
|
+
depth?: number | undefined;
|
|
41
|
+
}) => FlatTreeRow[];
|
|
44
42
|
export declare const getTreeRowHeight: (node: TimelineTreeNode) => number;
|
|
45
|
-
export declare const getExpandedTrackHeight: (sequence: TSequence, expandedTracks: Record<string, boolean
|
|
43
|
+
export declare const getExpandedTrackHeight: (sequence: TSequence, expandedTracks: Record<string, boolean>, dragOverrides: DragOverrides, codeValues: CodeValues) => number;
|
|
46
44
|
export declare const TIMELINE_LAYER_HEIGHT_VIDEO = 75;
|
|
47
45
|
export declare const TIMELINE_LAYER_HEIGHT_IMAGE = 50;
|
|
48
46
|
export declare const TIMELINE_LAYER_HEIGHT_AUDIO = 25;
|
|
@@ -1,43 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTimelineLayerHeight = exports.TIMELINE_LAYER_HEIGHT_AUDIO = exports.TIMELINE_LAYER_HEIGHT_IMAGE = exports.TIMELINE_LAYER_HEIGHT_VIDEO = exports.getExpandedTrackHeight = exports.getTreeRowHeight = exports.flattenVisibleTreeNodes = exports.buildTimelineTree = exports.getEffectSchemaLabels = exports.
|
|
3
|
+
exports.getTimelineLayerHeight = exports.TIMELINE_LAYER_HEIGHT_AUDIO = exports.TIMELINE_LAYER_HEIGHT_IMAGE = exports.TIMELINE_LAYER_HEIGHT_VIDEO = exports.getExpandedTrackHeight = exports.getTreeRowHeight = exports.flattenVisibleTreeNodes = exports.buildTimelineTree = exports.getEffectSchemaLabels = exports.EXPANDED_SECTION_PADDING_RIGHT = exports.EXPANDED_SECTION_PADDING_LEFT = exports.TREE_GROUP_ROW_HEIGHT = exports.TIMELINE_TRACK_EXPANDED_HEIGHT = exports.TIMELINE_ITEM_BORDER_BOTTOM = exports.TIMELINE_BORDER = exports.TIMELINE_PADDING = exports.getFieldsToShow = exports.UNSUPPORTED_FIELD_ROW_HEIGHT = exports.SCHEMA_FIELD_ROW_HEIGHT = void 0;
|
|
4
|
+
const studio_shared_1 = require("@remotion/studio-shared");
|
|
5
|
+
const studio_shared_2 = require("@remotion/studio-shared");
|
|
6
|
+
Object.defineProperty(exports, "SCHEMA_FIELD_ROW_HEIGHT", { enumerable: true, get: function () { return studio_shared_2.SCHEMA_FIELD_ROW_HEIGHT; } });
|
|
7
|
+
Object.defineProperty(exports, "UNSUPPORTED_FIELD_ROW_HEIGHT", { enumerable: true, get: function () { return studio_shared_2.UNSUPPORTED_FIELD_ROW_HEIGHT; } });
|
|
8
|
+
Object.defineProperty(exports, "getFieldsToShow", { enumerable: true, get: function () { return studio_shared_2.getFieldsToShow; } });
|
|
4
9
|
exports.TIMELINE_PADDING = 16;
|
|
5
10
|
exports.TIMELINE_BORDER = 1;
|
|
6
11
|
exports.TIMELINE_ITEM_BORDER_BOTTOM = 1;
|
|
7
12
|
exports.TIMELINE_TRACK_EXPANDED_HEIGHT = 100;
|
|
8
|
-
exports.SCHEMA_FIELD_ROW_HEIGHT = 22;
|
|
9
|
-
exports.UNSUPPORTED_FIELD_ROW_HEIGHT = 22;
|
|
10
13
|
exports.TREE_GROUP_ROW_HEIGHT = 22;
|
|
11
|
-
exports.TREE_INDENT_PER_LEVEL = 16;
|
|
12
14
|
exports.EXPANDED_SECTION_PADDING_LEFT = 28;
|
|
13
15
|
exports.EXPANDED_SECTION_PADDING_RIGHT = 10;
|
|
14
|
-
const SUPPORTED_SCHEMA_TYPES = new Set([
|
|
15
|
-
'number',
|
|
16
|
-
'boolean',
|
|
17
|
-
'rotation',
|
|
18
|
-
'translate',
|
|
19
|
-
]);
|
|
20
|
-
const getSchemaFields = (controls) => {
|
|
21
|
-
if (!controls) {
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
return Object.entries(controls.schema).map(([key, fieldSchema]) => {
|
|
25
|
-
const typeName = fieldSchema.type;
|
|
26
|
-
const supported = SUPPORTED_SCHEMA_TYPES.has(typeName);
|
|
27
|
-
return {
|
|
28
|
-
key,
|
|
29
|
-
description: fieldSchema.description,
|
|
30
|
-
typeName,
|
|
31
|
-
supported,
|
|
32
|
-
rowHeight: supported
|
|
33
|
-
? exports.SCHEMA_FIELD_ROW_HEIGHT
|
|
34
|
-
: exports.UNSUPPORTED_FIELD_ROW_HEIGHT,
|
|
35
|
-
currentValue: controls.currentValue[key],
|
|
36
|
-
fieldSchema,
|
|
37
|
-
};
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
exports.getSchemaFields = getSchemaFields;
|
|
41
16
|
const getEffectSchemaLabels = (effect) => {
|
|
42
17
|
if (!effect.definition.schema) {
|
|
43
18
|
return [];
|
|
@@ -48,7 +23,8 @@ const getEffectSchemaLabels = (effect) => {
|
|
|
48
23
|
}));
|
|
49
24
|
};
|
|
50
25
|
exports.getEffectSchemaLabels = getEffectSchemaLabels;
|
|
51
|
-
const buildTimelineTree = (sequence) => {
|
|
26
|
+
const buildTimelineTree = ({ sequence, dragOverrides, codeValues, }) => {
|
|
27
|
+
var _a;
|
|
52
28
|
const roots = [];
|
|
53
29
|
if (sequence.effects.length > 0) {
|
|
54
30
|
roots.push({
|
|
@@ -74,33 +50,37 @@ const buildTimelineTree = (sequence) => {
|
|
|
74
50
|
}),
|
|
75
51
|
});
|
|
76
52
|
}
|
|
77
|
-
const controlFields = (0,
|
|
53
|
+
const controlFields = (0, studio_shared_1.getFieldsToShow)({
|
|
54
|
+
schema: sequence.controls.schema,
|
|
55
|
+
currentRuntimeValueDotNotation: sequence.controls.currentRuntimeValueDotNotation,
|
|
56
|
+
dragOverrides,
|
|
57
|
+
codeValues,
|
|
58
|
+
overrideId: sequence.controls.overrideId,
|
|
59
|
+
});
|
|
78
60
|
if (controlFields && controlFields.length > 0) {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
id: `${sequence.id}::controls::${f.key}`,
|
|
88
|
-
label: (_a = f.description) !== null && _a !== void 0 ? _a : f.key,
|
|
89
|
-
field: f,
|
|
90
|
-
});
|
|
91
|
-
}),
|
|
92
|
-
});
|
|
61
|
+
for (const f of controlFields) {
|
|
62
|
+
roots.push({
|
|
63
|
+
kind: 'field',
|
|
64
|
+
id: `${sequence.id}::controls::${f.key}`,
|
|
65
|
+
label: (_a = f.description) !== null && _a !== void 0 ? _a : f.key,
|
|
66
|
+
field: f,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
93
69
|
}
|
|
94
70
|
return roots;
|
|
95
71
|
};
|
|
96
72
|
exports.buildTimelineTree = buildTimelineTree;
|
|
97
|
-
const flattenVisibleTreeNodes = (nodes, expandedTracks, depth = 0) => {
|
|
73
|
+
const flattenVisibleTreeNodes = ({ nodes, expandedTracks, depth = 0, }) => {
|
|
98
74
|
var _a;
|
|
99
75
|
const out = [];
|
|
100
76
|
for (const node of nodes) {
|
|
101
77
|
out.push({ node, depth });
|
|
102
78
|
if (node.kind === 'group' && ((_a = expandedTracks[node.id]) !== null && _a !== void 0 ? _a : false)) {
|
|
103
|
-
out.push(...(0, exports.flattenVisibleTreeNodes)(
|
|
79
|
+
out.push(...(0, exports.flattenVisibleTreeNodes)({
|
|
80
|
+
nodes: node.children,
|
|
81
|
+
expandedTracks,
|
|
82
|
+
depth: depth + 1,
|
|
83
|
+
}));
|
|
104
84
|
}
|
|
105
85
|
}
|
|
106
86
|
return out;
|
|
@@ -113,9 +93,9 @@ const getTreeRowHeight = (node) => {
|
|
|
113
93
|
return exports.TREE_GROUP_ROW_HEIGHT;
|
|
114
94
|
};
|
|
115
95
|
exports.getTreeRowHeight = getTreeRowHeight;
|
|
116
|
-
const getExpandedTrackHeight = (sequence, expandedTracks) => {
|
|
117
|
-
const tree = (0, exports.buildTimelineTree)(sequence);
|
|
118
|
-
const flat = (0, exports.flattenVisibleTreeNodes)(tree, expandedTracks);
|
|
96
|
+
const getExpandedTrackHeight = (sequence, expandedTracks, dragOverrides, codeValues) => {
|
|
97
|
+
const tree = (0, exports.buildTimelineTree)({ sequence, dragOverrides, codeValues });
|
|
98
|
+
const flat = (0, exports.flattenVisibleTreeNodes)({ nodes: tree, expandedTracks });
|
|
119
99
|
if (flat.length === 0) {
|
|
120
100
|
return exports.TIMELINE_TRACK_EXPANDED_HEIGHT;
|
|
121
101
|
}
|
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.458",
|
|
7
7
|
"description": "APIs for interacting with the Remotion Studio",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"sideEffects": false,
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"semver": "7.5.3",
|
|
29
|
-
"remotion": "4.0.
|
|
30
|
-
"@remotion/player": "4.0.
|
|
31
|
-
"@remotion/media-utils": "4.0.
|
|
32
|
-
"@remotion/renderer": "4.0.
|
|
33
|
-
"@remotion/web-renderer": "4.0.
|
|
34
|
-
"@remotion/studio-shared": "4.0.
|
|
35
|
-
"@remotion/zod-types": "4.0.
|
|
29
|
+
"remotion": "4.0.458",
|
|
30
|
+
"@remotion/player": "4.0.458",
|
|
31
|
+
"@remotion/media-utils": "4.0.458",
|
|
32
|
+
"@remotion/renderer": "4.0.458",
|
|
33
|
+
"@remotion/web-renderer": "4.0.458",
|
|
34
|
+
"@remotion/studio-shared": "4.0.458",
|
|
35
|
+
"@remotion/zod-types": "4.0.458",
|
|
36
36
|
"mediabunny": "1.42.0",
|
|
37
37
|
"memfs": "3.4.3",
|
|
38
38
|
"source-map": "0.7.3",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"react": "19.2.3",
|
|
44
44
|
"react-dom": "19.2.3",
|
|
45
45
|
"@types/semver": "^7.3.4",
|
|
46
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
46
|
+
"@remotion/eslint-config-internal": "4.0.458",
|
|
47
47
|
"eslint": "9.19.0",
|
|
48
48
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
49
49
|
},
|