react-native-screens 4.0.0-beta.12 → 4.0.0-beta.13
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/android/CMakeLists.txt +28 -19
- package/android/src/main/java/com/swmansion/rnscreens/ScreenStackFragment.kt +53 -71
- package/android/src/main/java/com/swmansion/rnscreens/bottomsheet/BottomSheetBehaviorExt.kt +42 -0
- 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/ScreenStack.js +2 -2
- package/lib/commonjs/components/ScreenStack.js.map +1 -1
- package/lib/commonjs/components/SearchBar.js +2 -2
- package/lib/commonjs/components/SearchBar.js.map +1 -1
- package/lib/commonjs/core.js +0 -3
- package/lib/commonjs/core.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 +7 -14
- package/lib/commonjs/index.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/ScreenStack.js +1 -1
- package/lib/module/components/ScreenStack.js.map +1 -1
- package/lib/module/components/SearchBar.js +1 -1
- package/lib/module/components/SearchBar.js.map +1 -1
- package/lib/module/core.js +0 -3
- package/lib/module/core.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 +2 -2
- package/lib/module/index.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/Screen.d.ts +1 -1
- 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 -1
- package/lib/typescript/components/ScreenContainer.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/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 -1
- package/lib/typescript/components/SearchBar.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/ScreenStackHeaderConfigNativeComponent.d.ts +2 -2
- package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +2 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/native-stack/types.d.ts +1 -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/package.json +1 -1
- package/src/components/Screen.tsx +1 -1
- package/src/components/Screen.web.tsx +1 -1
- package/src/components/ScreenContainer.tsx +1 -1
- package/src/components/ScreenStack.tsx +2 -1
- package/src/components/ScreenStackHeaderConfig.tsx +1 -1
- package/src/components/ScreenStackHeaderConfig.web.tsx +1 -1
- package/src/components/SearchBar.tsx +2 -5
- package/src/core.ts +0 -3
- package/src/fabric/ScreenStackHeaderConfigNativeComponent.ts +2 -1
- package/src/gesture-handler/GestureDetectorProvider.tsx +1 -1
- package/src/index.tsx +1 -2
- package/src/native-stack/types.tsx +1 -1
- 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
|
@@ -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
|
+
};
|