react-native-screens 3.20.0 → 3.21.1

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 (210) hide show
  1. package/README.md +4 -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/LifecycleHelper.kt +60 -0
  6. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfig.kt +7 -9
  7. package/android/src/main/java/com/swmansion/rnscreens/ScreenStackHeaderConfigViewManager.kt +12 -4
  8. package/android/src/main/java/com/swmansion/rnscreens/ScreenViewManager.kt +10 -0
  9. package/android/src/main/java/com/swmansion/rnscreens/SearchBarManager.kt +32 -8
  10. package/android/src/main/java/com/swmansion/rnscreens/SearchBarView.kt +36 -15
  11. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderAttachedEvent.kt +24 -0
  12. package/android/src/main/java/com/swmansion/rnscreens/events/HeaderDetachedEvent.kt +24 -0
  13. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarBlurEvent.kt +24 -0
  14. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarChangeTextEvent.kt +29 -0
  15. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarCloseEvent.kt +24 -0
  16. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarFocusEvent.kt +24 -0
  17. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarOpenEvent.kt +24 -0
  18. package/android/src/main/java/com/swmansion/rnscreens/events/SearchBarSearchButtonPressEvent.kt +26 -0
  19. package/android/src/main/res/base/anim/rns_standard_accelerate_interpolator.xml +6 -0
  20. package/android/src/main/res/v33/anim-v33/rns_default_enter_in.xml +38 -0
  21. package/android/src/main/res/v33/anim-v33/rns_default_enter_out.xml +38 -0
  22. package/android/src/main/res/v33/anim-v33/rns_default_exit_in.xml +38 -0
  23. package/android/src/main/res/v33/anim-v33/rns_default_exit_out.xml +38 -0
  24. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerDelegate.java +15 -0
  25. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenManagerInterface.java +5 -0
  26. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerDelegate.java +3 -0
  27. package/android/src/paper/java/com/facebook/react/viewmanagers/RNSScreenStackHeaderConfigManagerInterface.java +1 -0
  28. package/common/cpp/react/renderer/components/rnscreens/RNSScreenState.h +1 -2
  29. package/ios/RCTImageComponentView+RNSScreenStackHeaderConfig.h +11 -0
  30. package/ios/RCTImageComponentView+RNSScreenStackHeaderConfig.mm +14 -0
  31. package/ios/RNSConvert.h +8 -2
  32. package/ios/RNSConvert.mm +28 -2
  33. package/ios/RNSEnums.h +6 -0
  34. package/ios/RNSFullWindowOverlay.h +5 -5
  35. package/ios/RNSFullWindowOverlay.mm +13 -13
  36. package/ios/RNSScreen.h +14 -6
  37. package/ios/RNSScreen.mm +129 -28
  38. package/ios/RNSScreenContainer.h +2 -2
  39. package/ios/RNSScreenContainer.mm +5 -5
  40. package/ios/RNSScreenNavigationContainer.mm +3 -3
  41. package/ios/RNSScreenStack.h +4 -4
  42. package/ios/RNSScreenStack.mm +62 -23
  43. package/ios/RNSScreenStackHeaderConfig.h +10 -3
  44. package/ios/RNSScreenStackHeaderConfig.mm +138 -81
  45. package/ios/RNSScreenStackHeaderSubview.h +5 -6
  46. package/ios/RNSScreenStackHeaderSubview.mm +20 -11
  47. package/ios/RNSScreenWindowTraits.mm +21 -2
  48. package/ios/RNSSearchBar.h +5 -4
  49. package/ios/RNSSearchBar.mm +87 -12
  50. package/lib/commonjs/TransitionProgressContext.js.map +1 -1
  51. package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js +0 -5
  52. package/lib/commonjs/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
  53. package/lib/commonjs/fabric/ScreenContainerNativeComponent.js +0 -5
  54. package/lib/commonjs/fabric/ScreenContainerNativeComponent.js.map +1 -1
  55. package/lib/commonjs/fabric/ScreenNativeComponent.js +0 -5
  56. package/lib/commonjs/fabric/ScreenNativeComponent.js.map +1 -1
  57. package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js +0 -5
  58. package/lib/commonjs/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
  59. package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -8
  60. package/lib/commonjs/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
  61. package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -8
  62. package/lib/commonjs/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
  63. package/lib/commonjs/fabric/ScreenStackNativeComponent.js +0 -5
  64. package/lib/commonjs/fabric/ScreenStackNativeComponent.js.map +1 -1
  65. package/lib/commonjs/fabric/SearchBarNativeComponent.js +7 -7
  66. package/lib/commonjs/fabric/SearchBarNativeComponent.js.map +1 -1
  67. package/lib/commonjs/index.js +8 -1
  68. package/lib/commonjs/index.js.map +1 -1
  69. package/lib/commonjs/index.native.js +51 -10
  70. package/lib/commonjs/index.native.js.map +1 -1
  71. package/lib/commonjs/native-stack/index.js.map +1 -1
  72. package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js +18 -16
  73. package/lib/commonjs/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  74. package/lib/commonjs/native-stack/types.js.map +1 -1
  75. package/lib/commonjs/native-stack/utils/HeaderHeightContext.js.map +1 -1
  76. package/lib/commonjs/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
  77. package/lib/commonjs/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
  78. package/lib/commonjs/native-stack/utils/useBackPressSubscription.js.map +1 -1
  79. package/lib/commonjs/native-stack/utils/useHeaderHeight.js.map +1 -1
  80. package/lib/commonjs/native-stack/views/FontProcessor.js +1 -0
  81. package/lib/commonjs/native-stack/views/FontProcessor.js.map +1 -1
  82. package/lib/commonjs/native-stack/views/HeaderConfig.js +3 -1
  83. package/lib/commonjs/native-stack/views/HeaderConfig.js.map +1 -1
  84. package/lib/commonjs/native-stack/views/NativeStackView.js +14 -1
  85. package/lib/commonjs/native-stack/views/NativeStackView.js.map +1 -1
  86. package/lib/commonjs/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  87. package/lib/commonjs/reanimated/ReanimatedScreen.js.map +1 -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 +8 -1
  95. package/lib/commonjs/utils.js.map +1 -1
  96. package/lib/module/fabric/FullWindowOverlayNativeComponent.js +0 -5
  97. package/lib/module/fabric/FullWindowOverlayNativeComponent.js.map +1 -1
  98. package/lib/module/fabric/ScreenContainerNativeComponent.js +0 -5
  99. package/lib/module/fabric/ScreenContainerNativeComponent.js.map +1 -1
  100. package/lib/module/fabric/ScreenNativeComponent.js +0 -5
  101. package/lib/module/fabric/ScreenNativeComponent.js.map +1 -1
  102. package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js +0 -5
  103. package/lib/module/fabric/ScreenNavigationContainerNativeComponent.js.map +1 -1
  104. package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -6
  105. package/lib/module/fabric/ScreenStackHeaderConfigNativeComponent.js.map +1 -1
  106. package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -6
  107. package/lib/module/fabric/ScreenStackHeaderSubviewNativeComponent.js.map +1 -1
  108. package/lib/module/fabric/ScreenStackNativeComponent.js +0 -5
  109. package/lib/module/fabric/ScreenStackNativeComponent.js.map +1 -1
  110. package/lib/module/fabric/SearchBarNativeComponent.js +4 -6
  111. package/lib/module/fabric/SearchBarNativeComponent.js.map +1 -1
  112. package/lib/module/index.js +2 -2
  113. package/lib/module/index.js.map +1 -1
  114. package/lib/module/index.native.js +53 -11
  115. package/lib/module/index.native.js.map +1 -1
  116. package/lib/module/native-stack/navigators/createNativeStackNavigator.js +18 -16
  117. package/lib/module/native-stack/navigators/createNativeStackNavigator.js.map +1 -1
  118. package/lib/module/native-stack/types.js.map +1 -1
  119. package/lib/module/native-stack/utils/SafeAreaProviderCompat.js.map +1 -1
  120. package/lib/module/native-stack/utils/getDefaultHeaderHeight.js.map +1 -1
  121. package/lib/module/native-stack/utils/useBackPressSubscription.js.map +1 -1
  122. package/lib/module/native-stack/utils/useHeaderHeight.js.map +1 -1
  123. package/lib/module/native-stack/views/FontProcessor.js +1 -0
  124. package/lib/module/native-stack/views/FontProcessor.js.map +1 -1
  125. package/lib/module/native-stack/views/HeaderConfig.js +3 -1
  126. package/lib/module/native-stack/views/HeaderConfig.js.map +1 -1
  127. package/lib/module/native-stack/views/NativeStackView.js +15 -1
  128. package/lib/module/native-stack/views/NativeStackView.js.map +1 -1
  129. package/lib/module/reanimated/ReanimatedNativeStackScreen.js.map +1 -1
  130. package/lib/module/reanimated/ReanimatedScreen.js.map +1 -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 +6 -0
  136. package/lib/module/utils.js.map +1 -1
  137. package/lib/typescript/TransitionProgressContext.d.ts +1 -1
  138. package/lib/typescript/fabric/FullWindowOverlayNativeComponent.d.ts +6 -0
  139. package/lib/typescript/fabric/ScreenContainerNativeComponent.d.ts +6 -0
  140. package/lib/typescript/fabric/ScreenNativeComponent.d.ts +62 -0
  141. package/lib/typescript/fabric/ScreenNavigationContainerNativeComponent.d.ts +6 -0
  142. package/lib/typescript/fabric/ScreenStackHeaderConfigNativeComponent.d.ts +34 -0
  143. package/lib/typescript/fabric/ScreenStackHeaderSubviewNativeComponent.d.ts +9 -0
  144. package/lib/typescript/fabric/ScreenStackNativeComponent.d.ts +9 -0
  145. package/lib/typescript/fabric/SearchBarNativeComponent.d.ts +46 -0
  146. package/lib/typescript/index.d.ts +3 -3
  147. package/lib/typescript/native-stack/types.d.ts +64 -10
  148. package/lib/typescript/native-stack/utils/SafeAreaProviderCompat.d.ts +1 -1
  149. package/lib/typescript/native-stack/utils/getDefaultHeaderHeight.d.ts +1 -1
  150. package/lib/typescript/native-stack/views/HeaderConfig.d.ts +1 -1
  151. package/lib/typescript/native-stack/views/NativeStackView.d.ts +1 -1
  152. package/lib/typescript/reanimated/ReanimatedNativeStackScreen.d.ts +1 -1
  153. package/lib/typescript/reanimated/ReanimatedScreen.d.ts +1 -1
  154. package/lib/typescript/reanimated/ReanimatedTransitionProgressContext.d.ts +1 -1
  155. package/lib/typescript/types.d.ts +90 -11
  156. package/lib/typescript/useTransitionProgress.d.ts +3 -3
  157. package/lib/typescript/utils.d.ts +1 -0
  158. package/native-stack/README.md +59 -1
  159. package/package.json +11 -14
  160. package/src/fabric/FullWindowOverlayNativeComponent.ts +6 -0
  161. package/src/fabric/ScreenContainerNativeComponent.ts +6 -0
  162. package/src/fabric/ScreenNativeComponent.ts +97 -0
  163. package/src/fabric/ScreenNavigationContainerNativeComponent.ts +9 -0
  164. package/src/fabric/ScreenStackHeaderConfigNativeComponent.ts +43 -0
  165. package/src/fabric/ScreenStackHeaderSubviewNativeComponent.ts +20 -0
  166. package/src/fabric/ScreenStackNativeComponent.ts +12 -0
  167. package/src/fabric/SearchBarNativeComponent.ts +73 -0
  168. package/src/index.native.tsx +109 -14
  169. package/src/index.tsx +5 -3
  170. package/src/native-stack/navigators/createNativeStackNavigator.tsx +23 -19
  171. package/src/native-stack/types.tsx +55 -0
  172. package/src/native-stack/views/FontProcessor.tsx +1 -0
  173. package/src/native-stack/views/HeaderConfig.tsx +3 -1
  174. package/src/native-stack/views/NativeStackView.tsx +14 -2
  175. package/src/types.tsx +84 -2
  176. package/src/utils.ts +6 -0
  177. package/createNativeStackNavigator/README.md +0 -522
  178. package/createNativeStackNavigator/package.json +0 -6
  179. package/lib/commonjs/createNativeStackNavigator.js +0 -374
  180. package/lib/commonjs/createNativeStackNavigator.js.map +0 -1
  181. package/lib/module/createNativeStackNavigator.js +0 -366
  182. package/lib/module/createNativeStackNavigator.js.map +0 -1
  183. package/lib/typescript/createNativeStackNavigator.d.ts +0 -51
  184. package/src/createNativeStackNavigator.tsx +0 -594
  185. package/src/fabric/FullWindowOverlayNativeComponent.js +0 -19
  186. package/src/fabric/ScreenContainerNativeComponent.js +0 -19
  187. package/src/fabric/ScreenNativeComponent.js +0 -97
  188. package/src/fabric/ScreenNavigationContainerNativeComponent.js +0 -19
  189. package/src/fabric/ScreenStackHeaderConfigNativeComponent.js +0 -54
  190. package/src/fabric/ScreenStackHeaderSubviewNativeComponent.js +0 -31
  191. package/src/fabric/ScreenStackNativeComponent.js +0 -23
  192. package/src/fabric/SearchBarNativeComponent.js +0 -62
  193. /package/android/src/main/res/{anim → base/anim}/rns_default_enter_in.xml +0 -0
  194. /package/android/src/main/res/{anim → base/anim}/rns_default_enter_out.xml +0 -0
  195. /package/android/src/main/res/{anim → base/anim}/rns_default_exit_in.xml +0 -0
  196. /package/android/src/main/res/{anim → base/anim}/rns_default_exit_out.xml +0 -0
  197. /package/android/src/main/res/{anim → base/anim}/rns_fade_from_bottom.xml +0 -0
  198. /package/android/src/main/res/{anim → base/anim}/rns_fade_in.xml +0 -0
  199. /package/android/src/main/res/{anim → base/anim}/rns_fade_out.xml +0 -0
  200. /package/android/src/main/res/{anim → base/anim}/rns_fade_to_bottom.xml +0 -0
  201. /package/android/src/main/res/{anim → base/anim}/rns_no_animation_20.xml +0 -0
  202. /package/android/src/main/res/{anim → base/anim}/rns_no_animation_250.xml +0 -0
  203. /package/android/src/main/res/{anim → base/anim}/rns_no_animation_350.xml +0 -0
  204. /package/android/src/main/res/{anim → base/anim}/rns_no_animation_medium.xml +0 -0
  205. /package/android/src/main/res/{anim → base/anim}/rns_slide_in_from_bottom.xml +0 -0
  206. /package/android/src/main/res/{anim → base/anim}/rns_slide_in_from_left.xml +0 -0
  207. /package/android/src/main/res/{anim → base/anim}/rns_slide_in_from_right.xml +0 -0
  208. /package/android/src/main/res/{anim → base/anim}/rns_slide_out_to_bottom.xml +0 -0
  209. /package/android/src/main/res/{anim → base/anim}/rns_slide_out_to_left.xml +0 -0
  210. /package/android/src/main/res/{anim → base/anim}/rns_slide_out_to_right.xml +0 -0
