react-native-screens 4.19.0-nightly-20251202-9e8bf5275 → 4.19.0-nightly-20251204-1746a584e

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 (24) hide show
  1. package/android/CMakeLists.txt +6 -32
  2. package/android/src/main/java/com/swmansion/rnscreens/gamma/tabs/TabsHost.kt +12 -5
  3. package/android/src/main/java/com/swmansion/rnscreens/gamma/tabs/TabsHostEventEmitter.kt +14 -2
  4. package/android/src/main/java/com/swmansion/rnscreens/gamma/tabs/event/TabsHostNativeFocusChangeEvent.kt +13 -2
  5. package/android/src/main/jni/CMakeLists.txt +6 -28
  6. package/ios/bottom-tabs/host/RNSBottomTabsHostComponentView.h +2 -1
  7. package/ios/bottom-tabs/host/RNSBottomTabsHostComponentView.mm +6 -2
  8. package/ios/bottom-tabs/host/RNSBottomTabsHostEventEmitter.h +2 -0
  9. package/ios/bottom-tabs/host/RNSBottomTabsHostEventEmitter.mm +7 -2
  10. package/ios/bottom-tabs/host/RNSTabBarControllerDelegate.mm +10 -16
  11. package/ios/bottom-tabs/screen/RNSBottomTabsScreenComponentView.mm +24 -0
  12. package/ios/bottom-tabs/screen/RNSBottomTabsScreenComponentViewManager.mm +2 -3
  13. package/lib/commonjs/fabric/bottom-tabs/BottomTabsNativeComponent.js.map +1 -1
  14. package/lib/module/fabric/bottom-tabs/BottomTabsNativeComponent.js.map +1 -1
  15. package/lib/typescript/components/bottom-tabs/BottomTabs.types.d.ts +4 -0
  16. package/lib/typescript/components/bottom-tabs/BottomTabs.types.d.ts.map +1 -1
  17. package/lib/typescript/components/bottom-tabs/BottomTabsScreen.types.d.ts +63 -55
  18. package/lib/typescript/components/bottom-tabs/BottomTabsScreen.types.d.ts.map +1 -1
  19. package/lib/typescript/fabric/bottom-tabs/BottomTabsNativeComponent.d.ts +1 -0
  20. package/lib/typescript/fabric/bottom-tabs/BottomTabsNativeComponent.d.ts.map +1 -1
  21. package/package.json +1 -1
  22. package/src/components/bottom-tabs/BottomTabs.types.ts +8 -4
  23. package/src/components/bottom-tabs/BottomTabsScreen.types.ts +70 -61
  24. package/src/fabric/bottom-tabs/BottomTabsNativeComponent.ts +1 -0
@@ -40,38 +40,12 @@ find_package(ReactAndroid REQUIRED CONFIG)
40
40
 
41
41
  if(${RNS_NEW_ARCH_ENABLED})
42
42
  find_package(fbjni REQUIRED CONFIG)
43
-
44
- if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
45
- target_link_libraries(rnscreens
46
- ReactAndroid::reactnative
47
- ReactAndroid::jsi
48
- fbjni::fbjni
49
- android
50
- )
51
- else()
52
- target_link_libraries(
53
- rnscreens
54
- ReactAndroid::jsi
55
- ReactAndroid::react_nativemodule_core
56
- ReactAndroid::react_utils
57
- ReactAndroid::reactnativejni
58
- ReactAndroid::fabricjni
59
- ReactAndroid::react_debug
60
- ReactAndroid::react_render_core
61
- ReactAndroid::runtimeexecutor
62
- ReactAndroid::react_render_graphics
63
- ReactAndroid::rrc_view
64
- ReactAndroid::yoga
65
- ReactAndroid::rrc_text
66
- ReactAndroid::glog
67
- ReactAndroid::react_render_componentregistry
68
- ReactAndroid::react_render_consistency
69
- ReactAndroid::react_performance_timeline
70
- ReactAndroid::react_render_observers_events
71
- fbjni::fbjni
72
- android
73
- )
74
- endif()
43
+ target_link_libraries(rnscreens
44
+ ReactAndroid::reactnative
45
+ ReactAndroid::jsi
46
+ fbjni::fbjni
47
+ android
48
+ )
75
49
  else()
