react-native-screens 3.19.0 → 3.21.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 (203) hide show
  1. package/README.md +2 -1
  2. package/RNScreens.podspec +1 -1
  3. package/android/build.gradle +24 -6
  4. package/android/src/main/java/com/swmansion/rnscreens/CustomSearchView.kt +4 -0
  5. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt +7 -9
  6. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt +12 -4
  7. package/android/src/main/java/com/swmansion/rnscreens/SearchBarManager.kt +32 -8
  8. package/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt +36 -15
  9. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderAttachedEvent.kt +24 -0
  10. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderDetachedEvent.kt +24 -0
  11. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarBlurEvent.kt +24 -0
  12. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarChangeTextEvent.kt +29 -0
  13. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarCloseEvent.kt +24 -0
  14. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarFocusEvent.kt +24 -0
  15. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarOpenEvent.kt +24 -0
  16. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarSearchButtonPressEvent.kt +26 -0
  17. package/android/src/main/res/base/anim/rns_standard_accelerate_interpolator.xml +6 -0
  18. package/android/src/main/res/v33/anim-v33/rns_default_enter_in.xml +38 -0
  19. package/android/src/main/res/v33/anim-v33/rns_default_enter_out.xml +38 -0
  20. package/android/src/main/res/v33/anim-v33/rns_default_exit_in.xml +38 -0
  21. package/android/src/main/res/v33/anim-v33/rns_default_exit_out.xml +38 -0
  22. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerDelegate.java +3 -0
  23. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerInterface.java +1 -0
  24. package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h +1 -2
  25. package/ios/RCTImageComponentView+RNSScreenStackHeaderConfig.h +11 -0
  26. package/ios/RCTImageComponentView+RNSScreenStackHeaderConfig.mm +14 -0
  27. package/ios/RNSConvert.h +2 -2
  28. package/ios/RNSConvert.mm +2 -2
  29. package/ios/RNSFullWindowOverlay.h +5 -5
  30. package/ios/RNSFullWindowOverlay.mm +13 -13
  31. package/ios/RNSScreen.h +7 -6
  32. package/ios/RNSScreen.mm +35 -33
  33. package/ios/RNSScreenContainer.h +2 -2
  34. package/ios/RNSScreenContainer.mm +5 -5
  35. package/ios/RNSScreenNavigationContainer.mm +3 -3
  36. package/ios/RNSScreenStack.h +4 -4
  37. package/ios/RNSScreenStack.mm +62 -23
  38. package/ios/RNSScreenStackHeaderConfig.h +10 -3
  39. package/ios/RNSScreenStackHeaderConfig.mm +138 -81
  40. package/ios/RNSScreenStackHeaderSubview.h +5 -6
  41. package/ios/RNSScreenStackHeaderSubview.mm +20 -11
  42. package/ios/RNSScreenWindowTraits.mm +21 -2
  43. package/ios/RNSSearchBar.h +5 -4
  44. package/ios/RNSSearchBar.mm +87 -12
  45. package/ios/RNScreens.xcodeproj/project.xcworkspace/contents.xcworkspacedata +7 -0
  46. package/ios/RNScreens.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +8 -0
  47. package/ios/RNScreens.xcodeproj/project.xcworkspace/xcuserdata/wojciechlewicki.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  48. package/ios/RNScreens.xcodeproj/xcuserdata/wojciechlewicki.xcuserdatad/xcschemes/xcschememanagement.plist +19 -0
  49. package/lib/commonjs/TransitionProgressContext.js.map +1 -1
  50. package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js +0 -5
  51. package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
  52. package/lib/commonjs/fabric/ScreenContainerNativeComponent.js +0 -5
  53. package/lib/commonjs/fabric/ScreenContainerNativeComponent.js.map +1 -1
  54. package/lib/commonjs/fabric/ScreenNativeComponent.js +0 -5
  55. package/lib/commonjs/fabric/ScreenNativeComponent.js.map +1 -1
  56. package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js +0 -5
  57. package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
  58. package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -8
  59. package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
  60. package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -8
  61. package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
  62. package/lib/commonjs/fabric/ScreenStackNativeComponent.js +0 -5
  63. package/lib/commonjs/fabric/ScreenStackNativeComponent.js.map +1 -1
  64. package/lib/commonjs/fabric/SearchBarNativeComponent.js +7 -7
  65. package/lib/commonjs/fabric/SearchBarNativeComponent.js.map +1 -1
  66. package/lib/commonjs/index.js +1 -1
  67. package/lib/commonjs/index.js.map +1 -1
  68. package/lib/commonjs/index.native.js +53 -11
  69. package/lib/commonjs/index.native.js.map +1 -1
  70. package/lib/commonjs/native-stack/index.js.map +1 -1
  71. package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +18 -16
  72. package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  73. package/lib/commonjs/native-stack/types.js.map +1 -1
  74. package/lib/commonjs/native-stack/utils/HeaderHeightContext.js.map +1 -1
  75. package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
  76. package/lib/commonjs/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
  77. package/lib/commonjs/native-stack/utils/useBackPressSubscription.js.map +1 -1
  78. package/lib/commonjs/native-stack/utils/useHeaderHeight.js.map +1 -1
  79. package/lib/commonjs/native-stack/views/FontProcessor.js +1 -0
  80. package/lib/commonjs/native-stack/views/FontProcessor.js.map +1 -1
  81. package/lib/commonjs/native-stack/views/HeaderConfig.js +3 -1
  82. package/lib/commonjs/native-stack/views/HeaderConfig.js.map +1 -1
  83. package/lib/commonjs/native-stack/views/NativeStackView.js +14 -1
  84. package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
  85. package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  86. package/lib/commonjs/reanimated/ReanimatedScreen.js.map +1 -1
  87. package/lib/commonjs/reanimated/ReanimatedScreenProvider.js +3 -1
  88. package/lib/commonjs/reanimated/ReanimatedScreenProvider.js.map +1 -1
  89. package/lib/commonjs/reanimated/ReanimatedTransitionProgressContext.js.map +1 -1
  90. package/lib/commonjs/reanimated/index.js.map +1 -1
  91. package/lib/commonjs/reanimated/useReanimatedTransitionProgress.js.map +1 -1
  92. package/lib/commonjs/types.js.map +1 -1
  93. package/lib/commonjs/useTransitionProgress.js.map +1 -1
  94. package/lib/commonjs/utils.js.map +1 -1
  95. package/lib/module/fabric/FullWindowOverlayNativeComponent.js +0 -5
  96. package/lib/module/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
  97. package/lib/module/fabric/ScreenContainerNativeComponent.js +0 -5
  98. package/lib/module/fabric/ScreenContainerNativeComponent.js.map +1 -1
  99. package/lib/module/fabric/ScreenNativeComponent.js +0 -5
  100. package/lib/module/fabric/ScreenNativeComponent.js.map +1 -1
  101. package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js +0 -5
  102. package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
  103. package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -6
  104. package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
  105. package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -6
  106. package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
  107. package/lib/module/fabric/ScreenStackNativeComponent.js +0 -5
  108. package/lib/module/fabric/ScreenStackNativeComponent.js.map +1 -1
  109. package/lib/module/fabric/SearchBarNativeComponent.js +4 -6
  110. package/lib/module/fabric/SearchBarNativeComponent.js.map +1 -1
  111. package/lib/module/index.js +1 -1
  112. package/lib/module/index.js.map +1 -1
  113. package/lib/module/index.native.js +54 -11
  114. package/lib/module/index.native.js.map +1 -1
  115. package/lib/module/native-stack/navigators/createNativeStackNavigator.js +18 -16
  116. package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  117. package/lib/module/native-stack/types.js.map +1 -1
  118. package/lib/module/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
  119. package/lib/module/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
  120. package/lib/module/native-stack/utils/useBackPressSubscription.js.map +1 -1
  121. package/lib/module/native-stack/utils/useHeaderHeight.js.map +1 -1
  122. package/lib/module/native-stack/views/FontProcessor.js +1 -0
  123. package/lib/module/native-stack/views/FontProcessor.js.map +1 -1
  124. package/lib/module/native-stack/views/HeaderConfig.js +3 -1
  125. package/lib/module/native-stack/views/HeaderConfig.js.map +1 -1
  126. package/lib/module/native-stack/views/NativeStackView.js +15 -1
  127. package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
  128. package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  129. package/lib/module/reanimated/ReanimatedScreen.js.map +1 -1
  130. package/lib/module/reanimated/ReanimatedScreenProvider.js +3 -1
  131. package/lib/module/reanimated/ReanimatedScreenProvider.js.map +1 -1
  132. package/lib/module/reanimated/useReanimatedTransitionProgress.js.map +1 -1
  133. package/lib/module/types.js.map +1 -1
  134. package/lib/module/useTransitionProgress.js.map +1 -1
  135. package/lib/module/utils.js.map +1 -1
  136. package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts +6 -0
  137. package/lib/typescript/fabric/ScreenContainerNativeComponent.d.ts +6 -0
  138. package/lib/typescript/fabric/ScreenNativeComponent.d.ts +62 -0
  139. package/lib/typescript/fabric/ScreenNavigationContainerNativeComponent.d.ts +6 -0
  140. package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts +34 -0
  141. package/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts +9 -0
  142. package/lib/typescript/fabric/ScreenStackNativeComponent.d.ts +9 -0
  143. package/lib/typescript/fabric/SearchBarNativeComponent.d.ts +46 -0
  144. package/lib/typescript/index.d.ts +2 -2
  145. package/lib/typescript/native-stack/navigators/createNativeStackNavigator.d.ts +2 -2
  146. package/lib/typescript/native-stack/types.d.ts +55 -1
  147. package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts +1 -1
  148. package/lib/typescript/reanimated/ReanimatedScreen.d.ts +1 -1
  149. package/lib/typescript/types.d.ts +81 -2
  150. package/lib/typescript/useTransitionProgress.d.ts +3 -3
  151. package/native-stack/README.md +59 -1
  152. package/package.json +11 -14
  153. package/src/fabric/FullWindowOverlayNativeComponent.ts +6 -0
  154. package/src/fabric/ScreenContainerNativeComponent.ts +6 -0
  155. package/src/fabric/ScreenNativeComponent.ts +97 -0
  156. package/src/fabric/ScreenNavigationContainerNativeComponent.ts +9 -0
  157. package/src/fabric/ScreenStackHeaderConfigNativeComponent.ts +43 -0
  158. package/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts +20 -0
  159. package/src/fabric/ScreenStackNativeComponent.ts +12 -0
  160. package/src/fabric/SearchBarNativeComponent.ts +73 -0
  161. package/src/index.native.tsx +107 -14
  162. package/src/index.tsx +4 -3
  163. package/src/native-stack/navigators/createNativeStackNavigator.tsx +23 -19
  164. package/src/native-stack/types.tsx +55 -0
  165. package/src/native-stack/views/FontProcessor.tsx +1 -0
  166. package/src/native-stack/views/HeaderConfig.tsx +3 -1
  167. package/src/native-stack/views/NativeStackView.tsx +14 -2
  168. package/src/types.tsx +84 -2
  169. package/android/src/main/java/com/swmansion/rnscreens/LifecycleHelper.kt +0 -60
  170. package/createNativeStackNavigator/README.md +0 -522
  171. package/createNativeStackNavigator/package.json +0 -6
  172. package/lib/commonjs/createNativeStackNavigator.js +0 -374
  173. package/lib/commonjs/createNativeStackNavigator.js.map +0 -1
  174. package/lib/module/createNativeStackNavigator.js +0 -366
  175. package/lib/module/createNativeStackNavigator.js.map +0 -1
  176. package/lib/typescript/createNativeStackNavigator.d.ts +0 -51
  177. package/src/createNativeStackNavigator.tsx +0 -594
  178. package/src/fabric/FullWindowOverlayNativeComponent.js +0 -19
  179. package/src/fabric/ScreenContainerNativeComponent.js +0 -19
  180. package/src/fabric/ScreenNativeComponent.js +0 -104
  181. package/src/fabric/ScreenNavigationContainerNativeComponent.js +0 -19
  182. package/src/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -54
  183. package/src/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -31
  184. package/src/fabric/ScreenStackNativeComponent.js +0 -23
  185. package/src/fabric/SearchBarNativeComponent.js +0 -62
  186. /package/android/src/main/res/{anim → base/anim}/rns_default_enter_in.xml +0 -0
  187. /package/android/src/main/res/{anim → base/anim}/rns_default_enter_out.xml +0 -0
  188. /package/android/src/main/res/{anim → base/anim}/rns_default_exit_in.xml +0 -0
  189. /package/android/src/main/res/{anim → base/anim}/rns_default_exit_out.xml +0 -0
  190. /package/android/src/main/res/{anim → base/anim}/rns_fade_from_bottom.xml +0 -0
  191. /package/android/src/main/res/{anim → base/anim}/rns_fade_in.xml +0 -0
  192. /package/android/src/main/res/{anim → base/anim}/rns_fade_out.xml +0 -0
  193. /package/android/src/main/res/{anim → base/anim}/rns_fade_to_bottom.xml +0 -0
  194. /package/android/src/main/res/{anim → base/anim}/rns_no_animation_20.xml +0 -0
  195. /package/android/src/main/res/{anim → base/anim}/rns_no_animation_250.xml +0 -0
  196. /package/android/src/main/res/{anim → base/anim}/rns_no_animation_350.xml +0 -0
  197. /package/android/src/main/res/{anim → base/anim}/rns_no_animation_medium.xml +0 -0
  198. /package/android/src/main/res/{anim → base/anim}/rns_slide_in_from_bottom.xml +0 -0
  199. /package/android/src/main/res/{anim → base/anim}/rns_slide_in_from_left.xml +0 -0
  200. /package/android/src/main/res/{anim → base/anim}/rns_slide_in_from_right.xml +0 -0
  201. /package/android/src/main/res/{anim → base/anim}/rns_slide_out_to_bottom.xml +0 -0
  202. /package/android/src/main/res/{anim → base/anim}/rns_slide_out_to_left.xml +0 -0
  203. /package/android/src/main/res/{anim → base/anim}/rns_slide_out_to_right.xml +0 -0
