@remotion/serverless-client 4.0.460 → 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 +128 -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
|
});
|
|
@@ -144,6 +172,36 @@ var DELAY_RENDER_CALLSTACK_TOKEN = "The delayRender was called:";
|
|
|
144
172
|
var DELAY_RENDER_RETRIES_LEFT = "Retries left: ";
|
|
145
173
|
var DELAY_RENDER_RETRY_TOKEN = "- Rendering the frame will be retried.";
|
|
146
174
|
var DELAY_RENDER_CLEAR_TOKEN = "handle was cleared after";
|
|
175
|
+
var findPropsToDelete = ({
|
|
176
|
+
schema,
|
|
177
|
+
key,
|
|
178
|
+
value
|
|
179
|
+
}) => {
|
|
180
|
+
const fieldSchema = schema[key];
|
|
181
|
+
if (!fieldSchema) {
|
|
182
|
+
throw new Error("Key " + JSON.stringify(key) + " not found in schema");
|
|
183
|
+
}
|
|
184
|
+
if (typeof value !== "string") {
|
|
185
|
+
throw new Error("Value must be a string, but is " + JSON.stringify(value));
|
|
186
|
+
}
|
|
187
|
+
if (fieldSchema.type !== "enum") {
|
|
188
|
+
throw new Error("Key " + JSON.stringify(key) + " is not an enum");
|
|
189
|
+
}
|
|
190
|
+
const currentVariant = fieldSchema.variants[value];
|
|
191
|
+
if (!currentVariant) {
|
|
192
|
+
throw new Error("Value for " + JSON.stringify(key) + " must be one of " + Object.keys(fieldSchema.variants).map((v) => JSON.stringify(v)).join(", ") + ", got " + JSON.stringify(value));
|
|
193
|
+
}
|
|
194
|
+
const otherVariants = Object.keys(fieldSchema.variants).filter((v) => v !== value);
|
|
195
|
+
const otherKeys = new Set;
|
|
196
|
+
for (const variant of otherVariants) {
|
|
197
|
+
const otherVariant = fieldSchema.variants[variant];
|
|
198
|
+
const keys = Object.keys(otherVariant);
|
|
199
|
+
for (const k of keys) {
|
|
200
|
+
otherKeys.add(k);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
return [...otherKeys];
|
|
204
|
+
};
|
|
147
205
|
var DATE_TOKEN = "remotion-date:";
|
|
148
206
|
var FILE_TOKEN = "remotion-file:";
|
|
149
207
|
var serializeJSONWithSpecialTypes = ({
|
|
@@ -649,6 +707,70 @@ var proResProfileOptions = [
|
|
|
649
707
|
"light",
|
|
650
708
|
"proxy"
|
|
651
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
|
+
};
|
|
652
774
|
var ENABLE_V5_BREAKING_CHANGES = false;
|
|
653
775
|
var validateFrame = ({
|
|
654
776
|
allowFloats,
|
|
@@ -811,7 +933,9 @@ var NoReactInternals = {
|
|
|
811
933
|
DATE_TOKEN,
|
|
812
934
|
FILE_TOKEN,
|
|
813
935
|
validateCodec,
|
|
814
|
-
proResProfileOptions
|
|
936
|
+
proResProfileOptions,
|
|
937
|
+
findPropsToDelete,
|
|
938
|
+
sequenceSchema
|
|
815
939
|
};
|
|
816
940
|
|
|
817
941
|
// src/constants.ts
|
|
@@ -1000,7 +1124,7 @@ var validateFramesPerFunction = ({
|
|
|
1000
1124
|
import * as tty from "tty";
|
|
1001
1125
|
|
|
1002
1126
|
// ../core/dist/esm/version.mjs
|
|
1003
|
-
var VERSION = "4.0.
|
|
1127
|
+
var VERSION = "4.0.462";
|
|
1004
1128
|
|
|
1005
1129
|
// ../renderer/dist/esm/error-handling.mjs
|
|
1006
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
|
},
|