@remotion/studio-shared 4.0.481 → 4.0.482
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/codemods.d.ts
CHANGED
|
@@ -10,6 +10,15 @@ export type ApplyVisualControlCodemod = {
|
|
|
10
10
|
changes: VisualControlChange[];
|
|
11
11
|
};
|
|
12
12
|
export type RecastCodemod = {
|
|
13
|
+
type: 'new-composition';
|
|
14
|
+
newId: string;
|
|
15
|
+
componentName: string;
|
|
16
|
+
componentImportPath: string;
|
|
17
|
+
newHeight: number;
|
|
18
|
+
newWidth: number;
|
|
19
|
+
newFps: number;
|
|
20
|
+
newDurationInFrames: number;
|
|
21
|
+
} | {
|
|
13
22
|
type: 'duplicate-composition';
|
|
14
23
|
idToDuplicate: string;
|
|
15
24
|
newId: string;
|
package/dist/effect-catalog.js
CHANGED
|
@@ -228,6 +228,17 @@ exports.EFFECT_CATALOG = [
|
|
|
228
228
|
config: {},
|
|
229
229
|
},
|
|
230
230
|
},
|
|
231
|
+
{
|
|
232
|
+
id: 'effects-light-trail',
|
|
233
|
+
category: 'Blur & Shadow',
|
|
234
|
+
label: 'lightTrail()',
|
|
235
|
+
description: 'Directional light trail effect',
|
|
236
|
+
effect: {
|
|
237
|
+
name: 'lightTrail',
|
|
238
|
+
importPath: '@remotion/effects/light-trail',
|
|
239
|
+
config: {},
|
|
240
|
+
},
|
|
241
|
+
},
|
|
231
242
|
{
|
|
232
243
|
id: 'effects-evolve',
|
|
233
244
|
category: 'Reveal',
|
|
@@ -318,6 +329,22 @@ exports.EFFECT_CATALOG = [
|
|
|
318
329
|
config: {},
|
|
319
330
|
},
|
|
320
331
|
},
|
|
332
|
+
{
|
|
333
|
+
id: 'effects-corner-pin',
|
|
334
|
+
category: 'Distort',
|
|
335
|
+
label: 'cornerPin()',
|
|
336
|
+
description: 'Pin source corners to a quad',
|
|
337
|
+
effect: {
|
|
338
|
+
name: 'cornerPin',
|
|
339
|
+
importPath: '@remotion/effects/corner-pin',
|
|
340
|
+
config: {
|
|
341
|
+
topLeft: [0.08, 0.12],
|
|
342
|
+
topRight: [0.92, 0.04],
|
|
343
|
+
bottomRight: [0.86, 0.9],
|
|
344
|
+
bottomLeft: [0.14, 0.96],
|
|
345
|
+
},
|
|
346
|
+
},
|
|
347
|
+
},
|
|
321
348
|
{
|
|
322
349
|
id: 'effects-wave',
|
|
323
350
|
category: 'Distort',
|
|
@@ -13,7 +13,9 @@ const isInteractivitySchemaFieldKeyframable = (field) => {
|
|
|
13
13
|
if (!field) {
|
|
14
14
|
return true;
|
|
15
15
|
}
|
|
16
|
-
if (field.type === 'array' ||
|
|
16
|
+
if (field.type === 'array' ||
|
|
17
|
+
field.type === 'boolean' ||
|
|
18
|
+
field.type === 'enum') {
|
|
17
19
|
return false;
|
|
18
20
|
}
|
|
19
21
|
return field.keyframable !== false;
|
|
@@ -43,17 +43,45 @@ const addKeyframeToPropStatus = ({ status, fieldKey, frame, value, schema, }) =>
|
|
|
43
43
|
}
|
|
44
44
|
return status;
|
|
45
45
|
};
|
|
46
|
+
const findFieldInSchema = (schema, key) => {
|
|
47
|
+
if (key in schema) {
|
|
48
|
+
return schema[key];
|
|
49
|
+
}
|
|
50
|
+
for (const field of Object.values(schema)) {
|
|
51
|
+
if (field.type !== 'enum') {
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
for (const variant of Object.values(field.variants)) {
|
|
55
|
+
const found = findFieldInSchema(variant, key);
|
|
56
|
+
if (found) {
|
|
57
|
+
return found;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return undefined;
|
|
62
|
+
};
|
|
63
|
+
const getMissingPropStatus = ({ schema, fieldKey, }) => {
|
|
64
|
+
const field = schema ? findFieldInSchema(schema, fieldKey) : undefined;
|
|
65
|
+
if (field && field.type !== 'hidden' && field.default !== undefined) {
|
|
66
|
+
return {
|
|
67
|
+
status: 'static',
|
|
68
|
+
codeValue: field.default,
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
status: 'static',
|
|
73
|
+
codeValue: undefined,
|
|
74
|
+
};
|
|
75
|
+
};
|
|
46
76
|
const optimisticAddSequenceKeyframe = ({ previous, fieldKey, frame, value, schema, }) => {
|
|
77
|
+
var _a;
|
|
47
78
|
if (!previous.canUpdate) {
|
|
48
79
|
return previous;
|
|
49
80
|
}
|
|
50
81
|
if (!(0, keyframe_interpolation_function_1.isSchemaFieldKeyframable)({ schema: schema !== null && schema !== void 0 ? schema : null, key: fieldKey })) {
|
|
51
82
|
return previous;
|
|
52
83
|
}
|
|
53
|
-
const status = previous.props[fieldKey];
|
|
54
|
-
if (!status) {
|
|
55
|
-
return previous;
|
|
56
|
-
}
|
|
84
|
+
const status = (_a = previous.props[fieldKey]) !== null && _a !== void 0 ? _a : getMissingPropStatus({ schema: schema !== null && schema !== void 0 ? schema : null, fieldKey });
|
|
57
85
|
return {
|
|
58
86
|
...previous,
|
|
59
87
|
props: {
|
|
@@ -70,6 +98,7 @@ const optimisticAddSequenceKeyframe = ({ previous, fieldKey, frame, value, schem
|
|
|
70
98
|
};
|
|
71
99
|
exports.optimisticAddSequenceKeyframe = optimisticAddSequenceKeyframe;
|
|
72
100
|
const optimisticAddEffectKeyframe = ({ previous, effectIndex, fieldKey, frame, value, schema, }) => {
|
|
101
|
+
var _a;
|
|
73
102
|
if (!previous.canUpdate) {
|
|
74
103
|
return previous;
|
|
75
104
|
}
|
|
@@ -84,10 +113,7 @@ const optimisticAddEffectKeyframe = ({ previous, effectIndex, fieldKey, frame, v
|
|
|
84
113
|
if (!target.canUpdate) {
|
|
85
114
|
return previous;
|
|
86
115
|
}
|
|
87
|
-
const status = target.props[fieldKey];
|
|
88
|
-
if (!status) {
|
|
89
|
-
return previous;
|
|
90
|
-
}
|
|
116
|
+
const status = (_a = target.props[fieldKey]) !== null && _a !== void 0 ? _a : getMissingPropStatus({ schema: schema !== null && schema !== void 0 ? schema : null, fieldKey });
|
|
91
117
|
const updatedEffect = {
|
|
92
118
|
...target,
|
|
93
119
|
props: {
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/studio-shared"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/studio-shared",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.482",
|
|
7
7
|
"description": "Internal package for shared objects between the Studio backend and frontend",
|
|
8
8
|
"main": "dist",
|
|
9
9
|
"scripts": {
|
|
@@ -20,11 +20,11 @@
|
|
|
20
20
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"remotion": "4.0.
|
|
23
|
+
"remotion": "4.0.482"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@remotion/renderer": "4.0.
|
|
27
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
26
|
+
"@remotion/renderer": "4.0.482",
|
|
27
|
+
"@remotion/eslint-config-internal": "4.0.482",
|
|
28
28
|
"eslint": "9.19.0",
|
|
29
29
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
30
30
|
},
|