react-native-screens 4.20.0-nightly-20251216-94c1d7108 → 4.20.0-nightly-20251218-06a5812f7

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 (180) hide show
  1. package/ios/RNSScreenStackHeaderSubview.mm +73 -44
  2. package/ios/gamma/stack/{RNSStackController.swift → host/RNSStackController.swift} +5 -5
  3. package/ios/gamma/stack/{RNSScreenStackHostComponentView.h → host/RNSStackHostComponentView.h} +1 -1
  4. package/ios/gamma/stack/{RNSScreenStackHostComponentView.mm → host/RNSStackHostComponentView.mm} +6 -6
  5. package/ios/gamma/stack/{RNSScreenStackHostComponentViewManager.h → host/RNSStackHostComponentViewManager.h} +1 -1
  6. package/ios/gamma/stack/host/RNSStackHostComponentViewManager.mm +7 -0
  7. package/ios/gamma/stack/{RNSStackScreenComponentView.h → screen/RNSStackScreenComponentView.h} +7 -7
  8. package/ios/gamma/stack/{RNSStackScreenComponentView.mm → screen/RNSStackScreenComponentView.mm} +2 -2
  9. package/ios/gamma/stack/{RNSStackScreenController.swift → screen/RNSStackScreenController.swift} +4 -4
  10. package/ios/stubs/RNSGammaStubs.h +1 -1
  11. package/ios/stubs/RNSGammaStubs.mm +1 -1
  12. package/lib/commonjs/components/gamma/split/SplitHost.android.js +12 -0
  13. package/lib/commonjs/components/gamma/split/SplitHost.android.js.map +1 -0
  14. package/lib/commonjs/components/gamma/{split-view/SplitViewHost.js → split/SplitHost.js} +9 -9
  15. package/lib/commonjs/components/gamma/split/SplitHost.js.map +1 -0
  16. package/lib/commonjs/components/gamma/{split-view/SplitViewHost.types.js → split/SplitHost.types.js} +1 -1
  17. package/lib/commonjs/components/gamma/split/SplitHost.types.js.map +1 -0
  18. package/lib/commonjs/components/gamma/split/SplitHost.web.js +12 -0
  19. package/lib/commonjs/components/gamma/split/SplitHost.web.js.map +1 -0
  20. package/lib/commonjs/components/gamma/{split-view/SplitViewScreen.web.js → split/SplitScreen.android.js} +2 -2
  21. package/lib/commonjs/components/gamma/split/SplitScreen.android.js.map +1 -0
  22. package/lib/commonjs/components/gamma/{split-view/SplitViewScreen.js → split/SplitScreen.js} +3 -3
  23. package/lib/commonjs/components/gamma/split/SplitScreen.js.map +1 -0
  24. package/lib/commonjs/components/gamma/{split-view/SplitViewScreen.types.js → split/SplitScreen.types.js} +1 -1
  25. package/lib/commonjs/components/gamma/split/SplitScreen.types.js.map +1 -0
  26. package/lib/commonjs/components/gamma/split/SplitScreen.web.js +23 -0
  27. package/lib/commonjs/components/gamma/split/SplitScreen.web.js.map +1 -0
  28. package/lib/commonjs/components/gamma/split/index.js +44 -0
  29. package/lib/commonjs/components/gamma/split/index.js.map +1 -0
  30. package/lib/commonjs/components/gamma/stack/StackHost.js +2 -2
  31. package/lib/commonjs/components/gamma/stack/StackHost.js.map +1 -1
  32. package/lib/commonjs/components/gamma/stack/StackHost.web.js +4 -2
  33. package/lib/commonjs/components/gamma/stack/StackHost.web.js.map +1 -1
  34. package/lib/commonjs/components/gamma/stack/StackScreen.js +1 -1
  35. package/lib/commonjs/components/gamma/stack/StackScreen.js.map +1 -1
  36. package/lib/commonjs/experimental/index.js +4 -12
  37. package/lib/commonjs/experimental/index.js.map +1 -1
  38. package/lib/commonjs/experimental/types.js +12 -12
  39. package/lib/commonjs/experimental/types.js.map +1 -1
  40. package/lib/commonjs/fabric/gamma/{ScreenStackHostNativeComponent.js → stack/StackHostNativeComponent.js} +2 -2
  41. package/lib/commonjs/fabric/gamma/stack/StackHostNativeComponent.js.map +1 -0
  42. package/lib/commonjs/fabric/gamma/stack/StackScreenNativeComponent.js.map +1 -0
  43. package/lib/module/components/gamma/split/SplitHost.android.js +6 -0
  44. package/lib/module/components/gamma/split/SplitHost.android.js.map +1 -0
  45. package/lib/module/components/gamma/{split-view/SplitViewHost.js → split/SplitHost.js} +9 -9
  46. package/lib/module/components/gamma/split/SplitHost.js.map +1 -0
  47. package/lib/module/components/gamma/split/SplitHost.types.js +2 -0
  48. package/lib/module/components/gamma/split/SplitHost.types.js.map +1 -0
  49. package/lib/module/components/gamma/split/SplitHost.web.js +6 -0
  50. package/lib/module/components/gamma/split/SplitHost.web.js.map +1 -0
  51. package/lib/module/components/gamma/split/SplitScreen.android.js +11 -0
  52. package/lib/module/components/gamma/split/SplitScreen.android.js.map +1 -0
  53. package/lib/module/components/gamma/{split-view/SplitViewScreen.js → split/SplitScreen.js} +3 -3
  54. package/lib/module/components/gamma/split/SplitScreen.js.map +1 -0
  55. package/lib/module/components/gamma/split/SplitScreen.types.js +2 -0
  56. package/lib/module/components/gamma/split/SplitScreen.types.js.map +1 -0
  57. package/lib/module/components/gamma/split/SplitScreen.web.js +17 -0
  58. package/lib/module/components/gamma/split/SplitScreen.web.js.map +1 -0
  59. package/lib/module/components/gamma/split/index.js +15 -0
  60. package/lib/module/components/gamma/split/index.js.map +1 -0
  61. package/lib/module/components/gamma/stack/StackHost.js +2 -2
  62. package/lib/module/components/gamma/stack/StackHost.js.map +1 -1
  63. package/lib/module/components/gamma/stack/StackHost.web.js +5 -2
  64. package/lib/module/components/gamma/stack/StackHost.web.js.map +1 -1
  65. package/lib/module/components/gamma/stack/StackScreen.js +1 -1
  66. package/lib/module/components/gamma/stack/StackScreen.js.map +1 -1
  67. package/lib/module/experimental/index.js +1 -2
  68. package/lib/module/experimental/index.js.map +1 -1
  69. package/lib/module/experimental/types.js +2 -2
  70. package/lib/module/experimental/types.js.map +1 -1
  71. package/lib/module/fabric/gamma/stack/StackHostNativeComponent.js +5 -0
  72. package/lib/module/fabric/gamma/stack/StackHostNativeComponent.js.map +1 -0
  73. package/lib/module/fabric/gamma/stack/StackScreenNativeComponent.js.map +1 -0
  74. package/lib/typescript/components/bottom-tabs/BottomTabsScreen.types.d.ts +1 -1
  75. package/lib/typescript/components/gamma/split/SplitHost.android.d.ts +3 -0
  76. package/lib/typescript/components/gamma/split/SplitHost.android.d.ts.map +1 -0
  77. package/lib/typescript/components/gamma/split/SplitHost.d.ts +8 -0
  78. package/lib/typescript/components/gamma/split/SplitHost.d.ts.map +1 -0
  79. package/lib/typescript/components/gamma/{split-view/SplitViewHost.types.d.ts → split/SplitHost.types.d.ts} +35 -35
  80. package/lib/typescript/components/gamma/split/SplitHost.types.d.ts.map +1 -0
  81. package/lib/typescript/components/gamma/split/SplitHost.web.d.ts +3 -0
  82. package/lib/typescript/components/gamma/split/SplitHost.web.d.ts.map +1 -0
  83. package/lib/typescript/components/gamma/{split-view/SplitViewScreen.web.d.ts → split/SplitScreen.android.d.ts} +1 -1
  84. package/lib/typescript/components/gamma/split/SplitScreen.android.d.ts.map +1 -0
  85. package/lib/typescript/components/gamma/split/SplitScreen.d.ts +19 -0
  86. package/lib/typescript/components/gamma/split/SplitScreen.d.ts.map +1 -0
  87. package/lib/typescript/components/gamma/{split-view/SplitViewScreen.types.d.ts → split/SplitScreen.types.d.ts} +7 -7
  88. package/lib/typescript/components/gamma/split/SplitScreen.types.d.ts.map +1 -0
  89. package/lib/typescript/components/gamma/split/SplitScreen.web.d.ts +9 -0
  90. package/lib/typescript/components/gamma/split/SplitScreen.web.d.ts.map +1 -0
  91. package/lib/typescript/components/gamma/split/index.d.ts +13 -0
  92. package/lib/typescript/components/gamma/split/index.d.ts.map +1 -0
  93. package/lib/typescript/components/gamma/stack/StackHost.d.ts +2 -2
  94. package/lib/typescript/components/gamma/stack/StackHost.d.ts.map +1 -1
  95. package/lib/typescript/components/gamma/stack/StackHost.types.d.ts +1 -1
  96. package/lib/typescript/components/gamma/stack/StackHost.types.d.ts.map +1 -1
  97. package/lib/typescript/components/gamma/stack/StackHost.web.d.ts +2 -2
  98. package/lib/typescript/components/gamma/stack/StackHost.web.d.ts.map +1 -1
  99. package/lib/typescript/experimental/index.d.ts +1 -2
  100. package/lib/typescript/experimental/index.d.ts.map +1 -1
  101. package/lib/typescript/experimental/types.d.ts +2 -2
  102. package/lib/typescript/experimental/types.d.ts.map +1 -1
  103. package/lib/typescript/fabric/gamma/{ScreenStackHostNativeComponent.d.ts → stack/StackHostNativeComponent.d.ts} +1 -1
  104. package/lib/typescript/fabric/gamma/stack/StackHostNativeComponent.d.ts.map +1 -0
  105. package/lib/typescript/fabric/gamma/stack/StackScreenNativeComponent.d.ts.map +1 -0
  106. package/package.json +4 -4
  107. package/src/components/bottom-tabs/BottomTabsScreen.types.ts +1 -1
  108. package/src/components/gamma/split/SplitHost.android.tsx +8 -0
  109. package/src/components/gamma/{split-view/SplitViewHost.tsx → split/SplitHost.tsx} +16 -16
  110. package/src/components/gamma/{split-view/SplitViewHost.types.ts → split/SplitHost.types.ts} +34 -41
  111. package/src/components/gamma/split/SplitHost.web.tsx +8 -0
  112. package/src/components/gamma/{split-view/SplitViewScreen.android.tsx → split/SplitScreen.android.tsx} +1 -1
  113. package/src/components/gamma/{split-view/SplitViewScreen.tsx → split/SplitScreen.tsx} +5 -5
  114. package/src/components/gamma/{split-view/SplitViewScreen.types.ts → split/SplitScreen.types.ts} +6 -6
  115. package/src/components/gamma/split/SplitScreen.web.tsx +20 -0
  116. package/src/components/gamma/split/index.ts +16 -0
  117. package/src/components/gamma/stack/StackHost.tsx +5 -5
  118. package/src/components/gamma/stack/StackHost.types.ts +1 -1
  119. package/src/components/gamma/stack/StackHost.web.tsx +3 -2
  120. package/src/components/gamma/stack/StackScreen.tsx +1 -1
  121. package/src/experimental/index.ts +1 -2
  122. package/src/experimental/types.ts +2 -2
  123. package/src/fabric/gamma/{ScreenStackHostNativeComponent.ts → stack/StackHostNativeComponent.ts} +1 -1
  124. package/ios/gamma/stack/RNSScreenStackHostComponentViewManager.mm +0 -7
  125. package/lib/commonjs/components/gamma/split-view/SplitViewHost.android.js +0 -12
  126. package/lib/commonjs/components/gamma/split-view/SplitViewHost.android.js.map +0 -1
  127. package/lib/commonjs/components/gamma/split-view/SplitViewHost.js.map +0 -1
  128. package/lib/commonjs/components/gamma/split-view/SplitViewHost.types.js.map +0 -1
  129. package/lib/commonjs/components/gamma/split-view/SplitViewHost.web.js +0 -12
  130. package/lib/commonjs/components/gamma/split-view/SplitViewHost.web.js.map +0 -1
  131. package/lib/commonjs/components/gamma/split-view/SplitViewScreen.android.js +0 -17
  132. package/lib/commonjs/components/gamma/split-view/SplitViewScreen.android.js.map +0 -1
  133. package/lib/commonjs/components/gamma/split-view/SplitViewScreen.js.map +0 -1
  134. package/lib/commonjs/components/gamma/split-view/SplitViewScreen.types.js.map +0 -1
  135. package/lib/commonjs/components/gamma/split-view/SplitViewScreen.web.js.map +0 -1
  136. package/lib/commonjs/fabric/gamma/ScreenStackHostNativeComponent.js.map +0 -1
  137. package/lib/commonjs/fabric/gamma/StackScreenNativeComponent.js.map +0 -1
  138. package/lib/module/components/gamma/split-view/SplitViewHost.android.js +0 -6
  139. package/lib/module/components/gamma/split-view/SplitViewHost.android.js.map +0 -1
  140. package/lib/module/components/gamma/split-view/SplitViewHost.js.map +0 -1
  141. package/lib/module/components/gamma/split-view/SplitViewHost.types.js +0 -2
  142. package/lib/module/components/gamma/split-view/SplitViewHost.types.js.map +0 -1
  143. package/lib/module/components/gamma/split-view/SplitViewHost.web.js +0 -6
  144. package/lib/module/components/gamma/split-view/SplitViewHost.web.js.map +0 -1
  145. package/lib/module/components/gamma/split-view/SplitViewScreen.android.js +0 -11
  146. package/lib/module/components/gamma/split-view/SplitViewScreen.android.js.map +0 -1
  147. package/lib/module/components/gamma/split-view/SplitViewScreen.js.map +0 -1
  148. package/lib/module/components/gamma/split-view/SplitViewScreen.types.js +0 -2
  149. package/lib/module/components/gamma/split-view/SplitViewScreen.types.js.map +0 -1
  150. package/lib/module/components/gamma/split-view/SplitViewScreen.web.js +0 -11
  151. package/lib/module/components/gamma/split-view/SplitViewScreen.web.js.map +0 -1
  152. package/lib/module/fabric/gamma/ScreenStackHostNativeComponent.js +0 -5
  153. package/lib/module/fabric/gamma/ScreenStackHostNativeComponent.js.map +0 -1
  154. package/lib/module/fabric/gamma/StackScreenNativeComponent.js.map +0 -1
  155. package/lib/typescript/components/gamma/split-view/SplitViewHost.android.d.ts +0 -3
  156. package/lib/typescript/components/gamma/split-view/SplitViewHost.android.d.ts.map +0 -1
  157. package/lib/typescript/components/gamma/split-view/SplitViewHost.d.ts +0 -8
  158. package/lib/typescript/components/gamma/split-view/SplitViewHost.d.ts.map +0 -1
  159. package/lib/typescript/components/gamma/split-view/SplitViewHost.types.d.ts.map +0 -1
  160. package/lib/typescript/components/gamma/split-view/SplitViewHost.web.d.ts +0 -3
  161. package/lib/typescript/components/gamma/split-view/SplitViewHost.web.d.ts.map +0 -1
  162. package/lib/typescript/components/gamma/split-view/SplitViewScreen.android.d.ts +0 -6
  163. package/lib/typescript/components/gamma/split-view/SplitViewScreen.android.d.ts.map +0 -1
  164. package/lib/typescript/components/gamma/split-view/SplitViewScreen.d.ts +0 -19
  165. package/lib/typescript/components/gamma/split-view/SplitViewScreen.d.ts.map +0 -1
  166. package/lib/typescript/components/gamma/split-view/SplitViewScreen.types.d.ts.map +0 -1
  167. package/lib/typescript/components/gamma/split-view/SplitViewScreen.web.d.ts.map +0 -1
  168. package/lib/typescript/fabric/gamma/ScreenStackHostNativeComponent.d.ts.map +0 -1
  169. package/lib/typescript/fabric/gamma/StackScreenNativeComponent.d.ts.map +0 -1
  170. package/src/components/gamma/split-view/SplitViewHost.android.tsx +0 -8
  171. package/src/components/gamma/split-view/SplitViewHost.web.tsx +0 -8
  172. package/src/components/gamma/split-view/SplitViewScreen.web.tsx +0 -11
  173. /package/ios/gamma/stack/{RNSStackScreenComponentEventEmitter.h → screen/RNSStackScreenComponentEventEmitter.h} +0 -0
  174. /package/ios/gamma/stack/{RNSStackScreenComponentEventEmitter.mm → screen/RNSStackScreenComponentEventEmitter.mm} +0 -0
  175. /package/ios/gamma/stack/{RNSStackScreenComponentViewManager.h → screen/RNSStackScreenComponentViewManager.h} +0 -0
  176. /package/ios/gamma/stack/{RNSStackScreenComponentViewManager.mm → screen/RNSStackScreenComponentViewManager.mm} +0 -0
  177. /package/lib/commonjs/fabric/gamma/{StackScreenNativeComponent.js → stack/StackScreenNativeComponent.js} +0 -0
  178. /package/lib/module/fabric/gamma/{StackScreenNativeComponent.js → stack/StackScreenNativeComponent.js} +0 -0
  179. /package/lib/typescript/fabric/gamma/{StackScreenNativeComponent.d.ts → stack/StackScreenNativeComponent.d.ts} +0 -0
  180. /package/src/fabric/gamma/{StackScreenNativeComponent.ts → stack/StackScreenNativeComponent.ts} +0 -0