@@ -0,0 +1,38 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+
3
+ <set xmlns:android="http://schemas.android.com/apk/res/android"
4
+ android:shareInterpolator="false">
5
+
6
+ <alpha
7
+ android:fromAlpha="1.0"
8
+ android:toAlpha="1.0"
9
+ android:fillEnabled="true"
10
+ android:fillBefore="true"
11
+ android:fillAfter="true"
12
+ android:interpolator="@android:interpolator/linear"
13
+ android:startOffset="0"
14
+ android:duration="450" />
15
+
16
+ <translate
17
+ android:fromXDelta="-10%"
18
+ android:toXDelta="0"
19
+ android:fillEnabled="true"
20
+ android:fillBefore="true"
21
+ android:fillAfter="true"
22
+ android:interpolator="@android:interpolator/fast_out_extra_slow_in"
23
+ android:startOffset="0"
24
+ android:duration="450" />
25
+
26
+ <extend
27
+ android:fromExtendLeft="0"
28
+ android:fromExtendTop="0"
29
+ android:fromExtendRight="10%"
30
+ android:fromExtendBottom="0"
31
+ android:toExtendLeft="0"
32
+ android:toExtendTop="0"
33
+ android:toExtendRight="10%"
34
+ android:toExtendBottom="0"
35
+ android:interpolator="@android:interpolator/fast_out_extra_slow_in"
36
+ android:startOffset="0"
37
+ android:duration="450" />
38
+ </set>
@@ -0,0 +1,38 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+
3
+ <set xmlns:android="http://schemas.android.com/apk/res/android"
4
+ android:shareInterpolator="false">
5
+
6
+ <alpha
7
+ android:fromAlpha="1.0"
8
+ android:toAlpha="0.0"
9
+ android:fillEnabled="true"
10
+ android:fillBefore="true"
11
+ android:fillAfter="true"
12
+ android:interpolator="@android:interpolator/linear"
13
+ android:startOffset="35"
14
+ android:duration="83" />
15
+
16
+ <translate
17
+ android:fromXDelta="0"
18
+ android:toXDelta="10%"
19
+ android:fillEnabled="true"
20
+ android:fillBefore="true"
21
+ android:fillAfter="true"
22
+ android:interpolator="@android:interpolator/fast_out_extra_slow_in"
23
+ android:startOffset="0"
24
+ android:duration="450" />
25
+
26
+ <extend
27
+ android:fromExtendLeft="10%"
28
+ android:fromExtendTop="0"
29
+ android:fromExtendRight="0"
30
+ android:fromExtendBottom="0"
31
+ android:toExtendLeft="10%"
32
+ android:toExtendTop="0"
33
+ android:toExtendRight="0"
34
+ android:toExtendBottom="0"
35
+ android:interpolator="@android:interpolator/fast_out_extra_slow_in"
36
+ android:startOffset="0"
37
+ android:duration="450" />
38
+ </set>
@@ -34,6 +34,9 @@ public class RNSScreenStackHeaderConfigManagerDelegate<T extends View, U extends
34
34
  case "backTitleFontSize":
