remotion 4.0.127 → 4.0.128

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.
@@ -1 +1 @@
1
- export declare const getInputProps: () => Record<string, unknown>;
1
+ export declare const getInputProps: <T extends Record<string, unknown> = Record<string, unknown>>() => T;
@@ -12,4 +12,4 @@ export declare const serializeJSONWithDate: ({ data, indent, staticBase, }: {
12
12
  indent: number | undefined;
13
13
  staticBase: string | null;
14
14
  }) => SerializedJSONWithCustomFields;
15
- export declare const deserializeJSONWithCustomFields: (data: string) => Record<string, unknown>;
15
+ export declare const deserializeJSONWithCustomFields: <T = Record<string, unknown>>(data: string) => T;
@@ -1,4 +1,4 @@
1
- export type ExtrapolateType = 'extend' | 'identity' | 'clamp';
1
+ export type ExtrapolateType = 'extend' | 'identity' | 'clamp' | 'wrap';
2
2
  /**
3
3
  * @description This function allows you to map a range of values to another with a conside syntax
4
4
  * @see [Documentation](https://www.remotion.dev/docs/interpolate)
@@ -14,8 +14,12 @@ function interpolateFunction(input, inputRange, outputRange, options) {
14
14
  if (extrapolateLeft === 'clamp') {
15
15
  result = inputMin;
16
16
  }
17
+ else if (extrapolateLeft === 'wrap') {
18
+ const range = inputMax - inputMin;
19
+ result = ((((result - inputMin) % range) + range) % range) + inputMin;
20
+ }
17
21
  else if (extrapolateLeft === 'extend') {
18
- // noop
22
+ // Noop
19
23
  }
20
24
  }
21
25
  if (result > inputMax) {
@@ -25,8 +29,12 @@ function interpolateFunction(input, inputRange, outputRange, options) {
25
29
  if (extrapolateRight === 'clamp') {
26
30
  result = inputMax;
27
31
  }
32
+ else if (extrapolateRight === 'wrap') {
33
+ const range = inputMax - inputMin;
34
+ result = ((((result - inputMin) % range) + range) % range) + inputMin;
35
+ }
28
36
  else if (extrapolateRight === 'extend') {
29
- // noop
37
+ // Noop
30
38
  }
31
39
  }
32
40
  if (outputMin === outputMax) {
@@ -27,7 +27,7 @@ export declare const NoReactInternals: {
27
27
  }) => import("./input-props-serialization").SerializedJSONWithCustomFields;
28
28
  bundleName: string;
29
29
  bundleMapName: string;
30
- deserializeJSONWithCustomFields: (data: string) => Record<string, unknown>;
30
+ deserializeJSONWithCustomFields: <T = Record<string, unknown>>(data: string) => T;
31
31
  DELAY_RENDER_CALLSTACK_TOKEN: string;
32
32
  getOffthreadVideoSource: ({ src, transparent, currentTime, toneMapped, }: {
33
33
  src: string;
@@ -1 +1 @@
1
- export declare const VERSION = "4.0.127";
1
+ export declare const VERSION = "4.0.128";
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
4
  // Automatically generated on publish
5
- exports.VERSION = '4.0.127';
5
+ exports.VERSION = '4.0.128';
@@ -6,10 +6,12 @@ const toSeconds = (time, fps) => {
6
6
  return Math.round((time / fps) * 100) / 100;
7
7
  };
8
8
  const isIosSafari = () => {
9
- return typeof window === 'undefined'
10
- ? false
11
- : /iP(ad|od|hone)/i.test(window.navigator.userAgent) &&
12
- Boolean(navigator.userAgent.match(/Version\/[\d.]+.*Safari/));
9
+ if (typeof window === 'undefined') {
10
+ return false;
11
+ }
12
+ const isIpadIPodIPhone = /iP(ad|od|hone)/i.test(window.navigator.userAgent);
13
+ const isAppleWebKit = /AppleWebKit/.test(window.navigator.userAgent);
14
+ return isIpadIPodIPhone && isAppleWebKit;
13
15
  };
14
16
  exports.isIosSafari = isIosSafari;
15
17
  // https://github.com/remotion-dev/remotion/issues/1655
@@ -105,7 +105,7 @@ function truthy(value) {
105
105
  }
106
106
 
107
107
  // Automatically generated on publish
108
- const VERSION = '4.0.127';
108
+ const VERSION = '4.0.128';
109
109
 
110
110
  const checkMultipleRemotionVersions = () => {
111
111
  if (typeof globalThis === 'undefined') {
@@ -1816,6 +1816,11 @@ function interpolateFunction(input, inputRange, outputRange, options) {
1816
1816
  if (extrapolateLeft === 'clamp') {
1817
1817
  result = inputMin;
1818
1818
  }
1819
+ else if (extrapolateLeft === 'wrap') {
1820
+ const range = inputMax - inputMin;
1821
+ result = ((((result - inputMin) % range) + range) % range) + inputMin;
1822
+ }
1823
+ else ;
1819
1824
  }
1820
1825
  if (result > inputMax) {
1821
1826
  if (extrapolateRight === 'identity') {
@@ -1824,6 +1829,11 @@ function interpolateFunction(input, inputRange, outputRange, options) {
1824
1829
  if (extrapolateRight === 'clamp') {
1825
1830
  result = inputMax;
1826
1831
  }
1832
+ else if (extrapolateRight === 'wrap') {
1833
+ const range = inputMax - inputMin;
1834
+ result = ((((result - inputMin) % range) + range) % range) + inputMin;
1835
+ }
1836
+ else ;
1827
1837
  }
1828
1838
  if (outputMin === outputMax) {
1829
1839
  return outputMin;
@@ -1935,10 +1945,12 @@ const toSeconds = (time, fps) => {
1935
1945
  return Math.round((time / fps) * 100) / 100;
1936
1946
  };
1937
1947
  const isIosSafari = () => {
1938
- return typeof window === 'undefined'
1939
- ? false
1940
- : /iP(ad|od|hone)/i.test(window.navigator.userAgent) &&
1941
- Boolean(navigator.userAgent.match(/Version\/[\d.]+.*Safari/));
1948
+ if (typeof window === 'undefined') {
1949
+ return false;
1950
+ }
1951
+ const isIpadIPodIPhone = /iP(ad|od|hone)/i.test(window.navigator.userAgent);
1952
+ const isAppleWebKit = /AppleWebKit/.test(window.navigator.userAgent);
1953
+ return isIpadIPodIPhone && isAppleWebKit;
1942
1954
  };
1943
1955
  // https://github.com/remotion-dev/remotion/issues/1655
1944
1956
  const isIOSSafariAndBlob = (actualSrc) => {
@@ -11,6 +11,11 @@ function interpolateFunction(input, inputRange, outputRange, options) {
11
11
  if (extrapolateLeft === 'clamp') {
12
12
  result = inputMin;
13
13
  }
14
+ else if (extrapolateLeft === 'wrap') {
15
+ const range = inputMax - inputMin;
16
+ result = ((((result - inputMin) % range) + range) % range) + inputMin;
17
+ }
18
+ else ;
14
19
  }
15
20
  if (result > inputMax) {
16
21
  if (extrapolateRight === 'identity') {
@@ -19,6 +24,11 @@ function interpolateFunction(input, inputRange, outputRange, options) {
19
24
  if (extrapolateRight === 'clamp') {
20
25
  result = inputMax;
21
26
  }
27
+ else if (extrapolateRight === 'wrap') {
28
+ const range = inputMax - inputMin;
29
+ result = ((((result - inputMin) % range) + range) % range) + inputMin;
30
+ }
31
+ else ;
22
32
  }
23
33
  if (outputMin === outputMax) {
24
34
  return outputMin;
@@ -1,4 +1,4 @@
1
1
  // Automatically generated on publish
2
- const VERSION = '4.0.127';
2
+ const VERSION = '4.0.128';
3
3
 
4
4
  export { VERSION };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "remotion",
3
- "version": "4.0.127",
3
+ "version": "4.0.128",
4
4
  "description": "Render videos in React",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/cjs/index.d.ts",