remotion 4.0.213 → 4.0.214
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/IFrame.d.ts +2 -2
- package/dist/cjs/Null.d.ts +0 -1
- package/dist/cjs/RenderAssetManager.d.ts +0 -1
- package/dist/cjs/ResolveCompositionConfig.js +5 -5
- package/dist/cjs/Sequence.js +1 -1
- package/dist/cjs/SequenceContext.d.ts +0 -1
- package/dist/cjs/audio/Audio.d.ts +15 -15
- package/dist/cjs/audio/AudioForRendering.d.ts +5 -18
- package/dist/cjs/audio/props.d.ts +0 -1
- package/dist/cjs/bezier.js +1 -2
- package/dist/cjs/buffer-until-first-frame.d.ts +1 -1
- package/dist/cjs/cancel-render.js +1 -2
- package/dist/cjs/delay-render.js +1 -1
- package/dist/cjs/index.d.ts +0 -2
- package/dist/cjs/internals.d.ts +9 -10
- package/dist/cjs/interpolate-colors.js +2 -2
- package/dist/cjs/interpolate.js +1 -2
- package/dist/cjs/no-react.d.ts +2 -2
- package/dist/cjs/nonce.d.ts +0 -1
- package/dist/cjs/play-and-handle-not-allowed-error.d.ts +1 -1
- package/dist/cjs/prefetch.d.ts +1 -1
- package/dist/cjs/prefetch.js +1 -1
- package/dist/cjs/resolve-video-config.d.ts +2 -2
- package/dist/cjs/series/flatten-children.d.ts +3 -1
- package/dist/cjs/spring/index.js +2 -2
- package/dist/cjs/spring/measure-spring.js +1 -2
- package/dist/cjs/spring/spring-utils.js +1 -2
- package/dist/cjs/timeline-position-state.d.ts +1 -1
- package/dist/cjs/timeline-position-state.js +1 -1
- package/dist/cjs/truthy.js +1 -2
- package/dist/cjs/use-current-scale.d.ts +1 -1
- package/dist/cjs/use-media-in-timeline.d.ts +1 -1
- package/dist/cjs/use-media-playback.d.ts +1 -1
- package/dist/cjs/use-request-video-callback-time.d.ts +1 -1
- package/dist/cjs/validate-media-props.d.ts +1 -1
- package/dist/cjs/validation/validate-default-codec.js +1 -2
- package/dist/cjs/validation/validate-default-props.d.ts +1 -1
- package/dist/cjs/validation/validate-dimensions.js +1 -2
- package/dist/cjs/validation/validate-duration-in-frames.js +1 -2
- package/dist/cjs/validation/validate-fps.js +1 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/Video.d.ts +14 -14
- package/dist/cjs/video/VideoForPreview.js +1 -1
- package/dist/cjs/video/VideoForRendering.d.ts +5 -18
- package/dist/cjs/video/index.d.ts +1 -1
- package/dist/cjs/volume-position-state.d.ts +0 -1
- package/dist/cjs/warn-about-non-seekable-media.d.ts +1 -1
- package/dist/cjs/wrap-remotion-context.js +2 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/version.mjs +1 -1
- package/ensure-correct-version.ts +1 -1
- package/package.json +2 -2
- package/dist/cjs/HideSequence.d.ts +0 -7
- package/dist/cjs/HideSequence.js +0 -59
- package/dist/cjs/check-rsc.d.ts +0 -1
- package/dist/cjs/check-rsc.js +0 -6
package/dist/cjs/IFrame.d.ts
CHANGED
|
@@ -4,6 +4,6 @@ import React from 'react';
|
|
|
4
4
|
* @see [Documentation](https://www.remotion.dev/docs/iframe)
|
|
5
5
|
*/
|
|
6
6
|
export declare const IFrame: React.ForwardRefExoticComponent<Omit<React.ClassAttributes<HTMLIFrameElement> & React.IframeHTMLAttributes<HTMLIFrameElement> & {
|
|
7
|
-
readonly delayRenderRetries?: number
|
|
8
|
-
readonly delayRenderTimeoutInMilliseconds?: number
|
|
7
|
+
readonly delayRenderRetries?: number;
|
|
8
|
+
readonly delayRenderTimeoutInMilliseconds?: number;
|
|
9
9
|
}, "ref"> & React.RefAttributes<HTMLIFrameElement>>;
|
package/dist/cjs/Null.d.ts
CHANGED
|
@@ -34,19 +34,19 @@ const ResolveCompositionConfig = ({ children }) => {
|
|
|
34
34
|
var _a;
|
|
35
35
|
return typeof window === 'undefined' || (0, get_remotion_environment_js_1.getRemotionEnvironment)().isPlayer
|
|
36
36
|
? {}
|
|
37
|
-
: (_a = (0, input_props_js_1.getInputProps)()) !== null && _a !== void 0 ? _a : {};
|
|
37
|
+
: ((_a = (0, input_props_js_1.getInputProps)()) !== null && _a !== void 0 ? _a : {});
|
|
38
38
|
}, []);
|
|
39
39
|
const [resolvedConfigs, setResolvedConfigs] = (0, react_1.useState)({});
|
|
40
40
|
const selectedEditorProps = (0, react_1.useMemo)(() => {
|
|
41
41
|
var _a;
|
|
42
42
|
return selectedComposition
|
|
43
|
-
? (_a = allEditorProps[selectedComposition.id]) !== null && _a !== void 0 ? _a : {}
|
|
43
|
+
? ((_a = allEditorProps[selectedComposition.id]) !== null && _a !== void 0 ? _a : {})
|
|
44
44
|
: {};
|
|
45
45
|
}, [allEditorProps, selectedComposition]);
|
|
46
46
|
const renderModalProps = (0, react_1.useMemo)(() => {
|
|
47
47
|
var _a;
|
|
48
48
|
return renderModalComposition
|
|
49
|
-
? (_a = allEditorProps[renderModalComposition.id]) !== null && _a !== void 0 ? _a : {}
|
|
49
|
+
? ((_a = allEditorProps[renderModalComposition.id]) !== null && _a !== void 0 ? _a : {})
|
|
50
50
|
: {};
|
|
51
51
|
}, [allEditorProps, renderModalComposition]);
|
|
52
52
|
const hasResolution = Boolean(currentCompositionMetadata);
|
|
@@ -300,7 +300,7 @@ const useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
300
300
|
const composition = compositions.find((c) => c.id === compositionId);
|
|
301
301
|
const selectedEditorProps = (0, react_1.useMemo)(() => {
|
|
302
302
|
var _a;
|
|
303
|
-
return composition ? (_a = allEditorProps[composition.id]) !== null && _a !== void 0 ? _a : {} : {};
|
|
303
|
+
return composition ? ((_a = allEditorProps[composition.id]) !== null && _a !== void 0 ? _a : {}) : {};
|
|
304
304
|
}, [allEditorProps, composition]);
|
|
305
305
|
return (0, react_1.useMemo)(() => {
|
|
306
306
|
var _a, _b, _c, _d;
|
|
@@ -342,7 +342,7 @@ const useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
342
342
|
...(typeof window === 'undefined' ||
|
|
343
343
|
(0, get_remotion_environment_js_1.getRemotionEnvironment)().isPlayer
|
|
344
344
|
? {}
|
|
345
|
-
: (_d = (0, input_props_js_1.getInputProps)()) !== null && _d !== void 0 ? _d : {}),
|
|
345
|
+
: ((_d = (0, input_props_js_1.getInputProps)()) !== null && _d !== void 0 ? _d : {})),
|
|
346
346
|
},
|
|
347
347
|
defaultCodec: null,
|
|
348
348
|
},
|
package/dist/cjs/Sequence.js
CHANGED
|
@@ -159,7 +159,7 @@ const PremountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
159
159
|
opacity: premountingActive ? 0 : 1,
|
|
160
160
|
pointerEvents: premountingActive
|
|
161
161
|
? 'none'
|
|
162
|
-
: (_a = passedStyle === null || passedStyle === void 0 ? void 0 : passedStyle.pointerEvents) !== null && _a !== void 0 ? _a : undefined,
|
|
162
|
+
: ((_a = passedStyle === null || passedStyle === void 0 ? void 0 : passedStyle.pointerEvents) !== null && _a !== void 0 ? _a : undefined),
|
|
163
163
|
};
|
|
164
164
|
}, [premountingActive, passedStyle]);
|
|
165
165
|
return ((0, jsx_runtime_1.jsx)(freeze_js_1.Freeze, { frame: from, active: premountingActive, children: (0, jsx_runtime_1.jsx)(exports.Sequence, { ref: ref, from: from, style: style, _remotionInternalPremountDisplay: premountFor, _remotionInternalIsPremounting: premountingActive, ...otherProps }) }));
|
|
@@ -5,23 +5,23 @@ import type { RemotionMainAudioProps } from './props.js';
|
|
|
5
5
|
* @see [Documentation](https://www.remotion.dev/docs/audio)
|
|
6
6
|
*/
|
|
7
7
|
export declare const Audio: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "nonce" | "onEnded" | "onResize" | "onResizeCapture" | "autoPlay" | "controls"> & {
|
|
8
|
-
name?: string
|
|
9
|
-
volume?: import("../volume-prop.js").VolumeProp
|
|
10
|
-
playbackRate?: number
|
|
11
|
-
acceptableTimeShiftInSeconds?: number
|
|
12
|
-
allowAmplificationDuringRender?: boolean
|
|
13
|
-
_remotionInternalNeedsDurationCalculation?: boolean
|
|
14
|
-
_remotionInternalNativeLoopPassed?: boolean
|
|
15
|
-
_remotionDebugSeeking?: boolean
|
|
16
|
-
toneFrequency?: number
|
|
17
|
-
pauseWhenBuffering?: boolean
|
|
18
|
-
showInTimeline?: boolean
|
|
19
|
-
delayRenderTimeoutInMilliseconds?: number
|
|
20
|
-
delayRenderRetries?: number
|
|
21
|
-
loopVolumeCurveBehavior?: import("./use-audio-frame.js").LoopVolumeCurveBehavior
|
|
8
|
+
name?: string;
|
|
9
|
+
volume?: import("../volume-prop.js").VolumeProp;
|
|
10
|
+
playbackRate?: number;
|
|
11
|
+
acceptableTimeShiftInSeconds?: number;
|
|
12
|
+
allowAmplificationDuringRender?: boolean;
|
|
13
|
+
_remotionInternalNeedsDurationCalculation?: boolean;
|
|
14
|
+
_remotionInternalNativeLoopPassed?: boolean;
|
|
15
|
+
_remotionDebugSeeking?: boolean;
|
|
16
|
+
toneFrequency?: number;
|
|
17
|
+
pauseWhenBuffering?: boolean;
|
|
18
|
+
showInTimeline?: boolean;
|
|
19
|
+
delayRenderTimeoutInMilliseconds?: number;
|
|
20
|
+
delayRenderRetries?: number;
|
|
21
|
+
loopVolumeCurveBehavior?: import("./use-audio-frame.js").LoopVolumeCurveBehavior;
|
|
22
22
|
} & RemotionMainAudioProps & {
|
|
23
23
|
/**
|
|
24
24
|
* @deprecated For internal use only
|
|
25
25
|
*/
|
|
26
|
-
readonly stack?: string
|
|
26
|
+
readonly stack?: string;
|
|
27
27
|
}, "ref"> & React.RefAttributes<HTMLAudioElement>>;
|
|
@@ -1,20 +1,7 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
name?: string | undefined;
|
|
5
|
-
volume?: import("../volume-prop.js").VolumeProp | undefined;
|
|
6
|
-
playbackRate?: number | undefined;
|
|
7
|
-
acceptableTimeShiftInSeconds?: number | undefined;
|
|
8
|
-
allowAmplificationDuringRender?: boolean | undefined;
|
|
9
|
-
_remotionInternalNeedsDurationCalculation?: boolean | undefined;
|
|
10
|
-
_remotionInternalNativeLoopPassed?: boolean | undefined;
|
|
11
|
-
_remotionDebugSeeking?: boolean | undefined;
|
|
12
|
-
toneFrequency?: number | undefined;
|
|
13
|
-
pauseWhenBuffering?: boolean | undefined;
|
|
14
|
-
showInTimeline?: boolean | undefined;
|
|
15
|
-
delayRenderTimeoutInMilliseconds?: number | undefined;
|
|
16
|
-
delayRenderRetries?: number | undefined;
|
|
17
|
-
loopVolumeCurveBehavior?: import("./use-audio-frame.js").LoopVolumeCurveBehavior | undefined;
|
|
18
|
-
} & {
|
|
2
|
+
import type { RemotionAudioProps } from './props.js';
|
|
3
|
+
type AudioForRenderingProps = RemotionAudioProps & {
|
|
19
4
|
readonly onDuration: (src: string, durationInSeconds: number) => void;
|
|
20
|
-
}
|
|
5
|
+
};
|
|
6
|
+
export declare const AudioForRendering: ForwardRefExoticComponent<AudioForRenderingProps & RefAttributes<HTMLAudioElement>>;
|
|
7
|
+
export {};
|
package/dist/cjs/bezier.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// Taken from https://github.com/facebook/react-native/blob/0b9ea60b4fee8cacc36e7160e31b91fc114dbc0d/Libraries/Animated/src/bezier.js
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.bezier =
|
|
4
|
+
exports.bezier = bezier;
|
|
5
5
|
const NEWTON_ITERATIONS = 4;
|
|
6
6
|
const NEWTON_MIN_SLOPE = 0.001;
|
|
7
7
|
const SUBDIVISION_PRECISION = 0.0000001;
|
|
@@ -111,4 +111,3 @@ function bezier(mX1, mY1, mX2, mY2) {
|
|
|
111
111
|
return calcBezier(getTForX(x), mY1, mY2);
|
|
112
112
|
};
|
|
113
113
|
}
|
|
114
|
-
exports.bezier = bezier;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const useBufferUntilFirstFrame: ({ mediaRef, mediaType, onVariableFpsVideoDetected, pauseWhenBuffering, }: {
|
|
2
2
|
mediaRef: React.RefObject<HTMLVideoElement | HTMLAudioElement>;
|
|
3
|
-
mediaType:
|
|
3
|
+
mediaType: "video" | "audio";
|
|
4
4
|
onVariableFpsVideoDetected: () => void;
|
|
5
5
|
pauseWhenBuffering: boolean;
|
|
6
6
|
}) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.cancelRender =
|
|
3
|
+
exports.cancelRender = cancelRender;
|
|
4
4
|
const isErrorLike = (err) => {
|
|
5
5
|
if (err instanceof Error) {
|
|
6
6
|
return true;
|
|
@@ -50,4 +50,3 @@ function cancelRender(err) {
|
|
|
50
50
|
window.remotion_cancelledError = error.stack;
|
|
51
51
|
throw error;
|
|
52
52
|
}
|
|
53
|
-
exports.cancelRender = cancelRender;
|
package/dist/cjs/delay-render.js
CHANGED
|
@@ -33,7 +33,7 @@ const delayRender = (label, options) => {
|
|
|
33
33
|
if ((0, get_remotion_environment_js_1.getRemotionEnvironment)().isRendering) {
|
|
34
34
|
const timeoutToUse = ((_c = options === null || options === void 0 ? void 0 : options.timeoutInMilliseconds) !== null && _c !== void 0 ? _c : (typeof window === 'undefined'
|
|
35
35
|
? defaultTimeout
|
|
36
|
-
: (_d = window.remotion_puppeteerTimeout) !== null && _d !== void 0 ? _d : defaultTimeout)) - 2000;
|
|
36
|
+
: ((_d = window.remotion_puppeteerTimeout) !== null && _d !== void 0 ? _d : defaultTimeout))) - 2000;
|
|
37
37
|
if (typeof window !== 'undefined') {
|
|
38
38
|
const retriesLeft = ((_e = options === null || options === void 0 ? void 0 : options.retries) !== null && _e !== void 0 ? _e : 0) - (window.remotion_attempt - 1);
|
|
39
39
|
window.remotion_delayRenderTimeouts[handle] = {
|
package/dist/cjs/index.d.ts
CHANGED
package/dist/cjs/internals.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { type CompProps } from './Composition.js';
|
|
3
2
|
import type { TCompMetadata, TComposition, TRenderAsset, TSequence } from './CompositionManager.js';
|
|
4
3
|
import type { CompositionManagerContext } from './CompositionManagerContext.js';
|
|
@@ -26,7 +25,7 @@ export declare const Internals: {
|
|
|
26
25
|
}) | null;
|
|
27
26
|
readonly getRoot: () => import("react").FC<{}> | null;
|
|
28
27
|
readonly useMediaVolumeState: () => readonly [number, (u: number) => void];
|
|
29
|
-
readonly useMediaMutedState: () => readonly [boolean, (u:
|
|
28
|
+
readonly useMediaMutedState: () => readonly [boolean, (u: React.SetStateAction<boolean>) => void];
|
|
30
29
|
readonly useLazyComponent: <Props>(compProps: CompProps<Props>) => import("react").ExoticComponent<(import("react").PropsWithoutRef<Props> & import("react").RefAttributes<import("react").Component<Props, any, any>>) | import("react").PropsWithRef<Props>> & {
|
|
31
30
|
readonly _result: import("react").ComponentType<Props>;
|
|
32
31
|
};
|
|
@@ -67,7 +66,7 @@ export declare const Internals: {
|
|
|
67
66
|
getCompositions: () => import("./CompositionManager.js").AnyComposition[];
|
|
68
67
|
}>;
|
|
69
68
|
readonly portalNode: () => HTMLElement;
|
|
70
|
-
readonly waitForRoot: (fn: (comp: import("react").FC
|
|
69
|
+
readonly waitForRoot: (fn: (comp: import("react").FC) => void) => (() => void);
|
|
71
70
|
readonly CanUseRemotionHooksProvider: import("react").FC<{
|
|
72
71
|
readonly children: import("react").ReactNode;
|
|
73
72
|
}>;
|
|
@@ -79,7 +78,7 @@ export declare const Internals: {
|
|
|
79
78
|
children: import("react").ReactNode;
|
|
80
79
|
}>;
|
|
81
80
|
readonly IsPlayerContextProvider: import("react").FC<{
|
|
82
|
-
children?: import("react").ReactNode;
|
|
81
|
+
children?: import("react").ReactNode | undefined;
|
|
83
82
|
}>;
|
|
84
83
|
readonly useIsPlayer: () => boolean;
|
|
85
84
|
readonly EditorPropsProvider: import("react").FC<{
|
|
@@ -94,7 +93,7 @@ export declare const Internals: {
|
|
|
94
93
|
compositionHeight: number | null;
|
|
95
94
|
compositionFps: number | null;
|
|
96
95
|
compositionDurationInFrames: number | null;
|
|
97
|
-
calculateMetadata: import("./Composition.js").CalculateMetadataFunction<Record<string, unknown
|
|
96
|
+
calculateMetadata: import("./Composition.js").CalculateMetadataFunction<import("./props-if-has-props.js").InferProps<import("zod").AnyZodObject, Record<string, unknown>>> | null;
|
|
98
97
|
signal: AbortSignal;
|
|
99
98
|
defaultProps: Record<string, unknown>;
|
|
100
99
|
originalProps: Record<string, unknown>;
|
|
@@ -116,19 +115,19 @@ export declare const Internals: {
|
|
|
116
115
|
reloadCurrentlySelectedComposition: () => void;
|
|
117
116
|
}>;
|
|
118
117
|
readonly ResolveCompositionConfig: import("react").FC<import("react").PropsWithChildren<{
|
|
119
|
-
children:
|
|
118
|
+
children: React.ReactNode;
|
|
120
119
|
}>>;
|
|
121
120
|
readonly REMOTION_STUDIO_CONTAINER_ELEMENT: "__remotion-studio-container";
|
|
122
121
|
readonly RenderAssetManager: import("react").Context<import("./RenderAssetManager.js").RenderAssetManagerContext>;
|
|
123
122
|
readonly persistCurrentFrame: (time: {
|
|
124
123
|
[x: string]: number;
|
|
125
124
|
}) => void;
|
|
126
|
-
readonly useTimelineSetFrame: () => (u:
|
|
125
|
+
readonly useTimelineSetFrame: () => ((u: React.SetStateAction<Record<string, number>>) => void);
|
|
127
126
|
readonly NativeLayersProvider: import("react").FC<{
|
|
128
|
-
children?: import("react").ReactNode;
|
|
127
|
+
children?: import("react").ReactNode | undefined;
|
|
129
128
|
}>;
|
|
130
129
|
readonly ClipComposition: import("react").FC<{
|
|
131
|
-
children?: import("react").ReactNode;
|
|
130
|
+
children?: import("react").ReactNode | undefined;
|
|
132
131
|
}>;
|
|
133
132
|
readonly isIosSafari: () => boolean;
|
|
134
133
|
readonly WATCH_REMOTION_STATIC_FILES: "remotion_staticFilesChanged";
|
|
@@ -155,7 +154,7 @@ export declare const Internals: {
|
|
|
155
154
|
readonly CurrentScaleContext: import("react").Context<import("./use-current-scale.js").CurrentScaleContextType | null>;
|
|
156
155
|
readonly PreviewSizeContext: import("react").Context<import("./use-current-scale.js").PreviewSizeCtx>;
|
|
157
156
|
readonly calculateScale: ({ canvasSize, compositionHeight, compositionWidth, previewSize, }: {
|
|
158
|
-
previewSize:
|
|
157
|
+
previewSize: import("./use-current-scale.js").PreviewSize["size"];
|
|
159
158
|
compositionWidth: number;
|
|
160
159
|
compositionHeight: number;
|
|
161
160
|
canvasSize: {
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
* https://github.com/software-mansion/react-native-reanimated/blob/master/src/reanimated2/Colors.ts
|
|
5
5
|
*/
|
|
6
6
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
-
exports.interpolateColors = exports.
|
|
7
|
+
exports.interpolateColors = exports.colorNames = void 0;
|
|
8
|
+
exports.processColor = processColor;
|
|
8
9
|
/* eslint no-bitwise: 0 */
|
|
9
10
|
const interpolate_js_1 = require("./interpolate.js");
|
|
10
11
|
// var INTEGER = '[-+]?\\d+';
|
|
@@ -358,7 +359,6 @@ function processColor(color) {
|
|
|
358
359
|
const normalizedColor = normalizeColor(color);
|
|
359
360
|
return ((normalizedColor << 24) | (normalizedColor >>> 8)) >>> 0; // argb
|
|
360
361
|
}
|
|
361
|
-
exports.processColor = processColor;
|
|
362
362
|
const interpolateColorsRGB = (value, inputRange, colors) => {
|
|
363
363
|
const [r, g, b, a] = [red, green, blue, opacity].map((f) => {
|
|
364
364
|
const unrounded = (0, interpolate_js_1.interpolate)(value, inputRange, colors.map((c) => f(c)), {
|
package/dist/cjs/interpolate.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
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
|
-
exports.interpolate =
|
|
4
|
+
exports.interpolate = interpolate;
|
|
5
5
|
function interpolateFunction(input, inputRange, outputRange, options) {
|
|
6
6
|
const { extrapolateLeft, extrapolateRight, easing } = options;
|
|
7
7
|
let result = input;
|
|
@@ -128,4 +128,3 @@ function interpolate(input, inputRange, outputRange, options) {
|
|
|
128
128
|
extrapolateRight,
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
|
-
exports.interpolate = interpolate;
|
package/dist/cjs/no-react.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export type { ArtifactAsset, AudioOrVideoAsset, TRenderAsset, } from './CompositionManager';
|
|
2
|
+
export { EasingFunction, ExtrapolateType, interpolate, InterpolateOptions, } from './interpolate';
|
|
2
3
|
export type { ClipRegion } from './NativeLayers';
|
|
3
|
-
export {
|
|
4
|
-
export { RandomSeed, random } from './random.js';
|
|
4
|
+
export { random, RandomSeed } from './random.js';
|
|
5
5
|
export type { VideoConfig } from './video-config';
|
|
6
6
|
import { processColor } from './interpolate-colors';
|
|
7
7
|
import { truthy } from './truthy';
|
package/dist/cjs/nonce.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
|
-
export declare const playAndHandleNotAllowedError: (mediaRef: RefObject<HTMLVideoElement | HTMLAudioElement>, mediaType:
|
|
2
|
+
export declare const playAndHandleNotAllowedError: (mediaRef: RefObject<HTMLVideoElement | HTMLAudioElement>, mediaType: "audio" | "video", onAutoPlayError: null | (() => void)) => void;
|
package/dist/cjs/prefetch.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ export type PrefetchOnProgress = (options: {
|
|
|
12
12
|
* @see [Documentation](https://www.remotion.dev/docs/prefetch)
|
|
13
13
|
*/
|
|
14
14
|
export declare const prefetch: (src: string, options?: {
|
|
15
|
-
method?:
|
|
15
|
+
method?: "blob-url" | "base64";
|
|
16
16
|
contentType?: string;
|
|
17
17
|
onProgress?: PrefetchOnProgress;
|
|
18
18
|
}) => FetchAndPreload;
|
package/dist/cjs/prefetch.js
CHANGED
|
@@ -15,10 +15,10 @@ type ResolveVideoConfigParams = {
|
|
|
15
15
|
};
|
|
16
16
|
export declare const resolveVideoConfig: ({ calculateMetadata, signal, defaultProps, originalProps, compositionId, compositionDurationInFrames, compositionFps, compositionHeight, compositionWidth, }: ResolveVideoConfigParams) => VideoConfig | Promise<VideoConfig>;
|
|
17
17
|
export declare const resolveVideoConfigOrCatch: (params: ResolveVideoConfigParams) => {
|
|
18
|
-
type:
|
|
18
|
+
type: "success";
|
|
19
19
|
result: VideoConfig | Promise<VideoConfig>;
|
|
20
20
|
} | {
|
|
21
|
-
type:
|
|
21
|
+
type: "error";
|
|
22
22
|
error: Error;
|
|
23
23
|
};
|
|
24
24
|
export {};
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
2
|
+
type ReactChildArray = ReturnType<typeof React.Children.toArray>;
|
|
3
|
+
export declare const flattenChildren: (children: React.ReactNode) => ReactChildArray;
|
|
4
|
+
export {};
|
package/dist/cjs/spring/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.measureSpring =
|
|
3
|
+
exports.measureSpring = void 0;
|
|
4
|
+
exports.spring = spring;
|
|
4
5
|
const interpolate_js_1 = require("../interpolate.js");
|
|
5
6
|
const validate_frame_js_1 = require("../validate-frame.js");
|
|
6
7
|
const validate_fps_js_1 = require("../validation/validate-fps.js");
|
|
@@ -72,6 +73,5 @@ function spring({ frame: passedFrame, fps, config = {}, from = 0, to = 1, durati
|
|
|
72
73
|
const interpolated = from === 0 && to === 1 ? inner : (0, interpolate_js_1.interpolate)(inner, [0, 1], [from, to]);
|
|
73
74
|
return interpolated;
|
|
74
75
|
}
|
|
75
|
-
exports.spring = spring;
|
|
76
76
|
var measure_spring_js_2 = require("./measure-spring.js");
|
|
77
77
|
Object.defineProperty(exports, "measureSpring", { enumerable: true, get: function () { return measure_spring_js_2.measureSpring; } });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.measureSpring =
|
|
3
|
+
exports.measureSpring = measureSpring;
|
|
4
4
|
const validate_fps_js_1 = require("../validation/validate-fps.js");
|
|
5
5
|
const spring_utils_js_1 = require("./spring-utils.js");
|
|
6
6
|
const cache = new Map();
|
|
@@ -74,4 +74,3 @@ function measureSpring({ fps, config = {}, threshold = 0.005, }) {
|
|
|
74
74
|
cache.set(cacheKey, finishedFrame);
|
|
75
75
|
return finishedFrame;
|
|
76
76
|
}
|
|
77
|
-
exports.measureSpring = measureSpring;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.springCalculation =
|
|
3
|
+
exports.springCalculation = springCalculation;
|
|
4
4
|
const defaultSpringConfig = {
|
|
5
5
|
damping: 10,
|
|
6
6
|
mass: 1,
|
|
@@ -103,4 +103,3 @@ function springCalculation({ frame, fps, config = {}, }) {
|
|
|
103
103
|
calculationCache[cacheKey] = animation;
|
|
104
104
|
return animation;
|
|
105
105
|
}
|
|
106
|
-
exports.springCalculation = springCalculation;
|
|
@@ -23,7 +23,7 @@ export declare const persistCurrentFrame: (time: CurrentTimePerComposition) => v
|
|
|
23
23
|
export declare const getInitialFrameState: () => CurrentTimePerComposition;
|
|
24
24
|
export declare const getFrameForComposition: (composition: string) => number;
|
|
25
25
|
export declare const useTimelinePosition: () => number;
|
|
26
|
-
export declare const useTimelineSetFrame: () => (u: React.SetStateAction<Record<string, number>>) => void;
|
|
26
|
+
export declare const useTimelineSetFrame: () => ((u: React.SetStateAction<Record<string, number>>) => void);
|
|
27
27
|
type PlayingReturnType = readonly [
|
|
28
28
|
boolean,
|
|
29
29
|
(u: React.SetStateAction<boolean>) => void,
|
|
@@ -59,7 +59,7 @@ const useTimelinePosition = () => {
|
|
|
59
59
|
if (!videoConfig) {
|
|
60
60
|
return typeof window === 'undefined'
|
|
61
61
|
? 0
|
|
62
|
-
: (_a = window.remotion_initialFrame) !== null && _a !== void 0 ? _a : 0;
|
|
62
|
+
: ((_a = window.remotion_initialFrame) !== null && _a !== void 0 ? _a : 0);
|
|
63
63
|
}
|
|
64
64
|
const unclamped = (_b = state.frame[videoConfig.id]) !== null && _b !== void 0 ? _b : ((0, get_remotion_environment_js_1.getRemotionEnvironment)().isPlayer
|
|
65
65
|
? 0
|
package/dist/cjs/truthy.js
CHANGED
|
@@ -27,7 +27,7 @@ export type PreviewSizeCtx = {
|
|
|
27
27
|
};
|
|
28
28
|
export declare const PreviewSizeContext: React.Context<PreviewSizeCtx>;
|
|
29
29
|
export declare const calculateScale: ({ canvasSize, compositionHeight, compositionWidth, previewSize, }: {
|
|
30
|
-
previewSize: PreviewSize[
|
|
30
|
+
previewSize: PreviewSize["size"];
|
|
31
31
|
compositionWidth: number;
|
|
32
32
|
compositionHeight: number;
|
|
33
33
|
canvasSize: {
|
|
@@ -5,7 +5,7 @@ export declare const useMediaInTimeline: ({ volume, mediaVolume, mediaRef, src,
|
|
|
5
5
|
mediaVolume: number;
|
|
6
6
|
mediaRef: RefObject<HTMLAudioElement | HTMLVideoElement>;
|
|
7
7
|
src: string | undefined;
|
|
8
|
-
mediaType:
|
|
8
|
+
mediaType: "audio" | "video";
|
|
9
9
|
playbackRate: number;
|
|
10
10
|
displayName: string | null;
|
|
11
11
|
id: string;
|
|
@@ -3,7 +3,7 @@ export declare const DEFAULT_ACCEPTABLE_TIMESHIFT = 0.45;
|
|
|
3
3
|
export declare const useMediaPlayback: ({ mediaRef, src, mediaType, playbackRate: localPlaybackRate, onlyWarnForMediaSeekingError, acceptableTimeshift, pauseWhenBuffering, isPremounting, debugSeeking, onAutoPlayError, }: {
|
|
4
4
|
mediaRef: RefObject<HTMLVideoElement | HTMLAudioElement>;
|
|
5
5
|
src: string | undefined;
|
|
6
|
-
mediaType:
|
|
6
|
+
mediaType: "audio" | "video";
|
|
7
7
|
playbackRate: number;
|
|
8
8
|
onlyWarnForMediaSeekingError: boolean;
|
|
9
9
|
acceptableTimeshift: number;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { RefObject } from 'react';
|
|
2
2
|
export declare const useRequestVideoCallbackTime: ({ mediaRef, mediaType, lastSeek, onVariableFpsVideoDetected, }: {
|
|
3
3
|
mediaRef: RefObject<HTMLVideoElement | HTMLAudioElement>;
|
|
4
|
-
mediaType:
|
|
4
|
+
mediaType: "video" | "audio";
|
|
5
5
|
lastSeek: React.MutableRefObject<number | null>;
|
|
6
6
|
onVariableFpsVideoDetected: () => void;
|
|
7
7
|
}) => import("react").MutableRefObject<number | null>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { RemotionAudioProps } from './audio/index.js';
|
|
2
2
|
import type { RemotionVideoProps } from './video/index.js';
|
|
3
3
|
import type { OffthreadVideoProps } from './video/props.js';
|
|
4
|
-
export declare const validateMediaProps: (props: RemotionVideoProps | RemotionAudioProps | OffthreadVideoProps, component:
|
|
4
|
+
export declare const validateMediaProps: (props: RemotionVideoProps | RemotionAudioProps | OffthreadVideoProps, component: "Video" | "Audio") => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateDefaultCodec =
|
|
3
|
+
exports.validateDefaultCodec = validateDefaultCodec;
|
|
4
4
|
const codec_1 = require("../codec");
|
|
5
5
|
function validateDefaultCodec(defaultCodec, location) {
|
|
6
6
|
if (typeof defaultCodec === 'undefined') {
|
|
@@ -13,4 +13,3 @@ function validateDefaultCodec(defaultCodec, location) {
|
|
|
13
13
|
throw new Error(`The "defaultCodec" prop ${location} must be one of ${codec_1.validCodecs.join(', ')}, but you passed ${defaultCodec}.`);
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
exports.validateDefaultCodec = validateDefaultCodec;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const validateDefaultAndInputProps: (defaultProps: unknown, name:
|
|
1
|
+
export declare const validateDefaultAndInputProps: (defaultProps: unknown, name: "defaultProps" | "inputProps", compositionId: string | null) => void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateDimension =
|
|
3
|
+
exports.validateDimension = validateDimension;
|
|
4
4
|
function validateDimension(amount, nameOfProp, location) {
|
|
5
5
|
if (typeof amount !== 'number') {
|
|
6
6
|
throw new Error(`The "${nameOfProp}" prop ${location} must be a number, but you passed a value of type ${typeof amount}`);
|
|
@@ -18,4 +18,3 @@ function validateDimension(amount, nameOfProp, location) {
|
|
|
18
18
|
throw new TypeError(`The "${nameOfProp}" prop ${location} must be positive, but got ${amount}.`);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
exports.validateDimension = validateDimension;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateDurationInFrames =
|
|
3
|
+
exports.validateDurationInFrames = validateDurationInFrames;
|
|
4
4
|
function validateDurationInFrames(durationInFrames, options) {
|
|
5
5
|
const { allowFloats, component } = options;
|
|
6
6
|
if (typeof durationInFrames === 'undefined') {
|
|
@@ -19,4 +19,3 @@ function validateDurationInFrames(durationInFrames, options) {
|
|
|
19
19
|
throw new TypeError(`The "durationInFrames" prop ${component} must be finite, but got ${durationInFrames}.`);
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
exports.validateDurationInFrames = validateDurationInFrames;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.validateFps =
|
|
3
|
+
exports.validateFps = validateFps;
|
|
4
4
|
function validateFps(fps, location, isGif) {
|
|
5
5
|
if (typeof fps !== 'number') {
|
|
6
6
|
throw new Error(`"fps" must be a number, but you passed a value of type ${typeof fps} ${location}`);
|
|
@@ -18,4 +18,3 @@ function validateFps(fps, location, isGif) {
|
|
|
18
18
|
throw new TypeError(`The FPS for a GIF cannot be higher than 50. Use the --every-nth-frame option to lower the FPS: https://remotion.dev/docs/render-as-gif`);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
exports.validateFps = validateFps;
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
|
@@ -5,22 +5,22 @@ import type { RemotionMainVideoProps } from './props';
|
|
|
5
5
|
* @see [Documentation](https://www.remotion.dev/docs/video)
|
|
6
6
|
*/
|
|
7
7
|
export declare const Video: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "nonce" | "onError" | "onEnded" | "autoPlay" | "controls" | "disableRemotePlayback"> & {
|
|
8
|
-
name?: string
|
|
9
|
-
volume?: import("../volume-prop.js").VolumeProp
|
|
10
|
-
playbackRate?: number
|
|
11
|
-
acceptableTimeShiftInSeconds?: number
|
|
12
|
-
allowAmplificationDuringRender?: boolean
|
|
13
|
-
toneFrequency?: number
|
|
14
|
-
pauseWhenBuffering?: boolean
|
|
15
|
-
showInTimeline?: boolean
|
|
16
|
-
delayRenderTimeoutInMilliseconds?: number
|
|
17
|
-
loopVolumeCurveBehavior?: import("../audio/use-audio-frame.js").LoopVolumeCurveBehavior
|
|
18
|
-
delayRenderRetries?: number
|
|
19
|
-
onError?: (
|
|
20
|
-
onAutoPlayError?: (
|
|
8
|
+
name?: string;
|
|
9
|
+
volume?: import("../volume-prop.js").VolumeProp;
|
|
10
|
+
playbackRate?: number;
|
|
11
|
+
acceptableTimeShiftInSeconds?: number;
|
|
12
|
+
allowAmplificationDuringRender?: boolean;
|
|
13
|
+
toneFrequency?: number;
|
|
14
|
+
pauseWhenBuffering?: boolean;
|
|
15
|
+
showInTimeline?: boolean;
|
|
16
|
+
delayRenderTimeoutInMilliseconds?: number;
|
|
17
|
+
loopVolumeCurveBehavior?: import("../audio/use-audio-frame.js").LoopVolumeCurveBehavior;
|
|
18
|
+
delayRenderRetries?: number;
|
|
19
|
+
onError?: (err: Error) => void;
|
|
20
|
+
onAutoPlayError?: () => void;
|
|
21
21
|
} & RemotionMainVideoProps & {
|
|
22
22
|
/**
|
|
23
23
|
* @deprecated For internal use only
|
|
24
24
|
*/
|
|
25
|
-
readonly stack?: string
|
|
25
|
+
readonly stack?: string;
|
|
26
26
|
}, "ref"> & React.RefAttributes<HTMLVideoElement>>;
|
|
@@ -155,7 +155,7 @@ const VideoForDevelopmentRefForwardingFunction = (props, ref) => {
|
|
|
155
155
|
var _a;
|
|
156
156
|
return {
|
|
157
157
|
...style,
|
|
158
|
-
opacity: isSequenceHidden ? 0 : (_a = style === null || style === void 0 ? void 0 : style.opacity) !== null && _a !== void 0 ? _a : 1,
|
|
158
|
+
opacity: isSequenceHidden ? 0 : ((_a = style === null || style === void 0 ? void 0 : style.opacity) !== null && _a !== void 0 ? _a : 1),
|
|
159
159
|
};
|
|
160
160
|
}, [isSequenceHidden, style]);
|
|
161
161
|
const crossOriginValue = crossOrigin !== null && crossOrigin !== void 0 ? crossOrigin : (onVideoFrame ? 'anonymous' : undefined);
|
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
export declare const VideoForRendering: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>, "nonce" | "onError" | "onEnded" | "autoPlay" | "controls" | "disableRemotePlayback"> & {
|
|
5
|
-
name?: string | undefined;
|
|
6
|
-
volume?: import("../volume-prop.js").VolumeProp | undefined;
|
|
7
|
-
playbackRate?: number | undefined;
|
|
8
|
-
acceptableTimeShiftInSeconds?: number | undefined;
|
|
9
|
-
allowAmplificationDuringRender?: boolean | undefined;
|
|
10
|
-
toneFrequency?: number | undefined;
|
|
11
|
-
pauseWhenBuffering?: boolean | undefined;
|
|
12
|
-
showInTimeline?: boolean | undefined;
|
|
13
|
-
delayRenderTimeoutInMilliseconds?: number | undefined;
|
|
14
|
-
loopVolumeCurveBehavior?: import("../audio/use-audio-frame.js").LoopVolumeCurveBehavior | undefined;
|
|
15
|
-
delayRenderRetries?: number | undefined;
|
|
16
|
-
onError?: ((err: Error) => void) | undefined;
|
|
17
|
-
onAutoPlayError?: (() => void) | undefined;
|
|
18
|
-
} & {
|
|
2
|
+
import type { OnVideoFrame, RemotionVideoProps } from './props';
|
|
3
|
+
type VideoForRenderingProps = RemotionVideoProps & {
|
|
19
4
|
readonly onDuration: (src: string, durationInSeconds: number) => void;
|
|
20
5
|
readonly onVideoFrame: null | OnVideoFrame;
|
|
21
|
-
}
|
|
6
|
+
};
|
|
7
|
+
export declare const VideoForRendering: ForwardRefExoticComponent<VideoForRenderingProps & RefAttributes<HTMLVideoElement>>;
|
|
8
|
+
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const warnAboutNonSeekableMedia: (ref: HTMLMediaElement | null, type:
|
|
1
|
+
export declare const warnAboutNonSeekableMedia: (ref: HTMLMediaElement | null, type: "console-warning" | "console-error" | "exception") => void;
|
|
@@ -23,7 +23,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.RemotionContextProvider =
|
|
26
|
+
exports.RemotionContextProvider = void 0;
|
|
27
|
+
exports.useRemotionContexts = useRemotionContexts;
|
|
27
28
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
29
|
// This is used for when other reconcilers are being used
|
|
29
30
|
// such as in React Three Fiber. All the contexts need to be passed again
|
|
@@ -81,7 +82,6 @@ function useRemotionContexts() {
|
|
|
81
82
|
bufferManagerContext,
|
|
82
83
|
]);
|
|
83
84
|
}
|
|
84
|
-
exports.useRemotionContexts = useRemotionContexts;
|
|
85
85
|
const RemotionContextProvider = (props) => {
|
|
86
86
|
const { children, contexts } = props;
|
|
87
87
|
return ((0, jsx_runtime_1.jsx)(CanUseRemotionHooks_js_1.CanUseRemotionHooks.Provider, { value: contexts.canUseRemotionHooksContext, children: (0, jsx_runtime_1.jsx)(nonce_js_1.NonceContext.Provider, { value: contexts.nonceContext, children: (0, jsx_runtime_1.jsx)(NativeLayers_js_1.NativeLayersContext.Provider, { value: contexts.nativeLayersContext, children: (0, jsx_runtime_1.jsx)(prefetch_state_js_1.PreloadContext.Provider, { value: contexts.preloadContext, children: (0, jsx_runtime_1.jsx)(CompositionManagerContext_js_1.CompositionManager.Provider, { value: contexts.compositionManagerCtx, children: (0, jsx_runtime_1.jsx)(SequenceManager_js_1.SequenceManager.Provider, { value: contexts.sequenceManagerContext, children: (0, jsx_runtime_1.jsx)(RenderAssetManager_js_1.RenderAssetManager.Provider, { value: contexts.renderAssetManagerContext, children: (0, jsx_runtime_1.jsx)(ResolveCompositionConfig_js_1.ResolveCompositionContext.Provider, { value: contexts.resolveCompositionContext, children: (0, jsx_runtime_1.jsx)(timeline_position_state_js_1.TimelineContext.Provider, { value: contexts.timelineContext, children: (0, jsx_runtime_1.jsx)(timeline_position_state_js_1.SetTimelineContext.Provider, { value: contexts.setTimelineContext, children: (0, jsx_runtime_1.jsx)(SequenceContext_js_1.SequenceContext.Provider, { value: contexts.sequenceContext, children: (0, jsx_runtime_1.jsx)(buffering_js_1.BufferingContextReact.Provider, { value: contexts.bufferManagerContext, children: children }) }) }) }) }) }) }) }) }) }) }) }));
|
package/dist/esm/index.mjs
CHANGED
|
@@ -155,7 +155,7 @@ function truthy(value) {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
// src/version.ts
|
|
158
|
-
var VERSION = "4.0.
|
|
158
|
+
var VERSION = "4.0.214";
|
|
159
159
|
|
|
160
160
|
// src/multiple-versions-warning.ts
|
|
161
161
|
var checkMultipleRemotionVersions = () => {
|
|
@@ -1961,7 +1961,7 @@ var prefetch = (src, options) => {
|
|
|
1961
1961
|
canceled = true;
|
|
1962
1962
|
if (canBeAborted) {
|
|
1963
1963
|
try {
|
|
1964
|
-
controller.abort();
|
|
1964
|
+
controller.abort(new Error("free() called"));
|
|
1965
1965
|
} catch (e) {
|
|
1966
1966
|
}
|
|
1967
1967
|
}
|
package/dist/esm/version.mjs
CHANGED
|
@@ -18,7 +18,7 @@ export const VERSION = '${version}';
|
|
|
18
18
|
|
|
19
19
|
fs.writeFileSync(path.resolve(process.cwd(), 'src/version.ts'), src);
|
|
20
20
|
|
|
21
|
-
cp.execSync('pnpm
|
|
21
|
+
cp.execSync('pnpm run make');
|
|
22
22
|
cp.execSync('bun x tsc -d');
|
|
23
23
|
|
|
24
24
|
const distFile = fs.readFileSync('dist/esm/version.mjs', 'utf-8');
|
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.214",
|
|
7
7
|
"description": "Make videos programmatically",
|
|
8
8
|
"main": "dist/cjs/index.js",
|
|
9
9
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -74,6 +74,6 @@
|
|
|
74
74
|
"formatting": "prettier src --check",
|
|
75
75
|
"lint": "eslint src --ext ts,tsx",
|
|
76
76
|
"test": "vitest --run",
|
|
77
|
-
"
|
|
77
|
+
"make": "bun --env-file=../.env.bundle bundle.ts"
|
|
78
78
|
}
|
|
79
79
|
}
|
package/dist/cjs/HideSequence.js
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.useCustomFrame = exports.HideSequence = void 0;
|
|
27
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
-
const react_1 = __importStar(require("react"));
|
|
29
|
-
const use_current_frame_1 = require("./use-current-frame");
|
|
30
|
-
const context = react_1.default.createContext(null);
|
|
31
|
-
const HideSequence = ({ from, durationInFrames, children }) => {
|
|
32
|
-
var _a, _b, _c;
|
|
33
|
-
const parent = react_1.default.useContext(context);
|
|
34
|
-
const frame = (0, use_current_frame_1.useCurrentFrame)();
|
|
35
|
-
const actualFrame = (_a = parent === null || parent === void 0 ? void 0 : parent.frame) !== null && _a !== void 0 ? _a : frame;
|
|
36
|
-
const cascadedFrame = actualFrame + ((_b = parent === null || parent === void 0 ? void 0 : parent.from) !== null && _b !== void 0 ? _b : 0);
|
|
37
|
-
const visible = cascadedFrame >= from &&
|
|
38
|
-
cascadedFrame < from + durationInFrames &&
|
|
39
|
-
((_c = parent === null || parent === void 0 ? void 0 : parent.visible) !== null && _c !== void 0 ? _c : true);
|
|
40
|
-
const value = (0, react_1.useMemo)(() => {
|
|
41
|
-
return {
|
|
42
|
-
from,
|
|
43
|
-
durationInFrames,
|
|
44
|
-
visible,
|
|
45
|
-
frame: cascadedFrame,
|
|
46
|
-
};
|
|
47
|
-
}, [cascadedFrame, durationInFrames, from, visible]);
|
|
48
|
-
return (0, jsx_runtime_1.jsx)(context.Provider, { value: value, children: children });
|
|
49
|
-
};
|
|
50
|
-
exports.HideSequence = HideSequence;
|
|
51
|
-
const useCustomFrame = () => {
|
|
52
|
-
const ctx = react_1.default.useContext(context);
|
|
53
|
-
const frame = (0, use_current_frame_1.useCurrentFrame)();
|
|
54
|
-
if (!ctx) {
|
|
55
|
-
return frame;
|
|
56
|
-
}
|
|
57
|
-
return ctx.frame;
|
|
58
|
-
};
|
|
59
|
-
exports.useCustomFrame = useCustomFrame;
|
package/dist/cjs/check-rsc.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|