35
35
  mViewManager.setBackTitleFontSize(view, value == null ? 0 : ((Double) value).intValue());
36
36
  break;
37
+ case "backTitleVisible":
38
+ mViewManager.setBackTitleVisible(view, value == null ? true : (boolean) value);
39
+ break;
37
40
  case "color":
38
41
  mViewManager.setColor(view, ColorPropConverter.getColor(value, view.getContext()));
39
42
  break;
@@ -17,6 +17,7 @@ public interface RNSScreenStackHeaderConfigManagerInterface<T extends View> {
17
17
  void setBackTitle(T view, @Nullable String value);
18
18
  void setBackTitleFontFamily(T view, @Nullable String value);
19
19
  void setBackTitleFontSize(T view, int value);
20
+ void setBackTitleVisible(T view, boolean value);
20
21
  void setColor(T view, @Nullable Integer value);
21
22
  void setDirection(T view, @Nullable String value);
22
23
  void setHidden(T view, boolean value);
@@ -1,8 +1,7 @@
1
1
  #pragma once
2
2
 
3
3
  #include <react/renderer/graphics/Float.h>
4
- #include <react/renderer/graphics/Geometry.h>
5
- #include <react/renderer/graphics/conversions.h>
4
+ #include <react/renderer/core/graphicsConversions.h>
6
5
 
7
6
  #ifdef ANDROID
8
7
  #include <folly/dynamic.h>
@@ -0,0 +1,11 @@
1
+ #ifdef RCT_NEW_ARCH_ENABLED
2
+
3
+ #include <React/RCTImageComponentView.h>
4
+
5
+ @interface RCTImageComponentView (RNSScreenStackHeaderConfig)
6
+
7
+ - (UIImage *)image;
8
+
9
+ @end
10
+
11
+ #endif // RCT_NEW_ARCH_ENABLED
@@ -0,0 +1,14 @@
1
+ #ifdef RCT_NEW_ARCH_ENABLED
2
+
3
+ #include "RCTImageComponentView+RNSScreenStackHeaderConfig.h"
4
+
5
+ @implementation RCTImageComponentView (RNSScreenStackHeaderConfig)
6
+
7
+ - (UIImage *)image
8
+ {
9
+ return _imageView.image;
10
+ }
11
+
12
+ @end
13
+
14
+ #endif // RCT_NEW_ARCH_ENABLED
package/ios/RNSConvert.h CHANGED
@@ -1,4 +1,4 @@
1
- #ifdef RN_FABRIC_ENABLED
1
+ #ifdef RCT_NEW_ARCH_ENABLED
2
2
  #import <react/renderer/components/rnscreens/Props.h>
3
3
  #import "RNSEnums.h"
4
4
 
@@ -33,4 +33,4 @@
33
33
 
34
34
  @end
35
35
 
36
- #endif // RN_FABRIC_ENABLED
36
+ #endif // RCT_NEW_ARCH_ENABLED
package/ios/RNSConvert.mm CHANGED
@@ -1,6 +1,6 @@
1
1
  #import "RNSConvert.h"
2
2
 
3
- #ifdef RN_FABRIC_ENABLED
3
+ #ifdef RCT_NEW_ARCH_ENABLED
4
4
  @implementation RNSConvert
5
5
 
6
6
  + (RNSScreenStackPresentation)RNSScreenStackPresentationFromCppEquivalent:
@@ -143,4 +143,4 @@
143
143
 
144
144
  @end
145
145
 
146
- #endif // RN_FABRIC_ENABLED
146
+ #endif // RCT_NEW_ARCH_ENABLED
@@ -1,6 +1,6 @@
1
1
  #import <React/RCTViewManager.h>
2
2
 
3
- #ifdef RN_FABRIC_ENABLED
3
+ #ifdef RCT_NEW_ARCH_ENABLED
4
4
  #import <React/RCTViewComponentView.h>
5
5
  #else
6
6
  #import <React/RCTInvalidating.h>
@@ -16,15 +16,15 @@
16
16
  @end
17
17
 
18
18
  @interface RNSFullWindowOverlay :
19
- #ifdef RN_FABRIC_ENABLED
19
+ #ifdef RCT_NEW_ARCH_ENABLED
20
20
  RCTViewComponentView
21
21
  #else
22
22
  RCTView <RCTInvalidating>
23
- #endif // RN_FABRIC_ENABLED
23
+ #endif // RCT_NEW_ARCH_ENABLED
24
24
 
25
- #ifdef RN_FABRIC_ENABLED
25
+ #ifdef RCT_NEW_ARCH_ENABLED
26
26
  @property (nonatomic) facebook::react::LayoutMetrics oldLayoutMetrics;
27
27
  @property (nonatomic) facebook::react::LayoutMetrics newLayoutMetrics;
28
- #endif // RN_FABRIC_ENABLED
28
+ #endif // RCT_NEW_ARCH_ENABLED
29
29
 
30
30
  @end
@@ -2,7 +2,7 @@
2
2
 
3
3
  #import "RNSFullWindowOverlay.h"
4
4
 
5
- #ifdef RN_FABRIC_ENABLED
5
+ #ifdef RCT_NEW_ARCH_ENABLED
6
6
  #import <React/RCTConversions.h>
7
7
  #import <React/RCTFabricComponentsPlugins.h>
8
8
  #import <React/RCTSurfaceTouchHandler.h>
@@ -11,7 +11,7 @@
11
11
  #import <react/renderer/components/rnscreens/RCTComponentViewHelpers.h>
12
12
  #else
13
13
  #import <React/RCTTouchHandler.h>
14
- #endif // RN_FABRIC_ENABLED
14
+ #endif // RCT_NEW_ARCH_ENABLED
15
15
 
16
16
  @implementation RNSFullWindowOverlayContainer
17
17
 
@@ -63,14 +63,14 @@
63
63
  __weak RCTBridge *_bridge;
64
64
  RNSFullWindowOverlayContainer *_container;
65
65
  CGRect _reactFrame;
66
- #ifdef RN_FABRIC_ENABLED
66
+ #ifdef RCT_NEW_ARCH_ENABLED
67
67
  RCTSurfaceTouchHandler *_touchHandler;
68
68
  #else
69
69
  RCTTouchHandler *_touchHandler;
70
- #endif // RN_FABRIC_ENABLED
70
+ #endif // RCT_NEW_ARCH_ENABLED
71
71
  }
