react-native-screens 4.0.0-beta.12 → 4.0.0-beta.14
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 +3 -1
- package/android/CMakeLists.txt +28 -19
- package/android/src/main/java/com/swmansion/rnscreens/NativeDismissalObserver.kt +12 -0
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt +59 -84
- package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/BottomSheetBehaviorExt.kt +42 -0
- package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/DimmingFragment.kt +24 -19
- package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/SheetUtils.kt +8 -0
- package/android/src/main/jni/CMakeLists.txt +28 -19
- package/ios/RNSConvert.h +13 -4
- package/ios/RNSConvert.mm +50 -28
- package/ios/RNSEnums.h +46 -0
- package/ios/RNSScreenStackHeaderConfig.h +1 -1
- package/ios/RNSScreenStackHeaderConfig.mm +30 -25
- package/lib/commonjs/components/FullWindowOverlay.js +8 -5
- package/lib/commonjs/components/FullWindowOverlay.js.map +1 -1
- package/lib/commonjs/components/Screen.js +28 -10
- package/lib/commonjs/components/Screen.js.map +1 -1
- package/lib/commonjs/components/ScreenContainer.js +3 -5
- package/lib/commonjs/components/ScreenContainer.js.map +1 -1
- package/lib/commonjs/components/ScreenContainer.web.js +3 -4
- package/lib/commonjs/components/ScreenContainer.web.js.map +1 -1
- package/lib/commonjs/components/ScreenContentWrapper.js +2 -4
- package/lib/commonjs/components/ScreenContentWrapper.js.map +1 -1
- package/lib/commonjs/components/ScreenContentWrapper.web.js +1 -2
- package/lib/commonjs/components/ScreenContentWrapper.web.js.map +1 -1
- package/lib/commonjs/components/ScreenFooter.js +2 -8
- package/lib/commonjs/components/ScreenFooter.js.map +1 -1
- package/lib/commonjs/components/ScreenFooter.web.js +1 -2
- package/lib/commonjs/components/ScreenFooter.web.js.map +1 -1
- package/lib/commonjs/components/ScreenStack.js +2 -2
- package/lib/commonjs/components/ScreenStack.js.map +1 -1
- package/lib/commonjs/components/ScreenStack.web.js +2 -1
- package/lib/commonjs/components/ScreenStack.web.js.map +1 -1
- package/lib/commonjs/components/SearchBar.js +5 -5
- package/lib/commonjs/components/SearchBar.js.map +1 -1
- package/lib/commonjs/components/SearchBar.web.js +3 -4
- package/lib/commonjs/components/SearchBar.web.js.map +1 -1
- package/lib/commonjs/core.js +0 -3
- package/lib/commonjs/core.js.map +1 -1
- package/lib/commonjs/fabric/ModalScreenNativeComponent.js.map +1 -1
- package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
- package/lib/commonjs/gesture-handler/GestureDetectorProvider.js +2 -2
- package/lib/commonjs/gesture-handler/GestureDetectorProvider.js.map +1 -1
- package/lib/commonjs/index.js +14 -78
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +4 -0
- package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/commonjs/native-stack/views/FooterComponent.js +2 -2
- package/lib/commonjs/native-stack/views/FooterComponent.js.map +1 -1
- package/lib/commonjs/native-stack/views/HeaderConfig.js +10 -8
- package/lib/commonjs/native-stack/views/HeaderConfig.js.map +1 -1
- package/lib/commonjs/native-stack/views/NativeStackView.js +12 -9
- package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js +2 -2
- package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedScreen.js +2 -2
- package/lib/commonjs/reanimated/ReanimatedScreen.js.map +1 -1
- package/lib/commonjs/reanimated/ReanimatedScreenProvider.js +2 -2
- package/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map +1 -1
- package/lib/commonjs/utils.js +28 -6
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/components/FullWindowOverlay.js +9 -6
- package/lib/module/components/FullWindowOverlay.js.map +1 -1
- package/lib/module/components/Screen.js +27 -9
- package/lib/module/components/Screen.js.map +1 -1
- package/lib/module/components/ScreenContainer.js +2 -4
- package/lib/module/components/ScreenContainer.js.map +1 -1
- package/lib/module/components/ScreenContainer.web.js +2 -3
- package/lib/module/components/ScreenContainer.web.js.map +1 -1
- package/lib/module/components/ScreenContentWrapper.js +1 -3
- package/lib/module/components/ScreenContentWrapper.js.map +1 -1
- package/lib/module/components/ScreenContentWrapper.web.js +0 -1
- package/lib/module/components/ScreenContentWrapper.web.js.map +1 -1
- package/lib/module/components/ScreenFooter.js +1 -7
- package/lib/module/components/ScreenFooter.js.map +1 -1
- package/lib/module/components/ScreenFooter.web.js +0 -1
- package/lib/module/components/ScreenFooter.web.js.map +1 -1
- package/lib/module/components/ScreenStack.js +1 -1
- package/lib/module/components/ScreenStack.js.map +1 -1
- package/lib/module/components/ScreenStack.web.js +2 -1
- package/lib/module/components/ScreenStack.web.js.map +1 -1
- package/lib/module/components/SearchBar.js +3 -3
- package/lib/module/components/SearchBar.js.map +1 -1
- package/lib/module/components/SearchBar.web.js +2 -3
- package/lib/module/components/SearchBar.web.js.map +1 -1
- package/lib/module/core.js +0 -3
- package/lib/module/core.js.map +1 -1
- package/lib/module/fabric/ModalScreenNativeComponent.js.map +1 -1
- package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
- package/lib/module/gesture-handler/GestureDetectorProvider.js +1 -1
- package/lib/module/gesture-handler/GestureDetectorProvider.js.map +1 -1
- package/lib/module/index.js +8 -13
- package/lib/module/index.js.map +1 -1
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js +4 -0
- package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
- package/lib/module/native-stack/views/FooterComponent.js +1 -1
- package/lib/module/native-stack/views/FooterComponent.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 +4 -1
- package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
- package/lib/module/reanimated/ReanimatedNativeStackScreen.js +1 -2
- package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
- package/lib/module/reanimated/ReanimatedScreen.js +1 -2
- package/lib/module/reanimated/ReanimatedScreen.js.map +1 -1
- package/lib/module/reanimated/ReanimatedScreenProvider.js +1 -1
- package/lib/module/reanimated/ReanimatedScreenProvider.js.map +1 -1
- package/lib/module/utils.js +26 -5
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/components/FullWindowOverlay.d.ts.map +1 -1
- package/lib/typescript/components/Screen.d.ts +2 -7
- package/lib/typescript/components/Screen.d.ts.map +1 -1
- package/lib/typescript/components/Screen.web.d.ts +1 -1
- package/lib/typescript/components/Screen.web.d.ts.map +1 -1
- package/lib/typescript/components/ScreenContainer.d.ts +1 -3
- package/lib/typescript/components/ScreenContainer.d.ts.map +1 -1
- package/lib/typescript/components/ScreenContainer.web.d.ts +2 -3
- package/lib/typescript/components/ScreenContainer.web.d.ts.map +1 -1
- package/lib/typescript/components/ScreenContentWrapper.d.ts +0 -1
- package/lib/typescript/components/ScreenContentWrapper.d.ts.map +1 -1
- package/lib/typescript/components/ScreenContentWrapper.web.d.ts +0 -1
- package/lib/typescript/components/ScreenContentWrapper.web.d.ts.map +1 -1
- package/lib/typescript/components/ScreenFooter.d.ts +0 -4
- package/lib/typescript/components/ScreenFooter.d.ts.map +1 -1
- package/lib/typescript/components/ScreenFooter.web.d.ts +0 -1
- package/lib/typescript/components/ScreenFooter.web.d.ts.map +1 -1
- package/lib/typescript/components/ScreenStack.d.ts +1 -1
- package/lib/typescript/components/ScreenStack.d.ts.map +1 -1
- package/lib/typescript/components/ScreenStack.web.d.ts +2 -1
- package/lib/typescript/components/ScreenStack.web.d.ts.map +1 -1
- package/lib/typescript/components/ScreenStackHeaderConfig.d.ts +1 -1
- package/lib/typescript/components/ScreenStackHeaderConfig.d.ts.map +1 -1
- package/lib/typescript/components/ScreenStackHeaderConfig.web.d.ts +1 -1
- package/lib/typescript/components/ScreenStackHeaderConfig.web.d.ts.map +1 -1
- package/lib/typescript/components/SearchBar.d.ts +1 -15
- package/lib/typescript/components/SearchBar.d.ts.map +1 -1
- package/lib/typescript/components/SearchBar.web.d.ts +2 -3
- package/lib/typescript/components/SearchBar.web.d.ts.map +1 -1
- package/lib/typescript/core.d.ts +0 -1
- package/lib/typescript/core.d.ts.map +1 -1
- package/lib/typescript/fabric/ModalScreenNativeComponent.d.ts +7 -1
- package/lib/typescript/fabric/ModalScreenNativeComponent.d.ts.map +1 -1
- package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts +2 -2
- package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +8 -12
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +3 -0
- package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts.map +1 -1
- package/lib/typescript/native-stack/types.d.ts +49 -1
- package/lib/typescript/native-stack/types.d.ts.map +1 -1
- package/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts +1 -1
- package/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/HeaderConfig.d.ts.map +1 -1
- package/lib/typescript/native-stack/views/NativeStackView.d.ts.map +1 -1
- package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts +1 -1
- package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts.map +1 -1
- package/lib/typescript/reanimated/ReanimatedScreen.d.ts +1 -1
- package/lib/typescript/reanimated/ReanimatedScreen.d.ts.map +1 -1
- package/lib/typescript/reanimated/ReanimatedScreenProvider.d.ts.map +1 -1
- package/lib/typescript/types.d.ts +1 -1
- package/lib/typescript/types.d.ts.map +1 -1
- package/lib/typescript/utils.d.ts +26 -1
- package/lib/typescript/utils.d.ts.map +1 -1
- package/native-stack/README.md +2 -1
- package/native-stack/package.json +4 -4
- package/package.json +1 -1
- package/src/components/FullWindowOverlay.tsx +10 -2
- package/src/components/Screen.tsx +42 -25
- package/src/components/Screen.web.tsx +1 -1
- package/src/components/ScreenContainer.tsx +4 -11
- package/src/components/ScreenContainer.web.tsx +2 -3
- package/src/components/ScreenContentWrapper.tsx +2 -5
- package/src/components/ScreenContentWrapper.web.tsx +1 -2
- package/src/components/ScreenFooter.tsx +2 -8
- package/src/components/ScreenFooter.web.tsx +1 -2
- package/src/components/ScreenStack.tsx +2 -1
- package/src/components/ScreenStack.web.tsx +3 -1
- package/src/components/ScreenStackHeaderConfig.tsx +1 -1
- package/src/components/ScreenStackHeaderConfig.web.tsx +1 -1
- package/src/components/SearchBar.tsx +4 -7
- package/src/components/SearchBar.web.tsx +2 -3
- package/src/core.ts +0 -3
- package/src/fabric/ModalScreenNativeComponent.ts +9 -1
- package/src/fabric/ScreenStackHeaderConfigNativeComponent.ts +2 -1
- package/src/gesture-handler/GestureDetectorProvider.tsx +1 -1
- package/src/index.tsx +6 -32
- package/src/native-stack/navigators/createNativeStackNavigator.tsx +3 -0
- package/src/native-stack/types.tsx +50 -6
- package/src/native-stack/utils/getDefaultHeaderHeight.tsx +1 -1
- package/src/native-stack/views/FooterComponent.tsx +1 -1
- package/src/native-stack/views/HeaderConfig.tsx +7 -5
- package/src/native-stack/views/NativeStackView.tsx +5 -8
- package/src/reanimated/ReanimatedNativeStackScreen.tsx +2 -2
- package/src/reanimated/ReanimatedScreen.tsx +2 -1
- package/src/reanimated/ReanimatedScreenProvider.tsx +2 -1
- package/src/types.tsx +1 -0
- package/src/utils.ts +27 -5
|
@@ -22,8 +22,11 @@ import {
|
|
|
22
22
|
ScreenProps,
|
|
23
23
|
ScreenStackHeaderConfigProps,
|
|
24
24
|
SearchBarProps,
|
|
25
|
-
} from '
|
|
25
|
+
} from '../types';
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
29
|
+
*/
|
|
27
30
|
export type NativeStackNavigationEventMap = {
|
|
28
31
|
/**
|
|
29
32
|
* Event which fires when the screen appears.
|
|
@@ -62,6 +65,9 @@ export type NativeStackNavigationEventMap = {
|
|
|
62
65
|
sheetDetentChange: { data: { index: number; isStable: boolean } };
|
|
63
66
|
};
|
|
64
67
|
|
|
68
|
+
/**
|
|
69
|
+
* @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
70
|
+
*/
|
|
65
71
|
export type NativeStackNavigationProp<
|
|
66
72
|
ParamList extends ParamListBase,
|
|
67
73
|
RouteName extends keyof ParamList = string,
|
|
@@ -74,6 +80,9 @@ export type NativeStackNavigationProp<
|
|
|
74
80
|
> &
|
|
75
81
|
StackActionHelpers<ParamList>;
|
|
76
82
|
|
|
83
|
+
/**
|
|
84
|
+
* @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
85
|
+
*/
|
|
77
86
|
export type NativeStackScreenProps<
|
|
78
87
|
ParamList extends ParamListBase,
|
|
79
88
|
RouteName extends keyof ParamList = string,
|
|
@@ -82,15 +91,23 @@ export type NativeStackScreenProps<
|
|
|
82
91
|
route: RouteProp<ParamList, RouteName>;
|
|
83
92
|
};
|
|
84
93
|
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
96
|
+
*/
|
|
85
97
|
export type NativeStackNavigationHelpers = NavigationHelpers<
|
|
86
98
|
ParamListBase,
|
|
87
99
|
NativeStackNavigationEventMap
|
|
88
100
|
>;
|
|
89
101
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
102
|
+
/**
|
|
103
|
+
* We want it to be an empty object beacuse navigator does not have any additional config
|
|
104
|
+
* @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
105
|
+
*/
|
|
106
|
+
export type NativeStackNavigationConfig = {}; // eslint-disable-line @typescript-eslint/ban-types
|
|
93
107
|
|
|
108
|
+
/**
|
|
109
|
+
* @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
110
|
+
*/
|
|
94
111
|
export type NativeStackNavigationOptions = {
|
|
95
112
|
/**
|
|
96
113
|
* Image to display in the header as the back button.
|
|
@@ -527,11 +544,17 @@ export type NativeStackNavigationOptions = {
|
|
|
527
544
|
unstable_sheetFooter?: () => React.ReactNode;
|
|
528
545
|
};
|
|
529
546
|
|
|
547
|
+
/**
|
|
548
|
+
* @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
549
|
+
*/
|
|
530
550
|
export type NativeStackNavigatorProps =
|
|
531
551
|
DefaultNavigatorOptions<NativeStackNavigationOptions> &
|
|
532
552
|
StackRouterOptions &
|
|
533
553
|
NativeStackNavigationConfig;
|
|
534
554
|
|
|
555
|
+
/**
|
|
556
|
+
* @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
557
|
+
*/
|
|
535
558
|
export type NativeStackDescriptor = Descriptor<
|
|
536
559
|
ParamListBase,
|
|
537
560
|
string,
|
|
@@ -539,11 +562,17 @@ export type NativeStackDescriptor = Descriptor<
|
|
|
539
562
|
NativeStackNavigationOptions
|
|
540
563
|
>;
|
|
541
564
|
|
|
565
|
+
/**
|
|
566
|
+
* @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
567
|
+
*/
|
|
542
568
|
export type NativeStackDescriptorMap = {
|
|
543
569
|
[key: string]: NativeStackDescriptor;
|
|
544
570
|
};
|
|
545
571
|
|
|
546
|
-
|
|
572
|
+
/**
|
|
573
|
+
* copy from GestureHandler to avoid strong dependency
|
|
574
|
+
* @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
575
|
+
*/
|
|
547
576
|
export type PanGestureHandlerEventPayload = {
|
|
548
577
|
x: number;
|
|
549
578
|
y: number;
|
|
@@ -555,7 +584,10 @@ export type PanGestureHandlerEventPayload = {
|
|
|
555
584
|
velocityY: number;
|
|
556
585
|
};
|
|
557
586
|
|
|
558
|
-
|
|
587
|
+
/**
|
|
588
|
+
* copy from Reanimated to avoid strong dependency
|
|
589
|
+
* @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
590
|
+
*/
|
|
559
591
|
export type GoBackGesture =
|
|
560
592
|
| 'swipeRight'
|
|
561
593
|
| 'swipeLeft'
|
|
@@ -565,6 +597,9 @@ export type GoBackGesture =
|
|
|
565
597
|
| 'horizontalSwipe'
|
|
566
598
|
| 'twoDimensionalSwipe';
|
|
567
599
|
|
|
600
|
+
/**
|
|
601
|
+
* @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
602
|
+
*/
|
|
568
603
|
export interface MeasuredDimensions {
|
|
569
604
|
x: number;
|
|
570
605
|
y: number;
|
|
@@ -574,6 +609,9 @@ export interface MeasuredDimensions {
|
|
|
574
609
|
pageY: number;
|
|
575
610
|
}
|
|
576
611
|
|
|
612
|
+
/**
|
|
613
|
+
* @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
614
|
+
*/
|
|
577
615
|
export type AnimatedScreenTransition = {
|
|
578
616
|
topScreenStyle: (
|
|
579
617
|
event: PanGestureHandlerEventPayload,
|
|
@@ -585,10 +623,16 @@ export type AnimatedScreenTransition = {
|
|
|
585
623
|
) => Record<string, unknown>;
|
|
586
624
|
};
|
|
587
625
|
|
|
626
|
+
/**
|
|
627
|
+
* @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
628
|
+
*/
|
|
588
629
|
export type ScreensRefsHolder = React.MutableRefObject<
|
|
589
630
|
Record<string, React.MutableRefObject<React.Ref<NativeStackNavigatorProps>>>
|
|
590
631
|
>;
|
|
591
632
|
|
|
633
|
+
/**
|
|
634
|
+
* @deprecated NativeStack has been moved from react-native-screens/native-stack to @react-navigation/native since version v6. With react-native-screens v4 native stack v5 (react-native-screens/native-stack) is deprecated and marked for removal in the upcoming minor release, react-native-screens v4 will support only @react-navigation/native-stack v7.
|
|
635
|
+
*/
|
|
592
636
|
export type GestureProviderProps = PropsWithChildren<{
|
|
593
637
|
gestureDetectorBridge: React.MutableRefObject<GestureDetectorBridge>;
|
|
594
638
|
screensRefs: ScreensRefsHolder;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { Route, useTheme } from '@react-navigation/native';
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { Platform } from 'react-native';
|
|
4
|
+
import { SearchBarProps } from '../../types';
|
|
5
|
+
import {
|
|
6
|
+
isSearchBarAvailableForCurrentPlatform,
|
|
7
|
+
executeNativeBackPress,
|
|
8
|
+
} from '../../utils';
|
|
4
9
|
import {
|
|
5
10
|
ScreenStackHeaderBackButtonImage,
|
|
6
11
|
ScreenStackHeaderCenterView,
|
|
@@ -8,11 +13,8 @@ import {
|
|
|
8
13
|
ScreenStackHeaderLeftView,
|
|
9
14
|
ScreenStackHeaderRightView,
|
|
10
15
|
ScreenStackHeaderSearchBarView,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
isSearchBarAvailableForCurrentPlatform,
|
|
14
|
-
executeNativeBackPress,
|
|
15
|
-
} from 'react-native-screens';
|
|
16
|
+
} from '../../components/ScreenStackHeaderConfig';
|
|
17
|
+
import SearchBar from '../../components/SearchBar';
|
|
16
18
|
import { NativeStackNavigationOptions } from '../types';
|
|
17
19
|
import { useBackPressSubscription } from '../utils/useBackPressSubscription';
|
|
18
20
|
import { processFonts } from './FontProcessor';
|
|
@@ -5,14 +5,11 @@ import { Animated, Platform, StyleSheet, ViewProps } from 'react-native';
|
|
|
5
5
|
// eslint-disable-next-line import/no-named-as-default, import/default, import/no-named-as-default-member, import/namespace
|
|
6
6
|
import AppContainer from 'react-native/Libraries/ReactNative/AppContainer';
|
|
7
7
|
import warnOnce from 'warn-once';
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
GestureDetectorBridge,
|
|
14
|
-
ScreenContentWrapper,
|
|
15
|
-
} from 'react-native-screens';
|
|
8
|
+
import { StackPresentationTypes, GestureDetectorBridge } from '../../types';
|
|
9
|
+
import ScreenStack from '../../components/ScreenStack';
|
|
10
|
+
import ScreenContentWrapper from '../../components/ScreenContentWrapper';
|
|
11
|
+
import { GHContext } from '../contexts/GHContext';
|
|
12
|
+
import { ScreenContext } from '../../components/Screen';
|
|
16
13
|
import {
|
|
17
14
|
ParamListBase,
|
|
18
15
|
StackActions,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Platform } from 'react-native';
|
|
3
|
+
import { InnerScreen } from '../components/Screen';
|
|
3
4
|
import {
|
|
4
5
|
HeaderHeightChangeEventType,
|
|
5
|
-
InnerScreen,
|
|
6
6
|
ScreenProps,
|
|
7
7
|
TransitionProgressEventType,
|
|
8
|
-
} from '
|
|
8
|
+
} from '../types';
|
|
9
9
|
|
|
10
10
|
// @ts-ignore file to be used only if `react-native-reanimated` available in the project
|
|
11
11
|
import Animated, { useEvent, useSharedValue } from 'react-native-reanimated';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { InnerScreen
|
|
2
|
+
import { InnerScreen } from '../components/Screen';
|
|
3
|
+
import { ScreenProps } from '../types';
|
|
3
4
|
|
|
4
5
|
// @ts-ignore file to be used only if `react-native-reanimated` available in the project
|
|
5
6
|
import Animated from 'react-native-reanimated';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
-
import {
|
|
3
|
+
import { ScreenContext } from '../components/Screen';
|
|
4
|
+
import { ScreenProps } from '../types';
|
|
4
5
|
import ReanimatedNativeStackScreen from './ReanimatedNativeStackScreen';
|
|
5
6
|
import AnimatedScreen from './ReanimatedScreen';
|
|
6
7
|
|
package/src/types.tsx
CHANGED
package/src/utils.ts
CHANGED
|
@@ -11,8 +11,30 @@ export function executeNativeBackPress() {
|
|
|
11
11
|
return true;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
/**
|
|
15
|
+
* Exposes information useful for downstream navigation library implementers,
|
|
16
|
+
* so they can keep reasonable backward compatibility, if desired.
|
|
17
|
+
*
|
|
18
|
+
* We don't mean for this object to only grow in number of fields, however at the same time
|
|
19
|
+
* we won't be very hasty to reduce it. Expect gradual changes.
|
|
20
|
+
*/
|
|
21
|
+
export const compatibilityFlags = {
|
|
22
|
+
/**
|
|
23
|
+
* Because of a bug introduced in https://github.com/software-mansion/react-native-screens/pull/1646
|
|
24
|
+
* react-native-screens v3.21 changed how header's backTitle handles whitespace strings in https://github.com/software-mansion/react-native-screens/pull/1726
|
|
25
|
+
* To allow for backwards compatibility in @react-navigation/native-stack we need a way to check if this version or newer is used.
|
|
26
|
+
* See https://github.com/react-navigation/react-navigation/pull/11423 for more context.
|
|
27
|
+
*/
|
|
28
|
+
isNewBackTitleImplementation: true,
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* With version 4.0.0 the header implementation has been changed. To allow for backward compat
|
|
32
|
+
* with native-stack@v6 we want to expose a way to check whether the new implementation
|
|
33
|
+
* is in use or not.
|
|
34
|
+
*
|
|
35
|
+
* See:
|
|
36
|
+
* * https://github.com/software-mansion/react-native-screens/pull/2325
|
|
37
|
+
* * https://github.com/react-navigation/react-navigation/pull/12125
|
|
38
|
+
*/
|
|
39
|
+
usesHeaderFlexboxImplementation: true,
|
|
40
|
+
};
|