remotion 4.0.474 → 4.0.476
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/cjs/HtmlInCanvas.js +1 -3
- package/dist/cjs/Img.d.ts +6 -0
- package/dist/cjs/Img.js +2 -2
- package/dist/cjs/Interactive.d.ts +56 -0
- package/dist/cjs/Interactive.js +119 -0
- package/dist/cjs/Sequence.js +6 -3
- package/dist/cjs/SequenceContext.d.ts +1 -0
- package/dist/cjs/animated-image/AnimatedImage.js +1 -1
- package/dist/cjs/audio/AudioForPreview.js +1 -1
- package/dist/cjs/canvas-image/CanvasImage.d.ts +6 -0
- package/dist/cjs/easing.d.ts +3 -0
- package/dist/cjs/easing.js +18 -0
- package/dist/cjs/effects/Solid.js +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/internals.d.ts +21 -0
- package/dist/cjs/interpolate-colors.d.ts +2 -3
- package/dist/cjs/interpolate-colors.js +1 -0
- package/dist/cjs/interpolate-keyframed-status.js +1 -0
- package/dist/cjs/interpolate.js +147 -0
- package/dist/cjs/loop/index.js +1 -1
- package/dist/cjs/no-react.d.ts +9 -0
- package/dist/cjs/sequence-field-schema.d.ts +42 -1
- package/dist/cjs/sequence-field-schema.js +26 -5
- package/dist/cjs/series/index.d.ts +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/VideoForPreview.js +4 -6
- package/dist/cjs/wrap-in-schema.d.ts +1 -1
- package/dist/cjs/wrap-in-schema.js +6 -4
- package/dist/esm/index.mjs +860 -583
- package/dist/esm/no-react.mjs +157 -4
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
package/dist/cjs/interpolate.js
CHANGED
|
@@ -42,6 +42,32 @@ const lengthUnits = new Set([
|
|
|
42
42
|
'vw',
|
|
43
43
|
]);
|
|
44
44
|
const cssNumberRegex = /^([+-]?(?:\d+\.?\d*|\.\d+))([a-zA-Z%]+)?$/;
|
|
45
|
+
const transformOriginKeywords = new Set([
|
|
46
|
+
'left',
|
|
47
|
+
'center',
|
|
48
|
+
'right',
|
|
49
|
+
'top',
|
|
50
|
+
'bottom',
|
|
51
|
+
]);
|
|
52
|
+
const transformOriginKeywordOptions = (keyword) => {
|
|
53
|
+
if (keyword === 'left') {
|
|
54
|
+
return [{ axis: 'x', value: { value: 0, unit: '%' } }];
|
|
55
|
+
}
|
|
56
|
+
if (keyword === 'right') {
|
|
57
|
+
return [{ axis: 'x', value: { value: 100, unit: '%' } }];
|
|
58
|
+
}
|
|
59
|
+
if (keyword === 'top') {
|
|
60
|
+
return [{ axis: 'y', value: { value: 0, unit: '%' } }];
|
|
61
|
+
}
|
|
62
|
+
if (keyword === 'bottom') {
|
|
63
|
+
return [{ axis: 'y', value: { value: 100, unit: '%' } }];
|
|
64
|
+
}
|
|
65
|
+
return [
|
|
66
|
+
{ axis: 'x', value: { value: 50, unit: '%' } },
|
|
67
|
+
{ axis: 'y', value: { value: 50, unit: '%' } },
|
|
68
|
+
];
|
|
69
|
+
};
|
|
70
|
+
const transformOriginCenter = { value: 50, unit: '%' };
|
|
45
71
|
const stringifyNumber = (value) => {
|
|
46
72
|
return String((0, normalize_number_js_1.normalizeNumber)(value));
|
|
47
73
|
};
|
|
@@ -67,6 +93,124 @@ const parseStringInterpolationComponent = (component, value) => {
|
|
|
67
93
|
}
|
|
68
94
|
throw new TypeError(`Cannot interpolate "${value}" because "${unit}" is not a supported translate or rotate unit`);
|
|
69
95
|
};
|
|
96
|
+
const parseTransformOriginLengthPercentage = ({ component, value, allowPercentage, }) => {
|
|
97
|
+
var _a;
|
|
98
|
+
const match = cssNumberRegex.exec(component);
|
|
99
|
+
if (match === null) {
|
|
100
|
+
throw new TypeError(`Cannot interpolate "${value}" because "${component}" is not a supported transform-origin ${allowPercentage ? 'length-percentage' : 'z length'}`);
|
|
101
|
+
}
|
|
102
|
+
const unit = (_a = match[2]) !== null && _a !== void 0 ? _a : null;
|
|
103
|
+
const numberValue = Number(match[1]);
|
|
104
|
+
if (!Number.isFinite(numberValue)) {
|
|
105
|
+
throw new TypeError(`Cannot interpolate "${value}" because "${component}" is not finite`);
|
|
106
|
+
}
|
|
107
|
+
if (unit === null ||
|
|
108
|
+
!lengthUnits.has(unit) ||
|
|
109
|
+
(!allowPercentage && unit === '%')) {
|
|
110
|
+
throw new TypeError(`Cannot interpolate "${value}" because "${component}" is not a supported transform-origin ${allowPercentage ? 'length-percentage' : 'z length'}`);
|
|
111
|
+
}
|
|
112
|
+
return { value: numberValue, unit };
|
|
113
|
+
};
|
|
114
|
+
const parseTransformOriginToken = (component, value) => {
|
|
115
|
+
const lower = component.toLowerCase();
|
|
116
|
+
if (transformOriginKeywords.has(lower)) {
|
|
117
|
+
return { type: 'keyword', keyword: lower };
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
type: 'length-percentage',
|
|
121
|
+
parsed: parseTransformOriginLengthPercentage({
|
|
122
|
+
component,
|
|
123
|
+
value,
|
|
124
|
+
allowPercentage: true,
|
|
125
|
+
}),
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
const parseTwoTransformOriginKeywords = (first, second, value) => {
|
|
129
|
+
const candidates = [];
|
|
130
|
+
for (const firstOption of transformOriginKeywordOptions(first)) {
|
|
131
|
+
for (const secondOption of transformOriginKeywordOptions(second)) {
|
|
132
|
+
if (firstOption.axis === secondOption.axis) {
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
candidates.push(firstOption.axis === 'x'
|
|
136
|
+
? [firstOption.value, secondOption.value]
|
|
137
|
+
: [secondOption.value, firstOption.value]);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
if (candidates.length === 0) {
|
|
141
|
+
throw new TypeError(`Cannot interpolate "${value}" because "${first} ${second}" is not a valid transform-origin keyword pair`);
|
|
142
|
+
}
|
|
143
|
+
return candidates[0];
|
|
144
|
+
};
|
|
145
|
+
const parseTransformOriginXY = (parts, value) => {
|
|
146
|
+
if (parts.length === 1) {
|
|
147
|
+
const token = parseTransformOriginToken(parts[0], value);
|
|
148
|
+
if (token.type === 'length-percentage') {
|
|
149
|
+
return [token.parsed, transformOriginCenter];
|
|
150
|
+
}
|
|
151
|
+
if (token.keyword === 'top' || token.keyword === 'bottom') {
|
|
152
|
+
return [
|
|
153
|
+
transformOriginCenter,
|
|
154
|
+
transformOriginKeywordOptions(token.keyword)[0].value,
|
|
155
|
+
];
|
|
156
|
+
}
|
|
157
|
+
return [
|
|
158
|
+
transformOriginKeywordOptions(token.keyword)[0].value,
|
|
159
|
+
transformOriginCenter,
|
|
160
|
+
];
|
|
161
|
+
}
|
|
162
|
+
const first = parseTransformOriginToken(parts[0], value);
|
|
163
|
+
const second = parseTransformOriginToken(parts[1], value);
|
|
164
|
+
if (first.type === 'length-percentage' &&
|
|
165
|
+
second.type === 'length-percentage') {
|
|
166
|
+
return [first.parsed, second.parsed];
|
|
167
|
+
}
|
|
168
|
+
if (first.type === 'keyword' && second.type === 'keyword') {
|
|
169
|
+
return parseTwoTransformOriginKeywords(first.keyword, second.keyword, value);
|
|
170
|
+
}
|
|
171
|
+
const keyword = first.type === 'keyword'
|
|
172
|
+
? first
|
|
173
|
+
: second.type === 'keyword'
|
|
174
|
+
? second
|
|
175
|
+
: null;
|
|
176
|
+
const length = first.type === 'length-percentage'
|
|
177
|
+
? first.parsed
|
|
178
|
+
: second.type === 'length-percentage'
|
|
179
|
+
? second.parsed
|
|
180
|
+
: null;
|
|
181
|
+
if (keyword === null || length === null) {
|
|
182
|
+
throw new Error('Expected a keyword and a length-percentage value');
|
|
183
|
+
}
|
|
184
|
+
const keywordIsFirst = first.type === 'keyword';
|
|
185
|
+
if (keyword.keyword === 'left' || keyword.keyword === 'right') {
|
|
186
|
+
if (!keywordIsFirst) {
|
|
187
|
+
throw new TypeError(`Cannot interpolate "${value}" because horizontal transform-origin keywords must come before a length-percentage value`);
|
|
188
|
+
}
|
|
189
|
+
return [transformOriginKeywordOptions(keyword.keyword)[0].value, length];
|
|
190
|
+
}
|
|
191
|
+
if (keyword.keyword === 'top' || keyword.keyword === 'bottom') {
|
|
192
|
+
return [length, transformOriginKeywordOptions(keyword.keyword)[0].value];
|
|
193
|
+
}
|
|
194
|
+
return keywordIsFirst
|
|
195
|
+
? [transformOriginCenter, length]
|
|
196
|
+
: [length, transformOriginCenter];
|
|
197
|
+
};
|
|
198
|
+
const parseTransformOriginValue = (output, parts) => {
|
|
199
|
+
const [x, y] = parseTransformOriginXY(parts.slice(0, 2), output);
|
|
200
|
+
const z = parts[2] === undefined
|
|
201
|
+
? { value: 0, unit: null }
|
|
202
|
+
: parseTransformOriginLengthPercentage({
|
|
203
|
+
component: parts[2],
|
|
204
|
+
value: output,
|
|
205
|
+
allowPercentage: false,
|
|
206
|
+
});
|
|
207
|
+
return {
|
|
208
|
+
kind: 'translate',
|
|
209
|
+
values: [x.value, y.value, z.value],
|
|
210
|
+
units: [x.unit, y.unit, z.unit],
|
|
211
|
+
dimensions: parts[2] === undefined ? 2 : 3,
|
|
212
|
+
};
|
|
213
|
+
};
|
|
70
214
|
const parseStringInterpolationValue = (output) => {
|
|
71
215
|
var _a, _b, _c, _d, _e, _f;
|
|
72
216
|
var _g, _h, _j, _k, _l, _m;
|
|
@@ -85,6 +229,9 @@ const parseStringInterpolationValue = (output) => {
|
|
|
85
229
|
if (parts.length < 1 || parts.length > 3 || parts[0] === '') {
|
|
86
230
|
throw new TypeError(`String outputRange values must contain 1 to 3 components, but got "${output}"`);
|
|
87
231
|
}
|
|
232
|
+
if (parts.some((part) => transformOriginKeywords.has(part.toLowerCase()))) {
|
|
233
|
+
return parseTransformOriginValue(output, parts);
|
|
234
|
+
}
|
|
88
235
|
const parsed = parts.map((part) => parseStringInterpolationComponent(part, output));
|
|
89
236
|
const [{ kind }] = parsed;
|
|
90
237
|
for (const part of parsed) {
|
package/dist/cjs/loop/index.js
CHANGED
|
@@ -84,7 +84,7 @@ const Loop = ({ durationInFrames, times = Infinity, children, name, showInTimeli
|
|
|
84
84
|
durationInFrames,
|
|
85
85
|
};
|
|
86
86
|
}, [currentFrame, durationInFrames]);
|
|
87
|
-
return (jsx_runtime_1.jsx(LoopContext.Provider, { value: loopContext, children: jsx_runtime_1.jsx(Sequence_js_1.Sequence, { durationInFrames: durationInFrames, from: from, name: name !== null && name !== void 0 ? name : '<Loop>', _remotionInternalDocumentationLink:
|
|
87
|
+
return (jsx_runtime_1.jsx(LoopContext.Provider, { value: loopContext, children: jsx_runtime_1.jsx(Sequence_js_1.Sequence, { durationInFrames: durationInFrames, from: from, name: name !== null && name !== void 0 ? name : '<Loop>', _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/loop", _remotionInternalLoopDisplay: loopDisplay, layout: props.layout, style: style, showInTimeline: showInTimeline, children: children }) }));
|
|
88
88
|
};
|
|
89
89
|
exports.Loop = Loop;
|
|
90
90
|
exports.Loop.useLoop = useLoop;
|
package/dist/cjs/no-react.d.ts
CHANGED
|
@@ -63,6 +63,7 @@ export declare const NoReactInternals: {
|
|
|
63
63
|
}) => string[];
|
|
64
64
|
sequenceSchema: {
|
|
65
65
|
readonly hidden: import("./sequence-field-schema").BooleanFieldSchema;
|
|
66
|
+
readonly showInTimeline: import("./sequence-field-schema").HiddenFieldSchema;
|
|
66
67
|
readonly from: {
|
|
67
68
|
readonly type: "number";
|
|
68
69
|
readonly default: 0;
|
|
@@ -82,6 +83,12 @@ export declare const NoReactInternals: {
|
|
|
82
83
|
readonly description: "Layout";
|
|
83
84
|
readonly variants: {
|
|
84
85
|
readonly 'absolute-fill': {
|
|
86
|
+
readonly 'style.transformOrigin': {
|
|
87
|
+
readonly type: "transform-origin";
|
|
88
|
+
readonly step: 1;
|
|
89
|
+
readonly default: "50% 50%";
|
|
90
|
+
readonly description: "Transform origin";
|
|
91
|
+
};
|
|
85
92
|
readonly 'style.translate': {
|
|
86
93
|
readonly type: "translate";
|
|
87
94
|
readonly step: 1;
|
|
@@ -135,6 +142,8 @@ export declare const NoReactInternals: {
|
|
|
135
142
|
readonly none: {};
|
|
136
143
|
};
|
|
137
144
|
};
|
|
145
|
+
} & {
|
|
146
|
+
name: import("./sequence-field-schema").SequenceFieldSchema;
|
|
138
147
|
};
|
|
139
148
|
parseScaleValue: (value: unknown) => import("./scale-value").ScaleValue;
|
|
140
149
|
serializeScaleValue: ([x, y, z]: import("./scale-value").ScaleValue) => string | number;
|
|
@@ -41,6 +41,13 @@ export type TranslateFieldSchema = {
|
|
|
41
41
|
description?: string;
|
|
42
42
|
keyframable?: boolean;
|
|
43
43
|
};
|
|
44
|
+
export type TransformOriginFieldSchema = {
|
|
45
|
+
type: 'transform-origin';
|
|
46
|
+
step?: number;
|
|
47
|
+
default: string | undefined;
|
|
48
|
+
description?: string;
|
|
49
|
+
keyframable?: boolean;
|
|
50
|
+
};
|
|
44
51
|
export type ScaleFieldSchema = {
|
|
45
52
|
type: 'scale';
|
|
46
53
|
min?: number;
|
|
@@ -95,13 +102,19 @@ export type ArrayFieldSchema = {
|
|
|
95
102
|
description?: string;
|
|
96
103
|
keyframable?: false;
|
|
97
104
|
};
|
|
98
|
-
export type VisibleFieldSchema = NumberFieldSchema | BooleanFieldSchema | RotationCssFieldSchema | RotationDegreesFieldSchema | TranslateFieldSchema | ScaleFieldSchema | UvCoordinateFieldSchema | ColorFieldSchema | ArrayFieldSchema | EnumFieldSchema;
|
|
105
|
+
export type VisibleFieldSchema = NumberFieldSchema | BooleanFieldSchema | RotationCssFieldSchema | RotationDegreesFieldSchema | TranslateFieldSchema | TransformOriginFieldSchema | ScaleFieldSchema | UvCoordinateFieldSchema | ColorFieldSchema | ArrayFieldSchema | EnumFieldSchema;
|
|
99
106
|
export type SequenceFieldSchema = VisibleFieldSchema | HiddenFieldSchema;
|
|
100
107
|
export type SequenceSchema = {
|
|
101
108
|
[key: string]: SequenceFieldSchema;
|
|
102
109
|
};
|
|
103
110
|
export type SchemaKeysRecord<S extends SequenceSchema> = Record<keyof S, unknown>;
|
|
104
111
|
export declare const sequenceVisualStyleSchema: {
|
|
112
|
+
readonly 'style.transformOrigin': {
|
|
113
|
+
readonly type: "transform-origin";
|
|
114
|
+
readonly step: 1;
|
|
115
|
+
readonly default: "50% 50%";
|
|
116
|
+
readonly description: "Transform origin";
|
|
117
|
+
};
|
|
105
118
|
readonly 'style.translate': {
|
|
106
119
|
readonly type: "translate";
|
|
107
120
|
readonly step: 1;
|
|
@@ -155,6 +168,12 @@ export declare const sequencePremountSchema: {
|
|
|
155
168
|
};
|
|
156
169
|
};
|
|
157
170
|
export declare const sequenceStyleSchema: {
|
|
171
|
+
readonly 'style.transformOrigin': {
|
|
172
|
+
readonly type: "transform-origin";
|
|
173
|
+
readonly step: 1;
|
|
174
|
+
readonly default: "50% 50%";
|
|
175
|
+
readonly description: "Transform origin";
|
|
176
|
+
};
|
|
158
177
|
readonly 'style.translate': {
|
|
159
178
|
readonly type: "translate";
|
|
160
179
|
readonly step: 1;
|
|
@@ -206,6 +225,10 @@ export declare const sequenceStyleSchema: {
|
|
|
206
225
|
};
|
|
207
226
|
};
|
|
208
227
|
export declare const hiddenField: SequenceFieldSchema;
|
|
228
|
+
export declare const sequenceNameField: SequenceFieldSchema;
|
|
229
|
+
export declare const extendSchemaWithSequenceName: <S extends SequenceSchema>(schema: S) => S & {
|
|
230
|
+
name: SequenceFieldSchema;
|
|
231
|
+
};
|
|
209
232
|
export declare const durationInFramesField: {
|
|
210
233
|
readonly type: "number";
|
|
211
234
|
readonly default: undefined;
|
|
@@ -221,6 +244,7 @@ export declare const fromField: {
|
|
|
221
244
|
};
|
|
222
245
|
export declare const sequenceSchema: {
|
|
223
246
|
readonly hidden: BooleanFieldSchema;
|
|
247
|
+
readonly showInTimeline: HiddenFieldSchema;
|
|
224
248
|
readonly from: {
|
|
225
249
|
readonly type: "number";
|
|
226
250
|
readonly default: 0;
|
|
@@ -240,6 +264,12 @@ export declare const sequenceSchema: {
|
|
|
240
264
|
readonly description: "Layout";
|
|
241
265
|
readonly variants: {
|
|
242
266
|
readonly 'absolute-fill': {
|
|
267
|
+
readonly 'style.transformOrigin': {
|
|
268
|
+
readonly type: "transform-origin";
|
|
269
|
+
readonly step: 1;
|
|
270
|
+
readonly default: "50% 50%";
|
|
271
|
+
readonly description: "Transform origin";
|
|
272
|
+
};
|
|
243
273
|
readonly 'style.translate': {
|
|
244
274
|
readonly type: "translate";
|
|
245
275
|
readonly step: 1;
|
|
@@ -293,9 +323,12 @@ export declare const sequenceSchema: {
|
|
|
293
323
|
readonly none: {};
|
|
294
324
|
};
|
|
295
325
|
};
|
|
326
|
+
} & {
|
|
327
|
+
name: SequenceFieldSchema;
|
|
296
328
|
};
|
|
297
329
|
export declare const sequenceSchemaWithoutFrom: {
|
|
298
330
|
readonly hidden: BooleanFieldSchema;
|
|
331
|
+
readonly showInTimeline: HiddenFieldSchema;
|
|
299
332
|
readonly durationInFrames: {
|
|
300
333
|
readonly type: "number";
|
|
301
334
|
readonly default: undefined;
|
|
@@ -309,6 +342,12 @@ export declare const sequenceSchemaWithoutFrom: {
|
|
|
309
342
|
readonly description: "Layout";
|
|
310
343
|
readonly variants: {
|
|
311
344
|
readonly 'absolute-fill': {
|
|
345
|
+
readonly 'style.transformOrigin': {
|
|
346
|
+
readonly type: "transform-origin";
|
|
347
|
+
readonly step: 1;
|
|
348
|
+
readonly default: "50% 50%";
|
|
349
|
+
readonly description: "Transform origin";
|
|
350
|
+
};
|
|
312
351
|
readonly 'style.translate': {
|
|
313
352
|
readonly type: "translate";
|
|
314
353
|
readonly step: 1;
|
|
@@ -362,5 +401,7 @@ export declare const sequenceSchemaWithoutFrom: {
|
|
|
362
401
|
readonly none: {};
|
|
363
402
|
};
|
|
364
403
|
};
|
|
404
|
+
} & {
|
|
405
|
+
name: SequenceFieldSchema;
|
|
365
406
|
};
|
|
366
407
|
export declare const sequenceSchemaDefaultLayoutNone: SequenceSchema;
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sequenceSchemaDefaultLayoutNone = exports.sequenceSchemaWithoutFrom = exports.sequenceSchema = exports.fromField = exports.durationInFramesField = exports.hiddenField = exports.sequenceStyleSchema = exports.sequencePremountSchema = exports.sequenceVisualStyleSchema = void 0;
|
|
3
|
+
exports.sequenceSchemaDefaultLayoutNone = exports.sequenceSchemaWithoutFrom = exports.sequenceSchema = exports.fromField = exports.durationInFramesField = exports.extendSchemaWithSequenceName = exports.sequenceNameField = exports.hiddenField = exports.sequenceStyleSchema = exports.sequencePremountSchema = exports.sequenceVisualStyleSchema = void 0;
|
|
4
4
|
exports.sequenceVisualStyleSchema = {
|
|
5
|
+
'style.transformOrigin': {
|
|
6
|
+
type: 'transform-origin',
|
|
7
|
+
step: 1,
|
|
8
|
+
default: '50% 50%',
|
|
9
|
+
description: 'Transform origin',
|
|
10
|
+
},
|
|
5
11
|
'style.translate': {
|
|
6
12
|
type: 'translate',
|
|
7
13
|
step: 1,
|
|
@@ -63,6 +69,19 @@ exports.hiddenField = {
|
|
|
63
69
|
default: false,
|
|
64
70
|
description: 'Hidden',
|
|
65
71
|
};
|
|
72
|
+
const showInTimelineField = {
|
|
73
|
+
type: 'hidden',
|
|
74
|
+
};
|
|
75
|
+
exports.sequenceNameField = {
|
|
76
|
+
type: 'hidden',
|
|
77
|
+
};
|
|
78
|
+
const extendSchemaWithSequenceName = (schema) => {
|
|
79
|
+
return {
|
|
80
|
+
name: exports.sequenceNameField,
|
|
81
|
+
...schema,
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
exports.extendSchemaWithSequenceName = extendSchemaWithSequenceName;
|
|
66
85
|
exports.durationInFramesField = {
|
|
67
86
|
type: 'number',
|
|
68
87
|
default: undefined,
|
|
@@ -76,8 +95,9 @@ exports.fromField = {
|
|
|
76
95
|
step: 1,
|
|
77
96
|
hiddenFromList: true,
|
|
78
97
|
};
|
|
79
|
-
exports.sequenceSchema = {
|
|
98
|
+
exports.sequenceSchema = (0, exports.extendSchemaWithSequenceName)({
|
|
80
99
|
hidden: exports.hiddenField,
|
|
100
|
+
showInTimeline: showInTimelineField,
|
|
81
101
|
from: exports.fromField,
|
|
82
102
|
durationInFrames: exports.durationInFramesField,
|
|
83
103
|
layout: {
|
|
@@ -89,12 +109,13 @@ exports.sequenceSchema = {
|
|
|
89
109
|
none: {},
|
|
90
110
|
},
|
|
91
111
|
},
|
|
92
|
-
};
|
|
93
|
-
exports.sequenceSchemaWithoutFrom = {
|
|
112
|
+
});
|
|
113
|
+
exports.sequenceSchemaWithoutFrom = (0, exports.extendSchemaWithSequenceName)({
|
|
94
114
|
hidden: exports.hiddenField,
|
|
115
|
+
showInTimeline: showInTimelineField,
|
|
95
116
|
durationInFrames: exports.durationInFramesField,
|
|
96
117
|
layout: exports.sequenceSchema.layout,
|
|
97
|
-
};
|
|
118
|
+
});
|
|
98
119
|
exports.sequenceSchemaDefaultLayoutNone = {
|
|
99
120
|
...exports.sequenceSchema,
|
|
100
121
|
layout: {
|
|
@@ -4,7 +4,7 @@ type SeriesSequenceProps = PropsWithChildren<{
|
|
|
4
4
|
readonly durationInFrames: number;
|
|
5
5
|
readonly offset?: number;
|
|
6
6
|
readonly className?: string;
|
|
7
|
-
} & Pick<SequenceProps, 'layout' | 'name' | 'hidden'> & LayoutAndStyle>;
|
|
7
|
+
} & Pick<SequenceProps, 'layout' | 'name' | 'hidden' | 'showInTimeline'> & LayoutAndStyle>;
|
|
8
8
|
declare const SeriesSequence: React.ForwardRefExoticComponent<SeriesSequenceProps & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
type SeriesProps = SequenceProps;
|
|
10
10
|
/**
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
|
@@ -131,11 +131,9 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
131
131
|
premountDisplay: (_c = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.premountDisplay) !== null && _c !== void 0 ? _c : null,
|
|
132
132
|
postmountDisplay: (_d = parentSequence === null || parentSequence === void 0 ? void 0 : parentSequence.postmountDisplay) !== null && _d !== void 0 ? _d : null,
|
|
133
133
|
loopDisplay: undefined,
|
|
134
|
-
documentationLink:
|
|
135
|
-
?
|
|
136
|
-
|
|
137
|
-
: 'https://www.remotion.dev/docs/html5-video'
|
|
138
|
-
: null,
|
|
134
|
+
documentationLink: onlyWarnForMediaSeekingError
|
|
135
|
+
? 'https://www.remotion.dev/docs/offthreadvideo'
|
|
136
|
+
: 'https://www.remotion.dev/docs/html5-video',
|
|
139
137
|
refForOutline: videoRef,
|
|
140
138
|
});
|
|
141
139
|
// putting playback before useVolume
|
|
@@ -282,6 +280,6 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
282
280
|
requestsVideoFrame: Boolean(onVideoFrame),
|
|
283
281
|
isClientSideRendering: false,
|
|
284
282
|
});
|
|
285
|
-
return (jsx_runtime_1.jsx("video", { ref: videoRef, muted: muted || mediaMuted || userPreferredVolume <= 0, playsInline: true, src: actualSrc, loop: _remotionInternalNativeLoopPassed, style: actualStyle, disableRemotePlayback: true, crossOrigin: crossOriginValue,
|
|
283
|
+
return (jsx_runtime_1.jsx("video", { ...nativeProps, ref: videoRef, muted: muted || mediaMuted || userPreferredVolume <= 0, playsInline: true, src: actualSrc, loop: _remotionInternalNativeLoopPassed, style: actualStyle, disableRemotePlayback: true, crossOrigin: crossOriginValue, controls: false }));
|
|
286
284
|
};
|
|
287
285
|
exports.VideoForPreview = (0, react_1.forwardRef)(VideoForDevelopmentRefForwardingFunction);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { SequenceControls } from './CompositionManager.js';
|
|
3
|
-
import type
|
|
3
|
+
import { type SequenceSchema } from './sequence-field-schema.js';
|
|
4
4
|
export declare const getNestedValue: (obj: Record<string, unknown>, key: string) => unknown;
|
|
5
5
|
export declare const readValuesFromProps: (props: Record<string, unknown>, keys: string[]) => Record<string, unknown>;
|
|
6
6
|
export declare const selectActiveKeys: (schema: SequenceSchema, values: Record<string, unknown>) => string[];
|
|
@@ -38,6 +38,7 @@ const react_1 = __importStar(require("react"));
|
|
|
38
38
|
const delete_nested_key_js_1 = require("./delete-nested-key.js");
|
|
39
39
|
const use_memoized_effects_js_1 = require("./effects/use-memoized-effects.js");
|
|
40
40
|
const flatten_schema_js_1 = require("./flatten-schema.js");
|
|
41
|
+
const sequence_field_schema_js_1 = require("./sequence-field-schema.js");
|
|
41
42
|
const sequence_node_path_js_1 = require("./sequence-node-path.js");
|
|
42
43
|
const SequenceManager_js_1 = require("./SequenceManager.js");
|
|
43
44
|
const use_current_frame_js_1 = require("./use-current-frame.js");
|
|
@@ -99,7 +100,8 @@ exports.mergeValues = mergeValues;
|
|
|
99
100
|
const stackToOverrideMap = {};
|
|
100
101
|
const wrapInSchema = ({ Component, schema, supportsEffects, }) => {
|
|
101
102
|
// Schema is static for a component, so we move this outside
|
|
102
|
-
const
|
|
103
|
+
const schemaWithSequenceName = (0, sequence_field_schema_js_1.extendSchemaWithSequenceName)(schema);
|
|
104
|
+
const flatSchema = (0, flatten_schema_js_1.getFlatSchemaWithAllKeys)(schemaWithSequenceName);
|
|
103
105
|
const flatKeys = Object.keys(flatSchema);
|
|
104
106
|
const Wrapped = (0, react_1.forwardRef)((props, ref) => {
|
|
105
107
|
var _a;
|
|
@@ -154,7 +156,7 @@ const wrapInSchema = ({ Component, schema, supportsEffects, }) => {
|
|
|
154
156
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
155
157
|
const controls = (0, react_1.useMemo)(() => {
|
|
156
158
|
return {
|
|
157
|
-
schema,
|
|
159
|
+
schema: schemaWithSequenceName,
|
|
158
160
|
currentRuntimeValueDotNotation,
|
|
159
161
|
overrideId,
|
|
160
162
|
supportsEffects,
|
|
@@ -164,7 +166,7 @@ const wrapInSchema = ({ Component, schema, supportsEffects, }) => {
|
|
|
164
166
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
165
167
|
const { merged: valuesDotNotation, propsToDelete } = (0, react_1.useMemo)(() => {
|
|
166
168
|
return (0, use_schema_js_1.computeEffectiveSchemaValuesDotNotation)({
|
|
167
|
-
schema,
|
|
169
|
+
schema: schemaWithSequenceName,
|
|
168
170
|
currentValue: currentRuntimeValueDotNotation,
|
|
169
171
|
overrideValues: nodePath === null ? {} : getDragOverrides(nodePath),
|
|
170
172
|
propStatus: nodePath === null
|
|
@@ -180,7 +182,7 @@ const wrapInSchema = ({ Component, schema, supportsEffects, }) => {
|
|
|
180
182
|
frame,
|
|
181
183
|
]);
|
|
182
184
|
// 4. Eliminate values forbidden by the resolved discriminated union.
|
|
183
|
-
const activeKeys = (0, exports.selectActiveKeys)(
|
|
185
|
+
const activeKeys = (0, exports.selectActiveKeys)(schemaWithSequenceName, valuesDotNotation);
|
|
184
186
|
// 5. Apply the active values back onto the props.
|
|
185
187
|
const mergedProps = (0, exports.mergeValues)({
|
|
186
188
|
props: props,
|