@remotion/transitions 4.0.165 → 4.0.167
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/esm/fade.mjs
CHANGED
|
@@ -8,13 +8,14 @@ var FadePresentation = ({ children, presentationDirection, presentationProgress,
|
|
|
8
8
|
const isEntering = presentationDirection === "entering";
|
|
9
9
|
const style = useMemo(() => {
|
|
10
10
|
return {
|
|
11
|
-
opacity: isEntering ? presentationProgress : 1,
|
|
11
|
+
opacity: isEntering ? presentationProgress : passedProps.shouldFadeOutExitingScene ? 1 - presentationProgress : 1,
|
|
12
12
|
...presentationDirection === "entering" ? passedProps.enterStyle : passedProps.exitStyle
|
|
13
13
|
};
|
|
14
14
|
}, [
|
|
15
15
|
isEntering,
|
|
16
16
|
passedProps.enterStyle,
|
|
17
17
|
passedProps.exitStyle,
|
|
18
|
+
passedProps.shouldFadeOutExitingScene,
|
|
18
19
|
presentationDirection,
|
|
19
20
|
presentationProgress
|
|
20
21
|
]);
|
|
@@ -3,6 +3,7 @@ import type { TransitionPresentation } from '../types.js';
|
|
|
3
3
|
export type FadeProps = {
|
|
4
4
|
enterStyle?: React.CSSProperties;
|
|
5
5
|
exitStyle?: React.CSSProperties;
|
|
6
|
+
shouldFadeOutExitingScene?: boolean;
|
|
6
7
|
};
|
|
7
8
|
/**
|
|
8
9
|
* Provides a simple fade transition component for sliding elements in and out.
|
|
@@ -8,7 +8,11 @@ const FadePresentation = ({ children, presentationDirection, presentationProgres
|
|
|
8
8
|
const isEntering = presentationDirection === 'entering';
|
|
9
9
|
const style = (0, react_1.useMemo)(() => {
|
|
10
10
|
return {
|
|
11
|
-
opacity: isEntering
|
|
11
|
+
opacity: isEntering
|
|
12
|
+
? presentationProgress
|
|
13
|
+
: passedProps.shouldFadeOutExitingScene
|
|
14
|
+
? 1 - presentationProgress
|
|
15
|
+
: 1,
|
|
12
16
|
...(presentationDirection === 'entering'
|
|
13
17
|
? passedProps.enterStyle
|
|
14
18
|
: passedProps.exitStyle),
|
|
@@ -17,6 +21,7 @@ const FadePresentation = ({ children, presentationDirection, presentationProgres
|
|
|
17
21
|
isEntering,
|
|
18
22
|
passedProps.enterStyle,
|
|
19
23
|
passedProps.exitStyle,
|
|
24
|
+
passedProps.shouldFadeOutExitingScene,
|
|
20
25
|
presentationDirection,
|
|
21
26
|
presentationProgress,
|
|
22
27
|
]);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remotion/transitions",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.167",
|
|
4
4
|
"description": "Transition presets for Remotion",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"main": "dist/esm/index.mjs",
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
"url": "https://github.com/remotion-dev/remotion/issues"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"remotion": "4.0.
|
|
20
|
-
"@remotion/
|
|
21
|
-
"
|
|
19
|
+
"@remotion/shapes": "4.0.167",
|
|
20
|
+
"@remotion/paths": "4.0.167",
|
|
21
|
+
"remotion": "4.0.167"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@jonny/eslint-config": "3.0.281",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
"@types/react-dom": "18.3.0",
|
|
33
33
|
"@types/bun": "1.0.12",
|
|
34
34
|
"@vitejs/plugin-react": "^2.0.0",
|
|
35
|
-
"remotion": "4.0.
|
|
36
|
-
"
|
|
35
|
+
"@remotion/test-utils": "4.0.167",
|
|
36
|
+
"remotion": "4.0.167"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": ">=16.8.0",
|