remotion 4.0.493 → 4.0.494
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/HtmlInCanvas.js +1 -4
- package/dist/cjs/Sequence.js +1 -1
- package/dist/cjs/animated-image/AnimatedImage.js +3 -4
- package/dist/cjs/animated-image/get-current-time.d.ts +5 -0
- package/dist/cjs/animated-image/get-current-time.js +7 -0
- package/dist/cjs/use-schema.d.ts +6 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/index.mjs +14 -9
- package/dist/esm/version.mjs +1 -1
- package/package.json +2 -2
package/dist/cjs/HtmlInCanvas.js
CHANGED
|
@@ -12,7 +12,6 @@ const interactivity_schema_js_1 = require("./interactivity-schema.js");
|
|
|
12
12
|
const Sequence_js_1 = require("./Sequence.js");
|
|
13
13
|
const use_delay_render_js_1 = require("./use-delay-render.js");
|
|
14
14
|
const use_remotion_environment_js_1 = require("./use-remotion-environment.js");
|
|
15
|
-
const use_video_config_js_1 = require("./use-video-config.js");
|
|
16
15
|
const with_interactivity_schema_js_1 = require("./with-interactivity-schema.js");
|
|
17
16
|
// Memoize the support check across the session — neither the platform
|
|
18
17
|
// capability nor the chrome://flags toggle can change between calls.
|
|
@@ -357,8 +356,6 @@ const HtmlInCanvasContent = (0, react_1.forwardRef)(({ width, height, effects, c
|
|
|
357
356
|
});
|
|
358
357
|
HtmlInCanvasContent.displayName = 'HtmlInCanvasContent';
|
|
359
358
|
const HtmlInCanvasInner = (0, react_1.forwardRef)(({ width, height, effects = [], children, onPaint, onInit, pixelDensity, controls, style, durationInFrames, name, ...sequenceProps }, ref) => {
|
|
360
|
-
const { durationInFrames: videoDuration } = (0, use_video_config_js_1.useVideoConfig)();
|
|
361
|
-
const resolvedDuration = durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : videoDuration;
|
|
362
359
|
const memoizedEffectDefinitions = (0, use_memoized_effects_js_1.useMemoizedEffectDefinitions)(effects);
|
|
363
360
|
const actualRef = (0, react_1.useRef)(null);
|
|
364
361
|
const setCanvasRef = (0, react_1.useCallback)((node) => {
|
|
@@ -370,7 +367,7 @@ const HtmlInCanvasInner = (0, react_1.forwardRef)(({ width, height, effects = []
|
|
|
370
367
|
ref.current = node;
|
|
371
368
|
}
|
|
372
369
|
}, [ref]);
|
|
373
|
-
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { durationInFrames:
|
|
370
|
+
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { durationInFrames: durationInFrames, name: name !== null && name !== void 0 ? name : '<HtmlInCanvas>', _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas", controls: controls, _remotionInternalEffects: memoizedEffectDefinitions, outlineRef: actualRef, layout: "none", ...sequenceProps, children: jsx_runtime_1.jsx(HtmlInCanvasContent, { ref: setCanvasRef, width: width, height: height, effects: effects, onPaint: onPaint, onInit: onInit, pixelDensity: pixelDensity, controls: controls, style: style, children: children }) }));
|
|
374
371
|
});
|
|
375
372
|
HtmlInCanvasInner.displayName = 'HtmlInCanvas';
|
|
376
373
|
exports.htmlInCanvasSchema = {
|
package/dist/cjs/Sequence.js
CHANGED
|
@@ -363,7 +363,7 @@ const PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
363
363
|
var _a;
|
|
364
364
|
return {
|
|
365
365
|
...passedStyle,
|
|
366
|
-
opacity: premountingActive || postmountingActive ? 0 :
|
|
366
|
+
opacity: premountingActive || postmountingActive ? 0 : passedStyle === null || passedStyle === void 0 ? void 0 : passedStyle.opacity,
|
|
367
367
|
pointerEvents: premountingActive || postmountingActive
|
|
368
368
|
? 'none'
|
|
369
369
|
: ((_a = passedStyle === null || passedStyle === void 0 ? void 0 : passedStyle.pointerEvents) !== null && _a !== void 0 ? _a : undefined),
|
|
@@ -14,6 +14,7 @@ const use_video_config_js_1 = require("../use-video-config.js");
|
|
|
14
14
|
const with_interactivity_schema_js_1 = require("../with-interactivity-schema.js");
|
|
15
15
|
const canvas_1 = require("./canvas");
|
|
16
16
|
const decode_image_js_1 = require("./decode-image.js");
|
|
17
|
+
const get_current_time_js_1 = require("./get-current-time.js");
|
|
17
18
|
const request_init_1 = require("./request-init");
|
|
18
19
|
const resolve_image_source_1 = require("./resolve-image-source");
|
|
19
20
|
const animatedImageSchema = {
|
|
@@ -55,7 +56,7 @@ const AnimatedImageContent = (0, react_1.forwardRef)(({ src, width, height, onEr
|
|
|
55
56
|
const [decodeHandle] = (0, react_1.useState)(() => delayRender(`Rendering <AnimatedImage/> with src="${resolvedSrc}"`));
|
|
56
57
|
const frame = (0, use_current_frame_js_1.useCurrentFrame)();
|
|
57
58
|
const { fps } = (0, use_video_config_js_1.useVideoConfig)();
|
|
58
|
-
const currentTime = frame
|
|
59
|
+
const currentTime = (0, get_current_time_js_1.getCurrentTime)({ frame, playbackRate, fps });
|
|
59
60
|
const currentTimeRef = (0, react_1.useRef)(currentTime);
|
|
60
61
|
currentTimeRef.current = currentTime;
|
|
61
62
|
const requestInitKey = (0, request_init_1.serializeRequestInit)(requestInit);
|
|
@@ -168,8 +169,6 @@ const AnimatedImageContent = (0, react_1.forwardRef)(({ src, width, height, onEr
|
|
|
168
169
|
});
|
|
169
170
|
AnimatedImageContent.displayName = 'AnimatedImageContent';
|
|
170
171
|
const AnimatedImageInner = ({ src, width, height, onError, fit, playbackRate, loopBehavior, id, className, style, durationInFrames, requestInit, effects = [], controls, ref, ...sequenceProps }) => {
|
|
171
|
-
const { durationInFrames: videoDuration } = (0, use_video_config_js_1.useVideoConfig)();
|
|
172
|
-
const resolvedDuration = durationInFrames !== null && durationInFrames !== void 0 ? durationInFrames : videoDuration;
|
|
173
172
|
const actualRef = (0, react_1.useRef)(null);
|
|
174
173
|
const memoizedEffectDefinitions = (0, use_memoized_effects_js_1.useMemoizedEffectDefinitions)(effects);
|
|
175
174
|
(0, react_1.useImperativeHandle)(ref, () => {
|
|
@@ -190,7 +189,7 @@ const AnimatedImageInner = ({ src, width, height, onError, fit, playbackRate, lo
|
|
|
190
189
|
requestInit,
|
|
191
190
|
...canvasProps,
|
|
192
191
|
};
|
|
193
|
-
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", durationInFrames:
|
|
192
|
+
return (jsx_runtime_1.jsx(Sequence_js_1.Sequence, { layout: "none", durationInFrames: durationInFrames, name: "<AnimatedImage>", _remotionInternalDocumentationLink: "https://www.remotion.dev/docs/animatedimage", controls: controls, _remotionInternalEffects: memoizedEffectDefinitions, ...sequenceProps, outlineRef: actualRef, children: jsx_runtime_1.jsx(AnimatedImageContent, { ...animatedImageProps, ref: actualRef, effects: effects, controls: controls }) }));
|
|
194
193
|
};
|
|
195
194
|
exports.AnimatedImage = (0, with_interactivity_schema_js_1.withInteractivitySchema)({
|
|
196
195
|
Component: AnimatedImageInner,
|
package/dist/cjs/use-schema.d.ts
CHANGED
|
@@ -25,6 +25,12 @@ export type VideoConfigNumericExpression = {
|
|
|
25
25
|
multiplicand: number;
|
|
26
26
|
factorPosition: 'left' | 'right';
|
|
27
27
|
value: number;
|
|
28
|
+
} | {
|
|
29
|
+
type: 'video-config-subtraction';
|
|
30
|
+
identifier: string;
|
|
31
|
+
minuend: number;
|
|
32
|
+
subtrahend: number;
|
|
33
|
+
value: number;
|
|
28
34
|
};
|
|
29
35
|
export type CanUpdateSequencePropStatusLinearEasing = {
|
|
30
36
|
type: 'linear';
|
package/dist/cjs/version.d.ts
CHANGED
package/dist/cjs/version.js
CHANGED
package/dist/esm/index.mjs
CHANGED
|
@@ -1310,7 +1310,7 @@ var getSingleChildComponent = (children) => {
|
|
|
1310
1310
|
};
|
|
1311
1311
|
|
|
1312
1312
|
// src/version.ts
|
|
1313
|
-
var VERSION = "4.0.
|
|
1313
|
+
var VERSION = "4.0.494";
|
|
1314
1314
|
|
|
1315
1315
|
// src/multiple-versions-warning.ts
|
|
1316
1316
|
var checkMultipleRemotionVersions = () => {
|
|
@@ -4795,7 +4795,7 @@ var PremountedPostmountedSequenceRefForwardingFunction = (props, ref) => {
|
|
|
4795
4795
|
const style = useMemo14(() => {
|
|
4796
4796
|
return {
|
|
4797
4797
|
...passedStyle,
|
|
4798
|
-
opacity: premountingActive || postmountingActive ? 0 :
|
|
4798
|
+
opacity: premountingActive || postmountingActive ? 0 : passedStyle?.opacity,
|
|
4799
4799
|
pointerEvents: premountingActive || postmountingActive ? "none" : passedStyle?.pointerEvents ?? undefined,
|
|
4800
4800
|
...premountingActive ? styleWhilePremounted : {},
|
|
4801
4801
|
...postmountingActive ? styleWhilePostmounted : {}
|
|
@@ -5405,6 +5405,15 @@ var decodeImage = async ({
|
|
|
5405
5405
|
};
|
|
5406
5406
|
};
|
|
5407
5407
|
|
|
5408
|
+
// src/animated-image/get-current-time.ts
|
|
5409
|
+
var getCurrentTime = ({
|
|
5410
|
+
frame,
|
|
5411
|
+
playbackRate,
|
|
5412
|
+
fps
|
|
5413
|
+
}) => {
|
|
5414
|
+
return frame * playbackRate / fps;
|
|
5415
|
+
};
|
|
5416
|
+
|
|
5408
5417
|
// src/animated-image/request-init.ts
|
|
5409
5418
|
var serializeRequestInit = (requestInit) => {
|
|
5410
5419
|
if (!requestInit) {
|
|
@@ -5478,7 +5487,7 @@ var AnimatedImageContent = forwardRef4(({
|
|
|
5478
5487
|
const [decodeHandle] = useState6(() => delayRender2(`Rendering <AnimatedImage/> with src="${resolvedSrc}"`));
|
|
5479
5488
|
const frame = useCurrentFrame();
|
|
5480
5489
|
const { fps } = useVideoConfig();
|
|
5481
|
-
const currentTime = frame
|
|
5490
|
+
const currentTime = getCurrentTime({ frame, playbackRate, fps });
|
|
5482
5491
|
const currentTimeRef = useRef9(currentTime);
|
|
5483
5492
|
currentTimeRef.current = currentTime;
|
|
5484
5493
|
const requestInitKey = serializeRequestInit(requestInit);
|
|
@@ -5606,8 +5615,6 @@ var AnimatedImageInner = ({
|
|
|
5606
5615
|
ref,
|
|
5607
5616
|
...sequenceProps
|
|
5608
5617
|
}) => {
|
|
5609
|
-
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
5610
|
-
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
5611
5618
|
const actualRef = useRef9(null);
|
|
5612
5619
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
5613
5620
|
useImperativeHandle2(ref, () => {
|
|
@@ -5630,7 +5637,7 @@ var AnimatedImageInner = ({
|
|
|
5630
5637
|
};
|
|
5631
5638
|
return /* @__PURE__ */ jsx14(Sequence, {
|
|
5632
5639
|
layout: "none",
|
|
5633
|
-
durationInFrames
|
|
5640
|
+
durationInFrames,
|
|
5634
5641
|
name: "<AnimatedImage>",
|
|
5635
5642
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/animatedimage",
|
|
5636
5643
|
controls,
|
|
@@ -9468,8 +9475,6 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
9468
9475
|
name,
|
|
9469
9476
|
...sequenceProps
|
|
9470
9477
|
}, ref) => {
|
|
9471
|
-
const { durationInFrames: videoDuration } = useVideoConfig();
|
|
9472
|
-
const resolvedDuration = durationInFrames ?? videoDuration;
|
|
9473
9478
|
const memoizedEffectDefinitions = useMemoizedEffectDefinitions(effects);
|
|
9474
9479
|
const actualRef = useRef22(null);
|
|
9475
9480
|
const setCanvasRef = useCallback16((node) => {
|
|
@@ -9481,7 +9486,7 @@ var HtmlInCanvasInner = forwardRef9(({
|
|
|
9481
9486
|
}
|
|
9482
9487
|
}, [ref]);
|
|
9483
9488
|
return /* @__PURE__ */ jsx25(Sequence, {
|
|
9484
|
-
durationInFrames
|
|
9489
|
+
durationInFrames,
|
|
9485
9490
|
name: name ?? "<HtmlInCanvas>",
|
|
9486
9491
|
_remotionInternalDocumentationLink: "https://www.remotion.dev/docs/remotion/html-in-canvas",
|
|
9487
9492
|
controls,
|
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.494",
|
|
7
7
|
"description": "Make videos programmatically",
|
|
8
8
|
"main": "dist/cjs/index.js",
|
|
9
9
|
"types": "dist/cjs/index.d.ts",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"react-dom": "19.2.3",
|
|
36
36
|
"webpack": "5.105.0",
|
|
37
37
|
"zod": "4.3.6",
|
|
38
|
-
"@remotion/eslint-config-internal": "4.0.
|
|
38
|
+
"@remotion/eslint-config-internal": "4.0.494",
|
|
39
39
|
"eslint": "9.19.0",
|
|
40
40
|
"@typescript/native-preview": "7.0.0-dev.20260217.1"
|
|
41
41
|
},
|