@remotion/transitions 4.0.83 → 4.0.84

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.
@@ -21,9 +21,26 @@ const ClockWipePresentation = ({ children, presentationDirection, presentationPr
21
21
  width: '100%',
22
22
  height: '100%',
23
23
  clipPath: presentationDirection === 'exiting' ? undefined : `url(#${clipId})`,
24
+ ...(presentationDirection === 'entering'
25
+ ? passedProps.innerEnterStyle
26
+ : passedProps.innerExitStyle),
24
27
  };
25
- }, [clipId, presentationDirection]);
26
- return (jsxRuntime.jsxs(remotion.AbsoluteFill, { children: [jsxRuntime.jsx(remotion.AbsoluteFill, { style: style, children: children }), presentationDirection === 'exiting' ? null : (jsxRuntime.jsx(remotion.AbsoluteFill, { children: jsxRuntime.jsx("svg", { children: jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: clipId, children: jsxRuntime.jsx("path", { d: translatedPath, fill: "black" }) }) }) }) }))] }));
28
+ }, [
29
+ clipId,
30
+ passedProps.innerEnterStyle,
31
+ passedProps.innerExitStyle,
32
+ presentationDirection,
33
+ ]);
34
+ const outerStyle = react.useMemo(() => {
35
+ return presentationDirection === 'entering'
36
+ ? passedProps.outerEnterStyle
37
+ : passedProps.outerExitStyle;
38
+ }, [
39
+ passedProps.outerEnterStyle,
40
+ passedProps.outerExitStyle,
41
+ presentationDirection,
42
+ ]);
43
+ return (jsxRuntime.jsxs(remotion.AbsoluteFill, { style: outerStyle, children: [jsxRuntime.jsx(remotion.AbsoluteFill, { style: style, children: children }), presentationDirection === 'exiting' ? null : (jsxRuntime.jsx(remotion.AbsoluteFill, { children: jsxRuntime.jsx("svg", { children: jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: clipId, children: jsxRuntime.jsx("path", { d: translatedPath, fill: "black" }) }) }) }) }))] }));
27
44
  };
28
45
  const clockWipe = (props) => {
29
46
  return { component: ClockWipePresentation, props: props !== null && props !== void 0 ? props : {} };
package/dist/cjs/fade.js CHANGED
@@ -6,14 +6,23 @@ var jsxRuntime = require('react/jsx-runtime');
6
6
  var react = require('react');
7
7
  var remotion = require('remotion');
8
8
 
9
- const FadePresentation = ({ children, presentationDirection, presentationProgress }) => {
9
+ const FadePresentation = ({ children, presentationDirection, presentationProgress, passedProps }) => {
10
10
  const isEntering = presentationDirection === 'entering';
11
11
  const style = react.useMemo(() => {
12
12
  return {
13
13
  opacity: isEntering ? presentationProgress : 1,
14
+ ...(presentationDirection === 'entering'
15
+ ? passedProps.enterStyle
16
+ : passedProps.exitStyle),
14
17
  };
15
- }, [isEntering, presentationProgress]);
16
- return (jsxRuntime.jsx(remotion.AbsoluteFill, { children: jsxRuntime.jsx(remotion.AbsoluteFill, { style: style, children: children }) }));
18
+ }, [
19
+ isEntering,
20
+ passedProps.enterStyle,
21
+ passedProps.exitStyle,
22
+ presentationDirection,
23
+ presentationProgress,
24
+ ]);
25
+ return jsxRuntime.jsx(remotion.AbsoluteFill, { style: style, children: children });
17
26
  };
