remotion 4.0.250 → 4.0.252
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/RemotionRoot.d.ts +2 -0
- package/dist/cjs/RemotionRoot.js +2 -2
- package/dist/cjs/Sequence.d.ts +1 -0
- package/dist/cjs/Sequence.js +3 -2
- package/dist/cjs/animated-image/resolve-image-source.js +4 -2
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/internals.d.ts +3 -1
- package/dist/cjs/internals.js +1 -0
- package/dist/cjs/log-level-context.d.ts +1 -1
- package/dist/cjs/use-media-playback.js +1 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/wrap-remotion-context.d.ts +1 -1
- package/dist/esm/index.mjs +20 -9
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
package/dist/cjs/RemotionRoot.js
CHANGED
|
@@ -13,7 +13,7 @@ const prefetch_state_js_1 = require("./prefetch-state.js");
|
|
|
13
13
|
const random_js_1 = require("./random.js");
|
|
14
14
|
const timeline_position_state_js_1 = require("./timeline-position-state.js");
|
|
15
15
|
const duration_state_js_1 = require("./video/duration-state.js");
|
|
16
|
-
const RemotionRoot = ({ children, numberOfAudioTags }) => {
|
|
16
|
+
const RemotionRoot = ({ children, numberOfAudioTags, logLevel }) => {
|
|
17
17
|
const [remotionRootId] = (0, react_1.useState)(() => String((0, random_js_1.random)(null)));
|
|
18
18
|
const [frame, setFrame] = (0, react_1.useState)(() => (0, timeline_position_state_js_1.getInitialFrameState)());
|
|
19
19
|
const [playing, setPlaying] = (0, react_1.useState)(false);
|
|
@@ -87,6 +87,6 @@ const RemotionRoot = ({ children, numberOfAudioTags }) => {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
}, []);
|
|
90
|
-
return ((0, jsx_runtime_1.jsx)(log_level_context_js_1.LogLevelContext.Provider, { value:
|
|
90
|
+
return ((0, jsx_runtime_1.jsx)(log_level_context_js_1.LogLevelContext.Provider, { value: logLevel, children: (0, jsx_runtime_1.jsx)(nonce_js_1.NonceContext.Provider, { value: nonceContext, children: (0, jsx_runtime_1.jsx)(timeline_position_state_js_1.TimelineContext.Provider, { value: timelineContextValue, children: (0, jsx_runtime_1.jsx)(timeline_position_state_js_1.SetTimelineContext.Provider, { value: setTimelineContextValue, children: (0, jsx_runtime_1.jsx)(EditorProps_js_1.EditorPropsProvider, { children: (0, jsx_runtime_1.jsx)(prefetch_state_js_1.PrefetchProvider, { children: (0, jsx_runtime_1.jsx)(CompositionManager_js_1.CompositionManagerProvider, { numberOfAudioTags: numberOfAudioTags, children: (0, jsx_runtime_1.jsx)(duration_state_js_1.DurationsContextProvider, { children: (0, jsx_runtime_1.jsx)(buffering_js_1.BufferingProvider, { children: children }) }) }) }) }) }) }) }) }));
|
|
91
91
|
};
|
|
92
92
|
exports.RemotionRoot = RemotionRoot;
|
package/dist/cjs/Sequence.d.ts
CHANGED
package/dist/cjs/Sequence.js
CHANGED
|
@@ -150,7 +150,7 @@ const PremountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
150
150
|
if (props.layout === 'none') {
|
|
151
151
|
throw new Error('`<Sequence>` with `premountFor` prop does not support layout="none"');
|
|
152
152
|
}
|
|
153
|
-
const { style: passedStyle, from = 0, premountFor = 0, ...otherProps } = props;
|
|
153
|
+
const { style: passedStyle, from = 0, premountFor = 0, styleWhilePremounted, ...otherProps } = props;
|
|
154
154
|
const premountingActive = frame < from && frame >= from - premountFor;
|
|
155
155
|
const style = (0, react_1.useMemo)(() => {
|
|
156
156
|
var _a;
|
|
@@ -160,8 +160,9 @@ const PremountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
160
160
|
pointerEvents: premountingActive
|
|
161
161
|
? 'none'
|
|
162
162
|
: ((_a = passedStyle === null || passedStyle === void 0 ? void 0 : passedStyle.pointerEvents) !== null && _a !== void 0 ? _a : undefined),
|
|
163
|
+
...(premountingActive ? styleWhilePremounted : {}),
|
|
163
164
|
};
|
|
164
|
-
}, [premountingActive,
|
|
165
|
+
}, [passedStyle, premountingActive, styleWhilePremounted]);
|
|
165
166
|
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 }) }));
|
|
166
167
|
};
|
|
167
168
|
const PremountedSequence = (0, react_1.forwardRef)(PremountedSequenceRefForwardingFunction);
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveAnimatedImageSource = void 0;
|
|
4
4
|
const resolveAnimatedImageSource = (src) => {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
if (typeof window === 'undefined') {
|
|
6
|
+
return src;
|
|
7
|
+
}
|
|
8
|
+
return new URL(src, window.origin).href;
|
|
7
9
|
};
|
|
8
10
|
exports.resolveAnimatedImageSource = resolveAnimatedImageSource;
|
package/dist/cjs/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import './asset-types.js';
|
|
|
3
3
|
import type { Codec } from './codec.js';
|
|
4
4
|
import type { TRenderAsset } from './CompositionManager.js';
|
|
5
5
|
import type { StaticFile } from './get-static-files.js';
|
|
6
|
+
import type { LogLevel } from './log.js';
|
|
6
7
|
import type { VideoConfig } from './video-config.js';
|
|
7
8
|
export type VideoConfigWithSerializedProps = Omit<VideoConfig, 'defaultProps' | 'props'> & {
|
|
8
9
|
serializedDefaultPropsWithCustomSchema: string;
|
|
@@ -29,6 +30,7 @@ declare global {
|
|
|
29
30
|
remotion_editorName: string | null;
|
|
30
31
|
remotion_ignoreFastRefreshUpdate: number | null;
|
|
31
32
|
remotion_numberOfAudioTags: number;
|
|
33
|
+
remotion_logLevel: LogLevel;
|
|
32
34
|
remotion_projectName: string;
|
|
33
35
|
remotion_cwd: string;
|
|
34
36
|
remotion_studioServerCommand: string;
|
package/dist/cjs/internals.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare const Internals: {
|
|
|
19
19
|
readonly RemotionRoot: import("react").FC<{
|
|
20
20
|
readonly children: import("react").ReactNode;
|
|
21
21
|
readonly numberOfAudioTags: number;
|
|
22
|
+
readonly logLevel: import("./log.js").LogLevel;
|
|
22
23
|
}>;
|
|
23
24
|
readonly useVideo: () => (import("./video-config.js").VideoConfig & {
|
|
24
25
|
component: import("react").LazyExoticComponent<import("react").ComponentType<Record<string, unknown>>>;
|
|
@@ -173,6 +174,7 @@ export declare const Internals: {
|
|
|
173
174
|
warn: (logLevel: import("./log.js").LogLevel, ...args: Parameters<typeof console.log>) => void;
|
|
174
175
|
error: (...args: Parameters<typeof console.log>) => void;
|
|
175
176
|
};
|
|
176
|
-
readonly LogLevelContext: import("react").Context<"
|
|
177
|
+
readonly LogLevelContext: import("react").Context<"trace" | "verbose" | "info" | "warn" | "error" | null>;
|
|
178
|
+
readonly useLogLevel: () => import("./log.js").LogLevel;
|
|
177
179
|
};
|
|
178
180
|
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
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { LogLevel } from './log';
|
|
2
2
|
import React = require('react');
|
|
3
|
-
export declare const LogLevelContext: React.Context<"
|
|
3
|
+
export declare const LogLevelContext: React.Context<"trace" | "verbose" | "info" | "warn" | "error" | null>;
|
|
4
4
|
export declare const useLogLevel: () => LogLevel;
|
|
@@ -117,7 +117,7 @@ const useMediaPlayback = ({ mediaRef, src, mediaType, playbackRate: localPlaybac
|
|
|
117
117
|
mediaRef: mediaRef.current,
|
|
118
118
|
time: shouldBeTime,
|
|
119
119
|
logLevel,
|
|
120
|
-
why: `because time shift is too big. shouldBeTime = ${shouldBeTime}, isTime = ${mediaTagTime}, requestVideoCallbackTime = ${rvcTime}, timeShift = ${timeShift}, isVariableFpsVideo = ${isVariableFpsVideo}`,
|
|
120
|
+
why: `because time shift is too big. shouldBeTime = ${shouldBeTime}, isTime = ${mediaTagTime}, requestVideoCallbackTime = ${rvcTime}, timeShift = ${timeShift}, isVariableFpsVideo = ${Boolean(isVariableFpsVideo)}`,
|
|
121
121
|
});
|
|
122
122
|
lastSeekDueToShift.current = lastSeek.current;
|
|
123
123
|
if (playing && !isVariableFpsVideo) {
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
|
@@ -39,7 +39,7 @@ export declare function useRemotionContexts(): {
|
|
|
39
39
|
};
|
|
40
40
|
buffering: React.MutableRefObject<boolean>;
|
|
41
41
|
} | null;
|
|
42
|
-
logLevelContext: "
|
|
42
|
+
logLevelContext: "trace" | "verbose" | "info" | "warn" | "error" | null;
|
|
43
43
|
};
|
|
44
44
|
export interface RemotionContextProviderProps {
|
|
45
45
|
readonly contexts: ReturnType<typeof useRemotionContexts>;
|
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.252";
|
|
108
108
|
|
|
109
109
|
// src/multiple-versions-warning.ts
|
|
110
110
|
var checkMultipleRemotionVersions = () => {
|
|
@@ -1459,15 +1459,22 @@ var PremountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
1459
1459
|
if (props.layout === "none") {
|
|
1460
1460
|
throw new Error('`<Sequence>` with `premountFor` prop does not support layout="none"');
|
|
1461
1461
|
}
|
|
1462
|
-
const {
|
|
1462
|
+
const {
|
|
1463
|
+
style: passedStyle,
|
|
1464
|
+
from = 0,
|
|
1465
|
+
premountFor = 0,
|
|
1466
|
+
styleWhilePremounted,
|
|
1467
|
+
...otherProps
|
|
1468
|
+
} = props;
|
|
1463
1469
|
const premountingActive = frame < from && frame >= from - premountFor;
|
|
1464
1470
|
const style = useMemo9(() => {
|
|
1465
1471
|
return {
|
|
1466
1472
|
...passedStyle,
|
|
1467
1473
|
opacity: premountingActive ? 0 : 1,
|
|
1468
|
-
pointerEvents: premountingActive ? "none" : passedStyle?.pointerEvents ?? undefined
|
|
1474
|
+
pointerEvents: premountingActive ? "none" : passedStyle?.pointerEvents ?? undefined,
|
|
1475
|
+
...premountingActive ? styleWhilePremounted : {}
|
|
1469
1476
|
};
|
|
1470
|
-
}, [premountingActive,
|
|
1477
|
+
}, [passedStyle, premountingActive, styleWhilePremounted]);
|
|
1471
1478
|
return /* @__PURE__ */ jsx8(Freeze, {
|
|
1472
1479
|
frame: from,
|
|
1473
1480
|
active: premountingActive,
|
|
@@ -1857,7 +1864,10 @@ var decodeImage = async ({
|
|
|
1857
1864
|
|
|
1858
1865
|
// src/animated-image/resolve-image-source.tsx
|
|
1859
1866
|
var resolveAnimatedImageSource = (src) => {
|
|
1860
|
-
|
|
1867
|
+
if (typeof window === "undefined") {
|
|
1868
|
+
return src;
|
|
1869
|
+
}
|
|
1870
|
+
return new URL(src, window.origin).href;
|
|
1861
1871
|
};
|
|
1862
1872
|
|
|
1863
1873
|
// src/animated-image/AnimatedImage.tsx
|
|
@@ -3467,7 +3477,7 @@ var useMediaPlayback = ({
|
|
|
3467
3477
|
mediaRef: mediaRef.current,
|
|
3468
3478
|
time: shouldBeTime,
|
|
3469
3479
|
logLevel,
|
|
3470
|
-
why: `because time shift is too big. shouldBeTime = ${shouldBeTime}, isTime = ${mediaTagTime}, requestVideoCallbackTime = ${rvcTime}, timeShift = ${timeShift}, isVariableFpsVideo = ${isVariableFpsVideo}`
|
|
3480
|
+
why: `because time shift is too big. shouldBeTime = ${shouldBeTime}, isTime = ${mediaTagTime}, requestVideoCallbackTime = ${rvcTime}, timeShift = ${timeShift}, isVariableFpsVideo = ${Boolean(isVariableFpsVideo)}`
|
|
3471
3481
|
});
|
|
3472
3482
|
lastSeekDueToShift.current = lastSeek.current;
|
|
3473
3483
|
if (playing && !isVariableFpsVideo) {
|
|
@@ -5076,7 +5086,7 @@ import {
|
|
|
5076
5086
|
useState as useState16
|
|
5077
5087
|
} from "react";
|
|
5078
5088
|
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
5079
|
-
var RemotionRoot = ({ children, numberOfAudioTags }) => {
|
|
5089
|
+
var RemotionRoot = ({ children, numberOfAudioTags, logLevel }) => {
|
|
5080
5090
|
const [remotionRootId] = useState16(() => String(random(null)));
|
|
5081
5091
|
const [frame, setFrame] = useState16(() => getInitialFrameState());
|
|
5082
5092
|
const [playing, setPlaying] = useState16(false);
|
|
@@ -5146,7 +5156,7 @@ var RemotionRoot = ({ children, numberOfAudioTags }) => {
|
|
|
5146
5156
|
}
|
|
5147
5157
|
}, []);
|
|
5148
5158
|
return /* @__PURE__ */ jsx26(LogLevelContext.Provider, {
|
|
5149
|
-
value:
|
|
5159
|
+
value: logLevel,
|
|
5150
5160
|
children: /* @__PURE__ */ jsx26(NonceContext.Provider, {
|
|
5151
5161
|
value: nonceContext,
|
|
5152
5162
|
children: /* @__PURE__ */ jsx26(TimelineContext.Provider, {
|
|
@@ -5433,7 +5443,8 @@ var Internals = {
|
|
|
5433
5443
|
PROPS_UPDATED_EXTERNALLY,
|
|
5434
5444
|
validateRenderAsset,
|
|
5435
5445
|
Log,
|
|
5436
|
-
LogLevelContext
|
|
5446
|
+
LogLevelContext,
|
|
5447
|
+
useLogLevel
|
|
5437
5448
|
};
|
|
5438
5449
|
// src/interpolate-colors.ts
|
|
5439
5450
|
var NUMBER = "[-+]?\\d*\\.?\\d+";
|
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.252",
|
|
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.252"
|
|
32
32
|
},
|
|
33
33
|
"keywords": [
|
|
34
34
|
"remotion",
|