remotion 3.3.76 → 3.3.78
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.d.ts +1 -1
- package/dist/cjs/index.js +3 -2
- package/dist/cjs/internals.d.ts +5 -1
- package/dist/cjs/interpolate.d.ts +11 -7
- package/dist/cjs/interpolate.js +0 -4
- package/dist/cjs/spring/index.js +1 -1
- package/dist/cjs/validate-frame.d.ts +5 -1
- package/dist/cjs/validate-frame.js +2 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/index.mjs +4 -8
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
package/dist/cjs/index.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export * from './IFrame.js';
|
|
|
62
62
|
export * from './Img.js';
|
|
63
63
|
export * from './internals.js';
|
|
64
64
|
export { interpolateColors } from './interpolate-colors.js';
|
|
65
|
-
export
|
|
65
|
+
export { ExtrapolateType, interpolate, InterpolateOptions, } from './interpolate.js';
|
|
66
66
|
export { Loop } from './loop/index.js';
|
|
67
67
|
export { ClipRegion } from './NativeLayers.js';
|
|
68
68
|
export { prefetch } from './prefetch.js';
|
package/dist/cjs/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.Experimental = exports.useCurrentFrame = exports.staticFile = exports.Series = exports.Sequence = exports.registerRoot = exports.random = exports.prefetch = exports.Loop = exports.interpolateColors = exports.getStaticFiles = exports.delayRender = exports.continueRender = exports.getInputProps = exports.Config = exports.cancelRender = void 0;
|
|
17
|
+
exports.Experimental = exports.useCurrentFrame = exports.staticFile = exports.Series = exports.Sequence = exports.registerRoot = exports.random = exports.prefetch = exports.Loop = exports.interpolate = exports.interpolateColors = exports.getStaticFiles = exports.delayRender = exports.continueRender = exports.getInputProps = exports.Config = exports.cancelRender = void 0;
|
|
18
18
|
require("./asset-types.js");
|
|
19
19
|
const Clipper_js_1 = require("./Clipper.js");
|
|
20
20
|
const is_player_js_1 = require("./is-player.js");
|
|
@@ -43,7 +43,8 @@ __exportStar(require("./Img.js"), exports);
|
|
|
43
43
|
__exportStar(require("./internals.js"), exports);
|
|
44
44
|
var interpolate_colors_js_1 = require("./interpolate-colors.js");
|
|
45
45
|
Object.defineProperty(exports, "interpolateColors", { enumerable: true, get: function () { return interpolate_colors_js_1.interpolateColors; } });
|
|
46
|
-
|
|
46
|
+
var interpolate_js_1 = require("./interpolate.js");
|
|
47
|
+
Object.defineProperty(exports, "interpolate", { enumerable: true, get: function () { return interpolate_js_1.interpolate; } });
|
|
47
48
|
var index_js_1 = require("./loop/index.js");
|
|
48
49
|
Object.defineProperty(exports, "Loop", { enumerable: true, get: function () { return index_js_1.Loop; } });
|
|
49
50
|
var prefetch_js_1 = require("./prefetch.js");
|
package/dist/cjs/internals.d.ts
CHANGED
|
@@ -98,6 +98,10 @@ export declare const Internals: {
|
|
|
98
98
|
}>;
|
|
99
99
|
useIsPlayer: () => boolean;
|
|
100
100
|
useRemotionEnvironment: () => RemotionEnvironment;
|
|
101
|
-
validateFrame: (
|
|
101
|
+
validateFrame: ({ allowFloats, durationInFrames, frame, }: {
|
|
102
|
+
frame: number;
|
|
103
|
+
durationInFrames: number;
|
|
104
|
+
allowFloats: boolean;
|
|
105
|
+
}) => void;
|
|
102
106
|
};
|
|
103
107
|
export type { TComposition, Timeline, TCompMetadata, TSequence, TAsset, TimelineContextValue, SetTimelineContextValue, CompProps, CompositionManagerContext, MediaVolumeContextValue, SetMediaVolumeContextValue, RemotionEnvironment, };
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
declare type ExtrapolateType = 'extend' | 'identity' | 'clamp';
|
|
1
|
+
export declare type ExtrapolateType = 'extend' | 'identity' | 'clamp';
|
|
2
|
+
/**
|
|
3
|
+
* @description This function allows you to map a range of values to another with a conside syntax
|
|
4
|
+
* @see [Documentation](https://www.remotion.dev/docs/interpolate)
|
|
5
|
+
*/
|
|
6
|
+
export declare type InterpolateOptions = Partial<{
|
|
7
|
+
easing: (input: number) => number;
|
|
8
|
+
extrapolateLeft: ExtrapolateType;
|
|
9
|
+
extrapolateRight: ExtrapolateType;
|
|
10
|
+
}>;
|
|
2
11
|
/**
|
|
3
12
|
* Map a value from an input range to an output range.
|
|
4
13
|
* @link https://www.remotion.dev/docs/interpolate
|
|
@@ -10,9 +19,4 @@ declare type ExtrapolateType = 'extend' | 'identity' | 'clamp';
|
|
|
10
19
|
* @param {string=} [options.extrapolateLeft="extend"] What should happen if the input value is outside left the input range, default: "extend" {@link https://www.remotion.dev/docs/interpolate#extrapolateleft}
|
|
11
20
|
* @param {string=} [options.extrapolateRight="extend"] Same as extrapolateLeft, except for values outside right the input range {@link https://www.remotion.dev/docs/interpolate#extrapolateright}
|
|
12
21
|
*/
|
|
13
|
-
export declare function interpolate(input: number, inputRange: readonly number[], outputRange: readonly number[], options?:
|
|
14
|
-
easing?: (input: number) => number;
|
|
15
|
-
extrapolateLeft?: ExtrapolateType;
|
|
16
|
-
extrapolateRight?: ExtrapolateType;
|
|
17
|
-
}): number;
|
|
18
|
-
export {};
|
|
22
|
+
export declare function interpolate(input: number, inputRange: readonly number[], outputRange: readonly number[], options?: InterpolateOptions): number;
|
package/dist/cjs/interpolate.js
CHANGED
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
// Taken from https://github.com/facebook/react-native/blob/0b9ea60b4fee8cacc36e7160e31b91fc114dbc0d/Libraries/Animated/src/nodes/AnimatedInterpolation.js
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.interpolate = void 0;
|
|
5
|
-
/**
|
|
6
|
-
* @description This function allows you to map a range of values to another with a conside syntax
|
|
7
|
-
* @see [Documentation](https://www.remotion.dev/docs/interpolate)
|
|
8
|
-
*/
|
|
9
5
|
function interpolateFunction(input, inputRange, outputRange, options) {
|
|
10
6
|
const { extrapolateLeft, extrapolateRight, easing } = options;
|
|
11
7
|
let result = input;
|
package/dist/cjs/spring/index.js
CHANGED
|
@@ -23,7 +23,7 @@ const spring_utils_js_1 = require("./spring-utils.js");
|
|
|
23
23
|
*/
|
|
24
24
|
function spring({ frame, fps, config = {}, from = 0, to = 1, durationInFrames, durationRestThreshold, }) {
|
|
25
25
|
(0, validation_spring_duration_js_1.validateSpringDuration)(durationInFrames);
|
|
26
|
-
(0, validate_frame_js_1.validateFrame)(frame, Infinity);
|
|
26
|
+
(0, validate_frame_js_1.validateFrame)({ frame, durationInFrames: Infinity, allowFloats: true });
|
|
27
27
|
(0, validate_fps_js_1.validateFps)(fps, 'to spring()', false);
|
|
28
28
|
const durationRatio = durationInFrames === undefined
|
|
29
29
|
? 1
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.validateFrame = void 0;
|
|
4
|
-
const validateFrame = (frame,
|
|
4
|
+
const validateFrame = ({ allowFloats, durationInFrames, frame, }) => {
|
|
5
5
|
if (typeof frame === 'undefined') {
|
|
6
6
|
throw new TypeError(`Argument missing for parameter "frame"`);
|
|
7
7
|
}
|
|
@@ -11,7 +11,7 @@ const validateFrame = (frame, durationInFrames) => {
|
|
|
11
11
|
if (!Number.isFinite(frame)) {
|
|
12
12
|
throw new RangeError(`Frame ${frame} is not finite`);
|
|
13
13
|
}
|
|
14
|
-
if (frame % 1 !== 0) {
|
|
14
|
+
if (frame % 1 !== 0 && !allowFloats) {
|
|
15
15
|
throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
|
|
16
16
|
}
|
|
17
17
|
if (frame < 0 && frame < -durationInFrames) {
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "3.3.
|
|
1
|
+
export declare const VERSION = "3.3.78";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/index.mjs
CHANGED
|
@@ -58,7 +58,7 @@ function truthy(value) {
|
|
|
58
58
|
}
|
|
59
59
|
|
|
60
60
|
// Automatically generated on publish
|
|
61
|
-
const VERSION = '3.3.
|
|
61
|
+
const VERSION = '3.3.78';
|
|
62
62
|
|
|
63
63
|
const checkMultipleRemotionVersions = () => {
|
|
64
64
|
if (typeof globalThis === 'undefined') {
|
|
@@ -1074,10 +1074,6 @@ const useMediaInTimeline = ({ volume, mediaVolume, mediaRef, src, mediaType, pla
|
|
|
1074
1074
|
};
|
|
1075
1075
|
|
|
1076
1076
|
// Taken from https://github.com/facebook/react-native/blob/0b9ea60b4fee8cacc36e7160e31b91fc114dbc0d/Libraries/Animated/src/nodes/AnimatedInterpolation.js
|
|
1077
|
-
/**
|
|
1078
|
-
* @description This function allows you to map a range of values to another with a conside syntax
|
|
1079
|
-
* @see [Documentation](https://www.remotion.dev/docs/interpolate)
|
|
1080
|
-
*/
|
|
1081
1077
|
function interpolateFunction(input, inputRange, outputRange, options) {
|
|
1082
1078
|
const { extrapolateLeft, extrapolateRight, easing } = options;
|
|
1083
1079
|
let result = input;
|
|
@@ -2231,7 +2227,7 @@ const useLazyComponent = (compProps) => {
|
|
|
2231
2227
|
return lazy;
|
|
2232
2228
|
};
|
|
2233
2229
|
|
|
2234
|
-
const validateFrame = (frame,
|
|
2230
|
+
const validateFrame = ({ allowFloats, durationInFrames, frame, }) => {
|
|
2235
2231
|
if (typeof frame === 'undefined') {
|
|
2236
2232
|
throw new TypeError(`Argument missing for parameter "frame"`);
|
|
2237
2233
|
}
|
|
@@ -2241,7 +2237,7 @@ const validateFrame = (frame, durationInFrames) => {
|
|
|
2241
2237
|
if (!Number.isFinite(frame)) {
|
|
2242
2238
|
throw new RangeError(`Frame ${frame} is not finite`);
|
|
2243
2239
|
}
|
|
2244
|
-
if (frame % 1 !== 0) {
|
|
2240
|
+
if (frame % 1 !== 0 && !allowFloats) {
|
|
2245
2241
|
throw new RangeError(`Argument for frame must be an integer, but got ${frame}`);
|
|
2246
2242
|
}
|
|
2247
2243
|
if (frame < 0 && frame < -durationInFrames) {
|
|
@@ -3510,7 +3506,7 @@ function measureSpring({ fps, config = {}, threshold = 0.005, from = 0, to = 1,
|
|
|
3510
3506
|
*/
|
|
3511
3507
|
function spring({ frame, fps, config = {}, from = 0, to = 1, durationInFrames, durationRestThreshold, }) {
|
|
3512
3508
|
validateSpringDuration(durationInFrames);
|
|
3513
|
-
validateFrame(frame, Infinity);
|
|
3509
|
+
validateFrame({ frame, durationInFrames: Infinity, allowFloats: true });
|
|
3514
3510
|
validateFps(fps, 'to spring()', false);
|
|
3515
3511
|
const durationRatio = durationInFrames === undefined
|
|
3516
3512
|
? 1
|
package/dist/esm/version.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remotion",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.78",
|
|
4
4
|
"description": "Render videos in React",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"rollup": "^2.70.1",
|
|
37
37
|
"typescript": "^4.7.0",
|
|
38
38
|
"vitest": "0.24.3",
|
|
39
|
-
"webpack": "5.
|
|
39
|
+
"webpack": "5.76.1"
|
|
40
40
|
},
|
|
41
41
|
"keywords": [
|
|
42
42
|
"remotion",
|