@remotion/studio 4.0.454 → 4.0.455
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/PlayPause.d.ts +1 -0
- package/dist/components/PlayPause.js +2 -1
- package/dist/components/PreviewToolbar.js +1 -1
- package/dist/components/Timeline/Timeline.js +1 -1
- package/dist/components/Timeline/TimelineExpandArrowButton.d.ts +7 -0
- package/dist/components/Timeline/TimelineExpandArrowButton.js +38 -0
- package/dist/components/Timeline/TimelineExpandedSection.d.ts +0 -2
- package/dist/components/Timeline/TimelineExpandedSection.js +65 -16
- package/dist/components/Timeline/TimelineFieldRow.d.ts +1 -1
- package/dist/components/Timeline/TimelineFieldRow.js +5 -9
- package/dist/components/Timeline/TimelineListItem.js +5 -27
- package/dist/components/Timeline/TimelineTracks.js +4 -3
- package/dist/esm/{chunk-g39hwn0a.js → chunk-t00j0160.js} +1698 -1545
- package/dist/esm/internals.mjs +1698 -1545
- package/dist/esm/previewEntry.mjs +1701 -1548
- package/dist/esm/renderEntry.mjs +1 -1
- package/dist/helpers/timeline-layout.d.ts +29 -2
- package/dist/helpers/timeline-layout.js +87 -6
- 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-t00j0160.js").then(({ StudioInternals }) => {
|
|
213
213
|
window.remotion_isStudio = true;
|
|
214
214
|
window.remotion_isReadOnlyStudio = true;
|
|
215
215
|
window.remotion_inputProps = "{}";
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type { SequenceControls, SequenceFieldSchema } from 'remotion';
|
|
1
|
+
import type { EffectDefinitionAndStack, SequenceControls, SequenceFieldSchema, TSequence } from 'remotion';
|
|
2
2
|
export declare const TIMELINE_PADDING = 16;
|
|
3
3
|
export declare const TIMELINE_BORDER = 1;
|
|
4
4
|
export declare const TIMELINE_ITEM_BORDER_BOTTOM = 1;
|
|
5
5
|
export declare const TIMELINE_TRACK_EXPANDED_HEIGHT = 100;
|
|
6
6
|
export declare const SCHEMA_FIELD_ROW_HEIGHT = 22;
|
|
7
7
|
export declare const UNSUPPORTED_FIELD_ROW_HEIGHT = 22;
|
|
8
|
+
export declare const TREE_GROUP_ROW_HEIGHT = 22;
|
|
9
|
+
export declare const TREE_INDENT_PER_LEVEL = 16;
|
|
10
|
+
export declare const EXPANDED_SECTION_PADDING_LEFT = 28;
|
|
11
|
+
export declare const EXPANDED_SECTION_PADDING_RIGHT = 10;
|
|
8
12
|
export type SchemaFieldInfo = {
|
|
9
13
|
key: string;
|
|
10
14
|
description: string | undefined;
|
|
@@ -15,7 +19,30 @@ export type SchemaFieldInfo = {
|
|
|
15
19
|
fieldSchema: SequenceFieldSchema;
|
|
16
20
|
};
|
|
17
21
|
export declare const getSchemaFields: (controls: SequenceControls | null) => SchemaFieldInfo[] | null;
|
|
18
|
-
export
|
|
22
|
+
export type EffectSchemaFieldLabel = {
|
|
23
|
+
key: string;
|
|
24
|
+
description: string | undefined;
|
|
25
|
+
};
|
|
26
|
+
export declare const getEffectSchemaLabels: (effect: EffectDefinitionAndStack<unknown>) => EffectSchemaFieldLabel[];
|
|
27
|
+
export type TimelineTreeNode = {
|
|
28
|
+
readonly kind: 'group';
|
|
29
|
+
readonly id: string;
|
|
30
|
+
readonly label: string;
|
|
31
|
+
readonly children: TimelineTreeNode[];
|
|
32
|
+
} | {
|
|
33
|
+
readonly kind: 'field';
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly label: string;
|
|
36
|
+
readonly field: SchemaFieldInfo | null;
|
|
37
|
+
};
|
|
38
|
+
export declare const buildTimelineTree: (sequence: TSequence) => TimelineTreeNode[];
|
|
39
|
+
export type FlatTreeRow = {
|
|
40
|
+
readonly node: TimelineTreeNode;
|
|
41
|
+
readonly depth: number;
|
|
42
|
+
};
|
|
43
|
+
export declare const flattenVisibleTreeNodes: (nodes: TimelineTreeNode[], expandedTracks: Record<string, boolean>, depth?: number) => FlatTreeRow[];
|
|
44
|
+
export declare const getTreeRowHeight: (node: TimelineTreeNode) => number;
|
|
45
|
+
export declare const getExpandedTrackHeight: (sequence: TSequence, expandedTracks: Record<string, boolean>) => number;
|
|
19
46
|
export declare const TIMELINE_LAYER_HEIGHT_VIDEO = 75;
|
|
20
47
|
export declare const TIMELINE_LAYER_HEIGHT_IMAGE = 50;
|
|
21
48
|
export declare const TIMELINE_LAYER_HEIGHT_AUDIO = 25;
|
|
@@ -1,12 +1,16 @@
|
|
|
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.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;
|
|
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.getSchemaFields = exports.EXPANDED_SECTION_PADDING_RIGHT = exports.EXPANDED_SECTION_PADDING_LEFT = exports.TREE_INDENT_PER_LEVEL = exports.TREE_GROUP_ROW_HEIGHT = 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
4
|
exports.TIMELINE_PADDING = 16;
|
|
5
5
|
exports.TIMELINE_BORDER = 1;
|
|
6
6
|
exports.TIMELINE_ITEM_BORDER_BOTTOM = 1;
|
|
7
7
|
exports.TIMELINE_TRACK_EXPANDED_HEIGHT = 100;
|
|
8
8
|
exports.SCHEMA_FIELD_ROW_HEIGHT = 22;
|
|
9
9
|
exports.UNSUPPORTED_FIELD_ROW_HEIGHT = 22;
|
|
10
|
+
exports.TREE_GROUP_ROW_HEIGHT = 22;
|
|
11
|
+
exports.TREE_INDENT_PER_LEVEL = 16;
|
|
12
|
+
exports.EXPANDED_SECTION_PADDING_LEFT = 28;
|
|
13
|
+
exports.EXPANDED_SECTION_PADDING_RIGHT = 10;
|
|
10
14
|
const SUPPORTED_SCHEMA_TYPES = new Set([
|
|
11
15
|
'number',
|
|
12
16
|
'boolean',
|
|
@@ -34,13 +38,90 @@ const getSchemaFields = (controls) => {
|
|
|
34
38
|
});
|
|
35
39
|
};
|
|
36
40
|
exports.getSchemaFields = getSchemaFields;
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
41
|
+
const getEffectSchemaLabels = (effect) => {
|
|
42
|
+
if (!effect.definition.schema) {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
return Object.entries(effect.definition.schema).map(([key, fieldSchema]) => ({
|
|
46
|
+
key,
|
|
47
|
+
description: fieldSchema.description,
|
|
48
|
+
}));
|
|
49
|
+
};
|
|
50
|
+
exports.getEffectSchemaLabels = getEffectSchemaLabels;
|
|
51
|
+
const buildTimelineTree = (sequence) => {
|
|
52
|
+
const roots = [];
|
|
53
|
+
if (sequence.effects.length > 0) {
|
|
54
|
+
roots.push({
|
|
55
|
+
kind: 'group',
|
|
56
|
+
id: `${sequence.id}::effects`,
|
|
57
|
+
label: 'Effects',
|
|
58
|
+
children: sequence.effects.map((effect, i) => {
|
|
59
|
+
const effectId = `${sequence.id}::effects::${i}`;
|
|
60
|
+
return {
|
|
61
|
+
kind: 'group',
|
|
62
|
+
id: effectId,
|
|
63
|
+
label: effect.definition.label,
|
|
64
|
+
children: (0, exports.getEffectSchemaLabels)(effect).map((label) => {
|
|
65
|
+
var _a;
|
|
66
|
+
return ({
|
|
67
|
+
kind: 'field',
|
|
68
|
+
id: `${effectId}::${label.key}`,
|
|
69
|
+
label: (_a = label.description) !== null && _a !== void 0 ? _a : label.key,
|
|
70
|
+
field: null,
|
|
71
|
+
});
|
|
72
|
+
}),
|
|
73
|
+
};
|
|
74
|
+
}),
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
const controlFields = (0, exports.getSchemaFields)(sequence.controls);
|
|
78
|
+
if (controlFields && controlFields.length > 0) {
|
|
79
|
+
roots.push({
|
|
80
|
+
kind: 'group',
|
|
81
|
+
id: `${sequence.id}::controls`,
|
|
82
|
+
label: 'Controls',
|
|
83
|
+
children: controlFields.map((f) => {
|
|
84
|
+
var _a;
|
|
85
|
+
return ({
|
|
86
|
+
kind: 'field',
|
|
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
|
+
});
|
|
93
|
+
}
|
|
94
|
+
return roots;
|
|
95
|
+
};
|
|
96
|
+
exports.buildTimelineTree = buildTimelineTree;
|
|
97
|
+
const flattenVisibleTreeNodes = (nodes, expandedTracks, depth = 0) => {
|
|
98
|
+
var _a;
|
|
99
|
+
const out = [];
|
|
100
|
+
for (const node of nodes) {
|
|
101
|
+
out.push({ node, depth });
|
|
102
|
+
if (node.kind === 'group' && ((_a = expandedTracks[node.id]) !== null && _a !== void 0 ? _a : false)) {
|
|
103
|
+
out.push(...(0, exports.flattenVisibleTreeNodes)(node.children, expandedTracks, depth + 1));
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return out;
|
|
107
|
+
};
|
|
108
|
+
exports.flattenVisibleTreeNodes = flattenVisibleTreeNodes;
|
|
109
|
+
const getTreeRowHeight = (node) => {
|
|
110
|
+
if (node.kind === 'field' && node.field) {
|
|
111
|
+
return node.field.rowHeight;
|
|
112
|
+
}
|
|
113
|
+
return exports.TREE_GROUP_ROW_HEIGHT;
|
|
114
|
+
};
|
|
115
|
+
exports.getTreeRowHeight = getTreeRowHeight;
|
|
116
|
+
const getExpandedTrackHeight = (sequence, expandedTracks) => {
|
|
117
|
+
const tree = (0, exports.buildTimelineTree)(sequence);
|
|
118
|
+
const flat = (0, exports.flattenVisibleTreeNodes)(tree, expandedTracks);
|
|
119
|
+
if (flat.length === 0) {
|
|
40
120
|
return exports.TIMELINE_TRACK_EXPANDED_HEIGHT;
|
|
41
121
|
}
|
|
42
|
-
const
|
|
43
|
-
|
|
122
|
+
const totalRowsHeight = flat.reduce((sum, { node }) => sum + (0, exports.getTreeRowHeight)(node), 0);
|
|
123
|
+
const separators = Math.max(0, flat.length - 1);
|
|
124
|
+
return totalRowsHeight + separators;
|
|
44
125
|
};
|
|
45
126
|
exports.getExpandedTrackHeight = getExpandedTrackHeight;
|
|
46
127
|
exports.TIMELINE_LAYER_HEIGHT_VIDEO = 75;
|
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.455",
|
|
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.455",
|
|
30
|
+
"@remotion/player": "4.0.455",
|
|
31
|
+
"@remotion/media-utils": "4.0.455",
|
|
32
|
+
"@remotion/renderer": "4.0.455",
|
|
33
|
+
"@remotion/web-renderer": "4.0.455",
|
|
34
|
+
"@remotion/studio-shared": "4.0.455",
|
|
35
|
+
"@remotion/zod-types": "4.0.455",
|
|
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.455",
|
|
47
47
|
"eslint": "9.19.0",
|
|
48
48
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
49
49
|
},
|