expo-router 7.0.0-canary-20260121-a63c0dd → 55.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/android/build.gradle +2 -2
  2. package/build/Route.d.ts +1 -1
  3. package/build/Route.d.ts.map +1 -1
  4. package/build/Route.js.map +1 -1
  5. package/build/exports.d.ts +5 -2
  6. package/build/exports.d.ts.map +1 -1
  7. package/build/exports.js +5 -3
  8. package/build/exports.js.map +1 -1
  9. package/build/hooks.d.ts +2 -1
  10. package/build/hooks.d.ts.map +1 -1
  11. package/build/hooks.js +11 -4
  12. package/build/hooks.js.map +1 -1
  13. package/build/index.d.ts +0 -2
  14. package/build/index.d.ts.map +1 -1
  15. package/build/index.js +0 -5
  16. package/build/index.js.map +1 -1
  17. package/build/layouts/DrawerClient.d.ts +2 -2
  18. package/build/layouts/StackClient.d.ts +12 -4
  19. package/build/layouts/StackClient.d.ts.map +1 -1
  20. package/build/layouts/StackClient.js +5 -0
  21. package/build/layouts/StackClient.js.map +1 -1
  22. package/build/layouts/TabsClient.d.ts +28 -17
  23. package/build/layouts/TabsClient.d.ts.map +1 -1
  24. package/build/layouts/TabsClient.js +5 -0
  25. package/build/layouts/TabsClient.js.map +1 -1
  26. package/build/layouts/stack-utils/StackScreen.d.ts +44 -5
  27. package/build/layouts/stack-utils/StackScreen.d.ts.map +1 -1
  28. package/build/layouts/stack-utils/StackScreen.js +50 -9
  29. package/build/layouts/stack-utils/StackScreen.js.map +1 -1
  30. package/build/layouts/stack-utils/toolbar/StackToolbarButton.d.ts +3 -1
  31. package/build/layouts/stack-utils/toolbar/StackToolbarButton.d.ts.map +1 -1
  32. package/build/layouts/stack-utils/toolbar/StackToolbarButton.js.map +1 -1
  33. package/build/layouts/stack-utils/toolbar/StackToolbarMenu.d.ts +3 -1
  34. package/build/layouts/stack-utils/toolbar/StackToolbarMenu.d.ts.map +1 -1
  35. package/build/layouts/stack-utils/toolbar/StackToolbarMenu.js +7 -7
  36. package/build/layouts/stack-utils/toolbar/StackToolbarMenu.js.map +1 -1
  37. package/build/layouts/stack-utils/toolbar/StackToolbarSpacer.d.ts +0 -8
  38. package/build/layouts/stack-utils/toolbar/StackToolbarSpacer.d.ts.map +1 -1
  39. package/build/layouts/stack-utils/toolbar/StackToolbarSpacer.js +1 -1
  40. package/build/layouts/stack-utils/toolbar/StackToolbarSpacer.js.map +1 -1
  41. package/build/link/Link.d.ts +1 -1
  42. package/build/link/elements.d.ts +2 -10
  43. package/build/link/elements.d.ts.map +1 -1
  44. package/build/link/elements.js +1 -9
  45. package/build/link/elements.js.map +1 -1
  46. package/build/link/zoom/link-apple-zoom-target.d.ts +24 -2
  47. package/build/link/zoom/link-apple-zoom-target.d.ts.map +1 -1
  48. package/build/link/zoom/link-apple-zoom-target.js +20 -0
  49. package/build/link/zoom/link-apple-zoom-target.js.map +1 -1
  50. package/build/link/zoom/link-apple-zoom.d.ts +1 -2
  51. package/build/link/zoom/link-apple-zoom.d.ts.map +1 -1
  52. package/build/link/zoom/link-apple-zoom.js.map +1 -1
  53. package/build/native-tabs/NativeBottomTabsNavigator.d.ts.map +1 -1
  54. package/build/native-tabs/NativeBottomTabsNavigator.js +2 -1
  55. package/build/native-tabs/NativeBottomTabsNavigator.js.map +1 -1
  56. package/build/native-tabs/NativeTabTrigger.d.ts +2 -6
  57. package/build/native-tabs/NativeTabTrigger.d.ts.map +1 -1
  58. package/build/native-tabs/NativeTabTrigger.js +2 -6
  59. package/build/native-tabs/NativeTabTrigger.js.map +1 -1
  60. package/build/native-tabs/NativeTabs.d.ts +1 -2
  61. package/build/native-tabs/NativeTabs.d.ts.map +1 -1
  62. package/build/native-tabs/NativeTabs.js +1 -2
  63. package/build/native-tabs/NativeTabs.js.map +1 -1
  64. package/build/native-tabs/index.d.ts +1 -1
  65. package/build/native-tabs/index.d.ts.map +1 -1
  66. package/build/native-tabs/index.js +0 -15
  67. package/build/native-tabs/index.js.map +1 -1
  68. package/build/native-tabs/types.d.ts +2 -0
  69. package/build/native-tabs/types.d.ts.map +1 -1
  70. package/build/native-tabs/types.js.map +1 -1
  71. package/build/primitives/elements.d.ts +4 -2
  72. package/build/primitives/elements.d.ts.map +1 -1
  73. package/build/primitives/elements.js +4 -2
  74. package/build/primitives/elements.js.map +1 -1
  75. package/build/primitives/index.d.ts +0 -1
  76. package/build/primitives/index.d.ts.map +1 -1
  77. package/build/primitives/index.js +1 -4
  78. package/build/primitives/index.js.map +1 -1
  79. package/build/primitives/menu.d.ts +0 -2
  80. package/build/primitives/menu.d.ts.map +1 -1
  81. package/build/primitives/menu.js +0 -2
  82. package/build/primitives/menu.js.map +1 -1
  83. package/build/primitives/types.d.ts +2 -0
  84. package/build/primitives/types.d.ts.map +1 -1
  85. package/build/primitives/types.js.map +1 -1
  86. package/build/testing-library/context-stubs.d.ts +2 -1
  87. package/build/testing-library/context-stubs.d.ts.map +1 -1
  88. package/build/testing-library/context-stubs.js.map +1 -1
  89. package/build/types.d.ts +0 -8
  90. package/build/types.d.ts.map +1 -1
  91. package/build/types.js.map +1 -1
  92. package/build/ui/TabContext.d.ts +1 -1
  93. package/build/ui/TabContext.d.ts.map +1 -1
  94. package/build/ui/TabRouter.d.ts +2 -2
  95. package/build/ui/Tabs.d.ts +2 -2
  96. package/build/ui/Tabs.d.ts.map +1 -1
  97. package/expo-module.config.json +1 -1
  98. package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd.module → 55.0.0-beta.1/expo.modules.router-55.0.0-beta.1.module} +7 -7
  99. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.0-beta.1/expo.modules.router-55.0.0-beta.1.module.md5 +1 -0
  100. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.0-beta.1/expo.modules.router-55.0.0-beta.1.module.sha1 +1 -0
  101. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.0-beta.1/expo.modules.router-55.0.0-beta.1.module.sha256 +1 -0
  102. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.0-beta.1/expo.modules.router-55.0.0-beta.1.module.sha512 +1 -0
  103. package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd.pom → 55.0.0-beta.1/expo.modules.router-55.0.0-beta.1.pom} +1 -1
  104. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.0-beta.1/expo.modules.router-55.0.0-beta.1.pom.md5 +1 -0
  105. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.0-beta.1/expo.modules.router-55.0.0-beta.1.pom.sha1 +1 -0
  106. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.0-beta.1/expo.modules.router-55.0.0-beta.1.pom.sha256 +1 -0
  107. package/local-maven-repo/expo/modules/router/expo.modules.router/55.0.0-beta.1/expo.modules.router-55.0.0-beta.1.pom.sha512 +1 -0
  108. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml +4 -4
  109. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.md5 +1 -1
  110. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha1 +1 -1
  111. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha256 +1 -1
  112. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha512 +1 -1
  113. package/package.json +16 -15
  114. package/server.d.ts +1 -15
  115. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd.module.md5 +0 -1
  116. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd.module.sha1 +0 -1
  117. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd.module.sha256 +0 -1
  118. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd.module.sha512 +0 -1
  119. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd.pom.md5 +0 -1
  120. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd.pom.sha1 +0 -1
  121. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd.pom.sha256 +0 -1
  122. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd.pom.sha512 +0 -1
  123. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd-sources.jar → 55.0.0-beta.1/expo.modules.router-55.0.0-beta.1-sources.jar} +0 -0
  124. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd-sources.jar.md5 → 55.0.0-beta.1/expo.modules.router-55.0.0-beta.1-sources.jar.md5} +0 -0
  125. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd-sources.jar.sha1 → 55.0.0-beta.1/expo.modules.router-55.0.0-beta.1-sources.jar.sha1} +0 -0
  126. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd-sources.jar.sha256 → 55.0.0-beta.1/expo.modules.router-55.0.0-beta.1-sources.jar.sha256} +0 -0
  127. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd-sources.jar.sha512 → 55.0.0-beta.1/expo.modules.router-55.0.0-beta.1-sources.jar.sha512} +0 -0
  128. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd.aar → 55.0.0-beta.1/expo.modules.router-55.0.0-beta.1.aar} +0 -0
  129. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd.aar.md5 → 55.0.0-beta.1/expo.modules.router-55.0.0-beta.1.aar.md5} +0 -0
  130. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd.aar.sha1 → 55.0.0-beta.1/expo.modules.router-55.0.0-beta.1.aar.sha1} +0 -0
  131. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd.aar.sha256 → 55.0.0-beta.1/expo.modules.router-55.0.0-beta.1.aar.sha256} +0 -0
  132. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260121-a63c0dd/expo.modules.router-7.0.0-canary-20260121-a63c0dd.aar.sha512 → 55.0.0-beta.1/expo.modules.router-55.0.0-beta.1.aar.sha512} +0 -0
