@remotion/serverless-client 4.0.461 → 4.0.462
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 +97 -4
- package/package.json +5 -6
package/dist/esm/index.mjs
CHANGED
|
@@ -63,6 +63,23 @@ function checkInfiniteRange(name, arr) {
|
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
|
+
function assertValidInterpolateEasingOption(easing, inputRangeLength) {
|
|
67
|
+
if (easing === undefined) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (typeof easing === "function") {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
const expectedLength = inputRangeLength - 1;
|
|
74
|
+
if (easing.length !== expectedLength) {
|
|
75
|
+
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}`);
|
|
76
|
+
}
|
|
77
|
+
for (let i = 0;i < easing.length; i++) {
|
|
78
|
+
if (typeof easing[i] !== "function") {
|
|
79
|
+
throw new Error(`easing[${i}] must be a function`);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
66
83
|
function interpolate(input, inputRange, outputRange, options) {
|
|
67
84
|
if (typeof input === "undefined") {
|
|
68
85
|
throw new Error("input can not be undefined");
|
|
@@ -79,7 +96,18 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
79
96
|
checkInfiniteRange("inputRange", inputRange);
|
|
80
97
|
checkInfiniteRange("outputRange", outputRange);
|
|
81
98
|
checkValidInputRange(inputRange);
|
|
82
|
-
|
|
99
|
+
assertValidInterpolateEasingOption(options?.easing, inputRange.length);
|
|
100
|
+
const easingOption = options?.easing;
|
|
101
|
+
const defaultEasing = (num) => num;
|
|
102
|
+
const resolveEasingForSegment = (segmentIndex) => {
|
|
103
|
+
if (easingOption === undefined) {
|
|
104
|
+
return defaultEasing;
|
|
105
|
+
}
|
|
106
|
+
if (typeof easingOption === "function") {
|
|
107
|
+
return easingOption;
|
|
108
|
+
}
|
|
109
|
+
return easingOption[segmentIndex];
|
|
110
|
+
};
|
|
83
111
|
let extrapolateLeft = "extend";
|
|
84
112
|
if (options?.extrapolateLeft !== undefined) {
|
|
85
113
|
extrapolateLeft = options.extrapolateLeft;
|
|
@@ -93,7 +121,7 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
93
121
|
}
|
|
94
122
|
const range = findRange(input, inputRange);
|
|
95
123
|
return interpolateFunction(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {
|
|
96
|
-
easing,
|
|
124
|
+
easing: resolveEasingForSegment(range),
|
|
97
125
|
extrapolateLeft,
|
|
98
126
|
extrapolateRight
|
|
99
127
|
});
|
|
@@ -679,6 +707,70 @@ var proResProfileOptions = [
|
|
|
679
707
|
"light",
|
|
680
708
|
"proxy"
|
|
681
709
|
];
|
|
710
|
+
var sequenceStyleSchema = {
|
|
711
|
+
"style.translate": {
|
|
712
|
+
type: "translate",
|
|
713
|
+
step: 1,
|
|
714
|
+
default: "0px 0px",
|
|
715
|
+
description: "Offset"
|
|
716
|
+
},
|
|
717
|
+
"style.scale": {
|
|
718
|
+
type: "number",
|
|
719
|
+
min: 0.05,
|
|
720
|
+
max: 100,
|
|
721
|
+
step: 0.01,
|
|
722
|
+
default: 1,
|
|
723
|
+
description: "Scale"
|
|
724
|
+
},
|
|
725
|
+
"style.rotate": {
|
|
726
|
+
type: "rotation",
|
|
727
|
+
step: 1,
|
|
728
|
+
default: "0deg",
|
|
729
|
+
description: "Rotation"
|
|
730
|
+
},
|
|
731
|
+
"style.opacity": {
|
|
732
|
+
type: "number",
|
|
733
|
+
min: 0,
|
|
734
|
+
max: 1,
|
|
735
|
+
step: 0.01,
|
|
736
|
+
default: 1,
|
|
737
|
+
description: "Opacity"
|
|
738
|
+
},
|
|
739
|
+
premountFor: {
|
|
740
|
+
type: "number",
|
|
741
|
+
default: 0,
|
|
742
|
+
description: "Premount For",
|
|
743
|
+
min: 0,
|
|
744
|
+
step: 1
|
|
745
|
+
},
|
|
746
|
+
postmountFor: {
|
|
747
|
+
type: "hidden"
|
|
748
|
+
},
|
|
749
|
+
styleWhilePremounted: {
|
|
750
|
+
type: "hidden"
|
|
751
|
+
},
|
|
752
|
+
styleWhilePostmounted: {
|
|
753
|
+
type: "hidden"
|
|
754
|
+
}
|
|
755
|
+
};
|
|
756
|
+
var sequenceSchema = {
|
|
757
|
+
layout: {
|
|
758
|
+
type: "enum",
|
|
759
|
+
default: "absolute-fill",
|
|
760
|
+
description: "Layout",
|
|
761
|
+
variants: {
|
|
762
|
+
"absolute-fill": sequenceStyleSchema,
|
|
763
|
+
none: {}
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
};
|
|
767
|
+
var sequenceSchemaDefaultLayoutNone = {
|
|
768
|
+
...sequenceSchema,
|
|
769
|
+
layout: {
|
|
770
|
+
...sequenceSchema.layout,
|
|
771
|
+
default: "none"
|
|
772
|
+
}
|
|
773
|
+
};
|
|
682
774
|
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
683
775
|
var validateFrame = ({
|
|
684
776
|
allowFloats,
|
|
@@ -842,7 +934,8 @@ var NoReactInternals = {
|
|
|
842
934
|
FILE_TOKEN,
|
|
843
935
|
validateCodec,
|
|
844
936
|
proResProfileOptions,
|
|
845
|
-
findPropsToDelete
|
|
937
|
+
findPropsToDelete,
|
|
938
|
+
sequenceSchema
|
|
846
939
|
};
|
|
847
940
|
|
|
848
941
|
// src/constants.ts
|
|
@@ -1031,7 +1124,7 @@ var validateFramesPerFunction = ({
|
|
|
1031
1124
|
import * as tty from "tty";
|
|
1032
1125
|
|
|
1033
1126
|
// ../core/dist/esm/version.mjs
|
|
1034
|
-
var VERSION = "4.0.
|
|
1127
|
+
var VERSION = "4.0.462";
|
|
1035
1128
|
|
|
1036
1129
|
// ../renderer/dist/esm/error-handling.mjs
|
|
1037
1130
|
var isColorSupported = () => {
|
package/package.json
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/serverless-client"
|
|
4
4
|
},
|
|
5
5
|
"name": "@remotion/serverless-client",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.462",
|
|
7
7
|
"main": "dist",
|
|
8
|
-
"sideEffects": false,
|
|
9
8
|
"scripts": {
|
|
10
9
|
"lint": "eslint src",
|
|
11
10
|
"formatting": "oxfmt src --check",
|
|
@@ -24,10 +23,10 @@
|
|
|
24
23
|
},
|
|
25
24
|
"dependencies": {},
|
|
26
25
|
"devDependencies": {
|
|
27
|
-
"remotion": "4.0.
|
|
28
|
-
"@remotion/streaming": "4.0.
|
|
29
|
-
"@remotion/renderer": "4.0.
|
|
30
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
26
|
+
"remotion": "4.0.462",
|
|
27
|
+
"@remotion/streaming": "4.0.462",
|
|
28
|
+
"@remotion/renderer": "4.0.462",
|
|
29
|
+
"@remotion/eslint-config-internal": "4.0.462",
|
|
31
30
|
"eslint": "9.19.0",
|
|
32
31
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
33
32
|
},
|