@remotion/serverless-client 4.0.461 → 4.0.463

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.
Files changed (2) hide show
  1. package/dist/esm/index.mjs +103 -4
  2. package/package.json +5 -6
@@ -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
- const easing = options?.easing ?? ((num) => num);
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,76 @@ 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 hiddenField = {
757
+ type: "boolean",
758
+ default: false,
759
+ description: "Hidden"
760
+ };
761
+ var sequenceSchema = {
762
+ hidden: hiddenField,
763
+ layout: {
764
+ type: "enum",
765
+ default: "absolute-fill",
766
+ description: "Layout",
767
+ variants: {
768
+ "absolute-fill": sequenceStyleSchema,
769
+ none: {}
770
+ }
771
+ }
772
+ };
773
+ var sequenceSchemaDefaultLayoutNone = {
774
+ ...sequenceSchema,
775
+ layout: {
776
+ ...sequenceSchema.layout,
777
+ default: "none"
778
+ }
779
+ };
682
780
  var ENABLE_V5_BREAKING_CHANGES = false;
683
781
  var validateFrame = ({
684
782
  allowFloats,
@@ -842,7 +940,8 @@ var NoReactInternals = {
842
940
  FILE_TOKEN,
843
941
  validateCodec,
844
942
  proResProfileOptions,
845
- findPropsToDelete
943
+ findPropsToDelete,
944
+ sequenceSchema
846
945
  };
847
946
 
848
947
  // src/constants.ts
@@ -1031,7 +1130,7 @@ var validateFramesPerFunction = ({
1031
1130
  import * as tty from "tty";
1032
1131
 
1033
1132
  // ../core/dist/esm/version.mjs
1034
- var VERSION = "4.0.461";
1133
+ var VERSION = "4.0.463";
1035
1134
 
1036
1135
  // ../renderer/dist/esm/error-handling.mjs
1037
1136
  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.461",
6
+ "version": "4.0.463",
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.461",
28
- "@remotion/streaming": "4.0.461",
29
- "@remotion/renderer": "4.0.461",
30
- "@remotion/eslint-config-internal": "4.0.461",
26
+ "remotion": "4.0.463",
27
+ "@remotion/streaming": "4.0.463",
28
+ "@remotion/renderer": "4.0.463",
29
+ "@remotion/eslint-config-internal": "4.0.463",
31
30
  "eslint": "9.19.0",
32
31
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
33
32
  },