@remotion/vercel 4.0.461 → 4.0.463
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 +204 -6
- package/package.json +4 -5
package/dist/esm/index.mjs
CHANGED
|
@@ -115,6 +115,23 @@ function checkInfiniteRange(name, arr) {
|
|
|
115
115
|
}
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
|
+
function assertValidInterpolateEasingOption(easing, inputRangeLength) {
|
|
119
|
+
if (easing === undefined) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (typeof easing === "function") {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const expectedLength = inputRangeLength - 1;
|
|
126
|
+
if (easing.length !== expectedLength) {
|
|
127
|
+
throw new Error(\`When easing is an array, it must have one entry per segment between keyframes (length inputRange.length - 1 = \${expectedLength}), but got length \${easing.length}\`);
|
|
128
|
+
}
|
|
129
|
+
for (let i = 0;i < easing.length; i++) {
|
|
130
|
+
if (typeof easing[i] !== "function") {
|
|
131
|
+
throw new Error(\`easing[\${i}] must be a function\`);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
118
135
|
function interpolate(input, inputRange, outputRange, options) {
|
|
119
136
|
if (typeof input === "undefined") {
|
|
120
137
|
throw new Error("input can not be undefined");
|
|
@@ -131,7 +148,18 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
131
148
|
checkInfiniteRange("inputRange", inputRange);
|
|
132
149
|
checkInfiniteRange("outputRange", outputRange);
|
|
133
150
|
checkValidInputRange(inputRange);
|
|
134
|
-
|
|
151
|
+
assertValidInterpolateEasingOption(options?.easing, inputRange.length);
|
|
152
|
+
const easingOption = options?.easing;
|
|
153
|
+
const defaultEasing = (num) => num;
|
|
154
|
+
const resolveEasingForSegment = (segmentIndex) => {
|
|
155
|
+
if (easingOption === undefined) {
|
|
156
|
+
return defaultEasing;
|
|
157
|
+
}
|
|
158
|
+
if (typeof easingOption === "function") {
|
|
159
|
+
return easingOption;
|
|
160
|
+
}
|
|
161
|
+
return easingOption[segmentIndex];
|
|
162
|
+
};
|
|
135
163
|
let extrapolateLeft = "extend";
|
|
136
164
|
if (options?.extrapolateLeft !== undefined) {
|
|
137
165
|
extrapolateLeft = options.extrapolateLeft;
|
|
@@ -145,7 +173,7 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
145
173
|
}
|
|
146
174
|
const range = findRange(input, inputRange);
|
|
147
175
|
return interpolateFunction(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {
|
|
148
|
-
easing,
|
|
176
|
+
easing: resolveEasingForSegment(range),
|
|
149
177
|
extrapolateLeft,
|
|
150
178
|
extrapolateRight
|
|
151
179
|
});
|
|
@@ -699,6 +727,76 @@ var proResProfileOptions = [
|
|
|
699
727
|
"light",
|
|
700
728
|
"proxy"
|
|
701
729
|
];
|
|
730
|
+
var sequenceStyleSchema = {
|
|
731
|
+
"style.translate": {
|
|
732
|
+
type: "translate",
|
|
733
|
+
step: 1,
|
|
734
|
+
default: "0px 0px",
|
|
735
|
+
description: "Offset"
|
|
736
|
+
},
|
|
737
|
+
"style.scale": {
|
|
738
|
+
type: "number",
|
|
739
|
+
min: 0.05,
|
|
740
|
+
max: 100,
|
|
741
|
+
step: 0.01,
|
|
742
|
+
default: 1,
|
|
743
|
+
description: "Scale"
|
|
744
|
+
},
|
|
745
|
+
"style.rotate": {
|
|
746
|
+
type: "rotation",
|
|
747
|
+
step: 1,
|
|
748
|
+
default: "0deg",
|
|
749
|
+
description: "Rotation"
|
|
750
|
+
},
|
|
751
|
+
"style.opacity": {
|
|
752
|
+
type: "number",
|
|
753
|
+
min: 0,
|
|
754
|
+
max: 1,
|
|
755
|
+
step: 0.01,
|
|
756
|
+
default: 1,
|
|
757
|
+
description: "Opacity"
|
|
758
|
+
},
|
|
759
|
+
premountFor: {
|
|
760
|
+
type: "number",
|
|
761
|
+
default: 0,
|
|
762
|
+
description: "Premount For",
|
|
763
|
+
min: 0,
|
|
764
|
+
step: 1
|
|
765
|
+
},
|
|
766
|
+
postmountFor: {
|
|
767
|
+
type: "hidden"
|
|
768
|
+
},
|
|
769
|
+
styleWhilePremounted: {
|
|
770
|
+
type: "hidden"
|
|
771
|
+
},
|
|
772
|
+
styleWhilePostmounted: {
|
|
773
|
+
type: "hidden"
|
|
774
|
+
}
|
|
775
|
+
};
|
|
776
|
+
var hiddenField = {
|
|
777
|
+
type: "boolean",
|
|
778
|
+
default: false,
|
|
779
|
+
description: "Hidden"
|
|
780
|
+
};
|
|
781
|
+
var sequenceSchema = {
|
|
782
|
+
hidden: hiddenField,
|
|
783
|
+
layout: {
|
|
784
|
+
type: "enum",
|
|
785
|
+
default: "absolute-fill",
|
|
786
|
+
description: "Layout",
|
|
787
|
+
variants: {
|
|
788
|
+
"absolute-fill": sequenceStyleSchema,
|
|
789
|
+
none: {}
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
};
|
|
793
|
+
var sequenceSchemaDefaultLayoutNone = {
|
|
794
|
+
...sequenceSchema,
|
|
795
|
+
layout: {
|
|
796
|
+
...sequenceSchema.layout,
|
|
797
|
+
default: "none"
|
|
798
|
+
}
|
|
799
|
+
};
|
|
702
800
|
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
703
801
|
var validateFrame = ({
|
|
704
802
|
allowFloats,
|
|
@@ -862,7 +960,8 @@ var NoReactInternals = {
|
|
|
862
960
|
FILE_TOKEN,
|
|
863
961
|
validateCodec,
|
|
864
962
|
proResProfileOptions,
|
|
865
|
-
findPropsToDelete
|
|
963
|
+
findPropsToDelete,
|
|
964
|
+
sequenceSchema
|
|
866
965
|
};
|
|
867
966
|
|
|
868
967
|
// src/scripts/render-still.ts
|
|
@@ -1039,6 +1138,23 @@ function checkInfiniteRange(name, arr) {
|
|
|
1039
1138
|
}
|
|
1040
1139
|
}
|
|
1041
1140
|
}
|
|
1141
|
+
function assertValidInterpolateEasingOption(easing, inputRangeLength) {
|
|
1142
|
+
if (easing === undefined) {
|
|
1143
|
+
return;
|
|
1144
|
+
}
|
|
1145
|
+
if (typeof easing === "function") {
|
|
1146
|
+
return;
|
|
1147
|
+
}
|
|
1148
|
+
const expectedLength = inputRangeLength - 1;
|
|
1149
|
+
if (easing.length !== expectedLength) {
|
|
1150
|
+
throw new Error(\`When easing is an array, it must have one entry per segment between keyframes (length inputRange.length - 1 = \${expectedLength}), but got length \${easing.length}\`);
|
|
1151
|
+
}
|
|
1152
|
+
for (let i = 0;i < easing.length; i++) {
|
|
1153
|
+
if (typeof easing[i] !== "function") {
|
|
1154
|
+
throw new Error(\`easing[\${i}] must be a function\`);
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1042
1158
|
function interpolate(input, inputRange, outputRange, options) {
|
|
1043
1159
|
if (typeof input === "undefined") {
|
|
1044
1160
|
throw new Error("input can not be undefined");
|
|
@@ -1055,7 +1171,18 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
1055
1171
|
checkInfiniteRange("inputRange", inputRange);
|
|
1056
1172
|
checkInfiniteRange("outputRange", outputRange);
|
|
1057
1173
|
checkValidInputRange(inputRange);
|
|
1058
|
-
|
|
1174
|
+
assertValidInterpolateEasingOption(options?.easing, inputRange.length);
|
|
1175
|
+
const easingOption = options?.easing;
|
|
1176
|
+
const defaultEasing = (num) => num;
|
|
1177
|
+
const resolveEasingForSegment = (segmentIndex) => {
|
|
1178
|
+
if (easingOption === undefined) {
|
|
1179
|
+
return defaultEasing;
|
|
1180
|
+
}
|
|
1181
|
+
if (typeof easingOption === "function") {
|
|
1182
|
+
return easingOption;
|
|
1183
|
+
}
|
|
1184
|
+
return easingOption[segmentIndex];
|
|
1185
|
+
};
|
|
1059
1186
|
let extrapolateLeft = "extend";
|
|
1060
1187
|
if (options?.extrapolateLeft !== undefined) {
|
|
1061
1188
|
extrapolateLeft = options.extrapolateLeft;
|
|
@@ -1069,7 +1196,7 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
1069
1196
|
}
|
|
1070
1197
|
const range = findRange(input, inputRange);
|
|
1071
1198
|
return interpolateFunction(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {
|
|
1072
|
-
easing,
|
|
1199
|
+
easing: resolveEasingForSegment(range),
|
|
1073
1200
|
extrapolateLeft,
|
|
1074
1201
|
extrapolateRight
|
|
1075
1202
|
});
|
|
@@ -1623,6 +1750,76 @@ var proResProfileOptions = [
|
|
|
1623
1750
|
"light",
|
|
1624
1751
|
"proxy"
|
|
1625
1752
|
];
|
|
1753
|
+
var sequenceStyleSchema = {
|
|
1754
|
+
"style.translate": {
|
|
1755
|
+
type: "translate",
|
|
1756
|
+
step: 1,
|
|
1757
|
+
default: "0px 0px",
|
|
1758
|
+
description: "Offset"
|
|
1759
|
+
},
|
|
1760
|
+
"style.scale": {
|
|
1761
|
+
type: "number",
|
|
1762
|
+
min: 0.05,
|
|
1763
|
+
max: 100,
|
|
1764
|
+
step: 0.01,
|
|
1765
|
+
default: 1,
|
|
1766
|
+
description: "Scale"
|
|
1767
|
+
},
|
|
1768
|
+
"style.rotate": {
|
|
1769
|
+
type: "rotation",
|
|
1770
|
+
step: 1,
|
|
1771
|
+
default: "0deg",
|
|
1772
|
+
description: "Rotation"
|
|
1773
|
+
},
|
|
1774
|
+
"style.opacity": {
|
|
1775
|
+
type: "number",
|
|
1776
|
+
min: 0,
|
|
1777
|
+
max: 1,
|
|
1778
|
+
step: 0.01,
|
|
1779
|
+
default: 1,
|
|
1780
|
+
description: "Opacity"
|
|
1781
|
+
},
|
|
1782
|
+
premountFor: {
|
|
1783
|
+
type: "number",
|
|
1784
|
+
default: 0,
|
|
1785
|
+
description: "Premount For",
|
|
1786
|
+
min: 0,
|
|
1787
|
+
step: 1
|
|
1788
|
+
},
|
|
1789
|
+
postmountFor: {
|
|
1790
|
+
type: "hidden"
|
|
1791
|
+
},
|
|
1792
|
+
styleWhilePremounted: {
|
|
1793
|
+
type: "hidden"
|
|
1794
|
+
},
|
|
1795
|
+
styleWhilePostmounted: {
|
|
1796
|
+
type: "hidden"
|
|
1797
|
+
}
|
|
1798
|
+
};
|
|
1799
|
+
var hiddenField = {
|
|
1800
|
+
type: "boolean",
|
|
1801
|
+
default: false,
|
|
1802
|
+
description: "Hidden"
|
|
1803
|
+
};
|
|
1804
|
+
var sequenceSchema = {
|
|
1805
|
+
hidden: hiddenField,
|
|
1806
|
+
layout: {
|
|
1807
|
+
type: "enum",
|
|
1808
|
+
default: "absolute-fill",
|
|
1809
|
+
description: "Layout",
|
|
1810
|
+
variants: {
|
|
1811
|
+
"absolute-fill": sequenceStyleSchema,
|
|
1812
|
+
none: {}
|
|
1813
|
+
}
|
|
1814
|
+
}
|
|
1815
|
+
};
|
|
1816
|
+
var sequenceSchemaDefaultLayoutNone = {
|
|
1817
|
+
...sequenceSchema,
|
|
1818
|
+
layout: {
|
|
1819
|
+
...sequenceSchema.layout,
|
|
1820
|
+
default: "none"
|
|
1821
|
+
}
|
|
1822
|
+
};
|
|
1626
1823
|
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
1627
1824
|
var validateFrame = ({
|
|
1628
1825
|
allowFloats,
|
|
@@ -1786,7 +1983,8 @@ var NoReactInternals = {
|
|
|
1786
1983
|
FILE_TOKEN,
|
|
1787
1984
|
validateCodec,
|
|
1788
1985
|
proResProfileOptions,
|
|
1789
|
-
findPropsToDelete
|
|
1986
|
+
findPropsToDelete,
|
|
1987
|
+
sequenceSchema
|
|
1790
1988
|
};
|
|
1791
1989
|
|
|
1792
1990
|
// src/scripts/render-video.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/vercel",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.463",
|
|
4
4
|
"description": "Render Remotion videos on Vercel Sandbox",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
"repository": {
|
|
9
9
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/vercel"
|
|
10
10
|
},
|
|
11
|
-
"sideEffects": false,
|
|
12
11
|
"type": "module",
|
|
13
12
|
"scripts": {
|
|
14
13
|
"formatting": "oxfmt src --check",
|
|
@@ -24,8 +23,8 @@
|
|
|
24
23
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
25
24
|
},
|
|
26
25
|
"dependencies": {
|
|
27
|
-
"@remotion/renderer": "4.0.
|
|
28
|
-
"remotion": "4.0.
|
|
26
|
+
"@remotion/renderer": "4.0.463",
|
|
27
|
+
"remotion": "4.0.463"
|
|
29
28
|
},
|
|
30
29
|
"peerDependencies": {
|
|
31
30
|
"@vercel/sandbox": ">=1.0.0"
|
|
@@ -39,7 +38,7 @@
|
|
|
39
38
|
"./package.json": "./package.json"
|
|
40
39
|
},
|
|
41
40
|
"devDependencies": {
|
|
42
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
41
|
+
"@remotion/eslint-config-internal": "4.0.463",
|
|
43
42
|
"@vercel/blob": "2.3.0",
|
|
44
43
|
"@vercel/sandbox": "1.6.0",
|
|
45
44
|
"eslint": "9.19.0",
|