18
27
  const fade = (props) => {
19
28
  return {
package/dist/cjs/flip.js CHANGED
@@ -6,7 +6,7 @@ var jsxRuntime = require('react/jsx-runtime');
6
6
  var react = require('react');
7
7
  var remotion = require('remotion');
8
8
 
9
- const Flip = ({ children, presentationDirection, presentationProgress, passedProps: { direction = 'from-left', perspective = 1000 }, }) => {
9
+ const Flip = ({ children, presentationDirection, presentationProgress, passedProps: { direction = 'from-left', perspective = 1000, innerEnterStyle, innerExitStyle, outerEnterStyle, outerExitStyle, }, }) => {
10
10
  const style = react.useMemo(() => {
11
11
  const startRotationEntering = direction === 'from-right' || direction === 'from-top' ? 180 : -180;
12
12
  const endRotationEntering = direction === 'from-right' || direction === 'from-top' ? -180 : 180;
@@ -22,15 +22,27 @@ const Flip = ({ children, presentationDirection, presentationProgress, passedPro
22
22
  transform: `${rotateProperty}(${rotation}deg)`,
23
23
  backfaceVisibility: 'hidden',
24
24
  WebkitBackfaceVisibility: 'hidden',
25
+ ...(presentationDirection === 'entering'
26
+ ? innerEnterStyle
27
+ : innerExitStyle),
25
28
  };
26
- }, [direction, presentationDirection, presentationProgress]);
29
+ }, [
30
+ direction,
31
+ innerEnterStyle,
32
+ innerExitStyle,
33
+ presentationDirection,
34
+ presentationProgress,
35
+ ]);
27
36
  const outer = react.useMemo(() => {
28
37
  return {
29
38
  perspective,
30
39
  // Make children also their backface hidden
31
40
  transformStyle: 'preserve-3d',
41
+ ...(presentationDirection === 'entering'
42
+ ? outerEnterStyle
43
+ : outerExitStyle),
32
44
  };
33
- }, [perspective]);
45
+ }, [outerEnterStyle, outerExitStyle, perspective, presentationDirection]);
34
46
  return (jsxRuntime.jsx(remotion.AbsoluteFill, { style: outer, children: jsxRuntime.jsx(remotion.AbsoluteFill, { style: style, children: children }) }));
35
47
  };
36
48
  const flip = (props) => {
package/dist/cjs/index.js CHANGED
@@ -68,7 +68,7 @@ const flattenChildren = (children) => {
68
68
  }, []);
69
69
  };
70
70
 
