@remotion/lambda-client 4.0.468 → 4.0.470
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/cjs/index.js +18 -5
- package/dist/esm/index.mjs +18 -5
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -69909,8 +69909,8 @@ function checkValidInputRange(arr) {
|
|
|
69909
69909
|
}
|
|
69910
69910
|
}
|
|
69911
69911
|
function checkInfiniteRange(name, arr) {
|
|
69912
|
-
if (arr.length <
|
|
69913
|
-
throw new Error(name + " must have at least
|
|
69912
|
+
if (arr.length < 1) {
|
|
69913
|
+
throw new Error(name + " must have at least 1 element");
|
|
69914
69914
|
}
|
|
69915
69915
|
for (const element of arr) {
|
|
69916
69916
|
if (typeof element !== "number") {
|
|
@@ -69938,6 +69938,14 @@ function assertValidInterpolateEasingOption(easing, inputRangeLength) {
|
|
|
69938
69938
|
}
|
|
69939
69939
|
}
|
|
69940
69940
|
}
|
|
69941
|
+
function assertValidInterpolatePosterizeOption(posterize) {
|
|
69942
|
+
if (posterize === undefined) {
|
|
69943
|
+
return;
|
|
69944
|
+
}
|
|
69945
|
+
if (typeof posterize !== "number" || !Number.isFinite(posterize) || posterize <= 0) {
|
|
69946
|
+
throw new Error(`posterize must be a positive finite number, but got ${posterize}`);
|
|
69947
|
+
}
|
|
69948
|
+
}
|
|
69941
69949
|
function interpolate(input, inputRange, outputRange, options) {
|
|
69942
69950
|
if (typeof input === "undefined") {
|
|
69943
69951
|
throw new Error("input can not be undefined");
|
|
@@ -69955,6 +69963,7 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
69955
69963
|
checkInfiniteRange("outputRange", outputRange);
|
|
69956
69964
|
checkValidInputRange(inputRange);
|
|
69957
69965
|
assertValidInterpolateEasingOption(options?.easing, inputRange.length);
|
|
69966
|
+
assertValidInterpolatePosterizeOption(options?.posterize);
|
|
69958
69967
|
const easingOption = options?.easing;
|
|
69959
69968
|
const defaultEasing = (num) => num;
|
|
69960
69969
|
const resolveEasingForSegment = (segmentIndex) => {
|
|
@@ -69977,8 +69986,12 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
69977
69986
|
if (typeof input !== "number") {
|
|
69978
69987
|
throw new TypeError("Cannot interpolate an input which is not a number");
|
|
69979
69988
|
}
|
|
69980
|
-
|
|
69981
|
-
|
|
69989
|
+
if (inputRange.length === 1) {
|
|
69990
|
+
return outputRange[0];
|
|
69991
|
+
}
|
|
69992
|
+
const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
|
|
69993
|
+
const range = findRange(posterizedInput, inputRange);
|
|
69994
|
+
return interpolateFunction(posterizedInput, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {
|
|
69982
69995
|
easing: resolveEasingForSegment(range),
|
|
69983
69996
|
extrapolateLeft,
|
|
69984
69997
|
extrapolateRight
|
|
@@ -70871,7 +70884,7 @@ var validateDownloadBehavior = (downloadBehavior) => {
|
|
|
70871
70884
|
}
|
|
70872
70885
|
}
|
|
70873
70886
|
};
|
|
70874
|
-
var VERSION = "4.0.
|
|
70887
|
+
var VERSION = "4.0.470";
|
|
70875
70888
|
var isColorSupported = () => {
|
|
70876
70889
|
const env = process.env || {};
|
|
70877
70890
|
const isForceDisabled = "NO_COLOR" in env;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -69252,8 +69252,8 @@ function checkValidInputRange(arr) {
|
|
|
69252
69252
|
}
|
|
69253
69253
|
}
|
|
69254
69254
|
function checkInfiniteRange(name, arr) {
|
|
69255
|
-
if (arr.length <
|
|
69256
|
-
throw new Error(name + " must have at least
|
|
69255
|
+
if (arr.length < 1) {
|
|
69256
|
+
throw new Error(name + " must have at least 1 element");
|
|
69257
69257
|
}
|
|
69258
69258
|
for (const element of arr) {
|
|
69259
69259
|
if (typeof element !== "number") {
|
|
@@ -69281,6 +69281,14 @@ function assertValidInterpolateEasingOption(easing, inputRangeLength) {
|
|
|
69281
69281
|
}
|
|
69282
69282
|
}
|
|
69283
69283
|
}
|
|
69284
|
+
function assertValidInterpolatePosterizeOption(posterize) {
|
|
69285
|
+
if (posterize === undefined) {
|
|
69286
|
+
return;
|
|
69287
|
+
}
|
|
69288
|
+
if (typeof posterize !== "number" || !Number.isFinite(posterize) || posterize <= 0) {
|
|
69289
|
+
throw new Error(`posterize must be a positive finite number, but got ${posterize}`);
|
|
69290
|
+
}
|
|
69291
|
+
}
|
|
69284
69292
|
function interpolate(input, inputRange, outputRange, options) {
|
|
69285
69293
|
if (typeof input === "undefined") {
|
|
69286
69294
|
throw new Error("input can not be undefined");
|
|
@@ -69298,6 +69306,7 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
69298
69306
|
checkInfiniteRange("outputRange", outputRange);
|
|
69299
69307
|
checkValidInputRange(inputRange);
|
|
69300
69308
|
assertValidInterpolateEasingOption(options?.easing, inputRange.length);
|
|
69309
|
+
assertValidInterpolatePosterizeOption(options?.posterize);
|
|
69301
69310
|
const easingOption = options?.easing;
|
|
69302
69311
|
const defaultEasing = (num) => num;
|
|
69303
69312
|
const resolveEasingForSegment = (segmentIndex) => {
|
|
@@ -69320,8 +69329,12 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
69320
69329
|
if (typeof input !== "number") {
|
|
69321
69330
|
throw new TypeError("Cannot interpolate an input which is not a number");
|
|
69322
69331
|
}
|
|
69323
|
-
|
|
69324
|
-
|
|
69332
|
+
if (inputRange.length === 1) {
|
|
69333
|
+
return outputRange[0];
|
|
69334
|
+
}
|
|
69335
|
+
const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
|
|
69336
|
+
const range = findRange(posterizedInput, inputRange);
|
|
69337
|
+
return interpolateFunction(posterizedInput, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {
|
|
69325
69338
|
easing: resolveEasingForSegment(range),
|
|
69326
69339
|
extrapolateLeft,
|
|
69327
69340
|
extrapolateRight
|
|
@@ -70214,7 +70227,7 @@ var validateDownloadBehavior = (downloadBehavior) => {
|
|
|
70214
70227
|
}
|
|
70215
70228
|
}
|
|
70216
70229
|
};
|
|
70217
|
-
var VERSION = "4.0.
|
|
70230
|
+
var VERSION = "4.0.470";
|
|
70218
70231
|
var isColorSupported = () => {
|
|
70219
70232
|
const env = process.env || {};
|
|
70220
70233
|
const isForceDisabled = "NO_COLOR" in env;
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/lambda-client"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/lambda-client",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.470",
|
|
7
7
|
"main": "dist/cjs/index.js",
|
|
8
8
|
"scripts": {
|
|
9
9
|
"formatting": "oxfmt src --check",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"@aws-sdk/lib-storage": "3.986.0",
|
|
27
27
|
"mime-types": "2.1.34",
|
|
28
28
|
"@aws-sdk/credential-provider-ini": "3.972.5",
|
|
29
|
-
"@remotion/serverless-client": "4.0.
|
|
29
|
+
"@remotion/serverless-client": "4.0.470",
|
|
30
30
|
"@types/express": "5.0.1",
|
|
31
31
|
"express": "4.21.0",
|
|
32
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
32
|
+
"@remotion/eslint-config-internal": "4.0.470",
|
|
33
33
|
"eslint": "9.19.0",
|
|
34
34
|
"next": "16.2.6",
|
|
35
35
|
"@types/mime-types": "2.1.1",
|