@@ -174,14 +174,17 @@ RNS_IGNORE_SUPER_CALL_BEGIN
174
174
  self);
175
175
  } else {
176
176
  #if RNS_IPHONE_OS_VERSION_AVAILABLE(26_0)
177
- BOOL sizeHasChanged = _layoutMetrics.frame.size != layoutMetrics.frame.size;
178
- _layoutMetrics = layoutMetrics;
179
- if (sizeHasChanged) {
180
- [self invalidateIntrinsicContentSize];
181
- }
182
- #else // RNS_IPHONE_OS_VERSION_AVAILABLE(26_0)
183
- self.bounds = CGRect{CGPointZero, frame.size};
177
+ if (self.needsAutoLayout) {
178
+ BOOL sizeHasChanged = _layoutMetrics.frame.size != layoutMetrics.frame.size;
179
+ _layoutMetrics = layoutMetrics;
180
+ if (sizeHasChanged) {
181
+ [self invalidateIntrinsicContentSize];
182
+ }
183
+ } else
184
184
  #endif // RNS_IPHONE_OS_VERSION_AVAILABLE(26_0)
185
+ {
186
+ self.bounds = CGRect{CGPointZero, frame.size};
187
+ }
185
188
  [self layoutNavigationBar];
186
189
  }
187
190
  }