72
72
 
73
- #ifdef RN_FABRIC_ENABLED
73
+ #ifdef RCT_NEW_ARCH_ENABLED
74
74
  - (instancetype)init
75
75
  {
76
76
  if (self = [super init]) {
@@ -80,7 +80,7 @@
80
80
  }
81
81
  return self;
82
82
  }
83
- #endif // RN_FABRIC_ENABLED
83
+ #endif // RCT_NEW_ARCH_ENABLED
84
84
 
85
85
  - (instancetype)initWithBridge:(RCTBridge *)bridge
86
86
  {
@@ -128,7 +128,7 @@
128
128
  }
129
129
  } else {
130
130
  if (_touchHandler == nil) {
131
- #ifdef RN_FABRIC_ENABLED
131
+ #ifdef RCT_NEW_ARCH_ENABLED
132
132
  _touchHandler = [RCTSurfaceTouchHandler new];
133
133
  #else
134
134
  _touchHandler = [[RCTTouchHandler alloc] initWithBridge:_bridge];
@@ -138,7 +138,7 @@
138
138
  }
139
139
  }
140
140
 
141
- #ifdef RN_FABRIC_ENABLED
141
+ #ifdef RCT_NEW_ARCH_ENABLED
142
142
  #pragma mark - Fabric Specific