71
- const SlidePresentation = ({ children, presentationProgress, presentationDirection, passedProps: { direction = 'from-left' }, }) => {
71
+ const SlidePresentation = ({ children, presentationProgress, presentationDirection, passedProps: { direction = 'from-left', enterStyle, exitStyle }, }) => {
72
72
  const directionStyle = React.useMemo(() => {
73
73
  if (presentationDirection === 'exiting') {
74
74
  switch (direction) {
@@ -120,9 +120,10 @@ const SlidePresentation = ({ children, presentationProgress, presentationDirecti
120
120
  justifyContent: 'center',
121
121
  alignItems: 'center',
122
122
  ...directionStyle,
123
+ ...(presentationDirection === 'entering' ? enterStyle : exitStyle),
123
124
  };
124
- }, [directionStyle]);
125
- return (jsxRuntime.jsx(remotion.AbsoluteFill, { children: jsxRuntime.jsx(remotion.AbsoluteFill, { style: style, children: children }) }));
125
+ }, [directionStyle, enterStyle, exitStyle, presentationDirection]);
126
+ return jsxRuntime.jsx(remotion.AbsoluteFill, { style: style, children: children });
126
127
  };
127
128
  const slide = (props) => {
128
129
  return {
@@ -1,6 +1,11 @@
1
+ import React from 'react';
1
2
  import type { TransitionPresentation } from '../types.js';
2
3
  export type ClockWipeProps = {
3
4
  width: number;
4
5
  height: number;
6
+ outerEnterStyle?: React.CSSProperties;
7
+ outerExitStyle?: React.CSSProperties;
8
+ innerEnterStyle?: React.CSSProperties;
9
+ innerExitStyle?: React.CSSProperties;
5
10
  };
6
11
  export declare const clockWipe: (props: ClockWipeProps) => TransitionPresentation<ClockWipeProps>;
@@ -1,3 +1,7 @@
1
+ /// <reference types="react" />
1
2
  import type { TransitionPresentation } from '../types.js';
2
- export type FadeProps = Record<string, never>;
3
+ export type FadeProps = {
4
+ enterStyle?: React.CSSProperties;
5
+ exitStyle?: React.CSSProperties;
6
+ };
3
7
  export declare const fade: (props?: FadeProps) => TransitionPresentation<FadeProps>;
@@ -1,7 +1,12 @@
1
+ import React from 'react';
1
2
  import type { TransitionPresentation } from '../types.js';
2
3
  export type FlipDirection = 'from-left' | 'from-right' | 'from-top' | 'from-bottom';
3
4
  export type FlipProps = {
4
5
  direction?: FlipDirection;
5
6
  perspective?: number;
7
+ outerEnterStyle?: React.CSSProperties;
8
+ outerExitStyle?: React.CSSProperties;
9
+ innerEnterStyle?: React.CSSProperties;
10
+ innerExitStyle?: React.CSSProperties;
6
11
  };
7
12
  export declare const flip: (props?: FlipProps) => TransitionPresentation<FlipProps>;
@@ -1,6 +1,9 @@
1
+ import React from 'react';
1
2
  import type { TransitionPresentation } from '../types.js';
2
3
  export type SlideDirection = 'from-left' | 'from-top' | 'from-right' | 'from-bottom';
3
4
  export type SlideProps = {
4
5
  direction?: SlideDirection;
6
+ exitStyle?: React.CSSProperties;
7
+ enterStyle?: React.CSSProperties;
5
8
  };
6
9
  export declare const slide: (props?: SlideProps) => TransitionPresentation<SlideProps>;
@@ -1,6 +1,11 @@
1
+ import React from 'react';
1
2
  import type { TransitionPresentation } from '../types.js';
2
3
  export type WipeDirection = 'from-left' | 'from-top-left' | 'from-top' | 'from-top-right' | 'from-right' | 'from-bottom-right' | 'from-bottom' | 'from-bottom-left';
3
4
  export type WipeProps = {
4
5
  direction?: WipeDirection;
6
+ outerEnterStyle?: React.CSSProperties;
7
+ outerExitStyle?: React.CSSProperties;
8
+ innerEnterStyle?: React.CSSProperties;
9
+ innerExitStyle?: React.CSSProperties;
5
10
  };
6
11
  export declare const wipe: (props?: WipeProps) => TransitionPresentation<WipeProps>;
package/dist/cjs/slide.js CHANGED
@@ -6,7 +6,7 @@ var jsxRuntime = require('react/jsx-runtime');
6
6
  var react = require('react');
7
7
  var remotion = require('remotion');
8
8
 
9
- const SlidePresentation = ({ children, presentationProgress, presentationDirection, passedProps: { direction = 'from-left' }, }) => {
9
+ const SlidePresentation = ({ children, presentationProgress, presentationDirection, passedProps: { direction = 'from-left', enterStyle, exitStyle }, }) => {
10
10
  const directionStyle = react.useMemo(() => {
11
11
  if (presentationDirection === 'exiting') {
12
12
  switch (direction) {
@@ -58,9 +58,10 @@ const SlidePresentation = ({ children, presentationProgress, presentationDirecti
58
58
  justifyContent: 'center',
59
59
  alignItems: 'center',
60
60
  ...directionStyle,
61
+ ...(presentationDirection === 'entering' ? enterStyle : exitStyle),
61
62
  };
62
- }, [directionStyle]);
63
- return (jsxRuntime.jsx(remotion.AbsoluteFill, { children: jsxRuntime.jsx(remotion.AbsoluteFill, { style: style, children: children }) }));
63
+ }, [directionStyle, enterStyle, exitStyle, presentationDirection]);
64
+ return jsxRuntime.jsx(remotion.AbsoluteFill, { style: style, children: children });
64
65
  };
65
66
  const slide = (props) => {
66
67
  return {
package/dist/cjs/wipe.js CHANGED
@@ -122,7 +122,7 @@ Z`;
122
122
  throw new Error(`Unknown direction ${JSON.stringify(direction)}`);
123
123
  }
124
124
  };
125
- const WipePresentation = ({ children, presentationProgress, presentationDirection, passedProps: { direction = 'from-left' }, }) => {
125
+ const WipePresentation = ({ children, presentationProgress, presentationDirection, passedProps: { direction = 'from-left', innerEnterStyle, innerExitStyle, outerEnterStyle, outerExitStyle, }, }) => {
126
126
  const [clipId] = react.useState(() => String(remotion.random(null)));
127
127
  const progressInDirection = presentationDirection === 'entering'
128
128
  ? presentationProgress
@@ -137,8 +137,16 @@ const WipePresentation = ({ children, presentationProgress, presentationDirectio
137
137
  justifyContent: 'center',
138
138
  alignItems: 'center',
139
139
  clipPath: `url(#${clipId})`,
140
+ ...(presentationDirection === 'entering'
141
+ ? innerEnterStyle
142
+ : innerExitStyle),
140
143
  };
141
- }, [clipId]);
144
+ }, [clipId, innerEnterStyle, innerExitStyle, presentationDirection]);
145
+ const outerStyle = react.useMemo(() => {
146
+ return presentationDirection === 'entering'
147
+ ? outerEnterStyle
148
+ : outerExitStyle;
149
+ }, [outerEnterStyle, outerExitStyle, presentationDirection]);
142
150
  const svgStyle = react.useMemo(() => {
143
151
  return {
144
152
  width: '100%',
@@ -146,7 +154,7 @@ const WipePresentation = ({ children, presentationProgress, presentationDirectio
146
154
  pointerEvents: 'none',
147
155
  };
148
156
  }, []);
149
- return (jsxRuntime.jsxs(remotion.AbsoluteFill, { children: [jsxRuntime.jsx(remotion.AbsoluteFill, { style: style, children: children }), jsxRuntime.jsx(remotion.AbsoluteFill, { children: jsxRuntime.jsx("svg", { viewBox: "0 0 1 1", style: svgStyle, children: jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: clipId, clipPathUnits: "objectBoundingBox", children: jsxRuntime.jsx("path", { d: path, fill: "black" }) }) }) }) })] }));
157
+ return (jsxRuntime.jsxs(remotion.AbsoluteFill, { style: outerStyle, children: [jsxRuntime.jsx(remotion.AbsoluteFill, { style: style, children: children }), jsxRuntime.jsx(remotion.AbsoluteFill, { children: jsxRuntime.jsx("svg", { viewBox: "0 0 1 1", style: svgStyle, children: jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: clipId, clipPathUnits: "objectBoundingBox", children: jsxRuntime.jsx("path", { d: path, fill: "black" }) }) }) }) })] }));
150
158
  };