@@ -206,56 +209,82 @@ RNS_IGNORE_SUPER_CALL_END
206
209
  // makes UINavigationBar the only one to control the position of header content.
207
210
  if (!CGSizeEqualToSize(frame.size, self.frame.size)) {
208
211
  #if RNS_IPHONE_OS_VERSION_AVAILABLE(26_0)
209
- _lastReactFrameSize = frame.size;
210
- [self invalidateIntrinsicContentSize];
211
- #else // RNS_IPHONE_OS_VERSION_AVAILABLE(26_0)
212
- [super reactSetFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
212
+ if (self.needsAutoLayout) {
213
+ _lastReactFrameSize = frame.size;
214
+ [self invalidateIntrinsicContentSize];
215
+ } else
213
216
  #endif // RNS_IPHONE_OS_VERSION_AVAILABLE(26_0)
217
+ {
218
+ [super reactSetFrame:CGRectMake(0, 0, frame.size.width, frame.size.height)];
219
+ }
214
220
  [self layoutNavigationBar];
215
221
  }
216
222
  }
217
223
 
218
224
  #endif // RCT_NEW_ARCH_ENABLED
219
225
 
226
+ #if RNS_IPHONE_OS_VERSION_AVAILABLE(26_0)
227
+
228
+ // Starting from iOS 26, to center left and right subviews inside liquid glass backdrop,
229
+ // we need to use auto layout. To make Yoga's layout work with auto layout, we pass information
230
+ // from Yoga via `intrinsicContentSize`.
231
+ - (BOOL)needsAutoLayout
232
+ {
233
+ BOOL needsAutoLayout = NO;
234
+ if (@available(iOS 26.0, *)) {
235
+ needsAutoLayout = _type == RNSScreenStackHeaderSubviewTypeLeft || _type == RNSScreenStackHeaderSubviewTypeRight;
236
+ }
237
+ return needsAutoLayout;
238
+ }
239
+
240
+ #endif // RNS_IPHONE_OS_VERSION_AVAILABLE(26_0)
241
+
220
242
  #pragma mark - UIBarButtonItem specific
