@remotion/lambda-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/cjs/index.js CHANGED
@@ -69921,6 +69921,23 @@ function checkInfiniteRange(name, arr) {
69921
69921
  }
69922
69922
  }
69923
69923
  }
69924
+ function assertValidInterpolateEasingOption(easing, inputRangeLength) {
69925
+ if (easing === undefined) {
69926
+ return;
69927
+ }
69928
+ if (typeof easing === "function") {
69929
+ return;
69930
+ }
69931
+ const expectedLength = inputRangeLength - 1;
69932
+ if (easing.length !== expectedLength) {
69933
+ 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}`);
69934
+ }
69935
+ for (let i = 0;i < easing.length; i++) {
69936
+ if (typeof easing[i] !== "function") {
69937
+ throw new Error(`easing[${i}] must be a function`);
69938
+ }
69939
+ }
69940
+ }
69924
69941
  function interpolate(input, inputRange, outputRange, options) {
69925
69942
  if (typeof input === "undefined") {
69926
69943
  throw new Error("input can not be undefined");
@@ -69937,7 +69954,18 @@ function interpolate(input, inputRange, outputRange, options) {
69937
69954
  checkInfiniteRange("inputRange", inputRange);
69938
69955
  checkInfiniteRange("outputRange", outputRange);
69939
69956
  checkValidInputRange(inputRange);
69940
- const easing = options?.easing ?? ((num) => num);
69957
+ assertValidInterpolateEasingOption(options?.easing, inputRange.length);
69958
+ const easingOption = options?.easing;
69959
+ const defaultEasing = (num) => num;
69960
+ const resolveEasingForSegment = (segmentIndex) => {
69961
+ if (easingOption === undefined) {
69962
+ return defaultEasing;
69963
+ }
69964
+ if (typeof easingOption === "function") {
69965
+ return easingOption;
69966
+ }
69967
+ return easingOption[segmentIndex];
69968
+ };
69941
69969
  let extrapolateLeft = "extend";
69942
69970
  if (options?.extrapolateLeft !== undefined) {
69943
69971
  extrapolateLeft = options.extrapolateLeft;
@@ -69951,7 +69979,7 @@ function interpolate(input, inputRange, outputRange, options) {
69951
69979
  }
69952
69980
  const range = findRange(input, inputRange);
69953
69981
  return interpolateFunction(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {
69954
- easing,
69982
+ easing: resolveEasingForSegment(range),
69955
69983
  extrapolateLeft,
69956
69984
  extrapolateRight
69957
69985
  });
@@ -70537,6 +70565,70 @@ var proResProfileOptions = [
70537
70565
  "light",
70538
70566
  "proxy"
70539
70567
  ];
70568
+ var sequenceStyleSchema = {
70569
+ "style.translate": {
70570
+ type: "translate",
70571
+ step: 1,
70572
+ default: "0px 0px",
70573
+ description: "Offset"
70574
+ },
70575
+ "style.scale": {
70576
+ type: "number",
70577
+ min: 0.05,
70578
+ max: 100,
70579
+ step: 0.01,
70580
+ default: 1,
70581
+ description: "Scale"
70582
+ },
70583
+ "style.rotate": {
70584
+ type: "rotation",
70585
+ step: 1,
70586
+ default: "0deg",
70587
+ description: "Rotation"
70588
+ },
70589
+ "style.opacity": {
70590
+ type: "number",
70591
+ min: 0,
70592
+ max: 1,
70593
+ step: 0.01,
70594
+ default: 1,
70595
+ description: "Opacity"
70596
+ },
70597
+ premountFor: {
70598
+ type: "number",
70599
+ default: 0,
70600
+ description: "Premount For",
70601
+ min: 0,
70602
+ step: 1
70603
+ },
70604
+ postmountFor: {
70605
+ type: "hidden"
70606
+ },
70607
+ styleWhilePremounted: {
70608
+ type: "hidden"
70609
+ },
70610
+ styleWhilePostmounted: {
70611
+ type: "hidden"
70612
+ }
70613
+ };
70614
+ var sequenceSchema = {
70615
+ layout: {
70616
+ type: "enum",
70617
+ default: "absolute-fill",
70618
+ description: "Layout",
70619
+ variants: {
70620
+ "absolute-fill": sequenceStyleSchema,
70621
+ none: {}
70622
+ }
70623
+ }
70624
+ };
70625
+ var sequenceSchemaDefaultLayoutNone = {
70626
+ ...sequenceSchema,
70627
+ layout: {
70628
+ ...sequenceSchema.layout,
70629
+ default: "none"
70630
+ }
70631
+ };
70540
70632
  var ENABLE_V5_BREAKING_CHANGES = false;
70541
70633
  var validateFrame = ({
70542
70634
  allowFloats,
@@ -70700,7 +70792,8 @@ var NoReactInternals = {
70700
70792
  FILE_TOKEN,
70701
70793
  validateCodec,
70702
70794
  proResProfileOptions,
70703
- findPropsToDelete
70795
+ findPropsToDelete,
70796
+ sequenceSchema
70704
70797
  };
70705
70798
  var COMMAND_NOT_FOUND = "Command not found";
70706
70799
  var expiryDays = {
@@ -70766,7 +70859,7 @@ var validateDownloadBehavior = (downloadBehavior) => {
70766
70859
  }
70767
70860
  }
70768
70861
  };
70769
- var VERSION = "4.0.461";
70862
+ var VERSION = "4.0.462";
70770
70863
  var isColorSupported = () => {
70771
70864
  const env = process.env || {};
70772
70865
  const isForceDisabled = "NO_COLOR" in env;
@@ -69264,6 +69264,23 @@ function checkInfiniteRange(name, arr) {
69264
69264
  }
69265
69265
  }
69266
69266
  }
69267
+ function assertValidInterpolateEasingOption(easing, inputRangeLength) {
69268
+ if (easing === undefined) {
69269
+ return;
69270
+ }
69271
+ if (typeof easing === "function") {
69272
+ return;
69273
+ }
69274
+ const expectedLength = inputRangeLength - 1;
69275
+ if (easing.length !== expectedLength) {
69276
+ 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}`);
69277
+ }
69278
+ for (let i = 0;i < easing.length; i++) {
69279
+ if (typeof easing[i] !== "function") {
69280
+ throw new Error(`easing[${i}] must be a function`);
69281
+ }
69282
+ }
69283
+ }
69267
69284
  function interpolate(input, inputRange, outputRange, options) {
69268
69285
  if (typeof input === "undefined") {
69269
69286
  throw new Error("input can not be undefined");
@@ -69280,7 +69297,18 @@ function interpolate(input, inputRange, outputRange, options) {
69280
69297
  checkInfiniteRange("inputRange", inputRange);
69281
69298
  checkInfiniteRange("outputRange", outputRange);
69282
69299
  checkValidInputRange(inputRange);
69283
- const easing = options?.easing ?? ((num) => num);
69300
+ assertValidInterpolateEasingOption(options?.easing, inputRange.length);
69301
+ const easingOption = options?.easing;
69302
+ const defaultEasing = (num) => num;
69303
+ const resolveEasingForSegment = (segmentIndex) => {
69304
+ if (easingOption === undefined) {
69305
+ return defaultEasing;
69306
+ }
69307
+ if (typeof easingOption === "function") {
69308
+ return easingOption;
69309
+ }
69310
+ return easingOption[segmentIndex];
69311
+ };
69284
69312
  let extrapolateLeft = "extend";
69285
69313
  if (options?.extrapolateLeft !== undefined) {
69286
69314
  extrapolateLeft = options.extrapolateLeft;
@@ -69294,7 +69322,7 @@ function interpolate(input, inputRange, outputRange, options) {
69294
69322
  }
69295
69323
  const range = findRange(input, inputRange);
69296
69324
  return interpolateFunction(input, [inputRange[range], inputRange[range + 1]], [outputRange[range], outputRange[range + 1]], {
69297
- easing,
69325
+ easing: resolveEasingForSegment(range),
69298
69326
  extrapolateLeft,
69299
69327
  extrapolateRight
69300
69328
  });
@@ -69880,6 +69908,70 @@ var proResProfileOptions = [
69880
69908
  "light",
69881
69909
  "proxy"
69882
69910
  ];
69911
+ var sequenceStyleSchema = {
69912
+ "style.translate": {
69913
+ type: "translate",
69914
+ step: 1,
69915
+ default: "0px 0px",
69916
+ description: "Offset"
69917
+ },
69918
+ "style.scale": {
69919
+ type: "number",
69920
+ min: 0.05,
69921
+ max: 100,
69922
+ step: 0.01,
69923
+ default: 1,
69924
+ description: "Scale"
69925
+ },
69926
+ "style.rotate": {
69927
+ type: "rotation",
69928
+ step: 1,
69929
+ default: "0deg",
69930
+ description: "Rotation"
69931
+ },
69932
+ "style.opacity": {
69933
+ type: "number",
69934
+ min: 0,
69935
+ max: 1,
69936
+ step: 0.01,
69937
+ default: 1,
69938
+ description: "Opacity"
69939
+ },
69940
+ premountFor: {
69941
+ type: "number",
69942
+ default: 0,
69943
+ description: "Premount For",
69944
+ min: 0,
69945
+ step: 1
69946
+ },
69947
+ postmountFor: {
69948
+ type: "hidden"
69949
+ },
69950
+ styleWhilePremounted: {
69951
+ type: "hidden"
69952
+ },
69953
+ styleWhilePostmounted: {
69954
+ type: "hidden"
69955
+ }
69956
+ };
69957
+ var sequenceSchema = {
69958
+ layout: {
69959
+ type: "enum",
69960
+ default: "absolute-fill",
69961
+ description: "Layout",
69962
+ variants: {
69963
+ "absolute-fill": sequenceStyleSchema,
69964
+ none: {}
69965
+ }
69966
+ }
69967
+ };
69968
+ var sequenceSchemaDefaultLayoutNone = {
69969
+ ...sequenceSchema,
69970
+ layout: {
69971
+ ...sequenceSchema.layout,
69972
+ default: "none"
69973
+ }
69974
+ };
69883
69975
  var ENABLE_V5_BREAKING_CHANGES = false;
69884
69976
  var validateFrame = ({
69885
69977
  allowFloats,
@@ -70043,7 +70135,8 @@ var NoReactInternals = {
70043
70135
  FILE_TOKEN,
70044
70136
  validateCodec,
70045
70137
  proResProfileOptions,
70046
- findPropsToDelete
70138
+ findPropsToDelete,
70139
+ sequenceSchema
70047
70140
  };
70048
70141
  var COMMAND_NOT_FOUND = "Command not found";
70049
70142
  var expiryDays = {
@@ -70109,7 +70202,7 @@ var validateDownloadBehavior = (downloadBehavior) => {
70109
70202
  }
70110
70203
  }
70111
70204
  };
70112
- var VERSION = "4.0.461";
70205
+ var VERSION = "4.0.462";
70113
70206
  var isColorSupported = () => {
70114
70207
  const env = process.env || {};
70115
70208
  const isForceDisabled = "NO_COLOR" in env;
package/package.json CHANGED
@@ -3,9 +3,8 @@
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.461",
6
+ "version": "4.0.462",
7
7
  "main": "dist/cjs/index.js",
8
- "sideEffects": false,
9
8
  "scripts": {
10
9
  "formatting": "oxfmt src --check",
11
10
  "format": "oxfmt src",
@@ -27,10 +26,10 @@
27
26
  "@aws-sdk/lib-storage": "3.986.0",
28
27
  "mime-types": "2.1.34",
29
28
  "@aws-sdk/credential-provider-ini": "3.972.5",
30
- "@remotion/serverless-client": "4.0.461",
29
+ "@remotion/serverless-client": "4.0.462",
31
30
  "@types/express": "5.0.1",
32
31
  "express": "4.21.0",
33
- "@remotion/eslint-config-internal": "4.0.461",
32
+ "@remotion/eslint-config-internal": "4.0.462",
34
33
  "eslint": "9.19.0",
35
34
  "next": "16.2.6",
36
35
  "@types/mime-types": "2.1.1",