76
50
  target_link_libraries(rnscreens
77
51
  ReactAndroid::jsi
@@ -252,10 +252,14 @@ class TabsHost(
252
252
  bottomNavigationView.setOnItemSelectedListener { item ->
253
253
  RNSLog.d(TAG, "Item selected $item")
254
254
  val fragment = getFragmentForMenuItemId(item.itemId)
255
- if (fragment != currentFocusedTab || !specialEffectsHandler.handleRepeatedTabSelection()) {
256
- val tabKey = fragment?.tabScreen?.tabKey ?: "undefined"
257
- eventEmitter.emitOnNativeFocusChange(tabKey)
258
- }
255
+ val repeatedSelectionHandledBySpecialEffect =
256
+ if (fragment == currentFocusedTab) specialEffectsHandler.handleRepeatedTabSelection() else false
257
+ val tabKey = fragment?.tabScreen?.tabKey ?: "undefined"
258
+ eventEmitter.emitOnNativeFocusChange(
259
+ tabKey,
260
+ item.itemId,
261
+ repeatedSelectionHandledBySpecialEffect,
262
+ )
259
263
  true
260
264
  }
261
265
  }
@@ -352,8 +356,11 @@ class TabsHost(
352
356
 
353
357
  appearanceCoordinator.updateTabAppearance(this)
354
358
 
355
- bottomNavigationView.selectedItemId =
359
+ val selectedTabScreenFragmentId =
356
360
  checkNotNull(getSelectedTabScreenFragmentId()) { "[RNScreens] A single selected tab must be present" }
361
+ if (bottomNavigationView.selectedItemId != selectedTabScreenFragmentId) {
362
+ bottomNavigationView.selectedItemId = selectedTabScreenFragmentId
363
+ }
357
364
 
358
365
  post {
359
366
  refreshLayout()
@@ -8,7 +8,19 @@ internal class TabsHostEventEmitter(
8
8
  reactContext: ReactContext,
9
9
  viewTag: Int,
10
10
  ) : BaseEventEmitter(reactContext, viewTag) {
11
- fun emitOnNativeFocusChange(tabKey: String) {
12
- reactEventDispatcher.dispatchEvent(TabsHostNativeFocusChangeEvent(surfaceId, viewTag, tabKey))
11
+ fun emitOnNativeFocusChange(
12
+ tabKey: String,
13
+ tabNumber: Int,
14
+ repeatedSelectionHandledBySpecialEffect: Boolean,
15
+ ) {
16
+ reactEventDispatcher.dispatchEvent(
17
+ TabsHostNativeFocusChangeEvent(
18
+ surfaceId,
19
+ viewTag,
20
+ tabKey,
21
+ tabNumber,
22
+ repeatedSelectionHandledBySpecialEffect,
23
+ ),
24
+ )
13
25
  }
14
26
  }
@@ -9,18 +9,27 @@ class TabsHostNativeFocusChangeEvent(
9
9
  surfaceId: Int,
10
10
  viewId: Int,
11
11
  val tabKey: String,
12
+ val tabNumber: Int,
13
+ val repeatedSelectionHandledBySpecialEffect: Boolean,
12
14
  ) : Event<TabScreenDidAppearEvent>(surfaceId, viewId),
13
15
  NamingAwareEventType {
14
16
  override fun getEventName() = EVENT_NAME
15
17
 
16
18
  override fun getEventRegistrationName() = EVENT_REGISTRATION_NAME
17
19
 
18
- // All events for a given view can be coalesced.
19
- override fun getCoalescingKey(): Short = 0
20
+ // If the user taps currently selected tab 2 times and e.g. scroll to top effect can run,
21
+ // we should send 2 events [(tabKey, true), (tabKey, false)]. We don't want them to be coalesced
22
+ // as we would lose information about activation of special effect. That's why we take into
23
+ // account `repeatedSelectionHandledBySpecialEffect` for coalescingKey.
24
+ override fun getCoalescingKey(): Short = (tabNumber * 10 + if (repeatedSelectionHandledBySpecialEffect) 1 else 0).toShort()
20
25
 
21
26
  override fun getEventData(): WritableMap? =
22
27
  Arguments.createMap().apply {
23
28
  putString(EVENT_KEY_TAB_KEY, tabKey)
29
+ putBoolean(
30
+ EVENT_KEY_REPEATED_SELECTION_HANDLED_BY_SPECIAL_EFFECT,
31
+ repeatedSelectionHandledBySpecialEffect,
32
+ )
24
33
  }
25
34
 
26
35
  companion object : NamingAwareEventType {
@@ -28,6 +37,8 @@ class TabsHostNativeFocusChangeEvent(
28
37
  const val EVENT_REGISTRATION_NAME = "onNativeFocusChange"
29
38
 
30
39
  private const val EVENT_KEY_TAB_KEY = "tabKey"
40
+ private const val EVENT_KEY_REPEATED_SELECTION_HANDLED_BY_SPECIAL_EFFECT =
41
+ "repeatedSelectionHandledBySpecialEffect"
31
42
 
32
43
  override fun getEventName() = EVENT_NAME
33
44
 
@@ -39,34 +39,12 @@ target_include_directories(
39
39
  ${LIB_ANDROID_GENERATED_COMPONENTS_DIR}
40
40
  )
41
41
 
42
- if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 76)
43
- target_link_libraries(
44
- ${LIB_TARGET_NAME}
45
- ReactAndroid::reactnative
46
- ReactAndroid::jsi
47
- fbjni::fbjni
48
- )
49
- else()
50
- target_link_libraries(
51
- ${LIB_TARGET_NAME}
52
- fbjni
53
- folly_runtime
54
- glog
55
- jsi
56
- react_codegen_rncore
57
- react_debug
58
- react_nativemodule_core
59
- react_render_core
60
- react_render_debug
61
- react_render_graphics
62
- react_render_mapbuffer
63
- react_render_componentregistry
64
- react_utils
65
- rrc_view
66
- turbomodulejsijni
67
- yoga
68
- )
69
- endif()
42
+ target_link_libraries(
43
+ ${LIB_TARGET_NAME}
44
+ ReactAndroid::reactnative
45
+ ReactAndroid::jsi
46
+ fbjni::fbjni
47
+ )
70
48
 
71
49
  if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 80)
72
50
  target_compile_reactnative_options(${LIB_TARGET_NAME} PRIVATE)
@@ -72,7 +72,8 @@ NS_ASSUME_NONNULL_BEGIN
72
72
  */
73
73
  - (nonnull RNSBottomTabsHostEventEmitter *)reactEventEmitter;
74
74
 
75
- - (BOOL)emitOnNativeFocusChangeRequestSelectedTabScreen:(nonnull RNSBottomTabsScreenComponentView *)tabScreen;
75
+ - (BOOL)emitOnNativeFocusChangeRequestSelectedTabScreen:(nonnull RNSBottomTabsScreenComponentView *)tabScreen
76
+ repeatedSelectionHandledBySpecialEffect:(BOOL)repeatedSelectionHandledBySpecialEffect;
76
77
 
77
78
  #if !RCT_NEW_ARCH_ENABLED
78
79
  #pragma mark - LEGACY Event blocks
@@ -261,9 +261,13 @@ namespace react = facebook::react;
261
261
  return _reactEventEmitter;
262
262
  }
263
263
 
264
- - (BOOL)emitOnNativeFocusChangeRequestSelectedTabScreen:(RNSBottomTabsScreenComponentView *)tabScreen
264
+ - (BOOL)emitOnNativeFocusChangeRequestSelectedTabScreen:(nonnull RNSBottomTabsScreenComponentView *)tabScreen
265
+ repeatedSelectionHandledBySpecialEffect:(BOOL)repeatedSelectionHandledBySpecialEffect
265
266
  {
266
- return [_reactEventEmitter emitOnNativeFocusChange:OnNativeFocusChangePayload{.tabKey = tabScreen.tabKey}];
267
+ return [_reactEventEmitter
268
+ emitOnNativeFocusChange:OnNativeFocusChangePayload{
269
+ .tabKey = tabScreen.tabKey,
270
+ .repeatedSelectionHandledBySpecialEffect = repeatedSelectionHandledBySpecialEffect}];
267
271
  }
268
272
 
269
273
  #pragma mark - RCTComponentViewProtocol
@@ -18,10 +18,12 @@ NS_ASSUME_NONNULL_BEGIN
18
18
  #if defined(__cplusplus)
19
19
  struct OnNativeFocusChangePayload {
20
20
  NSString *_Nonnull tabKey;
21
+ BOOL repeatedSelectionHandledBySpecialEffect;
21
22
  };
22
23
  #else
23
24
  typedef struct {
24
25
  NSString *_Nonnull tabKey;
26
+ BOOL repeatedSelectionHandledBySpecialEffect;
25
27
  } OnNativeFocusChangePayload;
26
28
  #endif
27
29
 
@@ -37,7 +37,9 @@ namespace react = facebook::react;
37
37
  {
38
38
  #if RCT_NEW_ARCH_ENABLED
39
39
  if (_reactEventEmitter != nullptr) {
40
- _reactEventEmitter->onNativeFocusChange({.tabKey = RCTStringFromNSString(payload.tabKey)});
40
+ _reactEventEmitter->onNativeFocusChange(
41
+ {.tabKey = RCTStringFromNSString(payload.tabKey),
42
+ .repeatedSelectionHandledBySpecialEffect = payload.repeatedSelectionHandledBySpecialEffect});
41
43
  return YES;
42
44
  } else {
43
45
  RCTLogWarn(@"[RNScreens] Skipped OnNativeFocusChange event emission due to nullish emitter");
@@ -45,7 +47,10 @@ namespace react = facebook::react;
45
47
  }
46
48
  #else
47
49
  if (self.onNativeFocusChange) {
48
- self.onNativeFocusChange(@{@"tabKey" : payload.tabKey});
50
+ self.onNativeFocusChange(@{
51
+ @"tabKey" : payload.tabKey,
52
+ @"repeatedSelectionHandledBySpecialEffect" : @(payload.repeatedSelectionHandledBySpecialEffect)
53
+ });
49
54
  return YES;
50
55
  } else {
51
56
  RCTLogWarn(@"[RNScreens] Skipped OnNativeFocusChange event emission due to nullish emitter");
@@ -32,26 +32,20 @@
32
32
  }
33
33
  #endif // !TARGET_OS_TV
34
34
 
35
- bool repeatedSelectionHandledNatively = false;
35
+ // TODO: handle enforcing orientation with natively-driven tabs
36
36
 
37
37
  // Detect repeated selection and inform tabScreenController
38
- if ([tabBarCtrl selectedViewController] == tabScreenCtrl) {
39
- repeatedSelectionHandledNatively = [tabScreenCtrl tabScreenSelectedRepeatedly];
40
- }
41
-
42
- // TODO: send an event with information about event being handled natively
43
- if (!repeatedSelectionHandledNatively) {
44
- [tabBarCtrl.tabsHostComponentView
45
- emitOnNativeFocusChangeRequestSelectedTabScreen:tabScreenCtrl.tabScreenComponentView];
38
+ BOOL repeatedSelection = [tabBarCtrl selectedViewController] == tabScreenCtrl;
39
+ BOOL repeatedSelectionHandledBySpecialEffect =
40
+ repeatedSelection ? [tabScreenCtrl tabScreenSelectedRepeatedly] : false;
46
41
 
47
- // TODO: handle overrideScrollViewBehaviorInFirstDescendantChainIfNeeded for natively-driven tabs
48
- return ![self shouldPreventNativeTabChangeWithinTabBarController:tabBarCtrl];
49
- }
50
-
51
- // TODO: handle enforcing orientation with natively-driven tabs
42
+ [tabBarCtrl.tabsHostComponentView
43
+ emitOnNativeFocusChangeRequestSelectedTabScreen:tabScreenCtrl.tabScreenComponentView
44
+ repeatedSelectionHandledBySpecialEffect:repeatedSelectionHandledBySpecialEffect];
52
45
 
53
- // As we're selecting the same controller, returning both true and false works here.
54
- return true;
46
+ // On repeated selection we return false to prevent native *pop to root* effect that works only starting from iOS 26
47
+ // and interferes with our implementation (which is necessary for controlled tabs).
48
+ return repeatedSelection ? false : ![self shouldPreventNativeTabChangeWithinTabBarController:tabBarCtrl];
55
49
  }
56
50
 
57
51
  - (void)tabBarController:(UITabBarController *)tabBarController
@@ -649,6 +649,30 @@ RNS_IGNORE_SUPER_CALL_END
649
649
  _tabBarItemNeedsRecreation = YES;
650
650
  }
651
651
 
652
+ - (void)setSpecialEffects:(NSDictionary *)specialEffects
653
+ {
654
+ if (specialEffects == nil || specialEffects[@"repeatedTabSelection"] == nil ||
655
+ ![specialEffects[@"repeatedTabSelection"] isKindOfClass:[NSDictionary class]]) {
656
+ _shouldUseRepeatedTabSelectionPopToRootSpecialEffect = YES;
657
+ _shouldUseRepeatedTabSelectionScrollToTopSpecialEffect = YES;
658
+ return;
659
+ }
660
+
661
+ NSDictionary *repeatedTabSelection = specialEffects[@"repeatedTabSelection"];
662
+
663
+ if (repeatedTabSelection[@"popToRoot"] != nil) {
664
+ _shouldUseRepeatedTabSelectionPopToRootSpecialEffect = [RCTConvert BOOL:repeatedTabSelection[@"popToRoot"]];
665
+ } else {
666
+ _shouldUseRepeatedTabSelectionPopToRootSpecialEffect = YES;
667
+ }
668
+
669
+ if (repeatedTabSelection[@"scrollToTop"] != nil) {
670
+ _shouldUseRepeatedTabSelectionScrollToTopSpecialEffect = [RCTConvert BOOL:repeatedTabSelection[@"scrollToTop"]];
671
+ } else {
672
+ _shouldUseRepeatedTabSelectionScrollToTopSpecialEffect = YES;
673
+ }
674
+ }
675
+
652
676
  - (void)setOrientation:(RNSOrientation)orientation
653
677
  {
654
678
  _orientation = orientation;
@@ -33,9 +33,6 @@ RCT_EXPORT_VIEW_PROPERTY(iconSfSymbolName, NSString);
33
33
  RCT_EXPORT_VIEW_PROPERTY(selectedIconImageSource, RCTImageSource);
34
34
  RCT_EXPORT_VIEW_PROPERTY(selectedIconSfSymbolName, NSString);
35
35
 
36
- RCT_EXPORT_VIEW_PROPERTY(shouldUseRepeatedTabSelectionPopToRootSpecialEffect, BOOL);
37
- RCT_EXPORT_VIEW_PROPERTY(shouldUseRepeatedTabSelectionScrollToTopSpecialEffect, BOOL);
38
-
39
36
  RCT_EXPORT_VIEW_PROPERTY(overrideScrollViewContentInsetAdjustmentBehavior, BOOL);
40
37
 
41
38
  RCT_EXPORT_VIEW_PROPERTY(bottomScrollEdgeEffect, RNSScrollEdgeEffect);
@@ -47,6 +44,8 @@ RCT_EXPORT_VIEW_PROPERTY(userInterfaceStyle, UIUserInterfaceStyle);
47
44
 
48
45
  RCT_EXPORT_VIEW_PROPERTY(systemItem, RNSBottomTabsScreenSystemItem);
49
46
 
47
+ RCT_EXPORT_VIEW_PROPERTY(specialEffects, NSDictionary);
48
+
50
49
  RCT_EXPORT_VIEW_PROPERTY(onWillAppear, RCTDirectEventBlock);
51
50
  RCT_EXPORT_VIEW_PROPERTY(onWillDisappear, RCTDirectEventBlock);
52
51
  RCT_EXPORT_VIEW_PROPERTY(onDidAppear, RCTDirectEventBlock);
@@ -1 +1 @@
1
- {"version":3,"names":["Object","defineProperty","exports","value","default","_codegenNativeComponent","_interopRequireDefault","require","e","__esModule","_default","codegenNativeComponent","interfaceOnly"],"sourceRoot":"../../../../src","sources":["fabric/bottom-tabs/BottomTabsNativeComponent.ts"],"mappings":";AAAA,YAAY;;AAEZ;AAAAA,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,OAAA;AACA,IAAAC,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAJ,OAAA,EAAAI,CAAA;AAQ7F;AACA;AACA;AACA;AACA;AACA;AAAA,IAAAE,QAAA,GAAAR,OAAA,CAAAE,OAAA,GA0De,IAAAO,+BAAsB,EAAc,eAAe,EAAE;EAClEC,aAAa,EAAE;AACjB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Object","defineProperty","exports","value","default","_codegenNativeComponent","_interopRequireDefault","require","e","__esModule","_default","codegenNativeComponent","interfaceOnly"],"sourceRoot":"../../../../src","sources":["fabric/bottom-tabs/BottomTabsNativeComponent.ts"],"mappings":";AAAA,YAAY;;AAEZ;AAAAA,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,OAAA;AACA,IAAAC,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAJ,OAAA,EAAAI,CAAA;AAQ7F;AACA;AACA;AACA;AACA;AACA;AAAA,IAAAE,QAAA,GAAAR,OAAA,CAAAE,OAAA,GA2De,IAAAO,+BAAsB,EAAc,eAAe,EAAE;EAClEC,aAAa,EAAE;AACjB,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["codegenNativeComponent","interfaceOnly"],"sourceRoot":"../../../../src","sources":["fabric/bottom-tabs/BottomTabsNativeComponent.ts"],"mappings":"AAAA,YAAY;;AAEZ;AACA,OAAOA,sBAAsB,MAAM,yDAAyD;;AAQ5F;AACA;AACA;AACA;AACA;AACA;;AA0DA,eAAeA,sBAAsB,CAAc,eAAe,EAAE;EAClEC,aAAa,EAAE;AACjB,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["codegenNativeComponent","interfaceOnly"],"sourceRoot":"../../../../src","sources":["fabric/bottom-tabs/BottomTabsNativeComponent.ts"],"mappings":"AAAA,YAAY;;AAEZ;AACA,OAAOA,sBAAsB,MAAM,yDAAyD;;AAQ5F;AACA;AACA;AACA;AACA;AACA;;AA2DA,eAAeA,sBAAsB,CAAc,eAAe,EAAE;EAClEC,aAAa,EAAE;AACjB,CAAC,CAAC","ignoreList":[]}
@@ -4,6 +4,7 @@ import type { BottomTabsAccessoryEnvironment } from './BottomTabsAccessory.types
4
4
  export type BottomAccessoryFn = (environment: BottomTabsAccessoryEnvironment) => ReactNode;
5
5
  export type NativeFocusChangeEvent = {
6
6
  tabKey: string;
7
+ repeatedSelectionHandledBySpecialEffect: boolean;
7
8
  };
8
9
  export type TabBarItemLabelVisibilityMode = 'auto' | 'selected' | 'labeled' | 'unlabeled';
9
10
  export type TabBarMinimizeBehavior = 'automatic' | 'never' | 'onScrollDown' | 'onScrollUp';
@@ -19,6 +20,8 @@ export interface BottomTabsProps extends ViewProps {
19
20
  * @summary Hides the tab bar.
20
21
  *
21
22
  * @default false
23
+ *
24
+ * @platform android, ios
22
25
  */
23
26
  tabBarHidden?: boolean;
24
27
  /**
@@ -124,6 +127,7 @@ export interface BottomTabsProps extends ViewProps {
124
127
  * @see {@link https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible|Material Components documentation}
125
128
  *
126
129
  * @default auto
130
+ *
127
131
  * @platform android
128
132
  */
129
133
  tabBarItemLabelVisibilityMode?: TabBarItemLabelVisibilityMode;
@@ -1 +1 @@
1
- {"version":3,"file":"BottomTabs.types.d.ts","sourceRoot":"","sources":["../../../../src/components/bottom-tabs/BottomTabs.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,KAAK,EACV,UAAU,EACV,SAAS,EACT,oBAAoB,EACpB,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAElF,MAAM,MAAM,iBAAiB,GAAG,CAC9B,WAAW,EAAE,8BAA8B,KACxC,SAAS,CAAC;AAEf,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAGF,MAAM,MAAM,6BAA6B,GACrC,MAAM,GACN,UAAU,GACV,SAAS,GACT,WAAW,CAAC;AAGhB,MAAM,MAAM,sBAAsB,GAC9B,WAAW,GACX,OAAO,GACP,cAAc,GACd,YAAY,CAAC;AAGjB,MAAM,MAAM,oBAAoB,GAAG,WAAW,GAAG,QAAQ,GAAG,YAAY,CAAC;AAEzE,MAAM,WAAW,eAAgB,SAAQ,SAAS;IAEhD;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CACpB,KAAK,EAAE,oBAAoB,CAAC,sBAAsB,CAAC,KAChD,IAAI,CAAC;IAIV;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAIvB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,UAAU,CAAC;IACnC;;;;OAIG;IACH,yBAAyB,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IACpD;;;;;;OAMG;IACH,uBAAuB,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IAChD;;;;;;OAMG;IACH,6BAA6B,CAAC,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC;IACtD;;;;OAIG;IACH,yBAAyB,CAAC,EAAE,SAAS,CAAC,YAAY,CAAC,CAAC;IACpD;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,SAAS,CAAC,WAAW,CAAC,CAAC;IAClD;;;;OAIG;IACH,wBAAwB,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IAC9C;;;;;;OAMG;IACH,8BAA8B,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IACpD;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC;;;;;;OAMG;IACH,yBAAyB,CAAC,EAAE,UAAU,CAAC;IACvC;;;;OAIG;IACH,8BAA8B,CAAC,EAAE,UAAU,CAAC;IAC5C;;;;;;OAMG;IACH,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,UAAU,CAAC;IACnC;;;;;;;;;;;;;;;;OAgBG;IACH,6BAA6B,CAAC,EAAE,6BAA6B,CAAC;IAI9D;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,eAAe,CAAC,EAAE,iBAAiB,CAAC;IACpC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAI5C;;;;;;;;;;;;;;;;;;OAkBG;IACH,sCAAsC,CAAC,EAAE,OAAO,CAAC;CAElD"}
1
+ {"version":3,"file":"BottomTabs.types.d.ts","sourceRoot":"","sources":["../../../../src/components/bottom-tabs/BottomTabs.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,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AAO,CAAC,CAAC;IAC9C;;;;;;OAMG;IACH,8BAA8B,CAAC,EAAE,SAAS,CAAC,OAAO,CAAC,CAAC;IACpD;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,UAAU,CAAC;IACjC;;;;;;OAMG;IACH,yBAAyB,CAAC,EAAE,UAAU,CAAC;IACvC;;;;OAIG;IACH,8BAA8B,CAAC,EAAE,UAAU,CAAC;IAC5C;;;;;;OAMG;IACH,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAC3C;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,UAAU,CAAC;IACnC;;;;;;;;;;;;;;;;;OAiBG;IACH,6BAA6B,CAAC,EAAE,6BAA6B,CAAC;IAI9D;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,sBAAsB,CAAC,EAAE,sBAAsB,CAAC;IAChD;;;;;;;;;;;;;;;;;;;;;;;;;;;;OA4BG;IACH,eAAe,CAAC,EAAE,iBAAiB,CAAC;IACpC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAI5C;;;;;;;;;;;;;;;;;;OAkBG;IACH,sCAAsC,CAAC,EAAE,OAAO,CAAC;CAElD"}
@@ -185,15 +185,6 @@ export interface BottomTabsScreenItemStateAppearance {
185
185
  tabBarItemBadgeBackgroundColor?: ColorValue;
186
186
  }
187
187
  export interface BottomTabsScreenProps {
188
- children?: ViewProps['children'];
189
- /**
190
- * @summary Defines what should be rendered when tab screen is frozen.
191
- *
192
- * @see {@link https://github.com/software-mansion/react-freeze|`react-freeze`'s GitHub repository} for more information about `react-freeze`.
193
- *
194
- * @platform android, ios
195
- */
196
- placeholder?: React.ReactNode | undefined;
197
188
  /**
198
189
  * @summary Determines selected tab.
199
190
  *
@@ -213,6 +204,15 @@ export interface BottomTabsScreenProps {
213
204
  * @platform android, ios
214
205
  */
215
206
  tabKey: string;
207
+ children?: ViewProps['children'];
208
+ /**
209
+ * @summary Defines what should be rendered when tab screen is frozen.
210
+ *
211
+ * @see {@link https://github.com/software-mansion/react-freeze|`react-freeze`'s GitHub repository} for more information about `react-freeze`.
212
+ *
213
+ * @platform android, ios
214
+ */
215
+ placeholder?: React.ReactNode | undefined;
216
216
  /**
217
217
  * @summary Title of the tab screen, displayed in the tab bar item.
218
218
  *
@@ -265,8 +265,60 @@ export interface BottomTabsScreenProps {
265
265
  *
266
266
  * On iOS, if no `selectedIcon` is provided, this icon will also
267
267
  * be used as the selected state icon.
268
+ *
269
+ * @platform android, ios
268
270
  */
269
271
  icon?: PlatformIcon;
272
+ /**
273
+ * @summary Specifies which special effects (also known as microinteractions)
274
+ * are enabled for the tab screen.
275
+ *
276
+ * For repeated tab selection (selecting already focused tab bar item),
277
+ * there are 2 supported special effects:
278
+ * - `popToRoot` - when Stack is nested inside tab screen and repeated
279
+ * selection is detected, the Stack will pop to root screen,
280
+ * - `scrollToTop` - when there is a ScrollView in first descendant
281
+ * chain from tab screen and repeated selection is detected, ScrollView
282
+ * will be scrolled to top.
283
+ *
284
+ * `popToRoot` has priority over `scrollToTop`.
285
+ *
286
+ * @default All special effects are enabled by default.
287
+ *
288
+ * @platform android, ios
289
+ */
290
+ specialEffects?: {
291
+ repeatedTabSelection?: {
292
+ /**
293
+ * @default true
294
+ */
295
+ popToRoot?: boolean;
296
+ /**
297
+ * @default true
298
+ */
299
+ scrollToTop?: boolean;
300
+ };
301
+ };
302
+ /**
303
+ * @summary Allows to control whether contents of a tab screen should be frozen or not. This overrides any default behavior.
304
+ *
305
+ * @default undefined
306
+ *
307
+ * @platform android, ios
308
+ */
309
+ freezeContents?: boolean;
310
+ /**
311
+ * @summary Specifies the color of the text in the badge.
312
+ *
313
+ * @platform android
314
+ */
315
+ tabBarItemBadgeTextColor?: ColorValue;
316
+ /**
317
+ * @summary Specifies the background color of the badge.
318
+ *
319
+ * @platform android
320
+ */
321
+ tabBarItemBadgeBackgroundColor?: ColorValue;
270
322
  /**
271
323
  * @summary Specifies supported orientations for the tab screen.
272
324
  *
@@ -316,18 +368,6 @@ export interface BottomTabsScreenProps {
316
368
  * @platform ios
317
369
  */
318
370
  orientation?: BottomTabsScreenOrientation;
319
- /**
320
- * @summary Specifies the color of the text in the badge.
321
- *
322
- * @platform android
323
- */
324
- tabBarItemBadgeTextColor?: ColorValue;
325
- /**
326
- * @summary Specifies the background color of the badge.
327
- *
328
- * @platform android
329
- */
330
- tabBarItemBadgeBackgroundColor?: ColorValue;
331
371
  /**
332
372
  * @summary Specifies the standard tab bar appearance.
333
373
  *
@@ -369,43 +409,10 @@ export interface BottomTabsScreenProps {
369
409
  * be customized.
370
410
  *
371
411
  * @see {@link https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem|UITabBarItem.SystemItem}
412
+ *
372
413
  * @platform ios
373
414
  */
374
415
  systemItem?: BottomTabsSystemItem;
375
- /**
376
- * @summary Specifies which special effects (also known as microinteractions)
377
- * are enabled for the tab screen.
378
- *
379
- * For repeated tab selection (selecting already focused tab bar item),
380
- * there are 2 supported special effects:
381
- * - `popToRoot` - when Stack is nested inside tab screen and repeated
382
- * selection is detected, the Stack will pop to root screen,
383
- * - `scrollToTop` - when there is a ScrollView in first descendant
384
- * chain from tab screen and repeated selection is detected, ScrollView
385
- * will be scrolled to top.
386
- *
387
- * `popToRoot` has priority over `scrollToTop`.
388
- *
389
- * @default All special effects are enabled by default.
390
- */
391
- specialEffects?: {
392
- repeatedTabSelection?: {
393
- /**
394
- * @default true
395
- */
396
- popToRoot?: boolean;
397
- /**
398
- * @default true
399
- */
400
- scrollToTop?: boolean;
401
- };
402
- };
403
- /**
404
- * @summary Allows to control whether contents of a tab screen should be frozen or not. This overrides any default behavior.
405
- *
406
- * @default `undefined`
407
- */
408
- freezeContents?: boolean;
409
416
  /**
410
417
  * @summary Specifies if `contentInsetAdjustmentBehavior` of first ScrollView
411
418
  * in first descendant chain from tab screen should be overridden back from `never`
@@ -470,6 +477,7 @@ export interface BottomTabsScreenProps {
470
477
  * @see {@link https://developer.apple.com/documentation/uikit/uiuserinterfacestyle|UIUserInterfaceStyle}
471
478
  *
472
479
  * @default unspecified
480
+ *
473
481
  * @platform ios
474
482
  */
475
483
  experimental_userInterfaceStyle?: UserInterfaceStyle;
@@ -1 +1 @@
1
- {"version":3,"file":"BottomTabsScreen.types.d.ts","sourceRoot":"","sources":["../../../../src/components/bottom-tabs/BottomTabsScreen.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,oBAAoB,EACpB,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEhD,MAAM,MAAM,4BAA4B,CAAC,CAAC,IAAI,CAC5C,KAAK,EAAE,oBAAoB,CAAC,CAAC,CAAC,KAC3B,IAAI,CAAC;AAEV,MAAM,MAAM,yBAAyB,GAAG,QAAQ,CAAC;IAC/C,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAGH,MAAM,MAAM,0BAA0B,GAClC,MAAM,GACN,eAAe,GACf,YAAY,GACZ,OAAO,GACP,MAAM,GACN,SAAS,GACT,WAAW,GACX,yBAAyB,GACzB,oBAAoB,GACpB,gBAAgB,GAChB,qBAAqB,GACrB,sBAAsB,GACtB,8BAA8B,GAC9B,yBAAyB,GACzB,qBAAqB,GACrB,0BAA0B,GAC1B,2BAA2B,GAC3B,6BAA6B,GAC7B,wBAAwB,GACxB,oBAAoB,GACpB,yBAAyB,GACzB,0BAA0B,CAAC;AAE/B,MAAM,MAAM,oBAAoB,GAC5B,WAAW,GACX,UAAU,GACV,WAAW,GACX,WAAW,GACX,UAAU,GACV,SAAS,GACT,MAAM,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QACf,oBAAoB,CAAC,EAAE;YACrB;;eAEG;YACH,SAAS,CAAC,EAAE,OAAO,CAAC;YACpB;;eAEG;YACH,WAAW,CAAC,EAAE,OAAO,CAAC;SACvB,CAAC;KACH,CAAC;IACF;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;;;;;;;;;;;;OAaG;IACH,gDAAgD,CAAC,EAAE,OAAO,CAAC;IAC3D;;;;;;;;;;;;;;;;;;;;;;;;;OAyBG;IACH,iBAAiB,CAAC,EAAE;QAClB,MAAM,CAAC,EAAE,gBAAgB,CAAC;QAC1B,IAAI,CAAC,EAAE,gBAAgB,CAAC;QACxB,KAAK,CAAC,EAAE,gBAAgB,CAAC;QACzB,GAAG,CAAC,EAAE,gBAAgB,CAAC;KACxB,CAAC;IACF;;;;;;;;;;;;;;;;;;OAkBG;IACH,+BAA+B,CAAC,EAAE,kBAAkB,CAAC;IAIrD;;;;;OAKG;IACH,YAAY,CAAC,EAAE,4BAA4B,CAAC,WAAW,CAAC,CAAC;IACzD;;;;;OAKG;IACH,WAAW,CAAC,EAAE,4BAA4B,CAAC,WAAW,CAAC,CAAC;IACxD;;;;;OAKG;IACH,eAAe,CAAC,EAAE,4BAA4B,CAAC,WAAW,CAAC,CAAC;IAC5D;;;;;OAKG;IACH,cAAc,CAAC,EAAE,4BAA4B,CAAC,WAAW,CAAC,CAAC;CAE5D"}
1
+ {"version":3,"file":"BottomTabsScreen.types.d.ts","sourceRoot":"","sources":["../../../../src/components/bottom-tabs/BottomTabsScreen.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,UAAU,EACV,oBAAoB,EACpB,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,YAAY,EACZ,eAAe,EACf,kBAAkB,EAClB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAEhD,M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AAkB,CAAC;IAIrD;;;;;OAKG;IACH,YAAY,CAAC,EAAE,4BAA4B,CAAC,WAAW,CAAC,CAAC;IACzD;;;;;OAKG;IACH,WAAW,CAAC,EAAE,4BAA4B,CAAC,WAAW,CAAC,CAAC;IACxD;;;;;OAKG;IACH,eAAe,CAAC,EAAE,4BAA4B,CAAC,WAAW,CAAC,CAAC;IAC5D;;;;;OAKG;IACH,cAAc,CAAC,EAAE,4BAA4B,CAAC,WAAW,CAAC,CAAC;CAE5D"}
@@ -2,6 +2,7 @@ import type { ColorValue, ViewProps } from 'react-native';
2
2
  import type { DirectEventHandler, Float, WithDefault } from 'react-native/Libraries/Types/CodegenTypes';
3
3
  type NativeFocusChangeEvent = {
4
4
  tabKey: string;
5
+ repeatedSelectionHandledBySpecialEffect: boolean;
5
6
  };
6
7
  type TabBarItemLabelVisibilityMode = 'auto' | 'selected' | 'labeled' | 'unlabeled';
7
8
  type TabBarMinimizeBehavior = 'automatic' | 'never' | 'onScrollDown' | 'onScrollUp';
@@ -1 +1 @@
1
- {"version":3,"file":"BottomTabsNativeComponent.d.ts","sourceRoot":"","sources":["../../../../src/fabric/bottom-tabs/BottomTabsNativeComponent.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EACV,kBAAkB,EAClB,KAAK,EACL,WAAW,EACZ,MAAM,2CAA2C,CAAC;AASnD,KAAK,sBAAsB,GAAG;IAC5B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,KAAK,6BAA6B,GAC9B,MAAM,GACN,UAAU,GACV,SAAS,GACT,WAAW,CAAC;AAEhB,KAAK,sBAAsB,GACvB,WAAW,GACX,OAAO,GACP,cAAc,GACd,YAAY,CAAC;AAEjB,KAAK,oBAAoB,GAAG,WAAW,GAAG,QAAQ,GAAG,YAAY,CAAC;AAElE,MAAM,WAAW,WAAY,SAAQ,SAAS;IAE5C,mBAAmB,C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EAAE,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IAK3C,0BAA0B,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;CAC1D;;AAED,wBAEG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-screens",
3
- "version": "4.19.0-nightly-20251202-9e8bf5275",
3
+ "version": "4.19.0-nightly-20251204-1746a584e",
4
4
  "description": "Native navigation primitives for your React Native app.",
5
5
  "scripts": {
6
6
  "submodules": "git submodule update --init --recursive && (cd react-navigation && yarn && yarn build && cd ../)",
@@ -13,6 +13,7 @@ export type BottomAccessoryFn = (
13
13
 
14
14
  export type NativeFocusChangeEvent = {
15
15
  tabKey: string;
16
+ repeatedSelectionHandledBySpecialEffect: boolean;
16
17
  };
17
18
 
18
19
  // Android-specific
@@ -49,11 +50,13 @@ export interface BottomTabsProps extends ViewProps {
49
50
  * @summary Hides the tab bar.
50
51
  *
51
52
  * @default false
53
+ *
54
+ * @platform android, ios
52
55
  */
53
56
  tabBarHidden?: boolean;
54
57
  // #endregion General
55
58
 
56
- // #region Android-only appearance
59
+ // #region Android-only
57
60
  /**
58
61
  * @summary Specifies the background color for the entire tab bar.
59
62
  *
@@ -157,12 +160,13 @@ export interface BottomTabsProps extends ViewProps {
157
160
  * @see {@link https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible|Material Components documentation}
158
161
  *
159
162
  * @default auto
163
+ *
160
164
  * @platform android
161
165
  */
162
166
  tabBarItemLabelVisibilityMode?: TabBarItemLabelVisibilityMode;
163
- // #endregion Android-only appearance
167
+ // #endregion Android-only
164
168
 
165
- // #region iOS-only appearance
169
+ // #region iOS-only
166
170
  /**
167
171
  * @summary Specifies the color used for selected tab's text and icon color.
168
172
  *
@@ -249,7 +253,7 @@ export interface BottomTabsProps extends ViewProps {
249
253
  * @supported iOS 18 or higher
250
254
  */
251
255
  tabBarControllerMode?: TabBarControllerMode;
252
- // #endregion iOS-only appearance
256
+ // #endregion iOS-only
253
257
 
254
258
  // #region Experimental support
255
259
  /**
@@ -256,16 +256,6 @@ export interface BottomTabsScreenItemStateAppearance {
256
256
  }
257
257
 
258
258
  export interface BottomTabsScreenProps {
259
- children?: ViewProps['children'];
260
- /**
261
- * @summary Defines what should be rendered when tab screen is frozen.
262
- *
263
- * @see {@link https://github.com/software-mansion/react-freeze|`react-freeze`'s GitHub repository} for more information about `react-freeze`.
264
- *
265
- * @platform android, ios
266
- */
267
- placeholder?: React.ReactNode | undefined;
268
-
269
259
  // #region Control
270
260
  /**
271
261
  * @summary Determines selected tab.
@@ -289,6 +279,15 @@ export interface BottomTabsScreenProps {
289
279
  // #endregion
290
280
 
291
281
  // #region General
282
+ children?: ViewProps['children'];
283
+ /**
284
+ * @summary Defines what should be rendered when tab screen is frozen.
285
+ *
286
+ * @see {@link https://github.com/software-mansion/react-freeze|`react-freeze`'s GitHub repository} for more information about `react-freeze`.
287
+ *
288
+ * @platform android, ios
289
+ */
290
+ placeholder?: React.ReactNode | undefined;
292
291
  /**
293
292
  * @summary Title of the tab screen, displayed in the tab bar item.
294
293
  *
@@ -341,8 +340,66 @@ export interface BottomTabsScreenProps {
341
340
  *
342
341
  * On iOS, if no `selectedIcon` is provided, this icon will also
343
342
  * be used as the selected state icon.
343
+ *
344
+ * @platform android, ios
344
345
  */
345
346
  icon?: PlatformIcon;
347
+ /**
348
+ * @summary Specifies which special effects (also known as microinteractions)
349
+ * are enabled for the tab screen.
350
+ *
351
+ * For repeated tab selection (selecting already focused tab bar item),
352
+ * there are 2 supported special effects:
353
+ * - `popToRoot` - when Stack is nested inside tab screen and repeated
354
+ * selection is detected, the Stack will pop to root screen,
355
+ * - `scrollToTop` - when there is a ScrollView in first descendant
356
+ * chain from tab screen and repeated selection is detected, ScrollView
357
+ * will be scrolled to top.
358
+ *
359
+ * `popToRoot` has priority over `scrollToTop`.
360
+ *
361
+ * @default All special effects are enabled by default.
362
+ *
363
+ * @platform android, ios
364
+ */
365
+ specialEffects?: {
366
+ repeatedTabSelection?: {
367
+ /**
368
+ * @default true
369
+ */
370
+ popToRoot?: boolean;
371
+ /**
372
+ * @default true
373
+ */
374
+ scrollToTop?: boolean;
375
+ };
376
+ };
377
+ /**
378
+ * @summary Allows to control whether contents of a tab screen should be frozen or not. This overrides any default behavior.
379
+ *
380
+ * @default undefined
381
+ *
382
+ * @platform android, ios
383
+ */
384
+ freezeContents?: boolean;
385
+ // #endregion General
386
+
387
+ // #region Android-only
388
+ /**
389
+ * @summary Specifies the color of the text in the badge.
390
+ *
391
+ * @platform android
392
+ */
393
+ tabBarItemBadgeTextColor?: ColorValue;
394
+ /**
395
+ * @summary Specifies the background color of the badge.
396
+ *
397
+ * @platform android
398
+ */
399
+ tabBarItemBadgeBackgroundColor?: ColorValue;
400
+ // #endregion Android-only
401
+
402
+ // #region iOS-only
346
403
  /**
347
404
  * @summary Specifies supported orientations for the tab screen.
348
405
  *
@@ -392,22 +449,6 @@ export interface BottomTabsScreenProps {
392
449
  * @platform ios
393
450
  */
394
451
  orientation?: BottomTabsScreenOrientation;
395
- // #endregion General
396
- /**
397
- * @summary Specifies the color of the text in the badge.
398
- *
399
- * @platform android
400
- */
401
- tabBarItemBadgeTextColor?: ColorValue;
402
- /**
403
- * @summary Specifies the background color of the badge.
404
- *
405
- * @platform android
406
- */
407
- tabBarItemBadgeBackgroundColor?: ColorValue;
408
- // #endregion Android-only appearance
409
-
410
- // #region iOS-only appearance
411
452
  /**
412
453
  * @summary Specifies the standard tab bar appearance.
413
454
  *
@@ -449,43 +490,10 @@ export interface BottomTabsScreenProps {
449
490
  * be customized.
450
491
  *
451
492
  * @see {@link https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem|UITabBarItem.SystemItem}
493
+ *
452
494
  * @platform ios
453
495
  */
454
496
  systemItem?: BottomTabsSystemItem;
455
- /**
456
- * @summary Specifies which special effects (also known as microinteractions)
457
- * are enabled for the tab screen.
458
- *
459
- * For repeated tab selection (selecting already focused tab bar item),
460
- * there are 2 supported special effects:
461
- * - `popToRoot` - when Stack is nested inside tab screen and repeated
462
- * selection is detected, the Stack will pop to root screen,
463
- * - `scrollToTop` - when there is a ScrollView in first descendant
464
- * chain from tab screen and repeated selection is detected, ScrollView
465
- * will be scrolled to top.
466
- *
467
- * `popToRoot` has priority over `scrollToTop`.
468
- *
469
- * @default All special effects are enabled by default.
470
- */
471
- specialEffects?: {
472
- repeatedTabSelection?: {
473
- /**
474
- * @default true
475
- */
476
- popToRoot?: boolean;
477
- /**
478
- * @default true
479
- */
480
- scrollToTop?: boolean;
481
- };
482
- };
483
- /**
484
- * @summary Allows to control whether contents of a tab screen should be frozen or not. This overrides any default behavior.
485
- *
486
- * @default `undefined`
487
- */
488
- freezeContents?: boolean;
489
497
  /**
490
498
  * @summary Specifies if `contentInsetAdjustmentBehavior` of first ScrollView
491
499
  * in first descendant chain from tab screen should be overridden back from `never`
@@ -550,10 +558,11 @@ export interface BottomTabsScreenProps {
550
558
  * @see {@link https://developer.apple.com/documentation/uikit/uiuserinterfacestyle|UIUserInterfaceStyle}
551
559
  *
552
560
  * @default unspecified
561
+ *
553
562
  * @platform ios
554
563
  */
555
564
  experimental_userInterfaceStyle?: UserInterfaceStyle;
556
- // #endregion iOS-only appearance
565
+ // #endregion iOS-only
557
566
 
558
567
  // #region Events
559
568
  /**
@@ -18,6 +18,7 @@ import type {
18
18
 
19
19
  type NativeFocusChangeEvent = {
20
20
  tabKey: string;
21
+ repeatedSelectionHandledBySpecialEffect: boolean;
21
22
  };
22
23
 
23
24
  type TabBarItemLabelVisibilityMode =