221
243
 
222
244
  - (UIBarButtonItem *)getUIBarButtonItem
223
245
  {
246
+ RCTAssert(
247
+ _type == RNSScreenStackHeaderSubviewTypeLeft || _type == RNSScreenStackHeaderSubviewTypeRight,
248
+ @"[RNScreens] Unexpected subview type.");
249
+
224
250
  if (_barButtonItem == nil) {
225
251
  #if RNS_IPHONE_OS_VERSION_AVAILABLE(26_0)
226
- // Starting from iOS 26, UIBarButtonItem's customView is streched to have at least 36 width.
227
- // Stretching RNSScreenStackHeaderSubview means that its subviews are aligned to left instead
228
- // of the center. To mitigate this, we add a wrapper view that will center
229
- // RNSScreenStackHeaderSubview inside of itself.
230
- UIView *wrapperView = [UIView new];
231
- wrapperView.translatesAutoresizingMaskIntoConstraints = NO;
232
-
233
- self.translatesAutoresizingMaskIntoConstraints = NO;
234
- [wrapperView addSubview:self];
235
-
236
- [self.centerXAnchor constraintEqualToAnchor:wrapperView.centerXAnchor].active = YES;
237
- [self.centerYAnchor constraintEqualToAnchor:wrapperView.centerYAnchor].active = YES;
238
-
239
- // To prevent UIKit from stretching subviews to all available width, we need to:
240
- // 1. Set width of wrapperView to match RNSScreenStackHeaderSubview BUT when
241
- // RNSScreenStackHeaderSubview's width is smaller that minimal required 36 width, it breaks
242
- // UIKit's constraint. That's why we need to lower the priority of the constraint.
243
- NSLayoutConstraint *widthEqual = [wrapperView.widthAnchor constraintEqualToAnchor:self.widthAnchor];
244
- widthEqual.priority = UILayoutPriorityDefaultHigh;
245
- widthEqual.active = YES;
246
-
247
- NSLayoutConstraint *heightEqual = [wrapperView.heightAnchor constraintEqualToAnchor:self.heightAnchor];
248
- heightEqual.priority = UILayoutPriorityDefaultHigh;
249
- heightEqual.active = YES;
250
-
251
- // 2. Set content hugging priority for RNSScreenStackHeaderSubview.
252
- [self setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
253
- [self setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical];
254
-
255
- _barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:wrapperView];
256
- #else // RNS_IPHONE_OS_VERSION_AVAILABLE(26_0)
257
- _barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:self];
252
+ if (@available(iOS 26.0, *)) {
253
+ // Starting from iOS 26, UIBarButtonItem's customView is streched to have at least 36 width.
254
+ // Stretching RNSScreenStackHeaderSubview means that its subviews are aligned to left instead
255
+ // of the center. To mitigate this, we add a wrapper view that will center
256
+ // RNSScreenStackHeaderSubview inside of itself.
257
+ UIView *wrapperView = [UIView new];
258
+ wrapperView.translatesAutoresizingMaskIntoConstraints = NO;
259
+
260
+ self.translatesAutoresizingMaskIntoConstraints = NO;
261
+ [wrapperView addSubview:self];
262
+
263
+ [self.centerXAnchor constraintEqualToAnchor:wrapperView.centerXAnchor].active = YES;
264
+ [self.centerYAnchor constraintEqualToAnchor:wrapperView.centerYAnchor].active = YES;
265
+
266
+ // To prevent UIKit from stretching subviews to all available width, we need to:
267
+ // 1. Set width of wrapperView to match RNSScreenStackHeaderSubview BUT when
268
+ // RNSScreenStackHeaderSubview's width is smaller that minimal required 36 width, it breaks
269
+ // UIKit's constraint. That's why we need to lower the priority of the constraint.
270
+ NSLayoutConstraint *widthEqual = [wrapperView.widthAnchor constraintEqualToAnchor:self.widthAnchor];
271
+ widthEqual.priority = UILayoutPriorityDefaultHigh;
272
+ widthEqual.active = YES;
273
+
274
+ NSLayoutConstraint *heightEqual = [wrapperView.heightAnchor constraintEqualToAnchor:self.heightAnchor];
275
+ heightEqual.priority = UILayoutPriorityDefaultHigh;
276
+ heightEqual.active = YES;
277
+
278
+ // 2. Set content hugging priority for RNSScreenStackHeaderSubview.
279
+ [self setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisHorizontal];
280
+ [self setContentHuggingPriority:UILayoutPriorityRequired forAxis:UILayoutConstraintAxisVertical];
281
+
282
+ _barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:wrapperView];
283
+ } else
258
284
  #endif // RNS_IPHONE_OS_VERSION_AVAILABLE(26_0)
285
+ {
286
+ _barButtonItem = [[UIBarButtonItem alloc] initWithCustomView:self];
287
+ }
259
288
  [self configureBarButtonItem];
260
289
  }
261
290
 
@@ -281,7 +310,7 @@ RNS_IGNORE_SUPER_CALL_END
281
310
  [_barButtonItem setHidesSharedBackground:_hidesSharedBackground];
282
311
  }
283
312
  }
284
- #endif
313
+ #endif // RNS_IPHONE_OS_VERSION_AVAILABLE(26_0)
285
314
  }
286
315
 
287
316
  - (void)setHidesSharedBackground:(BOOL)hidesSharedBackground
@@ -4,10 +4,10 @@ import UIKit
4
4
  @objc