143
143
 
144
144
  // When the component unmounts we remove it from window's children,
@@ -205,27 +205,27 @@
205
205
  _container = nil;
206
206
  }
207
207
 
208
- #endif // RN_FABRIC_ENABLED
208
+ #endif // RCT_NEW_ARCH_ENABLED
209
209
 
210
210
  @end
211
211
 
212
- #ifdef RN_FABRIC_ENABLED
212
+ #ifdef RCT_NEW_ARCH_ENABLED
213
213
  Class<RCTComponentViewProtocol> RNSFullWindowOverlayCls(void)
214
214
  {
215
215
  return RNSFullWindowOverlay.class;
216
216
  }
217
- #endif // RN_FABRIC_ENABLED
217
+ #endif // RCT_NEW_ARCH_ENABLED
218
218
 
219
219
  @implementation RNSFullWindowOverlayManager
220
220
 
221
221
  RCT_EXPORT_MODULE()
222
222
 
223
- #ifdef RN_FABRIC_ENABLED
223
+ #ifdef RCT_NEW_ARCH_ENABLED
224
224
  #else
225
225
  - (UIView *)view
226
226
  {
227
227
  return [[RNSFullWindowOverlay alloc] initWithBridge:self.bridge];
228
228
  }
229
- #endif // RN_FABRIC_ENABLED
229
+ #endif // RCT_NEW_ARCH_ENABLED
230
230
 
231
231
  @end
package/ios/RNSScreen.h CHANGED
@@ -4,7 +4,7 @@
4
4
  #import "RNSEnums.h"
5
5
  #import "RNSScreenContainer.h"
6
6
 
7
- #if RN_FABRIC_ENABLED
7
+ #if RCT_NEW_ARCH_ENABLED
8
8
  #import <React/RCTViewComponentView.h>
9
9
  #else
10
10
  #import <React/RCTView.h>
@@ -33,7 +33,7 @@ NS_ASSUME_NONNULL_BEGIN
33
33
  - (UIViewController *)findChildVCForConfigAndTrait:(RNSWindowTrait)trait includingModals:(BOOL)includingModals;
34
34
  - (void)notifyFinishTransitioning;
35
35
  - (RNSScreenView *)screenView;
36
- #ifdef RN_FABRIC_ENABLED
36
+ #ifdef RCT_NEW_ARCH_ENABLED
37
37
  - (void)setViewToSnapshot:(UIView *)snapshot;
38
38
  - (void)resetViewToScreen;
39
39
  #endif
@@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN
41
41
  @end
42
42
 
43
43
  @interface RNSScreenView :
44
- #ifdef RN_FABRIC_ENABLED
44
+ #ifdef RCT_NEW_ARCH_ENABLED
45
45
  RCTViewComponentView
46
46
  #else
47
47
  RCTView
@@ -84,7 +84,7 @@ NS_ASSUME_NONNULL_BEGIN
84
84
  @property (nonatomic) BOOL sheetExpandsWhenScrolledToEdge;
85
85
  #endif // !TARGET_OS_TV
86
86
 
87
- #ifdef RN_FABRIC_ENABLED
87
+ #ifdef RCT_NEW_ARCH_ENABLED
88
88
  // we recreate the behavior of `reactSetFrame` on new architecture
89
89
  @property (nonatomic) facebook::react::LayoutMetrics oldLayoutMetrics;
90
90
  @property (nonatomic) facebook::react::LayoutMetrics newLayoutMetrics;
@@ -97,11 +97,11 @@ NS_ASSUME_NONNULL_BEGIN
97
97
  @property (nonatomic, copy) RCTDirectEventBlock onWillDisappear;
98
98
  @property (nonatomic, copy) RCTDirectEventBlock onNativeDismissCancelled;
99
99
  @property (nonatomic, copy) RCTDirectEventBlock onTransitionProgress;
100
- #endif // RN_FABRIC_ENABLED
100
+ #endif // RCT_NEW_ARCH_ENABLED
101
101
 
102
102
  - (void)notifyFinishTransitioning;
103
103
 
104
- #ifdef RN_FABRIC_ENABLED
104
+ #ifdef RCT_NEW_ARCH_ENABLED
105
105
  - (void)notifyWillAppear;
106
106
  - (void)notifyWillDisappear;
107
107
  - (void)notifyAppear;
