@momo-kits/foundation 0.163.1-beta.6 → 0.163.1-beta.8

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.
@@ -17,16 +17,7 @@ import type {
17
17
  import type { NavigationState, PartialState } from '@react-navigation/native';
18
18
  import type { HeaderTitleProps, NavigationOptions } from './types';
19
19
  import { Colors, Spacing } from '../Consts';
20
- import {
21
- Animated,
22
- AppState,
23
- NativeModules,
24
- Platform,
25
- StyleProp,
26
- StyleSheet,
27
- ViewStyle,
28
- } from 'react-native';
29
- import { BlurView } from '@sbaiahmed1/react-native-blur';
20
+ import { Animated, AppState, NativeModules, Platform } from 'react-native';
30
21
  import type { SharedValue } from 'react-native-reanimated';
31
22
  import { useSharedValue } from 'react-native-reanimated';
32
23
  import {
@@ -42,42 +33,27 @@ import { HeaderRight } from './Components/HeaderRight';
42
33
  const forStackTransitionWithOverlay = (
43
34
  props: StackCardInterpolationProps,
44
35
  ): StackCardInterpolatedStyle => {
45
- const { cardStyle, shadowStyle } =
46
- CardStyleInterpolators.forHorizontalIOS(props);
47
-
36
+ const { cardStyle } = CardStyleInterpolators.forHorizontalIOS(props);
48
37
  return {
49
38
  cardStyle,
50
- shadowStyle,
39
+ shadowStyle: {
40
+ shadowOpacity: props.current.progress.interpolate({
41
+ inputRange: [0, 1],
42
+ outputRange: [0, 0.3],
43
+ extrapolate: 'clamp',
44
+ }),
45
+ },
51
46
  overlayStyle: {
47
+ backgroundColor: '#FDEAF4',
52
48
  opacity: props.current.progress.interpolate({
53
49
  inputRange: [0, 1],
54
- outputRange: [0, 1],
50
+ outputRange: [0, 0.6],
55
51
  extrapolate: 'clamp',
56
52
  }),
57
53
  },
58
54
  };
59
55
  };
60
56
 
61
- /**
62
- * blur intensity stays fixed so only the wrapper's opacity animates per
63
- * frame; animating blurAmount itself would re-render the native blur view
64
- * on every frame of the transition
65
- */
66
- const renderStackOverlay = ({
67
- style,
68
- }: {
69
- style: Animated.WithAnimatedValue<StyleProp<ViewStyle>>;
70
- }) => (
71
- <Animated.View pointerEvents="none" style={[StyleSheet.absoluteFill, style]}>
72
- <BlurView
73
- style={StyleSheet.absoluteFill}
74
- blurType="xlight"
75
- blurAmount={2}
76
- overlayColor="rgba(253, 234, 244, 0.3)"
77
- />
78
- </Animated.View>
79
- );
80
-
81
57
  /**
82
58
  * default options for stack screen
83
59
  */
@@ -102,7 +78,6 @@ const getStackOptions = (): StackNavigationOptions => {
102
78
  ...TransitionPresets.SlideFromRightIOS,
103
79
  cardStyleInterpolator: forStackTransitionWithOverlay,
104
80
  cardOverlayEnabled: true,
105
- cardOverlay: renderStackOverlay,
106
81
  };
107
82
  };
108
83
 
@@ -126,10 +101,7 @@ const getModalOptions = (): StackNavigationOptions => {
126
101
  * so swipe back must not bypass it
127
102
  */
128
103
  const hasCustomBackHandling = (params: NavigationOptions) =>
129
- params.preventBack !== undefined ||
130
- params.hiddenBack === true ||
131
- typeof params.onBackHandler === 'function' ||
132
- typeof params.onPressLeftHeader === 'function';
104
+ params.preventBack !== undefined || params.hiddenBack === true;
133
105
 
134
106
  /**
135
107
  * build react-navigation options
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/foundation",
3
- "version": "0.163.1-beta.6",
3
+ "version": "0.163.1-beta.8",
4
4
  "description": "React Native Component Kits",
5
5
  "main": "index.ts",
6
6
  "scripts": {},
@@ -9,7 +9,6 @@
9
9
  ],
10
10
  "dependencies": {
11
11
  "react-native-fast-image": "git+https://oauth2:TGi6oBj-LdzsKpLXQSoH@gitlab.mservice.com.vn/momo-platform/public/react-native-fast-image.git#v8.11.0",
12
- "@sbaiahmed1/react-native-blur": "6.0.0",
13
12
  "@react-navigation/bottom-tabs": "7.4.2",
14
13
  "@react-navigation/core": "7.12.1",
15
14
  "@react-navigation/elements": "2.5.2",