@remotion/studio-shared 4.0.501 → 4.0.503
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/api-requests.d.ts +57 -2
- package/dist/browser-studio-operations.d.ts +6 -1
- package/dist/composition-drag-data.d.ts +1 -1
- package/dist/define-plugin-definitions.d.ts +3 -1
- package/dist/define-plugin-definitions.js +2 -1
- package/dist/effect-catalog.d.ts +1 -1
- package/dist/element-drag-data.d.ts +1 -3
- package/dist/element-drag-data.js +2 -11
- package/dist/esm/index.mjs +3696 -0
- package/dist/esm/keyframe-easing-presets.mjs +123 -0
- package/dist/esm/keyframe-interpolation-function.mjs +114 -0
- package/dist/esm/parse-spring-easing-config.mjs +92 -0
- package/dist/esm/studio-entry-points.mjs +19 -0
- package/dist/esm/studio-html.mjs +102 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10 -10
- package/dist/optimistic-update-for-code-values.d.ts +7 -0
- package/dist/optimistic-update-for-code-values.js +30 -0
- package/dist/optimistic-update-for-effect-code-values.d.ts +8 -0
- package/dist/optimistic-update-for-effect-code-values.js +43 -0
- package/dist/package-info.d.ts +2 -2
- package/dist/package-info.js +4 -8
- package/dist/shape-drag-data.d.ts +22 -0
- package/dist/shape-drag-data.js +90 -0
- package/package.json +56 -9
|
@@ -0,0 +1,3696 @@
|
|
|
1
|
+
// src/ansi.ts
|
|
2
|
+
var ansiRegex = () => {
|
|
3
|
+
const pattern = [
|
|
4
|
+
"[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)",
|
|
5
|
+
"(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))"
|
|
6
|
+
].join("|");
|
|
7
|
+
return new RegExp(pattern, "g");
|
|
8
|
+
};
|
|
9
|
+
function splitAnsi(str) {
|
|
10
|
+
const parts = str.match(ansiRegex());
|
|
11
|
+
if (!parts)
|
|
12
|
+
return [str];
|
|
13
|
+
const result = [];
|
|
14
|
+
let offset = 0;
|
|
15
|
+
let ptr = 0;
|
|
16
|
+
for (let i = 0;i < parts.length; i++) {
|
|
17
|
+
offset = str.indexOf(parts[i], offset);
|
|
18
|
+
if (offset === -1)
|
|
19
|
+
throw new Error("Could not split string");
|
|
20
|
+
if (ptr !== offset)
|
|
21
|
+
result.push(str.slice(ptr, offset));
|
|
22
|
+
if (ptr === offset && result.length) {
|
|
23
|
+
result[result.length - 1] += parts[i];
|
|
24
|
+
} else {
|
|
25
|
+
if (offset === 0)
|
|
26
|
+
result.push("");
|
|
27
|
+
result.push(parts[i]);
|
|
28
|
+
}
|
|
29
|
+
ptr = offset + parts[i].length;
|
|
30
|
+
}
|
|
31
|
+
result.push(str.slice(ptr));
|
|
32
|
+
return result;
|
|
33
|
+
}
|
|
34
|
+
var stripAnsi = (str) => {
|
|
35
|
+
if (typeof str !== "string") {
|
|
36
|
+
throw new TypeError(`Expected a \`string\`, got \`${typeof str}\``);
|
|
37
|
+
}
|
|
38
|
+
return str.replace(ansiRegex(), "");
|
|
39
|
+
};
|
|
40
|
+
// src/composition-drag-data.ts
|
|
41
|
+
var compositionDragDataToSymbolicatedStack = (dragData) => {
|
|
42
|
+
if (dragData.compositionFile === null) {
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
originalColumnNumber: null,
|
|
47
|
+
originalFileName: dragData.compositionFile,
|
|
48
|
+
originalFunctionName: null,
|
|
49
|
+
originalLineNumber: null,
|
|
50
|
+
originalScriptCode: null
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
// src/default-buffer-state-delay-in-milliseconds.ts
|
|
54
|
+
var DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS = 300;
|
|
55
|
+
// src/detect-file-type.ts
|
|
56
|
+
var webmPattern = new Uint8Array([26, 69, 223, 163]);
|
|
57
|
+
var matchesPattern = (pattern) => {
|
|
58
|
+
return (data) => {
|
|
59
|
+
return pattern.every((value, index) => data[index] === value);
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
var isRiffAvi = (data) => {
|
|
63
|
+
const riffPattern = new Uint8Array([82, 73, 70, 70]);
|
|
64
|
+
if (!matchesPattern(riffPattern)(data.subarray(0, 4))) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
67
|
+
const fileType = data.subarray(8, 12);
|
|
68
|
+
const aviPattern = new Uint8Array([65, 86, 73, 32]);
|
|
69
|
+
return matchesPattern(aviPattern)(fileType);
|
|
70
|
+
};
|
|
71
|
+
var isRiffWave = (data) => {
|
|
72
|
+
const riffPattern = new Uint8Array([82, 73, 70, 70]);
|
|
73
|
+
if (!matchesPattern(riffPattern)(data.subarray(0, 4))) {
|
|
74
|
+
return false;
|
|
75
|
+
}
|
|
76
|
+
const fileType = data.subarray(8, 12);
|
|
77
|
+
const wavePattern = new Uint8Array([87, 65, 86, 69]);
|
|
78
|
+
return matchesPattern(wavePattern)(fileType);
|
|
79
|
+
};
|
|
80
|
+
var isWebm = (data) => {
|
|
81
|
+
return matchesPattern(webmPattern)(data.subarray(0, 4));
|
|
82
|
+
};
|
|
83
|
+
var isIsoBaseMedia = (data) => {
|
|
84
|
+
const isoBaseMediaMp4Pattern = new TextEncoder().encode("ftyp");
|
|
85
|
+
return matchesPattern(isoBaseMediaMp4Pattern)(data.subarray(4, 8));
|
|
86
|
+
};
|
|
87
|
+
var isTransportStream = (data) => {
|
|
88
|
+
return data[0] === 71 && data[188] === 71;
|
|
89
|
+
};
|
|
90
|
+
var isMp3 = (data) => {
|
|
91
|
+
const mpegPattern = new Uint8Array([255, 243]);
|
|
92
|
+
const mpegPattern2 = new Uint8Array([255, 251]);
|
|
93
|
+
const id3v4Pattern = new Uint8Array([73, 68, 51, 4]);
|
|
94
|
+
const id3v3Pattern = new Uint8Array([73, 68, 51, 3]);
|
|
95
|
+
const id3v2Pattern = new Uint8Array([73, 68, 51, 2]);
|
|
96
|
+
const subarray = data.subarray(0, 4);
|
|
97
|
+
return matchesPattern(mpegPattern)(subarray) || matchesPattern(mpegPattern2)(subarray) || matchesPattern(id3v4Pattern)(subarray) || matchesPattern(id3v3Pattern)(subarray) || matchesPattern(id3v2Pattern)(subarray);
|
|
98
|
+
};
|
|
99
|
+
var isAac = (data) => {
|
|
100
|
+
const aacPattern = new Uint8Array([255, 241]);
|
|
101
|
+
return matchesPattern(aacPattern)(data.subarray(0, 2));
|
|
102
|
+
};
|
|
103
|
+
var isFlac = (data) => {
|
|
104
|
+
const flacPattern = new Uint8Array([102, 76, 97, 67]);
|
|
105
|
+
return matchesPattern(flacPattern)(data.subarray(0, 4));
|
|
106
|
+
};
|
|
107
|
+
var isM3u = (data) => {
|
|
108
|
+
return new TextDecoder("utf-8").decode(data.slice(0, 7)) === "#EXTM3U";
|
|
109
|
+
};
|
|
110
|
+
var pngSignature = [137, 80, 78, 71, 13, 10, 26, 10];
|
|
111
|
+
var acTLChunkType = new Uint8Array([97, 99, 84, 76]);
|
|
112
|
+
var idatChunkType = new Uint8Array([73, 68, 65, 84]);
|
|
113
|
+
var iendChunkType = new Uint8Array([73, 69, 78, 68]);
|
|
114
|
+
var getPngDimensions = (pngData) => {
|
|
115
|
+
if (pngData.length < 24) {
|
|
116
|
+
return null;
|
|
117
|
+
}
|
|
118
|
+
const view = new DataView(pngData.buffer, pngData.byteOffset);
|
|
119
|
+
for (let i = 0;i < 8; i++) {
|
|
120
|
+
if (pngData[i] !== pngSignature[i]) {
|
|
121
|
+
return null;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
width: view.getUint32(16, false),
|
|
126
|
+
height: view.getUint32(20, false)
|
|
127
|
+
};
|
|
128
|
+
};
|
|
129
|
+
var hasApngAnimationControlChunk = (pngData) => {
|
|
130
|
+
if (pngData.length < 16) {
|
|
131
|
+
return false;
|
|
132
|
+
}
|
|
133
|
+
const view = new DataView(pngData.buffer, pngData.byteOffset, pngData.byteLength);
|
|
134
|
+
let offset = 8;
|
|
135
|
+
while (offset + 8 <= pngData.length) {
|
|
136
|
+
const chunkLength = view.getUint32(offset, false);
|
|
137
|
+
const chunkType = pngData.subarray(offset + 4, offset + 8);
|
|
138
|
+
if (matchesPattern(acTLChunkType)(chunkType)) {
|
|
139
|
+
return true;
|
|
140
|
+
}
|
|
141
|
+
if (matchesPattern(idatChunkType)(chunkType) || matchesPattern(iendChunkType)(chunkType)) {
|
|
142
|
+
return false;
|
|
143
|
+
}
|
|
144
|
+
const nextOffset = offset + 12 + chunkLength;
|
|
145
|
+
if (nextOffset <= offset) {
|
|
146
|
+
return false;
|
|
147
|
+
}
|
|
148
|
+
offset = nextOffset;
|
|
149
|
+
}
|
|
150
|
+
return false;
|
|
151
|
+
};
|
|
152
|
+
var isPng = (data) => {
|
|
153
|
+
const pngPattern = new Uint8Array([137, 80, 78, 71]);
|
|
154
|
+
if (matchesPattern(pngPattern)(data.subarray(0, 4))) {
|
|
155
|
+
const png = getPngDimensions(data);
|
|
156
|
+
return {
|
|
157
|
+
dimensions: png,
|
|
158
|
+
type: hasApngAnimationControlChunk(data) ? "apng" : "png"
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
return null;
|
|
162
|
+
};
|
|
163
|
+
var getJpegDimensions = (data) => {
|
|
164
|
+
let offset = 0;
|
|
165
|
+
const readUint16BE = (o) => {
|
|
166
|
+
return data[o] << 8 | data[o + 1];
|
|
167
|
+
};
|
|
168
|
+
if (data.length < 4 || readUint16BE(offset) !== 65496) {
|
|
169
|
+
return null;
|
|
170
|
+
}
|
|
171
|
+
offset += 2;
|
|
172
|
+
while (offset + 3 < data.length) {
|
|
173
|
+
if (data[offset] === 255) {
|
|
174
|
+
const marker = data[offset + 1];
|
|
175
|
+
if (marker === 192 || marker === 194) {
|
|
176
|
+
if (offset + 8 >= data.length) {
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
const height = readUint16BE(offset + 5);
|
|
180
|
+
const width = readUint16BE(offset + 7);
|
|
181
|
+
return { width, height };
|
|
182
|
+
}
|
|
183
|
+
const length = readUint16BE(offset + 2);
|
|
184
|
+
if (length <= 0) {
|
|
185
|
+
return null;
|
|
186
|
+
}
|
|
187
|
+
offset += length + 2;
|
|
188
|
+
} else {
|
|
189
|
+
offset++;
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return null;
|
|
193
|
+
};
|
|
194
|
+
var isJpeg = (data) => {
|
|
195
|
+
const jpegPattern = new Uint8Array([255, 216]);
|
|
196
|
+
const jpeg = matchesPattern(jpegPattern)(data.subarray(0, 2));
|
|
197
|
+
if (!jpeg) {
|
|
198
|
+
return null;
|
|
199
|
+
}
|
|
200
|
+
const dim = getJpegDimensions(data);
|
|
201
|
+
return { dimensions: dim, type: "jpeg" };
|
|
202
|
+
};
|
|
203
|
+
var getGifDimensions = (data) => {
|
|
204
|
+
if (data.length < 10) {
|
|
205
|
+
return null;
|
|
206
|
+
}
|
|
207
|
+
const view = new DataView(data.buffer, data.byteOffset);
|
|
208
|
+
const width = view.getUint16(6, true);
|
|
209
|
+
const height = view.getUint16(8, true);
|
|
210
|
+
return { width, height };
|
|
211
|
+
};
|
|
212
|
+
var isGif = (data) => {
|
|
213
|
+
const gifPattern = new Uint8Array([71, 73, 70, 56]);
|
|
214
|
+
if (matchesPattern(gifPattern)(data.subarray(0, 4))) {
|
|
215
|
+
return { type: "gif", dimensions: getGifDimensions(data) };
|
|
216
|
+
}
|
|
217
|
+
return null;
|
|
218
|
+
};
|
|
219
|
+
var getWebPDimensions = (bytes) => {
|
|
220
|
+
if (bytes.length < 30) {
|
|
221
|
+
return null;
|
|
222
|
+
}
|
|
223
|
+
if (bytes[0] !== 82 || bytes[1] !== 73 || bytes[2] !== 70 || bytes[3] !== 70 || bytes[8] !== 87 || bytes[9] !== 69 || bytes[10] !== 66 || bytes[11] !== 80) {
|
|
224
|
+
return null;
|
|
225
|
+
}
|
|
226
|
+
if (bytes[12] === 86 && bytes[13] === 80 && bytes[14] === 56) {
|
|
227
|
+
if (bytes[15] === 32) {
|
|
228
|
+
return {
|
|
229
|
+
width: bytes[26] | bytes[27] << 8 & 16383,
|
|
230
|
+
height: bytes[28] | bytes[29] << 8 & 16383
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
if (bytes[12] === 86 && bytes[13] === 80 && bytes[14] === 56 && bytes[15] === 76) {
|
|
235
|
+
return {
|
|
236
|
+
width: 1 + (bytes[21] | (bytes[22] & 63) << 8),
|
|
237
|
+
height: 1 + ((bytes[22] & 192) >> 6 | bytes[23] << 2 | (bytes[24] & 15) << 10)
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
if (bytes[12] === 86 && bytes[13] === 80 && bytes[14] === 56 && bytes[15] === 88) {
|
|
241
|
+
return {
|
|
242
|
+
width: 1 + (bytes[24] | bytes[25] << 8 | bytes[26] << 16),
|
|
243
|
+
height: 1 + (bytes[27] | bytes[28] << 8 | bytes[29] << 16)
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
return null;
|
|
247
|
+
};
|
|
248
|
+
var isAnimatedWebp = (data) => {
|
|
249
|
+
const animationChunk = new Uint8Array([65, 78, 73, 77]);
|
|
250
|
+
const view = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
251
|
+
let offset = 12;
|
|
252
|
+
while (offset + 8 <= data.length) {
|
|
253
|
+
const chunkType = data.subarray(offset, offset + 4);
|
|
254
|
+
if (matchesPattern(animationChunk)(chunkType)) {
|
|
255
|
+
return true;
|
|
256
|
+
}
|
|
257
|
+
const chunkLength = view.getUint32(offset + 4, true);
|
|
258
|
+
const nextOffset = offset + 8 + chunkLength + chunkLength % 2;
|
|
259
|
+
if (nextOffset <= offset) {
|
|
260
|
+
return false;
|
|
261
|
+
}
|
|
262
|
+
offset = nextOffset;
|
|
263
|
+
}
|
|
264
|
+
return false;
|
|
265
|
+
};
|
|
266
|
+
var isWebp = (data) => {
|
|
267
|
+
const riffPattern = new Uint8Array([82, 73, 70, 70]);
|
|
268
|
+
const webpPattern = new Uint8Array([87, 69, 66, 80]);
|
|
269
|
+
if (matchesPattern(riffPattern)(data.subarray(0, 4)) && matchesPattern(webpPattern)(data.subarray(8, 12))) {
|
|
270
|
+
return {
|
|
271
|
+
type: "webp",
|
|
272
|
+
dimensions: getWebPDimensions(data),
|
|
273
|
+
animated: isAnimatedWebp(data)
|
|
274
|
+
};
|
|
275
|
+
}
|
|
276
|
+
return null;
|
|
277
|
+
};
|
|
278
|
+
var getBmpDimensions = (bmpData) => {
|
|
279
|
+
if (bmpData.length < 26) {
|
|
280
|
+
return null;
|
|
281
|
+
}
|
|
282
|
+
const view = new DataView(bmpData.buffer, bmpData.byteOffset);
|
|
283
|
+
return {
|
|
284
|
+
width: view.getUint32(18, true),
|
|
285
|
+
height: Math.abs(view.getInt32(22, true))
|
|
286
|
+
};
|
|
287
|
+
};
|
|
288
|
+
var isBmp = (data) => {
|
|
289
|
+
const bmpPattern = new Uint8Array([66, 77]);
|
|
290
|
+
if (matchesPattern(bmpPattern)(data.subarray(0, 2))) {
|
|
291
|
+
const bmp = getBmpDimensions(data);
|
|
292
|
+
return { dimensions: bmp, type: "bmp" };
|
|
293
|
+
}
|
|
294
|
+
return null;
|
|
295
|
+
};
|
|
296
|
+
var isPdf = (data) => {
|
|
297
|
+
if (data.length < 4) {
|
|
298
|
+
return null;
|
|
299
|
+
}
|
|
300
|
+
const pdfPattern = new Uint8Array([37, 80, 68, 70]);
|
|
301
|
+
return matchesPattern(pdfPattern)(data.subarray(0, 4)) ? { type: "pdf" } : null;
|
|
302
|
+
};
|
|
303
|
+
var isImageFileType = (fileType) => {
|
|
304
|
+
return fileType.type === "jpeg" || fileType.type === "webp" || fileType.type === "gif" || fileType.type === "png" || fileType.type === "apng" || fileType.type === "bmp";
|
|
305
|
+
};
|
|
306
|
+
var detectFileType = (data) => {
|
|
307
|
+
if (isRiffWave(data)) {
|
|
308
|
+
return { type: "wav" };
|
|
309
|
+
}
|
|
310
|
+
if (isRiffAvi(data)) {
|
|
311
|
+
return { type: "riff" };
|
|
312
|
+
}
|
|
313
|
+
if (isAac(data)) {
|
|
314
|
+
return { type: "aac" };
|
|
315
|
+
}
|
|
316
|
+
if (isFlac(data)) {
|
|
317
|
+
return { type: "flac" };
|
|
318
|
+
}
|
|
319
|
+
if (isM3u(data)) {
|
|
320
|
+
return { type: "m3u" };
|
|
321
|
+
}
|
|
322
|
+
const webp = isWebp(data);
|
|
323
|
+
if (webp) {
|
|
324
|
+
return webp;
|
|
325
|
+
}
|
|
326
|
+
if (isWebm(data)) {
|
|
327
|
+
return { type: "webm" };
|
|
328
|
+
}
|
|
329
|
+
if (isIsoBaseMedia(data)) {
|
|
330
|
+
return { type: "iso-base-media" };
|
|
331
|
+
}
|
|
332
|
+
if (isTransportStream(data)) {
|
|
333
|
+
return { type: "transport-stream" };
|
|
334
|
+
}
|
|
335
|
+
if (isMp3(data)) {
|
|
336
|
+
return { type: "mp3" };
|
|
337
|
+
}
|
|
338
|
+
const gif = isGif(data);
|
|
339
|
+
if (gif) {
|
|
340
|
+
return gif;
|
|
341
|
+
}
|
|
342
|
+
const png = isPng(data);
|
|
343
|
+
if (png) {
|
|
344
|
+
return png;
|
|
345
|
+
}
|
|
346
|
+
const pdf = isPdf(data);
|
|
347
|
+
if (pdf) {
|
|
348
|
+
return pdf;
|
|
349
|
+
}
|
|
350
|
+
const bmp = isBmp(data);
|
|
351
|
+
if (bmp) {
|
|
352
|
+
return bmp;
|
|
353
|
+
}
|
|
354
|
+
const jpeg = isJpeg(data);
|
|
355
|
+
if (jpeg) {
|
|
356
|
+
return jpeg;
|
|
357
|
+
}
|
|
358
|
+
return { type: "unknown" };
|
|
359
|
+
};
|
|
360
|
+
// src/easing-clipboard-data.ts
|
|
361
|
+
var isRecord = (value) => {
|
|
362
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
363
|
+
};
|
|
364
|
+
var isFiniteNumber = (value) => {
|
|
365
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
366
|
+
};
|
|
367
|
+
var isKeyframeEasing = (value) => {
|
|
368
|
+
return isRecord(value) && (value.type === "linear" || value.type === "bezier" && isFiniteNumber(value.x1) && isFiniteNumber(value.y1) && isFiniteNumber(value.x2) && isFiniteNumber(value.y2) || value.type === "spring" && isFiniteNumber(value.damping) && isFiniteNumber(value.mass) && isFiniteNumber(value.stiffness) && (value.allowTail === undefined || value.allowTail === null || typeof value.allowTail === "boolean") && (value.durationRestThreshold === undefined || value.durationRestThreshold === null || isFiniteNumber(value.durationRestThreshold)) && typeof value.overshootClamping === "boolean");
|
|
369
|
+
};
|
|
370
|
+
var normalizeKeyframeEasing = (easing) => {
|
|
371
|
+
if (easing.type !== "spring") {
|
|
372
|
+
return easing;
|
|
373
|
+
}
|
|
374
|
+
return {
|
|
375
|
+
...easing,
|
|
376
|
+
allowTail: easing.allowTail ?? null,
|
|
377
|
+
durationRestThreshold: easing.durationRestThreshold ?? null
|
|
378
|
+
};
|
|
379
|
+
};
|
|
380
|
+
var parseEasingClipboardDataResult = (value) => {
|
|
381
|
+
try {
|
|
382
|
+
const parsed = JSON.parse(value);
|
|
383
|
+
if (!isRecord(parsed)) {
|
|
384
|
+
return { status: "invalid" };
|
|
385
|
+
}
|
|
386
|
+
if (parsed.remotionClipboard !== "easing") {
|
|
387
|
+
return { status: "invalid" };
|
|
388
|
+
}
|
|
389
|
+
if (parsed.version !== 1) {
|
|
390
|
+
return {
|
|
391
|
+
status: "unsupported-version",
|
|
392
|
+
version: parsed.version
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
if (parsed.type !== "easing" || !isKeyframeEasing(parsed.easing)) {
|
|
396
|
+
return { status: "invalid" };
|
|
397
|
+
}
|
|
398
|
+
return {
|
|
399
|
+
status: "valid",
|
|
400
|
+
data: {
|
|
401
|
+
type: "easing",
|
|
402
|
+
version: 1,
|
|
403
|
+
remotionClipboard: "easing",
|
|
404
|
+
easing: normalizeKeyframeEasing(parsed.easing)
|
|
405
|
+
}
|
|
406
|
+
};
|
|
407
|
+
} catch {
|
|
408
|
+
return { status: "invalid" };
|
|
409
|
+
}
|
|
410
|
+
};
|
|
411
|
+
var parseEasingClipboardData = (value) => {
|
|
412
|
+
const result = parseEasingClipboardDataResult(value);
|
|
413
|
+
if (result.status !== "valid") {
|
|
414
|
+
return null;
|
|
415
|
+
}
|
|
416
|
+
return result.data;
|
|
417
|
+
};
|
|
418
|
+
// src/effect-catalog.ts
|
|
419
|
+
var getEffectDocumentationPath = (item) => {
|
|
420
|
+
return `/docs/effects/${item.id.slice("effects-".length)}`;
|
|
421
|
+
};
|
|
422
|
+
var getEffectDocumentationLink = (item) => {
|
|
423
|
+
return `https://www.remotion.dev${getEffectDocumentationPath(item)}`;
|
|
424
|
+
};
|
|
425
|
+
var getEffectPreviewSource = (item) => {
|
|
426
|
+
return `/img/${item.id}-preview.png`;
|
|
427
|
+
};
|
|
428
|
+
var getEffectPreviewAlt = (item) => {
|
|
429
|
+
const effectName = item.id.slice("effects-".length).replaceAll("-", " ").replace(/^uv /, "UV ").replace(/^xy /, "XY ").replace(/^tv /, "TV ");
|
|
430
|
+
return `${effectName} effect preview`;
|
|
431
|
+
};
|
|
432
|
+
var getEffectCatalogCategories = (items) => {
|
|
433
|
+
const categories = [];
|
|
434
|
+
for (const item of items) {
|
|
435
|
+
const last = categories[categories.length - 1];
|
|
436
|
+
if (last?.title === item.category) {
|
|
437
|
+
categories[categories.length - 1] = {
|
|
438
|
+
...last,
|
|
439
|
+
effects: [...last.effects, item]
|
|
440
|
+
};
|
|
441
|
+
continue;
|
|
442
|
+
}
|
|
443
|
+
categories.push({
|
|
444
|
+
title: item.category,
|
|
445
|
+
effects: [item]
|
|
446
|
+
});
|
|
447
|
+
}
|
|
448
|
+
return categories;
|
|
449
|
+
};
|
|
450
|
+
var EFFECT_CATALOG = [
|
|
451
|
+
{
|
|
452
|
+
id: "effects-brightness",
|
|
453
|
+
category: "Color",
|
|
454
|
+
label: "brightness()",
|
|
455
|
+
description: "Brightness adjustment effect",
|
|
456
|
+
effect: {
|
|
457
|
+
name: "brightness",
|
|
458
|
+
importPath: "@remotion/effects/brightness",
|
|
459
|
+
config: {}
|
|
460
|
+
}
|
|
461
|
+
},
|
|
462
|
+
{
|
|
463
|
+
id: "effects-contrast",
|
|
464
|
+
category: "Color",
|
|
465
|
+
label: "contrast()",
|
|
466
|
+
description: "Contrast adjustment effect",
|
|
467
|
+
effect: {
|
|
468
|
+
name: "contrast",
|
|
469
|
+
importPath: "@remotion/effects/contrast",
|
|
470
|
+
config: {}
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
id: "effects-color-key",
|
|
475
|
+
category: "Color",
|
|
476
|
+
label: "colorKey()",
|
|
477
|
+
description: "Remove a key color (greenscreen)",
|
|
478
|
+
effect: {
|
|
479
|
+
name: "colorKey",
|
|
480
|
+
importPath: "@remotion/effects/color-key",
|
|
481
|
+
config: {
|
|
482
|
+
similarity: 0.45
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
id: "effects-duotone",
|
|
488
|
+
category: "Color",
|
|
489
|
+
label: "duotone()",
|
|
490
|
+
description: "Two-color threshold effect",
|
|
491
|
+
effect: {
|
|
492
|
+
name: "duotone",
|
|
493
|
+
importPath: "@remotion/effects/duotone",
|
|
494
|
+
config: {}
|
|
495
|
+
}
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
id: "effects-grayscale",
|
|
499
|
+
category: "Color",
|
|
500
|
+
label: "grayscale()",
|
|
501
|
+
description: "Black-and-white effect",
|
|
502
|
+
effect: {
|
|
503
|
+
name: "grayscale",
|
|
504
|
+
importPath: "@remotion/effects/grayscale",
|
|
505
|
+
config: {}
|
|
506
|
+
}
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
id: "effects-hue",
|
|
510
|
+
category: "Color",
|
|
511
|
+
label: "hue()",
|
|
512
|
+
description: "Hue rotation effect",
|
|
513
|
+
effect: {
|
|
514
|
+
name: "hue",
|
|
515
|
+
importPath: "@remotion/effects/hue",
|
|
516
|
+
config: {}
|
|
517
|
+
}
|
|
518
|
+
},
|
|
519
|
+
{
|
|
520
|
+
id: "effects-invert",
|
|
521
|
+
category: "Color",
|
|
522
|
+
label: "invert()",
|
|
523
|
+
description: "Negative color effect",
|
|
524
|
+
effect: {
|
|
525
|
+
name: "invert",
|
|
526
|
+
importPath: "@remotion/effects/invert",
|
|
527
|
+
config: {}
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
id: "effects-saturation",
|
|
532
|
+
category: "Color",
|
|
533
|
+
label: "saturation()",
|
|
534
|
+
description: "Saturation adjustment effect",
|
|
535
|
+
effect: {
|
|
536
|
+
name: "saturation",
|
|
537
|
+
importPath: "@remotion/effects/saturation",
|
|
538
|
+
config: {}
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
id: "effects-tint",
|
|
543
|
+
category: "Color",
|
|
544
|
+
label: "tint()",
|
|
545
|
+
description: "Color tint effect",
|
|
546
|
+
effect: {
|
|
547
|
+
name: "tint",
|
|
548
|
+
importPath: "@remotion/effects/tint",
|
|
549
|
+
config: {
|
|
550
|
+
color: "#1ec8ff"
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
id: "effects-linear-gradient",
|
|
556
|
+
category: "Color",
|
|
557
|
+
label: "linearGradient()",
|
|
558
|
+
description: "Two-stop gradient effect",
|
|
559
|
+
effect: {
|
|
560
|
+
name: "linearGradient",
|
|
561
|
+
importPath: "@remotion/effects/linear-gradient",
|
|
562
|
+
config: {}
|
|
563
|
+
}
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
id: "effects-linear-gradient-tint",
|
|
567
|
+
category: "Color",
|
|
568
|
+
label: "linearGradientTint()",
|
|
569
|
+
description: "Gradient tint effect",
|
|
570
|
+
effect: {
|
|
571
|
+
name: "linearGradientTint",
|
|
572
|
+
importPath: "@remotion/effects/linear-gradient-tint",
|
|
573
|
+
config: {}
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
{
|
|
577
|
+
id: "effects-thermal-vision",
|
|
578
|
+
category: "Color",
|
|
579
|
+
label: "thermalVision()",
|
|
580
|
+
description: "Thermal heat-map color effect",
|
|
581
|
+
effect: {
|
|
582
|
+
name: "thermalVision",
|
|
583
|
+
importPath: "@remotion/effects/thermal-vision",
|
|
584
|
+
config: {}
|
|
585
|
+
}
|
|
586
|
+
},
|
|
587
|
+
{
|
|
588
|
+
id: "effects-blur",
|
|
589
|
+
category: "Blur & Shadow",
|
|
590
|
+
label: "blur()",
|
|
591
|
+
description: "Gaussian blur effect",
|
|
592
|
+
effect: {
|
|
593
|
+
name: "blur",
|
|
594
|
+
importPath: "@remotion/effects/blur",
|
|
595
|
+
config: {
|
|
596
|
+
radius: 40
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
},
|
|
600
|
+
{
|
|
601
|
+
id: "effects-linear-progressive-blur",
|
|
602
|
+
category: "Blur & Shadow",
|
|
603
|
+
label: "linearProgressiveBlur()",
|
|
604
|
+
description: "Gradient-controlled blur effect",
|
|
605
|
+
effect: {
|
|
606
|
+
name: "linearProgressiveBlur",
|
|
607
|
+
importPath: "@remotion/effects/linear-progressive-blur",
|
|
608
|
+
config: {}
|
|
609
|
+
}
|
|
610
|
+
},
|
|
611
|
+
{
|
|
612
|
+
id: "effects-radial-progressive-blur",
|
|
613
|
+
category: "Blur & Shadow",
|
|
614
|
+
label: "radialProgressiveBlur()",
|
|
615
|
+
description: "Ellipse-controlled blur effect",
|
|
616
|
+
effect: {
|
|
617
|
+
name: "radialProgressiveBlur",
|
|
618
|
+
importPath: "@remotion/effects/radial-progressive-blur",
|
|
619
|
+
config: {}
|
|
620
|
+
}
|
|
621
|
+
},
|
|
622
|
+
{
|
|
623
|
+
id: "effects-zoom-blur",
|
|
624
|
+
category: "Blur & Shadow",
|
|
625
|
+
label: "zoomBlur()",
|
|
626
|
+
description: "Radial zoom blur effect",
|
|
627
|
+
effect: {
|
|
628
|
+
name: "zoomBlur",
|
|
629
|
+
importPath: "@remotion/effects/zoom-blur",
|
|
630
|
+
config: {}
|
|
631
|
+
}
|
|
632
|
+
},
|
|
633
|
+
{
|
|
634
|
+
id: "effects-drop-shadow",
|
|
635
|
+
category: "Blur & Shadow",
|
|
636
|
+
label: "dropShadow()",
|
|
637
|
+
description: "Blurred alpha shadow effect",
|
|
638
|
+
effect: {
|
|
639
|
+
name: "dropShadow",
|
|
640
|
+
importPath: "@remotion/effects/drop-shadow",
|
|
641
|
+
config: {}
|
|
642
|
+
}
|
|
643
|
+
},
|
|
644
|
+
{
|
|
645
|
+
id: "effects-glow",
|
|
646
|
+
category: "Blur & Shadow",
|
|
647
|
+
label: "glow()",
|
|
648
|
+
description: "Soft halo effect",
|
|
649
|
+
effect: {
|
|
650
|
+
name: "glow",
|
|
651
|
+
importPath: "@remotion/effects/glow",
|
|
652
|
+
config: {}
|
|
653
|
+
}
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
id: "effects-light-trail",
|
|
657
|
+
category: "Blur & Shadow",
|
|
658
|
+
label: "lightTrail()",
|
|
659
|
+
description: "Directional light trail effect",
|
|
660
|
+
effect: {
|
|
661
|
+
name: "lightTrail",
|
|
662
|
+
importPath: "@remotion/effects/light-trail",
|
|
663
|
+
config: {}
|
|
664
|
+
}
|
|
665
|
+
},
|
|
666
|
+
{
|
|
667
|
+
id: "effects-evolve",
|
|
668
|
+
category: "Reveal",
|
|
669
|
+
label: "evolve()",
|
|
670
|
+
description: "Directional reveal effect",
|
|
671
|
+
effect: {
|
|
672
|
+
name: "evolve",
|
|
673
|
+
importPath: "@remotion/effects/evolve",
|
|
674
|
+
config: {}
|
|
675
|
+
}
|
|
676
|
+
},
|
|
677
|
+
{
|
|
678
|
+
id: "effects-venetian-blinds",
|
|
679
|
+
category: "Reveal",
|
|
680
|
+
label: "venetianBlinds()",
|
|
681
|
+
description: "Slatted reveal effect",
|
|
682
|
+
effect: {
|
|
683
|
+
name: "venetianBlinds",
|
|
684
|
+
importPath: "@remotion/effects/venetian-blinds",
|
|
685
|
+
config: {}
|
|
686
|
+
}
|
|
687
|
+
},
|
|
688
|
+
{
|
|
689
|
+
id: "effects-mirror",
|
|
690
|
+
category: "Transform",
|
|
691
|
+
label: "mirror()",
|
|
692
|
+
description: "Mirror reflection effect",
|
|
693
|
+
effect: {
|
|
694
|
+
name: "mirror",
|
|
695
|
+
importPath: "@remotion/effects/mirror",
|
|
696
|
+
config: {}
|
|
697
|
+
}
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
id: "effects-scale",
|
|
701
|
+
category: "Transform",
|
|
702
|
+
label: "scale()",
|
|
703
|
+
description: "Scale transform effect",
|
|
704
|
+
effect: {
|
|
705
|
+
name: "scale",
|
|
706
|
+
importPath: "@remotion/effects/scale",
|
|
707
|
+
config: {
|
|
708
|
+
scale: 1
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
id: "effects-uv-translate",
|
|
714
|
+
category: "Transform",
|
|
715
|
+
label: "uvTranslate()",
|
|
716
|
+
description: "UV-based translate effect",
|
|
717
|
+
effect: {
|
|
718
|
+
name: "uvTranslate",
|
|
719
|
+
importPath: "@remotion/effects/translate",
|
|
720
|
+
config: {}
|
|
721
|
+
}
|
|
722
|
+
},
|
|
723
|
+
{
|
|
724
|
+
id: "effects-xy-translate",
|
|
725
|
+
category: "Transform",
|
|
726
|
+
label: "xyTranslate()",
|
|
727
|
+
description: "Pixel-based translate effect",
|
|
728
|
+
effect: {
|
|
729
|
+
name: "xyTranslate",
|
|
730
|
+
importPath: "@remotion/effects/translate",
|
|
731
|
+
config: {}
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
{
|
|
735
|
+
id: "effects-barrel-distortion",
|
|
736
|
+
category: "Distort",
|
|
737
|
+
label: "barrelDistortion()",
|
|
738
|
+
description: "Barrel distortion effect",
|
|
739
|
+
effect: {
|
|
740
|
+
name: "barrelDistortion",
|
|
741
|
+
importPath: "@remotion/effects/barrel-distortion",
|
|
742
|
+
config: {}
|
|
743
|
+
}
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
id: "effects-chromatic-aberration",
|
|
747
|
+
category: "Distort",
|
|
748
|
+
label: "chromaticAberration()",
|
|
749
|
+
description: "RGB channel split effect",
|
|
750
|
+
effect: {
|
|
751
|
+
name: "chromaticAberration",
|
|
752
|
+
importPath: "@remotion/effects/chromatic-aberration",
|
|
753
|
+
config: {}
|
|
754
|
+
}
|
|
755
|
+
},
|
|
756
|
+
{
|
|
757
|
+
id: "effects-fisheye",
|
|
758
|
+
category: "Distort",
|
|
759
|
+
label: "fisheye()",
|
|
760
|
+
description: "Ultra-wide-angle lens effect",
|
|
761
|
+
effect: {
|
|
762
|
+
name: "fisheye",
|
|
763
|
+
importPath: "@remotion/effects/fisheye",
|
|
764
|
+
config: {}
|
|
765
|
+
}
|
|
766
|
+
},
|
|
767
|
+
{
|
|
768
|
+
id: "effects-corner-pin",
|
|
769
|
+
category: "Distort",
|
|
770
|
+
label: "cornerPin()",
|
|
771
|
+
description: "Pin source corners to a quad",
|
|
772
|
+
effect: {
|
|
773
|
+
name: "cornerPin",
|
|
774
|
+
importPath: "@remotion/effects/corner-pin",
|
|
775
|
+
config: {
|
|
776
|
+
topLeft: [0.08, 0.12],
|
|
777
|
+
topRight: [0.92, 0.04],
|
|
778
|
+
bottomRight: [0.86, 0.9],
|
|
779
|
+
bottomLeft: [0.14, 0.96]
|
|
780
|
+
}
|
|
781
|
+
}
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
id: "effects-wave",
|
|
785
|
+
category: "Distort",
|
|
786
|
+
label: "wave()",
|
|
787
|
+
description: "Sine wave distortion",
|
|
788
|
+
effect: {
|
|
789
|
+
name: "wave",
|
|
790
|
+
importPath: "@remotion/effects/wave",
|
|
791
|
+
config: {}
|
|
792
|
+
}
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
id: "effects-skew",
|
|
796
|
+
category: "Distort",
|
|
797
|
+
label: "skew()",
|
|
798
|
+
description: "Skew the source on two axes",
|
|
799
|
+
effect: {
|
|
800
|
+
name: "skew",
|
|
801
|
+
importPath: "@remotion/effects/skew",
|
|
802
|
+
config: {}
|
|
803
|
+
}
|
|
804
|
+
},
|
|
805
|
+
{
|
|
806
|
+
id: "effects-burlap",
|
|
807
|
+
category: "Stylize",
|
|
808
|
+
label: "burlap()",
|
|
809
|
+
description: "Procedural woven texture effect",
|
|
810
|
+
effect: {
|
|
811
|
+
name: "burlap",
|
|
812
|
+
importPath: "@remotion/effects/burlap",
|
|
813
|
+
config: {}
|
|
814
|
+
}
|
|
815
|
+
},
|
|
816
|
+
{
|
|
817
|
+
id: "effects-emboss",
|
|
818
|
+
category: "Stylize",
|
|
819
|
+
label: "emboss()",
|
|
820
|
+
description: "Procedural raised-line relief",
|
|
821
|
+
effect: {
|
|
822
|
+
name: "emboss",
|
|
823
|
+
importPath: "@remotion/effects/emboss",
|
|
824
|
+
config: {}
|
|
825
|
+
}
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
id: "effects-dot-grid",
|
|
829
|
+
category: "Stylize",
|
|
830
|
+
label: "dotGrid()",
|
|
831
|
+
description: "Source-color dot mask effect",
|
|
832
|
+
effect: {
|
|
833
|
+
name: "dotGrid",
|
|
834
|
+
importPath: "@remotion/effects/dot-grid",
|
|
835
|
+
config: {}
|
|
836
|
+
}
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
id: "effects-halftone",
|
|
840
|
+
category: "Stylize",
|
|
841
|
+
label: "halftone()",
|
|
842
|
+
description: "Source-image halftone effect",
|
|
843
|
+
effect: {
|
|
844
|
+
name: "halftone",
|
|
845
|
+
importPath: "@remotion/effects/halftone",
|
|
846
|
+
config: {}
|
|
847
|
+
}
|
|
848
|
+
},
|
|
849
|
+
{
|
|
850
|
+
id: "effects-noise",
|
|
851
|
+
category: "Stylize",
|
|
852
|
+
label: "noise()",
|
|
853
|
+
description: "Procedural grain effect",
|
|
854
|
+
effect: {
|
|
855
|
+
name: "noise",
|
|
856
|
+
importPath: "@remotion/effects/noise",
|
|
857
|
+
config: {}
|
|
858
|
+
}
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
id: "effects-noise-displacement",
|
|
862
|
+
category: "Stylize",
|
|
863
|
+
label: "noiseDisplacement()",
|
|
864
|
+
description: "Localized noisy displacement",
|
|
865
|
+
effect: {
|
|
866
|
+
name: "noiseDisplacement",
|
|
867
|
+
importPath: "@remotion/effects/noise-displacement",
|
|
868
|
+
config: {
|
|
869
|
+
center: [0.6124309308853857, 0.5010527449123625],
|
|
870
|
+
radius: 0.41,
|
|
871
|
+
strength: 15.5,
|
|
872
|
+
seed: 78,
|
|
873
|
+
grainSize: 0.9,
|
|
874
|
+
passes: 12,
|
|
875
|
+
blur: 0,
|
|
876
|
+
feather: 1,
|
|
877
|
+
biasDirection: 313,
|
|
878
|
+
biasAmount: 1
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
id: "effects-paper",
|
|
884
|
+
category: "Stylize",
|
|
885
|
+
label: "paper()",
|
|
886
|
+
description: "Procedural paper texture effect",
|
|
887
|
+
effect: {
|
|
888
|
+
name: "paper",
|
|
889
|
+
importPath: "@remotion/effects/paper",
|
|
890
|
+
config: {}
|
|
891
|
+
}
|
|
892
|
+
},
|
|
893
|
+
{
|
|
894
|
+
id: "effects-roughen-edges",
|
|
895
|
+
category: "Stylize",
|
|
896
|
+
label: "roughenEdges()",
|
|
897
|
+
description: "Procedural alpha-edge roughening",
|
|
898
|
+
effect: {
|
|
899
|
+
name: "roughenEdges",
|
|
900
|
+
importPath: "@remotion/effects/roughen-edges",
|
|
901
|
+
config: {}
|
|
902
|
+
}
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
id: "effects-pattern",
|
|
906
|
+
category: "Stylize",
|
|
907
|
+
label: "pattern()",
|
|
908
|
+
description: "Repeated source tile effect",
|
|
909
|
+
effect: {
|
|
910
|
+
name: "pattern",
|
|
911
|
+
importPath: "@remotion/effects/pattern",
|
|
912
|
+
config: {}
|
|
913
|
+
}
|
|
914
|
+
},
|
|
915
|
+
{
|
|
916
|
+
id: "effects-pixel-dissolve",
|
|
917
|
+
category: "Stylize",
|
|
918
|
+
label: "pixelDissolve()",
|
|
919
|
+
description: "Pixelated dissolve effect",
|
|
920
|
+
effect: {
|
|
921
|
+
name: "pixelDissolve",
|
|
922
|
+
importPath: "@remotion/effects/pixel-dissolve",
|
|
923
|
+
config: {}
|
|
924
|
+
}
|
|
925
|
+
},
|
|
926
|
+
{
|
|
927
|
+
id: "effects-pixelate",
|
|
928
|
+
category: "Stylize",
|
|
929
|
+
label: "pixelate()",
|
|
930
|
+
description: "Pixelation effect",
|
|
931
|
+
effect: {
|
|
932
|
+
name: "pixelate",
|
|
933
|
+
importPath: "@remotion/effects/pixelate",
|
|
934
|
+
config: {
|
|
935
|
+
blockSize: 20
|
|
936
|
+
}
|
|
937
|
+
}
|
|
938
|
+
},
|
|
939
|
+
{
|
|
940
|
+
id: "effects-linear-progressive-pixelate",
|
|
941
|
+
category: "Stylize",
|
|
942
|
+
label: "linearProgressivePixelate()",
|
|
943
|
+
description: "Gradient-controlled pixelation",
|
|
944
|
+
effect: {
|
|
945
|
+
name: "linearProgressivePixelate",
|
|
946
|
+
importPath: "@remotion/effects/linear-progressive-pixelate",
|
|
947
|
+
config: {}
|
|
948
|
+
}
|
|
949
|
+
},
|
|
950
|
+
{
|
|
951
|
+
id: "effects-radial-progressive-pixelate",
|
|
952
|
+
category: "Stylize",
|
|
953
|
+
label: "radialProgressivePixelate()",
|
|
954
|
+
description: "Ellipse-controlled pixelation",
|
|
955
|
+
effect: {
|
|
956
|
+
name: "radialProgressivePixelate",
|
|
957
|
+
importPath: "@remotion/effects/radial-progressive-pixelate",
|
|
958
|
+
config: {}
|
|
959
|
+
}
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
id: "effects-scanlines",
|
|
963
|
+
category: "Stylize",
|
|
964
|
+
label: "scanlines()",
|
|
965
|
+
description: "Additive horizontal scanlines",
|
|
966
|
+
effect: {
|
|
967
|
+
name: "scanlines",
|
|
968
|
+
importPath: "@remotion/effects/scanlines",
|
|
969
|
+
config: {}
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
id: "effects-speckle",
|
|
974
|
+
category: "Stylize",
|
|
975
|
+
label: "speckle()",
|
|
976
|
+
description: "Random alpha-hole effect",
|
|
977
|
+
effect: {
|
|
978
|
+
name: "speckle",
|
|
979
|
+
importPath: "@remotion/effects/speckle",
|
|
980
|
+
config: {}
|
|
981
|
+
}
|
|
982
|
+
},
|
|
983
|
+
{
|
|
984
|
+
id: "effects-shine",
|
|
985
|
+
category: "Stylize",
|
|
986
|
+
label: "shine()",
|
|
987
|
+
description: "Glossy light sweep effect",
|
|
988
|
+
effect: {
|
|
989
|
+
name: "shine",
|
|
990
|
+
importPath: "@remotion/effects/shine",
|
|
991
|
+
config: {}
|
|
992
|
+
}
|
|
993
|
+
},
|
|
994
|
+
{
|
|
995
|
+
id: "effects-shrinkwrap",
|
|
996
|
+
category: "Stylize",
|
|
997
|
+
label: "shrinkwrap()",
|
|
998
|
+
description: "Procedural plastic wrap effect",
|
|
999
|
+
effect: {
|
|
1000
|
+
name: "shrinkwrap",
|
|
1001
|
+
importPath: "@remotion/effects/shrinkwrap",
|
|
1002
|
+
config: {
|
|
1003
|
+
amount: 0.94,
|
|
1004
|
+
displacement: 13.5,
|
|
1005
|
+
highlightIntensity: 1.54,
|
|
1006
|
+
wrinkleDensity: 0.87,
|
|
1007
|
+
edgeTension: 0.58,
|
|
1008
|
+
phase: 0,
|
|
1009
|
+
seed: 12
|
|
1010
|
+
}
|
|
1011
|
+
}
|
|
1012
|
+
},
|
|
1013
|
+
{
|
|
1014
|
+
id: "effects-vignette",
|
|
1015
|
+
category: "Stylize",
|
|
1016
|
+
label: "vignette()",
|
|
1017
|
+
description: "Edge darkening or transparency effect",
|
|
1018
|
+
effect: {
|
|
1019
|
+
name: "vignette",
|
|
1020
|
+
importPath: "@remotion/effects/vignette",
|
|
1021
|
+
config: {}
|
|
1022
|
+
}
|
|
1023
|
+
},
|
|
1024
|
+
{
|
|
1025
|
+
id: "effects-contour-lines",
|
|
1026
|
+
category: "Generate",
|
|
1027
|
+
label: "contourLines()",
|
|
1028
|
+
description: "Topographic line overlay effect",
|
|
1029
|
+
effect: {
|
|
1030
|
+
name: "contourLines",
|
|
1031
|
+
importPath: "@remotion/effects/contour-lines",
|
|
1032
|
+
config: {}
|
|
1033
|
+
}
|
|
1034
|
+
},
|
|
1035
|
+
{
|
|
1036
|
+
id: "effects-liquid-contours",
|
|
1037
|
+
category: "Generate",
|
|
1038
|
+
label: "liquidContours()",
|
|
1039
|
+
description: "Two-color liquid contour background",
|
|
1040
|
+
effect: {
|
|
1041
|
+
name: "liquidContours",
|
|
1042
|
+
importPath: "@remotion/effects/liquid-contours",
|
|
1043
|
+
config: {}
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
{
|
|
1047
|
+
id: "effects-checkerboard",
|
|
1048
|
+
category: "Generate",
|
|
1049
|
+
label: "checkerboard()",
|
|
1050
|
+
description: "Checkerboard pattern effect",
|
|
1051
|
+
effect: {
|
|
1052
|
+
name: "checkerboard",
|
|
1053
|
+
importPath: "@remotion/effects/checkerboard",
|
|
1054
|
+
config: {}
|
|
1055
|
+
}
|
|
1056
|
+
},
|
|
1057
|
+
{
|
|
1058
|
+
id: "effects-flannel",
|
|
1059
|
+
category: "Generate",
|
|
1060
|
+
label: "flannel()",
|
|
1061
|
+
description: "Plaid woven fabric pattern",
|
|
1062
|
+
effect: {
|
|
1063
|
+
name: "flannel",
|
|
1064
|
+
importPath: "@remotion/effects/flannel",
|
|
1065
|
+
config: {}
|
|
1066
|
+
}
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
id: "effects-halftone-linear-gradient",
|
|
1070
|
+
category: "Generate",
|
|
1071
|
+
label: "halftoneLinearGradient()",
|
|
1072
|
+
description: "Procedural dot gradient effect",
|
|
1073
|
+
effect: {
|
|
1074
|
+
name: "halftoneLinearGradient",
|
|
1075
|
+
importPath: "@remotion/effects/halftone-linear-gradient",
|
|
1076
|
+
config: {}
|
|
1077
|
+
}
|
|
1078
|
+
},
|
|
1079
|
+
{
|
|
1080
|
+
id: "effects-gridlines",
|
|
1081
|
+
category: "Generate",
|
|
1082
|
+
label: "gridlines()",
|
|
1083
|
+
description: "Procedural grid pattern effect",
|
|
1084
|
+
effect: {
|
|
1085
|
+
name: "gridlines",
|
|
1086
|
+
importPath: "@remotion/effects/gridlines",
|
|
1087
|
+
config: {}
|
|
1088
|
+
}
|
|
1089
|
+
},
|
|
1090
|
+
{
|
|
1091
|
+
id: "effects-white-noise",
|
|
1092
|
+
category: "Generate",
|
|
1093
|
+
label: "whiteNoise()",
|
|
1094
|
+
description: "Random grayscale noise layer",
|
|
1095
|
+
effect: {
|
|
1096
|
+
name: "whiteNoise",
|
|
1097
|
+
importPath: "@remotion/effects/white-noise",
|
|
1098
|
+
config: {}
|
|
1099
|
+
}
|
|
1100
|
+
},
|
|
1101
|
+
{
|
|
1102
|
+
id: "effects-tv-signal-off",
|
|
1103
|
+
category: "Generate",
|
|
1104
|
+
label: "tvSignalOff()",
|
|
1105
|
+
description: "TV color bars test pattern",
|
|
1106
|
+
effect: {
|
|
1107
|
+
name: "tvSignalOff",
|
|
1108
|
+
importPath: "@remotion/effects/tv-signal-off",
|
|
1109
|
+
config: {}
|
|
1110
|
+
}
|
|
1111
|
+
},
|
|
1112
|
+
{
|
|
1113
|
+
id: "effects-lines",
|
|
1114
|
+
category: "Generate",
|
|
1115
|
+
label: "lines()",
|
|
1116
|
+
description: "Alternating line pattern effect",
|
|
1117
|
+
effect: {
|
|
1118
|
+
name: "lines",
|
|
1119
|
+
importPath: "@remotion/effects/lines",
|
|
1120
|
+
config: {}
|
|
1121
|
+
}
|
|
1122
|
+
},
|
|
1123
|
+
{
|
|
1124
|
+
id: "effects-rings",
|
|
1125
|
+
category: "Generate",
|
|
1126
|
+
label: "rings()",
|
|
1127
|
+
description: "Concentric ring pattern effect",
|
|
1128
|
+
effect: {
|
|
1129
|
+
name: "rings",
|
|
1130
|
+
importPath: "@remotion/effects/rings",
|
|
1131
|
+
config: {}
|
|
1132
|
+
}
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
id: "effects-waves",
|
|
1136
|
+
category: "Generate",
|
|
1137
|
+
label: "waves()",
|
|
1138
|
+
description: "Wavy band pattern effect",
|
|
1139
|
+
effect: {
|
|
1140
|
+
name: "waves",
|
|
1141
|
+
importPath: "@remotion/effects/waves",
|
|
1142
|
+
config: {}
|
|
1143
|
+
}
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
id: "effects-zigzag",
|
|
1147
|
+
category: "Generate",
|
|
1148
|
+
label: "zigzag()",
|
|
1149
|
+
description: "Zig-zag band pattern effect",
|
|
1150
|
+
effect: {
|
|
1151
|
+
name: "zigzag",
|
|
1152
|
+
importPath: "@remotion/effects/zigzag",
|
|
1153
|
+
config: {}
|
|
1154
|
+
}
|
|
1155
|
+
},
|
|
1156
|
+
{
|
|
1157
|
+
id: "effects-light-leak",
|
|
1158
|
+
category: "Generate",
|
|
1159
|
+
label: "lightLeak()",
|
|
1160
|
+
description: "Light leak overlay effect",
|
|
1161
|
+
effect: {
|
|
1162
|
+
name: "lightLeak",
|
|
1163
|
+
importPath: "@remotion/effects/light-leak",
|
|
1164
|
+
config: {}
|
|
1165
|
+
}
|
|
1166
|
+
},
|
|
1167
|
+
{
|
|
1168
|
+
id: "effects-starburst",
|
|
1169
|
+
category: "Generate",
|
|
1170
|
+
label: "starburst()",
|
|
1171
|
+
description: "Starburst ray effect",
|
|
1172
|
+
effect: {
|
|
1173
|
+
name: "starburst",
|
|
1174
|
+
importPath: "@remotion/effects/starburst",
|
|
1175
|
+
config: {
|
|
1176
|
+
rays: 16,
|
|
1177
|
+
colors: ["#ff6600", "#ffff00"]
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
];
|
|
1182
|
+
// src/keyframe-interpolation-function.ts
|
|
1183
|
+
var keyframeInterpolationFunctions = [
|
|
1184
|
+
"interpolate",
|
|
1185
|
+
"interpolateColors"
|
|
1186
|
+
];
|
|
1187
|
+
var KEYFRAME_FIELD_TYPE_SUPPORT = {
|
|
1188
|
+
array: false,
|
|
1189
|
+
asset: false,
|
|
1190
|
+
boolean: false,
|
|
1191
|
+
"remotion-captions": false,
|
|
1192
|
+
color: true,
|
|
1193
|
+
enum: false,
|
|
1194
|
+
"font-family": false,
|
|
1195
|
+
hidden: true,
|
|
1196
|
+
number: true,
|
|
1197
|
+
"rotation-css": true,
|
|
1198
|
+
"rotation-degrees": true,
|
|
1199
|
+
scale: true,
|
|
1200
|
+
"text-content": false,
|
|
1201
|
+
"transform-origin": true,
|
|
1202
|
+
translate: true,
|
|
1203
|
+
"uv-coordinate": true
|
|
1204
|
+
};
|
|
1205
|
+
var KEYFRAME_FIELD_TYPE_INTERPOLATION = {
|
|
1206
|
+
array: "unsupported",
|
|
1207
|
+
asset: "unsupported",
|
|
1208
|
+
boolean: "unsupported",
|
|
1209
|
+
"remotion-captions": "unsupported",
|
|
1210
|
+
color: "interpolateColors",
|
|
1211
|
+
enum: "unsupported",
|
|
1212
|
+
"font-family": "unsupported",
|
|
1213
|
+
hidden: "infer",
|
|
1214
|
+
number: "infer",
|
|
1215
|
+
"rotation-css": "interpolate",
|
|
1216
|
+
"rotation-degrees": "infer",
|
|
1217
|
+
scale: "interpolate",
|
|
1218
|
+
"text-content": "unsupported",
|
|
1219
|
+
"transform-origin": "interpolate",
|
|
1220
|
+
translate: "interpolate",
|
|
1221
|
+
"uv-coordinate": "infer"
|
|
1222
|
+
};
|
|
1223
|
+
var KEYFRAME_INTERPOLATION_EASING_SUPPORT = {
|
|
1224
|
+
interpolate: true,
|
|
1225
|
+
interpolateColors: true
|
|
1226
|
+
};
|
|
1227
|
+
var isKeyframeInterpolationFunction = (name) => {
|
|
1228
|
+
return keyframeInterpolationFunctions.includes(name);
|
|
1229
|
+
};
|
|
1230
|
+
var canEditEasingForInterpolationFunction = (interpolationFunction) => isKeyframeInterpolationFunction(interpolationFunction) && KEYFRAME_INTERPOLATION_EASING_SUPPORT[interpolationFunction];
|
|
1231
|
+
var isInteractivitySchemaFieldKeyframable = (field) => {
|
|
1232
|
+
if (!field) {
|
|
1233
|
+
return true;
|
|
1234
|
+
}
|
|
1235
|
+
return KEYFRAME_FIELD_TYPE_SUPPORT[field.type] && field.keyframable !== false;
|
|
1236
|
+
};
|
|
1237
|
+
var findFieldInSchema = (schema, key) => {
|
|
1238
|
+
if (key in schema) {
|
|
1239
|
+
return schema[key];
|
|
1240
|
+
}
|
|
1241
|
+
for (const field of Object.values(schema)) {
|
|
1242
|
+
if (field.type !== "enum") {
|
|
1243
|
+
continue;
|
|
1244
|
+
}
|
|
1245
|
+
for (const variant of Object.values(field.variants)) {
|
|
1246
|
+
const found = findFieldInSchema(variant, key);
|
|
1247
|
+
if (found) {
|
|
1248
|
+
return found;
|
|
1249
|
+
}
|
|
1250
|
+
}
|
|
1251
|
+
}
|
|
1252
|
+
return;
|
|
1253
|
+
};
|
|
1254
|
+
var isSchemaFieldKeyframable = ({
|
|
1255
|
+
schema,
|
|
1256
|
+
key
|
|
1257
|
+
}) => {
|
|
1258
|
+
const field = schema ? findFieldInSchema(schema, key) : undefined;
|
|
1259
|
+
return isInteractivitySchemaFieldKeyframable(field);
|
|
1260
|
+
};
|
|
1261
|
+
var getKeyframeInterpolationFunctionForSchemaField = ({
|
|
1262
|
+
schema,
|
|
1263
|
+
key
|
|
1264
|
+
}) => {
|
|
1265
|
+
const field = schema ? findFieldInSchema(schema, key) : undefined;
|
|
1266
|
+
if (!field) {
|
|
1267
|
+
return null;
|
|
1268
|
+
}
|
|
1269
|
+
const strategy = KEYFRAME_FIELD_TYPE_INTERPOLATION[field.type];
|
|
1270
|
+
return strategy === "infer" || strategy === "unsupported" ? null : strategy;
|
|
1271
|
+
};
|
|
1272
|
+
var getKeyframeInterpolationFunction = ({
|
|
1273
|
+
schema,
|
|
1274
|
+
key,
|
|
1275
|
+
staticValue,
|
|
1276
|
+
newValue
|
|
1277
|
+
}) => {
|
|
1278
|
+
const schemaFunction = getKeyframeInterpolationFunctionForSchemaField({
|
|
1279
|
+
schema,
|
|
1280
|
+
key
|
|
1281
|
+
});
|
|
1282
|
+
if (schemaFunction) {
|
|
1283
|
+
return schemaFunction;
|
|
1284
|
+
}
|
|
1285
|
+
return typeof staticValue === "string" && typeof newValue === "string" ? "interpolateColors" : "interpolate";
|
|
1286
|
+
};
|
|
1287
|
+
|
|
1288
|
+
// src/effect-clipboard-data.ts
|
|
1289
|
+
var isRecord2 = (value) => {
|
|
1290
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1291
|
+
};
|
|
1292
|
+
var extrapolateTypes = new Set(["extend", "identity", "clamp", "wrap"]);
|
|
1293
|
+
var outputOptions = new Set(["linear", "perceptual-scale"]);
|
|
1294
|
+
var isFiniteNumber2 = (value) => {
|
|
1295
|
+
return typeof value === "number" && Number.isFinite(value);
|
|
1296
|
+
};
|
|
1297
|
+
var isEasing = (value) => {
|
|
1298
|
+
return isRecord2(value) && (value.type === "linear" || value.type === "bezier" && isFiniteNumber2(value.x1) && isFiniteNumber2(value.y1) && isFiniteNumber2(value.x2) && isFiniteNumber2(value.y2) || value.type === "spring" && isFiniteNumber2(value.damping) && isFiniteNumber2(value.mass) && isFiniteNumber2(value.stiffness) && (value.allowTail === undefined || value.allowTail === null || typeof value.allowTail === "boolean") && (value.durationRestThreshold === undefined || value.durationRestThreshold === null || isFiniteNumber2(value.durationRestThreshold)) && typeof value.overshootClamping === "boolean");
|
|
1299
|
+
};
|
|
1300
|
+
var normalizeEasing = (easing) => {
|
|
1301
|
+
if (easing.type !== "spring") {
|
|
1302
|
+
return easing;
|
|
1303
|
+
}
|
|
1304
|
+
return {
|
|
1305
|
+
...easing,
|
|
1306
|
+
allowTail: easing.allowTail ?? null,
|
|
1307
|
+
durationRestThreshold: easing.durationRestThreshold ?? null
|
|
1308
|
+
};
|
|
1309
|
+
};
|
|
1310
|
+
var normalizeParam = (param) => {
|
|
1311
|
+
if (param.type === "static") {
|
|
1312
|
+
return param;
|
|
1313
|
+
}
|
|
1314
|
+
return {
|
|
1315
|
+
...param,
|
|
1316
|
+
easing: param.easing.map(normalizeEasing)
|
|
1317
|
+
};
|
|
1318
|
+
};
|
|
1319
|
+
var normalizeSnapshot = (snapshot) => {
|
|
1320
|
+
return {
|
|
1321
|
+
...snapshot,
|
|
1322
|
+
params: Object.fromEntries(Object.entries(snapshot.params).map(([key, param]) => [
|
|
1323
|
+
key,
|
|
1324
|
+
normalizeParam(param)
|
|
1325
|
+
]))
|
|
1326
|
+
};
|
|
1327
|
+
};
|
|
1328
|
+
var isKeyframe = (value) => {
|
|
1329
|
+
return isRecord2(value) && isFiniteNumber2(value.frame) && "value" in value;
|
|
1330
|
+
};
|
|
1331
|
+
var isClamping = (value) => {
|
|
1332
|
+
return isRecord2(value) && typeof value.left === "string" && extrapolateTypes.has(value.left) && typeof value.right === "string" && extrapolateTypes.has(value.right);
|
|
1333
|
+
};
|
|
1334
|
+
var isEffectClipboardParam = (value) => {
|
|
1335
|
+
if (!isRecord2(value)) {
|
|
1336
|
+
return false;
|
|
1337
|
+
}
|
|
1338
|
+
if (value.type === "static") {
|
|
1339
|
+
return "value" in value;
|
|
1340
|
+
}
|
|
1341
|
+
if (value.type !== "keyframed") {
|
|
1342
|
+
return false;
|
|
1343
|
+
}
|
|
1344
|
+
const { posterize } = value;
|
|
1345
|
+
const { output } = value;
|
|
1346
|
+
const easingLength = Array.isArray(value.keyframes) && value.keyframes.length > 0 ? value.keyframes.length - 1 : null;
|
|
1347
|
+
return typeof value.interpolationFunction === "string" && isKeyframeInterpolationFunction(value.interpolationFunction) && Array.isArray(value.keyframes) && value.keyframes.length > 0 && value.keyframes.every(isKeyframe) && Array.isArray(value.easing) && value.easing.length === easingLength && value.easing.every(isEasing) && isClamping(value.clamping) && (output === undefined || value.interpolationFunction === "interpolate" && typeof output === "string" && outputOptions.has(output)) && (posterize === undefined || isFiniteNumber2(posterize) && posterize > 0);
|
|
1348
|
+
};
|
|
1349
|
+
var isEffectClipboardSnapshotV3 = (value) => {
|
|
1350
|
+
if (!isRecord2(value)) {
|
|
1351
|
+
return false;
|
|
1352
|
+
}
|
|
1353
|
+
return typeof value.callee === "string" && typeof value.importPath === "string" && isRecord2(value.params) && Object.values(value.params).every(isEffectClipboardParam);
|
|
1354
|
+
};
|
|
1355
|
+
var parseEffectClipboardDataResult = (value) => {
|
|
1356
|
+
try {
|
|
1357
|
+
const parsed = JSON.parse(value);
|
|
1358
|
+
if (!isRecord2(parsed)) {
|
|
1359
|
+
return { status: "invalid" };
|
|
1360
|
+
}
|
|
1361
|
+
if (parsed.remotionClipboard !== "effects") {
|
|
1362
|
+
return { status: "invalid" };
|
|
1363
|
+
}
|
|
1364
|
+
if (parsed.version !== 3) {
|
|
1365
|
+
return {
|
|
1366
|
+
status: "unsupported-version",
|
|
1367
|
+
version: parsed.version
|
|
1368
|
+
};
|
|
1369
|
+
}
|
|
1370
|
+
if (parsed.type !== "effects-additive" && parsed.type !== "effects-replacing") {
|
|
1371
|
+
return { status: "invalid" };
|
|
1372
|
+
}
|
|
1373
|
+
if (!Array.isArray(parsed.effects)) {
|
|
1374
|
+
return { status: "invalid" };
|
|
1375
|
+
}
|
|
1376
|
+
const effects = [];
|
|
1377
|
+
for (const effect of parsed.effects) {
|
|
1378
|
+
if (!isEffectClipboardSnapshotV3(effect)) {
|
|
1379
|
+
return { status: "invalid" };
|
|
1380
|
+
}
|
|
1381
|
+
effects.push(normalizeSnapshot(effect));
|
|
1382
|
+
}
|
|
1383
|
+
return {
|
|
1384
|
+
status: "valid",
|
|
1385
|
+
data: {
|
|
1386
|
+
type: parsed.type,
|
|
1387
|
+
version: 3,
|
|
1388
|
+
remotionClipboard: "effects",
|
|
1389
|
+
effects
|
|
1390
|
+
}
|
|
1391
|
+
};
|
|
1392
|
+
} catch {
|
|
1393
|
+
return { status: "invalid" };
|
|
1394
|
+
}
|
|
1395
|
+
};
|
|
1396
|
+
var parseEffectClipboardData = (value) => {
|
|
1397
|
+
const result = parseEffectClipboardDataResult(value);
|
|
1398
|
+
if (result.status !== "valid") {
|
|
1399
|
+
return null;
|
|
1400
|
+
}
|
|
1401
|
+
return result.data;
|
|
1402
|
+
};
|
|
1403
|
+
var parseEffectPropClipboardDataResult = (value) => {
|
|
1404
|
+
try {
|
|
1405
|
+
const parsed = JSON.parse(value);
|
|
1406
|
+
if (!isRecord2(parsed)) {
|
|
1407
|
+
return { status: "invalid" };
|
|
1408
|
+
}
|
|
1409
|
+
if (parsed.remotionClipboard !== "effect-prop") {
|
|
1410
|
+
return { status: "invalid" };
|
|
1411
|
+
}
|
|
1412
|
+
if (parsed.version !== 1) {
|
|
1413
|
+
return {
|
|
1414
|
+
status: "unsupported-version",
|
|
1415
|
+
version: parsed.version
|
|
1416
|
+
};
|
|
1417
|
+
}
|
|
1418
|
+
if (parsed.type !== "effect-prop") {
|
|
1419
|
+
return { status: "invalid" };
|
|
1420
|
+
}
|
|
1421
|
+
if (!isRecord2(parsed.effect)) {
|
|
1422
|
+
return { status: "invalid" };
|
|
1423
|
+
}
|
|
1424
|
+
if (typeof parsed.effect.callee !== "string" || typeof parsed.effect.importPath !== "string") {
|
|
1425
|
+
return { status: "invalid" };
|
|
1426
|
+
}
|
|
1427
|
+
if (typeof parsed.key !== "string") {
|
|
1428
|
+
return { status: "invalid" };
|
|
1429
|
+
}
|
|
1430
|
+
if (!isEffectClipboardParam(parsed.param)) {
|
|
1431
|
+
return { status: "invalid" };
|
|
1432
|
+
}
|
|
1433
|
+
return {
|
|
1434
|
+
status: "valid",
|
|
1435
|
+
data: {
|
|
1436
|
+
type: "effect-prop",
|
|
1437
|
+
version: 1,
|
|
1438
|
+
remotionClipboard: "effect-prop",
|
|
1439
|
+
effect: {
|
|
1440
|
+
callee: parsed.effect.callee,
|
|
1441
|
+
importPath: parsed.effect.importPath
|
|
1442
|
+
},
|
|
1443
|
+
key: parsed.key,
|
|
1444
|
+
param: normalizeParam(parsed.param)
|
|
1445
|
+
}
|
|
1446
|
+
};
|
|
1447
|
+
} catch {
|
|
1448
|
+
return { status: "invalid" };
|
|
1449
|
+
}
|
|
1450
|
+
};
|
|
1451
|
+
var parseEffectPropClipboardData = (value) => {
|
|
1452
|
+
const result = parseEffectPropClipboardDataResult(value);
|
|
1453
|
+
if (result.status !== "valid") {
|
|
1454
|
+
return null;
|
|
1455
|
+
}
|
|
1456
|
+
return result.data;
|
|
1457
|
+
};
|
|
1458
|
+
// src/format-bytes.ts
|
|
1459
|
+
var BYTE_UNITS = ["B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"];
|
|
1460
|
+
var BIBYTE_UNITS = [
|
|
1461
|
+
"B",
|
|
1462
|
+
"kiB",
|
|
1463
|
+
"MiB",
|
|
1464
|
+
"GiB",
|
|
1465
|
+
"TiB",
|
|
1466
|
+
"PiB",
|
|
1467
|
+
"EiB",
|
|
1468
|
+
"ZiB",
|
|
1469
|
+
"YiB"
|
|
1470
|
+
];
|
|
1471
|
+
var BIT_UNITS = [
|
|
1472
|
+
"b",
|
|
1473
|
+
"kbit",
|
|
1474
|
+
"Mbit",
|
|
1475
|
+
"Gbit",
|
|
1476
|
+
"Tbit",
|
|
1477
|
+
"Pbit",
|
|
1478
|
+
"Ebit",
|
|
1479
|
+
"Zbit",
|
|
1480
|
+
"Ybit"
|
|
1481
|
+
];
|
|
1482
|
+
var BIBIT_UNITS = [
|
|
1483
|
+
"b",
|
|
1484
|
+
"kibit",
|
|
1485
|
+
"Mibit",
|
|
1486
|
+
"Gibit",
|
|
1487
|
+
"Tibit",
|
|
1488
|
+
"Pibit",
|
|
1489
|
+
"Eibit",
|
|
1490
|
+
"Zibit",
|
|
1491
|
+
"Yibit"
|
|
1492
|
+
];
|
|
1493
|
+
var toLocaleString = (number, locale, options) => {
|
|
1494
|
+
if (typeof locale === "string" || Array.isArray(locale)) {
|
|
1495
|
+
return number.toLocaleString(locale, options);
|
|
1496
|
+
}
|
|
1497
|
+
if (locale === true || options !== undefined) {
|
|
1498
|
+
return number.toLocaleString(undefined, options);
|
|
1499
|
+
}
|
|
1500
|
+
return String(number);
|
|
1501
|
+
};
|
|
1502
|
+
var formatBytes = (number, options = {
|
|
1503
|
+
locale: "en-US",
|
|
1504
|
+
signed: false,
|
|
1505
|
+
maximumFractionDigits: 1
|
|
1506
|
+
}) => {
|
|
1507
|
+
if (!Number.isFinite(number)) {
|
|
1508
|
+
throw new TypeError(`Expected a finite number, got ${typeof number}: ${number}`);
|
|
1509
|
+
}
|
|
1510
|
+
options = { bits: false, binary: false, ...options };
|
|
1511
|
+
const UNITS = options.bits ? options.binary ? BIBIT_UNITS : BIT_UNITS : options.binary ? BIBYTE_UNITS : BYTE_UNITS;
|
|
1512
|
+
if (options.signed && number === 0) {
|
|
1513
|
+
return `0 $ {
|
|
1514
|
+
UNITS[0]
|
|
1515
|
+
}`;
|
|
1516
|
+
}
|
|
1517
|
+
const isNegative = number < 0;
|
|
1518
|
+
const prefix = isNegative ? "-" : options.signed ? "+" : "";
|
|
1519
|
+
if (isNegative) {
|
|
1520
|
+
number = -number;
|
|
1521
|
+
}
|
|
1522
|
+
let localeOptions;
|
|
1523
|
+
if (options.minimumFractionDigits !== undefined) {
|
|
1524
|
+
localeOptions = {
|
|
1525
|
+
minimumFractionDigits: options.minimumFractionDigits
|
|
1526
|
+
};
|
|
1527
|
+
}
|
|
1528
|
+
if (options.maximumFractionDigits !== undefined) {
|
|
1529
|
+
localeOptions = {
|
|
1530
|
+
maximumFractionDigits: options.maximumFractionDigits,
|
|
1531
|
+
...localeOptions
|
|
1532
|
+
};
|
|
1533
|
+
}
|
|
1534
|
+
if (number < 1) {
|
|
1535
|
+
const numString = toLocaleString(number, options.locale, localeOptions);
|
|
1536
|
+
return prefix + numString + " " + UNITS[0];
|
|
1537
|
+
}
|
|
1538
|
+
const exponent = Math.min(Math.floor(options.binary ? Math.log(number) / Math.log(1024) : Math.log10(number) / 3), UNITS.length - 1);
|
|
1539
|
+
number /= (options.binary ? 1024 : 1000) ** exponent;
|
|
1540
|
+
const numberString = toLocaleString(Number(number), options.locale, localeOptions);
|
|
1541
|
+
const unit = UNITS[exponent];
|
|
1542
|
+
return prefix + numberString + " " + unit;
|
|
1543
|
+
};
|
|
1544
|
+
// src/get-all-keys.ts
|
|
1545
|
+
import { Internals } from "remotion";
|
|
1546
|
+
var getAllSchemaKeys = (schema) => {
|
|
1547
|
+
return Object.keys(Internals.getFlatSchemaWithAllKeys(schema));
|
|
1548
|
+
};
|
|
1549
|
+
var getAssetSchemaKeys = (schema) => {
|
|
1550
|
+
return Object.entries(Internals.getFlatSchemaWithAllKeys(schema)).filter(([, field]) => field?.type === "asset").map(([key]) => key);
|
|
1551
|
+
};
|
|
1552
|
+
// src/get-default-out-name.ts
|
|
1553
|
+
var hasFileExtension = (location) => {
|
|
1554
|
+
const lastSegment = location.split("/").pop() ?? location;
|
|
1555
|
+
return lastSegment.includes(".");
|
|
1556
|
+
};
|
|
1557
|
+
var getDefaultOutLocation = ({
|
|
1558
|
+
compositionName,
|
|
1559
|
+
defaultExtension,
|
|
1560
|
+
type,
|
|
1561
|
+
compositionDefaultOutName,
|
|
1562
|
+
outputLocation
|
|
1563
|
+
}) => {
|
|
1564
|
+
if (outputLocation && hasFileExtension(outputLocation)) {
|
|
1565
|
+
return outputLocation;
|
|
1566
|
+
}
|
|
1567
|
+
const base = outputLocation ?? "out";
|
|
1568
|
+
const dir = base.endsWith("/") ? base : `${base}/`;
|
|
1569
|
+
const nameToUse = compositionDefaultOutName ?? compositionName;
|
|
1570
|
+
if (type === "sequence") {
|
|
1571
|
+
return `${dir}${nameToUse}`;
|
|
1572
|
+
}
|
|
1573
|
+
return `${dir}${nameToUse}.${defaultExtension}`;
|
|
1574
|
+
};
|
|
1575
|
+
// src/get-location-from-build-error.ts
|
|
1576
|
+
import { NoReactInternals } from "remotion/no-react";
|
|
1577
|
+
var getLocationFromBuildError = (err) => {
|
|
1578
|
+
if (!err.stack) {
|
|
1579
|
+
return null;
|
|
1580
|
+
}
|
|
1581
|
+
if (!err.stack.startsWith("Error: Module build failed") && !err.stack.startsWith("Error: Cannot find module")) {
|
|
1582
|
+
return null;
|
|
1583
|
+
}
|
|
1584
|
+
const split = err.stack.split(`
|
|
1585
|
+
`);
|
|
1586
|
+
return split.map((s) => {
|
|
1587
|
+
if (s.startsWith("Error")) {
|
|
1588
|
+
return null;
|
|
1589
|
+
}
|
|
1590
|
+
const matchWebpackOrEsbuild = s.match(/(.*):([0-9]+):([0-9]+): (.*)/);
|
|
1591
|
+
if (matchWebpackOrEsbuild) {
|
|
1592
|
+
return {
|
|
1593
|
+
fileName: matchWebpackOrEsbuild[1],
|
|
1594
|
+
lineNumber: Number(matchWebpackOrEsbuild[2]),
|
|
1595
|
+
columnNumber: Number(matchWebpackOrEsbuild[3]),
|
|
1596
|
+
message: matchWebpackOrEsbuild[4]
|
|
1597
|
+
};
|
|
1598
|
+
}
|
|
1599
|
+
const matchMissingModule = s.match(/\s+at(.*)\s\((.*)\)/);
|
|
1600
|
+
if (!matchMissingModule) {
|
|
1601
|
+
return null;
|
|
1602
|
+
}
|
|
1603
|
+
if (s.includes("webpackMissingModule")) {
|
|
1604
|
+
return null;
|
|
1605
|
+
}
|
|
1606
|
+
const [, filename] = matchMissingModule;
|
|
1607
|
+
return {
|
|
1608
|
+
columnNumber: 0,
|
|
1609
|
+
lineNumber: 1,
|
|
1610
|
+
message: split[0],
|
|
1611
|
+
fileName: filename.trim()
|
|
1612
|
+
};
|
|
1613
|
+
}).filter(NoReactInternals.truthy)[0] ?? null;
|
|
1614
|
+
};
|
|
1615
|
+
// src/get-project-name.ts
|
|
1616
|
+
var getProjectName = ({
|
|
1617
|
+
gitSource,
|
|
1618
|
+
resolvedRemotionRoot,
|
|
1619
|
+
basename
|
|
1620
|
+
}) => {
|
|
1621
|
+
if (!gitSource) {
|
|
1622
|
+
return basename(resolvedRemotionRoot);
|
|
1623
|
+
}
|
|
1624
|
+
if (gitSource.relativeFromGitRoot.trim()) {
|
|
1625
|
+
return basename(gitSource.relativeFromGitRoot.trim());
|
|
1626
|
+
}
|
|
1627
|
+
return gitSource.name;
|
|
1628
|
+
};
|
|
1629
|
+
// src/hot-middleware.ts
|
|
1630
|
+
var hotMiddlewareOptions = {
|
|
1631
|
+
timeout: 20 * 1000,
|
|
1632
|
+
reload: true,
|
|
1633
|
+
warn: true
|
|
1634
|
+
};
|
|
1635
|
+
// src/keyframe-clipboard-data.ts
|
|
1636
|
+
var KEYFRAME_CLIPBOARD_FIELD_TYPE_SUPPORT = {
|
|
1637
|
+
array: false,
|
|
1638
|
+
asset: false,
|
|
1639
|
+
boolean: false,
|
|
1640
|
+
"remotion-captions": false,
|
|
1641
|
+
color: true,
|
|
1642
|
+
enum: false,
|
|
1643
|
+
"font-family": false,
|
|
1644
|
+
hidden: false,
|
|
1645
|
+
number: true,
|
|
1646
|
+
"rotation-css": true,
|
|
1647
|
+
"rotation-degrees": true,
|
|
1648
|
+
scale: true,
|
|
1649
|
+
"text-content": false,
|
|
1650
|
+
"transform-origin": true,
|
|
1651
|
+
translate: true,
|
|
1652
|
+
"uv-coordinate": true
|
|
1653
|
+
};
|
|
1654
|
+
var isRecord3 = (value) => {
|
|
1655
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
1656
|
+
};
|
|
1657
|
+
var isKeyframeClipboardFieldType = (value) => {
|
|
1658
|
+
return typeof value === "string" && Object.hasOwn(KEYFRAME_CLIPBOARD_FIELD_TYPE_SUPPORT, value) && KEYFRAME_CLIPBOARD_FIELD_TYPE_SUPPORT[value];
|
|
1659
|
+
};
|
|
1660
|
+
var isKeyframeClipboardEntry = (value) => {
|
|
1661
|
+
return isRecord3(value) && Number.isInteger(value.frameOffset) && Object.hasOwn(value, "value");
|
|
1662
|
+
};
|
|
1663
|
+
var areValidKeyframes = (value) => {
|
|
1664
|
+
if (!Array.isArray(value) || value.length === 0) {
|
|
1665
|
+
return false;
|
|
1666
|
+
}
|
|
1667
|
+
let previousOffset = -1;
|
|
1668
|
+
for (const keyframe of value) {
|
|
1669
|
+
if (!isKeyframeClipboardEntry(keyframe) || keyframe.frameOffset <= previousOffset) {
|
|
1670
|
+
return false;
|
|
1671
|
+
}
|
|
1672
|
+
previousOffset = keyframe.frameOffset;
|
|
1673
|
+
}
|
|
1674
|
+
return value[0]?.frameOffset === 0;
|
|
1675
|
+
};
|
|
1676
|
+
var isKeyframeClipboardField = (value) => {
|
|
1677
|
+
return isRecord3(value) && (value.type === "sequence" || value.type === "effect") && typeof value.fieldKey === "string";
|
|
1678
|
+
};
|
|
1679
|
+
var parseEasings = ({
|
|
1680
|
+
value,
|
|
1681
|
+
keyframeCount
|
|
1682
|
+
}) => {
|
|
1683
|
+
if (Array.isArray(value) && value.length === Math.max(0, keyframeCount - 1) && value.every(isKeyframeEasing)) {
|
|
1684
|
+
return value.map(normalizeKeyframeEasing);
|
|
1685
|
+
}
|
|
1686
|
+
return null;
|
|
1687
|
+
};
|
|
1688
|
+
var parseKeyframeClipboardDataResult = (value) => {
|
|
1689
|
+
try {
|
|
1690
|
+
const parsed = JSON.parse(value);
|
|
1691
|
+
if (!isRecord3(parsed) || parsed.remotionClipboard !== "keyframe") {
|
|
1692
|
+
return { status: "invalid" };
|
|
1693
|
+
}
|
|
1694
|
+
if (parsed.version !== 1) {
|
|
1695
|
+
return { status: "unsupported-version", version: parsed.version };
|
|
1696
|
+
}
|
|
1697
|
+
const easing = parseEasings({
|
|
1698
|
+
value: parsed.easing,
|
|
1699
|
+
keyframeCount: Array.isArray(parsed.keyframes) ? parsed.keyframes.length : 0
|
|
1700
|
+
});
|
|
1701
|
+
if (parsed.type !== "keyframe" || !areValidKeyframes(parsed.keyframes) || easing === null || parsed.field !== null && !isKeyframeClipboardField(parsed.field) || parsed.fieldType !== null && !isKeyframeClipboardFieldType(parsed.fieldType)) {
|
|
1702
|
+
return { status: "invalid" };
|
|
1703
|
+
}
|
|
1704
|
+
return {
|
|
1705
|
+
status: "valid",
|
|
1706
|
+
data: {
|
|
1707
|
+
type: "keyframe",
|
|
1708
|
+
version: 1,
|
|
1709
|
+
remotionClipboard: "keyframe",
|
|
1710
|
+
fieldType: parsed.fieldType,
|
|
1711
|
+
field: parsed.field,
|
|
1712
|
+
keyframes: parsed.keyframes,
|
|
1713
|
+
easing
|
|
1714
|
+
}
|
|
1715
|
+
};
|
|
1716
|
+
} catch {
|
|
1717
|
+
return { status: "invalid" };
|
|
1718
|
+
}
|
|
1719
|
+
};
|
|
1720
|
+
var parseKeyframeClipboardData = (value) => {
|
|
1721
|
+
const result = parseKeyframeClipboardDataResult(value);
|
|
1722
|
+
return result.status === "valid" ? result.data : null;
|
|
1723
|
+
};
|
|
1724
|
+
// src/keyframe-easing-presets.ts
|
|
1725
|
+
var LINEAR_KEYFRAME_EASING = { type: "linear" };
|
|
1726
|
+
var EASE_KEYFRAME_EASING = {
|
|
1727
|
+
type: "bezier",
|
|
1728
|
+
x1: 0.42,
|
|
1729
|
+
y1: 0,
|
|
1730
|
+
x2: 1,
|
|
1731
|
+
y2: 1
|
|
1732
|
+
};
|
|
1733
|
+
var QUAD_KEYFRAME_EASING = {
|
|
1734
|
+
type: "bezier",
|
|
1735
|
+
x1: 1 / 3,
|
|
1736
|
+
y1: 0,
|
|
1737
|
+
x2: 2 / 3,
|
|
1738
|
+
y2: 1 / 3
|
|
1739
|
+
};
|
|
1740
|
+
var CUBIC_KEYFRAME_EASING = {
|
|
1741
|
+
type: "bezier",
|
|
1742
|
+
x1: 1 / 3,
|
|
1743
|
+
y1: 0,
|
|
1744
|
+
x2: 2 / 3,
|
|
1745
|
+
y2: 0
|
|
1746
|
+
};
|
|
1747
|
+
var getBackKeyframeEasing = (s = 1.70158) => ({
|
|
1748
|
+
type: "bezier",
|
|
1749
|
+
x1: 1 / 3,
|
|
1750
|
+
y1: 0,
|
|
1751
|
+
x2: 2 / 3,
|
|
1752
|
+
y2: -s / 3
|
|
1753
|
+
});
|
|
1754
|
+
var getPolyKeyframeEasing = (n) => {
|
|
1755
|
+
if (n === 1) {
|
|
1756
|
+
return LINEAR_KEYFRAME_EASING;
|
|
1757
|
+
}
|
|
1758
|
+
if (n === 2) {
|
|
1759
|
+
return QUAD_KEYFRAME_EASING;
|
|
1760
|
+
}
|
|
1761
|
+
if (n === 3) {
|
|
1762
|
+
return CUBIC_KEYFRAME_EASING;
|
|
1763
|
+
}
|
|
1764
|
+
return null;
|
|
1765
|
+
};
|
|
1766
|
+
var getOutKeyframeEasing = (easing) => {
|
|
1767
|
+
if (easing.type === "linear") {
|
|
1768
|
+
return LINEAR_KEYFRAME_EASING;
|
|
1769
|
+
}
|
|
1770
|
+
if (easing.type !== "bezier") {
|
|
1771
|
+
return null;
|
|
1772
|
+
}
|
|
1773
|
+
return {
|
|
1774
|
+
type: "bezier",
|
|
1775
|
+
x1: 1 - easing.x2,
|
|
1776
|
+
y1: 1 - easing.y2,
|
|
1777
|
+
x2: 1 - easing.x1,
|
|
1778
|
+
y2: 1 - easing.y1
|
|
1779
|
+
};
|
|
1780
|
+
};
|
|
1781
|
+
var KEYFRAME_EASING_PRESETS = [
|
|
1782
|
+
{
|
|
1783
|
+
id: "ease-in",
|
|
1784
|
+
label: "Ease in",
|
|
1785
|
+
easing: { type: "bezier", x1: 0.42, y1: 0, x2: 1, y2: 1 }
|
|
1786
|
+
},
|
|
1787
|
+
{
|
|
1788
|
+
id: "ease-out",
|
|
1789
|
+
label: "Ease out",
|
|
1790
|
+
easing: { type: "bezier", x1: 0, y1: 0, x2: 0.58, y2: 1 }
|
|
1791
|
+
},
|
|
1792
|
+
{
|
|
1793
|
+
id: "ease-in-out",
|
|
1794
|
+
label: "Ease in-out",
|
|
1795
|
+
easing: { type: "bezier", x1: 0.42, y1: 0, x2: 0.58, y2: 1 }
|
|
1796
|
+
},
|
|
1797
|
+
{
|
|
1798
|
+
id: "tail-spring",
|
|
1799
|
+
label: "Tail spring",
|
|
1800
|
+
easing: {
|
|
1801
|
+
type: "spring",
|
|
1802
|
+
allowTail: true,
|
|
1803
|
+
damping: 200,
|
|
1804
|
+
durationRestThreshold: 0.02,
|
|
1805
|
+
mass: 1,
|
|
1806
|
+
overshootClamping: false,
|
|
1807
|
+
stiffness: 100
|
|
1808
|
+
}
|
|
1809
|
+
},
|
|
1810
|
+
{
|
|
1811
|
+
id: "spring",
|
|
1812
|
+
label: "Spring",
|
|
1813
|
+
easing: {
|
|
1814
|
+
type: "spring",
|
|
1815
|
+
allowTail: true,
|
|
1816
|
+
damping: 10,
|
|
1817
|
+
durationRestThreshold: 0.02,
|
|
1818
|
+
mass: 1,
|
|
1819
|
+
overshootClamping: false,
|
|
1820
|
+
stiffness: 100
|
|
1821
|
+
}
|
|
1822
|
+
},
|
|
1823
|
+
{
|
|
1824
|
+
id: "bouncy-spring",
|
|
1825
|
+
label: "Bouncy spring",
|
|
1826
|
+
easing: {
|
|
1827
|
+
type: "spring",
|
|
1828
|
+
allowTail: true,
|
|
1829
|
+
damping: 5,
|
|
1830
|
+
durationRestThreshold: 0.02,
|
|
1831
|
+
mass: 1,
|
|
1832
|
+
overshootClamping: false,
|
|
1833
|
+
stiffness: 120
|
|
1834
|
+
}
|
|
1835
|
+
}
|
|
1836
|
+
];
|
|
1837
|
+
// src/max-timeline-tracks.ts
|
|
1838
|
+
var DEFAULT_TIMELINE_TRACKS = 90;
|
|
1839
|
+
// src/package-info.ts
|
|
1840
|
+
import { VERSION } from "remotion";
|
|
1841
|
+
|
|
1842
|
+
// src/release-package-policy.ts
|
|
1843
|
+
var packagesRemovedInV5 = [
|
|
1844
|
+
"@remotion/light-leaks",
|
|
1845
|
+
"@remotion/media-parser",
|
|
1846
|
+
"@remotion/starburst",
|
|
1847
|
+
"@remotion/webcodecs"
|
|
1848
|
+
];
|
|
1849
|
+
var packagesRemovedInV5Set = new Set(packagesRemovedInV5);
|
|
1850
|
+
var shouldReleasePackage = ({
|
|
1851
|
+
packageName,
|
|
1852
|
+
releaseVersion
|
|
1853
|
+
}) => {
|
|
1854
|
+
const majorVersion = Number.parseInt(releaseVersion.split(".")[0], 10);
|
|
1855
|
+
if (!Number.isInteger(majorVersion)) {
|
|
1856
|
+
throw new Error(`Invalid release version: ${releaseVersion}`);
|
|
1857
|
+
}
|
|
1858
|
+
return majorVersion < 5 || !packagesRemovedInV5Set.has(packageName);
|
|
1859
|
+
};
|
|
1860
|
+
|
|
1861
|
+
// src/package-info.ts
|
|
1862
|
+
var allPackages = [
|
|
1863
|
+
"svg-3d-engine",
|
|
1864
|
+
"animation-utils",
|
|
1865
|
+
"animated-emoji",
|
|
1866
|
+
"astro-example",
|
|
1867
|
+
"babel-loader",
|
|
1868
|
+
"bugs",
|
|
1869
|
+
"brand",
|
|
1870
|
+
"bundler",
|
|
1871
|
+
"browser-studio",
|
|
1872
|
+
"claude-code-plugin",
|
|
1873
|
+
"cli",
|
|
1874
|
+
"cloudrun",
|
|
1875
|
+
"codex-plugin",
|
|
1876
|
+
"kimi-code-plugin",
|
|
1877
|
+
"compositor-darwin-arm64",
|
|
1878
|
+
"compositor-darwin-x64",
|
|
1879
|
+
"compositor-linux-arm64-gnu",
|
|
1880
|
+
"compositor-linux-arm64-musl",
|
|
1881
|
+
"compositor-linux-x64-gnu",
|
|
1882
|
+
"compositor-linux-x64-musl",
|
|
1883
|
+
"compositor-win32-x64-msvc",
|
|
1884
|
+
"core",
|
|
1885
|
+
"create-video",
|
|
1886
|
+
"discord-poster",
|
|
1887
|
+
"docusaurus-plugin",
|
|
1888
|
+
"docs",
|
|
1889
|
+
"enable-scss",
|
|
1890
|
+
"eslint-config",
|
|
1891
|
+
"eslint-config-flat",
|
|
1892
|
+
"eslint-config-internal",
|
|
1893
|
+
"eslint-plugin",
|
|
1894
|
+
"example-without-zod",
|
|
1895
|
+
"example",
|
|
1896
|
+
"fonts",
|
|
1897
|
+
"gif",
|
|
1898
|
+
"google-fonts",
|
|
1899
|
+
"install-whisper-cpp",
|
|
1900
|
+
"it-tests",
|
|
1901
|
+
"react18-tests",
|
|
1902
|
+
"lambda-go-example",
|
|
1903
|
+
"lambda-go",
|
|
1904
|
+
"lambda-php",
|
|
1905
|
+
"lambda-ruby",
|
|
1906
|
+
"lambda-python",
|
|
1907
|
+
"lambda",
|
|
1908
|
+
"lambda-client",
|
|
1909
|
+
"layout-utils",
|
|
1910
|
+
"rounded-text-box",
|
|
1911
|
+
"licensing",
|
|
1912
|
+
"lottie",
|
|
1913
|
+
"mcp",
|
|
1914
|
+
"media-utils",
|
|
1915
|
+
"motion-blur",
|
|
1916
|
+
"noise",
|
|
1917
|
+
"paths",
|
|
1918
|
+
"player-a11y",
|
|
1919
|
+
"player-example",
|
|
1920
|
+
"player",
|
|
1921
|
+
"preload",
|
|
1922
|
+
"renderer",
|
|
1923
|
+
"rive",
|
|
1924
|
+
"shapes",
|
|
1925
|
+
"skia",
|
|
1926
|
+
"promo-pages",
|
|
1927
|
+
"streaming",
|
|
1928
|
+
"serverless",
|
|
1929
|
+
"serverless-client",
|
|
1930
|
+
"skills",
|
|
1931
|
+
"skills-evals",
|
|
1932
|
+
"studio-codemods",
|
|
1933
|
+
"studio-server",
|
|
1934
|
+
"studio-shared",
|
|
1935
|
+
"studio",
|
|
1936
|
+
"tailwind",
|
|
1937
|
+
"tailwind-v4",
|
|
1938
|
+
"timeline-utils",
|
|
1939
|
+
"test-utils",
|
|
1940
|
+
"three",
|
|
1941
|
+
"transitions",
|
|
1942
|
+
"media-parser",
|
|
1943
|
+
"zod-types",
|
|
1944
|
+
"zod-types-v3",
|
|
1945
|
+
"webcodecs",
|
|
1946
|
+
"convert",
|
|
1947
|
+
"captions",
|
|
1948
|
+
"openai-whisper",
|
|
1949
|
+
"elevenlabs",
|
|
1950
|
+
"compositor",
|
|
1951
|
+
"example-videos",
|
|
1952
|
+
"whisper-web",
|
|
1953
|
+
"media",
|
|
1954
|
+
"remotion-media",
|
|
1955
|
+
"web-renderer",
|
|
1956
|
+
"design",
|
|
1957
|
+
"studio-protocol",
|
|
1958
|
+
"light-leaks",
|
|
1959
|
+
"rough-notation",
|
|
1960
|
+
"starburst",
|
|
1961
|
+
"vercel",
|
|
1962
|
+
"sfx",
|
|
1963
|
+
"effects"
|
|
1964
|
+
];
|
|
1965
|
+
var packages = allPackages.filter((pkg) => shouldReleasePackage({
|
|
1966
|
+
packageName: pkg === "core" ? "remotion" : `@remotion/${pkg}`,
|
|
1967
|
+
releaseVersion: VERSION
|
|
1968
|
+
}));
|
|
1969
|
+
var extraPackages = [
|
|
1970
|
+
{
|
|
1971
|
+
name: "mediabunny",
|
|
1972
|
+
version: "1.50.8",
|
|
1973
|
+
description: "Multimedia library used by Remotion",
|
|
1974
|
+
docsUrl: "https://www.remotion.dev/docs/mediabunny/version"
|
|
1975
|
+
},
|
|
1976
|
+
{
|
|
1977
|
+
name: "@mediabunny/ac3",
|
|
1978
|
+
version: "1.50.8",
|
|
1979
|
+
description: "AC-3 and E-AC-3 audio codec support for Mediabunny",
|
|
1980
|
+
docsUrl: "https://www.remotion.dev/docs/mediabunny/formats#ac-3-and-e-ac-3"
|
|
1981
|
+
},
|
|
1982
|
+
{
|
|
1983
|
+
name: "@mediabunny/prores",
|
|
1984
|
+
version: "1.50.8",
|
|
1985
|
+
description: "Apple ProRes decoder support for Mediabunny",
|
|
1986
|
+
docsUrl: "https://www.remotion.dev/docs/mediabunny/formats"
|
|
1987
|
+
},
|
|
1988
|
+
{
|
|
1989
|
+
name: "zod",
|
|
1990
|
+
version: "4.4.3",
|
|
1991
|
+
description: "TypeScript-first schema validation",
|
|
1992
|
+
docsUrl: "https://zod.dev"
|
|
1993
|
+
}
|
|
1994
|
+
];
|
|
1995
|
+
var descriptions = {
|
|
1996
|
+
compositor: "Rust binary for Remotion",
|
|
1997
|
+
player: "React component for embedding a Remotion preview into your app",
|
|
1998
|
+
cloudrun: "Render Remotion videos on Google Cloud Run",
|
|
1999
|
+
"claude-code-plugin": null,
|
|
2000
|
+
"codex-plugin": null,
|
|
2001
|
+
"kimi-code-plugin": null,
|
|
2002
|
+
renderer: "Render Remotion videos using Node.js or Bun",
|
|
2003
|
+
cli: "Control Remotion features using the `npx remotion` command",
|
|
2004
|
+
core: "Make videos programmatically",
|
|
2005
|
+
lambda: "Render Remotion videos on AWS Lambda",
|
|
2006
|
+
bundler: "Bundle Remotion compositions using Webpack",
|
|
2007
|
+
"browser-studio": "Run Remotion Studio in the browser",
|
|
2008
|
+
"studio-codemods": "Shared codemods for Remotion Studio",
|
|
2009
|
+
"studio-server": "Run a Remotion Studio with a server backend",
|
|
2010
|
+
"install-whisper-cpp": "Helpers for installing and using Whisper.cpp",
|
|
2011
|
+
"whisper-web": "Helpers for using Whisper.cpp in browser using WASM",
|
|
2012
|
+
"google-fonts": "Use Google Fonts in Remotion",
|
|
2013
|
+
mcp: "Remotion's Model Context Protocol",
|
|
2014
|
+
"media-utils": "Utilities for working with media files",
|
|
2015
|
+
lottie: "Include Lottie animations in Remotion",
|
|
2016
|
+
licensing: "Manage your Remotion.pro license",
|
|
2017
|
+
"layout-utils": "Utilities for working with layouts",
|
|
2018
|
+
"rounded-text-box": "Create a TikTok-like multiline text box SVG path with rounded corners",
|
|
2019
|
+
noise: "Noise generation functions",
|
|
2020
|
+
"motion-blur": "Motion blur effect for Remotion",
|
|
2021
|
+
preload: "Preloads assets for use in Remotion",
|
|
2022
|
+
shapes: "Generate SVG shapes",
|
|
2023
|
+
"zod-types": "Zod types for Remotion",
|
|
2024
|
+
"zod-types-v3": "Zod 3.22.3 types for Remotion",
|
|
2025
|
+
gif: "Embed GIFs in a Remotion video",
|
|
2026
|
+
"eslint-plugin": "Rules for writing Remotion code",
|
|
2027
|
+
"eslint-config": "Default configuration for Remotion templates (ESLint <= 8)",
|
|
2028
|
+
"eslint-config-flat": "Default configuration for Remotion templates (ESLint >= 9)",
|
|
2029
|
+
"compositor-linux-x64-gnu": "Linux x64 binary for the Remotion Rust code",
|
|
2030
|
+
"compositor-linux-x64-musl": "Linux x64 binary for the Remotion Rust code",
|
|
2031
|
+
"compositor-darwin-x64": "MacOS x64 binary for the Remotion Rust code",
|
|
2032
|
+
"compositor-darwin-arm64": "MacOS Apple Silicon binary for the Remotion Rust code",
|
|
2033
|
+
"compositor-linux-arm64-gnu": "Linux ARM64 binary for the Remotion Rust code",
|
|
2034
|
+
"compositor-linux-arm64-musl": "Linux ARM64 binary for the Remotion Rust code",
|
|
2035
|
+
"babel-loader": "Babel loader for Remotion",
|
|
2036
|
+
fonts: "Helpers for loading local fonts into Remotion",
|
|
2037
|
+
transitions: "Library for creating transitions in Remotion",
|
|
2038
|
+
"enable-scss": "Enable SCSS support in Remotion",
|
|
2039
|
+
"create-video": "Create a new Remotion project",
|
|
2040
|
+
"studio-shared": "Internal package for shared objects between the Studio backend and frontend",
|
|
2041
|
+
"timeline-utils": "Internal utilities for rendering Remotion timelines",
|
|
2042
|
+
tailwind: "Enable TailwindCSS support in Remotion (TailwindCSS v3)",
|
|
2043
|
+
"tailwind-v4": "Enable TailwindCSS support in Remotion (TailwindCSS v4)",
|
|
2044
|
+
streaming: "Utilities for streaming data between programs",
|
|
2045
|
+
"media-parser": "A pure JavaScript library for parsing video files",
|
|
2046
|
+
rive: "Embed Rive animations in a Remotion video",
|
|
2047
|
+
paths: "Utilities for working with SVG paths",
|
|
2048
|
+
studio: "APIs for interacting with the Remotion Studio",
|
|
2049
|
+
skia: "Include React Native Skia components in a Remotion video",
|
|
2050
|
+
three: "Include React Three Fiber components in a Remotion video",
|
|
2051
|
+
"astro-example": null,
|
|
2052
|
+
"lambda-go-example": null,
|
|
2053
|
+
"compositor-win32-x64-msvc": null,
|
|
2054
|
+
"animation-utils": "Helpers for animating CSS properties",
|
|
2055
|
+
"test-utils": null,
|
|
2056
|
+
"example-without-zod": null,
|
|
2057
|
+
"lambda-go": null,
|
|
2058
|
+
example: null,
|
|
2059
|
+
"lambda-php": null,
|
|
2060
|
+
"lambda-client": null,
|
|
2061
|
+
bugs: null,
|
|
2062
|
+
brand: null,
|
|
2063
|
+
docs: null,
|
|
2064
|
+
"it-tests": null,
|
|
2065
|
+
"react18-tests": null,
|
|
2066
|
+
"lambda-python": null,
|
|
2067
|
+
"lambda-ruby": null,
|
|
2068
|
+
"player-example": null,
|
|
2069
|
+
skills: null,
|
|
2070
|
+
"skills-evals": null,
|
|
2071
|
+
"discord-poster": null,
|
|
2072
|
+
"docusaurus-plugin": null,
|
|
2073
|
+
"animated-emoji": "Google Fonts Animated Emojis as Remotion components",
|
|
2074
|
+
serverless: "A runtime for distributed rendering",
|
|
2075
|
+
webcodecs: "Media conversion in the browser",
|
|
2076
|
+
convert: "Video conversion tool - convert.remotion.dev",
|
|
2077
|
+
captions: "Primitives for dealing with captions",
|
|
2078
|
+
"openai-whisper": "Work with the output of the OpenAI Whisper API",
|
|
2079
|
+
elevenlabs: "Work with the output of the ElevenLabs API",
|
|
2080
|
+
"eslint-config-internal": "ESLint condig for Remotion's internal packages",
|
|
2081
|
+
"example-videos": null,
|
|
2082
|
+
"promo-pages": null,
|
|
2083
|
+
"svg-3d-engine": "3D SVG extrusion effects",
|
|
2084
|
+
"serverless-client": null,
|
|
2085
|
+
media: "Experimental WebCodecs-based media tags",
|
|
2086
|
+
"remotion-media": null,
|
|
2087
|
+
"web-renderer": "Render videos in the browser",
|
|
2088
|
+
design: "Design system",
|
|
2089
|
+
"studio-protocol": "Create Element payloads and request installation into Remotion Studio",
|
|
2090
|
+
"light-leaks": "Light leak effects for Remotion",
|
|
2091
|
+
"rough-notation": "Rough annotation primitives for Remotion",
|
|
2092
|
+
"player-a11y": "Internal accessibility wrapper around @remotion/player",
|
|
2093
|
+
starburst: "Starburst ray effect for Remotion",
|
|
2094
|
+
vercel: "Render Remotion videos on Vercel Sandbox",
|
|
2095
|
+
sfx: "Sound effect library",
|
|
2096
|
+
effects: "Effects that can be applied to Remotion-based canvas components"
|
|
2097
|
+
};
|
|
2098
|
+
var installableMap = {
|
|
2099
|
+
"svg-3d-engine": false,
|
|
2100
|
+
"animation-utils": true,
|
|
2101
|
+
"animated-emoji": true,
|
|
2102
|
+
"astro-example": false,
|
|
2103
|
+
"babel-loader": false,
|
|
2104
|
+
bugs: false,
|
|
2105
|
+
brand: false,
|
|
2106
|
+
bundler: false,
|
|
2107
|
+
"browser-studio": false,
|
|
2108
|
+
cli: false,
|
|
2109
|
+
cloudrun: true,
|
|
2110
|
+
"claude-code-plugin": false,
|
|
2111
|
+
"codex-plugin": false,
|
|
2112
|
+
"kimi-code-plugin": false,
|
|
2113
|
+
"lambda-client": false,
|
|
2114
|
+
"serverless-client": false,
|
|
2115
|
+
"compositor-darwin-arm64": false,
|
|
2116
|
+
"compositor-darwin-x64": false,
|
|
2117
|
+
"compositor-linux-arm64-gnu": false,
|
|
2118
|
+
"compositor-linux-arm64-musl": false,
|
|
2119
|
+
"compositor-linux-x64-gnu": false,
|
|
2120
|
+
"compositor-linux-x64-musl": false,
|
|
2121
|
+
"compositor-win32-x64-msvc": false,
|
|
2122
|
+
core: false,
|
|
2123
|
+
"create-video": false,
|
|
2124
|
+
"discord-poster": false,
|
|
2125
|
+
"docusaurus-plugin": false,
|
|
2126
|
+
docs: false,
|
|
2127
|
+
"enable-scss": true,
|
|
2128
|
+
"eslint-config": false,
|
|
2129
|
+
"eslint-config-flat": false,
|
|
2130
|
+
"eslint-config-internal": false,
|
|
2131
|
+
"eslint-plugin": false,
|
|
2132
|
+
"example-without-zod": false,
|
|
2133
|
+
example: false,
|
|
2134
|
+
fonts: true,
|
|
2135
|
+
gif: true,
|
|
2136
|
+
"google-fonts": true,
|
|
2137
|
+
"install-whisper-cpp": true,
|
|
2138
|
+
"whisper-web": true,
|
|
2139
|
+
"it-tests": false,
|
|
2140
|
+
"react18-tests": false,
|
|
2141
|
+
"lambda-go-example": false,
|
|
2142
|
+
"lambda-go": false,
|
|
2143
|
+
"lambda-php": false,
|
|
2144
|
+
"lambda-ruby": false,
|
|
2145
|
+
"lambda-python": false,
|
|
2146
|
+
lambda: true,
|
|
2147
|
+
mcp: true,
|
|
2148
|
+
"layout-utils": true,
|
|
2149
|
+
"rounded-text-box": true,
|
|
2150
|
+
licensing: true,
|
|
2151
|
+
lottie: true,
|
|
2152
|
+
"media-utils": true,
|
|
2153
|
+
"motion-blur": true,
|
|
2154
|
+
noise: true,
|
|
2155
|
+
paths: true,
|
|
2156
|
+
"player-example": false,
|
|
2157
|
+
"player-a11y": false,
|
|
2158
|
+
player: true,
|
|
2159
|
+
preload: true,
|
|
2160
|
+
renderer: true,
|
|
2161
|
+
rive: true,
|
|
2162
|
+
shapes: true,
|
|
2163
|
+
skia: true,
|
|
2164
|
+
skills: false,
|
|
2165
|
+
"skills-evals": false,
|
|
2166
|
+
"promo-pages": false,
|
|
2167
|
+
streaming: false,
|
|
2168
|
+
serverless: false,
|
|
2169
|
+
"studio-codemods": false,
|
|
2170
|
+
"studio-server": false,
|
|
2171
|
+
"studio-shared": false,
|
|
2172
|
+
studio: true,
|
|
2173
|
+
tailwind: true,
|
|
2174
|
+
"tailwind-v4": true,
|
|
2175
|
+
"timeline-utils": false,
|
|
2176
|
+
"test-utils": false,
|
|
2177
|
+
three: true,
|
|
2178
|
+
transitions: true,
|
|
2179
|
+
"media-parser": shouldReleasePackage({
|
|
2180
|
+
packageName: "@remotion/media-parser",
|
|
2181
|
+
releaseVersion: VERSION
|
|
2182
|
+
}),
|
|
2183
|
+
"zod-types": true,
|
|
2184
|
+
"zod-types-v3": true,
|
|
2185
|
+
webcodecs: shouldReleasePackage({
|
|
2186
|
+
packageName: "@remotion/webcodecs",
|
|
2187
|
+
releaseVersion: VERSION
|
|
2188
|
+
}),
|
|
2189
|
+
convert: false,
|
|
2190
|
+
captions: true,
|
|
2191
|
+
"openai-whisper": true,
|
|
2192
|
+
elevenlabs: true,
|
|
2193
|
+
compositor: false,
|
|
2194
|
+
"example-videos": false,
|
|
2195
|
+
media: true,
|
|
2196
|
+
"remotion-media": false,
|
|
2197
|
+
"web-renderer": false,
|
|
2198
|
+
design: false,
|
|
2199
|
+
"studio-protocol": true,
|
|
2200
|
+
"light-leaks": shouldReleasePackage({
|
|
2201
|
+
packageName: "@remotion/light-leaks",
|
|
2202
|
+
releaseVersion: VERSION
|
|
2203
|
+
}),
|
|
2204
|
+
"rough-notation": true,
|
|
2205
|
+
starburst: shouldReleasePackage({
|
|
2206
|
+
packageName: "@remotion/starburst",
|
|
2207
|
+
releaseVersion: VERSION
|
|
2208
|
+
}),
|
|
2209
|
+
vercel: true,
|
|
2210
|
+
sfx: true,
|
|
2211
|
+
effects: true
|
|
2212
|
+
};
|
|
2213
|
+
var apiDocs = {
|
|
2214
|
+
player: "https://www.remotion.dev/docs/player",
|
|
2215
|
+
cloudrun: "https://www.remotion.dev/docs/cloudrun",
|
|
2216
|
+
"claude-code-plugin": null,
|
|
2217
|
+
"codex-plugin": null,
|
|
2218
|
+
"kimi-code-plugin": null,
|
|
2219
|
+
renderer: "https://www.remotion.dev/docs/renderer",
|
|
2220
|
+
cli: "https://www.remotion.dev/docs/cli",
|
|
2221
|
+
core: "https://www.remotion.dev/docs/remotion",
|
|
2222
|
+
lambda: "https://www.remotion.dev/docs/lambda",
|
|
2223
|
+
bundler: "https://www.remotion.dev/docs/bundler",
|
|
2224
|
+
"browser-studio": null,
|
|
2225
|
+
"studio-codemods": null,
|
|
2226
|
+
"lambda-client": null,
|
|
2227
|
+
"serverless-client": null,
|
|
2228
|
+
"studio-server": null,
|
|
2229
|
+
"install-whisper-cpp": "https://www.remotion.dev/docs/install-whisper-cpp",
|
|
2230
|
+
"whisper-web": "https://www.remotion.dev/docs/whisper-web",
|
|
2231
|
+
"google-fonts": "https://www.remotion.dev/docs/google-fonts",
|
|
2232
|
+
"media-utils": "https://www.remotion.dev/docs/media-utils",
|
|
2233
|
+
lottie: "https://www.remotion.dev/docs/lottie",
|
|
2234
|
+
licensing: "https://www.remotion.dev/docs/licensing",
|
|
2235
|
+
"layout-utils": "https://www.remotion.dev/docs/layout-utils",
|
|
2236
|
+
"rounded-text-box": "https://www.remotion.dev/docs/rounded-text-box",
|
|
2237
|
+
noise: "https://www.remotion.dev/docs/noise",
|
|
2238
|
+
mcp: "https://www.remotion.dev/docs/ai/mcp",
|
|
2239
|
+
"motion-blur": "https://www.remotion.dev/docs/motion-blur",
|
|
2240
|
+
preload: "https://www.remotion.dev/docs/preload",
|
|
2241
|
+
shapes: "https://www.remotion.dev/docs/shapes",
|
|
2242
|
+
"zod-types": "https://www.remotion.dev/docs/zod-types",
|
|
2243
|
+
"zod-types-v3": "https://www.remotion.dev/docs/zod-types/v3",
|
|
2244
|
+
gif: "https://www.remotion.dev/docs/gif",
|
|
2245
|
+
"eslint-plugin": "https://www.remotion.dev/docs/brownfield#install-the-eslint-plugin",
|
|
2246
|
+
"eslint-config": "https://www.remotion.dev/docs/brownfield#install-the-eslint-plugin",
|
|
2247
|
+
"eslint-config-flat": "https://www.remotion.dev/docs/brownfield#install-the-eslint-plugin",
|
|
2248
|
+
"compositor-linux-x64-gnu": null,
|
|
2249
|
+
"compositor-linux-x64-musl": null,
|
|
2250
|
+
"compositor-darwin-x64": null,
|
|
2251
|
+
"discord-poster": null,
|
|
2252
|
+
"docusaurus-plugin": null,
|
|
2253
|
+
"animation-utils": "https://www.remotion.dev/docs/animation-utils/",
|
|
2254
|
+
"example-without-zod": null,
|
|
2255
|
+
"lambda-go": null,
|
|
2256
|
+
example: null,
|
|
2257
|
+
"lambda-php": null,
|
|
2258
|
+
bugs: null,
|
|
2259
|
+
brand: null,
|
|
2260
|
+
docs: null,
|
|
2261
|
+
"it-tests": null,
|
|
2262
|
+
"react18-tests": null,
|
|
2263
|
+
"lambda-python": null,
|
|
2264
|
+
"lambda-ruby": "https://www.remotion.dev/docs/lambda/ruby",
|
|
2265
|
+
"player-example": null,
|
|
2266
|
+
"player-a11y": null,
|
|
2267
|
+
"astro-example": null,
|
|
2268
|
+
"lambda-go-example": null,
|
|
2269
|
+
"test-utils": null,
|
|
2270
|
+
"babel-loader": "https://www.remotion.dev/docs/legacy-babel",
|
|
2271
|
+
"compositor-darwin-arm64": null,
|
|
2272
|
+
"compositor-linux-arm64-gnu": null,
|
|
2273
|
+
"compositor-linux-arm64-musl": null,
|
|
2274
|
+
"compositor-win32-x64-msvc": null,
|
|
2275
|
+
"enable-scss": "https://www.remotion.dev/docs/enable-scss/overview",
|
|
2276
|
+
"create-video": "https://remotion.dev/templates",
|
|
2277
|
+
"studio-shared": null,
|
|
2278
|
+
"media-parser": "https://www.remotion.dev/docs/media-parser",
|
|
2279
|
+
fonts: "https://www.remotion.dev/docs/fonts-api",
|
|
2280
|
+
paths: "https://www.remotion.dev/paths",
|
|
2281
|
+
rive: "https://www.remotion.dev/docs/rive",
|
|
2282
|
+
tailwind: "https://www.remotion.dev/docs/tailwind/tailwind",
|
|
2283
|
+
"tailwind-v4": "https://www.remotion.dev/docs/tailwind/tailwind",
|
|
2284
|
+
skia: "https://www.remotion.dev/docs/skia",
|
|
2285
|
+
three: "https://www.remotion.dev/docs/three",
|
|
2286
|
+
streaming: null,
|
|
2287
|
+
serverless: null,
|
|
2288
|
+
skills: null,
|
|
2289
|
+
"skills-evals": null,
|
|
2290
|
+
studio: "https://www.remotion.dev/docs/studio/api",
|
|
2291
|
+
"timeline-utils": null,
|
|
2292
|
+
transitions: "https://www.remotion.dev/transitions",
|
|
2293
|
+
"animated-emoji": "https://www.remotion.dev/docs/animated-emoji",
|
|
2294
|
+
webcodecs: "https://remotion.dev/webcodecs",
|
|
2295
|
+
convert: "https://convert.remotion.dev",
|
|
2296
|
+
captions: "https://remotion.dev/docs/captions/api",
|
|
2297
|
+
"openai-whisper": "https://www.remotion.dev/docs/openai-whisper",
|
|
2298
|
+
elevenlabs: "https://www.remotion.dev/docs/elevenlabs",
|
|
2299
|
+
"eslint-config-internal": null,
|
|
2300
|
+
compositor: null,
|
|
2301
|
+
"example-videos": null,
|
|
2302
|
+
"promo-pages": null,
|
|
2303
|
+
"remotion-media": null,
|
|
2304
|
+
"svg-3d-engine": null,
|
|
2305
|
+
media: "https://remotion.dev/docs/media",
|
|
2306
|
+
"web-renderer": "https://www.remotion.dev/docs/web-renderer/",
|
|
2307
|
+
design: "https://www.remotion.dev/design",
|
|
2308
|
+
"studio-protocol": "https://www.remotion.dev/docs/studio-protocol",
|
|
2309
|
+
"light-leaks": "https://www.remotion.dev/docs/light-leaks",
|
|
2310
|
+
"rough-notation": "https://www.remotion.dev/docs/rough-notation",
|
|
2311
|
+
starburst: "https://www.remotion.dev/docs/starburst",
|
|
2312
|
+
vercel: "https://www.remotion.dev/docs/vercel/api",
|
|
2313
|
+
sfx: "https://www.remotion.dev/docs/sfx",
|
|
2314
|
+
effects: "https://www.remotion.dev/docs/effects/api"
|
|
2315
|
+
};
|
|
2316
|
+
// src/parse-spring-easing-config.ts
|
|
2317
|
+
var DEFAULT_SPRING_EASING = {
|
|
2318
|
+
type: "spring",
|
|
2319
|
+
allowTail: null,
|
|
2320
|
+
damping: 10,
|
|
2321
|
+
durationRestThreshold: null,
|
|
2322
|
+
mass: 1,
|
|
2323
|
+
overshootClamping: false,
|
|
2324
|
+
stiffness: 100
|
|
2325
|
+
};
|
|
2326
|
+
var isAstNode = (value) => {
|
|
2327
|
+
return typeof value === "object" && value !== null && typeof value.type === "string";
|
|
2328
|
+
};
|
|
2329
|
+
var getNumericValue = (node) => {
|
|
2330
|
+
if (node.type === "NumericLiteral") {
|
|
2331
|
+
return typeof node.value === "number" ? node.value : null;
|
|
2332
|
+
}
|
|
2333
|
+
if (node.type === "UnaryExpression" && (node.operator === "-" || node.operator === "+") && isAstNode(node.argument) && node.argument.type === "NumericLiteral" && typeof node.argument.value === "number") {
|
|
2334
|
+
return node.operator === "-" ? -node.argument.value : node.argument.value;
|
|
2335
|
+
}
|
|
2336
|
+
if (node.type === "TSAsExpression" && isAstNode(node.expression)) {
|
|
2337
|
+
return getNumericValue(node.expression);
|
|
2338
|
+
}
|
|
2339
|
+
return null;
|
|
2340
|
+
};
|
|
2341
|
+
var getBooleanValue = (node) => {
|
|
2342
|
+
if (node.type === "BooleanLiteral") {
|
|
2343
|
+
return typeof node.value === "boolean" ? node.value : null;
|
|
2344
|
+
}
|
|
2345
|
+
if (node.type === "TSAsExpression" && isAstNode(node.expression)) {
|
|
2346
|
+
return getBooleanValue(node.expression);
|
|
2347
|
+
}
|
|
2348
|
+
return null;
|
|
2349
|
+
};
|
|
2350
|
+
var getObjectPropertyName = (prop) => {
|
|
2351
|
+
if (prop.computed === true || !isAstNode(prop.key)) {
|
|
2352
|
+
return null;
|
|
2353
|
+
}
|
|
2354
|
+
if (prop.key.type === "Identifier") {
|
|
2355
|
+
return typeof prop.key.name === "string" ? prop.key.name : null;
|
|
2356
|
+
}
|
|
2357
|
+
if (prop.key.type === "StringLiteral") {
|
|
2358
|
+
return typeof prop.key.value === "string" ? prop.key.value : null;
|
|
2359
|
+
}
|
|
2360
|
+
return null;
|
|
2361
|
+
};
|
|
2362
|
+
var parseSpringEasingConfig = (node) => {
|
|
2363
|
+
if (node === undefined) {
|
|
2364
|
+
return { ...DEFAULT_SPRING_EASING };
|
|
2365
|
+
}
|
|
2366
|
+
if (!isAstNode(node)) {
|
|
2367
|
+
return null;
|
|
2368
|
+
}
|
|
2369
|
+
if (node.type === "TSAsExpression") {
|
|
2370
|
+
return parseSpringEasingConfig(node.expression);
|
|
2371
|
+
}
|
|
2372
|
+
if (node.type !== "ObjectExpression" || !Array.isArray(node.properties)) {
|
|
2373
|
+
return null;
|
|
2374
|
+
}
|
|
2375
|
+
const spring = { ...DEFAULT_SPRING_EASING };
|
|
2376
|
+
for (const prop of node.properties) {
|
|
2377
|
+
if (!isAstNode(prop) || prop.type !== "ObjectProperty") {
|
|
2378
|
+
return null;
|
|
2379
|
+
}
|
|
2380
|
+
const key = getObjectPropertyName(prop);
|
|
2381
|
+
if (!key || !isAstNode(prop.value)) {
|
|
2382
|
+
return null;
|
|
2383
|
+
}
|
|
2384
|
+
if (key === "damping" || key === "mass" || key === "stiffness" || key === "durationRestThreshold") {
|
|
2385
|
+
const numericValue = getNumericValue(prop.value);
|
|
2386
|
+
if (numericValue === null || !Number.isFinite(numericValue) || numericValue <= 0) {
|
|
2387
|
+
return null;
|
|
2388
|
+
}
|
|
2389
|
+
spring[key] = numericValue;
|
|
2390
|
+
continue;
|
|
2391
|
+
}
|
|
2392
|
+
if (key === "overshootClamping" || key === "allowTail") {
|
|
2393
|
+
const booleanValue = getBooleanValue(prop.value);
|
|
2394
|
+
if (booleanValue === null) {
|
|
2395
|
+
return null;
|
|
2396
|
+
}
|
|
2397
|
+
spring[key] = booleanValue;
|
|
2398
|
+
continue;
|
|
2399
|
+
}
|
|
2400
|
+
return null;
|
|
2401
|
+
}
|
|
2402
|
+
return spring;
|
|
2403
|
+
};
|
|
2404
|
+
// src/package-name.ts
|
|
2405
|
+
var nodeBuiltinPackages = new Set([
|
|
2406
|
+
"assert",
|
|
2407
|
+
"async_hooks",
|
|
2408
|
+
"buffer",
|
|
2409
|
+
"child_process",
|
|
2410
|
+
"cluster",
|
|
2411
|
+
"console",
|
|
2412
|
+
"constants",
|
|
2413
|
+
"crypto",
|
|
2414
|
+
"dgram",
|
|
2415
|
+
"diagnostics_channel",
|
|
2416
|
+
"dns",
|
|
2417
|
+
"domain",
|
|
2418
|
+
"events",
|
|
2419
|
+
"fs",
|
|
2420
|
+
"http",
|
|
2421
|
+
"http2",
|
|
2422
|
+
"https",
|
|
2423
|
+
"inspector",
|
|
2424
|
+
"module",
|
|
2425
|
+
"net",
|
|
2426
|
+
"os",
|
|
2427
|
+
"path",
|
|
2428
|
+
"perf_hooks",
|
|
2429
|
+
"process",
|
|
2430
|
+
"punycode",
|
|
2431
|
+
"querystring",
|
|
2432
|
+
"readline",
|
|
2433
|
+
"repl",
|
|
2434
|
+
"sea",
|
|
2435
|
+
"sqlite",
|
|
2436
|
+
"stream",
|
|
2437
|
+
"string_decoder",
|
|
2438
|
+
"sys",
|
|
2439
|
+
"test",
|
|
2440
|
+
"timers",
|
|
2441
|
+
"tls",
|
|
2442
|
+
"trace_events",
|
|
2443
|
+
"tty",
|
|
2444
|
+
"url",
|
|
2445
|
+
"util",
|
|
2446
|
+
"v8",
|
|
2447
|
+
"vm",
|
|
2448
|
+
"wasi",
|
|
2449
|
+
"worker_threads",
|
|
2450
|
+
"zlib"
|
|
2451
|
+
]);
|
|
2452
|
+
var scopedPackagePattern = /^(?:@([^/]+?)\/)?([^/]+?)$/;
|
|
2453
|
+
var reservedPackageNames = new Set(["node_modules", "favicon.ico"]);
|
|
2454
|
+
var isValidPackageName = (packageName) => {
|
|
2455
|
+
if (packageName.length === 0 || packageName.length > 214 || packageName.startsWith(".") || packageName.startsWith("_") || packageName.startsWith("-") || packageName.trim() !== packageName || packageName.toLowerCase() !== packageName || reservedPackageNames.has(packageName) || nodeBuiltinPackages.has(packageName) || /[~'!()*]/.test(packageName.split("/").at(-1) ?? "")) {
|
|
2456
|
+
return false;
|
|
2457
|
+
}
|
|
2458
|
+
if (encodeURIComponent(packageName) === packageName) {
|
|
2459
|
+
return true;
|
|
2460
|
+
}
|
|
2461
|
+
const match = packageName.match(scopedPackagePattern);
|
|
2462
|
+
if (!match) {
|
|
2463
|
+
return false;
|
|
2464
|
+
}
|
|
2465
|
+
const [, scope, name] = match;
|
|
2466
|
+
return scope !== undefined && name !== undefined && encodeURIComponent(scope) === scope && encodeURIComponent(name) === name;
|
|
2467
|
+
};
|
|
2468
|
+
|
|
2469
|
+
// src/required-package.ts
|
|
2470
|
+
var getRequiredPackageForImportPath = (importPath) => {
|
|
2471
|
+
if (importPath === "remotion" || importPath.startsWith(".")) {
|
|
2472
|
+
return null;
|
|
2473
|
+
}
|
|
2474
|
+
if (importPath.startsWith("@")) {
|
|
2475
|
+
const [scope, scopedPackageName] = importPath.split("/");
|
|
2476
|
+
const scopedPackage = scope && scopedPackageName ? `${scope}/${scopedPackageName}` : null;
|
|
2477
|
+
return scopedPackage && isValidPackageName(scopedPackage) ? scopedPackage : null;
|
|
2478
|
+
}
|
|
2479
|
+
const [packageName] = importPath.split("/");
|
|
2480
|
+
return packageName && isValidPackageName(packageName) ? packageName : null;
|
|
2481
|
+
};
|
|
2482
|
+
var getRequiredPackageForInsertableElement = (element) => {
|
|
2483
|
+
if (element.type === "solid" || element.type === "svg") {
|
|
2484
|
+
return null;
|
|
2485
|
+
}
|
|
2486
|
+
if (element.type === "component") {
|
|
2487
|
+
return getRequiredPackageForImportPath(element.importPath);
|
|
2488
|
+
}
|
|
2489
|
+
if (element.type === "composition") {
|
|
2490
|
+
return null;
|
|
2491
|
+
}
|
|
2492
|
+
if (element.assetType === "video" || element.assetType === "audio") {
|
|
2493
|
+
return "@remotion/media";
|
|
2494
|
+
}
|
|
2495
|
+
if (element.assetType === "gif") {
|
|
2496
|
+
return "@remotion/gif";
|
|
2497
|
+
}
|
|
2498
|
+
if (element.assetType === "animated-image") {
|
|
2499
|
+
return null;
|
|
2500
|
+
}
|
|
2501
|
+
return null;
|
|
2502
|
+
};
|
|
2503
|
+
var getRequiredPackageForEffectImportPath = (importPath) => {
|
|
2504
|
+
if (importPath.startsWith("@remotion/effects/")) {
|
|
2505
|
+
return "@remotion/effects";
|
|
2506
|
+
}
|
|
2507
|
+
if (importPath === "@remotion/light-leaks" || importPath === "@remotion/starburst") {
|
|
2508
|
+
return importPath;
|
|
2509
|
+
}
|
|
2510
|
+
return null;
|
|
2511
|
+
};
|
|
2512
|
+
// src/schema-field-info.ts
|
|
2513
|
+
import { Internals as Internals2 } from "remotion";
|
|
2514
|
+
import { NoReactInternals as NoReactInternals2 } from "remotion/no-react";
|
|
2515
|
+
|
|
2516
|
+
// src/style-property-relations.ts
|
|
2517
|
+
var BORDER_RADIUS_SHORTHAND_KEY = "style.borderRadius";
|
|
2518
|
+
var BORDER_RADIUS_LONGHAND_KEYS = [
|
|
2519
|
+
"style.borderTopLeftRadius",
|
|
2520
|
+
"style.borderTopRightRadius",
|
|
2521
|
+
"style.borderBottomRightRadius",
|
|
2522
|
+
"style.borderBottomLeftRadius"
|
|
2523
|
+
];
|
|
2524
|
+
var STYLE_PROPERTY_LONGHANDS = new Map([
|
|
2525
|
+
[BORDER_RADIUS_SHORTHAND_KEY, BORDER_RADIUS_LONGHAND_KEYS]
|
|
2526
|
+
]);
|
|
2527
|
+
var getStylePropertyLonghandKeys = (fieldKey) => STYLE_PROPERTY_LONGHANDS.get(fieldKey) ?? [];
|
|
2528
|
+
|
|
2529
|
+
// src/schema-field-info.ts
|
|
2530
|
+
var SCHEMA_FIELD_ROW_HEIGHT = 22;
|
|
2531
|
+
var SCHEMA_FIELD_GROUPS = [
|
|
2532
|
+
{ id: "source", label: "Source" },
|
|
2533
|
+
{ id: "controls", label: "Controls" },
|
|
2534
|
+
{ id: "transforms", label: "Transform" },
|
|
2535
|
+
{ id: "text", label: "Text" },
|
|
2536
|
+
{ id: "background", label: "Background" },
|
|
2537
|
+
{ id: "border", label: "Border" },
|
|
2538
|
+
{ id: "border-radius", label: "Border radius" },
|
|
2539
|
+
{ id: "crop", label: "Crop" },
|
|
2540
|
+
{ id: "layout", label: "Layout" }
|
|
2541
|
+
];
|
|
2542
|
+
var schemaFieldGroupOrder = SCHEMA_FIELD_GROUPS.reduce((acc, group, index) => {
|
|
2543
|
+
acc[group.id] = index;
|
|
2544
|
+
return acc;
|
|
2545
|
+
}, {});
|
|
2546
|
+
var TRANSFORM_FIELD_KEYS = new Set([
|
|
2547
|
+
"style.transformOrigin",
|
|
2548
|
+
"style.translate",
|
|
2549
|
+
"style.scale",
|
|
2550
|
+
"style.rotate",
|
|
2551
|
+
"style.opacity"
|
|
2552
|
+
]);
|
|
2553
|
+
var CROP_FIELD_KEYS = new Set([
|
|
2554
|
+
"cropLeft",
|
|
2555
|
+
"cropRight",
|
|
2556
|
+
"cropTop",
|
|
2557
|
+
"cropBottom"
|
|
2558
|
+
]);
|
|
2559
|
+
var BORDER_RADIUS_FIELD_KEYS = new Set([
|
|
2560
|
+
"style.borderRadius",
|
|
2561
|
+
"style.borderTopLeftRadius",
|
|
2562
|
+
"style.borderTopRightRadius",
|
|
2563
|
+
"style.borderBottomRightRadius",
|
|
2564
|
+
"style.borderBottomLeftRadius"
|
|
2565
|
+
]);
|
|
2566
|
+
var getBorderRadiusFieldKeysToShow = ({
|
|
2567
|
+
activeSchema,
|
|
2568
|
+
propStatuses,
|
|
2569
|
+
nodePath
|
|
2570
|
+
}) => {
|
|
2571
|
+
if (!(BORDER_RADIUS_SHORTHAND_KEY in activeSchema)) {
|
|
2572
|
+
return null;
|
|
2573
|
+
}
|
|
2574
|
+
const statuses = Internals2.getPropStatusesCtx(propStatuses, nodePath);
|
|
2575
|
+
const shorthand = statuses?.[BORDER_RADIUS_SHORTHAND_KEY];
|
|
2576
|
+
const longhands = BORDER_RADIUS_LONGHAND_KEYS.map((key) => statuses?.[key]);
|
|
2577
|
+
if (shorthand?.status === "keyframed") {
|
|
2578
|
+
return new Set([BORDER_RADIUS_SHORTHAND_KEY]);
|
|
2579
|
+
}
|
|
2580
|
+
if (shorthand?.status === "static" && shorthand.codeValue !== undefined) {
|
|
2581
|
+
return new Set([BORDER_RADIUS_SHORTHAND_KEY]);
|
|
2582
|
+
}
|
|
2583
|
+
const hasEditableLonghand = longhands.some((status) => status?.status === "keyframed" || status?.status === "static" && status.codeValue !== undefined);
|
|
2584
|
+
if (hasEditableLonghand) {
|
|
2585
|
+
return new Set(BORDER_RADIUS_LONGHAND_KEYS);
|
|
2586
|
+
}
|
|
2587
|
+
return new Set([BORDER_RADIUS_SHORTHAND_KEY]);
|
|
2588
|
+
};
|
|
2589
|
+
var BORDER_FIELD_KEYS = new Set([
|
|
2590
|
+
"style.borderWidth",
|
|
2591
|
+
"style.borderStyle",
|
|
2592
|
+
"style.borderColor"
|
|
2593
|
+
]);
|
|
2594
|
+
var BACKGROUND_FIELD_KEYS = new Set(["style.backgroundColor"]);
|
|
2595
|
+
var LAYOUT_FIELD_KEYS = new Set(["layout", "premountFor"]);
|
|
2596
|
+
var TEXT_FIELD_KEYS = new Set([
|
|
2597
|
+
"children",
|
|
2598
|
+
"style.color",
|
|
2599
|
+
"style.fontFamily",
|
|
2600
|
+
"style.fontSize",
|
|
2601
|
+
"style.lineHeight",
|
|
2602
|
+
"style.fontWeight",
|
|
2603
|
+
"style.fontStyle",
|
|
2604
|
+
"style.letterSpacing",
|
|
2605
|
+
"style.textAlign"
|
|
2606
|
+
]);
|
|
2607
|
+
var getSchemaFieldGroup = (key) => {
|
|
2608
|
+
if (key === "src") {
|
|
2609
|
+
return "source";
|
|
2610
|
+
}
|
|
2611
|
+
if (TRANSFORM_FIELD_KEYS.has(key)) {
|
|
2612
|
+
return "transforms";
|
|
2613
|
+
}
|
|
2614
|
+
if (CROP_FIELD_KEYS.has(key)) {
|
|
2615
|
+
return "crop";
|
|
2616
|
+
}
|
|
2617
|
+
if (BORDER_RADIUS_FIELD_KEYS.has(key)) {
|
|
2618
|
+
return "border-radius";
|
|
2619
|
+
}
|
|
2620
|
+
if (BORDER_FIELD_KEYS.has(key)) {
|
|
2621
|
+
return "border";
|
|
2622
|
+
}
|
|
2623
|
+
if (BACKGROUND_FIELD_KEYS.has(key)) {
|
|
2624
|
+
return "background";
|
|
2625
|
+
}
|
|
2626
|
+
if (LAYOUT_FIELD_KEYS.has(key)) {
|
|
2627
|
+
return "layout";
|
|
2628
|
+
}
|
|
2629
|
+
if (TEXT_FIELD_KEYS.has(key)) {
|
|
2630
|
+
return "text";
|
|
2631
|
+
}
|
|
2632
|
+
return "controls";
|
|
2633
|
+
};
|
|
2634
|
+
var sortSchemaFields = (fields) => {
|
|
2635
|
+
return fields.map((field, index) => ({ field, index })).sort((a, b) => {
|
|
2636
|
+
const groupDiff = schemaFieldGroupOrder[a.field.group] - schemaFieldGroupOrder[b.field.group];
|
|
2637
|
+
return groupDiff === 0 ? a.index - b.index : groupDiff;
|
|
2638
|
+
}).map(({ field }) => field);
|
|
2639
|
+
};
|
|
2640
|
+
var TIMELINE_SCHEMA_FIELD_TYPE_SUPPORT = {
|
|
2641
|
+
array: true,
|
|
2642
|
+
asset: true,
|
|
2643
|
+
boolean: true,
|
|
2644
|
+
"remotion-captions": false,
|
|
2645
|
+
color: true,
|
|
2646
|
+
enum: true,
|
|
2647
|
+
"font-family": true,
|
|
2648
|
+
hidden: false,
|
|
2649
|
+
number: true,
|
|
2650
|
+
"rotation-css": true,
|
|
2651
|
+
"rotation-degrees": true,
|
|
2652
|
+
scale: true,
|
|
2653
|
+
"text-content": true,
|
|
2654
|
+
"transform-origin": true,
|
|
2655
|
+
translate: true,
|
|
2656
|
+
"uv-coordinate": true
|
|
2657
|
+
};
|
|
2658
|
+
var isTimelineSchemaFieldSupported = (field) => TIMELINE_SCHEMA_FIELD_TYPE_SUPPORT[field.type];
|
|
2659
|
+
var getArrayRowCount = ({
|
|
2660
|
+
fieldSchema,
|
|
2661
|
+
value
|
|
2662
|
+
}) => {
|
|
2663
|
+
const items = Array.isArray(value) ? value : Array.isArray(fieldSchema.default) ? fieldSchema.default : Array.from({ length: fieldSchema.minLength ?? 0 });
|
|
2664
|
+
const canAdd = items.length < (fieldSchema.maxLength ?? Infinity);
|
|
2665
|
+
return Math.max(1, items.length + (canAdd ? 1 : 0));
|
|
2666
|
+
};
|
|
2667
|
+
var getSchemaFieldRowHeight = ({
|
|
2668
|
+
fieldSchema,
|
|
2669
|
+
value
|
|
2670
|
+
}) => {
|
|
2671
|
+
if (fieldSchema.type === "array") {
|
|
2672
|
+
return getArrayRowCount({
|
|
2673
|
+
fieldSchema,
|
|
2674
|
+
value
|
|
2675
|
+
}) * SCHEMA_FIELD_ROW_HEIGHT;
|
|
2676
|
+
}
|
|
2677
|
+
return SCHEMA_FIELD_ROW_HEIGHT;
|
|
2678
|
+
};
|
|
2679
|
+
var getEffectFieldValue = ({
|
|
2680
|
+
key,
|
|
2681
|
+
dragOverrides,
|
|
2682
|
+
effectStatus
|
|
2683
|
+
}) => {
|
|
2684
|
+
const dragOverride = Internals2.getStaticDragOverrideValue(dragOverrides[key]);
|
|
2685
|
+
if (dragOverride !== undefined) {
|
|
2686
|
+
return dragOverride;
|
|
2687
|
+
}
|
|
2688
|
+
if (effectStatus?.type !== "can-update-effect") {
|
|
2689
|
+
return;
|
|
2690
|
+
}
|
|
2691
|
+
const propStatus = effectStatus.props[key];
|
|
2692
|
+
if (propStatus?.status !== "static") {
|
|
2693
|
+
return;
|
|
2694
|
+
}
|
|
2695
|
+
return propStatus.codeValue;
|
|
2696
|
+
};
|
|
2697
|
+
var getFieldsToShow = ({
|
|
2698
|
+
getDragOverrides,
|
|
2699
|
+
propStatuses,
|
|
2700
|
+
nodePath,
|
|
2701
|
+
schema,
|
|
2702
|
+
currentRuntimeValueDotNotation,
|
|
2703
|
+
includeTextContent
|
|
2704
|
+
}) => {
|
|
2705
|
+
const { merged: valuesDotNotation } = Internals2.computeEffectiveSchemaValuesDotNotation({
|
|
2706
|
+
schema,
|
|
2707
|
+
currentValue: currentRuntimeValueDotNotation,
|
|
2708
|
+
overrideValues: getDragOverrides(nodePath),
|
|
2709
|
+
propStatus: Internals2.getPropStatusesCtx(propStatuses, nodePath),
|
|
2710
|
+
frame: null
|
|
2711
|
+
});
|
|
2712
|
+
const activeSchema = Internals2.flattenActiveSchema(schema, (key) => valuesDotNotation[key]);
|
|
2713
|
+
const borderRadiusFieldKeysToShow = getBorderRadiusFieldKeysToShow({
|
|
2714
|
+
activeSchema,
|
|
2715
|
+
propStatuses,
|
|
2716
|
+
nodePath
|
|
2717
|
+
});
|
|
2718
|
+
const fields = Object.entries(activeSchema).map(([key, fieldSchema]) => {
|
|
2719
|
+
if (BORDER_RADIUS_FIELD_KEYS.has(key) && borderRadiusFieldKeysToShow !== null && !borderRadiusFieldKeysToShow.has(key)) {
|
|
2720
|
+
return null;
|
|
2721
|
+
}
|
|
2722
|
+
if (!isTimelineSchemaFieldSupported(fieldSchema)) {
|
|
2723
|
+
return null;
|
|
2724
|
+
}
|
|
2725
|
+
const typeName = fieldSchema.type;
|
|
2726
|
+
if (fieldSchema.type === "number" && fieldSchema.hiddenFromList) {
|
|
2727
|
+
return null;
|
|
2728
|
+
}
|
|
2729
|
+
if (fieldSchema.type === "text-content" && !includeTextContent) {
|
|
2730
|
+
return null;
|
|
2731
|
+
}
|
|
2732
|
+
if (key === "hidden") {
|
|
2733
|
+
return null;
|
|
2734
|
+
}
|
|
2735
|
+
return {
|
|
2736
|
+
kind: "sequence-field",
|
|
2737
|
+
key,
|
|
2738
|
+
description: fieldSchema.description,
|
|
2739
|
+
typeName,
|
|
2740
|
+
rowHeight: getSchemaFieldRowHeight({
|
|
2741
|
+
fieldSchema,
|
|
2742
|
+
value: valuesDotNotation[key]
|
|
2743
|
+
}),
|
|
2744
|
+
fieldSchema,
|
|
2745
|
+
group: getSchemaFieldGroup(key)
|
|
2746
|
+
};
|
|
2747
|
+
}).filter(NoReactInternals2.truthy);
|
|
2748
|
+
return sortSchemaFields(fields);
|
|
2749
|
+
};
|
|
2750
|
+
var getEffectFieldsToShow = ({
|
|
2751
|
+
effect,
|
|
2752
|
+
effectIndex,
|
|
2753
|
+
nodePath,
|
|
2754
|
+
propStatuses,
|
|
2755
|
+
getEffectDragOverrides
|
|
2756
|
+
}) => {
|
|
2757
|
+
const effectStatus = nodePath === null ? null : Internals2.getEffectPropStatusesCtx({
|
|
2758
|
+
propStatuses,
|
|
2759
|
+
nodePath,
|
|
2760
|
+
effectIndex
|
|
2761
|
+
});
|
|
2762
|
+
const dragOverrides = nodePath === null ? {} : getEffectDragOverrides(nodePath, effectIndex);
|
|
2763
|
+
const activeSchema = Internals2.flattenActiveSchema(effect.schema, (key) => {
|
|
2764
|
+
return getEffectFieldValue({ key, dragOverrides, effectStatus });
|
|
2765
|
+
});
|
|
2766
|
+
const fields = Object.entries(activeSchema).map(([key, fieldSchema]) => {
|
|
2767
|
+
if (!isTimelineSchemaFieldSupported(fieldSchema)) {
|
|
2768
|
+
return null;
|
|
2769
|
+
}
|
|
2770
|
+
const typeName = fieldSchema.type;
|
|
2771
|
+
if (fieldSchema.type === "number" && fieldSchema.hiddenFromList) {
|
|
2772
|
+
return null;
|
|
2773
|
+
}
|
|
2774
|
+
if (key === "disabled") {
|
|
2775
|
+
return null;
|
|
2776
|
+
}
|
|
2777
|
+
return {
|
|
2778
|
+
kind: "effect-field",
|
|
2779
|
+
key,
|
|
2780
|
+
description: fieldSchema.description,
|
|
2781
|
+
typeName,
|
|
2782
|
+
rowHeight: getSchemaFieldRowHeight({
|
|
2783
|
+
fieldSchema,
|
|
2784
|
+
value: getEffectFieldValue({ key, dragOverrides, effectStatus })
|
|
2785
|
+
}),
|
|
2786
|
+
fieldSchema,
|
|
2787
|
+
effectSchema: effect.schema,
|
|
2788
|
+
effectIndex,
|
|
2789
|
+
group: getSchemaFieldGroup(key)
|
|
2790
|
+
};
|
|
2791
|
+
}).filter(NoReactInternals2.truthy);
|
|
2792
|
+
return sortSchemaFields(fields);
|
|
2793
|
+
};
|
|
2794
|
+
// src/stringify-default-props.ts
|
|
2795
|
+
import { NoReactInternals as NoReactInternals3 } from "remotion/no-react";
|
|
2796
|
+
function replacerWithPath(replacer) {
|
|
2797
|
+
const m = new Map;
|
|
2798
|
+
return function(field, value) {
|
|
2799
|
+
const path = [m.get(this), field].flat(1);
|
|
2800
|
+
if (value === Object(value)) {
|
|
2801
|
+
m.set(value, path);
|
|
2802
|
+
}
|
|
2803
|
+
return replacer.call(this, field, value, path.filter((item) => typeof item !== "undefined" && item !== ""));
|
|
2804
|
+
};
|
|
2805
|
+
}
|
|
2806
|
+
var doesMatchPath = (path1, enumPaths) => {
|
|
2807
|
+
return enumPaths.some((p) => path1.length === p.length && path1.every((item, index) => {
|
|
2808
|
+
if (p[index] === "[]" && !Number.isNaN(Number(item))) {
|
|
2809
|
+
return true;
|
|
2810
|
+
}
|
|
2811
|
+
if (p[index] === "{}" && typeof item === "string") {
|
|
2812
|
+
return true;
|
|
2813
|
+
}
|
|
2814
|
+
return item === p[index];
|
|
2815
|
+
}));
|
|
2816
|
+
};
|
|
2817
|
+
var stringifyDefaultProps = ({
|
|
2818
|
+
props,
|
|
2819
|
+
enumPaths
|
|
2820
|
+
}) => {
|
|
2821
|
+
return JSON.stringify(props, replacerWithPath(function(key, value, path) {
|
|
2822
|
+
const item = this[key];
|
|
2823
|
+
if (typeof item === "string" && doesMatchPath(path, enumPaths)) {
|
|
2824
|
+
return `${item}__ADD_AS_CONST__`;
|
|
2825
|
+
}
|
|
2826
|
+
if (doesMatchPath(path, enumPaths)) {
|
|
2827
|
+
return `__REMOVEQUOTE__${JSON.stringify(item)}__ADD_AS_LITERAL_CONST__`;
|
|
2828
|
+
}
|
|
2829
|
+
if (typeof item === "string" && item.startsWith(NoReactInternals3.FILE_TOKEN)) {
|
|
2830
|
+
return `__REMOVEQUOTE____WRAP_IN_STATIC_FILE_START__${decodeURIComponent(item.replace(NoReactInternals3.FILE_TOKEN, ""))}__WRAP_IN_STATIC_FILE_END____REMOVEQUOTE__`;
|
|
2831
|
+
}
|
|
2832
|
+
if (typeof item === "string" && item.startsWith(NoReactInternals3.DATE_TOKEN)) {
|
|
2833
|
+
return `__REMOVEQUOTE____WRAP_IN_DATE_START__${decodeURIComponent(item.replace(NoReactInternals3.DATE_TOKEN, ""))}__WRAP_IN_DATE_END____REMOVEQUOTE__`;
|
|
2834
|
+
}
|
|
2835
|
+
return value;
|
|
2836
|
+
})).replace(/"__REMOVEQUOTE__/g, "").replace(/__REMOVEQUOTE__"/g, "").replace(/__ADD_AS_CONST__"/g, '" as const').replace(/__ADD_AS_LITERAL_CONST__"/g, " as const").replace(/__WRAP_IN_STATIC_FILE_START__/g, 'staticFile("').replace(/__WRAP_IN_STATIC_FILE_END__/g, '")').replace(/__WRAP_IN_DATE_START__/g, 'new Date("').replace(/__WRAP_IN_DATE_END__/g, '")');
|
|
2837
|
+
};
|
|
2838
|
+
// src/studio-entry-points.ts
|
|
2839
|
+
var getStudioEntryPoints = ({
|
|
2840
|
+
fastRefreshRuntime,
|
|
2841
|
+
environmentSetup,
|
|
2842
|
+
sequenceStackTraces,
|
|
2843
|
+
userDefinedComponent,
|
|
2844
|
+
reactShim,
|
|
2845
|
+
studioRenderEntry
|
|
2846
|
+
}) => [
|
|
2847
|
+
fastRefreshRuntime,
|
|
2848
|
+
environmentSetup,
|
|
2849
|
+
sequenceStackTraces,
|
|
2850
|
+
userDefinedComponent,
|
|
2851
|
+
reactShim,
|
|
2852
|
+
studioRenderEntry
|
|
2853
|
+
].filter(Boolean);
|
|
2854
|
+
// src/studio-html.ts
|
|
2855
|
+
import { Internals as Internals3, VERSION as VERSION2 } from "remotion";
|
|
2856
|
+
var studioHtml = ({
|
|
2857
|
+
publicPath,
|
|
2858
|
+
editorName,
|
|
2859
|
+
inputProps,
|
|
2860
|
+
envVariables,
|
|
2861
|
+
staticHash,
|
|
2862
|
+
remotionRoot,
|
|
2863
|
+
studioServerCommand,
|
|
2864
|
+
renderQueue,
|
|
2865
|
+
completedClientRenders,
|
|
2866
|
+
numberOfAudioTags,
|
|
2867
|
+
publicFiles,
|
|
2868
|
+
includeFavicon,
|
|
2869
|
+
title,
|
|
2870
|
+
renderDefaults,
|
|
2871
|
+
publicFolderExists,
|
|
2872
|
+
fileSystemPlatform,
|
|
2873
|
+
gitSource,
|
|
2874
|
+
projectName,
|
|
2875
|
+
installedDependencies,
|
|
2876
|
+
packageManager,
|
|
2877
|
+
audioLatencyHint,
|
|
2878
|
+
sampleRate,
|
|
2879
|
+
logLevel,
|
|
2880
|
+
mode,
|
|
2881
|
+
bundleScriptUrl,
|
|
2882
|
+
readOnlyStudio,
|
|
2883
|
+
studioRuntimeConfig
|
|
2884
|
+
}) => {
|
|
2885
|
+
const scriptUrl = bundleScriptUrl ?? `${publicPath}bundle.js`;
|
|
2886
|
+
const isRelativeBundle = mode === "bundle" && publicPath === "./";
|
|
2887
|
+
const staticBaseValue = isRelativeBundle ? `new URL(${JSON.stringify(staticHash)}, window.location.href).pathname` : JSON.stringify(staticHash);
|
|
2888
|
+
const staticFilesValue = isRelativeBundle ? `${JSON.stringify(publicFiles)}.map((file) => ({...file, src: new URL(file.src, window.location.href).pathname}))` : JSON.stringify(publicFiles);
|
|
2889
|
+
const publicFolderExistsValue = isRelativeBundle && publicFolderExists ? `new URL(${JSON.stringify(publicFolderExists)}, window.location.href).pathname` : JSON.stringify(publicFolderExists);
|
|
2890
|
+
return `
|
|
2891
|
+
<!DOCTYPE html>
|
|
2892
|
+
<html lang="en">
|
|
2893
|
+
<head>
|
|
2894
|
+
<meta charset="UTF-8" />
|
|
2895
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
2896
|
+
${includeFavicon ? `<link id="__remotion_favicon" rel="icon" type="image/png" href="${publicPath}favicon.ico" />` : ""}
|
|
2897
|
+
<title>${title}</title>
|
|
2898
|
+
</head>
|
|
2899
|
+
<body>
|
|
2900
|
+
<script>window.remotion_numberOfAudioTags = ${numberOfAudioTags};</script>
|
|
2901
|
+
<script>window.remotion_audioLatencyHint = "${audioLatencyHint}";</script>
|
|
2902
|
+
<script>window.remotion_sampleRate = ${sampleRate};</script>
|
|
2903
|
+
<script>window.remotion_previewSampleRate = ${sampleRate};</script>
|
|
2904
|
+
${mode === "dev" ? `<script>window.remotion_logLevel = "${logLevel}";</script>` : ""}
|
|
2905
|
+
<script>window.remotion_staticBase = ${staticBaseValue};</script>
|
|
2906
|
+
${editorName ? `<script>window.remotion_editorName = "${editorName}";</script>` : "<script>window.remotion_editorName = null;</script>"}
|
|
2907
|
+
<script>window.remotion_projectName = ${JSON.stringify(projectName)};</script>
|
|
2908
|
+
<script>window.remotion_publicPath = ${JSON.stringify(publicPath)};</script>
|
|
2909
|
+
<script>window.remotion_audioEnabled = true;</script>
|
|
2910
|
+
<script>window.remotion_videoEnabled = true;</script>
|
|
2911
|
+
<script>window.remotion_studioConfig = ${JSON.stringify(studioRuntimeConfig ?? null)};</script>
|
|
2912
|
+
<script>window.remotion_renderDefaults = ${JSON.stringify(renderDefaults)};</script>
|
|
2913
|
+
<script>window.remotion_cwd = ${JSON.stringify(remotionRoot)};</script>
|
|
2914
|
+
<script>window.remotion_fileSystemPlatform = ${JSON.stringify(fileSystemPlatform)};</script>
|
|
2915
|
+
<script>window.remotion_studioServerCommand = ${studioServerCommand ? JSON.stringify(studioServerCommand) : "null"};</script>
|
|
2916
|
+
${inputProps ? `<script>window.remotion_inputProps = ${JSON.stringify(JSON.stringify(inputProps))};</script>` : ""}
|
|
2917
|
+
${renderQueue ? `<script>window.remotion_initialRenderQueue = ${JSON.stringify(renderQueue)};</script>` : ""}
|
|
2918
|
+
${completedClientRenders ? `<script>window.remotion_initialClientRenders = ${JSON.stringify(completedClientRenders)};</script>` : ""}
|
|
2919
|
+
${envVariables ? `<script>window.process = {env: ${JSON.stringify(envVariables)}};</script>` : ""}
|
|
2920
|
+
${gitSource ? `<script>window.remotion_gitSource = ${JSON.stringify(gitSource)};</script>` : ""}
|
|
2921
|
+
${mode === "dev" ? `
|
|
2922
|
+
<script>window.remotion_isStudio = true;</script>
|
|
2923
|
+
<script>window.remotion_isReadOnlyStudio = ${readOnlyStudio ? "true" : "false"};</script>`.trimStart() : ""}
|
|
2924
|
+
<script>window.remotion_staticFiles = ${staticFilesValue}</script>
|
|
2925
|
+
<script>window.remotion_installedPackages = ${JSON.stringify(installedDependencies)}</script>
|
|
2926
|
+
<script>window.remotion_packageManager = ${JSON.stringify(packageManager)}</script>
|
|
2927
|
+
<script>window.remotion_publicFolderExists = ${publicFolderExistsValue};</script>
|
|
2928
|
+
<script>
|
|
2929
|
+
// Increment this value when the generated bundle format or behavior changes
|
|
2930
|
+
// in a backwards-incompatible way. It is not the Remotion package version
|
|
2931
|
+
// and should not be bumped for every generated HTML change.
|
|
2932
|
+
// Keep it synchronized with requiredVersion in
|
|
2933
|
+
// packages/renderer/src/set-props-and-env.ts by incrementing both values.
|
|
2934
|
+
window.siteVersion = '11';
|
|
2935
|
+
window.remotion_version = '${VERSION2}';
|
|
2936
|
+
</script>
|
|
2937
|
+
|
|
2938
|
+
<div id="video-container"></div>
|
|
2939
|
+
<div id="${Internals3.REMOTION_STUDIO_CONTAINER_ELEMENT}"></div>
|
|
2940
|
+
<div id="remotion-error-overlay"></div>
|
|
2941
|
+
<div id="server-disconnected-overlay"></div>
|
|
2942
|
+
<div id="menuportal-0"></div>
|
|
2943
|
+
<div id="menuportal-1"></div>
|
|
2944
|
+
<div id="menuportal-2"></div>
|
|
2945
|
+
<div id="menuportal-3"></div>
|
|
2946
|
+
<div id="menuportal-4"></div>
|
|
2947
|
+
<div id="menuportal-5"></div>
|
|
2948
|
+
<script src="${scriptUrl}"></script>
|
|
2949
|
+
</body>
|
|
2950
|
+
</html>
|
|
2951
|
+
`.trim();
|
|
2952
|
+
};
|
|
2953
|
+
// src/optimistic-add-keyframe.ts
|
|
2954
|
+
var getEasingIndexToDuplicate = ({
|
|
2955
|
+
insertedKeyframeIndex,
|
|
2956
|
+
easingLength,
|
|
2957
|
+
keyframeCount
|
|
2958
|
+
}) => {
|
|
2959
|
+
const isSplittingExistingSegment = insertedKeyframeIndex > 0 && insertedKeyframeIndex < keyframeCount - 1;
|
|
2960
|
+
if (!isSplittingExistingSegment || easingLength === 0) {
|
|
2961
|
+
return null;
|
|
2962
|
+
}
|
|
2963
|
+
return Math.min(insertedKeyframeIndex - 1, easingLength - 1);
|
|
2964
|
+
};
|
|
2965
|
+
var addKeyframeToPropStatus = ({
|
|
2966
|
+
status,
|
|
2967
|
+
fieldKey,
|
|
2968
|
+
frame,
|
|
2969
|
+
value,
|
|
2970
|
+
schema
|
|
2971
|
+
}) => {
|
|
2972
|
+
if (status.status === "keyframed") {
|
|
2973
|
+
const existingIndex = status.keyframes.findIndex((kf) => kf.frame === frame);
|
|
2974
|
+
if (existingIndex !== -1) {
|
|
2975
|
+
const updatedKeyframes = status.keyframes.map((keyframe, index) => index === existingIndex ? { frame, value } : keyframe);
|
|
2976
|
+
return {
|
|
2977
|
+
...status,
|
|
2978
|
+
keyframes: updatedKeyframes
|
|
2979
|
+
};
|
|
2980
|
+
}
|
|
2981
|
+
const keyframes = [...status.keyframes, { frame, value }].sort((first, second) => first.frame - second.frame);
|
|
2982
|
+
const easing = [...status.easing];
|
|
2983
|
+
const insertedKeyframeIndex = keyframes.findIndex((keyframe) => keyframe.frame === frame);
|
|
2984
|
+
const easingIndexToDuplicate = getEasingIndexToDuplicate({
|
|
2985
|
+
insertedKeyframeIndex,
|
|
2986
|
+
easingLength: easing.length,
|
|
2987
|
+
keyframeCount: keyframes.length
|
|
2988
|
+
});
|
|
2989
|
+
const easingToDuplicate = easingIndexToDuplicate === null ? LINEAR_KEYFRAME_EASING : easing[easingIndexToDuplicate];
|
|
2990
|
+
easing.splice(insertedKeyframeIndex, 0, easingToDuplicate);
|
|
2991
|
+
while (easing.length < keyframes.length - 1) {
|
|
2992
|
+
easing.push(LINEAR_KEYFRAME_EASING);
|
|
2993
|
+
}
|
|
2994
|
+
return {
|
|
2995
|
+
...status,
|
|
2996
|
+
keyframes,
|
|
2997
|
+
easing
|
|
2998
|
+
};
|
|
2999
|
+
}
|
|
3000
|
+
if (status.status === "static") {
|
|
3001
|
+
const staticValue = status.codeValue ?? value;
|
|
3002
|
+
return {
|
|
3003
|
+
status: "keyframed",
|
|
3004
|
+
interpolationFunction: getKeyframeInterpolationFunction({
|
|
3005
|
+
schema,
|
|
3006
|
+
key: fieldKey,
|
|
3007
|
+
staticValue,
|
|
3008
|
+
newValue: value
|
|
3009
|
+
}),
|
|
3010
|
+
keyframes: [{ frame, value }],
|
|
3011
|
+
easing: [],
|
|
3012
|
+
clamping: { left: "clamp", right: "clamp" },
|
|
3013
|
+
posterize: undefined,
|
|
3014
|
+
output: undefined
|
|
3015
|
+
};
|
|
3016
|
+
}
|
|
3017
|
+
return status;
|
|
3018
|
+
};
|
|
3019
|
+
var findFieldInSchema2 = (schema, key) => {
|
|
3020
|
+
if (key in schema) {
|
|
3021
|
+
return schema[key];
|
|
3022
|
+
}
|
|
3023
|
+
for (const field of Object.values(schema)) {
|
|
3024
|
+
if (field.type !== "enum") {
|
|
3025
|
+
continue;
|
|
3026
|
+
}
|
|
3027
|
+
for (const variant of Object.values(field.variants)) {
|
|
3028
|
+
const found = findFieldInSchema2(variant, key);
|
|
3029
|
+
if (found) {
|
|
3030
|
+
return found;
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
3033
|
+
}
|
|
3034
|
+
return;
|
|
3035
|
+
};
|
|
3036
|
+
var getMissingPropStatus = ({
|
|
3037
|
+
schema,
|
|
3038
|
+
fieldKey
|
|
3039
|
+
}) => {
|
|
3040
|
+
const field = schema ? findFieldInSchema2(schema, fieldKey) : undefined;
|
|
3041
|
+
if (field && field.type !== "hidden" && field.default !== undefined) {
|
|
3042
|
+
return {
|
|
3043
|
+
status: "static",
|
|
3044
|
+
codeValue: field.default
|
|
3045
|
+
};
|
|
3046
|
+
}
|
|
3047
|
+
return {
|
|
3048
|
+
status: "static",
|
|
3049
|
+
codeValue: undefined
|
|
3050
|
+
};
|
|
3051
|
+
};
|
|
3052
|
+
var optimisticAddSequenceKeyframe = ({
|
|
3053
|
+
previous,
|
|
3054
|
+
fieldKey,
|
|
3055
|
+
frame,
|
|
3056
|
+
value,
|
|
3057
|
+
schema
|
|
3058
|
+
}) => {
|
|
3059
|
+
if (!previous.canUpdate) {
|
|
3060
|
+
return previous;
|
|
3061
|
+
}
|
|
3062
|
+
if (!isSchemaFieldKeyframable({ schema: schema ?? null, key: fieldKey })) {
|
|
3063
|
+
return previous;
|
|
3064
|
+
}
|
|
3065
|
+
const status = previous.props[fieldKey] ?? getMissingPropStatus({ schema: schema ?? null, fieldKey });
|
|
3066
|
+
return {
|
|
3067
|
+
...previous,
|
|
3068
|
+
props: {
|
|
3069
|
+
...previous.props,
|
|
3070
|
+
[fieldKey]: addKeyframeToPropStatus({
|
|
3071
|
+
status,
|
|
3072
|
+
fieldKey,
|
|
3073
|
+
frame,
|
|
3074
|
+
value,
|
|
3075
|
+
schema: schema ?? null
|
|
3076
|
+
})
|
|
3077
|
+
}
|
|
3078
|
+
};
|
|
3079
|
+
};
|
|
3080
|
+
var optimisticAddEffectKeyframe = ({
|
|
3081
|
+
previous,
|
|
3082
|
+
effectIndex,
|
|
3083
|
+
fieldKey,
|
|
3084
|
+
frame,
|
|
3085
|
+
value,
|
|
3086
|
+
schema
|
|
3087
|
+
}) => {
|
|
3088
|
+
if (!previous.canUpdate) {
|
|
3089
|
+
return previous;
|
|
3090
|
+
}
|
|
3091
|
+
if (!isSchemaFieldKeyframable({ schema: schema ?? null, key: fieldKey })) {
|
|
3092
|
+
return previous;
|
|
3093
|
+
}
|
|
3094
|
+
const targetIndex = previous.effects.findIndex((e) => e.effectIndex === effectIndex);
|
|
3095
|
+
if (targetIndex === -1) {
|
|
3096
|
+
return previous;
|
|
3097
|
+
}
|
|
3098
|
+
const target = previous.effects[targetIndex];
|
|
3099
|
+
if (!target.canUpdate) {
|
|
3100
|
+
return previous;
|
|
3101
|
+
}
|
|
3102
|
+
const status = target.props[fieldKey] ?? getMissingPropStatus({ schema: schema ?? null, fieldKey });
|
|
3103
|
+
const updatedEffect = {
|
|
3104
|
+
...target,
|
|
3105
|
+
props: {
|
|
3106
|
+
...target.props,
|
|
3107
|
+
[fieldKey]: addKeyframeToPropStatus({
|
|
3108
|
+
status,
|
|
3109
|
+
fieldKey,
|
|
3110
|
+
frame,
|
|
3111
|
+
value,
|
|
3112
|
+
schema: schema ?? null
|
|
3113
|
+
})
|
|
3114
|
+
}
|
|
3115
|
+
};
|
|
3116
|
+
const effects = [...previous.effects];
|
|
3117
|
+
effects[targetIndex] = updatedEffect;
|
|
3118
|
+
return {
|
|
3119
|
+
...previous,
|
|
3120
|
+
effects
|
|
3121
|
+
};
|
|
3122
|
+
};
|
|
3123
|
+
// src/optimistic-delete-keyframe.ts
|
|
3124
|
+
var getEasingIndexToRemove = ({
|
|
3125
|
+
removedKeyframeIndex,
|
|
3126
|
+
keyframeCountBeforeRemoval
|
|
3127
|
+
}) => {
|
|
3128
|
+
if (removedKeyframeIndex === 0) {
|
|
3129
|
+
return 0;
|
|
3130
|
+
}
|
|
3131
|
+
if (removedKeyframeIndex === keyframeCountBeforeRemoval - 1) {
|
|
3132
|
+
return removedKeyframeIndex - 1;
|
|
3133
|
+
}
|
|
3134
|
+
return removedKeyframeIndex;
|
|
3135
|
+
};
|
|
3136
|
+
var removeKeyframeFromPropStatus = ({
|
|
3137
|
+
status,
|
|
3138
|
+
frame,
|
|
3139
|
+
valueWhenLastKeyframeDeleted
|
|
3140
|
+
}) => {
|
|
3141
|
+
if (status.status !== "keyframed") {
|
|
3142
|
+
return status;
|
|
3143
|
+
}
|
|
3144
|
+
const index = status.keyframes.findIndex((kf) => kf.frame === frame);
|
|
3145
|
+
if (index === -1) {
|
|
3146
|
+
return status;
|
|
3147
|
+
}
|
|
3148
|
+
const keyframes = status.keyframes.filter((_, i) => i !== index);
|
|
3149
|
+
if (keyframes.length === 0) {
|
|
3150
|
+
return {
|
|
3151
|
+
status: "static",
|
|
3152
|
+
codeValue: valueWhenLastKeyframeDeleted === null ? status.keyframes[index].value : valueWhenLastKeyframeDeleted
|
|
3153
|
+
};
|
|
3154
|
+
}
|
|
3155
|
+
const easing = [...status.easing];
|
|
3156
|
+
if (easing.length > 0) {
|
|
3157
|
+
const easingIndexToRemove = getEasingIndexToRemove({
|
|
3158
|
+
removedKeyframeIndex: index,
|
|
3159
|
+
keyframeCountBeforeRemoval: status.keyframes.length
|
|
3160
|
+
});
|
|
3161
|
+
easing.splice(easingIndexToRemove, 1);
|
|
3162
|
+
}
|
|
3163
|
+
return {
|
|
3164
|
+
...status,
|
|
3165
|
+
keyframes,
|
|
3166
|
+
easing
|
|
3167
|
+
};
|
|
3168
|
+
};
|
|
3169
|
+
var optimisticDeleteSequenceKeyframe = ({
|
|
3170
|
+
previous,
|
|
3171
|
+
fieldKey,
|
|
3172
|
+
frame,
|
|
3173
|
+
valueWhenLastKeyframeDeleted
|
|
3174
|
+
}) => {
|
|
3175
|
+
if (!previous.canUpdate) {
|
|
3176
|
+
return previous;
|
|
3177
|
+
}
|
|
3178
|
+
const status = previous.props[fieldKey];
|
|
3179
|
+
if (!status) {
|
|
3180
|
+
return previous;
|
|
3181
|
+
}
|
|
3182
|
+
return {
|
|
3183
|
+
...previous,
|
|
3184
|
+
props: {
|
|
3185
|
+
...previous.props,
|
|
3186
|
+
[fieldKey]: removeKeyframeFromPropStatus({
|
|
3187
|
+
status,
|
|
3188
|
+
frame,
|
|
3189
|
+
valueWhenLastKeyframeDeleted: valueWhenLastKeyframeDeleted ?? null
|
|
3190
|
+
})
|
|
3191
|
+
}
|
|
3192
|
+
};
|
|
3193
|
+
};
|
|
3194
|
+
var optimisticDeleteSequenceKeyframes = ({
|
|
3195
|
+
previous,
|
|
3196
|
+
keyframes
|
|
3197
|
+
}) => {
|
|
3198
|
+
return keyframes.reduce((current, keyframe) => optimisticDeleteSequenceKeyframe({
|
|
3199
|
+
previous: current,
|
|
3200
|
+
fieldKey: keyframe.fieldKey,
|
|
3201
|
+
frame: keyframe.frame,
|
|
3202
|
+
valueWhenLastKeyframeDeleted: keyframe.valueWhenLastKeyframeDeleted
|
|
3203
|
+
}), previous);
|
|
3204
|
+
};
|
|
3205
|
+
var optimisticDeleteEffectKeyframe = ({
|
|
3206
|
+
previous,
|
|
3207
|
+
effectIndex,
|
|
3208
|
+
fieldKey,
|
|
3209
|
+
frame,
|
|
3210
|
+
valueWhenLastKeyframeDeleted
|
|
3211
|
+
}) => {
|
|
3212
|
+
if (!previous.canUpdate) {
|
|
3213
|
+
return previous;
|
|
3214
|
+
}
|
|
3215
|
+
const targetIndex = previous.effects.findIndex((e) => e.effectIndex === effectIndex);
|
|
3216
|
+
if (targetIndex === -1) {
|
|
3217
|
+
return previous;
|
|
3218
|
+
}
|
|
3219
|
+
const target = previous.effects[targetIndex];
|
|
3220
|
+
if (!target.canUpdate) {
|
|
3221
|
+
return previous;
|
|
3222
|
+
}
|
|
3223
|
+
const status = target.props[fieldKey];
|
|
3224
|
+
if (!status) {
|
|
3225
|
+
return previous;
|
|
3226
|
+
}
|
|
3227
|
+
const updatedEffect = {
|
|
3228
|
+
...target,
|
|
3229
|
+
props: {
|
|
3230
|
+
...target.props,
|
|
3231
|
+
[fieldKey]: removeKeyframeFromPropStatus({
|
|
3232
|
+
status,
|
|
3233
|
+
frame,
|
|
3234
|
+
valueWhenLastKeyframeDeleted: valueWhenLastKeyframeDeleted ?? null
|
|
3235
|
+
})
|
|
3236
|
+
}
|
|
3237
|
+
};
|
|
3238
|
+
const effects = [...previous.effects];
|
|
3239
|
+
effects[targetIndex] = updatedEffect;
|
|
3240
|
+
return {
|
|
3241
|
+
...previous,
|
|
3242
|
+
effects
|
|
3243
|
+
};
|
|
3244
|
+
};
|
|
3245
|
+
var optimisticDeleteEffectKeyframes = ({
|
|
3246
|
+
previous,
|
|
3247
|
+
keyframes
|
|
3248
|
+
}) => {
|
|
3249
|
+
return keyframes.reduce((current, keyframe) => optimisticDeleteEffectKeyframe({
|
|
3250
|
+
previous: current,
|
|
3251
|
+
effectIndex: keyframe.effectIndex,
|
|
3252
|
+
fieldKey: keyframe.fieldKey,
|
|
3253
|
+
frame: keyframe.frame,
|
|
3254
|
+
valueWhenLastKeyframeDeleted: keyframe.valueWhenLastKeyframeDeleted
|
|
3255
|
+
}), previous);
|
|
3256
|
+
};
|
|
3257
|
+
// src/optimistic-move-keyframe.ts
|
|
3258
|
+
var getMoveMap = (moves) => {
|
|
3259
|
+
const moveMap = new Map;
|
|
3260
|
+
for (const move of moves) {
|
|
3261
|
+
if (move.fromFrame === move.toFrame) {
|
|
3262
|
+
continue;
|
|
3263
|
+
}
|
|
3264
|
+
if (moveMap.has(move.fromFrame)) {
|
|
3265
|
+
return null;
|
|
3266
|
+
}
|
|
3267
|
+
moveMap.set(move.fromFrame, move.toFrame);
|
|
3268
|
+
}
|
|
3269
|
+
return moveMap;
|
|
3270
|
+
};
|
|
3271
|
+
var getMovedKeyframes = ({
|
|
3272
|
+
status,
|
|
3273
|
+
moves
|
|
3274
|
+
}) => {
|
|
3275
|
+
if (status.status !== "keyframed") {
|
|
3276
|
+
return null;
|
|
3277
|
+
}
|
|
3278
|
+
const moveMap = getMoveMap(moves);
|
|
3279
|
+
if (moveMap === null) {
|
|
3280
|
+
return null;
|
|
3281
|
+
}
|
|
3282
|
+
if (moveMap.size === 0) {
|
|
3283
|
+
return { keyframes: status.keyframes, removedKeyframeIndexes: [] };
|
|
3284
|
+
}
|
|
3285
|
+
const frames = new Set(status.keyframes.map((keyframe) => keyframe.frame));
|
|
3286
|
+
for (const fromFrame of moveMap.keys()) {
|
|
3287
|
+
if (!frames.has(fromFrame)) {
|
|
3288
|
+
return null;
|
|
3289
|
+
}
|
|
3290
|
+
}
|
|
3291
|
+
const movedFromFrames = new Set(moveMap.keys());
|
|
3292
|
+
const movedToFrames = new Set(moveMap.values());
|
|
3293
|
+
const removedKeyframeIndexes = [];
|
|
3294
|
+
const nextKeyframes = status.keyframes.flatMap((keyframe, index) => {
|
|
3295
|
+
const movedFrame = moveMap.get(keyframe.frame);
|
|
3296
|
+
if (movedFrame !== undefined) {
|
|
3297
|
+
return [{ ...keyframe, frame: movedFrame }];
|
|
3298
|
+
}
|
|
3299
|
+
if (movedToFrames.has(keyframe.frame) && !movedFromFrames.has(keyframe.frame)) {
|
|
3300
|
+
removedKeyframeIndexes.push(index);
|
|
3301
|
+
return [];
|
|
3302
|
+
}
|
|
3303
|
+
return [keyframe];
|
|
3304
|
+
});
|
|
3305
|
+
const nextFrames = new Set;
|
|
3306
|
+
for (const keyframe of nextKeyframes) {
|
|
3307
|
+
if (nextFrames.has(keyframe.frame)) {
|
|
3308
|
+
return null;
|
|
3309
|
+
}
|
|
3310
|
+
nextFrames.add(keyframe.frame);
|
|
3311
|
+
}
|
|
3312
|
+
return {
|
|
3313
|
+
keyframes: nextKeyframes.sort((a, b) => a.frame - b.frame),
|
|
3314
|
+
removedKeyframeIndexes
|
|
3315
|
+
};
|
|
3316
|
+
};
|
|
3317
|
+
var removeEasingForRemovedKeyframes = ({
|
|
3318
|
+
easing,
|
|
3319
|
+
removedKeyframeIndexes
|
|
3320
|
+
}) => {
|
|
3321
|
+
const nextEasing = [...easing];
|
|
3322
|
+
for (const removedKeyframeIndex of [...removedKeyframeIndexes].sort((a, b) => b - a)) {
|
|
3323
|
+
if (nextEasing.length === 0) {
|
|
3324
|
+
break;
|
|
3325
|
+
}
|
|
3326
|
+
const easingIndexToRemove = removedKeyframeIndex === 0 ? 0 : removedKeyframeIndex - 1;
|
|
3327
|
+
nextEasing.splice(easingIndexToRemove, 1);
|
|
3328
|
+
}
|
|
3329
|
+
return nextEasing;
|
|
3330
|
+
};
|
|
3331
|
+
var canMoveKeyframesWithoutCollisions = ({
|
|
3332
|
+
status,
|
|
3333
|
+
moves
|
|
3334
|
+
}) => {
|
|
3335
|
+
return getMovedKeyframes({ status, moves }) !== null;
|
|
3336
|
+
};
|
|
3337
|
+
var moveKeyframesInPropStatus = ({
|
|
3338
|
+
status,
|
|
3339
|
+
moves
|
|
3340
|
+
}) => {
|
|
3341
|
+
if (status.status !== "keyframed") {
|
|
3342
|
+
return status;
|
|
3343
|
+
}
|
|
3344
|
+
const moved = getMovedKeyframes({ status, moves });
|
|
3345
|
+
if (moved === null || moved.removedKeyframeIndexes.length === 0 && moved.keyframes === status.keyframes) {
|
|
3346
|
+
return status;
|
|
3347
|
+
}
|
|
3348
|
+
const easing = removeEasingForRemovedKeyframes({
|
|
3349
|
+
easing: status.easing,
|
|
3350
|
+
removedKeyframeIndexes: moved.removedKeyframeIndexes
|
|
3351
|
+
});
|
|
3352
|
+
return {
|
|
3353
|
+
...status,
|
|
3354
|
+
keyframes: moved.keyframes,
|
|
3355
|
+
easing
|
|
3356
|
+
};
|
|
3357
|
+
};
|
|
3358
|
+
var optimisticMoveSequenceKeyframes = ({
|
|
3359
|
+
previous,
|
|
3360
|
+
keyframes
|
|
3361
|
+
}) => {
|
|
3362
|
+
if (!previous.canUpdate) {
|
|
3363
|
+
return previous;
|
|
3364
|
+
}
|
|
3365
|
+
const movesByField = new Map;
|
|
3366
|
+
for (const keyframe of keyframes) {
|
|
3367
|
+
const moves = movesByField.get(keyframe.fieldKey) ?? [];
|
|
3368
|
+
moves.push(keyframe);
|
|
3369
|
+
movesByField.set(keyframe.fieldKey, moves);
|
|
3370
|
+
}
|
|
3371
|
+
const props = { ...previous.props };
|
|
3372
|
+
for (const [fieldKey, moves] of movesByField) {
|
|
3373
|
+
const status = props[fieldKey];
|
|
3374
|
+
if (!status) {
|
|
3375
|
+
continue;
|
|
3376
|
+
}
|
|
3377
|
+
props[fieldKey] = moveKeyframesInPropStatus({ status, moves });
|
|
3378
|
+
}
|
|
3379
|
+
return {
|
|
3380
|
+
...previous,
|
|
3381
|
+
props
|
|
3382
|
+
};
|
|
3383
|
+
};
|
|
3384
|
+
var optimisticMoveEffectKeyframes = ({
|
|
3385
|
+
previous,
|
|
3386
|
+
keyframes
|
|
3387
|
+
}) => {
|
|
3388
|
+
if (!previous.canUpdate) {
|
|
3389
|
+
return previous;
|
|
3390
|
+
}
|
|
3391
|
+
const movesByEffect = new Map;
|
|
3392
|
+
for (const keyframe of keyframes) {
|
|
3393
|
+
const moves = movesByEffect.get(keyframe.effectIndex) ?? [];
|
|
3394
|
+
moves.push(keyframe);
|
|
3395
|
+
movesByEffect.set(keyframe.effectIndex, moves);
|
|
3396
|
+
}
|
|
3397
|
+
const effects = previous.effects.map((effect) => {
|
|
3398
|
+
if (!effect.canUpdate) {
|
|
3399
|
+
return effect;
|
|
3400
|
+
}
|
|
3401
|
+
const movesForEffect = movesByEffect.get(effect.effectIndex);
|
|
3402
|
+
if (!movesForEffect) {
|
|
3403
|
+
return effect;
|
|
3404
|
+
}
|
|
3405
|
+
const props = { ...effect.props };
|
|
3406
|
+
const movesByField = new Map;
|
|
3407
|
+
for (const move of movesForEffect) {
|
|
3408
|
+
const moves = movesByField.get(move.fieldKey) ?? [];
|
|
3409
|
+
moves.push(move);
|
|
3410
|
+
movesByField.set(move.fieldKey, moves);
|
|
3411
|
+
}
|
|
3412
|
+
for (const [fieldKey, moves] of movesByField) {
|
|
3413
|
+
const status = props[fieldKey];
|
|
3414
|
+
if (!status) {
|
|
3415
|
+
continue;
|
|
3416
|
+
}
|
|
3417
|
+
props[fieldKey] = moveKeyframesInPropStatus({ status, moves });
|
|
3418
|
+
}
|
|
3419
|
+
return {
|
|
3420
|
+
...effect,
|
|
3421
|
+
props
|
|
3422
|
+
};
|
|
3423
|
+
});
|
|
3424
|
+
return {
|
|
3425
|
+
...previous,
|
|
3426
|
+
effects
|
|
3427
|
+
};
|
|
3428
|
+
};
|
|
3429
|
+
// src/optimistic-update-for-effect-prop-statuses.ts
|
|
3430
|
+
import { NoReactInternals as NoReactInternals4 } from "remotion/no-react";
|
|
3431
|
+
var optimisticUpdateForEffectPropStatuses = ({
|
|
3432
|
+
previous,
|
|
3433
|
+
effectIndex,
|
|
3434
|
+
fieldKey,
|
|
3435
|
+
value,
|
|
3436
|
+
schema
|
|
3437
|
+
}) => {
|
|
3438
|
+
if (!previous.canUpdate) {
|
|
3439
|
+
return previous;
|
|
3440
|
+
}
|
|
3441
|
+
const targetIndex = previous.effects.findIndex((e) => e.effectIndex === effectIndex);
|
|
3442
|
+
if (targetIndex === -1) {
|
|
3443
|
+
return previous;
|
|
3444
|
+
}
|
|
3445
|
+
const target = previous.effects[targetIndex];
|
|
3446
|
+
if (!target.canUpdate) {
|
|
3447
|
+
return previous;
|
|
3448
|
+
}
|
|
3449
|
+
const props = {
|
|
3450
|
+
...target.props,
|
|
3451
|
+
[fieldKey]: { status: "static", codeValue: value }
|
|
3452
|
+
};
|
|
3453
|
+
if (schema[fieldKey]?.type === "enum") {
|
|
3454
|
+
const propsToDelete = NoReactInternals4.findPropsToDelete({
|
|
3455
|
+
schema,
|
|
3456
|
+
key: fieldKey,
|
|
3457
|
+
value
|
|
3458
|
+
});
|
|
3459
|
+
for (const propToDelete of propsToDelete) {
|
|
3460
|
+
delete props[propToDelete];
|
|
3461
|
+
}
|
|
3462
|
+
}
|
|
3463
|
+
const updatedEffect = {
|
|
3464
|
+
...target,
|
|
3465
|
+
props
|
|
3466
|
+
};
|
|
3467
|
+
const effects = [...previous.effects];
|
|
3468
|
+
effects[targetIndex] = updatedEffect;
|
|
3469
|
+
return {
|
|
3470
|
+
...previous,
|
|
3471
|
+
effects
|
|
3472
|
+
};
|
|
3473
|
+
};
|
|
3474
|
+
// src/optimistic-update-for-prop-statuses.ts
|
|
3475
|
+
import { NoReactInternals as NoReactInternals5 } from "remotion/no-react";
|
|
3476
|
+
var optimisticUpdateForPropStatuses = ({
|
|
3477
|
+
previous,
|
|
3478
|
+
fieldKey,
|
|
3479
|
+
value,
|
|
3480
|
+
defaultValue,
|
|
3481
|
+
schema
|
|
3482
|
+
}) => {
|
|
3483
|
+
if (!previous.canUpdate) {
|
|
3484
|
+
return previous;
|
|
3485
|
+
}
|
|
3486
|
+
const serializedValue = JSON.stringify(value);
|
|
3487
|
+
const optimisticValue = defaultValue !== null && defaultValue === serializedValue ? undefined : value;
|
|
3488
|
+
const props = {
|
|
3489
|
+
...previous.props,
|
|
3490
|
+
[fieldKey]: { status: "static", codeValue: optimisticValue }
|
|
3491
|
+
};
|
|
3492
|
+
if (schema[fieldKey]?.type === "enum") {
|
|
3493
|
+
const propsToDelete = NoReactInternals5.findPropsToDelete({
|
|
3494
|
+
schema,
|
|
3495
|
+
key: fieldKey,
|
|
3496
|
+
value
|
|
3497
|
+
});
|
|
3498
|
+
for (const propToDelete of propsToDelete) {
|
|
3499
|
+
delete props[propToDelete];
|
|
3500
|
+
}
|
|
3501
|
+
}
|
|
3502
|
+
return {
|
|
3503
|
+
canUpdate: true,
|
|
3504
|
+
props,
|
|
3505
|
+
effects: previous.effects
|
|
3506
|
+
};
|
|
3507
|
+
};
|
|
3508
|
+
// src/optimistic-update-keyframe-settings.ts
|
|
3509
|
+
var updateEasing = ({
|
|
3510
|
+
easing,
|
|
3511
|
+
segmentCount,
|
|
3512
|
+
segmentIndex,
|
|
3513
|
+
value
|
|
3514
|
+
}) => {
|
|
3515
|
+
if (!Number.isInteger(segmentIndex) || segmentIndex < 0 || segmentIndex >= segmentCount) {
|
|
3516
|
+
throw new Error("Cannot update easing: segment index out of range");
|
|
3517
|
+
}
|
|
3518
|
+
const nextEasing = Array.from({ length: segmentCount }, (_, index) => {
|
|
3519
|
+
return easing[index] ?? LINEAR_KEYFRAME_EASING;
|
|
3520
|
+
});
|
|
3521
|
+
nextEasing[segmentIndex] = value;
|
|
3522
|
+
return nextEasing;
|
|
3523
|
+
};
|
|
3524
|
+
var applySettingsToStatus = (status, settings) => {
|
|
3525
|
+
if (!status || status.status !== "keyframed") {
|
|
3526
|
+
throw new Error("Expected keyframed status");
|
|
3527
|
+
}
|
|
3528
|
+
return {
|
|
3529
|
+
...status,
|
|
3530
|
+
...settings.type === "settings" && settings.clamping ? { clamping: settings.clamping } : {},
|
|
3531
|
+
...settings.type === "settings" ? { posterize: settings.posterize } : {},
|
|
3532
|
+
...settings.type === "settings" ? { output: settings.output } : {},
|
|
3533
|
+
...settings.type === "easing" ? {
|
|
3534
|
+
easing: updateEasing({
|
|
3535
|
+
easing: status.easing,
|
|
3536
|
+
segmentCount: Math.max(0, status.keyframes.length - 1),
|
|
3537
|
+
segmentIndex: settings.segmentIndex,
|
|
3538
|
+
value: settings.easing
|
|
3539
|
+
})
|
|
3540
|
+
} : {}
|
|
3541
|
+
};
|
|
3542
|
+
};
|
|
3543
|
+
var optimisticUpdateSequenceKeyframeSettings = ({
|
|
3544
|
+
previous,
|
|
3545
|
+
fieldKey,
|
|
3546
|
+
settings
|
|
3547
|
+
}) => {
|
|
3548
|
+
if (!previous.canUpdate) {
|
|
3549
|
+
return previous;
|
|
3550
|
+
}
|
|
3551
|
+
const status = previous.props[fieldKey];
|
|
3552
|
+
if (!status || status.status !== "keyframed") {
|
|
3553
|
+
return previous;
|
|
3554
|
+
}
|
|
3555
|
+
return {
|
|
3556
|
+
...previous,
|
|
3557
|
+
props: {
|
|
3558
|
+
...previous.props,
|
|
3559
|
+
[fieldKey]: applySettingsToStatus(status, settings)
|
|
3560
|
+
}
|
|
3561
|
+
};
|
|
3562
|
+
};
|
|
3563
|
+
var optimisticUpdateEffectKeyframeSettings = ({
|
|
3564
|
+
previous,
|
|
3565
|
+
effectIndex,
|
|
3566
|
+
fieldKey,
|
|
3567
|
+
settings
|
|
3568
|
+
}) => {
|
|
3569
|
+
if (!previous.canUpdate) {
|
|
3570
|
+
return previous;
|
|
3571
|
+
}
|
|
3572
|
+
const targetIndex = previous.effects.findIndex((effect) => effect.effectIndex === effectIndex);
|
|
3573
|
+
if (targetIndex === -1) {
|
|
3574
|
+
return previous;
|
|
3575
|
+
}
|
|
3576
|
+
const target = previous.effects[targetIndex];
|
|
3577
|
+
if (!target.canUpdate) {
|
|
3578
|
+
return previous;
|
|
3579
|
+
}
|
|
3580
|
+
const status = target.props[fieldKey];
|
|
3581
|
+
if (!status || status.status !== "keyframed") {
|
|
3582
|
+
return previous;
|
|
3583
|
+
}
|
|
3584
|
+
const effects = [...previous.effects];
|
|
3585
|
+
effects[targetIndex] = {
|
|
3586
|
+
...target,
|
|
3587
|
+
props: {
|
|
3588
|
+
...target.props,
|
|
3589
|
+
[fieldKey]: applySettingsToStatus(status, settings)
|
|
3590
|
+
}
|
|
3591
|
+
};
|
|
3592
|
+
return {
|
|
3593
|
+
...previous,
|
|
3594
|
+
effects
|
|
3595
|
+
};
|
|
3596
|
+
};
|
|
3597
|
+
// src/stringify-sequence-subscription-key.ts
|
|
3598
|
+
var stringifySequenceSubscriptionKey = (key) => {
|
|
3599
|
+
return `${key.absolutePath}:${JSON.stringify(key.nodePath)}:${key.sequenceKeys.join("\x00")}:${key.effectKeys.map((keys) => keys.join("\x00")).join("\x00\x00")}`;
|
|
3600
|
+
};
|
|
3601
|
+
var stringifySequenceExpandedRowKey = (key) => {
|
|
3602
|
+
return `${key.absolutePath}:${JSON.stringify(key.nodePath)}:${key.sequenceKeys.join("\x00")}`;
|
|
3603
|
+
};
|
|
3604
|
+
// src/url.ts
|
|
3605
|
+
var isUrl = (value) => {
|
|
3606
|
+
try {
|
|
3607
|
+
const parsed = new URL(value);
|
|
3608
|
+
return parsed.href.length > 0;
|
|
3609
|
+
} catch {
|
|
3610
|
+
return false;
|
|
3611
|
+
}
|
|
3612
|
+
};
|
|
3613
|
+
export {
|
|
3614
|
+
studioHtml,
|
|
3615
|
+
stripAnsi,
|
|
3616
|
+
stringifySequenceSubscriptionKey,
|
|
3617
|
+
stringifySequenceExpandedRowKey,
|
|
3618
|
+
stringifyDefaultProps,
|
|
3619
|
+
splitAnsi,
|
|
3620
|
+
parseSpringEasingConfig,
|
|
3621
|
+
parseKeyframeClipboardDataResult,
|
|
3622
|
+
parseKeyframeClipboardData,
|
|
3623
|
+
parseEffectPropClipboardDataResult,
|
|
3624
|
+
parseEffectPropClipboardData,
|
|
3625
|
+
parseEffectClipboardDataResult,
|
|
3626
|
+
parseEffectClipboardData,
|
|
3627
|
+
parseEasingClipboardDataResult,
|
|
3628
|
+
parseEasingClipboardData,
|
|
3629
|
+
packages,
|
|
3630
|
+
optimisticUpdateSequenceKeyframeSettings,
|
|
3631
|
+
optimisticUpdateForPropStatuses,
|
|
3632
|
+
optimisticUpdateForEffectPropStatuses,
|
|
3633
|
+
optimisticUpdateEffectKeyframeSettings,
|
|
3634
|
+
optimisticMoveSequenceKeyframes,
|
|
3635
|
+
optimisticMoveEffectKeyframes,
|
|
3636
|
+
optimisticDeleteSequenceKeyframes,
|
|
3637
|
+
optimisticDeleteSequenceKeyframe,
|
|
3638
|
+
optimisticDeleteEffectKeyframes,
|
|
3639
|
+
optimisticDeleteEffectKeyframe,
|
|
3640
|
+
optimisticAddSequenceKeyframe,
|
|
3641
|
+
optimisticAddEffectKeyframe,
|
|
3642
|
+
moveKeyframesInPropStatus,
|
|
3643
|
+
keyframeInterpolationFunctions,
|
|
3644
|
+
isValidPackageName,
|
|
3645
|
+
isUrl,
|
|
3646
|
+
isSchemaFieldKeyframable,
|
|
3647
|
+
isKeyframeInterpolationFunction,
|
|
3648
|
+
isKeyframeClipboardFieldType,
|
|
3649
|
+
isInteractivitySchemaFieldKeyframable,
|
|
3650
|
+
isImageFileType,
|
|
3651
|
+
installableMap,
|
|
3652
|
+
hotMiddlewareOptions,
|
|
3653
|
+
getStylePropertyLonghandKeys,
|
|
3654
|
+
getStudioEntryPoints,
|
|
3655
|
+
getSchemaFieldGroup,
|
|
3656
|
+
getRequiredPackageForInsertableElement,
|
|
3657
|
+
getRequiredPackageForEffectImportPath,
|
|
3658
|
+
getProjectName,
|
|
3659
|
+
getPolyKeyframeEasing,
|
|
3660
|
+
getOutKeyframeEasing,
|
|
3661
|
+
getLocationFromBuildError,
|
|
3662
|
+
getKeyframeInterpolationFunctionForSchemaField,
|
|
3663
|
+
getKeyframeInterpolationFunction,
|
|
3664
|
+
getFieldsToShow,
|
|
3665
|
+
getEffectPreviewSource,
|
|
3666
|
+
getEffectPreviewAlt,
|
|
3667
|
+
getEffectFieldsToShow,
|
|
3668
|
+
getEffectDocumentationPath,
|
|
3669
|
+
getEffectDocumentationLink,
|
|
3670
|
+
getEffectCatalogCategories,
|
|
3671
|
+
getDefaultOutLocation,
|
|
3672
|
+
getBackKeyframeEasing,
|
|
3673
|
+
getAssetSchemaKeys,
|
|
3674
|
+
getAllSchemaKeys,
|
|
3675
|
+
formatBytes,
|
|
3676
|
+
extraPackages,
|
|
3677
|
+
detectFileType,
|
|
3678
|
+
descriptions,
|
|
3679
|
+
compositionDragDataToSymbolicatedStack,
|
|
3680
|
+
canMoveKeyframesWithoutCollisions,
|
|
3681
|
+
canEditEasingForInterpolationFunction,
|
|
3682
|
+
apiDocs,
|
|
3683
|
+
SCHEMA_FIELD_ROW_HEIGHT,
|
|
3684
|
+
SCHEMA_FIELD_GROUPS,
|
|
3685
|
+
QUAD_KEYFRAME_EASING,
|
|
3686
|
+
LINEAR_KEYFRAME_EASING,
|
|
3687
|
+
KEYFRAME_EASING_PRESETS,
|
|
3688
|
+
EFFECT_CATALOG,
|
|
3689
|
+
EASE_KEYFRAME_EASING,
|
|
3690
|
+
DEFAULT_TIMELINE_TRACKS,
|
|
3691
|
+
DEFAULT_SPRING_EASING,
|
|
3692
|
+
DEFAULT_BUFFER_STATE_DELAY_IN_MILLISECONDS,
|
|
3693
|
+
CUBIC_KEYFRAME_EASING,
|
|
3694
|
+
BORDER_RADIUS_SHORTHAND_KEY,
|
|
3695
|
+
BORDER_RADIUS_LONGHAND_KEYS
|
|
3696
|
+
};
|