@@ -92,6 +92,7 @@ function NativeTabsNavigator({ children, backBehavior = defaultBackBehavior, lab
92
92
  contentRenderer: () => descriptors[route.key].render(),
93
93
  })), [routes, descriptors]);
94
94
  const visibleFocusedTabIndex = (0, react_1.useMemo)(() => visibleTabs.findIndex((tab) => tab.routeKey === routes[state.index].key), [visibleTabs, routes, state.index]);
95
+ const visibleTabsKeys = (0, react_1.useMemo)(() => visibleTabs.map((tab) => tab.routeKey).join(';'), [visibleTabs]);
95
96
  if (visibleFocusedTabIndex < 0) {
96
97
  if (process.env.NODE_ENV !== 'production') {
97
98
  throw new Error(`The focused tab in NativeTabsView cannot be displayed. Make sure path is correct and the route is not hidden. Path: "${(0, linking_1.getPathFromState)(state)}"`);
@@ -118,7 +119,7 @@ function NativeTabsNavigator({ children, backBehavior = defaultBackBehavior, lab
118
119
  }, [descriptors, navigation, state.key]);
119
120
  return (<NavigationContent>
120
121
  <exports.NativeTabsContext value>
121
- <NativeTabsView_1.NativeTabsView {...rest} focusedIndex={focusedIndex} tabs={visibleTabs} onTabChange={onTabChange}/>
122
+ <NativeTabsView_1.NativeTabsView {...rest} key={visibleTabsKeys} focusedIndex={focusedIndex} tabs={visibleTabs} onTabChange={onTabChange}/>
122
123
  </exports.NativeTabsContext>
123
124
  </NavigationContent>);
124
125
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NativeBottomTabsNavigator.js","sourceRoot":"","sources":["../../src/native-tabs/NativeBottomTabsNavigator.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+Bb,kDAyHC;AAWD,gEAiBC;AAlLD,qDAQkC;AAClC,+CAAyD;AAEzD,qEAAkE;AAClE,yDAAsD;AACtD,qDAAkD;AAOlD,mCAAsF;AACtF,oEAAiE;AACjE,6CAAmD;AACnD,gDAAkF;AAElF,oFAAoF;AACpF,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAC9B,QAAA,iBAAiB,GAAG,eAAK,CAAC,aAAa,CAAU,KAAK,CAAC,CAAC;AAErE,SAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,YAAY,GAAG,mBAAmB,EAClC,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,WAAW,EACX,GAAG,IAAI,EACiB;IACxB,IAAI,IAAA,WAAG,EAAC,yBAAiB,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CACb,mGAAmG,CACpG,CAAC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;AACJ,CAAC","sourcesContent":["'use client';\n\nimport {\n createNavigatorFactory,\n NavigationState,\n ParamListBase,\n TabNavigationState,\n TabRouterOptions,\n useNavigationBuilder,\n type EventMapBase,\n} from '@react-navigation/native';\nimport React, { use, useCallback, useMemo } from 'react';\n\nimport { NativeBottomTabsRouter } from './NativeBottomTabsRouter';\nimport { NativeTabTrigger } from './NativeTabTrigger';\nimport { NativeTabsView } from './NativeTabsView';\nimport type {\n InternalNativeTabsProps,\n NativeTabOptions,\n NativeTabsProps,\n NativeTabsViewTabItem,\n} from './types';\nimport { convertIconColorPropToObject, convertLabelStylePropToObject } from './utils';\nimport { withLayoutContext } from '../layouts/withLayoutContext';\nimport { getPathFromState } from '../link/linking';\nimport { getAllChildrenNotOfType, getAllChildrenOfType } from '../utils/children';\n\n// In Jetpack Compose, the default back behavior is to go back to the initial route.\nconst defaultBackBehavior = 'initialRoute';\nexport const NativeTabsContext = React.createContext<boolean>(false);\n\nexport function NativeTabsNavigator({\n children,\n backBehavior = defaultBackBehavior,\n labelStyle,\n iconColor,\n blurEffect,\n backgroundColor,\n badgeBackgroundColor,\n indicatorColor,\n badgeTextColor,\n shadowColor,\n ...rest\n}: InternalNativeTabsProps) {\n if (use(NativeTabsContext)) {\n throw new Error(\n 'Nesting Native Tabs inside each other is not supported natively. Use JS tabs for nesting instead.'\n );\n }\n\n const processedLabelStyle = convertLabelStylePropToObject(labelStyle);\n const processedIconColor = convertIconColorPropToObject(iconColor);\n\n const selectedLabelStyle = processedLabelStyle.selected\n ? {\n ...processedLabelStyle.selected,\n color: processedLabelStyle.selected.color ?? rest.tintColor,\n }\n : rest.tintColor\n ? { color: rest.tintColor }\n : undefined;\n\n const { state, descriptors, navigation, NavigationContent } = useNavigationBuilder<\n TabNavigationState<ParamListBase>,\n TabRouterOptions,\n Record<string, (...args: any) => void>,\n NativeTabOptions,\n Record<string, any>\n >(NativeBottomTabsRouter, {\n children,\n backBehavior,\n screenOptions: {\n disableTransparentOnScrollEdge: rest.disableTransparentOnScrollEdge,\n labelStyle: processedLabelStyle.default,\n selectedLabelStyle,\n iconColor: processedIconColor.default,\n selectedIconColor: processedIconColor.selected ?? rest.tintColor,\n blurEffect,\n backgroundColor,\n badgeBackgroundColor,\n indicatorColor,\n badgeTextColor,\n shadowColor,\n },\n });\n\n const { routes } = state;\n\n const visibleTabs = useMemo(\n () =>\n routes\n // The <NativeTab.Trigger> always sets `hidden` to defined boolean value.\n // If it is not defined, then it was not specified, and we should hide the tab.\n .filter((route) => descriptors[route.key].options?.hidden !== true)\n .map(\n (route): NativeTabsViewTabItem => ({\n options: descriptors[route.key].options,\n routeKey: route.key,\n name: route.name,\n contentRenderer: () => descriptors[route.key].render(),\n })\n ),\n [routes, descriptors]\n );\n const visibleFocusedTabIndex = useMemo(\n () => visibleTabs.findIndex((tab) => tab.routeKey === routes[state.index].key),\n [visibleTabs, routes, state.index]\n );\n\n if (visibleFocusedTabIndex < 0) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n `The focused tab in NativeTabsView cannot be displayed. Make sure path is correct and the route is not hidden. Path: \"${getPathFromState(state)}\"`\n );\n }\n }\n const focusedIndex = visibleFocusedTabIndex >= 0 ? visibleFocusedTabIndex : 0;\n\n const onTabChange = useCallback(\n (tabKey: string) => {\n const descriptor = descriptors[tabKey];\n const route = descriptor.route;\n navigation.emit({\n type: 'tabPress',\n target: tabKey,\n data: {\n __internalTabsType: 'native',\n },\n });\n navigation.dispatch({\n type: 'JUMP_TO',\n target: state.key,\n payload: {\n name: route.name,\n },\n });\n },\n [descriptors, navigation, state.key]\n );\n\n return (\n <NavigationContent>\n <NativeTabsContext value>\n <NativeTabsView\n {...rest}\n focusedIndex={focusedIndex}\n tabs={visibleTabs}\n onTabChange={onTabChange}\n />\n </NativeTabsContext>\n </NavigationContent>\n );\n}\n\nconst createNativeTabNavigator = createNavigatorFactory(NativeTabsNavigator);\n\nconst NativeTabsNavigatorWithContext = withLayoutContext<\n NativeTabOptions,\n typeof NativeTabsNavigator,\n NavigationState,\n EventMapBase\n>(createNativeTabNavigator().Navigator, undefined, true);\n\nexport function NativeTabsNavigatorWrapper(props: NativeTabsProps) {\n const triggerChildren = useMemo(\n () => getAllChildrenOfType(props.children, NativeTabTrigger),\n [props.children]\n );\n const nonTriggerChildren = useMemo(\n () => getAllChildrenNotOfType(props.children, NativeTabTrigger),\n [props.children]\n );\n\n return (\n <NativeTabsNavigatorWithContext\n {...props}\n children={triggerChildren}\n nonTriggerChildren={nonTriggerChildren}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"NativeBottomTabsNavigator.js","sourceRoot":"","sources":["../../src/native-tabs/NativeBottomTabsNavigator.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+Bb,kDA8HC;AAWD,gEAiBC;AAvLD,qDAQkC;AAClC,+CAAyD;AAEzD,qEAAkE;AAClE,yDAAsD;AACtD,qDAAkD;AAOlD,mCAAsF;AACtF,oEAAiE;AACjE,6CAAmD;AACnD,gDAAkF;AAElF,oFAAoF;AACpF,MAAM,mBAAmB,GAAG,cAAc,CAAC;AAC9B,QAAA,iBAAiB,GAAG,eAAK,CAAC,aAAa,CAAU,KAAK,CAAC,CAAC;AAErE,SAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,YAAY,GAAG,mBAAmB,EAClC,UAAU,EACV,SAAS,EACT,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,cAAc,EACd,WAAW,EACX,GAAG,IAAI,EACiB;IACxB,IAAI,IAAA,WAAG,EAAC,yBAAiB,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CACb,mGAAmG,CACpG,CAAC;IACJ,CAAC;IAED,MAAM,mBAAmB,GAAG,IAAA,qCAA6B,EAAC,UAAU,CAAC,CAAC;IACtE,MAAM,kBAAkB,GAAG,IAAA,oCAA4B,EAAC,SAAS,CAAC,CAAC;IAEnE,MAAM,kBAAkB,GAAG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C,eAAe,CAAC,CAC1B,kBAAkB,CAAC,CAAC,kBAAkB,CAAC,EACvC,CACH,CAAC;AACJ,CAAC","sourcesContent":["'use client';\n\nimport {\n createNavigatorFactory,\n NavigationState,\n ParamListBase,\n TabNavigationState,\n TabRouterOptions,\n useNavigationBuilder,\n type EventMapBase,\n} from '@react-navigation/native';\nimport React, { use, useCallback, useMemo } from 'react';\n\nimport { NativeBottomTabsRouter } from './NativeBottomTabsRouter';\nimport { NativeTabTrigger } from './NativeTabTrigger';\nimport { NativeTabsView } from './NativeTabsView';\nimport type {\n InternalNativeTabsProps,\n NativeTabOptions,\n NativeTabsProps,\n NativeTabsViewTabItem,\n} from './types';\nimport { convertIconColorPropToObject, convertLabelStylePropToObject } from './utils';\nimport { withLayoutContext } from '../layouts/withLayoutContext';\nimport { getPathFromState } from '../link/linking';\nimport { getAllChildrenNotOfType, getAllChildrenOfType } from '../utils/children';\n\n// In Jetpack Compose, the default back behavior is to go back to the initial route.\nconst defaultBackBehavior = 'initialRoute';\nexport const NativeTabsContext = React.createContext<boolean>(false);\n\nexport function NativeTabsNavigator({\n children,\n backBehavior = defaultBackBehavior,\n labelStyle,\n iconColor,\n blurEffect,\n backgroundColor,\n badgeBackgroundColor,\n indicatorColor,\n badgeTextColor,\n shadowColor,\n ...rest\n}: InternalNativeTabsProps) {\n if (use(NativeTabsContext)) {\n throw new Error(\n 'Nesting Native Tabs inside each other is not supported natively. Use JS tabs for nesting instead.'\n );\n }\n\n const processedLabelStyle = convertLabelStylePropToObject(labelStyle);\n const processedIconColor = convertIconColorPropToObject(iconColor);\n\n const selectedLabelStyle = processedLabelStyle.selected\n ? {\n ...processedLabelStyle.selected,\n color: processedLabelStyle.selected.color ?? rest.tintColor,\n }\n : rest.tintColor\n ? { color: rest.tintColor }\n : undefined;\n\n const { state, descriptors, navigation, NavigationContent } = useNavigationBuilder<\n TabNavigationState<ParamListBase>,\n TabRouterOptions,\n Record<string, (...args: any) => void>,\n NativeTabOptions,\n Record<string, any>\n >(NativeBottomTabsRouter, {\n children,\n backBehavior,\n screenOptions: {\n disableTransparentOnScrollEdge: rest.disableTransparentOnScrollEdge,\n labelStyle: processedLabelStyle.default,\n selectedLabelStyle,\n iconColor: processedIconColor.default,\n selectedIconColor: processedIconColor.selected ?? rest.tintColor,\n blurEffect,\n backgroundColor,\n badgeBackgroundColor,\n indicatorColor,\n badgeTextColor,\n shadowColor,\n },\n });\n\n const { routes } = state;\n\n const visibleTabs = useMemo(\n () =>\n routes\n // The <NativeTab.Trigger> always sets `hidden` to defined boolean value.\n // If it is not defined, then it was not specified, and we should hide the tab.\n .filter((route) => descriptors[route.key].options?.hidden !== true)\n .map(\n (route): NativeTabsViewTabItem => ({\n options: descriptors[route.key].options,\n routeKey: route.key,\n name: route.name,\n contentRenderer: () => descriptors[route.key].render(),\n })\n ),\n [routes, descriptors]\n );\n const visibleFocusedTabIndex = useMemo(\n () => visibleTabs.findIndex((tab) => tab.routeKey === routes[state.index].key),\n [visibleTabs, routes, state.index]\n );\n const visibleTabsKeys = useMemo(\n () => visibleTabs.map((tab) => tab.routeKey).join(';'),\n [visibleTabs]\n );\n\n if (visibleFocusedTabIndex < 0) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(\n `The focused tab in NativeTabsView cannot be displayed. Make sure path is correct and the route is not hidden. Path: \"${getPathFromState(state)}\"`\n );\n }\n }\n const focusedIndex = visibleFocusedTabIndex >= 0 ? visibleFocusedTabIndex : 0;\n\n const onTabChange = useCallback(\n (tabKey: string) => {\n const descriptor = descriptors[tabKey];\n const route = descriptor.route;\n navigation.emit({\n type: 'tabPress',\n target: tabKey,\n data: {\n __internalTabsType: 'native',\n },\n });\n navigation.dispatch({\n type: 'JUMP_TO',\n target: state.key,\n payload: {\n name: route.name,\n },\n });\n },\n [descriptors, navigation, state.key]\n );\n\n return (\n <NavigationContent>\n <NativeTabsContext value>\n <NativeTabsView\n {...rest}\n key={visibleTabsKeys}\n focusedIndex={focusedIndex}\n tabs={visibleTabs}\n onTabChange={onTabChange}\n />\n </NativeTabsContext>\n </NavigationContent>\n );\n}\n\nconst createNativeTabNavigator = createNavigatorFactory(NativeTabsNavigator);\n\nconst NativeTabsNavigatorWithContext = withLayoutContext<\n NativeTabOptions,\n typeof NativeTabsNavigator,\n NavigationState,\n EventMapBase\n>(createNativeTabNavigator().Navigator, undefined, true);\n\nexport function NativeTabsNavigatorWrapper(props: NativeTabsProps) {\n const triggerChildren = useMemo(\n () => getAllChildrenOfType(props.children, NativeTabTrigger),\n [props.children]\n );\n const nonTriggerChildren = useMemo(\n () => getAllChildrenNotOfType(props.children, NativeTabTrigger),\n [props.children]\n );\n\n return (\n <NativeTabsNavigatorWithContext\n {...props}\n children={triggerChildren}\n nonTriggerChildren={nonTriggerChildren}\n />\n );\n}\n"]}
@@ -8,8 +8,7 @@ import type { NativeTabOptions, NativeTabTriggerProps } from './types';
8
8
  * When used in the tab screen, the `name` prop takes no effect.
9
9
  *
10
10
  * @example
11
- * ```tsx
12
- * // In _layout file
11
+ * ```tsx app/_layout.tsx
13
12
  * import { NativeTabs } from 'expo-router/unstable-native-tabs';
14
13
  *
15
14
  * export default function Layout() {
@@ -23,8 +22,7 @@ import type { NativeTabOptions, NativeTabTriggerProps } from './types';
23
22
  * ```
24
23
  *
25
24
  * @example
26
- * ```tsx
27
- * // In a tab screen
25
+ * ```tsx app/home.tsx
28
26
  * import { NativeTabs } from 'expo-router/unstable-native-tabs';
29
27
  *
30
28
  * export default function HomeScreen() {
@@ -38,8 +36,6 @@ import type { NativeTabOptions, NativeTabTriggerProps } from './types';
38
36
  * );
39
37
  * }
40
38
  * ```
41
- *
42
- * > **Note:** You can use the alias `NativeTabs.Trigger` for this component.
43
39
  */
44
40
  declare function NativeTabTriggerImpl(props: NativeTabTriggerProps): null;
45
41
  export declare const NativeTabTrigger: typeof NativeTabTriggerImpl & {
@@ -1 +1 @@
1
- {"version":3,"file":"NativeTabTrigger.d.ts","sourceRoot":"","sources":["../../src/native-tabs/NativeTabT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;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,iBAAS,oBAAoB,CAAC,KAAK,EAAE,qBAAqB,QAuBzD;AAED,eAAO,MAAM,gBAAgB;;;;;CAK3B,CAAC;AAEH,wBAAgB,wBAAwB,CACtC,EACE,MAAM,EACN,QAAQ,EACR,IAAI,EACJ,eAAe,EACf,kBAAkB,EAClB,oBAAoB,EACpB,6BAA6B,EAC7B,YAAY,GACb,EAAE,qBAAqB,EACxB,SAAS,GAAE,OAAe,oBAqC3B;AAyBD,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAE,0BAA0B,QA8C7F;AAsCD,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,SAAS,EAChB,UAAU,CAAC,EAAE,MAAM,GAClB,KAAK,IAAI,YAAY,CAAC,qBAAqB,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CA6BjE"}
@@ -21,8 +21,7 @@ const materialIconConverter_1 = require("./utils/materialIconConverter");
21
21
  * When used in the tab screen, the `name` prop takes no effect.
22
22
  *
23
23
  * @example
24
- * ```tsx
25
- * // In _layout file
24
+ * ```tsx app/_layout.tsx
26
25
  * import { NativeTabs } from 'expo-router/unstable-native-tabs';
27
26
  *
28
27
  * export default function Layout() {
@@ -36,8 +35,7 @@ const materialIconConverter_1 = require("./utils/materialIconConverter");
36
35
  * ```
37
36
  *
38
37
  * @example
39
- * ```tsx
40
- * // In a tab screen
38
+ * ```tsx app/home.tsx
41
39
  * import { NativeTabs } from 'expo-router/unstable-native-tabs';
42
40
  *
43
41
  * export default function HomeScreen() {
@@ -51,8 +49,6 @@ const materialIconConverter_1 = require("./utils/materialIconConverter");
51
49
  * );
52
50
  * }
53
51
  * ```
54
- *
55
- * > **Note:** You can use the alias `NativeTabs.Trigger` for this component.
56
52
  */
57
53
  function NativeTabTriggerImpl(props) {
58
54
  const route = (0, native_1.useRoute)();
@@ -1 +1 @@
1
- {"version":3,"file":"NativeTab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aAAa,EAAE,OAAO,CAAC,aAAa,EAAE,CAAC;QACvD,CAAC;IACH,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB,kBAAkB,CAChC,KAAgB,EAChB,UAAmB;IAEnB,IAAI,IAAA,sBAAc,EAAC,KAAK,CAAC,IAAI,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,wBAAgB,EAAE,CAAC;QACtE,IACE,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ;YAC/B,KAAK,CAAC,KAAK;YACX,MAAM,IAAI,KAAK,CAAC,KAAK;YACrB,CAAC,KAAK,CAAC,KAAK,CAAC,IAAI,EACjB,CAAC;YACD,MAAM,IAAI,KAAK,CACb,uDAAuD,UAAU,8EAA8E,CAChJ,CAAC;QACJ,CAAC;QAED,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;YAC1C,IACE,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,IAAI,CAChC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,GAAG,IAAI,KAAK,CAAC,KAAK,CAC9E,EACD,CAAC;gBACD,MAAM,IAAI,KAAK,CACb,uDAAuD,UAAU,0GAA0G,CAC5K,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["'use client';\n\nimport { useNavigation, useRoute } from '@react-navigation/native';\nimport { isValidElement, useCallback, type ReactElement, type ReactNode } from 'react';\nimport { StyleSheet, type ImageSourcePropType } from 'react-native';\n\nimport {\n NativeTabsTriggerIcon,\n NativeTabsTriggerBadge,\n NativeTabsTriggerLabel,\n NativeTabsTriggerVectorIcon,\n type NativeTabsTriggerBadgeProps,\n type NativeTabsTriggerLabelProps,\n type NativeTabsTriggerIconProps,\n type SrcIcon,\n} from './common/elements';\nimport type { NativeTabOptions, NativeTabTriggerProps } from './types';\nimport { useIsPreview } from '../link/preview/PreviewRouteContext';\nimport { useFocusEffect } from '../useFocusEffect';\nimport { filterAllowedChildrenElements, isChildOfType } from '../utils/children';\nimport { convertComponentSrcToImageSource } from './utils/icon';\nimport { convertMaterialIconNameToImageSource } from './utils/materialIconConverter';\n\n/**\n * The component used to customize the native tab options both in the _layout file and from the tab screen.\n *\n * When used in the _layout file, you need to provide a `name` prop.\n * When used in the tab screen, the `name` prop takes no effect.\n *\n * @example\n * ```tsx\n * // In _layout file\n * import { NativeTabs } from 'expo-router/unstable-native-tabs';\n *\n * export default function Layout() {\n * return (\n * <NativeTabs>\n * <NativeTabs.Trigger name=\"home\" />\n * <NativeTabs.Trigger name=\"settings\" />\n * </NativeTabs>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx\n * // In a tab screen\n * import { NativeTabs } from 'expo-router/unstable-native-tabs';\n *\n * export default function HomeScreen() {\n * return (\n * <View>\n * <NativeTabs.Trigger>\n * <NativeTabs.Trigger.Label>Home</NativeTabs.Trigger.Label>\n * </NativeTabs.Trigger>\n * <Text>This is home screen!</Text>\n * </View>\n * );\n * }\n * ```\n *\n * > **Note:** You can use the alias `NativeTabs.Trigger` for this component.\n */\nfunction NativeTabTriggerImpl(props: NativeTabTriggerProps) {\n const route = useRoute();\n const navigation = useNavigation();\n const isInPreview = useIsPreview();\n\n useFocusEffect(\n useCallback(() => {\n // This will cause the tab to update only when it is focused.\n // As long as all tabs are loaded at the start, we don't need this check.\n // It is here to ensure similar behavior to stack\n if (!isInPreview) {\n if (navigation.getState()?.type !== 'tab') {\n throw new Error(\n `Trigger component can only be used in the tab screen. Current route: ${route.name}`\n );\n }\n const options = convertTabPropsToOptions(props, true);\n navigation.setOptions(options);\n }\n }, [props, isInPreview])\n );\n\n return null;\n}\n\nexport const NativeTabTrigger = Object.assign(NativeTabTriggerImpl, {\n Label: NativeTabsTriggerLabel,\n Icon: NativeTabsTriggerIcon,\n Badge: NativeTabsTriggerBadge,\n VectorIcon: NativeTabsTriggerVectorIcon,\n});\n\nexport function convertTabPropsToOptions(\n {\n hidden,\n children,\n role,\n disablePopToTop,\n disableScrollToTop,\n unstable_nativeProps,\n disableAutomaticContentInsets,\n contentStyle,\n }: NativeTabTriggerProps,\n isDynamic: boolean = false\n) {\n const initialOptions: NativeTabOptions = isDynamic\n ? {\n ...(unstable_nativeProps ? { nativeProps: unstable_nativeProps } : {}),\n }\n : {\n hidden: !!hidden,\n specialEffects: {\n repeatedTabSelection: {\n popToRoot: !disablePopToTop,\n scrollToTop: !disableScrollToTop,\n },\n },\n contentStyle,\n role,\n nativeProps: unstable_nativeProps,\n disableAutomaticContentInsets,\n };\n const allowedChildren = filterAllowedChildrenElements(children, [\n NativeTabsTriggerBadge,\n NativeTabsTriggerLabel,\n NativeTabsTriggerIcon,\n ]);\n return allowedChildren.reduce<NativeTabOptions>(\n (acc, child) => {\n if (isChildOfType(child, NativeTabsTriggerBadge)) {\n appendBadgeOptions(acc, child.props);\n } else if (isChildOfType(child, NativeTabsTriggerLabel)) {\n appendLabelOptions(acc, child.props);\n } else if (isChildOfType(child, NativeTabsTriggerIcon)) {\n appendIconOptions(acc, child.props);\n }\n return acc;\n },\n { ...initialOptions }\n );\n}\n\nfunction appendBadgeOptions(options: NativeTabOptions, props: NativeTabsTriggerBadgeProps) {\n if (props.children) {\n options.badgeValue = String(props.children);\n options.selectedBadgeBackgroundColor = props.selectedBackgroundColor;\n } else if (!props.hidden) {\n // If no value is provided, we set it to a space to show the badge\n // Otherwise, the `react-native-screens` will interpret it as a hidden badge\n // https://github.com/software-mansion/react-native-screens/blob/b4358fd95dd0736fc54df6bb97f210dc89edf24c/ios/bottom-tabs/RNSBottomTabsScreenComponentView.mm#L172\n options.badgeValue = ' ';\n }\n}\n\nfunction appendLabelOptions(options: NativeTabOptions, props: NativeTabsTriggerLabelProps) {\n if (props.hidden) {\n options.title = '';\n } else {\n options.title = props.children;\n if (props.selectedStyle) {\n options.selectedLabelStyle = StyleSheet.flatten(props.selectedStyle);\n }\n }\n}\n\nexport function appendIconOptions(options: NativeTabOptions, props: NativeTabsTriggerIconProps) {\n if ('sf' in props && props.sf && process.env.EXPO_OS === 'ios') {\n if (typeof props.sf === 'string') {\n options.icon = props.sf\n ? {\n sf: props.sf,\n }\n : undefined;\n options.selectedIcon = undefined;\n } else if (props.sf) {\n options.icon = props.sf.default\n ? {\n sf: props.sf.default,\n }\n : undefined;\n options.selectedIcon = props.sf.selected\n ? {\n sf: props.sf.selected,\n }\n : undefined;\n }\n } else if ('drawable' in props && props.drawable && process.env.EXPO_OS === 'android') {\n if ('md' in props) {\n console.warn(\n 'Both `md` and `drawable` props are provided to NativeTabs.Trigger.Icon. `drawable` will take precedence on Android platform.'\n );\n }\n options.icon = { drawable: props.drawable };\n options.selectedIcon = undefined;\n } else if ('md' in props && props.md && process.env.EXPO_OS === 'android') {\n if (process.env.NODE_ENV !== 'production') {\n if ('drawable' in props) {\n console.warn(\n 'Both `md` and `drawable` props are provided to NativeTabs.Trigger.Icon. `drawable` will take precedence on Android platform.'\n );\n }\n }\n options.icon = convertMaterialIconNameToImageSource(props.md);\n } else if ('src' in props && props.src) {\n const icon = convertIconSrcToIconOption(props);\n options.icon = icon?.icon;\n options.selectedIcon = icon?.selectedIcon;\n }\n if (props.selectedColor) {\n options.selectedIconColor = props.selectedColor;\n }\n}\n\nfunction convertIconSrcToIconOption(\n icon: SrcIcon | undefined\n): Pick<NativeTabOptions, 'icon' | 'selectedIcon'> | undefined {\n if (icon && icon.src) {\n const { defaultIcon, selected } =\n typeof icon.src === 'object' && 'selected' in icon.src\n ? { defaultIcon: icon.src.default, selected: icon.src.selected }\n : { defaultIcon: icon.src };\n\n const options: Pick<NativeTabOptions, 'icon' | 'selectedIcon'> = {};\n options.icon = convertSrcOrComponentToSrc(defaultIcon, { renderingMode: icon.renderingMode });\n options.selectedIcon = convertSrcOrComponentToSrc(selected, {\n renderingMode: icon.renderingMode,\n });\n return options;\n }\n\n return undefined;\n}\n\nfunction convertSrcOrComponentToSrc(\n src: ImageSourcePropType | ReactElement | undefined,\n options: {\n renderingMode: 'template' | 'original' | undefined;\n }\n) {\n if (src) {\n if (isValidElement(src)) {\n return convertComponentSrcToImageSource(src);\n } else {\n return { src, renderingMode: options.renderingMode };\n }\n }\n return undefined;\n}\n\nexport function isNativeTabTrigger(\n child: ReactNode,\n contextKey?: string\n): child is ReactElement<NativeTabTriggerProps & { name: string }> {\n if (isValidElement(child) && child && child.type === NativeTabTrigger) {\n if (\n typeof child.props === 'object' &&\n child.props &&\n 'name' in child.props &&\n !child.props.name\n ) {\n throw new Error(\n `<Trigger /> component in \\`default export\\` at \\`app${contextKey}/_layout\\` must have a \\`name\\` prop when used as a child of a Layout Route.`\n );\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (\n ['component', 'getComponent'].some(\n (key) => child.props && typeof child.props === 'object' && key in child.props\n )\n ) {\n throw new Error(\n `<Trigger /> component in \\`default export\\` at \\`app${contextKey}/_layout\\` must not have a \\`component\\` or \\`getComponent\\` prop when used as a child of a Layout Route`\n );\n }\n }\n\n return true;\n }\n\n return false;\n}\n"]}
1
+ {"version":3,"file":"NativeTabTrigger.js","sourceRoot":"","sources":["../../src/native-tabs/NativeTabTrigger.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;AA2Fb,4DAgDC;AAyBD,8CA8CC;AAsCD,gDAgCC;AAtRD,qDAAmE;AACnE,iCAAuF;AACvF,+CAAoE;AAEpE,gDAS2B;AAE3B,6EAAmE;AACnE,sDAAmD;AACnD,gDAAiF;AACjF,uCAAgE;AAChE,yEAAqF;AAErF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,SAAS,oBAAoB,CAAC,KAA4B;IACxD,MAAM,KAAK,GAAG,IAAA,iBAAQ,GAAE,CAAC;IACzB,MAAM,UAAU,GAAG,IAAA,sBAAa,GAAE,CAAC;IACnC,MAAM,WAAW,GAAG,IAAA,kC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AED,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,YAAY,EAAE,CAAC;YAC1C,IACE,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,IAAI,CAChC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,IAAI,OAAO,KAAK,CAAC,KAAK,KAAK,QAAQ,IAAI,GAAG,IAAI,KAAK,CAAC,KAAK,CAC9E,EACD,CAAC;gBACD,MAAM,IAAI,KAAK,CACb,uDAAuD,UAAU,0GAA0G,CAC5K,CAAC;YACJ,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["'use client';\n\nimport { useNavigation, useRoute } from '@react-navigation/native';\nimport { isValidElement, useCallback, type ReactElement, type ReactNode } from 'react';\nimport { StyleSheet, type ImageSourcePropType } from 'react-native';\n\nimport {\n NativeTabsTriggerIcon,\n NativeTabsTriggerBadge,\n NativeTabsTriggerLabel,\n NativeTabsTriggerVectorIcon,\n type NativeTabsTriggerBadgeProps,\n type NativeTabsTriggerLabelProps,\n type NativeTabsTriggerIconProps,\n type SrcIcon,\n} from './common/elements';\nimport type { NativeTabOptions, NativeTabTriggerProps } from './types';\nimport { useIsPreview } from '../link/preview/PreviewRouteContext';\nimport { useFocusEffect } from '../useFocusEffect';\nimport { filterAllowedChildrenElements, isChildOfType } from '../utils/children';\nimport { convertComponentSrcToImageSource } from './utils/icon';\nimport { convertMaterialIconNameToImageSource } from './utils/materialIconConverter';\n\n/**\n * The component used to customize the native tab options both in the _layout file and from the tab screen.\n *\n * When used in the _layout file, you need to provide a `name` prop.\n * When used in the tab screen, the `name` prop takes no effect.\n *\n * @example\n * ```tsx app/_layout.tsx\n * import { NativeTabs } from 'expo-router/unstable-native-tabs';\n *\n * export default function Layout() {\n * return (\n * <NativeTabs>\n * <NativeTabs.Trigger name=\"home\" />\n * <NativeTabs.Trigger name=\"settings\" />\n * </NativeTabs>\n * );\n * }\n * ```\n *\n * @example\n * ```tsx app/home.tsx\n * import { NativeTabs } from 'expo-router/unstable-native-tabs';\n *\n * export default function HomeScreen() {\n * return (\n * <View>\n * <NativeTabs.Trigger>\n * <NativeTabs.Trigger.Label>Home</NativeTabs.Trigger.Label>\n * </NativeTabs.Trigger>\n * <Text>This is home screen!</Text>\n * </View>\n * );\n * }\n * ```\n */\nfunction NativeTabTriggerImpl(props: NativeTabTriggerProps) {\n const route = useRoute();\n const navigation = useNavigation();\n const isInPreview = useIsPreview();\n\n useFocusEffect(\n useCallback(() => {\n // This will cause the tab to update only when it is focused.\n // As long as all tabs are loaded at the start, we don't need this check.\n // It is here to ensure similar behavior to stack\n if (!isInPreview) {\n if (navigation.getState()?.type !== 'tab') {\n throw new Error(\n `Trigger component can only be used in the tab screen. Current route: ${route.name}`\n );\n }\n const options = convertTabPropsToOptions(props, true);\n navigation.setOptions(options);\n }\n }, [props, isInPreview])\n );\n\n return null;\n}\n\nexport const NativeTabTrigger = Object.assign(NativeTabTriggerImpl, {\n Label: NativeTabsTriggerLabel,\n Icon: NativeTabsTriggerIcon,\n Badge: NativeTabsTriggerBadge,\n VectorIcon: NativeTabsTriggerVectorIcon,\n});\n\nexport function convertTabPropsToOptions(\n {\n hidden,\n children,\n role,\n disablePopToTop,\n disableScrollToTop,\n unstable_nativeProps,\n disableAutomaticContentInsets,\n contentStyle,\n }: NativeTabTriggerProps,\n isDynamic: boolean = false\n) {\n const initialOptions: NativeTabOptions = isDynamic\n ? {\n ...(unstable_nativeProps ? { nativeProps: unstable_nativeProps } : {}),\n }\n : {\n hidden: !!hidden,\n specialEffects: {\n repeatedTabSelection: {\n popToRoot: !disablePopToTop,\n scrollToTop: !disableScrollToTop,\n },\n },\n contentStyle,\n role,\n nativeProps: unstable_nativeProps,\n disableAutomaticContentInsets,\n };\n const allowedChildren = filterAllowedChildrenElements(children, [\n NativeTabsTriggerBadge,\n NativeTabsTriggerLabel,\n NativeTabsTriggerIcon,\n ]);\n return allowedChildren.reduce<NativeTabOptions>(\n (acc, child) => {\n if (isChildOfType(child, NativeTabsTriggerBadge)) {\n appendBadgeOptions(acc, child.props);\n } else if (isChildOfType(child, NativeTabsTriggerLabel)) {\n appendLabelOptions(acc, child.props);\n } else if (isChildOfType(child, NativeTabsTriggerIcon)) {\n appendIconOptions(acc, child.props);\n }\n return acc;\n },\n { ...initialOptions }\n );\n}\n\nfunction appendBadgeOptions(options: NativeTabOptions, props: NativeTabsTriggerBadgeProps) {\n if (props.children) {\n options.badgeValue = String(props.children);\n options.selectedBadgeBackgroundColor = props.selectedBackgroundColor;\n } else if (!props.hidden) {\n // If no value is provided, we set it to a space to show the badge\n // Otherwise, the `react-native-screens` will interpret it as a hidden badge\n // https://github.com/software-mansion/react-native-screens/blob/b4358fd95dd0736fc54df6bb97f210dc89edf24c/ios/bottom-tabs/RNSBottomTabsScreenComponentView.mm#L172\n options.badgeValue = ' ';\n }\n}\n\nfunction appendLabelOptions(options: NativeTabOptions, props: NativeTabsTriggerLabelProps) {\n if (props.hidden) {\n options.title = '';\n } else {\n options.title = props.children;\n if (props.selectedStyle) {\n options.selectedLabelStyle = StyleSheet.flatten(props.selectedStyle);\n }\n }\n}\n\nexport function appendIconOptions(options: NativeTabOptions, props: NativeTabsTriggerIconProps) {\n if ('sf' in props && props.sf && process.env.EXPO_OS === 'ios') {\n if (typeof props.sf === 'string') {\n options.icon = props.sf\n ? {\n sf: props.sf,\n }\n : undefined;\n options.selectedIcon = undefined;\n } else if (props.sf) {\n options.icon = props.sf.default\n ? {\n sf: props.sf.default,\n }\n : undefined;\n options.selectedIcon = props.sf.selected\n ? {\n sf: props.sf.selected,\n }\n : undefined;\n }\n } else if ('drawable' in props && props.drawable && process.env.EXPO_OS === 'android') {\n if ('md' in props) {\n console.warn(\n 'Both `md` and `drawable` props are provided to NativeTabs.Trigger.Icon. `drawable` will take precedence on Android platform.'\n );\n }\n options.icon = { drawable: props.drawable };\n options.selectedIcon = undefined;\n } else if ('md' in props && props.md && process.env.EXPO_OS === 'android') {\n if (process.env.NODE_ENV !== 'production') {\n if ('drawable' in props) {\n console.warn(\n 'Both `md` and `drawable` props are provided to NativeTabs.Trigger.Icon. `drawable` will take precedence on Android platform.'\n );\n }\n }\n options.icon = convertMaterialIconNameToImageSource(props.md);\n } else if ('src' in props && props.src) {\n const icon = convertIconSrcToIconOption(props);\n options.icon = icon?.icon;\n options.selectedIcon = icon?.selectedIcon;\n }\n if (props.selectedColor) {\n options.selectedIconColor = props.selectedColor;\n }\n}\n\nfunction convertIconSrcToIconOption(\n icon: SrcIcon | undefined\n): Pick<NativeTabOptions, 'icon' | 'selectedIcon'> | undefined {\n if (icon && icon.src) {\n const { defaultIcon, selected } =\n typeof icon.src === 'object' && 'selected' in icon.src\n ? { defaultIcon: icon.src.default, selected: icon.src.selected }\n : { defaultIcon: icon.src };\n\n const options: Pick<NativeTabOptions, 'icon' | 'selectedIcon'> = {};\n options.icon = convertSrcOrComponentToSrc(defaultIcon, { renderingMode: icon.renderingMode });\n options.selectedIcon = convertSrcOrComponentToSrc(selected, {\n renderingMode: icon.renderingMode,\n });\n return options;\n }\n\n return undefined;\n}\n\nfunction convertSrcOrComponentToSrc(\n src: ImageSourcePropType | ReactElement | undefined,\n options: {\n renderingMode: 'template' | 'original' | undefined;\n }\n) {\n if (src) {\n if (isValidElement(src)) {\n return convertComponentSrcToImageSource(src);\n } else {\n return { src, renderingMode: options.renderingMode };\n }\n }\n return undefined;\n}\n\nexport function isNativeTabTrigger(\n child: ReactNode,\n contextKey?: string\n): child is ReactElement<NativeTabTriggerProps & { name: string }> {\n if (isValidElement(child) && child && child.type === NativeTabTrigger) {\n if (\n typeof child.props === 'object' &&\n child.props &&\n 'name' in child.props &&\n !child.props.name\n ) {\n throw new Error(\n `<Trigger /> component in \\`default export\\` at \\`app${contextKey}/_layout\\` must have a \\`name\\` prop when used as a child of a Layout Route.`\n );\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (\n ['component', 'getComponent'].some(\n (key) => child.props && typeof child.props === 'object' && key in child.props\n )\n ) {\n throw new Error(\n `<Trigger /> component in \\`default export\\` at \\`app${contextKey}/_layout\\` must not have a \\`component\\` or \\`getComponent\\` prop when used as a child of a Layout Route`\n );\n }\n }\n\n return true;\n }\n\n return false;\n}\n"]}
@@ -3,8 +3,7 @@ import type { NativeTabsProps } from './types';
3
3
  * The component used to create native tabs layout.
4
4
  *
5
5
  * @example
6
- * ```tsx
7
- * // In _layout file
6
+ * ```tsx app/_layout.tsx
8
7
  * import { NativeTabs } from 'expo-router/unstable-native-tabs';
9
8
  *
10
9
  * export default function Layout() {
@@ -1 +1 @@
1
- {"version":3,"file":"NativeTabs.d.ts","sourceRoot":"","sources":["../../src/native-tabs/NativeTabs.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAM/C;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,UAAU,WACb,eAAe;;;;;;;;;;CAIxB,CAAC"}
1
+ {"version":3,"file":"NativeTabs.d.ts","sourceRoot":"","sources":["../../src/native-tabs/NativeTabs.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAM/C;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,UAAU,WACb,eAAe;;;;;;;;;;CAIxB,CAAC"}
@@ -14,8 +14,7 @@ const BottomAccessory = Object.assign(elements_1.NativeTabsBottomAccessory, {
14
14
  * The component used to create native tabs layout.
15
15
  *
16
16
  * @example
17
- * ```tsx
18
- * // In _layout file
17
+ * ```tsx app/_layout.tsx
19
18
  * import { NativeTabs } from 'expo-router/unstable-native-tabs';
20
19
  *
21
20
  * export default function Layout() {
@@ -1 +1 @@
1
- {"version":3,"file":"NativeTabs.js","sourceRoot":"","sources":["../../src/native-tabs/NativeTabs.tsx"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,2BAA2B;AAC3B,2EAAyE;AACzE,yDAAsD;AACtD,gDAA8D;AAC9D,mCAAuC;AAGvC,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,oCAAyB,EAAE;IAC/D,YAAY,EAAZ,oBAAY;CACb,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACU,QAAA,UAAU,GAAG,MAAM,CAAC,MAAM,CACrC,CAAC,KAAsB,EAAE,EAAE;IACzB,OAAO,CAAC,sDAA0B,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACnD,CAAC,EACD,EAAE,OAAO,EAAE,mCAAgB,EAAE,eAAe,EAAE,CAC/C,CAAC","sourcesContent":["// We need this file to re-export the navigator\n// Otherwise rsc would fail\nimport { NativeTabsNavigatorWrapper } from './NativeBottomTabsNavigator';\nimport { NativeTabTrigger } from './NativeTabTrigger';\nimport { NativeTabsBottomAccessory } from './common/elements';\nimport { usePlacement } from './hooks';\nimport type { NativeTabsProps } from './types';\n\nconst BottomAccessory = Object.assign(NativeTabsBottomAccessory, {\n usePlacement,\n});\n\n/**\n * The component used to create native tabs layout.\n *\n * @example\n * ```tsx\n * // In _layout file\n * import { NativeTabs } from 'expo-router/unstable-native-tabs';\n *\n * export default function Layout() {\n * return (\n * <NativeTabs>\n * <NativeTabs.Trigger name=\"home\" />\n * <NativeTabs.Trigger name=\"settings\" />\n * </NativeTabs>\n * );\n * }\n * ```\n */\nexport const NativeTabs = Object.assign(\n (props: NativeTabsProps) => {\n return <NativeTabsNavigatorWrapper {...props} />;\n },\n { Trigger: NativeTabTrigger, BottomAccessory }\n);\n"]}
1
+ {"version":3,"file":"NativeTabs.js","sourceRoot":"","sources":["../../src/native-tabs/NativeTabs.tsx"],"names":[],"mappings":";;;AAAA,+CAA+C;AAC/C,2BAA2B;AAC3B,2EAAyE;AACzE,yDAAsD;AACtD,gDAA8D;AAC9D,mCAAuC;AAGvC,MAAM,eAAe,GAAG,MAAM,CAAC,MAAM,CAAC,oCAAyB,EAAE;IAC/D,YAAY,EAAZ,oBAAY;CACb,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;GAgBG;AACU,QAAA,UAAU,GAAG,MAAM,CAAC,MAAM,CACrC,CAAC,KAAsB,EAAE,EAAE;IACzB,OAAO,CAAC,sDAA0B,CAAC,IAAI,KAAK,CAAC,EAAG,CAAC;AACnD,CAAC,EACD,EAAE,OAAO,EAAE,mCAAgB,EAAE,eAAe,EAAE,CAC/C,CAAC","sourcesContent":["// We need this file to re-export the navigator\n// Otherwise rsc would fail\nimport { NativeTabsNavigatorWrapper } from './NativeBottomTabsNavigator';\nimport { NativeTabTrigger } from './NativeTabTrigger';\nimport { NativeTabsBottomAccessory } from './common/elements';\nimport { usePlacement } from './hooks';\nimport type { NativeTabsProps } from './types';\n\nconst BottomAccessory = Object.assign(NativeTabsBottomAccessory, {\n usePlacement,\n});\n\n/**\n * The component used to create native tabs layout.\n *\n * @example\n * ```tsx app/_layout.tsx\n * import { NativeTabs } from 'expo-router/unstable-native-tabs';\n *\n * export default function Layout() {\n * return (\n * <NativeTabs>\n * <NativeTabs.Trigger name=\"home\" />\n * <NativeTabs.Trigger name=\"settings\" />\n * </NativeTabs>\n * );\n * }\n * ```\n */\nexport const NativeTabs = Object.assign(\n (props: NativeTabsProps) => {\n return <NativeTabsNavigatorWrapper {...props} />;\n },\n { Trigger: NativeTabTrigger, BottomAccessory }\n);\n"]}
@@ -1,4 +1,4 @@
1
- export * from './common/elements';
1
+ export type { NativeTabsTriggerLabelProps, SrcIcon, SFSymbolIcon, DrawableIcon, MaterialIcon, BaseNativeTabsTriggerIconProps, NativeTabsTriggerIconProps, NativeTabsTriggerBadgeProps, NativeTabsBottomAccessoryProps, } from './common/elements';
2
2
  export type { NativeTabsProps, NativeTabTriggerProps, NativeTabsLabelStyle, SymbolOrImageSource, NativeTabsTabBarItemLabelVisibilityMode, NativeTabsBlurEffect, NativeTabsTabBarMinimizeBehavior, NativeTabsTabBarItemRole, } from './types';
3
3
  export { NativeTabTrigger } from './NativeTabTrigger';
4
4
  export { NativeTabs } from './NativeTabs';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/native-tabs/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,uCAAuC,EACvC,oBAAoB,EACpB,gCAAgC,EAChC,wBAAwB,GACzB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/native-tabs/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,2BAA2B,EAC3B,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,8BAA8B,EAC9B,0BAA0B,EAC1B,2BAA2B,EAC3B,8BAA8B,GAC/B,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,mBAAmB,EACnB,uCAAuC,EACvC,oBAAoB,EACpB,gCAAgC,EAChC,wBAAwB,GACzB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -1,21 +1,6 @@
1
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
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
3
  exports.NativeTabs = exports.NativeTabTrigger = void 0;
18
- __exportStar(require("./common/elements"), exports);
19
4
  var NativeTabTrigger_1 = require("./NativeTabTrigger");
20
5
  Object.defineProperty(exports, "NativeTabTrigger", { enumerable: true, get: function () { return NativeTabTrigger_1.NativeTabTrigger; } });
21
6
  var NativeTabs_1 = require("./NativeTabs");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/native-tabs/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,oDAAkC;AAWlC,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA","sourcesContent":["export * from './common/elements';\nexport type {\n NativeTabsProps,\n NativeTabTriggerProps,\n NativeTabsLabelStyle,\n SymbolOrImageSource,\n NativeTabsTabBarItemLabelVisibilityMode,\n NativeTabsBlurEffect,\n NativeTabsTabBarMinimizeBehavior,\n NativeTabsTabBarItemRole,\n} from './types';\nexport { NativeTabTrigger } from './NativeTabTrigger';\nexport { NativeTabs } from './NativeTabs';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/native-tabs/index.ts"],"names":[],"mappings":";;;AAqBA,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AACzB,2CAA0C;AAAjC,wGAAA,UAAU,OAAA","sourcesContent":["export type {\n NativeTabsTriggerLabelProps,\n SrcIcon,\n SFSymbolIcon,\n DrawableIcon,\n MaterialIcon,\n BaseNativeTabsTriggerIconProps,\n NativeTabsTriggerIconProps,\n NativeTabsTriggerBadgeProps,\n NativeTabsBottomAccessoryProps,\n} from './common/elements';\nexport type {\n NativeTabsProps,\n NativeTabTriggerProps,\n NativeTabsLabelStyle,\n SymbolOrImageSource,\n NativeTabsTabBarItemLabelVisibilityMode,\n NativeTabsBlurEffect,\n NativeTabsTabBarMinimizeBehavior,\n NativeTabsTabBarItemRole,\n} from './types';\nexport { NativeTabTrigger } from './NativeTabTrigger';\nexport { NativeTabs } from './NativeTabs';\n"]}
@@ -238,6 +238,8 @@ export interface NativeTabTriggerProps {
238
238
  * If true, the tab will be hidden from the tab bar.
239
239
  *
240
240
  * > **Note**: Marking a tab as `hidden` means it cannot be navigated to in any way.
241
+ *
242
+ * > **Note**: Dynamically hiding tabs will remount the navigator and the state will be reset.
241
243
  */
242
244
  hidden?: boolean;
243
245
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/native-tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAC/C,OAAO,KAAK,EACV,UAAU,EACV,mBAAmB,EACnB,SAAS,EACT,SAAS,EACT,SAAS,EACV,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,MAAM,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC;AAEvF,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,YAAY,CAAC,EAAE,mBAAmB,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,kBAAkB,CAAC,EAAE,oBAAoB,CAAC;IAC1C,UAAU,CAAC,EAAE,oBAAoB,CAAC;IAClC,IAAI,CAAC,EAAE,wBAAwB,CAAC;IAChC,iBAAiB,CAAC,E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C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/native-tabs/types.ts"],"names":[],"mappings":";;;AAsGa,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;AA2KE,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;AA8FX,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 {\n ColorValue,\n ImageSourcePropType,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native';\nimport type { TabsScreenProps } from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nexport type NativeScreenProps = Partial<Omit<TabsScreenProps, '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?: TabsScreenProps['specialEffects'];\n nativeProps?: NativeScreenProps;\n disableAutomaticContentInsets?: boolean;\n contentStyle?: Pick<\n ViewStyle,\n | 'backgroundColor'\n | 'experimental_backgroundImage'\n | 'padding'\n | 'paddingTop'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingBlock'\n | 'paddingBlockEnd'\n | 'paddingBlockStart'\n | 'paddingInline'\n | 'paddingInlineEnd'\n | 'paddingInlineStart'\n | 'paddingEnd'\n | 'paddingHorizontal'\n | 'paddingVertical'\n | 'paddingStart'\n | 'alignContent'\n | 'alignItems'\n | 'justifyContent'\n | 'flexDirection'\n | 'gap'\n >;\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 * Controls how the icon is rendered on iOS.\n * @platform ios\n * @default 'template'\n */\n renderingMode?: 'template' | 'original';\n };\n\nexport type NativeTabsLabelStyle = Pick<\n TextStyle,\n 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | '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\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 | StyleProp<NativeTabsLabelStyle>\n | {\n default?: StyleProp<NativeTabsLabelStyle>;\n selected?: StyleProp<NativeTabsLabelStyle>;\n };\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 /**\n * When set to `true`, hides the tab bar.\n *\n * @default false\n */\n hidden?: boolean;\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 [Apple 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}\n\nexport interface InternalNativeTabsProps extends NativeTabsProps {\n nonTriggerChildren?: React.ReactNode;\n}\nexport interface NativeTabsViewProps\n extends Omit<\n InternalNativeTabsProps,\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 The supported values correspond to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem).\n * @platform ios\n */\n role?: NativeTabsTabBarItemRole;\n /**\n * The default behavior differs between iOS and Android.\n *\n * On **Android**, the content of a native tabs screen is automatically wrapped in a `SafeAreaView`,\n * and the **bottom** inset is applied. Other insets must be handled manually.\n *\n * On **iOS**, the first scroll view nested inside a native tabs screen has\n * [automatic content inset adjustment](https://reactnative.dev/docs/scrollview#contentinsetadjustmentbehavior-ios) enabled\n *\n * When this property is set to `true`, automatic content inset adjustment is disabled for the screen\n * and must be managed manually. You can use `SafeAreaView` from `react-native-screens/experimental`\n * to handle safe area insets.\n *\n * @platform android\n * @platform ios\n */\n disableAutomaticContentInsets?: boolean;\n /**\n * The style applied to the content of the tab\n *\n * Note: Only certain style properties are supported.\n */\n contentStyle?: NativeTabOptions['contentStyle'];\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
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/native-tabs/types.ts"],"names":[],"mappings":";;;AAsGa,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;AA2KE,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;AAgGX,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 {\n ColorValue,\n ImageSourcePropType,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native';\nimport type { TabsScreenProps } from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nexport type NativeScreenProps = Partial<Omit<TabsScreenProps, '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?: TabsScreenProps['specialEffects'];\n nativeProps?: NativeScreenProps;\n disableAutomaticContentInsets?: boolean;\n contentStyle?: Pick<\n ViewStyle,\n | 'backgroundColor'\n | 'experimental_backgroundImage'\n | 'padding'\n | 'paddingTop'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingBlock'\n | 'paddingBlockEnd'\n | 'paddingBlockStart'\n | 'paddingInline'\n | 'paddingInlineEnd'\n | 'paddingInlineStart'\n | 'paddingEnd'\n | 'paddingHorizontal'\n | 'paddingVertical'\n | 'paddingStart'\n | 'alignContent'\n | 'alignItems'\n | 'justifyContent'\n | 'flexDirection'\n | 'gap'\n >;\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 * Controls how the icon is rendered on iOS.\n * @platform ios\n * @default 'template'\n */\n renderingMode?: 'template' | 'original';\n };\n\nexport type NativeTabsLabelStyle = Pick<\n TextStyle,\n 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | '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\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 | StyleProp<NativeTabsLabelStyle>\n | {\n default?: StyleProp<NativeTabsLabelStyle>;\n selected?: StyleProp<NativeTabsLabelStyle>;\n };\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 /**\n * When set to `true`, hides the tab bar.\n *\n * @default false\n */\n hidden?: boolean;\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 [Apple 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}\n\nexport interface InternalNativeTabsProps extends NativeTabsProps {\n nonTriggerChildren?: React.ReactNode;\n}\nexport interface NativeTabsViewProps\n extends Omit<\n InternalNativeTabsProps,\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 * > **Note**: Dynamically hiding tabs will remount the navigator and the state will be reset.\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 The supported values correspond to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem).\n * @platform ios\n */\n role?: NativeTabsTabBarItemRole;\n /**\n * The default behavior differs between iOS and Android.\n *\n * On **Android**, the content of a native tabs screen is automatically wrapped in a `SafeAreaView`,\n * and the **bottom** inset is applied. Other insets must be handled manually.\n *\n * On **iOS**, the first scroll view nested inside a native tabs screen has\n * [automatic content inset adjustment](https://reactnative.dev/docs/scrollview#contentinsetadjustmentbehavior-ios) enabled\n *\n * When this property is set to `true`, automatic content inset adjustment is disabled for the screen\n * and must be managed manually. You can use `SafeAreaView` from `react-native-screens/experimental`\n * to handle safe area insets.\n *\n * @platform android\n * @platform ios\n */\n disableAutomaticContentInsets?: boolean;\n /**\n * The style applied to the content of the tab\n *\n * Note: Only certain style properties are supported.\n */\n contentStyle?: NativeTabOptions['contentStyle'];\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"]}
@@ -2,7 +2,10 @@ import type { BadgeProps, IconProps, LabelProps, VectorIconProps } from './types
2
2
  export declare function Badge(props: BadgeProps): null;
3
3
  export declare function Icon(props: IconProps): null;
4
4
  /**
5
- * Helper component which can be used to load vector icons.
5
+ * Helper component for loading vector icons.
6
+ *
7
+ * Prefer using the `md` and `sf` props on `Icon` rather than using this component directly.
8
+ * Only use this component when you need to load a specific icon from a vector icon family.
6
9
  *
7
10
  * @example
8
11
  * ```tsx
@@ -10,7 +13,6 @@ export declare function Icon(props: IconProps): null;
10
13
  * import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
11
14
  *
12
15
  * <Icon src={<VectorIcon family={MaterialCommunityIcons} name="home" />} />
13
- *
14
16
  * ```
15
17
  */
16
18
  export declare function VectorIcon<const NameT extends string>(props: VectorIconProps<NameT>): null;
@@ -1 +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"}
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;;;;;;;;;;;;;GAaG;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"}
@@ -11,7 +11,10 @@ function Icon(props) {
11
11
  return null;
12
12
  }
13
13
  /**
14
- * Helper component which can be used to load vector icons.
14
+ * Helper component for loading vector icons.
15
+ *
16
+ * Prefer using the `md` and `sf` props on `Icon` rather than using this component directly.
17
+ * Only use this component when you need to load a specific icon from a vector icon family.
15
18
  *
16
19
  * @example
17
20
  * ```tsx
@@ -19,7 +22,6 @@ function Icon(props) {
19
22
  * import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
20
23
  *
21
24
  * <Icon src={<VectorIcon family={MaterialCommunityIcons} name="home" />} />
22
- *
23
25
  * ```
24
26
  */
25
27
  function VectorIcon(props) {
@@ -1 +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"]}
1
+ {"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/primitives/elements.tsx"],"names":[],"mappings":";;AAEA,sBAEC;AAED,oBAEC;AAgBD,gCAEC;AAED,sBAEC;AA5BD,SAAgB,KAAK,CAAC,KAAiB;IACrC,OAAO,IAAI,CAAC;AACd,CAAC;AAED,SAAgB,IAAI,CAAC,KAAgB;IACnC,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;;;;GAaG;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 for loading vector icons.\n *\n * Prefer using the `md` and `sf` props on `Icon` rather than using this component directly.\n * Only use this component when you need to load a specific icon from a vector icon family.\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 */\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"]}
@@ -1,5 +1,4 @@
1
1
  export { Screen, Group } from './navigation';
2
2
  export * from './types';
3
3
  export * from './elements';
4
- export { Menu, MenuAction } from './menu';
5
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +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"}
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"}
@@ -14,13 +14,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.MenuAction = exports.Menu = exports.Group = exports.Screen = void 0;
17
+ exports.Group = exports.Screen = void 0;
18
18
  var navigation_1 = require("./navigation");
19
19
  Object.defineProperty(exports, "Screen", { enumerable: true, get: function () { return navigation_1.Screen; } });
20
20
  Object.defineProperty(exports, "Group", { enumerable: true, get: function () { return navigation_1.Group; } });
21
21
  __exportStar(require("./types"), exports);
22
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
23
  //# sourceMappingURL=index.js.map
@@ -1 +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"]}
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","sourcesContent":["export { Screen, Group } from './navigation';\nexport * from './types';\nexport * from './elements';\n"]}
@@ -3,8 +3,6 @@ import type { MenuActionProps, MenuProps } from './types';
3
3
  * This component renders a context menu action for a link.
4
4
  * It should only be used as a child of `Link.Menu` or `LinkMenu`.
5
5
  *
6
- * > **Note**: You can use the alias `Link.MenuAction` for this component.
7
- *
8
6
  * @platform ios
9
7
  */
10
8
  export declare function MenuAction(props: MenuActionProps): null;
@@ -1 +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"}
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;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,eAAe,QAOhD;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,SAAS,QAKpC"}
@@ -9,8 +9,6 @@ const InternalLinkPreviewContext_1 = require("../link/InternalLinkPreviewContext
9
9
  * This component renders a context menu action for a link.
10
10
  * It should only be used as a child of `Link.Menu` or `LinkMenu`.
11
11
  *
12
- * > **Note**: You can use the alias `Link.MenuAction` for this component.
13
- *
14
12
  * @platform ios
15
13
  */
16
14
  function MenuAction(props) {
@@ -1 +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
+ {"version":3,"file":"menu.js","sourceRoot":"","sources":["../../src/primitives/menu.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;AAab,gCAOC;AAED,oBAKC;AAzBD,iCAA4B;AAG5B,mFAAgF;AAEhF;;;;;GAKG;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 * @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"]}
@@ -12,6 +12,8 @@ export interface VectorIconProps<NameT extends string> {
12
12
  * ```tsx
13
13
  * import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
14
14
  * ```
15
+ *
16
+ * @hideType
15
17
  */
16
18
  family: {
17
19
  getImageSource: (name: NameT, size: number, color: ColorValue) => Promise<ImageSourcePropType | null>;
@@ -1 +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,EACV,sBAAsB,EACtB,qBAAqB,EACrB,sBAAsB,EACtB,2BAA2B,EAC3B,qBAAqB,EACtB,MAAM,wBAAwB,CAAC;AAChC,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,GAAG,sBAAsB,CAAC;AAE9E,MAAM,MAAM,SAAS,GAAG,0BAA0B,GAA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AAC;KAC1C,CAAC;IACF;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC;CACb;AAED,MAAM,MAAM,UAAU,GAAG,2BAA2B,GAAG,sBAAsB,CAAC;AAE9E,MAAM,MAAM,eAAe,GAAG,mBAAmB,GAAG,2BAA2B,CAAC;AAEhF,MAAM,MAAM,SAAS,GAAG,aAAa,GAAG,qBAAqB,CAAC"}
@@ -1 +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 {\n StackToolbarBadgeProps,\n StackToolbarIconProps,\n StackToolbarLabelProps,\n StackToolbarMenuActionProps,\n StackToolbarMenuProps,\n} from '../layouts/stack-utils';\nimport type { LinkMenuActionProps, LinkMenuProps } from '../link/elements';\nimport type {\n NativeTabsTriggerBadgeProps,\n NativeTabsTriggerIconProps,\n NativeTabsTriggerLabelProps,\n} from '../native-tabs';\n\nexport type BadgeProps = NativeTabsTriggerBadgeProps | StackToolbarBadgeProps;\n\nexport type IconProps = NativeTabsTriggerIconProps | StackToolbarIconProps;\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 | StackToolbarLabelProps;\n\nexport type MenuActionProps = LinkMenuActionProps | StackToolbarMenuActionProps;\n\nexport type MenuProps = LinkMenuProps | StackToolbarMenuProps;\n"]}
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 {\n StackToolbarBadgeProps,\n StackToolbarIconProps,\n StackToolbarLabelProps,\n StackToolbarMenuActionProps,\n StackToolbarMenuProps,\n} from '../layouts/stack-utils';\nimport type { LinkMenuActionProps, LinkMenuProps } from '../link/elements';\nimport type {\n NativeTabsTriggerBadgeProps,\n NativeTabsTriggerIconProps,\n NativeTabsTriggerLabelProps,\n} from '../native-tabs';\n\nexport type BadgeProps = NativeTabsTriggerBadgeProps | StackToolbarBadgeProps;\n\nexport type IconProps = NativeTabsTriggerIconProps | StackToolbarIconProps;\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 * @hideType\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 | StackToolbarLabelProps;\n\nexport type MenuActionProps = LinkMenuActionProps | StackToolbarMenuActionProps;\n\nexport type MenuProps = LinkMenuProps | StackToolbarMenuProps;\n"]}
@@ -1,5 +1,6 @@
1
+ import type { LoaderFunction } from 'expo-server';
1
2
  import requireContext from './require-context-ponyfill';
2
- import { LoaderFunction, NativeIntent } from '../types';
3
+ import { NativeIntent } from '../types';
3
4
  export type ReactComponent = () => React.ReactElement<any, any> | null;
4
5
  export type NativeIntentStub = NativeIntent;
5
6
  export type FileStub = (Record<string, unknown> & {
@@ -1 +1 @@
1
- {"version":3,"file":"context-stubs.d.ts","sourceRoot":"","sources":["../../src/testing-library/context-stubs.ts"],"names":[],"mappings":"AAEA,OAAO,cAAc,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,YAAY,CAAC,GAAG,EAAE,GAAG,CAAC,GAAG,IAAI,CAAC;AACvE,MAAM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