@remotion/lambda-client 4.0.488 → 4.0.490
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 +52 -13
- package/dist/esm/index.mjs +52 -13
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -70107,8 +70107,20 @@ var serializeStringInterpolationValue = ({
|
|
|
70107
70107
|
}
|
|
70108
70108
|
return values.slice(0, dimensions).map((value, index) => `${stringifyNumber(value)}${units[index]}`).join(" ");
|
|
70109
70109
|
};
|
|
70110
|
+
var toSignedArea = (scale) => {
|
|
70111
|
+
if (scale === 0) {
|
|
70112
|
+
return 0;
|
|
70113
|
+
}
|
|
70114
|
+
return Math.sign(scale) * scale * scale;
|
|
70115
|
+
};
|
|
70116
|
+
var fromSignedArea = (area) => {
|
|
70117
|
+
if (area === 0) {
|
|
70118
|
+
return 0;
|
|
70119
|
+
}
|
|
70120
|
+
return Math.sign(area) * Math.sqrt(Math.abs(area));
|
|
70121
|
+
};
|
|
70110
70122
|
function interpolateFunction(input, inputRange, outputRange, options) {
|
|
70111
|
-
const { extrapolateLeft, extrapolateRight, easing } = options;
|
|
70123
|
+
const { extrapolateLeft, extrapolateRight, easing, output } = options;
|
|
70112
70124
|
let result = input;
|
|
70113
70125
|
const [inputMin, inputMax] = inputRange;
|
|
70114
70126
|
const [outputMin, outputMax] = outputRange;
|
|
@@ -70139,7 +70151,13 @@ function interpolateFunction(input, inputRange, outputRange, options) {
|
|
|
70139
70151
|
}
|
|
70140
70152
|
result = (result - inputMin) / (inputMax - inputMin);
|
|
70141
70153
|
result = easing(result);
|
|
70142
|
-
|
|
70154
|
+
if (output === "perceptual-scale") {
|
|
70155
|
+
const signedAreaMin = toSignedArea(outputMin);
|
|
70156
|
+
const signedAreaMax = toSignedArea(outputMax);
|
|
70157
|
+
result = fromSignedArea(result * (signedAreaMax - signedAreaMin) + signedAreaMin);
|
|
70158
|
+
} else {
|
|
70159
|
+
result = result * (outputMax - outputMin) + outputMin;
|
|
70160
|
+
}
|
|
70143
70161
|
return result;
|
|
70144
70162
|
}
|
|
70145
70163
|
function findRange(input, inputRange) {
|
|
@@ -70152,6 +70170,9 @@ function findRange(input, inputRange) {
|
|
|
70152
70170
|
return i - 1;
|
|
70153
70171
|
}
|
|
70154
70172
|
var defaultEasing = (num) => num;
|
|
70173
|
+
var resolveOutputOption = (output) => {
|
|
70174
|
+
return output ?? "linear";
|
|
70175
|
+
};
|
|
70155
70176
|
var shouldExtendRightForEasing = (easing) => {
|
|
70156
70177
|
return easing.remotionShouldExtendRight === true;
|
|
70157
70178
|
};
|
|
@@ -70173,12 +70194,14 @@ var interpolateSegment = ({
|
|
|
70173
70194
|
outputRange,
|
|
70174
70195
|
easing,
|
|
70175
70196
|
extrapolateLeft,
|
|
70176
|
-
extrapolateRight
|
|
70197
|
+
extrapolateRight,
|
|
70198
|
+
output
|
|
70177
70199
|
}) => {
|
|
70178
70200
|
return interpolateFunction(input, inputRange, outputRange, {
|
|
70179
70201
|
easing,
|
|
70180
70202
|
extrapolateLeft,
|
|
70181
|
-
extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing(easing) ? "extend" : extrapolateRight
|
|
70203
|
+
extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing(easing) ? "extend" : extrapolateRight,
|
|
70204
|
+
output
|
|
70182
70205
|
});
|
|
70183
70206
|
};
|
|
70184
70207
|
var interpolateNumber = ({
|
|
@@ -70187,6 +70210,7 @@ var interpolateNumber = ({
|
|
|
70187
70210
|
outputRange,
|
|
70188
70211
|
options
|
|
70189
70212
|
}) => {
|
|
70213
|
+
const output = resolveOutputOption(options?.output);
|
|
70190
70214
|
if (inputRange.length === 1) {
|
|
70191
70215
|
return outputRange[0];
|
|
70192
70216
|
}
|
|
@@ -70211,7 +70235,8 @@ var interpolateNumber = ({
|
|
|
70211
70235
|
outputRange: [outputRange[range], outputRange[range + 1]],
|
|
70212
70236
|
easing,
|
|
70213
70237
|
extrapolateLeft,
|
|
70214
|
-
extrapolateRight
|
|
70238
|
+
extrapolateRight,
|
|
70239
|
+
output
|
|
70215
70240
|
});
|
|
70216
70241
|
for (let segmentIndex = 0;segmentIndex < range; segmentIndex++) {
|
|
70217
70242
|
const previousEasing = resolveEasingForSegment({
|
|
@@ -70231,7 +70256,8 @@ var interpolateNumber = ({
|
|
|
70231
70256
|
outputRange: [outputRange[segmentIndex], outputRange[segmentIndex + 1]],
|
|
70232
70257
|
easing: previousEasing,
|
|
70233
70258
|
extrapolateLeft,
|
|
70234
|
-
extrapolateRight: "extend"
|
|
70259
|
+
extrapolateRight: "extend",
|
|
70260
|
+
output
|
|
70235
70261
|
});
|
|
70236
70262
|
result += continuedSegmentValue - outputRange[segmentIndex + 1];
|
|
70237
70263
|
}
|
|
@@ -70279,14 +70305,18 @@ var interpolateString = ({
|
|
|
70279
70305
|
}
|
|
70280
70306
|
}
|
|
70281
70307
|
}
|
|
70282
|
-
|
|
70283
|
-
|
|
70284
|
-
values
|
|
70308
|
+
const values = [0, 0, 0];
|
|
70309
|
+
for (let axis = 0;axis < dimensions; axis++) {
|
|
70310
|
+
values[axis] = interpolateNumber({
|
|
70285
70311
|
input,
|
|
70286
70312
|
inputRange,
|
|
70287
70313
|
outputRange: parsedOutputRange.map((parsed) => parsed.values[axis]),
|
|
70288
70314
|
options
|
|
70289
|
-
})
|
|
70315
|
+
});
|
|
70316
|
+
}
|
|
70317
|
+
return serializeStringInterpolationValue({
|
|
70318
|
+
kind,
|
|
70319
|
+
values,
|
|
70290
70320
|
units,
|
|
70291
70321
|
dimensions
|
|
70292
70322
|
});
|
|
@@ -70370,6 +70400,12 @@ function assertValidInterpolatePosterizeOption(posterize) {
|
|
|
70370
70400
|
throw new Error(`posterize must be a positive finite number, but got ${posterize}`);
|
|
70371
70401
|
}
|
|
70372
70402
|
}
|
|
70403
|
+
function assertValidInterpolateOutputOption(output) {
|
|
70404
|
+
if (output === undefined || output === "linear" || output === "perceptual-scale") {
|
|
70405
|
+
return;
|
|
70406
|
+
}
|
|
70407
|
+
throw new Error(`output must be "linear" or "perceptual-scale", but got ${String(output)}`);
|
|
70408
|
+
}
|
|
70373
70409
|
function interpolate(input, inputRange, outputRange, options) {
|
|
70374
70410
|
if (typeof input === "undefined") {
|
|
70375
70411
|
throw new Error("input can not be undefined");
|
|
@@ -70387,6 +70423,7 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
70387
70423
|
checkValidInputRange(inputRange);
|
|
70388
70424
|
assertValidInterpolateEasingOption(options?.easing, inputRange.length);
|
|
70389
70425
|
assertValidInterpolatePosterizeOption(options?.posterize);
|
|
70426
|
+
assertValidInterpolateOutputOption(options?.output);
|
|
70390
70427
|
if (typeof input !== "number") {
|
|
70391
70428
|
throw new TypeError("Cannot interpolate an input which is not a number");
|
|
70392
70429
|
}
|
|
@@ -70551,7 +70588,8 @@ var transformSchema = {
|
|
|
70551
70588
|
max: 100,
|
|
70552
70589
|
step: 0.01,
|
|
70553
70590
|
default: 1,
|
|
70554
|
-
description: "Scale"
|
|
70591
|
+
description: "Scale",
|
|
70592
|
+
defaultKeyframeOutput: "perceptual-scale"
|
|
70555
70593
|
},
|
|
70556
70594
|
"style.rotate": {
|
|
70557
70595
|
type: "rotation-css",
|
|
@@ -71401,7 +71439,7 @@ var validateDownloadBehavior = (downloadBehavior) => {
|
|
|
71401
71439
|
}
|
|
71402
71440
|
}
|
|
71403
71441
|
};
|
|
71404
|
-
var VERSION = "4.0.
|
|
71442
|
+
var VERSION = "4.0.490";
|
|
71405
71443
|
var isColorSupported = () => {
|
|
71406
71444
|
const env = process.env || {};
|
|
71407
71445
|
const isForceDisabled = "NO_COLOR" in env;
|
|
@@ -75634,7 +75672,8 @@ var lambdaWriteFileImplementation = async (params) => {
|
|
|
75634
75672
|
try {
|
|
75635
75673
|
await tryLambdaWriteFile(params);
|
|
75636
75674
|
} catch (err) {
|
|
75637
|
-
|
|
75675
|
+
const bodyCanBeRetried = typeof params.body === "string" || params.body instanceof Uint8Array;
|
|
75676
|
+
if (remainingRetries === 0 || !bodyCanBeRetried) {
|
|
75638
75677
|
throw err;
|
|
75639
75678
|
}
|
|
75640
75679
|
const backoff = 2 ** (2 - remainingRetries) * 2000;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -69450,8 +69450,20 @@ var serializeStringInterpolationValue = ({
|
|
|
69450
69450
|
}
|
|
69451
69451
|
return values.slice(0, dimensions).map((value, index) => `${stringifyNumber(value)}${units[index]}`).join(" ");
|
|
69452
69452
|
};
|
|
69453
|
+
var toSignedArea = (scale) => {
|
|
69454
|
+
if (scale === 0) {
|
|
69455
|
+
return 0;
|
|
69456
|
+
}
|
|
69457
|
+
return Math.sign(scale) * scale * scale;
|
|
69458
|
+
};
|
|
69459
|
+
var fromSignedArea = (area) => {
|
|
69460
|
+
if (area === 0) {
|
|
69461
|
+
return 0;
|
|
69462
|
+
}
|
|
69463
|
+
return Math.sign(area) * Math.sqrt(Math.abs(area));
|
|
69464
|
+
};
|
|
69453
69465
|
function interpolateFunction(input, inputRange, outputRange, options) {
|
|
69454
|
-
const { extrapolateLeft, extrapolateRight, easing } = options;
|
|
69466
|
+
const { extrapolateLeft, extrapolateRight, easing, output } = options;
|
|
69455
69467
|
let result = input;
|
|
69456
69468
|
const [inputMin, inputMax] = inputRange;
|
|
69457
69469
|
const [outputMin, outputMax] = outputRange;
|
|
@@ -69482,7 +69494,13 @@ function interpolateFunction(input, inputRange, outputRange, options) {
|
|
|
69482
69494
|
}
|
|
69483
69495
|
result = (result - inputMin) / (inputMax - inputMin);
|
|
69484
69496
|
result = easing(result);
|
|
69485
|
-
|
|
69497
|
+
if (output === "perceptual-scale") {
|
|
69498
|
+
const signedAreaMin = toSignedArea(outputMin);
|
|
69499
|
+
const signedAreaMax = toSignedArea(outputMax);
|
|
69500
|
+
result = fromSignedArea(result * (signedAreaMax - signedAreaMin) + signedAreaMin);
|
|
69501
|
+
} else {
|
|
69502
|
+
result = result * (outputMax - outputMin) + outputMin;
|
|
69503
|
+
}
|
|
69486
69504
|
return result;
|
|
69487
69505
|
}
|
|
69488
69506
|
function findRange(input, inputRange) {
|
|
@@ -69495,6 +69513,9 @@ function findRange(input, inputRange) {
|
|
|
69495
69513
|
return i - 1;
|
|
69496
69514
|
}
|
|
69497
69515
|
var defaultEasing = (num) => num;
|
|
69516
|
+
var resolveOutputOption = (output) => {
|
|
69517
|
+
return output ?? "linear";
|
|
69518
|
+
};
|
|
69498
69519
|
var shouldExtendRightForEasing = (easing) => {
|
|
69499
69520
|
return easing.remotionShouldExtendRight === true;
|
|
69500
69521
|
};
|
|
@@ -69516,12 +69537,14 @@ var interpolateSegment = ({
|
|
|
69516
69537
|
outputRange,
|
|
69517
69538
|
easing,
|
|
69518
69539
|
extrapolateLeft,
|
|
69519
|
-
extrapolateRight
|
|
69540
|
+
extrapolateRight,
|
|
69541
|
+
output
|
|
69520
69542
|
}) => {
|
|
69521
69543
|
return interpolateFunction(input, inputRange, outputRange, {
|
|
69522
69544
|
easing,
|
|
69523
69545
|
extrapolateLeft,
|
|
69524
|
-
extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing(easing) ? "extend" : extrapolateRight
|
|
69546
|
+
extrapolateRight: input > inputRange[1] && extrapolateRight === "clamp" && shouldExtendRightForEasing(easing) ? "extend" : extrapolateRight,
|
|
69547
|
+
output
|
|
69525
69548
|
});
|
|
69526
69549
|
};
|
|
69527
69550
|
var interpolateNumber = ({
|
|
@@ -69530,6 +69553,7 @@ var interpolateNumber = ({
|
|
|
69530
69553
|
outputRange,
|
|
69531
69554
|
options
|
|
69532
69555
|
}) => {
|
|
69556
|
+
const output = resolveOutputOption(options?.output);
|
|
69533
69557
|
if (inputRange.length === 1) {
|
|
69534
69558
|
return outputRange[0];
|
|
69535
69559
|
}
|
|
@@ -69554,7 +69578,8 @@ var interpolateNumber = ({
|
|
|
69554
69578
|
outputRange: [outputRange[range], outputRange[range + 1]],
|
|
69555
69579
|
easing,
|
|
69556
69580
|
extrapolateLeft,
|
|
69557
|
-
extrapolateRight
|
|
69581
|
+
extrapolateRight,
|
|
69582
|
+
output
|
|
69558
69583
|
});
|
|
69559
69584
|
for (let segmentIndex = 0;segmentIndex < range; segmentIndex++) {
|
|
69560
69585
|
const previousEasing = resolveEasingForSegment({
|
|
@@ -69574,7 +69599,8 @@ var interpolateNumber = ({
|
|
|
69574
69599
|
outputRange: [outputRange[segmentIndex], outputRange[segmentIndex + 1]],
|
|
69575
69600
|
easing: previousEasing,
|
|
69576
69601
|
extrapolateLeft,
|
|
69577
|
-
extrapolateRight: "extend"
|
|
69602
|
+
extrapolateRight: "extend",
|
|
69603
|
+
output
|
|
69578
69604
|
});
|
|
69579
69605
|
result += continuedSegmentValue - outputRange[segmentIndex + 1];
|
|
69580
69606
|
}
|
|
@@ -69622,14 +69648,18 @@ var interpolateString = ({
|
|
|
69622
69648
|
}
|
|
69623
69649
|
}
|
|
69624
69650
|
}
|
|
69625
|
-
|
|
69626
|
-
|
|
69627
|
-
values
|
|
69651
|
+
const values = [0, 0, 0];
|
|
69652
|
+
for (let axis = 0;axis < dimensions; axis++) {
|
|
69653
|
+
values[axis] = interpolateNumber({
|
|
69628
69654
|
input,
|
|
69629
69655
|
inputRange,
|
|
69630
69656
|
outputRange: parsedOutputRange.map((parsed) => parsed.values[axis]),
|
|
69631
69657
|
options
|
|
69632
|
-
})
|
|
69658
|
+
});
|
|
69659
|
+
}
|
|
69660
|
+
return serializeStringInterpolationValue({
|
|
69661
|
+
kind,
|
|
69662
|
+
values,
|
|
69633
69663
|
units,
|
|
69634
69664
|
dimensions
|
|
69635
69665
|
});
|
|
@@ -69713,6 +69743,12 @@ function assertValidInterpolatePosterizeOption(posterize) {
|
|
|
69713
69743
|
throw new Error(`posterize must be a positive finite number, but got ${posterize}`);
|
|
69714
69744
|
}
|
|
69715
69745
|
}
|
|
69746
|
+
function assertValidInterpolateOutputOption(output) {
|
|
69747
|
+
if (output === undefined || output === "linear" || output === "perceptual-scale") {
|
|
69748
|
+
return;
|
|
69749
|
+
}
|
|
69750
|
+
throw new Error(`output must be "linear" or "perceptual-scale", but got ${String(output)}`);
|
|
69751
|
+
}
|
|
69716
69752
|
function interpolate(input, inputRange, outputRange, options) {
|
|
69717
69753
|
if (typeof input === "undefined") {
|
|
69718
69754
|
throw new Error("input can not be undefined");
|
|
@@ -69730,6 +69766,7 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
69730
69766
|
checkValidInputRange(inputRange);
|
|
69731
69767
|
assertValidInterpolateEasingOption(options?.easing, inputRange.length);
|
|
69732
69768
|
assertValidInterpolatePosterizeOption(options?.posterize);
|
|
69769
|
+
assertValidInterpolateOutputOption(options?.output);
|
|
69733
69770
|
if (typeof input !== "number") {
|
|
69734
69771
|
throw new TypeError("Cannot interpolate an input which is not a number");
|
|
69735
69772
|
}
|
|
@@ -69894,7 +69931,8 @@ var transformSchema = {
|
|
|
69894
69931
|
max: 100,
|
|
69895
69932
|
step: 0.01,
|
|
69896
69933
|
default: 1,
|
|
69897
|
-
description: "Scale"
|
|
69934
|
+
description: "Scale",
|
|
69935
|
+
defaultKeyframeOutput: "perceptual-scale"
|
|
69898
69936
|
},
|
|
69899
69937
|
"style.rotate": {
|
|
69900
69938
|
type: "rotation-css",
|
|
@@ -70744,7 +70782,7 @@ var validateDownloadBehavior = (downloadBehavior) => {
|
|
|
70744
70782
|
}
|
|
70745
70783
|
}
|
|
70746
70784
|
};
|
|
70747
|
-
var VERSION = "4.0.
|
|
70785
|
+
var VERSION = "4.0.490";
|
|
70748
70786
|
var isColorSupported = () => {
|
|
70749
70787
|
const env = process.env || {};
|
|
70750
70788
|
const isForceDisabled = "NO_COLOR" in env;
|
|
@@ -75461,7 +75499,8 @@ var lambdaWriteFileImplementation = async (params) => {
|
|
|
75461
75499
|
try {
|
|
75462
75500
|
await tryLambdaWriteFile(params);
|
|
75463
75501
|
} catch (err) {
|
|
75464
|
-
|
|
75502
|
+
const bodyCanBeRetried = typeof params.body === "string" || params.body instanceof Uint8Array;
|
|
75503
|
+
if (remainingRetries === 0 || !bodyCanBeRetried) {
|
|
75465
75504
|
throw err;
|
|
75466
75505
|
}
|
|
75467
75506
|
const backoff = 2 ** (2 - remainingRetries) * 2000;
|
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.490",
|
|
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.490",
|
|
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.490",
|
|
33
33
|
"eslint": "9.19.0",
|
|
34
34
|
"next": "16.2.6",
|
|
35
35
|
"@types/mime-types": "2.1.1",
|