react-native-screens 3.20.0 → 3.21.1
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/README.md +4 -1
- package/RNScreens.podspec +1 -1
- package/android/build.gradle +24 -6
- package/android/src/main/java/com/swmansion/rnscreens/CustomSearchView.kt +4 -0
- package/android/src/main/java/com/swmansion/rnscreens/LifecycleHelper.kt +60 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt +7 -9
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt +12 -4
- package/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt +10 -0
- package/android/src/main/java/com/swmansion/rnscreens/SearchBarManager.kt +32 -8
- package/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt +36 -15
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderAttachedEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/HeaderDetachedEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarBlurEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarChangeTextEvent.kt +29 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarCloseEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarFocusEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarOpenEvent.kt +24 -0
- package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarSearchButtonPressEvent.kt +26 -0
- package/android/src/main/res/base/anim/rns_standard_accelerate_interpolator.xml +6 -0
- package/android/src/main/res/v33/anim-v33/rns_default_enter_in.xml +38 -0
- package/android/src/main/res/v33/anim-v33/rns_default_enter_out.xml +38 -0
- package/android/src/main/res/v33/anim-v33/rns_default_exit_in.xml +38 -0
- package/android/src/main/res/v33/anim-v33/rns_default_exit_out.xml +38 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerDelegate.java +15 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerInterface.java +5 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerDelegate.java +3 -0
- package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerInterface.java +1 -0
- package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h +1 -2
- package/ios/RCTImageComponentView+RNSScreenStackHeaderConfig.h +11 -0
- package/ios/RCTImageComponentView+RNSScreenStackHeaderConfig.mm +14 -0
- package/ios/RNSConvert.h +8 -2
- package/ios/RNSConvert.mm +28 -2
- package/ios/RNSEnums.h +6 -0
- package/ios/RNSFullWindowOverlay.h +5 -5
- package/ios/RNSFullWindowOverlay.mm +13 -13
- package/ios/RNSScreen.h +14 -6
- package/ios/RNSScreen.mm +129 -28
- package/ios/RNSScreenContainer.h +2 -2
- package/ios/RNSScreenContainer.mm +5 -5
- package/ios/RNSScreenNavigationContainer.mm +3 -3
- package/ios/RNSScreenStack.h +4 -4
- package/ios/RNSScreenStack.mm +62 -23
- package/ios/RNSScreenStackHeaderConfig.h +10 -3
- package/ios/RNSScreenStackHeaderConfig.mm +138 -81
- package/ios/RNSScreenStackHeaderSubview.h +5 -6
- package/ios/RNSScreenStackHeaderSubview.mm +20 -11
- package/ios/RNSScreenWindowTraits.mm +21 -2
- package/ios/RNSSearchBar.h +5 -4
- package/ios/RNSSearchBar.mm +87 -12
- package/lib/commonjs/TransitionProgressContext.js.map +1 -1
- package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js +0 -5
- package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenContainerNativeComponent.js +0 -5
- package/lib/commonjs/fabric/ScreenContainerNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenNativeComponent.js +0 -5
- package/lib/commonjs/fabric/ScreenNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js +0 -5
- package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -8
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -8
- package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackNativeComponent.js +0 -5
- package/lib/commonjs/fabric/ScreenStackNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/SearchBarNativeComponent.js +7 -7
- package/lib/commonjs/fabric/SearchBarNativeComponent.js.map +1 -1
- package/lib/commonjs/index.js +8 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/index.native.js +51 -10
- package/lib/commonjs/index.native.js.map +1 -1
- package/lib/commonjs/native-stack/index.js.map +1 -1
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +18 -16
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/commonjs/native-stack/types.js.map +1 -1
- package/lib/commonjs/native-stack/utils/HeaderHeightContext.js.map +1 -1
- package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
- package/lib/commonjs/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
- package/lib/commonjs/native-stack/utils/useBackPressSubscription.js.map +1 -1
- package/lib/commonjs/native-stack/utils/useHeaderHeight.js.map +1 -1
- package/lib/commonjs/native-stack/views/FontProcessor.js +1 -0
- package/lib/commonjs/native-stack/views/FontProcessor.js.map +1 -1
- package/lib/commonjs/native-stack/views/HeaderConfig.js +3 -1
- package/lib/commonjs/native-stack/views/HeaderConfig.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.js +14 -1
- package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedScreen.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
- package/lib/commonjs/reanimated/index.js.map +1 -1
- package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map +1 -1
- package/lib/commonjs/types.js.map +1 -1
- package/lib/commonjs/useTransitionProgress.js.map +1 -1
- package/lib/commonjs/utils.js +8 -1
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/fabric/FullWindowOverlayNativeComponent.js +0 -5
- package/lib/module/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenContainerNativeComponent.js +0 -5
- package/lib/module/fabric/ScreenContainerNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenNativeComponent.js +0 -5
- package/lib/module/fabric/ScreenNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js +0 -5
- package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -6
- package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -6
- package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackNativeComponent.js +0 -5
- package/lib/module/fabric/ScreenStackNativeComponent.js.map +1 -1
- package/lib/module/fabric/SearchBarNativeComponent.js +4 -6
- package/lib/module/fabric/SearchBarNativeComponent.js.map +1 -1
- package/lib/module/index.js +2 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/index.native.js +53 -11
- package/lib/module/index.native.js.map +1 -1
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js +18 -16
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/module/native-stack/types.js.map +1 -1
- package/lib/module/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
- package/lib/module/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
- package/lib/module/native-stack/utils/useBackPressSubscription.js.map +1 -1
- package/lib/module/native-stack/utils/useHeaderHeight.js.map +1 -1
- package/lib/module/native-stack/views/FontProcessor.js +1 -0
- package/lib/module/native-stack/views/FontProcessor.js.map +1 -1
- package/lib/module/native-stack/views/HeaderConfig.js +3 -1
- package/lib/module/native-stack/views/HeaderConfig.js.map +1 -1
- package/lib/module/native-stack/views/NativeStackView.js +15 -1
- package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
- package/lib/module/reanimated/ReanimatedScreen.js.map +1 -1
- package/lib/module/reanimated/ReanimatedScreenProvider.js.map +1 -1
- package/lib/module/reanimated/useReanimatedTransitionProgress.js.map +1 -1
- package/lib/module/types.js.map +1 -1
- package/lib/module/useTransitionProgress.js.map +1 -1
- package/lib/module/utils.js +6 -0
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/TransitionProgressContext.d.ts +1 -1
- package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts +6 -0
- package/lib/typescript/fabric/ScreenContainerNativeComponent.d.ts +6 -0
- package/lib/typescript/fabric/ScreenNativeComponent.d.ts +62 -0
- package/lib/typescript/fabric/ScreenNavigationContainerNativeComponent.d.ts +6 -0
- package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts +34 -0
- package/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts +9 -0
- package/lib/typescript/fabric/ScreenStackNativeComponent.d.ts +9 -0
- package/lib/typescript/fabric/SearchBarNativeComponent.d.ts +46 -0
- package/lib/typescript/index.d.ts +3 -3
- package/lib/typescript/native-stack/types.d.ts +64 -10
- package/lib/typescript/native-stack/utils/SafeAreaProviderCompat.d.ts +1 -1
- package/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts +1 -1
- package/lib/typescript/native-stack/views/HeaderConfig.d.ts +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.d.ts +1 -1
- package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts +1 -1
- package/lib/typescript/reanimated/ReanimatedScreen.d.ts +1 -1
- package/lib/typescript/reanimated/ReanimatedTransitionProgressContext.d.ts +1 -1
- package/lib/typescript/types.d.ts +90 -11
- package/lib/typescript/useTransitionProgress.d.ts +3 -3
- package/lib/typescript/utils.d.ts +1 -0
- package/native-stack/README.md +59 -1
- package/package.json +11 -14
- package/src/fabric/FullWindowOverlayNativeComponent.ts +6 -0
- package/src/fabric/ScreenContainerNativeComponent.ts +6 -0
- package/src/fabric/ScreenNativeComponent.ts +97 -0
- package/src/fabric/ScreenNavigationContainerNativeComponent.ts +9 -0
- package/src/fabric/ScreenStackHeaderConfigNativeComponent.ts +43 -0
- package/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts +20 -0
- package/src/fabric/ScreenStackNativeComponent.ts +12 -0
- package/src/fabric/SearchBarNativeComponent.ts +73 -0
- package/src/index.native.tsx +109 -14
- package/src/index.tsx +5 -3
- package/src/native-stack/navigators/createNativeStackNavigator.tsx +23 -19
- package/src/native-stack/types.tsx +55 -0
- package/src/native-stack/views/FontProcessor.tsx +1 -0
- package/src/native-stack/views/HeaderConfig.tsx +3 -1
- package/src/native-stack/views/NativeStackView.tsx +14 -2
- package/src/types.tsx +84 -2
- package/src/utils.ts +6 -0
- package/createNativeStackNavigator/README.md +0 -522
- package/createNativeStackNavigator/package.json +0 -6
- package/lib/commonjs/createNativeStackNavigator.js +0 -374
- package/lib/commonjs/createNativeStackNavigator.js.map +0 -1
- package/lib/module/createNativeStackNavigator.js +0 -366
- package/lib/module/createNativeStackNavigator.js.map +0 -1
- package/lib/typescript/createNativeStackNavigator.d.ts +0 -51
- package/src/createNativeStackNavigator.tsx +0 -594
- package/src/fabric/FullWindowOverlayNativeComponent.js +0 -19
- package/src/fabric/ScreenContainerNativeComponent.js +0 -19
- package/src/fabric/ScreenNativeComponent.js +0 -97
- package/src/fabric/ScreenNavigationContainerNativeComponent.js +0 -19
- package/src/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -54
- package/src/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -31
- package/src/fabric/ScreenStackNativeComponent.js +0 -23
- package/src/fabric/SearchBarNativeComponent.js +0 -62
- /package/android/src/main/res/{anim → base/anim}/rns_default_enter_in.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_default_enter_out.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_default_exit_in.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_default_exit_out.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_fade_from_bottom.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_fade_in.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_fade_out.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_fade_to_bottom.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_no_animation_20.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_no_animation_250.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_no_animation_350.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_no_animation_medium.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_slide_in_from_bottom.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_slide_in_from_left.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_slide_in_from_right.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_slide_out_to_bottom.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_slide_out_to_left.xml +0 -0
- /package/android/src/main/res/{anim → base/anim}/rns_slide_out_to_right.xml +0 -0
|
@@ -1,594 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Platform,
|
|
4
|
-
StyleSheet,
|
|
5
|
-
Animated,
|
|
6
|
-
StyleProp,
|
|
7
|
-
TextStyle,
|
|
8
|
-
ViewStyle,
|
|
9
|
-
} from 'react-native';
|
|
10
|
-
import {
|
|
11
|
-
ScreenContext,
|
|
12
|
-
ScreenStack,
|
|
13
|
-
ScreenStackHeaderBackButtonImage,
|
|
14
|
-
ScreenStackHeaderCenterView,
|
|
15
|
-
ScreenStackHeaderConfig,
|
|
16
|
-
ScreenStackHeaderConfigProps,
|
|
17
|
-
ScreenStackHeaderLeftView,
|
|
18
|
-
ScreenStackHeaderRightView,
|
|
19
|
-
ScreenStackHeaderSearchBarView,
|
|
20
|
-
SearchBar,
|
|
21
|
-
StackPresentationTypes,
|
|
22
|
-
} from 'react-native-screens';
|
|
23
|
-
import {
|
|
24
|
-
createNavigator,
|
|
25
|
-
SceneView,
|
|
26
|
-
StackActions,
|
|
27
|
-
StackRouter,
|
|
28
|
-
NavigationRouteConfigMap,
|
|
29
|
-
CreateNavigatorConfig,
|
|
30
|
-
NavigationStackRouterConfig,
|
|
31
|
-
NavigationParams,
|
|
32
|
-
NavigationRoute,
|
|
33
|
-
NavigationDescriptor,
|
|
34
|
-
NavigationState,
|
|
35
|
-
NavigationNavigator,
|
|
36
|
-
NavigationAction,
|
|
37
|
-
NavigationProp,
|
|
38
|
-
NavigationScreenProp,
|
|
39
|
-
} from 'react-navigation';
|
|
40
|
-
import { NativeStackNavigationOptions as NativeStackNavigationOptionsV5 } from './native-stack/types';
|
|
41
|
-
import { HeaderBackButton } from 'react-navigation-stack';
|
|
42
|
-
import {
|
|
43
|
-
StackNavigationHelpers,
|
|
44
|
-
StackNavigationProp,
|
|
45
|
-
Layout,
|
|
46
|
-
} from 'react-navigation-stack/src/vendor/types';
|
|
47
|
-
|
|
48
|
-
const REMOVE_ACTION = 'NativeStackNavigator/REMOVE';
|
|
49
|
-
|
|
50
|
-
const isAndroid = Platform.OS === 'android';
|
|
51
|
-
|
|
52
|
-
let didWarn = isAndroid;
|
|
53
|
-
|
|
54
|
-
function renderComponentOrThunk(componentOrThunk: unknown, props: unknown) {
|
|
55
|
-
if (typeof componentOrThunk === 'function') {
|
|
56
|
-
return componentOrThunk(props);
|
|
57
|
-
}
|
|
58
|
-
return componentOrThunk;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
type NativeStackRemoveNavigationAction = {
|
|
62
|
-
type: typeof REMOVE_ACTION;
|
|
63
|
-
immediate: boolean;
|
|
64
|
-
dismissCount: number;
|
|
65
|
-
key?: string;
|
|
66
|
-
};
|
|
67
|
-
|
|
68
|
-
export type NativeStackNavigationProp = StackNavigationProp;
|
|
69
|
-
|
|
70
|
-
export type NativeStackNavigationOptions = StackNavigatorOptions &
|
|
71
|
-
NativeStackNavigationOptionsV5 &
|
|
72
|
-
BackButtonProps & {
|
|
73
|
-
onWillAppear?: () => void;
|
|
74
|
-
onAppear?: () => void;
|
|
75
|
-
onWillDisappear?: () => void;
|
|
76
|
-
onDisappear?: () => void;
|
|
77
|
-
// these props differ from the ones used in v5 `native-stack`, and we would like to keep the API consistent between versions
|
|
78
|
-
/** Use `headerHideShadow` to be consistent with v5 `native-stack` */
|
|
79
|
-
hideShadow?: boolean;
|
|
80
|
-
/** Use `headerLargeTitle` to be consistent with v5 `native-stack` */
|
|
81
|
-
largeTitle?: boolean;
|
|
82
|
-
/** Use `headerLargeTitleHideShadow` to be consistent with v5 `native-stack` */
|
|
83
|
-
largeTitleHideShadow?: boolean;
|
|
84
|
-
/** Use `headerTranslucent` to be consistent with v5 `native-stack` */
|
|
85
|
-
translucent?: boolean;
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
// these are adopted from `stack` navigator
|
|
89
|
-
type StackNavigatorOptions = {
|
|
90
|
-
/** This is an option from `stackNavigator` and it hides the header when set to `null`. Use `headerShown` instead to be consistent with v5 `native-stack`. */
|
|
91
|
-
header?: React.ComponentType<Record<string, unknown>> | null;
|
|
92
|
-
/** This is an option from `stackNavigator` and it controls the stack presentation along with `mode` prop. Use `stackPresentation` instead to be consistent with v5 `native-stack` */
|
|
93
|
-
cardTransparent?: boolean;
|
|
94
|
-
/** This is an option from `stackNavigator` and it sets stack animation to none when `false` passed. Use `stackAnimation: 'none'` instead to be consistent with v5 `native-stack` */
|
|
95
|
-
animationEnabled?: boolean;
|
|
96
|
-
cardStyle?: StyleProp<ViewStyle>;
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
// these are the props used for rendering back button taken from `react-navigation-stack`
|
|
100
|
-
type BackButtonProps = {
|
|
101
|
-
headerBackImage?: (props: { tintColor: string }) => React.ReactNode;
|
|
102
|
-
headerPressColorAndroid?: string;
|
|
103
|
-
headerTintColor?: string;
|
|
104
|
-
backButtonTitle?: string;
|
|
105
|
-
truncatedBackButtonTitle?: string;
|
|
106
|
-
backTitleVisible?: boolean;
|
|
107
|
-
headerBackTitleStyle?: Animated.WithAnimatedValue<StyleProp<TextStyle>>;
|
|
108
|
-
layoutPreset?: Layout;
|
|
109
|
-
};
|
|
110
|
-
|
|
111
|
-
type NativeStackDescriptor = NavigationDescriptor<
|
|
112
|
-
NavigationParams,
|
|
113
|
-
NativeStackNavigationOptions
|
|
114
|
-
>;
|
|
115
|
-
|
|
116
|
-
type NativeStackDescriptorMap = {
|
|
117
|
-
[key: string]: NativeStackDescriptor;
|
|
118
|
-
};
|
|
119
|
-
|
|
120
|
-
// these are the props used for rendering back button taken from `react-navigation-stack`
|
|
121
|
-
type NativeStackNavigationConfig = {
|
|
122
|
-
/** This is an option from `stackNavigator` and controls the stack presentation along with `cardTransparent` prop. Use `stackPresentation` instead to be consistent with v5 `native-stack` */
|
|
123
|
-
mode?: 'modal' | 'containedModal';
|
|
124
|
-
/** This is an option from `stackNavigator` and makes the header hide when set to `none`. Use `headerShown` instead to be consistent with v5 `native-stack` */
|
|
125
|
-
headerMode?: 'none';
|
|
126
|
-
/** This is an option from `stackNavigator` and controls the stack presentation along with `mode` prop. Use `stackPresentation` instead to be consistent with v5 `native-stack` */
|
|
127
|
-
transparentCard?: boolean;
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
function removeScene(
|
|
131
|
-
route: NavigationRoute<NavigationParams>,
|
|
132
|
-
dismissCount: number,
|
|
133
|
-
navigation: StackNavigationHelpers
|
|
134
|
-
) {
|
|
135
|
-
navigation.dispatch({
|
|
136
|
-
// @ts-ignore special navigation action for native stack
|
|
137
|
-
type: REMOVE_ACTION,
|
|
138
|
-
immediate: true,
|
|
139
|
-
key: route.key,
|
|
140
|
-
dismissCount,
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
function onAppear(
|
|
145
|
-
route: NavigationRoute<NavigationParams>,
|
|
146
|
-
descriptor: NativeStackDescriptor,
|
|
147
|
-
navigation: StackNavigationHelpers
|
|
148
|
-
) {
|
|
149
|
-
descriptor.options?.onAppear?.();
|
|
150
|
-
navigation.dispatch(
|
|
151
|
-
StackActions.completeTransition({
|
|
152
|
-
toChildKey: route.key,
|
|
153
|
-
key: navigation.state.key,
|
|
154
|
-
})
|
|
155
|
-
);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function onFinishTransitioning(navigation: StackNavigationHelpers) {
|
|
159
|
-
const { routes } = navigation.state;
|
|
160
|
-
const lastRoute = routes?.length && routes[routes.length - 1];
|
|
161
|
-
|
|
162
|
-
if (lastRoute) {
|
|
163
|
-
navigation.dispatch(
|
|
164
|
-
StackActions.completeTransition({
|
|
165
|
-
toChildKey: lastRoute.key,
|
|
166
|
-
key: navigation.state.key,
|
|
167
|
-
})
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
function renderHeaderConfig(
|
|
173
|
-
index: number,
|
|
174
|
-
route: NavigationRoute<NavigationParams>,
|
|
175
|
-
descriptor: NativeStackDescriptor,
|
|
176
|
-
navigationConfig: NativeStackNavigationConfig
|
|
177
|
-
) {
|
|
178
|
-
const { options } = descriptor;
|
|
179
|
-
const { headerMode } = navigationConfig;
|
|
180
|
-
|
|
181
|
-
const {
|
|
182
|
-
backButtonInCustomView,
|
|
183
|
-
direction,
|
|
184
|
-
disableBackButtonMenu,
|
|
185
|
-
headerBackTitle,
|
|
186
|
-
headerBackTitleStyle,
|
|
187
|
-
headerBackTitleVisible,
|
|
188
|
-
headerHideBackButton,
|
|
189
|
-
headerHideShadow,
|
|
190
|
-
headerLargeStyle,
|
|
191
|
-
headerLargeTitle,
|
|
192
|
-
headerLargeTitleHideShadow,
|
|
193
|
-
headerLargeTitleStyle,
|
|
194
|
-
headerShown,
|
|
195
|
-
headerStyle,
|
|
196
|
-
headerTintColor,
|
|
197
|
-
headerTitleStyle,
|
|
198
|
-
headerTopInsetEnabled = true,
|
|
199
|
-
headerTranslucent,
|
|
200
|
-
hideShadow,
|
|
201
|
-
largeTitle,
|
|
202
|
-
largeTitleHideShadow,
|
|
203
|
-
title,
|
|
204
|
-
translucent,
|
|
205
|
-
} = options;
|
|
206
|
-
|
|
207
|
-
const scene = {
|
|
208
|
-
index,
|
|
209
|
-
key: route.key,
|
|
210
|
-
route,
|
|
211
|
-
descriptor,
|
|
212
|
-
};
|
|
213
|
-
|
|
214
|
-
const headerOptions: ScreenStackHeaderConfigProps = {
|
|
215
|
-
backButtonInCustomView,
|
|
216
|
-
backTitle: headerBackTitleVisible === false ? '' : headerBackTitle,
|
|
217
|
-
backTitleFontFamily: headerBackTitleStyle?.fontFamily,
|
|
218
|
-
backTitleFontSize: headerBackTitleStyle?.fontSize,
|
|
219
|
-
color: headerTintColor,
|
|
220
|
-
direction,
|
|
221
|
-
disableBackButtonMenu,
|
|
222
|
-
topInsetEnabled: headerTopInsetEnabled,
|
|
223
|
-
hideBackButton: headerHideBackButton,
|
|
224
|
-
hideShadow: headerHideShadow || hideShadow,
|
|
225
|
-
largeTitle: headerLargeTitle || largeTitle,
|
|
226
|
-
largeTitleBackgroundColor:
|
|
227
|
-
headerLargeStyle?.backgroundColor ||
|
|
228
|
-
// @ts-ignore old implementation, will not be present in TS API, but can be used here
|
|
229
|
-
headerLargeTitleStyle?.backgroundColor,
|
|
230
|
-
largeTitleColor: headerLargeTitleStyle?.color,
|
|
231
|
-
largeTitleFontFamily: headerLargeTitleStyle?.fontFamily,
|
|
232
|
-
largeTitleFontSize: headerLargeTitleStyle?.fontSize,
|
|
233
|
-
largeTitleFontWeight: headerLargeTitleStyle?.fontWeight,
|
|
234
|
-
largeTitleHideShadow: largeTitleHideShadow || headerLargeTitleHideShadow,
|
|
235
|
-
title,
|
|
236
|
-
titleColor: headerTitleStyle?.color || headerTintColor,
|
|
237
|
-
titleFontFamily: headerTitleStyle?.fontFamily,
|
|
238
|
-
titleFontSize: headerTitleStyle?.fontSize,
|
|
239
|
-
titleFontWeight: headerTitleStyle?.fontWeight,
|
|
240
|
-
translucent: headerTranslucent || translucent || false,
|
|
241
|
-
};
|
|
242
|
-
|
|
243
|
-
const hasHeader =
|
|
244
|
-
headerShown !== false && headerMode !== 'none' && options.header !== null;
|
|
245
|
-
if (!hasHeader) {
|
|
246
|
-
return <ScreenStackHeaderConfig {...headerOptions} hidden />;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
if (headerStyle !== undefined) {
|
|
250
|
-
headerOptions.backgroundColor = headerStyle.backgroundColor;
|
|
251
|
-
headerOptions.blurEffect = headerStyle.blurEffect;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
const children = [];
|
|
255
|
-
|
|
256
|
-
if (options.backButtonImage) {
|
|
257
|
-
children.push(
|
|
258
|
-
<ScreenStackHeaderBackButtonImage
|
|
259
|
-
key="backImage"
|
|
260
|
-
source={options.backButtonImage}
|
|
261
|
-
/>
|
|
262
|
-
);
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
if (Platform.OS === 'ios' && options.searchBar) {
|
|
266
|
-
children.push(
|
|
267
|
-
<ScreenStackHeaderSearchBarView>
|
|
268
|
-
<SearchBar {...options.searchBar} />
|
|
269
|
-
</ScreenStackHeaderSearchBarView>
|
|
270
|
-
);
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
if (options.headerLeft !== undefined) {
|
|
274
|
-
children.push(
|
|
275
|
-
<ScreenStackHeaderLeftView key="left">
|
|
276
|
-
{renderComponentOrThunk(options.headerLeft, { scene })}
|
|
277
|
-
</ScreenStackHeaderLeftView>
|
|
278
|
-
);
|
|
279
|
-
} else if (options.headerBackImage !== undefined) {
|
|
280
|
-
const goBack = () => {
|
|
281
|
-
// Go back on next tick because button ripple effect needs to happen on Android
|
|
282
|
-
requestAnimationFrame(() => {
|
|
283
|
-
descriptor.navigation.goBack(descriptor.key);
|
|
284
|
-
});
|
|
285
|
-
};
|
|
286
|
-
|
|
287
|
-
children.push(
|
|
288
|
-
<ScreenStackHeaderLeftView key="left">
|
|
289
|
-
<HeaderBackButton
|
|
290
|
-
onPress={goBack}
|
|
291
|
-
pressColorAndroid={options.headerPressColorAndroid}
|
|
292
|
-
tintColor={options.headerTintColor}
|
|
293
|
-
backImage={options.headerBackImage}
|
|
294
|
-
label={options.backButtonTitle}
|
|
295
|
-
truncatedLabel={options.truncatedBackButtonTitle}
|
|
296
|
-
labelVisible={options.backTitleVisible}
|
|
297
|
-
labelStyle={options.headerBackTitleStyle}
|
|
298
|
-
titleLayout={options.layoutPreset}
|
|
299
|
-
// @ts-ignore old props kept for very old version of `react-navigation-stack`
|
|
300
|
-
title={options.backButtonTitle}
|
|
301
|
-
truncatedTitle={options.truncatedBackButtonTitle}
|
|
302
|
-
backTitleVisible={options.backTitleVisible}
|
|
303
|
-
titleStyle={options.headerBackTitleStyle}
|
|
304
|
-
layoutPreset={options.layoutPreset}
|
|
305
|
-
scene={scene}
|
|
306
|
-
/>
|
|
307
|
-
</ScreenStackHeaderLeftView>
|
|
308
|
-
);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
if (options.headerTitle) {
|
|
312
|
-
if (title === undefined && typeof options.headerTitle === 'string') {
|
|
313
|
-
headerOptions.title = options.headerTitle;
|
|
314
|
-
} else {
|
|
315
|
-
children.push(
|
|
316
|
-
<ScreenStackHeaderCenterView key="center">
|
|
317
|
-
{renderComponentOrThunk(options.headerTitle, { scene })}
|
|
318
|
-
</ScreenStackHeaderCenterView>
|
|
319
|
-
);
|
|
320
|
-
}
|
|
321
|
-
}
|
|
322
|
-
|
|
323
|
-
if (options.headerRight) {
|
|
324
|
-
children.push(
|
|
325
|
-
<ScreenStackHeaderRightView key="right">
|
|
326
|
-
{renderComponentOrThunk(options.headerRight, { scene })}
|
|
327
|
-
</ScreenStackHeaderRightView>
|
|
328
|
-
);
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
if (children.length > 0) {
|
|
332
|
-
headerOptions.children = children;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
return <ScreenStackHeaderConfig {...headerOptions} />;
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
const MaybeNestedStack = ({
|
|
339
|
-
isHeaderInModal,
|
|
340
|
-
screenProps,
|
|
341
|
-
route,
|
|
342
|
-
navigation,
|
|
343
|
-
SceneComponent,
|
|
344
|
-
index,
|
|
345
|
-
descriptor,
|
|
346
|
-
navigationConfig,
|
|
347
|
-
}: {
|
|
348
|
-
isHeaderInModal: boolean;
|
|
349
|
-
screenProps: unknown;
|
|
350
|
-
route: NavigationRoute<NavigationParams>;
|
|
351
|
-
navigation: NavigationScreenProp<
|
|
352
|
-
NavigationRoute<NavigationParams>,
|
|
353
|
-
NavigationParams
|
|
354
|
-
>;
|
|
355
|
-
SceneComponent: React.ComponentType<Record<string, unknown>>;
|
|
356
|
-
index: number;
|
|
357
|
-
descriptor: NativeStackDescriptor;
|
|
358
|
-
navigationConfig: NativeStackNavigationConfig;
|
|
359
|
-
}) => {
|
|
360
|
-
const Screen = React.useContext(ScreenContext);
|
|
361
|
-
|
|
362
|
-
if (isHeaderInModal) {
|
|
363
|
-
return (
|
|
364
|
-
<ScreenStack style={styles.scenes}>
|
|
365
|
-
<Screen style={StyleSheet.absoluteFill} enabled isNativeStack>
|
|
366
|
-
{renderHeaderConfig(index, route, descriptor, navigationConfig)}
|
|
367
|
-
<SceneView
|
|
368
|
-
screenProps={screenProps}
|
|
369
|
-
navigation={navigation}
|
|
370
|
-
component={SceneComponent}
|
|
371
|
-
/>
|
|
372
|
-
</Screen>
|
|
373
|
-
</ScreenStack>
|
|
374
|
-
);
|
|
375
|
-
}
|
|
376
|
-
return (
|
|
377
|
-
<SceneView
|
|
378
|
-
screenProps={screenProps}
|
|
379
|
-
navigation={navigation}
|
|
380
|
-
component={SceneComponent}
|
|
381
|
-
/>
|
|
382
|
-
);
|
|
383
|
-
};
|
|
384
|
-
|
|
385
|
-
type StackViewProps = {
|
|
386
|
-
navigation: StackNavigationHelpers;
|
|
387
|
-
descriptors: NativeStackDescriptorMap;
|
|
388
|
-
navigationConfig: NativeStackNavigationConfig;
|
|
389
|
-
screenProps: unknown;
|
|
390
|
-
};
|
|
391
|
-
|
|
392
|
-
function StackView({
|
|
393
|
-
navigation,
|
|
394
|
-
descriptors,
|
|
395
|
-
navigationConfig,
|
|
396
|
-
screenProps,
|
|
397
|
-
}: StackViewProps) {
|
|
398
|
-
const { routes } = navigation.state;
|
|
399
|
-
const Screen = React.useContext(ScreenContext);
|
|
400
|
-
return (
|
|
401
|
-
<ScreenStack
|
|
402
|
-
style={styles.scenes}
|
|
403
|
-
onFinishTransitioning={() => onFinishTransitioning(navigation)}
|
|
404
|
-
>
|
|
405
|
-
{routes.map((route, index) => {
|
|
406
|
-
const descriptor = descriptors[route.key];
|
|
407
|
-
const { getComponent, options } = descriptor;
|
|
408
|
-
const routeNavigationProp = descriptor.navigation;
|
|
409
|
-
const { mode, transparentCard } = navigationConfig;
|
|
410
|
-
const SceneComponent = getComponent();
|
|
411
|
-
|
|
412
|
-
let stackPresentation: StackPresentationTypes = 'push';
|
|
413
|
-
|
|
414
|
-
if (options.stackPresentation) {
|
|
415
|
-
stackPresentation = options.stackPresentation;
|
|
416
|
-
} else {
|
|
417
|
-
// this shouldn't be used because we have a prop for that
|
|
418
|
-
if (mode === 'modal' || mode === 'containedModal') {
|
|
419
|
-
stackPresentation = mode;
|
|
420
|
-
if (transparentCard || options.cardTransparent) {
|
|
421
|
-
stackPresentation =
|
|
422
|
-
mode === 'containedModal'
|
|
423
|
-
? 'containedTransparentModal'
|
|
424
|
-
: 'transparentModal';
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
let stackAnimation = options.stackAnimation;
|
|
429
|
-
if (options.animationEnabled === false) {
|
|
430
|
-
stackAnimation = 'none';
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
const hasHeader =
|
|
434
|
-
options.headerShown !== false &&
|
|
435
|
-
navigationConfig?.headerMode !== 'none' &&
|
|
436
|
-
options.header !== null;
|
|
437
|
-
|
|
438
|
-
if (
|
|
439
|
-
!didWarn &&
|
|
440
|
-
stackPresentation !== 'push' &&
|
|
441
|
-
options.headerShown !== undefined
|
|
442
|
-
) {
|
|
443
|
-
didWarn = true;
|
|
444
|
-
console.warn(
|
|
445
|
-
'Be aware that changing the visibility of header in modal on iOS will result in resetting the state of the screen.'
|
|
446
|
-
);
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
const isHeaderInModal = isAndroid
|
|
450
|
-
? false
|
|
451
|
-
: stackPresentation !== 'push' &&
|
|
452
|
-
hasHeader &&
|
|
453
|
-
options.headerShown === true;
|
|
454
|
-
const isHeaderInPush = isAndroid
|
|
455
|
-
? hasHeader
|
|
456
|
-
: stackPresentation === 'push' && hasHeader;
|
|
457
|
-
|
|
458
|
-
return (
|
|
459
|
-
<Screen
|
|
460
|
-
key={`screen_${route.key}`}
|
|
461
|
-
enabled
|
|
462
|
-
isNativeStack
|
|
463
|
-
style={[StyleSheet.absoluteFill, options.cardStyle]}
|
|
464
|
-
stackAnimation={stackAnimation}
|
|
465
|
-
customAnimationOnSwipe={options.customAnimationOnSwipe}
|
|
466
|
-
stackPresentation={stackPresentation}
|
|
467
|
-
replaceAnimation={
|
|
468
|
-
options.replaceAnimation === undefined
|
|
469
|
-
? 'pop'
|
|
470
|
-
: options.replaceAnimation
|
|
471
|
-
}
|
|
472
|
-
pointerEvents={
|
|
473
|
-
index === navigation.state.routes.length - 1 ? 'auto' : 'none'
|
|
474
|
-
}
|
|
475
|
-
gestureEnabled={
|
|
476
|
-
Platform.OS === 'android'
|
|
477
|
-
? false
|
|
478
|
-
: options.gestureEnabled === undefined
|
|
479
|
-
? true
|
|
480
|
-
: options.gestureEnabled
|
|
481
|
-
}
|
|
482
|
-
nativeBackButtonDismissalEnabled={
|
|
483
|
-
options.nativeBackButtonDismissalEnabled
|
|
484
|
-
}
|
|
485
|
-
fullScreenSwipeEnabled={options.fullScreenSwipeEnabled}
|
|
486
|
-
screenOrientation={options.screenOrientation}
|
|
487
|
-
statusBarAnimation={options.statusBarAnimation}
|
|
488
|
-
statusBarColor={options.statusBarColor}
|
|
489
|
-
statusBarHidden={options.statusBarHidden}
|
|
490
|
-
statusBarStyle={options.statusBarStyle}
|
|
491
|
-
statusBarTranslucent={options.statusBarTranslucent}
|
|
492
|
-
onAppear={() => onAppear(route, descriptor, routeNavigationProp)}
|
|
493
|
-
onWillAppear={() => options?.onWillAppear?.()}
|
|
494
|
-
onWillDisappear={() => options?.onWillDisappear?.()}
|
|
495
|
-
onDisappear={() => options?.onDisappear?.()}
|
|
496
|
-
onHeaderBackButtonClicked={() =>
|
|
497
|
-
removeScene(route, 1, routeNavigationProp)
|
|
498
|
-
}
|
|
499
|
-
onDismissed={(e) =>
|
|
500
|
-
removeScene(
|
|
501
|
-
route,
|
|
502
|
-
e.nativeEvent.dismissCount,
|
|
503
|
-
routeNavigationProp
|
|
504
|
-
)
|
|
505
|
-
}
|
|
506
|
-
>
|
|
507
|
-
{isHeaderInPush &&
|
|
508
|
-
renderHeaderConfig(index, route, descriptor, navigationConfig)}
|
|
509
|
-
<MaybeNestedStack
|
|
510
|
-
isHeaderInModal={isHeaderInModal}
|
|
511
|
-
screenProps={screenProps}
|
|
512
|
-
route={route}
|
|
513
|
-
navigation={routeNavigationProp}
|
|
514
|
-
SceneComponent={SceneComponent}
|
|
515
|
-
index={index}
|
|
516
|
-
descriptor={descriptor}
|
|
517
|
-
navigationConfig={navigationConfig}
|
|
518
|
-
/>
|
|
519
|
-
</Screen>
|
|
520
|
-
);
|
|
521
|
-
})}
|
|
522
|
-
</ScreenStack>
|
|
523
|
-
);
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
const styles = StyleSheet.create({
|
|
527
|
-
scenes: { flex: 1 },
|
|
528
|
-
});
|
|
529
|
-
|
|
530
|
-
function createStackNavigator(
|
|
531
|
-
routeConfigMap: NavigationRouteConfigMap<
|
|
532
|
-
NativeStackNavigationOptions,
|
|
533
|
-
StackNavigationProp
|
|
534
|
-
>,
|
|
535
|
-
stackConfig: CreateNavigatorConfig<
|
|
536
|
-
NativeStackNavigationConfig,
|
|
537
|
-
NavigationStackRouterConfig,
|
|
538
|
-
NativeStackNavigationOptions,
|
|
539
|
-
StackNavigationProp
|
|
540
|
-
> = {}
|
|
541
|
-
): NavigationNavigator<
|
|
542
|
-
Record<string, unknown>,
|
|
543
|
-
NavigationProp<NavigationState>
|
|
544
|
-
> {
|
|
545
|
-
const router = StackRouter(routeConfigMap, stackConfig);
|
|
546
|
-
|
|
547
|
-
// below we override getStateForAction method in order to add handling for
|
|
548
|
-
// a custom native stack navigation action. The action REMOVE that we want to
|
|
549
|
-
// add works in a similar way to POP, but it does not remove all the routes
|
|
550
|
-
// that sit on top of the removed route. For example if we have three routes
|
|
551
|
-
// [a,b,c] and call POP on b, then both b and c will go away. In case we
|
|
552
|
-
// call REMOVE on b, only b will be removed from the stack and the resulting
|
|
553
|
-
// state will be [a, c]
|
|
554
|
-
const superGetStateForAction = router.getStateForAction;
|
|
555
|
-
router.getStateForAction = (
|
|
556
|
-
action: NavigationAction | NativeStackRemoveNavigationAction,
|
|
557
|
-
state
|
|
558
|
-
) => {
|
|
559
|
-
if (action.type === REMOVE_ACTION) {
|
|
560
|
-
const { key, immediate, dismissCount } = action;
|
|
561
|
-
let backRouteIndex = state.index;
|
|
562
|
-
if (key) {
|
|
563
|
-
const backRoute = state.routes.find(
|
|
564
|
-
(route: NavigationRoute<NavigationParams>) => route.key === key
|
|
565
|
-
);
|
|
566
|
-
backRouteIndex = state.routes.indexOf(backRoute);
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
if (backRouteIndex > 0) {
|
|
570
|
-
const newRoutes = [...state.routes];
|
|
571
|
-
if (dismissCount > 1) {
|
|
572
|
-
// when dismissing with iOS 14 native header back button, we can pop more than 1 screen at a time
|
|
573
|
-
// and the `backRouteIndex` is the index of the previous screen. Since we are starting already
|
|
574
|
-
// on the previous screen, we add 1 to start.
|
|
575
|
-
newRoutes.splice(backRouteIndex - dismissCount + 1, dismissCount);
|
|
576
|
-
} else {
|
|
577
|
-
newRoutes.splice(backRouteIndex, 1);
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
return {
|
|
581
|
-
...state,
|
|
582
|
-
routes: newRoutes,
|
|
583
|
-
index: newRoutes.length - 1,
|
|
584
|
-
isTransitioning: immediate !== true,
|
|
585
|
-
};
|
|
586
|
-
}
|
|
587
|
-
}
|
|
588
|
-
return superGetStateForAction(action as NavigationAction, state);
|
|
589
|
-
};
|
|
590
|
-
// Create a navigator with StackView as the view
|
|
591
|
-
return createNavigator(StackView, router, stackConfig);
|
|
592
|
-
}
|
|
593
|
-
|
|
594
|
-
export default createStackNavigator;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @flow strict-local
|
|
3
|
-
* @format
|
|
4
|
-
*/
|
|
5
|
-
/* eslint-disable */
|
|
6
|
-
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
7
|
-
import type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';
|
|
8
|
-
import type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';
|
|
9
|
-
|
|
10
|
-
type NativeProps = $ReadOnly<{|
|
|
11
|
-
...ViewProps,
|
|
12
|
-
|}>;
|
|
13
|
-
|
|
14
|
-
type ComponentType = HostComponent<NativeProps>;
|
|
15
|
-
|
|
16
|
-
export default (codegenNativeComponent<NativeProps>(
|
|
17
|
-
'RNSFullWindowOverlay',
|
|
18
|
-
{}
|
|
19
|
-
): ComponentType);
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @flow strict-local
|
|
3
|
-
* @format
|
|
4
|
-
*/
|
|
5
|
-
/* eslint-disable */
|
|
6
|
-
import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
|
|
7
|
-
import type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';
|
|
8
|
-
import type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';
|
|
9
|
-
|
|
10
|
-
type NativeProps = $ReadOnly<{|
|
|
11
|
-
...ViewProps,
|
|
12
|
-
|}>;
|
|
13
|
-
|
|
14
|
-
type ComponentType = HostComponent<NativeProps>;
|
|
15
|
-
|
|
16
|
-
export default (codegenNativeComponent<NativeProps>(
|
|
17
|
-
'RNSScreenContainer',
|
|
18
|
-
{}
|
|
19
|
-
): ComponentType);
|