151
159
  const wipe = (props) => {
152
160
  return {
@@ -1,6 +1,11 @@
1
+ import React from 'react';
1
2
  import type { TransitionPresentation } from '../types.js';
2
3
  export type ClockWipeProps = {
3
4
  width: number;
4
5
  height: number;
6
+ outerEnterStyle?: React.CSSProperties;
7
+ outerExitStyle?: React.CSSProperties;
8
+ innerEnterStyle?: React.CSSProperties;
9
+ innerExitStyle?: React.CSSProperties;
5
10
  };
6
11
  export declare const clockWipe: (props: ClockWipeProps) => TransitionPresentation<ClockWipeProps>;
@@ -16,9 +16,26 @@ const ClockWipePresentation = ({ children, presentationDirection, presentationPr
16
16
  width: '100%',
17
17
  height: '100%',
18
18
  clipPath: presentationDirection === 'exiting' ? undefined : `url(#${clipId})`,
19
+ ...(presentationDirection === 'entering'
20
+ ? passedProps.innerEnterStyle
21
+ : passedProps.innerExitStyle),
19
22
  };
20
- }, [clipId, presentationDirection]);
21
- return (_jsxs(AbsoluteFill, { children: [_jsx(AbsoluteFill, { style: style, children: children }), presentationDirection === 'exiting' ? null : (_jsx(AbsoluteFill, { children: _jsx("svg", { children: _jsx("defs", { children: _jsx("clipPath", { id: clipId, children: _jsx("path", { d: translatedPath, fill: "black" }) }) }) }) }))] }));
23
+ }, [
24
+ clipId,
25
+ passedProps.innerEnterStyle,
26
+ passedProps.innerExitStyle,
27
+ presentationDirection,
28
+ ]);
29
+ const outerStyle = useMemo(() => {
30
+ return presentationDirection === 'entering'
31
+ ? passedProps.outerEnterStyle
32
+ : passedProps.outerExitStyle;
33
+ }, [
34
+ passedProps.outerEnterStyle,
35
+ passedProps.outerExitStyle,
36
+ presentationDirection,
37
+ ]);
38
+ return (_jsxs(AbsoluteFill, { style: outerStyle, children: [_jsx(AbsoluteFill, { style: style, children: children }), presentationDirection === 'exiting' ? null : (_jsx(AbsoluteFill, { children: _jsx("svg", { children: _jsx("defs", { children: _jsx("clipPath", { id: clipId, children: _jsx("path", { d: translatedPath, fill: "black" }) }) }) }) }))] }));
22
39
  };
