@remotion/vercel 4.0.472 → 4.0.474
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/esm/index.mjs +86 -4
- package/package.json +4 -4
package/dist/esm/index.mjs
CHANGED
|
@@ -366,6 +366,40 @@ var interpolateString = ({
|
|
|
366
366
|
dimensions
|
|
367
367
|
});
|
|
368
368
|
};
|
|
369
|
+
var validateTupleOutputRange = (outputRange) => {
|
|
370
|
+
const dimensions = outputRange[0]?.length;
|
|
371
|
+
if (dimensions === undefined) {
|
|
372
|
+
throw new Error("outputRange must have at least 1 element");
|
|
373
|
+
}
|
|
374
|
+
if (dimensions === 0) {
|
|
375
|
+
throw new TypeError("outputRange tuples must contain at least 1 number");
|
|
376
|
+
}
|
|
377
|
+
for (const output of outputRange) {
|
|
378
|
+
if (output.length !== dimensions) {
|
|
379
|
+
throw new TypeError(\`outputRange tuples must all have the same length, but got \${dimensions} and \${output.length}\`);
|
|
380
|
+
}
|
|
381
|
+
for (const value of output) {
|
|
382
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
383
|
+
throw new TypeError(\`outputRange tuples must contain only finite numbers, but got [\${output.join(",")}]\`);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
return dimensions;
|
|
388
|
+
};
|
|
389
|
+
var interpolateTuple = ({
|
|
390
|
+
input,
|
|
391
|
+
inputRange,
|
|
392
|
+
outputRange,
|
|
393
|
+
options
|
|
394
|
+
}) => {
|
|
395
|
+
const dimensions = validateTupleOutputRange(outputRange);
|
|
396
|
+
return new Array(dimensions).fill(true).map((_, axis) => interpolateNumber({
|
|
397
|
+
input,
|
|
398
|
+
inputRange,
|
|
399
|
+
outputRange: outputRange.map((output) => output[axis]),
|
|
400
|
+
options
|
|
401
|
+
}));
|
|
402
|
+
};
|
|
369
403
|
function checkValidInputRange(arr) {
|
|
370
404
|
for (let i = 1;i < arr.length; ++i) {
|
|
371
405
|
if (!(arr[i] > arr[i - 1])) {
|
|
@@ -441,8 +475,11 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
441
475
|
}
|
|
442
476
|
return interpolateString({ input, inputRange, outputRange, options });
|
|
443
477
|
}
|
|
478
|
+
if (outputRange.every((output) => Array.isArray(output))) {
|
|
479
|
+
return interpolateTuple({ input, inputRange, outputRange, options });
|
|
480
|
+
}
|
|
444
481
|
if (!outputRange.every((output) => typeof output === "number")) {
|
|
445
|
-
throw new TypeError("outputRange must contain only numbers, or supported scale, translate, and rotate strings");
|
|
482
|
+
throw new TypeError("outputRange must contain only numbers, numeric tuples, or supported scale, translate, and rotate strings");
|
|
446
483
|
}
|
|
447
484
|
checkInfiniteRange("outputRange", outputRange);
|
|
448
485
|
return interpolateNumber({ input, inputRange, outputRange, options });
|
|
@@ -1044,7 +1081,6 @@ var sequenceVisualStyleSchema = {
|
|
|
1044
1081
|
},
|
|
1045
1082
|
"style.scale": {
|
|
1046
1083
|
type: "scale",
|
|
1047
|
-
min: 0.05,
|
|
1048
1084
|
max: 100,
|
|
1049
1085
|
step: 0.01,
|
|
1050
1086
|
default: 1,
|
|
@@ -1125,6 +1161,11 @@ var sequenceSchema = {
|
|
|
1125
1161
|
}
|
|
1126
1162
|
}
|
|
1127
1163
|
};
|
|
1164
|
+
var sequenceSchemaWithoutFrom = {
|
|
1165
|
+
hidden: hiddenField,
|
|
1166
|
+
durationInFrames: durationInFramesField,
|
|
1167
|
+
layout: sequenceSchema.layout
|
|
1168
|
+
};
|
|
1128
1169
|
var sequenceSchemaDefaultLayoutNone = {
|
|
1129
1170
|
...sequenceSchema,
|
|
1130
1171
|
layout: {
|
|
@@ -1664,6 +1705,40 @@ var interpolateString = ({
|
|
|
1664
1705
|
dimensions
|
|
1665
1706
|
});
|
|
1666
1707
|
};
|
|
1708
|
+
var validateTupleOutputRange = (outputRange) => {
|
|
1709
|
+
const dimensions = outputRange[0]?.length;
|
|
1710
|
+
if (dimensions === undefined) {
|
|
1711
|
+
throw new Error("outputRange must have at least 1 element");
|
|
1712
|
+
}
|
|
1713
|
+
if (dimensions === 0) {
|
|
1714
|
+
throw new TypeError("outputRange tuples must contain at least 1 number");
|
|
1715
|
+
}
|
|
1716
|
+
for (const output of outputRange) {
|
|
1717
|
+
if (output.length !== dimensions) {
|
|
1718
|
+
throw new TypeError(\`outputRange tuples must all have the same length, but got \${dimensions} and \${output.length}\`);
|
|
1719
|
+
}
|
|
1720
|
+
for (const value of output) {
|
|
1721
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
1722
|
+
throw new TypeError(\`outputRange tuples must contain only finite numbers, but got [\${output.join(",")}]\`);
|
|
1723
|
+
}
|
|
1724
|
+
}
|
|
1725
|
+
}
|
|
1726
|
+
return dimensions;
|
|
1727
|
+
};
|
|
1728
|
+
var interpolateTuple = ({
|
|
1729
|
+
input,
|
|
1730
|
+
inputRange,
|
|
1731
|
+
outputRange,
|
|
1732
|
+
options
|
|
1733
|
+
}) => {
|
|
1734
|
+
const dimensions = validateTupleOutputRange(outputRange);
|
|
1735
|
+
return new Array(dimensions).fill(true).map((_, axis) => interpolateNumber({
|
|
1736
|
+
input,
|
|
1737
|
+
inputRange,
|
|
1738
|
+
outputRange: outputRange.map((output) => output[axis]),
|
|
1739
|
+
options
|
|
1740
|
+
}));
|
|
1741
|
+
};
|
|
1667
1742
|
function checkValidInputRange(arr) {
|
|
1668
1743
|
for (let i = 1;i < arr.length; ++i) {
|
|
1669
1744
|
if (!(arr[i] > arr[i - 1])) {
|
|
@@ -1739,8 +1814,11 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
1739
1814
|
}
|
|
1740
1815
|
return interpolateString({ input, inputRange, outputRange, options });
|
|
1741
1816
|
}
|
|
1817
|
+
if (outputRange.every((output) => Array.isArray(output))) {
|
|
1818
|
+
return interpolateTuple({ input, inputRange, outputRange, options });
|
|
1819
|
+
}
|
|
1742
1820
|
if (!outputRange.every((output) => typeof output === "number")) {
|
|
1743
|
-
throw new TypeError("outputRange must contain only numbers, or supported scale, translate, and rotate strings");
|
|
1821
|
+
throw new TypeError("outputRange must contain only numbers, numeric tuples, or supported scale, translate, and rotate strings");
|
|
1744
1822
|
}
|
|
1745
1823
|
checkInfiniteRange("outputRange", outputRange);
|
|
1746
1824
|
return interpolateNumber({ input, inputRange, outputRange, options });
|
|
@@ -2342,7 +2420,6 @@ var sequenceVisualStyleSchema = {
|
|
|
2342
2420
|
},
|
|
2343
2421
|
"style.scale": {
|
|
2344
2422
|
type: "scale",
|
|
2345
|
-
min: 0.05,
|
|
2346
2423
|
max: 100,
|
|
2347
2424
|
step: 0.01,
|
|
2348
2425
|
default: 1,
|
|
@@ -2423,6 +2500,11 @@ var sequenceSchema = {
|
|
|
2423
2500
|
}
|
|
2424
2501
|
}
|
|
2425
2502
|
};
|
|
2503
|
+
var sequenceSchemaWithoutFrom = {
|
|
2504
|
+
hidden: hiddenField,
|
|
2505
|
+
durationInFrames: durationInFramesField,
|
|
2506
|
+
layout: sequenceSchema.layout
|
|
2507
|
+
};
|
|
2426
2508
|
var sequenceSchemaDefaultLayoutNone = {
|
|
2427
2509
|
...sequenceSchema,
|
|
2428
2510
|
layout: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/vercel",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.474",
|
|
4
4
|
"description": "Render Remotion videos on Vercel Sandbox",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@remotion/renderer": "4.0.
|
|
27
|
-
"remotion": "4.0.
|
|
26
|
+
"@remotion/renderer": "4.0.474",
|
|
27
|
+
"remotion": "4.0.474"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
30
|
"@vercel/sandbox": ">=1.0.0"
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"./package.json": "./package.json"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
41
|
+
"@remotion/eslint-config-internal": "4.0.474",
|
|
42
42
|
"@vercel/blob": "2.3.0",
|
|
43
43
|
"@vercel/sandbox": "1.6.0",
|
|
44
44
|
"eslint": "9.19.0",
|