react-native-screen-transitions 2.4.1 → 2.4.2-beta.0
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/lib/commonjs/__configs__/presets.js.map +1 -1
- package/lib/commonjs/components/root-transition-aware.js.map +1 -1
- package/lib/commonjs/constants.js.map +1 -1
- package/lib/commonjs/hooks/animation/use-screen-animation.js +9 -5
- package/lib/commonjs/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/integrations/blank-stack/components/Header.js +142 -0
- package/lib/commonjs/integrations/blank-stack/components/Header.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/components/Screens.js +64 -0
- package/lib/commonjs/integrations/blank-stack/components/Screens.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/components/StackView.js +94 -0
- package/lib/commonjs/integrations/blank-stack/components/StackView.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/navigators/createBlankStackNavigator.js +74 -0
- package/lib/commonjs/integrations/blank-stack/navigators/createBlankStackNavigator.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js +66 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js +16 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js +208 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js.map +1 -0
- package/lib/commonjs/{types/navigator.js → integrations/blank-stack/utils/with-stack-navigation/_types.js} +1 -1
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_types.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js +15 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/calculateActiveScreensLimit.js +23 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/calculateActiveScreensLimit.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js +15 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js +14 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js +13 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js.map +1 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/index.js +71 -0
- package/lib/commonjs/integrations/blank-stack/utils/with-stack-navigation/index.js.map +1 -0
- package/lib/commonjs/integrations/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/utils/getModalRoutesKeys.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/utils/useInvalidPreventRemoveError.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/commonjs/integrations/native-stack/views/useHeaderConfigProps.js.map +1 -1
- package/lib/commonjs/providers/keys.js.map +1 -1
- package/lib/commonjs/providers/screen-transition-provider.js.map +1 -1
- package/lib/commonjs/providers/transition-styles.js +18 -4
- package/lib/commonjs/providers/transition-styles.js.map +1 -1
- package/lib/commonjs/stores/animations.js.map +1 -1
- package/lib/commonjs/stores/bounds/index.js.map +1 -1
- package/lib/commonjs/stores/gestures.js.map +1 -1
- package/lib/commonjs/stores/utils/reset-stores-for-screen.js.map +1 -1
- package/lib/commonjs/types/blank-stack.navigator.js +6 -0
- package/lib/commonjs/types/{navigator.js.map → blank-stack.navigator.js.map} +1 -1
- package/lib/commonjs/types/native-stack.navigator.js +6 -0
- package/lib/commonjs/types/native-stack.navigator.js.map +1 -0
- package/lib/commonjs/utils/animation/derivations.js +1 -14
- package/lib/commonjs/utils/animation/derivations.js.map +1 -1
- package/lib/commonjs/utils/bounds/constants.js.map +1 -1
- package/lib/commonjs/utils/bounds/index.js +23 -90
- package/lib/commonjs/utils/bounds/index.js.map +1 -1
- package/lib/commonjs/utils/gesture/apply-offset-rules.js.map +1 -1
- package/lib/commonjs/utils/gesture/check-gesture-activation.js.map +1 -1
- package/lib/module/__configs__/presets.js.map +1 -1
- package/lib/module/components/root-transition-aware.js.map +1 -1
- package/lib/module/constants.js.map +1 -1
- package/lib/module/hooks/animation/use-screen-animation.js +9 -5
- package/lib/module/hooks/animation/use-screen-animation.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/integrations/blank-stack/components/Header.js +138 -0
- package/lib/module/integrations/blank-stack/components/Header.js.map +1 -0
- package/lib/module/integrations/blank-stack/components/Screens.js +58 -0
- package/lib/module/integrations/blank-stack/components/Screens.js.map +1 -0
- package/lib/module/integrations/blank-stack/components/StackView.js +90 -0
- package/lib/module/integrations/blank-stack/components/StackView.js.map +1 -0
- package/lib/module/integrations/blank-stack/navigators/createBlankStackNavigator.js +68 -0
- package/lib/module/integrations/blank-stack/navigators/createBlankStackNavigator.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js +60 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js +11 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js +202 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_types.js +4 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_types.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js +10 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/calculateActiveScreensLimit.js +19 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/calculateActiveScreensLimit.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js +10 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js +9 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js +8 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.js.map +1 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/index.js +65 -0
- package/lib/module/integrations/blank-stack/utils/with-stack-navigation/index.js.map +1 -0
- package/lib/module/integrations/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/module/integrations/native-stack/utils/getModalRoutesKeys.js.map +1 -1
- package/lib/module/integrations/native-stack/utils/useInvalidPreventRemoveError.js.map +1 -1
- package/lib/module/integrations/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/module/integrations/native-stack/views/NativeStackView.native.js.map +1 -1
- package/lib/module/integrations/native-stack/views/useHeaderConfigProps.js.map +1 -1
- package/lib/module/providers/keys.js.map +1 -1
- package/lib/module/providers/screen-transition-provider.js.map +1 -1
- package/lib/module/providers/transition-styles.js +19 -5
- package/lib/module/providers/transition-styles.js.map +1 -1
- package/lib/module/stores/animations.js.map +1 -1
- package/lib/module/stores/bounds/index.js.map +1 -1
- package/lib/module/stores/gestures.js.map +1 -1
- package/lib/module/stores/utils/reset-stores-for-screen.js.map +1 -1
- package/lib/module/types/blank-stack.navigator.js +4 -0
- package/lib/module/types/{navigator.js.map → blank-stack.navigator.js.map} +1 -1
- package/lib/module/types/native-stack.navigator.js +4 -0
- package/lib/module/types/native-stack.navigator.js.map +1 -0
- package/lib/module/utils/animation/derivations.js +1 -14
- package/lib/module/utils/animation/derivations.js.map +1 -1
- package/lib/module/utils/bounds/constants.js.map +1 -1
- package/lib/module/utils/bounds/index.js +24 -91
- package/lib/module/utils/bounds/index.js.map +1 -1
- package/lib/module/utils/gesture/apply-offset-rules.js.map +1 -1
- package/lib/module/utils/gesture/check-gesture-activation.js.map +1 -1
- package/lib/typescript/__configs__/index.d.ts +9 -9
- package/lib/typescript/__configs__/index.d.ts.map +1 -1
- package/lib/typescript/__configs__/presets.d.ts +1 -1
- package/lib/typescript/__configs__/presets.d.ts.map +1 -1
- package/lib/typescript/components/root-transition-aware.d.ts.map +1 -1
- package/lib/typescript/constants.d.ts +2 -2
- package/lib/typescript/constants.d.ts.map +1 -1
- package/lib/typescript/hooks/animation/use-screen-animation.d.ts +1 -1
- package/lib/typescript/hooks/animation/use-screen-animation.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +20 -18
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/integrations/blank-stack/components/Header.d.ts +5 -0
- package/lib/typescript/integrations/blank-stack/components/Header.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/components/Screens.d.ts +15 -0
- package/lib/typescript/integrations/blank-stack/components/Screens.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/components/StackView.d.ts +2 -0
- package/lib/typescript/integrations/blank-stack/components/StackView.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/navigators/createBlankStackNavigator.d.ts +109 -0
- package/lib/typescript/integrations/blank-stack/navigators/createBlankStackNavigator.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.d.ts +8 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.d.ts +2 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.d.ts +20 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_types.d.ts +23 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_types.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.d.ts +3 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/calculateActiveScreensLimit.d.ts +4 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/calculateActiveScreensLimit.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.d.ts +4 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.d.ts +3 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.d.ts +3 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.d.ts.map +1 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/index.d.ts +6 -0
- package/lib/typescript/integrations/blank-stack/utils/with-stack-navigation/index.d.ts.map +1 -0
- package/lib/typescript/integrations/native-stack/navigators/createNativeStackNavigator.d.ts +1 -1
- package/lib/typescript/integrations/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -1
- package/lib/typescript/integrations/native-stack/utils/getModalRoutesKeys.d.ts +1 -1
- package/lib/typescript/integrations/native-stack/utils/getModalRoutesKeys.d.ts.map +1 -1
- package/lib/typescript/integrations/native-stack/utils/useInvalidPreventRemoveError.d.ts +1 -1
- package/lib/typescript/integrations/native-stack/utils/useInvalidPreventRemoveError.d.ts.map +1 -1
- package/lib/typescript/integrations/native-stack/views/NativeStackView.d.ts +1 -1
- package/lib/typescript/integrations/native-stack/views/NativeStackView.d.ts.map +1 -1
- package/lib/typescript/integrations/native-stack/views/NativeStackView.native.d.ts +1 -1
- package/lib/typescript/integrations/native-stack/views/NativeStackView.native.d.ts.map +1 -1
- package/lib/typescript/integrations/native-stack/views/useHeaderConfigProps.d.ts +1 -1
- package/lib/typescript/integrations/native-stack/views/useHeaderConfigProps.d.ts.map +1 -1
- package/lib/typescript/providers/keys.d.ts +1 -1
- package/lib/typescript/providers/keys.d.ts.map +1 -1
- package/lib/typescript/providers/screen-transition-provider.d.ts +1 -1
- package/lib/typescript/providers/screen-transition-provider.d.ts.map +1 -1
- package/lib/typescript/providers/transition-styles.d.ts.map +1 -1
- package/lib/typescript/stores/animations.d.ts +1 -1
- package/lib/typescript/stores/animations.d.ts.map +1 -1
- package/lib/typescript/stores/bounds/index.d.ts +1 -1
- package/lib/typescript/stores/bounds/index.d.ts.map +1 -1
- package/lib/typescript/stores/gestures.d.ts +1 -1
- package/lib/typescript/stores/gestures.d.ts.map +1 -1
- package/lib/typescript/stores/utils/reset-stores-for-screen.d.ts +1 -1
- package/lib/typescript/stores/utils/reset-stores-for-screen.d.ts.map +1 -1
- package/lib/typescript/types/animation.d.ts +2 -4
- package/lib/typescript/types/animation.d.ts.map +1 -1
- package/lib/typescript/types/blank-stack.navigator.d.ts +219 -0
- package/lib/typescript/types/blank-stack.navigator.d.ts.map +1 -0
- package/lib/typescript/types/bounds.d.ts +0 -57
- package/lib/typescript/types/bounds.d.ts.map +1 -1
- package/lib/typescript/types/{navigator.d.ts → native-stack.navigator.d.ts} +5 -1
- package/lib/typescript/types/native-stack.navigator.d.ts.map +1 -0
- package/lib/typescript/utils/animation/derivations.d.ts +1 -4
- package/lib/typescript/utils/animation/derivations.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/_types/builder.d.ts +2 -2
- package/lib/typescript/utils/bounds/_types/builder.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/_utils/geometry.d.ts +2 -2
- package/lib/typescript/utils/bounds/_utils/geometry.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/constants.d.ts +2 -2
- package/lib/typescript/utils/bounds/constants.d.ts.map +1 -1
- package/lib/typescript/utils/bounds/index.d.ts +4 -4
- package/lib/typescript/utils/bounds/index.d.ts.map +1 -1
- package/lib/typescript/utils/gesture/apply-offset-rules.d.ts +2 -2
- package/lib/typescript/utils/gesture/apply-offset-rules.d.ts.map +1 -1
- package/lib/typescript/utils/gesture/check-gesture-activation.d.ts +2 -2
- package/lib/typescript/utils/gesture/check-gesture-activation.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/__configs__/presets.ts +590 -590
- package/src/components/root-transition-aware.tsx +27 -27
- package/src/constants.ts +47 -47
- package/src/hooks/animation/use-screen-animation.tsx +52 -47
- package/src/index.ts +33 -22
- package/src/integrations/blank-stack/components/Header.tsx +143 -0
- package/src/integrations/blank-stack/components/Screens.tsx +96 -0
- package/src/integrations/blank-stack/components/StackView.tsx +106 -0
- package/src/integrations/blank-stack/navigators/createBlankStackNavigator.tsx +122 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-closing-route-keys.tsx +62 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-previous.tsx +11 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_hooks/use-stack-navigation-state.tsx +280 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_types.ts +36 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_utils/are-descriptors-equal.ts +15 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_utils/calculateActiveScreensLimit.ts +29 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_utils/compose-descriptors.ts +17 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_utils/have-same-route-keys.ts +12 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/_utils/routes-are-identical.ts +11 -0
- package/src/integrations/blank-stack/utils/with-stack-navigation/index.tsx +93 -0
- package/src/integrations/native-stack/navigators/createNativeStackNavigator.tsx +95 -95
- package/src/integrations/native-stack/utils/getModalRoutesKeys.ts +14 -14
- package/src/integrations/native-stack/utils/useInvalidPreventRemoveError.tsx +23 -23
- package/src/integrations/native-stack/views/NativeStackView.native.tsx +608 -608
- package/src/integrations/native-stack/views/NativeStackView.tsx +188 -188
- package/src/integrations/native-stack/views/useHeaderConfigProps.tsx +260 -260
- package/src/providers/keys.tsx +22 -22
- package/src/providers/screen-transition-provider.tsx +20 -20
- package/src/providers/transition-styles.tsx +24 -11
- package/src/stores/animations.ts +23 -23
- package/src/stores/bounds/index.ts +82 -82
- package/src/stores/gestures.ts +36 -36
- package/src/stores/utils/reset-stores-for-screen.ts +4 -4
- package/src/types/animation.ts +2 -4
- package/src/types/blank-stack.navigator.ts +271 -0
- package/src/types/bounds.ts +0 -64
- package/src/types/{navigator.ts → native-stack.navigator.ts} +5 -0
- package/src/utils/animation/derivations.ts +3 -20
- package/src/utils/bounds/_types/builder.ts +111 -111
- package/src/utils/bounds/_utils/geometry.ts +2 -2
- package/src/utils/bounds/constants.ts +29 -29
- package/src/utils/bounds/index.ts +35 -105
- package/src/utils/gesture/apply-offset-rules.ts +271 -271
- package/src/utils/gesture/check-gesture-activation.ts +260 -260
- package/lib/module/types/navigator.js +0 -4
- package/lib/typescript/types/navigator.d.ts.map +0 -1
|
@@ -5,40 +5,40 @@ import { NO_STYLES } from "../constants";
|
|
|
5
5
|
import { useTransitionStyles } from "../providers/transition-styles";
|
|
6
6
|
|
|
7
7
|
type Props = {
|
|
8
|
-
|
|
8
|
+
children: React.ReactNode;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
11
|
export const RootTransitionAware = memo(({ children }: Props) => {
|
|
12
|
-
|
|
12
|
+
const { stylesMap } = useTransitionStyles();
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
14
|
+
const animatedContentStyle = useAnimatedStyle(() => {
|
|
15
|
+
"worklet";
|
|
16
|
+
return stylesMap.value.contentStyle || NO_STYLES;
|
|
17
|
+
});
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const animatedOverlayStyle = useAnimatedStyle(() => {
|
|
20
|
+
"worklet";
|
|
21
|
+
return stylesMap.value.overlayStyle || NO_STYLES;
|
|
22
|
+
});
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
return (
|
|
25
|
+
<View style={styles.container}>
|
|
26
|
+
<Animated.View
|
|
27
|
+
style={[StyleSheet.absoluteFillObject, animatedOverlayStyle]}
|
|
28
|
+
pointerEvents="none"
|
|
29
|
+
/>
|
|
30
|
+
<Animated.View style={[styles.content, animatedContentStyle]}>
|
|
31
|
+
{children}
|
|
32
|
+
</Animated.View>
|
|
33
|
+
</View>
|
|
34
|
+
);
|
|
35
35
|
});
|
|
36
36
|
|
|
37
37
|
const styles = StyleSheet.create({
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
38
|
+
container: {
|
|
39
|
+
flex: 1,
|
|
40
|
+
},
|
|
41
|
+
content: {
|
|
42
|
+
flex: 1,
|
|
43
|
+
},
|
|
44
44
|
});
|
package/src/constants.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ParamListBase, RouteProp } from "@react-navigation/native";
|
|
2
|
-
import type { ScaledSize } from "react-native";
|
|
3
2
|
import type { MeasuredDimensions } from "react-native-reanimated";
|
|
4
3
|
import type { ScreenTransitionState } from "./types/animation";
|
|
5
4
|
import type { BoundEntry } from "./types/bounds";
|
|
6
5
|
import type { ActivationArea } from "./types/gesture";
|
|
6
|
+
import type { Layout } from "./types/native-stack.navigator";
|
|
7
7
|
import type { Complete } from "./types/utils";
|
|
8
8
|
import type { BoundsBuilderOptions } from "./utils/bounds/_types/builder";
|
|
9
9
|
|
|
@@ -22,22 +22,22 @@ export const NO_STYLES = Object.freeze({});
|
|
|
22
22
|
* Default screen transition state
|
|
23
23
|
*/
|
|
24
24
|
export const DEFAULT_SCREEN_TRANSITION_STATE: ScreenTransitionState =
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
25
|
+
Object.freeze({
|
|
26
|
+
progress: 0,
|
|
27
|
+
closing: 0,
|
|
28
|
+
animating: 0,
|
|
29
|
+
gesture: {
|
|
30
|
+
x: 0,
|
|
31
|
+
y: 0,
|
|
32
|
+
normalizedX: 0,
|
|
33
|
+
normalizedY: 0,
|
|
34
|
+
isDismissing: 0,
|
|
35
|
+
isDragging: 0,
|
|
36
|
+
direction: null,
|
|
37
|
+
},
|
|
38
|
+
bounds: {} as Record<string, BoundEntry>,
|
|
39
|
+
route: {} as RouteProp<ParamListBase>,
|
|
40
|
+
});
|
|
41
41
|
|
|
42
42
|
/**
|
|
43
43
|
* Bounds API Defaults
|
|
@@ -45,46 +45,46 @@ export const DEFAULT_SCREEN_TRANSITION_STATE: ScreenTransitionState =
|
|
|
45
45
|
export const NO_BOUNDS_MAP: Record<string, BoundEntry> = Object.freeze({});
|
|
46
46
|
export const EMPTY_BOUND_HELPER_RESULT = Object.freeze({});
|
|
47
47
|
export const EMPTY_BOUND_HELPER_RESULT_RAW = Object.freeze({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
48
|
+
scaleX: 1,
|
|
49
|
+
scaleY: 1,
|
|
50
|
+
scale: 1,
|
|
51
|
+
translateX: 0,
|
|
52
|
+
translateY: 0,
|
|
53
|
+
width: 0,
|
|
54
|
+
height: 0,
|
|
55
55
|
});
|
|
56
56
|
export const ENTER_RANGE = [0, 1] as const;
|
|
57
57
|
export const EXIT_RANGE = [1, 2] as const;
|
|
58
58
|
|
|
59
59
|
export const FULLSCREEN_DIMENSIONS = (
|
|
60
|
-
|
|
60
|
+
dimensions: Layout
|
|
61
61
|
): MeasuredDimensions => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
62
|
+
"worklet";
|
|
63
|
+
return {
|
|
64
|
+
x: 0,
|
|
65
|
+
y: 0,
|
|
66
|
+
pageX: 0,
|
|
67
|
+
pageY: 0,
|
|
68
|
+
width: dimensions.width,
|
|
69
|
+
height: dimensions.height,
|
|
70
|
+
};
|
|
71
71
|
};
|
|
72
72
|
|
|
73
73
|
export const DEFAULT_BUILDER_OPTIONS: Complete<
|
|
74
|
-
|
|
74
|
+
Omit<BoundsBuilderOptions, "id">
|
|
75
75
|
> = Object.freeze({
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
76
|
+
gestures: { x: 0, y: 0 },
|
|
77
|
+
toFullscreen: false,
|
|
78
|
+
absolute: false,
|
|
79
|
+
relative: true,
|
|
80
|
+
method: "transform",
|
|
81
|
+
contentScaleMode: "auto",
|
|
82
|
+
//
|
|
83
|
+
space: "relative",
|
|
84
|
+
target: "bound",
|
|
85
|
+
scaleMode: "match",
|
|
86
|
+
anchor: "center",
|
|
87
|
+
raw: false,
|
|
88
88
|
} as const);
|
|
89
89
|
|
|
90
90
|
/**
|
|
@@ -16,8 +16,9 @@ import type {
|
|
|
16
16
|
ScreenTransitionState,
|
|
17
17
|
} from "../../types/animation";
|
|
18
18
|
|
|
19
|
-
import type { NativeStackDescriptor } from "../../types/navigator";
|
|
19
|
+
import type { NativeStackDescriptor } from "../../types/native-stack.navigator";
|
|
20
20
|
import { derivations } from "../../utils/animation/derivations";
|
|
21
|
+
import { createBounds } from "../../utils/bounds";
|
|
21
22
|
|
|
22
23
|
type BuiltState = {
|
|
23
24
|
progress: SharedValue<number>;
|
|
@@ -84,51 +85,49 @@ export function _useScreenAnimation() {
|
|
|
84
85
|
const nextAnimation = useBuildScreenTransitionState(nextDescriptor);
|
|
85
86
|
const prevAnimation = useBuildScreenTransitionState(previousDescriptor);
|
|
86
87
|
|
|
87
|
-
const screenInterpolatorProps = useDerivedValue<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
},
|
|
131
|
-
);
|
|
88
|
+
const screenInterpolatorProps = useDerivedValue<
|
|
89
|
+
Omit<ScreenInterpolationProps, "bounds">
|
|
90
|
+
>(() => {
|
|
91
|
+
"worklet";
|
|
92
|
+
|
|
93
|
+
const previous = unwrap(prevAnimation, previousDescriptor?.route.key);
|
|
94
|
+
|
|
95
|
+
const next = nextDescriptor?.options?.enableTransitions
|
|
96
|
+
? unwrap(nextAnimation, nextDescriptor?.route.key)
|
|
97
|
+
: undefined;
|
|
98
|
+
|
|
99
|
+
const current =
|
|
100
|
+
unwrap(currentAnimation, currentDescriptor?.route.key) ??
|
|
101
|
+
DEFAULT_SCREEN_TRANSITION_STATE;
|
|
102
|
+
|
|
103
|
+
const {
|
|
104
|
+
progress,
|
|
105
|
+
focused,
|
|
106
|
+
activeBoundId,
|
|
107
|
+
active,
|
|
108
|
+
isActiveTransitioning,
|
|
109
|
+
isDismissing,
|
|
110
|
+
} = derivations({
|
|
111
|
+
current,
|
|
112
|
+
next,
|
|
113
|
+
previous,
|
|
114
|
+
});
|
|
115
|
+
|
|
116
|
+
return {
|
|
117
|
+
layouts: { screen: dimensions },
|
|
118
|
+
insets,
|
|
119
|
+
previous,
|
|
120
|
+
current,
|
|
121
|
+
next,
|
|
122
|
+
focused,
|
|
123
|
+
activeBoundId,
|
|
124
|
+
progress,
|
|
125
|
+
|
|
126
|
+
active,
|
|
127
|
+
isActiveTransitioning,
|
|
128
|
+
isDismissing,
|
|
129
|
+
};
|
|
130
|
+
});
|
|
132
131
|
|
|
133
132
|
const nextInterpolator = nextDescriptor?.options.screenStyleInterpolator;
|
|
134
133
|
const currentInterpolator =
|
|
@@ -142,5 +141,11 @@ export function _useScreenAnimation() {
|
|
|
142
141
|
export function useScreenAnimation() {
|
|
143
142
|
const { screenInterpolatorProps } = _useScreenAnimation();
|
|
144
143
|
|
|
145
|
-
return useDerivedValue(() =>
|
|
144
|
+
return useDerivedValue<ScreenInterpolationProps>(() => {
|
|
145
|
+
const props = screenInterpolatorProps.value;
|
|
146
|
+
return {
|
|
147
|
+
...props,
|
|
148
|
+
bounds: createBounds(props),
|
|
149
|
+
};
|
|
150
|
+
});
|
|
146
151
|
}
|
package/src/index.ts
CHANGED
|
@@ -4,31 +4,42 @@ import { createTransitionAwareComponent } from "./components/create-transition-a
|
|
|
4
4
|
import MaskedView from "./components/integrations/masked-view";
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
View: createTransitionAwareComponent(View),
|
|
8
|
+
Pressable: createTransitionAwareComponent(Pressable),
|
|
9
|
+
ScrollView: createTransitionAwareComponent(ScrollView, {
|
|
10
|
+
isScrollable: true,
|
|
11
|
+
}),
|
|
12
|
+
FlatList: createTransitionAwareComponent(FlatList, {
|
|
13
|
+
isScrollable: true,
|
|
14
|
+
}),
|
|
15
|
+
MaskedView: MaskedView,
|
|
16
|
+
presets,
|
|
17
|
+
specs,
|
|
18
|
+
createTransitionAwareComponent,
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export { useScreenAnimation } from "./hooks/animation/use-screen-animation";
|
|
22
22
|
export { createNativeStackNavigator } from "./integrations/native-stack/navigators/createNativeStackNavigator";
|
|
23
|
+
export { createBlankStackNavigator } from "./integrations/blank-stack/navigators/createBlankStackNavigator";
|
|
23
24
|
|
|
24
25
|
export type {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} from "./types/navigator";
|
|
26
|
+
NativeStackHeaderLeftProps,
|
|
27
|
+
NativeStackHeaderProps,
|
|
28
|
+
NativeStackHeaderRightProps,
|
|
29
|
+
NativeStackNavigationEventMap,
|
|
30
|
+
NativeStackNavigationOptions,
|
|
31
|
+
NativeStackNavigationProp,
|
|
32
|
+
NativeStackNavigatorProps,
|
|
33
|
+
NativeStackOptionsArgs,
|
|
34
|
+
NativeStackScreenProps,
|
|
35
|
+
} from "./types/native-stack.navigator";
|
|
36
|
+
|
|
37
|
+
export type {
|
|
38
|
+
BlankStackHeaderProps,
|
|
39
|
+
BlankStackNavigationEventMap,
|
|
40
|
+
BlankStackNavigationOptions,
|
|
41
|
+
BlankStackNavigationProp,
|
|
42
|
+
BlankStackNavigatorProps,
|
|
43
|
+
BlankStackOptionsArgs,
|
|
44
|
+
BlankStackScreenProps,
|
|
45
|
+
} from "./types/blank-stack.navigator";
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import {
|
|
2
|
+
NavigationContext,
|
|
3
|
+
NavigationRouteContext,
|
|
4
|
+
} from "@react-navigation/native";
|
|
5
|
+
import { useMemo } from "react";
|
|
6
|
+
import { Animated, StyleSheet, View } from "react-native";
|
|
7
|
+
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
8
|
+
import { useScreenAnimation } from "../../../hooks/animation/use-screen-animation";
|
|
9
|
+
import { KeysProvider, useKeys } from "../../../providers/keys";
|
|
10
|
+
import type {
|
|
11
|
+
BlankStackHeaderProps,
|
|
12
|
+
BlankStackScene,
|
|
13
|
+
} from "../../../types/blank-stack.navigator";
|
|
14
|
+
import { useStackNavigationContext } from "../utils/with-stack-navigation";
|
|
15
|
+
|
|
16
|
+
type HeaderHostProps = {
|
|
17
|
+
scene: BlankStackScene;
|
|
18
|
+
focusedIndex: number;
|
|
19
|
+
isFloating?: boolean;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
const getActiveFloatHeader = (scenes: BlankStackScene[], index: number) => {
|
|
23
|
+
for (let i = index; i >= 0; i--) {
|
|
24
|
+
const scene = scenes[i];
|
|
25
|
+
const options = scene?.descriptor?.options;
|
|
26
|
+
|
|
27
|
+
if (options?.headerMode === "float" && options?.headerShown) {
|
|
28
|
+
return { scene, headerIndex: i };
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
return null;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const HeaderHost = ({ scene, focusedIndex, isFloating }: HeaderHostProps) => {
|
|
36
|
+
const insets = useSafeAreaInsets();
|
|
37
|
+
const animation = useScreenAnimation();
|
|
38
|
+
|
|
39
|
+
const HeaderComponent = scene.descriptor.options.header;
|
|
40
|
+
|
|
41
|
+
if (!HeaderComponent) {
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const headerProps: BlankStackHeaderProps = {
|
|
46
|
+
route: scene.route,
|
|
47
|
+
navigation: scene.descriptor.navigation,
|
|
48
|
+
animation,
|
|
49
|
+
insets,
|
|
50
|
+
focusedIndex,
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
return (
|
|
54
|
+
<Animated.View
|
|
55
|
+
pointerEvents="box-none"
|
|
56
|
+
style={[
|
|
57
|
+
styles.container,
|
|
58
|
+
isFloating ? styles.floating : null,
|
|
59
|
+
styles.absolute,
|
|
60
|
+
]}
|
|
61
|
+
>
|
|
62
|
+
<NavigationContext.Provider value={scene.descriptor.navigation}>
|
|
63
|
+
<NavigationRouteContext.Provider value={scene.route}>
|
|
64
|
+
<View pointerEvents="auto" style={styles.header}>
|
|
65
|
+
<HeaderComponent {...headerProps} />
|
|
66
|
+
</View>
|
|
67
|
+
</NavigationRouteContext.Provider>
|
|
68
|
+
</NavigationContext.Provider>
|
|
69
|
+
</Animated.View>
|
|
70
|
+
);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
const FloatHeader = () => {
|
|
74
|
+
const { scenes, focusedIndex } = useStackNavigationContext();
|
|
75
|
+
|
|
76
|
+
const activeHeader = useMemo(
|
|
77
|
+
() => getActiveFloatHeader(scenes, focusedIndex),
|
|
78
|
+
[scenes, focusedIndex]
|
|
79
|
+
);
|
|
80
|
+
|
|
81
|
+
if (!activeHeader) {
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
const { scene, headerIndex } = activeHeader;
|
|
86
|
+
|
|
87
|
+
const previous = scenes[headerIndex - 1]?.descriptor;
|
|
88
|
+
const current = scene.descriptor;
|
|
89
|
+
const next = scenes[headerIndex + 1]?.descriptor;
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
//@ts-expect-error
|
|
93
|
+
<KeysProvider current={current} previous={previous} next={next}>
|
|
94
|
+
<HeaderHost scene={scene} focusedIndex={focusedIndex} isFloating />
|
|
95
|
+
</KeysProvider>
|
|
96
|
+
);
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const ScreenHeader = () => {
|
|
100
|
+
const { focusedIndex } = useStackNavigationContext();
|
|
101
|
+
const { current } = useKeys();
|
|
102
|
+
|
|
103
|
+
const options = current.options;
|
|
104
|
+
|
|
105
|
+
// @ts-expect-error
|
|
106
|
+
if (!options.headerShown || options.headerMode !== "screen") {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
const scene: BlankStackScene = {
|
|
111
|
+
//@ts-expect-error
|
|
112
|
+
descriptor: current,
|
|
113
|
+
route: current.route,
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
return <HeaderHost scene={scene} focusedIndex={focusedIndex} />;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
export const Header = {
|
|
120
|
+
Float: FloatHeader,
|
|
121
|
+
Screen: ScreenHeader,
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const styles = StyleSheet.create({
|
|
125
|
+
header: {
|
|
126
|
+
position: "absolute",
|
|
127
|
+
top: 0,
|
|
128
|
+
start: 0,
|
|
129
|
+
end: 0,
|
|
130
|
+
},
|
|
131
|
+
container: {
|
|
132
|
+
flex: 1,
|
|
133
|
+
},
|
|
134
|
+
absolute: {
|
|
135
|
+
position: "absolute",
|
|
136
|
+
top: 0,
|
|
137
|
+
start: 0,
|
|
138
|
+
end: 0,
|
|
139
|
+
},
|
|
140
|
+
floating: {
|
|
141
|
+
zIndex: 1000,
|
|
142
|
+
},
|
|
143
|
+
});
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import type { NavigationRoute, ParamListBase } from "@react-navigation/native";
|
|
2
|
+
import type * as React from "react";
|
|
3
|
+
import { StyleSheet } from "react-native";
|
|
4
|
+
import Animated, {
|
|
5
|
+
interpolate,
|
|
6
|
+
useAnimatedProps,
|
|
7
|
+
useDerivedValue,
|
|
8
|
+
useSharedValue,
|
|
9
|
+
} from "react-native-reanimated";
|
|
10
|
+
import { Screen as RNSScreen } from "react-native-screens";
|
|
11
|
+
import { Animations } from "../../../stores/animations";
|
|
12
|
+
|
|
13
|
+
interface ScreenProps {
|
|
14
|
+
routeKey: string;
|
|
15
|
+
index: number;
|
|
16
|
+
routes: NavigationRoute<ParamListBase, string>[];
|
|
17
|
+
isPreloaded: boolean;
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
freezeOnBlur?: boolean;
|
|
20
|
+
shouldFreeze?: boolean;
|
|
21
|
+
activeScreensLimit: number;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const EPSILON = 1e-5;
|
|
25
|
+
|
|
26
|
+
const STATE_INACTIVE = 0;
|
|
27
|
+
const STATE_TRANSITIONING_OR_BELOW_TOP = 1;
|
|
28
|
+
const STATE_ON_TOP = 2;
|
|
29
|
+
|
|
30
|
+
const AnimatedScreen = Animated.createAnimatedComponent(RNSScreen);
|
|
31
|
+
|
|
32
|
+
export const Screen = ({
|
|
33
|
+
routeKey,
|
|
34
|
+
index,
|
|
35
|
+
routes,
|
|
36
|
+
isPreloaded,
|
|
37
|
+
activeScreensLimit,
|
|
38
|
+
children,
|
|
39
|
+
freezeOnBlur,
|
|
40
|
+
shouldFreeze,
|
|
41
|
+
}: ScreenProps) => {
|
|
42
|
+
const sceneProgress = Animations.getAnimation(routeKey, "progress");
|
|
43
|
+
const screenActivity = useSharedValue<0 | 1 | 2>(1);
|
|
44
|
+
|
|
45
|
+
useDerivedValue(() => {
|
|
46
|
+
if (!sceneProgress) {
|
|
47
|
+
screenActivity.value = STATE_TRANSITIONING_OR_BELOW_TOP;
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (index < routes.length - activeScreensLimit - 1 || isPreloaded) {
|
|
52
|
+
screenActivity.value = STATE_INACTIVE;
|
|
53
|
+
} else {
|
|
54
|
+
const outputValue =
|
|
55
|
+
index === routes.length - 1
|
|
56
|
+
? STATE_ON_TOP
|
|
57
|
+
: index >= routes.length - activeScreensLimit
|
|
58
|
+
? STATE_TRANSITIONING_OR_BELOW_TOP
|
|
59
|
+
: STATE_INACTIVE;
|
|
60
|
+
|
|
61
|
+
const v = interpolate(
|
|
62
|
+
sceneProgress.value,
|
|
63
|
+
[0, 1 - EPSILON, 1],
|
|
64
|
+
[1, 1, outputValue],
|
|
65
|
+
"clamp",
|
|
66
|
+
);
|
|
67
|
+
|
|
68
|
+
const next =
|
|
69
|
+
(Math.trunc(v) as 0 | 1 | 2) ?? STATE_TRANSITIONING_OR_BELOW_TOP;
|
|
70
|
+
|
|
71
|
+
// avoid spamming JS thread
|
|
72
|
+
if (next !== screenActivity.value) {
|
|
73
|
+
screenActivity.value = next;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
|
|
78
|
+
const animatedProps = useAnimatedProps(() => {
|
|
79
|
+
return {
|
|
80
|
+
activityState: screenActivity.value,
|
|
81
|
+
shouldFreeze: screenActivity.value === STATE_INACTIVE && shouldFreeze,
|
|
82
|
+
};
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
return (
|
|
86
|
+
<AnimatedScreen
|
|
87
|
+
enabled
|
|
88
|
+
style={StyleSheet.absoluteFill}
|
|
89
|
+
pointerEvents="box-none"
|
|
90
|
+
freezeOnBlur={freezeOnBlur}
|
|
91
|
+
animatedProps={animatedProps}
|
|
92
|
+
>
|
|
93
|
+
{children}
|
|
94
|
+
</AnimatedScreen>
|
|
95
|
+
);
|
|
96
|
+
};
|