23
40
  export const clockWipe = (props) => {
24
41
  return { component: ClockWipePresentation, props: props !== null && props !== void 0 ? props : {} };
@@ -1,3 +1,7 @@
1
+ /// <reference types="react" />
1
2
  import type { TransitionPresentation } from '../types.js';
2
- export type FadeProps = Record<string, never>;
3
+ export type FadeProps = {
4
+ enterStyle?: React.CSSProperties;
5
+ exitStyle?: React.CSSProperties;
6
+ };
3
7
  export declare const fade: (props?: FadeProps) => TransitionPresentation<FadeProps>;
@@ -1,14 +1,23 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from 'react';
3
3
  import { AbsoluteFill } from 'remotion';
4
- const FadePresentation = ({ children, presentationDirection, presentationProgress }) => {
4
+ const FadePresentation = ({ children, presentationDirection, presentationProgress, passedProps }) => {
5
5
  const isEntering = presentationDirection === 'entering';
6
6
  const style = useMemo(() => {
7
7
  return {
8
8
  opacity: isEntering ? presentationProgress : 1,
9
+ ...(presentationDirection === 'entering'
10
+ ? passedProps.enterStyle
11
+ : passedProps.exitStyle),
9
12
  };
10
- }, [isEntering, presentationProgress]);
11
- return (_jsx(AbsoluteFill, { children: _jsx(AbsoluteFill, { style: style, children: children }) }));
13
+ }, [
14
+ isEntering,
15
+ passedProps.enterStyle,
16
+ passedProps.exitStyle,
17
+ presentationDirection,
18
+ presentationProgress,
19
+ ]);
20
+ return _jsx(AbsoluteFill, { style: style, children: children });
12
21
  };
13
22
  export const fade = (props) => {
14
23
  return {
@@ -1,7 +1,12 @@
1
+ import React from 'react';
1
2
  import type { TransitionPresentation } from '../types.js';
2
3
  export type FlipDirection = 'from-left' | 'from-right' | 'from-top' | 'from-bottom';
3
4
  export type FlipProps = {
4
5
  direction?: FlipDirection;
5
6
  perspective?: number;
7
+ outerEnterStyle?: React.CSSProperties;
8
+ outerExitStyle?: React.CSSProperties;
9
+ innerEnterStyle?: React.CSSProperties;
10
+ innerExitStyle?: React.CSSProperties;
6
11
  };
7
12
  export declare const flip: (props?: FlipProps) => TransitionPresentation<FlipProps>;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from 'react';
3
3
  import { AbsoluteFill, interpolate } from 'remotion';
4
- const Flip = ({ children, presentationDirection, presentationProgress, passedProps: { direction = 'from-left', perspective = 1000 }, }) => {
4
+ const Flip = ({ children, presentationDirection, presentationProgress, passedProps: { direction = 'from-left', perspective = 1000, innerEnterStyle, innerExitStyle, outerEnterStyle, outerExitStyle, }, }) => {
5
5
  const style = useMemo(() => {
6
6
  const startRotationEntering = direction === 'from-right' || direction === 'from-top' ? 180 : -180;
7
7
  const endRotationEntering = direction === 'from-right' || direction === 'from-top' ? -180 : 180;
@@ -17,15 +17,27 @@ const Flip = ({ children, presentationDirection, presentationProgress, passedPro
17
17
  transform: `${rotateProperty}(${rotation}deg)`,
18
18
  backfaceVisibility: 'hidden',
19
19
  WebkitBackfaceVisibility: 'hidden',
20
+ ...(presentationDirection === 'entering'
21
+ ? innerEnterStyle
22
+ : innerExitStyle),
20
23
  };
21
- }, [direction, presentationDirection, presentationProgress]);
24
+ }, [
25
+ direction,
26
+ innerEnterStyle,
27
+ innerExitStyle,
28
+ presentationDirection,
29
+ presentationProgress,
30
+ ]);
22
31
  const outer = useMemo(() => {
23
32
  return {
24
33
  perspective,
25
34
  // Make children also their backface hidden
26
35
  transformStyle: 'preserve-3d',
36
+ ...(presentationDirection === 'entering'
37
+ ? outerEnterStyle
38
+ : outerExitStyle),
27
39
  };
28
- }, [perspective]);
40
+ }, [outerEnterStyle, outerExitStyle, perspective, presentationDirection]);
29
41
  return (_jsx(AbsoluteFill, { style: outer, children: _jsx(AbsoluteFill, { style: style, children: children }) }));
30
42
  };