@@ -111,6 +111,7 @@ NS_ASSUME_NONNULL_BEGIN
111
111
  #endif
112
112
 
113
113
  - (void)notifyTransitionProgress:(double)progress closing:(BOOL)closing goingForward:(BOOL)goingForward;
114
+ - (void)notifyDismissCancelledWithDismissCount:(int)dismissCount;
114
115
  - (BOOL)isModal;
115
116
 
116
117
  @end
package/ios/RNSScreen.mm CHANGED
@@ -4,7 +4,7 @@
4
4
  #import "RNSScreenContainer.h"
5
5
  #import "RNSScreenWindowTraits.h"
6
6
 
7
- #ifdef RN_FABRIC_ENABLED
7
+ #ifdef RCT_NEW_ARCH_ENABLED
8
8
  #import <React/RCTConversions.h>
9
9
  #import <React/RCTFabricComponentsPlugins.h>
10
10
  #import <React/RCTRootComponentView.h>
@@ -25,7 +25,7 @@
25
25
  #import "RNSScreenStackHeaderConfig.h"
26
26
 
27
27
  @interface RNSScreenView ()
28
- #ifdef RN_FABRIC_ENABLED
28
+ #ifdef RCT_NEW_ARCH_ENABLED
29
29
  <RCTRNSScreenViewProtocol, UIAdaptivePresentationControllerDelegate>
30
30
  #else
31
31
  <UIAdaptivePresentationControllerDelegate, RCTInvalidating>
@@ -34,7 +34,7 @@
34
34
 
35
35
  @implementation RNSScreenView {
36
36
  __weak RCTBridge *_bridge;
37
- #ifdef RN_FABRIC_ENABLED
37
+ #ifdef RCT_NEW_ARCH_ENABLED
38
38
  RCTSurfaceTouchHandler *_touchHandler;
39
39
  facebook::react::RNSScreenShadowNode::ConcreteState::Shared _state;
40
40
  // on fabric, they are not available by default so we need them exposed here too
@@ -45,7 +45,7 @@
45
45
  #endif
46
46
  }
47
47
 
48
- #ifdef RN_FABRIC_ENABLED
48
+ #ifdef RCT_NEW_ARCH_ENABLED
49
49
  - (instancetype)initWithFrame:(CGRect)frame
