react-native-screens 3.21.0 → 3.22.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.
Files changed (72) hide show
  1. package/README.md +2 -0
  2. package/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt +11 -10
  3. package/ios/RNSScreenWindowTraits.mm +6 -2
  4. package/lib/commonjs/TransitionProgressContext.js.map +1 -1
  5. package/lib/commonjs/fabric/ScreenNativeComponent.js +1 -0
  6. package/lib/commonjs/fabric/ScreenNativeComponent.js.map +1 -1
  7. package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
  8. package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
  9. package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
  10. package/lib/commonjs/fabric/ScreenStackNativeComponent.js +1 -0
  11. package/lib/commonjs/fabric/ScreenStackNativeComponent.js.map +1 -1
  12. package/lib/commonjs/index.js +7 -0
  13. package/lib/commonjs/index.js.map +1 -1
  14. package/lib/commonjs/index.native.js +2 -2
  15. package/lib/commonjs/index.native.js.map +1 -1
  16. package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  17. package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
  18. package/lib/commonjs/native-stack/utils/useBackPressSubscription.js.map +1 -1
  19. package/lib/commonjs/native-stack/utils/useHeaderHeight.js.map +1 -1
  20. package/lib/commonjs/native-stack/views/HeaderConfig.js.map +1 -1
  21. package/lib/commonjs/native-stack/views/NativeStackView.js +2 -1
  22. package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
  23. package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js +1 -1
  24. package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  25. package/lib/commonjs/reanimated/ReanimatedScreen.js +1 -1
  26. package/lib/commonjs/reanimated/ReanimatedScreen.js.map +1 -1
  27. package/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map +1 -1
  28. package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js +1 -0
  29. package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
  30. package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map +1 -1
  31. package/lib/commonjs/useTransitionProgress.js.map +1 -1
  32. package/lib/commonjs/utils.js +8 -1
  33. package/lib/commonjs/utils.js.map +1 -1
  34. package/lib/module/TransitionProgressContext.js.map +1 -1
  35. package/lib/module/fabric/ScreenNativeComponent.js +3 -0
  36. package/lib/module/fabric/ScreenNativeComponent.js.map +1 -1
  37. package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
  38. package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
  39. package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
  40. package/lib/module/fabric/ScreenStackNativeComponent.js +3 -0
  41. package/lib/module/fabric/ScreenStackNativeComponent.js.map +1 -1
  42. package/lib/module/index.js +1 -1
  43. package/lib/module/index.js.map +1 -1
  44. package/lib/module/index.native.js +2 -2
  45. package/lib/module/index.native.js.map +1 -1
  46. package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  47. package/lib/module/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
  48. package/lib/module/native-stack/utils/useBackPressSubscription.js.map +1 -1
  49. package/lib/module/native-stack/utils/useHeaderHeight.js.map +1 -1
  50. package/lib/module/native-stack/views/HeaderConfig.js.map +1 -1
  51. package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
  52. package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  53. package/lib/module/reanimated/ReanimatedScreen.js.map +1 -1
  54. package/lib/module/reanimated/ReanimatedScreenProvider.js.map +1 -1
  55. package/lib/module/reanimated/useReanimatedTransitionProgress.js.map +1 -1
  56. package/lib/module/useTransitionProgress.js.map +1 -1
  57. package/lib/module/utils.js +6 -0
  58. package/lib/module/utils.js.map +1 -1
  59. package/lib/typescript/index.d.ts +1 -1
  60. package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +2 -2
  61. package/lib/typescript/native-stack/utils/SafeAreaProviderCompat.d.ts +1 -1
  62. package/lib/typescript/native-stack/views/NativeStackView.d.ts +2 -2
  63. package/lib/typescript/reanimated/ReanimatedScreenProvider.d.ts +2 -2
  64. package/lib/typescript/utils.d.ts +1 -0
  65. package/package.json +1 -1
  66. package/src/index.native.tsx +2 -0
  67. package/src/index.tsx +1 -0
  68. package/src/utils.ts +6 -0
  69. package/ios/RNScreens.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  70. package/ios/RNScreens.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
  71. package/ios/RNScreens.xcodeproj/project.xcworkspace/xcuserdata/wojciechlewicki.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  72. package/ios/RNScreens.xcodeproj/xcuserdata/wojciechlewicki.xcuserdatad/xcschemes/xcschememanagement.plist +0 -19
@@ -34,6 +34,7 @@ import {
34
34
  } from './types';
35
35
  import {
36
36
  isSearchBarAvailableForCurrentPlatform,
37
+ isNewBackTitleImplementation,
37
38
  executeNativeBackPress,
38
39
  } from './utils';
39
40
 
@@ -592,5 +593,6 @@ module.exports = {
592
593
  useTransitionProgress,
593
594
 
594
595
  isSearchBarAvailableForCurrentPlatform,
596
+ isNewBackTitleImplementation,
595
597
  executeNativeBackPress,
596
598
  };
package/src/index.tsx CHANGED
@@ -13,6 +13,7 @@ export * from './types';
13
13
  export { default as useTransitionProgress } from './useTransitionProgress';
14
14
  export {
15
15
  isSearchBarAvailableForCurrentPlatform,
16
+ isNewBackTitleImplementation,
16
17
  executeNativeBackPress,
17
18
  } from './utils';
18
19
 
package/src/utils.ts CHANGED
@@ -10,3 +10,9 @@ export function executeNativeBackPress() {
10
10
  BackHandler.exitApp();
11
11
  return true;
12
12
  }
13
+
14
+ // Because of a bug introduced in https://github.com/software-mansion/react-native-screens/pull/1646
15
+ // react-native-screens v3.21 changed how header's backTitle handles whitespace strings in https://github.com/software-mansion/react-native-screens/pull/1726
16
+ // To allow for backwards compatibility in @react-navigation/native-stack we need a way to check if this version or newer is used.
17
+ // See https://github.com/react-navigation/react-navigation/pull/11423 for more context.
18
+ export const isNewBackTitleImplementation = true;
@@ -1,7 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <Workspace
3
- version = "1.0">
4
- <FileRef
5
- location = "self:">
6
- </FileRef>
7
- </Workspace>
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>IDEDidComputeMac32BitWarning</key>
6
- <true/>
7
- </dict>
8
- </plist>
@@ -1,19 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3
- <plist version="1.0">
4
- <dict>
5
- <key>SchemeUserState</key>
6
- <dict>
7
- <key>RNScreens-tvOS.xcscheme_^#shared#^_</key>
8
- <dict>
9
- <key>orderHint</key>
10
- <integer>0</integer>
11
- </dict>
12
- <key>RNScreens.xcscheme_^#shared#^_</key>
13
- <dict>
14
- <key>orderHint</key>
15
- <integer>1</integer>
16
- </dict>
17
- </dict>
18
- </dict>
19
- </plist>