@remotion/transitions 4.0.460 → 4.0.462

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.
@@ -527,7 +527,11 @@ var useTransitionProgress = () => {
527
527
  };
528
528
  // src/html-in-canvas-presentation.tsx
529
529
  import { useLayoutEffect, useMemo as useMemo4, useRef as useRef2, useState, useCallback as useCallback2 } from "react";
530
- import { HtmlInCanvas, useDelayRender } from "remotion";
530
+ import {
531
+ HtmlInCanvas,
532
+ HTML_IN_CANVAS_UNSUPPORTED_MESSAGE,
533
+ useDelayRender
534
+ } from "remotion";
531
535
  import { AbsoluteFill as AbsoluteFill2, Internals as Internals2, useCurrentFrame as useCurrentFrame2 } from "remotion";
532
536
  import { jsx as jsx4 } from "react/jsx-runtime";
533
537
  var HtmlInCanvasPresentation = ({
@@ -542,7 +546,7 @@ var HtmlInCanvasPresentation = ({
542
546
  bothEnteringAndExiting
543
547
  }) => {
544
548
  if (!HtmlInCanvas.isSupported()) {
545
- throw new Error("HTML in Canvas is not supported. Open this page in Chrome Canary with chrome://flags/#canvas-draw-element enabled.");
549
+ throw new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE);
546
550
  }
547
551
  const canvasRef = useRef2(null);
548
552
  const canvasSubtreeStyle = useMemo4(() => {
@@ -562,8 +566,12 @@ var HtmlInCanvasPresentation = ({
562
566
  const frame = useCurrentFrame2();
563
567
  const frameRef = useRef2(frame);
564
568
  frameRef.current = frame;
565
- const effectsRef = useRef2(_experimentalEffects);
566
- effectsRef.current = _experimentalEffects;
569
+ const memoizedEffects = Internals2.useMemoizedEffects({
570
+ effects: _experimentalEffects ?? [],
571
+ overrideId: null
572
+ });
573
+ const effectsRef = useRef2(memoizedEffects);
574
+ effectsRef.current = memoizedEffects;
567
575
  const [instance] = useState(() => shader(offscreenCanvas));
568
576
  useLayoutEffect(() => {
569
577
  return () => {
@@ -642,7 +650,7 @@ var HtmlInCanvasPresentation = ({
642
650
  throw new Error("Canvas not found");
643
651
  }
644
652
  canvas.requestPaint?.();
645
- }, [presentationProgress, passThrough]);
653
+ }, [presentationProgress, passThrough, memoizedEffects]);
646
654
  useLayoutEffect(() => {
647
655
  if (passThrough) {
648
656
  return;
@@ -1,6 +1,10 @@
1
1
  // src/html-in-canvas-presentation.tsx
2
2
  import { useLayoutEffect, useMemo, useRef, useState, useCallback } from "react";
3
- import { HtmlInCanvas, useDelayRender } from "remotion";
3
+ import {
4
+ HtmlInCanvas,
5
+ HTML_IN_CANVAS_UNSUPPORTED_MESSAGE,
6
+ useDelayRender
7
+ } from "remotion";
4
8
  import { AbsoluteFill, Internals, useCurrentFrame } from "remotion";
5
9
  import { jsx } from "react/jsx-runtime";
6
10
  var HtmlInCanvasPresentation = ({
@@ -15,7 +19,7 @@ var HtmlInCanvasPresentation = ({
15
19
  bothEnteringAndExiting
16
20
  }) => {
17
21
  if (!HtmlInCanvas.isSupported()) {
18
- throw new Error("HTML in Canvas is not supported. Open this page in Chrome Canary with chrome://flags/#canvas-draw-element enabled.");
22
+ throw new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE);
19
23
  }
20
24
  const canvasRef = useRef(null);
21
25
  const canvasSubtreeStyle = useMemo(() => {
@@ -35,8 +39,12 @@ var HtmlInCanvasPresentation = ({
35
39
  const frame = useCurrentFrame();
36
40
  const frameRef = useRef(frame);
37
41
  frameRef.current = frame;
38
- const effectsRef = useRef(_experimentalEffects);
39
- effectsRef.current = _experimentalEffects;
42
+ const memoizedEffects = Internals.useMemoizedEffects({
43
+ effects: _experimentalEffects ?? [],
44
+ overrideId: null
45
+ });
46
+ const effectsRef = useRef(memoizedEffects);
47
+ effectsRef.current = memoizedEffects;
40
48
  const [instance] = useState(() => shader(offscreenCanvas));
41
49
  useLayoutEffect(() => {
42
50
  return () => {
@@ -115,7 +123,7 @@ var HtmlInCanvasPresentation = ({
115
123
  throw new Error("Canvas not found");
116
124
  }
117
125
  canvas.requestPaint?.();
118
- }, [presentationProgress, passThrough]);
126
+ }, [presentationProgress, passThrough, memoizedEffects]);
119
127
  useLayoutEffect(() => {
120
128
  if (passThrough) {
121
129
  return;
@@ -1,6 +1,10 @@
1
1
  // src/html-in-canvas-presentation.tsx
2
2
  import { useLayoutEffect, useMemo, useRef, useState, useCallback } from "react";
3
- import { HtmlInCanvas, useDelayRender } from "remotion";
3
+ import {
4
+ HtmlInCanvas,
5
+ HTML_IN_CANVAS_UNSUPPORTED_MESSAGE,
6
+ useDelayRender
7
+ } from "remotion";
4
8
  import { AbsoluteFill, Internals, useCurrentFrame } from "remotion";
5
9
  import { jsx } from "react/jsx-runtime";
6
10
  var HtmlInCanvasPresentation = ({
@@ -15,7 +19,7 @@ var HtmlInCanvasPresentation = ({
15
19
  bothEnteringAndExiting
16
20
  }) => {
17
21
  if (!HtmlInCanvas.isSupported()) {
18
- throw new Error("HTML in Canvas is not supported. Open this page in Chrome Canary with chrome://flags/#canvas-draw-element enabled.");
22
+ throw new Error(HTML_IN_CANVAS_UNSUPPORTED_MESSAGE);
19
23
  }
20
24
  const canvasRef = useRef(null);
21
25
  const canvasSubtreeStyle = useMemo(() => {
@@ -35,8 +39,12 @@ var HtmlInCanvasPresentation = ({
35
39
  const frame = useCurrentFrame();
36
40
  const frameRef = useRef(frame);
37
41
  frameRef.current = frame;
38
- const effectsRef = useRef(_experimentalEffects);
39
- effectsRef.current = _experimentalEffects;
42
+ const memoizedEffects = Internals.useMemoizedEffects({
43
+ effects: _experimentalEffects ?? [],
44
+ overrideId: null
45
+ });
46
+ const effectsRef = useRef(memoizedEffects);
47
+ effectsRef.current = memoizedEffects;
40
48
  const [instance] = useState(() => shader(offscreenCanvas));
41
49
  useLayoutEffect(() => {
42
50
  return () => {
@@ -115,7 +123,7 @@ var HtmlInCanvasPresentation = ({
115
123
  throw new Error("Canvas not found");
116
124
  }
117
125
  canvas.requestPaint?.();
118
- }, [presentationProgress, passThrough]);
126
+ }, [presentationProgress, passThrough, memoizedEffects]);
119
127
  useLayoutEffect(() => {
120
128
  if (passThrough) {
121
129
  return;
@@ -7,7 +7,7 @@ const remotion_1 = require("remotion");
7
7
  const remotion_2 = require("remotion");
8
8
  const HtmlInCanvasPresentation = ({ children, onElementImage, onUnmount, presentationProgress, presentationDirection, shader, _experimentalEffects, passedProps, bothEnteringAndExiting, }) => {
9
9
  if (!remotion_1.HtmlInCanvas.isSupported()) {
10
- throw new Error('HTML in Canvas is not supported. Open this page in Chrome Canary with chrome://flags/#canvas-draw-element enabled.');
10
+ throw new Error(remotion_1.HTML_IN_CANVAS_UNSUPPORTED_MESSAGE);
11
11
  }
12
12
  const canvasRef = (0, react_1.useRef)(null);
13
13
  const canvasSubtreeStyle = (0, react_1.useMemo)(() => {
@@ -27,8 +27,12 @@ const HtmlInCanvasPresentation = ({ children, onElementImage, onUnmount, present
27
27
  const frame = (0, remotion_2.useCurrentFrame)();
28
28
  const frameRef = (0, react_1.useRef)(frame);
29
29
  frameRef.current = frame;
30
- const effectsRef = (0, react_1.useRef)(_experimentalEffects);
31
- effectsRef.current = _experimentalEffects;
30
+ const memoizedEffects = remotion_2.Internals.useMemoizedEffects({
31
+ effects: _experimentalEffects !== null && _experimentalEffects !== void 0 ? _experimentalEffects : [],
32
+ overrideId: null,
33
+ });
34
+ const effectsRef = (0, react_1.useRef)(memoizedEffects);
35
+ effectsRef.current = memoizedEffects;
32
36
  const [instance] = (0, react_1.useState)(() => shader(offscreenCanvas));
33
37
  (0, react_1.useLayoutEffect)(() => {
34
38
  return () => {
@@ -109,7 +113,7 @@ const HtmlInCanvasPresentation = ({ children, onElementImage, onUnmount, present
109
113
  throw new Error('Canvas not found');
110
114
  }
111
115
  (_a = canvas.requestPaint) === null || _a === void 0 ? void 0 : _a.call(canvas);
112
- }, [presentationProgress, passThrough]);
116
+ }, [presentationProgress, passThrough, memoizedEffects]);
113
117
  (0, react_1.useLayoutEffect)(() => {
114
118
  if (passThrough) {
115
119
  return;
package/package.json CHANGED
@@ -3,9 +3,8 @@
3
3
  "url": "https://github.com/remotion-dev/remotion/tree/main/packages/transitions"
4
4
  },
5
5
  "name": "@remotion/transitions",
6
- "version": "4.0.460",
6
+ "version": "4.0.462",
7
7
  "description": "Library for creating transitions in Remotion",
8
- "sideEffects": false,
9
8
  "main": "dist/esm/index.mjs",
10
9
  "module": "dist/esm/index.js",
11
10
  "types": "dist/index.d.ts",
@@ -23,18 +22,18 @@
23
22
  "url": "https://github.com/remotion-dev/remotion/issues"
24
23
  },
25
24
  "dependencies": {
26
- "remotion": "4.0.460",
27
- "@remotion/shapes": "4.0.460",
28
- "@remotion/paths": "4.0.460"
25
+ "remotion": "4.0.462",
26
+ "@remotion/shapes": "4.0.462",
27
+ "@remotion/paths": "4.0.462"
29
28
  },
30
29
  "devDependencies": {
31
30
  "@happy-dom/global-registrator": "14.5.1",
32
- "remotion": "4.0.460",
31
+ "remotion": "4.0.462",
33
32
  "react": "19.2.3",
34
33
  "react-dom": "19.2.3",
35
- "@remotion/test-utils": "4.0.460",
36
- "@remotion/player": "4.0.460",
37
- "@remotion/eslint-config-internal": "4.0.460",
34
+ "@remotion/test-utils": "4.0.462",
35
+ "@remotion/player": "4.0.462",
36
+ "@remotion/eslint-config-internal": "4.0.462",
38
37
  "eslint": "9.19.0",
39
38
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
40
39
  },