50
50
  {
51
51
  if (self = [super initWithFrame:frame]) {
@@ -57,7 +57,7 @@
57
57
 
58
58
  return self;
59
59
  }
60
- #endif // RN_FABRIC_ENABLED
60
+ #endif // RCT_NEW_ARCH_ENABLED
61
61
 
62
62
  - (instancetype)initWithBridge:(RCTBridge *)bridge
63
63
  {
@@ -92,7 +92,7 @@
92
92
  return _controller;
93
93
  }
94
94
 
95
- #ifdef RN_FABRIC_ENABLED
95
+ #ifdef RCT_NEW_ARCH_ENABLED
96
96
  - (NSArray<UIView *> *)reactSubviews
97
97
  {
98
98
  return _reactSubviews;
@@ -101,7 +101,7 @@
101
101
 
102
102
  - (void)updateBounds
103
103
  {
104
- #ifdef RN_FABRIC_ENABLED
104
+ #ifdef RCT_NEW_ARCH_ENABLED
105
105
  if (_state != nullptr) {
106
106
  auto newState = facebook::react::RNSScreenState{RCTSizeFromCGSize(self.bounds.size)};
107
107
  _state->updateState(std::move(newState));
@@ -161,7 +161,7 @@
161
161
  // https://developer.apple.com/documentation/uikit/uiviewcontroller/1621426-presentationcontroller?language=objc
162
162
  _controller.presentationController.delegate = self;
163
163
  } else if (_stackPresentation != RNSScreenStackPresentationPush) {
164
- #ifdef RN_FABRIC_ENABLED
164
+ #ifdef RCT_NEW_ARCH_ENABLED
165
165
  // TODO: on Fabric, same controllers can be used as modals and then recycled and used a push which would result in
166
166
  // this error. It would be good to check if it doesn't leak in such case.
167
167
  #else
@@ -280,7 +280,7 @@
280
280
 
281
281
  - (void)notifyDismissedWithCount:(int)dismissCount
282
282
  {
283
- #ifdef RN_FABRIC_ENABLED
283
+ #ifdef RCT_NEW_ARCH_ENABLED
284
284
  // If screen is already unmounted then there will be no event emitter
285
285
  // it will be cleaned in prepareForRecycle
286
286
  if (_eventEmitter != nullptr) {
@@ -302,7 +302,7 @@
302
302
 
303
303
  - (void)notifyDismissCancelledWithDismissCount:(int)dismissCount
304
304
  {
305
- #ifdef RN_FABRIC_ENABLED
305
+ #ifdef RCT_NEW_ARCH_ENABLED
306
306
  // If screen is already unmounted then there will be no event emitter
307
307
  // it will be cleaned in prepareForRecycle
308
308
  if (_eventEmitter != nullptr) {
@@ -319,7 +319,7 @@
319
319
 
320
320
  - (void)notifyWillAppear
321
321
  {
322
- #ifdef RN_FABRIC_ENABLED
322
+ #ifdef RCT_NEW_ARCH_ENABLED
323
323
  // If screen is already unmounted then there will be no event emitter
324
324
  // it will be cleaned in prepareForRecycle
325
325
  if (_eventEmitter != nullptr) {
@@ -342,7 +342,7 @@
342
342
  if (_hideKeyboardOnSwipe) {
343
343
  [self endEditing:YES];
344
344
  }
345
- #ifdef RN_FABRIC_ENABLED
345
+ #ifdef RCT_NEW_ARCH_ENABLED
346
346
  // If screen is already unmounted then there will be no event emitter
347
347
  // it will be cleaned in prepareForRecycle
348
348
  if (_eventEmitter != nullptr) {
@@ -358,7 +358,7 @@
358
358
 
359
359
  - (void)notifyAppear
360
360
  {
361
- #ifdef RN_FABRIC_ENABLED
361
+ #ifdef RCT_NEW_ARCH_ENABLED
362
362
  // If screen is already unmounted then there will be no event emitter
363
363
  // it will be cleaned in prepareForRecycle
364
364
  if (_eventEmitter != nullptr) {
@@ -378,7 +378,7 @@
378
378
 
379
379
  - (void)notifyDisappear
380
380
  {
381
- #ifdef RN_FABRIC_ENABLED
381
+ #ifdef RCT_NEW_ARCH_ENABLED
382
382
  // If screen is already unmounted then there will be no event emitter
383
383
  // it will be cleaned in prepareForRecycle
384
384
  if (_eventEmitter != nullptr) {
@@ -394,7 +394,7 @@
394
394
 
395
395
  - (BOOL)isMountedUnderScreenOrReactRoot
396
396
  {
397
- #ifdef RN_FABRIC_ENABLED
397
+ #ifdef RCT_NEW_ARCH_ENABLED
398
398
  #define RNS_EXPECTED_VIEW RCTRootComponentView
399
399
  #else
400
400
  #define RNS_EXPECTED_VIEW RCTRootView
@@ -415,7 +415,7 @@
415
415
  // root application window.
416
416
  if (self.window != nil && ![self isMountedUnderScreenOrReactRoot]) {
417
417
  if (_touchHandler == nil) {
418
- #ifdef RN_FABRIC_ENABLED
418
+ #ifdef RCT_NEW_ARCH_ENABLED
419
419
  _touchHandler = [RCTSurfaceTouchHandler new];
420
420
  #else
421
421
  _touchHandler = [[RCTTouchHandler alloc] initWithBridge:_bridge];
@@ -427,7 +427,7 @@
427
427
  }
428
428
  }
429
429
 
430
- #ifdef RN_FABRIC_ENABLED
430
+ #ifdef RCT_NEW_ARCH_ENABLED
431
431
  - (RCTSurfaceTouchHandler *)touchHandler
432
432
  #else
433
433
  - (RCTTouchHandler *)touchHandler
@@ -452,7 +452,7 @@
452
452
 
453
453
  - (void)notifyTransitionProgress:(double)progress closing:(BOOL)closing goingForward:(BOOL)goingForward
454
454
  {
455
- #ifdef RN_FABRIC_ENABLED
455
+ #ifdef RCT_NEW_ARCH_ENABLED
456
456
  if (_eventEmitter != nullptr) {
457
457
  std::dynamic_pointer_cast<const facebook::react::RNSScreenEventEmitter>(_eventEmitter)
458
458
  ->onTransitionProgress(facebook::react::RNSScreenEventEmitter::OnTransitionProgress{
@@ -487,7 +487,7 @@
487
487
  // pulling down starting at some touchable item. Without "reset" the touchable
488
488
  // will never go back from highlighted state even when the modal start sliding
489
489
  // down.
490
- #ifdef RN_FABRIC_ENABLED
490
+ #ifdef RCT_NEW_ARCH_ENABLED
491
491
  [_touchHandler setEnabled:NO];
492
492
  [_touchHandler setEnabled:YES];
493
493
  #else
@@ -572,7 +572,7 @@
572
572
  #endif // !TARGET_OS_TV
573
573
 
574
574
  #pragma mark - Fabric specific
575
- #ifdef RN_FABRIC_ENABLED
575
+ #ifdef RCT_NEW_ARCH_ENABLED
576
576
 
577
577
  + (facebook::react::ComponentDescriptorProvider)componentDescriptorProvider
578
578
  {
@@ -693,11 +693,6 @@
693
693
  [self setStackPresentation:newStackPresentation];
694
694
  }
695
695
 
696
- #if !TARGET_OS_TV
697
- // This must be called after setter for stackPresentation
698
- [self updatePresentationStyle];
699
- #endif // !TARGET_OS_TV
700
-
701
696
  if (newScreenProps.stackAnimation != oldScreenProps.stackAnimation) {
702
697
  [self setStackAnimation:[RNSConvert RNSScreenStackAnimationFromCppEquivalent:newScreenProps.stackAnimation]];
703
698
  }
@@ -733,6 +728,13 @@
733
728
  // Explanation taken from `reactSetFrame`, which is old arch equivalent of this code.
734
729
  }
735
730
 
731
+ - (void)finalizeUpdates:(RNComponentViewUpdateMask)updateMask
732
+ {
733
+ #if !TARGET_OS_TV
734
+ [self updatePresentationStyle];
735
+ #endif // !TARGET_OS_TV
736
+ }
737
+
736
738
  #pragma mark - Paper specific
737
739
  #else
738
740
 
@@ -773,7 +775,7 @@
773
775
 
774
776
  @end
775
777
 
776
- #ifdef RN_FABRIC_ENABLED
778
+ #ifdef RCT_NEW_ARCH_ENABLED
777
779
  Class<RCTComponentViewProtocol> RNSScreenCls(void)
778
780
  {
779
781
  return RNSScreenView.class;
@@ -804,7 +806,7 @@ Class<RCTComponentViewProtocol> RNSScreenCls(void)
804
806
  self.view = view;
805
807
  _fakeView = [UIView new];
806
808
  _shouldNotify = YES;
807
- #ifdef RN_FABRIC_ENABLED
809
+ #ifdef RCT_NEW_ARCH_ENABLED
808
810
  _initialView = (RNSScreenView *)view;
809
811
  #endif
810
812
  }
@@ -893,7 +895,7 @@ Class<RCTComponentViewProtocol> RNSScreenCls(void)
893
895
  - (void)viewDidDisappear:(BOOL)animated
894
896
  {
895
897
  [super viewDidDisappear:animated];
896
- #ifdef RN_FABRIC_ENABLED
898
+ #ifdef RCT_NEW_ARCH_ENABLED
897
899
  [self resetViewToScreen];
898
900
  #endif
899
901
  if (self.parentViewController == nil && self.presentingViewController == nil) {
@@ -915,7 +917,7 @@ Class<RCTComponentViewProtocol> RNSScreenCls(void)
915
917
 
916
918
  _isSwiping = NO;
917
919
  _shouldNotify = YES;
918
- #ifdef RN_FABRIC_ENABLED
920
+ #ifdef RCT_NEW_ARCH_ENABLED
919
921
  #else
920
922
  [self traverseForScrollView:self.screenView];
921
923
  #endif
@@ -935,7 +937,7 @@ Class<RCTComponentViewProtocol> RNSScreenCls(void)
935
937
  BOOL isPresentedAsNativeModal = self.parentViewController == nil && self.presentingViewController != nil;
936
938
 
937
939
  if (isDisplayedWithinUINavController || isPresentedAsNativeModal) {
938
- #ifdef RN_FABRIC_ENABLED
940
+ #ifdef RCT_NEW_ARCH_ENABLED
939
941
  [self.screenView updateBounds];
940
942
  #else
941
943
  if (!CGRectEqualToRect(_lastViewFrame, self.screenView.frame)) {
@@ -1157,7 +1159,7 @@ Class<RCTComponentViewProtocol> RNSScreenCls(void)
1157
1159
  // when we want to check props of ScreenView, we need to get them from _initialView
1158
1160
  - (RNSScreenView *)screenView
1159
1161
  {
1160
- #ifdef RN_FABRIC_ENABLED
1162
+ #ifdef RCT_NEW_ARCH_ENABLED
1161
1163
  return _initialView;
1162
1164
  #else
1163
1165
  return (RNSScreenView *)self.view;
@@ -1184,7 +1186,7 @@ Class<RCTComponentViewProtocol> RNSScreenCls(void)
1184
1186
 
1185
1187
  BOOL wasSearchBarActive = prevNavigationItem.searchController.active;
1186
1188
 
1187
- #ifdef RN_FABRIC_ENABLED
1189
+ #ifdef RCT_NEW_ARCH_ENABLED
1188
1190
  BOOL shouldHideHeader = !config.show;
1189
1191
  #else
1190
1192
  BOOL shouldHideHeader = config.hide;
@@ -1201,7 +1203,7 @@ Class<RCTComponentViewProtocol> RNSScreenCls(void)
1201
1203
  #endif
1202
1204
  }
1203
1205
 
1204
- #ifdef RN_FABRIC_ENABLED
1206
+ #ifdef RCT_NEW_ARCH_ENABLED
1205
1207
  #pragma mark - Fabric specific
1206
1208
 
1207
1209
  - (void)setViewToSnapshot:(UIView *)snapshot
@@ -1,4 +1,4 @@
1
- #ifdef RN_FABRIC_ENABLED
1
+ #ifdef RCT_NEW_ARCH_ENABLED
2
2
  #import <React/RCTViewComponentView.h>
3
3
  #else
4
4
  #endif
@@ -29,7 +29,7 @@ NS_ASSUME_NONNULL_BEGIN
29
29
  @end
30
30
 
31
31
  @interface RNSScreenContainerView :
32
- #ifdef RN_FABRIC_ENABLED
32
+ #ifdef RCT_NEW_ARCH_ENABLED
33
33
  RCTViewComponentView <RNSScreenContainerDelegate>
34
34
  #else
35
35
  UIView <RNSScreenContainerDelegate, RCTInvalidating>
@@ -1,7 +1,7 @@
1
1
  #import "RNSScreenContainer.h"
2
2
  #import "RNSScreen.h"
3
3
 
4
- #ifdef RN_FABRIC_ENABLED
4
+ #ifdef RCT_NEW_ARCH_ENABLED
5
5
  #import <React/RCTConversions.h>
6
6
  #import <React/RCTFabricComponentsPlugins.h>
7
7
  #import <react/renderer/components/rnscreens/ComponentDescriptors.h>
@@ -58,7 +58,7 @@
58
58
  - (instancetype)init
59
59
  {
60
60
  if (self = [super init]) {
61
- #ifdef RN_FABRIC_ENABLED
61
+ #ifdef RCT_NEW_ARCH_ENABLED
62
62
  static const auto defaultProps = std::make_shared<const facebook::react::RNSScreenContainerProps>();
63
63
  _props = defaultProps;
64
64
  #endif
@@ -234,7 +234,7 @@
234
234
  [super layoutSubviews];
235
235
  _controller.view.frame = self.bounds;
236
236
  for (RNSScreenView *subview in _reactSubviews) {
237
- #ifdef RN_FABRIC_ENABLED
237
+ #ifdef RCT_NEW_ARCH_ENABLED
238
238
  facebook::react::LayoutMetrics screenLayoutMetrics = subview.newLayoutMetrics;
239
239
  screenLayoutMetrics.frame = RCTRectFromCGRect(CGRectMake(0, 0, self.bounds.size.width, self.bounds.size.height));
240
240
  [subview updateLayoutMetrics:screenLayoutMetrics oldLayoutMetrics:subview.oldLayoutMetrics];
@@ -246,7 +246,7 @@
246
246
  }
247
247
 
248
248
  #pragma mark-- Fabric specific
249
- #ifdef RN_FABRIC_ENABLED
249
+ #ifdef RCT_NEW_ARCH_ENABLED
250
250
 
251
251
  - (void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView index:(NSInteger)index
252
252
  {
@@ -321,7 +321,7 @@
321
321
 
322
322
  @end
323
323
 
324
- #ifdef RN_FABRIC_ENABLED
324
+ #ifdef RCT_NEW_ARCH_ENABLED
325
325
  Class<RCTComponentViewProtocol> RNSScreenContainerCls(void)
326
326
  {
327
327
  return RNSScreenContainerView.class;