remotion 4.1.0-alpha5 → 4.1.0-alpha8
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/Composition.d.ts +21 -6
- package/dist/cjs/Composition.js +4 -15
- package/dist/cjs/CompositionManager.d.ts +4 -4
- package/dist/cjs/Img.d.ts +1 -1
- package/dist/cjs/RemotionRoot.js +6 -4
- package/dist/cjs/ResolveCompositionConfig.js +17 -2
- package/dist/cjs/audio/Audio.d.ts +2 -2
- package/dist/cjs/audio/AudioForDevelopment.d.ts +1 -1
- package/dist/cjs/audio/AudioForRendering.d.ts +1 -1
- package/dist/cjs/config/input-props.d.ts +1 -1
- package/dist/cjs/config/input-props.js +2 -1
- package/dist/cjs/freeze.js +6 -2
- package/dist/cjs/index.d.ts +7 -4
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/input-props-serialization.d.ts +14 -0
- package/dist/cjs/input-props-serialization.js +49 -0
- package/dist/cjs/internals.d.ts +67 -58
- package/dist/cjs/internals.js +7 -0
- package/dist/cjs/loop/index.js +1 -2
- package/dist/cjs/resolve-video-config.d.ts +2 -1
- package/dist/cjs/resolve-video-config.js +20 -33
- package/dist/cjs/series/index.js +1 -2
- package/dist/cjs/spring/index.js +1 -1
- package/dist/cjs/static-file.js +11 -2
- package/dist/cjs/timeline-position-state.d.ts +5 -3
- package/dist/cjs/timeline-position-state.js +25 -7
- package/dist/cjs/validation/validate-dimensions.d.ts +1 -1
- package/dist/cjs/validation/validate-dimensions.js +2 -2
- package/dist/cjs/validation/validate-duration-in-frames.d.ts +2 -3
- package/dist/cjs/validation/validate-duration-in-frames.js +6 -2
- package/dist/cjs/validation/validate-fps.d.ts +1 -1
- package/dist/cjs/validation/validate-fps.js +2 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/video/Video.d.ts +1 -1
- package/dist/cjs/video/VideoForDevelopment.d.ts +1 -1
- package/dist/cjs/video/VideoForRendering.d.ts +1 -1
- package/dist/esm/index.mjs +253 -175
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -22,17 +22,32 @@ export type CalculateMetadataFunction<T extends Record<string, unknown>> = (opti
|
|
|
22
22
|
props: T;
|
|
23
23
|
abortSignal: AbortSignal;
|
|
24
24
|
}) => Promise<CalcMetadataReturnType<T>> | CalcMetadataReturnType<T>;
|
|
25
|
-
|
|
25
|
+
type OptionalDimensions<Schema extends AnyZodObject, Props extends Record<string, unknown>> = {
|
|
26
|
+
width?: number;
|
|
27
|
+
height?: number;
|
|
28
|
+
calculateMetadata: CalculateMetadataFunction<InferProps<Schema, Props>>;
|
|
29
|
+
};
|
|
30
|
+
type MandatoryDimensions<Schema extends AnyZodObject, Props extends Record<string, unknown>> = {
|
|
26
31
|
width: number;
|
|
27
32
|
height: number;
|
|
28
|
-
id: string;
|
|
29
33
|
calculateMetadata?: CalculateMetadataFunction<InferProps<Schema, Props>>;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
34
|
+
};
|
|
35
|
+
type StillCalculateMetadataOrExplicit<Schema extends AnyZodObject, Props extends Record<string, unknown>> = OptionalDimensions<Schema, Props> | MandatoryDimensions<Schema, Props>;
|
|
36
|
+
type CompositionCalculateMetadataOrExplicit<Schema extends AnyZodObject, Props extends Record<string, unknown>> = (OptionalDimensions<Schema, Props> & {
|
|
37
|
+
fps?: number;
|
|
38
|
+
durationInFrames?: number;
|
|
39
|
+
}) | (MandatoryDimensions<Schema, Props> & {
|
|
33
40
|
fps: number;
|
|
34
41
|
durationInFrames: number;
|
|
35
|
-
};
|
|
42
|
+
});
|
|
43
|
+
export type StillProps<Schema extends AnyZodObject, Props extends Record<string, unknown>> = {
|
|
44
|
+
id: string;
|
|
45
|
+
schema?: Schema;
|
|
46
|
+
} & StillCalculateMetadataOrExplicit<Schema, Props> & CompProps<Props> & PropsIfHasProps<Schema, Props>;
|
|
47
|
+
export type CompositionProps<Schema extends AnyZodObject, Props extends Record<string, unknown>> = {
|
|
48
|
+
id: string;
|
|
49
|
+
schema?: Schema;
|
|
50
|
+
} & CompositionCalculateMetadataOrExplicit<Schema, Props> & CompProps<Props> & PropsIfHasProps<Schema, Props>;
|
|
36
51
|
/**
|
|
37
52
|
* @description This component is used to register a video to make it renderable and make it show in the sidebar, in dev mode.
|
|
38
53
|
* @see [Documentation](https://www.remotion.dev/docs/composition)
|
package/dist/cjs/Composition.js
CHANGED
|
@@ -19,9 +19,6 @@ const use_lazy_component_js_1 = require("./use-lazy-component.js");
|
|
|
19
19
|
const use_video_js_1 = require("./use-video.js");
|
|
20
20
|
const validate_composition_id_js_1 = require("./validation/validate-composition-id.js");
|
|
21
21
|
const validate_default_props_js_1 = require("./validation/validate-default-props.js");
|
|
22
|
-
const validate_dimensions_js_1 = require("./validation/validate-dimensions.js");
|
|
23
|
-
const validate_duration_in_frames_js_1 = require("./validation/validate-duration-in-frames.js");
|
|
24
|
-
const validate_fps_js_1 = require("./validation/validate-fps.js");
|
|
25
22
|
const Fallback = () => {
|
|
26
23
|
(0, react_1.useEffect)(() => {
|
|
27
24
|
const fallback = (0, delay_render_js_1.delayRender)('Waiting for Root component to unsuspend');
|
|
@@ -56,20 +53,12 @@ const Composition = ({ width, height, fps, durationInFrames, id, defaultProps, s
|
|
|
56
53
|
throw new Error('No id for composition passed.');
|
|
57
54
|
}
|
|
58
55
|
(0, validate_composition_id_js_1.validateCompositionId)(id);
|
|
59
|
-
(0, validate_dimensions_js_1.validateDimension)(width, 'width', 'of the <Composition/> component');
|
|
60
|
-
(0, validate_dimensions_js_1.validateDimension)(height, 'height', 'of the <Composition/> component');
|
|
61
|
-
(0, validate_duration_in_frames_js_1.validateDurationInFrames)({
|
|
62
|
-
durationInFrames,
|
|
63
|
-
component: 'of the <Composition/> component',
|
|
64
|
-
allowFloats: false,
|
|
65
|
-
});
|
|
66
|
-
(0, validate_fps_js_1.validateFps)(fps, 'as a prop of the <Composition/> component', false);
|
|
67
56
|
(0, validate_default_props_js_1.validateDefaultAndInputProps)(defaultProps, 'defaultProps', id);
|
|
68
57
|
registerComposition({
|
|
69
|
-
durationInFrames,
|
|
70
|
-
fps,
|
|
71
|
-
height,
|
|
72
|
-
width,
|
|
58
|
+
durationInFrames: durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : undefined,
|
|
59
|
+
fps: fps !== null && fps !== void 0 ? fps : undefined,
|
|
60
|
+
height: height !== null && height !== void 0 ? height : undefined,
|
|
61
|
+
width: width !== null && width !== void 0 ? width : undefined,
|
|
73
62
|
id,
|
|
74
63
|
folderName,
|
|
75
64
|
component: lazy,
|
|
@@ -4,10 +4,10 @@ import type { AnyZodObject } from 'zod';
|
|
|
4
4
|
import type { CalculateMetadataFunction } from './Composition.js';
|
|
5
5
|
import type { InferProps, PropsIfHasProps } from './props-if-has-props.js';
|
|
6
6
|
export type TComposition<Schema extends AnyZodObject, Props extends Record<string, unknown>> = {
|
|
7
|
-
width: number;
|
|
8
|
-
height: number;
|
|
9
|
-
fps: number;
|
|
10
|
-
durationInFrames: number;
|
|
7
|
+
width: number | undefined;
|
|
8
|
+
height: number | undefined;
|
|
9
|
+
fps: number | undefined;
|
|
10
|
+
durationInFrames: number | undefined;
|
|
11
11
|
id: string;
|
|
12
12
|
folderName: string | null;
|
|
13
13
|
parentFolderName: string | null;
|
package/dist/cjs/Img.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ import React from 'react';
|
|
|
6
6
|
export declare const Img: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "src"> & {
|
|
7
7
|
maxRetries?: number | undefined;
|
|
8
8
|
src: string;
|
|
9
|
-
}, "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "
|
|
9
|
+
}, "property" | "key" | "is" | "height" | "width" | "id" | "onEnded" | "nonce" | "onResize" | "onResizeCapture" | "crossOrigin" | "src" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "loading" | "referrerPolicy" | "alt" | "decoding" | "sizes" | "srcSet" | "useMap" | "maxRetries"> & React.RefAttributes<HTMLImageElement>>;
|
package/dist/cjs/RemotionRoot.js
CHANGED
|
@@ -13,9 +13,8 @@ const random_js_1 = require("./random.js");
|
|
|
13
13
|
const timeline_position_state_js_1 = require("./timeline-position-state.js");
|
|
14
14
|
const duration_state_js_1 = require("./video/duration-state.js");
|
|
15
15
|
const RemotionRoot = ({ children, numberOfAudioTags }) => {
|
|
16
|
-
var _a;
|
|
17
16
|
const [remotionRootId] = (0, react_1.useState)(() => String((0, random_js_1.random)(null)));
|
|
18
|
-
const [frame, setFrame] = (0, react_1.useState)(
|
|
17
|
+
const [frame, setFrame] = (0, react_1.useState)({});
|
|
19
18
|
const [playing, setPlaying] = (0, react_1.useState)(false);
|
|
20
19
|
const imperativePlaying = (0, react_1.useRef)(false);
|
|
21
20
|
const [fastRefreshes, setFastRefreshes] = (0, react_1.useState)(0);
|
|
@@ -24,9 +23,12 @@ const RemotionRoot = ({ children, numberOfAudioTags }) => {
|
|
|
24
23
|
if (typeof window !== 'undefined') {
|
|
25
24
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
26
25
|
(0, react_1.useLayoutEffect)(() => {
|
|
27
|
-
window.remotion_setFrame = (f) => {
|
|
26
|
+
window.remotion_setFrame = (f, composition) => {
|
|
28
27
|
const id = (0, delay_render_js_1.delayRender)(`Setting the current frame to ${f}`);
|
|
29
|
-
setFrame(
|
|
28
|
+
setFrame((s) => ({
|
|
29
|
+
...s,
|
|
30
|
+
[composition]: f,
|
|
31
|
+
}));
|
|
30
32
|
requestAnimationFrame(() => (0, delay_render_js_1.continueRender)(id));
|
|
31
33
|
};
|
|
32
34
|
window.remotion_isPlayer = false;
|
|
@@ -30,12 +30,23 @@ const ResolveCompositionConfig = ({ children }) => {
|
|
|
30
30
|
: {};
|
|
31
31
|
}, [allEditorProps, renderModalComposition]);
|
|
32
32
|
const doResolution = (0, react_1.useCallback)((composition, editorProps) => {
|
|
33
|
+
var _a;
|
|
33
34
|
const controller = new AbortController();
|
|
34
35
|
if (currentCompositionMetadata) {
|
|
35
36
|
return controller;
|
|
36
37
|
}
|
|
38
|
+
const inputProps = typeof window === 'undefined' ||
|
|
39
|
+
(0, get_environment_js_1.getRemotionEnvironment)() === 'player-development' ||
|
|
40
|
+
(0, get_environment_js_1.getRemotionEnvironment)() === 'player-production'
|
|
41
|
+
? {}
|
|
42
|
+
: (_a = (0, input_props_js_1.getInputProps)()) !== null && _a !== void 0 ? _a : {};
|
|
37
43
|
const { signal } = controller;
|
|
38
|
-
const promOrNot = (0, resolve_video_config_js_1.resolveVideoConfig)({
|
|
44
|
+
const promOrNot = (0, resolve_video_config_js_1.resolveVideoConfig)({
|
|
45
|
+
composition,
|
|
46
|
+
editorProps,
|
|
47
|
+
inputProps,
|
|
48
|
+
signal,
|
|
49
|
+
});
|
|
39
50
|
if (typeof promOrNot === 'object' && 'then' in promOrNot) {
|
|
40
51
|
setResolvedConfigs((r) => ({
|
|
41
52
|
...r,
|
|
@@ -171,7 +182,11 @@ const useResolvedVideoConfig = (preferredCompositionId) => {
|
|
|
171
182
|
return {
|
|
172
183
|
type: 'success',
|
|
173
184
|
result: {
|
|
174
|
-
|
|
185
|
+
width: composition.width,
|
|
186
|
+
height: composition.height,
|
|
187
|
+
fps: composition.fps,
|
|
188
|
+
id: composition.id,
|
|
189
|
+
durationInFrames: composition.durationInFrames,
|
|
175
190
|
defaultProps: (_b = composition.defaultProps) !== null && _b !== void 0 ? _b : {},
|
|
176
191
|
props: {
|
|
177
192
|
...((_c = composition.defaultProps) !== null && _c !== void 0 ? _c : {}),
|
|
@@ -4,9 +4,9 @@ import type { RemotionMainAudioProps } from './props.js';
|
|
|
4
4
|
* @description With this component, you can add audio to your video. All audio formats which are supported by Chromium are supported by the component.
|
|
5
5
|
* @see [Documentation](https://www.remotion.dev/docs/audio)
|
|
6
6
|
*/
|
|
7
|
-
export declare const Audio: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "
|
|
7
|
+
export declare const Audio: React.ForwardRefExoticComponent<Pick<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "autoPlay" | "controls" | "onEnded" | "nonce" | "onResize" | "onResizeCapture"> & {
|
|
8
8
|
volume?: import("../volume-prop.js").VolumeProp | undefined;
|
|
9
9
|
playbackRate?: number | undefined;
|
|
10
10
|
acceptableTimeShiftInSeconds?: number | undefined;
|
|
11
11
|
allowAmplificationDuringRender?: boolean | undefined;
|
|
12
|
-
} & RemotionMainAudioProps, "key" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "
|
|
12
|
+
} & RemotionMainAudioProps, "property" | "key" | "is" | "id" | "controlsList" | "crossOrigin" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "src" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "playbackRate" | "volume" | "allowAmplificationDuringRender" | "acceptableTimeShiftInSeconds" | keyof RemotionMainAudioProps> & React.RefAttributes<HTMLAudioElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export declare const AudioForDevelopment: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "
|
|
3
|
+
export declare const AudioForDevelopment: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "autoPlay" | "controls" | "onEnded" | "nonce" | "onResize" | "onResizeCapture"> & {
|
|
4
4
|
volume?: import("../volume-prop.js").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
6
|
acceptableTimeShiftInSeconds?: number | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export declare const AudioForRendering: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "
|
|
3
|
+
export declare const AudioForRendering: ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.AudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>, "autoPlay" | "controls" | "onEnded" | "nonce" | "onResize" | "onResizeCapture"> & {
|
|
4
4
|
volume?: import("../volume-prop.js").VolumeProp | undefined;
|
|
5
5
|
playbackRate?: number | undefined;
|
|
6
6
|
acceptableTimeShiftInSeconds?: number | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const getInputProps: () =>
|
|
1
|
+
export declare const getInputProps: () => Record<string, unknown>;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getInputProps = void 0;
|
|
4
4
|
const get_environment_js_1 = require("../get-environment.js");
|
|
5
|
+
const input_props_serialization_js_1 = require("../input-props-serialization.js");
|
|
5
6
|
let didWarnSSRImport = false;
|
|
6
7
|
const warnOnceSSRImport = () => {
|
|
7
8
|
if (didWarnSSRImport) {
|
|
@@ -25,7 +26,7 @@ const getInputProps = () => {
|
|
|
25
26
|
if (!param) {
|
|
26
27
|
return {};
|
|
27
28
|
}
|
|
28
|
-
const parsed =
|
|
29
|
+
const parsed = (0, input_props_serialization_js_1.deserializeJSONWithCustomFields)(param);
|
|
29
30
|
return parsed;
|
|
30
31
|
};
|
|
31
32
|
exports.getInputProps = getInputProps;
|
package/dist/cjs/freeze.js
CHANGED
|
@@ -5,11 +5,13 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const react_1 = require("react");
|
|
6
6
|
const SequenceContext_js_1 = require("./SequenceContext.js");
|
|
7
7
|
const timeline_position_state_js_1 = require("./timeline-position-state.js");
|
|
8
|
+
const use_video_config_js_1 = require("./use-video-config.js");
|
|
8
9
|
/**
|
|
9
10
|
* @description This method freezes all of its children to the frame that you specify as a prop
|
|
10
11
|
* @see [Documentation](https://www.remotion.dev/docs/freeze)
|
|
11
12
|
*/
|
|
12
13
|
const Freeze = ({ frame, children }) => {
|
|
14
|
+
const videoConfig = (0, use_video_config_js_1.useVideoConfig)();
|
|
13
15
|
if (typeof frame === 'undefined') {
|
|
14
16
|
throw new Error(`The <Freeze /> component requires a 'frame' prop, but none was passed.`);
|
|
15
17
|
}
|
|
@@ -30,9 +32,11 @@ const Freeze = ({ frame, children }) => {
|
|
|
30
32
|
imperativePlaying: {
|
|
31
33
|
current: false,
|
|
32
34
|
},
|
|
33
|
-
frame
|
|
35
|
+
frame: {
|
|
36
|
+
[videoConfig.id]: frame,
|
|
37
|
+
},
|
|
34
38
|
};
|
|
35
|
-
}, [context, frame]);
|
|
39
|
+
}, [context, frame, videoConfig.id]);
|
|
36
40
|
return ((0, jsx_runtime_1.jsx)(timeline_position_state_js_1.TimelineContext.Provider, { value: value, children: (0, jsx_runtime_1.jsx)(SequenceContext_js_1.SequenceContext.Provider, { value: null, children: children }) }));
|
|
37
41
|
};
|
|
38
42
|
exports.Freeze = Freeze;
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -9,7 +9,10 @@ declare global {
|
|
|
9
9
|
remotion_cancelledError: string | undefined;
|
|
10
10
|
remotion_getCompositionNames: () => string[];
|
|
11
11
|
getStaticCompositions: () => Promise<VideoConfig[]>;
|
|
12
|
-
remotion_calculateComposition: (compId: string) => Promise<VideoConfig
|
|
12
|
+
remotion_calculateComposition: (compId: string) => Promise<Omit<VideoConfig, 'defaultProps' | 'props'> & {
|
|
13
|
+
serializedDefaultPropsWithCustomSchema: string;
|
|
14
|
+
serializedResolvedPropsWithCustomSchema: string;
|
|
15
|
+
}>;
|
|
13
16
|
remotion_setBundleMode: (bundleMode: BundleState) => void;
|
|
14
17
|
remotion_staticBase: string;
|
|
15
18
|
remotion_staticFiles: StaticFile[];
|
|
@@ -18,7 +21,7 @@ declare global {
|
|
|
18
21
|
remotion_projectName: string;
|
|
19
22
|
remotion_cwd: string;
|
|
20
23
|
remotion_studioServerCommand: string;
|
|
21
|
-
remotion_setFrame: (frame: number) => void;
|
|
24
|
+
remotion_setFrame: (frame: number, composition: string) => void;
|
|
22
25
|
remotion_initialFrame: number;
|
|
23
26
|
remotion_proxyPort: number;
|
|
24
27
|
remotion_audioEnabled: boolean;
|
|
@@ -31,7 +34,7 @@ declare global {
|
|
|
31
34
|
remotion_isPlayer: boolean;
|
|
32
35
|
remotion_isBuilding: undefined | (() => void);
|
|
33
36
|
remotion_finishedBuilding: undefined | (() => void);
|
|
34
|
-
siteVersion: '
|
|
37
|
+
siteVersion: '8';
|
|
35
38
|
remotion_version: string;
|
|
36
39
|
remotion_imported: string | boolean;
|
|
37
40
|
}
|
|
@@ -43,7 +46,7 @@ export type BundleState = {
|
|
|
43
46
|
} | {
|
|
44
47
|
type: 'composition';
|
|
45
48
|
compositionName: string;
|
|
46
|
-
|
|
49
|
+
serializedResolvedPropsWithSchema: string;
|
|
47
50
|
compositionHeight: number;
|
|
48
51
|
compositionDurationInFrames: number;
|
|
49
52
|
compositionWidth: number;
|
package/dist/cjs/index.js
CHANGED
|
@@ -98,7 +98,7 @@ exports.Config = new Proxy(proxyObj, {
|
|
|
98
98
|
console.warn('+ Replace:');
|
|
99
99
|
console.warn('import {Config} from "@remotion/cli/config";');
|
|
100
100
|
console.warn();
|
|
101
|
-
console.warn('For more information, see https://
|
|
101
|
+
console.warn('For more information, see https://www.remotion.dev/docs/4-0-migration.');
|
|
102
102
|
process.exit(1);
|
|
103
103
|
};
|
|
104
104
|
},
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type SerializedJSONWithCustomFields = {
|
|
2
|
+
serializedString: string;
|
|
3
|
+
customDateUsed: boolean;
|
|
4
|
+
customFileUsed: boolean;
|
|
5
|
+
mapUsed: boolean;
|
|
6
|
+
setUsed: boolean;
|
|
7
|
+
};
|
|
8
|
+
export declare const FILE_TOKEN = "remotion-file:";
|
|
9
|
+
export declare const serializeJSONWithDate: ({ data, indent, staticBase, }: {
|
|
10
|
+
data: Record<string, unknown>;
|
|
11
|
+
indent: number | undefined;
|
|
12
|
+
staticBase: string | null;
|
|
13
|
+
}) => SerializedJSONWithCustomFields;
|
|
14
|
+
export declare const deserializeJSONWithCustomFields: (data: string) => Record<string, unknown>;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Must keep this file in sync with the one in packages/lambda/src/shared/serialize-props.ts!
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.deserializeJSONWithCustomFields = exports.serializeJSONWithDate = exports.FILE_TOKEN = void 0;
|
|
5
|
+
const static_file_js_1 = require("./static-file.js");
|
|
6
|
+
const DATE_TOKEN = 'remotion-date:';
|
|
7
|
+
exports.FILE_TOKEN = 'remotion-file:';
|
|
8
|
+
const serializeJSONWithDate = ({ data, indent, staticBase, }) => {
|
|
9
|
+
let customDateUsed = false;
|
|
10
|
+
let customFileUsed = false;
|
|
11
|
+
let mapUsed = false;
|
|
12
|
+
let setUsed = false;
|
|
13
|
+
const serializedString = JSON.stringify(data, function (key, value) {
|
|
14
|
+
const item = this[key];
|
|
15
|
+
if (item instanceof Date) {
|
|
16
|
+
customDateUsed = true;
|
|
17
|
+
return `${DATE_TOKEN}${item.toISOString()}`;
|
|
18
|
+
}
|
|
19
|
+
if (item instanceof Map) {
|
|
20
|
+
mapUsed = true;
|
|
21
|
+
return value;
|
|
22
|
+
}
|
|
23
|
+
if (item instanceof Set) {
|
|
24
|
+
setUsed = true;
|
|
25
|
+
return value;
|
|
26
|
+
}
|
|
27
|
+
if (typeof item === 'string' &&
|
|
28
|
+
staticBase !== null &&
|
|
29
|
+
item.startsWith(staticBase)) {
|
|
30
|
+
customFileUsed = true;
|
|
31
|
+
return `${exports.FILE_TOKEN}${item.replace(staticBase + '/', '')}`;
|
|
32
|
+
}
|
|
33
|
+
return value;
|
|
34
|
+
}, indent);
|
|
35
|
+
return { serializedString, customDateUsed, customFileUsed, mapUsed, setUsed };
|
|
36
|
+
};
|
|
37
|
+
exports.serializeJSONWithDate = serializeJSONWithDate;
|
|
38
|
+
const deserializeJSONWithCustomFields = (data) => {
|
|
39
|
+
return JSON.parse(data, (_, value) => {
|
|
40
|
+
if (typeof value === 'string' && value.startsWith(DATE_TOKEN)) {
|
|
41
|
+
return new Date(value.replace(DATE_TOKEN, ''));
|
|
42
|
+
}
|
|
43
|
+
if (typeof value === 'string' && value.startsWith(exports.FILE_TOKEN)) {
|
|
44
|
+
return (0, static_file_js_1.staticFile)(value.replace(exports.FILE_TOKEN, ''));
|
|
45
|
+
}
|
|
46
|
+
return value;
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
exports.deserializeJSONWithCustomFields = deserializeJSONWithCustomFields;
|
package/dist/cjs/internals.d.ts
CHANGED
|
@@ -1,52 +1,51 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import type { CompProps } from './Composition.js';
|
|
3
2
|
import type { TAsset, TCompMetadata, TComposition, TSequence } from './CompositionManager.js';
|
|
4
3
|
import type { CompositionManagerContext } from './CompositionManagerContext.js';
|
|
5
4
|
import * as CSSUtils from './default-css.js';
|
|
6
5
|
import type { RemotionEnvironment } from './get-environment.js';
|
|
6
|
+
import type { SerializedJSONWithCustomFields } from './input-props-serialization.js';
|
|
7
7
|
import { processColor } from './interpolate-colors.js';
|
|
8
8
|
import type { SetTimelineContextValue, TimelineContextValue } from './timeline-position-state.js';
|
|
9
9
|
import * as TimelinePosition from './timeline-position-state.js';
|
|
10
10
|
import { truthy } from './truthy.js';
|
|
11
|
+
import { validateDimension } from './validation/validate-dimensions.js';
|
|
12
|
+
import { validateDurationInFrames } from './validation/validate-duration-in-frames.js';
|
|
13
|
+
import { validateFps } from './validation/validate-fps.js';
|
|
11
14
|
import type { MediaVolumeContextValue, SetMediaVolumeContextValue } from './volume-position-state.js';
|
|
12
15
|
import { useRemotionContexts } from './wrap-remotion-context.js';
|
|
13
16
|
declare const Timeline: typeof TimelinePosition;
|
|
14
17
|
export declare const Internals: {
|
|
15
|
-
useUnsafeVideoConfig: () => import("./video-config.js").VideoConfig | null;
|
|
16
|
-
Timeline: typeof TimelinePosition;
|
|
17
|
-
CompositionManager: import("react").Context<CompositionManagerContext>;
|
|
18
|
-
SequenceManager: import("react").Context<import("./SequenceManager.js").SequenceManagerContext>;
|
|
19
|
-
RemotionRoot: import("react").FC<{
|
|
18
|
+
readonly useUnsafeVideoConfig: () => import("./video-config.js").VideoConfig | null;
|
|
19
|
+
readonly Timeline: typeof TimelinePosition;
|
|
20
|
+
readonly CompositionManager: import("react").Context<CompositionManagerContext>;
|
|
21
|
+
readonly SequenceManager: import("react").Context<import("./SequenceManager.js").SequenceManagerContext>;
|
|
22
|
+
readonly RemotionRoot: import("react").FC<{
|
|
20
23
|
children: import("react").ReactNode;
|
|
21
24
|
numberOfAudioTags: number;
|
|
22
25
|
}>;
|
|
23
|
-
useVideo: () => (import("./video-config.js").VideoConfig & {
|
|
26
|
+
readonly useVideo: () => (import("./video-config.js").VideoConfig & {
|
|
24
27
|
component: import("react").LazyExoticComponent<import("react").ComponentType<Record<string, unknown>>>;
|
|
25
28
|
}) | null;
|
|
26
|
-
getRoot: () => import("react").FC<{}> | null;
|
|
27
|
-
useMediaVolumeState: () => readonly [number, (u: number) => void];
|
|
28
|
-
useMediaMutedState: () => readonly [boolean, (u: import("react").SetStateAction<boolean>) => void];
|
|
29
|
-
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>> & {
|
|
29
|
+
readonly getRoot: () => import("react").FC<{}> | null;
|
|
30
|
+
readonly useMediaVolumeState: () => readonly [number, (u: number) => void];
|
|
31
|
+
readonly useMediaMutedState: () => readonly [boolean, (u: import("react").SetStateAction<boolean>) => void];
|
|
32
|
+
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>> & {
|
|
30
33
|
readonly _result: import("react").ComponentType<Props>;
|
|
31
34
|
};
|
|
32
|
-
truthy: typeof truthy;
|
|
33
|
-
SequenceContext: import("react").Context<import("./SequenceContext.js").SequenceContextType | null>;
|
|
34
|
-
useRemotionContexts: typeof useRemotionContexts;
|
|
35
|
-
RemotionContextProvider: (props: import("./wrap-remotion-context.js").RemotionContextProviderProps) => JSX.Element;
|
|
36
|
-
CSSUtils: typeof CSSUtils;
|
|
37
|
-
setupEnvVariables: () => void;
|
|
38
|
-
MediaVolumeContext: import("react").Context<MediaVolumeContextValue>;
|
|
39
|
-
SetMediaVolumeContext: import("react").Context<SetMediaVolumeContextValue>;
|
|
40
|
-
validateDurationInFrames:
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
validateDefaultAndInputProps: (defaultProps: unknown, name: "defaultProps" | "inputProps", compositionId: string | null) => void;
|
|
47
|
-
validateDimension: (amount: number, nameOfProp: string, location: string) => void;
|
|
48
|
-
getRemotionEnvironment: () => RemotionEnvironment;
|
|
49
|
-
SharedAudioContext: import("react").Context<{
|
|
35
|
+
readonly truthy: typeof truthy;
|
|
36
|
+
readonly SequenceContext: import("react").Context<import("./SequenceContext.js").SequenceContextType | null>;
|
|
37
|
+
readonly useRemotionContexts: typeof useRemotionContexts;
|
|
38
|
+
readonly RemotionContextProvider: (props: import("./wrap-remotion-context.js").RemotionContextProviderProps) => JSX.Element;
|
|
39
|
+
readonly CSSUtils: typeof CSSUtils;
|
|
40
|
+
readonly setupEnvVariables: () => void;
|
|
41
|
+
readonly MediaVolumeContext: import("react").Context<MediaVolumeContextValue>;
|
|
42
|
+
readonly SetMediaVolumeContext: import("react").Context<SetMediaVolumeContextValue>;
|
|
43
|
+
readonly validateDurationInFrames: typeof validateDurationInFrames;
|
|
44
|
+
readonly validateFps: typeof validateFps;
|
|
45
|
+
readonly validateDefaultAndInputProps: (defaultProps: unknown, name: "defaultProps" | "inputProps", compositionId: string | null) => void;
|
|
46
|
+
readonly validateDimension: typeof validateDimension;
|
|
47
|
+
readonly getRemotionEnvironment: () => RemotionEnvironment;
|
|
48
|
+
readonly SharedAudioContext: import("react").Context<{
|
|
50
49
|
registerAudio: (aud: import("./index.js").RemotionAudioProps, audioId: string) => {
|
|
51
50
|
id: number;
|
|
52
51
|
props: import("./index.js").RemotionAudioProps;
|
|
@@ -62,53 +61,54 @@ export declare const Internals: {
|
|
|
62
61
|
playAllAudios: () => void;
|
|
63
62
|
numberOfAudioTags: number;
|
|
64
63
|
} | null>;
|
|
65
|
-
SharedAudioContextProvider: import("react").FC<{
|
|
64
|
+
readonly SharedAudioContextProvider: import("react").FC<{
|
|
66
65
|
numberOfAudioTags: number;
|
|
67
66
|
children: import("react").ReactNode;
|
|
68
67
|
component: import("react").LazyExoticComponent<import("react").ComponentType<Record<string, unknown>>> | null;
|
|
69
68
|
}>;
|
|
70
|
-
invalidCompositionErrorMessage: string;
|
|
71
|
-
isCompositionIdValid: (id: string) => RegExpMatchArray | null;
|
|
72
|
-
getPreviewDomElement: () => HTMLElement | null;
|
|
73
|
-
compositionsRef: import("react").RefObject<{
|
|
69
|
+
readonly invalidCompositionErrorMessage: string;
|
|
70
|
+
readonly isCompositionIdValid: (id: string) => RegExpMatchArray | null;
|
|
71
|
+
readonly getPreviewDomElement: () => HTMLElement | null;
|
|
72
|
+
readonly compositionsRef: import("react").RefObject<{
|
|
74
73
|
getCompositions: () => import("./CompositionManager.js").TCompMetadataWithCalcFunction<import("zod").AnyZodObject, Record<string, unknown>>[];
|
|
75
74
|
}>;
|
|
76
|
-
DELAY_RENDER_CALLSTACK_TOKEN:
|
|
77
|
-
portalNode: () => HTMLElement;
|
|
78
|
-
waitForRoot: (fn: (comp: import("react").FC<{}>) => void) => () => void;
|
|
79
|
-
CanUseRemotionHooksProvider: import("react").FC<{
|
|
75
|
+
readonly DELAY_RENDER_CALLSTACK_TOKEN: "The delayRender was called:";
|
|
76
|
+
readonly portalNode: () => HTMLElement;
|
|
77
|
+
readonly waitForRoot: (fn: (comp: import("react").FC<{}>) => void) => () => void;
|
|
78
|
+
readonly CanUseRemotionHooksProvider: import("react").FC<{
|
|
80
79
|
children: import("react").ReactNode;
|
|
81
80
|
}>;
|
|
82
|
-
CanUseRemotionHooks: import("react").Context<boolean>;
|
|
83
|
-
PrefetchProvider: import("react").FC<{
|
|
81
|
+
readonly CanUseRemotionHooks: import("react").Context<boolean>;
|
|
82
|
+
readonly PrefetchProvider: import("react").FC<{
|
|
84
83
|
children: import("react").ReactNode;
|
|
85
84
|
}>;
|
|
86
|
-
DurationsContextProvider: import("react").FC<{
|
|
85
|
+
readonly DurationsContextProvider: import("react").FC<{
|
|
87
86
|
children: import("react").ReactNode;
|
|
88
87
|
}>;
|
|
89
|
-
IsPlayerContextProvider: import("react").FC<{
|
|
88
|
+
readonly IsPlayerContextProvider: import("react").FC<{
|
|
90
89
|
children?: import("react").ReactNode;
|
|
91
90
|
}>;
|
|
92
|
-
useIsPlayer: () => boolean;
|
|
93
|
-
useRemotionEnvironment: () => RemotionEnvironment;
|
|
94
|
-
validateFrame: ({ allowFloats, durationInFrames, frame, }: {
|
|
91
|
+
readonly useIsPlayer: () => boolean;
|
|
92
|
+
readonly useRemotionEnvironment: () => RemotionEnvironment;
|
|
93
|
+
readonly validateFrame: ({ allowFloats, durationInFrames, frame, }: {
|
|
95
94
|
frame: number;
|
|
96
95
|
durationInFrames: number;
|
|
97
96
|
allowFloats: boolean;
|
|
98
97
|
}) => void;
|
|
99
|
-
EditorPropsProvider: import("react").FC<{
|
|
98
|
+
readonly EditorPropsProvider: import("react").FC<{
|
|
100
99
|
children: import("react").ReactNode;
|
|
101
100
|
}>;
|
|
102
|
-
EditorPropsContext: import("react").Context<import("./EditorProps.js").EditorPropsContextType>;
|
|
103
|
-
usePreload: (src: string) => string;
|
|
104
|
-
processColor: typeof processColor;
|
|
105
|
-
NonceContext: import("react").Context<import("./nonce.js").TNonceContext>;
|
|
106
|
-
resolveVideoConfig: ({ composition, editorProps: editorPropsOrUndefined, signal, }: {
|
|
101
|
+
readonly EditorPropsContext: import("react").Context<import("./EditorProps.js").EditorPropsContextType>;
|
|
102
|
+
readonly usePreload: (src: string) => string;
|
|
103
|
+
readonly processColor: typeof processColor;
|
|
104
|
+
readonly NonceContext: import("react").Context<import("./nonce.js").TNonceContext>;
|
|
105
|
+
readonly resolveVideoConfig: ({ composition, editorProps: editorPropsOrUndefined, signal, inputProps, }: {
|
|
107
106
|
composition: import("./CompositionManager.js").TCompMetadataWithCalcFunction<import("zod").AnyZodObject, Record<string, unknown>>;
|
|
108
107
|
editorProps: object;
|
|
109
108
|
signal: AbortSignal;
|
|
109
|
+
inputProps: Record<string, unknown>;
|
|
110
110
|
}) => import("./video-config.js").VideoConfig | Promise<import("./video-config.js").VideoConfig>;
|
|
111
|
-
useResolvedVideoConfig: (preferredCompositionId: string | null) => ({
|
|
111
|
+
readonly useResolvedVideoConfig: (preferredCompositionId: string | null) => ({
|
|
112
112
|
type: "loading";
|
|
113
113
|
} | {
|
|
114
114
|
type: "success";
|
|
@@ -117,15 +117,24 @@ export declare const Internals: {
|
|
|
117
117
|
type: "error";
|
|
118
118
|
error: Error;
|
|
119
119
|
}) | null;
|
|
120
|
-
resolveCompositionsRef: import("react").RefObject<{
|
|
120
|
+
readonly resolveCompositionsRef: import("react").RefObject<{
|
|
121
121
|
setCurrentRenderModalComposition: (compositionId: string | null) => void;
|
|
122
122
|
reloadCurrentlySelectedComposition: () => void;
|
|
123
123
|
}>;
|
|
124
|
-
ResolveCompositionConfig: import("react").FC<import("react").PropsWithChildren<{
|
|
124
|
+
readonly ResolveCompositionConfig: import("react").FC<import("react").PropsWithChildren<{
|
|
125
125
|
children: import("react").ReactNode;
|
|
126
126
|
}>>;
|
|
127
|
-
REMOTION_STUDIO_CONTAINER_ELEMENT:
|
|
128
|
-
AssetManager: import("react").Context<import("./AssetManager.js").AssetManagerContext>;
|
|
129
|
-
bundleName:
|
|
127
|
+
readonly REMOTION_STUDIO_CONTAINER_ELEMENT: "__remotion-studio-container";
|
|
128
|
+
readonly AssetManager: import("react").Context<import("./AssetManager.js").AssetManagerContext>;
|
|
129
|
+
readonly bundleName: "bundle.js";
|
|
130
|
+
readonly persistCurrentFrame: (frame: number, composition: string) => void;
|
|
131
|
+
readonly useTimelineSetFrame: () => (u: import("react").SetStateAction<Record<string, number>>) => void;
|
|
132
|
+
readonly serializeJSONWithDate: ({ data, indent, staticBase, }: {
|
|
133
|
+
data: Record<string, unknown>;
|
|
134
|
+
indent: number | undefined;
|
|
135
|
+
staticBase: string | null;
|
|
136
|
+
}) => SerializedJSONWithCustomFields;
|
|
137
|
+
readonly deserializeJSONWithCustomFields: (data: string) => Record<string, unknown>;
|
|
138
|
+
readonly FILE_TOKEN: "remotion-file:";
|
|
130
139
|
};
|
|
131
|
-
export type { TComposition, Timeline, TCompMetadata, TSequence, TAsset, TimelineContextValue, SetTimelineContextValue, CompProps, CompositionManagerContext, MediaVolumeContextValue, SetMediaVolumeContextValue, RemotionEnvironment, };
|
|
140
|
+
export type { TComposition, Timeline, TCompMetadata, TSequence, TAsset, TimelineContextValue, SetTimelineContextValue, CompProps, CompositionManagerContext, MediaVolumeContextValue, SetMediaVolumeContextValue, RemotionEnvironment, SerializedJSONWithCustomFields, };
|