31
43
  export const flip = (props) => {
@@ -1,6 +1,9 @@
1
+ import React from 'react';
1
2
  import type { TransitionPresentation } from '../types.js';
2
3
  export type SlideDirection = 'from-left' | 'from-top' | 'from-right' | 'from-bottom';
3
4
  export type SlideProps = {
4
5
  direction?: SlideDirection;
6
+ exitStyle?: React.CSSProperties;
7
+ enterStyle?: React.CSSProperties;
5
8
  };
6
9
  export declare const slide: (props?: SlideProps) => TransitionPresentation<SlideProps>;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from 'react';
3
3
  import { AbsoluteFill } from 'remotion';
4
- const SlidePresentation = ({ children, presentationProgress, presentationDirection, passedProps: { direction = 'from-left' }, }) => {
4
+ const SlidePresentation = ({ children, presentationProgress, presentationDirection, passedProps: { direction = 'from-left', enterStyle, exitStyle }, }) => {
5
5
  const directionStyle = useMemo(() => {
6
6
  if (presentationDirection === 'exiting') {
7
7
  switch (direction) {
@@ -53,9 +53,10 @@ const SlidePresentation = ({ children, presentationProgress, presentationDirecti
53
53
  justifyContent: 'center',
54
54
  alignItems: 'center',
55
55
  ...directionStyle,
56
+ ...(presentationDirection === 'entering' ? enterStyle : exitStyle),
56
57
  };
57
- }, [directionStyle]);
58
- return (_jsx(AbsoluteFill, { children: _jsx(AbsoluteFill, { style: style, children: children }) }));
58
+ }, [directionStyle, enterStyle, exitStyle, presentationDirection]);
59
+ return _jsx(AbsoluteFill, { style: style, children: children });
59
60
  };
60
61
  export const slide = (props) => {
61
62
  return {
@@ -1,6 +1,11 @@
1
+ import React from 'react';
1
2
  import type { TransitionPresentation } from '../types.js';
2
3
  export type WipeDirection = 'from-left' | 'from-top-left' | 'from-top' | 'from-top-right' | 'from-right' | 'from-bottom-right' | 'from-bottom' | 'from-bottom-left';
3
4
  export type WipeProps = {
4
5
  direction?: WipeDirection;
6
+ outerEnterStyle?: React.CSSProperties;
7
+ outerExitStyle?: React.CSSProperties;
8
+ innerEnterStyle?: React.CSSProperties;
9
+ innerExitStyle?: React.CSSProperties;
5
10
  };
6
11
  export declare const wipe: (props?: WipeProps) => TransitionPresentation<WipeProps>;
@@ -117,7 +117,7 @@ Z`;
117
117
  throw new Error(`Unknown direction ${JSON.stringify(direction)}`);
118
118
  }
119
119
  };
120
- const WipePresentation = ({ children, presentationProgress, presentationDirection, passedProps: { direction = 'from-left' }, }) => {
120
+ const WipePresentation = ({ children, presentationProgress, presentationDirection, passedProps: { direction = 'from-left', innerEnterStyle, innerExitStyle, outerEnterStyle, outerExitStyle, }, }) => {
121
121
  const [clipId] = useState(() => String(random(null)));
122
122
  const progressInDirection = presentationDirection === 'entering'
123
123
  ? presentationProgress
@@ -132,8 +132,16 @@ const WipePresentation = ({ children, presentationProgress, presentationDirectio
132
132
  justifyContent: 'center',
133
133
  alignItems: 'center',
134
134
  clipPath: `url(#${clipId})`,
135
+ ...(presentationDirection === 'entering'
136
+ ? innerEnterStyle
137
+ : innerExitStyle),
135
138
  };
136
- }, [clipId]);
139
+ }, [clipId, innerEnterStyle, innerExitStyle, presentationDirection]);
140
+ const outerStyle = useMemo(() => {
141
+ return presentationDirection === 'entering'
142
+ ? outerEnterStyle
143
+ : outerExitStyle;
144
+ }, [outerEnterStyle, outerExitStyle, presentationDirection]);
137
145
  const svgStyle = useMemo(() => {
138
146
  return {
139
147
  width: '100%',
@@ -141,7 +149,7 @@ const WipePresentation = ({ children, presentationProgress, presentationDirectio
141
149
  pointerEvents: 'none',
142
150
  };
143
151
  }, []);
144
- return (_jsxs(AbsoluteFill, { children: [_jsx(AbsoluteFill, { style: style, children: children }), _jsx(AbsoluteFill, { children: _jsx("svg", { viewBox: "0 0 1 1", style: svgStyle, children: _jsx("defs", { children: _jsx("clipPath", { id: clipId, clipPathUnits: "objectBoundingBox", children: _jsx("path", { d: path, fill: "black" }) }) }) }) })] }));
152
+ return (_jsxs(AbsoluteFill, { style: outerStyle, children: [_jsx(AbsoluteFill, { style: style, children: children }), _jsx(AbsoluteFill, { children: _jsx("svg", { viewBox: "0 0 1 1", style: svgStyle, children: _jsx("defs", { children: _jsx("clipPath", { id: clipId, clipPathUnits: "objectBoundingBox", children: _jsx("path", { d: path, fill: "black" }) }) }) }) })] }));
145
153
  };
146
154
  export const wipe = (props) => {
147
155
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remotion/transitions",
3
- "version": "4.0.83",
3
+ "version": "4.0.84",
4
4
  "description": "Transition presets for Remotion",
5
5
  "sideEffects": false,
6
6
  "main": "dist/cjs/index.js",
@@ -16,15 +16,15 @@
16
16
  "url": "https://github.com/remotion-dev/remotion/issues"
17
17
  },
18
18
  "dependencies": {
19
- "remotion": "4.0.83",
20
- "@remotion/shapes": "4.0.83",
21
- "@remotion/paths": "4.0.83"
19
+ "@remotion/paths": "4.0.84",
20
+ "@remotion/shapes": "4.0.84",
21
+ "remotion": "4.0.84"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@jonny/eslint-config": "3.0.276",
25
25
  "eslint": "8.42.0",
26
- "prettier": "3.0.2",
27
- "prettier-plugin-organize-imports": "^3.2.2",
26
+ "prettier": "3.1.1",
27
+ "prettier-plugin-organize-imports": "3.2.4",
28
28
  "react": "18.2.0",
29
29
  "react-dom": "18.2.0",
30
30
  "vitest": "0.31.1",
@@ -33,8 +33,8 @@
33
33
  "@vitejs/plugin-react": "^2.0.0",
34
34
  "rollup": "^2.70.1",
35
35
  "@rollup/plugin-typescript": "^8.2.0",
36
- "remotion": "4.0.83",
37
- "@remotion/test-utils": "4.0.83"
36
+ "remotion": "4.0.84",
37
+ "@remotion/test-utils": "4.0.84"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "react": ">=16.8.0",