@remotion/vercel 4.0.529 → 4.0.530
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 +54 -10
- package/package.json +4 -4
package/dist/esm/index.mjs
CHANGED
|
@@ -1208,7 +1208,7 @@ var interpolateFontWeight = ({
|
|
|
1208
1208
|
options
|
|
1209
1209
|
});
|
|
1210
1210
|
};
|
|
1211
|
-
var
|
|
1211
|
+
var interpolateDiscreteValue = ({
|
|
1212
1212
|
input,
|
|
1213
1213
|
inputRange,
|
|
1214
1214
|
outputRange,
|
|
@@ -1222,7 +1222,7 @@ var interpolateDiscreteString = ({
|
|
|
1222
1222
|
easing: options?.easing,
|
|
1223
1223
|
segmentIndex
|
|
1224
1224
|
}) !== Easing.step1) {
|
|
1225
|
-
throw new TypeError("Non-numeric strings can only be interpolated using Easing.step1");
|
|
1225
|
+
throw new TypeError(typeof outputRange[0] === "boolean" ? "Booleans can only be interpolated using Easing.step1" : "Non-numeric strings can only be interpolated using Easing.step1");
|
|
1226
1226
|
}
|
|
1227
1227
|
}
|
|
1228
1228
|
const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
|
|
@@ -1231,7 +1231,7 @@ var interpolateDiscreteString = ({
|
|
|
1231
1231
|
let resolvedInput = posterizedInput;
|
|
1232
1232
|
if (resolvedInput < inputMin) {
|
|
1233
1233
|
if (options?.extrapolateLeft === "identity") {
|
|
1234
|
-
throw new TypeError('extrapolateLeft: "identity" is not supported for non-numeric strings');
|
|
1234
|
+
throw new TypeError(typeof outputRange[0] === "boolean" ? 'extrapolateLeft: "identity" is not supported for booleans' : 'extrapolateLeft: "identity" is not supported for non-numeric strings');
|
|
1235
1235
|
}
|
|
1236
1236
|
if (options?.extrapolateLeft === "wrap") {
|
|
1237
1237
|
const wrapRange = inputMax - inputMin;
|
|
@@ -1242,7 +1242,7 @@ var interpolateDiscreteString = ({
|
|
|
1242
1242
|
}
|
|
1243
1243
|
if (resolvedInput > inputMax) {
|
|
1244
1244
|
if (options?.extrapolateRight === "identity") {
|
|
1245
|
-
throw new TypeError('extrapolateRight: "identity" is not supported for non-numeric strings');
|
|
1245
|
+
throw new TypeError(typeof outputRange[0] === "boolean" ? 'extrapolateRight: "identity" is not supported for booleans' : 'extrapolateRight: "identity" is not supported for non-numeric strings');
|
|
1246
1246
|
}
|
|
1247
1247
|
if (options?.extrapolateRight === "wrap") {
|
|
1248
1248
|
const wrapRange = inputMax - inputMin;
|
|
@@ -1371,6 +1371,20 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
1371
1371
|
throw new Error("outputRange must contain only numbers");
|
|
1372
1372
|
}
|
|
1373
1373
|
const outputType = options?.outputType;
|
|
1374
|
+
if (outputRange.some((output) => typeof output === "boolean")) {
|
|
1375
|
+
if (!outputRange.every((output) => typeof output === "boolean")) {
|
|
1376
|
+
throw new TypeError("Boolean outputRange must contain only booleans");
|
|
1377
|
+
}
|
|
1378
|
+
if (outputType !== undefined) {
|
|
1379
|
+
throw new TypeError("Boolean outputRange cannot use outputType");
|
|
1380
|
+
}
|
|
1381
|
+
return interpolateDiscreteValue({
|
|
1382
|
+
input,
|
|
1383
|
+
inputRange,
|
|
1384
|
+
outputRange,
|
|
1385
|
+
options
|
|
1386
|
+
});
|
|
1387
|
+
}
|
|
1374
1388
|
if (outputType === "font-weight") {
|
|
1375
1389
|
if (!outputRange.every((output) => typeof output === "number" || typeof output === "string")) {
|
|
1376
1390
|
throw new TypeError("Font weight outputRange must contain only numbers or strings");
|
|
@@ -1413,7 +1427,7 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
1413
1427
|
if (!hasNonNumericString) {
|
|
1414
1428
|
throw error;
|
|
1415
1429
|
}
|
|
1416
|
-
return
|
|
1430
|
+
return interpolateDiscreteValue({
|
|
1417
1431
|
input,
|
|
1418
1432
|
inputRange,
|
|
1419
1433
|
outputRange,
|
|
@@ -1806,6 +1820,12 @@ var trimBeforeField = {
|
|
|
1806
1820
|
step: 1,
|
|
1807
1821
|
hiddenFromList: true
|
|
1808
1822
|
};
|
|
1823
|
+
var loopField = {
|
|
1824
|
+
type: "boolean",
|
|
1825
|
+
default: false,
|
|
1826
|
+
description: "Loop",
|
|
1827
|
+
keyframable: false
|
|
1828
|
+
};
|
|
1809
1829
|
var freezeField = {
|
|
1810
1830
|
type: "number",
|
|
1811
1831
|
default: null,
|
|
@@ -1826,6 +1846,7 @@ var baseSchema = {
|
|
|
1826
1846
|
from: fromField,
|
|
1827
1847
|
trimBefore: trimBeforeField,
|
|
1828
1848
|
playbackRate: playbackRateField,
|
|
1849
|
+
loop: loopField,
|
|
1829
1850
|
freeze: freezeField,
|
|
1830
1851
|
hidden: hiddenField,
|
|
1831
1852
|
name: sequenceNameField,
|
|
@@ -1847,6 +1868,7 @@ var baseSchemaWithoutFrom = {
|
|
|
1847
1868
|
durationInFrames: durationInFramesField,
|
|
1848
1869
|
trimBefore: trimBeforeField,
|
|
1849
1870
|
playbackRate: playbackRateField,
|
|
1871
|
+
loop: loopField,
|
|
1850
1872
|
freeze: freezeField,
|
|
1851
1873
|
hidden: hiddenField,
|
|
1852
1874
|
name: sequenceNameField,
|
|
@@ -3699,7 +3721,7 @@ var interpolateFontWeight = ({
|
|
|
3699
3721
|
options
|
|
3700
3722
|
});
|
|
3701
3723
|
};
|
|
3702
|
-
var
|
|
3724
|
+
var interpolateDiscreteValue = ({
|
|
3703
3725
|
input,
|
|
3704
3726
|
inputRange,
|
|
3705
3727
|
outputRange,
|
|
@@ -3713,7 +3735,7 @@ var interpolateDiscreteString = ({
|
|
|
3713
3735
|
easing: options?.easing,
|
|
3714
3736
|
segmentIndex
|
|
3715
3737
|
}) !== Easing.step1) {
|
|
3716
|
-
throw new TypeError("Non-numeric strings can only be interpolated using Easing.step1");
|
|
3738
|
+
throw new TypeError(typeof outputRange[0] === "boolean" ? "Booleans can only be interpolated using Easing.step1" : "Non-numeric strings can only be interpolated using Easing.step1");
|
|
3717
3739
|
}
|
|
3718
3740
|
}
|
|
3719
3741
|
const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
|
|
@@ -3722,7 +3744,7 @@ var interpolateDiscreteString = ({
|
|
|
3722
3744
|
let resolvedInput = posterizedInput;
|
|
3723
3745
|
if (resolvedInput < inputMin) {
|
|
3724
3746
|
if (options?.extrapolateLeft === "identity") {
|
|
3725
|
-
throw new TypeError('extrapolateLeft: "identity" is not supported for non-numeric strings');
|
|
3747
|
+
throw new TypeError(typeof outputRange[0] === "boolean" ? 'extrapolateLeft: "identity" is not supported for booleans' : 'extrapolateLeft: "identity" is not supported for non-numeric strings');
|
|
3726
3748
|
}
|
|
3727
3749
|
if (options?.extrapolateLeft === "wrap") {
|
|
3728
3750
|
const wrapRange = inputMax - inputMin;
|
|
@@ -3733,7 +3755,7 @@ var interpolateDiscreteString = ({
|
|
|
3733
3755
|
}
|
|
3734
3756
|
if (resolvedInput > inputMax) {
|
|
3735
3757
|
if (options?.extrapolateRight === "identity") {
|
|
3736
|
-
throw new TypeError('extrapolateRight: "identity" is not supported for non-numeric strings');
|
|
3758
|
+
throw new TypeError(typeof outputRange[0] === "boolean" ? 'extrapolateRight: "identity" is not supported for booleans' : 'extrapolateRight: "identity" is not supported for non-numeric strings');
|
|
3737
3759
|
}
|
|
3738
3760
|
if (options?.extrapolateRight === "wrap") {
|
|
3739
3761
|
const wrapRange = inputMax - inputMin;
|
|
@@ -3862,6 +3884,20 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
3862
3884
|
throw new Error("outputRange must contain only numbers");
|
|
3863
3885
|
}
|
|
3864
3886
|
const outputType = options?.outputType;
|
|
3887
|
+
if (outputRange.some((output) => typeof output === "boolean")) {
|
|
3888
|
+
if (!outputRange.every((output) => typeof output === "boolean")) {
|
|
3889
|
+
throw new TypeError("Boolean outputRange must contain only booleans");
|
|
3890
|
+
}
|
|
3891
|
+
if (outputType !== undefined) {
|
|
3892
|
+
throw new TypeError("Boolean outputRange cannot use outputType");
|
|
3893
|
+
}
|
|
3894
|
+
return interpolateDiscreteValue({
|
|
3895
|
+
input,
|
|
3896
|
+
inputRange,
|
|
3897
|
+
outputRange,
|
|
3898
|
+
options
|
|
3899
|
+
});
|
|
3900
|
+
}
|
|
3865
3901
|
if (outputType === "font-weight") {
|
|
3866
3902
|
if (!outputRange.every((output) => typeof output === "number" || typeof output === "string")) {
|
|
3867
3903
|
throw new TypeError("Font weight outputRange must contain only numbers or strings");
|
|
@@ -3904,7 +3940,7 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
3904
3940
|
if (!hasNonNumericString) {
|
|
3905
3941
|
throw error;
|
|
3906
3942
|
}
|
|
3907
|
-
return
|
|
3943
|
+
return interpolateDiscreteValue({
|
|
3908
3944
|
input,
|
|
3909
3945
|
inputRange,
|
|
3910
3946
|
outputRange,
|
|
@@ -4297,6 +4333,12 @@ var trimBeforeField = {
|
|
|
4297
4333
|
step: 1,
|
|
4298
4334
|
hiddenFromList: true
|
|
4299
4335
|
};
|
|
4336
|
+
var loopField = {
|
|
4337
|
+
type: "boolean",
|
|
4338
|
+
default: false,
|
|
4339
|
+
description: "Loop",
|
|
4340
|
+
keyframable: false
|
|
4341
|
+
};
|
|
4300
4342
|
var freezeField = {
|
|
4301
4343
|
type: "number",
|
|
4302
4344
|
default: null,
|
|
@@ -4317,6 +4359,7 @@ var baseSchema = {
|
|
|
4317
4359
|
from: fromField,
|
|
4318
4360
|
trimBefore: trimBeforeField,
|
|
4319
4361
|
playbackRate: playbackRateField,
|
|
4362
|
+
loop: loopField,
|
|
4320
4363
|
freeze: freezeField,
|
|
4321
4364
|
hidden: hiddenField,
|
|
4322
4365
|
name: sequenceNameField,
|
|
@@ -4338,6 +4381,7 @@ var baseSchemaWithoutFrom = {
|
|
|
4338
4381
|
durationInFrames: durationInFramesField,
|
|
4339
4382
|
trimBefore: trimBeforeField,
|
|
4340
4383
|
playbackRate: playbackRateField,
|
|
4384
|
+
loop: loopField,
|
|
4341
4385
|
freeze: freezeField,
|
|
4342
4386
|
hidden: hiddenField,
|
|
4343
4387
|
name: sequenceNameField,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/vercel",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.530",
|
|
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.530",
|
|
27
|
+
"remotion": "4.0.530"
|
|
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.530",
|
|
42
42
|
"@vercel/blob": "2.3.0",
|
|
43
43
|
"@vercel/sandbox": "1.6.0",
|
|
44
44
|
"eslint": "9.19.0",
|