5
5
  public class RNSStackController: UINavigationController, ReactMountingTransactionObserving {
6
6
  private var needsChildViewControllersUpdate = false
7
- private let screenStackHostComponentView: RNSScreenStackHostComponentView
7
+ private let stackHostComponentView: RNSStackHostComponentView
8
8
 
9
- @objc public required init(stackHostComponentView: RNSScreenStackHostComponentView) {
10
- self.screenStackHostComponentView = stackHostComponentView
9
+ @objc public required init(stackHostComponentView: RNSStackHostComponentView) {
10
+ self.stackHostComponentView = stackHostComponentView
11
11
  super.init(nibName: nil, bundle: nil)
12
12
  }
13
13
 
@@ -38,7 +38,7 @@ public class RNSStackController: UINavigationController, ReactMountingTransactio
38
38
  "[RNScreens] Child view controller must be invalidated when update is forced!")
39
39
 
40
40
  let activeControllers = sourceAllViewControllers()
41
- .filter { screenCtrl in screenCtrl.screenStackComponentView.maxLifecycleState == .attached }
41
+ .filter { screenCtrl in screenCtrl.screen.maxLifecycleState == .attached }
42
42
 
43
43
  setViewControllers(activeControllers, animated: true)
44
44
 
@@ -47,7 +47,7 @@ public class RNSStackController: UINavigationController, ReactMountingTransactio
47
47
 
48
48
  private func sourceAllViewControllers() -> [RNSStackScreenController] {
49
49
  let screenStackComponents =
50
- screenStackHostComponentView.reactSubviews() as! [RNSStackScreenComponentView]
50
+ stackHostComponentView.reactSubviews() as! [RNSStackScreenComponentView]
51
51
  return screenStackComponents.lazy.map(\.controller)
52
52
  }
53
53
 
@@ -7,7 +7,7 @@
7
7
 
8
8
  NS_ASSUME_NONNULL_BEGIN
9
9
 
10
- @interface RNSScreenStackHostComponentView : RNSReactBaseView
10
+ @interface RNSStackHostComponentView : RNSReactBaseView
11
11
 
12
12
  @property (nonatomic, nonnull, strong, readonly) RNSStackController *stackController;
13
13
 
@@ -1,4 +1,4 @@
1
- #import "RNSScreenStackHostComponentView.h"
1
+ #import "RNSStackHostComponentView.h"
2
2
 
3
3
  #import <React/RCTConversions.h>
4
4
  #import <React/RCTMountingTransactionObserving.h>
@@ -13,10 +13,10 @@
13
13
 
14
14
  namespace react = facebook::react;
15
15
 
16
- @interface RNSScreenStackHostComponentView () <RCTMountingTransactionObserving>
16
+ @interface RNSStackHostComponentView () <RCTMountingTransactionObserving>
17
17
  @end
18
18
 
19
- @implementation RNSScreenStackHostComponentView {
19
+ @implementation RNSStackHostComponentView {
20
20
  RNSStackController *_Nonnull _controller;
21
21
  NSMutableArray<RNSStackScreenComponentView *> *_Nonnull _reactSubviews;
22
22
 
@@ -107,7 +107,7 @@ RNS_IGNORE_SUPER_CALL_END
107
107
 
108
108
  + (react::ComponentDescriptorProvider)componentDescriptorProvider
109
109
  {
110
- return react::concreteComponentDescriptorProvider<react::RNSScreenStackHostComponentDescriptor>();
110
+ return react::concreteComponentDescriptorProvider<react::RNSStackHostComponentDescriptor>();
111
111
  }
112
112
 
113
113
  + (BOOL)shouldBeRecycled
@@ -137,7 +137,7 @@ RNS_IGNORE_SUPER_CALL_END
137
137
 
138
138
  @end
139
139
 
140
- Class<RCTComponentViewProtocol> RNSScreenStackHostCls(void)
140
+ Class<RCTComponentViewProtocol> RNSStackHostCls(void)
141
141
  {
142
- return RNSScreenStackHostComponentView.class;
142
+ return RNSStackHostComponentView.class;
143
143
  }
@@ -4,7 +4,7 @@
4
4
 
5
5
  NS_ASSUME_NONNULL_BEGIN
6
6
 
7
- @interface RNSScreenStackHostComponentViewManager : RCTViewManager
7
+ @interface RNSStackHostComponentViewManager : RCTViewManager
8
8
 
9
9
  @end
10
10
 
@@ -0,0 +1,7 @@
1
+ #import "RNSStackHostComponentViewManager.h"
2
+
3
+ @implementation RNSStackHostComponentViewManager
4
+
5
+ RCT_EXPORT_MODULE(RNSStackHostViewManager)
6
+
7
+ @end
@@ -6,21 +6,21 @@
6
6
  NS_ASSUME_NONNULL_BEGIN
7
7
 
8
8
  @class RNSStackScreenController;
9
- @class RNSScreenStackHostComponentView;
9
+ @class RNSStackHostComponentView;
10
10
 
11
- typedef NS_ENUM(int, RNSScreenStackLifecycleState) {
12
- RNSScreenStackLifecycleInitial = 0,
13
- RNSScreenStackLifecycleDetached = 1,
14
- RNSScreenStackLifecycleAttached = 2,
11
+ typedef NS_ENUM(int, RNSStackScreenLifecycleState) {
12
+ RNSStackScreenLifecycleInitial = 0,
13
+ RNSStackScreenLifecycleDetached = 1,
14
+ RNSStackScreenLifecycleAttached = 2,
15
15
  };
16
16
 
17
17
  @interface RNSStackScreenComponentView : RNSReactBaseView
18
18
 
19
- @property (nonatomic, weak, readwrite, nullable) RNSScreenStackHostComponentView *stackHost;
19
+ @property (nonatomic, weak, readwrite, nullable) RNSStackHostComponentView *stackHost;
20
20
  @property (nonatomic, strong, readonly, nonnull) RNSStackScreenController *controller;
21
21
 
22
22
  @property (nonatomic, strong, readonly, nullable) NSString *screenKey;
23
- @property (nonatomic, readonly) RNSScreenStackLifecycleState maxLifecycleState;
23
+ @property (nonatomic, readonly) RNSStackScreenLifecycleState maxLifecycleState;
24
24
 
25
25
  @end
26
26
 
@@ -49,7 +49,7 @@ namespace react = facebook::react;
49
49
 
50
50
  // container state
51
51
  _screenKey = nil;
52
- _maxLifecycleState = RNSScreenStackLifecycleInitial;
52
+ _maxLifecycleState = RNSStackScreenLifecycleInitial;
53
53
  }
54
54
 
55
55
  - (void)setupController
@@ -87,7 +87,7 @@ namespace react = facebook::react;
87
87
  const auto &newComponentProps = *std::static_pointer_cast<const react::RNSStackScreenProps>(props);
88
88
 
89
89
  if (oldComponentProps.maxLifecycleState != newComponentProps.maxLifecycleState) {
90
- _maxLifecycleState = static_cast<RNSScreenStackLifecycleState>(newComponentProps.maxLifecycleState);
90
+ _maxLifecycleState = static_cast<RNSStackScreenLifecycleState>(newComponentProps.maxLifecycleState);
91
91
  _needsLifecycleStateUpdate = YES;
92
92
  }
93
93
 
@@ -3,13 +3,13 @@ import UIKit
3
3
 
4
4
  @objc
5
5
  public class RNSStackScreenController: UIViewController {
6
- let screenStackComponentView: RNSStackScreenComponentView
6
+ let screen: RNSStackScreenComponentView
7
7
  private var reactEventEmitter: RNSStackScreenComponentEventEmitter {
8
- return screenStackComponentView.reactEventEmitter()
8
+ return screen.reactEventEmitter()
9
9
  }
10
10
 
11
11
  @objc public required init(componentView: RNSStackScreenComponentView) {
12
- self.screenStackComponentView = componentView
12
+ self.screen = componentView
13
13
  super.init(nibName: nil, bundle: nil)
14
14
  }
15
15
 
@@ -22,7 +22,7 @@ public class RNSStackScreenController: UIViewController {
22
22
  return navCtrl as? RNSStackController
23
23
  }
24
24
 
25
- if let stackHost = self.screenStackComponentView.stackHost {
25
+ if let stackHost = self.screen.stackHost {
26
26
  return stackHost.stackController
27
27
  }
28
28
 
@@ -9,7 +9,7 @@
9
9
 
10
10
  NS_ASSUME_NONNULL_BEGIN
11
11
 
12
- @interface RNSScreenStackHostComponentView : NSObject
12
+ @interface RNSStackHostComponentView : NSObject
13
13
  @end
14
14
 
15
15
  @interface RNSStackScreenComponentView : NSObject
@@ -1,6 +1,6 @@
1
1
  #import "RNSGammaStubs.h"
2
2
 
3
- @implementation RNSScreenStackHostComponentView
3
+ @implementation RNSStackHostComponentView
4
4
  @end
5
5
 
6
6
  @implementation RNSStackScreenComponentView
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ const SplitHost = () => {
8
+ console.warn('[RNScreens] Split component is supported only for iOS. Consider using an alternative layout for Android.');
9
+ return null;
10
+ };
11
+ var _default = exports.default = SplitHost;
12
+ //# sourceMappingURL=SplitHost.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SplitHost","console","warn","_default","exports","default"],"sourceRoot":"../../../../../src","sources":["components/gamma/split/SplitHost.android.tsx"],"mappings":";;;;;;AAAA,MAAMA,SAAS,GAAGA,CAAA,KAAM;EACtBC,OAAO,CAACC,IAAI,CACV,0GACF,CAAC;EACD,OAAO,IAAI;AACb,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaL,SAAS","ignoreList":[]}
@@ -7,14 +7,14 @@ exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _reactNative = require("react-native");
9
9
  var _SplitViewHostNativeComponent = _interopRequireDefault(require("../../../fabric/gamma/SplitViewHostNativeComponent"));
10
- var _SplitViewScreen = _interopRequireDefault(require("./SplitViewScreen"));
10
+ var _SplitScreen = _interopRequireDefault(require("./SplitScreen"));
11
11
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
12
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
13
13
  // According to the UIKit documentation: https://developer.apple.com/documentation/uikit/uisplitviewcontroller/displaymode-swift.enum
14
14
  // Only specific pairs for displayMode - splitBehavior are valid and others may lead to unexpected results.
15
15
  // Therefore, we're adding check on the JS side to return a feedback to the client when that pairing isn't valid.
16
16
  // However, we're not blocking these props to be set on the native side, because it doesn't crash, just the result or transitions may not work as expected.
17
- const displayModeForSplitViewCompatibilityMap = {
17
+ const displayModeForSplitCompatibilityMap = {
18
18
  tile: ['secondaryOnly', 'oneBesideSecondary', 'twoBesideSecondary'],
19
19
  overlay: ['secondaryOnly', 'oneOverSecondary', 'twoOverSecondary'],
20
20
  displace: ['secondaryOnly', 'oneBesideSecondary', 'twoDisplaceSecondary'],
@@ -25,13 +25,13 @@ const isValidDisplayModeForSplitBehavior = (displayMode, splitBehavior) => {
25
25
  // for automatic we cannot easily verify the compatibility, because it depends on the system preference for display mode, therefore we're assuming that 'automatic' has only valid combinations
26
26
  return true;
27
27
  }
28
- return displayModeForSplitViewCompatibilityMap[splitBehavior].includes(displayMode);
28
+ return displayModeForSplitCompatibilityMap[splitBehavior].includes(displayMode);
29
29
  };
30
30
 
31
31
  /**
32
32
  * EXPERIMENTAL API, MIGHT CHANGE W/O ANY NOTICE
33
33
  */
34
- function SplitViewHost(props) {
34
+ function SplitHost(props) {
35
35
  const {
36
36
  preferredDisplayMode,
37
37
  preferredSplitBehavior
@@ -40,7 +40,7 @@ function SplitViewHost(props) {
40
40
  if (preferredDisplayMode && preferredSplitBehavior) {
41
41
  const isValid = isValidDisplayModeForSplitBehavior(preferredDisplayMode, preferredSplitBehavior);
42
42
  if (!isValid) {
43
- const validDisplayModes = displayModeForSplitViewCompatibilityMap[preferredSplitBehavior];
43
+ const validDisplayModes = displayModeForSplitCompatibilityMap[preferredSplitBehavior];
44
44
  console.warn(`Invalid display mode "${preferredDisplayMode}" for split behavior "${preferredSplitBehavior}".` + `\nValid modes for "${preferredSplitBehavior}" are: ${validDisplayModes.join(', ')}.`);
45
45
  }
46
46
  }
@@ -48,10 +48,10 @@ function SplitViewHost(props) {
48
48
  const children = _react.default.Children.toArray(props.children);
49
49
  const columns = children.filter(
50
50
  // @ts-ignore - type is valid attribute for child
51
- child => child.type === _SplitViewScreen.default.Column);
51
+ child => child.type === _SplitScreen.default.Column);
52
52
  const inspectors = children.filter(
53
53
  // @ts-ignore - type is valid attribute for child
54
- child => child.type === _SplitViewScreen.default.Inspector);
54
+ child => child.type === _SplitScreen.default.Inspector);
55
55
  return /*#__PURE__*/_react.default.createElement(_SplitViewHostNativeComponent.default
56
56
  // UISplitViewController requires the number of columns to be specified at initialization and it cannot be changed dynamically later.
57
57
  // By using a specific key in this form, we can detect changes in the number of React children.
@@ -67,5 +67,5 @@ const styles = _reactNative.StyleSheet.create({
67
67
  flex: 1
68
68
  }
69
69
  });
70
- var _default = exports.default = SplitViewHost;
71
- //# sourceMappingURL=SplitViewHost.js.map
70
+ var _default = exports.default = SplitHost;
71
+ //# sourceMappingURL=SplitHost.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_SplitViewHostNativeComponent","_SplitScreen","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","displayModeForSplitCompatibilityMap","tile","overlay","displace","automatic","isValidDisplayModeForSplitBehavior","displayMode","splitBehavior","includes","SplitHost","props","preferredDisplayMode","preferredSplitBehavior","React","useEffect","isValid","validDisplayModes","console","warn","join","children","Children","toArray","columns","filter","child","type","SplitScreen","Column","inspectors","Inspector","createElement","key","style","styles","container","StyleSheet","create","flex","_default","exports"],"sourceRoot":"../../../../../src","sources":["components/gamma/split/SplitHost.tsx"],"mappings":"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","ignoreList":[]}
@@ -3,4 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- //# sourceMappingURL=SplitViewHost.types.js.map
6
+ //# sourceMappingURL=SplitHost.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/gamma/split/SplitHost.types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ const SplitHost = () => {
8
+ console.warn('[RNScreens] Split component is supported only for iOS. Consider using an alternative layout for Web.');
9
+ return null;
10
+ };
11
+ var _default = exports.default = SplitHost;
12
+ //# sourceMappingURL=SplitHost.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["SplitHost","console","warn","_default","exports","default"],"sourceRoot":"../../../../../src","sources":["components/gamma/split/SplitHost.web.tsx"],"mappings":";;;;;;AAAA,MAAMA,SAAS,GAAGA,CAAA,KAAM;EACtBC,OAAO,CAACC,IAAI,CACV,sGACF,CAAC;EACD,OAAO,IAAI;AACb,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaL,SAAS","ignoreList":[]}
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
  const NOOP = () => {
8
- console.warn('[RNScreens] SplitView is supported only for iOS. Consider using an alternative layout for Web.');
8
+ console.warn('[RNScreens] Split component is supported only for iOS. Consider using an alternative layout for Android.');
9
9
  return null;
10
10
  };
11
11
  const Column = NOOP;
@@ -14,4 +14,4 @@ var _default = exports.default = {
14
14
  Column,
15
15
  Inspector
16
16
  };
17
- //# sourceMappingURL=SplitViewScreen.web.js.map
17
+ //# sourceMappingURL=SplitScreen.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NOOP","console","warn","Column","Inspector","_default","exports","default"],"sourceRoot":"../../../../../src","sources":["components/gamma/split/SplitScreen.android.tsx"],"mappings":";;;;;;AAAA,MAAMA,IAAI,GAAGA,CAAA,KAAM;EACjBC,OAAO,CAACC,IAAI,CACV,0GACF,CAAC;EACD,OAAO,IAAI;AACb,CAAC;AAED,MAAMC,MAAM,GAAGH,IAAI;AACnB,MAAMI,SAAS,GAAGJ,IAAI;AAAC,IAAAK,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAER;EAAEJ,MAAM;EAAEC;AAAU,CAAC","ignoreList":[]}
@@ -35,9 +35,9 @@ function Inspector(props) {
35
35
  * EXPERIMENTAL API, MIGHT CHANGE W/O ANY NOTICE
36
36
  */
37
37
  // TODO: refactor to drop `Screen` suffix as the API name is really long at the moment
38
- const SplitViewScreen = {
38
+ const SplitScreen = {
39
39
  Column,
40
40
  Inspector
41
41
  };
42
- var _default = exports.default = SplitViewScreen;
43
- //# sourceMappingURL=SplitViewScreen.js.map
42
+ var _default = exports.default = SplitScreen;
43
+ //# sourceMappingURL=SplitScreen.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_SplitViewScreenNativeComponent","e","__esModule","default","_extends","Object","assign","bind","n","arguments","length","t","r","hasOwnProperty","call","apply","Column","props","createElement","columnType","style","StyleSheet","absoluteFill","children","Inspector","SplitScreen","_default","exports"],"sourceRoot":"../../../../../src","sources":["components/gamma/split/SplitScreen.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,+BAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAkG,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,SAAA,WAAAA,QAAA,GAAAC,MAAA,CAAAC,MAAA,GAAAD,MAAA,CAAAC,MAAA,CAAAC,IAAA,eAAAC,CAAA,aAAAP,CAAA,MAAAA,CAAA,GAAAQ,SAAA,CAAAC,MAAA,EAAAT,CAAA,UAAAU,CAAA,GAAAF,SAAA,CAAAR,CAAA,YAAAW,CAAA,IAAAD,CAAA,OAAAE,cAAA,CAAAC,IAAA,CAAAH,CAAA,EAAAC,CAAA,MAAAJ,CAAA,CAAAI,CAAA,IAAAD,CAAA,CAAAC,CAAA,aAAAJ,CAAA,KAAAJ,QAAA,CAAAW,KAAA,OAAAN,SAAA;AAGlG;AACA;AACA;AACA,SAASO,MAAMA,CAACC,KAAuB,EAAE;EACvC,oBACErB,MAAA,CAAAO,OAAA,CAAAe,aAAA,CAAClB,+BAAA,CAAAG,OAA8B,EAAAC,QAAA;IAC7Be,UAAU,EAAC;EAAQ,GACfF,KAAK;IACTG,KAAK,EAAEC,uBAAU,CAACC;EAAa,IAC9BL,KAAK,CAACM,QACuB,CAAC;AAErC;;AAEA;AACA;AACA;AACA,SAASC,SAASA,CAACP,KAAuB,EAAE;EAC1C,oBACErB,MAAA,CAAAO,OAAA,CAAAe,aAAA,CAAClB,+BAAA,CAAAG,OAA8B,EAAAC,QAAA;IAC7Be,UAAU,EAAC;EAAW,GAClBF,KAAK;IACTG,KAAK,EAAEC,uBAAU,CAACC;EAAa,IAC9BL,KAAK,CAACM,QACuB,CAAC;AAErC;;AAEA;AACA;AACA;AACA;AACA,MAAME,WAAW,GAAG;EAClBT,MAAM;EACNQ;AACF,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAxB,OAAA,GAEasB,WAAW","ignoreList":[]}
@@ -3,4 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- //# sourceMappingURL=SplitViewScreen.types.js.map
6
+ //# sourceMappingURL=SplitScreen.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../../src","sources":["components/gamma/split/SplitScreen.types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ const NOOP = () => {
8
+ console.warn('[RNScreens] Split component is supported only for iOS. Consider using an alternative layout for Web.');
9
+ return null;
10
+ };
11
+ const Column = NOOP;
12
+ const Inspector = NOOP;
13
+
14
+ /**
15
+ * EXPERIMENTAL API, MIGHT CHANGE W/O ANY NOTICE
16
+ */
17
+ // TODO: refactor to drop `Screen` suffix as the API name is really long at the moment
18
+ const SplitScreen = {
19
+ Column,
20
+ Inspector
21
+ };
22
+ var _default = exports.default = SplitScreen;
23
+ //# sourceMappingURL=SplitScreen.web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NOOP","console","warn","Column","Inspector","SplitScreen","_default","exports","default"],"sourceRoot":"../../../../../src","sources":["components/gamma/split/SplitScreen.web.tsx"],"mappings":";;;;;;AAAA,MAAMA,IAAI,GAAGA,CAAA,KAAM;EACjBC,OAAO,CAACC,IAAI,CACV,sGACF,CAAC;EACD,OAAO,IAAI;AACb,CAAC;AAED,MAAMC,MAAM,GAAGH,IAAI;AACnB,MAAMI,SAAS,GAAGJ,IAAI;;AAEtB;AACA;AACA;AACA;AACA,MAAMK,WAAW,GAAG;EAClBF,MAAM;EACNC;AACF,CAAC;AAAC,IAAAE,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAEaH,WAAW","ignoreList":[]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _exportNames = {};
7
+ exports.default = void 0;
8
+ var _SplitHost = _interopRequireDefault(require("./SplitHost"));
9
+ var _SplitScreen = _interopRequireDefault(require("./SplitScreen"));
10
+ var _SplitHost2 = require("./SplitHost.types");
11
+ Object.keys(_SplitHost2).forEach(function (key) {
12
+ if (key === "default" || key === "__esModule") return;
13
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
14
+ if (key in exports && exports[key] === _SplitHost2[key]) return;
15
+ Object.defineProperty(exports, key, {
16
+ enumerable: true,
17
+ get: function () {
18
+ return _SplitHost2[key];
19
+ }
20
+ });
21
+ });
22
+ var _SplitScreen2 = require("./SplitScreen.types");
23
+ Object.keys(_SplitScreen2).forEach(function (key) {
24
+ if (key === "default" || key === "__esModule") return;
25
+ if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
26
+ if (key in exports && exports[key] === _SplitScreen2[key]) return;
27
+ Object.defineProperty(exports, key, {
28
+ enumerable: true,
29
+ get: function () {
30
+ return _SplitScreen2[key];
31
+ }
32
+ });
33
+ });
34
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
35
+ /**
36
+ * EXPERIMENTAL API, MIGHT CHANGE W/O ANY NOTICE
37
+ */
38
+ const Split = {
39
+ Host: _SplitHost.default,
40
+ Column: _SplitScreen.default.Column,
41
+ Inspector: _SplitScreen.default.Inspector
42
+ };
43
+ var _default = exports.default = Split;
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_SplitHost","_interopRequireDefault","require","_SplitScreen","_SplitHost2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_SplitScreen2","e","__esModule","default","Split","Host","SplitHost","Column","SplitScreen","Inspector","_default"],"sourceRoot":"../../../../../src","sources":["components/gamma/split/index.ts"],"mappings":";;;;;;;AAAA,IAAAA,UAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAF,sBAAA,CAAAC,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAF,WAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,WAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,WAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,aAAA,GAAAf,OAAA;AAAAG,MAAA,CAAAC,IAAA,CAAAW,aAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,aAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,aAAA,CAAAT,GAAA;IAAA;EAAA;AAAA;AAAoC,SAAAP,uBAAAiB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEpC;AACA;AACA;AACA,MAAMG,KAAK,GAAG;EACZC,IAAI,EAAEC,kBAAS;EACfC,MAAM,EAAEC,oBAAW,CAACD,MAAM;EAC1BE,SAAS,EAAED,oBAAW,CAACC;AACzB,CAAC;AAAC,IAAAC,QAAA,GAAAd,OAAA,CAAAO,OAAA,GAEaC,KAAK","ignoreList":[]}
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.default = void 0;
7
7
  var _react = _interopRequireDefault(require("react"));
8
8
  var _reactNative = require("react-native");
9
- var _ScreenStackHostNativeComponent = _interopRequireDefault(require("../../../fabric/gamma/ScreenStackHostNativeComponent"));
9
+ var _StackHostNativeComponent = _interopRequireDefault(require("../../../fabric/gamma/stack/StackHostNativeComponent"));
10
10
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
11
  /**
12
12
  * EXPERIMENTAL API, MIGHT CHANGE W/O ANY NOTICE
@@ -14,7 +14,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
14
14
  function StackHost({
15
15
  children
16
16
  }) {
17
- return /*#__PURE__*/_react.default.createElement(_ScreenStackHostNativeComponent.default, {
17
+ return /*#__PURE__*/_react.default.createElement(_StackHostNativeComponent.default, {
18
18
  style: styles.container
19
19
  }, children);
20
20
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_ScreenStackHostNativeComponent","e","__esModule","default","StackHost","children","createElement","style","styles","container","StyleSheet","create","flex","_default","exports"],"sourceRoot":"../../../../../src","sources":["components/gamma/stack/StackHost.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,+BAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAkG,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGlG;AACA;AACA;AACA,SAASG,SAASA,CAAC;EAAEC;AAA+B,CAAC,EAAE;EACrD,oBACET,MAAA,CAAAO,OAAA,CAAAG,aAAA,CAACN,+BAAA,CAAAG,OAA8B;IAACI,KAAK,EAAEC,MAAM,CAACC;EAAU,GACrDJ,QAC6B,CAAC;AAErC;AAEA,MAAMG,MAAM,GAAGE,uBAAU,CAACC,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAX,OAAA,GAEYC,SAAS","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_StackHostNativeComponent","e","__esModule","default","StackHost","children","createElement","style","styles","container","StyleSheet","create","flex","_default","exports"],"sourceRoot":"../../../../../src","sources":["components/gamma/stack/StackHost.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,yBAAA,GAAAH,sBAAA,CAAAC,OAAA;AAA4F,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAG5F;AACA;AACA;AACA,SAASG,SAASA,CAAC;EAAEC;AAAyB,CAAC,EAAE;EAC/C,oBACET,MAAA,CAAAO,OAAA,CAAAG,aAAA,CAACN,yBAAA,CAAAG,OAAwB;IAACI,KAAK,EAAEC,MAAM,CAACC;EAAU,GAC/CJ,QACuB,CAAC;AAE/B;AAEA,MAAMG,MAAM,GAAGE,uBAAU,CAACC,MAAM,CAAC;EAC/BF,SAAS,EAAE;IACTG,IAAI,EAAE;EACR;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAX,OAAA,GAEYC,SAAS","ignoreList":[]}