@remotion/transitions 4.0.460 → 4.0.461

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.
@@ -562,8 +562,9 @@ var HtmlInCanvasPresentation = ({
562
562
  const frame = useCurrentFrame2();
563
563
  const frameRef = useRef2(frame);
564
564
  frameRef.current = frame;
565
- const effectsRef = useRef2(_experimentalEffects);
566
- effectsRef.current = _experimentalEffects;
565
+ const memoizedEffects = Internals2.useMemoizedEffects(Internals2.flattenEffects(_experimentalEffects ?? []));
566
+ const effectsRef = useRef2(memoizedEffects);
567
+ effectsRef.current = memoizedEffects;
567
568
  const [instance] = useState(() => shader(offscreenCanvas));
568
569
  useLayoutEffect(() => {
569
570
  return () => {
@@ -642,7 +643,7 @@ var HtmlInCanvasPresentation = ({
642
643
  throw new Error("Canvas not found");
643
644
  }
644
645
  canvas.requestPaint?.();
645
- }, [presentationProgress, passThrough]);
646
+ }, [presentationProgress, passThrough, memoizedEffects]);
646
647
  useLayoutEffect(() => {
647
648
  if (passThrough) {
648
649
  return;
@@ -35,8 +35,9 @@ var HtmlInCanvasPresentation = ({
35
35
  const frame = useCurrentFrame();
36
36
  const frameRef = useRef(frame);
37
37
  frameRef.current = frame;
38
- const effectsRef = useRef(_experimentalEffects);
39
- effectsRef.current = _experimentalEffects;
38
+ const memoizedEffects = Internals.useMemoizedEffects(Internals.flattenEffects(_experimentalEffects ?? []));
39
+ const effectsRef = useRef(memoizedEffects);
40
+ effectsRef.current = memoizedEffects;
40
41
  const [instance] = useState(() => shader(offscreenCanvas));
41
42
  useLayoutEffect(() => {
42
43
  return () => {
@@ -115,7 +116,7 @@ var HtmlInCanvasPresentation = ({
115
116
  throw new Error("Canvas not found");
116
117
  }
117
118
  canvas.requestPaint?.();
118
- }, [presentationProgress, passThrough]);
119
+ }, [presentationProgress, passThrough, memoizedEffects]);
119
120
  useLayoutEffect(() => {
120
121
  if (passThrough) {
121
122
  return;
@@ -35,8 +35,9 @@ var HtmlInCanvasPresentation = ({
35
35
  const frame = useCurrentFrame();
36
36
  const frameRef = useRef(frame);
37
37
  frameRef.current = frame;
38
- const effectsRef = useRef(_experimentalEffects);
39
- effectsRef.current = _experimentalEffects;
38
+ const memoizedEffects = Internals.useMemoizedEffects(Internals.flattenEffects(_experimentalEffects ?? []));
39
+ const effectsRef = useRef(memoizedEffects);
40
+ effectsRef.current = memoizedEffects;
40
41
  const [instance] = useState(() => shader(offscreenCanvas));
41
42
  useLayoutEffect(() => {
42
43
  return () => {
@@ -115,7 +116,7 @@ var HtmlInCanvasPresentation = ({
115
116
  throw new Error("Canvas not found");
116
117
  }
117
118
  canvas.requestPaint?.();
118
- }, [presentationProgress, passThrough]);
119
+ }, [presentationProgress, passThrough, memoizedEffects]);
119
120
  useLayoutEffect(() => {
120
121
  if (passThrough) {
121
122
  return;
@@ -27,8 +27,9 @@ 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(remotion_2.Internals.flattenEffects(_experimentalEffects !== null && _experimentalEffects !== void 0 ? _experimentalEffects : []));
31
+ const effectsRef = (0, react_1.useRef)(memoizedEffects);
32
+ effectsRef.current = memoizedEffects;
32
33
  const [instance] = (0, react_1.useState)(() => shader(offscreenCanvas));
33
34
  (0, react_1.useLayoutEffect)(() => {
34
35
  return () => {
@@ -109,7 +110,7 @@ const HtmlInCanvasPresentation = ({ children, onElementImage, onUnmount, present
109
110
  throw new Error('Canvas not found');
110
111
  }
111
112
  (_a = canvas.requestPaint) === null || _a === void 0 ? void 0 : _a.call(canvas);
112
- }, [presentationProgress, passThrough]);
113
+ }, [presentationProgress, passThrough, memoizedEffects]);
113
114
  (0, react_1.useLayoutEffect)(() => {
114
115
  if (passThrough) {
115
116
  return;
package/package.json CHANGED
@@ -3,7 +3,7 @@
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.461",
7
7
  "description": "Library for creating transitions in Remotion",
8
8
  "sideEffects": false,
9
9
  "main": "dist/esm/index.mjs",
@@ -23,18 +23,18 @@
23
23
  "url": "https://github.com/remotion-dev/remotion/issues"
24
24
  },
25
25
  "dependencies": {
26
- "remotion": "4.0.460",
27
- "@remotion/shapes": "4.0.460",
28
- "@remotion/paths": "4.0.460"
26
+ "remotion": "4.0.461",
27
+ "@remotion/shapes": "4.0.461",
28
+ "@remotion/paths": "4.0.461"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@happy-dom/global-registrator": "14.5.1",
32
- "remotion": "4.0.460",
32
+ "remotion": "4.0.461",
33
33
  "react": "19.2.3",
34
34
  "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",
35
+ "@remotion/test-utils": "4.0.461",
36
+ "@remotion/player": "4.0.461",
37
+ "@remotion/eslint-config-internal": "4.0.461",
38
38
  "eslint": "9.19.0",
39
39
  "@typescript/native-preview": "7.0.0-dev.20260217.1"
40
40
  },