react-native-screens 3.15.0 → 3.16.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 (51) hide show
  1. package/README.md +34 -1
  2. package/RNScreens.podspec +1 -4
  3. package/android/build.gradle +1 -1
  4. package/android/src/main/java/com/swmansion/rnscreens/ScreenContainer.kt +50 -21
  5. package/android/src/main/java/com/swmansion/rnscreens/ScreenFragment.kt +22 -21
  6. package/android/src/main/java/com/swmansion/rnscreens/ScreenStack.kt +7 -5
  7. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt +1 -2
  8. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackViewManager.kt +9 -0
  9. package/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt +3 -6
  10. package/android/src/main/java/com/swmansion/rnscreens/ScreenWindowTraits.kt +1 -1
  11. package/ios/RNSScreen.h +1 -0
  12. package/ios/RNSScreen.mm +24 -4
  13. package/ios/RNSScreenStack.mm +2 -2
  14. package/ios/RNSScreenStackHeaderConfig.mm +2 -2
  15. package/lib/commonjs/fabric/ScreenNativeComponent.js.map +1 -1
  16. package/lib/commonjs/index.js +4 -1
  17. package/lib/commonjs/index.js.map +1 -1
  18. package/lib/commonjs/index.native.js +36 -30
  19. package/lib/commonjs/index.native.js.map +1 -1
  20. package/lib/commonjs/native-stack/views/NativeStackView.js +3 -1
  21. package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
  22. package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js +1 -1
  23. package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  24. package/lib/commonjs/reanimated/ReanimatedScreen.js +1 -1
  25. package/lib/commonjs/reanimated/ReanimatedScreen.js.map +1 -1
  26. package/lib/module/fabric/ScreenNativeComponent.js.map +1 -1
  27. package/lib/module/index.js +1 -0
  28. package/lib/module/index.js.map +1 -1
  29. package/lib/module/index.native.js +37 -30
  30. package/lib/module/index.native.js.map +1 -1
  31. package/lib/module/native-stack/views/NativeStackView.js +3 -1
  32. package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
  33. package/lib/module/reanimated/ReanimatedNativeStackScreen.js +2 -2
  34. package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  35. package/lib/module/reanimated/ReanimatedScreen.js +2 -2
  36. package/lib/module/reanimated/ReanimatedScreen.js.map +1 -1
  37. package/lib/typescript/index.d.ts +1 -0
  38. package/lib/typescript/native-stack/types.d.ts +5 -0
  39. package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts +1 -1
  40. package/lib/typescript/reanimated/ReanimatedScreen.d.ts +1 -1
  41. package/lib/typescript/types.d.ts +5 -0
  42. package/native-stack/README.md +6 -0
  43. package/package.json +1 -1
  44. package/src/fabric/ScreenNativeComponent.js +1 -1
  45. package/src/index.native.tsx +39 -26
  46. package/src/index.tsx +2 -0
  47. package/src/native-stack/types.tsx +5 -0
  48. package/src/native-stack/views/NativeStackView.tsx +2 -0
  49. package/src/reanimated/ReanimatedNativeStackScreen.tsx +2 -2
  50. package/src/reanimated/ReanimatedScreen.tsx +2 -2
  51. package/src/types.tsx +5 -0
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
- import { Screen, ScreenProps } from 'react-native-screens';
2
+ import { InnerScreen, ScreenProps } from 'react-native-screens';
3
3
 
4
4
  // @ts-ignore file to be used only if `react-native-reanimated` available in the project
5
5
  import Animated from 'react-native-reanimated';
6
6
 
7
7
  const AnimatedScreen = Animated.createAnimatedComponent(
8
- (Screen as unknown) as React.ComponentClass
8
+ (InnerScreen as unknown) as React.ComponentClass
9
9
  );
10
10
 
11
11
  const ReanimatedScreen = React.forwardRef<typeof AnimatedScreen, ScreenProps>(
package/src/types.tsx CHANGED
@@ -269,6 +269,11 @@ export interface ScreenProps extends ViewProps {
269
269
  * @platform ios
270
270
  */
271
271
  transitionDuration?: number;
272
+ /**
273
+ * Whether inactive screens should be suspended from re-rendering. Defaults to `false`.
274
+ * When `enableFreeze()` is run at the top of the application defaults to `true`.
275
+ */
276
+ freezeOnBlur?: boolean;
272
277
  }
273
278
 
274
279
  export interface ScreenContainerProps extends ViewProps {