@@ -6,13 +6,12 @@
6
6
  #import <React/RCTComponent.h>
7
7
  #import <React/RCTUIManager.h>
8
8
 
9
- #ifdef RN_FABRIC_ENABLED
9
+ #ifdef RCT_NEW_ARCH_ENABLED
10
10
  #import <React/RCTConversions.h>
11
11
  #import <React/RCTFabricComponentsPlugins.h>
12
12
  #import <react/renderer/components/rnscreens/ComponentDescriptors.h>
13
13
  #import <react/renderer/components/rnscreens/EventEmitters.h>
14
14
  #import <react/renderer/components/rnscreens/Props.h>
15
- #import <react/renderer/components/rnscreens/RCTComponentViewHelpers.h>
16
15
  #import "RNSConvert.h"
17
16
  #endif
18
17
 
@@ -33,7 +32,7 @@
33
32
  return self;
34
33
  }
35
34
 
36
- #ifdef RN_FABRIC_ENABLED
35
+ #ifdef RCT_NEW_ARCH_ENABLED
37
36
  - (instancetype)init
38
37
  {
39
38
  if (self = [super init]) {
@@ -54,7 +53,7 @@
54
53
 
55
54
  - (void)emitOnFocusEvent
56
55
  {
57
- #ifdef RN_FABRIC_ENABLED
56
+ #ifdef RCT_NEW_ARCH_ENABLED
58
57
  if (_eventEmitter != nullptr) {
59
58
  std::dynamic_pointer_cast<const facebook::react::RNSSearchBarEventEmitter>(_eventEmitter)
60
59
  ->onFocus(facebook::react::RNSSearchBarEventEmitter::OnFocus{});
@@ -68,7 +67,7 @@
68
67
 
69
68
  - (void)emitOnBlurEvent
70
69
  {
71
- #ifdef RN_FABRIC_ENABLED
70
+ #ifdef RCT_NEW_ARCH_ENABLED
72
71
  if (_eventEmitter != nullptr) {
73
72
  std::dynamic_pointer_cast<const facebook::react::RNSSearchBarEventEmitter>(_eventEmitter)
74
73
  ->onBlur(facebook::react::RNSSearchBarEventEmitter::OnBlur{});
@@ -82,7 +81,7 @@
82
81
 
83
82
  - (void)emitOnSearchButtonPressEventWithText:(NSString *)text
84
83
  {
85
- #ifdef RN_FABRIC_ENABLED
84
+ #ifdef RCT_NEW_ARCH_ENABLED
86
85
  if (_eventEmitter != nullptr) {
87
86
  std::dynamic_pointer_cast<const facebook::react::RNSSearchBarEventEmitter>(_eventEmitter)
88
87
  ->onSearchButtonPress(
@@ -99,7 +98,7 @@
99
98
 
100
99
  - (void)emitOnCancelButtonPressEvent
101
100
  {
102
- #ifdef RN_FABRIC_ENABLED
101
+ #ifdef RCT_NEW_ARCH_ENABLED
103
102
  if (_eventEmitter != nullptr) {
104
103
  std::dynamic_pointer_cast<const facebook::react::RNSSearchBarEventEmitter>(_eventEmitter)
105
104
  ->onCancelButtonPress(facebook::react::RNSSearchBarEventEmitter::OnCancelButtonPress{});
@@ -113,7 +112,7 @@
113
112
 
114
113
  - (void)emitOnChangeTextEventWithText:(NSString *)text
115
114
  {
116
- #ifdef RN_FABRIC_ENABLED
115
+ #ifdef RCT_NEW_ARCH_ENABLED
117
116
  if (_eventEmitter != nullptr) {
118
117
  std::dynamic_pointer_cast<const facebook::react::RNSSearchBarEventEmitter>(_eventEmitter)
119
118
  ->onChangeText(facebook::react::RNSSearchBarEventEmitter::OnChangeText{.text = RCTStringFromNSString(text)});
@@ -257,9 +256,36 @@
257
256
  }
258
257
  #endif // !TARGET_OS_TV
259
258
 
259
+ - (void)blur
260
+ {
261
+ [_controller.searchBar resignFirstResponder];
262
+ }
263
+
264
+ - (void)focus
265
+ {
266
+ [_controller.searchBar becomeFirstResponder];
267
+ }
268
+
269
+ - (void)clearText
270
+ {
271
+ [_controller.searchBar setText:@""];
272
+ }
273
+
274
+ - (void)toggleCancelButton:(BOOL)flag
275
+ {
276
+ #if !TARGET_OS_TV
277
+ [_controller.searchBar setShowsCancelButton:flag animated:YES];
278
+ #endif
279
+ }
280
+
281
+ - (void)setText:(NSString *)text
282
+ {
283
+ [_controller.searchBar setText:text];
284
+ }
285
+
260
286
  #pragma mark-- Fabric specific
261
287
 
262
- #ifdef RN_FABRIC_ENABLED
288
+ #ifdef RCT_NEW_ARCH_ENABLED
263
289
  - (void)updateProps:(facebook::react::Props::Shared const &)props
264
290
  oldProps:(facebook::react::Props::Shared const &)oldProps
265
291
  {
@@ -308,12 +334,17 @@
308
334
  return facebook::react::concreteComponentDescriptorProvider<facebook::react::RNSSearchBarComponentDescriptor>();
309
335
  }
310
336
 
337
+ - (void)handleCommand:(const NSString *)commandName args:(const NSArray *)args
338
+ {
339
+ RCTRNSSearchBarHandleCommand(self, commandName, args);
340
+ }
341
+
311
342
  #else
312
- #endif
343
+ #endif // RCT_NEW_ARCH_ENABLED
313
344
 
314
345
  @end
315
346
 
316
- #ifdef RN_FABRIC_ENABLED
347
+ #ifdef RCT_NEW_ARCH_ENABLED
317
348
  Class<RCTComponentViewProtocol> RNSSearchBarCls(void)
318
349
  {
319
350
  return RNSSearchBar.class;
@@ -324,7 +355,7 @@ Class<RCTComponentViewProtocol> RNSSearchBarCls(void)
324
355
 
325
356
  RCT_EXPORT_MODULE()
326
357
 
327
- #ifdef RN_FABRIC_ENABLED
358
+ #ifdef RCT_NEW_ARCH_ENABLED
328
359
  #else
329
360
  - (UIView *)view
330
361
  {
@@ -348,4 +379,48 @@ RCT_EXPORT_VIEW_PROPERTY(onSearchButtonPress, RCTBubblingEventBlock)
348
379
  RCT_EXPORT_VIEW_PROPERTY(onFocus, RCTBubblingEventBlock)
349
380
  RCT_EXPORT_VIEW_PROPERTY(onBlur, RCTBubblingEventBlock)
350
381
 
382
+ #ifndef RCT_NEW_ARCH_ENABLED
383
+
384
+ RCT_EXPORT_METHOD(focus : (NSNumber *_Nonnull)reactTag)
385
+ {
386
+ [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary *viewRegistry) {
387
+ RNSSearchBar *searchBar = viewRegistry[reactTag];
388
+ [searchBar focus];
389
+ }];
390
+ }
391
+
392
+ RCT_EXPORT_METHOD(blur : (NSNumber *_Nonnull)reactTag)
393
+ {
394
+ [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary *viewRegistry) {
395
+ RNSSearchBar *searchBar = viewRegistry[reactTag];
396
+ [searchBar blur];
397
+ }];
398
+ }
399
+
400
+ RCT_EXPORT_METHOD(clearText : (NSNumber *_Nonnull)reactTag)
401
+ {
402
+ [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary *viewRegistry) {
403
+ RNSSearchBar *searchBar = viewRegistry[reactTag];
404
+ [searchBar clearText];
405
+ }];
406
+ }
407
+
408
+ RCT_EXPORT_METHOD(toggleCancelButton : (NSNumber *_Nonnull)reactTag flag : (BOOL *)flag)
409
+ {
410
+ [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary *viewRegistry) {
411
+ RNSSearchBar *searchBar = viewRegistry[reactTag];
412
+ [searchBar toggleCancelButton:flag];
413
+ }];
414
+ }
415
+
416
+ RCT_EXPORT_METHOD(setText : (NSNumber *_Nonnull)reactTag text : (NSString *)text)
417
+ {
418
+ [self.bridge.uiManager addUIBlock:^(__unused RCTUIManager *uiManager, NSDictionary *viewRegistry) {
419
+ RNSSearchBar *searchBar = viewRegistry[reactTag];
420
+ [searchBar setText:text];
421
+ }];
422
+ }
423
+
424
+ #endif /* !RCT_NEW_ARCH_ENABLED */
425
+
351
426
  @end
@@ -1 +1 @@
1
- {"version":3,"names":["React","createContext","undefined"],"sources":["TransitionProgressContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Animated } from 'react-native';\n\ntype TransitionProgressContextBody = {\n progress: Animated.Value;\n closing: Animated.Value;\n goingForward: Animated.Value;\n};\n\nexport default React.createContext<TransitionProgressContextBody | undefined>(\n undefined\n);\n"],"mappings":";;;;;;AAAA;AAA+B;AAAA;AAAA,4BAShBA,KAAK,CAACC,aAAa,CAChCC,SAAS,CACV;AAAA"}
1
+ {"version":3,"names":["React","_interopRequireWildcard","require","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_default","createContext","undefined","exports"],"sources":["TransitionProgressContext.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Animated } from 'react-native';\n\ntype TransitionProgressContextBody = {\n progress: Animated.Value;\n closing: Animated.Value;\n goingForward: Animated.Value;\n};\n\nexport default React.createContext<TransitionProgressContextBody | undefined>(\n undefined\n);\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AAA+B,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAH,wBAAAO,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA;AAAA,IAAAW,QAAA,gBAShBzB,KAAK,CAAC0B,aAAa,CAChCC,SAAS,CACV;AAAAC,OAAA,CAAAlB,OAAA,GAAAe,QAAA"}
@@ -6,11 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- /**
10
- *
11
- * @format
12
- */
13
- /* eslint-disable */
14
9
  var _default = (0, _codegenNativeComponent.default)('RNSFullWindowOverlay', {});
15
10
  exports.default = _default;
16
11
  //# sourceMappingURL=FullWindowOverlayNativeComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["codegenNativeComponent"],"sources":["FullWindowOverlayNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n|}>;\n\ntype ComponentType = HostComponent<NativeProps>;\n\nexport default (codegenNativeComponent<NativeProps>(\n 'RNSFullWindowOverlay',\n {}\n): ComponentType);\n"],"mappings":";;;;;;AAKA;AAA6F;AAL7F;AACA;AACA;AACA;AACA;AAAA,eAWgB,IAAAA,+BAAsB,EACpC,sBAAsB,EACtB,CAAC,CAAC,CACH;AAAA"}
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","obj","__esModule","default","_default","codegenNativeComponent","exports"],"sources":["FullWindowOverlayNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native';\n\ninterface NativeProps extends ViewProps {}\n\nexport default codegenNativeComponent<NativeProps>('RNSFullWindowOverlay', {});\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,IAAAG,QAAA,GAK9E,IAAAC,+BAAsB,EAAc,sBAAsB,EAAE,CAAC,CAAC,CAAC;AAAAC,OAAA,CAAAH,OAAA,GAAAC,QAAA"}
@@ -6,11 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- /**
10
- *
11
- * @format
12
- */
13
- /* eslint-disable */
14
9
  var _default = (0, _codegenNativeComponent.default)('RNSScreenContainer', {});
15
10
  exports.default = _default;
16
11
  //# sourceMappingURL=ScreenContainerNativeComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["codegenNativeComponent"],"sources":["ScreenContainerNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n|}>;\n\ntype ComponentType = HostComponent<NativeProps>;\n\nexport default (codegenNativeComponent<NativeProps>(\n 'RNSScreenContainer',\n {}\n): ComponentType);\n"],"mappings":";;;;;;AAKA;AAA6F;AAL7F;AACA;AACA;AACA;AACA;AAAA,eAWgB,IAAAA,+BAAsB,EACpC,oBAAoB,EACpB,CAAC,CAAC,CACH;AAAA"}
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","obj","__esModule","default","_default","codegenNativeComponent","exports"],"sources":["ScreenContainerNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native';\n\ninterface NativeProps extends ViewProps {}\n\nexport default codegenNativeComponent<NativeProps>('RNSScreenContainer', {});\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,IAAAG,QAAA,GAK9E,IAAAC,+BAAsB,EAAc,oBAAoB,EAAE,CAAC,CAAC,CAAC;AAAAC,OAAA,CAAAH,OAAA,GAAAC,QAAA"}
@@ -6,11 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- /**
10
- *
11
- * @format
12
- */
13
- /* eslint-disable */
14
9
  var _default = (0, _codegenNativeComponent.default)('RNSScreen', {
15
10
  interfaceOnly: true
16
11
  });
@@ -1 +1 @@
1
- {"version":3,"names":["codegenNativeComponent","interfaceOnly"],"sources":["ScreenNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\nimport type { ColorValue } from 'react-native/Libraries/StyleSheet/StyleSheet';\nimport type {\n BubblingEventHandler,\n WithDefault,\n Int32,\n} from 'react-native/Libraries/Types/CodegenTypes';\n\ntype ScreenEvent = $ReadOnly<{||}>;\n\ntype ScreenDismissedEvent = $ReadOnly<{|\n dismissCount: Int32,\n|}>;\n\ntype TransitionProgressEvent = $ReadOnly<{|\n progress: Double,\n closing: Int32,\n goingForward: Int32,\n|}>;\n\ntype GestureResponseDistanceType = $ReadOnly<{|\n start: Float,\n end: Float,\n top: Float,\n bottom: Float,\n|}>;\n\ntype StackPresentation =\n | 'push'\n | 'modal'\n | 'transparentModal'\n | 'fullScreenModal'\n | 'formSheet'\n | 'containedModal'\n | 'containedTransparentModal';\n\ntype StackAnimation =\n | 'default'\n | 'flip'\n | 'simple_push'\n | 'none'\n | 'fade'\n | 'slide_from_right'\n | 'slide_from_left'\n | 'slide_from_bottom'\n | 'fade_from_bottom';\n\ntype SwipeDirection = 'vertical' | 'horizontal';\n\ntype ReplaceAnimation = 'pop' | 'push';\n\nexport type NativeProps = $ReadOnly<{|\n ...ViewProps,\n onAppear?: ?BubblingEventHandler<ScreenEvent>,\n onDisappear?: ?BubblingEventHandler<ScreenEvent>,\n onDismissed?: ?BubblingEventHandler<ScreenDismissedEvent>,\n onNativeDismissCancelled?: ?BubblingEventHandler<ScreenDismissedEvent>,\n onWillAppear?: ?BubblingEventHandler<ScreenEvent>,\n onWillDisappear?: ?BubblingEventHandler<ScreenEvent>,\n onTransitionProgress?: ?BubblingEventHandler<TransitionProgressEvent>,\n customAnimationOnSwipe?: boolean,\n fullScreenSwipeEnabled?: boolean,\n homeIndicatorHidden?: boolean,\n preventNativeDismiss?: boolean,\n gestureEnabled?: WithDefault<boolean, true>,\n statusBarColor?: ColorValue,\n statusBarHidden?: boolean,\n screenOrientation?: string,\n statusBarAnimation?: string,\n statusBarStyle?: string,\n statusBarTranslucent?: boolean,\n gestureResponseDistance?: GestureResponseDistanceType,\n stackPresentation?: WithDefault<StackPresentation, 'push'>,\n stackAnimation?: WithDefault<StackAnimation, 'default'>,\n transitionDuration?: WithDefault<Int32, 350>,\n replaceAnimation?: WithDefault<ReplaceAnimation, 'pop'>,\n swipeDirection?: WithDefault<SwipeDirection, 'horizontal'>,\n hideKeyboardOnSwipe?: boolean,\n activityState?: WithDefault<Float, -1.0>,\n navigationBarColor?: ColorValue,\n navigationBarHidden?: boolean,\n nativeBackButtonDismissalEnabled?: boolean,\n onHeaderBackButtonClicked?: ?BubblingEventHandler<ScreenEvent>,\n|}>;\n\ntype ComponentType = HostComponent<NativeProps>;\n\nexport default (codegenNativeComponent<NativeProps>('RNSScreen', {\n interfaceOnly: true,\n}): ComponentType);\n"],"mappings":";;;;;;AAKA;AAA6F;AAL7F;AACA;AACA;AACA;AACA;AAAA,eA0FgB,IAAAA,+BAAsB,EAAc,WAAW,EAAE;EAC/DC,aAAa,EAAE;AACjB,CAAC,CAAC;AAAA"}
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","obj","__esModule","default","_default","codegenNativeComponent","interfaceOnly","exports"],"sources":["ScreenNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps, ColorValue } from 'react-native';\nimport type {\n BubblingEventHandler,\n WithDefault,\n Int32,\n Float,\n Double,\n} from 'react-native/Libraries/Types/CodegenTypes';\n\n// eslint-disable-next-line @typescript-eslint/ban-types\ntype ScreenEvent = Readonly<{}>;\n\ntype ScreenDismissedEvent = Readonly<{\n dismissCount: Int32;\n}>;\n\ntype TransitionProgressEvent = Readonly<{\n progress: Double;\n closing: Int32;\n goingForward: Int32;\n}>;\n\ntype GestureResponseDistanceType = Readonly<{\n start: Float;\n end: Float;\n top: Float;\n bottom: Float;\n}>;\n\ntype StackPresentation =\n | 'push'\n | 'modal'\n | 'transparentModal'\n | 'fullScreenModal'\n | 'formSheet'\n | 'containedModal'\n | 'containedTransparentModal';\n\ntype StackAnimation =\n | 'default'\n | 'flip'\n | 'simple_push'\n | 'none'\n | 'fade'\n | 'slide_from_right'\n | 'slide_from_left'\n | 'slide_from_bottom'\n | 'fade_from_bottom';\n\ntype SwipeDirection = 'vertical' | 'horizontal';\n\ntype ReplaceAnimation = 'pop' | 'push';\n\ntype SheetDetentTypes = 'large' | 'medium' | 'all';\n\nexport interface NativeProps extends ViewProps {\n onAppear?: BubblingEventHandler<ScreenEvent>;\n onDisappear?: BubblingEventHandler<ScreenEvent>;\n onDismissed?: BubblingEventHandler<ScreenDismissedEvent>;\n onNativeDismissCancelled?: BubblingEventHandler<ScreenDismissedEvent>;\n onWillAppear?: BubblingEventHandler<ScreenEvent>;\n onWillDisappear?: BubblingEventHandler<ScreenEvent>;\n onTransitionProgress?: BubblingEventHandler<TransitionProgressEvent>;\n sheetAllowedDetents?: WithDefault<SheetDetentTypes, 'large'>;\n sheetLargestUndimmedDetent?: WithDefault<SheetDetentTypes, 'all'>;\n sheetGrabberVisible?: WithDefault<boolean, false>;\n sheetCornerRadius?: WithDefault<Float, -1.0>;\n sheetExpandsWhenScrolledToEdge?: WithDefault<boolean, false>;\n customAnimationOnSwipe?: boolean;\n fullScreenSwipeEnabled?: boolean;\n homeIndicatorHidden?: boolean;\n preventNativeDismiss?: boolean;\n gestureEnabled?: WithDefault<boolean, true>;\n statusBarColor?: ColorValue;\n statusBarHidden?: boolean;\n screenOrientation?: string;\n statusBarAnimation?: string;\n statusBarStyle?: string;\n statusBarTranslucent?: boolean;\n gestureResponseDistance?: GestureResponseDistanceType;\n stackPresentation?: WithDefault<StackPresentation, 'push'>;\n stackAnimation?: WithDefault<StackAnimation, 'default'>;\n transitionDuration?: WithDefault<Int32, 350>;\n replaceAnimation?: WithDefault<ReplaceAnimation, 'pop'>;\n swipeDirection?: WithDefault<SwipeDirection, 'horizontal'>;\n hideKeyboardOnSwipe?: boolean;\n activityState?: WithDefault<Float, -1.0>;\n navigationBarColor?: ColorValue;\n navigationBarHidden?: boolean;\n nativeBackButtonDismissalEnabled?: boolean;\n onHeaderBackButtonClicked?: BubblingEventHandler<ScreenEvent>;\n}\n\nexport default codegenNativeComponent<NativeProps>('RNSScreen', {\n interfaceOnly: true,\n});\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,IAAAG,QAAA,GA8F9E,IAAAC,+BAAsB,EAAc,WAAW,EAAE;EAC9DC,aAAa,EAAE;AACjB,CAAC,CAAC;AAAAC,OAAA,CAAAJ,OAAA,GAAAC,QAAA"}
@@ -6,11 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- /**
10
- *
11
- * @format
12
- */
13
- /* eslint-disable */
14
9
  var _default = (0, _codegenNativeComponent.default)('RNSScreenNavigationContainer', {});
15
10
  exports.default = _default;
16
11
  //# sourceMappingURL=ScreenNavigationContainerNativeComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["codegenNativeComponent"],"sources":["ScreenNavigationContainerNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n|}>;\n\ntype ComponentType = HostComponent<NativeProps>;\n\nexport default (codegenNativeComponent<NativeProps>(\n 'RNSScreenNavigationContainer',\n {}\n): ComponentType);\n"],"mappings":";;;;;;AAKA;AAA6F;AAL7F;AACA;AACA;AACA;AACA;AAAA,eAWgB,IAAAA,+BAAsB,EACpC,8BAA8B,EAC9B,CAAC,CAAC,CACH;AAAA"}
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","obj","__esModule","default","_default","codegenNativeComponent","exports"],"sources":["ScreenNavigationContainerNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native';\n\ninterface NativeProps extends ViewProps {}\n\nexport default codegenNativeComponent<NativeProps>(\n 'RNSScreenNavigationContainer',\n {}\n);\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,IAAAG,QAAA,GAK9E,IAAAC,+BAAsB,EACnC,8BAA8B,EAC9B,CAAC,CAAC,CACH;AAAAC,OAAA,CAAAH,OAAA,GAAAC,QAAA"}
@@ -4,16 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
7
  var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
9
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
- /**
13
- *
14
- * @format
15
- */
16
- /* eslint-disable */
17
9
  var _default = (0, _codegenNativeComponent.default)('RNSScreenStackHeaderConfig', {});
18
10
  exports.default = _default;
19
11
  //# sourceMappingURL=ScreenStackHeaderConfigNativeComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["codegenNativeComponent"],"sources":["ScreenStackHeaderConfigNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport * as React from 'react';\n\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\nimport type { ColorValue } from 'react-native/Libraries/StyleSheet/StyleSheet';\nimport type {\n Int32,\n WithDefault,\n} from 'react-native/Libraries/Types/CodegenTypes';\n\ntype DirectionType = 'rtl' | 'ltr';\n\nexport type NativeProps = $ReadOnly<{|\n ...ViewProps,\n backgroundColor?: ColorValue,\n backTitle?: string,\n backTitleFontFamily?: string,\n backTitleFontSize?: Int32,\n color?: ColorValue,\n direction?: WithDefault<DirectionType, 'ltr'>,\n hidden?: boolean,\n hideShadow?: boolean,\n largeTitle?: boolean,\n largeTitleFontFamily?: string,\n largeTitleFontSize?: Int32,\n largeTitleFontWeight?: string,\n largeTitleBackgroundColor?: ColorValue,\n largeTitleHideShadow?: boolean,\n largeTitleColor?: ColorValue,\n translucent?: boolean,\n title?: string,\n titleFontFamily?: string,\n titleFontSize?: Int32,\n titleFontWeight?: string,\n titleColor?: ColorValue,\n disableBackButtonMenu?: boolean,\n hideBackButton?: boolean,\n backButtonInCustomView?: boolean,\n // TODO: implement this props on iOS\n topInsetEnabled?: boolean,\n|}>;\n\ntype ComponentType = HostComponent<NativeProps>;\n\nexport default (codegenNativeComponent<NativeProps>(\n 'RNSScreenStackHeaderConfig',\n {}\n): ComponentType);\n"],"mappings":";;;;;;AAKA;AAEA;AAA6F;AAAA;AAAA;AAP7F;AACA;AACA;AACA;AACA;AAAA,eA8CgB,IAAAA,+BAAsB,EACpC,4BAA4B,EAC5B,CAAC,CAAC,CACH;AAAA"}
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","obj","__esModule","default","_default","codegenNativeComponent","exports"],"sources":["ScreenStackHeaderConfigNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps, ColorValue } from 'react-native';\nimport type {\n Int32,\n WithDefault,\n} from 'react-native/Libraries/Types/CodegenTypes';\n\ntype DirectionType = 'rtl' | 'ltr';\n\nexport interface NativeProps extends ViewProps {\n backgroundColor?: ColorValue;\n backTitle?: string;\n backTitleFontFamily?: string;\n backTitleFontSize?: Int32;\n backTitleVisible?: WithDefault<boolean, 'true'>;\n color?: ColorValue;\n direction?: WithDefault<DirectionType, 'ltr'>;\n hidden?: boolean;\n hideShadow?: boolean;\n largeTitle?: boolean;\n largeTitleFontFamily?: string;\n largeTitleFontSize?: Int32;\n largeTitleFontWeight?: string;\n largeTitleBackgroundColor?: ColorValue;\n largeTitleHideShadow?: boolean;\n largeTitleColor?: ColorValue;\n translucent?: boolean;\n title?: string;\n titleFontFamily?: string;\n titleFontSize?: Int32;\n titleFontWeight?: string;\n titleColor?: ColorValue;\n disableBackButtonMenu?: boolean;\n hideBackButton?: boolean;\n backButtonInCustomView?: boolean;\n // TODO: implement this props on iOS\n topInsetEnabled?: boolean;\n}\n\nexport default codegenNativeComponent<NativeProps>(\n 'RNSScreenStackHeaderConfig',\n {}\n);\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,IAAAG,QAAA,GAuC9E,IAAAC,+BAAsB,EACnC,4BAA4B,EAC5B,CAAC,CAAC,CACH;AAAAC,OAAA,CAAAH,OAAA,GAAAC,QAAA"}
@@ -4,16 +4,8 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
- var React = _interopRequireWildcard(require("react"));
8
7
  var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
9
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
11
- function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
12
- /**
13
- *
14
- * @format
15
- */
16
- /* eslint-disable */
17
9
  var _default = (0, _codegenNativeComponent.default)('RNSScreenStackHeaderSubview', {});
18
10
  exports.default = _default;
19
11
  //# sourceMappingURL=ScreenStackHeaderSubviewNativeComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["codegenNativeComponent"],"sources":["ScreenStackHeaderSubviewNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport * as React from 'react';\n\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\nimport type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';\n\nexport type HeaderSubviewTypes =\n | 'back'\n | 'right'\n | 'left'\n | 'title'\n | 'center'\n | 'searchBar';\n\nexport type NativeProps = $ReadOnly<{|\n ...ViewProps,\n type?: WithDefault<HeaderSubviewTypes, 'left'>,\n|}>;\n\ntype ComponentType = HostComponent<NativeProps>;\n\nexport default (codegenNativeComponent<NativeProps>(\n 'RNSScreenStackHeaderSubview',\n {}\n): ComponentType);\n"],"mappings":";;;;;;AAKA;AAEA;AAA6F;AAAA;AAAA;AAP7F;AACA;AACA;AACA;AACA;AAAA,eAuBgB,IAAAA,+BAAsB,EACpC,6BAA6B,EAC7B,CAAC,CAAC,CACH;AAAA"}
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","obj","__esModule","default","_default","codegenNativeComponent","exports"],"sources":["ScreenStackHeaderSubviewNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native';\nimport type { WithDefault } from 'react-native/Libraries/Types/CodegenTypes';\n\nexport type HeaderSubviewTypes =\n | 'back'\n | 'right'\n | 'left'\n | 'title'\n | 'center'\n | 'searchBar';\n\nexport interface NativeProps extends ViewProps {\n type?: WithDefault<HeaderSubviewTypes, 'left'>;\n}\n\nexport default codegenNativeComponent<NativeProps>(\n 'RNSScreenStackHeaderSubview',\n {}\n);\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,IAAAG,QAAA,GAgB9E,IAAAC,+BAAsB,EACnC,6BAA6B,EAC7B,CAAC,CAAC,CACH;AAAAC,OAAA,CAAAH,OAAA,GAAAC,QAAA"}
@@ -6,11 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
8
8
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- /**
10
- *
11
- * @format
12
- */
13
- /* eslint-disable */
14
9
  var _default = (0, _codegenNativeComponent.default)('RNSScreenStack', {});
15
10
  exports.default = _default;
16
11
  //# sourceMappingURL=ScreenStackNativeComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["codegenNativeComponent"],"sources":["ScreenStackNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\nimport type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';\n\ntype FinishTransitioningEvent = $ReadOnly<{||}>;\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n onFinishTransitioning?: ?DirectEventHandler<FinishTransitioningEvent>,\n|}>;\n\ntype ComponentType = HostComponent<NativeProps>;\n\nexport default (codegenNativeComponent<NativeProps>(\n 'RNSScreenStack',\n {}\n): ComponentType);\n"],"mappings":";;;;;;AAKA;AAA6F;AAL7F;AACA;AACA;AACA;AACA;AAAA,eAegB,IAAAA,+BAAsB,EACpC,gBAAgB,EAChB,CAAC,CAAC,CACH;AAAA"}
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","obj","__esModule","default","_default","codegenNativeComponent","exports"],"sources":["ScreenStackNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native';\nimport type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';\n\n// eslint-disable-next-line @typescript-eslint/ban-types\ntype FinishTransitioningEvent = Readonly<{}>;\n\ninterface NativeProps extends ViewProps {\n onFinishTransitioning?: DirectEventHandler<FinishTransitioningEvent>;\n}\n\nexport default codegenNativeComponent<NativeProps>('RNSScreenStack', {});\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,IAAAG,QAAA,GAW9E,IAAAC,+BAAsB,EAAc,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAAAC,OAAA,CAAAH,OAAA,GAAAC,QAAA"}
@@ -3,16 +3,16 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.default = void 0;
6
+ exports.default = exports.Commands = void 0;
7
7
  var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
8
- var _StyleSheet = require("react-native/Libraries/StyleSheet/StyleSheet");
9
- var _ReactNativeStyleAttributes = require("react-native/Libraries/Components/View/ReactNativeStyleAttributes");
8
+ var _codegenNativeCommands = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeCommands"));
10
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- /**
12
- *
13
- * @format
14
- */
15
10
  /* eslint-disable */
11
+
12
+ const Commands = (0, _codegenNativeCommands.default)({
13
+ supportedCommands: ['blur', 'focus', 'clearText', 'toggleCancelButton', 'setText']
14
+ });
15
+ exports.Commands = Commands;
16
16
  var _default = (0, _codegenNativeComponent.default)('RNSSearchBar', {});
17
17
  exports.default = _default;
18
18
  //# sourceMappingURL=SearchBarNativeComponent.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["codegenNativeComponent"],"sources":["SearchBarNativeComponent.js"],"sourcesContent":["/**\n * @flow strict-local\n * @format\n */\n/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps } from 'react-native/Libraries/Components/View/ViewPropTypes';\nimport type { HostComponent } from 'react-native/Libraries/Renderer/shims/ReactNativeTypes';\nimport { ColorValue } from 'react-native/Libraries/StyleSheet/StyleSheet';\nimport type {\n WithDefault,\n BubblingEventHandler,\n} from 'react-native/Libraries/Types/CodegenTypes';\nimport { tintColor } from 'react-native/Libraries/Components/View/ReactNativeStyleAttributes';\n\ntype SearchBarEvent = $ReadOnly<{||}>;\n\ntype SearchButtonPressedEvent = $ReadOnly<{|\n text?: string,\n|}>;\n\ntype ChangeTextEvent = $ReadOnly<{|\n text?: string,\n|}>;\n\ntype AutoCapitalizeType = 'none' | 'words' | 'sentences' | 'characters';\n\ntype NativeProps = $ReadOnly<{|\n ...ViewProps,\n onFocus?: ?BubblingEventHandler<SearchBarEvent>,\n onBlur?: ?BubblingEventHandler<SearchBarEvent>,\n onSearchButtonPress?: ?BubblingEventHandler<SearchButtonPressedEvent>,\n onCancelButtonPress?: ?BubblingEventHandler<SearchBarEvent>,\n onChangeText?: ?BubblingEventHandler<ChangeTextEvent>,\n hideWhenScrolling?: boolean,\n autoCapitalize?: WithDefault<AutoCapitalizeType, 'none'>,\n placeholder?: string,\n obscureBackground?: boolean,\n hideNavigationBar?: boolean,\n cancelButtonText?: string,\n // TODO: implement these on iOS\n barTintColor?: ColorValue,\n tintColor?: ColorValue,\n textColor?: ColorValue,\n\n // Android only\n disableBackButtonOverride?: boolean,\n // TODO: consider creating enum here\n inputType?: string,\n onClose?: ?BubblingEventHandler<SearchBarEvent>,\n onOpen?: ?BubblingEventHandler<SearchBarEvent>,\n hintTextColor?: ColorValue,\n headerIconColor?: ColorValue,\n shouldShowHintSearchIcon?: WithDefault<boolean, true>,\n|}>;\n\ntype ComponentType = HostComponent<NativeProps>;\n\nexport default (codegenNativeComponent<NativeProps>(\n 'RNSSearchBar',\n {}\n): ComponentType);\n"],"mappings":";;;;;;AAKA;AAGA;AAKA;AAA8F;AAb9F;AACA;AACA;AACA;AACA;AAAA,eAsDgB,IAAAA,+BAAsB,EACpC,cAAc,EACd,CAAC,CAAC,CACH;AAAA"}
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","_codegenNativeCommands","obj","__esModule","default","Commands","codegenNativeCommands","supportedCommands","exports","_default","codegenNativeComponent"],"sources":["SearchBarNativeComponent.ts"],"sourcesContent":["/* eslint-disable */\nimport codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';\nimport type { ViewProps, ColorValue, HostComponent } from 'react-native';\nimport type {\n WithDefault,\n BubblingEventHandler,\n} from 'react-native/Libraries/Types/CodegenTypes';\nimport codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';\n\ntype SearchBarEvent = Readonly<{}>;\n\ntype SearchButtonPressedEvent = Readonly<{\n text?: string;\n}>;\n\ntype ChangeTextEvent = Readonly<{\n text?: string;\n}>;\n\ntype AutoCapitalizeType = 'none' | 'words' | 'sentences' | 'characters';\n\ninterface NativeProps extends ViewProps {\n onFocus?: BubblingEventHandler<SearchBarEvent> | null;\n onBlur?: BubblingEventHandler<SearchBarEvent> | null;\n onSearchButtonPress?: BubblingEventHandler<SearchButtonPressedEvent> | null;\n onCancelButtonPress?: BubblingEventHandler<SearchBarEvent> | null;\n onChangeText?: BubblingEventHandler<ChangeTextEvent> | null;\n hideWhenScrolling?: boolean;\n autoCapitalize?: WithDefault<AutoCapitalizeType, 'none'>;\n placeholder?: string;\n obscureBackground?: boolean;\n hideNavigationBar?: boolean;\n cancelButtonText?: string;\n // TODO: implement these on iOS\n barTintColor?: ColorValue;\n tintColor?: ColorValue;\n textColor?: ColorValue;\n\n // Android only\n disableBackButtonOverride?: boolean;\n // TODO: consider creating enum here\n inputType?: string;\n onClose?: BubblingEventHandler<SearchBarEvent> | null;\n onOpen?: BubblingEventHandler<SearchBarEvent> | null;\n hintTextColor?: ColorValue;\n headerIconColor?: ColorValue;\n shouldShowHintSearchIcon?: WithDefault<boolean, true>;\n}\n\ntype ComponentType = HostComponent<NativeProps>;\n\ninterface NativeCommands {\n blur: (viewRef: React.ElementRef<ComponentType>) => void;\n focus: (viewRef: React.ElementRef<ComponentType>) => void;\n clearText: (viewRef: React.ElementRef<ComponentType>) => void;\n toggleCancelButton: (\n viewRef: React.ElementRef<ComponentType>,\n flag: boolean\n ) => void;\n setText: (viewRef: React.ElementRef<ComponentType>, text: string) => void;\n}\n\nexport const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({\n supportedCommands: [\n 'blur',\n 'focus',\n 'clearText',\n 'toggleCancelButton',\n 'setText',\n ],\n});\n\nexport default codegenNativeComponent<NativeProps>('RNSSearchBar', {});\n"],"mappings":";;;;;;AACA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAMA,IAAAC,sBAAA,GAAAF,sBAAA,CAAAC,OAAA;AAA2F,SAAAD,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAP3F;;AA8DO,MAAMG,QAAwB,GAAG,IAAAC,8BAAqB,EAAiB;EAC5EC,iBAAiB,EAAE,CACjB,MAAM,EACN,OAAO,EACP,WAAW,EACX,oBAAoB,EACpB,SAAS;AAEb,CAAC,CAAC;AAACC,OAAA,CAAAH,QAAA,GAAAA,QAAA;AAAA,IAAAI,QAAA,GAEY,IAAAC,+BAAsB,EAAc,cAAc,EAAE,CAAC,CAAC,CAAC;AAAAF,OAAA,CAAAJ,OAAA,GAAAK,QAAA"}
@@ -27,6 +27,7 @@ var _exportNames = {
27
27
  shouldUseActivityState: true,
28
28
  useTransitionProgress: true,
29
29
  isSearchBarAvailableForCurrentPlatform: true,
30
+ isNewBackTitleImplementation: true,
30
31
  executeNativeBackPress: true
31
32
  };
32
33
  exports.SearchBar = exports.ScreenStackHeaderSubview = exports.ScreenStackHeaderSearchBarView = exports.ScreenStackHeaderRightView = exports.ScreenStackHeaderLeftView = exports.ScreenStackHeaderConfig = exports.ScreenStackHeaderCenterView = exports.ScreenStackHeaderBackButtonImage = exports.ScreenStack = exports.ScreenContext = exports.ScreenContainer = exports.Screen = exports.NativeScreenNavigationContainer = exports.NativeScreenContainer = exports.NativeScreen = exports.InnerScreen = exports.FullWindowOverlay = void 0;
@@ -38,6 +39,12 @@ Object.defineProperty(exports, "executeNativeBackPress", {
38
39
  return _utils.executeNativeBackPress;
39
40
  }
40
41
  });
42
+ Object.defineProperty(exports, "isNewBackTitleImplementation", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _utils.isNewBackTitleImplementation;
46
+ }
47
+ });
41
48
  Object.defineProperty(exports, "isSearchBarAvailableForCurrentPlatform", {
42
49
  enumerable: true,
43
50
  get: function () {
@@ -141,7 +148,7 @@ const ScreenStackHeaderCenterView = props => /*#__PURE__*/_react.default.createE
141
148
  exports.ScreenStackHeaderCenterView = ScreenStackHeaderCenterView;
142
149
  const ScreenStackHeaderSearchBarView = props => /*#__PURE__*/_react.default.createElement(_reactNative.View, props);
143
150
  exports.ScreenStackHeaderSearchBarView = ScreenStackHeaderSearchBarView;
144
- const ScreenStackHeaderConfig = _reactNative.View;
151
+ const ScreenStackHeaderConfig = props => /*#__PURE__*/_react.default.createElement(_reactNative.View, props);
145
152
 
146
153
  // @ts-expect-error: search bar props have no common props with View
147
154
  exports.ScreenStackHeaderConfig = ScreenStackHeaderConfig;
@@ -1 +1 @@
1
- {"version":3,"names":["ENABLE_SCREENS","enableScreens","shouldEnableScreens","screensEnabled","enableFreeze","shouldEnableReactFreeze","NativeScreen","React","Component","render","active","activityState","style","enabled","rest","props","undefined","display","Screen","Animated","createAnimatedComponent","InnerScreen","View","ScreenContext","createContext","ScreenContainer","NativeScreenContainer","NativeScreenNavigationContainer","ScreenStack","FullWindowOverlay","ScreenStackHeaderBackButtonImage","ScreenStackHeaderRightView","ScreenStackHeaderLeftView","ScreenStackHeaderCenterView","ScreenStackHeaderSearchBarView","ScreenStackHeaderConfig","SearchBar","ScreenStackHeaderSubview","shouldUseActivityState"],"sources":["index.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Animated, View, ViewProps, ImageProps, Image } from 'react-native';\nimport {\n ScreenProps,\n ScreenContainerProps,\n ScreenStackProps,\n ScreenStackHeaderConfigProps,\n HeaderSubviewTypes,\n SearchBarProps,\n} from './types';\n\nexport * from './types';\nexport { default as useTransitionProgress } from './useTransitionProgress';\nexport {\n isSearchBarAvailableForCurrentPlatform,\n executeNativeBackPress,\n} from './utils';\n\nlet ENABLE_SCREENS = true;\n\nexport function enableScreens(shouldEnableScreens = true): void {\n ENABLE_SCREENS = shouldEnableScreens;\n}\n\nexport function screensEnabled(): boolean {\n return ENABLE_SCREENS;\n}\n\n// @ts-ignore function stub, freezing logic is located in index.native.tsx\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function enableFreeze(shouldEnableReactFreeze = true): void {\n // noop\n}\n\nexport class NativeScreen extends React.Component<ScreenProps> {\n render(): JSX.Element {\n let {\n active,\n activityState,\n style,\n enabled = ENABLE_SCREENS,\n ...rest\n } = this.props;\n\n if (enabled) {\n if (active !== undefined && activityState === undefined) {\n activityState = active !== 0 ? 2 : 0; // change taken from index.native.tsx\n }\n return (\n <View\n // @ts-expect-error: hidden exists on web, but not in React Native\n hidden={activityState === 0}\n style={[style, { display: activityState !== 0 ? 'flex' : 'none' }]}\n {...rest}\n />\n );\n }\n\n return <View {...rest} />;\n }\n}\n\nexport const Screen = Animated.createAnimatedComponent(NativeScreen);\n\nexport const InnerScreen = View;\n\nexport const ScreenContext = React.createContext(Screen);\n\nexport const ScreenContainer: React.ComponentType<ScreenContainerProps> = View;\n\nexport const NativeScreenContainer: React.ComponentType<ScreenContainerProps> =\n View;\n\nexport const NativeScreenNavigationContainer: React.ComponentType<ScreenContainerProps> =\n View;\n\nexport const ScreenStack: React.ComponentType<ScreenStackProps> = View;\n\nexport const FullWindowOverlay = View as React.ComponentType<{\n children: ReactNode;\n}>;\n\nexport const ScreenStackHeaderBackButtonImage = (\n props: ImageProps\n): JSX.Element => (\n <View>\n <Image resizeMode=\"center\" fadeDuration={0} {...props} />\n </View>\n);\n\nexport const ScreenStackHeaderRightView = (\n props: React.PropsWithChildren<ViewProps>\n): JSX.Element => <View {...props} />;\n\nexport const ScreenStackHeaderLeftView = (\n props: React.PropsWithChildren<ViewProps>\n): JSX.Element => <View {...props} />;\n\nexport const ScreenStackHeaderCenterView = (\n props: React.PropsWithChildren<ViewProps>\n): JSX.Element => <View {...props} />;\n\nexport const ScreenStackHeaderSearchBarView = (\n props: React.PropsWithChildren<SearchBarProps>\n): JSX.Element => <View {...props} />;\n\nexport const ScreenStackHeaderConfig: React.ComponentType<ScreenStackHeaderConfigProps> =\n View;\n\n// @ts-expect-error: search bar props have no common props with View\nexport const SearchBar: React.ComponentType<SearchBarProps> = View;\n\nexport const ScreenStackHeaderSubview: React.ComponentType<\n React.PropsWithChildren<ViewProps & { type?: HeaderSubviewTypes }>\n> = View;\n\nexport const shouldUseActivityState = true;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAUA;AAAA;EAAA;EAAA;EAAA;EAAA;IAAA;IAAA;MAAA;IAAA;EAAA;AAAA;AACA;AACA;AAGiB;AAAA;AAEjB,IAAIA,cAAc,GAAG,IAAI;AAElB,SAASC,aAAa,GAAmC;EAAA,IAAlCC,mBAAmB,uEAAG,IAAI;EACtDF,cAAc,GAAGE,mBAAmB;AACtC;AAEO,SAASC,cAAc,GAAY;EACxC,OAAOH,cAAc;AACvB;;AAEA;AACA;AACO,SAASI,YAAY,GAAuC;EAAA,IAAtCC,uBAAuB,uEAAG,IAAI;AAE3D,CAAC,CADC;;AAGK,MAAMC,YAAY,SAASC,cAAK,CAACC,SAAS,CAAc;EAC7DC,MAAM,GAAgB;IACpB,IAAI;MACFC,MAAM;MACNC,aAAa;MACbC,KAAK;MACLC,OAAO,GAAGb,cAAc;MACxB,GAAGc;IACL,CAAC,GAAG,IAAI,CAACC,KAAK;IAEd,IAAIF,OAAO,EAAE;MACX,IAAIH,MAAM,KAAKM,SAAS,IAAIL,aAAa,KAAKK,SAAS,EAAE;QACvDL,aAAa,GAAGD,MAAM,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;MACxC;;MACA,oBACE,6BAAC;MACC;MAAA;QACA,MAAM,EAAEC,aAAa,KAAK,CAAE;QAC5B,KAAK,EAAE,CAACC,KAAK,EAAE;UAAEK,OAAO,EAAEN,aAAa,KAAK,CAAC,GAAG,MAAM,GAAG;QAAO,CAAC;MAAE,GAC/DG,IAAI,EACR;IAEN;IAEA,oBAAO,6BAAC,iBAAI,EAAKA,IAAI,CAAI;EAC3B;AACF;AAAC;AAEM,MAAMI,MAAM,GAAGC,qBAAQ,CAACC,uBAAuB,CAACd,YAAY,CAAC;AAAC;AAE9D,MAAMe,WAAW,GAAGC,iBAAI;AAAC;AAEzB,MAAMC,aAAa,gBAAGhB,cAAK,CAACiB,aAAa,CAACN,MAAM,CAAC;AAAC;AAElD,MAAMO,eAA0D,GAAGH,iBAAI;AAAC;AAExE,MAAMI,qBAAgE,GAC3EJ,iBAAI;AAAC;AAEA,MAAMK,+BAA0E,GACrFL,iBAAI;AAAC;AAEA,MAAMM,WAAkD,GAAGN,iBAAI;AAAC;AAEhE,MAAMO,iBAAiB,GAAGP,iBAE/B;AAAC;AAEI,MAAMQ,gCAAgC,GAC3Cf,KAAiB,iBAEjB,6BAAC,iBAAI,qBACH,6BAAC,kBAAK;EAAC,UAAU,EAAC,QAAQ;EAAC,YAAY,EAAE;AAAE,GAAKA,KAAK,EAAI,CAE5D;AAAC;AAEK,MAAMgB,0BAA0B,GACrChB,KAAyC,iBACzB,6BAAC,iBAAI,EAAKA,KAAK,CAAI;AAAC;AAE/B,MAAMiB,yBAAyB,GACpCjB,KAAyC,iBACzB,6BAAC,iBAAI,EAAKA,KAAK,CAAI;AAAC;AAE/B,MAAMkB,2BAA2B,GACtClB,KAAyC,iBACzB,6BAAC,iBAAI,EAAKA,KAAK,CAAI;AAAC;AAE/B,MAAMmB,8BAA8B,GACzCnB,KAA8C,iBAC9B,6BAAC,iBAAI,EAAKA,KAAK,CAAI;AAAC;AAE/B,MAAMoB,uBAA0E,GACrFb,iBAAI;;AAEN;AAAA;AACO,MAAMc,SAA8C,GAAGd,iBAAI;AAAC;AAE5D,MAAMe,wBAEZ,GAAGf,iBAAI;AAAC;AAEF,MAAMgB,sBAAsB,GAAG,IAAI;AAAC"}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_types","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_useTransitionProgress","_utils","obj","__esModule","default","_extends","assign","bind","target","i","arguments","length","source","apply","ENABLE_SCREENS","enableScreens","shouldEnableScreens","undefined","screensEnabled","enableFreeze","shouldEnableReactFreeze","NativeScreen","React","Component","render","active","activityState","style","enabled","rest","props","createElement","View","hidden","display","Screen","Animated","createAnimatedComponent","InnerScreen","ScreenContext","createContext","ScreenContainer","NativeScreenContainer","NativeScreenNavigationContainer","ScreenStack","FullWindowOverlay","ScreenStackHeaderBackButtonImage","Image","resizeMode","fadeDuration","ScreenStackHeaderRightView","ScreenStackHeaderLeftView","ScreenStackHeaderCenterView","ScreenStackHeaderSearchBarView","ScreenStackHeaderConfig","SearchBar","ScreenStackHeaderSubview","shouldUseActivityState"],"sources":["index.tsx"],"sourcesContent":["import React, { ReactNode } from 'react';\nimport { Animated, View, ViewProps, ImageProps, Image } from 'react-native';\nimport {\n ScreenProps,\n ScreenContainerProps,\n ScreenStackProps,\n ScreenStackHeaderConfigProps,\n HeaderSubviewTypes,\n SearchBarProps,\n} from './types';\n\nexport * from './types';\nexport { default as useTransitionProgress } from './useTransitionProgress';\nexport {\n isSearchBarAvailableForCurrentPlatform,\n isNewBackTitleImplementation,\n executeNativeBackPress,\n} from './utils';\n\nlet ENABLE_SCREENS = true;\n\nexport function enableScreens(shouldEnableScreens = true): void {\n ENABLE_SCREENS = shouldEnableScreens;\n}\n\nexport function screensEnabled(): boolean {\n return ENABLE_SCREENS;\n}\n\n// @ts-ignore function stub, freezing logic is located in index.native.tsx\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport function enableFreeze(shouldEnableReactFreeze = true): void {\n // noop\n}\n\nexport class NativeScreen extends React.Component<ScreenProps> {\n render(): JSX.Element {\n let {\n active,\n activityState,\n style,\n enabled = ENABLE_SCREENS,\n ...rest\n } = this.props;\n\n if (enabled) {\n if (active !== undefined && activityState === undefined) {\n activityState = active !== 0 ? 2 : 0; // change taken from index.native.tsx\n }\n return (\n <View\n // @ts-expect-error: hidden exists on web, but not in React Native\n hidden={activityState === 0}\n style={[style, { display: activityState !== 0 ? 'flex' : 'none' }]}\n {...rest}\n />\n );\n }\n\n return <View {...rest} />;\n }\n}\n\nexport const Screen = Animated.createAnimatedComponent(NativeScreen);\n\nexport const InnerScreen = View;\n\nexport const ScreenContext = React.createContext(Screen);\n\nexport const ScreenContainer: React.ComponentType<ScreenContainerProps> = View;\n\nexport const NativeScreenContainer: React.ComponentType<ScreenContainerProps> =\n View;\n\nexport const NativeScreenNavigationContainer: React.ComponentType<ScreenContainerProps> =\n View;\n\nexport const ScreenStack: React.ComponentType<ScreenStackProps> = View;\n\nexport const FullWindowOverlay = View as React.ComponentType<{\n children: ReactNode;\n}>;\n\nexport const ScreenStackHeaderBackButtonImage = (\n props: ImageProps\n): JSX.Element => (\n <View>\n <Image resizeMode=\"center\" fadeDuration={0} {...props} />\n </View>\n);\n\nexport const ScreenStackHeaderRightView = (\n props: React.PropsWithChildren<ViewProps>\n): JSX.Element => <View {...props} />;\n\nexport const ScreenStackHeaderLeftView = (\n props: React.PropsWithChildren<ViewProps>\n): JSX.Element => <View {...props} />;\n\nexport const ScreenStackHeaderCenterView = (\n props: React.PropsWithChildren<ViewProps>\n): JSX.Element => <View {...props} />;\n\nexport const ScreenStackHeaderSearchBarView = (\n props: React.PropsWithChildren<Omit<SearchBarProps, 'ref'>>\n): JSX.Element => <View {...props} />;\n\nexport const ScreenStackHeaderConfig = (\n props: React.PropsWithChildren<ScreenStackHeaderConfigProps>\n): JSX.Element => <View {...props} />;\n\n// @ts-expect-error: search bar props have no common props with View\nexport const SearchBar: React.ComponentType<SearchBarProps> = View;\n\nexport const ScreenStackHeaderSubview: React.ComponentType<\n React.PropsWithChildren<ViewProps & { type?: HeaderSubviewTypes }>\n> = View;\n\nexport const shouldUseActivityState = true;\n"],"mappings":"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"}
@@ -39,7 +39,6 @@ const shouldUseActivityState = true;
39
39
  function screensEnabled() {
40
40
  return ENABLE_SCREENS;
41
41
  }
42
-
43
42
  // We initialize these lazily so that importing the module doesn't throw error when not linked
44
43
  // This is necessary coz libraries such as React Navigation import the library where it may not be enabled
45
44
  let NativeScreenValue;
@@ -50,14 +49,15 @@ let NativeScreenStackHeaderConfig;
50
49
  let NativeScreenStackHeaderSubview;
51
50
  let AnimatedNativeScreen;
52
51
  let NativeSearchBar;
52
+ let NativeSearchBarCommands;
53
53
  let NativeFullWindowOverlay;
54
54
  const ScreensNativeModules = {
55
55
  get NativeScreen() {
56
- NativeScreenValue = NativeScreenValue || (0, _reactNative.requireNativeComponent)('RNSScreen');
56
+ NativeScreenValue = NativeScreenValue || require('./fabric/ScreenNativeComponent').default;
57
57
  return NativeScreenValue;
58
58
  },
59
59
  get NativeScreenContainer() {
60
- NativeScreenContainerValue = NativeScreenContainerValue || (0, _reactNative.requireNativeComponent)('RNSScreenContainer');
60
+ NativeScreenContainerValue = NativeScreenContainerValue || require('./fabric/ScreenContainerNativeComponent').default;
61
61
  return NativeScreenContainerValue;
62
62
  },
63
63
  get NativeScreenNavigationContainer() {
@@ -77,9 +77,13 @@ const ScreensNativeModules = {
77
77
  return NativeScreenStackHeaderSubview;
78
78
  },
79
79
  get NativeSearchBar() {
80
- NativeSearchBar = NativeSearchBar || (0, _reactNative.requireNativeComponent)('RNSSearchBar');
80
+ NativeSearchBar = NativeSearchBar || require('./fabric/SearchBarNativeComponent').default;
81
81
  return NativeSearchBar;
82
82
  },
83
+ get NativeSearchBarCommands() {
84
+ NativeSearchBarCommands = NativeSearchBarCommands || require('./fabric/SearchBarNativeComponent').Commands;
85
+ return NativeSearchBarCommands;
86
+ },
83
87
  get NativeFullWindowOverlay() {
84
88
  NativeFullWindowOverlay = NativeFullWindowOverlay || (0, _reactNative.requireNativeComponent)('RNSFullWindowOverlay');
85
89
  return NativeFullWindowOverlay;
@@ -281,6 +285,45 @@ const ScreenStackHeaderBackButtonImage = props => /*#__PURE__*/_react.default.cr
281
285
  resizeMode: "center",
282
286
  fadeDuration: 0
283
287
  }, props)));
288
+ class SearchBar extends _react.default.Component {
289
+ constructor(props) {
290
+ super(props);
291
+ _defineProperty(this, "nativeSearchBarRef", void 0);
292
+ this.nativeSearchBarRef = /*#__PURE__*/_react.default.createRef();
293
+ }
294
+ _callMethodWithRef(method) {
295
+ const ref = this.nativeSearchBarRef.current;
296
+ if (ref) {
297
+ method(ref);
298
+ } else {
299
+ console.warn('Reference to native search bar component has not been updated yet');
300
+ }
301
+ }
302
+ blur() {
303
+ this._callMethodWithRef(ref => ScreensNativeModules.NativeSearchBarCommands.blur(ref));
304
+ }
305
+ focus() {
306
+ this._callMethodWithRef(ref => ScreensNativeModules.NativeSearchBarCommands.focus(ref));
307
+ }
308
+ toggleCancelButton(flag) {
309
+ this._callMethodWithRef(ref => ScreensNativeModules.NativeSearchBarCommands.toggleCancelButton(ref, flag));
310
+ }
311
+ clearText() {
312
+ this._callMethodWithRef(ref => ScreensNativeModules.NativeSearchBarCommands.clearText(ref));
313
+ }
314
+ setText(text) {
315
+ this._callMethodWithRef(ref => ScreensNativeModules.NativeSearchBarCommands.setText(ref, text));
316
+ }
317
+ render() {
318
+ if (!_utils.isSearchBarAvailableForCurrentPlatform) {
319
+ console.warn('Importing SearchBar is only valid on iOS and Android devices.');
320
+ return _reactNative.View;
321
+ }
322
+ return /*#__PURE__*/_react.default.createElement(ScreensNativeModules.NativeSearchBar, _extends({}, this.props, {
323
+ ref: this.nativeSearchBarRef
324
+ }));
325
+ }
326
+ }
284
327
  const ScreenStackHeaderRightView = props => /*#__PURE__*/_react.default.createElement(ScreensNativeModules.NativeScreenStackHeaderSubview, _extends({}, props, {
285
328
  type: "right",
286
329
  style: styles.headerSubview
@@ -315,6 +358,7 @@ module.exports = {
315
358
  ScreenContext,
316
359
  ScreenStack,
317
360
  InnerScreen,
361
+ SearchBar,
318
362
  FullWindowOverlay,
319
363
  get NativeScreen() {
320
364
  return ScreensNativeModules.NativeScreen;
@@ -331,12 +375,8 @@ module.exports = {
331
375
  get ScreenStackHeaderSubview() {
332
376
  return ScreensNativeModules.NativeScreenStackHeaderSubview;
333
377
  },
334
- get SearchBar() {
335
- if (!_utils.isSearchBarAvailableForCurrentPlatform) {
336
- console.warn('Importing SearchBar is only valid on iOS and Android devices.');
337
- return _reactNative.View;
338
- }
339
- return ScreensNativeModules.NativeSearchBar;
378
+ get SearchBarCommands() {
379
+ return ScreensNativeModules.NativeSearchBarCommands;
340
380
  },
341
381
  // these are functions and will not be evaluated until used
342
382
  // so no need to use getters for them
@@ -351,6 +391,7 @@ module.exports = {
351
391
  shouldUseActivityState,
352
392
  useTransitionProgress: _useTransitionProgress.default,
353
393
  isSearchBarAvailableForCurrentPlatform: _utils.isSearchBarAvailableForCurrentPlatform,
394
+ isNewBackTitleImplementation: _utils.isNewBackTitleImplementation,
354
395
  executeNativeBackPress: _utils.executeNativeBackPress
355
396
  };
356
397
  //# sourceMappingURL=index.native.js.map