remotion 4.0.146 → 4.0.147
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/CompositionManager.d.ts +1 -1
- package/dist/cjs/EditorProps.d.ts +4 -1
- package/dist/cjs/EditorProps.js +7 -1
- package/dist/cjs/internals.d.ts +7 -2
- package/dist/cjs/internals.js +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/index.mjs +9 -2
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
|
@@ -69,7 +69,7 @@ export type TRenderAsset = {
|
|
|
69
69
|
audioStartFrame: number;
|
|
70
70
|
};
|
|
71
71
|
export declare const compositionsRef: React.RefObject<{
|
|
72
|
-
getCompositions: () =>
|
|
72
|
+
getCompositions: () => AnyComposition[];
|
|
73
73
|
}>;
|
|
74
74
|
export declare const CompositionManagerProvider: React.FC<{
|
|
75
75
|
readonly children: React.ReactNode;
|
|
@@ -9,7 +9,10 @@ export type EditorPropsContextType = {
|
|
|
9
9
|
}) => void;
|
|
10
10
|
};
|
|
11
11
|
export declare const EditorPropsContext: React.Context<EditorPropsContextType>;
|
|
12
|
+
export declare const editorPropsProviderRef: React.RefObject<{
|
|
13
|
+
getProps: () => Props;
|
|
14
|
+
}>;
|
|
12
15
|
export declare const EditorPropsProvider: React.FC<{
|
|
13
|
-
children: React.ReactNode;
|
|
16
|
+
readonly children: React.ReactNode;
|
|
14
17
|
}>;
|
|
15
18
|
export {};
|
package/dist/cjs/EditorProps.js
CHANGED
|
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
-
exports.EditorPropsProvider = exports.EditorPropsContext = void 0;
|
|
26
|
+
exports.EditorPropsProvider = exports.editorPropsProviderRef = exports.EditorPropsContext = void 0;
|
|
27
27
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
28
|
const react_1 = __importStar(require("react"));
|
|
29
29
|
exports.EditorPropsContext = (0, react_1.createContext)({
|
|
@@ -32,6 +32,7 @@ exports.EditorPropsContext = (0, react_1.createContext)({
|
|
|
32
32
|
throw new Error('Not implemented');
|
|
33
33
|
},
|
|
34
34
|
});
|
|
35
|
+
exports.editorPropsProviderRef = react_1.default.createRef();
|
|
35
36
|
const EditorPropsProvider = ({ children }) => {
|
|
36
37
|
const [props, setProps] = react_1.default.useState({});
|
|
37
38
|
const updateProps = (0, react_1.useCallback)(({ defaultProps, id, newProps, }) => {
|
|
@@ -45,6 +46,11 @@ const EditorPropsProvider = ({ children }) => {
|
|
|
45
46
|
};
|
|
46
47
|
});
|
|
47
48
|
}, []);
|
|
49
|
+
(0, react_1.useImperativeHandle)(exports.editorPropsProviderRef, () => {
|
|
50
|
+
return {
|
|
51
|
+
getProps: () => props,
|
|
52
|
+
};
|
|
53
|
+
}, [props]);
|
|
48
54
|
const ctx = (0, react_1.useMemo)(() => {
|
|
49
55
|
return { props, updateProps };
|
|
50
56
|
}, [props, updateProps]);
|
package/dist/cjs/internals.d.ts
CHANGED
|
@@ -64,7 +64,7 @@ export declare const Internals: {
|
|
|
64
64
|
readonly isCompositionIdValid: (id: string) => RegExpMatchArray | null;
|
|
65
65
|
readonly getPreviewDomElement: () => HTMLElement | null;
|
|
66
66
|
readonly compositionsRef: import("react").RefObject<{
|
|
67
|
-
getCompositions: () => import("./CompositionManager.js").
|
|
67
|
+
getCompositions: () => import("./CompositionManager.js").AnyComposition[];
|
|
68
68
|
}>;
|
|
69
69
|
readonly portalNode: () => HTMLElement;
|
|
70
70
|
readonly waitForRoot: (fn: (comp: import("react").FC<{}>) => void) => () => void;
|
|
@@ -83,7 +83,7 @@ export declare const Internals: {
|
|
|
83
83
|
}>;
|
|
84
84
|
readonly useIsPlayer: () => boolean;
|
|
85
85
|
readonly EditorPropsProvider: import("react").FC<{
|
|
86
|
-
children: import("react").ReactNode;
|
|
86
|
+
readonly children: import("react").ReactNode;
|
|
87
87
|
}>;
|
|
88
88
|
readonly EditorPropsContext: import("react").Context<import("./EditorProps.js").EditorPropsContextType>;
|
|
89
89
|
readonly usePreload: (src: string) => string;
|
|
@@ -155,5 +155,10 @@ export declare const Internals: {
|
|
|
155
155
|
height: number;
|
|
156
156
|
};
|
|
157
157
|
}) => number;
|
|
158
|
+
readonly editorPropsProviderRef: import("react").RefObject<{
|
|
159
|
+
getProps: () => {
|
|
160
|
+
[x: string]: Record<string, unknown>;
|
|
161
|
+
};
|
|
162
|
+
}>;
|
|
158
163
|
};
|
|
159
164
|
export type { CompositionManagerContext, CompProps, MediaVolumeContextValue, RemotionEnvironment, SerializedJSONWithCustomFields, SetMediaVolumeContextValue, SetTimelineContextValue, TRenderAsset as TAsset, TCompMetadata, TComposition, TimelinePosition as Timeline, TimelineContextValue, TSequence, WatchRemotionStaticFilesPayload, };
|
package/dist/cjs/internals.js
CHANGED
|
@@ -124,4 +124,5 @@ exports.Internals = {
|
|
|
124
124
|
CurrentScaleContext: use_current_scale_js_1.CurrentScaleContext,
|
|
125
125
|
PreviewSizeContext: use_current_scale_js_1.PreviewSizeContext,
|
|
126
126
|
calculateScale: use_current_scale_js_1.calculateScale,
|
|
127
|
+
editorPropsProviderRef: EditorProps_js_1.editorPropsProviderRef,
|
|
127
128
|
};
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
package/dist/esm/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { createContext, useState, useMemo, useLayoutEffect, useContext, useEffect, forwardRef, useCallback, useRef,
|
|
1
|
+
import React, { createContext, useState, useMemo, useLayoutEffect, useContext, useEffect, forwardRef, useCallback, useRef, useImperativeHandle, createRef, useReducer, Suspense, Children } from 'react';
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
|
|
@@ -110,7 +110,7 @@ function truthy(value) {
|
|
|
110
110
|
* @see [Documentation](https://remotion.dev/docs/version)
|
|
111
111
|
* @returns {string} The current version of the remotion package
|
|
112
112
|
*/
|
|
113
|
-
const VERSION = '4.0.
|
|
113
|
+
const VERSION = '4.0.147';
|
|
114
114
|
|
|
115
115
|
const checkMultipleRemotionVersions = () => {
|
|
116
116
|
if (typeof globalThis === 'undefined') {
|
|
@@ -265,6 +265,7 @@ const EditorPropsContext = createContext({
|
|
|
265
265
|
throw new Error('Not implemented');
|
|
266
266
|
},
|
|
267
267
|
});
|
|
268
|
+
const editorPropsProviderRef = React.createRef();
|
|
268
269
|
const EditorPropsProvider = ({ children }) => {
|
|
269
270
|
const [props, setProps] = React.useState({});
|
|
270
271
|
const updateProps = useCallback(({ defaultProps, id, newProps, }) => {
|
|
@@ -278,6 +279,11 @@ const EditorPropsProvider = ({ children }) => {
|
|
|
278
279
|
};
|
|
279
280
|
});
|
|
280
281
|
}, []);
|
|
282
|
+
useImperativeHandle(editorPropsProviderRef, () => {
|
|
283
|
+
return {
|
|
284
|
+
getProps: () => props,
|
|
285
|
+
};
|
|
286
|
+
}, [props]);
|
|
281
287
|
const ctx = useMemo(() => {
|
|
282
288
|
return { props, updateProps };
|
|
283
289
|
}, [props, updateProps]);
|
|
@@ -4059,6 +4065,7 @@ const Internals = {
|
|
|
4059
4065
|
CurrentScaleContext,
|
|
4060
4066
|
PreviewSizeContext,
|
|
4061
4067
|
calculateScale,
|
|
4068
|
+
editorPropsProviderRef,
|
|
4062
4069
|
};
|
|
4063
4070
|
|
|
4064
4071
|
/**
|
package/dist/esm/version.mjs
CHANGED