remotion 4.0.538 → 4.0.539
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/AbsoluteFillElement.js +7 -2
- package/dist/cjs/animated-image/decode-image.js +2 -0
- package/dist/cjs/effects/create-curve-sampler.d.ts +1 -0
- package/dist/cjs/effects/create-curve-sampler.js +100 -0
- package/dist/cjs/effects/effect-source-observer.d.ts +13 -0
- package/dist/cjs/effects/effect-source-observer.js +177 -0
- package/dist/cjs/effects/run-effect-chain.js +3 -0
- package/dist/cjs/effects/use-memoized-effects.js +6 -1
- package/dist/cjs/internals.d.ts +4 -0
- package/dist/cjs/internals.js +4 -0
- package/dist/cjs/interpolate-colors.js +11 -7
- package/dist/cjs/interpolate.js +37 -33
- package/dist/cjs/nonce.d.ts +11 -0
- package/dist/cjs/nonce.js +42 -0
- package/dist/cjs/prefetch.js +30 -5
- package/dist/cjs/sequence-order-marker.d.ts +58 -0
- package/dist/cjs/sequence-order-marker.js +44 -0
- package/dist/cjs/spring/index.js +1 -3
- package/dist/cjs/use-lazy-component.js +5 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/index.mjs +559 -322
- package/dist/esm/no-react.mjs +47 -30
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
package/dist/esm/no-react.mjs
CHANGED
|
@@ -477,7 +477,7 @@ function spring({
|
|
|
477
477
|
frame: durationProcessed,
|
|
478
478
|
config
|
|
479
479
|
});
|
|
480
|
-
const inner = config.overshootClamping ?
|
|
480
|
+
const inner = config.overshootClamping ? Math.min(spr.current, 1) : spr.current;
|
|
481
481
|
const interpolated = from === 0 && to === 1 ? inner : interpolate(inner, [0, 1], [from, to]);
|
|
482
482
|
return interpolated;
|
|
483
483
|
}
|
|
@@ -1019,6 +1019,20 @@ var interpolateSegment = ({
|
|
|
1019
1019
|
output
|
|
1020
1020
|
});
|
|
1021
1021
|
};
|
|
1022
|
+
var getInputForInterpolation = ({
|
|
1023
|
+
input,
|
|
1024
|
+
inputRange,
|
|
1025
|
+
options
|
|
1026
|
+
}) => {
|
|
1027
|
+
const posterizedInput = options?.posterize === undefined ? input : Math.floor(input / options.posterize) * options.posterize;
|
|
1028
|
+
const inputMin = inputRange[0];
|
|
1029
|
+
const inputMax = inputRange[inputRange.length - 1];
|
|
1030
|
+
if (inputRange.length === 1 || !(posterizedInput < inputMin && options?.extrapolateLeft === "wrap" || posterizedInput > inputMax && options?.extrapolateRight === "wrap")) {
|
|
1031
|
+
return posterizedInput;
|
|
1032
|
+
}
|
|
1033
|
+
const range = inputMax - inputMin;
|
|
1034
|
+
return ((posterizedInput - inputMin) % range + range) % range + inputMin;
|
|
1035
|
+
};
|
|
1022
1036
|
var interpolateNumber = ({
|
|
1023
1037
|
input,
|
|
1024
1038
|
inputRange,
|
|
@@ -1038,14 +1052,18 @@ var interpolateNumber = ({
|
|
|
1038
1052
|
if (options?.extrapolateRight !== undefined) {
|
|
1039
1053
|
extrapolateRight = options.extrapolateRight;
|
|
1040
1054
|
}
|
|
1041
|
-
const
|
|
1042
|
-
|
|
1055
|
+
const resolvedInput = getInputForInterpolation({
|
|
1056
|
+
input,
|
|
1057
|
+
inputRange,
|
|
1058
|
+
options: options ?? null
|
|
1059
|
+
});
|
|
1060
|
+
const range = findRange(resolvedInput, inputRange);
|
|
1043
1061
|
const easing = resolveEasingForSegment({
|
|
1044
1062
|
easing: easingOption,
|
|
1045
1063
|
segmentIndex: range
|
|
1046
1064
|
});
|
|
1047
1065
|
let result = interpolateSegment({
|
|
1048
|
-
input:
|
|
1066
|
+
input: resolvedInput,
|
|
1049
1067
|
inputRange: [inputRange[range], inputRange[range + 1]],
|
|
1050
1068
|
outputRange: [outputRange[range], outputRange[range + 1]],
|
|
1051
1069
|
easing,
|
|
@@ -1062,11 +1080,11 @@ var interpolateNumber = ({
|
|
|
1062
1080
|
continue;
|
|
1063
1081
|
}
|
|
1064
1082
|
const previousSegmentEnd = inputRange[segmentIndex + 1];
|
|
1065
|
-
if (
|
|
1083
|
+
if (resolvedInput <= previousSegmentEnd) {
|
|
1066
1084
|
continue;
|
|
1067
1085
|
}
|
|
1068
1086
|
const continuedSegmentValue = interpolateSegment({
|
|
1069
|
-
input:
|
|
1087
|
+
input: resolvedInput,
|
|
1070
1088
|
inputRange: [inputRange[segmentIndex], previousSegmentEnd],
|
|
1071
1089
|
outputRange: [outputRange[segmentIndex], outputRange[segmentIndex + 1]],
|
|
1072
1090
|
easing: previousEasing,
|
|
@@ -1087,8 +1105,12 @@ var interpolateString = ({
|
|
|
1087
1105
|
}) => {
|
|
1088
1106
|
const initiallyParsedOutputRange = outputRange.map((output) => parseStringInterpolationValue(output, outputType));
|
|
1089
1107
|
const hasAxisRotation = initiallyParsedOutputRange.some((parsed) => parsed.axisRotation);
|
|
1090
|
-
const
|
|
1091
|
-
|
|
1108
|
+
const resolvedInput = getInputForInterpolation({
|
|
1109
|
+
input,
|
|
1110
|
+
inputRange,
|
|
1111
|
+
options: options ?? null
|
|
1112
|
+
});
|
|
1113
|
+
const segmentIndex = inputRange.length === 1 ? 0 : findRange(resolvedInput, inputRange);
|
|
1092
1114
|
const parsedOutputRange = hasAxisRotation ? initiallyParsedOutputRange.map((parsed, index) => {
|
|
1093
1115
|
if (parsed.kind !== "rotate") {
|
|
1094
1116
|
return parsed;
|
|
@@ -1212,31 +1234,24 @@ var interpolateDiscreteValue = ({
|
|
|
1212
1234
|
throw new TypeError(typeof outputRange[0] === "boolean" ? "Booleans can only be interpolated using Easing.step1" : "Non-numeric strings can only be interpolated using Easing.step1");
|
|
1213
1235
|
}
|
|
1214
1236
|
}
|
|
1215
|
-
const
|
|
1237
|
+
const resolvedInput = getInputForInterpolation({
|
|
1238
|
+
input,
|
|
1239
|
+
inputRange,
|
|
1240
|
+
options: options ?? null
|
|
1241
|
+
});
|
|
1216
1242
|
const inputMin = inputRange[0];
|
|
1217
1243
|
const inputMax = inputRange[inputRange.length - 1];
|
|
1218
|
-
let resolvedInput = posterizedInput;
|
|
1219
1244
|
if (resolvedInput < inputMin) {
|
|
1220
1245
|
if (options?.extrapolateLeft === "identity") {
|
|
1221
1246
|
throw new TypeError(typeof outputRange[0] === "boolean" ? 'extrapolateLeft: "identity" is not supported for booleans' : 'extrapolateLeft: "identity" is not supported for non-numeric strings');
|
|
1222
1247
|
}
|
|
1223
|
-
|
|
1224
|
-
const wrapRange = inputMax - inputMin;
|
|
1225
|
-
resolvedInput = ((resolvedInput - inputMin) % wrapRange + wrapRange) % wrapRange + inputMin;
|
|
1226
|
-
} else {
|
|
1227
|
-
return outputRange[0];
|
|
1228
|
-
}
|
|
1248
|
+
return outputRange[0];
|
|
1229
1249
|
}
|
|
1230
1250
|
if (resolvedInput > inputMax) {
|
|
1231
1251
|
if (options?.extrapolateRight === "identity") {
|
|
1232
1252
|
throw new TypeError(typeof outputRange[0] === "boolean" ? 'extrapolateRight: "identity" is not supported for booleans' : 'extrapolateRight: "identity" is not supported for non-numeric strings');
|
|
1233
1253
|
}
|
|
1234
|
-
|
|
1235
|
-
const wrapRange = inputMax - inputMin;
|
|
1236
|
-
resolvedInput = ((resolvedInput - inputMin) % wrapRange + wrapRange) % wrapRange + inputMin;
|
|
1237
|
-
} else {
|
|
1238
|
-
return outputRange[outputRange.length - 1];
|
|
1239
|
-
}
|
|
1254
|
+
return outputRange[outputRange.length - 1];
|
|
1240
1255
|
}
|
|
1241
1256
|
const range = findRange(resolvedInput, inputRange);
|
|
1242
1257
|
return resolvedInput >= inputRange[range + 1] ? outputRange[range + 1] : outputRange[range];
|
|
@@ -2054,14 +2069,16 @@ function parseModernComponent(str, percentScale) {
|
|
|
2054
2069
|
function parseHueAngle(str) {
|
|
2055
2070
|
if (str === "none")
|
|
2056
2071
|
return 0;
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
if (str.endsWith("
|
|
2061
|
-
|
|
2062
|
-
if (str.endsWith("turn"))
|
|
2063
|
-
|
|
2064
|
-
|
|
2072
|
+
let degrees = Number.parseFloat(str);
|
|
2073
|
+
if (str.endsWith("grad")) {
|
|
2074
|
+
degrees *= 0.9;
|
|
2075
|
+
} else if (str.endsWith("rad")) {
|
|
2076
|
+
degrees = degrees * 180 / Math.PI;
|
|
2077
|
+
} else if (str.endsWith("turn")) {
|
|
2078
|
+
degrees *= 360;
|
|
2079
|
+
}
|
|
2080
|
+
const normalized = degrees % 360;
|
|
2081
|
+
return normalized < 0 ? (normalized + 360) % 360 : normalized;
|
|
2065
2082
|
}
|
|
2066
2083
|
function parseModernAlpha(str) {
|
|
2067
2084
|
if (str === undefined || str === "none")
|
package/dist/esm/version.mjs
CHANGED
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"url": "https://github.com/remotion-dev/remotion/tree/main/packages/core"
|
|
4
4
|
},
|
|
5
5
|
"name": "remotion",
|
|
6
|
-
"version": "4.0.
|
|
6
|
+
"version": "4.0.539",
|
|
7
7
|
"description": "Make videos programmatically",
|
|
8
8
|
"main": "dist/cjs/index.js",
|
|
9
9
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-dom": "19.2.3",
|
|
36
36
|
"webpack": "5.105.0",
|
|
37
37
|
"zod": "4.5.4",
|
|
38
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
38
|
+
"@remotion/eslint-config-internal": "4.0.539",
|
|
39
39
|
"eslint": "9.19.0",
|
|
40
40
|
"typescript": "7.1.0-beta"
|
|
41
41
|
},
|