remotion 4.0.258 → 4.0.259
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.js +4 -1
- package/dist/cjs/internals.d.ts +9 -6
- package/dist/cjs/log.d.ts +5 -5
- package/dist/cjs/use-lazy-component.d.ts +4 -1
- package/dist/cjs/use-lazy-component.js +7 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/index.mjs +15 -3
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
package/dist/cjs/Composition.js
CHANGED
|
@@ -34,7 +34,10 @@ const Composition = ({ width, height, fps, durationInFrames, id, defaultProps, s
|
|
|
34
34
|
var _a, _b;
|
|
35
35
|
const { registerComposition, unregisterComposition } = (0, react_1.useContext)(CompositionManagerContext_js_1.CompositionManager);
|
|
36
36
|
const video = (0, use_video_js_1.useVideo)();
|
|
37
|
-
const lazy = (0, use_lazy_component_js_1.useLazyComponent)(
|
|
37
|
+
const lazy = (0, use_lazy_component_js_1.useLazyComponent)({
|
|
38
|
+
compProps: compProps,
|
|
39
|
+
componentName: 'Composition',
|
|
40
|
+
});
|
|
38
41
|
const nonce = (0, nonce_js_1.useNonce)();
|
|
39
42
|
const isPlayer = (0, is_player_js_1.useIsPlayer)();
|
|
40
43
|
const environment = (0, get_remotion_environment_js_1.getRemotionEnvironment)();
|
package/dist/cjs/internals.d.ts
CHANGED
|
@@ -28,7 +28,10 @@ export declare const Internals: {
|
|
|
28
28
|
readonly getRoot: () => import("react").FC<{}> | null;
|
|
29
29
|
readonly useMediaVolumeState: () => readonly [number, (u: number) => void];
|
|
30
30
|
readonly useMediaMutedState: () => readonly [boolean, (u: React.SetStateAction<boolean>) => void];
|
|
31
|
-
readonly useLazyComponent: <Props>(compProps
|
|
31
|
+
readonly useLazyComponent: <Props>({ compProps, componentName, }: {
|
|
32
|
+
compProps: CompProps<Props>;
|
|
33
|
+
componentName: string;
|
|
34
|
+
}) => import("react").ExoticComponent<Props | (import("react").PropsWithoutRef<Props> & import("react").RefAttributes<import("react").Component<Props, any, any>>)> & {
|
|
32
35
|
readonly _result: import("react").ComponentType<Props>;
|
|
33
36
|
};
|
|
34
37
|
readonly truthy: typeof truthy;
|
|
@@ -169,11 +172,11 @@ export declare const Internals: {
|
|
|
169
172
|
readonly PROPS_UPDATED_EXTERNALLY: "remotion.propsUpdatedExternally";
|
|
170
173
|
readonly validateRenderAsset: (artifact: TRenderAsset) => void;
|
|
171
174
|
readonly Log: {
|
|
172
|
-
trace: (logLevel: import("./log.js").LogLevel, ...
|
|
173
|
-
verbose: (logLevel: import("./log.js").LogLevel, ...
|
|
174
|
-
info: (logLevel: import("./log.js").LogLevel, ...
|
|
175
|
-
warn: (logLevel: import("./log.js").LogLevel, ...
|
|
176
|
-
error: (...
|
|
175
|
+
trace: (logLevel: import("./log.js").LogLevel, message?: any, ...optionalParams: any[]) => void;
|
|
176
|
+
verbose: (logLevel: import("./log.js").LogLevel, message?: any, ...optionalParams: any[]) => void;
|
|
177
|
+
info: (logLevel: import("./log.js").LogLevel, message?: any, ...optionalParams: any[]) => void;
|
|
178
|
+
warn: (logLevel: import("./log.js").LogLevel, message?: any, ...optionalParams: any[]) => void;
|
|
179
|
+
error: (message?: any, ...optionalParams: any[]) => void;
|
|
177
180
|
};
|
|
178
181
|
readonly LogLevelContext: import("react").Context<LoggingContextValue>;
|
|
179
182
|
readonly useLogLevel: () => import("./log.js").LogLevel;
|
package/dist/cjs/log.d.ts
CHANGED
|
@@ -2,9 +2,9 @@ export declare const logLevels: readonly ["trace", "verbose", "info", "warn", "e
|
|
|
2
2
|
export type LogLevel = (typeof logLevels)[number];
|
|
3
3
|
export declare const isEqualOrBelowLogLevel: (currentLevel: LogLevel, level: LogLevel) => boolean;
|
|
4
4
|
export declare const Log: {
|
|
5
|
-
trace: (logLevel: LogLevel, ...
|
|
6
|
-
verbose: (logLevel: LogLevel, ...
|
|
7
|
-
info: (logLevel: LogLevel, ...
|
|
8
|
-
warn: (logLevel: LogLevel, ...
|
|
9
|
-
error: (...
|
|
5
|
+
trace: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
|
|
6
|
+
verbose: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
|
|
7
|
+
info: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
|
|
8
|
+
warn: (logLevel: LogLevel, message?: any, ...optionalParams: any[]) => void;
|
|
9
|
+
error: (message?: any, ...optionalParams: any[]) => void;
|
|
10
10
|
};
|
|
@@ -3,5 +3,8 @@ import type { CompProps } from './Composition.js';
|
|
|
3
3
|
type LazyExoticComponent<T extends ComponentType<any>> = ExoticComponent<ComponentPropsWithRef<T>> & {
|
|
4
4
|
readonly _result: T;
|
|
5
5
|
};
|
|
6
|
-
export declare const useLazyComponent: <Props>(compProps
|
|
6
|
+
export declare const useLazyComponent: <Props>({ compProps, componentName, }: {
|
|
7
|
+
compProps: CompProps<Props>;
|
|
8
|
+
componentName: string;
|
|
9
|
+
}) => LazyExoticComponent<ComponentType<Props>>;
|
|
7
10
|
export {};
|
|
@@ -26,10 +26,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
26
26
|
exports.useLazyComponent = void 0;
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
// Expected, it can be any component props
|
|
29
|
-
const useLazyComponent = (compProps) => {
|
|
29
|
+
const useLazyComponent = ({ compProps, componentName, }) => {
|
|
30
30
|
const lazy = (0, react_1.useMemo)(() => {
|
|
31
31
|
if ('lazyComponent' in compProps &&
|
|
32
32
|
typeof compProps.lazyComponent !== 'undefined') {
|
|
33
|
+
if (typeof compProps.lazyComponent === 'undefined') {
|
|
34
|
+
throw new Error(`A value of \`undefined\` was passed to the \`lazyComponent\` prop. Check the value you are passing to the <${componentName}/> component.`);
|
|
35
|
+
}
|
|
33
36
|
return react_1.default.lazy(compProps.lazyComponent);
|
|
34
37
|
}
|
|
35
38
|
if ('component' in compProps) {
|
|
@@ -37,6 +40,9 @@ const useLazyComponent = (compProps) => {
|
|
|
37
40
|
if (typeof document === 'undefined') {
|
|
38
41
|
return compProps.component;
|
|
39
42
|
}
|
|
43
|
+
if (typeof compProps.component === 'undefined') {
|
|
44
|
+
throw new Error(`A value of \`undefined\` was passed to the \`component\` prop. Check the value you are passing to the <${componentName}/> component.`);
|
|
45
|
+
}
|
|
40
46
|
return react_1.default.lazy(() => Promise.resolve({ default: compProps.component }));
|
|
41
47
|
}
|
|
42
48
|
throw new Error("You must pass either 'component' or 'lazyComponent'");
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
package/dist/esm/index.mjs
CHANGED
|
@@ -104,7 +104,7 @@ function truthy(value) {
|
|
|
104
104
|
}
|
|
105
105
|
|
|
106
106
|
// src/version.ts
|
|
107
|
-
var VERSION = "4.0.
|
|
107
|
+
var VERSION = "4.0.259";
|
|
108
108
|
|
|
109
109
|
// src/multiple-versions-warning.ts
|
|
110
110
|
var checkMultipleRemotionVersions = () => {
|
|
@@ -4386,15 +4386,24 @@ var portalNode = () => {
|
|
|
4386
4386
|
|
|
4387
4387
|
// src/use-lazy-component.ts
|
|
4388
4388
|
import React18, { useMemo as useMemo22 } from "react";
|
|
4389
|
-
var useLazyComponent = (
|
|
4389
|
+
var useLazyComponent = ({
|
|
4390
|
+
compProps,
|
|
4391
|
+
componentName
|
|
4392
|
+
}) => {
|
|
4390
4393
|
const lazy = useMemo22(() => {
|
|
4391
4394
|
if ("lazyComponent" in compProps && typeof compProps.lazyComponent !== "undefined") {
|
|
4395
|
+
if (typeof compProps.lazyComponent === "undefined") {
|
|
4396
|
+
throw new Error(`A value of \`undefined\` was passed to the \`lazyComponent\` prop. Check the value you are passing to the <${componentName}/> component.`);
|
|
4397
|
+
}
|
|
4392
4398
|
return React18.lazy(compProps.lazyComponent);
|
|
4393
4399
|
}
|
|
4394
4400
|
if ("component" in compProps) {
|
|
4395
4401
|
if (typeof document === "undefined") {
|
|
4396
4402
|
return compProps.component;
|
|
4397
4403
|
}
|
|
4404
|
+
if (typeof compProps.component === "undefined") {
|
|
4405
|
+
throw new Error(`A value of \`undefined\` was passed to the \`component\` prop. Check the value you are passing to the <${componentName}/> component.`);
|
|
4406
|
+
}
|
|
4398
4407
|
return React18.lazy(() => Promise.resolve({ default: compProps.component }));
|
|
4399
4408
|
}
|
|
4400
4409
|
throw new Error("You must pass either 'component' or 'lazyComponent'");
|
|
@@ -4446,7 +4455,10 @@ var Composition = ({
|
|
|
4446
4455
|
}) => {
|
|
4447
4456
|
const { registerComposition, unregisterComposition } = useContext24(CompositionManager);
|
|
4448
4457
|
const video = useVideo();
|
|
4449
|
-
const lazy = useLazyComponent(
|
|
4458
|
+
const lazy = useLazyComponent({
|
|
4459
|
+
compProps,
|
|
4460
|
+
componentName: "Composition"
|
|
4461
|
+
});
|
|
4450
4462
|
const nonce = useNonce();
|
|
4451
4463
|
const isPlayer = useIsPlayer();
|
|
4452
4464
|
const environment = getRemotionEnvironment();
|
package/dist/esm/version.mjs
CHANGED
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.259",
|
|
7
7
|
"description": "Make videos programmatically",
|
|
8
8
|
"main": "dist/cjs/index.js",
|
|
9
9
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"webpack": "5.96.1",
|
|
29
29
|
"zod": "3.22.3",
|
|
30
30
|
"eslint": "9.14.0",
|
|
31
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
31
|
+
"@remotion/eslint-config-internal": "4.0.259"
|
|
32
32
|
},
|
|
33
33
|
"keywords": [
|
|
34
34
|
"remotion",
|