expo-router 7.0.0-canary-20251031-b135dff → 7.0.0-canary-20251118-4ca99d5

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 (157) hide show
  1. package/build/Route.d.ts +2 -0
  2. package/build/Route.d.ts.map +1 -1
  3. package/build/Route.js.map +1 -1
  4. package/build/color/android.attr.types.d.ts +142 -0
  5. package/build/color/android.attr.types.d.ts.map +1 -0
  6. package/build/color/android.attr.types.js +3 -0
  7. package/build/color/android.attr.types.js.map +1 -0
  8. package/build/color/android.color.types.d.ts +1278 -0
  9. package/build/color/android.color.types.d.ts.map +1 -0
  10. package/build/color/android.color.types.js +3 -0
  11. package/build/color/android.color.types.js.map +1 -0
  12. package/build/color/android.dynamic.types.d.ts +384 -0
  13. package/build/color/android.dynamic.types.d.ts.map +1 -0
  14. package/build/color/android.dynamic.types.js +3 -0
  15. package/build/color/android.dynamic.types.js.map +1 -0
  16. package/build/color/android.material.types.d.ts +291 -0
  17. package/build/color/android.material.types.d.ts.map +1 -0
  18. package/build/color/android.material.types.js +3 -0
  19. package/build/color/android.material.types.js.map +1 -0
  20. package/build/color/index.d.ts +35 -0
  21. package/build/color/index.d.ts.map +1 -0
  22. package/build/color/index.js +71 -0
  23. package/build/color/index.js.map +1 -0
  24. package/build/color/ios.types.d.ts +156 -0
  25. package/build/color/ios.types.d.ts.map +1 -0
  26. package/build/color/ios.types.js +3 -0
  27. package/build/color/ios.types.js.map +1 -0
  28. package/build/color/materialColor.android.d.ts +4 -0
  29. package/build/color/materialColor.android.d.ts.map +1 -0
  30. package/build/color/materialColor.android.js +28 -0
  31. package/build/color/materialColor.android.js.map +1 -0
  32. package/build/color/materialColor.d.ts +4 -0
  33. package/build/color/materialColor.d.ts.map +1 -0
  34. package/build/color/materialColor.js +11 -0
  35. package/build/color/materialColor.js.map +1 -0
  36. package/build/exports.d.ts +2 -0
  37. package/build/exports.d.ts.map +1 -1
  38. package/build/exports.js +7 -1
  39. package/build/exports.js.map +1 -1
  40. package/build/layouts/DrawerClient.d.ts +4 -2
  41. package/build/layouts/DrawerClient.d.ts.map +1 -1
  42. package/build/layouts/Stack.d.ts.map +1 -1
  43. package/build/layouts/Stack.js +3 -2
  44. package/build/layouts/Stack.js.map +1 -1
  45. package/build/layouts/Stack.web.d.ts.map +1 -1
  46. package/build/layouts/Stack.web.js +3 -2
  47. package/build/layouts/Stack.web.js.map +1 -1
  48. package/build/layouts/StackClient.d.ts +18 -10
  49. package/build/layouts/StackClient.d.ts.map +1 -1
  50. package/build/layouts/StackClient.js +95 -5
  51. package/build/layouts/StackClient.js.map +1 -1
  52. package/build/layouts/TabsClient.d.ts +6 -3
  53. package/build/layouts/TabsClient.d.ts.map +1 -1
  54. package/build/layouts/stack-utils/StackHeaderBackButton.d.ts +14 -0
  55. package/build/layouts/stack-utils/StackHeaderBackButton.d.ts.map +1 -0
  56. package/build/layouts/stack-utils/StackHeaderBackButton.js +19 -0
  57. package/build/layouts/stack-utils/StackHeaderBackButton.js.map +1 -0
  58. package/build/layouts/stack-utils/StackHeaderComponent.d.ts +22 -0
  59. package/build/layouts/stack-utils/StackHeaderComponent.d.ts.map +1 -0
  60. package/build/layouts/stack-utils/StackHeaderComponent.js +67 -0
  61. package/build/layouts/stack-utils/StackHeaderComponent.js.map +1 -0
  62. package/build/layouts/stack-utils/StackHeaderLeft.d.ts +9 -0
  63. package/build/layouts/stack-utils/StackHeaderLeft.d.ts.map +1 -0
  64. package/build/layouts/stack-utils/StackHeaderLeft.js +17 -0
  65. package/build/layouts/stack-utils/StackHeaderLeft.js.map +1 -0
  66. package/build/layouts/stack-utils/StackHeaderRight.d.ts +9 -0
  67. package/build/layouts/stack-utils/StackHeaderRight.d.ts.map +1 -0
  68. package/build/layouts/stack-utils/StackHeaderRight.js +17 -0
  69. package/build/layouts/stack-utils/StackHeaderRight.js.map +1 -0
  70. package/build/layouts/stack-utils/StackHeaderSearchBar.d.ts +7 -0
  71. package/build/layouts/stack-utils/StackHeaderSearchBar.d.ts.map +1 -0
  72. package/build/layouts/stack-utils/StackHeaderSearchBar.js +16 -0
  73. package/build/layouts/stack-utils/StackHeaderSearchBar.js.map +1 -0
  74. package/build/layouts/stack-utils/StackHeaderTitle.d.ts +22 -0
  75. package/build/layouts/stack-utils/StackHeaderTitle.d.ts.map +1 -0
  76. package/build/layouts/stack-utils/StackHeaderTitle.js +41 -0
  77. package/build/layouts/stack-utils/StackHeaderTitle.js.map +1 -0
  78. package/build/layouts/stack-utils/StackScreen.d.ts +9 -0
  79. package/build/layouts/stack-utils/StackScreen.d.ts.map +1 -0
  80. package/build/layouts/stack-utils/StackScreen.js +34 -0
  81. package/build/layouts/stack-utils/StackScreen.js.map +1 -0
  82. package/build/layouts/stack-utils/index.d.ts +17 -0
  83. package/build/layouts/stack-utils/index.d.ts.map +1 -0
  84. package/build/layouts/stack-utils/index.js +28 -0
  85. package/build/layouts/stack-utils/index.js.map +1 -0
  86. package/build/layouts/stack-utils/utils.d.ts +3 -0
  87. package/build/layouts/stack-utils/utils.d.ts.map +1 -0
  88. package/build/layouts/stack-utils/utils.js +8 -0
  89. package/build/layouts/stack-utils/utils.js.map +1 -0
  90. package/build/layouts/withLayoutContext.js +1 -1
  91. package/build/layouts/withLayoutContext.js.map +1 -1
  92. package/build/loaders/utils.d.ts +9 -0
  93. package/build/loaders/utils.d.ts.map +1 -1
  94. package/build/loaders/utils.js +16 -2
  95. package/build/loaders/utils.js.map +1 -1
  96. package/build/native-tabs/NativeBottomTabsNavigator.d.ts.map +1 -1
  97. package/build/native-tabs/NativeBottomTabsNavigator.js.map +1 -1
  98. package/build/native-tabs/NativeTabTrigger.d.ts +9 -7
  99. package/build/native-tabs/NativeTabTrigger.d.ts.map +1 -1
  100. package/build/native-tabs/NativeTabTrigger.js +25 -64
  101. package/build/native-tabs/NativeTabTrigger.js.map +1 -1
  102. package/build/native-tabs/NativeTabs.d.ts +4 -1
  103. package/build/native-tabs/NativeTabs.d.ts.map +1 -1
  104. package/build/native-tabs/NativeTabsView.d.ts.map +1 -1
  105. package/build/native-tabs/NativeTabsView.js +8 -3
  106. package/build/native-tabs/NativeTabsView.js.map +1 -1
  107. package/build/native-tabs/common/elements.d.ts +28 -90
  108. package/build/native-tabs/common/elements.d.ts.map +1 -1
  109. package/build/native-tabs/common/elements.js +16 -18
  110. package/build/native-tabs/common/elements.js.map +1 -1
  111. package/build/native-tabs/index.d.ts +1 -2
  112. package/build/native-tabs/index.d.ts.map +1 -1
  113. package/build/native-tabs/index.js +1 -3
  114. package/build/native-tabs/index.js.map +1 -1
  115. package/build/native-tabs/types.d.ts +20 -170
  116. package/build/native-tabs/types.d.ts.map +1 -1
  117. package/build/native-tabs/types.js.map +1 -1
  118. package/build/native-tabs/utils/icon.d.ts +3 -3
  119. package/build/native-tabs/utils/icon.d.ts.map +1 -1
  120. package/build/native-tabs/utils/icon.js +22 -13
  121. package/build/native-tabs/utils/icon.js.map +1 -1
  122. package/build/primitives/elements.d.ts +18 -0
  123. package/build/primitives/elements.d.ts.map +1 -0
  124. package/build/primitives/elements.js +31 -0
  125. package/build/primitives/elements.js.map +1 -0
  126. package/build/primitives/index.d.ts +5 -0
  127. package/build/primitives/index.d.ts.map +1 -0
  128. package/build/primitives/index.js +26 -0
  129. package/build/primitives/index.js.map +1 -0
  130. package/build/primitives/menu.d.ts +12 -0
  131. package/build/primitives/menu.d.ts.map +1 -0
  132. package/build/primitives/menu.js +28 -0
  133. package/build/primitives/menu.js.map +1 -0
  134. package/build/{primitives.d.ts → primitives/navigation.d.ts} +1 -1
  135. package/build/primitives/navigation.d.ts.map +1 -0
  136. package/build/{primitives.js → primitives/navigation.js} +1 -1
  137. package/build/primitives/navigation.js.map +1 -0
  138. package/build/primitives/types.d.ts +26 -0
  139. package/build/primitives/types.d.ts.map +1 -0
  140. package/build/primitives/types.js +3 -0
  141. package/build/primitives/types.js.map +1 -0
  142. package/build/split-view/elements.js +4 -4
  143. package/build/split-view/elements.js.map +1 -1
  144. package/build/split-view/split-view.d.ts +1 -1
  145. package/build/split-view/split-view.d.ts.map +1 -1
  146. package/build/split-view/split-view.js +5 -5
  147. package/build/split-view/split-view.js.map +1 -1
  148. package/expo-module.config.json +10 -1
  149. package/ios/{ExpoHead.podspec → ExpoRouter.podspec} +1 -1
  150. package/package.json +14 -14
  151. package/build/native-tabs/NativeTabsTriggerTabBar.d.ts +0 -24
  152. package/build/native-tabs/NativeTabsTriggerTabBar.d.ts.map +0 -1
  153. package/build/native-tabs/NativeTabsTriggerTabBar.js +0 -28
  154. package/build/native-tabs/NativeTabsTriggerTabBar.js.map +0 -1
  155. package/build/primitives.d.ts.map +0 -1
  156. package/build/primitives.js.map +0 -1
  157. package/node/getExpoConstantsManifest.js +0 -163
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/native-tabs/types.ts"],"names":[],"mappings":";;;AA4La,QAAA,sBAAsB,GAAG;IACpC,MAAM;IACN,eAAe;IACf,YAAY;IACZ,OAAO;IACP,MAAM;IACN,SAAS;IACT,WAAW;IACX,yBAAyB;IACzB,oBAAoB;IACpB,gBAAgB;IAChB,qBAAqB;IACrB,sBAAsB;IACtB,8BAA8B;IAC9B,yBAAyB;IACzB,qBAAqB;IACrB,0BAA0B;IAC1B,2BAA2B;IAC3B,6BAA6B;IAC7B,wBAAwB;IACxB,oBAAoB;IACpB,yBAAyB;IACzB,0BAA0B;CAClB,CAAC;AAsLE,QAAA,6CAA6C,GAAG;IAC3D,MAAM;IACN,UAAU;IACV,SAAS;IACT,WAAW;CACH,CAAC;AAUE,QAAA,oCAAoC,GAAG;IAClD,WAAW;IACX,OAAO;IACP,cAAc;IACd,YAAY;CACJ,CAAC;AAiEX,MAAM,4BAA4B,GAAG;IACnC,WAAW;IACX,UAAU;IACV,WAAW;IACX,WAAW;IACX,UAAU;IACV,SAAS;IACT,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,UAAU;CACF,CAAC","sourcesContent":["import type { DefaultRouterOptions } from '@react-navigation/native';\nimport type { PropsWithChildren } from 'react';\nimport type { ColorValue, ImageSourcePropType, TextStyle } from 'react-native';\nimport type { BottomTabsScreenProps } from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nexport interface NativeTabOptions extends DefaultRouterOptions {\n /**\n * The icon to display in the tab bar.\n * @platform android\n * @platform iOS\n */\n icon?: SymbolOrImageSource;\n /**\n * The icon to display when the tab is selected.\n * @platform iOS\n */\n selectedIcon?: SymbolOrImageSource;\n /**\n * Title of the tab screen, displayed in the tab bar item.\n *\n * @platform android\n * @platform iOS\n */\n title?: string;\n /**\n * Specifies content of tab bar item badge.\n *\n * On Android, the value is interpreted in the following order:\n * - If the string can be parsed to integer, displays the value as a number\n * - Otherwise if the string is empty, displays \"small dot\" badge\n * - Otherwise, displays the value as a text\n *\n * On iOS, badge is displayed as regular string.\n *\n * @platform android\n * @platform ios\n */\n badgeValue?: string;\n /**\n * The style of the tab label when the tab is selected.\n */\n selectedLabelStyle?: NativeTabsLabelStyle;\n /**\n * The style of all the tab labels, when the tab is selected\n */\n labelStyle?: NativeTabsLabelStyle;\n /**\n * System-provided tab bar item with predefined icon and title\n *\n * Uses Apple's built-in tab bar items (e.g., bookmarks, contacts, downloads) with\n * standard iOS styling and localized titles. If you override the `title`,\n * `icon`, or `selectedIcon`, note that this is not officially supported\n * by Apple and may lead to unexpected results.\n *\n * @see {@link https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem|UITabBarItem.SystemItem}\n * @platform ios\n */\n role?: NativeTabsTabBarItemRole;\n /**\n * The color of the icon when the tab is selected.\n */\n selectedIconColor?: ColorValue;\n /**\n * The color of the badge when the tab is selected.\n */\n selectedBadgeBackgroundColor?: ColorValue;\n /**\n * The color of all the badges when the tab is selected.\n */\n badgeBackgroundColor?: ColorValue;\n /**\n * The color of the badge text.\n *\n * @platform android\n * @platform web\n */\n badgeTextColor?: ColorValue;\n /**\n * The color of the background when the tab is selected.\n */\n backgroundColor?: ColorValue;\n /**\n * The blur effect to apply when the tab is selected.\n *\n * @platform iOS\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * The color of the shadow when the tab is selected.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uibarappearance/shadowcolor)\n *\n * @platform iOS\n */\n shadowColor?: ColorValue;\n /**\n * The color of the icon when the tab is selected.\n *\n * On iOS 26+ you can change the icon color in the scroll edge state.\n */\n iconColor?: ColorValue;\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * The position adjustment for all the labels when the tab is selected.\n *\n * @platform iOS\n */\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * The position adjustment for the label when the tab is selected.\n *\n * @platform iOS\n */\n selectedTitlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * The color of the tab indicator.\n *\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n}\n\nexport type SymbolOrImageSource =\n | {\n /**\n * The name of the SF Symbol to use as an icon.\n * @platform iOS\n */\n sf?: SFSymbol;\n /**\n * The name of the drawable resource to use as an icon.\n * @platform android\n */\n drawable?: string;\n }\n | {\n /**\n * The image source to use as an icon.\n */\n src?: ImageSourcePropType | Promise<ImageSourcePropType | null>;\n };\n\nexport interface ExtendedNativeTabOptions extends NativeTabOptions {\n /**\n * If true, the tab will be hidden from the tab bar.\n */\n hidden?: boolean;\n specialEffects?: BottomTabsScreenProps['specialEffects'];\n}\n\ntype NumericFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;\n\nexport interface NativeTabsLabelStyle {\n /**\n * The font family of the tab label.\n */\n fontFamily?: TextStyle['fontFamily'];\n /**\n * The font size of the tab label.\n */\n fontSize?: TextStyle['fontSize'];\n /**\n * The font weight of the tab label.\n */\n fontWeight?: NumericFontWeight | `${NumericFontWeight}`;\n /**\n * The font style of the tab label.\n */\n fontStyle?: TextStyle['fontStyle'];\n /**\n * The color of the tab label.\n */\n color?: TextStyle['color'];\n}\n\nexport const SUPPORTED_BLUR_EFFECTS = [\n 'none',\n 'systemDefault',\n 'extraLight',\n 'light',\n 'dark',\n 'regular',\n 'prominent',\n 'systemUltraThinMaterial',\n 'systemThinMaterial',\n 'systemMaterial',\n 'systemThickMaterial',\n 'systemChromeMaterial',\n 'systemUltraThinMaterialLight',\n 'systemThinMaterialLight',\n 'systemMaterialLight',\n 'systemThickMaterialLight',\n 'systemChromeMaterialLight',\n 'systemUltraThinMaterialDark',\n 'systemThinMaterialDark',\n 'systemMaterialDark',\n 'systemThickMaterialDark',\n 'systemChromeMaterialDark',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiblureffect/style)\n */\nexport type NativeTabsBlurEffect = (typeof SUPPORTED_BLUR_EFFECTS)[number];\n\n/**\n * @platform android\n * @platform web\n */\nexport interface NativeTabsActiveStyleType {\n /**\n * @platform android\n * @platform web\n */\n color?: ColorValue;\n /**\n * @platform android\n * @platform web\n */\n fontSize?: TextStyle['fontSize'];\n /**\n * @platform android\n */\n iconColor?: ColorValue;\n /**\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n}\n\nexport interface NativeTabsProps extends PropsWithChildren {\n // #region common props\n /**\n * The style of the every tab label in the tab bar.\n */\n labelStyle?:\n | NativeTabsLabelStyle\n | {\n default?: NativeTabsLabelStyle;\n selected?: NativeTabsLabelStyle;\n };\n // disabledLabelStyle?: NativeTabsLabelStyle;\n /**\n * The color of every tab icon in the tab bar.\n */\n iconColor?: ColorValue | { default?: ColorValue; selected?: ColorValue };\n /**\n * The tint color of the tab icon.\n *\n * Can be overridden by icon color and label color for each tab individually.\n */\n tintColor?: ColorValue;\n /**\n * The background color of the tab bar.\n */\n backgroundColor?: ColorValue;\n /**\n * The background color of every badge in the tab bar.\n */\n badgeBackgroundColor?: ColorValue;\n // #endregion common props\n // #region iOS props\n /**\n * Specifies the minimize behavior for the tab bar.\n *\n * Available starting from iOS 26.\n *\n * The following values are currently supported:\n *\n * - `automatic` - resolves to the system default minimize behavior\n * - `never` - the tab bar does not minimize\n * - `onScrollDown` - the tab bar minimizes when scrolling down and\n * expands when scrolling back up\n * - `onScrollUp` - the tab bar minimizes when scrolling up and expands\n * when scrolling back down\n *\n * @see The supported values correspond to the official [UIKit documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior).\n *\n * @default automatic\n *\n * @platform iOS 26+\n */\n minimizeBehavior?: NativeTabsTabBarMinimizeBehavior;\n /**\n * The blur effect applied to the tab bar.\n *\n * @platform iOS\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * The color of the shadow.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uibarappearance/shadowcolor)\n *\n * @platform iOS\n */\n shadowColor?: ColorValue;\n /**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/titlepositionadjustment)\n *\n * @platform iOS\n */\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n // #endregion iOS props\n // #region android props\n /**\n * Disables the active indicator for the tab bar.\n *\n * @platform android\n */\n disableIndicator?: boolean;\n /**\n * The behavior when navigating back with the back button.\n *\n * @platform android\n */\n backBehavior?: 'none' | 'initialRoute' | 'history';\n /**\n * The visibility mode of the tab item label.\n *\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\n labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;\n /**\n * The color of the ripple effect when the tab is pressed.\n *\n * @platform android\n */\n rippleColor?: ColorValue;\n /**\n * The color of the tab indicator.\n *\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n /**\n * The color of the badge text.\n *\n * @platform android\n * @platform web\n */\n badgeTextColor?: ColorValue;\n // #endregion android props\n}\nexport interface NativeTabsViewProps\n extends Omit<\n NativeTabsProps,\n | 'labelStyle'\n | 'iconColor'\n | 'backgroundColor'\n | 'badgeBackgroundColor'\n | 'blurEffect'\n | 'indicatorColor'\n | 'badgeTextColor'\n > {\n focusedIndex: number;\n tabs: NativeTabsViewTabItem[];\n onTabChange: (tabKey: string) => void;\n}\n\nexport interface NativeTabsViewTabItem {\n options: ExtendedNativeTabOptions;\n routeKey: string;\n name: string;\n contentRenderer: () => React.ReactNode;\n}\n\nexport const SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES = [\n 'auto',\n 'selected',\n 'labeled',\n 'unlabeled',\n] as const;\n\n/**\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\nexport type NativeTabsTabBarItemLabelVisibilityMode =\n (typeof SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES)[number];\n\nexport const SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS = [\n 'automatic',\n 'never',\n 'onScrollDown',\n 'onScrollUp',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior)\n *\n * @platform iOS 26\n */\nexport type NativeTabsTabBarMinimizeBehavior =\n (typeof SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS)[number];\n\nexport interface NativeTabTriggerProps {\n /**\n * The name of the route.\n *\n * This is required when used inside a Layout component.\n *\n * When used in a route it has no effect.\n */\n name?: string;\n /**\n * If true, the tab will be hidden from the tab bar.\n *\n * > **Note**: Marking a tab as `hidden` means it cannot be navigated to in any way.\n */\n hidden?: boolean;\n /**\n * The options for the trigger.\n *\n * Use `Icon`, `Label`, and `Badge` components as children to customize the tab, rather then raw options.\n */\n options?: NativeTabOptions;\n /**\n * If true, the tab will not pop stack to the root when selected again.\n *\n * @default false\n * @platform iOS\n */\n disablePopToTop?: boolean;\n /**\n * If true, the tab will not scroll to the top when selected again.\n * @default false\n *\n * @platform iOS\n */\n disableScrollToTop?: boolean;\n /**\n * The children of the trigger.\n *\n * Use `Icon`, `Label`, and `Badge` components to customize the tab.\n */\n children?: React.ReactNode;\n /**\n * System-provided tab bar item with predefined icon and title\n *\n * Uses Apple's built-in tab bar items (e.g., bookmarks, contacts, downloads) with\n * standard iOS styling and localized titles. Custom `icon` or `selectedIcon`\n * properties will override the system icon, but the system-defined title cannot\n * be customized.\n *\n * @see {@link https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem|UITabBarItem.SystemItem}\n * @platform ios\n */\n role?: NativeTabsTabBarItemRole;\n}\n\nconst SUPPORTED_TAB_BAR_ITEM_ROLES = [\n 'bookmarks',\n 'contacts',\n 'downloads',\n 'favorites',\n 'featured',\n 'history',\n 'more',\n 'mostRecent',\n 'mostViewed',\n 'recents',\n 'search',\n 'topRated',\n] as const;\n\nexport type NativeTabsTabBarItemRole = (typeof SUPPORTED_TAB_BAR_ITEM_ROLES)[number];\n\nexport interface NativeTabsTriggerTabBarProps {\n /**\n * The style of the every tab label in the tab bar.\n *\n * @platform iOS\n * @platform web\n */\n labelStyle?: NativeTabsLabelStyle;\n /**\n * The background color of the tab bar, when the tab is selected\n */\n backgroundColor?: ColorValue;\n /**\n * The color of every tab icon, when the tab is selected\n *\n * @platform iOS\n */\n iconColor?: ColorValue;\n /**\n * The background color of every badge in the tab bar.\n *\n * @platform iOS\n * @platform web\n */\n badgeBackgroundColor?: ColorValue;\n /**\n * The blur effect applied to the tab bar, when the tab is selected\n *\n * @platform iOS\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * The color of the shadow when the tab is selected.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uibarappearance/shadowcolor)\n *\n * @platform iOS\n */\n shadowColor?: ColorValue;\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * The color of the badge text.\n *\n * @platform web\n */\n badgeTextColor?: ColorValue;\n /**\n * The color of the tab indicator.\n *\n * @platform web\n */\n indicatorColor?: ColorValue;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/native-tabs/types.ts"],"names":[],"mappings":";;;AAoFa,QAAA,sBAAsB,GAAG;IACpC,MAAM;IACN,eAAe;IACf,YAAY;IACZ,OAAO;IACP,MAAM;IACN,SAAS;IACT,WAAW;IACX,yBAAyB;IACzB,oBAAoB;IACpB,gBAAgB;IAChB,qBAAqB;IACrB,sBAAsB;IACtB,8BAA8B;IAC9B,yBAAyB;IACzB,qBAAqB;IACrB,0BAA0B;IAC1B,2BAA2B;IAC3B,6BAA6B;IAC7B,wBAAwB;IACxB,oBAAoB;IACpB,yBAAyB;IACzB,0BAA0B;CAClB,CAAC;AA4LE,QAAA,6CAA6C,GAAG;IAC3D,MAAM;IACN,UAAU;IACV,SAAS;IACT,WAAW;CACH,CAAC;AAUE,QAAA,oCAAoC,GAAG;IAClD,WAAW;IACX,OAAO;IACP,cAAc;IACd,YAAY;CACJ,CAAC;AAuEX,MAAM,4BAA4B,GAAG;IACnC,WAAW;IACX,UAAU;IACV,WAAW;IACX,WAAW;IACX,UAAU;IACV,SAAS;IACT,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,UAAU;CACF,CAAC","sourcesContent":["import type { DefaultRouterOptions } from '@react-navigation/native';\nimport type { PropsWithChildren } from 'react';\nimport type { ColorValue, ImageSourcePropType, TextStyle } from 'react-native';\nimport type { BottomTabsScreenProps } from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nexport type NativeScreenProps = Partial<Omit<BottomTabsScreenProps, 'tabKey' | 'isFocused'>>;\n\nexport interface NativeTabOptions extends DefaultRouterOptions {\n icon?: SymbolOrImageSource;\n selectedIcon?: SymbolOrImageSource;\n title?: string;\n badgeValue?: string;\n selectedLabelStyle?: NativeTabsLabelStyle;\n labelStyle?: NativeTabsLabelStyle;\n role?: NativeTabsTabBarItemRole;\n selectedIconColor?: ColorValue;\n selectedBadgeBackgroundColor?: ColorValue;\n badgeBackgroundColor?: ColorValue;\n badgeTextColor?: ColorValue;\n backgroundColor?: ColorValue;\n blurEffect?: NativeTabsBlurEffect;\n shadowColor?: ColorValue;\n iconColor?: ColorValue;\n disableTransparentOnScrollEdge?: boolean;\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n selectedTitlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n indicatorColor?: ColorValue;\n hidden?: boolean;\n specialEffects?: BottomTabsScreenProps['specialEffects'];\n nativeProps?: NativeScreenProps;\n}\n\nexport type SymbolOrImageSource =\n | {\n /**\n * The name of the SF Symbol to use as an icon.\n * @platform iOS\n */\n sf?: SFSymbol;\n /**\n * The name of the drawable resource to use as an icon.\n * @platform android\n */\n drawable?: string;\n }\n | {\n /**\n * The image source to use as an icon.\n */\n src?: ImageSourcePropType | Promise<ImageSourcePropType | null>;\n };\n\ntype NumericFontWeight = 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900;\n\nexport interface NativeTabsLabelStyle {\n /**\n * The font family of the tab label.\n */\n fontFamily?: TextStyle['fontFamily'];\n /**\n * The font size of the tab label.\n */\n fontSize?: TextStyle['fontSize'];\n /**\n * The font weight of the tab label.\n */\n fontWeight?: NumericFontWeight | `${NumericFontWeight}`;\n /**\n * The font style of the tab label.\n */\n fontStyle?: TextStyle['fontStyle'];\n /**\n * The color of the tab label.\n */\n color?: TextStyle['color'];\n}\n\nexport const SUPPORTED_BLUR_EFFECTS = [\n 'none',\n 'systemDefault',\n 'extraLight',\n 'light',\n 'dark',\n 'regular',\n 'prominent',\n 'systemUltraThinMaterial',\n 'systemThinMaterial',\n 'systemMaterial',\n 'systemThickMaterial',\n 'systemChromeMaterial',\n 'systemUltraThinMaterialLight',\n 'systemThinMaterialLight',\n 'systemMaterialLight',\n 'systemThickMaterialLight',\n 'systemChromeMaterialLight',\n 'systemUltraThinMaterialDark',\n 'systemThinMaterialDark',\n 'systemMaterialDark',\n 'systemThickMaterialDark',\n 'systemChromeMaterialDark',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiblureffect/style)\n */\nexport type NativeTabsBlurEffect = (typeof SUPPORTED_BLUR_EFFECTS)[number];\n\n/**\n * @platform android\n * @platform web\n */\nexport interface NativeTabsActiveStyleType {\n /**\n * @platform android\n * @platform web\n */\n color?: ColorValue;\n /**\n * @platform android\n * @platform web\n */\n fontSize?: TextStyle['fontSize'];\n /**\n * @platform android\n */\n iconColor?: ColorValue;\n /**\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n}\n\nexport interface NativeTabsProps extends PropsWithChildren {\n // #region common props\n /**\n * The style of the every tab label in the tab bar.\n */\n labelStyle?:\n | NativeTabsLabelStyle\n | {\n default?: NativeTabsLabelStyle;\n selected?: NativeTabsLabelStyle;\n };\n // disabledLabelStyle?: NativeTabsLabelStyle;\n /**\n * The color of every tab icon in the tab bar.\n */\n iconColor?: ColorValue | { default?: ColorValue; selected?: ColorValue };\n /**\n * The tint color of the tab icon.\n *\n * Can be overridden by icon color and label color for each tab individually.\n */\n tintColor?: ColorValue;\n /**\n * The background color of the tab bar.\n */\n backgroundColor?: ColorValue;\n /**\n * The background color of every badge in the tab bar.\n */\n badgeBackgroundColor?: ColorValue;\n // #endregion common props\n // #region iOS props\n /**\n * Specifies the minimize behavior for the tab bar.\n *\n * Available starting from iOS 26.\n *\n * The following values are currently supported:\n *\n * - `automatic` - resolves to the system default minimize behavior\n * - `never` - the tab bar does not minimize\n * - `onScrollDown` - the tab bar minimizes when scrolling down and\n * expands when scrolling back up\n * - `onScrollUp` - the tab bar minimizes when scrolling up and expands\n * when scrolling back down\n *\n * @see The supported values correspond to the official [UIKit documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior).\n *\n * @default automatic\n *\n * @platform iOS 26+\n */\n minimizeBehavior?: NativeTabsTabBarMinimizeBehavior;\n /**\n * The blur effect applied to the tab bar.\n *\n * @platform iOS\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * The color of the shadow.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uibarappearance/shadowcolor)\n *\n * @platform iOS\n */\n shadowColor?: ColorValue;\n /**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/titlepositionadjustment)\n *\n * @platform iOS\n */\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * When set to `true`, enables the sidebarAdaptable tab bar style on iPadOS and macOS. This prop has no effect on iPhone.\n *\n * @platform iOS 18+\n */\n sidebarAdaptable?: boolean;\n // #endregion iOS props\n // #region android props\n /**\n * Disables the active indicator for the tab bar.\n *\n * @platform android\n */\n disableIndicator?: boolean;\n /**\n * The behavior when navigating back with the back button.\n *\n * @platform android\n */\n backBehavior?: 'none' | 'initialRoute' | 'history';\n /**\n * The visibility mode of the tab item label.\n *\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\n labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;\n /**\n * The color of the ripple effect when the tab is pressed.\n *\n * @platform android\n */\n rippleColor?: ColorValue;\n /**\n * The color of the tab indicator.\n *\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n /**\n * The color of the badge text.\n *\n * @platform android\n * @platform web\n */\n badgeTextColor?: ColorValue;\n // #endregion android props\n}\nexport interface NativeTabsViewProps\n extends Omit<\n NativeTabsProps,\n | 'labelStyle'\n | 'iconColor'\n | 'backgroundColor'\n | 'badgeBackgroundColor'\n | 'blurEffect'\n | 'indicatorColor'\n | 'badgeTextColor'\n > {\n focusedIndex: number;\n tabs: NativeTabsViewTabItem[];\n onTabChange: (tabKey: string) => void;\n}\n\nexport interface NativeTabsViewTabItem {\n options: NativeTabOptions;\n routeKey: string;\n name: string;\n contentRenderer: () => React.ReactNode;\n}\n\nexport const SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES = [\n 'auto',\n 'selected',\n 'labeled',\n 'unlabeled',\n] as const;\n\n/**\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\nexport type NativeTabsTabBarItemLabelVisibilityMode =\n (typeof SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES)[number];\n\nexport const SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS = [\n 'automatic',\n 'never',\n 'onScrollDown',\n 'onScrollUp',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior)\n *\n * @platform iOS 26\n */\nexport type NativeTabsTabBarMinimizeBehavior =\n (typeof SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS)[number];\n\nexport interface NativeTabTriggerProps {\n /**\n * The name of the route.\n *\n * This is required when used inside a Layout component.\n *\n * When used in a route it has no effect.\n */\n name?: string;\n /**\n * If true, the tab will be hidden from the tab bar.\n *\n * > **Note**: Marking a tab as `hidden` means it cannot be navigated to in any way.\n */\n hidden?: boolean;\n /**\n * Props passed to the underlying native tab screen implementation.\n * Use this to configure props not directly exposed by Expo Router, but available in `react-native-screens`.\n *\n * > **Note**: This will override any other props set by Expo Router and may lead to unexpected behavior.\n *\n * > **Note**: This is an unstable API and may change or be removed in minor versions.\n *\n * @platform android\n * @platform iOS\n */\n unstable_nativeProps?: NativeScreenProps;\n /**\n * If true, the tab will not pop stack to the root when selected again.\n *\n * @default false\n * @platform iOS\n */\n disablePopToTop?: boolean;\n /**\n * If true, the tab will not scroll to the top when selected again.\n * @default false\n *\n * @platform iOS\n */\n disableScrollToTop?: boolean;\n /**\n * The children of the trigger.\n *\n * Use `Icon`, `Label`, and `Badge` components to customize the tab.\n */\n children?: React.ReactNode;\n /**\n * System-provided tab bar item with predefined icon and title\n *\n * Uses Apple's built-in tab bar items (e.g., bookmarks, contacts, downloads) with\n * standard iOS styling and localized titles. Custom `icon` or `selectedIcon`\n * properties will override the system icon, but the system-defined title cannot\n * be customized.\n *\n * @see {@link https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem|UITabBarItem.SystemItem}\n * @platform ios\n */\n role?: NativeTabsTabBarItemRole;\n}\n\nconst SUPPORTED_TAB_BAR_ITEM_ROLES = [\n 'bookmarks',\n 'contacts',\n 'downloads',\n 'favorites',\n 'featured',\n 'history',\n 'more',\n 'mostRecent',\n 'mostViewed',\n 'recents',\n 'search',\n 'topRated',\n] as const;\n\nexport type NativeTabsTabBarItemRole = (typeof SUPPORTED_TAB_BAR_ITEM_ROLES)[number];\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { ColorValue, ImageSourcePropType } from 'react-native';
2
- import type { BottomTabsScreenProps } from 'react-native-screens';
2
+ import type { BottomTabsScreenProps, PlatformIconAndroid, PlatformIconIOS } from 'react-native-screens';
3
3
  import type { SFSymbol } from 'sf-symbols-typescript';
4
4
  import type { NativeTabOptions, NativeTabsProps } from '../types';
5
5
  export declare function convertIconColorPropToObject(iconColor: NativeTabsProps['iconColor']): {
@@ -19,7 +19,7 @@ export declare function useAwaitedScreensIcon(icon: NativeTabOptions['icon']): {
19
19
  src?: ImageSourcePropType;
20
20
  } | undefined;
21
21
  export declare function convertOptionsIconToRNScreensPropsIcon(icon: AwaitedIcon | undefined): BottomTabsScreenProps['icon'];
22
- export declare function getRNScreensAndroidIconResourceFromAwaitedIcon(icon: AwaitedIcon | undefined): BottomTabsScreenProps['iconResource'];
23
- export declare function getRNScreensAndroidIconResourceNameFromAwaitedIcon(icon: AwaitedIcon | undefined): BottomTabsScreenProps['iconResourceName'];
22
+ export declare function convertOptionsIconToIOSPropsIcon(icon: AwaitedIcon | undefined): PlatformIconIOS | undefined;
23
+ export declare function convertOptionsIconToAndroidPropsIcon(icon: AwaitedIcon): PlatformIconAndroid | undefined;
24
24
  export {};
25
25
  //# sourceMappingURL=icon.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/utils/icon.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAElE,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,GAAG;IACrF,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,QAAQ,CAAC,EAAE,UAAU,CAAC;CACvB,CAUA;AAED,KAAK,WAAW,GACZ;IACE,EAAE,CAAC,EAAE,QAAQ,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GACD;IACE,GAAG,CAAC,EAAE,mBAAmB,CAAC;CAC3B,CAAC;AAEN,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC;;;;UAHxD,mBAAmB;cAyB9B;AAMD,wBAAgB,sCAAsC,CACpD,IAAI,EAAE,WAAW,GAAG,SAAS,GAC5B,qBAAqB,CAAC,MAAM,CAAC,CAU/B;AAED,wBAAgB,8CAA8C,CAC5D,IAAI,EAAE,WAAW,GAAG,SAAS,GAC5B,qBAAqB,CAAC,cAAc,CAAC,CAKvC;AAED,wBAAgB,kDAAkD,CAChE,IAAI,EAAE,WAAW,GAAG,SAAS,GAC5B,qBAAqB,CAAC,kBAAkB,CAAC,CAK3C"}
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/utils/icon.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAElE,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,eAAe,CAAC,WAAW,CAAC,GAAG;IACrF,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,QAAQ,CAAC,EAAE,UAAU,CAAC;CACvB,CAUA;AAED,KAAK,WAAW,GACZ;IACE,EAAE,CAAC,EAAE,QAAQ,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,GACD;IACE,GAAG,CAAC,EAAE,mBAAmB,CAAC;CAC3B,CAAC;AAEN,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,gBAAgB,CAAC,MAAM,CAAC;;;;UAHxD,mBAAmB;cAyB9B;AAMD,wBAAgB,sCAAsC,CACpD,IAAI,EAAE,WAAW,GAAG,SAAS,GAC5B,qBAAqB,CAAC,MAAM,CAAC,CAQ/B;AAED,wBAAgB,gCAAgC,CAC9C,IAAI,EAAE,WAAW,GAAG,SAAS,GAC5B,eAAe,GAAG,SAAS,CAW7B;AAED,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,WAAW,GAChB,mBAAmB,GAAG,SAAS,CAWjC"}
@@ -3,8 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.convertIconColorPropToObject = convertIconColorPropToObject;
4
4
  exports.useAwaitedScreensIcon = useAwaitedScreensIcon;
5
5
  exports.convertOptionsIconToRNScreensPropsIcon = convertOptionsIconToRNScreensPropsIcon;
6
- exports.getRNScreensAndroidIconResourceFromAwaitedIcon = getRNScreensAndroidIconResourceFromAwaitedIcon;
7
- exports.getRNScreensAndroidIconResourceNameFromAwaitedIcon = getRNScreensAndroidIconResourceNameFromAwaitedIcon;
6
+ exports.convertOptionsIconToIOSPropsIcon = convertOptionsIconToIOSPropsIcon;
7
+ exports.convertOptionsIconToAndroidPropsIcon = convertOptionsIconToAndroidPropsIcon;
8
8
  const react_1 = require("react");
9
9
  function convertIconColorPropToObject(iconColor) {
10
10
  if (iconColor) {
@@ -45,23 +45,32 @@ function convertOptionsIconToRNScreensPropsIcon(icon) {
45
45
  if (!icon) {
46
46
  return undefined;
47
47
  }
48
- if ('sf' in icon && icon.sf) {
49
- return { sfSymbolName: icon.sf };
50
- }
51
- else if ('src' in icon && icon.src) {
52
- return { templateSource: icon.src };
53
- }
54
- return undefined;
48
+ return {
49
+ ios: convertOptionsIconToIOSPropsIcon(icon),
50
+ android: convertOptionsIconToAndroidPropsIcon(icon),
51
+ };
55
52
  }
56
- function getRNScreensAndroidIconResourceFromAwaitedIcon(icon) {
53
+ function convertOptionsIconToIOSPropsIcon(icon) {
54
+ if (icon && 'sf' in icon && icon.sf) {
55
+ return {
56
+ type: 'sfSymbol',
57
+ name: icon.sf,
58
+ };
59
+ }
57
60
  if (icon && 'src' in icon && icon.src) {
58
- return icon.src;
61
+ return { type: 'templateSource', templateSource: icon.src };
59
62
  }
60
63
  return undefined;
61
64
  }
62
- function getRNScreensAndroidIconResourceNameFromAwaitedIcon(icon) {
65
+ function convertOptionsIconToAndroidPropsIcon(icon) {
63
66
  if (icon && 'drawable' in icon && icon.drawable) {
64
- return icon.drawable;
67
+ return {
68
+ type: 'drawableResource',
69
+ name: icon.drawable,
70
+ };
71
+ }
72
+ if (icon && 'src' in icon && icon.src) {
73
+ return { type: 'imageSource', imageSource: icon.src };
65
74
  }
66
75
  return undefined;
67
76
  }
@@ -1 +1 @@
1
- {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/native-tabs/utils/icon.ts"],"names":[],"mappings":";;AAOA,oEAaC;AAWD,sDAsBC;AAMD,wFAYC;AAED,wGAOC;AAED,gHAOC;AAzFD,iCAAqD;AAOrD,SAAgB,4BAA4B,CAAC,SAAuC;IAIlF,IAAI,SAAS,EAAE,CAAC;QACd,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,CAAC,SAAS,IAAI,SAAS,IAAI,UAAU,IAAI,SAAS,CAAC,EAAE,CAAC;YACzF,OAAO,SAAS,CAAC;QACnB,CAAC;QACD,OAAO;YACL,OAAO,EAAE,SAAuB;SACjC,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,CAAC;AACZ,CAAC;AAWD,SAAgB,qBAAqB,CAAC,IAA8B;IAClE,MAAM,GAAG,GAAG,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,KAAK,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,CAAC;IACrF,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAA0B,SAAS,CAAC,CAAC;IAEnF,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,MAAM,QAAQ,GAAG,KAAK,IAAI,EAAE;YAC1B,IAAI,GAAG,IAAI,GAAG,YAAY,OAAO,EAAE,CAAC;gBAClC,MAAM,UAAU,GAAG,MAAM,GAAG,CAAC;gBAC7B,IAAI,UAAU,EAAE,CAAC;oBACf,MAAM,kBAAkB,GAAG,EAAE,GAAG,EAAE,UAAU,EAAE,CAAC;oBAC/C,cAAc,CAAC,kBAAkB,CAAC,CAAC;gBACrC,CAAC;YACH,CAAC;QACH,CAAC,CAAC;QACF,QAAQ,EAAE,CAAC;QACX,wEAAwE;QACxE,mEAAmE;QACnE,kGAAkG;QAClG,8CAA8C;IAChD,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAEV,OAAO,IAAA,eAAO,EAAC,GAAG,EAAE,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,WAAW,CAAC,EAAE,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC;AACxF,CAAC;AAED,SAAS,aAAa,CAAC,IAA8B;IACnD,OAAO,CAAC,IAAI,IAAI,CAAC,CAAC,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,YAAY,OAAO,CAAC,CAAC;AAClE,CAAC;AAED,SAAgB,sCAAsC,CACpD,IAA6B;IAE7B,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,IAAI,IAAI,IAAI,IAAI,IAAI,CAAC,EAAE,EAAE,CAAC;QAC5B,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;IACnC,CAAC;SAAM,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACrC,OAAO,EAAE,cAAc,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;IACtC,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB,8CAA8C,CAC5D,IAA6B;IAE7B,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACtC,OAAO,IAAI,CAAC,GAAG,CAAC;IAClB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB,kDAAkD,CAChE,IAA6B;IAE7B,IAAI,IAAI,IAAI,UAAU,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChD,OAAO,IAAI,CAAC,QAAQ,CAAC;IACvB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import { useEffect, useMemo, useState } from 'react';\nimport type { ColorValue, ImageSourcePropType } from 'react-native';\nimport type { BottomTabsScreenProps } from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nimport type { NativeTabOptions, NativeTabsProps } from '../types';\n\nexport function convertIconColorPropToObject(iconColor: NativeTabsProps['iconColor']): {\n default?: ColorValue;\n selected?: ColorValue;\n} {\n if (iconColor) {\n if (typeof iconColor === 'object' && ('default' in iconColor || 'selected' in iconColor)) {\n return iconColor;\n }\n return {\n default: iconColor as ColorValue,\n };\n }\n return {};\n}\n\ntype AwaitedIcon =\n | {\n sf?: SFSymbol;\n drawable?: string;\n }\n | {\n src?: ImageSourcePropType;\n };\n\nexport function useAwaitedScreensIcon(icon: NativeTabOptions['icon']) {\n const src = icon && typeof icon === 'object' && 'src' in icon ? icon.src : undefined;\n const [awaitedIcon, setAwaitedIcon] = useState<AwaitedIcon | undefined>(undefined);\n\n useEffect(() => {\n const loadIcon = async () => {\n if (src && src instanceof Promise) {\n const awaitedSrc = await src;\n if (awaitedSrc) {\n const currentAwaitedIcon = { src: awaitedSrc };\n setAwaitedIcon(currentAwaitedIcon);\n }\n }\n };\n loadIcon();\n // Checking `src` rather then icon here, to avoid unnecessary re-renders\n // The icon object can be recreated, while src should stay the same\n // In this case as we control `VectorIcon`, it will only change if `family` or `name` props change\n // So we should be safe with promise resolving\n }, [src]);\n\n return useMemo(() => (isAwaitedIcon(icon) ? icon : awaitedIcon), [awaitedIcon, icon]);\n}\n\nfunction isAwaitedIcon(icon: NativeTabOptions['icon']): icon is AwaitedIcon {\n return !icon || !('src' in icon && icon.src instanceof Promise);\n}\n\nexport function convertOptionsIconToRNScreensPropsIcon(\n icon: AwaitedIcon | undefined\n): BottomTabsScreenProps['icon'] {\n if (!icon) {\n return undefined;\n }\n if ('sf' in icon && icon.sf) {\n return { sfSymbolName: icon.sf };\n } else if ('src' in icon && icon.src) {\n return { templateSource: icon.src };\n }\n return undefined;\n}\n\nexport function getRNScreensAndroidIconResourceFromAwaitedIcon(\n icon: AwaitedIcon | undefined\n): BottomTabsScreenProps['iconResource'] {\n if (icon && 'src' in icon && icon.src) {\n return icon.src;\n }\n return undefined;\n}\n\nexport function getRNScreensAndroidIconResourceNameFromAwaitedIcon(\n icon: AwaitedIcon | undefined\n): BottomTabsScreenProps['iconResourceName'] {\n if (icon && 'drawable' in icon && icon.drawable) {\n return icon.drawable;\n }\n return undefined;\n}\n"]}
1
+ {"version":3,"file":"icon.js","sourceRoot":"","sources":["../../../src/native-tabs/utils/icon.ts"],"names":[],"mappings":"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","sourcesContent":["import { useEffect, useMemo, useState } from 'react';\nimport type { ColorValue, ImageSourcePropType } from 'react-native';\nimport type {\n BottomTabsScreenProps,\n PlatformIconAndroid,\n PlatformIconIOS,\n} from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nimport type { NativeTabOptions, NativeTabsProps } from '../types';\n\nexport function convertIconColorPropToObject(iconColor: NativeTabsProps['iconColor']): {\n default?: ColorValue;\n selected?: ColorValue;\n} {\n if (iconColor) {\n if (typeof iconColor === 'object' && ('default' in iconColor || 'selected' in iconColor)) {\n return iconColor;\n }\n return {\n default: iconColor as ColorValue,\n };\n }\n return {};\n}\n\ntype AwaitedIcon =\n | {\n sf?: SFSymbol;\n drawable?: string;\n }\n | {\n src?: ImageSourcePropType;\n };\n\nexport function useAwaitedScreensIcon(icon: NativeTabOptions['icon']) {\n const src = icon && typeof icon === 'object' && 'src' in icon ? icon.src : undefined;\n const [awaitedIcon, setAwaitedIcon] = useState<AwaitedIcon | undefined>(undefined);\n\n useEffect(() => {\n const loadIcon = async () => {\n if (src && src instanceof Promise) {\n const awaitedSrc = await src;\n if (awaitedSrc) {\n const currentAwaitedIcon = { src: awaitedSrc };\n setAwaitedIcon(currentAwaitedIcon);\n }\n }\n };\n loadIcon();\n // Checking `src` rather then icon here, to avoid unnecessary re-renders\n // The icon object can be recreated, while src should stay the same\n // In this case as we control `VectorIcon`, it will only change if `family` or `name` props change\n // So we should be safe with promise resolving\n }, [src]);\n\n return useMemo(() => (isAwaitedIcon(icon) ? icon : awaitedIcon), [awaitedIcon, icon]);\n}\n\nfunction isAwaitedIcon(icon: NativeTabOptions['icon']): icon is AwaitedIcon {\n return !icon || !('src' in icon && icon.src instanceof Promise);\n}\n\nexport function convertOptionsIconToRNScreensPropsIcon(\n icon: AwaitedIcon | undefined\n): BottomTabsScreenProps['icon'] {\n if (!icon) {\n return undefined;\n }\n return {\n ios: convertOptionsIconToIOSPropsIcon(icon),\n android: convertOptionsIconToAndroidPropsIcon(icon),\n };\n}\n\nexport function convertOptionsIconToIOSPropsIcon(\n icon: AwaitedIcon | undefined\n): PlatformIconIOS | undefined {\n if (icon && 'sf' in icon && icon.sf) {\n return {\n type: 'sfSymbol',\n name: icon.sf,\n };\n }\n if (icon && 'src' in icon && icon.src) {\n return { type: 'templateSource', templateSource: icon.src };\n }\n return undefined;\n}\n\nexport function convertOptionsIconToAndroidPropsIcon(\n icon: AwaitedIcon\n): PlatformIconAndroid | undefined {\n if (icon && 'drawable' in icon && icon.drawable) {\n return {\n type: 'drawableResource',\n name: icon.drawable,\n };\n }\n if (icon && 'src' in icon && icon.src) {\n return { type: 'imageSource', imageSource: icon.src };\n }\n return undefined;\n}\n"]}
@@ -0,0 +1,18 @@
1
+ import type { BadgeProps, IconProps, LabelProps, VectorIconProps } from './types';
2
+ export declare function Badge(props: BadgeProps): null;
3
+ export declare function Icon(props: IconProps): null;
4
+ /**
5
+ * Helper component which can be used to load vector icons.
6
+ *
7
+ * @example
8
+ * ```tsx
9
+ * import { Icon, VectorIcon } from 'expo-router';
10
+ * import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
11
+ *
12
+ * <Icon src={<VectorIcon family={MaterialCommunityIcons} name="home" />} />
13
+ *
14
+ * ```
15
+ */
16
+ export declare function VectorIcon<const NameT extends string>(props: VectorIconProps<NameT>): null;
17
+ export declare function Label(props: LabelProps): null;
18
+ //# sourceMappingURL=elements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../src/primitives/elements.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAElF,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,QAEtC;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,QAEpC;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,UAAU,CAAC,KAAK,CAAC,KAAK,SAAS,MAAM,EAAE,KAAK,EAAE,eAAe,CAAC,KAAK,CAAC,QAEnF;AAED,wBAAgB,KAAK,CAAC,KAAK,EAAE,UAAU,QAEtC"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Badge = Badge;
4
+ exports.Icon = Icon;
5
+ exports.VectorIcon = VectorIcon;
6
+ exports.Label = Label;
7
+ function Badge(props) {
8
+ return null;
9
+ }
10
+ function Icon(props) {
11
+ return null;
12
+ }
13
+ /**
14
+ * Helper component which can be used to load vector icons.
15
+ *
16
+ * @example
17
+ * ```tsx
18
+ * import { Icon, VectorIcon } from 'expo-router';
19
+ * import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
20
+ *
21
+ * <Icon src={<VectorIcon family={MaterialCommunityIcons} name="home" />} />
22
+ *
23
+ * ```
24
+ */
25
+ function VectorIcon(props) {
26
+ return null;
27
+ }
28
+ function Label(props) {
29
+ return null;
30
+ }
31
+ //# sourceMappingURL=elements.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/primitives/elements.tsx"],"names":[],"mappings":";;AAEA,sBAEC;AAED,oBAEC;AAcD,gCAEC;AAED,sBAEC;AA1BD,SAAgB,KAAK,CAAC,KAAiB;IACrC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,IAAI,CAAC,KAAgB;IACnC,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,UAAU,CAA6B,KAA6B;IAClF,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,KAAK,CAAC,KAAiB;IACrC,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { BadgeProps, IconProps, LabelProps, VectorIconProps } from './types';\n\nexport function Badge(props: BadgeProps) {\n return null;\n}\n\nexport function Icon(props: IconProps) {\n return null;\n}\n\n/**\n * Helper component which can be used to load vector icons.\n *\n * @example\n * ```tsx\n * import { Icon, VectorIcon } from 'expo-router';\n * import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';\n *\n * <Icon src={<VectorIcon family={MaterialCommunityIcons} name=\"home\" />} />\n *\n * ```\n */\nexport function VectorIcon<const NameT extends string>(props: VectorIconProps<NameT>) {\n return null;\n}\n\nexport function Label(props: LabelProps) {\n return null;\n}\n"]}
@@ -0,0 +1,5 @@
1
+ export { Screen, Group } from './navigation';
2
+ export * from './types';
3
+ export * from './elements';
4
+ export { Menu, MenuAction } from './menu';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/primitives/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAC7C,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.MenuAction = exports.Menu = exports.Group = exports.Screen = void 0;
18
+ var navigation_1 = require("./navigation");
19
+ Object.defineProperty(exports, "Screen", { enumerable: true, get: function () { return navigation_1.Screen; } });
20
+ Object.defineProperty(exports, "Group", { enumerable: true, get: function () { return navigation_1.Group; } });
21
+ __exportStar(require("./types"), exports);
22
+ __exportStar(require("./elements"), exports);
23
+ var menu_1 = require("./menu");
24
+ Object.defineProperty(exports, "Menu", { enumerable: true, get: function () { return menu_1.Menu; } });
25
+ Object.defineProperty(exports, "MenuAction", { enumerable: true, get: function () { return menu_1.MenuAction; } });
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/primitives/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAA6C;AAApC,oGAAA,MAAM,OAAA;AAAE,mGAAA,KAAK,OAAA;AACtB,0CAAwB;AACxB,6CAA2B;AAC3B,+BAA0C;AAAjC,4FAAA,IAAI,OAAA;AAAE,kGAAA,UAAU,OAAA","sourcesContent":["export { Screen, Group } from './navigation';\nexport * from './types';\nexport * from './elements';\nexport { Menu, MenuAction } from './menu';\n"]}
@@ -0,0 +1,12 @@
1
+ import type { MenuActionProps, MenuProps } from './types';
2
+ /**
3
+ * This component renders a context menu action for a link.
4
+ * It should only be used as a child of `Link.Menu` or `LinkMenu`.
5
+ *
6
+ * > **Note**: You can use the alias `Link.MenuAction` for this component.
7
+ *
8
+ * @platform ios
9
+ */
10
+ export declare function MenuAction(props: MenuActionProps): null;
11
+ export declare function Menu(props: MenuProps): null;
12
+ //# sourceMappingURL=menu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.d.ts","sourceRoot":"","sources":["../../src/primitives/menu.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAG1D;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,QAOhD;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,QAKpC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ 'use client';
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.MenuAction = MenuAction;
5
+ exports.Menu = Menu;
6
+ const react_1 = require("react");
7
+ const InternalLinkPreviewContext_1 = require("../link/InternalLinkPreviewContext");
8
+ /**
9
+ * This component renders a context menu action for a link.
10
+ * It should only be used as a child of `Link.Menu` or `LinkMenu`.
11
+ *
12
+ * > **Note**: You can use the alias `Link.MenuAction` for this component.
13
+ *
14
+ * @platform ios
15
+ */
16
+ function MenuAction(props) {
17
+ if ((0, react_1.use)(InternalLinkPreviewContext_1.InternalLinkPreviewContext)) {
18
+ console.warn('<MenuAction> is currently not supported inside Link. Use Link.MenuAction instead.');
19
+ }
20
+ return null;
21
+ }
22
+ function Menu(props) {
23
+ if ((0, react_1.use)(InternalLinkPreviewContext_1.InternalLinkPreviewContext)) {
24
+ console.warn('Menu is currently not supported inside Link. Use Link.Menu instead.');
25
+ }
26
+ return null;
27
+ }
28
+ //# sourceMappingURL=menu.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"menu.js","sourceRoot":"","sources":["../../src/primitives/menu.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAeb,gCAOC;AAED,oBAKC;AA3BD,iCAA4B;AAG5B,mFAAgF;AAEhF;;;;;;;GAOG;AACH,SAAgB,UAAU,CAAC,KAAsB;IAC/C,IAAI,IAAA,WAAG,EAAC,uDAA0B,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,IAAI,CACV,mFAAmF,CACpF,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,IAAI,CAAC,KAAgB;IACnC,IAAI,IAAA,WAAG,EAAC,uDAA0B,CAAC,EAAE,CAAC;QACpC,OAAO,CAAC,IAAI,CAAC,qEAAqE,CAAC,CAAC;IACtF,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["'use client';\n\nimport { use } from 'react';\n\nimport type { MenuActionProps, MenuProps } from './types';\nimport { InternalLinkPreviewContext } from '../link/InternalLinkPreviewContext';\n\n/**\n * This component renders a context menu action for a link.\n * It should only be used as a child of `Link.Menu` or `LinkMenu`.\n *\n * > **Note**: You can use the alias `Link.MenuAction` for this component.\n *\n * @platform ios\n */\nexport function MenuAction(props: MenuActionProps) {\n if (use(InternalLinkPreviewContext)) {\n console.warn(\n '<MenuAction> is currently not supported inside Link. Use Link.MenuAction instead.'\n );\n }\n return null;\n}\n\nexport function Menu(props: MenuProps) {\n if (use(InternalLinkPreviewContext)) {\n console.warn('Menu is currently not supported inside Link. Use Link.Menu instead.');\n }\n return null;\n}\n"]}
@@ -1,2 +1,2 @@
1
1
  export declare const Screen: any, Group: any;
2
- //# sourceMappingURL=primitives.d.ts.map
2
+ //# sourceMappingURL=navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../src/primitives/navigation.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAQ,MAAM,OAAE,KAAK,KAAwC,CAAC"}
@@ -7,4 +7,4 @@ const native_1 = require("@react-navigation/native");
7
7
  // `@react-navigation/native` does not expose the Screen or Group components directly, so we have to
8
8
  // do this hack.
9
9
  _a = (0, native_1.createNavigatorFactory)({})(), exports.Screen = _a.Screen, exports.Group = _a.Group;
10
- //# sourceMappingURL=primitives.js.map
10
+ //# sourceMappingURL=navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.js","sourceRoot":"","sources":["../../src/primitives/navigation.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;AAEb,qDAAkE;AAElE,oGAAoG;AACpG,gBAAgB;AACH,KAAoB,IAAA,+BAAsB,EAAC,EAAS,CAAC,EAAE,EAArD,cAAM,cAAE,aAAK,YAAyC","sourcesContent":["'use client';\n\nimport { createNavigatorFactory } from '@react-navigation/native';\n\n// `@react-navigation/native` does not expose the Screen or Group components directly, so we have to\n// do this hack.\nexport const { Screen, Group } = createNavigatorFactory({} as any)();\n"]}
@@ -0,0 +1,26 @@
1
+ import type { ColorValue, ImageSourcePropType } from 'react-native';
2
+ import type { LinkMenuActionProps, LinkMenuProps } from '../link/elements';
3
+ import type { NativeTabsTriggerBadgeProps, NativeTabsTriggerIconProps, NativeTabsTriggerLabelProps } from '../native-tabs';
4
+ export type BadgeProps = NativeTabsTriggerBadgeProps;
5
+ export type IconProps = NativeTabsTriggerIconProps;
6
+ export interface VectorIconProps<NameT extends string> {
7
+ /**
8
+ * The family of the vector icon.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
13
+ * ```
14
+ */
15
+ family: {
16
+ getImageSource: (name: NameT, size: number, color: ColorValue) => Promise<ImageSourcePropType | null>;
17
+ };
18
+ /**
19
+ * The name of the vector icon.
20
+ */
21
+ name: NameT;
22
+ }
23
+ export type LabelProps = NativeTabsTriggerLabelProps;
24
+ export type MenuActionProps = LinkMenuActionProps;
25
+ export type MenuProps = LinkMenuProps;
26
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/primitives/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAEpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,KAAK,EACV,2BAA2B,EAC3B,0BAA0B,EAC1B,2BAA2B,EAC5B,MAAM,gBAAgB,CAAC;AAExB,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC;AAErD,MAAM,MAAM,SAAS,GAAG,0BAA0B,CAAC;AAEnD,MAAM,WAAW,eAAe,CAAC,KAAK,SAAS,MAAM;IACnD;;;;;;;OAOG;IACH,MAAM,EAAE;QACN,cAAc,EAAE,CACd,IAAI,EAAE,KAAK,EACX,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,UAAU,KACd,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;KAC1C,CAAC;IACF;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;CACb;AAED,MAAM,MAAM,UAAU,GAAG,2BAA2B,CAAC;AAErD,MAAM,MAAM,eAAe,GAAG,mBAAmB,CAAC;AAElD,MAAM,MAAM,SAAS,GAAG,aAAa,CAAC"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/primitives/types.ts"],"names":[],"mappings":"","sourcesContent":["import type { ColorValue, ImageSourcePropType } from 'react-native';\n\nimport type { LinkMenuActionProps, LinkMenuProps } from '../link/elements';\nimport type {\n NativeTabsTriggerBadgeProps,\n NativeTabsTriggerIconProps,\n NativeTabsTriggerLabelProps,\n} from '../native-tabs';\n\nexport type BadgeProps = NativeTabsTriggerBadgeProps;\n\nexport type IconProps = NativeTabsTriggerIconProps;\n\nexport interface VectorIconProps<NameT extends string> {\n /**\n * The family of the vector icon.\n *\n * @example\n * ```tsx\n * import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';\n * ```\n */\n family: {\n getImageSource: (\n name: NameT,\n size: number,\n color: ColorValue\n ) => Promise<ImageSourcePropType | null>;\n };\n /**\n * The name of the vector icon.\n */\n name: NameT;\n}\n\nexport type LabelProps = NativeTabsTriggerLabelProps;\n\nexport type MenuActionProps = LinkMenuActionProps;\n\nexport type MenuProps = LinkMenuProps;\n"]}
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SplitViewColumn = SplitViewColumn;
4
4
  exports.SplitViewInspector = SplitViewInspector;
5
5
  const react_native_safe_area_context_1 = require("react-native-safe-area-context");
6
- const react_native_screens_1 = require("react-native-screens");
6
+ const experimental_1 = require("react-native-screens/experimental");
7
7
  function SplitViewColumn(props) {
8
- return (<react_native_screens_1.SplitViewScreen.Column>
8
+ return (<experimental_1.SplitViewScreen.Column>
9
9
  <react_native_safe_area_context_1.SafeAreaProvider>{props.children}</react_native_safe_area_context_1.SafeAreaProvider>
10
- </react_native_screens_1.SplitViewScreen.Column>);
10
+ </experimental_1.SplitViewScreen.Column>);
11
11
  }
12
12
  function SplitViewInspector(props) {
13
- return <react_native_screens_1.SplitViewScreen.Inspector>{props.children}</react_native_screens_1.SplitViewScreen.Inspector>;
13
+ return <experimental_1.SplitViewScreen.Inspector>{props.children}</experimental_1.SplitViewScreen.Inspector>;
14
14
  }
15
15
  //# sourceMappingURL=elements.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/split-view/elements.tsx"],"names":[],"mappings":";;AAOA,0CAMC;AAMD,gDAEC;AArBD,mFAAkE;AAClE,+DAAuD;AAMvD,SAAgB,eAAe,CAAC,KAA2B;IACzD,OAAO,CACL,CAAC,sCAAe,CAAC,MAAM,CACrB;MAAA,CAAC,iDAAgB,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,iDAAgB,CACtD;IAAA,EAAE,sCAAe,CAAC,MAAM,CAAC,CAC1B,CAAC;AACJ,CAAC;AAMD,SAAgB,kBAAkB,CAAC,KAA2B;IAC5D,OAAO,CAAC,sCAAe,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,sCAAe,CAAC,SAAS,CAAC,CAAC;AACjF,CAAC","sourcesContent":["import { SafeAreaProvider } from 'react-native-safe-area-context';\nimport { SplitViewScreen } from 'react-native-screens';\n\ninterface SplitViewColumnProps {\n children?: React.ReactNode;\n}\n\nexport function SplitViewColumn(props: SplitViewColumnProps) {\n return (\n <SplitViewScreen.Column>\n <SafeAreaProvider>{props.children}</SafeAreaProvider>\n </SplitViewScreen.Column>\n );\n}\n\ninterface SplitViewColumnProps {\n children?: React.ReactNode;\n}\n\nexport function SplitViewInspector(props: SplitViewColumnProps) {\n return <SplitViewScreen.Inspector>{props.children}</SplitViewScreen.Inspector>;\n}\n"]}
1
+ {"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/split-view/elements.tsx"],"names":[],"mappings":";;AAOA,0CAMC;AAMD,gDAEC;AArBD,mFAAkE;AAClE,oEAAoE;AAMpE,SAAgB,eAAe,CAAC,KAA2B;IACzD,OAAO,CACL,CAAC,8BAAe,CAAC,MAAM,CACrB;MAAA,CAAC,iDAAgB,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,iDAAgB,CACtD;IAAA,EAAE,8BAAe,CAAC,MAAM,CAAC,CAC1B,CAAC;AACJ,CAAC;AAMD,SAAgB,kBAAkB,CAAC,KAA2B;IAC5D,OAAO,CAAC,8BAAe,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,8BAAe,CAAC,SAAS,CAAC,CAAC;AACjF,CAAC","sourcesContent":["import { SafeAreaProvider } from 'react-native-safe-area-context';\nimport { SplitViewScreen } from 'react-native-screens/experimental';\n\ninterface SplitViewColumnProps {\n children?: React.ReactNode;\n}\n\nexport function SplitViewColumn(props: SplitViewColumnProps) {\n return (\n <SplitViewScreen.Column>\n <SafeAreaProvider>{props.children}</SafeAreaProvider>\n </SplitViewScreen.Column>\n );\n}\n\ninterface SplitViewColumnProps {\n children?: React.ReactNode;\n}\n\nexport function SplitViewInspector(props: SplitViewColumnProps) {\n return <SplitViewScreen.Inspector>{props.children}</SplitViewScreen.Inspector>;\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import React, { type ReactNode } from 'react';
2
- import { type SplitViewHostProps } from 'react-native-screens';
2
+ import { type SplitViewHostProps } from 'react-native-screens/experimental';
3
3
  import { SplitViewColumn, SplitViewInspector } from './elements';
4
4
  export interface SplitViewProps extends Omit<SplitViewHostProps, 'children'> {
5
5
  children?: ReactNode;
@@ -1 +1 @@
1
- {"version":3,"file":"split-view.d.ts","sourceRoot":"","sources":["../../src/split-view/split-view.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAClF,OAAO,EAAkC,KAAK,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/F,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMjE,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;IAC1E,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,kBAAkB,EAAE,EAAE,cAAc,qBAgE9E;AAED,eAAO,MAAM,SAAS;;;CAGpB,CAAC"}
1
+ {"version":3,"file":"split-view.d.ts","sourceRoot":"","sources":["../../src/split-view/split-view.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAClF,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMjE,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;IAC1E,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,kBAAkB,EAAE,EAAE,cAAc,qBAgE9E;AAED,eAAO,MAAM,SAAS;;;CAGpB,CAAC"}
@@ -39,7 +39,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
39
39
  exports.SplitView = void 0;
40
40
  const expo_constants_1 = __importDefault(require("expo-constants"));
41
41
  const react_1 = __importStar(require("react"));
42
- const react_native_screens_1 = require("react-native-screens");
42
+ const experimental_1 = require("react-native-screens/experimental");
43
43
  const elements_1 = require("./elements");
44
44
  const IsWithinLayoutContext_1 = require("../layouts/IsWithinLayoutContext");
45
45
  const Navigator_1 = require("../views/Navigator");
@@ -78,13 +78,13 @@ function SplitViewNavigator({ children, ...splitViewHostProps }) {
78
78
  return <Navigator_1.Slot />;
79
79
  }
80
80
  // The key is needed, because number of columns cannot be changed dynamically
81
- return (<react_native_screens_1.SplitViewHost key={numberOfSidebars + numberOfInspectors} {...splitViewHostProps}>
81
+ return (<experimental_1.SplitViewHost key={numberOfSidebars + numberOfInspectors} {...splitViewHostProps}>
82
82
  {columnChildren}
83
- <react_native_screens_1.SplitViewScreen.Column>
83
+ <experimental_1.SplitViewScreen.Column>
84
84
  <WrappedSlot />
85
- </react_native_screens_1.SplitViewScreen.Column>
85
+ </experimental_1.SplitViewScreen.Column>
86
86
  {inspectorChildren}
87
- </react_native_screens_1.SplitViewHost>);
87
+ </experimental_1.SplitViewHost>);
88
88
  }
89
89
  exports.SplitView = Object.assign(SplitViewNavigator, {
90
90
  Column: elements_1.SplitViewColumn,
@@ -1 +1 @@
1
- {"version":3,"file":"split-view.js","sourceRoot":"","sources":["../../src/split-view/split-view.tsx"],"names":[],"mappings":"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","sourcesContent":["import Constants from 'expo-constants';\nimport React, { createContext, isValidElement, use, type ReactNode } from 'react';\nimport { SplitViewHost, SplitViewScreen, type SplitViewHostProps } from 'react-native-screens';\n\nimport { SplitViewColumn, SplitViewInspector } from './elements';\nimport { IsWithinLayoutContext } from '../layouts/IsWithinLayoutContext';\nimport { Slot } from '../views/Navigator';\n\nconst IsWithinSplitViewContext = createContext(false);\n\nexport interface SplitViewProps extends Omit<SplitViewHostProps, 'children'> {\n children?: ReactNode;\n}\n\nfunction SplitViewNavigator({ children, ...splitViewHostProps }: SplitViewProps) {\n if (use(IsWithinSplitViewContext)) {\n throw new Error('There can only be one SplitView in the navigation hierarchy.');\n }\n\n // TODO: Add better way of detecting if SplitView is rendered inside Native navigator.\n if (use(IsWithinLayoutContext)) {\n throw new Error('SplitView cannot be used inside another navigator, except for Slot.');\n }\n\n if (!Constants.expoConfig?.extra?.router?.unstable_splitView) {\n throw new Error(\n 'SplitView is not enabled. Make sure to enable it in your expo-router configuration with \"unstable_splitView\": true. After enabling, make sure to prebuild your app.'\n );\n }\n\n if (process.env.EXPO_OS !== 'ios') {\n console.warn(\n 'SplitView is only supported on iOS. The SplitView will behave like a Slot navigator on other platforms.'\n );\n return <Slot />;\n }\n\n const WrappedSlot = () => (\n <IsWithinLayoutContext value>\n <Slot />\n </IsWithinLayoutContext>\n );\n\n const allChildrenArray = React.Children.toArray(children);\n const columnChildren = allChildrenArray.filter(\n (child) => isValidElement(child) && child.type === SplitViewColumn\n );\n const inspectorChildren = allChildrenArray.filter(\n (child) => isValidElement(child) && child.type === SplitViewInspector\n );\n const numberOfSidebars = columnChildren.length;\n const numberOfInspectors = inspectorChildren.length;\n\n if (allChildrenArray.length !== columnChildren.length + inspectorChildren.length) {\n console.warn(\n 'Only SplitView.Column and SplitView.Inspector components are allowed as direct children of SplitView.'\n );\n }\n\n if (numberOfSidebars > 2) {\n throw new Error('There can only be two SplitView.Column in the SplitView.');\n }\n\n if (numberOfSidebars + numberOfInspectors === 0) {\n console.warn('No SplitView.Column and SplitView.Inspector found in SplitView.');\n return <Slot />;\n }\n\n // The key is needed, because number of columns cannot be changed dynamically\n return (\n <SplitViewHost key={numberOfSidebars + numberOfInspectors} {...splitViewHostProps}>\n {columnChildren}\n <SplitViewScreen.Column>\n <WrappedSlot />\n </SplitViewScreen.Column>\n {inspectorChildren}\n </SplitViewHost>\n );\n}\n\nexport const SplitView = Object.assign(SplitViewNavigator, {\n Column: SplitViewColumn,\n Inspector: SplitViewInspector,\n});\n"]}
1
+ {"version":3,"file":"split-view.js","sourceRoot":"","sources":["../../src/split-view/split-view.tsx"],"names":[],"mappings":"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","sourcesContent":["import Constants from 'expo-constants';\nimport React, { createContext, isValidElement, use, type ReactNode } from 'react';\nimport {\n SplitViewHost,\n SplitViewScreen,\n type SplitViewHostProps,\n} from 'react-native-screens/experimental';\n\nimport { SplitViewColumn, SplitViewInspector } from './elements';\nimport { IsWithinLayoutContext } from '../layouts/IsWithinLayoutContext';\nimport { Slot } from '../views/Navigator';\n\nconst IsWithinSplitViewContext = createContext(false);\n\nexport interface SplitViewProps extends Omit<SplitViewHostProps, 'children'> {\n children?: ReactNode;\n}\n\nfunction SplitViewNavigator({ children, ...splitViewHostProps }: SplitViewProps) {\n if (use(IsWithinSplitViewContext)) {\n throw new Error('There can only be one SplitView in the navigation hierarchy.');\n }\n\n // TODO: Add better way of detecting if SplitView is rendered inside Native navigator.\n if (use(IsWithinLayoutContext)) {\n throw new Error('SplitView cannot be used inside another navigator, except for Slot.');\n }\n\n if (!Constants.expoConfig?.extra?.router?.unstable_splitView) {\n throw new Error(\n 'SplitView is not enabled. Make sure to enable it in your expo-router configuration with \"unstable_splitView\": true. After enabling, make sure to prebuild your app.'\n );\n }\n\n if (process.env.EXPO_OS !== 'ios') {\n console.warn(\n 'SplitView is only supported on iOS. The SplitView will behave like a Slot navigator on other platforms.'\n );\n return <Slot />;\n }\n\n const WrappedSlot = () => (\n <IsWithinLayoutContext value>\n <Slot />\n </IsWithinLayoutContext>\n );\n\n const allChildrenArray = React.Children.toArray(children);\n const columnChildren = allChildrenArray.filter(\n (child) => isValidElement(child) && child.type === SplitViewColumn\n );\n const inspectorChildren = allChildrenArray.filter(\n (child) => isValidElement(child) && child.type === SplitViewInspector\n );\n const numberOfSidebars = columnChildren.length;\n const numberOfInspectors = inspectorChildren.length;\n\n if (allChildrenArray.length !== columnChildren.length + inspectorChildren.length) {\n console.warn(\n 'Only SplitView.Column and SplitView.Inspector components are allowed as direct children of SplitView.'\n );\n }\n\n if (numberOfSidebars > 2) {\n throw new Error('There can only be two SplitView.Column in the SplitView.');\n }\n\n if (numberOfSidebars + numberOfInspectors === 0) {\n console.warn('No SplitView.Column and SplitView.Inspector found in SplitView.');\n return <Slot />;\n }\n\n // The key is needed, because number of columns cannot be changed dynamically\n return (\n <SplitViewHost key={numberOfSidebars + numberOfInspectors} {...splitViewHostProps}>\n {columnChildren}\n <SplitViewScreen.Column>\n <WrappedSlot />\n </SplitViewScreen.Column>\n {inspectorChildren}\n </SplitViewHost>\n );\n}\n\nexport const SplitView = Object.assign(SplitViewNavigator, {\n Column: SplitViewColumn,\n Inspector: SplitViewInspector,\n});\n"]}
@@ -1,7 +1,16 @@
1
1
  {
2
- "platforms": ["apple", "web"],
2
+ "platforms": ["apple", "android", "web"],
3
3
  "apple": {
4
4
  "modules": ["ExpoHeadModule", "LinkPreviewNativeModule"],
5
5
  "appDelegateSubscribers": ["ExpoHeadAppDelegateSubscriber"]
6
+ },
7
+ "android": {
8
+ "modules": ["expo.modules.router.ExpoRouterModule"],
9
+ "publication": {
10
+ "groupId": "expo.modules.router",
11
+ "artifactId": "expo.modules.router",
12
+ "version": "7.0.0-canary-20251118-4ca99d5",
13
+ "repository": "local-maven-repo"
14
+ }
6
15
  }
7
16
  }
@@ -11,7 +11,7 @@ if new_arch_enabled
11
11
  end
12
12
 
13
13
  Pod::Spec.new do |s|
14
- s.name = 'ExpoHead'
14
+ s.name = 'ExpoRouter'
15
15
  s.version = package['version']
16
16
  s.summary = package['description']
17
17
  s.description = package['description']
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-router",
3
- "version": "7.0.0-canary-20251031-b135dff",
3
+ "version": "7.0.0-canary-20251118-4ca99d5",
4
4
  "description": "Expo Router is a file-based router for React Native and web applications.",
5
5
  "author": "650 Industries, Inc.",
6
6
  "license": "MIT",
@@ -79,13 +79,13 @@
79
79
  "expo"
80
80
  ],
81
81
  "peerDependencies": {
82
- "@expo/metro-runtime": "6.2.0-canary-20251031-b135dff",
83
- "@expo/log-box": "0.0.13-canary-20251031-b135dff",
84
- "@react-navigation/drawer": "^7.5.0",
82
+ "@expo/metro-runtime": "6.2.0-canary-20251118-4ca99d5",
83
+ "@expo/log-box": "0.0.13-canary-20251118-4ca99d5",
84
+ "@react-navigation/drawer": "^7.7.2",
85
85
  "@testing-library/react-native": ">= 12.0.0",
86
- "expo": "55.0.0-canary-20251031-b135dff",
87
- "expo-constants": "18.1.0-canary-20251031-b135dff",
88
- "expo-linking": "8.0.9-canary-20251031-b135dff",
86
+ "expo": "55.0.0-canary-20251118-4ca99d5",
87
+ "expo-constants": "18.1.0-canary-20251118-4ca99d5",
88
+ "expo-linking": "8.0.10-canary-20251118-4ca99d5",
89
89
  "react": "*",
90
90
  "react-dom": "*",
91
91
  "react-native": "*",
@@ -120,7 +120,7 @@
120
120
  }
121
121
  },
122
122
  "devDependencies": {
123
- "@react-navigation/drawer": "^7.5.0",
123
+ "@react-navigation/drawer": "^7.7.2",
124
124
  "@testing-library/dom": "^10.4.0",
125
125
  "@testing-library/react": "^16.3.0",
126
126
  "@testing-library/react-native": "^13.2.0",
@@ -130,17 +130,17 @@
130
130
  "react-server-dom-webpack": "~19.0.0"
131
131
  },
132
132
  "dependencies": {
133
- "@expo/metro-runtime": "6.2.0-canary-20251031-b135dff",
134
- "@expo/schema-utils": "0.1.8-canary-20251031-b135dff",
133
+ "@expo/metro-runtime": "6.2.0-canary-20251118-4ca99d5",
134
+ "@expo/schema-utils": "0.1.8-canary-20251118-4ca99d5",
135
135
  "@radix-ui/react-slot": "1.2.0",
136
136
  "@radix-ui/react-tabs": "^1.1.12",
137
- "@react-navigation/bottom-tabs": "^7.4.0",
138
- "@react-navigation/native": "^7.1.8",
139
- "@react-navigation/native-stack": "^7.3.16",
137
+ "@react-navigation/bottom-tabs": "^7.7.3",
138
+ "@react-navigation/native": "^7.1.19",
139
+ "@react-navigation/native-stack": "^7.6.2",
140
140
  "client-only": "^0.0.1",
141
141
  "debug": "^4.3.4",
142
142
  "escape-string-regexp": "^4.0.0",
143
- "expo-server": "1.0.4-canary-20251031-b135dff",
143
+ "expo-server": "1.0.5-canary-20251118-4ca99d5",
144
144
  "fast-deep-equal": "^3.1.3",
145
145
  "invariant": "^2.2.4",
146
146
  "nanoid": "^3.3.8",